From 0666a60741fd838a51d869f0da4e289c2ef0f425 Mon Sep 17 00:00:00 2001 From: puri-ph4tt Date: Tue, 28 Nov 2023 09:22:44 +0700 Subject: [PATCH] refactor: list view icon, date, file type --- Services/client/src/components/ListView.vue | 25 +++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Services/client/src/components/ListView.vue b/Services/client/src/components/ListView.vue index bfad555..270ad4a 100644 --- a/Services/client/src/components/ListView.vue +++ b/Services/client/src/components/ListView.vue @@ -3,9 +3,12 @@ import { computed, ref } from 'vue' import { storeToRefs } from 'pinia' import type { QTableProps } from 'quasar' import { useTreeDataStore } from '@/stores/tree-data' +import { useFileInfoStore } from '@/stores/file-info-data' import FromEdit from '@/components/FromEdit.vue' +import FileIcon from '@/components/FileIcon.vue' const { deleteFolder } = useTreeDataStore() +const { getFormatDate, getSize, getType } = useFileInfoStore() const { listDataFile, listDataFolder, currentDept } = storeToRefs( useTreeDataStore() ) @@ -58,7 +61,7 @@ const columnsFolder: QTableProps['columns'] = [ sortable: true, }, { - name: 'createdBy', + name: 'createdAt', align: 'center', label: 'วันที่สร้าง', field: 'createdAt', @@ -76,7 +79,7 @@ const columnsFolder: QTableProps['columns'] = [ const columnsFile: QTableProps['columns'] = [ { - name: 'fileName', + name: 'name', required: true, label: 'ชื่อไฟล์', align: 'left', @@ -163,7 +166,13 @@ const columnsFile: QTableProps['columns'] = [ {{ nameRow.row.name }} - + @@ -261,7 +272,7 @@ const columnsFile: QTableProps['columns'] = [ self="center right" :offset="[5, 1]" > - {{ actionsRow.row.fileSize }} + {{ getSize(actionsRow.row.fileSize) }}