แก้ put

This commit is contained in:
STW_TTTY\stwtt 2024-04-26 17:02:01 +07:00
parent 8c8673dd88
commit 426ce74f62

View file

@ -31,9 +31,9 @@ const evaluatorIdMainOp = ref<DataOptions[]>([]);
const commanderIdMainOp = ref<DataOptions[]>([]);
const commanderHighMainOp = ref<DataOptions[]>([]);
const evaluatorId = ref<any>();
const commanderId = ref<any>();
const commanderHighId = ref<any>();
const evaluatorId = ref<any>(null);
const commanderId = ref<any>(null);
const commanderHighId = ref<any>(null);
const formProfile = reactive<FormProfile>({
fullName: "",
@ -127,12 +127,13 @@ async function clearDialog() {
function onSubmit() {
dialogConfirm($q, () => {
showLoader();
if(id.value){
showLoader();
http
.put(config.API.kpiEvaluationCheck + `/${id.value}`, {
evaluatorId: evaluatorId.value.id,
commanderId: commanderId.value.id,
commanderHighId: commanderHighId.value.id,
evaluatorId: evaluatorId.value ? evaluatorId.value.id:null,
commanderId: commanderId.value ? commanderId.value.id:null,
commanderHighId: commanderHighId.value ? commanderHighId.value.id:null,
})
.then((res) => {
success($q, "บันทึกสำเร็จ");
@ -144,6 +145,8 @@ function onSubmit() {
.finally(() => {
hideLoader();
});
}
});
}