feat: stats and action button admin only
This commit is contained in:
parent
eb5be2d8cc
commit
f4c5757a1d
2 changed files with 14 additions and 13 deletions
|
|
@ -17,7 +17,7 @@ const props = withDefaults(
|
||||||
action: false,
|
action: false,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
const DEPT_NAME = ['ตู้เอกสาร', 'ลิ้นชัก', 'แฟ้ม', 'แฟ้ม'] as const
|
const DEPT_NAME = ['ตู้เอกสาร', 'ลิ้นชัก', 'แฟ้ม', 'แฟ้มย่อย'] as const
|
||||||
const { getFileInfo } = useFileInfoStore()
|
const { getFileInfo } = useFileInfoStore()
|
||||||
const { currentFolder, currentFile, currentDept, currentPath } =
|
const { currentFolder, currentFile, currentDept, currentPath } =
|
||||||
storeToRefs(useTreeDataStore())
|
storeToRefs(useTreeDataStore())
|
||||||
|
|
@ -183,10 +183,10 @@ async function submitFileForm(
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="text-h6 q-mt-md" v-if="currentDept > 2">
|
<div class="text-h6 q-mt-md" v-if="currentDept > 2">
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between items-center">
|
||||||
{{ DEPT_NAME[currentDept] }}
|
<div>{{ DEPT_NAME[currentDept] }}</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="currentDept != 4"
|
v-if="currentDept != 4 && action"
|
||||||
outline
|
outline
|
||||||
push
|
push
|
||||||
class="q-px-md q-ml-md"
|
class="q-px-md q-ml-md"
|
||||||
|
|
@ -298,16 +298,18 @@ async function submitFileForm(
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div style="grid-column: 1 / span 5" class="q-mt-md" v-if="currentDept > 2">
|
||||||
style="grid-column: 1 / span 5"
|
|
||||||
class="text-h6 q-mt-md"
|
|
||||||
v-if="currentDept > 2"
|
|
||||||
>
|
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
เอกสาร
|
<div>
|
||||||
|
<span class="text-h6 q-mr-md">เอกสาร</span>
|
||||||
|
<span class="text-body text-grey"
|
||||||
|
>จำนวน {{ currentFile.length }} รายการ</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
outline
|
outline
|
||||||
push
|
push
|
||||||
|
v-if="action"
|
||||||
class="q-px-md q-ml-md"
|
class="q-px-md q-ml-md"
|
||||||
label="สร้างเอกสาร"
|
label="สร้างเอกสาร"
|
||||||
type="submit"
|
type="submit"
|
||||||
|
|
@ -509,5 +511,4 @@ async function submitFileForm(
|
||||||
.grid .box {
|
.grid .box {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
||||||
:rows="listDataFolder"
|
:rows="listDataFolder"
|
||||||
:columns="columnsFolder"
|
:columns="columnsFolder"
|
||||||
:pagination="{
|
:pagination="{
|
||||||
rowsPerPage: 0,
|
rowsPerPage: 20,
|
||||||
}"
|
}"
|
||||||
@row-click="onRowClick"
|
@row-click="onRowClick"
|
||||||
row-key="name"
|
row-key="name"
|
||||||
|
|
@ -395,7 +395,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
||||||
:columns="columnsFile"
|
:columns="columnsFile"
|
||||||
row-key="name"
|
row-key="name"
|
||||||
:pagination="{
|
:pagination="{
|
||||||
rowsPerPage: 0,
|
rowsPerPage: 20,
|
||||||
}"
|
}"
|
||||||
class="cursor"
|
class="cursor"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue