check citizenId
This commit is contained in:
parent
a35309c68b
commit
b0e5bc6b46
4 changed files with 30 additions and 14 deletions
|
|
@ -30,6 +30,7 @@ const {
|
|||
} = useCounterMixin();
|
||||
const { calculateAge } = profileStore;
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const empType = defineModel<string>("empType", { required: true });
|
||||
|
||||
const props = defineProps({
|
||||
fetchData: { type: Function },
|
||||
|
|
@ -140,8 +141,9 @@ function clearFormData() {
|
|||
|
||||
async function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
const type = empType.value !== "officer" ? "-employee" : "";
|
||||
await http
|
||||
.post(config.API.registryNew, formData)
|
||||
.post(config.API.registryNew(type), formData)
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
props.fetchData?.();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue