diff --git a/src/components/Modal.vue b/src/components/Modal.vue index 92c7eec7..875ed227 100644 --- a/src/components/Modal.vue +++ b/src/components/Modal.vue @@ -10,6 +10,7 @@ import TransactionListModal from "./TransactionListModal.vue" import ConfirmPaymentModal from "./ConfirmPaymentModal.vue" import QrCodeModal from "./QrCodeModal.vue" + import MoneyRequestModal from "./MoneyRequestModal.vue" @Options({ name: "Modal", @@ -20,6 +21,7 @@ TransactionListModal, ConfirmPaymentModal, QrCodeModal, + MoneyRequestModal, }, data() { return { diff --git a/src/components/MoneyRequestModal.vue b/src/components/MoneyRequestModal.vue new file mode 100644 index 00000000..65e2abc1 --- /dev/null +++ b/src/components/MoneyRequestModal.vue @@ -0,0 +1,304 @@ + + + diff --git a/src/components/MoneyTransferModal.vue b/src/components/MoneyTransferModal.vue index 1469dea8..c34bd63b 100644 --- a/src/components/MoneyTransferModal.vue +++ b/src/components/MoneyTransferModal.vue @@ -172,6 +172,8 @@ :class="{ 'is-danger': errors.balance || errors.amount, }" + :readonly="config?.amount" + :disabled="config?.amount" />
{{ selectedRecipient.currencySymbol }} @@ -245,6 +247,7 @@ selectedRecipient: null, ownSelectedAccount: null, amount: null, + config: {}, message: null, errors: { balance: false, @@ -343,18 +346,29 @@ ) throw err } - await this.handleClickRecipient(recipient) + await this.toPaymentStage({ + recipient, + amount: resultData.amount, + message: resultData.message, + }) + }, + handleClickRecipient(recipient: any): void { + return this.toPaymentStage({ recipient }) }, - async handleClickRecipient(recipient: any): Promise { - this.selectedRecipient = recipient - this.selectedRecipient.currencySymbol = await recipient.getSymbol() + async toPaymentStage(config: any): Promise { + this.selectedRecipient = config.recipient + this.selectedRecipient.currencySymbol = + await config.recipient.getSymbol() this.ownSelectedAccount = this.$store.getters.activeVirtualAccounts.find( - (va: any) => va.currencyId === recipient.backendId + (va: any) => va.currencyId === config.recipient.backendId ) this.$modal.next() this.errors.balance = false this.errors.amount = false + this.amount = config?.amount + this.message = config?.message + this.config = config this.setFocus("amountSend") }, async sendTransaction(): Promise { diff --git a/src/components/TheDashboardFooter.vue b/src/components/TheDashboardFooter.vue index 4a76dd27..cd569b93 100644 --- a/src/components/TheDashboardFooter.vue +++ b/src/components/TheDashboardFooter.vue @@ -25,7 +25,8 @@