fix: conditional label hq or br
This commit is contained in:
parent
a92dc66503
commit
a1a5e7a8ba
1 changed files with 11 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ import { ref } from 'vue';
|
||||||
|
|
||||||
const color: string[] = ['pink', 'violet'];
|
const color: string[] = ['pink', 'violet'];
|
||||||
|
|
||||||
const props = defineProps<{
|
defineProps<{
|
||||||
subBranch?: boolean;
|
subBranch?: boolean;
|
||||||
rows: {
|
rows: {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
@ -23,7 +23,7 @@ const columns = [
|
||||||
{
|
{
|
||||||
name: 'name',
|
name: 'name',
|
||||||
required: true,
|
required: true,
|
||||||
label: props.subBranch ? 'branchLabel' : 'branchHQLabel',
|
label: 'branchLabel',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
field: (row) => row.name,
|
field: (row) => row.name,
|
||||||
format: (val) => `${val}`,
|
format: (val) => `${val}`,
|
||||||
|
|
@ -76,7 +76,15 @@ const filter = ref('');
|
||||||
style="width: 120px"
|
style="width: 120px"
|
||||||
:style="`${!$q.dark.isActive && i !== 0 ? 'color:gray' : ''}`"
|
:style="`${!$q.dark.isActive && i !== 0 ? 'color:gray' : ''}`"
|
||||||
>
|
>
|
||||||
{{ $t(prop.colsMap[k]?.label) }}
|
{{
|
||||||
|
$t(
|
||||||
|
k === 'name'
|
||||||
|
? subBranch
|
||||||
|
? 'branchLabel'
|
||||||
|
: 'branchHQLabel'
|
||||||
|
: prop.colsMap[k]?.label,
|
||||||
|
)
|
||||||
|
}}
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue