feat: เพิ่ม รูป

This commit is contained in:
Net 2024-07-03 14:13:22 +07:00 committed by Methapon2001
parent 6041ffd159
commit 12c17dfd06
3 changed files with 29 additions and 11 deletions

View file

@ -99,8 +99,18 @@ async function calculateStats() {
if (_stats) { if (_stats) {
stats.value = [ stats.value = [
{ count: _stats.hq, label: 'branchHQLabel', color: 'pink' }, {
{ count: _stats.br, label: 'branchLabel', color: 'purple' }, icon: 'mdi-home',
count: _stats.hq,
label: 'branchHQLabel',
color: 'pink',
},
{
icon: 'mdi-office-building',
count: _stats.br,
label: 'branchLabel',
color: 'purple',
},
]; ];
} }
} }
@ -140,9 +150,9 @@ const fieldSelectedBranch = ref<{
value: 'branchHQLabel', value: 'branchHQLabel',
}); });
const stats = ref<{ count: number; label: string; color: 'pink' | 'purple' }[]>( const stats = ref<
[], { icon: string; count: number; label: string; color: 'pink' | 'purple' }[]
); >([]);
const defaultFormData = { const defaultFormData = {
headOfficeId: null, headOfficeId: null,
@ -379,11 +389,13 @@ async function onSubmit() {
if (_stats) { if (_stats) {
stats.value = [ stats.value = [
{ {
icon: 'mdi-home',
count: _stats.hq, count: _stats.hq,
label: 'branchHQLabel', label: 'branchHQLabel',
color: 'pink', color: 'pink',
}, },
{ {
icon: 'mdi-domain',
count: _stats.br, count: _stats.br,
label: 'branchLabel', label: 'branchLabel',
color: 'purple', color: 'purple',

View file

@ -1299,7 +1299,7 @@ watch([inputSearch, currentStatus], async () => {
<q-fab-action <q-fab-action
v-if="selectorLabel === 'EMPLOYER' || !selectorLabel" v-if="selectorLabel === 'EMPLOYER' || !selectorLabel"
id="add-customer-legal-entity" id="add-customer-legal-entity"
style="color: white; background-color: hsla(var(--purple-11-hsl))" style="color: white; background-color: hsla(var(--violet-11-hsl))"
@click="triggerCreate('CORP')" @click="triggerCreate('CORP')"
padding="xs" padding="xs"
icon="mdi-office-building" icon="mdi-office-building"
@ -1314,7 +1314,7 @@ watch([inputSearch, currentStatus], async () => {
external-label external-label
label-position="left" label-position="left"
@click="triggerCreate('PERS')" @click="triggerCreate('PERS')"
style="color: white; background-color: hsla(var(--teal-9-hsl))" style="color: white; background-color: hsla(var(--teal-10-hsl))"
padding="xs" padding="xs"
icon="mdi-account-plus" icon="mdi-account-plus"
></q-fab-action> ></q-fab-action>

View file

@ -93,15 +93,21 @@ const { workNameItems } = storeToRefs(productServiceStore);
const stat = ref< const stat = ref<
{ {
icon: string;
count: number; count: number;
label: string; label: string;
color: 'pink' | 'purple' | 'green' | 'orange'; color: 'pink' | 'purple' | 'green' | 'orange';
}[] }[]
>([ >([
{ count: 0, label: 'productAndService', color: 'pink' }, { icon: 'mdi-folder', count: 0, label: 'productAndService', color: 'pink' },
{ count: 0, label: 'productAndServiceType', color: 'purple' }, {
{ count: 0, label: 'service', color: 'orange' }, icon: 'mdi-folder',
{ count: 0, label: 'product', color: 'green' }, count: 0,
label: 'productAndServiceType',
color: 'purple',
},
{ icon: 'mdi-folder', count: 0, label: 'service', color: 'orange' },
{ icon: 'mdi-folder', count: 0, label: 'product', color: 'green' },
]); ]);
const { t } = useI18n(); const { t } = useI18n();