[update]
This commit is contained in:
@@ -2,8 +2,6 @@ import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { AppService } from '../../app.service';
|
||||
import { MENU } from "../../@config/menus";
|
||||
import { lastValueFrom } from "rxjs";
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pages-layouts',
|
||||
@@ -24,7 +22,6 @@ export class PagesLayoutsComponent implements OnInit {
|
||||
constructor(
|
||||
private app: AppService,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
public changeDetectorRef: ChangeDetectorRef,
|
||||
) {
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<app-list [kycList]="kyc$ | async"></app-list>
|
||||
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TransactionsContainer } from './transactions.container';
|
||||
|
||||
describe('TransactionsContainer', () => {
|
||||
let component: TransactionsContainer;
|
||||
let fixture: ComponentFixture<TransactionsContainer>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ TransactionsContainer ]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TransactionsContainer);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { KycService } from 'src/app/core/service/manage/kyc.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-transactions',
|
||||
templateUrl: './transactions.container.html',
|
||||
styleUrls: ['./transactions.container.scss']
|
||||
})
|
||||
export class TransactionsContainer {
|
||||
kyc$ = new Observable();
|
||||
constructor(
|
||||
private kycService: KycService
|
||||
) {
|
||||
this.kyc$ = this.kycService.getAll();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
<div class="card card-table">
|
||||
|
||||
<div class="card-filter text-right">
|
||||
<div class="card-filter-section grid grid-cols-12 gap-4 md:gap-2 items-center">
|
||||
<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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="table-wrap">
|
||||
<table class="table table-main" mat-table [dataSource]="kycList" 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>
|
||||
</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 }}
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="9">
|
||||
<th mat-header-cell *matHeaderCellDef class="tal" width="150" mat-sort-header>ref 3</th>
|
||||
<td mat-cell *matCellDef="let item" class="">
|
||||
<div class="b-color-orange"> {{item.price | number : '1.2-2'}}</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="15">
|
||||
<th mat-header-cell *matHeaderCellDef width="80">More Detail</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>
|
||||
</td>
|
||||
</ng-container>
|
||||
</table>
|
||||
</div>
|
||||
<!-- <div *ngIf="dataSourceCount === 0" class="no-data"></div> -->
|
||||
<mat-paginator [pageSizeOptions]="[5,10,20]" showFirstLastButtons (page)="getData($event)"></mat-paginator>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ListComponent } from './list.component';
|
||||
|
||||
describe('ListComponent', () => {
|
||||
let component: ListComponent;
|
||||
let fixture: ComponentFixture<ListComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ ListComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ListComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-list',
|
||||
templateUrl: './list.component.html',
|
||||
styleUrls: ['./list.component.scss']
|
||||
})
|
||||
export class ListComponent {
|
||||
@Input() kycList: any = [];
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
getData(event: any) {
|
||||
|
||||
}
|
||||
}
|
||||
16
src/app/pages/report/transactions/router/router.ts
Normal file
16
src/app/pages/report/transactions/router/router.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-transactions-router',
|
||||
template: '<router-outlet></router-outlet>',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class TransactionsRouter implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
35
src/app/pages/report/transactions/transactions.module.ts
Normal file
35
src/app/pages/report/transactions/transactions.module.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { NgOptimizedImage } from "@angular/common";
|
||||
import { RouterModule, Routes } from "@angular/router";
|
||||
import { AppSharedModule } from "src/app/app.shared";
|
||||
import { NgModule } from "@angular/core";
|
||||
import { ListComponent } from "./presenter/list/list.component";
|
||||
import { TransactionsRouter } from "./router/router";
|
||||
import { TransactionsContainer } from "./container/transactions/transactions.container";
|
||||
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TransactionsRouter,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: TransactionsContainer
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
TransactionsRouter,
|
||||
TransactionsContainer,
|
||||
ListComponent
|
||||
],
|
||||
imports: [
|
||||
AppSharedModule,
|
||||
NgOptimizedImage,
|
||||
RouterModule.forChild(routes)
|
||||
]
|
||||
})
|
||||
export class TransactionsModule { }
|
||||
Reference in New Issue
Block a user