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>
|
||||
<template>
|
||||
<AppBox bordered class="col-4 q-mr-md">
|
||||
<AppBox bordered>
|
||||
<q-list>
|
||||
<q-item
|
||||
v-for="v in list"
|
||||
|
|
@ -36,8 +36,8 @@ defineProps<{
|
|||
|
||||
<style scoped>
|
||||
.active {
|
||||
color: hsl(var(--main-fg)) !important;
|
||||
background-color: hsl(var(--main-bg));
|
||||
color: hsl(var(--info-fg)) !important;
|
||||
background-color: hsl(var(--info-bg));
|
||||
border-radius: var(--radius-3);
|
||||
|
||||
.dot {
|
||||
|
|
@ -47,7 +47,7 @@ defineProps<{
|
|||
|
||||
&.dark {
|
||||
background-color: transparent;
|
||||
border: 1px solid hsl(var(--main-bg));
|
||||
border: 1px solid hsl(var(--info-bg));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
export default {
|
||||
branchManagement: 'Branch Management',
|
||||
branchNoMainOfficeYet: 'No main office yet',
|
||||
branchNoMainOfficeYet: 'No main office yet?',
|
||||
branchClickToCreateMainOffice: 'Click + to create a main office',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
// This is just an example,
|
||||
// so you can safely delete all default props below
|
||||
import main from './main';
|
||||
import drawerComponent from './drawer-component';
|
||||
import branchMainPage from './branch-main-page';
|
||||
import main from './main';
|
||||
import personnelMainPage from './personnel-main-page';
|
||||
|
||||
export default {
|
||||
ok: 'Confirm',
|
||||
|
|
@ -14,7 +15,8 @@ export default {
|
|||
save: 'Save',
|
||||
edit: 'Edit',
|
||||
delete: 'Delete',
|
||||
...main,
|
||||
...drawerComponent,
|
||||
...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 branchMainPage from './branch-main-page';
|
||||
import main from './main';
|
||||
import personnelMainPage from './personnel-main-page';
|
||||
|
||||
export default {
|
||||
ok: 'ยืนยัน',
|
||||
|
|
@ -12,7 +13,8 @@ export default {
|
|||
save: 'บันทึก',
|
||||
edit: 'แก้ไขข้อมูล',
|
||||
delete: 'ลบข้อมูล',
|
||||
...main,
|
||||
...drawerComponent,
|
||||
...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 StatCardComponet from 'components/StatCardComponet.vue';
|
||||
import SelectorList from 'src/components/SelectorList.vue';
|
||||
// import BtnAddComponet from 'components/01_branch-management/BtnAddComponet.vue';
|
||||
// import TooltipComponet from 'src/components/TooltipComponet.vue';
|
||||
import BtnAddComponet from 'components/01_branch-management/BtnAddComponet.vue';
|
||||
import TooltipComponet from 'src/components/TooltipComponet.vue';
|
||||
|
||||
const selectorLabel = ref('');
|
||||
|
||||
|
|
@ -77,25 +77,24 @@ const branchStat = ref<
|
|||
}[]
|
||||
>([
|
||||
{
|
||||
amount: '1',
|
||||
label: 'สำนักงานใหญ่ 1',
|
||||
},
|
||||
|
||||
{
|
||||
amount: '2',
|
||||
label: 'สำนักงานใหญ่ 2',
|
||||
amount: '0',
|
||||
label: '-',
|
||||
},
|
||||
{
|
||||
amount: '3',
|
||||
label: 'สำนักงานใหญ่ 3',
|
||||
amount: '0',
|
||||
label: '-',
|
||||
},
|
||||
{
|
||||
amount: '4',
|
||||
label: 'สำนักงานใหญ่ 4',
|
||||
amount: '0',
|
||||
label: '-',
|
||||
},
|
||||
{
|
||||
amount: '5',
|
||||
label: 'สำนักงานใหญ่ 5',
|
||||
amount: '0',
|
||||
label: '-',
|
||||
},
|
||||
{
|
||||
amount: '0',
|
||||
label: '-',
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
@ -121,24 +120,54 @@ const selectorList = [
|
|||
|
||||
<template>
|
||||
<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">
|
||||
<!-- selector -->
|
||||
<SelectorList :list="selectorList" v-model:selector="selectorLabel" />
|
||||
<SelectorList
|
||||
:list="selectorList"
|
||||
v-model:selector="selectorLabel"
|
||||
class="q-mr-md col-4"
|
||||
/>
|
||||
|
||||
<!-- 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">
|
||||
สรุปจำนวนข้อมูล{{ selectorLabel }}
|
||||
</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>
|
||||
</div>
|
||||
|
||||
<!-- main -->
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue