เอา บังคับ ออก

This commit is contained in:
setthawutttty 2024-10-22 16:47:22 +07:00
parent 93a4124c89
commit d1316ecb6a
2 changed files with 19 additions and 6 deletions

View file

@ -82,6 +82,7 @@ export default {
* *
*/ */
requestEdit: `${profileOrg}/edit/`, requestEdit: `${profileOrg}/edit/`,
requestsEdit: `${profileOrg}/edit`,
developmentUser: `${profileOrg}/development/user`, developmentUser: `${profileOrg}/development/user`,
upDateNumber:`${profileOrg}/updatePhoneNumber/user`, upDateNumber:`${profileOrg}/updatePhoneNumber/user`,

View file

@ -50,16 +50,24 @@ function closeDialog() {
function onSubmit() { function onSubmit() {
dialogConfirm( dialogConfirm(
$q, $q,
() => { async () => {
showLoader(); showLoader();
http await http
.post(config.API.requestEdit, { .post(config.API.requestsEdit, {
topic: formData.topic, topic: formData.topic,
detail: formData.detail, detail: formData.detail,
profileId: profileId.value, profileId: profileId.value,
}) })
.then((res) => { .then(async (res) => {
createURLUpload(res.data.result, formData.document); if (formData.document) {
createURLUpload(res.data.result, formData.document);
} else {
formData.document = null;
await props.fetchData?.();
await success($q, "บันทึกข้อมูลสำเร็จ");
closeDialog();
hideLoader();
}
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
@ -253,7 +261,11 @@ watch(
: '.pdf,.xlsx,.docx' : '.pdf,.xlsx,.docx'
" "
hide-bottom-space hide-bottom-space
:rules="[(val:any) => !!val || `${'กรุณาเลือกไฟล์'}`]" :rules="formData.topic !== 'ขอปรับปรุงข้อมูลจากกรมการปกครอง' &&
formData.topic !== 'ขอแก้ไขอาชีพ คู่สมรส' &&
formData.topic !== 'ขอแก้ไขอาชีพ บิดา' &&
formData.topic !== 'ขอแก้ไขอาชีพ มารดา' &&
formData.topic !== 'ขอแก้ไขที่อยู่ปัจจุบัน'?[(val:any) => !!val || `${'กรุณาเลือกไฟล์'}`]:''"
/> />
</div> </div>
</div> </div>