login
This commit is contained in:
parent
1dc208233c
commit
8f103aeb71
8 changed files with 136 additions and 40 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue