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

This commit is contained in:
Kittapath 2023-09-21 11:19:32 +07:00
commit 5950dc5e6b
2 changed files with 6 additions and 10 deletions

View file

@ -256,9 +256,9 @@ const getTable = async () => {
}); });
// //
rows.value = roleAdmin rows.value = roleAdmin.value
? rowsAll.value ? rowsAll.value
: rowsAll.value.filter((x: any) => x.statusId != "CONTAIN"); : rowsAll.value.filter((x: any) => x.statusId !== "CONTAIN");
// //
rowsFilter.value = rows.value.filter( rowsFilter.value = rows.value.filter(
(e: any) => (e: any) =>
@ -359,7 +359,7 @@ const getClass = (val: boolean) => {
"full-width cursor-pointer": !val, "full-width cursor-pointer": !val,
}; };
}; };
//
const selectData = (pid: string) => { const selectData = (pid: string) => {
if (roleAdmin.value === true) { if (roleAdmin.value === true) {
personalId.value = pid; personalId.value = pid;
@ -373,7 +373,7 @@ const dataInfo = reactive({
reason: "", reason: "",
reliefDoc: "", reliefDoc: "",
}); });
//
const editDetail = ( const editDetail = (
props: PartialTableName, props: PartialTableName,
action: "disclaim" | "deferment" | "defermentInfo" | "disclaimInfo" action: "disclaim" | "deferment" | "defermentInfo" | "disclaimInfo"

View file

@ -256,11 +256,6 @@ const calculateMaxDate = () => {
}; };
// //
const handleDate = async (modelData: Date) => {
informaData.value.birthDate = modelData;
await calRetire(modelData);
};
const calRetire = async (birth: Date) => { const calRetire = async (birth: Date) => {
const body = { const body = {
birthDate: dateToISO(birth), birthDate: dateToISO(birth),
@ -272,6 +267,7 @@ const calRetire = async (birth: Date) => {
.then((res: any) => { .then((res: any) => {
const data = res.data.result; const data = res.data.result;
informaData.value.age = data.age; informaData.value.age = data.age;
informaData.value.birthDate = birth;
changeRetireText(data.retireDate); changeRetireText(data.retireDate);
dateBefore.value = birth; dateBefore.value = birth;
}) })
@ -390,7 +386,7 @@ const clickBack = () => {
<div class="row col-12 q-col-gutter-x-sm q-mb-xs"> <div class="row col-12 q-col-gutter-x-sm q-mb-xs">
<div class="col-xs-6 col-sm-2 col-md-2"> <div class="col-xs-6 col-sm-2 col-md-2">
<datepicker v-model="informaData.birthDate" :locale="'th'" autoApply :enableTimePicker="false" week-start="0" <datepicker v-model="informaData.birthDate" :locale="'th'" autoApply :enableTimePicker="false" week-start="0"
:max-date="calculateMaxDate()" @update:model-value="handleDate"> :max-date="calculateMaxDate()" @update:model-value="calRetire">
<template #year="{ year }"> <template #year="{ year }">
{{ year + 543 }} {{ year + 543 }}
</template> </template>