0
0
Fork 0

refactor: refs #7186 fixed style and tab

This commit is contained in:
Jon Elias 2024-04-09 13:01:29 +02:00
parent c217e8a1a7
commit 65626446fd
1 changed files with 31 additions and 7 deletions

View File

@ -32,6 +32,13 @@ const invoiceInFormRef = ref();
const expensesRef = ref(); const expensesRef = ref();
const newExpenseRef = ref(); const newExpenseRef = ref();
const $props = defineProps({
actionIcon: {
type: String,
default: 'add',
},
});
const columns = computed(() => [ const columns = computed(() => [
{ {
name: 'expense', name: 'expense',
@ -94,6 +101,11 @@ const columns = computed(() => [
field: (row) => row.foreignValue, field: (row) => row.foreignValue,
align: 'left', align: 'left',
}, },
{
get() {
return $props.actionIcon;
},
}
]); ]);
const filter = { const filter = {
@ -207,17 +219,19 @@ async function addExpense() {
@click.stop="value = null" @click.stop="value = null"
class="cursor-pointer" class="cursor-pointer"
/> />
<QBtn <QIcon
padding="xs" @click.stop.prevent="newExpenseRef.show()"
round :name="actionIcon"
flat :size="actionIcon === 'add' ? 'xs' : 'sm'"
icon="add_circle" :class="['default-icon', { '--add-icon': actionIcon === 'add' }]"
@click.stop="newExpenseRef.show()" :style="{
'font-variation-settings': `'FILL' ${1}`,
}"
> >
<QTooltip> <QTooltip>
{{ t('Create expense') }} {{ t('Create expense') }}
</QTooltip> </QTooltip>
</QBtn> </QIcon>
</template> </template>
</VnSelectFilter> </VnSelectFilter>
</QTd> </QTd>
@ -470,6 +484,16 @@ async function addExpense() {
.q-item { .q-item {
min-height: 0; min-height: 0;
} }
.default-icon {
cursor: pointer;
color: $primary;
border-radius: 50px;
&.--add-icon {
color: var(--vn-text-color);
background-color: $primary;
}
}
</style> </style>
<i18n> <i18n>
es: es: