efd-placement.component.html

Pui Shan Lee, 03 January 2023 10:39 AM

Download (16.5 KB)

 
1
<div class="std-main-content-container">
2
  <div class="std-content-title">
3
    {{ 'e_fixed_deposit' | translate }}
4
    <nz-breadcrumb>
5
      <nz-breadcrumb-item>{{
6
        'e_fixed_deposit' | translate
7
      }}</nz-breadcrumb-item>
8
      <nz-breadcrumb-item>
9
        <a [routerLink]="['/side/EfdPlacementPage']">{{
10
          'place_fixed_deposit' | translate
11
        }}</a>
12
      </nz-breadcrumb-item>
13
    </nz-breadcrumb>
14
  </div>
15

    
16
  <nz-content class="std-content-container">
17
    <div class="top-desc">{{ 'fill_in_the_details' | translate }}</div>
18
    <div class="input-div" *ngIf="!chooseBankInterface">
19
      <form nz-form>
20
        <nz-form-item [nzGutter]="[8, 8]">
21
          <nz-form-label [nzSpan]="6" nzRequired>{{
22
            'fixed_deposit_promotion' | translate
23
          }}</nz-form-label>
24
          <nz-form-control [nzSpan]="10">
25
            <input
26
              id="fixedDepositPromotion"
27
              disabled
28
              placeholder="{{ 'fixed_deposit_promotion' | translate }}"
29
              [(ngModel)]="isFixedDepositPromotionStr"
30
              type="text"
31
              class="busconst-input"
32
              nz-input
33
              name="fixedDepositPromotion"
34
              [ngModelOptions]="{ standalone: true }"
35
            />
36
          </nz-form-control>
37
        </nz-form-item>
38

    
39
        <nz-form-item [nzGutter]="[8, 8]" class="transfer-from-bank-form-item">
40
          <nz-form-label [nzSpan]="6" nzRequired>{{
41
            'transfer_from_bank' | translate
42
          }}</nz-form-label>
43
          <nz-form-control [nzSpan]="10">
44
            <nz-select
45
              [(ngModel)]="chosenFromBankData"
46
              nzShowSearch
47
              nzAllowClear
48
              [nzLoading]="selectionDropdownDataLoading"
49
              nzPlaceHolder="{{ 'transfer_from_bank' | translate }}"
50
              (ngModelChange)="choseFromBankDropDown($event)"
51
              [ngModelOptions]="{ standalone: true }"
52
            >
53
              <nz-option-group nzLabel="{{ 'own_bank' | translate }}">
54
                <nz-option
55
                  [nzValue]="{ bank: defaultBank, ownBank: true, index: 0 }"
56
                  [nzLabel]="defaultBank.bankName"
57
                >
58
                </nz-option>
59
              </nz-option-group>
60
              <nz-option-group nzLabel="{{ 'others' | translate }}">
61
                <nz-option
62
                  *ngFor="
63
                    let bank of (efdPlacementList$ | async)[0]?.body?.fpxBankList;
64
                    let i = index
65
                  "
66
                
67
                  [nzValue]="{ bank: bank, ownBank: false, index: 0 }"
68
                  [nzLabel]="bank.bankName"
69
                ></nz-option>
70
              </nz-option-group>
71
            </nz-select>
72

    
73
            <!-- <label (click)="chooseBank()" *ngIf="isObjectEmpty(chosenFromBank)" nz-row
74
              class="item-vertical-center pointer-cursor label-box">
75
              <div class="please-select-txt">{{'please_select' | translate}}</div>
76
              <i nz-icon nzType="caret-down" nzTheme="outline"></i>
77
            </label>
78

79
            <label class="pointer-cursor label-box" (click)="chooseBank()" *ngIf="!isObjectEmpty(chosenFromBank)">
80
              {{chosenFromBank.bankName}}
81
            </label> -->
82
          </nz-form-control>
83
        </nz-form-item>
84

    
85
        <nz-form-item [nzGutter]="[8, 8]" *ngIf="isSelectedOwnBank">
86
          <nz-form-label [nzSpan]="6" nzRequired>{{
87
            'transfer_from_hlbb_hlisb_account' | translate
88
          }}</nz-form-label>
89
          <nz-form-control [nzSpan]="10">
90
            <nz-select
91
              [nzLoading]="selectionDropdownDataLoading"
92
              [(ngModel)]="fromAccountValue"
93
              nzPlaceHolder="{{
94
                'transfer_from_hlbb_hlisb_account' | translate
95
              }}"
96
              (ngModelChange)="selectFromAccount()"
97
              [ngModelOptions]="{ standalone: true }"
98
            >
99
              <nz-option
100
                nzCustomContent
101
                *ngFor="
102
                  let item of (efdPlacementList$ | async)[0]?.body?.obFromAccBean
