fix: แก้การเเสดง ภาษา

This commit is contained in:
Net 2024-04-22 14:19:35 +07:00
parent 2c8e42aaa5
commit 89ad46a710
2 changed files with 26 additions and 10 deletions

View file

@ -1,13 +1,19 @@
<script setup lang="ts"> <script setup lang="ts">
import AppBox from 'components/app/AppBox.vue'; import AppBox from 'components/app/AppBox.vue';
const props = defineProps<{ const props = withDefaults(
branch: { defineProps<{
count: number; branch: {
label: string; count: number;
}[]; label: string;
dark?: boolean; }[];
}>(); dark?: boolean;
isBranch?: boolean;
}>(),
{
isBranch: false,
},
);
const color = ['pink', 'purple']; const color = ['pink', 'purple'];
</script> </script>
@ -34,7 +40,9 @@ const color = ['pink', 'purple'];
<div class="stat__content"> <div class="stat__content">
<div class="text-h5 text-weight-bold">{{ v.count }}</div> <div class="text-h5 text-weight-bold">{{ v.count }}</div>
<div class="text-weight-bold">{{ v.label }}</div> <div class="text-weight-bold">
{{ isBranch ? $t(v.label) : v.label }}
</div>
</div> </div>
</AppBox> </AppBox>
</div> </div>

View file

@ -382,7 +382,7 @@ watch(locale, () => {
</div> </div>
<AppBox bordered class="q-mb-md"> <AppBox bordered class="q-mb-md">
<StatCard :branch="stats" :dark="$q.dark.isActive" /> <StatCard isBranch :branch="stats" :dark="$q.dark.isActive" />
</AppBox> </AppBox>
<AppBox <AppBox
@ -763,7 +763,15 @@ watch(locale, () => {
v.isHeadOffice ? 'branchHQLabel' : 'branchLabel', v.isHeadOffice ? 'branchHQLabel' : 'branchLabel',
), ),
branchLabelStatus: $t(`status${v.status}`), branchLabelStatus: $t(`status${v.status}`),
}))" }))
.sort((a, b) => {
console.log(a);
if (a.hq) return 1;
// if (!a.hq) return -1;
return 0;
})"
@click=" @click="
() => { () => {
if (item.hq) { if (item.hq) {