fix(gro-279): show Pay Now button during staff impersonation
Remove !readOnly guard from Pay Now button and PaymentModal in BillingPayments.tsx. The readOnly guard was too broad, hiding the Pay Now button during all impersonation sessions even though impersonation is the only way staff can access a client's billing page. Destructive actions (remove payment method, autopay toggle) still respect the readOnly flag. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -110,14 +110,12 @@ export function BillingPayments({ sessionId, readOnly }: BillingPaymentsProps) {
|
||||
{pending.length} unpaid invoice{pending.length > 1 ? "s" : ""}
|
||||
</p>
|
||||
</div>
|
||||
{!readOnly && (
|
||||
<button
|
||||
<button
|
||||
onClick={() => setShowPaymentModal(true)}
|
||||
className="px-6 py-2 bg-(--color-accent) text-white rounded-lg text-sm font-medium hover:bg-(--color-accent-hover)"
|
||||
>
|
||||
Pay Now
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -293,7 +291,7 @@ export function BillingPayments({ sessionId, readOnly }: BillingPaymentsProps) {
|
||||
)}
|
||||
|
||||
{/* Payment Modal */}
|
||||
{showPaymentModal && !readOnly && (
|
||||
{showPaymentModal && (
|
||||
<PaymentModal
|
||||
pending={pending}
|
||||
totalPending={totalPending}
|
||||
|
||||
Reference in New Issue
Block a user