Enhance FalukantService and UI components for improved product handling
- Updated FalukantService to allow optional inclusion of productType in queries, enhancing flexibility in data retrieval. - Modified SaleSection.vue to conditionally display product information and size, improving user experience by handling cases with no product. - Added new German translation for 'runningNoProduct' to enhance localization support for users.
This commit is contained in:
@@ -1014,7 +1014,7 @@ class FalukantService extends BaseService {
|
||||
include: [
|
||||
{ model: RegionData, as: 'sourceRegion', attributes: ['id', 'name'] },
|
||||
{ model: RegionData, as: 'targetRegion', attributes: ['id', 'name'] },
|
||||
{ model: ProductType, as: 'productType', attributes: ['id', 'labelTr'] },
|
||||
{ model: ProductType, as: 'productType', required: false, attributes: ['id', 'labelTr'] },
|
||||
{
|
||||
model: Vehicle,
|
||||
as: 'vehicle',
|
||||
|
||||
@@ -146,8 +146,18 @@
|
||||
? $t('falukant.branch.sale.runningDirectionOut')
|
||||
: $t('falukant.branch.sale.runningDirectionIn') }}
|
||||
</td>
|
||||
<td>{{ $t(`falukant.product.${t.product.labelTr}`) }}</td>
|
||||
<td>{{ t.size }}</td>
|
||||
<td>
|
||||
<span v-if="t.product && t.product.labelTr">
|
||||
{{ $t(`falukant.product.${t.product.labelTr}`) }}
|
||||
</span>
|
||||
<span v-else class="no-product">
|
||||
{{ $t('falukant.branch.sale.runningNoProduct') }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="t.product && t.size > 0">{{ t.size }}</span>
|
||||
<span v-else>—</span>
|
||||
</td>
|
||||
<td>{{ t.sourceRegion?.name }}</td>
|
||||
<td>{{ t.targetRegion?.name }}</td>
|
||||
<td>{{ formatEta(t) }}</td>
|
||||
|
||||
@@ -200,6 +200,7 @@
|
||||
"runningDirection": "Richtung",
|
||||
"runningProduct": "Artikel",
|
||||
"runningQuantity": "Menge",
|
||||
"runningNoProduct": "Fahrzeugtransport",
|
||||
"runningSource": "Quelle",
|
||||
"runningTarget": "Ziel",
|
||||
"runningEta": "Ankunft",
|
||||
@@ -299,7 +300,7 @@
|
||||
"actions": "Aktionen"
|
||||
},
|
||||
"status": {
|
||||
"inUse": "In Benutzung (mit Transport verknüpft)",
|
||||
"inUse": "In Benutzung",
|
||||
"building": "Im Bau",
|
||||
"free": "Verfügbar"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user