forked from trent_larson/crowd-funder-for-time-pwa
show a 'give' button directly on offers in the ProjectView
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user