fix: icons
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2025-02-13 12:06:53 +01:00
parent 23e029b225
commit b78ab598b7
4 changed files with 73 additions and 91 deletions

View File

@ -689,7 +689,7 @@ const checkbox = ref(null);
:data-col-field="col?.name"
>
<div
class="no-padding no-margin peter"
class="no-padding no-margin"
style="
overflow: hidden;
text-overflow: ellipsis;

View File

@ -32,7 +32,10 @@ const $props = defineProps({
const proposalSelected = ref([]);
const ticketConfig = ref({});
const proposalTableRef = ref(null);
const isLoading = ref(true);
const filterTicketConfig = {
fields: ['lackAlertPrice'],
};
const sale = computed(() => $props.sales[0]);
const saleFk = computed(() => sale.value.saleFk);
const filter = computed(() => ({
@ -77,7 +80,7 @@ const columns = computed(() => [
},
{
align: 'left',
align: 'center',
sortable: true,
label: t('proposal.longName'),
name: 'longName',
@ -85,7 +88,7 @@ const columns = computed(() => [
columnClass: 'expand',
},
{
align: 'left',
align: 'center',
sortable: true,
label: t('item.list.color'),
name: 'tag5',
@ -93,7 +96,7 @@ const columns = computed(() => [
columnClass: 'expand',
},
{
align: 'left',
align: 'center',
sortable: true,
label: t('item.list.stems'),
name: 'tag6',
@ -101,7 +104,7 @@ const columns = computed(() => [
columnClass: 'expand',
},
{
align: 'left',
align: 'center',
sortable: true,
label: t('item.list.producer'),
name: 'tag7',
@ -221,18 +224,20 @@ async function change({ itemFk: substitutionFk }) {
async function handleTicketConfig(data) {
ticketConfig.value = data[0];
isLoading.value = false;
}
</script>
<template>
<FetchData
url="TicketConfigs"
:filter="{ fields: ['lackAlertPrice'] }"
@on-fetch="handleTicketConfig"
:filter="filterTicketConfig"
auto-load
/>
@on-fetch="handleTicketConfig"
></FetchData>
<QSpinner v-if="isLoading" color="primary" size="md"></QSpinner>
<VnTable
v-if="ticketConfig"
v-else
auto-load
data-cy="proposalTable"
ref="proposalTableRef"
@ -242,7 +247,7 @@ async function handleTicketConfig(data) {
:columns="columns"
class="full-width q-mt-md"
row-key="id"
:row-click="change"
redirect="false"
:is-editable="false"
:right-search="false"
:without-header="true"
@ -260,10 +265,10 @@ async function handleTicketConfig(data) {
<QTooltip> {{ statusConditionalValue(row) }}% </QTooltip>
</div>
<div style="flex: 2 0 100%; align-content: center">
<div>
<span class="link">{{ row.longName }}</span>
<ItemDescriptorProxy :id="row.id" />
</div>
<span class="link" @click.stop>
{{ row.longName }}
<ItemDescriptorProxy :id="row.itemFk" />
</span>
</div>
</QTd>
</template>

View File

@ -65,7 +65,7 @@ const columns = computed(() => [
columnFilter: {
component: 'input',
type: 'number',
columnClass: 'shrink',
inWhere: false,
},
},
{

View File

@ -22,14 +22,6 @@ const $props = defineProps({
},
});
watch(
() => $props.filter,
(v) => {
filterLack.value.where = v;
tableRef.value.reload(filterLack);
},
);
const filterLack = ref({
include: [
{
@ -238,65 +230,59 @@ function onBuysFetched(data) {
</template>
<template #column-status="{ row }">
<QTd style="min-width: 150px">
<div class="icon-container">
<QIcon
v-if="row.isBasket"
name="vn:basket"
color="primary"
class="cursor-pointer"
size="xs"
>
<QTooltip>{{ t('negative.detail.isBasket') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.hasToIgnore"
name="star"
color="primary"
class="cursor-pointer fill-icon"
size="xs"
>
<QTooltip>{{ t('negative.detail.hasToIgnore') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.hasObservation"
name="change_circle"
color="primary"
class="cursor-pointer"
size="xs"
>
<QTooltip>{{
t('negative.detail.hasObservation')
}}</QTooltip> </QIcon
><QIcon
v-if="row.isRookie"
name="vn:Person"
size="xs"
color="primary"
class="cursor-pointer"
>
<QTooltip>{{ t('negative.detail.isRookie') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.peticionCompra"
name="vn:buyrequest"
size="xs"
color="primary"
class="cursor-pointer"
>
<QTooltip>{{ t('negative.detail.peticionCompra') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.turno"
name="vn:calendar"
size="xs"
color="primary"
class="cursor-pointer"
>
<QTooltip>{{ t('negative.detail.turno') }}</QTooltip>
</QIcon>
</div></QTd
<QIcon
v-if="row.isBasket"
name="vn:basket"
color="primary"
class="cursor-pointer"
size="xs"
>
<QTooltip>{{ t('negative.detail.isBasket') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.hasToIgnore"
name="star"
color="primary"
class="cursor-pointer fill-icon"
size="xs"
>
<QTooltip>{{ t('negative.detail.hasToIgnore') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.hasObservation"
name="change_circle"
color="primary"
class="cursor-pointer"
size="xs"
>
<QTooltip>{{ t('negative.detail.hasObservation') }}</QTooltip> </QIcon
><QIcon
v-if="row.isRookie"
name="vn:Person"
size="xs"
color="primary"
class="cursor-pointer"
>
<QTooltip>{{ t('negative.detail.isRookie') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.peticionCompra"
name="vn:buyrequest"
size="xs"
color="primary"
class="cursor-pointer"
>
<QTooltip>{{ t('negative.detail.peticionCompra') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.turno"
name="vn:calendar"
size="xs"
color="primary"
class="cursor-pointer"
>
<QTooltip>{{ t('negative.detail.turno') }}</QTooltip>
</QIcon>
</template>
<template #column-nickname="{ row }">
<span class="link" @click.stop>
@ -335,15 +321,6 @@ function onBuysFetched(data) {
</VnTable>
</template>
<style lang="scss" scoped>
.icon-container {
display: grid;
grid-template-columns: repeat(3, 0.2fr);
row-gap: 5px; /* Ajusta el espacio entre los iconos según sea necesario */
}
.icon-container > * {
width: 100%;
height: auto;
}
.list-enter-active,
.list-leave-active {
transition: all 1s ease;