refactor: add virtual branch
This commit is contained in:
parent
fbd56e7cb0
commit
a773fa272d
2 changed files with 15 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ import { storeToRefs } from 'pinia';
|
|||
import { ref, onMounted, computed, watch } from 'vue';
|
||||
import { Icon } from '@iconify/vue';
|
||||
import { BranchContact } from 'stores/branch-contact/types';
|
||||
import { colors, useQuasar } from 'quasar';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { QTableProps } from 'quasar';
|
||||
import { resetScrollBar } from 'src/stores/utils';
|
||||
|
|
@ -210,6 +210,13 @@ async function calculateStats() {
|
|||
label: 'branch.card.branchLabel',
|
||||
color: 'purple',
|
||||
},
|
||||
|
||||
{
|
||||
icon: 'mdi-home-group',
|
||||
count: _stats.virtual,
|
||||
label: 'branch.card.branchVirtual',
|
||||
color: 'blue',
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -281,7 +288,12 @@ const fieldSelectedBranch = ref<{
|
|||
});
|
||||
|
||||
const stats = ref<
|
||||
{ icon: string; count: number; label: string; color: 'pink' | 'purple' }[]
|
||||
{
|
||||
icon: string;
|
||||
count: number;
|
||||
label: string;
|
||||
color: 'pink' | 'purple' | 'blue';
|
||||
}[]
|
||||
>([]);
|
||||
|
||||
const modeView = ref<boolean>(false);
|
||||
|
|
|
|||
|
|
@ -264,6 +264,7 @@ const useBranchStore = defineStore('api-branch', () => {
|
|||
const res = await api.get<{
|
||||
hq: number;
|
||||
br: number;
|
||||
virtual: number;
|
||||
}>('/branch/stats', {
|
||||
headers: {
|
||||
'X-Rtid': flowStore.rtid,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue