Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@
.headerArea {
background: #0F172A;
color: $tc-white;

:global(.input-error) {
font-family: "Nunito Sans", sans-serif;
background: #E2CBC0;
width: max-content;
padding: 0 $sp-2;
border-radius: 2px;
font-size: 14px;
line-height: 20px;
font-weight: bold;
}
}

.contentArea {
Expand All @@ -103,6 +114,17 @@
.headerArea {
background: $teal-160;
color: $tc-white;

:global(.input-error) {
font-family: "Nunito Sans", sans-serif;
background: #E2CBC0;
width: max-content;
padding: 0 $sp-2;
border-radius: 2px;
font-size: 14px;
line-height: 20px;
font-weight: bold;
}
}

.contentArea {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const ScorecardQuestionForm: FC<ScorecardQuestionFormProps> = props => {

const handleRemove = useCallback(async (index: number, field: any) => {
if (!await ctx.confirm({
content: `Are you sure you want to remove "${field.name ? field.name : `Question ${index + 1}`}" question?`,
content: `Are you sure you want to remove "${field.name ? field.name : `Question ${props.sectionIndex}.${index + 1}`}" question?`,
title: 'Confirm Remove Question',
})) {
return
Expand All @@ -82,7 +82,7 @@ const ScorecardQuestionForm: FC<ScorecardQuestionFormProps> = props => {
const handleAddQuestion = useCallback(() => {
formQuestionsArray.append({
...getEmptyScorecardQuestion(),
sortOrder: Math.max(...formQuestionsArray.fields.map(f => get(f, 'sortOrder', 0))) + 1,
sortOrder: (Math.max(0, ...formQuestionsArray.fields.map(f => get(f, 'sortOrder', 0))) || 0) + 1,
})
}, [formQuestionsArray])

Expand Down