Enrich offer card origin, price, and duration
All checks were successful
Build Docker Image / build (push) Successful in 4m40s

This commit is contained in:
Ruslan Bakiev
2026-02-06 17:37:58 +07:00
parent e4f81dba7c
commit 675f46a75e
5 changed files with 83 additions and 11 deletions

View File

@@ -160,13 +160,14 @@
v-for="(offer, index) in offersWithPrice"
:key="offer.uuid ?? index"
:supplier-name="offer.supplierName"
:location-name="offer.locationName || offer.locationCountry || offer.locationName"
:location-name="offer.locationName || offer.locationCountry || offer.country || offer.locationName"
:product-name="offer.productName"
:price-per-unit="offer.pricePerUnit ? Number(offer.pricePerUnit) : null"
:quantity="offer.quantity"
:currency="offer.currency"
:unit="offer.unit"
:stages="getOfferStages(offer)"
:total-time-seconds="offer.routes?.[0]?.totalTimeSeconds ?? null"
@select="onOfferSelect(offer)"
/>
</div>
@@ -465,7 +466,9 @@ const getOfferStages = (offer: InfoOfferItem) => {
.filter((stage): stage is NonNullable<RouteStageType> => stage !== null)
.map(stage => ({
transportType: stage.transportType,
distanceKm: stage.distanceKm
distanceKm: stage.distanceKm,
travelTimeSeconds: stage.travelTimeSeconds,
fromName: stage.fromName
}))
}
</script>