Browse Source

remove ability to mark a 'trade', ensuring this only sends & retrieves gifts

pull/133/head
Trent Larson 4 weeks ago
parent
commit
35bb9d2207
  1. 5
      src/components/GiftedDialog.vue
  2. 4
      src/libs/endorserServer.ts
  3. 14
      src/views/GiftedDetailsView.vue

5
src/components/GiftedDialog.vue

@ -117,7 +117,6 @@ export default class GiftedDialog extends Vue {
customTitle?: string; customTitle?: string;
description = ""; description = "";
giver?: libsUtil.GiverReceiverInputInfo; // undefined means no identified giver agent giver?: libsUtil.GiverReceiverInputInfo; // undefined means no identified giver agent
isTrade = false;
offerId = ""; offerId = "";
prompt = ""; prompt = "";
receiver?: libsUtil.GiverReceiverInputInfo; receiver?: libsUtil.GiverReceiverInputInfo;
@ -301,7 +300,7 @@ export default class GiftedDialog extends Vue {
unitCode, unitCode,
this.toProjectId, this.toProjectId,
this.offerId, this.offerId,
this.isTrade, false,
undefined, undefined,
this.fromProjectId, this.fromProjectId,
); );
@ -327,7 +326,7 @@ export default class GiftedDialog extends Vue {
group: "alert", group: "alert",
type: "success", type: "success",
title: "Success", title: "Success",
text: `That ${this.isTrade ? "trade" : "gift"} was recorded.`, text: `That gift was recorded.`,
}, },
7000, 7000,
); );

4
src/libs/endorserServer.ts

@ -650,7 +650,7 @@ export function hydrateGive(
unitCode?: string, unitCode?: string,
fulfillsProjectHandleId?: string, fulfillsProjectHandleId?: string,
fulfillsOfferHandleId?: string, fulfillsOfferHandleId?: string,
isTrade: boolean = false, isTrade: boolean = false, // remove, because this app is all for gifting
imageUrl?: string, imageUrl?: string,
providerPlanHandleId?: string, providerPlanHandleId?: string,
lastClaimId?: string, lastClaimId?: string,
@ -737,7 +737,7 @@ export async function createAndSubmitGive(
unitCode?: string, unitCode?: string,
fulfillsProjectHandleId?: string, fulfillsProjectHandleId?: string,
fulfillsOfferHandleId?: string, fulfillsOfferHandleId?: string,
isTrade: boolean = false, isTrade: boolean = false, // remove, because this app is all for gifting
imageUrl?: string, imageUrl?: string,
providerPlanHandleId?: string, providerPlanHandleId?: string,
): Promise<CreateAndSubmitClaimResult> { ): Promise<CreateAndSubmitClaimResult> {

14
src/views/GiftedDetailsView.vue

@ -215,11 +215,6 @@
</div> </div>
</div> </div>
<div class="mt-8 flex">
<input v-model="isTrade" type="checkbox" class="h-6 w-6 mr-2" />
<label class="text-sm mt-1">This was a trade (not a gift)</label>
</div>
<div v-if="showGeneralAdvanced" class="mt-4 flex"> <div v-if="showGeneralAdvanced" class="mt-4 flex">
<router-link <router-link
:to="{ :to="{
@ -307,7 +302,6 @@ export default class GiftedDetails extends Vue {
giverName = ""; giverName = "";
hideBackButton = false; hideBackButton = false;
imageUrl = ""; imageUrl = "";
isTrade = false;
message = ""; message = "";
offerId = ""; offerId = "";
prevCredToEdit?: GenericCredWrapper<GiveVerifiableCredential>; prevCredToEdit?: GenericCredWrapper<GiveVerifiableCredential>;
@ -790,7 +784,7 @@ export default class GiftedDetails extends Vue {
this.unitCode, this.unitCode,
fulfillsProjectId, fulfillsProjectId,
this.offerId, this.offerId,
this.isTrade, false,
this.imageUrl, this.imageUrl,
this.providerProjectId, this.providerProjectId,
); );
@ -806,7 +800,7 @@ export default class GiftedDetails extends Vue {
this.unitCode, this.unitCode,
fulfillsProjectId, fulfillsProjectId,
this.offerId, this.offerId,
this.isTrade, false,
this.imageUrl, this.imageUrl,
this.providerProjectId, this.providerProjectId,
); );
@ -833,7 +827,7 @@ export default class GiftedDetails extends Vue {
group: "alert", group: "alert",
type: "success", type: "success",
title: "Success", title: "Success",
text: `That ${this.isTrade ? "trade" : "gift"} was recorded.`, text: `That gift was recorded.`,
}, },
3000, 3000,
); );
@ -878,7 +872,7 @@ export default class GiftedDetails extends Vue {
this.unitCode, this.unitCode,
fulfillsProjectId, fulfillsProjectId,
this.offerId, this.offerId,
this.isTrade, false,
this.imageUrl, this.imageUrl,
this.providerProjectId, this.providerProjectId,
this.prevCredToEdit?.id as string, this.prevCredToEdit?.id as string,

Loading…
Cancel
Save