Refactor: Avoid will...
This commit is contained in:
parent
4d6669b6fe
commit
f2fc1c0b60
1 changed files with 4 additions and 4 deletions
|
@ -30,8 +30,8 @@
|
|||
$: hasError = userData.find(x => x.error != null)
|
||||
|
||||
$: userCount = $licensing.userCount + userData.length
|
||||
$: willReach = licensing.usersLimitReached(userCount)
|
||||
$: willExceed = licensing.usersLimitExceeded(userCount)
|
||||
$: reached = licensing.usersLimitReached(userCount)
|
||||
$: exceeded = licensing.usersLimitExceeded(userCount)
|
||||
|
||||
function removeInput(idx) {
|
||||
userData = userData.filter((e, i) => i !== idx)
|
||||
|
@ -87,7 +87,7 @@
|
|||
confirmDisabled={disabled}
|
||||
cancelText="Cancel"
|
||||
showCloseIcon={false}
|
||||
disabled={hasError || !userData.length || willExceed}
|
||||
disabled={hasError || !userData.length || exceeded}
|
||||
>
|
||||
<Layout noPadding gap="XS">
|
||||
<Label>Email address</Label>
|
||||
|
@ -118,7 +118,7 @@
|
|||
</div>
|
||||
{/each}
|
||||
|
||||
{#if willReach}
|
||||
{#if reached}
|
||||
<div class="user-notification">
|
||||
<Icon name="Info" />
|
||||
<span>
|
||||
|
|
Loading…
Reference in a new issue