File tree Expand file tree Collapse file tree
src/routes/(console)/organization-[organization]/billing Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5454 let showUpdateState = $state (false );
5555 let isSelectedBackup = $state (false );
5656 let paymentMethodNeedingState: Models .PaymentMethod | null = $state (null );
57+ let dismissedPaymentMethodIds = $state <string []>([]);
5758
5859 const hasPaymentError = $derived .by (() => {
5960 return (
117118 (method : Models .PaymentMethod ) =>
118119 method ?.country ?.toLowerCase () === ' us' &&
119120 (! method .state || method .state .trim () === ' ' ) &&
120- !! method .last4
121+ !! method .last4 &&
122+ ! dismissedPaymentMethodIds .includes (method .$id )
121123 );
122124
123125 if (usMethodWithoutState ) {
129131
130132 $effect (() => {
131133 if (! showUpdateState && paymentMethodNeedingState ) {
134+ dismissedPaymentMethodIds = [
135+ ... dismissedPaymentMethodIds ,
136+ paymentMethodNeedingState .$id
137+ ];
132138 paymentMethodNeedingState = null ;
133139 }
134140 });
You can’t perform that action at this time.
0 commit comments