b2adminui 1.0.2 → 1.0.4
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/package.json +1 -1
- package/src/app/customer-management/customer-registration/components/customer-registration.component.ts +33 -5
- package/src/app/customer-management/customer-registration/customer-registration.component.html +35 -6
- package/src/app/customer-management/customer-registration/models/wallet-registration.model.ts +7 -0
- package/src/app/customer-management/customer-registration-list/customer-registration-list.component.html +7 -3
- package/src/app/customer-management/customer-registration-list/models/wallet-list.model.ts +5 -3
- package/src/app/shared/common/common.ts +30 -19
package/package.json
CHANGED
|
@@ -6,9 +6,9 @@ import { Constants } from '../../../shared/constants/constants';
|
|
|
6
6
|
import { WalletRegistrationModel, ContactModel, CustomerModel, WalletModel, MailingAddressModel, CompanyAddressModel, CardModel, AttachFileModel, AttachFileListModel, DownloadFileModel, AddWalletAuditLogModel } from '../models/index';
|
|
7
7
|
import { Alerts } from '../../../shared/alerts/alerts';
|
|
8
8
|
import { AuditLogInsertModel } from '../../../models/audit-log-insert.model';
|
|
9
|
-
import { AddCardAuditLogMoel, AddWalletModel, CustomerDipChipModel, UpdateStatus } from "../models/wallet-registration.model";
|
|
9
|
+
import { AddCardAuditLogMoel, AddWalletModel, BankLinkAccountModel, CustomerDipChipModel, UpdateStatus } from "../models/wallet-registration.model";
|
|
10
10
|
import { CustomerPersonalDetailsComponent } from '../../customer-personal-details/components/customer-personal-details.component';
|
|
11
|
-
import { CompanyModel } from '../../../fee-management/company/models';
|
|
11
|
+
import { CompanyModel } from '../../../fee-management/company/models';
|
|
12
12
|
|
|
13
13
|
@Component({
|
|
14
14
|
selector: 'customer-registration',
|
|
@@ -96,9 +96,10 @@ export class CustomerRegistrationComponent implements OnInit, AfterViewInit {
|
|
|
96
96
|
public displayKycValidation: Boolean = false;
|
|
97
97
|
public walletStatusDisabled: boolean = false;
|
|
98
98
|
private disableWalletProfile: Boolean = false;
|
|
99
|
-
private showApprovalIcon: boolean = false;
|
|
99
|
+
private showApprovalIcon: boolean = false;
|
|
100
100
|
private autoApprove: boolean = true;
|
|
101
101
|
private companyModel: CompanyModel;
|
|
102
|
+
public BankAccountNumber: string;
|
|
102
103
|
|
|
103
104
|
constructor(public sharedService: SharedService, public common: Common,
|
|
104
105
|
private router: Router, private route: ActivatedRoute, private alert: Alerts,
|
|
@@ -130,6 +131,7 @@ export class CustomerRegistrationComponent implements OnInit, AfterViewInit {
|
|
|
130
131
|
this.actualObject.MailingAddress = new MailingAddressModel();
|
|
131
132
|
this.actualObject.CompanyAddress = new CompanyAddressModel();
|
|
132
133
|
this.actualObject.AttachFileListModel = new AttachFileListModel();
|
|
134
|
+
this.actualObject.BankLinkAccount = new BankLinkAccountModel();
|
|
133
135
|
this.sharedService.disableButton = false;
|
|
134
136
|
this.addWalletModel = new AddWalletModel();
|
|
135
137
|
this.addWalletAuditLogModel = new AddWalletAuditLogModel();
|
|
@@ -146,7 +148,7 @@ export class CustomerRegistrationComponent implements OnInit, AfterViewInit {
|
|
|
146
148
|
this.dateFormat = Constants.DATE_FORMAT;
|
|
147
149
|
this.todayDate = new Date();
|
|
148
150
|
this.showApprovalIcon = this.sharedService.CanChecker();
|
|
149
|
-
|
|
151
|
+
|
|
150
152
|
// get page name and wallet Id from url
|
|
151
153
|
let urlSegment = this.route.snapshot.url[0];
|
|
152
154
|
if (urlSegment) {
|
|
@@ -513,7 +515,7 @@ export class CustomerRegistrationComponent implements OnInit, AfterViewInit {
|
|
|
513
515
|
this.duplicateMobileModal.open();
|
|
514
516
|
this.confirmMessage = response.responseDescription;
|
|
515
517
|
}
|
|
516
|
-
else
|
|
518
|
+
else if (requestType == Constants.POST_REQUEST) {
|
|
517
519
|
this.alert.error(response.responseDescription);
|
|
518
520
|
}
|
|
519
521
|
break;
|
|
@@ -563,6 +565,7 @@ export class CustomerRegistrationComponent implements OnInit, AfterViewInit {
|
|
|
563
565
|
case Constants.GET_REQUEST:
|
|
564
566
|
if (response && response.Wallet) {
|
|
565
567
|
this.walletRegistrationModel.Wallet = response.Wallet;
|
|
568
|
+
this.walletRegistrationModel.BankLinkAccount = response.Wallet;
|
|
566
569
|
this.isWalletPresent = true;
|
|
567
570
|
|
|
568
571
|
if (this.common.getCompanyId() != Constants.COMPANY_ID_2C2P && this.walletRegistrationModel.Wallet.WalletTypeId == 2) {
|
|
@@ -664,6 +667,10 @@ export class CustomerRegistrationComponent implements OnInit, AfterViewInit {
|
|
|
664
667
|
this.walletId = ` ${this.common.maskString(6, 4, this.walletRegistrationModel.Wallet.WalletId.toString(), Constants.ASTERISK_SYMBOL)}`;
|
|
665
668
|
}
|
|
666
669
|
|
|
670
|
+
if (this.walletRegistrationModel.BankLinkAccount.BankAccountNumber) {
|
|
671
|
+
this.BankAccountNumber = ` ${this.common.maskStringBank(this.walletRegistrationModel.BankLinkAccount.BankAccountNumber.toString(), Constants.ASTERISK_SYMBOL)}`;
|
|
672
|
+
}
|
|
673
|
+
|
|
667
674
|
this.custPersonalDetailsComp.afterDataLoad();
|
|
668
675
|
|
|
669
676
|
if (this.walletRegistrationModel.Contact.StateId > 0) {
|
|
@@ -903,6 +910,9 @@ export class CustomerRegistrationComponent implements OnInit, AfterViewInit {
|
|
|
903
910
|
if (this.actualObject.Wallet.WalletId)
|
|
904
911
|
Description += `${this.actualObject.Wallet.WalletId} `
|
|
905
912
|
|
|
913
|
+
if (this.actualObject.BankLinkAccount.BankAccountNumber)
|
|
914
|
+
Description += `${this.actualObject.BankLinkAccount.BankAccountNumber} `
|
|
915
|
+
|
|
906
916
|
return Description;
|
|
907
917
|
}
|
|
908
918
|
|
|
@@ -951,6 +961,12 @@ export class CustomerRegistrationComponent implements OnInit, AfterViewInit {
|
|
|
951
961
|
description += ` ${this.common.maskString(6, 4, walletId, Constants.ASTERISK_SYMBOL)}`;
|
|
952
962
|
}
|
|
953
963
|
|
|
964
|
+
if (this.walletRegistrationModel.BankLinkAccount.BankAccountNumber) {
|
|
965
|
+
let bankaccountnumber = this.walletRegistrationModel.BankLinkAccount.BankAccountNumber ? this.walletRegistrationModel.BankLinkAccount.BankAccountNumber.toString() : '';
|
|
966
|
+
|
|
967
|
+
description += ` ${this.common.maskStringBank(bankaccountnumber, Constants.ASTERISK_SYMBOL)}`;
|
|
968
|
+
}
|
|
969
|
+
|
|
954
970
|
return description;
|
|
955
971
|
}
|
|
956
972
|
|
|
@@ -1260,6 +1276,18 @@ export class CustomerRegistrationComponent implements OnInit, AfterViewInit {
|
|
|
1260
1276
|
this.alert.error(this.common.permissionMessage);
|
|
1261
1277
|
}
|
|
1262
1278
|
}
|
|
1279
|
+
public getFullBankAccount() {
|
|
1280
|
+
if (!this.walletRegistrationModel.BankLinkAccount.BankAccountNumber) {
|
|
1281
|
+
return;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
if (this.fullPanRights) {
|
|
1285
|
+
this.walletId = this.walletRegistrationModel.BankLinkAccount.BankAccountNumber.toString();
|
|
1286
|
+
}
|
|
1287
|
+
else {
|
|
1288
|
+
this.alert.error(this.common.permissionMessage);
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1263
1291
|
|
|
1264
1292
|
public getDistrictList(stateChanged?: boolean) {
|
|
1265
1293
|
if (stateChanged) {
|
package/src/app/customer-management/customer-registration/customer-registration.component.html
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
<input [disabled]="pageName == 'view'"
|
|
52
52
|
(keypress)="common.onlyNumberKey($event)" maxlength="50" type="text"
|
|
53
53
|
class="form-control" placeholder="Mobile Number" name="telNumber"
|
|
54
|
-
#telNumber="ngModel"
|
|
54
|
+
#telNumber="ngModel"
|
|
55
55
|
[(ngModel)]="walletRegistrationModel.Contact.MobileNo"
|
|
56
56
|
[required]="walletRegistrationModel.Customer.CustomerTypeId == 1 &&
|
|
57
57
|
custPersonalDetailsComp.kycVerificationRequired &&
|
|
@@ -79,11 +79,10 @@
|
|
|
79
79
|
</label>
|
|
80
80
|
<div class="col-sm-6">
|
|
81
81
|
<input type="text" [disabled]="pageName == 'view'" name="email"
|
|
82
|
-
#email="ngModel" placeholder="Email Address" maxlength="50"
|
|
82
|
+
#email="ngModel" placeholder="Email Address" maxlength="50"
|
|
83
83
|
[(ngModel)]="walletRegistrationModel.Contact.Email" class="form-control"
|
|
84
84
|
pattern="^\w+([\.-]?\w+[+0-9]?)*@\w+([\.-]?\w+)*(\.\w{2,3})+$"
|
|
85
|
-
[title]="walletRegistrationModel.Contact.Email"
|
|
86
|
-
[required]="(!walletRegistrationModel.Contact.Email ||
|
|
85
|
+
[title]="walletRegistrationModel.Contact.Email" [required]="(!walletRegistrationModel.Contact.Email ||
|
|
87
86
|
(walletRegistrationModel.Contact.Email && !walletRegistrationModel.Contact.Email.trim())) &&
|
|
88
87
|
((walletRegistrationModel.Customer.CustomerTypeId === 2) ||
|
|
89
88
|
(walletRegistrationModel.Customer.CustomerTypeId == 1 &&
|
|
@@ -823,11 +822,28 @@
|
|
|
823
822
|
[disabled]="pageName == 'view' || is2C2PAdmin == false"
|
|
824
823
|
[data]="walletTypeListData" [filterable]="true"
|
|
825
824
|
[textField]="'walletType'" [valueField]="'walletTypeId'"
|
|
826
|
-
(filterChange)="walletTypesSearchFilter($event)"
|
|
825
|
+
(filterChange)="walletTypesSearchFilter($event)"
|
|
826
|
+
[valuePrimitive]="true">
|
|
827
827
|
</kendo-dropdownlist>
|
|
828
828
|
</div>
|
|
829
829
|
</div>
|
|
830
830
|
</div>
|
|
831
|
+
|
|
832
|
+
<div class="row">
|
|
833
|
+
<div class="form-group">
|
|
834
|
+
<label class="col-md-4 control-label">Bank Account Number
|
|
835
|
+
<span>:</span>
|
|
836
|
+
</label>
|
|
837
|
+
<div class="col-md-4 control-label text-left">
|
|
838
|
+
{{ BankAccountNumber }}
|
|
839
|
+
</div>
|
|
840
|
+
<div class="col-md-4 m-l-none p-l-none">
|
|
841
|
+
<a (click)="getFullBankAccount()">
|
|
842
|
+
<i class="fa fa-eye eye-icon-style col-md-3"></i>
|
|
843
|
+
</a>
|
|
844
|
+
</div>
|
|
845
|
+
</div>
|
|
846
|
+
</div>
|
|
831
847
|
</div>
|
|
832
848
|
|
|
833
849
|
<div class="col-md-6">
|
|
@@ -896,6 +912,19 @@
|
|
|
896
912
|
</a>
|
|
897
913
|
</div>
|
|
898
914
|
</div>
|
|
915
|
+
|
|
916
|
+
<div class="row">
|
|
917
|
+
<div class="form-group">
|
|
918
|
+
<label class="col-md-4 control-label">Bank Link Status
|
|
919
|
+
<span>:</span>
|
|
920
|
+
</label>
|
|
921
|
+
<div class="col-md-4 control-label text-left">
|
|
922
|
+
Link or Unlink
|
|
923
|
+
<span class="m-l-sm">{{ walletRegistrationModel.Wallet.CurrencyCode
|
|
924
|
+
}}</span>
|
|
925
|
+
</div>
|
|
926
|
+
</div>
|
|
927
|
+
</div>
|
|
899
928
|
</div>
|
|
900
929
|
</div>
|
|
901
930
|
|
|
@@ -1002,7 +1031,7 @@
|
|
|
1002
1031
|
class="btn btn-primary m-l-md">Cancel</button>
|
|
1003
1032
|
</div>
|
|
1004
1033
|
<div class="col-sm-12 text-center" *ngIf="pageName =='view'">
|
|
1005
|
-
|
|
1034
|
+
<button type="button" [disabled]="disableEdit" (click)="onEditClick()"
|
|
1006
1035
|
class="btn btn-primary m-l-md">Edit</button>
|
|
1007
1036
|
<!-- <button type="button" *ngIf="!isUserTerminated" (click)="resetPassCode()"
|
|
1008
1037
|
class="m-l-md btn btn-primary">Reset Passcode
|
package/src/app/customer-management/customer-registration/models/wallet-registration.model.ts
CHANGED
|
@@ -14,6 +14,7 @@ export class WalletRegistrationModel {
|
|
|
14
14
|
public FileName2: string;
|
|
15
15
|
public CustomerDipChip: CustomerDipChipModel;
|
|
16
16
|
public RiskLevel: string;
|
|
17
|
+
public BankLinkAccount: BankLinkAccountModel;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export class CustomerModel {
|
|
@@ -188,4 +189,10 @@ export class UpdateStatus {
|
|
|
188
189
|
export class CustomerDipChipModel {
|
|
189
190
|
public ExpiryDate: string;
|
|
190
191
|
public NfcStatus: number;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export class BankLinkAccountModel {
|
|
195
|
+
public BankName: string;
|
|
196
|
+
public BankAccountNumber: number;
|
|
197
|
+
public LinkStatus: string;
|
|
191
198
|
}
|
|
@@ -309,11 +309,15 @@
|
|
|
309
309
|
</kendo-grid-column>
|
|
310
310
|
<kendo-grid-column field="ProfileName" title="Wallet Profile" width="100">
|
|
311
311
|
</kendo-grid-column>
|
|
312
|
-
<kendo-grid-column field="BankName" title="Bank
|
|
312
|
+
<!-- <kendo-grid-column field="BankName" title="Bank BankName" width="101">
|
|
313
|
+
</kendo-grid-column> -->
|
|
314
|
+
<kendo-grid-column field="BankAccountCurrent" title="Current Account Number" width="101">
|
|
313
315
|
</kendo-grid-column>
|
|
314
|
-
<kendo-grid-column field="
|
|
316
|
+
<kendo-grid-column field="BankStatusCurrent" title="Current Account Status" width="100">
|
|
315
317
|
</kendo-grid-column>
|
|
316
|
-
<kendo-grid-column field="
|
|
318
|
+
<kendo-grid-column field="BankAccountSaving" title="Saving Account Number" width="101">
|
|
319
|
+
</kendo-grid-column>
|
|
320
|
+
<kendo-grid-column field="BankStatusSaving" title="Saving Account Status" width="100">
|
|
317
321
|
</kendo-grid-column>
|
|
318
322
|
|
|
319
323
|
<!--Edit column-->
|
|
@@ -31,9 +31,11 @@ export class WalletSearchModel extends SearchModel {
|
|
|
31
31
|
public WalletProfileId: number;
|
|
32
32
|
public WalletId: string;
|
|
33
33
|
public BankName: string;
|
|
34
|
-
public
|
|
35
|
-
public
|
|
36
|
-
|
|
34
|
+
public BankAccountSaving: string;
|
|
35
|
+
public BankStatusSaving: string;
|
|
36
|
+
public BankAccountCurrent: string;
|
|
37
|
+
public BankStatusCurrent: string;
|
|
38
|
+
|
|
37
39
|
constructor(companyUniqueId: number, companyId: string) {
|
|
38
40
|
super();
|
|
39
41
|
this.CompanyUniqueId = companyId != Constants.COMPANY_ID_2C2P ? companyUniqueId : null;
|
|
@@ -124,15 +124,15 @@ export class Common {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
public setPageTitle(rootPageTitle: string,
|
|
128
|
-
rootPageURL: string,
|
|
129
|
-
currentPageTitle: string,
|
|
130
|
-
currentPageURL: string,
|
|
127
|
+
public setPageTitle(rootPageTitle: string,
|
|
128
|
+
rootPageURL: string,
|
|
129
|
+
currentPageTitle: string,
|
|
130
|
+
currentPageURL: string,
|
|
131
131
|
childPageTitle?: string,
|
|
132
|
-
childPageURL?: string,
|
|
133
|
-
backPageURL?: string,
|
|
134
|
-
isPreviousPageURL?: boolean,
|
|
135
|
-
subChildPageTitle?: string,
|
|
132
|
+
childPageURL?: string,
|
|
133
|
+
backPageURL?: string,
|
|
134
|
+
isPreviousPageURL?: boolean,
|
|
135
|
+
subChildPageTitle?: string,
|
|
136
136
|
subChildPageURL?: string) {
|
|
137
137
|
// set page title and url
|
|
138
138
|
this.sharedService.rootPageTitle = rootPageTitle;
|
|
@@ -464,14 +464,14 @@ export class Common {
|
|
|
464
464
|
return updateUrl;
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
-
public exportToCSVFile(url?: string,
|
|
468
|
-
fileName?: string,
|
|
469
|
-
model?: any,
|
|
467
|
+
public exportToCSVFile(url?: string,
|
|
468
|
+
fileName?: string,
|
|
469
|
+
model?: any,
|
|
470
470
|
toggleColumnModel?: any,
|
|
471
|
-
isFromSearch?: boolean,
|
|
472
|
-
requestType?: string,
|
|
473
|
-
baseUrl?: string,
|
|
474
|
-
filterModel?: any,
|
|
471
|
+
isFromSearch?: boolean,
|
|
472
|
+
requestType?: string,
|
|
473
|
+
baseUrl?: string,
|
|
474
|
+
filterModel?: any,
|
|
475
475
|
summaryModel?: any) {
|
|
476
476
|
let dataURI = Constants.CSV_DATA_URI_FORMAT + encodeBase64('');
|
|
477
477
|
let token = (this.getToken() && !baseUrl) ?
|
|
@@ -604,6 +604,18 @@ export class Common {
|
|
|
604
604
|
}
|
|
605
605
|
return value;
|
|
606
606
|
}
|
|
607
|
+
public maskStringBank(value: string, maskBy: string): string {
|
|
608
|
+
if (!value) return value;
|
|
609
|
+
|
|
610
|
+
const len = value.length;
|
|
611
|
+
|
|
612
|
+
if (len <= 4) return value; // 4 လုံးထက်နည်းရင် no mask
|
|
613
|
+
|
|
614
|
+
const maskedPart = maskBy.repeat(len - 4); // ကျန်တဲ့လုံးအတွက် * ထားမယ်
|
|
615
|
+
const last4 = value.slice(-4); // နောက်ဆုံး 4 လုံး
|
|
616
|
+
|
|
617
|
+
return maskedPart + last4;
|
|
618
|
+
}
|
|
607
619
|
|
|
608
620
|
// This method will verify the model object. If any property has blank value then it will replace it with undefined.
|
|
609
621
|
// This method will be used to for search models.
|
|
@@ -618,9 +630,8 @@ export class Common {
|
|
|
618
630
|
let key = keys[i];
|
|
619
631
|
if (skipDefaultInteger) {
|
|
620
632
|
model[key] = model[key] === 0 ? model[key] : (model[key] ? model[key] : undefined);
|
|
621
|
-
}
|
|
622
|
-
else if (model[key] === false)
|
|
623
|
-
{
|
|
633
|
+
}
|
|
634
|
+
else if (model[key] === false) {
|
|
624
635
|
model[key] = model[key];
|
|
625
636
|
}
|
|
626
637
|
else {
|
|
@@ -1333,7 +1344,7 @@ export class Common {
|
|
|
1333
1344
|
public validateAlphaNumericLength(event: any, maxLength: number) {
|
|
1334
1345
|
let value = event.currentTarget.value;
|
|
1335
1346
|
if (value) {
|
|
1336
|
-
if(value.length >
|
|
1347
|
+
if (value.length > maxLength) {
|
|
1337
1348
|
return false;
|
|
1338
1349
|
}
|
|
1339
1350
|
}
|