File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/lib/components/billing/alerts Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 10
10
import { billingProjectsLimitDate } from ' $lib/stores/billing' ;
11
11
import { page } from ' $app/state' ;
12
12
import { toLocaleDateTime } from ' $lib/helpers/date' ;
13
+ import { currentPlan } from ' $lib/stores/organization' ;
13
14
14
15
let {
15
16
showSelectProject = $bindable (false ),
92
93
</Table .Row .Base >
93
94
{/each }
94
95
</Table .Root >
95
- {#if selectedProjects .length > 2 }
96
+ {#if selectedProjects .length > $currentPlan ?. projects }
96
97
<div class =" u-text-warning u-mb-4" >
97
- You can only select two projects. Please deselect others to continue.
98
+ You can only select { $currentPlan ?. projects } projects. Please deselect others to continue.
98
99
</div >
99
100
{/if }
100
- {#if selectedProjects .length === 2 }
101
+ {#if selectedProjects .length === $currentPlan ?. projects }
101
102
<Alert .Inline
102
103
status =" warning"
103
104
title ={` ${projects .length - selectedProjects .length } projects will be archived on ${billingProjectsLimitDate } ` }>
110
111
<svelte:fragment slot =" footer" >
111
112
<Button .Button size ="s" variant ="secondary" on:click ={() => (showSelectProject = false )}
112
113
>Cancel</Button .Button >
113
- <Button .Button size ="s" disabled ={selectedProjects .length !== 2 }>Save</Button .Button >
114
+ <Button .Button size ="s" disabled ={selectedProjects .length !== $currentPlan ?. projects }>Save</Button .Button >
114
115
</svelte:fragment >
115
116
</Modal >
You can’t perform that action at this time.
0 commit comments