feat: Personnel => tooltip, add btn, selector
This commit is contained in:
parent
88cf7b032b
commit
1f40ebf228
9 changed files with 72 additions and 29 deletions
BIN
public/personnel-table-dark.png
Normal file
BIN
public/personnel-table-dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
public/personnel-table-light.png
Normal file
BIN
public/personnel-table-light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.8 KiB |
|
|
@ -11,7 +11,7 @@ defineProps<{
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<AppBox bordered class="col-4 q-mr-md">
|
<AppBox bordered>
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item
|
<q-item
|
||||||
v-for="v in list"
|
v-for="v in list"
|
||||||
|
|
@ -36,8 +36,8 @@ defineProps<{
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.active {
|
.active {
|
||||||
color: hsl(var(--main-fg)) !important;
|
color: hsl(var(--info-fg)) !important;
|
||||||
background-color: hsl(var(--main-bg));
|
background-color: hsl(var(--info-bg));
|
||||||
border-radius: var(--radius-3);
|
border-radius: var(--radius-3);
|
||||||
|
|
||||||
.dot {
|
.dot {
|
||||||
|
|
@ -47,7 +47,7 @@ defineProps<{
|
||||||
|
|
||||||
&.dark {
|
&.dark {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: 1px solid hsl(var(--main-bg));
|
border: 1px solid hsl(var(--info-bg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
export default {
|
export default {
|
||||||
branchManagement: 'Branch Management',
|
branchManagement: 'Branch Management',
|
||||||
branchNoMainOfficeYet: 'No main office yet',
|
branchNoMainOfficeYet: 'No main office yet?',
|
||||||
branchClickToCreateMainOffice: 'Click + to create a main office',
|
branchClickToCreateMainOffice: 'Click + to create a main office',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
// This is just an example,
|
// This is just an example,
|
||||||
// so you can safely delete all default props below
|
// so you can safely delete all default props below
|
||||||
|
import main from './main';
|
||||||
import drawerComponent from './drawer-component';
|
import drawerComponent from './drawer-component';
|
||||||
import branchMainPage from './branch-main-page';
|
import branchMainPage from './branch-main-page';
|
||||||
import main from './main';
|
import personnelMainPage from './personnel-main-page';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
ok: 'Confirm',
|
ok: 'Confirm',
|
||||||
|
|
@ -14,7 +15,8 @@ export default {
|
||||||
save: 'Save',
|
save: 'Save',
|
||||||
edit: 'Edit',
|
edit: 'Edit',
|
||||||
delete: 'Delete',
|
delete: 'Delete',
|
||||||
|
...main,
|
||||||
...drawerComponent,
|
...drawerComponent,
|
||||||
...branchMainPage,
|
...branchMainPage,
|
||||||
...main,
|
...personnelMainPage
|
||||||
};
|
};
|
||||||
|
|
|
||||||
5
src/i18n/en-US/personnel-main-page.ts
Normal file
5
src/i18n/en-US/personnel-main-page.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
export default {
|
||||||
|
personnelManagement: 'Personnel Management',
|
||||||
|
personnelTooltipTitle: 'No personnel yet?',
|
||||||
|
personnelTooltipCaption: 'Click + to add a personnel',
|
||||||
|
};
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
import main from './main';
|
||||||
import drawerComponent from './drawer-component';
|
import drawerComponent from './drawer-component';
|
||||||
import branchMainPage from './branch-main-page';
|
import branchMainPage from './branch-main-page';
|
||||||
import main from './main';
|
import personnelMainPage from './personnel-main-page';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
ok: 'ยืนยัน',
|
ok: 'ยืนยัน',
|
||||||
|
|
@ -12,7 +13,8 @@ export default {
|
||||||
save: 'บันทึก',
|
save: 'บันทึก',
|
||||||
edit: 'แก้ไขข้อมูล',
|
edit: 'แก้ไขข้อมูล',
|
||||||
delete: 'ลบข้อมูล',
|
delete: 'ลบข้อมูล',
|
||||||
|
...main,
|
||||||
...drawerComponent,
|
...drawerComponent,
|
||||||
...branchMainPage,
|
...branchMainPage,
|
||||||
...main,
|
...personnelMainPage
|
||||||
};
|
};
|
||||||
|
|
|
||||||
5
src/i18n/th-th/personnel-main-page.ts
Normal file
5
src/i18n/th-th/personnel-main-page.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
export default {
|
||||||
|
personnelManagement: 'จัดการบุคลากร',
|
||||||
|
personnelTooltipTitle: 'ยังไม่มีข้อมูลบุคลากร',
|
||||||
|
personnelTooltipCaption: 'คลิก + เพื่อเพิ่มบุคลากร',
|
||||||
|
};
|
||||||
|
|
@ -5,8 +5,8 @@ import PersonCard from 'src/components/home/PersonCard.vue';
|
||||||
import AppBox from 'components/app/AppBox.vue';
|
import AppBox from 'components/app/AppBox.vue';
|
||||||
import StatCardComponet from 'components/StatCardComponet.vue';
|
import StatCardComponet from 'components/StatCardComponet.vue';
|
||||||
import SelectorList from 'src/components/SelectorList.vue';
|
import SelectorList from 'src/components/SelectorList.vue';
|
||||||
// import BtnAddComponet from 'components/01_branch-management/BtnAddComponet.vue';
|
import BtnAddComponet from 'components/01_branch-management/BtnAddComponet.vue';
|
||||||
// import TooltipComponet from 'src/components/TooltipComponet.vue';
|
import TooltipComponet from 'src/components/TooltipComponet.vue';
|
||||||
|
|
||||||
const selectorLabel = ref('');
|
const selectorLabel = ref('');
|
||||||
|
|
||||||
|
|
@ -77,25 +77,24 @@ const branchStat = ref<
|
||||||
}[]
|
}[]
|
||||||
>([
|
>([
|
||||||
{
|
{
|
||||||
amount: '1',
|
amount: '0',
|
||||||
label: 'สำนักงานใหญ่ 1',
|
label: '-',
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
amount: '2',
|
|
||||||
label: 'สำนักงานใหญ่ 2',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: '3',
|
amount: '0',
|
||||||
label: 'สำนักงานใหญ่ 3',
|
label: '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: '4',
|
amount: '0',
|
||||||
label: 'สำนักงานใหญ่ 4',
|
label: '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
amount: '5',
|
amount: '0',
|
||||||
label: 'สำนักงานใหญ่ 5',
|
label: '-',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
amount: '0',
|
||||||
|
label: '-',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -121,24 +120,54 @@ const selectorList = [
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="column q-pb-lg">
|
<div class="column q-pb-lg">
|
||||||
<div class="text-h6 text-weight-bold q-mb-md">จัดการบุคลากร</div>
|
<div class="text-h6 text-weight-bold q-mb-md">
|
||||||
|
{{ $t('personnelManagement') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row full-width q-mb-md no-wrap">
|
<div class="row full-width q-mb-md no-wrap">
|
||||||
<!-- selector -->
|
<!-- selector -->
|
||||||
<SelectorList :list="selectorList" v-model:selector="selectorLabel" />
|
<SelectorList
|
||||||
|
:list="selectorList"
|
||||||
|
v-model:selector="selectorLabel"
|
||||||
|
class="q-mr-md col-4"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- stat -->
|
<!-- stat -->
|
||||||
<AppBox bordered class="row col-glow" style="overflow-x: auto">
|
<AppBox bordered class="column full-width" style="overflow-x: auto">
|
||||||
<span class="text-weight-bold text-subtitle1">
|
<span class="text-weight-bold text-subtitle1">
|
||||||
สรุปจำนวนข้อมูล{{ selectorLabel }}
|
สรุปจำนวนข้อมูล{{ selectorLabel }}
|
||||||
</span>
|
</span>
|
||||||
<stat-card-componet :branch="branchStat" class="no-wrap" />
|
<div class="row q-pt-lg">
|
||||||
|
<stat-card-componet :branch="branchStat" class="no-wrap" />
|
||||||
|
</div>
|
||||||
</AppBox>
|
</AppBox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- main -->
|
<!-- main -->
|
||||||
<AppBox bordered style="width: 100%; height: 580px; overflow-y: auto">
|
<AppBox bordered style="width: 100%; height: 580px; overflow-y: auto">
|
||||||
<PersonCard :list="person" class="q-mb-md" />
|
<!-- <PersonCard :list="person" class="q-mb-md" /> -->
|
||||||
|
<div class="column" style="height: 100%">
|
||||||
|
<div class="col-1 self-end">
|
||||||
|
<div class="row">
|
||||||
|
<tooltip-componet
|
||||||
|
title="personnelTooltipTitle"
|
||||||
|
caption="personnelTooltipCaption"
|
||||||
|
imgSrc="personnel-table-"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col self-center" style="display: flex; align-items: center">
|
||||||
|
<btn-add-componet
|
||||||
|
:label="'เพิ่มข้อมูลบุคลากร'"
|
||||||
|
@trigger="
|
||||||
|
() => {
|
||||||
|
console.log('test');
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</AppBox>
|
</AppBox>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue