feat: add settings page with navigation and access control updates

This commit is contained in:
2026-05-07 15:55:23 +08:00
parent b8ba0ea6a0
commit e8f3d97d6a
10 changed files with 1636 additions and 18 deletions

View File

@@ -319,6 +319,20 @@ const companyProfile = computed(() => ({
adminEmail: bootstrapState.value.company?.admin_email || ''
}))
function updateCompanyProfilePreview(payload = {}) {
const currentCompany = bootstrapState.value.company || {}
bootstrapState.value = {
...bootstrapState.value,
company: {
...currentCompany,
...(payload.name !== undefined ? { name: payload.name } : {}),
...(payload.code !== undefined ? { code: payload.code } : {}),
...(payload.adminEmail !== undefined ? { admin_email: payload.adminEmail } : {})
}
}
}
const isInitialized = computed(() => Boolean(bootstrapState.value.initialized))
function applyBootstrapState(state) {
@@ -527,6 +541,7 @@ export function useSystemState() {
runtimeTesting,
setupError,
setupSubmitting,
syncAuthSession
syncAuthSession,
updateCompanyProfilePreview
}
}