From 5b9faf6cbff892a5442918e0daf57c4877bb5612 Mon Sep 17 00:00:00 2001 From: Phet Date: Wed, 11 Sep 2024 15:46:03 +0700 Subject: [PATCH] [faet] - add mroe detail in kyc list and popup --- .../presenter/dialog/dialog.component.html | 275 +++++++++++------- .../kyc/presenter/dialog/dialog.component.ts | 152 +++++----- .../kyc/presenter/list/list.component.html | 17 +- .../kyc/presenter/list/list.component.ts | 2 + 4 files changed, 275 insertions(+), 171 deletions(-) diff --git a/src/app/pages/manage/kyc/presenter/dialog/dialog.component.html b/src/app/pages/manage/kyc/presenter/dialog/dialog.component.html index f8a26ca..1f74fad 100644 --- a/src/app/pages/manage/kyc/presenter/dialog/dialog.component.html +++ b/src/app/pages/manage/kyc/presenter/dialog/dialog.component.html @@ -1,103 +1,182 @@
-
-
-

More Detail

- clear -
-
- -
-
-
-
- -
- -
-
ข้างหน้า
- -
-
-
- -
-
ข้างหลัง
-
-
-
-
-
-
-
-
- เลขประจำตัวประชาชน - - - - -
-
- -
-
- ชื่อ - - นามสกุล - - - - -
-
- -
-
- เกิดวันที่ - - - - - - -
-
- -
-
- วันบัตรหมดอายุ - - - - - - -
-
- -
-
- เลขหลังบัตร - - - - -
-
-
-
- +
+
+

More Detail

