refactor: admin search to edit, delete

This commit is contained in:
puri-ph4tt 2023-12-06 09:05:43 +07:00
parent 83441e6bed
commit 2d6cbe2dc4
3 changed files with 233 additions and 36 deletions

View file

@ -23,7 +23,6 @@ const { data, currentDept, currentPath } = storeToRefs(useTreeDataStore())
const { createFolder, getCabinet, gotoParent, getFolder } = useTreeDataStore()
const viewMode = ref<'view_list' | 'view_module'>('view_list')
const inputSearch = ref<string>()
const props = defineProps<{
mode: 'admin' | 'user'
}>()
@ -71,10 +70,12 @@ onMounted(getCabinet)
<div
class="q-px-md q-py-sm text-primary bg-grey-1 pointer"
id="container-header"
@click="() => {
currentPath = '' ;
getFolder(currentPath)
}"
@click="
() => {
currentPath = ''
getFolder(currentPath)
}
"
>
<span class="block q-my-sm text-weight-bold">ดเกบเอกสาร</span>
</div>
@ -110,6 +111,7 @@ onMounted(getCabinet)
>
<q-icon name="arrow_back" size="1rem" color="primary" />
</q-btn>
<span v-if="isSearch === true">ผลการค้นหา</span>
<q-breadcrumbs v-if="isSearch === false" active-color="primary">
<q-breadcrumbs-el
v-if="currentPath === '/' || !currentPath"
@ -136,7 +138,7 @@ onMounted(getCabinet)
/>
</q-breadcrumbs>
</div>
<span v-if="isSearch === true">ผลการค้นหา</span>
<q-btn
v-if="
mode === 'admin' &&
@ -179,7 +181,11 @@ onMounted(getCabinet)
</div>
</div>
<div>
<file-searched :viewMode="viewMode" v-if="isSearch === true" />
<file-searched
:viewMode="viewMode"
:action="props.mode === 'admin'"
v-if="isSearch === true"
/>
<file-item
:viewMode="viewMode"
:action="props.mode === 'admin'"