-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #347 from Enterprise-CMCS/bruce
feat(OY2-27179): 'Initial Intake Needed' sub status
- Loading branch information
Showing
25 changed files
with
543 additions
and
443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/services/ui/src/components/Opensearch/main/Filtering/Drawer/Filterable/Boolean.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Checkbox } from "@/components/Inputs"; | ||
import { FC } from "react"; | ||
|
||
export const FilterableBoolean: FC<{ | ||
value: boolean | null; | ||
onChange: (val: boolean | null) => void; | ||
}> = (props) => { | ||
const yes = props.value === null ? false : props.value; | ||
const no = props.value === null ? false : !props.value; | ||
|
||
const onYes = (mhm: boolean) => { | ||
props.onChange(mhm ? true : null); | ||
}; | ||
|
||
const onNo = (mhm: boolean) => { | ||
props.onChange(mhm ? false : null); | ||
}; | ||
|
||
return ( | ||
<div className="flex flex-col items-start"> | ||
<Checkbox checked={yes} onCheckedChange={onYes} label="Yes" /> | ||
<Checkbox checked={no} onCheckedChange={onNo} label="No" /> | ||
</div> | ||
); | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
src/services/ui/src/components/Opensearch/main/Filtering/Drawer/Filterable/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from "./Boolean"; | ||
export * from "./DateRange"; | ||
export * from "./Multicheck"; | ||
export * from "./Select"; |
106 changes: 106 additions & 0 deletions
106
src/services/ui/src/components/Opensearch/main/Filtering/Drawer/consts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
import { opensearch } from "shared-types"; | ||
import { OsFilterComponentType } from "../../types"; | ||
|
||
/** | ||
* @desc | ||
* - label: ui label | ||
* - field: opensearch field property (should match key) | ||
* - component: filterable component type | ||
* - prefix: query prefix | ||
* - type: query type | ||
* - value: query value | ||
*/ | ||
export type DrawerFilterableGroup = { | ||
label: string; | ||
component: OsFilterComponentType; | ||
} & opensearch.main.Filterable; | ||
|
||
export const SELECT_STATE: DrawerFilterableGroup = { | ||
label: "State", | ||
field: "state.keyword", | ||
component: "multiSelect", | ||
prefix: "must", | ||
type: "terms", | ||
value: [], | ||
}; | ||
|
||
export const CHECK_PLANTYPE: DrawerFilterableGroup = { | ||
label: "Type", | ||
field: "planType.keyword", | ||
component: "multiCheck", | ||
prefix: "must", | ||
type: "terms", | ||
value: [], | ||
}; | ||
|
||
export const CHECK_CMSSTATUS: DrawerFilterableGroup = { | ||
label: "Status", | ||
field: "cmsStatus.keyword", | ||
component: "multiCheck", | ||
prefix: "must", | ||
type: "terms", | ||
value: [], | ||
}; | ||
|
||
export const CHECK_STATESTATUS: DrawerFilterableGroup = { | ||
label: "Status", | ||
field: "stateStatus.keyword", | ||
component: "multiCheck", | ||
prefix: "must", | ||
type: "terms", | ||
value: [], | ||
}; | ||
|
||
export const BOOL_INITIALINTAKENEEDED: DrawerFilterableGroup = { | ||
label: "Initial Intake Needed", | ||
field: "initialIntakeNeeded", | ||
component: "boolean", | ||
prefix: "must", | ||
type: "match", | ||
value: null, | ||
}; | ||
|
||
export const CHECK_ACTIONTYPE: DrawerFilterableGroup = { | ||
label: "Action Type", | ||
field: "actionType.keyword", | ||
component: "multiCheck", | ||
prefix: "must", | ||
type: "terms", | ||
value: [], | ||
}; | ||
|
||
export const DATE_SUBMISSION: DrawerFilterableGroup = { | ||
label: "Initial Submission", | ||
field: "submissionDate", | ||
component: "dateRange", | ||
prefix: "must", | ||
type: "range", | ||
value: { gte: undefined, lte: undefined }, | ||
}; | ||
|
||
export const DATE_RAIRECEIVED: DrawerFilterableGroup = { | ||
label: "Formal RAI Response", | ||
field: "raiReceivedDate", | ||
component: "dateRange", | ||
prefix: "must", | ||
type: "range", | ||
value: { gte: undefined, lte: undefined }, | ||
}; | ||
|
||
export const SELECT_CPOC: DrawerFilterableGroup = { | ||
label: "CPOC Name", | ||
field: "leadAnalystName.keyword", | ||
component: "multiSelect", | ||
prefix: "must", | ||
type: "terms", | ||
value: [], | ||
}; | ||
|
||
export const SELECT_ORIGIN: DrawerFilterableGroup = { | ||
label: "Submission Source", | ||
field: "origin.keyword", | ||
component: "multiSelect", | ||
prefix: "must", | ||
type: "terms", | ||
value: [], | ||
}; |
Oops, something went wrong.