fixing bug
This commit is contained in:
parent
d2e87e2f8b
commit
2b596355eb
2 changed files with 22 additions and 23 deletions
|
|
@ -64,8 +64,7 @@ async function onCilckNextStep() {
|
|||
const functionCreateDoc: (() => Promise<void>) | null =
|
||||
store.step === 1
|
||||
? await saveStep1
|
||||
:
|
||||
store.step === 3
|
||||
: store.step === 3
|
||||
? await saveStep3
|
||||
: store.step === 7
|
||||
? await saveStep7
|
||||
|
|
@ -231,7 +230,7 @@ async function updateCheckSpec(data: FormSpec) {
|
|||
*/
|
||||
function updateFormDetail(data: any) {
|
||||
formDetail.value = data;
|
||||
console.log("🚀 ~ updateFormDetail ~ data:", data)
|
||||
console.log("🚀 ~ updateFormDetail ~ data:", data);
|
||||
}
|
||||
/** function เช็คการการคุณสมบัติ*/
|
||||
function checkSelectForm() {
|
||||
|
|
@ -250,7 +249,7 @@ function checkSelectForm() {
|
|||
}
|
||||
/** function บันทักตรวจสอบคุณสมบัติ*/
|
||||
async function saveStep1() {
|
||||
const salaries = formDetail.value.trainings.map((e: any) => ({
|
||||
const salaries = formDetail.value.salaries.map((e: any) => ({
|
||||
amount: e.amount,
|
||||
date: e.date,
|
||||
mouthSalaryAmount: e.mouthSalaryAmount ? e.mouthSalaryAmount : 0,
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ async function fetchCheckStep(id: string) {
|
|||
}
|
||||
|
||||
async function saveEvaluation(formSpec: any, detail: any) {
|
||||
const salaries = detail.trainings.map((e: any) => ({
|
||||
const salaries = detail.salaries.map((e: any) => ({
|
||||
amount: e.amount,
|
||||
date: e.date,
|
||||
mouthSalaryAmount: e.mouthSalaryAmount ? e.mouthSalaryAmount : 0,
|
||||
|
|
@ -183,23 +183,23 @@ async function nextCheckDoc(type: string) {
|
|||
});
|
||||
}
|
||||
|
||||
async function nextCheckDoc2(data: any) {
|
||||
const body = {
|
||||
commanderAboveFullnameDoc2: data.commanderAboveFullname,
|
||||
commanderAbovePositionDoc2: data.commanderAbovePosition,
|
||||
commanderFullnameDoc2: data.commanderFullname,
|
||||
commanderPositionDoc2: data.commanderPosition,
|
||||
};
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.evaluationCheckdocV1(store.evaluateId), body)
|
||||
.then((res) => {})
|
||||
.catch((err) => {})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
fetchCheckStatus();
|
||||
});
|
||||
}
|
||||
// async function nextCheckDoc2(data: any) {
|
||||
// const body = {
|
||||
// commanderAboveFullnameDoc2: data.commanderAboveFullname,
|
||||
// commanderAbovePositionDoc2: data.commanderAbovePosition,
|
||||
// commanderFullnameDoc2: data.commanderFullname,
|
||||
// commanderPositionDoc2: data.commanderPosition,
|
||||
// };
|
||||
// showLoader();
|
||||
// await http
|
||||
// .put(config.API.evaluationCheckdocV1(store.evaluateId), body)
|
||||
// .then((res) => {})
|
||||
// .catch((err) => {})
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// fetchCheckStatus();
|
||||
// });
|
||||
// }
|
||||
|
||||
async function nextPrepareDoc2() {
|
||||
showLoader();
|
||||
|
|
@ -218,6 +218,6 @@ export default {
|
|||
saveEvaluation,
|
||||
nextPrapare,
|
||||
nextCheckDoc,
|
||||
nextCheckDoc2,
|
||||
// nextCheckDoc2,
|
||||
nextPrepareDoc2,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue