fix: 02-personnel management layout
This commit is contained in:
parent
bcd81d0f41
commit
de18933332
4 changed files with 155 additions and 129 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
export default {
|
export default {
|
||||||
personnelTitle: 'Personnel',
|
personnelTitle: 'Personnel',
|
||||||
personnelManagement: 'Personnel Management',
|
personnelManagement: 'Personnel Management',
|
||||||
|
personnelManagementCaption: 'Manage All Personnel',
|
||||||
|
|
||||||
personnelTooltipTitle: 'No personnel yet?',
|
personnelTooltipTitle: 'No personnel yet?',
|
||||||
personnelTooltipCaption: 'Click + to add a personnel',
|
personnelTooltipCaption: 'Click + to add a personnel',
|
||||||
personnelAdd: 'Add personnel',
|
personnelAdd: 'Add personnel',
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
export default {
|
export default {
|
||||||
personnelTitle: 'บุคลากร',
|
personnelTitle: 'บุคลากร',
|
||||||
personnelManagement: 'จัดการบุคลากร',
|
personnelManagement: 'จัดการบุคลากร',
|
||||||
|
personnelManagementCaption: 'จัดการบุคลากรทั้งหมด',
|
||||||
|
|
||||||
personnelTooltipTitle: 'ยังไม่มีข้อมูลบุคลากร',
|
personnelTooltipTitle: 'ยังไม่มีข้อมูลบุคลากร',
|
||||||
personnelTooltipCaption: 'คลิก + เพื่อเพิ่มบุคลากร',
|
personnelTooltipCaption: 'คลิก + เพื่อเพิ่มบุคลากร',
|
||||||
personnelAdd: 'เพิ่มบุคลากร',
|
personnelAdd: 'เพิ่มบุคลากร',
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch, computed } from 'vue';
|
import { ref, onMounted, watch, computed } from 'vue';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { dialog } from 'src/stores/utils';
|
import useUtilsStore, { dialog } from 'src/stores/utils';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import useFlowStore from 'src/stores/flow';
|
import useFlowStore from 'src/stores/flow';
|
||||||
import useUserStore from 'stores/user';
|
import useUserStore from 'stores/user';
|
||||||
|
|
@ -34,6 +34,7 @@ import PaginationComponent from 'src/components/PaginationComponent.vue';
|
||||||
|
|
||||||
const { locale } = useI18n();
|
const { locale } = useI18n();
|
||||||
|
|
||||||
|
const utilsStore = useUtilsStore();
|
||||||
const flowStore = useFlowStore();
|
const flowStore = useFlowStore();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const branchStore = useBranchStore();
|
const branchStore = useBranchStore();
|
||||||
|
|
@ -466,6 +467,9 @@ async function assignFormData(idEdit: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
utilsStore.currentTitle.title = 'personnelManagement';
|
||||||
|
utilsStore.currentTitle.caption = 'personnelManagementCaption';
|
||||||
|
|
||||||
await fetchUserList();
|
await fetchUserList();
|
||||||
|
|
||||||
userStore.userOption.roleOpts.length === 0
|
userStore.userOption.roleOpts.length === 0
|
||||||
|
|
@ -548,12 +552,12 @@ watch(inputSearch, async () => await fetchUserList());
|
||||||
></q-fab-action>
|
></q-fab-action>
|
||||||
</ButtonAddComponent>
|
</ButtonAddComponent>
|
||||||
|
|
||||||
<div class="column q-pb-lg">
|
<div class="column full-height">
|
||||||
<div class="text-h6 text-weight-bold q-mb-md">
|
<!-- <div class="text-h6 text-weight-bold q-mb-md">
|
||||||
{{ $t('personnelManagement') }}
|
{{ $t('personnelManagement') }}
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="row full-width q-mb-md no-wrap">
|
<div class="row full-width no-wrap q-pb-md">
|
||||||
<!-- selector -->
|
<!-- selector -->
|
||||||
<SelectorList
|
<SelectorList
|
||||||
:list="selectorList"
|
:list="selectorList"
|
||||||
|
|
@ -587,7 +591,10 @@ watch(inputSearch, async () => await fetchUserList());
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- main -->
|
<!-- main -->
|
||||||
<AppBox bordered class="column" style="width: 100%; min-height: 70vh">
|
<div
|
||||||
|
class="col scroll bordered surface-1 rounded q-pa-md justify-between column no-wrap"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
<div class="row q-mb-md justify-between">
|
<div class="row q-mb-md justify-between">
|
||||||
<q-btn
|
<q-btn
|
||||||
id="btn-filter"
|
id="btn-filter"
|
||||||
|
|
@ -647,7 +654,10 @@ watch(inputSearch, async () => await fetchUserList());
|
||||||
:list="
|
:list="
|
||||||
userData?.result
|
userData?.result
|
||||||
.filter((v) => {
|
.filter((v) => {
|
||||||
if (statusFilter === 'statusACTIVE' && v.status === 'INACTIVE') {
|
if (
|
||||||
|
statusFilter === 'statusACTIVE' &&
|
||||||
|
v.status === 'INACTIVE'
|
||||||
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
|
|
@ -713,6 +723,8 @@ watch(inputSearch, async () => await fetchUserList());
|
||||||
>
|
>
|
||||||
<NoData :not-found="!!inputSearch" />
|
<NoData :not-found="!!inputSearch" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row justify-between q-pt-md" v-if="currentMaxPage > 0">
|
<div class="row justify-between q-pt-md" v-if="currentMaxPage > 0">
|
||||||
<div class="app-text-muted">
|
<div class="app-text-muted">
|
||||||
{{
|
{{
|
||||||
|
|
@ -728,7 +740,7 @@ watch(inputSearch, async () => await fetchUserList());
|
||||||
:fetch-data="async () => await fetchUserList()"
|
:fetch-data="async () => await fetchUserList()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</AppBox>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DrawerInfo
|
<DrawerInfo
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import MenuItem from 'components/home/MenuItem.vue';
|
import MenuItem from 'components/home/MenuItem.vue';
|
||||||
|
import useUtilsStore from 'src/stores/utils';
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
|
||||||
|
const utilsStore = useUtilsStore();
|
||||||
const menu = [
|
const menu = [
|
||||||
{
|
{
|
||||||
value: 'branch-management',
|
value: 'branch-management',
|
||||||
|
|
@ -93,10 +96,17 @@ const menu = [
|
||||||
disabled: true,
|
disabled: true,
|
||||||
},
|
},
|
||||||
] satisfies InstanceType<typeof MenuItem>['$props']['list'];
|
] satisfies InstanceType<typeof MenuItem>['$props']['list'];
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
utilsStore.currentTitle.title = '';
|
||||||
|
utilsStore.currentTitle.caption = '';
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
<MenuItem :list="menu" />
|
<MenuItem :list="menu" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue