ลูกจ้างประจำ
This commit is contained in:
parent
119a1b47e4
commit
c7bbe78fc7
7 changed files with 118 additions and 34 deletions
|
|
@ -19,6 +19,7 @@ import Workflow from "@/components/Workflow/Main.vue";
|
|||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const routerName = ref<string>(route.name as string);
|
||||
const store = useRequestEditStore();
|
||||
const {
|
||||
dialogConfirm,
|
||||
|
|
@ -152,7 +153,11 @@ const statusOption = ref<DataOption[]>(statusOptionMain.value); //ตัวเ
|
|||
async function fetchDataByid(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.requestDevelopmentEdit + `admin/${id}`)
|
||||
.get(
|
||||
config.API.requestDevelopmentEditByType(
|
||||
routerName.value == "registryNewRequestEditPageEMP" ? "-employee" : ""
|
||||
) + `admin/${id}`
|
||||
)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formData.topic = data.name;
|
||||
|
|
@ -203,10 +208,15 @@ function onSubmit() {
|
|||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.patch(config.API.requestDevelopmentEdit + `admin/${requestId.value}`, {
|
||||
status: formData.status,
|
||||
reason: formData.reason,
|
||||
})
|
||||
.patch(
|
||||
config.API.requestDevelopmentEditByType(
|
||||
routerName.value == "registryNewRequestEditPageEMP" ? "-employee" : ""
|
||||
) + `admin/${requestId.value}`,
|
||||
{
|
||||
status: formData.status,
|
||||
reason: formData.reason,
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
await fetchDataByid(requestId.value);
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue