파일함 테이블 레이아웃 변경
This commit is contained in:
parent
01b59d9bfb
commit
0fb8a56a90
|
@ -52,28 +52,24 @@
|
|||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.info.name }}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="size">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Size</th>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header class="infos">
|
||||
Name
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
{{ element.info.size | ucapBytes }}
|
||||
<div>
|
||||
{{ element.info.name }}
|
||||
</div>
|
||||
<div>
|
||||
{{ element.info.size | ucapBytes }}
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="sendDate">
|
||||
<ng-container matColumnDef="sendDate" class="date">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>sendDate</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
{{ element.info.sendDate | dateToStringFormat: 'YYYY.MM.DD' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="receivedUserCount">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>receivedUser</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
{{ element.info.receivedUserCount }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr
|
||||
mat-row
|
||||
|
|
|
@ -3,7 +3,7 @@ import { MatPaginator, MatTableDataSource, MatSort } from '@angular/material';
|
|||
import {
|
||||
FileInfo,
|
||||
FileDownloadInfo,
|
||||
FileType,
|
||||
FileType
|
||||
} from '@ucap-webmessenger/protocol-file';
|
||||
import { Subscription, combineLatest } from 'rxjs';
|
||||
import { Store, select } from '@ngrx/store';
|
||||
|
@ -24,16 +24,10 @@ export interface FileInfoTotal {
|
|||
@Component({
|
||||
selector: 'app-layout-chat-right-drawer-file-box',
|
||||
templateUrl: './file-box.component.html',
|
||||
styleUrls: ['./file-box.component.scss'],
|
||||
styleUrls: ['./file-box.component.scss']
|
||||
})
|
||||
export class FileBoxComponent implements OnInit, OnDestroy {
|
||||
displayedColumns: string[] = [
|
||||
'check',
|
||||
'name',
|
||||
'size',
|
||||
'sendDate',
|
||||
'receivedUserCount',
|
||||
];
|
||||
displayedColumns: string[] = ['check', 'name', 'sendDate'];
|
||||
dataSource = new MatTableDataSource<FileInfoTotal>();
|
||||
|
||||
fileInfoTotal: FileInfoTotal[];
|
||||
|
@ -69,7 +63,7 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
|||
select(
|
||||
AppStore.MessengerSelector.EventSelector.selectAllFileInfoCheckList
|
||||
)
|
||||
),
|
||||
)
|
||||
])
|
||||
.pipe(
|
||||
tap(() => (this.fileInfoTotal = [])),
|
||||
|
@ -91,7 +85,7 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
|||
info: fileInfo,
|
||||
checkInfo: fileInfoCheckList.filter(
|
||||
checkInfo => checkInfo.seq === fileInfo.seq
|
||||
),
|
||||
)
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -108,10 +102,8 @@ export class FileBoxComponent implements OnInit, OnDestroy {
|
|||
return item.info.size;
|
||||
case 'sendDate':
|
||||
return item.info.sendDate;
|
||||
case 'receivedUserCount':
|
||||
return item.info.receivedUserCount;
|
||||
default:
|
||||
return item[property];
|
||||
return item.info[property];
|
||||
}
|
||||
};
|
||||
this.dataSource.sort = this.sort;
|
||||
|
|
Loading…
Reference in New Issue
Block a user