103
                "
104
                [nzValue]="item"
105
                [nzLabel]="item.accountDescription"
106
              >
107
                {{ item.accountDescription }}
108
                ( {{ item.accountNumber }} )
109
              </nz-option>
110
            </nz-select>
111
          </nz-form-control>
112
        </nz-form-item>
113

    
114
        <nz-form-item [nzGutter]="[8, 8]">
115
          <nz-form-label [nzSpan]="6" nzRequired>{{
116
            'account_type' | translate
117
          }}</nz-form-label>
118
          <nz-form-control [nzSpan]="10">
119
            <nz-select
120
              [nzLoading]="selectionDropdownDataLoading"
121
              [nzDisabled]="accountTypeDisabled"
122
              [(ngModel)]="chosenAccountType"
123
              nzPlaceHolder="{{ 'account_type' | translate }}"
124
              (ngModelChange)="selectAccountType()"
125
              [ngModelOptions]="{ standalone: true }"
126
            >
127
              <nz-option
128
                *ngFor="
129
                  let item of arrayListEFDAccountTypeMultipleRecord
130
                "
131
                [nzValue]="item"
132
                [nzLabel]="item.efdAccountTypeLabel"
133
              >
134
              </nz-option>
135
            </nz-select>
136
          </nz-form-control>
137
        </nz-form-item>
138

    
139
        <nz-form-item [nzGutter]="[8, 8]" *ngIf="showToFDAccount">
140
          <nz-form-label [nzSpan]="6" nzRequired>{{
141
            'select_your_fd_account' | translate
142
          }}</nz-form-label>
143
          <nz-form-control [nzSpan]="10">
144
            <nz-select
145
              [nzLoading]="selectionDropdownDataLoading"
146
              [nzDisabled]="toFDAccountDisabled"
147
              *ngIf="isIslamicSelected"
148
              [(ngModel)]="toFDAccountValue"
149
              nzPlaceHolder="{{ 'select_your_fd_account' | translate }}"
150
              (ngModelChange)="selectFDAccount()"
151
              [ngModelOptions]="{ standalone: true }"
152
            >
153
              <nz-option
154
                nzCustomContent
155
                *ngFor="let item of listETDiToAccount"
156
                [nzValue]="item"
157
                [nzLabel]="item.accountDescription"
158
              >
159
                {{ item.accountDescription }}
160
                ({{ item.accountNumber }})
161
              </nz-option>
162
            </nz-select>
163

    
164
            <nz-select
165
              [nzLoading]="selectionDropdownDataLoading"
166
              [nzDisabled]="toFDAccountDisabled"
167
              *ngIf="!isIslamicSelected"
168
              [(ngModel)]="toFDAccountValue"
169
              nzPlaceHolder="{{ 'please_select' | translate }}"
170
              (ngModelChange)="selectFDAccount()"
171
              [ngModelOptions]="{ standalone: true }"
172
            >
173
              <nz-option
174
                nzCustomContent
175
                *ngFor="let item of listEFDToAccount; let i = index"
176
                [nzValue]="item"
177
                [nzLabel]="item.accountDescription"
178
              >
179
                {{ item.accountDescription }}
180
                ({{ item.accountNumber }})
181
              </nz-option>
182
            </nz-select>
183
          </nz-form-control>
184
        </nz-form-item>
185

    
186
        <nz-form-item [nzGutter]="[8, 8]" *ngIf="chosenAccountType">
187
          <nz-form-label [nzSpan]="6" nzRequired>{{
188
            'tenure' | translate
189
          }}</nz-form-label>
190
          <nz-form-control [nzSpan]="10">
191
            <nz-select
192
              [nzLoading]="selectionDropdownDataLoading"
193
              *ngIf="isIslamicSelected"
194
              [(ngModel)]="chosenTenure"
195
              [nzDisabled]="tenureDisabled"
196
              nzPlaceHolder="{{ 'tenure' | translate }}"
197
              (ngModelChange)="selectTenure()"
198
              [ngModelOptions]="{ standalone: true }"
199
            >
200
              <nz-option
201
                *ngFor="let item of arrayListETDiTenure"
202
                [nzValue]="item"
203
                [nzLabel]="item.monthLabel"
204
              >
205
              </nz-option>
206
            </nz-select>
207

    
208
            <nz-select
209
              [nzLoading]="selectionDropdownDataLoading"
210
              *ngIf="!isIslamicSelected"
211
              [(ngModel)]="chosenTenure"
212
              [nzDisabled]="tenureDisabled"
213
              nzPlaceHolder="{{ 'please_select' | translate }}"
214
              (ngModelChange)="selectTenure()"
215
              [ngModelOptions]="{ standalone: true }"
216
            >
217
              <nz-option
