From 99f71df997e4cb405c66fcb6b325965212b0024e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrick=20M=C3=BCller?= <p.mueller@pcsg.de>
Date: Mon, 10 Jul 2017 16:55:56 +0200
Subject: [PATCH] =?UTF-8?q?refactor:=20Ende=20der=20Mitgliedschaft=20bei?=
 =?UTF-8?q?=20K=C3=BCndigung=20anzeigen?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 bin/controls/profile/UserProfile.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/bin/controls/profile/UserProfile.js b/bin/controls/profile/UserProfile.js
index d242545..488f3ea 100644
--- a/bin/controls/profile/UserProfile.js
+++ b/bin/controls/profile/UserProfile.js
@@ -170,10 +170,12 @@ define('package/quiqqer/memberships/bin/controls/profile/UserProfile', [
                     continue;
                 }
 
-                // if autoextend hide endDate
-                StatusElm.getElement(
-                    '.quiqqer-memberships-profile-userprofile-table-status-enddate'
-                ).addClass('quiqqer-memberships-profile-userprofile-table__hidden');
+                // if autoextend and not cancelled -> hide endDate
+                if (!Membership.cancelled) {
+                    StatusElm.getElement(
+                        '.quiqqer-memberships-profile-userprofile-table-status-enddate'
+                    ).addClass('quiqqer-memberships-profile-userprofile-table__hidden');
+                }
 
                 if (status === 'active') {
                     // cancel btn
-- 
GitLab