@rolatech/angular-onboarding 20.3.0-beta.2 → 20.3.0-beta.3
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/rolatech-angular-onboarding-admin-onboarding-detail-page-DD-5SdjA.mjs +708 -0
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-detail-page-DD-5SdjA.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-index-page-DP7wffLd.mjs +313 -0
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-index-page-DP7wffLd.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-form-page-y02hYlN_.mjs +446 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-form-page-y02hYlN_.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-result-page-CEL4nWb_.mjs +141 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-result-page-CEL4nWb_.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-review-page-DG_D03YW.mjs +453 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-review-page-DG_D03YW.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-onboarding-agent-apply-shell-page-DibWYeD1.mjs → rolatech-angular-onboarding-agent-apply-shell-page-CaTvnFzk.mjs} +27 -40
- package/fesm2022/rolatech-angular-onboarding-agent-apply-shell-page-CaTvnFzk.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-onboarding-agent-apply-start-page-DC7gyOnS.mjs → rolatech-angular-onboarding-agent-apply-start-page-BfqO2YWB.mjs} +31 -29
- package/fesm2022/rolatech-angular-onboarding-agent-apply-start-page-BfqO2YWB.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-onboarding-agent-onboarding-documents-page-DWBGTj5J.mjs → rolatech-angular-onboarding-agent-onboarding-documents-page-BKDYZE0e.mjs} +79 -6
- package/fesm2022/rolatech-angular-onboarding-agent-onboarding-documents-page-BKDYZE0e.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding.mjs +2252 -234
- package/fesm2022/rolatech-angular-onboarding.mjs.map +1 -1
- package/package.json +1 -1
- package/types/rolatech-angular-onboarding.d.ts +219 -12
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-detail-page-DKJQX3cs.mjs +0 -224
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-detail-page-DKJQX3cs.mjs.map +0 -1
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-index-page-BO4pC_NU.mjs +0 -206
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-index-page-BO4pC_NU.mjs.map +0 -1
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-review-page-BERcLBeQ.mjs +0 -419
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-review-page-BERcLBeQ.mjs.map +0 -1
- package/fesm2022/rolatech-angular-onboarding-agent-apply-banking-page-VYNfR4fy.mjs +0 -133
- package/fesm2022/rolatech-angular-onboarding-agent-apply-banking-page-VYNfR4fy.mjs.map +0 -1
- package/fesm2022/rolatech-angular-onboarding-agent-apply-financial-page-Ck3Rowke.mjs +0 -132
- package/fesm2022/rolatech-angular-onboarding-agent-apply-financial-page-Ck3Rowke.mjs.map +0 -1
- package/fesm2022/rolatech-angular-onboarding-agent-apply-profile-page-DNepDxHu.mjs +0 -122
- package/fesm2022/rolatech-angular-onboarding-agent-apply-profile-page-DNepDxHu.mjs.map +0 -1
- package/fesm2022/rolatech-angular-onboarding-agent-apply-qualification-page-CSwupuKt.mjs +0 -108
- package/fesm2022/rolatech-angular-onboarding-agent-apply-qualification-page-CSwupuKt.mjs.map +0 -1
- package/fesm2022/rolatech-angular-onboarding-agent-apply-review-page-DugCjfvK.mjs +0 -182
- package/fesm2022/rolatech-angular-onboarding-agent-apply-review-page-DugCjfvK.mjs.map +0 -1
- package/fesm2022/rolatech-angular-onboarding-agent-apply-shell-page-DibWYeD1.mjs.map +0 -1
- package/fesm2022/rolatech-angular-onboarding-agent-apply-start-page-DC7gyOnS.mjs.map +0 -1
- package/fesm2022/rolatech-angular-onboarding-agent-apply-submitted-page-BMkV2V8K.mjs +0 -55
- package/fesm2022/rolatech-angular-onboarding-agent-apply-submitted-page-BMkV2V8K.mjs.map +0 -1
- package/fesm2022/rolatech-angular-onboarding-agent-onboarding-documents-page-DWBGTj5J.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolatech-angular-onboarding-agent-apply-result-page-CEL4nWb_.mjs","sources":["../../../../packages/angular-onboarding/src/lib/pages/agent-apply/agent-apply-result-page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, ViewEncapsulation } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { OnboardingStatusBadge } from '../../components/onboarding/onboarding-status-badge';\nimport { AgentApplyFacade } from '../../store/agent-apply.facade';\n\n@Component({\n selector: 'rolatech-agent-apply-result-page',\n standalone: true,\n imports: [OnboardingStatusBadge],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'block' },\n template: `\n <section class=\"rounded-3xl border p-8 shadow-sm\" [class]=\"toneClass()\">\n <div class=\"flex flex-wrap items-start justify-between gap-4\">\n <div class=\"space-y-3\">\n <p class=\"text-xs font-semibold uppercase tracking-[0.2em] opacity-80\">Application Result</p>\n <h2 class=\"text-2xl font-semibold tracking-tight\">{{ title() }}</h2>\n <p class=\"max-w-2xl text-sm opacity-85\">{{ description() }}</p>\n </div>\n\n <rolatech-onboarding-status-badge [status]=\"facade.status()\" />\n </div>\n\n <div class=\"mt-6 flex flex-wrap gap-3\">\n <button\n type=\"button\"\n class=\"rounded-xl border border-(--rt-border-color) bg-(--rt-raised-background) px-4 py-2 text-sm font-medium transition hover:bg-(--rt-base-background)\"\n (click)=\"openReview()\"\n >\n View submission\n </button>\n\n @if (facade.status() === 'NEED_MORE_INFO') {\n <button\n type=\"button\"\n class=\"rounded-xl border border-(--rt-border-color) bg-(--rt-raised-background) px-4 py-2 text-sm font-medium transition hover:bg-(--rt-base-background)\"\n (click)=\"openForm()\"\n >\n Update requested items\n </button>\n }\n </div>\n </section>\n `,\n})\nexport class AgentApplyResultPage {\n readonly facade = inject(AgentApplyFacade);\n private readonly router = inject(Router);\n private readonly route = inject(ActivatedRoute);\n\n readonly toneClass = computed(() => {\n switch (this.facade.status()) {\n case 'APPROVED':\n return 'border-(--rt-border-color) bg-(--rt-base-background) text-emerald-900';\n case 'FAILED':\n return 'border-(--rt-border-color) bg-(--rt-base-background) text-rose-800';\n case 'NEED_MORE_INFO':\n return 'border-(--rt-border-color) bg-(--rt-base-background) text-amber-900';\n default:\n return 'border-(--rt-border-color) bg-(--rt-base-background) text-sky-900';\n }\n });\n\n readonly title = computed(() => {\n switch (this.facade.status()) {\n case 'APPROVED':\n return 'Application approved';\n case 'FAILED':\n return 'Application not approved';\n case 'NEED_MORE_INFO':\n return 'More information is required';\n case 'IN_REVIEW':\n return 'Application in review';\n default:\n return 'Application submitted';\n }\n });\n\n readonly description = computed(() => {\n switch (this.facade.status()) {\n case 'APPROVED':\n return 'The application passed review. PrimeCasa can now continue with the downstream agent enablement steps.';\n case 'FAILED':\n return 'The application was rejected during review. You can still inspect the submitted package and any reviewer feedback from the review screen.';\n case 'NEED_MORE_INFO':\n return 'Reviewer feedback has been returned to this application. Only the flagged fields and documents should be updated before resubmission.';\n case 'IN_REVIEW':\n return 'The submission is currently being reviewed by the PrimeCasa operations team.';\n default:\n return 'The application has been sent for manual review. You can return to the review screen to inspect the submission package.';\n }\n });\n\n async openReview(): Promise<void> {\n await this.router.navigate(['../review'], {\n relativeTo: this.route,\n });\n }\n\n async openForm(): Promise<void> {\n await this.router.navigate(['../form'], {\n relativeTo: this.route,\n });\n }\n}\n"],"names":[],"mappings":";;;;;MA8Ca,oBAAoB,CAAA;AACtB,IAAA,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzB,IAA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,CAAC,IAAI;AACrC,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;AACxB,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCT,EAAA,CAAA;AACF,iBAAA;;;;;"}
|
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, signal, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
4
|
+
import { OnboardingDocumentService, onboardingApplicantTypeLabel, onboardingStatusLabel, onboardingDocumentTypeLabel, onboardingVatModeLabel } from '@rolatech/angular-services';
|
|
5
|
+
import { firstValueFrom } from 'rxjs';
|
|
6
|
+
import { AgentApplyFacade, OnboardingSummaryCard, OnboardingIssueList, OnboardingTimelineDrawer, OnboardingReviewIssuesBanner, OnboardingDocumentPreviewDialog } from './rolatech-angular-onboarding.mjs';
|
|
7
|
+
|
|
8
|
+
class AgentApplyReviewPage {
|
|
9
|
+
facade = inject(AgentApplyFacade);
|
|
10
|
+
onboardingDocumentService = inject(OnboardingDocumentService);
|
|
11
|
+
timelineOpen = signal(false, ...(ngDevMode ? [{ debugName: "timelineOpen" }] : []));
|
|
12
|
+
previewOpen = signal(false, ...(ngDevMode ? [{ debugName: "previewOpen" }] : []));
|
|
13
|
+
previewLoading = signal(false, ...(ngDevMode ? [{ debugName: "previewLoading" }] : []));
|
|
14
|
+
previewError = signal(null, ...(ngDevMode ? [{ debugName: "previewError" }] : []));
|
|
15
|
+
previewUrl = signal(null, ...(ngDevMode ? [{ debugName: "previewUrl" }] : []));
|
|
16
|
+
previewTitle = signal(null, ...(ngDevMode ? [{ debugName: "previewTitle" }] : []));
|
|
17
|
+
previewSubtitle = signal(null, ...(ngDevMode ? [{ debugName: "previewSubtitle" }] : []));
|
|
18
|
+
previewDocumentId = signal(null, ...(ngDevMode ? [{ debugName: "previewDocumentId" }] : []));
|
|
19
|
+
router = inject(Router);
|
|
20
|
+
route = inject(ActivatedRoute);
|
|
21
|
+
applicationItems = computed(() => {
|
|
22
|
+
const detail = this.facade.detail();
|
|
23
|
+
if (!detail) {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
return [
|
|
27
|
+
{ label: 'Applicant type', value: onboardingApplicantTypeLabel(detail.applicantType) },
|
|
28
|
+
{ label: 'Operating region', value: this.countryLabel(detail.companyCountry) },
|
|
29
|
+
{ label: 'Status', value: onboardingStatusLabel(detail.status) },
|
|
30
|
+
];
|
|
31
|
+
}, ...(ngDevMode ? [{ debugName: "applicationItems" }] : []));
|
|
32
|
+
profileItems = computed(() => {
|
|
33
|
+
const detail = this.facade.detail();
|
|
34
|
+
if (!detail) {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
return [
|
|
38
|
+
{ label: this.facade.isCompany() ? 'Company legal name' : 'Applicant name', value: this.primaryName(detail) },
|
|
39
|
+
{ label: this.facade.isCompany() ? 'Representative' : 'Primary contact', value: detail.contactName },
|
|
40
|
+
{ label: 'Primary email', value: detail.contactEmail },
|
|
41
|
+
{ label: 'Phone number', value: detail.contactPhone },
|
|
42
|
+
{ label: 'Country code', value: detail.countryCode },
|
|
43
|
+
];
|
|
44
|
+
}, ...(ngDevMode ? [{ debugName: "profileItems" }] : []));
|
|
45
|
+
documentItems = computed(() => {
|
|
46
|
+
const detail = this.facade.detail();
|
|
47
|
+
if (!detail) {
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
const requiredItems = this.facade.requiredDocuments().map((spec) => {
|
|
51
|
+
const document = this.facade.getDocument(spec.type);
|
|
52
|
+
return {
|
|
53
|
+
label: spec.label,
|
|
54
|
+
helper: spec.helperText ?? '',
|
|
55
|
+
filename: document?.originalFilename ?? 'Missing',
|
|
56
|
+
document,
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
const requiredTypes = new Set(this.facade.requiredDocuments().map((spec) => spec.type));
|
|
60
|
+
const additionalItems = detail.documents
|
|
61
|
+
.filter((item) => !requiredTypes.has(item.documentType))
|
|
62
|
+
.map((document) => ({
|
|
63
|
+
label: `Additional: ${onboardingDocumentTypeLabel(document.documentType)}`,
|
|
64
|
+
helper: 'Supporting document uploaded with the application.',
|
|
65
|
+
filename: document.originalFilename,
|
|
66
|
+
document,
|
|
67
|
+
}));
|
|
68
|
+
return [...requiredItems, ...additionalItems];
|
|
69
|
+
}, ...(ngDevMode ? [{ debugName: "documentItems" }] : []));
|
|
70
|
+
financialItems = computed(() => {
|
|
71
|
+
const detail = this.facade.detail();
|
|
72
|
+
if (!detail) {
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
return [
|
|
76
|
+
{ label: 'VAT mode', value: onboardingVatModeLabel(detail.vatMode ?? null) },
|
|
77
|
+
{
|
|
78
|
+
label: 'VAT number',
|
|
79
|
+
value: detail.vatNumber || (detail.vatMode === 'MANUAL_REVIEW_REQUIRED' ? 'Manual review' : null),
|
|
80
|
+
},
|
|
81
|
+
{ label: 'VAT rate', value: detail.applicantType === 'INDIVIDUAL' ? '0%' : '20%' },
|
|
82
|
+
];
|
|
83
|
+
}, ...(ngDevMode ? [{ debugName: "financialItems" }] : []));
|
|
84
|
+
bankingItems = computed(() => {
|
|
85
|
+
const detail = this.facade.detail();
|
|
86
|
+
if (!detail) {
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
return [
|
|
90
|
+
{ label: 'Bank name', value: detail.bankName },
|
|
91
|
+
{ label: 'Account holder', value: detail.accountHolderName },
|
|
92
|
+
{ label: 'Sort code', value: this.facade.formatSortCode(detail.sortCode) },
|
|
93
|
+
{ label: 'Account number', value: detail.accountNumber },
|
|
94
|
+
];
|
|
95
|
+
}, ...(ngDevMode ? [{ debugName: "bankingItems" }] : []));
|
|
96
|
+
showSubmitAction = computed(() => {
|
|
97
|
+
const status = this.facade.status();
|
|
98
|
+
return status === 'DRAFT' || status === 'IN_PROGRESS' || status === 'NEED_MORE_INFO' || status === null;
|
|
99
|
+
}, ...(ngDevMode ? [{ debugName: "showSubmitAction" }] : []));
|
|
100
|
+
submitLabel = computed(() => this.facade.status() === 'NEED_MORE_INFO' ? 'Resubmit application' : 'Submit application', ...(ngDevMode ? [{ debugName: "submitLabel" }] : []));
|
|
101
|
+
async submit() {
|
|
102
|
+
const submitted = await this.facade.submit();
|
|
103
|
+
if (!submitted) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
await this.router.navigate(['../result'], {
|
|
107
|
+
relativeTo: this.route,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
async back() {
|
|
111
|
+
await this.router.navigate(['../form'], {
|
|
112
|
+
relativeTo: this.route,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
async openResult() {
|
|
116
|
+
await this.router.navigate(['../result'], {
|
|
117
|
+
relativeTo: this.route,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
openTimeline() {
|
|
121
|
+
this.timelineOpen.set(true);
|
|
122
|
+
}
|
|
123
|
+
closeTimeline() {
|
|
124
|
+
this.timelineOpen.set(false);
|
|
125
|
+
}
|
|
126
|
+
previewBusy(documentId) {
|
|
127
|
+
return this.previewLoading() && this.previewDocumentId() === documentId;
|
|
128
|
+
}
|
|
129
|
+
async openDocumentPreview(item) {
|
|
130
|
+
if (!item.document) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
this.previewOpen.set(true);
|
|
134
|
+
this.previewLoading.set(true);
|
|
135
|
+
this.previewError.set(null);
|
|
136
|
+
this.previewUrl.set(null);
|
|
137
|
+
this.previewTitle.set(item.label);
|
|
138
|
+
this.previewSubtitle.set(item.document.originalFilename || null);
|
|
139
|
+
this.previewDocumentId.set(item.document.id);
|
|
140
|
+
try {
|
|
141
|
+
const response = await firstValueFrom(this.onboardingDocumentService.getPreviewUrl(item.document.id));
|
|
142
|
+
this.previewUrl.set(response.previewUrl);
|
|
143
|
+
this.previewDocumentId.set(response.documentId);
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
this.previewError.set(this.toErrorMessage(error));
|
|
147
|
+
}
|
|
148
|
+
finally {
|
|
149
|
+
this.previewLoading.set(false);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
closeDocumentPreview() {
|
|
153
|
+
this.previewOpen.set(false);
|
|
154
|
+
this.previewLoading.set(false);
|
|
155
|
+
this.previewError.set(null);
|
|
156
|
+
this.previewUrl.set(null);
|
|
157
|
+
this.previewTitle.set(null);
|
|
158
|
+
this.previewSubtitle.set(null);
|
|
159
|
+
this.previewDocumentId.set(null);
|
|
160
|
+
}
|
|
161
|
+
countryLabel(value) {
|
|
162
|
+
switch ((value ?? '').toUpperCase()) {
|
|
163
|
+
case 'CN':
|
|
164
|
+
return 'China';
|
|
165
|
+
case 'UK':
|
|
166
|
+
return 'United Kingdom';
|
|
167
|
+
default:
|
|
168
|
+
return value || '—';
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
primaryName(detail) {
|
|
172
|
+
return detail.applicantType === 'COMPANY' ? detail.organizationName : detail.contactName;
|
|
173
|
+
}
|
|
174
|
+
toErrorMessage(error) {
|
|
175
|
+
if (error instanceof Error && error.message) {
|
|
176
|
+
return error.message;
|
|
177
|
+
}
|
|
178
|
+
return 'Unable to load the document preview.';
|
|
179
|
+
}
|
|
180
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AgentApplyReviewPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
181
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: AgentApplyReviewPage, isStandalone: true, selector: "rolatech-agent-apply-review-page", host: { classAttribute: "block" }, ngImport: i0, template: `
|
|
182
|
+
@if (facade.detail(); as detail) {
|
|
183
|
+
<div class="space-y-4">
|
|
184
|
+
@if (detail.status === 'NEED_MORE_INFO' || detail.status === 'SUBMITTED' || detail.status === 'IN_REVIEW') {
|
|
185
|
+
<rolatech-onboarding-review-issues-banner [issues]="detail.issues" [status]="detail.status" />
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
<rolatech-onboarding-summary-card [title]="'Application'" [items]="applicationItems()" />
|
|
189
|
+
<rolatech-onboarding-summary-card [title]="'Profile'" [items]="profileItems()" />
|
|
190
|
+
|
|
191
|
+
<section class="rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-5 shadow-sm">
|
|
192
|
+
<div class="flex flex-wrap items-start justify-between gap-3">
|
|
193
|
+
<div class="space-y-1">
|
|
194
|
+
<h3 class="text-base font-semibold text-(--rt-text-primary)">Documents</h3>
|
|
195
|
+
<p class="text-sm text-(--rt-text-secondary)">
|
|
196
|
+
Open uploaded files before you submit or resubmit the application.
|
|
197
|
+
</p>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
<div class="mt-4 grid gap-4 md:grid-cols-2">
|
|
202
|
+
@for (item of documentItems(); track item.document?.id ?? item.label + ':' + item.filename) {
|
|
203
|
+
<article class="rounded-xl border border-(--rt-border-color) bg-(--rt-raised-background) p-3">
|
|
204
|
+
<div class="flex flex-wrap items-start justify-between gap-3">
|
|
205
|
+
<div class="min-w-0 space-y-1">
|
|
206
|
+
<p class="text-xs font-medium uppercase tracking-wide text-(--rt-text-secondary)">{{ item.label }}</p>
|
|
207
|
+
<p class="wrap-break-words text-sm font-medium text-(--rt-text-primary)">{{ item.filename }}</p>
|
|
208
|
+
@if (item.helper) {
|
|
209
|
+
<p class="text-xs text-(--rt-text-secondary)">{{ item.helper }}</p>
|
|
210
|
+
}
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
@if (item.document) {
|
|
214
|
+
<button
|
|
215
|
+
type="button"
|
|
216
|
+
class="cursor-pointer rounded-full border border-(--rt-border-color) bg-(--rt-raised-background) px-3 py-1.5 text-xs font-semibold text-(--rt-text-primary) transition hover:bg-(--rt-base-background) disabled:cursor-not-allowed disabled:opacity-60"
|
|
217
|
+
[disabled]="previewBusy(item.document.id)"
|
|
218
|
+
(click)="openDocumentPreview(item)"
|
|
219
|
+
>
|
|
220
|
+
{{ previewBusy(item.document.id) ? 'Loading...' : 'Preview' }}
|
|
221
|
+
</button>
|
|
222
|
+
} @else {
|
|
223
|
+
<span
|
|
224
|
+
class="rounded-full border border-(--rt-border-color) bg-(--rt-base-background) px-2.5 py-1 text-xs font-semibold text-(--rt-text-secondary)"
|
|
225
|
+
>
|
|
226
|
+
Missing
|
|
227
|
+
</span>
|
|
228
|
+
}
|
|
229
|
+
</div>
|
|
230
|
+
</article>
|
|
231
|
+
}
|
|
232
|
+
</div>
|
|
233
|
+
</section>
|
|
234
|
+
|
|
235
|
+
<rolatech-onboarding-summary-card [title]="'Financial'" [items]="financialItems()" />
|
|
236
|
+
<rolatech-onboarding-summary-card [title]="'Banking'" [items]="bankingItems()" />
|
|
237
|
+
|
|
238
|
+
<rolatech-onboarding-issue-list [issues]="detail.issues" />
|
|
239
|
+
|
|
240
|
+
<section
|
|
241
|
+
class="flex flex-wrap items-center justify-between gap-3 rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-5 shadow-sm"
|
|
242
|
+
>
|
|
243
|
+
<div class="flex items-center gap-2">
|
|
244
|
+
<button
|
|
245
|
+
type="button"
|
|
246
|
+
class="rounded-xl border border-(--rt-border-color) px-4 py-2.5 text-sm font-medium text-(--rt-text-secondary) transition hover:bg-(--rt-raised-background)"
|
|
247
|
+
(click)="back()"
|
|
248
|
+
>
|
|
249
|
+
Back to form
|
|
250
|
+
</button>
|
|
251
|
+
|
|
252
|
+
<button
|
|
253
|
+
type="button"
|
|
254
|
+
class="rounded-xl border border-(--rt-border-color) bg-(--rt-base-background) px-4 py-2.5 text-sm font-medium text-(--rt-text-secondary) transition hover:bg-(--rt-raised-background)"
|
|
255
|
+
(click)="openTimeline()"
|
|
256
|
+
>
|
|
257
|
+
Timeline
|
|
258
|
+
</button>
|
|
259
|
+
</div>
|
|
260
|
+
|
|
261
|
+
@if (showSubmitAction()) {
|
|
262
|
+
<button
|
|
263
|
+
type="button"
|
|
264
|
+
class="rounded-xl bg-(--rt-brand-color) px-5 py-2.5 text-sm font-semibold text-(--rt-text-primary-inverse) transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60"
|
|
265
|
+
[disabled]="!facade.canSubmit()"
|
|
266
|
+
(click)="submit()"
|
|
267
|
+
>
|
|
268
|
+
{{ submitLabel() }}
|
|
269
|
+
</button>
|
|
270
|
+
} @else {
|
|
271
|
+
<button
|
|
272
|
+
type="button"
|
|
273
|
+
class="rounded-xl border border-(--rt-border-color) px-5 py-2.5 text-sm font-semibold text-(--rt-text-primary) transition hover:bg-(--rt-raised-background)"
|
|
274
|
+
(click)="openResult()"
|
|
275
|
+
>
|
|
276
|
+
View Result
|
|
277
|
+
</button>
|
|
278
|
+
}
|
|
279
|
+
</section>
|
|
280
|
+
|
|
281
|
+
<rolatech-onboarding-timeline-drawer
|
|
282
|
+
[open]="timelineOpen()"
|
|
283
|
+
[title]="'Application Timeline'"
|
|
284
|
+
[items]="detail.timeline"
|
|
285
|
+
[zIndex]="9100"
|
|
286
|
+
(closeRequested)="closeTimeline()"
|
|
287
|
+
/>
|
|
288
|
+
|
|
289
|
+
<rolatech-onboarding-document-preview-dialog
|
|
290
|
+
[open]="previewOpen()"
|
|
291
|
+
[title]="previewTitle()"
|
|
292
|
+
[subtitle]="previewSubtitle()"
|
|
293
|
+
[url]="previewUrl()"
|
|
294
|
+
[loading]="previewLoading()"
|
|
295
|
+
[error]="previewError()"
|
|
296
|
+
(closeRequested)="closeDocumentPreview()"
|
|
297
|
+
/>
|
|
298
|
+
</div>
|
|
299
|
+
} @else {
|
|
300
|
+
<div
|
|
301
|
+
class="rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-5 text-sm text-(--rt-text-secondary) shadow-sm"
|
|
302
|
+
>
|
|
303
|
+
Loading application summary...
|
|
304
|
+
</div>
|
|
305
|
+
}
|
|
306
|
+
`, isInline: true, dependencies: [{ kind: "component", type: OnboardingSummaryCard, selector: "rolatech-onboarding-summary-card", inputs: ["title", "items"] }, { kind: "component", type: OnboardingIssueList, selector: "rolatech-onboarding-issue-list", inputs: ["issues"] }, { kind: "component", type: OnboardingTimelineDrawer, selector: "rolatech-onboarding-timeline-drawer", inputs: ["open", "title", "items", "zIndex"], outputs: ["closeRequested"] }, { kind: "component", type: OnboardingReviewIssuesBanner, selector: "rolatech-onboarding-review-issues-banner", inputs: ["issues", "status"] }, { kind: "component", type: OnboardingDocumentPreviewDialog, selector: "rolatech-onboarding-document-preview-dialog", inputs: ["open", "title", "subtitle", "url", "loading", "error"], outputs: ["closeRequested"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
307
|
+
}
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AgentApplyReviewPage, decorators: [{
|
|
309
|
+
type: Component,
|
|
310
|
+
args: [{
|
|
311
|
+
selector: 'rolatech-agent-apply-review-page',
|
|
312
|
+
standalone: true,
|
|
313
|
+
imports: [
|
|
314
|
+
OnboardingSummaryCard,
|
|
315
|
+
OnboardingIssueList,
|
|
316
|
+
OnboardingTimelineDrawer,
|
|
317
|
+
OnboardingReviewIssuesBanner,
|
|
318
|
+
OnboardingDocumentPreviewDialog,
|
|
319
|
+
],
|
|
320
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
321
|
+
encapsulation: ViewEncapsulation.None,
|
|
322
|
+
host: { class: 'block' },
|
|
323
|
+
template: `
|
|
324
|
+
@if (facade.detail(); as detail) {
|
|
325
|
+
<div class="space-y-4">
|
|
326
|
+
@if (detail.status === 'NEED_MORE_INFO' || detail.status === 'SUBMITTED' || detail.status === 'IN_REVIEW') {
|
|
327
|
+
<rolatech-onboarding-review-issues-banner [issues]="detail.issues" [status]="detail.status" />
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
<rolatech-onboarding-summary-card [title]="'Application'" [items]="applicationItems()" />
|
|
331
|
+
<rolatech-onboarding-summary-card [title]="'Profile'" [items]="profileItems()" />
|
|
332
|
+
|
|
333
|
+
<section class="rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-5 shadow-sm">
|
|
334
|
+
<div class="flex flex-wrap items-start justify-between gap-3">
|
|
335
|
+
<div class="space-y-1">
|
|
336
|
+
<h3 class="text-base font-semibold text-(--rt-text-primary)">Documents</h3>
|
|
337
|
+
<p class="text-sm text-(--rt-text-secondary)">
|
|
338
|
+
Open uploaded files before you submit or resubmit the application.
|
|
339
|
+
</p>
|
|
340
|
+
</div>
|
|
341
|
+
</div>
|
|
342
|
+
|
|
343
|
+
<div class="mt-4 grid gap-4 md:grid-cols-2">
|
|
344
|
+
@for (item of documentItems(); track item.document?.id ?? item.label + ':' + item.filename) {
|
|
345
|
+
<article class="rounded-xl border border-(--rt-border-color) bg-(--rt-raised-background) p-3">
|
|
346
|
+
<div class="flex flex-wrap items-start justify-between gap-3">
|
|
347
|
+
<div class="min-w-0 space-y-1">
|
|
348
|
+
<p class="text-xs font-medium uppercase tracking-wide text-(--rt-text-secondary)">{{ item.label }}</p>
|
|
349
|
+
<p class="wrap-break-words text-sm font-medium text-(--rt-text-primary)">{{ item.filename }}</p>
|
|
350
|
+
@if (item.helper) {
|
|
351
|
+
<p class="text-xs text-(--rt-text-secondary)">{{ item.helper }}</p>
|
|
352
|
+
}
|
|
353
|
+
</div>
|
|
354
|
+
|
|
355
|
+
@if (item.document) {
|
|
356
|
+
<button
|
|
357
|
+
type="button"
|
|
358
|
+
class="cursor-pointer rounded-full border border-(--rt-border-color) bg-(--rt-raised-background) px-3 py-1.5 text-xs font-semibold text-(--rt-text-primary) transition hover:bg-(--rt-base-background) disabled:cursor-not-allowed disabled:opacity-60"
|
|
359
|
+
[disabled]="previewBusy(item.document.id)"
|
|
360
|
+
(click)="openDocumentPreview(item)"
|
|
361
|
+
>
|
|
362
|
+
{{ previewBusy(item.document.id) ? 'Loading...' : 'Preview' }}
|
|
363
|
+
</button>
|
|
364
|
+
} @else {
|
|
365
|
+
<span
|
|
366
|
+
class="rounded-full border border-(--rt-border-color) bg-(--rt-base-background) px-2.5 py-1 text-xs font-semibold text-(--rt-text-secondary)"
|
|
367
|
+
>
|
|
368
|
+
Missing
|
|
369
|
+
</span>
|
|
370
|
+
}
|
|
371
|
+
</div>
|
|
372
|
+
</article>
|
|
373
|
+
}
|
|
374
|
+
</div>
|
|
375
|
+
</section>
|
|
376
|
+
|
|
377
|
+
<rolatech-onboarding-summary-card [title]="'Financial'" [items]="financialItems()" />
|
|
378
|
+
<rolatech-onboarding-summary-card [title]="'Banking'" [items]="bankingItems()" />
|
|
379
|
+
|
|
380
|
+
<rolatech-onboarding-issue-list [issues]="detail.issues" />
|
|
381
|
+
|
|
382
|
+
<section
|
|
383
|
+
class="flex flex-wrap items-center justify-between gap-3 rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-5 shadow-sm"
|
|
384
|
+
>
|
|
385
|
+
<div class="flex items-center gap-2">
|
|
386
|
+
<button
|
|
387
|
+
type="button"
|
|
388
|
+
class="rounded-xl border border-(--rt-border-color) px-4 py-2.5 text-sm font-medium text-(--rt-text-secondary) transition hover:bg-(--rt-raised-background)"
|
|
389
|
+
(click)="back()"
|
|
390
|
+
>
|
|
391
|
+
Back to form
|
|
392
|
+
</button>
|
|
393
|
+
|
|
394
|
+
<button
|
|
395
|
+
type="button"
|
|
396
|
+
class="rounded-xl border border-(--rt-border-color) bg-(--rt-base-background) px-4 py-2.5 text-sm font-medium text-(--rt-text-secondary) transition hover:bg-(--rt-raised-background)"
|
|
397
|
+
(click)="openTimeline()"
|
|
398
|
+
>
|
|
399
|
+
Timeline
|
|
400
|
+
</button>
|
|
401
|
+
</div>
|
|
402
|
+
|
|
403
|
+
@if (showSubmitAction()) {
|
|
404
|
+
<button
|
|
405
|
+
type="button"
|
|
406
|
+
class="rounded-xl bg-(--rt-brand-color) px-5 py-2.5 text-sm font-semibold text-(--rt-text-primary-inverse) transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60"
|
|
407
|
+
[disabled]="!facade.canSubmit()"
|
|
408
|
+
(click)="submit()"
|
|
409
|
+
>
|
|
410
|
+
{{ submitLabel() }}
|
|
411
|
+
</button>
|
|
412
|
+
} @else {
|
|
413
|
+
<button
|
|
414
|
+
type="button"
|
|
415
|
+
class="rounded-xl border border-(--rt-border-color) px-5 py-2.5 text-sm font-semibold text-(--rt-text-primary) transition hover:bg-(--rt-raised-background)"
|
|
416
|
+
(click)="openResult()"
|
|
417
|
+
>
|
|
418
|
+
View Result
|
|
419
|
+
</button>
|
|
420
|
+
}
|
|
421
|
+
</section>
|
|
422
|
+
|
|
423
|
+
<rolatech-onboarding-timeline-drawer
|
|
424
|
+
[open]="timelineOpen()"
|
|
425
|
+
[title]="'Application Timeline'"
|
|
426
|
+
[items]="detail.timeline"
|
|
427
|
+
[zIndex]="9100"
|
|
428
|
+
(closeRequested)="closeTimeline()"
|
|
429
|
+
/>
|
|
430
|
+
|
|
431
|
+
<rolatech-onboarding-document-preview-dialog
|
|
432
|
+
[open]="previewOpen()"
|
|
433
|
+
[title]="previewTitle()"
|
|
434
|
+
[subtitle]="previewSubtitle()"
|
|
435
|
+
[url]="previewUrl()"
|
|
436
|
+
[loading]="previewLoading()"
|
|
437
|
+
[error]="previewError()"
|
|
438
|
+
(closeRequested)="closeDocumentPreview()"
|
|
439
|
+
/>
|
|
440
|
+
</div>
|
|
441
|
+
} @else {
|
|
442
|
+
<div
|
|
443
|
+
class="rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-5 text-sm text-(--rt-text-secondary) shadow-sm"
|
|
444
|
+
>
|
|
445
|
+
Loading application summary...
|
|
446
|
+
</div>
|
|
447
|
+
}
|
|
448
|
+
`,
|
|
449
|
+
}]
|
|
450
|
+
}] });
|
|
451
|
+
|
|
452
|
+
export { AgentApplyReviewPage };
|
|
453
|
+
//# sourceMappingURL=rolatech-angular-onboarding-agent-apply-review-page-DG_D03YW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolatech-angular-onboarding-agent-apply-review-page-DG_D03YW.mjs","sources":["../../../../packages/angular-onboarding/src/lib/pages/agent-apply/agent-apply-review-page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, signal, ViewEncapsulation } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport {\n OnboardingApplicationDetailResponse,\n OnboardingDocumentResponse,\n OnboardingDocumentService,\n onboardingApplicantTypeLabel,\n onboardingDocumentTypeLabel,\n onboardingStatusLabel,\n onboardingVatModeLabel,\n} from '@rolatech/angular-services';\nimport { firstValueFrom } from 'rxjs';\nimport { OnboardingDocumentPreviewDialog } from '../../components/onboarding/onboarding-document-preview-dialog';\nimport { OnboardingIssueList } from '../../components/onboarding/onboarding-issue-list';\nimport { OnboardingReviewIssuesBanner } from '../../components/onboarding/onboarding-review-issues-banner';\nimport { OnboardingSummaryCard } from '../../components/onboarding/onboarding-summary-card';\nimport { OnboardingTimelineDrawer } from '../../components/onboarding/onboarding-timeline-drawer';\nimport { AgentApplyFacade } from '../../store/agent-apply.facade';\n\ninterface ReviewDocumentItem {\n label: string;\n helper: string;\n filename: string;\n document: OnboardingDocumentResponse | null;\n}\n\n@Component({\n selector: 'rolatech-agent-apply-review-page',\n standalone: true,\n imports: [\n OnboardingSummaryCard,\n OnboardingIssueList,\n OnboardingTimelineDrawer,\n OnboardingReviewIssuesBanner,\n OnboardingDocumentPreviewDialog,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'block' },\n template: `\n @if (facade.detail(); as detail) {\n <div class=\"space-y-4\">\n @if (detail.status === 'NEED_MORE_INFO' || detail.status === 'SUBMITTED' || detail.status === 'IN_REVIEW') {\n <rolatech-onboarding-review-issues-banner [issues]=\"detail.issues\" [status]=\"detail.status\" />\n }\n\n <rolatech-onboarding-summary-card [title]=\"'Application'\" [items]=\"applicationItems()\" />\n <rolatech-onboarding-summary-card [title]=\"'Profile'\" [items]=\"profileItems()\" />\n\n <section class=\"rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-5 shadow-sm\">\n <div class=\"flex flex-wrap items-start justify-between gap-3\">\n <div class=\"space-y-1\">\n <h3 class=\"text-base font-semibold text-(--rt-text-primary)\">Documents</h3>\n <p class=\"text-sm text-(--rt-text-secondary)\">\n Open uploaded files before you submit or resubmit the application.\n </p>\n </div>\n </div>\n\n <div class=\"mt-4 grid gap-4 md:grid-cols-2\">\n @for (item of documentItems(); track item.document?.id ?? item.label + ':' + item.filename) {\n <article class=\"rounded-xl border border-(--rt-border-color) bg-(--rt-raised-background) p-3\">\n <div class=\"flex flex-wrap items-start justify-between gap-3\">\n <div class=\"min-w-0 space-y-1\">\n <p class=\"text-xs font-medium uppercase tracking-wide text-(--rt-text-secondary)\">{{ item.label }}</p>\n <p class=\"wrap-break-words text-sm font-medium text-(--rt-text-primary)\">{{ item.filename }}</p>\n @if (item.helper) {\n <p class=\"text-xs text-(--rt-text-secondary)\">{{ item.helper }}</p>\n }\n </div>\n\n @if (item.document) {\n <button\n type=\"button\"\n class=\"cursor-pointer rounded-full border border-(--rt-border-color) bg-(--rt-raised-background) px-3 py-1.5 text-xs font-semibold text-(--rt-text-primary) transition hover:bg-(--rt-base-background) disabled:cursor-not-allowed disabled:opacity-60\"\n [disabled]=\"previewBusy(item.document.id)\"\n (click)=\"openDocumentPreview(item)\"\n >\n {{ previewBusy(item.document.id) ? 'Loading...' : 'Preview' }}\n </button>\n } @else {\n <span\n class=\"rounded-full border border-(--rt-border-color) bg-(--rt-base-background) px-2.5 py-1 text-xs font-semibold text-(--rt-text-secondary)\"\n >\n Missing\n </span>\n }\n </div>\n </article>\n }\n </div>\n </section>\n\n <rolatech-onboarding-summary-card [title]=\"'Financial'\" [items]=\"financialItems()\" />\n <rolatech-onboarding-summary-card [title]=\"'Banking'\" [items]=\"bankingItems()\" />\n\n <rolatech-onboarding-issue-list [issues]=\"detail.issues\" />\n\n <section\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-5 shadow-sm\"\n >\n <div class=\"flex items-center gap-2\">\n <button\n type=\"button\"\n class=\"rounded-xl border border-(--rt-border-color) px-4 py-2.5 text-sm font-medium text-(--rt-text-secondary) transition hover:bg-(--rt-raised-background)\"\n (click)=\"back()\"\n >\n Back to form\n </button>\n\n <button\n type=\"button\"\n class=\"rounded-xl border border-(--rt-border-color) bg-(--rt-base-background) px-4 py-2.5 text-sm font-medium text-(--rt-text-secondary) transition hover:bg-(--rt-raised-background)\"\n (click)=\"openTimeline()\"\n >\n Timeline\n </button>\n </div>\n\n @if (showSubmitAction()) {\n <button\n type=\"button\"\n class=\"rounded-xl bg-(--rt-brand-color) px-5 py-2.5 text-sm font-semibold text-(--rt-text-primary-inverse) transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60\"\n [disabled]=\"!facade.canSubmit()\"\n (click)=\"submit()\"\n >\n {{ submitLabel() }}\n </button>\n } @else {\n <button\n type=\"button\"\n class=\"rounded-xl border border-(--rt-border-color) px-5 py-2.5 text-sm font-semibold text-(--rt-text-primary) transition hover:bg-(--rt-raised-background)\"\n (click)=\"openResult()\"\n >\n View Result\n </button>\n }\n </section>\n\n <rolatech-onboarding-timeline-drawer\n [open]=\"timelineOpen()\"\n [title]=\"'Application Timeline'\"\n [items]=\"detail.timeline\"\n [zIndex]=\"9100\"\n (closeRequested)=\"closeTimeline()\"\n />\n\n <rolatech-onboarding-document-preview-dialog\n [open]=\"previewOpen()\"\n [title]=\"previewTitle()\"\n [subtitle]=\"previewSubtitle()\"\n [url]=\"previewUrl()\"\n [loading]=\"previewLoading()\"\n [error]=\"previewError()\"\n (closeRequested)=\"closeDocumentPreview()\"\n />\n </div>\n } @else {\n <div\n class=\"rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-5 text-sm text-(--rt-text-secondary) shadow-sm\"\n >\n Loading application summary...\n </div>\n }\n `,\n})\nexport class AgentApplyReviewPage {\n readonly facade = inject(AgentApplyFacade);\n private readonly onboardingDocumentService = inject(OnboardingDocumentService);\n readonly timelineOpen = signal(false);\n readonly previewOpen = signal(false);\n readonly previewLoading = signal(false);\n readonly previewError = signal<string | null>(null);\n readonly previewUrl = signal<string | null>(null);\n readonly previewTitle = signal<string | null>(null);\n readonly previewSubtitle = signal<string | null>(null);\n readonly previewDocumentId = signal<string | null>(null);\n private readonly router = inject(Router);\n private readonly route = inject(ActivatedRoute);\n\n readonly applicationItems = computed(() => {\n const detail = this.facade.detail();\n\n if (!detail) {\n return [];\n }\n\n return [\n { label: 'Applicant type', value: onboardingApplicantTypeLabel(detail.applicantType) },\n { label: 'Operating region', value: this.countryLabel(detail.companyCountry) },\n { label: 'Status', value: onboardingStatusLabel(detail.status) },\n ];\n });\n\n readonly profileItems = computed(() => {\n const detail = this.facade.detail();\n\n if (!detail) {\n return [];\n }\n\n return [\n { label: this.facade.isCompany() ? 'Company legal name' : 'Applicant name', value: this.primaryName(detail) },\n { label: this.facade.isCompany() ? 'Representative' : 'Primary contact', value: detail.contactName },\n { label: 'Primary email', value: detail.contactEmail },\n { label: 'Phone number', value: detail.contactPhone },\n { label: 'Country code', value: detail.countryCode },\n ];\n });\n\n readonly documentItems = computed<ReviewDocumentItem[]>(() => {\n const detail = this.facade.detail();\n\n if (!detail) {\n return [];\n }\n\n const requiredItems = this.facade.requiredDocuments().map((spec) => {\n const document = this.facade.getDocument(spec.type);\n\n return {\n label: spec.label,\n helper: spec.helperText ?? '',\n filename: document?.originalFilename ?? 'Missing',\n document,\n };\n });\n\n const requiredTypes = new Set(this.facade.requiredDocuments().map((spec) => spec.type));\n const additionalItems = detail.documents\n .filter((item) => !requiredTypes.has(item.documentType))\n .map((document) => ({\n label: `Additional: ${onboardingDocumentTypeLabel(document.documentType)}`,\n helper: 'Supporting document uploaded with the application.',\n filename: document.originalFilename,\n document,\n }));\n\n return [...requiredItems, ...additionalItems];\n });\n\n readonly financialItems = computed(() => {\n const detail = this.facade.detail();\n\n if (!detail) {\n return [];\n }\n\n return [\n { label: 'VAT mode', value: onboardingVatModeLabel(detail.vatMode ?? null) },\n {\n label: 'VAT number',\n value: detail.vatNumber || (detail.vatMode === 'MANUAL_REVIEW_REQUIRED' ? 'Manual review' : null),\n },\n { label: 'VAT rate', value: detail.applicantType === 'INDIVIDUAL' ? '0%' : '20%' },\n ];\n });\n\n readonly bankingItems = computed(() => {\n const detail = this.facade.detail();\n\n if (!detail) {\n return [];\n }\n\n return [\n { label: 'Bank name', value: detail.bankName },\n { label: 'Account holder', value: detail.accountHolderName },\n { label: 'Sort code', value: this.facade.formatSortCode(detail.sortCode) },\n { label: 'Account number', value: detail.accountNumber },\n ];\n });\n\n readonly showSubmitAction = computed(() => {\n const status = this.facade.status();\n return status === 'DRAFT' || status === 'IN_PROGRESS' || status === 'NEED_MORE_INFO' || status === null;\n });\n\n readonly submitLabel = computed(() =>\n this.facade.status() === 'NEED_MORE_INFO' ? 'Resubmit application' : 'Submit application',\n );\n\n async submit(): Promise<void> {\n const submitted = await this.facade.submit();\n\n if (!submitted) {\n return;\n }\n\n await this.router.navigate(['../result'], {\n relativeTo: this.route,\n });\n }\n\n async back(): Promise<void> {\n await this.router.navigate(['../form'], {\n relativeTo: this.route,\n });\n }\n\n async openResult(): Promise<void> {\n await this.router.navigate(['../result'], {\n relativeTo: this.route,\n });\n }\n\n openTimeline(): void {\n this.timelineOpen.set(true);\n }\n\n closeTimeline(): void {\n this.timelineOpen.set(false);\n }\n\n previewBusy(documentId: string): boolean {\n return this.previewLoading() && this.previewDocumentId() === documentId;\n }\n\n async openDocumentPreview(item: ReviewDocumentItem): Promise<void> {\n if (!item.document) {\n return;\n }\n\n this.previewOpen.set(true);\n this.previewLoading.set(true);\n this.previewError.set(null);\n this.previewUrl.set(null);\n this.previewTitle.set(item.label);\n this.previewSubtitle.set(item.document.originalFilename || null);\n this.previewDocumentId.set(item.document.id);\n\n try {\n const response = await firstValueFrom(this.onboardingDocumentService.getPreviewUrl(item.document.id));\n this.previewUrl.set(response.previewUrl);\n this.previewDocumentId.set(response.documentId);\n } catch (error) {\n this.previewError.set(this.toErrorMessage(error));\n } finally {\n this.previewLoading.set(false);\n }\n }\n\n closeDocumentPreview(): void {\n this.previewOpen.set(false);\n this.previewLoading.set(false);\n this.previewError.set(null);\n this.previewUrl.set(null);\n this.previewTitle.set(null);\n this.previewSubtitle.set(null);\n this.previewDocumentId.set(null);\n }\n\n private countryLabel(value: string | null | undefined): string {\n switch ((value ?? '').toUpperCase()) {\n case 'CN':\n return 'China';\n case 'UK':\n return 'United Kingdom';\n default:\n return value || '—';\n }\n }\n\n private primaryName(detail: OnboardingApplicationDetailResponse): string | null | undefined {\n return detail.applicantType === 'COMPANY' ? detail.organizationName : detail.contactName;\n }\n\n private toErrorMessage(error: unknown): string {\n if (error instanceof Error && error.message) {\n return error.message;\n }\n\n return 'Unable to load the document preview.';\n }\n}\n"],"names":[],"mappings":";;;;;;;MAsKa,oBAAoB,CAAA;AACtB,IAAA,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzB,IAAA,yBAAyB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACrE,IAAA,YAAY,GAAG,MAAM,CAAC,KAAK,wDAAC;AAC5B,IAAA,WAAW,GAAG,MAAM,CAAC,KAAK,uDAAC;AAC3B,IAAA,cAAc,GAAG,MAAM,CAAC,KAAK,0DAAC;AAC9B,IAAA,YAAY,GAAG,MAAM,CAAgB,IAAI,wDAAC;AAC1C,IAAA,UAAU,GAAG,MAAM,CAAgB,IAAI,sDAAC;AACxC,IAAA,YAAY,GAAG,MAAM,CAAgB,IAAI,wDAAC;AAC1C,IAAA,eAAe,GAAG,MAAM,CAAgB,IAAI,2DAAC;AAC7C,IAAA,iBAAiB,GAAG,MAAM,CA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BACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;AACxB,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HT,EAAA,CAAA;AACF,iBAAA;;;;;"}
|
|
@@ -19,61 +19,44 @@ class AgentApplyShellPage {
|
|
|
19
19
|
const parts = this.currentUrl().split('/').filter(Boolean);
|
|
20
20
|
const maybeStep = parts[parts.length - 1] ?? '';
|
|
21
21
|
switch (maybeStep) {
|
|
22
|
+
case 'form':
|
|
23
|
+
case 'review':
|
|
24
|
+
case 'result':
|
|
25
|
+
return maybeStep;
|
|
22
26
|
case 'profile':
|
|
23
27
|
case 'qualification':
|
|
24
28
|
case 'financial':
|
|
25
29
|
case 'banking':
|
|
26
|
-
|
|
30
|
+
return 'form';
|
|
27
31
|
case 'submitted':
|
|
28
|
-
return
|
|
32
|
+
return 'result';
|
|
29
33
|
default:
|
|
30
|
-
return '
|
|
34
|
+
return 'form';
|
|
31
35
|
}
|
|
32
36
|
}, ...(ngDevMode ? [{ debugName: "activeStep" }] : []));
|
|
33
37
|
steps = computed(() => {
|
|
34
38
|
const completion = this.facade.completion();
|
|
35
39
|
return [
|
|
36
40
|
{
|
|
37
|
-
label: '
|
|
38
|
-
step: '
|
|
39
|
-
link: ['
|
|
40
|
-
completed: completion.
|
|
41
|
-
accessible: this.facade.canAccessStep('
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
label: 'Qualification',
|
|
45
|
-
step: 'qualification',
|
|
46
|
-
link: ['qualification'],
|
|
47
|
-
completed: completion.qualification,
|
|
48
|
-
accessible: this.facade.canAccessStep('qualification'),
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
label: 'Financial',
|
|
52
|
-
step: 'financial',
|
|
53
|
-
link: ['financial'],
|
|
54
|
-
completed: completion.financial,
|
|
55
|
-
accessible: this.facade.canAccessStep('financial'),
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
label: 'Banking',
|
|
59
|
-
step: 'banking',
|
|
60
|
-
link: ['banking'],
|
|
61
|
-
completed: completion.banking,
|
|
62
|
-
accessible: this.facade.canAccessStep('banking'),
|
|
41
|
+
label: 'Application',
|
|
42
|
+
step: 'form',
|
|
43
|
+
link: ['form'],
|
|
44
|
+
completed: completion.form,
|
|
45
|
+
accessible: this.facade.canAccessStep('form'),
|
|
63
46
|
},
|
|
64
47
|
{
|
|
65
48
|
label: 'Review',
|
|
66
49
|
step: 'review',
|
|
67
50
|
link: ['review'],
|
|
68
|
-
completed: completion.
|
|
51
|
+
completed: completion.form,
|
|
69
52
|
accessible: this.facade.canAccessStep('review'),
|
|
70
53
|
},
|
|
71
54
|
{
|
|
72
|
-
label: '
|
|
73
|
-
step: '
|
|
74
|
-
link: ['
|
|
75
|
-
completed: this.facade.canAccessStep('
|
|
76
|
-
accessible: this.facade.canAccessStep('
|
|
55
|
+
label: 'Result',
|
|
56
|
+
step: 'result',
|
|
57
|
+
link: ['result'],
|
|
58
|
+
completed: this.facade.canAccessStep('result'),
|
|
59
|
+
accessible: this.facade.canAccessStep('result'),
|
|
77
60
|
},
|
|
78
61
|
];
|
|
79
62
|
}, ...(ngDevMode ? [{ debugName: "steps" }] : []));
|
|
@@ -90,7 +73,7 @@ class AgentApplyShellPage {
|
|
|
90
73
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: AgentApplyShellPage, isStandalone: true, selector: "rolatech-agent-apply-shell-page", host: { classAttribute: "block" }, ngImport: i0, template: `
|
|
91
74
|
<rolatech-onboarding-page-shell
|
|
92
75
|
title="PrimeCasa Agent Application"
|
|
93
|
-
subtitle="Complete
|
|
76
|
+
subtitle="Complete the onboarding form, review the submission package, and then send it for manual approval."
|
|
94
77
|
kicker="Public Apply"
|
|
95
78
|
>
|
|
96
79
|
<div header-actions>
|
|
@@ -100,7 +83,9 @@ class AgentApplyShellPage {
|
|
|
100
83
|
<rolatech-onboarding-step-nav [steps]="steps()" [activeStep]="activeStep()" />
|
|
101
84
|
|
|
102
85
|
@if (facade.error()) {
|
|
103
|
-
<div class="rounded-2xl border border-
|
|
86
|
+
<div class="rounded-2xl border border-(--rt-border-color) bg-(--rt-raised-background) px-4 py-3 text-sm text-rose-700">
|
|
87
|
+
{{ facade.error() }}
|
|
88
|
+
</div>
|
|
104
89
|
}
|
|
105
90
|
|
|
106
91
|
@if (!facade.detail() && facade.loading()) {
|
|
@@ -123,7 +108,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
123
108
|
template: `
|
|
124
109
|
<rolatech-onboarding-page-shell
|
|
125
110
|
title="PrimeCasa Agent Application"
|
|
126
|
-
subtitle="Complete
|
|
111
|
+
subtitle="Complete the onboarding form, review the submission package, and then send it for manual approval."
|
|
127
112
|
kicker="Public Apply"
|
|
128
113
|
>
|
|
129
114
|
<div header-actions>
|
|
@@ -133,7 +118,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
133
118
|
<rolatech-onboarding-step-nav [steps]="steps()" [activeStep]="activeStep()" />
|
|
134
119
|
|
|
135
120
|
@if (facade.error()) {
|
|
136
|
-
<div class="rounded-2xl border border-
|
|
121
|
+
<div class="rounded-2xl border border-(--rt-border-color) bg-(--rt-raised-background) px-4 py-3 text-sm text-rose-700">
|
|
122
|
+
{{ facade.error() }}
|
|
123
|
+
</div>
|
|
137
124
|
}
|
|
138
125
|
|
|
139
126
|
@if (!facade.detail() && facade.loading()) {
|
|
@@ -147,4 +134,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
147
134
|
}], ctorParameters: () => [] });
|
|
148
135
|
|
|
149
136
|
export { AgentApplyShellPage };
|
|
150
|
-
//# sourceMappingURL=rolatech-angular-onboarding-agent-apply-shell-page-
|
|
137
|
+
//# sourceMappingURL=rolatech-angular-onboarding-agent-apply-shell-page-CaTvnFzk.mjs.map
|