This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-07-23 16:33:59 +07:00
parent 900d308f81
commit 6e2d5beee0
8 changed files with 426 additions and 42 deletions

View file

@ -409,12 +409,21 @@ const tagClickPlacement = (tag: string) => {
const doLogout = () => {
dialogConfirm(
$q,
() => keycloak.logout(),
async () => {
await deleteCookie("BMAHRIS_KEYCLOAK_IDENTITY");
await deleteCookie("BMAHRIS_KEYCLOAK_REFRESH");
window.location.href = "/login";
},
// keycloak.logout(),
"ยืนยันการออกจากระบบ",
"ต้องการออกจากระบบใช่หรือไม่?"
);
};
function deleteCookie(name: string) {
document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`;
}
/**
* งชอผใชงานจาก keycloak
*/