diff --git a/apps/web-giddh/src/app/shared/header/header.component.html b/apps/web-giddh/src/app/shared/header/header.component.html index 5436c90d376..172d5cbda86 100644 --- a/apps/web-giddh/src/app/shared/header/header.component.html +++ b/apps/web-giddh/src/app/shared/header/header.component.html @@ -575,7 +575,7 @@
{{ getSubscriptionEndNote() }} - {{ + {{ localeData?.click_here }}
@@ -590,9 +590,9 @@{{ getSubscriptionEndedNote() }} - {{ - localeData?.click_here - }} + + {{ localeData?.click_here }} +
{{ getSubscriptionTransactionEndedNote() }} - {{ + {{ localeData?.click_here }}
diff --git a/apps/web-giddh/src/app/shared/header/header.component.scss b/apps/web-giddh/src/app/shared/header/header.component.scss index 31072bd784b..cdbd2d7d968 100644 --- a/apps/web-giddh/src/app/shared/header/header.component.scss +++ b/apps/web-giddh/src/app/shared/header/header.component.scss @@ -326,11 +326,6 @@ ul.sub-list { font-size: var(--font-size-15); } - .click-here { - color: var(--color-blue); - cursor: pointer; - } - span.icon-traingle-info { color: var(--color-primary-header-icon-traingle-info); font-size: var(--font-size-15); diff --git a/apps/web-giddh/src/app/shared/header/header.component.ts b/apps/web-giddh/src/app/shared/header/header.component.ts index 3ea283c2f66..7ae5ab10c2e 100644 --- a/apps/web-giddh/src/app/shared/header/header.component.ts +++ b/apps/web-giddh/src/app/shared/header/header.component.ts @@ -256,6 +256,8 @@ export class HeaderComponent implements OnInit, AfterViewInit, OnDestroy, AfterV public planVersion: number; /** Hold broadcast event */ public broadcast: any; + /** Holds true if plan is either trial or cancelled */ + public isCurrentSubscriptionTrialOrCancelled: boolean = null; /** * Returns whether the back button in header should be displayed or not @@ -761,6 +763,7 @@ export class HeaderComponent implements OnInit, AfterViewInit, OnDestroy, AfterV this.isSubscribedPlanHaveAdditionalCharges = res.subscription.additionalCharges; this.selectedPlanStatus = res.subscription.status; + this.isCurrentSubscriptionTrialOrCancelled = res.subTrialOrCancelled ?? null; } this.activeCompany = res; if (this.activeCompany && this.activeCompany.createdBy && this.activeCompany.createdBy.email) { @@ -1777,15 +1780,18 @@ export class HeaderComponent implements OnInit, AfterViewInit, OnDestroy, AfterV * @memberof HeaderComponent */ public getSubscriptionEndedNote(): string { - let text = this.localeData?.subscription_ended_note; - text = text - ?.replace("[PLAN_DURATION]", this.subscribedPlan?.planDetails?.duration ?? this.subscribedPlan?.duration ?? '') - ?.replace("[PLAN_DURATION_UNIT]", this.subscribedPlan?.planDetails?.durationUnit?.toLowerCase() ?? '') - ?.replace("[PLAN_NAME]", this.subscribedPlan?.planDetails?.name ?? '') - ?.replace("[EXPIRY_DATE]", this.subscribedPlan?.expiry ?? ''); + let text = ""; + if (['MONTHLY', 'DAILY'].includes(this.subscribedPlan?.duration) && !this.isCurrentSubscriptionTrialOrCancelled) { + text = this.localeData?.subscription_expire_renewal_message; + } else { + text = this.localeData?.subscription_ended_note + ?.replace("[PLAN_DURATION]", this.subscribedPlan?.planDetails?.duration ?? this.subscribedPlan?.duration ?? '') + ?.replace("[PLAN_DURATION_UNIT]", this.subscribedPlan?.planDetails?.durationUnit?.toLowerCase() ?? '') + ?.replace("[PLAN_NAME]", this.subscribedPlan?.planDetails?.name ?? '') + ?.replace("[EXPIRY_DATE]", this.subscribedPlan?.expiry ?? ''); + } return text; } - /** * This will return plan transactions ended note * diff --git a/apps/web-giddh/src/assets/locale/header/en.json b/apps/web-giddh/src/assets/locale/header/en.json index 70af685dcdb..f24919b4554 100644 --- a/apps/web-giddh/src/assets/locale/header/en.json +++ b/apps/web-giddh/src/assets/locale/header/en.json @@ -3,6 +3,7 @@ "click_here": "Click here", "subscription_end_note": "Your [PLAN_DURATION] [PLAN_DURATION_UNIT] plan - [PLAN_NAME] will end on [EXPIRY_DATE]. Apply to upgrade your subscription.", "subscription_ended_note": "Your [PLAN_DURATION] [PLAN_DURATION_UNIT] plan - [PLAN_NAME] ended on [EXPIRY_DATE]. Apply to upgrade your subscription.", + "subscription_expire_renewal_message": " The payment has been initiated. Your subscription will be renewed upon successful payment processing.", "subscription_transaction_limit_ended": "You have crossed the transactions limit of your assigned plan - [PLAN_NAME] subscribed on [PLAN_START_DATE]. To continue your accounting with Giddh, Please renew your current plan or switch to another one. Contact us for more assistance.", "ready_to_upgrade": "Ready to upgrade subscription", "renew_plan": "Renew Plan", diff --git a/apps/web-giddh/src/assets/locale/header/hi.json b/apps/web-giddh/src/assets/locale/header/hi.json index c3057397cc2..dc470c1c30c 100644 --- a/apps/web-giddh/src/assets/locale/header/hi.json +++ b/apps/web-giddh/src/assets/locale/header/hi.json @@ -3,6 +3,7 @@ "click_here": "यहाँ क्लिक करें", "subscription_end_note": "आपकी [PLAN_DURATION] [PLAN_DURATION_UNIT] योजना - [PLAN_NAME] [EXPIRY_DATE] को समाप्त हो जाएगी। अपनी सदस्यता को अपग्रेड करने के लिए आवेदन करें।", "subscription_ended_note": "आपकी [PLAN_DURATION] [PLAN_DURATION_UNIT] योजना - [PLAN_NAME] [EXPIRY_DATE] को समाप्त हो गई। अपनी सदस्यता को अपग्रेड करने के लिए आवेदन करें।", + "subscription_expire_renewal_message": "भुगतान प्रारंभ कर दिया गया है। सफल भुगतान प्रसंस्करण पर आपकी सदस्यता नवीनीकृत कर दी जाएगी।", "subscription_transaction_limit_ended": "आपने अपनी निर्धारित योजना की लेन-देन सीमा पार कर ली है - [PLAN_NAME] ने [PLAN_START_DATE] को सदस्यता ली थी। गिद्ध के साथ अपना लेखा-जोखा जारी रखने के लिए, कृपया अपनी वर्तमान योजना को नवीनीकृत करें या किसी अन्य योजना पर स्विच करें। अधिक सहायता के लिए हमसे संपर्क करें।", "ready_to_upgrade": "सदस्यता अपग्रेड करने के लिए तैयार", "renew_plan": "नवीनीकरण योजना", diff --git a/apps/web-giddh/src/assets/locale/header/mr.json b/apps/web-giddh/src/assets/locale/header/mr.json index 886dab22e65..7020632c65c 100644 --- a/apps/web-giddh/src/assets/locale/header/mr.json +++ b/apps/web-giddh/src/assets/locale/header/mr.json @@ -3,6 +3,7 @@ "click_here": "इथे क्लिक करा", "subscription_end_note": "तुमची [PLAN_DURATION] [PLAN_DURATION_UNIT] योजना - [PLAN_NAME] [EXPIRY_DATE] रोजी समाप्त होईल. तुमची सदस्यता अपग्रेड करण्यासाठी अर्ज करा", "subscription_ended_note": "तुमची [PLAN_DURATION] [PLAN_DURATION_UNIT] योजना - [PLAN_NAME] [EXPIRY_DATE] रोजी संपली. तुमची सदस्यता अपग्रेड करण्यासाठी अर्ज करा", + "subscription_expire_renewal_message": "पेमेंट सुरू करण्यात आले आहे. यशस्वी पेमेंट प्रक्रियेनंतर तुमचे सदस्यत्व नूतनीकरण केले जाईल", "subscription_transaction_limit_ended": "तुम्ही तुमच्या नियुक्त केलेल्या योजनेची व्यवहार मर्यादा ओलांडली आहे - [PLAN_NAME] ने [PLAN_START_DATE] रोजी सदस्यत्व घेतले आहे. Giddh सह तुमचे खाते सुरू ठेवण्यासाठी, कृपया तुमच्या सध्याच्या योजनेचे नूतनीकरण करा किंवा दुसऱ्या योजनेवर स्विच करा. अधिक मदतीसाठी आमच्याशी संपर्क साधा", "ready_to_upgrade": "सदस्यता श्रेणीसुधारित करण्यास सज्ज", "renew_plan": "नूतनीकरण योजना",