หน้าแก้ไขทะเบียนประวัติลูกจ้าง

This commit is contained in:
Thanit Konmek 2023-08-28 10:11:40 +07:00
parent 1ca73e1c59
commit 73e150a509
3 changed files with 25 additions and 10 deletions

View file

@ -282,6 +282,12 @@
:borderless="!edit"
v-model="informaData.tel"
:label="`${'เบอร์โทร'}`"
:rules="[
(val:string) => !!val || `${'กรุณากรอก เบอร์โทร'}`,
(val:string) =>
val.length >= 10 ||
`${'กรุณากรอกเบอร์โทรให้ครบ'}`,
]"
mask="##########"
/>
</div>

View file

@ -283,6 +283,12 @@
v-model="informaData.tel"
:label="`${'เบอร์โทร'}`"
mask="##########"
:rules="[
(val:string) => !!val || `${'กรุณากรอก เบอร์โทร'}`,
(val:string) =>
val.length >= 10 ||
`${'กรุณากรอกเบอร์โทรให้ครบ'}`,
]"
/>
</div>
<div
@ -458,7 +464,7 @@ const {
dialogMessage,
showLoader,
hideLoader,
dialogConfirm
dialogConfirm,
} = mixin;
const profileStore = useProfileDataStore();
@ -1104,9 +1110,9 @@ const addData = async () => {
// });
};
const saveData = async () =>{
dialogConfirm($q,()=>Datasave())
}
const saveData = async () => {
dialogConfirm($q, () => Datasave());
};
const Datasave = async () => {
if (myform.value != null) {
await myform.value.validate().then(async (success: boolean) => {

View file

@ -286,6 +286,12 @@
:borderless="!edit"
v-model="informaData.tel"
:label="`${'เบอร์โทร'}`"
:rules="[
(val:string) => !!val || `${'กรุณากรอก เบอร์โทร'}`,
(val:string) =>
val.length >= 10 ||
`${'กรุณากรอกเบอร์โทรให้ครบ'}`,
]"
mask="##########"
/>
</div>
@ -439,7 +445,7 @@ const {
dialogMessage,
showLoader,
hideLoader,
dialogConfirm
dialogConfirm,
} = mixin;
const profileStore = useProfileDataStore();
@ -1091,7 +1097,7 @@ const addData = async () => {
emit("update:statusEdit", false);
await fetchData();
await changeBirth(informaData.value.birthDate ?? new Date());
await clickBack()
await clickBack();
hideLoader();
});
console.log(body);
@ -1103,10 +1109,7 @@ const saveData = async () => {
if (myform.value != null) {
await myform.value.validate().then(async (saveDataTest: Boolean) => {
if (saveDataTest) {
dialogConfirm(
$q,
() => addData()
)
dialogConfirm($q, () => addData());
}
});
}