This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-07-23 15:20:52 +07:00
parent 1dc208233c
commit 8f103aeb71
8 changed files with 136 additions and 40 deletions

View file

@ -91,14 +91,22 @@ const fetchlistNotification = async (index: number, type: string) => {
const doLogout = () => {
dialogConfirm(
$q,
() => {
keycloak.logout();
async () => {
// keycloak.logout();
// authen with keycloak client
await deleteCookie("BMAHRIS_KEYCLOAK_IDENTITY");
await deleteCookie("BMAHRIS_KEYCLOAK_REFRESH");
window.location.href = "/login";
},
"ยืนยันการออกจากระบบ",
"ต้องการออกจากระบบใช่หรือไม่"
);
};
function deleteCookie(name: string) {
document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`;
}
const clickDelete = async (id: string, index: number) => {
dialogRemove($q, async () => {
// showLoader();