fixing registy

This commit is contained in:
Warunee Tamkoo 2024-09-05 10:07:52 +07:00
parent 3666cd61a9
commit 96a1722435
5 changed files with 22 additions and 11 deletions

View file

@ -352,9 +352,13 @@ watch(
class="text-weight-medium"
>
{{
`${props.row.prefix ? props.row.prefix : ""}${
props.row.firstName
} ${props.row.lastName}`
`${
props.row.rank
? props.row.rank
: props.row.prefix
? props.row.prefix
: ""
}${props.row.firstName} ${props.row.lastName}`
}}
</div>
<div
@ -367,9 +371,13 @@ watch(
>
<q-tooltip>รายละเอยด</q-tooltip>
{{
`${props.row.prefix ? props.row.prefix : ""}${
props.row.firstName
} ${props.row.lastName}`
`${
props.row.rank
? props.row.rank
: props.row.prefix
? props.row.prefix
: ""
}${props.row.firstName} ${props.row.lastName}`
}}
<q-icon name="mdi-open-in-new" size="xs"></q-icon>
</div>

View file

@ -3,6 +3,7 @@ interface FormFilter {
pageSize: number;
keyword: string;
type: string;
searchType?: string;
posType: string;
posLevel: string;
retireYear: string | null;

View file

@ -22,6 +22,7 @@ interface DataPerson {
posTypeId: string;
position: string;
prefix: string;
rank?: string;
}
export type { DataType, DataLevel, DataPerson };

View file

@ -64,6 +64,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
isAll: true,
nodeId: null,
node: null,
searchType: "fullName",
});
const labelOption = reactive({

View file

@ -34,7 +34,7 @@ const isShowFilter = ref<boolean>(true);
const isShowBtnFilter = ref<boolean>(false);
const empType = ref<string>("officer"); // officer / employee / perm
const searchType = ref<string>("fullName");
// const searchType = ref<string>("fullName");
const node = ref<any>([]);
const expanded = ref<any>([]);
const maxPage = ref<number>(1);
@ -117,7 +117,7 @@ function fetchDataPerson() {
if (store.formFilter.keyword) {
queryParams = Object.assign({}, queryParams, {
searchField: searchType.value,
searchField: store.formFilter.searchType,
searchKeyword: store.formFilter.keyword,
});
}
@ -264,9 +264,9 @@ async function selectType() {
empType.value === "officer"
? "เลือกหน่วยงาน/ส่วนราชการ"
: "เลือกหน่วยงาน";
store.formFilter.searchType = "fullName";
} else {
// filter
if (
store.formFilter.keyword != "" ||
store.labelOption.posType != "ทั้งหมด" ||
@ -391,7 +391,7 @@ onMounted(async () => {
<q-select
borderless
bg-color="white"
v-model="searchType"
v-model="store.formFilter.searchType"
:options="store.searchTypeOption"
emit-value
dense
@ -572,7 +572,7 @@ onMounted(async () => {
inset
vertical
class="lineFil"
v-if="empType !== 'officer'"
v-if="empType !== 'officer' && store.formFilter.nodeId"
/>
<q-toggle