Merge branch 'develop' into nice_dev
This commit is contained in:
commit
788620f4e3
11 changed files with 178 additions and 32 deletions
|
|
@ -15,7 +15,7 @@
|
|||
{{ header }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!profileStore.isVerified">
|
||||
<div v-if="profileStore.isEdit">
|
||||
<div class="q-gutter-sm q-mx-sm" v-if="addData == false">
|
||||
<q-btn
|
||||
size="12px"
|
||||
|
|
|
|||
|
|
@ -918,7 +918,21 @@ const roleRegistryverify = ref<boolean>(false);
|
|||
function onClickVerified() {
|
||||
dialogConfirm(
|
||||
$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() {
|
||||
dialogConfirm(
|
||||
$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,16 @@ async function checIsVerified() {
|
|||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
|
||||
profileStore.isVerified = data.isVerified
|
||||
? true
|
||||
: roleRegistryverify.value
|
||||
? true
|
||||
: roleKeyregistry.value
|
||||
? false
|
||||
: false;
|
||||
profileStore.isVerified = data.isVerified;
|
||||
if (roleRegistryverify.value || roleKeyregistry.value) {
|
||||
if (data.isVerified || roleRegistryverify.value) {
|
||||
profileStore.isEdit = false;
|
||||
} else {
|
||||
profileStore.isEdit = true;
|
||||
}
|
||||
} else {
|
||||
profileStore.isEdit = true;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue