From 771dbe8f4c62b05e008a98b0f733c5603adffe58 Mon Sep 17 00:00:00 2001 From: somnetsak123 Date: Mon, 4 Dec 2023 11:16:07 +0700 Subject: [PATCH 1/2] fix: Delete unused functions --- Services/client/src/components/FileItem.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Services/client/src/components/FileItem.vue b/Services/client/src/components/FileItem.vue index 409d40a..128d41e 100644 --- a/Services/client/src/components/FileItem.vue +++ b/Services/client/src/components/FileItem.vue @@ -18,9 +18,10 @@ const props = withDefaults( }, ) const DEPT_NAME = ['ตู้เอกสาร', 'ลิ้นชัก', 'แฟ้ม', 'แฟ้มย่อย'] as const -const { getFileInfo, getFileNameFormat } = useFileInfoStore() -const { currentFolder, currentFile, currentDept, currentPath } = - storeToRefs(useTreeDataStore()) +const { getFileInfo } = useFileInfoStore() +const { currentFolder, currentFile, currentDept, currentPath } = storeToRefs( + useTreeDataStore() +) const { createFolder, editFolder, @@ -37,8 +38,8 @@ const currentIcon = computed(() => currentDept.value === 0 ? 'mdi-file-cabinet' : currentDept.value === 1 - ? 'inbox' - : 'o_folder_open', + ? 'inbox' + : 'o_folder_open', ) const dialogDeleteState = ref(false) From 1f4129a1b9dbcecf4b45b1301b7759d24397d5d5 Mon Sep 17 00:00:00 2001 From: somnetsak123 Date: Mon, 4 Dec 2023 11:16:56 +0700 Subject: [PATCH 2/2] refactor: go back search --- Services/client/src/components/PageLayout.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Services/client/src/components/PageLayout.vue b/Services/client/src/components/PageLayout.vue index bfe80a5..32dec23 100644 --- a/Services/client/src/components/PageLayout.vue +++ b/Services/client/src/components/PageLayout.vue @@ -95,14 +95,14 @@ onMounted(getCabinet) flat dense class="q-mr-sm q-px-sm" - v-if="currentDept > 0 && isSearch === false" + v-if="isSearch == true || currentDept > 0" @click=" () => { - folderFormState = false - gotoParent() + isSearch + ? (isSearch = false) + : ((folderFormState = false), gotoParent()) } " - id="btnGoback" >