diff --git a/client/src/app/api/models.ts b/client/src/app/api/models.ts index 968e9b678a..1fd51790c0 100644 --- a/client/src/app/api/models.ts +++ b/client/src/app/api/models.ts @@ -646,7 +646,7 @@ export interface Questionnaire { revision: number; questions: number; rating: string; - dateImported: string; + createTime: string; required: boolean; system: boolean; sections: Section[]; @@ -687,10 +687,12 @@ export interface Answer { selected?: boolean; } export interface Thresholds { - red: number; - unknown: number; - yellow: number; + red?: number; + unknown?: number; + yellow?: number; + green?: number; } + export type AssessmentStatus = "empty" | "started" | "complete"; export type Risk = "green" | "yellow" | "red" | "unknown"; diff --git a/client/src/app/pages/assessment-management/assessment-settings/assessment-settings-page.tsx b/client/src/app/pages/assessment-management/assessment-settings/assessment-settings-page.tsx index dbc8a1fa36..3462a66b72 100644 --- a/client/src/app/pages/assessment-management/assessment-settings/assessment-settings-page.tsx +++ b/client/src/app/pages/assessment-management/assessment-settings/assessment-settings-page.tsx @@ -8,6 +8,7 @@ import { EmptyState, EmptyStateBody, EmptyStateIcon, + List, MenuToggle, MenuToggleElement, Modal, @@ -51,7 +52,10 @@ import { useHistory } from "react-router-dom"; import { Paths } from "@app/Paths"; import { ImportQuestionnaireForm } from "@app/pages/assessment-management/import-questionnaire-form/import-questionnaire-form"; import ConfirmDeleteDialog from "@app/components/ConfirmDeleteDialog/ConfirmDeleteDialog"; -import { ExportQuestionnaireDropdownItem } from "./ExportQuestionnaireDropdownItem"; +import { ExportQuestionnaireDropdownItem } from "./components/export-questionnaire-dropdown-item"; +import dayjs from "dayjs"; +import { QuestionnaireQuestionsColumn } from "./components/questionnaire-questions-column"; +import { QuestionnaireThresholdsColumn } from "./components/questionnaire-thresholds-column"; const AssessmentSettings: React.FC = () => { const { t } = useTranslation(); @@ -108,7 +112,7 @@ const AssessmentSettings: React.FC = () => { name: "Name", questions: "Questions", rating: "Rating", - dateImported: "Date imported", + createTime: "Date imported", }, isSelectable: false, expandableVariant: null, @@ -127,10 +131,10 @@ const AssessmentSettings: React.FC = () => { }, }, ], - sortableColumns: ["name", "dateImported"], + sortableColumns: ["name", "createTime"], getSortValues: (questionnaire) => ({ name: questionnaire.name || "", - dateImported: questionnaire.dateImported || "", + createTime: questionnaire.createTime || "", }), initialSort: { columnKey: "name", direction: "asc" }, hasPagination: true, @@ -225,7 +229,7 @@ const AssessmentSettings: React.FC = () => {