diff --git a/Services/client/src/stores/searched-data.ts b/Services/client/src/stores/searched-data.ts index 595b280..371f406 100644 --- a/Services/client/src/stores/searched-data.ts +++ b/Services/client/src/stores/searched-data.ts @@ -2,10 +2,42 @@ import { ref } from 'vue' import { defineStore } from 'pinia' import type { EhrFile } from '@/stores/tree-data' +export interface searchData { + field: string + value: string +} + +export interface advSearchDataRow { + op: 'AND' | 'OR' + field: 'title' | 'keyword' + value: string +} + +export interface advSearchDataField { + keyword: string[] + description: string +} + export const useSearchDataStore = defineStore('searched', () => { const foundFile = ref([]) const isAdvSearchCall = ref(false) const isSearch = ref(false) + const isActFoundFile = ref(false) + const searchData = ref({ + field: 'title', + value: '', + }) + const advSearchDataRow = ref([ + { + op: 'AND', + field: 'title', + value: '', + }, + ]) + const advSearchDataField = ref({ + keyword: [], + description: '', + }) async function getFoundFile(data: EhrFile[]) { foundFile.value = data @@ -15,6 +47,10 @@ export const useSearchDataStore = defineStore('searched', () => { foundFile, isSearch, isAdvSearchCall, + isActFoundFile, + searchData, + advSearchDataRow, + advSearchDataField, getFoundFile, } })