Merge branch 'nice_dev' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-02-21 13:00:59 +07:00
commit 7fbe5557c4
2 changed files with 12 additions and 8 deletions

View file

@ -292,15 +292,16 @@ async function changeCardID(citizenId: string | number | null) {
if (citizenId != null && typeof citizenId == "string") {
if (citizenId.length == 13 && citizenId) {
await http
.get(config.API.profileCitizenId(citizenId))
.then((res) => {
console.log(res);
const statusId = res.data.result.citizen;
!statusId &&
dialogMessageNotify($q, "เลขประจำตัวประชาชนนี้มีการใช้งานแล้ว");
.put(config.API.profileNewCitizenId(citizenId), {
citizenId: citizenId,
})
.then(() => {})
.catch((err) => {
messageError($q, err);
if (err.response.data.status === 500) {
dialogMessageNotify($q, err.response.data.message);
} else {
messageError($q, err);
}
});
}
}