|
@ -89,7 +89,7 @@ |
|
|
<!-- Fullfills Links --> |
|
|
<!-- Fullfills Links --> |
|
|
|
|
|
|
|
|
<!-- fullfills links for a give --> |
|
|
<!-- fullfills links for a give --> |
|
|
<div v-if="detailsForGive?.fulfillsPlanHandleId"> |
|
|
<div v-if="detailsForGive?.fulfillsPlanHandleId" class="mt-4"> |
|
|
<router-link |
|
|
<router-link |
|
|
:to=" |
|
|
:to=" |
|
|
'/project/' + |
|
|
'/project/' + |
|
@ -113,7 +113,7 @@ |
|
|
@click=" |
|
|
@click=" |
|
|
showDifferentClaimPage(detailsForGive?.fulfillsHandleId) |
|
|
showDifferentClaimPage(detailsForGive?.fulfillsHandleId) |
|
|
" |
|
|
" |
|
|
class="text-blue-500 mt-4" |
|
|
class="text-blue-500 mt-4 cursor-pointer" |
|
|
> |
|
|
> |
|
|
Fulfills |
|
|
Fulfills |
|
|
{{ |
|
|
{{ |
|
@ -136,6 +136,41 @@ |
|
|
Offered to a bigger plan... |
|
|
Offered to a bigger plan... |
|
|
</router-link> |
|
|
</router-link> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Providers --> |
|
|
|
|
|
<div v-if="providersForGive?.length > 0" class="mt-4"> |
|
|
|
|
|
<span>Other assistance provided by:</span> |
|
|
|
|
|
<ul class="ml-4"> |
|
|
|
|
|
<li |
|
|
|
|
|
v-for="provider of providersForGive" |
|
|
|
|
|
:key="provider.identifier" |
|
|
|
|
|
class="list-disc ml-4" |
|
|
|
|
|
> |
|
|
|
|
|
<div class="flex gap-4"> |
|
|
|
|
|
<div class="grow overflow-hidden"> |
|
|
|
|
|
<a |
|
|
|
|
|
@click=" |
|
|
|
|
|
provider.identifier.startsWith('did:') |
|
|
|
|
|
? this.$router.push( |
|
|
|
|
|
'/did/' + |
|
|
|
|
|
encodeURIComponent(provider.identifier), |
|
|
|
|
|
) |
|
|
|
|
|
: showDifferentClaimPage(provider.identifier) |
|
|
|
|
|
" |
|
|
|
|
|
class="text-blue-500 mt-4 cursor-pointer" |
|
|
|
|
|
> |
|
|
|
|
|
{{ |
|
|
|
|
|
provider.identifier.startsWith("did:") |
|
|
|
|
|
? "a person..." |
|
|
|
|
|
: "an activity..." |
|
|
|
|
|
}} |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -465,6 +500,11 @@ import { |
|
|
OfferVerifiableCredential, |
|
|
OfferVerifiableCredential, |
|
|
} from "@/libs/endorserServer"; |
|
|
} from "@/libs/endorserServer"; |
|
|
|
|
|
|
|
|
|
|
|
interface ProviderInfo { |
|
|
|
|
|
identifier: string; // could be a DID or a handleId |
|
|
|
|
|
linkConfirmed: boolean; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Component({ |
|
|
@Component({ |
|
|
components: { GiftedDialog, QuickNav }, |
|
|
components: { GiftedDialog, QuickNav }, |
|
|
}) |
|
|
}) |
|
@ -488,6 +528,7 @@ export default class ClaimView extends Vue { |
|
|
isEditedGlobalId = false; |
|
|
isEditedGlobalId = false; |
|
|
isRegistered = false; |
|
|
isRegistered = false; |
|
|
numConfsNotVisible = 0; // number of hidden DIDs in the confirmerIdList, minus the issuer if they aren't visible |
|
|
numConfsNotVisible = 0; // number of hidden DIDs in the confirmerIdList, minus the issuer if they aren't visible |
|
|
|
|
|
providersForGive: ProviderInfo[] = []; |
|
|
showDidCopy = false; |
|
|
showDidCopy = false; |
|
|
showIdCopy = false; |
|
|
showIdCopy = false; |
|
|
showVeriClaimDump = false; |
|
|
showVeriClaimDump = false; |
|
@ -620,11 +661,40 @@ export default class ClaimView extends Vue { |
|
|
const giveResp = await this.axios.get(giveUrl, { |
|
|
const giveResp = await this.axios.get(giveUrl, { |
|
|
headers: giveHeaders, |
|
|
headers: giveHeaders, |
|
|
}); |
|
|
}); |
|
|
if (giveResp.status === 200) { |
|
|
if (giveResp.status === 200 && giveResp.data.data?.length > 0) { |
|
|
this.detailsForGive = giveResp.data.data[0]; |
|
|
this.detailsForGive = giveResp.data.data[0]; |
|
|
} else { |
|
|
} else { |
|
|
console.error("Error getting detailed give info:", giveResp); |
|
|
console.error("Error getting detailed give info:", giveResp); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// look for providers |
|
|
|
|
|
const providerUrl = |
|
|
|
|
|
this.apiServer + |
|
|
|
|
|
"/api/v2/report/providersToGive?handleId=" + |
|
|
|
|
|
encodeURIComponent(this.veriClaim.handleId as string); |
|
|
|
|
|
console.log("providerUrl:", providerUrl); |
|
|
|
|
|
const providerHeaders = await serverUtil.getHeaders(userDid); |
|
|
|
|
|
const providerResp = await this.axios.get(providerUrl, { |
|
|
|
|
|
headers: providerHeaders, |
|
|
|
|
|
}); |
|
|
|
|
|
// should be at least an empty array |
|
|
|
|
|
if ( |
|
|
|
|
|
providerResp.status === 200 && |
|
|
|
|
|
Array.isArray(providerResp.data.data) |
|
|
|
|
|
) { |
|
|
|
|
|
this.providersForGive = providerResp.data.data; |
|
|
|
|
|
} else { |
|
|
|
|
|
console.error("Error getting give providers:", giveResp); |
|
|
|
|
|
this.$notify( |
|
|
|
|
|
{ |
|
|
|
|
|
group: "alert", |
|
|
|
|
|
type: "warning", |
|
|
|
|
|
title: "Error", |
|
|
|
|
|
text: "Got error retrieving linked provider data.", |
|
|
|
|
|
}, |
|
|
|
|
|
-1, |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
} else if (this.veriClaim.claimType === "Offer") { |
|
|
} else if (this.veriClaim.claimType === "Offer") { |
|
|
const offerUrl = |
|
|
const offerUrl = |
|
|
this.apiServer + |
|
|
this.apiServer + |
|
@ -638,6 +708,15 @@ export default class ClaimView extends Vue { |
|
|
this.detailsForOffer = offerResp.data.data[0]; |
|
|
this.detailsForOffer = offerResp.data.data[0]; |
|
|
} else { |
|
|
} else { |
|
|
console.error("Error getting detailed offer info:", offerResp); |
|
|
console.error("Error getting detailed offer info:", offerResp); |
|
|
|
|
|
this.$notify( |
|
|
|
|
|
{ |
|
|
|
|
|
group: "alert", |
|
|
|
|
|
type: "warning", |
|
|
|
|
|
title: "Error", |
|
|
|
|
|
text: "Got error retrieving linked offer data.", |
|
|
|
|
|
}, |
|
|
|
|
|
-1, |
|
|
|
|
|
); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|