diff --git a/frontend/src/Pages/StatementDetails.tsx b/frontend/src/Pages/StatementDetails.tsx index ac8652a6..59d0424a 100644 --- a/frontend/src/Pages/StatementDetails.tsx +++ b/frontend/src/Pages/StatementDetails.tsx @@ -116,7 +116,7 @@ const StatementDetails = () => { //TODO add logic for isDisabled // TODO add an extra check for invalid state; - const isDisabled = statement?.state === statementStates.Exported; + const isDisabled = statement?.state === statementStates.Exported || statement?.state === statementStates.Invalid; return ( {loading && ( diff --git a/frontend/src/apiclient/backend/api.ts b/frontend/src/apiclient/backend/api.ts index b5380214..7316ea57 100644 --- a/frontend/src/apiclient/backend/api.ts +++ b/frontend/src/apiclient/backend/api.ts @@ -5,7 +5,7 @@ * SCKAN Composer API * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -63,7 +63,8 @@ export const AvailableTransitionsC67Enum = { ToBeReviewed: 'to_be_reviewed', ConnectionMissing: 'connection_missing', NpoApproved: 'npo_approved', - Exported: 'exported' + Exported: 'exported', + Invalid: 'invalid' } as const; export type AvailableTransitionsC67Enum = typeof AvailableTransitionsC67Enum[keyof typeof AvailableTransitionsC67Enum]; @@ -6325,7 +6326,8 @@ export const ComposerConnectivityStatementListStateEnum = { Exported: 'exported', NpoApproved: 'npo_approved', Rejected: 'rejected', - ToBeReviewed: 'to_be_reviewed' + ToBeReviewed: 'to_be_reviewed', + Invalid: 'invalid' } as const; export type ComposerConnectivityStatementListStateEnum = typeof ComposerConnectivityStatementListStateEnum[keyof typeof ComposerConnectivityStatementListStateEnum]; /** diff --git a/frontend/src/helpers/helpers.ts b/frontend/src/helpers/helpers.ts index 0e3cf453..d153cf6f 100644 --- a/frontend/src/helpers/helpers.ts +++ b/frontend/src/helpers/helpers.ts @@ -114,6 +114,7 @@ export interface StatementStateToColor { connection_missing: StateColor; npo_approved: StateColor; exported: StateColor; + invalid: StateColor; } export const SentenceLabels = { @@ -134,6 +135,7 @@ export const StatementsLabels = { [statementStates.ConnectionMissing]: "Connection missing", [statementStates.NpoApproved]: "NPO approved", [statementStates.Exported]: "Exported", + [statementStates.Invalid]: "Invalid", }; export const formatDate = (date: string) => { diff --git a/frontend/src/helpers/settings.ts b/frontend/src/helpers/settings.ts index 9389da0e..293638c3 100644 --- a/frontend/src/helpers/settings.ts +++ b/frontend/src/helpers/settings.ts @@ -13,6 +13,7 @@ export const statementStateToColor: StatementStateToColor = { connection_missing: "warning", // orange npo_approved: "success", //green exported: "success", //green + invalid: "warning", //orange }; export const sentenceStateToColor: SentenceStateToColor = { diff --git a/frontend/src/redux/statementSlice.tsx b/frontend/src/redux/statementSlice.tsx index 1b88395a..61d3ab2f 100644 --- a/frontend/src/redux/statementSlice.tsx +++ b/frontend/src/redux/statementSlice.tsx @@ -11,6 +11,7 @@ export type StateFilter = Array< | "npo_approved" | "rejected" | "to_be_reviewed" + | "invalid" >; export interface QueryParams { diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 0abcba5f..df6f0643 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -162,6 +162,7 @@ paths: - npo_approved - rejected - to_be_reviewed + - invalid explode: true style: form - in: query @@ -1789,6 +1790,7 @@ components: - connection_missing - npo_approved - exported + - invalid type: string CircuitTypeEnum: enum: