fix: refs #7717 fix OrderList table filters' and summary table style

This commit is contained in:
Jon Elias 2024-07-26 14:09:09 +02:00
parent cc518d5a80
commit d588db05ac
2 changed files with 40 additions and 35 deletions

View File

@ -180,15 +180,17 @@ const detailsColumns = ref([
<ItemDescriptorProxy :id="props.row.item?.id" /> <ItemDescriptorProxy :id="props.row.item?.id" />
</span> </span>
</QTd> </QTd>
<QTd key="description" :props="props" class="description"> <QTd key="description" :props="props">
<div class="name"> <div class="description">
<span>{{ props.row.item.name }}</span> <div class="name">
<span {{ props.row.item.name }}
v-if="props.row.item.subName" <span
class="subName" v-if="props.row.item.subName"
> class="subName"
{{ props.row.item.subName }} >
</span> {{ props.row.item.subName }}
</span>
</div>
</div> </div>
<FetchedTags :item="props.row.item" :max-length="5" /> <FetchedTags :item="props.row.item" :max-length="5" />
</QTd> </QTd>
@ -228,24 +230,13 @@ const detailsColumns = ref([
} }
.description { .description {
display: flex;
flex-direction: column;
justify-content: center;
text-align: left; text-align: left;
height: auto; padding-top: 15px;
padding-top: 12px; padding-bottom: 15px;
padding-bottom: 12px;
.name { .name {
display: flex;
align-items: center;
padding-bottom: 8px;
& > * {
flex: 1;
}
.subName { .subName {
margin-left: 5%;
text-transform: uppercase; text-transform: uppercase;
color: var(--vn-label-color); color: var(--vn-label-color);
} }

View File

@ -29,7 +29,7 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
name: 'clientName', name: 'clientFk',
label: t('module.customer'), label: t('module.customer'),
isTitle: true, isTitle: true,
cardVisible: true, cardVisible: true,
@ -41,20 +41,26 @@ const columns = computed(() => [
columnField: { columnField: {
component: null, component: null,
}, },
format: (row) => row?.clientName,
}, },
{ {
align: 'left', align: 'left',
name: 'name', name: 'salesPersonFk',
label: t('module.salesPerson'), label: t('module.salesPerson'),
component: 'select', columnFilter: {
attrs: { component: 'select',
url: 'Workers/activeWithInheritedRole', inWhere: true,
fields: ['id', 'name'], attrs: {
where: { role: 'salesPerson' }, url: 'Workers/activeWithInheritedRole',
}, fields: ['id', 'name'],
columnField: { where: { role: 'salesPerson' },
component: null, useLike: false,
optionValue: 'id',
optionLabel: 'name',
optionFilter: 'firstName',
},
}, },
format: (row) => row?.name,
}, },
{ {
align: 'left', align: 'left',
@ -92,22 +98,30 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
name: 'agencyName', name: 'agencyModeFk',
label: t('module.agency'), label: t('module.agency'),
component: 'select', component: 'select',
cardVisible: true, cardVisible: true,
attrs: { attrs: {
url: 'Agencies', url: 'agencyModes',
fields: ['id', 'name'], fields: ['id', 'name'],
find: {
value: 'agencyModeFk',
label: 'agencyName',
},
}, },
columnField: { columnField: {
component: null, component: null,
}, },
format: (row) => row?.agencyName,
}, },
{ {
align: 'left', align: 'left',
name: 'total', name: 'total',
label: t('module.total'), label: t('module.total'),
columnFilter: {
inWhere: true,
},
format: ({ total }) => toCurrency(total), format: ({ total }) => toCurrency(total),
cardVisible: true, cardVisible: true,
}, },