fix: show Pay Now button and modal during impersonation
Remove readOnly guard from Pay Now button and PaymentModal in BillingPayments. The readOnly guard was too broad — it hid the Pay Now button during staff impersonation sessions, making it impossible for staff to collect payments. Other readOnly guards (Remove payment method, Autopay toggle) remain intact. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
committed by
GitHub
parent
73ce16ee74
commit
2c6fb64d9b
@@ -110,14 +110,12 @@ export function BillingPayments({ sessionId, readOnly }: BillingPaymentsProps) {
|
|||||||
{pending.length} unpaid invoice{pending.length > 1 ? "s" : ""}
|
{pending.length} unpaid invoice{pending.length > 1 ? "s" : ""}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{!readOnly && (
|
|
||||||
<button
|
<button
|
||||||
onClick={() => setShowPaymentModal(true)}
|
onClick={() => setShowPaymentModal(true)}
|
||||||
className="px-6 py-2 bg-(--color-accent) text-white rounded-lg text-sm font-medium hover:bg-(--color-accent-hover)"
|
className="px-6 py-2 bg-(--color-accent) text-white rounded-lg text-sm font-medium hover:bg-(--color-accent-hover)"
|
||||||
>
|
>
|
||||||
Pay Now
|
Pay Now
|
||||||
</button>
|
</button>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -293,7 +291,7 @@ export function BillingPayments({ sessionId, readOnly }: BillingPaymentsProps) {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Payment Modal */}
|
{/* Payment Modal */}
|
||||||
{showPaymentModal && !readOnly && (
|
{showPaymentModal && (
|
||||||
<PaymentModal
|
<PaymentModal
|
||||||
pending={pending}
|
pending={pending}
|
||||||
totalPending={totalPending}
|
totalPending={totalPending}
|
||||||
|
|||||||
Reference in New Issue
Block a user