@rolatech/angular-onboarding 20.3.0-beta.2
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/README.md +55 -0
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-detail-page-DKJQX3cs.mjs +224 -0
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-detail-page-DKJQX3cs.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-index-page-BO4pC_NU.mjs +206 -0
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-index-page-BO4pC_NU.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-review-page-BERcLBeQ.mjs +419 -0
- package/fesm2022/rolatech-angular-onboarding-admin-onboarding-review-page-BERcLBeQ.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-banking-page-VYNfR4fy.mjs +133 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-banking-page-VYNfR4fy.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-financial-page-Ck3Rowke.mjs +132 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-financial-page-Ck3Rowke.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-profile-page-DNepDxHu.mjs +122 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-profile-page-DNepDxHu.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-qualification-page-CSwupuKt.mjs +108 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-qualification-page-CSwupuKt.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-review-page-DugCjfvK.mjs +182 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-review-page-DugCjfvK.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-shell-page-DibWYeD1.mjs +150 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-shell-page-DibWYeD1.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-start-page-DC7gyOnS.mjs +144 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-start-page-DC7gyOnS.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-submitted-page-BMkV2V8K.mjs +55 -0
- package/fesm2022/rolatech-angular-onboarding-agent-apply-submitted-page-BMkV2V8K.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-onboarding-documents-page-DWBGTj5J.mjs +99 -0
- package/fesm2022/rolatech-angular-onboarding-agent-onboarding-documents-page-DWBGTj5J.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-onboarding-issues-page-CSVgCJ7t.mjs +28 -0
- package/fesm2022/rolatech-angular-onboarding-agent-onboarding-issues-page-CSVgCJ7t.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-onboarding-overview-page-8sTSvFZ7.mjs +67 -0
- package/fesm2022/rolatech-angular-onboarding-agent-onboarding-overview-page-8sTSvFZ7.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding-agent-onboarding-shell-page-B6ffcJ5A.mjs +125 -0
- package/fesm2022/rolatech-angular-onboarding-agent-onboarding-shell-page-B6ffcJ5A.mjs.map +1 -0
- package/fesm2022/rolatech-angular-onboarding.mjs +1495 -0
- package/fesm2022/rolatech-angular-onboarding.mjs.map +1 -0
- package/package.json +35 -0
- package/types/rolatech-angular-onboarding.d.ts +244 -0
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import { ActivatedRoute, RouterLink } from '@angular/router';
|
|
7
|
+
import { onboardingDocumentTypeLabel, onboardingIssueTypeLabel } from '@rolatech/angular-services';
|
|
8
|
+
import { AdminOnboardingReviewFacade, OnboardingPageShell, OnboardingStatusBadge, OnboardingIssueList } from './rolatech-angular-onboarding.mjs';
|
|
9
|
+
|
|
10
|
+
class AdminOnboardingReviewPage {
|
|
11
|
+
facade = inject(AdminOnboardingReviewFacade);
|
|
12
|
+
fb = inject(FormBuilder);
|
|
13
|
+
route = inject(ActivatedRoute);
|
|
14
|
+
documentTypeLabel = onboardingDocumentTypeLabel;
|
|
15
|
+
issueTypeLabel = onboardingIssueTypeLabel;
|
|
16
|
+
documentTypes = [
|
|
17
|
+
'PASSPORT',
|
|
18
|
+
'CERTIFICATE_OF_INCORPORATION',
|
|
19
|
+
'INDUSTRY_CERTIFICATE',
|
|
20
|
+
'PROOF_OF_ADDRESS',
|
|
21
|
+
'BANK_STATEMENT',
|
|
22
|
+
'OTHER',
|
|
23
|
+
];
|
|
24
|
+
issueForm = this.fb.nonNullable.group({
|
|
25
|
+
fieldKey: ['', [Validators.required]],
|
|
26
|
+
documentType: ['PASSPORT', [Validators.required]],
|
|
27
|
+
comment: ['', [Validators.required]],
|
|
28
|
+
});
|
|
29
|
+
paramMap = toSignal(this.route.paramMap, {
|
|
30
|
+
initialValue: this.route.snapshot.paramMap,
|
|
31
|
+
});
|
|
32
|
+
constructor() {
|
|
33
|
+
effect(() => {
|
|
34
|
+
const applicationId = this.paramMap().get('applicationId');
|
|
35
|
+
if (!applicationId) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
void this.facade.load(applicationId);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
setComment(event) {
|
|
42
|
+
const target = event.target;
|
|
43
|
+
this.facade.setComment(target.value);
|
|
44
|
+
}
|
|
45
|
+
addFieldIssue() {
|
|
46
|
+
const value = this.issueForm.getRawValue();
|
|
47
|
+
if (!value.comment || !value.fieldKey) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.facade.addFieldIssue(value.fieldKey, value.comment);
|
|
51
|
+
}
|
|
52
|
+
addDocumentIssue() {
|
|
53
|
+
const value = this.issueForm.getRawValue();
|
|
54
|
+
if (!value.comment || !value.documentType) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
this.facade.addDocumentIssue(value.documentType, value.comment);
|
|
58
|
+
}
|
|
59
|
+
async startReview() {
|
|
60
|
+
const applicationId = this.paramMap().get('applicationId');
|
|
61
|
+
if (!applicationId) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
await this.facade.startReview(applicationId);
|
|
65
|
+
}
|
|
66
|
+
async needMoreInfo() {
|
|
67
|
+
const applicationId = this.paramMap().get('applicationId');
|
|
68
|
+
if (!applicationId) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
await this.facade.requestMoreInfo(applicationId);
|
|
72
|
+
}
|
|
73
|
+
async approve() {
|
|
74
|
+
const applicationId = this.paramMap().get('applicationId');
|
|
75
|
+
if (!applicationId) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
await this.facade.approve(applicationId);
|
|
79
|
+
}
|
|
80
|
+
async fail() {
|
|
81
|
+
const applicationId = this.paramMap().get('applicationId');
|
|
82
|
+
if (!applicationId) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
await this.facade.fail(applicationId);
|
|
86
|
+
}
|
|
87
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AdminOnboardingReviewPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
88
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: AdminOnboardingReviewPage, isStandalone: true, selector: "rolatech-admin-onboarding-review-page", host: { classAttribute: "block" }, providers: [AdminOnboardingReviewFacade], ngImport: i0, template: `
|
|
89
|
+
<rolatech-onboarding-page-shell
|
|
90
|
+
title="Onboarding Review Workspace"
|
|
91
|
+
subtitle="Create actionable review notes and make a final decision."
|
|
92
|
+
kicker="Admin Console"
|
|
93
|
+
>
|
|
94
|
+
<div header-leading>
|
|
95
|
+
<a
|
|
96
|
+
[routerLink]="['../']"
|
|
97
|
+
class="inline-flex items-center rounded-xl border border-(--rt-border-color) bg-(--rt-base-background) px-3 py-2 text-sm font-medium text-(--rt-text-secondary) transition hover:bg-(--rt-raised-background) cursor-pointer"
|
|
98
|
+
>
|
|
99
|
+
← Back
|
|
100
|
+
</a>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<div header-actions>
|
|
104
|
+
<rolatech-onboarding-status-badge [status]="facade.detail()?.status || null" />
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
@if (facade.error()) {
|
|
108
|
+
<div class="rounded-2xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700">{{ facade.error() }}</div>
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@if (facade.detail(); as detail) {
|
|
112
|
+
<section class="rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-6 shadow-sm">
|
|
113
|
+
<h2 class="text-lg font-semibold text-(--rt-text-primary)">{{ detail.organizationName || 'Organization' }}</h2>
|
|
114
|
+
<p class="mt-1 text-sm text-(--rt-text-secondary)">{{ detail.contactName }} • {{ detail.contactEmail }}</p>
|
|
115
|
+
|
|
116
|
+
<label class="mt-6 grid gap-2">
|
|
117
|
+
<span class="text-sm font-medium text-(--rt-text-secondary)">Review comment</span>
|
|
118
|
+
<textarea
|
|
119
|
+
class="min-h-28 rounded-xl border border-(--rt-border-color) px-3 py-2"
|
|
120
|
+
[value]="facade.reviewComment()"
|
|
121
|
+
(input)="setComment($event)"
|
|
122
|
+
placeholder="Add a review summary or final decision context..."
|
|
123
|
+
></textarea>
|
|
124
|
+
</label>
|
|
125
|
+
|
|
126
|
+
<form
|
|
127
|
+
[formGroup]="issueForm"
|
|
128
|
+
class="mt-6 grid gap-3 rounded-xl border border-(--rt-border-color) bg-(--rt-raised-background) p-4 md:grid-cols-3"
|
|
129
|
+
>
|
|
130
|
+
<label class="grid gap-1">
|
|
131
|
+
<span class="text-xs font-semibold uppercase tracking-wide text-(--rt-text-secondary)">Field key</span>
|
|
132
|
+
<input
|
|
133
|
+
formControlName="fieldKey"
|
|
134
|
+
class="h-10 rounded-lg border border-(--rt-border-color) px-3"
|
|
135
|
+
placeholder="financial.vatNumber"
|
|
136
|
+
/>
|
|
137
|
+
</label>
|
|
138
|
+
|
|
139
|
+
<label class="grid gap-1">
|
|
140
|
+
<span class="text-xs font-semibold uppercase tracking-wide text-(--rt-text-secondary)">Document type</span>
|
|
141
|
+
<select formControlName="documentType" class="h-10 rounded-lg border border-(--rt-border-color) px-3">
|
|
142
|
+
@for (type of documentTypes; track type) {
|
|
143
|
+
<option [value]="type">{{ documentTypeLabel(type) }}</option>
|
|
144
|
+
}
|
|
145
|
+
</select>
|
|
146
|
+
</label>
|
|
147
|
+
|
|
148
|
+
<label class="grid gap-1 md:col-span-3">
|
|
149
|
+
<span class="text-xs font-semibold uppercase tracking-wide text-(--rt-text-secondary)">Issue comment</span>
|
|
150
|
+
<input
|
|
151
|
+
formControlName="comment"
|
|
152
|
+
class="h-10 rounded-lg border border-(--rt-border-color) px-3"
|
|
153
|
+
placeholder="Describe what needs correction"
|
|
154
|
+
/>
|
|
155
|
+
</label>
|
|
156
|
+
|
|
157
|
+
<div class="md:col-span-3 flex flex-wrap gap-2">
|
|
158
|
+
<button
|
|
159
|
+
type="button"
|
|
160
|
+
class="rounded-lg border border-(--rt-border-color) px-3 py-2 text-sm font-medium text-(--rt-text-secondary) hover:bg-(--rt-base-background)"
|
|
161
|
+
(click)="addFieldIssue()"
|
|
162
|
+
>
|
|
163
|
+
Add Field Issue
|
|
164
|
+
</button>
|
|
165
|
+
<button
|
|
166
|
+
type="button"
|
|
167
|
+
class="rounded-lg border border-(--rt-border-color) px-3 py-2 text-sm font-medium text-(--rt-text-secondary) hover:bg-(--rt-base-background)"
|
|
168
|
+
(click)="addDocumentIssue()"
|
|
169
|
+
>
|
|
170
|
+
Add Document Issue
|
|
171
|
+
</button>
|
|
172
|
+
</div>
|
|
173
|
+
</form>
|
|
174
|
+
|
|
175
|
+
@if (facade.issueDrafts().length > 0) {
|
|
176
|
+
<section class="mt-6 space-y-3">
|
|
177
|
+
<h3 class="text-sm font-semibold uppercase tracking-wide text-(--rt-text-secondary)">Draft Issues</h3>
|
|
178
|
+
@for (item of facade.issueDrafts(); track $index) {
|
|
179
|
+
<article class="rounded-xl border border-(--rt-border-color) p-3">
|
|
180
|
+
<p class="text-xs font-semibold uppercase tracking-wide text-(--rt-text-secondary)">{{ issueTypeLabel(item.issueType) }}</p>
|
|
181
|
+
<p class="mt-1 text-sm text-(--rt-text-secondary)">
|
|
182
|
+
{{ item.fieldKey || documentTypeLabel(item.documentType || null) }}
|
|
183
|
+
</p>
|
|
184
|
+
<p class="mt-1 text-sm text-(--rt-text-primary)">{{ item.comment }}</p>
|
|
185
|
+
<button
|
|
186
|
+
type="button"
|
|
187
|
+
class="mt-2 text-xs font-semibold uppercase tracking-wide text-rose-700"
|
|
188
|
+
(click)="facade.removeIssue($index)"
|
|
189
|
+
>
|
|
190
|
+
Remove
|
|
191
|
+
</button>
|
|
192
|
+
</article>
|
|
193
|
+
}
|
|
194
|
+
</section>
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
<div class="mt-8 flex flex-wrap gap-3">
|
|
198
|
+
<button
|
|
199
|
+
type="button"
|
|
200
|
+
class="rounded-xl border border-(--rt-border-color) px-4 py-2 text-sm font-semibold text-(--rt-text-secondary) hover:bg-(--rt-raised-background)"
|
|
201
|
+
[disabled]="facade.saving()"
|
|
202
|
+
(click)="startReview()"
|
|
203
|
+
>
|
|
204
|
+
Start Review
|
|
205
|
+
</button>
|
|
206
|
+
|
|
207
|
+
<button
|
|
208
|
+
type="button"
|
|
209
|
+
class="rounded-xl border border-amber-300 bg-amber-50 px-4 py-2 text-sm font-semibold text-amber-800 hover:bg-amber-100"
|
|
210
|
+
[disabled]="facade.saving()"
|
|
211
|
+
(click)="needMoreInfo()"
|
|
212
|
+
>
|
|
213
|
+
Need More Info
|
|
214
|
+
</button>
|
|
215
|
+
|
|
216
|
+
<button
|
|
217
|
+
type="button"
|
|
218
|
+
class="rounded-xl border border-emerald-300 bg-emerald-50 px-4 py-2 text-sm font-semibold text-emerald-800 hover:bg-emerald-100"
|
|
219
|
+
[disabled]="facade.saving()"
|
|
220
|
+
(click)="approve()"
|
|
221
|
+
>
|
|
222
|
+
Approve
|
|
223
|
+
</button>
|
|
224
|
+
|
|
225
|
+
<button
|
|
226
|
+
type="button"
|
|
227
|
+
class="rounded-xl border border-rose-300 bg-rose-50 px-4 py-2 text-sm font-semibold text-rose-800 hover:bg-rose-100"
|
|
228
|
+
[disabled]="facade.saving()"
|
|
229
|
+
(click)="fail()"
|
|
230
|
+
>
|
|
231
|
+
Fail
|
|
232
|
+
</button>
|
|
233
|
+
</div>
|
|
234
|
+
</section>
|
|
235
|
+
|
|
236
|
+
<rolatech-onboarding-issue-list [issues]="detail.issues" />
|
|
237
|
+
} @else {
|
|
238
|
+
<div
|
|
239
|
+
class="rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-5 text-sm text-(--rt-text-secondary) shadow-sm"
|
|
240
|
+
>
|
|
241
|
+
Loading review workspace...
|
|
242
|
+
</div>
|
|
243
|
+
}
|
|
244
|
+
</rolatech-onboarding-page-shell>
|
|
245
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: OnboardingPageShell, selector: "rolatech-onboarding-page-shell", inputs: ["title", "subtitle", "kicker"] }, { kind: "component", type: OnboardingStatusBadge, selector: "rolatech-onboarding-status-badge", inputs: ["status"] }, { kind: "component", type: OnboardingIssueList, selector: "rolatech-onboarding-issue-list", inputs: ["issues"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
246
|
+
}
|
|
247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AdminOnboardingReviewPage, decorators: [{
|
|
248
|
+
type: Component,
|
|
249
|
+
args: [{
|
|
250
|
+
selector: 'rolatech-admin-onboarding-review-page',
|
|
251
|
+
standalone: true,
|
|
252
|
+
imports: [ReactiveFormsModule, RouterLink, OnboardingPageShell, OnboardingStatusBadge, OnboardingIssueList],
|
|
253
|
+
providers: [AdminOnboardingReviewFacade],
|
|
254
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
255
|
+
encapsulation: ViewEncapsulation.None,
|
|
256
|
+
host: { class: 'block' },
|
|
257
|
+
template: `
|
|
258
|
+
<rolatech-onboarding-page-shell
|
|
259
|
+
title="Onboarding Review Workspace"
|
|
260
|
+
subtitle="Create actionable review notes and make a final decision."
|
|
261
|
+
kicker="Admin Console"
|
|
262
|
+
>
|
|
263
|
+
<div header-leading>
|
|
264
|
+
<a
|
|
265
|
+
[routerLink]="['../']"
|
|
266
|
+
class="inline-flex items-center rounded-xl border border-(--rt-border-color) bg-(--rt-base-background) px-3 py-2 text-sm font-medium text-(--rt-text-secondary) transition hover:bg-(--rt-raised-background) cursor-pointer"
|
|
267
|
+
>
|
|
268
|
+
← Back
|
|
269
|
+
</a>
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
<div header-actions>
|
|
273
|
+
<rolatech-onboarding-status-badge [status]="facade.detail()?.status || null" />
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
@if (facade.error()) {
|
|
277
|
+
<div class="rounded-2xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700">{{ facade.error() }}</div>
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@if (facade.detail(); as detail) {
|
|
281
|
+
<section class="rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-6 shadow-sm">
|
|
282
|
+
<h2 class="text-lg font-semibold text-(--rt-text-primary)">{{ detail.organizationName || 'Organization' }}</h2>
|
|
283
|
+
<p class="mt-1 text-sm text-(--rt-text-secondary)">{{ detail.contactName }} • {{ detail.contactEmail }}</p>
|
|
284
|
+
|
|
285
|
+
<label class="mt-6 grid gap-2">
|
|
286
|
+
<span class="text-sm font-medium text-(--rt-text-secondary)">Review comment</span>
|
|
287
|
+
<textarea
|
|
288
|
+
class="min-h-28 rounded-xl border border-(--rt-border-color) px-3 py-2"
|
|
289
|
+
[value]="facade.reviewComment()"
|
|
290
|
+
(input)="setComment($event)"
|
|
291
|
+
placeholder="Add a review summary or final decision context..."
|
|
292
|
+
></textarea>
|
|
293
|
+
</label>
|
|
294
|
+
|
|
295
|
+
<form
|
|
296
|
+
[formGroup]="issueForm"
|
|
297
|
+
class="mt-6 grid gap-3 rounded-xl border border-(--rt-border-color) bg-(--rt-raised-background) p-4 md:grid-cols-3"
|
|
298
|
+
>
|
|
299
|
+
<label class="grid gap-1">
|
|
300
|
+
<span class="text-xs font-semibold uppercase tracking-wide text-(--rt-text-secondary)">Field key</span>
|
|
301
|
+
<input
|
|
302
|
+
formControlName="fieldKey"
|
|
303
|
+
class="h-10 rounded-lg border border-(--rt-border-color) px-3"
|
|
304
|
+
placeholder="financial.vatNumber"
|
|
305
|
+
/>
|
|
306
|
+
</label>
|
|
307
|
+
|
|
308
|
+
<label class="grid gap-1">
|
|
309
|
+
<span class="text-xs font-semibold uppercase tracking-wide text-(--rt-text-secondary)">Document type</span>
|
|
310
|
+
<select formControlName="documentType" class="h-10 rounded-lg border border-(--rt-border-color) px-3">
|
|
311
|
+
@for (type of documentTypes; track type) {
|
|
312
|
+
<option [value]="type">{{ documentTypeLabel(type) }}</option>
|
|
313
|
+
}
|
|
314
|
+
</select>
|
|
315
|
+
</label>
|
|
316
|
+
|
|
317
|
+
<label class="grid gap-1 md:col-span-3">
|
|
318
|
+
<span class="text-xs font-semibold uppercase tracking-wide text-(--rt-text-secondary)">Issue comment</span>
|
|
319
|
+
<input
|
|
320
|
+
formControlName="comment"
|
|
321
|
+
class="h-10 rounded-lg border border-(--rt-border-color) px-3"
|
|
322
|
+
placeholder="Describe what needs correction"
|
|
323
|
+
/>
|
|
324
|
+
</label>
|
|
325
|
+
|
|
326
|
+
<div class="md:col-span-3 flex flex-wrap gap-2">
|
|
327
|
+
<button
|
|
328
|
+
type="button"
|
|
329
|
+
class="rounded-lg border border-(--rt-border-color) px-3 py-2 text-sm font-medium text-(--rt-text-secondary) hover:bg-(--rt-base-background)"
|
|
330
|
+
(click)="addFieldIssue()"
|
|
331
|
+
>
|
|
332
|
+
Add Field Issue
|
|
333
|
+
</button>
|
|
334
|
+
<button
|
|
335
|
+
type="button"
|
|
336
|
+
class="rounded-lg border border-(--rt-border-color) px-3 py-2 text-sm font-medium text-(--rt-text-secondary) hover:bg-(--rt-base-background)"
|
|
337
|
+
(click)="addDocumentIssue()"
|
|
338
|
+
>
|
|
339
|
+
Add Document Issue
|
|
340
|
+
</button>
|
|
341
|
+
</div>
|
|
342
|
+
</form>
|
|
343
|
+
|
|
344
|
+
@if (facade.issueDrafts().length > 0) {
|
|
345
|
+
<section class="mt-6 space-y-3">
|
|
346
|
+
<h3 class="text-sm font-semibold uppercase tracking-wide text-(--rt-text-secondary)">Draft Issues</h3>
|
|
347
|
+
@for (item of facade.issueDrafts(); track $index) {
|
|
348
|
+
<article class="rounded-xl border border-(--rt-border-color) p-3">
|
|
349
|
+
<p class="text-xs font-semibold uppercase tracking-wide text-(--rt-text-secondary)">{{ issueTypeLabel(item.issueType) }}</p>
|
|
350
|
+
<p class="mt-1 text-sm text-(--rt-text-secondary)">
|
|
351
|
+
{{ item.fieldKey || documentTypeLabel(item.documentType || null) }}
|
|
352
|
+
</p>
|
|
353
|
+
<p class="mt-1 text-sm text-(--rt-text-primary)">{{ item.comment }}</p>
|
|
354
|
+
<button
|
|
355
|
+
type="button"
|
|
356
|
+
class="mt-2 text-xs font-semibold uppercase tracking-wide text-rose-700"
|
|
357
|
+
(click)="facade.removeIssue($index)"
|
|
358
|
+
>
|
|
359
|
+
Remove
|
|
360
|
+
</button>
|
|
361
|
+
</article>
|
|
362
|
+
}
|
|
363
|
+
</section>
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
<div class="mt-8 flex flex-wrap gap-3">
|
|
367
|
+
<button
|
|
368
|
+
type="button"
|
|
369
|
+
class="rounded-xl border border-(--rt-border-color) px-4 py-2 text-sm font-semibold text-(--rt-text-secondary) hover:bg-(--rt-raised-background)"
|
|
370
|
+
[disabled]="facade.saving()"
|
|
371
|
+
(click)="startReview()"
|
|
372
|
+
>
|
|
373
|
+
Start Review
|
|
374
|
+
</button>
|
|
375
|
+
|
|
376
|
+
<button
|
|
377
|
+
type="button"
|
|
378
|
+
class="rounded-xl border border-amber-300 bg-amber-50 px-4 py-2 text-sm font-semibold text-amber-800 hover:bg-amber-100"
|
|
379
|
+
[disabled]="facade.saving()"
|
|
380
|
+
(click)="needMoreInfo()"
|
|
381
|
+
>
|
|
382
|
+
Need More Info
|
|
383
|
+
</button>
|
|
384
|
+
|
|
385
|
+
<button
|
|
386
|
+
type="button"
|
|
387
|
+
class="rounded-xl border border-emerald-300 bg-emerald-50 px-4 py-2 text-sm font-semibold text-emerald-800 hover:bg-emerald-100"
|
|
388
|
+
[disabled]="facade.saving()"
|
|
389
|
+
(click)="approve()"
|
|
390
|
+
>
|
|
391
|
+
Approve
|
|
392
|
+
</button>
|
|
393
|
+
|
|
394
|
+
<button
|
|
395
|
+
type="button"
|
|
396
|
+
class="rounded-xl border border-rose-300 bg-rose-50 px-4 py-2 text-sm font-semibold text-rose-800 hover:bg-rose-100"
|
|
397
|
+
[disabled]="facade.saving()"
|
|
398
|
+
(click)="fail()"
|
|
399
|
+
>
|
|
400
|
+
Fail
|
|
401
|
+
</button>
|
|
402
|
+
</div>
|
|
403
|
+
</section>
|
|
404
|
+
|
|
405
|
+
<rolatech-onboarding-issue-list [issues]="detail.issues" />
|
|
406
|
+
} @else {
|
|
407
|
+
<div
|
|
408
|
+
class="rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-5 text-sm text-(--rt-text-secondary) shadow-sm"
|
|
409
|
+
>
|
|
410
|
+
Loading review workspace...
|
|
411
|
+
</div>
|
|
412
|
+
}
|
|
413
|
+
</rolatech-onboarding-page-shell>
|
|
414
|
+
`,
|
|
415
|
+
}]
|
|
416
|
+
}], ctorParameters: () => [] });
|
|
417
|
+
|
|
418
|
+
export { AdminOnboardingReviewPage };
|
|
419
|
+
//# sourceMappingURL=rolatech-angular-onboarding-admin-onboarding-review-page-BERcLBeQ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolatech-angular-onboarding-admin-onboarding-review-page-BERcLBeQ.mjs","sources":["../../../../packages/angular-onboarding/src/lib/pages/admin-onboarding/admin-onboarding-review-page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, effect, inject, ViewEncapsulation } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { ActivatedRoute, RouterLink } from '@angular/router';\nimport {\n onboardingDocumentTypeLabel,\n onboardingIssueTypeLabel,\n OnboardingDocumentType,\n} from '@rolatech/angular-services';\nimport { OnboardingIssueList } from '../../components/onboarding/onboarding-issue-list';\nimport { OnboardingPageShell } from '../../components/onboarding/onboarding-page-shell';\nimport { OnboardingStatusBadge } from '../../components/onboarding/onboarding-status-badge';\nimport { AdminOnboardingReviewFacade } from '../../store/admin-onboarding-review.facade';\n\n@Component({\n selector: 'rolatech-admin-onboarding-review-page',\n standalone: true,\n imports: [ReactiveFormsModule, RouterLink, OnboardingPageShell, OnboardingStatusBadge, OnboardingIssueList],\n providers: [AdminOnboardingReviewFacade],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'block' },\n template: `\n <rolatech-onboarding-page-shell\n title=\"Onboarding Review Workspace\"\n subtitle=\"Create actionable review notes and make a final decision.\"\n kicker=\"Admin Console\"\n >\n <div header-leading>\n <a\n [routerLink]=\"['../']\"\n class=\"inline-flex items-center rounded-xl border border-(--rt-border-color) bg-(--rt-base-background) px-3 py-2 text-sm font-medium text-(--rt-text-secondary) transition hover:bg-(--rt-raised-background) cursor-pointer\"\n >\n ← Back\n </a>\n </div>\n\n <div header-actions>\n <rolatech-onboarding-status-badge [status]=\"facade.detail()?.status || null\" />\n </div>\n\n @if (facade.error()) {\n <div class=\"rounded-2xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700\">{{ facade.error() }}</div>\n }\n\n @if (facade.detail(); as detail) {\n <section class=\"rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-6 shadow-sm\">\n <h2 class=\"text-lg font-semibold text-(--rt-text-primary)\">{{ detail.organizationName || 'Organization' }}</h2>\n <p class=\"mt-1 text-sm text-(--rt-text-secondary)\">{{ detail.contactName }} • {{ detail.contactEmail }}</p>\n\n <label class=\"mt-6 grid gap-2\">\n <span class=\"text-sm font-medium text-(--rt-text-secondary)\">Review comment</span>\n <textarea\n class=\"min-h-28 rounded-xl border border-(--rt-border-color) px-3 py-2\"\n [value]=\"facade.reviewComment()\"\n (input)=\"setComment($event)\"\n placeholder=\"Add a review summary or final decision context...\"\n ></textarea>\n </label>\n\n <form\n [formGroup]=\"issueForm\"\n class=\"mt-6 grid gap-3 rounded-xl border border-(--rt-border-color) bg-(--rt-raised-background) p-4 md:grid-cols-3\"\n >\n <label class=\"grid gap-1\">\n <span class=\"text-xs font-semibold uppercase tracking-wide text-(--rt-text-secondary)\">Field key</span>\n <input\n formControlName=\"fieldKey\"\n class=\"h-10 rounded-lg border border-(--rt-border-color) px-3\"\n placeholder=\"financial.vatNumber\"\n />\n </label>\n\n <label class=\"grid gap-1\">\n <span class=\"text-xs font-semibold uppercase tracking-wide text-(--rt-text-secondary)\">Document type</span>\n <select formControlName=\"documentType\" class=\"h-10 rounded-lg border border-(--rt-border-color) px-3\">\n @for (type of documentTypes; track type) {\n <option [value]=\"type\">{{ documentTypeLabel(type) }}</option>\n }\n </select>\n </label>\n\n <label class=\"grid gap-1 md:col-span-3\">\n <span class=\"text-xs font-semibold uppercase tracking-wide text-(--rt-text-secondary)\">Issue comment</span>\n <input\n formControlName=\"comment\"\n class=\"h-10 rounded-lg border border-(--rt-border-color) px-3\"\n placeholder=\"Describe what needs correction\"\n />\n </label>\n\n <div class=\"md:col-span-3 flex flex-wrap gap-2\">\n <button\n type=\"button\"\n class=\"rounded-lg border border-(--rt-border-color) px-3 py-2 text-sm font-medium text-(--rt-text-secondary) hover:bg-(--rt-base-background)\"\n (click)=\"addFieldIssue()\"\n >\n Add Field Issue\n </button>\n <button\n type=\"button\"\n class=\"rounded-lg border border-(--rt-border-color) px-3 py-2 text-sm font-medium text-(--rt-text-secondary) hover:bg-(--rt-base-background)\"\n (click)=\"addDocumentIssue()\"\n >\n Add Document Issue\n </button>\n </div>\n </form>\n\n @if (facade.issueDrafts().length > 0) {\n <section class=\"mt-6 space-y-3\">\n <h3 class=\"text-sm font-semibold uppercase tracking-wide text-(--rt-text-secondary)\">Draft Issues</h3>\n @for (item of facade.issueDrafts(); track $index) {\n <article class=\"rounded-xl border border-(--rt-border-color) p-3\">\n <p class=\"text-xs font-semibold uppercase tracking-wide text-(--rt-text-secondary)\">{{ issueTypeLabel(item.issueType) }}</p>\n <p class=\"mt-1 text-sm text-(--rt-text-secondary)\">\n {{ item.fieldKey || documentTypeLabel(item.documentType || null) }}\n </p>\n <p class=\"mt-1 text-sm text-(--rt-text-primary)\">{{ item.comment }}</p>\n <button\n type=\"button\"\n class=\"mt-2 text-xs font-semibold uppercase tracking-wide text-rose-700\"\n (click)=\"facade.removeIssue($index)\"\n >\n Remove\n </button>\n </article>\n }\n </section>\n }\n\n <div class=\"mt-8 flex flex-wrap gap-3\">\n <button\n type=\"button\"\n class=\"rounded-xl border border-(--rt-border-color) px-4 py-2 text-sm font-semibold text-(--rt-text-secondary) hover:bg-(--rt-raised-background)\"\n [disabled]=\"facade.saving()\"\n (click)=\"startReview()\"\n >\n Start Review\n </button>\n\n <button\n type=\"button\"\n class=\"rounded-xl border border-amber-300 bg-amber-50 px-4 py-2 text-sm font-semibold text-amber-800 hover:bg-amber-100\"\n [disabled]=\"facade.saving()\"\n (click)=\"needMoreInfo()\"\n >\n Need More Info\n </button>\n\n <button\n type=\"button\"\n class=\"rounded-xl border border-emerald-300 bg-emerald-50 px-4 py-2 text-sm font-semibold text-emerald-800 hover:bg-emerald-100\"\n [disabled]=\"facade.saving()\"\n (click)=\"approve()\"\n >\n Approve\n </button>\n\n <button\n type=\"button\"\n class=\"rounded-xl border border-rose-300 bg-rose-50 px-4 py-2 text-sm font-semibold text-rose-800 hover:bg-rose-100\"\n [disabled]=\"facade.saving()\"\n (click)=\"fail()\"\n >\n Fail\n </button>\n </div>\n </section>\n\n <rolatech-onboarding-issue-list [issues]=\"detail.issues\" />\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 review workspace...\n </div>\n }\n </rolatech-onboarding-page-shell>\n `,\n})\nexport class AdminOnboardingReviewPage {\n readonly facade = inject(AdminOnboardingReviewFacade);\n private readonly fb = inject(FormBuilder);\n private readonly route = inject(ActivatedRoute);\n readonly documentTypeLabel = onboardingDocumentTypeLabel;\n readonly issueTypeLabel = onboardingIssueTypeLabel;\n\n readonly documentTypes: OnboardingDocumentType[] = [\n 'PASSPORT',\n 'CERTIFICATE_OF_INCORPORATION',\n 'INDUSTRY_CERTIFICATE',\n 'PROOF_OF_ADDRESS',\n 'BANK_STATEMENT',\n 'OTHER',\n ];\n\n readonly issueForm = this.fb.nonNullable.group({\n fieldKey: ['', [Validators.required]],\n documentType: ['PASSPORT' as OnboardingDocumentType, [Validators.required]],\n comment: ['', [Validators.required]],\n });\n\n private readonly paramMap = toSignal(this.route.paramMap, {\n initialValue: this.route.snapshot.paramMap,\n });\n\n constructor() {\n effect(() => {\n const applicationId = this.paramMap().get('applicationId');\n\n if (!applicationId) {\n return;\n }\n\n void this.facade.load(applicationId);\n });\n }\n\n setComment(event: Event): void {\n const target = event.target as HTMLTextAreaElement;\n this.facade.setComment(target.value);\n }\n\n addFieldIssue(): void {\n const value = this.issueForm.getRawValue();\n\n if (!value.comment || !value.fieldKey) {\n return;\n }\n\n this.facade.addFieldIssue(value.fieldKey, value.comment);\n }\n\n addDocumentIssue(): void {\n const value = this.issueForm.getRawValue();\n\n if (!value.comment || !value.documentType) {\n return;\n }\n\n this.facade.addDocumentIssue(value.documentType, value.comment);\n }\n\n async startReview(): Promise<void> {\n const applicationId = this.paramMap().get('applicationId');\n\n if (!applicationId) {\n return;\n }\n\n await this.facade.startReview(applicationId);\n }\n\n async needMoreInfo(): Promise<void> {\n const applicationId = this.paramMap().get('applicationId');\n\n if (!applicationId) {\n return;\n }\n\n await this.facade.requestMoreInfo(applicationId);\n }\n\n async approve(): Promise<void> {\n const applicationId = this.paramMap().get('applicationId');\n\n if (!applicationId) {\n return;\n }\n\n await this.facade.approve(applicationId);\n }\n\n async fail(): Promise<void> {\n const applicationId = this.paramMap().get('applicationId');\n\n if (!applicationId) {\n return;\n }\n\n await this.facade.fail(applicationId);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;MAqLa,yBAAyB,CAAA;AAC3B,IAAA,MAAM,GAAG,MAAM,CAAC,2BAA2B,CAAC;AACpC,IAAA,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC;AACxB,IAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;IACtC,iBAAiB,GAAG,2BAA2B;IAC/C,cAAc,GAAG,wBAAwB;AAEzC,IAAA,aAAa,GAA6B;QACjD,UAAU;QACV,8BAA8B;QAC9B,sBAAsB;QACtB,kBAAkB;QAClB,gBAAgB;QAChB,OAAO;KACR;IAEQ,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;QAC7C,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACrC,YAAY,EAAE,CAAC,UAAoC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC3E,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACrC,KAAA,CAAC;IAEe,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;AACxD,QAAA,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ;AAC3C,KAAA,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6JT,EAAA,CAAA;AACF,iBAAA;;;;;"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
6
|
+
import { AgentApplyFacade } from './rolatech-angular-onboarding.mjs';
|
|
7
|
+
|
|
8
|
+
class AgentApplyBankingPage {
|
|
9
|
+
facade = inject(AgentApplyFacade);
|
|
10
|
+
router = inject(Router);
|
|
11
|
+
route = inject(ActivatedRoute);
|
|
12
|
+
async saveAndContinue() {
|
|
13
|
+
const saved = await this.facade.saveBanking();
|
|
14
|
+
if (!saved) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
await this.router.navigate(['../review'], {
|
|
18
|
+
relativeTo: this.route,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
async back() {
|
|
22
|
+
await this.router.navigate(['../financial'], {
|
|
23
|
+
relativeTo: this.route,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AgentApplyBankingPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: AgentApplyBankingPage, isStandalone: true, selector: "rolatech-agent-apply-banking-page", host: { classAttribute: "block" }, ngImport: i0, template: `
|
|
28
|
+
<form [formGroup]="facade.bankingForm" class="rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-6 shadow-sm">
|
|
29
|
+
<h2 class="text-lg font-semibold text-(--rt-text-primary)">Banking Details</h2>
|
|
30
|
+
|
|
31
|
+
<div class="mt-4 grid gap-4 md:grid-cols-2">
|
|
32
|
+
<label class="grid gap-2">
|
|
33
|
+
<span class="text-sm font-medium text-(--rt-text-secondary)">Bank name</span>
|
|
34
|
+
<input formControlName="bankName" class="h-11 rounded-xl border border-(--rt-border-color) px-3" />
|
|
35
|
+
</label>
|
|
36
|
+
|
|
37
|
+
<label class="grid gap-2">
|
|
38
|
+
<span class="text-sm font-medium text-(--rt-text-secondary)">Account holder name</span>
|
|
39
|
+
<input formControlName="accountHolderName" class="h-11 rounded-xl border border-(--rt-border-color) px-3" />
|
|
40
|
+
</label>
|
|
41
|
+
|
|
42
|
+
<label class="grid gap-2">
|
|
43
|
+
<span class="text-sm font-medium text-(--rt-text-secondary)">Sort code</span>
|
|
44
|
+
<input formControlName="sortCode" class="h-11 rounded-xl border border-(--rt-border-color) px-3" />
|
|
45
|
+
</label>
|
|
46
|
+
|
|
47
|
+
<label class="grid gap-2">
|
|
48
|
+
<span class="text-sm font-medium text-(--rt-text-secondary)">Account number</span>
|
|
49
|
+
<input formControlName="accountNumber" class="h-11 rounded-xl border border-(--rt-border-color) px-3" />
|
|
50
|
+
</label>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div class="mt-6 flex justify-between gap-3">
|
|
54
|
+
<button
|
|
55
|
+
type="button"
|
|
56
|
+
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)"
|
|
57
|
+
(click)="back()"
|
|
58
|
+
>
|
|
59
|
+
Back
|
|
60
|
+
</button>
|
|
61
|
+
|
|
62
|
+
<button
|
|
63
|
+
type="button"
|
|
64
|
+
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"
|
|
65
|
+
[disabled]="facade.saving()"
|
|
66
|
+
(click)="saveAndContinue()"
|
|
67
|
+
>
|
|
68
|
+
Save and Continue
|
|
69
|
+
</button>
|
|
70
|
+
</div>
|
|
71
|
+
</form>
|
|
72
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
73
|
+
}
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AgentApplyBankingPage, decorators: [{
|
|
75
|
+
type: Component,
|
|
76
|
+
args: [{
|
|
77
|
+
selector: 'rolatech-agent-apply-banking-page',
|
|
78
|
+
standalone: true,
|
|
79
|
+
imports: [ReactiveFormsModule],
|
|
80
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
81
|
+
encapsulation: ViewEncapsulation.None,
|
|
82
|
+
host: { class: 'block' },
|
|
83
|
+
template: `
|
|
84
|
+
<form [formGroup]="facade.bankingForm" class="rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-6 shadow-sm">
|
|
85
|
+
<h2 class="text-lg font-semibold text-(--rt-text-primary)">Banking Details</h2>
|
|
86
|
+
|
|
87
|
+
<div class="mt-4 grid gap-4 md:grid-cols-2">
|
|
88
|
+
<label class="grid gap-2">
|
|
89
|
+
<span class="text-sm font-medium text-(--rt-text-secondary)">Bank name</span>
|
|
90
|
+
<input formControlName="bankName" class="h-11 rounded-xl border border-(--rt-border-color) px-3" />
|
|
91
|
+
</label>
|
|
92
|
+
|
|
93
|
+
<label class="grid gap-2">
|
|
94
|
+
<span class="text-sm font-medium text-(--rt-text-secondary)">Account holder name</span>
|
|
95
|
+
<input formControlName="accountHolderName" class="h-11 rounded-xl border border-(--rt-border-color) px-3" />
|
|
96
|
+
</label>
|
|
97
|
+
|
|
98
|
+
<label class="grid gap-2">
|
|
99
|
+
<span class="text-sm font-medium text-(--rt-text-secondary)">Sort code</span>
|
|
100
|
+
<input formControlName="sortCode" class="h-11 rounded-xl border border-(--rt-border-color) px-3" />
|
|
101
|
+
</label>
|
|
102
|
+
|
|
103
|
+
<label class="grid gap-2">
|
|
104
|
+
<span class="text-sm font-medium text-(--rt-text-secondary)">Account number</span>
|
|
105
|
+
<input formControlName="accountNumber" class="h-11 rounded-xl border border-(--rt-border-color) px-3" />
|
|
106
|
+
</label>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<div class="mt-6 flex justify-between gap-3">
|
|
110
|
+
<button
|
|
111
|
+
type="button"
|
|
112
|
+
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)"
|
|
113
|
+
(click)="back()"
|
|
114
|
+
>
|
|
115
|
+
Back
|
|
116
|
+
</button>
|
|
117
|
+
|
|
118
|
+
<button
|
|
119
|
+
type="button"
|
|
120
|
+
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"
|
|
121
|
+
[disabled]="facade.saving()"
|
|
122
|
+
(click)="saveAndContinue()"
|
|
123
|
+
>
|
|
124
|
+
Save and Continue
|
|
125
|
+
</button>
|
|
126
|
+
</div>
|
|
127
|
+
</form>
|
|
128
|
+
`,
|
|
129
|
+
}]
|
|
130
|
+
}] });
|
|
131
|
+
|
|
132
|
+
export { AgentApplyBankingPage };
|
|
133
|
+
//# sourceMappingURL=rolatech-angular-onboarding-agent-apply-banking-page-VYNfR4fy.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolatech-angular-onboarding-agent-apply-banking-page-VYNfR4fy.mjs","sources":["../../../../packages/angular-onboarding/src/lib/pages/agent-apply/agent-apply-banking-page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { AgentApplyFacade } from '../../store/agent-apply.facade';\n\n@Component({\n selector: 'rolatech-agent-apply-banking-page',\n standalone: true,\n imports: [ReactiveFormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'block' },\n template: `\n <form [formGroup]=\"facade.bankingForm\" class=\"rounded-2xl border border-(--rt-border-color) bg-(--rt-base-background) p-6 shadow-sm\">\n <h2 class=\"text-lg font-semibold text-(--rt-text-primary)\">Banking Details</h2>\n\n <div class=\"mt-4 grid gap-4 md:grid-cols-2\">\n <label class=\"grid gap-2\">\n <span class=\"text-sm font-medium text-(--rt-text-secondary)\">Bank name</span>\n <input formControlName=\"bankName\" class=\"h-11 rounded-xl border border-(--rt-border-color) px-3\" />\n </label>\n\n <label class=\"grid gap-2\">\n <span class=\"text-sm font-medium text-(--rt-text-secondary)\">Account holder name</span>\n <input formControlName=\"accountHolderName\" class=\"h-11 rounded-xl border border-(--rt-border-color) px-3\" />\n </label>\n\n <label class=\"grid gap-2\">\n <span class=\"text-sm font-medium text-(--rt-text-secondary)\">Sort code</span>\n <input formControlName=\"sortCode\" class=\"h-11 rounded-xl border border-(--rt-border-color) px-3\" />\n </label>\n\n <label class=\"grid gap-2\">\n <span class=\"text-sm font-medium text-(--rt-text-secondary)\">Account number</span>\n <input formControlName=\"accountNumber\" class=\"h-11 rounded-xl border border-(--rt-border-color) px-3\" />\n </label>\n </div>\n\n <div class=\"mt-6 flex justify-between gap-3\">\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\n </button>\n\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.saving()\"\n (click)=\"saveAndContinue()\"\n >\n Save and Continue\n </button>\n </div>\n </form>\n `,\n})\nexport class AgentApplyBankingPage {\n readonly facade = inject(AgentApplyFacade);\n private readonly router = inject(Router);\n private readonly route = inject(ActivatedRoute);\n\n async saveAndContinue(): Promise<void> {\n const saved = await this.facade.saveBanking();\n\n if (!saved) {\n return;\n }\n\n await this.router.navigate(['../review'], {\n relativeTo: this.route,\n });\n }\n\n async back(): Promise<void> {\n await this.router.navigate(['../financial'], {\n relativeTo: this.route,\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;MA2Da,qBAAqB,CAAA;AACvB,IAAA,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzB,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAE/C,IAAA,MAAM,eAAe,GAAA;QACnB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;QAE7C,IAAI,CAAC,KAAK,EAAE;YACV;QACF;QAEA,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,EAAE;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