show a 'give' button directly on offers in the ProjectView

This commit is contained in:
2024-01-16 15:23:40 -07:00
parent b79c5fcf91
commit be6ec6745a
7 changed files with 119 additions and 58 deletions

View File

@@ -90,7 +90,6 @@ export default class GiftedDialog extends Vue {
@Prop message = "";
@Prop projectId = "";
@Prop offerId = "";
@Prop showGivenToUser = false;
activeDid = "";
@@ -103,6 +102,7 @@ export default class GiftedDialog extends Vue {
description = "";
givenToUser = false;
isTrade = false;
offerId = "";
unitCode = "HUR";
visible = false;
@@ -117,8 +117,8 @@ export default class GiftedDialog extends Vue {
/* eslint-disable prettier/prettier */
UNIT_LONG: Record<string, string> = {
"BTC": "BTC",
"ETH": "ETH",
"BTC": "Bitcoin",
"ETH": "Ethereum",
"HUR": "hours",
"USD": "dollars",
};
@@ -152,7 +152,7 @@ export default class GiftedDialog extends Vue {
}
}
open(giver: GiverInputInfo) {
open(giver?: GiverInputInfo, offerId?: string) {
this.description = "";
this.giver = giver || {};
if (!this.giver.name) {
@@ -166,6 +166,7 @@ export default class GiftedDialog extends Vue {
// if we show "given to user" selection, default checkbox to true
this.givenToUser = this.showGivenToUser;
this.amountInput = "0";
this.offerId = offerId || "";
this.visible = true;
}