Skip to content

Commit

Permalink
[Publisher][Agency Settings] Add new agency definition section for co…
Browse files Browse the repository at this point in the history
…urt and supervision sectors (#1594)

* Add agency definition setting UI and logic

* Handle combined agency scenarios

* Fix court setting appearing in supervision agencies

* Fix populations UI bug

* Fixes

* Add textbox functionality & fix checkbox select issue

* Fixes

* Fix typo
  • Loading branch information
nasaownsky authored Dec 6, 2024
1 parent d281bb5 commit d197d62
Show file tree
Hide file tree
Showing 7 changed files with 398 additions and 4 deletions.
3 changes: 2 additions & 1 deletion common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ export type AgencySettingType =
| "HOMEPAGE_URL"
| "ZIPCODE"
| "DATA_SHARING_TYPE"
| "BIOLOGICAL_SEX_RACE_ETHNICITY_DATA_SOURCE";
| "BIOLOGICAL_SEX_RACE_ETHNICITY_DATA_SOURCE"
| "SECTOR_INCLUDES_EXCLUDES";

export interface AgencySetting {
setting_type: AgencySettingType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,13 @@ export const SupervisionSystemRow = styled(AgencySettingsInfoRow)<{
border: none;
`;

// Agency Definition
export const DefinitionDescriptionInputWrapper = styled.div`
:not(:last-child) {
padding-bottom: 24px;
}
`;

// Data Source
export const DataSourceContainer = styled.div`
border-top: 1px solid ${palette.highlight.grey5};
Expand All @@ -453,6 +460,7 @@ export const DataSourceContainer = styled.div`
padding: 16px 40px;
`;
export const DataSourceTitle = styled.div`
text-transform: capitalize;
font-weight: 700;
padding-bottom: 8px;
`;
Expand Down
5 changes: 5 additions & 0 deletions publisher/src/components/AgencySettings/AgencySettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
} from "./AgencySettings.styles";
import { AgencySettingsBasicInfo } from "./AgencySettingsBasicInfo";
import AgencySettingsDataSource from "./AgencySettingsDataSource";
import AgencySettingsDefinition from "./AgencySettingsDefinition";
// TODO(#1537) Ungate zipcode and agency data sharing fields
// import AgencySettingsDataSharingType from "./AgencySettingsDataSharingType";
import AgencySettingsDescription from "./AgencySettingsDescription";
Expand All @@ -44,6 +45,7 @@ export enum ActiveSetting {
Supervisions = "SUPERVISIONS",
Jurisdictions = "JURISDICTIONS",
DataSource = "BIOLOGICAL_SEX_RACE_ETHNICITY_DATA_SOURCE",
Definition = "SECTOR_INCLUDES_EXCLUDES",
}

export type SettingProps = {
Expand Down Expand Up @@ -97,6 +99,9 @@ export const AgencySettings: React.FC = observer(() => {
<AgencySettingsUrl
settingProps={generateSettingProps(ActiveSetting.HomepageUrl)}
/>
<AgencySettingsDefinition
settingProps={generateSettingProps(ActiveSetting.Definition)}
/>
{/* TODO(#1537) Ungate zipcode and agency data sharing fields */}
{/* <AgencySettingsDataSharingType /> */}
<AgencySettingsEmailNotifications />
Expand Down
Loading

0 comments on commit d197d62

Please sign in to comment.