218
                *ngFor="let item of arrayListEFDTenure"
219
                [nzValue]="item"
220
                [nzLabel]="item.monthLabel"
221
              >
222
              </nz-option>
223
            </nz-select>
224
          </nz-form-control>
225
        </nz-form-item>
226

    
227
        <nz-form-item [nzGutter]="[8, 8]">
228
          <nz-form-label [nzSpan]="6" nzRequired
229
            >{{ 'rate' | translate }} (%)
230
            <div *ngIf="interestRateIsPromo" class="interest-rate-promo-tag">
231
              {{ 'promo' | translate }}!
232
            </div>
233
          </nz-form-label>
234
          <nz-form-control [nzSpan]="10">
235
            <input
236
              [disabled]="rateDisabled"
237
              id="interestRate"
238
              [(ngModel)]="interestRate"
239
              placeholder="{{ 'rate' | translate }} (%)"
240
              type="text"
241
              class="busconst-input"
242
              nz-input
243
              name="interestRate"
244
              [ngModelOptions]="{ standalone: true }"
245
            />
246
          </nz-form-control>
247
        </nz-form-item>
248

    
249
        <nz-form-item [nzGutter]="[8, 8]">
250
          <nz-form-label [nzSpan]="6" nzRequired>{{
251
            'principal_amount' | translate
252
          }}</nz-form-label>
253
          <nz-form-control [nzSpan]="10">
254
            <input
255
              id="principalAmt"
256
              placeholder="{{ 'principal_amount' | translate }}"
257
              [(ngModel)]="principalAmt"
258
              type="number"
259
              class="busconst-input"
260
              nz-input
261
              name="principalAmt"
262
              [ngModelOptions]="{ standalone: true }"
263
            />
264
          </nz-form-control>
265
        </nz-form-item>
266

    
267
        <nz-form-item [nzGutter]="[8, 8]">
268
          <div
269
            nz-col
270
            [nzSpan]="24"
271
            class="principal-amt-reminder item-horizontal-center"
272
          >
273
            {{
274
              'principal_amount_reminder'
275
                | translate
276
                  : { minPlacement: minPlacement, maxPlacement: maxPlacement }
277
            }}
278
          </div>
279
        </nz-form-item>
280

    
281
        <nz-form-item [nzGutter]="[8, 8]">
282
          <nz-form-label [nzSpan]="6" nzRequired>{{
283
            'auto_dash_renewal' | translate
284
          }}</nz-form-label>
285
          <!-- <nz-form-control [nzSpan]="10" > -->
286
          <!-- <label nz-col>
287
            <img [class.disabled]="disabledAutoRenewal" class="green-checkbox" (click)="changeAutoRenewal()"
288
              src="assets/img/checkedbox.png" *ngIf="autoRenewValue.toUpperCase() == 'Y'">
289
            <div [class.disabled]="disabledAutoRenewal" nz-col (click)="changeAutoRenewal()"
290
              *ngIf="autoRenewValue.toUpperCase() == 'N'" class="empty-checkbox">
291
            </div>
292
          </label> -->
293
          <nz-form-control [nzSpan]="10">
294
            <input
295
              id="autoRenewal"
296
              [disabled]="disabledAutoRenewal"
297
              placeholder="{{ 'auto_dash_renewal' | translate }}"
298
              [(ngModel)]="autoRenewValue"
299
              type="text"
300
              class="busconst-input"
301
              nz-input
302
              name="autoRenewal"
303
              [ngModelOptions]="{ standalone: true }"
304
            />
305
          </nz-form-control>
306
          <!-- </nz-form-control> -->
307
        </nz-form-item>
308

    
309
        <nz-form-item [nzGutter]="[8, 8]">
310
          <nz-form-label [nzSpan]="6" nzRequired>{{
311
            'interest_crediting_option' | translate
312
          }}</nz-form-label>
313
          <nz-form-control [nzSpan]="10">
314
            <nz-select
315
              [nzLoading]="selectionDropdownDataLoading"
316
              [nzDisabled]="disabledCreditToAccount"
317
              [(ngModel)]="interestCreditOption"
318
              nzPlaceHolder="{{ 'interest_crediting_option' | translate }}"
319
              (ngModelChange)="selectInterestCreditOption()"
320
              [ngModelOptions]="{ standalone: true }"
321
            >
322
              <nz-option
323
                *ngFor="
324
                  let item of (efdPlacementList$ | async)[0]?.body?.maturityInstrList;
325
                  let i = index
326
                "
327
                [nzValue]="item"
328
                [nzLabel]="item.maturityLabel"
329
              >
330
              </nz-option>
331
            </nz-select>
332
          </nz-form-control>
333
        </nz-form-item>
