2
0

Add NPS Survey template

Closes #356
This commit is contained in:
Baptiste Arnaud
2023-03-03 17:21:02 +01:00
parent 79e5aedf00
commit 852cc73511
5 changed files with 767 additions and 21 deletions

View File

@ -63,7 +63,7 @@ export const RatingForm = (props: Props) => {
)}
<div class="flex justify-end mr-2">
{isDefined(rating) && (
{isDefined(rating()) && (
<SendButton disableIcon>
{props.block.options?.labels?.button ?? 'Send'}
</SendButton>
@ -90,7 +90,8 @@ const RatingButton = (props: RatingButtonProps) => {
}}
class={
'py-2 px-4 mr-2 mb-2 text-left font-semibold rounded-md transition-all filter hover:brightness-90 active:brightness-75 duration-100 focus:outline-none typebot-button ' +
(isDefined(props.rating) && props.idx <= props.rating
(props.isOneClickSubmitEnabled ||
(isDefined(props.rating) && props.idx <= props.rating)
? ''
: 'selectable')
}