+ clear
+
+ +
+
+
+
+ +
+ +
+
ข้างหน้า
+ +
+
+
+ +
+
ข้างหลัง
+
+
+
+ +
+
รูปถ่ายคู่กับบัตร
+
+
+
+ +
+
ลายเซ็น
+
+
+
+
+
+
+
+
+ เลขประจำตัวประชาชน + + + + +
+
+ +
+
+ ชื่อ - + นามสกุล + + + + +
+
+ +
+
+ สัญชาติ + + + + +
+
+ +
+
+ เกิดวันที่ + + + + + + +
+
+
+
+ ที่อยู่ปัจจุบัน + + + + +
+
+ +
+
+ อาชีพ + + + + +
+
+ +
+
+ ชื่อสถานที่ทำงาน + + + + +
+
+
+
+ ที่อยู่ที่ทำงาน + + + + +
+
+ +
+
+ ที่อยู่ตามบัตรประชาชน + + + + +
+
+ +
+
+ วันบัตรหมดอายุ + + + + + + +
+
+ +
+
+ เลขหลังบัตร + + + + +
+
+ + + +
+
+ +
\ No newline at end of file diff --git a/src/app/pages/manage/kyc/presenter/dialog/dialog.component.ts b/src/app/pages/manage/kyc/presenter/dialog/dialog.component.ts index 711e12a..a297bcb 100644 --- a/src/app/pages/manage/kyc/presenter/dialog/dialog.component.ts +++ b/src/app/pages/manage/kyc/presenter/dialog/dialog.component.ts @@ -17,81 +17,91 @@ import { KycService } from 'src/app/core/service/common/kyc.service'; }) export class DialogComponent extends BaseForm implements OnInit { - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public dialog: IDialogConfigData, - public router: Router, - public activatedRoute: ActivatedRoute, - public fb: FormBuilder, - public location: Location, - public kycService: KycService, - public appService: AppService, - public cdr: ChangeDetectorRef - ) { - super(router, activatedRoute, fb, location) - } + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public dialog: IDialogConfigData, + public router: Router, + public activatedRoute: ActivatedRoute, + public fb: FormBuilder, + public location: Location, + public kycService: KycService, + public appService: AppService, + public cdr: ChangeDetectorRef + ) { + super(router, activatedRoute, fb, location) + } - ngOnInit(): void { - if (this.dialog.action === EAction.UPDATE){ - this.state = 'edit'; - this.getData(); - } + ngOnInit(): void { + if (this.dialog.action === EAction.UPDATE) { + this.state = 'edit'; + this.getData(); } + } - createForm(): FormGroup { - return this.fb.group({ - kyc_uid: null, - id_card: null, - code_back_card: null, - exp_date: null, - prefix_name: null, - first_name: null, - last_name: null, - birth_date: [null], - phone: [null], - email: null, - image_front_url: [null], - image_back_url: [null], - is_pass: null, - status_id: [null], - created_by: null, - created_datetime: null, - updated_by: null, - updated_datetime: null, - owner_agency_uid: null - }) - } + createForm(): FormGroup { + return this.fb.group({ + kyc_uid: null, + id_card: null, + code_back_card: null, + current_address: null, + exp_date: null, + prefix_name: null, + first_name: null, + last_name: null, + birth_date: [null], + phone: [null], + email: null, + image_front_url: [null], + image_back_url: [null], + is_pass: null, + status_id: [null], + created_by: null, + created_datetime: null, + updated_by: null, + updated_datetime: null, + owner_agency_uid: null, + occupation: null, + additional_occupation: null, + nationality: null, + max_card_no: null, + name_of_workplace: null, + work_address: null, + signature_url: null, + image_person_with_card_url: null, + address_according_id_card: null + }) + } - getData() { - if (!this.dialog.ids) this.appService.message(EAction.INFO, EText.NO_DATA); - return this.kycService.get(this.dialog.ids).pipe( - tap((res) => this.form.patchValue(res)), - tap(() => this.cdr.detectChanges()), - catchError((err) => { - this.appService.message(EAction.ERROR, EText.ERROR); - return throwError(() => err) - }) - ).subscribe() - } + getData() { + if (!this.dialog.ids) this.appService.message(EAction.INFO, EText.NO_DATA); + return this.kycService.get(this.dialog.ids).pipe( + tap((res) => this.form.patchValue(res)), + tap(() => this.cdr.detectChanges()), + catchError((err) => { + this.appService.message(EAction.ERROR, EText.ERROR); + return throwError(() => err) + }) + ).subscribe() + } - status(isApprove: boolean){ - const form = this.form.getRawValue(); - form.is_pass = isApprove; - const save$ = this.kycService.update2(form) - return save$.pipe( - tap(() => this.appService.message(EAction.SUCCESS, EText.UPDATE)), - tap(() => this.dialogRef.close('success')), - catchError((err) => { - this.appService.message(EAction.ERROR, EText.ERROR); - return throwError(() => err) - }) - ).subscribe() - } + status(isApprove: boolean) { + const form = this.form.getRawValue(); + form.is_pass = isApprove; + const save$ = this.kycService.update2(form) + return save$.pipe( + tap(() => this.appService.message(EAction.SUCCESS, EText.UPDATE)), + tap(() => this.dialogRef.close('success')), + catchError((err) => { + this.appService.message(EAction.ERROR, EText.ERROR); + return throwError(() => err) + }) + ).subscribe() + } - viewImg1(url){ - window.open(url) - } - viewImg2(url){ - window.open(url) - } + viewImg1(url) { + window.open(url) + } + viewImg2(url) { + window.open(url) + } } diff --git a/src/app/pages/manage/kyc/presenter/list/list.component.html b/src/app/pages/manage/kyc/presenter/list/list.component.html index e8de85e..1bea7d4 100644 --- a/src/app/pages/manage/kyc/presenter/list/list.component.html +++ b/src/app/pages/manage/kyc/presenter/list/list.component.html @@ -21,8 +21,8 @@
- - + + @@ -81,6 +81,19 @@
{{item.email}}
+ + + + + + + + +
ลำดับ เลขสมาชิก +
{{item.max_card_no}}
+
วันที่สมัคร +
{{item.created_datetime | thaidate}}
+
More Detail diff --git a/src/app/pages/manage/kyc/presenter/list/list.component.ts b/src/app/pages/manage/kyc/presenter/list/list.component.ts index cf97d96..d329e9a 100644 --- a/src/app/pages/manage/kyc/presenter/list/list.component.ts +++ b/src/app/pages/manage/kyc/presenter/list/list.component.ts @@ -18,6 +18,8 @@ export class ListComponent extends BaseList implements OnChanges { } name: string; filterCard: Subject = new Subject(); + + header = ['1', '2', '3', '4', '6', '8', '9', '10', 'create_date', 'register_no', '11', '12'] constructor() { super() this.filterCard.pipe(