@thescaffold/ngx-apps-capital 0.2.21 → 0.2.31
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.
- package/fesm2022/{thescaffold-ngx-apps-capital-card.module-Cl6xh18C.mjs → thescaffold-ngx-apps-capital-card.module-BPQG2WD9.mjs} +7 -9
- package/fesm2022/thescaffold-ngx-apps-capital-card.module-BPQG2WD9.mjs.map +1 -0
- package/fesm2022/{thescaffold-ngx-apps-capital-card.provider-BcIUxmO1.mjs → thescaffold-ngx-apps-capital-card.provider-CebuwlQl.mjs} +59 -58
- package/fesm2022/thescaffold-ngx-apps-capital-card.provider-CebuwlQl.mjs.map +1 -0
- package/fesm2022/thescaffold-ngx-apps-capital-dashboard.module-C08wnnHw.mjs +788 -0
- package/fesm2022/thescaffold-ngx-apps-capital-dashboard.module-C08wnnHw.mjs.map +1 -0
- package/fesm2022/{thescaffold-ngx-apps-capital-payment.module-DmQlflfD.mjs → thescaffold-ngx-apps-capital-payment.module-BuzjSS_y.mjs} +7 -8
- package/fesm2022/thescaffold-ngx-apps-capital-payment.module-BuzjSS_y.mjs.map +1 -0
- package/fesm2022/{thescaffold-ngx-apps-capital-payment.provider-B1jZij0H.mjs → thescaffold-ngx-apps-capital-payment.provider-DAlEfzgr.mjs} +56 -55
- package/fesm2022/thescaffold-ngx-apps-capital-payment.provider-DAlEfzgr.mjs.map +1 -0
- package/fesm2022/{thescaffold-ngx-apps-capital-voucher.module-DMt7Jj8o.mjs → thescaffold-ngx-apps-capital-voucher.module-D6hqVD4l.mjs} +157 -139
- package/fesm2022/thescaffold-ngx-apps-capital-voucher.module-D6hqVD4l.mjs.map +1 -0
- package/fesm2022/thescaffold-ngx-apps-capital.mjs +23 -23
- package/fesm2022/thescaffold-ngx-apps-capital.mjs.map +1 -1
- package/package.json +77 -27
- package/types/thescaffold-ngx-apps-capital.d.ts +37 -0
- package/esm2022/lib/app.config.mjs +0 -81
- package/esm2022/lib/app.module.mjs +0 -17
- package/esm2022/lib/index.mjs +0 -11
- package/esm2022/lib/pages/card/card.component.mjs +0 -161
- package/esm2022/lib/pages/card/card.module.mjs +0 -32
- package/esm2022/lib/pages/card/card.provider.mjs +0 -249
- package/esm2022/lib/pages/dashboard/dashboard.component.mjs +0 -703
- package/esm2022/lib/pages/dashboard/dashboard.module.mjs +0 -45
- package/esm2022/lib/pages/pages.component.mjs +0 -49
- package/esm2022/lib/pages/pages.module.mjs +0 -107
- package/esm2022/lib/pages/payment/payment.component.mjs +0 -119
- package/esm2022/lib/pages/payment/payment.module.mjs +0 -32
- package/esm2022/lib/pages/payment/payment.provider.mjs +0 -212
- package/esm2022/lib/pages/voucher/voucher.component.mjs +0 -167
- package/esm2022/lib/pages/voucher/voucher.module.mjs +0 -46
- package/esm2022/lib/pages/voucher/voucher.provider.mjs +0 -201
- package/esm2022/public-api.mjs +0 -5
- package/esm2022/thescaffold-ngx-apps-capital.mjs +0 -5
- package/fesm2022/thescaffold-ngx-apps-capital-card.module-Cl6xh18C.mjs.map +0 -1
- package/fesm2022/thescaffold-ngx-apps-capital-card.provider-BcIUxmO1.mjs.map +0 -1
- package/fesm2022/thescaffold-ngx-apps-capital-dashboard.module-lX-8-L9H.mjs +0 -744
- package/fesm2022/thescaffold-ngx-apps-capital-dashboard.module-lX-8-L9H.mjs.map +0 -1
- package/fesm2022/thescaffold-ngx-apps-capital-payment.module-DmQlflfD.mjs.map +0 -1
- package/fesm2022/thescaffold-ngx-apps-capital-payment.provider-B1jZij0H.mjs.map +0 -1
- package/fesm2022/thescaffold-ngx-apps-capital-voucher.module-DMt7Jj8o.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/app.config.d.ts +0 -13
- package/lib/app.module.d.ts +0 -8
- package/lib/index.d.ts +0 -10
- package/lib/pages/card/card.component.d.ts +0 -18
- package/lib/pages/card/card.module.d.ts +0 -10
- package/lib/pages/card/card.provider.d.ts +0 -136
- package/lib/pages/dashboard/dashboard.component.d.ts +0 -49
- package/lib/pages/dashboard/dashboard.module.d.ts +0 -10
- package/lib/pages/pages.component.d.ts +0 -8
- package/lib/pages/pages.module.d.ts +0 -11
- package/lib/pages/payment/payment.component.d.ts +0 -13
- package/lib/pages/payment/payment.module.d.ts +0 -10
- package/lib/pages/payment/payment.provider.d.ts +0 -134
- package/lib/pages/voucher/voucher.component.d.ts +0 -11
- package/lib/pages/voucher/voucher.module.d.ts +0 -10
- package/lib/pages/voucher/voucher.provider.d.ts +0 -125
- package/public-api.d.ts +0 -1
|
@@ -1,744 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, TemplateRef, Component, ViewChild, NgModule } from '@angular/core';
|
|
3
|
-
import * as i2$1 from '@thescaffold/ngx-common';
|
|
4
|
-
import { PeriodService, DefaultPeriodType, PaymentModule as PaymentModule$1 } from '@thescaffold/ngx-common';
|
|
5
|
-
import * as i4 from '@thescaffold/ngx-core';
|
|
6
|
-
import { BaseDirective, ControlService, getEnv, navigateExternal, using, SharedModule, PipesModule } from '@thescaffold/ngx-core';
|
|
7
|
-
import * as i2 from '@thescaffold/ngx-ui';
|
|
8
|
-
import { FlyoutService, WizardService, WebgetsModule, ElementsModule, DashboardModule as DashboardModule$1 } from '@thescaffold/ngx-ui';
|
|
9
|
-
import { C as CardProvider } from './thescaffold-ngx-apps-capital-card.provider-BcIUxmO1.mjs';
|
|
10
|
-
import { P as PaymentProvider } from './thescaffold-ngx-apps-capital-payment.provider-B1jZij0H.mjs';
|
|
11
|
-
import { of, takeUntil, map, switchMap, forkJoin } from 'rxjs';
|
|
12
|
-
import * as i1 from '@angular/common';
|
|
13
|
-
|
|
14
|
-
class DashboardComponent extends BaseDirective {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.flyoutService = inject(FlyoutService);
|
|
18
|
-
this.controlService = inject(ControlService);
|
|
19
|
-
this.wizardService = inject(WizardService);
|
|
20
|
-
this.periodService = inject(PeriodService);
|
|
21
|
-
this.paymentMeta$ = () => of({
|
|
22
|
-
type: this.actionType,
|
|
23
|
-
planTypeId: this.selectedPlanTypeId,
|
|
24
|
-
periodType: this.periodType,
|
|
25
|
-
});
|
|
26
|
-
this.verifyPaymentData = {
|
|
27
|
-
mode: 'verify',
|
|
28
|
-
appName: getEnv('APP_NAME'),
|
|
29
|
-
amount: 0.0,
|
|
30
|
-
hooks: {},
|
|
31
|
-
options: [],
|
|
32
|
-
};
|
|
33
|
-
this.wizardData = {
|
|
34
|
-
name: 'upgrade-plan',
|
|
35
|
-
showProgress: true,
|
|
36
|
-
showNav: false,
|
|
37
|
-
};
|
|
38
|
-
this.context = this.controlService.getContext();
|
|
39
|
-
this.planTypes$ = this.apiService
|
|
40
|
-
.on('apps/capital/plan-type')
|
|
41
|
-
.getMany({
|
|
42
|
-
page: 1,
|
|
43
|
-
perPage: 12,
|
|
44
|
-
clientId: this.context?.clientId,
|
|
45
|
-
currency: getEnv('X_PREFERENCE_CURRENCY'),
|
|
46
|
-
})
|
|
47
|
-
.pipe(takeUntil(this.$), map(({ data }) => data));
|
|
48
|
-
this.currentPlan = null;
|
|
49
|
-
this.capital$ = this.apiService.post('apps/capital/wallet/init').pipe(takeUntil(this.$), switchMap((wallet) => forkJoin([
|
|
50
|
-
this.apiService.get('apps/capital/user-plan'),
|
|
51
|
-
of(wallet),
|
|
52
|
-
this.apiService.get('apps/capital/debt'),
|
|
53
|
-
this.apiService.get('apps/capital/cost', { type: 'current' }),
|
|
54
|
-
])), map(([plan, wallet, pending, estimate]) => {
|
|
55
|
-
this.currentPlan = plan?.data;
|
|
56
|
-
return {
|
|
57
|
-
plan: plan?.data,
|
|
58
|
-
wallet: wallet?.data,
|
|
59
|
-
pending: pending?.data,
|
|
60
|
-
estimate: estimate?.data,
|
|
61
|
-
};
|
|
62
|
-
}));
|
|
63
|
-
this.periodType = DefaultPeriodType;
|
|
64
|
-
this.periodData$ = this.periodService.list().pipe(map((list) => ({
|
|
65
|
-
default: list.find((item) => item.value == DefaultPeriodType),
|
|
66
|
-
list,
|
|
67
|
-
size: 'btn-lg',
|
|
68
|
-
showSearch: false,
|
|
69
|
-
})));
|
|
70
|
-
}
|
|
71
|
-
get paymentData() {
|
|
72
|
-
const amount = (this.actionType == 'apps.capital.dashboard.upgrade-plan'
|
|
73
|
-
? this.upgradePlanAmount
|
|
74
|
-
: this.actionType == 'apps.capital.dashboard.pay-debt'
|
|
75
|
-
? this.payNowAmount
|
|
76
|
-
: 0);
|
|
77
|
-
return {
|
|
78
|
-
mode: 'pay',
|
|
79
|
-
appName: getEnv('APP_NAME'),
|
|
80
|
-
amount: amount == 0 ? -1 : amount,
|
|
81
|
-
hooks: {
|
|
82
|
-
meta: () => this.paymentMeta$(),
|
|
83
|
-
},
|
|
84
|
-
options: ['card', 'provider', 'wallet'],
|
|
85
|
-
redirect: (provider, amount, reference, currency) => {
|
|
86
|
-
navigateExternal(`${getEnv('BASE_URL')}${this.router.url}?type=${provider}&reference=${reference}`);
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
onPeriodSelect({ value }) {
|
|
91
|
-
this.periodType = value;
|
|
92
|
-
}
|
|
93
|
-
upgradePlan() {
|
|
94
|
-
this.actionType = 'apps.capital.dashboard.upgrade-plan';
|
|
95
|
-
this.flyoutService.open(this.upgradePlanFlyout);
|
|
96
|
-
}
|
|
97
|
-
payNow(payNowAmount) {
|
|
98
|
-
this.actionType = 'apps.capital.dashboard.pay-debt';
|
|
99
|
-
this.payNowAmount = payNowAmount;
|
|
100
|
-
this.flyoutService.open(this.payNowFlyout);
|
|
101
|
-
}
|
|
102
|
-
selectPlanType(planType) {
|
|
103
|
-
this.selectedPlanTypeId = planType.id;
|
|
104
|
-
this.apiService
|
|
105
|
-
.post('apps/capital/user-plan/compute-upgrade', {
|
|
106
|
-
planTypeId: planType.id,
|
|
107
|
-
periodType: this.periodType,
|
|
108
|
-
})
|
|
109
|
-
.pipe(takeUntil(this.$))
|
|
110
|
-
.subscribe(using(({ data }) => {
|
|
111
|
-
this.upgradePlanAmount = data.diff;
|
|
112
|
-
this.wizardService.goto(this.wizardData.name, 'make-payment');
|
|
113
|
-
}));
|
|
114
|
-
}
|
|
115
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DashboardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
116
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.5", type: DashboardComponent, selector: "app-dashboard", viewQueries: [{ propertyName: "beforeMetricsTemplate", first: true, predicate: ["beforeMetricsTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "upgradePlanFlyout", first: true, predicate: ["upgradePlanFlyout"], descendants: true, read: TemplateRef, static: true }, { propertyName: "payNowFlyout", first: true, predicate: ["payNowFlyout"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
117
|
-
<ng-template #beforeMetricsTemplate>
|
|
118
|
-
<!-- verify payment -->
|
|
119
|
-
<x-common-payment [data]="verifyPaymentData"></x-common-payment>
|
|
120
|
-
|
|
121
|
-
<div *ngIf="capital$ | async as capital; else loader" class="">
|
|
122
|
-
<div class="row gx-5 d-flex flex-wrap">
|
|
123
|
-
<div class="col d-flex flex-column">
|
|
124
|
-
<div class="card card-body">
|
|
125
|
-
<div class="d-flex justify-content-between align-items-center">
|
|
126
|
-
<span class="fs-6">
|
|
127
|
-
{{
|
|
128
|
-
'apps.capital.component.dashboard.message.plan' | xTranslate
|
|
129
|
-
}}
|
|
130
|
-
</span>
|
|
131
|
-
<span *ngIf="capital.plan?.type?.name" class="fs-3"
|
|
132
|
-
>{{ capital.plan?.type?.name }}
|
|
133
|
-
</span>
|
|
134
|
-
<!-- <span *ngIf="capital.plan?.type?.name" class="fs-3"
|
|
135
|
-
>{{
|
|
136
|
-
capital.plan.type[capital.plan.periodType]
|
|
137
|
-
| xMajor | number: '1.2-2'
|
|
138
|
-
}}<span class="fs-6">{{ capital.plan.type.currency }}</span>
|
|
139
|
-
</span> -->
|
|
140
|
-
<span *ngIf="!capital.plan?.type?.name" class="fs-3">
|
|
141
|
-
...
|
|
142
|
-
</span>
|
|
143
|
-
</div>
|
|
144
|
-
<div
|
|
145
|
-
*ngIf="
|
|
146
|
-
capital.plan?.type?.name &&
|
|
147
|
-
capital.plan?.type?.name?.toLowerCase() != 'pro'
|
|
148
|
-
"
|
|
149
|
-
class="d-flex justify-content-end align-items-center"
|
|
150
|
-
>
|
|
151
|
-
<button
|
|
152
|
-
class="btn btn-outline-warning btn-sm small-text"
|
|
153
|
-
(click)="upgradePlan()"
|
|
154
|
-
>
|
|
155
|
-
{{
|
|
156
|
-
'apps.capital.component.dashboard.button.upgrade-plan'
|
|
157
|
-
| xTranslate
|
|
158
|
-
}}
|
|
159
|
-
</button>
|
|
160
|
-
</div>
|
|
161
|
-
<div
|
|
162
|
-
*ngIf="!capital.plan?.type?.name"
|
|
163
|
-
class="d-flex justify-content-end align-items-center"
|
|
164
|
-
>
|
|
165
|
-
<button
|
|
166
|
-
class="btn btn-outline-warning btn-sm small-text"
|
|
167
|
-
(click)="upgradePlan()"
|
|
168
|
-
>
|
|
169
|
-
{{
|
|
170
|
-
'apps.capital.component.dashboard.button.select-plan'
|
|
171
|
-
| xTranslate
|
|
172
|
-
}}
|
|
173
|
-
</button>
|
|
174
|
-
</div>
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
<!-- <div class="col d-flex flex-column">
|
|
178
|
-
<div class="card card-body">
|
|
179
|
-
<div class="d-flex justify-content-between align-items-center">
|
|
180
|
-
<span class="fs-6">{{
|
|
181
|
-
'apps.capital.component.dashboard.message.balance'
|
|
182
|
-
| xTranslate
|
|
183
|
-
}}</span>
|
|
184
|
-
<span class="fs-3"
|
|
185
|
-
>{{ capital.wallet.availableBalance | xMajor | number: '1.2-2'
|
|
186
|
-
}}<span class="fs-6">{{
|
|
187
|
-
capital.wallet.currency
|
|
188
|
-
}}</span></span
|
|
189
|
-
>
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
</div> -->
|
|
193
|
-
<div class="col d-flex flex-column">
|
|
194
|
-
<div class="card card-body">
|
|
195
|
-
<div class="d-flex justify-content-between align-items-center">
|
|
196
|
-
<span class="fs-6">
|
|
197
|
-
{{
|
|
198
|
-
'apps.capital.component.dashboard.message.pending'
|
|
199
|
-
| xTranslate
|
|
200
|
-
}}
|
|
201
|
-
</span>
|
|
202
|
-
<span
|
|
203
|
-
class="fs-3"
|
|
204
|
-
[ngClass]="{ 'text-warning': capital.pending.debt }"
|
|
205
|
-
>{{ capital.pending.debt | xMajor | number: '1.2-2'
|
|
206
|
-
}}<span class="fs-6">{{ capital.wallet.currency }}</span>
|
|
207
|
-
</span>
|
|
208
|
-
</div>
|
|
209
|
-
<div
|
|
210
|
-
*ngIf="capital.pending.debt > 0"
|
|
211
|
-
class="d-flex justify-content-end align-items-center"
|
|
212
|
-
>
|
|
213
|
-
<button
|
|
214
|
-
class="btn btn-outline-warning btn-sm small-text"
|
|
215
|
-
(click)="payNow(capital.pending.debt)"
|
|
216
|
-
>
|
|
217
|
-
{{
|
|
218
|
-
'apps.capital.component.dashboard.button.pay-now'
|
|
219
|
-
| xTranslate
|
|
220
|
-
}}
|
|
221
|
-
</button>
|
|
222
|
-
</div>
|
|
223
|
-
</div>
|
|
224
|
-
</div>
|
|
225
|
-
<div class="col d-flex flex-column">
|
|
226
|
-
<div class="card card-body">
|
|
227
|
-
<div class="d-flex justify-content-between align-items-center">
|
|
228
|
-
<span class="fs-6">{{
|
|
229
|
-
'apps.capital.component.dashboard.message.cost' | xTranslate
|
|
230
|
-
}}</span>
|
|
231
|
-
<span class="fs-3"
|
|
232
|
-
>{{ capital.estimate.cost | xMajor | number: '1.2-2'
|
|
233
|
-
}}<span class="fs-6">{{
|
|
234
|
-
capital.wallet.currency
|
|
235
|
-
}}</span></span
|
|
236
|
-
>
|
|
237
|
-
</div>
|
|
238
|
-
</div>
|
|
239
|
-
</div>
|
|
240
|
-
</div>
|
|
241
|
-
</div>
|
|
242
|
-
</ng-template>
|
|
243
|
-
|
|
244
|
-
<!-- upgrade plan flyout -->
|
|
245
|
-
<ng-template #upgradePlanFlyout>
|
|
246
|
-
<x-webget-flyout [data]="{ title: 'Upgrade Plan' }">
|
|
247
|
-
<x-webget-wizard [data]="wizardData">
|
|
248
|
-
<ng-template [xWizard]="'select-plan'">
|
|
249
|
-
<ng-container
|
|
250
|
-
*ngIf="periodData$ | async as periodData; else loader"
|
|
251
|
-
>
|
|
252
|
-
<div
|
|
253
|
-
*ngIf="
|
|
254
|
-
planTypes$ && planTypes$ | async as planTypes;
|
|
255
|
-
else loader
|
|
256
|
-
"
|
|
257
|
-
class="d-flex flex-column"
|
|
258
|
-
>
|
|
259
|
-
<div class="d-flex flex-column my-3 align-items-center">
|
|
260
|
-
<p class="text-secondary text-center">
|
|
261
|
-
{{
|
|
262
|
-
'apps.capital.component.dashboard.message.select-plan'
|
|
263
|
-
| xTranslate
|
|
264
|
-
}}
|
|
265
|
-
</p>
|
|
266
|
-
</div>
|
|
267
|
-
|
|
268
|
-
<div class="d-flex justify-content-end align-items-center my-3">
|
|
269
|
-
<x-picker
|
|
270
|
-
[data]="periodData"
|
|
271
|
-
(select)="onPeriodSelect($event)"
|
|
272
|
-
></x-picker>
|
|
273
|
-
</div>
|
|
274
|
-
|
|
275
|
-
<div
|
|
276
|
-
*ngIf="planTypes.length; else empty"
|
|
277
|
-
class="accordion"
|
|
278
|
-
id="plan-accordion"
|
|
279
|
-
>
|
|
280
|
-
<div
|
|
281
|
-
*ngFor="let planType of planTypes; index as i"
|
|
282
|
-
class="accordion-item w-100"
|
|
283
|
-
>
|
|
284
|
-
<div
|
|
285
|
-
*ngIf="planType.id != currentPlan?.type?.id"
|
|
286
|
-
class="accordion-header"
|
|
287
|
-
>
|
|
288
|
-
<button
|
|
289
|
-
class="accordion-button d-flex justify-content-between align-items-center"
|
|
290
|
-
[ngClass]="{ collapsed: planType.type !== 'popular' }"
|
|
291
|
-
type="button"
|
|
292
|
-
data-bs-toggle="collapse"
|
|
293
|
-
[attr.data-bs-target]="'#collapse' + i"
|
|
294
|
-
>
|
|
295
|
-
<div class="col-8">
|
|
296
|
-
<div class="h3">{{ planType.name | titlecase }}</div>
|
|
297
|
-
<div
|
|
298
|
-
*ngIf="planType.desc"
|
|
299
|
-
class="h6 text-body-secondary"
|
|
300
|
-
>
|
|
301
|
-
{{ planType.desc }}
|
|
302
|
-
</div>
|
|
303
|
-
</div>
|
|
304
|
-
<div class="col-3">
|
|
305
|
-
<div class="fw-bolder fst-italic h3">
|
|
306
|
-
{{ planType.currency ?? '...' }}
|
|
307
|
-
{{
|
|
308
|
-
(planType[periodType]
|
|
309
|
-
| xMajor
|
|
310
|
-
| number: '1.2-2') ?? '...'
|
|
311
|
-
}}
|
|
312
|
-
</div>
|
|
313
|
-
</div>
|
|
314
|
-
</button>
|
|
315
|
-
</div>
|
|
316
|
-
<div
|
|
317
|
-
[attr.id]="'collapse' + i"
|
|
318
|
-
class="accordion-collapse collapse"
|
|
319
|
-
[ngClass]="{ show: planType.type == 'popular' }"
|
|
320
|
-
data-bs-parent="#plan-accordion"
|
|
321
|
-
>
|
|
322
|
-
<div class="accordion-body">
|
|
323
|
-
<div
|
|
324
|
-
class="d-flex justify-content-start align-items-center"
|
|
325
|
-
>
|
|
326
|
-
<p
|
|
327
|
-
*ngIf="planType.detail"
|
|
328
|
-
class="text-body-secondary"
|
|
329
|
-
>
|
|
330
|
-
{{ planType.detail }}
|
|
331
|
-
</p>
|
|
332
|
-
</div>
|
|
333
|
-
<ul
|
|
334
|
-
*ngIf="planType?.meta?.features?.length"
|
|
335
|
-
class="list-group list-group-flush"
|
|
336
|
-
>
|
|
337
|
-
<li
|
|
338
|
-
*ngFor="let feature of planType?.meta?.features"
|
|
339
|
-
class="list-group-item"
|
|
340
|
-
>
|
|
341
|
-
{{ feature }}
|
|
342
|
-
</li>
|
|
343
|
-
</ul>
|
|
344
|
-
<div
|
|
345
|
-
class="d-flex justify-content-end align-items-center my-3"
|
|
346
|
-
>
|
|
347
|
-
<button
|
|
348
|
-
class="btn btn-primary"
|
|
349
|
-
(click)="selectPlanType(planType)"
|
|
350
|
-
>
|
|
351
|
-
Choose {{ planType.name }}
|
|
352
|
-
<i class="fa-solid fa-arrow-right-long"></i>
|
|
353
|
-
</button>
|
|
354
|
-
</div>
|
|
355
|
-
</div>
|
|
356
|
-
</div>
|
|
357
|
-
</div>
|
|
358
|
-
</div>
|
|
359
|
-
|
|
360
|
-
<div
|
|
361
|
-
class="d-flex justify-content-center align-items-center my-3"
|
|
362
|
-
>
|
|
363
|
-
<p class="text-center mb-1">
|
|
364
|
-
{{
|
|
365
|
-
'apps.capital.component.dashboard.message.terms'
|
|
366
|
-
| xTranslate
|
|
367
|
-
}}
|
|
368
|
-
</p>
|
|
369
|
-
</div>
|
|
370
|
-
</div>
|
|
371
|
-
</ng-container>
|
|
372
|
-
</ng-template>
|
|
373
|
-
<ng-template [xWizard]="'make-payment'">
|
|
374
|
-
<ng-container
|
|
375
|
-
*ngIf="false; else makePaymentTemplate"
|
|
376
|
-
></ng-container>
|
|
377
|
-
</ng-template>
|
|
378
|
-
</x-webget-wizard>
|
|
379
|
-
</x-webget-flyout>
|
|
380
|
-
</ng-template>
|
|
381
|
-
|
|
382
|
-
<!-- pay now flyout -->
|
|
383
|
-
<ng-template #payNowFlyout>
|
|
384
|
-
<x-webget-flyout [data]="{ title: 'Pay Now' }">
|
|
385
|
-
<ng-container *ngIf="false; else makePaymentTemplate"></ng-container>
|
|
386
|
-
</x-webget-flyout>
|
|
387
|
-
</ng-template>
|
|
388
|
-
|
|
389
|
-
<!-- upgrade payment flyout -->
|
|
390
|
-
<ng-template #makePaymentTemplate>
|
|
391
|
-
<x-common-payment [data]="paymentData"></x-common-payment>
|
|
392
|
-
</ng-template>
|
|
393
|
-
|
|
394
|
-
<!-- misc -->
|
|
395
|
-
<ng-template #loader>
|
|
396
|
-
<x-element-loader></x-element-loader>
|
|
397
|
-
</ng-template>
|
|
398
|
-
|
|
399
|
-
<ng-template #empty>
|
|
400
|
-
<x-element-blank></x-element-blank>
|
|
401
|
-
</ng-template>
|
|
402
|
-
`, isInline: true, styles: [".small-text{font-size:.7rem!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.FlyoutComponent, selector: "x-webget-flyout", inputs: ["data"] }, { kind: "component", type: i2.WizardComponent, selector: "x-webget-wizard", inputs: ["data"] }, { kind: "directive", type: i2.WizardDirective, selector: "ng-template[xWizard]", inputs: ["xWizard"] }, { kind: "component", type: i2.BlankComponent, selector: "x-element-blank", inputs: ["image", "icon", "type"] }, { kind: "component", type: i2.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }, { kind: "component", type: i2.PickerComponent, selector: "x-picker", inputs: ["data"], outputs: ["select"] }, { kind: "component", type: i2$1.PaymentComponent, selector: "x-common-payment", inputs: ["data"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i4.TranslatePipe, name: "xTranslate" }, { kind: "pipe", type: i4.MajorPipe, name: "xMajor" }] }); }
|
|
403
|
-
}
|
|
404
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DashboardComponent, decorators: [{
|
|
405
|
-
type: Component,
|
|
406
|
-
args: [{ selector: 'app-dashboard', template: `
|
|
407
|
-
<ng-template #beforeMetricsTemplate>
|
|
408
|
-
<!-- verify payment -->
|
|
409
|
-
<x-common-payment [data]="verifyPaymentData"></x-common-payment>
|
|
410
|
-
|
|
411
|
-
<div *ngIf="capital$ | async as capital; else loader" class="">
|
|
412
|
-
<div class="row gx-5 d-flex flex-wrap">
|
|
413
|
-
<div class="col d-flex flex-column">
|
|
414
|
-
<div class="card card-body">
|
|
415
|
-
<div class="d-flex justify-content-between align-items-center">
|
|
416
|
-
<span class="fs-6">
|
|
417
|
-
{{
|
|
418
|
-
'apps.capital.component.dashboard.message.plan' | xTranslate
|
|
419
|
-
}}
|
|
420
|
-
</span>
|
|
421
|
-
<span *ngIf="capital.plan?.type?.name" class="fs-3"
|
|
422
|
-
>{{ capital.plan?.type?.name }}
|
|
423
|
-
</span>
|
|
424
|
-
<!-- <span *ngIf="capital.plan?.type?.name" class="fs-3"
|
|
425
|
-
>{{
|
|
426
|
-
capital.plan.type[capital.plan.periodType]
|
|
427
|
-
| xMajor | number: '1.2-2'
|
|
428
|
-
}}<span class="fs-6">{{ capital.plan.type.currency }}</span>
|
|
429
|
-
</span> -->
|
|
430
|
-
<span *ngIf="!capital.plan?.type?.name" class="fs-3">
|
|
431
|
-
...
|
|
432
|
-
</span>
|
|
433
|
-
</div>
|
|
434
|
-
<div
|
|
435
|
-
*ngIf="
|
|
436
|
-
capital.plan?.type?.name &&
|
|
437
|
-
capital.plan?.type?.name?.toLowerCase() != 'pro'
|
|
438
|
-
"
|
|
439
|
-
class="d-flex justify-content-end align-items-center"
|
|
440
|
-
>
|
|
441
|
-
<button
|
|
442
|
-
class="btn btn-outline-warning btn-sm small-text"
|
|
443
|
-
(click)="upgradePlan()"
|
|
444
|
-
>
|
|
445
|
-
{{
|
|
446
|
-
'apps.capital.component.dashboard.button.upgrade-plan'
|
|
447
|
-
| xTranslate
|
|
448
|
-
}}
|
|
449
|
-
</button>
|
|
450
|
-
</div>
|
|
451
|
-
<div
|
|
452
|
-
*ngIf="!capital.plan?.type?.name"
|
|
453
|
-
class="d-flex justify-content-end align-items-center"
|
|
454
|
-
>
|
|
455
|
-
<button
|
|
456
|
-
class="btn btn-outline-warning btn-sm small-text"
|
|
457
|
-
(click)="upgradePlan()"
|
|
458
|
-
>
|
|
459
|
-
{{
|
|
460
|
-
'apps.capital.component.dashboard.button.select-plan'
|
|
461
|
-
| xTranslate
|
|
462
|
-
}}
|
|
463
|
-
</button>
|
|
464
|
-
</div>
|
|
465
|
-
</div>
|
|
466
|
-
</div>
|
|
467
|
-
<!-- <div class="col d-flex flex-column">
|
|
468
|
-
<div class="card card-body">
|
|
469
|
-
<div class="d-flex justify-content-between align-items-center">
|
|
470
|
-
<span class="fs-6">{{
|
|
471
|
-
'apps.capital.component.dashboard.message.balance'
|
|
472
|
-
| xTranslate
|
|
473
|
-
}}</span>
|
|
474
|
-
<span class="fs-3"
|
|
475
|
-
>{{ capital.wallet.availableBalance | xMajor | number: '1.2-2'
|
|
476
|
-
}}<span class="fs-6">{{
|
|
477
|
-
capital.wallet.currency
|
|
478
|
-
}}</span></span
|
|
479
|
-
>
|
|
480
|
-
</div>
|
|
481
|
-
</div>
|
|
482
|
-
</div> -->
|
|
483
|
-
<div class="col d-flex flex-column">
|
|
484
|
-
<div class="card card-body">
|
|
485
|
-
<div class="d-flex justify-content-between align-items-center">
|
|
486
|
-
<span class="fs-6">
|
|
487
|
-
{{
|
|
488
|
-
'apps.capital.component.dashboard.message.pending'
|
|
489
|
-
| xTranslate
|
|
490
|
-
}}
|
|
491
|
-
</span>
|
|
492
|
-
<span
|
|
493
|
-
class="fs-3"
|
|
494
|
-
[ngClass]="{ 'text-warning': capital.pending.debt }"
|
|
495
|
-
>{{ capital.pending.debt | xMajor | number: '1.2-2'
|
|
496
|
-
}}<span class="fs-6">{{ capital.wallet.currency }}</span>
|
|
497
|
-
</span>
|
|
498
|
-
</div>
|
|
499
|
-
<div
|
|
500
|
-
*ngIf="capital.pending.debt > 0"
|
|
501
|
-
class="d-flex justify-content-end align-items-center"
|
|
502
|
-
>
|
|
503
|
-
<button
|
|
504
|
-
class="btn btn-outline-warning btn-sm small-text"
|
|
505
|
-
(click)="payNow(capital.pending.debt)"
|
|
506
|
-
>
|
|
507
|
-
{{
|
|
508
|
-
'apps.capital.component.dashboard.button.pay-now'
|
|
509
|
-
| xTranslate
|
|
510
|
-
}}
|
|
511
|
-
</button>
|
|
512
|
-
</div>
|
|
513
|
-
</div>
|
|
514
|
-
</div>
|
|
515
|
-
<div class="col d-flex flex-column">
|
|
516
|
-
<div class="card card-body">
|
|
517
|
-
<div class="d-flex justify-content-between align-items-center">
|
|
518
|
-
<span class="fs-6">{{
|
|
519
|
-
'apps.capital.component.dashboard.message.cost' | xTranslate
|
|
520
|
-
}}</span>
|
|
521
|
-
<span class="fs-3"
|
|
522
|
-
>{{ capital.estimate.cost | xMajor | number: '1.2-2'
|
|
523
|
-
}}<span class="fs-6">{{
|
|
524
|
-
capital.wallet.currency
|
|
525
|
-
}}</span></span
|
|
526
|
-
>
|
|
527
|
-
</div>
|
|
528
|
-
</div>
|
|
529
|
-
</div>
|
|
530
|
-
</div>
|
|
531
|
-
</div>
|
|
532
|
-
</ng-template>
|
|
533
|
-
|
|
534
|
-
<!-- upgrade plan flyout -->
|
|
535
|
-
<ng-template #upgradePlanFlyout>
|
|
536
|
-
<x-webget-flyout [data]="{ title: 'Upgrade Plan' }">
|
|
537
|
-
<x-webget-wizard [data]="wizardData">
|
|
538
|
-
<ng-template [xWizard]="'select-plan'">
|
|
539
|
-
<ng-container
|
|
540
|
-
*ngIf="periodData$ | async as periodData; else loader"
|
|
541
|
-
>
|
|
542
|
-
<div
|
|
543
|
-
*ngIf="
|
|
544
|
-
planTypes$ && planTypes$ | async as planTypes;
|
|
545
|
-
else loader
|
|
546
|
-
"
|
|
547
|
-
class="d-flex flex-column"
|
|
548
|
-
>
|
|
549
|
-
<div class="d-flex flex-column my-3 align-items-center">
|
|
550
|
-
<p class="text-secondary text-center">
|
|
551
|
-
{{
|
|
552
|
-
'apps.capital.component.dashboard.message.select-plan'
|
|
553
|
-
| xTranslate
|
|
554
|
-
}}
|
|
555
|
-
</p>
|
|
556
|
-
</div>
|
|
557
|
-
|
|
558
|
-
<div class="d-flex justify-content-end align-items-center my-3">
|
|
559
|
-
<x-picker
|
|
560
|
-
[data]="periodData"
|
|
561
|
-
(select)="onPeriodSelect($event)"
|
|
562
|
-
></x-picker>
|
|
563
|
-
</div>
|
|
564
|
-
|
|
565
|
-
<div
|
|
566
|
-
*ngIf="planTypes.length; else empty"
|
|
567
|
-
class="accordion"
|
|
568
|
-
id="plan-accordion"
|
|
569
|
-
>
|
|
570
|
-
<div
|
|
571
|
-
*ngFor="let planType of planTypes; index as i"
|
|
572
|
-
class="accordion-item w-100"
|
|
573
|
-
>
|
|
574
|
-
<div
|
|
575
|
-
*ngIf="planType.id != currentPlan?.type?.id"
|
|
576
|
-
class="accordion-header"
|
|
577
|
-
>
|
|
578
|
-
<button
|
|
579
|
-
class="accordion-button d-flex justify-content-between align-items-center"
|
|
580
|
-
[ngClass]="{ collapsed: planType.type !== 'popular' }"
|
|
581
|
-
type="button"
|
|
582
|
-
data-bs-toggle="collapse"
|
|
583
|
-
[attr.data-bs-target]="'#collapse' + i"
|
|
584
|
-
>
|
|
585
|
-
<div class="col-8">
|
|
586
|
-
<div class="h3">{{ planType.name | titlecase }}</div>
|
|
587
|
-
<div
|
|
588
|
-
*ngIf="planType.desc"
|
|
589
|
-
class="h6 text-body-secondary"
|
|
590
|
-
>
|
|
591
|
-
{{ planType.desc }}
|
|
592
|
-
</div>
|
|
593
|
-
</div>
|
|
594
|
-
<div class="col-3">
|
|
595
|
-
<div class="fw-bolder fst-italic h3">
|
|
596
|
-
{{ planType.currency ?? '...' }}
|
|
597
|
-
{{
|
|
598
|
-
(planType[periodType]
|
|
599
|
-
| xMajor
|
|
600
|
-
| number: '1.2-2') ?? '...'
|
|
601
|
-
}}
|
|
602
|
-
</div>
|
|
603
|
-
</div>
|
|
604
|
-
</button>
|
|
605
|
-
</div>
|
|
606
|
-
<div
|
|
607
|
-
[attr.id]="'collapse' + i"
|
|
608
|
-
class="accordion-collapse collapse"
|
|
609
|
-
[ngClass]="{ show: planType.type == 'popular' }"
|
|
610
|
-
data-bs-parent="#plan-accordion"
|
|
611
|
-
>
|
|
612
|
-
<div class="accordion-body">
|
|
613
|
-
<div
|
|
614
|
-
class="d-flex justify-content-start align-items-center"
|
|
615
|
-
>
|
|
616
|
-
<p
|
|
617
|
-
*ngIf="planType.detail"
|
|
618
|
-
class="text-body-secondary"
|
|
619
|
-
>
|
|
620
|
-
{{ planType.detail }}
|
|
621
|
-
</p>
|
|
622
|
-
</div>
|
|
623
|
-
<ul
|
|
624
|
-
*ngIf="planType?.meta?.features?.length"
|
|
625
|
-
class="list-group list-group-flush"
|
|
626
|
-
>
|
|
627
|
-
<li
|
|
628
|
-
*ngFor="let feature of planType?.meta?.features"
|
|
629
|
-
class="list-group-item"
|
|
630
|
-
>
|
|
631
|
-
{{ feature }}
|
|
632
|
-
</li>
|
|
633
|
-
</ul>
|
|
634
|
-
<div
|
|
635
|
-
class="d-flex justify-content-end align-items-center my-3"
|
|
636
|
-
>
|
|
637
|
-
<button
|
|
638
|
-
class="btn btn-primary"
|
|
639
|
-
(click)="selectPlanType(planType)"
|
|
640
|
-
>
|
|
641
|
-
Choose {{ planType.name }}
|
|
642
|
-
<i class="fa-solid fa-arrow-right-long"></i>
|
|
643
|
-
</button>
|
|
644
|
-
</div>
|
|
645
|
-
</div>
|
|
646
|
-
</div>
|
|
647
|
-
</div>
|
|
648
|
-
</div>
|
|
649
|
-
|
|
650
|
-
<div
|
|
651
|
-
class="d-flex justify-content-center align-items-center my-3"
|
|
652
|
-
>
|
|
653
|
-
<p class="text-center mb-1">
|
|
654
|
-
{{
|
|
655
|
-
'apps.capital.component.dashboard.message.terms'
|
|
656
|
-
| xTranslate
|
|
657
|
-
}}
|
|
658
|
-
</p>
|
|
659
|
-
</div>
|
|
660
|
-
</div>
|
|
661
|
-
</ng-container>
|
|
662
|
-
</ng-template>
|
|
663
|
-
<ng-template [xWizard]="'make-payment'">
|
|
664
|
-
<ng-container
|
|
665
|
-
*ngIf="false; else makePaymentTemplate"
|
|
666
|
-
></ng-container>
|
|
667
|
-
</ng-template>
|
|
668
|
-
</x-webget-wizard>
|
|
669
|
-
</x-webget-flyout>
|
|
670
|
-
</ng-template>
|
|
671
|
-
|
|
672
|
-
<!-- pay now flyout -->
|
|
673
|
-
<ng-template #payNowFlyout>
|
|
674
|
-
<x-webget-flyout [data]="{ title: 'Pay Now' }">
|
|
675
|
-
<ng-container *ngIf="false; else makePaymentTemplate"></ng-container>
|
|
676
|
-
</x-webget-flyout>
|
|
677
|
-
</ng-template>
|
|
678
|
-
|
|
679
|
-
<!-- upgrade payment flyout -->
|
|
680
|
-
<ng-template #makePaymentTemplate>
|
|
681
|
-
<x-common-payment [data]="paymentData"></x-common-payment>
|
|
682
|
-
</ng-template>
|
|
683
|
-
|
|
684
|
-
<!-- misc -->
|
|
685
|
-
<ng-template #loader>
|
|
686
|
-
<x-element-loader></x-element-loader>
|
|
687
|
-
</ng-template>
|
|
688
|
-
|
|
689
|
-
<ng-template #empty>
|
|
690
|
-
<x-element-blank></x-element-blank>
|
|
691
|
-
</ng-template>
|
|
692
|
-
`, styles: [".small-text{font-size:.7rem!important}\n"] }]
|
|
693
|
-
}], propDecorators: { beforeMetricsTemplate: [{
|
|
694
|
-
type: ViewChild,
|
|
695
|
-
args: ['beforeMetricsTemplate', {
|
|
696
|
-
read: TemplateRef,
|
|
697
|
-
static: true,
|
|
698
|
-
}]
|
|
699
|
-
}], upgradePlanFlyout: [{
|
|
700
|
-
type: ViewChild,
|
|
701
|
-
args: ['upgradePlanFlyout', { read: TemplateRef, static: true }]
|
|
702
|
-
}], payNowFlyout: [{
|
|
703
|
-
type: ViewChild,
|
|
704
|
-
args: ['payNowFlyout', { read: TemplateRef, static: true }]
|
|
705
|
-
}] } });
|
|
706
|
-
|
|
707
|
-
class DashboardModule {
|
|
708
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DashboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
709
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.5", ngImport: i0, type: DashboardModule, declarations: [DashboardComponent], imports: [SharedModule, i2.DashboardModule, WebgetsModule,
|
|
710
|
-
ElementsModule,
|
|
711
|
-
PipesModule,
|
|
712
|
-
PaymentModule$1] }); }
|
|
713
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DashboardModule, imports: [SharedModule,
|
|
714
|
-
DashboardModule$1.register({
|
|
715
|
-
metrics: [],
|
|
716
|
-
providers: [CardProvider, PaymentProvider],
|
|
717
|
-
templateSource: DashboardComponent,
|
|
718
|
-
}),
|
|
719
|
-
WebgetsModule,
|
|
720
|
-
ElementsModule,
|
|
721
|
-
PipesModule,
|
|
722
|
-
PaymentModule$1] }); }
|
|
723
|
-
}
|
|
724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: DashboardModule, decorators: [{
|
|
725
|
-
type: NgModule,
|
|
726
|
-
args: [{
|
|
727
|
-
declarations: [DashboardComponent],
|
|
728
|
-
imports: [
|
|
729
|
-
SharedModule,
|
|
730
|
-
DashboardModule$1.register({
|
|
731
|
-
metrics: [],
|
|
732
|
-
providers: [CardProvider, PaymentProvider],
|
|
733
|
-
templateSource: DashboardComponent,
|
|
734
|
-
}),
|
|
735
|
-
WebgetsModule,
|
|
736
|
-
ElementsModule,
|
|
737
|
-
PipesModule,
|
|
738
|
-
PaymentModule$1,
|
|
739
|
-
],
|
|
740
|
-
}]
|
|
741
|
-
}] });
|
|
742
|
-
|
|
743
|
-
export { DashboardModule };
|
|
744
|
-
//# sourceMappingURL=thescaffold-ngx-apps-capital-dashboard.module-lX-8-L9H.mjs.map
|