remove message confusion, add project name during give-details

This commit is contained in:
2024-04-21 20:31:57 -06:00
parent 4e877c15f6
commit 1df2d3ed05
8 changed files with 58 additions and 41 deletions

View File

@@ -2,7 +2,7 @@
<div v-if="visible" class="dialog-overlay">
<div class="dialog">
<h1 class="text-xl font-bold text-center mb-4">
{{ customTitle || message + " " + giver?.name || "somebody not named" }}
{{ customTitle }}
</h1>
<input
type="text"
@@ -42,11 +42,9 @@
name: 'gifted-details',
query: {
amountInput,
customTitle,
description,
giverDid: giver?.did,
giverName: giver?.name,
message,
offerId,
projectId,
recipientDid: receiver?.did,
@@ -104,7 +102,6 @@ import { Contact } from "@/db/tables/contacts";
export default class GiftedDialog extends Vue {
$notify!: (notification: NotificationIface, timeout?: number) => void;
@Prop message = "";
@Prop projectId = "";
activeDid = "";
@@ -337,7 +334,7 @@ export default class GiftedDialog extends Vue {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (error: any) {
console.error("Error with give recordation caught:", error);
const message =
const errorMessage =
error.userMessage ||
error.response?.data?.error?.message ||
"There was an error recording the give.";
@@ -346,7 +343,7 @@ export default class GiftedDialog extends Vue {
group: "alert",
type: "danger",
title: "Error",
text: message,
text: errorMessage,
},
-1,
);