finish contact selection for gives

This commit is contained in:
2023-07-01 15:45:30 -06:00
parent 643f777d10
commit a2b3cebdb3
4 changed files with 57 additions and 25 deletions

View File

@@ -2,13 +2,12 @@
<div v-if="visible" class="dialog-overlay">
<div class="dialog">
<h1 class="text-lg text-center">
Received from {{ contact?.name || "nobody in particular" }}
{{ message }} {{ giver?.name || "somebody not specified" }}
</h1>
<p class="py-2">{{ message }}</p>
<input
type="text"
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2"
placeholder="What you received"
placeholder="What was received"
v-model="description"
/>
<div class="flex flex-row">
@@ -27,9 +26,10 @@
</div>
</div>
</div>
<p class="text-right">Sign & Send to publish to the world</p>
<div class="text-right">
<button class="rounded border border-slate-400" @click="confirm">
<span class="m-2">Confirm</span>
<span class="m-2">Sign & Send</span>
</button>
&nbsp;
<button class="rounded border border-slate-400" @click="cancel">
@@ -45,15 +45,16 @@ export default {
props: ["message"],
data() {
return {
contact: null,
giver: null,
description: "",
hours: "0",
visible: false,
};
},
methods: {
open(contact) {
this.contact = contact;
open(giver) {
// giver: GiverInputInfo
this.giver = giver;
this.visible = true;
},
close() {
@@ -69,10 +70,13 @@ export default {
this.close();
this.$emit("dialog-result", {
action: "confirm",
contact: this.contact,
giver: this.giver,
hours: parseFloat(this.hours),
description: this.description,
});
this.description = "";
this.giver = null;
this.hours = "0";
},
cancel() {
this.close();