update user detail
This commit is contained in:
+2
-3
@@ -2,7 +2,6 @@ import type { StoreBusinessDayOpenStatus, StoreStatus } from "@/types/Store";
|
||||
import { permissionCodes } from "@/utils/permission";
|
||||
import { type Page, useUserStore } from "timi-web";
|
||||
|
||||
export const defaultStoreId = "00000000-0000-0000-0000-000000000001";
|
||||
export const currentStoreIdStorageKey = "gao-customer-h5:current-store-id";
|
||||
|
||||
type LoginUserWithStore = {
|
||||
@@ -21,9 +20,9 @@ type LoginUserWithStore = {
|
||||
export function getCurrentStoreId(): string {
|
||||
const userStore = useUserStore();
|
||||
if (userStore.hasPermissions(permissionCodes.store.read)) {
|
||||
return readStoredCurrentStoreId() || getLoginUserStoreId() || defaultStoreId;
|
||||
return readStoredCurrentStoreId() || getLoginUserStoreId();
|
||||
}
|
||||
return getLoginUserStoreId() || defaultStoreId;
|
||||
return getLoginUserStoreId();
|
||||
}
|
||||
|
||||
export function setCurrentStoreId(storeId: string): void {
|
||||
|
||||
Reference in New Issue
Block a user