Merge branch 'develop' of github.com:Frappet/bma-ehr-admin into develop

# Conflicts:
#	src/modules/05_command/interface/index/Main.ts
This commit is contained in:
Warunee Tamkoo 2024-09-12 16:42:41 +07:00
commit 4f48bd4141
2 changed files with 55 additions and 1 deletions

View file

@ -2,6 +2,11 @@ interface Pagination {
rowsPerPage: number;
}
interface DateOption {
name: string;
id: string;
}
interface ActiveOptions {
value: boolean;
label: string;
@ -25,4 +30,11 @@ interface Tabs {
value: string;
label: string;
}
export type { Pagination, ActiveOptions, ListOrder, Tabs, ListTemplateSalary };
export type {
Pagination,
DateOption,
ActiveOptions,
ListOrder,
Tabs,
ListTemplateSalary,
};

View file

@ -11,6 +11,7 @@ import type {
ActiveOptions,
ListOrder,
Tabs,
DateOption,
} from "@/modules/05_command/interface/index/Main";
import Header from "@/components/DialogHeader.vue";
@ -58,9 +59,13 @@ const tabs = ref<Tabs[]>([
},
]);
const dataCategory = ref<DateOption[]>([]); //
const categoryOP = ref<DateOption[]>([]); // options
const idOrder = ref<string>(""); // Id
const activeOrderId = ref<string>(""); // Id
const name = ref<string>(""); //
const category = ref<string>(""); //
const listOrder = ref<ListOrder[]>([]); // list
const status = ref<boolean>(false); //
const isEdit = ref<boolean>(false); // true/false
@ -153,6 +158,15 @@ async function fetchOrderType() {
});
}
function filterSelector(val: string, update: Function) {
update(() => {
category.value = val ? "" : category.value;
categoryOP.value = dataCategory.value.filter(
(v: any) => v.name.indexOf(val) > -1
);
});
}
/** เริ่มเมื่อโหลดหน้านี้*/
onMounted(() => {
fetchOrderType();
@ -353,6 +367,34 @@ onMounted(() => {
hide-bottom-space
></q-input>
</div>
<div class="col-12">
<q-select
class="inputgreen"
v-model="category"
:label="`${'หมดหมู่'}`"
dense
emit-value
map-options
option-label="name"
:options="categoryOP"
option-value="id"
lazy-rules
use-input
hide-bottom-space
outlined
:rules="[(val:string) => !!val || `${'กรุณาเลือกหมดหมู่'}`]"
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn) "
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
ไมอม
</q-item-section>
</q-item>
</template>
</q-select>
</div>
<div class="col-12">
<div class="row items-center justify-between border_custom">
<p class="q-ma-none">สถานะการใชงาน</p>