makes the second and third pages of the NPS feedback form optional

This commit is contained in:
Keviin Åberg Kultalahti 2021-08-09 15:43:50 +02:00
parent 03e66795e4
commit b1e57ad720
1 changed files with 4 additions and 10 deletions

View File

@ -31,8 +31,8 @@
// Data to send off // Data to send off
let rating let rating
let improvements let improvements = ""
let comment let comment = ""
function selectNumber(n) { function selectNumber(n) {
rating = n rating = n
@ -106,11 +106,7 @@
<Detail size="S">STEP 2 OF 3</Detail> <Detail size="S">STEP 2 OF 3</Detail>
<ButtonGroup> <ButtonGroup>
<Button secondary on:click={() => (step -= 1)}>Previous</Button> <Button secondary on:click={() => (step -= 1)}>Previous</Button>
<Button <Button primary on:click={() => (step += 1)}>Next</Button>
disabled={!improvements}
primary
on:click={() => (step += 1)}>Next</Button
>
</ButtonGroup> </ButtonGroup>
</div> </div>
{:else} {:else}
@ -121,9 +117,7 @@
<Detail size="S">STEP 3 OF 3</Detail> <Detail size="S">STEP 3 OF 3</Detail>
<ButtonGroup> <ButtonGroup>
<Button secondary on:click={() => (step -= 1)}>Previous</Button> <Button secondary on:click={() => (step -= 1)}>Previous</Button>
<Button disabled={!comment} cta on:click={submitFeedback} <Button cta on:click={submitFeedback}>Complete</Button>
>Complete</Button
>
</ButtonGroup> </ButtonGroup>
</div> </div>
{/if} {/if}