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: [
|
include: [
|
||||||
{ model: RegionData, as: 'sourceRegion', attributes: ['id', 'name'] },
|
{ model: RegionData, as: 'sourceRegion', attributes: ['id', 'name'] },
|
||||||
{ model: RegionData, as: 'targetRegion', 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,
|
model: Vehicle,
|
||||||
as: 'vehicle',
|
as: 'vehicle',
|
||||||
|
|||||||
@@ -146,8 +146,18 @@
|
|||||||
? $t('falukant.branch.sale.runningDirectionOut')
|
? $t('falukant.branch.sale.runningDirectionOut')
|
||||||
: $t('falukant.branch.sale.runningDirectionIn') }}
|
: $t('falukant.branch.sale.runningDirectionIn') }}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ $t(`falukant.product.${t.product.labelTr}`) }}</td>
|
<td>
|
||||||
<td>{{ t.size }}</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.sourceRegion?.name }}</td>
|
||||||
<td>{{ t.targetRegion?.name }}</td>
|
<td>{{ t.targetRegion?.name }}</td>
|
||||||
<td>{{ formatEta(t) }}</td>
|
<td>{{ formatEta(t) }}</td>
|
||||||
|
|||||||
@@ -200,6 +200,7 @@
|
|||||||
"runningDirection": "Richtung",
|
"runningDirection": "Richtung",
|
||||||
"runningProduct": "Artikel",
|
"runningProduct": "Artikel",
|
||||||
"runningQuantity": "Menge",
|
"runningQuantity": "Menge",
|
||||||
|
"runningNoProduct": "Fahrzeugtransport",
|
||||||
"runningSource": "Quelle",
|
"runningSource": "Quelle",
|
||||||
"runningTarget": "Ziel",
|
"runningTarget": "Ziel",
|
||||||
"runningEta": "Ankunft",
|
"runningEta": "Ankunft",
|
||||||
@@ -299,7 +300,7 @@
|
|||||||
"actions": "Aktionen"
|
"actions": "Aktionen"
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"inUse": "In Benutzung (mit Transport verknüpft)",
|
"inUse": "In Benutzung",
|
||||||
"building": "Im Bau",
|
"building": "Im Bau",
|
||||||
"free": "Verfügbar"
|
"free": "Verfügbar"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user