This commit is contained in:
2023-11-02 15:53:37 +07:00
parent 136c9a2f6d
commit 21af45bfa6
15 changed files with 108 additions and 233 deletions

View File

@@ -1 +1 @@
<app-list [kycList]="kyc$ | async"></app-list>
<app-list [reportList]="report$ | async"></app-list>

View File

@@ -1,6 +1,6 @@
import { Component } from '@angular/core';
import { Observable } from 'rxjs';
import { KycService } from 'src/app/core/service/common/kyc.service';
import { ReportService } from 'src/app/core/service/common/report.service';
@Component({
selector: 'app-transactions',
@@ -8,10 +8,10 @@ import { KycService } from 'src/app/core/service/common/kyc.service';
styleUrls: ['./transactions.container.scss']
})
export class TransactionsContainer {
kyc$ = new Observable();
report$ = new Observable();
constructor(
private kycService: KycService
private reportService: ReportService
) {
this.kyc$ = this.kycService.getAll();
this.report$ = this.reportService.getAll()
}
}

View File

@@ -15,15 +15,17 @@
</mat-form-field>
</div>
<div class="col-span-2 xl:col-span-3 xl:order-2">
<mat-form-field>
<i matTextPrefix class="bi bi-search"></i>
<input matInput placeholder="วันที่ชำระ">
<mat-form-field >
<input matInput [matDatepicker]="startDate" placeholder="วันที่ชำระ" (dateChange)="test()" />
<mat-datepicker-toggle [for]="startDate" matSuffix></mat-datepicker-toggle>
<mat-datepicker #startDate></mat-datepicker>
</mat-form-field>
</div>
<div class="col-span-2 xl:col-span-3 xl:order-2">
<mat-form-field>
<i matTextPrefix class="bi bi-search"></i>
<input matInput placeholder="ถึงวันที่">
<mat-form-field >
<input matInput [matDatepicker]="endDate" placeholder="ถึงวันที่" (dateChange)="test()"/>
<mat-datepicker-toggle [for]="endDate" matSuffix></mat-datepicker-toggle>
<mat-datepicker #endDate></mat-datepicker>
</mat-form-field>
</div>
</div>
@@ -31,51 +33,51 @@
<div class="card-body">
<div class="table-wrap">
<table class="table table-main" mat-table [dataSource]="kycList" matSort>
<table class="table table-main" mat-table [dataSource]="reportList" matSort>
<tr mat-header-row *matHeaderRowDef="['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15']"></tr>
<tr mat-row *matRowDef="let row; columns: ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15'];"></tr>
<ng-container matColumnDef="1">
<th mat-header-cell *matHeaderCellDef class="tac" mat-sort-header>ลำดับ</th>
<td mat-cell *matCellDef="let item" width="150" class="tac">{{item.code}}</td>
<td mat-cell *matCellDef="let item; let i = index" width="150" class="tac">{{getIndex(i)}}</td>
</ng-container>
<ng-container matColumnDef="2">
<th mat-header-cell *matHeaderCellDef class="tal">Phone</th>
<td mat-cell *matCellDef="let item" class="" style="min-width: 200px;">
{{item.name }}
{{item.phoneNumber}}
</td>
</ng-container>
<ng-container matColumnDef="3">
<th mat-header-cell *matHeaderCellDef class="tal" mat-sort-header>ID</th>
<td mat-cell *matCellDef="let item" class="">{{item?.masterProductBrand.name }}</td>
<td mat-cell *matCellDef="let item" class="">{{ item.id }}</td>
</ng-container>
<ng-container matColumnDef="4">
<th mat-header-cell *matHeaderCellDef class="tal" mat-sort-header>PayeeFullname</th>
<td mat-cell *matCellDef="let item" class="">{{item?.masterProductBrand.name }}</td>
<td mat-cell *matCellDef="let item" class="">{{ item?.payeeUserAccountId }}</td>
</ng-container>
<ng-container matColumnDef="5">
<th mat-header-cell *matHeaderCellDef class="tal" width="150">PayerFullname</th>
<td mat-cell *matCellDef="let item" class="">{{item.size }}</td>
<td mat-cell *matCellDef="let item" class="">{{ item.payerUserAccountId }}</td>
</ng-container>
<ng-container matColumnDef="6">
<th mat-header-cell *matHeaderCellDef class="tal" width="150">InvoiceID</th>
<td mat-cell *matCellDef="let item" class="">{{item.weight }}</td>
<td mat-cell *matCellDef="let item" class="">{{ item.invoiceId }}</td>
</ng-container>
<ng-container matColumnDef="7">
<th mat-header-cell *matHeaderCellDef class="tal" width="150">ref 1</th>
<td mat-cell *matCellDef="let item" class="">{{item.color }}</td>
<td mat-cell *matCellDef="let item" class="">{{ item.referencE1 }}</td>
</ng-container>
<ng-container matColumnDef="8">
<th mat-header-cell *matHeaderCellDef class="tal" width="150">ref 2</th>
<td mat-cell *matCellDef="let item" class="">{{item.year }}</td>
<td mat-cell *matCellDef="let item" class="">{{ item.referencE2 }}</td>
</ng-container>
<ng-container matColumnDef="9">
@@ -87,35 +89,31 @@
<ng-container matColumnDef="10">
<th mat-header-cell *matHeaderCellDef class="tal" width="150" mat-sort-header>paymentStatus</th>
<td mat-cell *matCellDef="let item" class="">
<div class="b-color-green"> {{item.latestPrice | number : '1.2-2' }}</div>
<div class="b-color-green"> {{ item.referencE3 }}</div>
</td>
</ng-container>
<ng-container matColumnDef="11">
<th mat-header-cell *matHeaderCellDef width="80">payment Channel</th>
<td mat-cell *matCellDef="let item">
<div class="action flex justify-center">
<div class="item">
<i class="bi bi-file-earmark-text icon-doc"></i>
</div>
</div>
<div class="b-color-green"> {{ item.paymentChannel }}</div>
</td>
</ng-container>
<ng-container matColumnDef="12">
<th mat-header-cell *matHeaderCellDef class="tal" width="150" mat-sort-header>จำนวนเงิน</th>
<td mat-cell *matCellDef="let item" class="">
<div class="b-color-green"> {{item.latestPrice | number : '1.2-2' }}</div>
<div class="b-color-green"> {{ item.amount | number : '1.2-2' }}</div>
</td>
</ng-container>
<ng-container matColumnDef="13">
<th mat-header-cell *matHeaderCellDef class="tal" width="150" mat-sort-header>Create by</th>
<td mat-cell *matCellDef="let item" class="">
<div class="b-color-green"> {{item.latestPrice | number : '1.2-2' }}</div>
<div class="b-color-green"> {{ item.createBy }}</div>
</td>
</ng-container>
<ng-container matColumnDef="14">
<th mat-header-cell *matHeaderCellDef class="tal" width="150" mat-sort-header>Update by</th>
<td mat-cell *matCellDef="let item" class="">
<div class="b-color-green"> {{item.latestPrice | number : '1.2-2' }}</div>
<div class="b-color-green"> {{ item.updateBy }}</div>
</td>
</ng-container>
<ng-container matColumnDef="15">
@@ -131,6 +129,6 @@
</table>
</div>
<!-- <div *ngIf="dataSourceCount === 0" class="no-data"></div> -->
<mat-paginator [pageSizeOptions]="[5,10,20]" showFirstLastButtons (page)="getData($event)"></mat-paginator>
<mat-paginator [pageSizeOptions]="[5,10,20]" showFirstLastButtons></mat-paginator>
</div>
</div>

View File

@@ -6,12 +6,12 @@ import { Component, Input } from '@angular/core';
styleUrls: ['./list.component.scss']
})
export class ListComponent {
@Input() kycList: any = [];
@Input() reportList: any = [];
constructor() {
}
getData(event: any) {
test(){
console.log('test')
}
}