ประวัติฝึกอบรม/ดูงานลูกจ้าง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-04-18 16:56:11 +07:00
parent 6fb49dd324
commit 3e625962cf
5 changed files with 69 additions and 71 deletions

View file

@ -94,7 +94,7 @@ function getClass() {
/** save */
function onSubmit() {
const url = id.value
? config.API.developmentHistoryList("employee") + `${id.value}`
? config.API.developmentHistoryListByid("employee", id.value)
: config.API.developmentHistoryAdd("employee");
const body = {
@ -115,7 +115,7 @@ function onSubmit() {
dialogConfirm($q, () => {
showLoader();
http[id.value ? "put" : "post"](url, body)
.then((res) => {
.then(() => {
router.push(`/development/employee-history`);
})
.catch((e) => {
@ -150,7 +150,7 @@ function upDateProject(data: any) {
function getDataEdit() {
showLoader();
http
.get(config.API.developmentHistoryList("employee") + `${id.value}`)
.get(config.API.developmentHistoryListByid("employee", id.value))
.then((res) => {
const data = res.data.result;
formMain.id = id.value;