Refactor: Avoid will...

This commit is contained in:
jvcalderon 2023-05-11 09:43:54 +02:00
parent 4d6669b6fe
commit f2fc1c0b60
1 changed files with 4 additions and 4 deletions

View File

@ -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>