ทะเบียนประวัติ ยืนยันตรวจสอบข้อมูลและปลดล็อค
This commit is contained in:
parent
6e6e0d2cf9
commit
4e8cff183a
3 changed files with 43 additions and 10 deletions
|
|
@ -196,4 +196,8 @@ export default {
|
||||||
|
|
||||||
//สร้างข้อมูลราชการ
|
//สร้างข้อมูลราชการ
|
||||||
createProfileOfficer: () => `${profile}information/officer`,
|
createProfileOfficer: () => `${profile}information/officer`,
|
||||||
|
|
||||||
|
// verify
|
||||||
|
profileVerified: (profileId: string) => `${profile}verified/${profileId}`,
|
||||||
|
profileVerifiedUnlock: (profileId: string) => `${profile}not-verified/${profileId}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -918,7 +918,21 @@ const roleRegistryverify = ref<boolean>(false);
|
||||||
function onClickVerified() {
|
function onClickVerified() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {},
|
async () => {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.put(config.API.profileVerified(profileId.value))
|
||||||
|
.then((res) => {
|
||||||
|
checIsVerified();
|
||||||
|
success($q, "ยืนยันการตรวจสอบข้อมูลสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
},
|
||||||
"ยืนยันการตรวจสอบข้อมูล",
|
"ยืนยันการตรวจสอบข้อมูล",
|
||||||
"ต้องการยืนยันการตรวจสอบข้อมูลนี้หรือไม่?"
|
"ต้องการยืนยันการตรวจสอบข้อมูลนี้หรือไม่?"
|
||||||
);
|
);
|
||||||
|
|
@ -927,7 +941,21 @@ function onClickVerified() {
|
||||||
function onClickUnlock() {
|
function onClickUnlock() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {},
|
async () => {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.put(config.API.profileVerifiedUnlock(profileId.value))
|
||||||
|
.then((res) => {
|
||||||
|
checIsVerified();
|
||||||
|
success($q, "ปลดล็อคให้แก้ไขข้อมูลสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
},
|
||||||
"ยืนยันการปลดให้แก้ไขข้อมูล",
|
"ยืนยันการปลดให้แก้ไขข้อมูล",
|
||||||
"ต้องการยืนยันการปลดให้แก้ไขข้อมูลนี้หรือไม่?"
|
"ต้องการยืนยันการปลดให้แก้ไขข้อมูลนี้หรือไม่?"
|
||||||
);
|
);
|
||||||
|
|
@ -985,13 +1013,14 @@ async function checIsVerified() {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
profileStore.isVerified = data.isVerified
|
profileStore.isVerified = data.isVerified;
|
||||||
? true
|
// profileStore.isVerified = data.isVerified
|
||||||
: roleRegistryverify.value
|
// ? true
|
||||||
? true
|
// : roleRegistryverify.value
|
||||||
: roleKeyregistry.value
|
// ? true
|
||||||
? false
|
// : roleKeyregistry.value
|
||||||
: false;
|
// ? false
|
||||||
|
// : false;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@
|
||||||
v-if="props.row.isVerified"
|
v-if="props.row.isVerified"
|
||||||
name="verified"
|
name="verified"
|
||||||
color="green"
|
color="green"
|
||||||
size="2rem"
|
size="1.4rem"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'fullname'">
|
<div v-else-if="col.name == 'fullname'">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue