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