add flag for logging a contribution as a trade

This commit is contained in:
2024-01-08 21:28:04 -07:00
parent 525d3fc15a
commit 8a7ce0fe65
7 changed files with 50 additions and 20 deletions

View File

@@ -36,9 +36,15 @@
<fa icon="chevron-right" />
</div>
</div>
<div v-if="showGivenToUser" class="mt-2 text-right">
<input type="checkbox" class="mr-2" v-model="givenToUser" />
<label class="text-sm">Given to you</label>
<div class="mt-2 text-right">
<span v-if="showGivenToUser" class="mt-2 mr-16">
<input type="checkbox" class="mr-2" v-model="givenToUser" />
<label class="text-sm">Given to you</label>
</span>
<span class="mt-2">
<input type="checkbox" class="mr-2" v-model="isTrade" />
<label class="text-sm">Trade (not a gift)</label>
</span>
</div>
<p class="text-center mb-2 mt-6 italic">
Sign & Send to publish to the world
@@ -88,6 +94,7 @@ export default class GiftedDialog extends Vue {
giver?: GiverInputInfo; // undefined means no identified giver agent
description = "";
givenToUser = false;
isTrade = false;
unitCode = "HUR";
visible = false;
@@ -264,6 +271,7 @@ export default class GiftedDialog extends Vue {
amountInput,
unitCode,
this.projectId,
this.isTrade,
);
if (
@@ -287,7 +295,7 @@ export default class GiftedDialog extends Vue {
group: "alert",
type: "success",
title: "Success",
text: "That gift was recorded.",
text: `That ${this.isTrade ? "trade" : "gift"} was recorded.`,
},
7000,
);