Merge branch 'methapon' into development

This commit is contained in:
Methapon2001 2023-12-06 16:49:26 +07:00
commit c726b9abb4
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
5 changed files with 36 additions and 31 deletions

View file

@ -21,15 +21,22 @@ const props = withDefaults(
>
<q-card style="width: 400px">
<q-card-section>
<span class="text-h6">
<q-icon name="error" color="negative" size="2.5rem" />แจงเตอนการลบ
</span>
<div class="flex items-center">
<div class="q-pa-sm">
<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 class="q-pt-none">
าดำเนนการตอจะทำการลบ
</q-card-section>
<q-card-actions align="right" class="bg-white text-primary">
<q-space />
<q-btn
@ -41,10 +48,9 @@ const props = withDefaults(
/>
<q-btn
flat
color="negative"
v-close-popup
label="ลบ"
class="text-red"
@click="() => $emit('confirm')"
id="dialogDeleteConfirm"
/>

View file

@ -34,6 +34,7 @@ const emit = defineEmits([
'update:keyword',
'update:category',
'filechange',
'reset',
'submit',
])
@ -50,6 +51,7 @@ function reset() {
emit('update:description', '')
emit('update:keyword', '')
emit('update:category', '')
emit('reset')
}
function submit() {
@ -111,7 +113,7 @@ const file = ref<File | undefined>()
:model-value="open"
@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-title>
<span class="text-weight-bold" v-if="mode === 'create'">

View file

@ -183,10 +183,7 @@ async function submitFileForm(
{{ DEPT_NAME[currentDept] }}
</div>
<div class="grid q-mt-md">
<div
v-for="(value) in currentFolder"
:data-pathname="value.pathname"
>
<div v-for="value in currentFolder" :data-pathname="value.pathname">
<div
:style="{
position: 'relative',
@ -388,6 +385,7 @@ async function submitFileForm(
v-model:description="fileFormData.description"
v-model:keyword="fileFormData.keyword"
v-model:category="fileFormData.category"
@reset="() => (fileFormError = {})"
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
@submit="submitFileForm"
/>

View file

@ -471,6 +471,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
v-model:description="fileFormData.description"
v-model:keyword="fileFormData.keyword"
v-model:category="fileFormData.category"
@reset="() => (fileFormError = {})"
@filechange="(name: string) => (fileFormError.fileExist = checkFile(name))"
@submit="submitFileForm"
/>

View file

@ -118,20 +118,20 @@ onMounted(getCabinet)
label="ตู้เอกสารทั้งหมด"
/>
<q-btn
v-if="
mode === 'admin' &&
viewMode === 'view_module' &&
currentDept === 0
"
class="q-px-md q-ml-md al"
label="สร้างตู้เก็บเอกสาร"
type="submit"
color="primary"
dense
icon="add"
@click="() => triggerFolderCreate()"
id="createFolder"
/>
v-if="
mode === 'admin' &&
viewMode === 'view_module' &&
currentDept === 0
"
class="q-px-md q-ml-md al"
label="สร้างตู้เก็บเอกสาร"
type="submit"
color="primary"
dense
icon="add"
@click="() => triggerFolderCreate()"
id="createFolder"
/>
<q-breadcrumbs-el
class="text-primary pointer"
v-for="(fragments, index) in currentPath
@ -153,8 +153,6 @@ onMounted(getCabinet)
/>
</q-breadcrumbs>
</div>
</span>
<div>
<q-btn