File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
src/routes/(console)/apply-credit Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 246
246
billingPlan = getBillingPlan ();
247
247
}
248
248
249
- $ : isNewOrg = selectedOrgId && selectedOrgId !== newOrgId ;
249
+ $ : isNewOrg = ! ( selectedOrgId && selectedOrgId !== newOrgId ) ;
250
250
251
- $ : {
252
- if (isNewOrg ) {
253
- (async () => {
254
- currentPlan = await sdk .forConsole .billing .getOrganizationPlan (selectedOrgId );
255
- })();
256
- }
251
+ $ : if (! isNewOrg ) {
252
+ (async () => {
253
+ currentPlan = await sdk .forConsole .billing .getOrganizationPlan (selectedOrgId );
254
+ })();
255
+ loadPaymentMethods ();
257
256
}
258
257
259
258
// after adding a payment method, fetch the payment methods again so the input can be updated
371
370
{collaborators }
372
371
bind:couponData
373
372
bind:billingBudget
374
- organizationId ={isNewOrg ? selectedOrgId : null }>
373
+ organizationId ={! isNewOrg ? selectedOrgId : null }>
375
374
{#if campaign ?.template === ' review' && (campaign ?.cta || campaign ?.claimed || campaign ?.unclaimed )}
376
375
<div class =" u-margin-block-end-24" >
377
376
<p class ="body-text-1 u-bold" >{campaign ?.cta }</p >
397
396
handleSubmit ();
398
397
}
399
398
}}
400
- disabled ={$isSubmitting }>
399
+ disabled ={! couponData ?. code || $isSubmitting }>
401
400
{#if $isSubmitting }
402
401
<span class =" loader is-small is-transparent u-line-height-1-5" aria-hidden =" true"
403
402
></span >
You can’t perform that action at this time.
0 commit comments