Show supplier/origin in offer cards
Some checks failed
Build Docker Image / build (push) Failing after 7m43s
Some checks failed
Build Docker Image / build (push) Failing after 7m43s
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
<OfferResultCard
|
||||
v-for="(option, index) in productRouteOptions"
|
||||
:key="option.sourceUuid ?? index"
|
||||
:supplier-name="getSupplierName(option.sourceUuid)"
|
||||
:location-name="getOfferData(option.sourceUuid)?.locationName"
|
||||
:product-name="productName"
|
||||
:price-per-unit="parseFloat(getOfferData(option.sourceUuid)?.pricePerUnit || '0') || null"
|
||||
@@ -226,6 +227,14 @@ const getKycProfileUuid = (offerUuid?: string | null) => {
|
||||
return supplier?.kycProfileUuid || null
|
||||
}
|
||||
|
||||
const getSupplierName = (offerUuid?: string | null) => {
|
||||
if (!offerUuid) return null
|
||||
const offer = offersData.value.get(offerUuid)
|
||||
if (!offer?.teamUuid) return null
|
||||
const supplier = suppliersData.value.get(offer.teamUuid)
|
||||
return supplier?.name || null
|
||||
}
|
||||
|
||||
// Navigate to offer detail page
|
||||
const navigateToOffer = (offerUuid?: string | null) => {
|
||||
if (!offerUuid) return
|
||||
|
||||
Reference in New Issue
Block a user