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

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/`,
requestsEdit: `${profileOrg}/edit`,
developmentUser: `${profileOrg}/development/user`,
upDateNumber:`${profileOrg}/updatePhoneNumber/user`,

View file

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