Merge branch 'methapon' into development
This commit is contained in:
commit
c726b9abb4
5 changed files with 36 additions and 31 deletions
|
|
@ -21,15 +21,22 @@ const props = withDefaults(
|
||||||
>
|
>
|
||||||
<q-card style="width: 400px">
|
<q-card style="width: 400px">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<span class="text-h6">
|
<div class="flex items-center">
|
||||||
<q-icon name="error" color="negative" size="2.5rem" />แจ้งเตือนการลบ
|
<div class="q-pa-sm">
|
||||||
</span>
|
<div style="border-radius: 50%" class="bg-secondary q-pa-sm">
|
||||||
|
<q-icon
|
||||||
|
name="mdi-trash-can-outline"
|
||||||
|
color="negative"
|
||||||
|
size="2.5rem"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h6 class="q-my-none">ยืนยันการลบข้อมูล</h6>
|
||||||
|
<p class="q-my-none">ต้องการยืนยันการลบข้อมูลนี้หรือไม่</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-card-section class="q-pt-none">
|
|
||||||
ถ้าดำเนินการต่อจะทำการลบ
|
|
||||||
</q-card-section>
|
|
||||||
|
|
||||||
<q-card-actions align="right" class="bg-white text-primary">
|
<q-card-actions align="right" class="bg-white text-primary">
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -41,10 +48,9 @@ const props = withDefaults(
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
color="negative"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
label="ลบ"
|
label="ลบ"
|
||||||
class="text-red"
|
|
||||||
@click="() => $emit('confirm')"
|
@click="() => $emit('confirm')"
|
||||||
id="dialogDeleteConfirm"
|
id="dialogDeleteConfirm"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ const emit = defineEmits([
|
||||||
'update:keyword',
|
'update:keyword',
|
||||||
'update:category',
|
'update:category',
|
||||||
'filechange',
|
'filechange',
|
||||||
|
'reset',
|
||||||
'submit',
|
'submit',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
@ -50,6 +51,7 @@ function reset() {
|
||||||
emit('update:description', '')
|
emit('update:description', '')
|
||||||
emit('update:keyword', '')
|
emit('update:keyword', '')
|
||||||
emit('update:category', '')
|
emit('update:category', '')
|
||||||
|
emit('reset')
|
||||||
}
|
}
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
|
|
@ -111,7 +113,7 @@ const file = ref<File | undefined>()
|
||||||
:model-value="open"
|
:model-value="open"
|
||||||
@update:model-value="(v) => $emit('update:open', v)"
|
@update:model-value="(v) => $emit('update:open', v)"
|
||||||
>
|
>
|
||||||
<q-form @submit.prevent="submit">
|
<q-form @submit.prevent="submit" v-if="open">
|
||||||
<q-toolbar class="q-mb-md q-pa-none">
|
<q-toolbar class="q-mb-md q-pa-none">
|
||||||
<q-toolbar-title>
|
<q-toolbar-title>
|
||||||
<span class="text-weight-bold" v-if="mode === 'create'">
|
<span class="text-weight-bold" v-if="mode === 'create'">
|
||||||
|
|
|
||||||
|
|
@ -183,10 +183,7 @@ async function submitFileForm(
|
||||||
{{ DEPT_NAME[currentDept] }}
|
{{ DEPT_NAME[currentDept] }}
|
||||||
</div>
|
</div>
|
||||||
<div class="grid q-mt-md">
|
<div class="grid q-mt-md">
|
||||||
<div
|
<div v-for="value in currentFolder" :data-pathname="value.pathname">
|
||||||
v-for="(value) in currentFolder"
|
|
||||||
:data-pathname="value.pathname"
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
:style="{
|
:style="{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
|
|
@ -388,6 +385,7 @@ async function submitFileForm(
|
||||||
v-model:description="fileFormData.description"
|
v-model:description="fileFormData.description"
|
||||||
v-model:keyword="fileFormData.keyword"
|
v-model:keyword="fileFormData.keyword"
|
||||||
v-model:category="fileFormData.category"
|
v-model:category="fileFormData.category"
|
||||||
|
@reset="() => (fileFormError = {})"
|
||||||
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
|
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
|
||||||
@submit="submitFileForm"
|
@submit="submitFileForm"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -471,6 +471,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
||||||
v-model:description="fileFormData.description"
|
v-model:description="fileFormData.description"
|
||||||
v-model:keyword="fileFormData.keyword"
|
v-model:keyword="fileFormData.keyword"
|
||||||
v-model:category="fileFormData.category"
|
v-model:category="fileFormData.category"
|
||||||
|
@reset="() => (fileFormError = {})"
|
||||||
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
|
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
|
||||||
@submit="submitFileForm"
|
@submit="submitFileForm"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -118,20 +118,20 @@ onMounted(getCabinet)
|
||||||
label="ตู้เอกสารทั้งหมด"
|
label="ตู้เอกสารทั้งหมด"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
mode === 'admin' &&
|
mode === 'admin' &&
|
||||||
viewMode === 'view_module' &&
|
viewMode === 'view_module' &&
|
||||||
currentDept === 0
|
currentDept === 0
|
||||||
"
|
"
|
||||||
class="q-px-md q-ml-md al"
|
class="q-px-md q-ml-md al"
|
||||||
label="สร้างตู้เก็บเอกสาร"
|
label="สร้างตู้เก็บเอกสาร"
|
||||||
type="submit"
|
type="submit"
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
icon="add"
|
icon="add"
|
||||||
@click="() => triggerFolderCreate()"
|
@click="() => triggerFolderCreate()"
|
||||||
id="createFolder"
|
id="createFolder"
|
||||||
/>
|
/>
|
||||||
<q-breadcrumbs-el
|
<q-breadcrumbs-el
|
||||||
class="text-primary pointer"
|
class="text-primary pointer"
|
||||||
v-for="(fragments, index) in currentPath
|
v-for="(fragments, index) in currentPath
|
||||||
|
|
@ -153,8 +153,6 @@ onMounted(getCabinet)
|
||||||
/>
|
/>
|
||||||
</q-breadcrumbs>
|
</q-breadcrumbs>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue