사이트 기본 설정 테이블 컬럼 추가 및 수정
This commit is contained in:
parent
4826a71db2
commit
34f87467b1
|
@ -11,6 +11,9 @@ import { MatRippleModule } from '@angular/material/core';
|
|||
import { MatSortModule } from '@angular/material/sort';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
|
||||
import { TranslocoModule } from '@ngneat/transloco';
|
||||
|
||||
|
@ -37,6 +40,9 @@ import { basicSettingRoutes } from './basic.routing';
|
|||
MatSortModule,
|
||||
MatSelectModule,
|
||||
MatTooltipModule,
|
||||
MatTableModule,
|
||||
MatMenuModule,
|
||||
MatDividerModule,
|
||||
],
|
||||
})
|
||||
export class BasicModule {}
|
||||
|
|
|
@ -1 +1,219 @@
|
|||
<p>it's works</p>
|
||||
<div class="flex flex-col flex-auto min-w-0">
|
||||
<div class="flex-auto border-t -mt-px pt-4 sm:pt-6">
|
||||
<div class="w-full max-w-screen-xl mx-auto">
|
||||
<div class="grid grid-cols-1 sm:grid-cols-6 gap-6 w-full min-w-0">
|
||||
<!-- Budget distribution -->
|
||||
<div
|
||||
class="sm:col-span-6 flex flex-col flex-auto p-6 bg-card shadow rounded-2xl overflow-hidden"
|
||||
>
|
||||
<div class="text-lg font-medium tracking-tight leading-6 truncate">
|
||||
사이트 ON/OFF
|
||||
</div>
|
||||
<div class="flex flex-col flex-auto mt-2 overflow-x-auto">
|
||||
<table
|
||||
class="min-w-240 overflow-y-visible"
|
||||
mat-table
|
||||
[dataSource]="currentUserDataSource"
|
||||
>
|
||||
<!-- Total -->
|
||||
<ng-container matColumnDef="info">
|
||||
<th mat-header-cell *matHeaderCellDef>정보</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
<span class="font-medium text-right">
|
||||
{{ user.highRank }}
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Expenses amount -->
|
||||
<ng-container matColumnDef="description">
|
||||
<th mat-header-cell *matHeaderCellDef>내용</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{ user.rank }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Expenses amount -->
|
||||
<ng-container matColumnDef="updateBtn">
|
||||
<th mat-header-cell *matHeaderCellDef>수정</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{ user.rank }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr
|
||||
mat-header-row
|
||||
*matHeaderRowDef="siteSettingTableColumns"
|
||||
></tr>
|
||||
<tr
|
||||
mat-row
|
||||
*matRowDef="let row; columns: siteSettingTableColumns"
|
||||
></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Budget details -->
|
||||
<div
|
||||
class="sm:col-span-6 flex flex-col flex-auto p-6 bg-card shadow rounded-2xl overflow-hidden"
|
||||
>
|
||||
<div class="text-lg font-medium tracking-tight leading-6 truncate">
|
||||
사이트 첫충/매충 설정
|
||||
</div>
|
||||
<div class="flex flex-col flex-auto">
|
||||
<table
|
||||
class="min-w-240 overflow-y-visible"
|
||||
mat-table
|
||||
[dataSource]="currentUserDataSource"
|
||||
>
|
||||
<!-- Type -->
|
||||
<ng-container matColumnDef="level" sticky>
|
||||
<th mat-header-cell *matHeaderCellDef>레벨</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
<span class="flex items-center">
|
||||
{{ user.level }}
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Total -->
|
||||
<ng-container matColumnDef="firstRate">
|
||||
<th mat-header-cell *matHeaderCellDef>요율</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
<span class="font-medium text-right">
|
||||
{{ user.highRank }}
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Expenses amount -->
|
||||
<ng-container matColumnDef="firstIsUse">
|
||||
<th mat-header-cell *matHeaderCellDef>사용여부</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{ user.rank }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Expenses percentage -->
|
||||
<ng-container matColumnDef="firstMaxMoney">
|
||||
<th mat-header-cell *matHeaderCellDef>최대금액</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{ user.level }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Remaining amount -->
|
||||
<ng-container matColumnDef="everyRate">
|
||||
<th mat-header-cell *matHeaderCellDef>요율</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{ user.signinId }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Remaining percentage -->
|
||||
<ng-container matColumnDef="everyIsUse">
|
||||
<th mat-header-cell *matHeaderCellDef>사용여부</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{ user.nickname }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="everyMaxMoney">
|
||||
<th mat-header-cell *matHeaderCellDef>최대금액</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{ user.currentLocation }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="updateBtn">
|
||||
<th mat-header-cell *matHeaderCellDef>수정</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
<div class="hidden sm:block truncate">
|
||||
<button mat-flat-button [color]="'primary'">수정</button>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr
|
||||
mat-header-row
|
||||
*matHeaderRowDef="siteEarnSettingTableColumns"
|
||||
></tr>
|
||||
<tr
|
||||
mat-row
|
||||
*matRowDef="let row; columns: siteEarnSettingTableColumns"
|
||||
></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Budget details -->
|
||||
<div
|
||||
class="sm:col-span-6 flex flex-col flex-auto p-6 bg-card shadow rounded-2xl overflow-hidden"
|
||||
>
|
||||
<div class="text-lg font-medium tracking-tight leading-6 truncate">
|
||||
시스템 ON/OFF
|
||||
</div>
|
||||
<div class="flex flex-col flex-auto">
|
||||
<table
|
||||
class="min-w-240 overflow-y-visible"
|
||||
mat-table
|
||||
[dataSource]="currentUserDataSource"
|
||||
>
|
||||
<!-- Type -->
|
||||
<ng-container matColumnDef="title" sticky>
|
||||
<th mat-header-cell *matHeaderCellDef>제목</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
<span class="flex items-center">
|
||||
<span class="w-2 h-2 rounded-full"></span>
|
||||
<span class="ml-3 leading-4">{{ user.signinId }}</span>
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Total -->
|
||||
<ng-container matColumnDef="isUse">
|
||||
<th mat-header-cell *matHeaderCellDef>사용여부</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
<span class="font-medium text-right">
|
||||
{{ user.highRank }}
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Expenses amount -->
|
||||
<ng-container matColumnDef="memo">
|
||||
<th mat-header-cell *matHeaderCellDef>메모</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{ user.rank }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Expenses percentage -->
|
||||
<ng-container matColumnDef="description">
|
||||
<th mat-header-cell *matHeaderCellDef>내용</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{ user.level }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Remaining amount -->
|
||||
<ng-container matColumnDef="updateBtn">
|
||||
<th mat-header-cell *matHeaderCellDef>수정</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{ user.signinId }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr
|
||||
mat-header-row
|
||||
*matHeaderRowDef="siteGameSettingTableColumns"
|
||||
></tr>
|
||||
<tr
|
||||
mat-row
|
||||
*matRowDef="let row; columns: siteGameSettingTableColumns"
|
||||
></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -31,6 +31,9 @@ import { FuseConfirmationService } from '@fuse/services/confirmation';
|
|||
|
||||
import { BasicSetting } from '../models/basic-setting';
|
||||
import { BasicService } from '../services/basic.service';
|
||||
import { CurrentUser } from 'app/modules/admin/member/current-user/models/current-user';
|
||||
import { User } from 'app/modules/admin/member/user/models/user';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
|
||||
@Component({
|
||||
selector: 'settings-basic',
|
||||
|
@ -63,6 +66,31 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
|
||||
@ViewChild(MatSort) private _sort!: MatSort;
|
||||
|
||||
currentUsers$!: Observable<CurrentUser[] | undefined>;
|
||||
users$!: Observable<User[] | undefined>;
|
||||
|
||||
siteSettingTableColumns: string[] = ['info', 'description', 'updateBtn'];
|
||||
|
||||
siteEarnSettingTableColumns: string[] = [
|
||||
'level',
|
||||
'firstRate',
|
||||
'firstIsUse',
|
||||
'firstMaxMoney',
|
||||
'everyRate',
|
||||
'everyIsUse',
|
||||
'everyMaxMoney',
|
||||
'updateBtn',
|
||||
];
|
||||
siteGameSettingTableColumns: string[] = [
|
||||
'title',
|
||||
'isUse',
|
||||
'memo',
|
||||
'description',
|
||||
'updateBtn',
|
||||
];
|
||||
|
||||
currentUserDataSource: MatTableDataSource<any> = new MatTableDataSource();
|
||||
|
||||
basicSetting$!: Observable<BasicSetting | undefined>;
|
||||
|
||||
isLoading = false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user