From b7cce748cfc75a0a6e81336e92fa147ee6332297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20M=C3=BCller?= <p.mueller@pcsg.de> Date: Wed, 5 Mar 2025 08:25:19 +0100 Subject: [PATCH] fix: only show cancel btn in correct circumstances; use correct verification class for cancel abort --- bin/controls/profile/UserProfile.js | 2 +- src/QUI/Memberships/Users/MembershipUser.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/controls/profile/UserProfile.js b/bin/controls/profile/UserProfile.js index 26a253a..d8cc11b 100644 --- a/bin/controls/profile/UserProfile.js +++ b/bin/controls/profile/UserProfile.js @@ -228,7 +228,7 @@ define('package/quiqqer/memberships/bin/controls/profile/UserProfile', [ } // if autoextend and not cancelled -> hide endDate - if (Membership.cancelStatus == 0) { + if (!Membership.cancelled && Membership.cancelStatus == 0) { var CancelContainer = MembershipElm.getElement('.quiqqer-memberships-profile-userprofile-btn'); // cancel btn diff --git a/src/QUI/Memberships/Users/MembershipUser.php b/src/QUI/Memberships/Users/MembershipUser.php index 60fa689..2999622 100644 --- a/src/QUI/Memberships/Users/MembershipUser.php +++ b/src/QUI/Memberships/Users/MembershipUser.php @@ -1223,7 +1223,7 @@ protected function createAbortCancelVerification(): LinkVerification { return $this->verificationFactory->createLinkVerification( 'quiqqer-memberships-users-cancel-abort-' . $this->id, - new CancelVerification(), + new AbortCancelVerification(), [ 'membershipUserId' => $this->id ], -- GitLab