update
This commit is contained in:
parent
c67bcc5d07
commit
d656720a79
@ -36,6 +36,7 @@ export const ConfigProvider = ({children}: { children: React.ReactNode }) => {
|
||||
setConfig({...config, fontFamily})
|
||||
}
|
||||
useEffect(() => {
|
||||
console.log(`APP-BUILD-AT:${buildVersion}`)
|
||||
// init localization use LocalStorage
|
||||
if (config.i18n) {
|
||||
i18n.changeLanguage(config.i18n).then(() => console.log('init localization use', config.i18n))
|
||||
|
@ -174,7 +174,7 @@ const Permission = () => {
|
||||
const roleOptionList = useMemo(() => {
|
||||
const userRole = user?.permissions?.role ?? 'staff';
|
||||
if(userRole == 'root') return RoleOptionList;
|
||||
return RoleOptionList//.filter(it => (it.value == userRole));
|
||||
return RoleOptionList.filter(it => (it.value == userRole));
|
||||
}, [user,state.allList])
|
||||
|
||||
const buildPermission = (it: UserPermission)=>{
|
||||
|
1
src/vite-env.d.ts
vendored
1
src/vite-env.d.ts
vendored
@ -21,6 +21,7 @@ declare const AppConfig: {
|
||||
ldapApiUrl:string;
|
||||
ldapApiKey: string;
|
||||
};
|
||||
declare const buildVersion: string;
|
||||
declare const AppMode: 'test' | 'production' | 'development';
|
||||
declare const AppMode: 'test' | 'production' | 'development';
|
||||
|
||||
|
@ -22,6 +22,7 @@ export default defineConfig(({mode}) => {
|
||||
AUTH_TOKEN_KEY: process.env.AUTH_TOKEN_KEY || 'payment-auth-token',
|
||||
...configs
|
||||
}),
|
||||
buildVersion: JSON.stringify((new Date()).toLocaleString()),
|
||||
AppMode: JSON.stringify(mode)
|
||||
},
|
||||
resolve: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user