Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shivani | Stage | Prod - Change subscription expiry message in case of auto renewal #14329

Open
wants to merge 7 commits into
base: beta-stage
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/web-giddh/src/app/shared/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@
<div class="white-row plan-issue">
<p>
<span class="icon-traingle-info"></span> {{ getSubscriptionEndNote() }}
<a href="javascript:void(0);" class="click-here" aria-label="go to plan" (click)="goToSelectPlan()">{{
<a href="javascript:void(0);" class="text-primary cursor-pointer" aria-label="go to plan" (click)="goToSelectPlan()">{{
localeData?.click_here
}}</a>
</p>
Expand All @@ -590,9 +590,9 @@
<div class="white-row plan-issue">
<p>
<span class="icon-traingle-info"></span> {{ getSubscriptionEndedNote() }}
<a href="javascript:void(0);" class="click-here" aria-label="get select " (click)="goToSelectPlan()">{{
localeData?.click_here
}}</a>
<a *ngIf="subscribedPlan?.duration === 'YEARLY'" href="javascript:;" class="text-primary cursor-pointer" aria-label="get select " (click)="goToSelectPlan()">
{{ localeData?.click_here }}
</a>
</p>
</div>
</div>
Expand All @@ -605,7 +605,7 @@
<div class="white-row plan-issue">
<p>
<span class="icon-traingle-info"></span> {{ getSubscriptionTransactionEndedNote() }}
<a href="javascript:void(0);" class="click-here" aria-label="get plan" (click)="goToSelectPlan()">{{
<a href="javascript:void(0);" class="text-primary cursor-pointer" aria-label="get plan" (click)="goToSelectPlan()">{{
localeData?.click_here
}}</a>
</p>
Expand Down
5 changes: 0 additions & 5 deletions apps/web-giddh/src/app/shared/header/header.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
20 changes: 13 additions & 7 deletions apps/web-giddh/src/app/shared/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ export class HeaderComponent implements OnInit, AfterViewInit, OnDestroy, AfterV
public planVersion: number;
/** Hold broadcast event */
public broadcast: any;
/** Hold the message of subscription plane get expire and remains day wise*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/** Hold the message of subscription plane get expire and remains day wise*/
/** Holds true if plan is either trail or cancelled */

public isCurrentSubscriptionTrialOrCancelled: Boolean = null;

/**
* Returns whether the back button in header should be displayed or not
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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
*
Expand Down
1 change: 1 addition & 0 deletions apps/web-giddh/src/assets/locale/header/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions apps/web-giddh/src/assets/locale/header/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "नवीनीकरण योजना",
Expand Down
1 change: 1 addition & 0 deletions apps/web-giddh/src/assets/locale/header/mr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "पेमेंट सुरू करण्यात आले आहे. यशस्वी पेमेंट प्रक्रियेनंतर तुमचे सदस्यत्व नूतनीकरण केले जाईल.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"subscription_expire_renewal_message": "पेमेंट सुरू करण्यात आले आहे. यशस्वी पेमेंट प्रक्रियेनंतर तुमचे सदस्यत्व नूतनीकरण केले जाईल.",
"subscription_expire_renewal_message": "पेमेंट सुरू करण्यात आले आहे. यशस्वी पेमेंट प्रक्रियेनंतर तुमचे सदस्यत्व नूतनीकरण केले जाईल",

"subscription_transaction_limit_ended": "तुम्ही तुमच्या नियुक्त केलेल्या योजनेची व्यवहार मर्यादा ओलांडली आहे - [PLAN_NAME] ने [PLAN_START_DATE] रोजी सदस्यत्व घेतले आहे. Giddh सह तुमचे खाते सुरू ठेवण्यासाठी, कृपया तुमच्या सध्याच्या योजनेचे नूतनीकरण करा किंवा दुसऱ्या योजनेवर स्विच करा. अधिक मदतीसाठी आमच्याशी संपर्क साधा",
"ready_to_upgrade": "सदस्यता श्रेणीसुधारित करण्यास सज्ज",
"renew_plan": "नूतनीकरण योजना",
Expand Down