[update] remove unused components

This commit is contained in:
2023-10-11 23:43:44 +07:00
parent 6e979255ae
commit e7678c0e5e
237 changed files with 813 additions and 21083 deletions

View File

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

View File

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { KycContainer } from './kyc.container';
describe('KycContainer', () => {
let component: KycContainer;
let fixture: ComponentFixture<KycContainer>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ KycContainer ]
})
.compileComponents();
fixture = TestBed.createComponent(KycContainer);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -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-kyc',
templateUrl: './kyc.container.html',
styleUrls: ['./kyc.container.scss']
})
export class KycContainer {
kyc$ = new Observable();
constructor(
private kycService: KycService
) {
this.kyc$ = this.kycService.getAll();
}
}

View File

@@ -0,0 +1,35 @@
import { NgOptimizedImage } from "@angular/common";
import { RouterModule, Routes } from "@angular/router";
import { AppSharedModule } from "src/app/app.shared";
import { KycRouter } from "./router/router";
import { KycContainer } from "./container/kyc/kyc.container";
import { NgModule } from "@angular/core";
import { ListComponent } from "./presenter/list/list.component";
const routes: Routes = [
{
path: '',
component: KycRouter,
children: [
{
path: '',
component: KycContainer
}
]
}
]
@NgModule({
declarations: [
KycRouter,
KycContainer,
ListComponent
],
imports: [
AppSharedModule,
NgOptimizedImage,
RouterModule.forChild(routes)
]
})
export class KycModule { }

View File

@@ -0,0 +1,103 @@
<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-3 md:col-span-5 md:order-2">
<mat-form-field>
<i matTextPrefix class="bi bi-search"></i>
<input matInput placeholder="เลขบัตรประชาชน/เลขหลังบัตร">
</mat-form-field>
</div>
<div class="col-span-5 md:col-span-7 md: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']"></tr>
<tr mat-row *matRowDef="let row; columns: ['1','2','3','4','5','6','7','8','9','10','11','12'];"></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">เลขบัตรประชาชน</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>เลขหลังบัตร</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" width="150">วันหมดอายุ</th>
<td mat-cell *matCellDef="let item" class="">{{item.size }}</td>
</ng-container>
<ng-container matColumnDef="5">
<th mat-header-cell *matHeaderCellDef class="tal" width="150">คำนำหน้า</th>
<td mat-cell *matCellDef="let item" class="">{{item.weight }}</td>
</ng-container>
<ng-container matColumnDef="6">
<th mat-header-cell *matHeaderCellDef class="tal" width="150">ชื่อ</th>
<td mat-cell *matCellDef="let item" class="">{{item.color }}</td>
</ng-container>
<ng-container matColumnDef="7">
<th mat-header-cell *matHeaderCellDef class="tal" width="150">นามสกุล</th>
<td mat-cell *matCellDef="let item" class="">{{item.year }}</td>
</ng-container>
<ng-container matColumnDef="8">
<th mat-header-cell *matHeaderCellDef class="tal" width="150" mat-sort-header>วัน เดือน ปีเกิด</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="9">
<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="10">
<th mat-header-cell *matHeaderCellDef width="80">E-mail</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="11">
<th mat-header-cell *matHeaderCellDef class="tal" width="150" mat-sort-header>More Detail</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="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>
</table>
</div>
<!-- <div *ngIf="dataSourceCount === 0" class="no-data"></div> -->
<mat-paginator [pageSizeOptions]="[5,10,20]" showFirstLastButtons (page)="getData($event)"></mat-paginator>
</div>
</div>

View File

@@ -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();
});
});

View File

@@ -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) {
}
}

View File

@@ -0,0 +1,16 @@
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
@Component({
selector: 'app-kyc-router',
template: '<router-outlet></router-outlet>',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class KycRouter implements OnInit {
constructor() { }
ngOnInit(): void {
}
}