fix:convertDateToAPI
This commit is contained in:
parent
97aa731d2f
commit
1fc7882918
8 changed files with 42 additions and 13 deletions
|
|
@ -27,6 +27,7 @@ const {
|
|||
hideLoader,
|
||||
date2Thai,
|
||||
calculateDurationYmd,
|
||||
convertDateToAPI,
|
||||
} = useCounterMixin();
|
||||
|
||||
/**
|
||||
|
|
@ -77,7 +78,12 @@ function onSubmit() {
|
|||
dialogConfirm($q, () => {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.devUploadUser + projectId.value, formData)
|
||||
.post(config.API.devUploadUser + projectId.value, {
|
||||
...formData,
|
||||
dateStart: convertDateToAPI(formData.dateStart),
|
||||
dateEnd: convertDateToAPI(formData.dateEnd),
|
||||
commandDate: convertDateToAPI(formData.commandDate),
|
||||
})
|
||||
.then(async (res) => {
|
||||
await props?.fetchData();
|
||||
tab.value = res.data.result ? "IN" : "OUT";
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ const {
|
|||
messageError,
|
||||
dialogConfirm,
|
||||
success,
|
||||
convertDateToAPI,
|
||||
} = mixin;
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
|
||||
|
|
@ -61,8 +62,8 @@ function onSubmit() {
|
|||
.put(config.API.devScholarship + `/admin/detail/${id.value}`, {
|
||||
bookNumber: bookNumber.value,
|
||||
bookDate: bookDate.value,
|
||||
governmentDate: governmentDate.value,
|
||||
governmentEndDate: governmentEndDate.value,
|
||||
governmentDate: convertDateToAPI(governmentDate.value),
|
||||
governmentEndDate: convertDateToAPI(governmentEndDate.value),
|
||||
isGraduated: isGraduated.value,
|
||||
graduatedDate:
|
||||
isGraduated.value == "true" ? graduatedDate.value : null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue