refactor: add id for robot
This commit is contained in:
parent
3bda1bd620
commit
2f706f879b
5 changed files with 26 additions and 6 deletions
|
|
@ -37,6 +37,7 @@ const props = withDefaults(
|
||||||
flat
|
flat
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="() => ($emit('update:open', !open))"
|
@click="() => ($emit('update:open', !open))"
|
||||||
|
id="dialogDeleteClose"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -45,6 +46,7 @@ const props = withDefaults(
|
||||||
label="ลบ"
|
label="ลบ"
|
||||||
class="text-red"
|
class="text-red"
|
||||||
@click="() => $emit('confirm')"
|
@click="() => $emit('confirm')"
|
||||||
|
id="dialogDeleteConfirm"
|
||||||
/>
|
/>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@ const file = ref<File | undefined>()
|
||||||
icon="close"
|
icon="close"
|
||||||
color="red"
|
color="red"
|
||||||
@click="() => ($emit('update:open', !open), reset())"
|
@click="() => ($emit('update:open', !open), reset())"
|
||||||
|
id="fileFormIconClose"
|
||||||
/>
|
/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
||||||
|
|
@ -148,6 +149,7 @@ const file = ref<File | undefined>()
|
||||||
? 'ไม่สามารถเพิ่มไฟล์ที่ชื่อยาวเกิน 85 ตัวอักษรได้'
|
? 'ไม่สามารถเพิ่มไฟล์ที่ชื่อยาวเกิน 85 ตัวอักษรได้'
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
|
id="inputFile"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="attach_file" />
|
<q-icon name="attach_file" />
|
||||||
|
|
@ -165,6 +167,7 @@ const file = ref<File | undefined>()
|
||||||
:model-value="title"
|
:model-value="title"
|
||||||
:rules="[(v) => v.length > 3 || 'ชื่อต้องยาวกว่า 3 ตัวอักษร']"
|
:rules="[(v) => v.length > 3 || 'ชื่อต้องยาวกว่า 3 ตัวอักษร']"
|
||||||
@update:model-value="(v) => $emit('update:title', v)"
|
@update:model-value="(v) => $emit('update:title', v)"
|
||||||
|
id="inputTitle"
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
@ -178,6 +181,7 @@ const file = ref<File | undefined>()
|
||||||
placeholder="กรอกรายละเอียด"
|
placeholder="กรอกรายละเอียด"
|
||||||
:model-value="description"
|
:model-value="description"
|
||||||
@update:model-value="(v) => $emit('update:description', v)"
|
@update:model-value="(v) => $emit('update:description', v)"
|
||||||
|
id="inputDescription"
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
@ -196,6 +200,7 @@ const file = ref<File | undefined>()
|
||||||
@filter="filterCategory"
|
@filter="filterCategory"
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
@update:model-value="(v) => $emit('update:category', v)"
|
@update:model-value="(v) => $emit('update:category', v)"
|
||||||
|
id="inputCategory"
|
||||||
>
|
>
|
||||||
<template v-slot:no-option>
|
<template v-slot:no-option>
|
||||||
<q-item>
|
<q-item>
|
||||||
|
|
@ -220,6 +225,7 @@ const file = ref<File | undefined>()
|
||||||
:model-value="props.keyword"
|
:model-value="props.keyword"
|
||||||
@update:model-value="(v) => $emit('update:keyword', v)"
|
@update:model-value="(v) => $emit('update:keyword', v)"
|
||||||
@new-value="createKeyword"
|
@new-value="createKeyword"
|
||||||
|
id="inputKeyword"
|
||||||
>
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -231,6 +237,7 @@ const file = ref<File | undefined>()
|
||||||
type="submit"
|
type="submit"
|
||||||
color="primary"
|
color="primary"
|
||||||
:disable="error.fileName2Long"
|
:disable="error.fileName2Long"
|
||||||
|
id="submitFile"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
label="ยกเลิก"
|
label="ยกเลิก"
|
||||||
|
|
@ -238,6 +245,7 @@ const file = ref<File | undefined>()
|
||||||
color="primary"
|
color="primary"
|
||||||
flat
|
flat
|
||||||
@click="() => ($emit('update:open', false), reset())"
|
@click="() => ($emit('update:open', false), reset())"
|
||||||
|
id="fileFormBtnClose"
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
</q-form>
|
</q-form>
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,8 @@ async function submitFileForm(
|
||||||
{{ DEPT_NAME[currentDept] }}
|
{{ DEPT_NAME[currentDept] }}
|
||||||
</div>
|
</div>
|
||||||
<div class="grid q-mt-md">
|
<div class="grid q-mt-md">
|
||||||
<div v-for="value in currentFolder">
|
<div v-for="value in currentFolder" key="value.name">
|
||||||
|
{{ value.name }}
|
||||||
<div
|
<div
|
||||||
:style="{
|
:style="{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ const props = withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
open: false,
|
open: false,
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
const emit = defineEmits(['update:open', 'update:name', 'submit'])
|
const emit = defineEmits(['update:open', 'update:name', 'submit'])
|
||||||
|
|
@ -53,6 +53,7 @@ onUnmounted(() => window.addEventListener('keydown', keydown))
|
||||||
:width="300"
|
:width="300"
|
||||||
:breakpoint="500"
|
:breakpoint="500"
|
||||||
:model-value="open"
|
:model-value="open"
|
||||||
|
@update:model-value="(v) => $emit('update:open', v)"
|
||||||
>
|
>
|
||||||
<q-form @submit.prevent="submit">
|
<q-form @submit.prevent="submit">
|
||||||
<q-toolbar class="q-mb-md q-pa-none">
|
<q-toolbar class="q-mb-md q-pa-none">
|
||||||
|
|
@ -92,10 +93,9 @@ onUnmounted(() => window.addEventListener('keydown', keydown))
|
||||||
error-message="คำต้องห้านจะเปลี่ยนเป็น - เมื่อกดสร้าง"
|
error-message="คำต้องห้านจะเปลี่ยนเป็น - เมื่อกดสร้าง"
|
||||||
:error="offensiveWord"
|
:error="offensiveWord"
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
(v:string) => {
|
(v) => {
|
||||||
$emit('update:name', v)
|
$emit('update:name', v)
|
||||||
|
offensiveWord = checkOffensiveWord(v as string)
|
||||||
offensiveWord = checkOffensiveWord(v)
|
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ onMounted(getCabinet)
|
||||||
label="ค้นหา"
|
label="ค้นหา"
|
||||||
bg-color="white"
|
bg-color="white"
|
||||||
v-model="inputSearch"
|
v-model="inputSearch"
|
||||||
|
id="inputSearch"
|
||||||
>
|
>
|
||||||
<template v-slot:append><q-icon name="search" /></template>
|
<template v-slot:append><q-icon name="search" /></template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
@ -107,7 +108,12 @@ onMounted(getCabinet)
|
||||||
dense
|
dense
|
||||||
class="q-mr-sm q-px-sm"
|
class="q-mr-sm q-px-sm"
|
||||||
v-if="currentDept > 0 && isSearch === false"
|
v-if="currentDept > 0 && isSearch === false"
|
||||||
@click="() => gotoParent()"
|
@click="
|
||||||
|
() => {
|
||||||
|
folderFormState = false
|
||||||
|
gotoParent()
|
||||||
|
}
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-icon name="arrow_back" size="1rem" color="primary" />
|
<q-icon name="arrow_back" size="1rem" color="primary" />
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
@ -137,6 +143,7 @@ onMounted(getCabinet)
|
||||||
dense
|
dense
|
||||||
icon="add"
|
icon="add"
|
||||||
@click="() => triggerFolderCreate()"
|
@click="() => triggerFolderCreate()"
|
||||||
|
id="createFolder"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -147,6 +154,7 @@ onMounted(getCabinet)
|
||||||
icon="refresh"
|
icon="refresh"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="() => getFolder(currentPath)"
|
@click="() => getFolder(currentPath)"
|
||||||
|
id="getFolder"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
|
|
@ -159,6 +167,7 @@ onMounted(getCabinet)
|
||||||
viewMode === 'view_list' ? 'view_module' : 'view_list'
|
viewMode === 'view_list' ? 'view_module' : 'view_list'
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
id="viewMode"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue