[hotfx] - adjust html

This commit is contained in:
2024-09-20 15:31:18 +07:00
parent 2cbac0027b
commit 80b9172602
5 changed files with 28 additions and 11 deletions

View File

@@ -29,6 +29,8 @@
<td mat-cell *matCellDef="let item; let i = index;" width="100" class="tac">{{getIndex(i)}}</td> <td mat-cell *matCellDef="let item; let i = index;" width="100" class="tac">{{getIndex(i)}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="2"> <ng-container matColumnDef="2">
<th mat-header-cell *matHeaderCellDef class="tac">เลขบัตรประชาชน</th> <th mat-header-cell *matHeaderCellDef class="tac">เลขบัตรประชาชน</th>
<td mat-cell *matCellDef="let item" class="tac" style="min-width: 200px;"> <td mat-cell *matCellDef="let item" class="tac" style="min-width: 200px;">

View File

@@ -19,7 +19,7 @@ export class ListComponent extends BaseList implements OnChanges {
name: string; name: string;
filterCard: Subject<string> = new Subject<string>(); filterCard: Subject<string> = new Subject<string>();
header = ['1', '2', '3', '4', '6', '8', '9', '10', 'create_date', 'register_no', '11', '12'] header = ['1', 'create_date', '2', '3', '4', '6', '8', '9', '10', 'register_no', '11', '12']
constructor() { constructor() {
super() super()
this.filterCard.pipe( this.filterCard.pipe(

View File

@@ -69,8 +69,7 @@
<div class="lg:flex lg:flex-col grid grid-cols-9 gap-2"> <div class="lg:flex lg:flex-col grid grid-cols-9 gap-2">
<mat-label class="col-span-1 lg:text-left lg:self-auto text-right self-center mr-4"></mat-label> <mat-label class="col-span-1 lg:text-left lg:self-auto text-right self-center mr-4"></mat-label>
<button mat-raised-button class="btn btn-submit" (click)="save()"> <button mat-raised-button class="btn btn-submit" (click)="save()">
<div> User เป็น <div style="white-space: nowrap;"> User เป็น Merchant</div>
Merchant</div>
</button> </button>
</div> </div>
</div> </div>

View File

@@ -21,37 +21,52 @@
<div class="card-body"> <div class="card-body">
<div class="table-wrap"> <div class="table-wrap">
<table class="" mat-table [dataSource]="userList" matSort> <table class="" mat-table [dataSource]="userList" matSort>
<tr mat-header-row *matHeaderRowDef="['1','2','3','4','6']"></tr> <tr mat-header-row *matHeaderRowDef="userListKey"></tr>
<tr mat-row *matRowDef="let row; columns: ['1','2','3','4','6'];"></tr> <tr mat-row *matRowDef="let row; columns: userListKey;"></tr>
<ng-container matColumnDef="1"> <ng-container matColumnDef="1">
<th mat-header-cell *matHeaderCellDef class="tac">ลำดับ</th> <th mat-header-cell *matHeaderCellDef class="tac">ลำดับ</th>
<td mat-cell *matCellDef="let item; let i = index;" width="100" class="tac">{{getIndex(i)}}</td> <td mat-cell *matCellDef="let item; let i = index;" width="100" class="tac">{{getIndex(i)}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="2"> <!-- <ng-container matColumnDef="personalCardId">
<th mat-header-cell *matHeaderCellDef class="tac">เลขบัตรประชาชน</th> <th mat-header-cell *matHeaderCellDef class="tac">เลขบัตรประชาชน</th>
<td mat-cell *matCellDef="let item" class="tac" style="min-width: 200px;"> <td mat-cell *matCellDef="let item" class="tac" style="min-width: 200px;">
{{item.personalCardId}} {{item.personalCardId}}
</td> </td>
</ng-container> </ng-container> -->
<ng-container matColumnDef="3"> <ng-container matColumnDef="fullName">
<th mat-header-cell *matHeaderCellDef class="tac" width="200">ชื่อ นามสกุล</th> <th mat-header-cell *matHeaderCellDef class="tac" width="200">ชื่อ นามสกุล</th>
<td mat-cell *matCellDef="let item" class="tac whitespace-nowrap">{{item.fullName}}</td> <td mat-cell *matCellDef="let item" class="tac whitespace-nowrap">{{item.fullName}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="4"> <ng-container matColumnDef="userName">
<th mat-header-cell *matHeaderCellDef class="tal" width="150">Username</th> <th mat-header-cell *matHeaderCellDef class="tal" width="150">Username</th>
<td mat-cell *matCellDef="let item" class="whitespace-nowrap">{{item.userName }}</td> <td mat-cell *matCellDef="let item" class="whitespace-nowrap">{{item.userName }}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="5"> <ng-container matColumnDef="email">
<th mat-header-cell *matHeaderCellDef class="tac" width="100">Email</th> <th mat-header-cell *matHeaderCellDef class="tac" width="100">Email</th>
<td mat-cell *matCellDef="let item" class="tac">{{item.email}}</td> <td mat-cell *matCellDef="let item" class="tac">{{item.email}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="6"> <ng-container matColumnDef="phoneNumber">
<th mat-header-cell *matHeaderCellDef class="tac" width="100">เบอร์โทรศัพท์</th>
<td mat-cell *matCellDef="let item" class="tac">{{item.phoneNumber}}</td>
</ng-container>
<ng-container matColumnDef="userType">
<th mat-header-cell *matHeaderCellDef class="tac" width="100">ประเภทผู้ใช้งาน</th>
<td mat-cell *matCellDef="let item" class="tac">{{item.userType}}</td>
</ng-container>
<ng-container matColumnDef="id">
<th mat-header-cell *matHeaderCellDef class="tac" width="100">Id</th>
<td mat-cell *matCellDef="let item" class="tac">{{item.id}}</td>
</ng-container>
<ng-container matColumnDef="action">
<th mat-header-cell *matHeaderCellDef class="tac" width="150">More Detail</th> <th mat-header-cell *matHeaderCellDef class="tac" width="150">More Detail</th>
<td mat-cell *matCellDef="let item" class="tac"> <td mat-cell *matCellDef="let item" class="tac">
<div class="action flex justify-center"> <div class="action flex justify-center">

View File

@@ -18,6 +18,7 @@ export class UserListComponent extends BaseList implements OnChanges {
} }
name: string; name: string;
filterCard: Subject<string> = new Subject<string>(); filterCard: Subject<string> = new Subject<string>();
userListKey = ['1', 'fullName', 'userName', 'email', 'phoneNumber', 'userType', 'id', 'action']
constructor() { constructor() {
super() super()
this.filterCard.pipe( this.filterCard.pipe(