Skip to content

Commit

Permalink
Merge pull request #229 from MetaCell/feature/SCKAN-263
Browse files Browse the repository at this point in the history
Feature/sckan 263
  • Loading branch information
ddelpiano authored Feb 13, 2024
2 parents 64df752 + 669e5a9 commit 83c7201
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
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

0 comments on commit 83c7201

Please sign in to comment.