feat: add group management page and update translations
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s

This commit is contained in:
puriphatt 2025-07-07 15:29:18 +07:00
parent 1e34f18366
commit 8b2e3f76c4
5 changed files with 79 additions and 0 deletions

View file

@ -202,6 +202,7 @@ export default {
title: 'Manage',
branch: 'Branch',
personnel: 'Personnel',
group: 'group',
productService: 'Product and Service',
workflow: 'Workflow',
property: 'Property',

View file

@ -202,6 +202,7 @@ export default {
title: 'จัดการ',
branch: 'สาขา',
personnel: 'บุคลากร',
group: 'กลุ่ม',
productService: 'สินค้าและบริการ',
workflow: 'ขั้นตอนการทำงาน',
property: 'คุณสมบัติ',

View file

@ -78,6 +78,11 @@ function initMenu() {
route: '/personnel-management',
hidden: !canAccess('personnel'),
},
{
label: 'group',
route: '/group-management',
hidden: !canAccess('personnel'),
},
{
label: 'workflow',
route: '/workflow',

View file

@ -0,0 +1,67 @@
<script setup lang="ts">
import { onMounted, ref, watch } from 'vue';
import { getInstance } from 'src/services/keycloak';
import { useNavigator } from 'src/stores/navigator';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
import { initLang } from 'src/utils/ui';
const $q = useQuasar();
const { locale } = useI18n();
const navigatorStore = useNavigator();
const EDM_SERVICE = import.meta.env.VITE_EDM_MICRO_FRONTEND_URL;
const kc = getInstance();
const at = ref(kc.token);
const rt = ref(kc.refreshToken);
const iframe = ref<InstanceType<typeof HTMLIFrameElement>>();
function sendMessage() {
iframe?.value?.contentWindow?.postMessage(
{
i18n: locale.value,
darkMode: $q.dark.isActive,
},
'*',
);
}
onMounted(() => {
initLang();
currentLocale.value = locale.value;
navigatorStore.current.title = 'menu.dms';
navigatorStore.current.path = [
{
text: '',
i18n: true,
handler: () => {},
},
];
sendMessage();
});
watch(
() => kc.token,
() => {
at.value = kc.token;
rt.value = kc.refreshToken;
},
);
watch([locale, $q.dark], () => {
sendMessage();
});
const currentLocale = ref(locale.value);
</script>
<template>
<iframe
ref="iframe"
:src="`${EDM_SERVICE}/?at=${at}&rt=${rt}&lang=${currentLocale}/user`"
frameborder="0"
class="full-width full-height rounded"
allowtransparency="true"
></iframe>
</template>
<style scoped></style>

View file

@ -90,6 +90,11 @@ const routes: RouteRecordRaw[] = [
name: 'document-management',
component: () => import('pages/06_edm/MainPage.vue'),
},
{
path: '/group-management',
name: '/group-management',
component: () => import('pages/02_group-management/MainPage.vue'),
},
{
path: '/agencies-management',
name: 'agencies-management',