forked from jsnbuchanan/crowd-funder-for-time-pwa
chore: Rename variable for clarity
This commit is contained in:
@@ -125,16 +125,20 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Show offer fulfillment if this give fulfills an offer -->
|
<!-- 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 -->
|
<!-- router-link to /claim/ only changes URL path -->
|
||||||
<a
|
<a
|
||||||
class="text-blue-500 mt-4 cursor-pointer"
|
class="text-blue-500 mt-4 cursor-pointer"
|
||||||
@click="showDifferentClaimPage(offerFulfillment.offerHandleId)"
|
@click="
|
||||||
|
showDifferentClaimPage(
|
||||||
|
detailsForGiveOfferFulfillment.offerHandleId,
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
This fulfills
|
This fulfills
|
||||||
{{
|
{{
|
||||||
capitalizeAndInsertSpacesBeforeCapsWithAPrefix(
|
capitalizeAndInsertSpacesBeforeCapsWithAPrefix(
|
||||||
offerFulfillment.offerType || "Offer",
|
detailsForGiveOfferFulfillment.offerType || "Offer",
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
<font-awesome
|
<font-awesome
|
||||||
@@ -574,7 +578,7 @@ export default class ClaimView extends Vue {
|
|||||||
};
|
};
|
||||||
} | null = null;
|
} | null = null;
|
||||||
// Additional offer information extracted from the fulfills array
|
// Additional offer information extracted from the fulfills array
|
||||||
offerFulfillment: {
|
detailsForGiveOfferFulfillment: {
|
||||||
offerHandleId?: string;
|
offerHandleId?: string;
|
||||||
offerType?: string;
|
offerType?: string;
|
||||||
} | null = null;
|
} | null = null;
|
||||||
@@ -710,7 +714,7 @@ export default class ClaimView extends Vue {
|
|||||||
this.confsVisibleToIdList = [];
|
this.confsVisibleToIdList = [];
|
||||||
this.detailsForGive = null;
|
this.detailsForGive = null;
|
||||||
this.detailsForOffer = null;
|
this.detailsForOffer = null;
|
||||||
this.offerFulfillment = null;
|
this.detailsForGiveOfferFulfillment = null;
|
||||||
this.projectInfo = null;
|
this.projectInfo = null;
|
||||||
this.fullClaim = null;
|
this.fullClaim = null;
|
||||||
this.fullClaimDump = "";
|
this.fullClaimDump = "";
|
||||||
@@ -728,25 +732,25 @@ export default class ClaimView extends Vue {
|
|||||||
*/
|
*/
|
||||||
extractOfferFulfillment() {
|
extractOfferFulfillment() {
|
||||||
if (!this.detailsForGive?.fullClaim?.fulfills) {
|
if (!this.detailsForGive?.fullClaim?.fulfills) {
|
||||||
this.offerFulfillment = null;
|
this.detailsForGiveOfferFulfillment = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const fulfills = this.detailsForGive.fullClaim.fulfills;
|
const fulfills = this.detailsForGive.fullClaim.fulfills;
|
||||||
if (!Array.isArray(fulfills)) {
|
if (!Array.isArray(fulfills)) {
|
||||||
this.offerFulfillment = null;
|
this.detailsForGiveOfferFulfillment = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the Offer in the fulfills array
|
// Find the Offer in the fulfills array
|
||||||
const offerFulfill = fulfills.find((item) => item["@type"] === "Offer");
|
const offerFulfill = fulfills.find((item) => item["@type"] === "Offer");
|
||||||
if (offerFulfill) {
|
if (offerFulfill) {
|
||||||
this.offerFulfillment = {
|
this.detailsForGiveOfferFulfillment = {
|
||||||
offerHandleId: offerFulfill.identifier,
|
offerHandleId: offerFulfill.identifier,
|
||||||
offerType: offerFulfill["@type"],
|
offerType: offerFulfill["@type"],
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
this.offerFulfillment = null;
|
this.detailsForGiveOfferFulfillment = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,9 @@
|
|||||||
<router-link
|
<router-link
|
||||||
:to="
|
:to="
|
||||||
'/project/' +
|
'/project/' +
|
||||||
encodeURIComponent(giveDetails?.fulfillsPlanHandleId || '')
|
encodeURIComponent(
|
||||||
|
giveDetails?.fulfillsPlanHandleId || '',
|
||||||
|
)
|
||||||
"
|
"
|
||||||
class="text-blue-500 mt-2 cursor-pointer"
|
class="text-blue-500 mt-2 cursor-pointer"
|
||||||
>
|
>
|
||||||
@@ -115,19 +117,21 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Show offer fulfillment if this give fulfills an offer -->
|
<!-- Show offer fulfillment if this give fulfills an offer -->
|
||||||
<div v-if="offerFulfillment?.offerHandleId">
|
<div v-if="giveDetailsOfferFulfillment?.offerHandleId">
|
||||||
<!-- router-link to /claim/ only changes URL path -->
|
<!-- router-link to /claim/ only changes URL path -->
|
||||||
<router-link
|
<router-link
|
||||||
:to="
|
:to="
|
||||||
'/claim/' +
|
'/claim/' +
|
||||||
encodeURIComponent(offerFulfillment.offerHandleId || '')
|
encodeURIComponent(
|
||||||
|
giveDetailsOfferFulfillment.offerHandleId || '',
|
||||||
|
)
|
||||||
"
|
"
|
||||||
class="text-blue-500 mt-2 cursor-pointer"
|
class="text-blue-500 mt-2 cursor-pointer"
|
||||||
>
|
>
|
||||||
This fulfills
|
This fulfills
|
||||||
{{
|
{{
|
||||||
capitalizeAndInsertSpacesBeforeCapsWithAPrefix(
|
capitalizeAndInsertSpacesBeforeCapsWithAPrefix(
|
||||||
offerFulfillment.offerType || "Offer",
|
giveDetailsOfferFulfillment.offerType || "Offer",
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
<font-awesome
|
<font-awesome
|
||||||
@@ -490,7 +494,7 @@ export default class ConfirmGiftView extends Vue {
|
|||||||
confsVisibleToIdList: string[] = []; // list of DIDs that can see any confirmer
|
confsVisibleToIdList: string[] = []; // list of DIDs that can see any confirmer
|
||||||
giveDetails?: GiveSummaryRecord;
|
giveDetails?: GiveSummaryRecord;
|
||||||
// Additional offer information extracted from the fulfills array
|
// Additional offer information extracted from the fulfills array
|
||||||
offerFulfillment: {
|
giveDetailsOfferFulfillment: {
|
||||||
offerHandleId?: string;
|
offerHandleId?: string;
|
||||||
offerType?: string;
|
offerType?: string;
|
||||||
} | null = null;
|
} | null = null;
|
||||||
@@ -715,25 +719,25 @@ export default class ConfirmGiftView extends Vue {
|
|||||||
*/
|
*/
|
||||||
private extractOfferFulfillment() {
|
private extractOfferFulfillment() {
|
||||||
if (!this.giveDetails?.fullClaim?.fulfills) {
|
if (!this.giveDetails?.fullClaim?.fulfills) {
|
||||||
this.offerFulfillment = null;
|
this.giveDetailsOfferFulfillment = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const fulfills = this.giveDetails.fullClaim.fulfills;
|
const fulfills = this.giveDetails.fullClaim.fulfills;
|
||||||
if (!Array.isArray(fulfills)) {
|
if (!Array.isArray(fulfills)) {
|
||||||
this.offerFulfillment = null;
|
this.giveDetailsOfferFulfillment = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the Offer in the fulfills array
|
// Find the Offer in the fulfills array
|
||||||
const offerFulfill = fulfills.find((item) => item["@type"] === "Offer");
|
const offerFulfill = fulfills.find((item) => item["@type"] === "Offer");
|
||||||
if (offerFulfill) {
|
if (offerFulfill) {
|
||||||
this.offerFulfillment = {
|
this.giveDetailsOfferFulfillment = {
|
||||||
offerHandleId: offerFulfill.identifier,
|
offerHandleId: offerFulfill.identifier,
|
||||||
offerType: offerFulfill["@type"],
|
offerType: offerFulfill["@type"],
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
this.offerFulfillment = null;
|
this.giveDetailsOfferFulfillment = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user