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,
|
||||
},
|
||||
)
|
||||
const DEPT_NAME = ['ตู้เอกสาร', 'ลิ้นชัก', 'แฟ้ม', 'แฟ้ม'] as const
|
||||
const DEPT_NAME = ['ตู้เอกสาร', 'ลิ้นชัก', 'แฟ้ม', 'แฟ้มย่อย'] as const
|
||||
const { getFileInfo } = useFileInfoStore()
|
||||
const { currentFolder, currentFile, currentDept, currentPath } =
|
||||
storeToRefs(useTreeDataStore())
|
||||
|
|
@ -183,10 +183,10 @@ async function submitFileForm(
|
|||
|
||||
<template>
|
||||
<div class="text-h6 q-mt-md" v-if="currentDept > 2">
|
||||
<div class="flex justify-between">
|
||||
{{ DEPT_NAME[currentDept] }}
|
||||
<div class="flex justify-between items-center">
|
||||
<div>{{ DEPT_NAME[currentDept] }}</div>
|
||||
<q-btn
|
||||
v-if="currentDept != 4"
|
||||
v-if="currentDept != 4 && action"
|
||||
outline
|
||||
push
|
||||
class="q-px-md q-ml-md"
|
||||
|
|
@ -298,16 +298,18 @@ async function submitFileForm(
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="grid-column: 1 / span 5"
|
||||
class="text-h6 q-mt-md"
|
||||
v-if="currentDept > 2"
|
||||
>
|
||||
<div style="grid-column: 1 / span 5" class="q-mt-md" v-if="currentDept > 2">
|
||||
<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
|
||||
outline
|
||||
push
|
||||
v-if="action"
|
||||
class="q-px-md q-ml-md"
|
||||
label="สร้างเอกสาร"
|
||||
type="submit"
|
||||
|
|
@ -509,5 +511,4 @@ async function submitFileForm(
|
|||
.grid .box {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
|||
:rows="listDataFolder"
|
||||
:columns="columnsFolder"
|
||||
:pagination="{
|
||||
rowsPerPage: 0,
|
||||
rowsPerPage: 20,
|
||||
}"
|
||||
@row-click="onRowClick"
|
||||
row-key="name"
|
||||
|
|
@ -395,7 +395,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
|||
:columns="columnsFile"
|
||||
row-key="name"
|
||||
:pagination="{
|
||||
rowsPerPage: 0,
|
||||
rowsPerPage: 20,
|
||||
}"
|
||||
class="cursor"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue