Skip to content

Commit

Permalink
fix(partner): Undefined value in Formcontrol
Browse files Browse the repository at this point in the history
  • Loading branch information
shadrak98 committed Jan 6, 2025
1 parent 68de54e commit c9724ce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const createPaymentIntent = createResource({
url: 'press.api.billing.create_payment_intent_for_partnership_fees',
params: { amount: props.amount },
validate() {
if (props.amount > props.maximumAmount && !team.doc.erpnext_partner) {
if (props.amount > props.maximumAmount) {
throw new DashboardError(
`Amount must be lesser than or equal to ${props.maximumAmount}`
);
Expand Down
4 changes: 2 additions & 2 deletions dashboard/src2/components/partners/PartnerCreditsForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<!-- Amount -->
<div>
<FormControl
:label="`Amount (Minimum Amount: ${minimumAmount})`"
:label="`Amount (Minimum Amount: ${maximumAmount})`"
class="mb-3"
v-model.number="creditsToBuy"
name="amount"
autocomplete="off"
type="number"
:min="minimumAmount"
:max="maximumAmount"
>
<template #prefix>
<div class="grid w-4 place-items-center text-sm text-gray-700">
Expand Down
2 changes: 2 additions & 0 deletions dashboard/src2/pages/BillingInvoices.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export default {
if (row.type == 'Subscription') {
let end = dayjsLocal(row.period_end);
return end.format('MMMM YYYY');
} else if (row.type == 'Partnership Fees') {
return 'Partnership Fees';
}
return 'Prepaid Credits';
},
Expand Down

0 comments on commit c9724ce

Please sign in to comment.