@eric-emg/symphiq-components 1.2.336 → 1.2.337
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -86915,11 +86915,21 @@ class PlanCardComponent {
|
|
|
86915
86915
|
formatPrice() {
|
|
86916
86916
|
const info = this.planInfo();
|
|
86917
86917
|
let price = info.planItemPrice.price || 0;
|
|
86918
|
-
|
|
86918
|
+
const periodUnit = info.planItemPrice.periodUnit;
|
|
86919
|
+
console.log('[formatPrice]', {
|
|
86920
|
+
externalName: info.planItemPrice.externalName,
|
|
86921
|
+
originalPrice: info.planItemPrice.price,
|
|
86922
|
+
periodUnit,
|
|
86923
|
+
isYear: periodUnit === ChargebeeItemPricePeriodUnitEnum.YEAR,
|
|
86924
|
+
yearEnumValue: ChargebeeItemPricePeriodUnitEnum.YEAR
|
|
86925
|
+
});
|
|
86926
|
+
if (periodUnit === ChargebeeItemPricePeriodUnitEnum.YEAR) {
|
|
86919
86927
|
price = price / 12;
|
|
86928
|
+
console.log('[formatPrice] divided by 12:', price);
|
|
86920
86929
|
}
|
|
86921
86930
|
const symbol = this.getCurrencySymbol();
|
|
86922
86931
|
const formattedPrice = Math.floor(price / 100).toLocaleString();
|
|
86932
|
+
console.log('[formatPrice] final:', `${symbol}${formattedPrice}`);
|
|
86923
86933
|
return `${symbol}${formattedPrice}`;
|
|
86924
86934
|
}
|
|
86925
86935
|
getCurrencySymbol() {
|
|
@@ -88869,6 +88879,7 @@ class SymphiqProfileAnalysisDashboardComponent {
|
|
|
88869
88879
|
this.isCurrencySelectionLoading = signal(false, ...(ngDevMode ? [{ debugName: "isCurrencySelectionLoading" }] : []));
|
|
88870
88880
|
this.selectedCurrency = signal(null, ...(ngDevMode ? [{ debugName: "selectedCurrency" }] : []));
|
|
88871
88881
|
this.isPlanLoading = signal(false, ...(ngDevMode ? [{ debugName: "isPlanLoading" }] : []));
|
|
88882
|
+
this.planLoadingStartTime = signal(0, ...(ngDevMode ? [{ debugName: "planLoadingStartTime" }] : []));
|
|
88872
88883
|
this.isEditingCurrency = signal(false, ...(ngDevMode ? [{ debugName: "isEditingCurrency" }] : []));
|
|
88873
88884
|
this.editingCurrencySelection = signal(null, ...(ngDevMode ? [{ debugName: "editingCurrencySelection" }] : []));
|
|
88874
88885
|
this.selectedPeriodUnit = computed(() => {
|
|
@@ -88913,7 +88924,17 @@ class SymphiqProfileAnalysisDashboardComponent {
|
|
|
88913
88924
|
const planCardInfos = this.planCardInfos();
|
|
88914
88925
|
const isLoading = untracked(() => this.isPlanLoading());
|
|
88915
88926
|
if (planCardInfos && isLoading) {
|
|
88916
|
-
this.
|
|
88927
|
+
const startTime = untracked(() => this.planLoadingStartTime());
|
|
88928
|
+
const elapsed = Date.now() - startTime;
|
|
88929
|
+
const minDelay = 300;
|
|
88930
|
+
if (elapsed >= minDelay) {
|
|
88931
|
+
this.isPlanLoading.set(false);
|
|
88932
|
+
}
|
|
88933
|
+
else {
|
|
88934
|
+
setTimeout(() => {
|
|
88935
|
+
this.isPlanLoading.set(false);
|
|
88936
|
+
}, minDelay - elapsed);
|
|
88937
|
+
}
|
|
88917
88938
|
}
|
|
88918
88939
|
}, ...(ngDevMode ? [{ debugName: "planLoadingEffect" }] : []));
|
|
88919
88940
|
this.embeddedScrollEffect = effect(() => {
|
|
@@ -89636,6 +89657,7 @@ class SymphiqProfileAnalysisDashboardComponent {
|
|
|
89636
89657
|
}
|
|
89637
89658
|
}
|
|
89638
89659
|
handlePeriodUnitChange(periodUnit) {
|
|
89660
|
+
this.planLoadingStartTime.set(Date.now());
|
|
89639
89661
|
this.isPlanLoading.set(true);
|
|
89640
89662
|
this.periodUnitChanged.emit(periodUnit);
|
|
89641
89663
|
}
|