334

    
335
        <nz-form-item [nzGutter]="[8, 8]" *ngIf="!isSelectedOwnBank">
336
          <nz-form-label [nzSpan]="6" nzRequired>{{
337
            'transfer_to_account' | translate
338
          }}</nz-form-label>
339
          <nz-form-control [nzSpan]="10">
340
            <nz-select
341
              [nzLoading]="selectionDropdownDataLoading"
342
              nzCustomContent
343
              [(ngModel)]="toAccountValue"
344
              nzPlaceHolder="{{ 'transfer_to_account' | translate }}"
345
              (ngModelChange)="selectToAccount()"
346
              [ngModelOptions]="{ standalone: true }"
347
            >
348
              <nz-option
349
                nzCustomContent
350
                *ngFor="
351
                  let item of (efdPlacementList$ | async)[0]?.body?.obFromAccBean;
352
                  let i = index
353
                "
354
                [nzValue]="item"
355
                [nzLabel]="item.accountDescription"
356
              >
357
                {{ item.accountDescription }}
358
                ( {{ item.accountNumber }} )
359
              </nz-option>
360
            </nz-select>
361
          </nz-form-control>
362
        </nz-form-item>
363

    
364
        <nz-form-item [nzGutter]="[8, 8]">
365
          <nz-form-label [nzSpan]="6" nzRequired>{{
366
            'email_address' | translate
367
          }}</nz-form-label>
368
          <nz-form-control
369
            [nzSpan]="10"
370
            [nzExtra]="'email_notification_reminder' | translate"
371
          >
372
            <input
373
              id="emailId"
374
              type="email"
375
              class="busconst-input"
376
              nz-input
377
              name="emailId"
378
              placeholder="{{ 'email_address' | translate }}"
379
              [ngModelOptions]="{ standalone: true }"
380
              [(ngModel)]="emailId"
381
            />
382
          
383
          </nz-form-control>
384
        </nz-form-item>
385

    
386
        <!-- <nz-form-item [nzGutter]="[8,8]">
387
          <label nz-col [nzSpan]="16" class="text-center email-reminder">
388
            * {{'email_notification_reminder' | translate}}
389
          </label>
390
        </nz-form-item> -->
391
      </form>
392

    
393
      <div class="footer-container">
394
        <button
395
          (click)="next()"
396
          nz-button
397
          [nzLoading]="submitBtnLoading"
398
          class="next-button"
399
          *ngIf="!chooseBankInterface"
400
        >
401
          {{ 'next' | translate }}
402
        </button>
403
      </div>
404
    </div>
405

    
406
    <!-- Bank List (After click From Account) -->
407
    <div
408
      class="search-bank-container"
409
      *ngIf="chooseBankInterface"
410
      nz-col
411
      [nzSpan]="20"
412
    >
413
      <div class="instruction">
414
        {{ 'select_bank_you_like_to_transfer_from' | translate }}
415
      </div>
416

    
417
      <div class="search-bank-div">
418
        <nz-input-group [nzSuffix]="suffixIconSearch">
419
          <input
420
            type="text"
421
            nz-input
422
            placeholder="{{ 'search' | translate }}"
423
            [(ngModel)]="searchedBankValue"
424
            (ngModelChange)="searchedBankValueChange()"
425
          />
426
        </nz-input-group>
427
        <ng-template #suffixIconSearch>
428
          <i nz-icon nzType="search"></i>
429
        </ng-template>
430
      </div>
431

    
432
      <div class="default-bank">
433
        <div nz-row (click)="selectOwnBank(defaultBank)">
434
          <div class="char-div pointer-cursor">
435
            {{ defaultBank.bankLetter }}
436
          </div>
437
          <div class="bank-name pointer-cursor">{{ defaultBank.bankName }}</div>
438
        </div>
439
      </div>
440

    
441
      <div class="bank-content-list">
442
        <nz-list nzGrid>
443
          <div nz-row [nzGutter]="16">
444
            <div
445
              nz-col
446
              [nzSpan]="24"
447
              *ngFor="
448
                let group of (efdPlacementList$ | async)?.fpxBankList
449
                  | filter: searchedBankValue;
450
                let bankIndex = index
451
              "
452
            >
453
              <nz-list-item>
454
                <nz-card [nzTitle]="group.bankName[0]">
455
                  <div nz-row (click)="choseBank(group, bankIndex)">
456
                    <div class="char-div pointer-cursor">
457
                      {{ group.bankName[0] }}
458
                    </div>
459
                    <div class="bank-name pointer-cursor">
460
                      {{ group.bankName }}
461
                    </div>
462
                  </div>
463
                </nz-card>
464
              </nz-list-item>
465
            </div>
466
          </div>
467
        </nz-list>
468
      </div>
469
    </div>
470
  </nz-content>
471
</div>