Merge branch 'phatt' into development
This commit is contained in:
commit
0d072c820d
2 changed files with 15 additions and 15 deletions
|
|
@ -17,7 +17,7 @@ const optionsOp = [
|
|||
{ label: 'หรือ', value: 'OR' },
|
||||
]
|
||||
const props = defineProps<{
|
||||
searchSubmit: Function
|
||||
submitSearch: Function
|
||||
submitSearchData: {
|
||||
AND: {
|
||||
field: string
|
||||
|
|
@ -132,7 +132,7 @@ function clearAdvSearchData() {
|
|||
outlined
|
||||
v-model="item.value"
|
||||
placeholder="เอกสาร"
|
||||
@keydown.enter.prevent="searchSubmit()"
|
||||
@keydown.enter.prevent="submitSearch()"
|
||||
><template v-slot:append>
|
||||
<q-icon
|
||||
v-if="item.value"
|
||||
|
|
@ -180,7 +180,7 @@ function clearAdvSearchData() {
|
|||
id="advSearchDes"
|
||||
dense
|
||||
outlined
|
||||
@keydown.enter.prevent="searchSubmit()"
|
||||
@keydown.enter.prevent="submitSearch()"
|
||||
v-model="advSearchDataField.description"
|
||||
><template v-slot:prepend
|
||||
><span class="text-subtitle2">รายละเอียด:</span></template
|
||||
|
|
@ -203,8 +203,8 @@ function clearAdvSearchData() {
|
|||
color="primary"
|
||||
label="ค้นหา"
|
||||
icon="mdi-magnify"
|
||||
@click="() => props.searchSubmit()"
|
||||
id="advSearchSubmit"
|
||||
@click="() => props.submitSearch()"
|
||||
id="advSubmitSearch"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import mime from 'mime'
|
|||
import type { StorageFile } from '@/stores/storage'
|
||||
import { useSearchDataStore } from '@/stores/searched-data'
|
||||
import { useLoader } from '@/stores/loader'
|
||||
import { useFileInfoStore } from '@/stores/file-info-data'
|
||||
|
||||
import AdvancedSearch from '@/modules/01_user/components/AdvancedSearch.vue'
|
||||
import { useFileInfoStore } from '@/stores/file-info-data'
|
||||
|
||||
const loaderStore = useLoader()
|
||||
const { isFilePreview } = storeToRefs(useFileInfoStore())
|
||||
|
|
@ -39,7 +39,7 @@ const props = defineProps<{
|
|||
mode: 'admin' | 'user'
|
||||
}>()
|
||||
|
||||
async function searchSubmit() {
|
||||
async function submitSearch() {
|
||||
isFilePreview.value = false
|
||||
if (searchData.value.value.trim() !== '') {
|
||||
submitSearchData.value = { AND: [], OR: [] }
|
||||
|
|
@ -110,7 +110,7 @@ watch(
|
|||
() => isActFoundFile.value,
|
||||
(edited) => {
|
||||
if (edited === true) {
|
||||
searchSubmit()
|
||||
submitSearch()
|
||||
setTimeout(() => {
|
||||
isActFoundFile.value = false
|
||||
}, 300)
|
||||
|
|
@ -139,13 +139,13 @@ watch(
|
|||
bg-color="white"
|
||||
v-model="searchData.value"
|
||||
id="inputSearch"
|
||||
@update:model-value="searchSubmit"
|
||||
@keydown.enter.prevent="searchSubmit"
|
||||
@update:model-value="submitSearch"
|
||||
@keydown.enter.prevent="submitSearch"
|
||||
data-testid="searchAdmin"
|
||||
>
|
||||
<template v-slot:prepend />
|
||||
<template v-slot:append
|
||||
><q-icon name="search" class="pointer" @click="searchSubmit"
|
||||
><q-icon name="search" class="pointer" @click="submitSearch"
|
||||
/></template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
|
@ -173,7 +173,7 @@ watch(
|
|||
outlined
|
||||
v-model="searchData.value"
|
||||
placeholder="เอกสาร"
|
||||
@keydown.enter.prevent="searchSubmit"
|
||||
@keydown.enter.prevent="submitSearch"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
|
|
@ -192,7 +192,7 @@ watch(
|
|||
<div class="row items-center justify-between q-gutter-y-md q-pt-sm">
|
||||
<div class="column col-grow">
|
||||
<advanced-search
|
||||
:searchSubmit="searchSubmit"
|
||||
:submitSearch="submitSearch"
|
||||
:submit-search-data="submitSearchData"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -202,8 +202,8 @@ watch(
|
|||
color="primary"
|
||||
label="ค้นหา"
|
||||
icon="mdi-magnify"
|
||||
@click="searchSubmit"
|
||||
id="searchSubmit"
|
||||
@click="submitSearch"
|
||||
id="submitSearch"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue