diff --git a/src/api/registry/api.profile.ts b/src/api/registry/api.profile.ts index c4afaf591..c54f86e9b 100644 --- a/src/api/registry/api.profile.ts +++ b/src/api/registry/api.profile.ts @@ -201,7 +201,7 @@ export default { profileVerified: (profileId: string) => `${profile}verified/${profileId}`, profileVerifiedUnlock: (profileId: string) => `${profile}not-verified/${profileId}`, - + profileSendVerified: (profileId: string) => `${profile}send-verified/${profileId}`, registryNew, registryNewId: (id: string) => `${registryNew}${id}`, diff --git a/src/modules/04_registry/components/Profile.vue b/src/modules/04_registry/components/Profile.vue index 40503964b..dff43c81b 100644 --- a/src/modules/04_registry/components/Profile.vue +++ b/src/modules/04_registry/components/Profile.vue @@ -155,7 +155,7 @@
ยืนยันการตรวจสอบข้อมูล + + ส่งข้อมูลไปตรวจสอบ + { + showLoader(); + await http + .put(config.API.profileSendVerified(profileId.value)) + .then((res) => { + checIsVerified(); + success($q, "ส่งข้อมูลไปตรวจสอบสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); + }, + "ยืนยันการส่งข้อมูลไปตรวจสอบ", + "ต้องการยืนยันการส่งข้อมูลไปตรวจสอบหรือไม่?" + ); +} + function onClickUnlock() { dialogConfirm( $q, @@ -1006,6 +1039,7 @@ const fetchData = async () => { }); }; +const isSendVerified = ref(false); async function checIsVerified() { // showLoader(); await http @@ -1014,6 +1048,7 @@ async function checIsVerified() { const data = res.data.result; profileStore.isVerified = data.isVerified; + isSendVerified.value = data.isSendVerified; if (roleRegistryverify.value || roleKeyregistry.value) { if (data.isVerified || roleRegistryverify.value) { profileStore.isEdit = false;