|
|
@ -125,16 +125,20 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- Show offer fulfillment if this give fulfills an offer --> |
|
|
|
<div v-if="offerFulfillment?.offerHandleId"> |
|
|
|
<div v-if="detailsForGiveOfferFulfillment?.offerHandleId"> |
|
|
|
<!-- router-link to /claim/ only changes URL path --> |
|
|
|
<a |
|
|
|
class="text-blue-500 mt-4 cursor-pointer" |
|
|
|
@click="showDifferentClaimPage(offerFulfillment.offerHandleId)" |
|
|
|
@click=" |
|
|
|
showDifferentClaimPage( |
|
|
|
detailsForGiveOfferFulfillment.offerHandleId, |
|
|
|
) |
|
|
|
" |
|
|
|
> |
|
|
|
This fulfills |
|
|
|
{{ |
|
|
|
capitalizeAndInsertSpacesBeforeCapsWithAPrefix( |
|
|
|
offerFulfillment.offerType || "Offer", |
|
|
|
detailsForGiveOfferFulfillment.offerType || "Offer", |
|
|
|
) |
|
|
|
}} |
|
|
|
<font-awesome |
|
|
@ -185,7 +189,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -574,7 +578,7 @@ export default class ClaimView extends Vue { |
|
|
|
}; |
|
|
|
} | null = null; |
|
|
|
// Additional offer information extracted from the fulfills array |
|
|
|
offerFulfillment: { |
|
|
|
detailsForGiveOfferFulfillment: { |
|
|
|
offerHandleId?: string; |
|
|
|
offerType?: string; |
|
|
|
} | null = null; |
|
|
@ -710,7 +714,7 @@ export default class ClaimView extends Vue { |
|
|
|
this.confsVisibleToIdList = []; |
|
|
|
this.detailsForGive = null; |
|
|
|
this.detailsForOffer = null; |
|
|
|
this.offerFulfillment = null; |
|
|
|
this.detailsForGiveOfferFulfillment = null; |
|
|
|
this.projectInfo = null; |
|
|
|
this.fullClaim = null; |
|
|
|
this.fullClaimDump = ""; |
|
|
@ -728,25 +732,25 @@ export default class ClaimView extends Vue { |
|
|
|
*/ |
|
|
|
extractOfferFulfillment() { |
|
|
|
if (!this.detailsForGive?.fullClaim?.fulfills) { |
|
|
|
this.offerFulfillment = null; |
|
|
|
this.detailsForGiveOfferFulfillment = null; |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
const fulfills = this.detailsForGive.fullClaim.fulfills; |
|
|
|
if (!Array.isArray(fulfills)) { |
|
|
|
this.offerFulfillment = null; |
|
|
|
this.detailsForGiveOfferFulfillment = null; |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// Find the Offer in the fulfills array |
|
|
|
const offerFulfill = fulfills.find((item) => item["@type"] === "Offer"); |
|
|
|
if (offerFulfill) { |
|
|
|
this.offerFulfillment = { |
|
|
|
this.detailsForGiveOfferFulfillment = { |
|
|
|
offerHandleId: offerFulfill.identifier, |
|
|
|
offerType: offerFulfill["@type"], |
|
|
|
}; |
|
|
|
} else { |
|
|
|
this.offerFulfillment = null; |
|
|
|
this.detailsForGiveOfferFulfillment = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -815,7 +819,7 @@ export default class ClaimView extends Vue { |
|
|
|
* @param prefix - Optional prefix to add |
|
|
|
* @returns Formatted string |
|
|
|
*/ |
|
|
|
capitalizeAndInsertSpacesBeforeCapsWithAPrefix(text: string): string { |
|
|
|
capitalizeAndInsertSpacesBeforeCapsWithAPrefix(text: string): string { |
|
|
|
const word = this.capitalizeAndInsertSpacesBeforeCaps(text); |
|
|
|
if (word) { |
|
|
|
// if the word starts with a vowel, use "an" instead of "a" |
|
|
|