Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/sckan 263 #229

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion frontend/src/Pages/StatementDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Grid p={6} container>
{loading && (
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/apiclient/backend/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
/**
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/helpers/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export interface StatementStateToColor {
connection_missing: StateColor;
npo_approved: StateColor;
exported: StateColor;
invalid: StateColor;
}

export const SentenceLabels = {
Expand All @@ -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) => {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/helpers/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/redux/statementSlice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export type StateFilter = Array<
| "npo_approved"
| "rejected"
| "to_be_reviewed"
| "invalid"
>;

export interface QueryParams {
Expand Down
2 changes: 2 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ paths:
- npo_approved
- rejected
- to_be_reviewed
- invalid
explode: true
style: form
- in: query
Expand Down Expand Up @@ -1789,6 +1790,7 @@ components:
- connection_missing
- npo_approved
- exported
- invalid
type: string
CircuitTypeEnum:
enum:
Expand Down