Skip to content

Commit

Permalink
APPEALS-37719 fixed some of the linting and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
amybids committed Jan 8, 2024
1 parent 6b3ff34 commit 63043e6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
8 changes: 6 additions & 2 deletions client/app/caseDistribution/components/BatchSize.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,12 @@ const BatchSize = (props) => {
{batchSizeLevers && batchSizeLevers.map((lever, index) => (
<div className={styles.activeLever} key={`${lever.item}-${index}`}>
<div className={styles.leverLeft}>
<strong className={lever.is_disabled_in_ui ? styles.leverDisabled : styles.leverActive}>{lever.title}</strong>
<p className={lever.is_disabled_in_ui ? styles.leverDisabled : styles.leverActive}>{lever.description}</p>
<strong className={lever.is_disabled_in_ui ? styles.leverDisabled : styles.leverActive}>
{lever.title}
</strong>
<p className={lever.is_disabled_in_ui ? styles.leverDisabled : styles.leverActive}>
{lever.description}
</p>
</div>
<div className={`${styles.leverRight} ${leverNumberDiv}`}>
{isAdmin ?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const CaseDistributionContent = ({
</h2>
<div {...sectionSegmentStyling}>
<p className="cf-lead-paragraph">{COPY.CASE_DISTRIBUTION_HISTORY_DESCRIPTION}</p>
<LeverHistory historyData={formattedHistory} leverStore={leverStore} />

</div>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion client/app/caseDistribution/components/DocketTimeGoals.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ const DocketTimeGoals = (props) => {
disabled={distributionPriorLever.is_disabled_in_ui}
toggleSelected={toggleLever(index)}
/>
<div className={distributionPriorLever.is_toggle_active ? styles.toggleSwitchInput : styles.toggleInputHide}>
<div
className={distributionPriorLever.is_toggle_active ? styles.toggleSwitchInput : styles.toggleInputHide}
>

<NumberField
name={`toggle-${distributionPriorLever.item}`}
Expand Down
16 changes: 16 additions & 0 deletions client/app/caseDistribution/utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
import leverStore from './reducers/levers/leversReducer';

export const checkIfOtherChangesExist = (currentLever) => {
// this isn't going to work as is because levers is currently split up into grouping
/*
The code will look something like:
const countChangedItems = (state = initialState) => {
const { levers } = state;
// Flatten the array of lever groups into a single array
const allLevers = Object.values(levers).flat();
// Use reduce to count the number of items where hasItemChanged is true
const changedItemsCount = allLevers.reduce((count, lever) => {
return lever.hasItemChanged ? count + 1 : count;
}, 0);
return changedItemsCount;
};
})
*/
const leversWithChangesList = leverStore.getState().levers.filter(
(lever) => lever.hasValueChanged === true && lever.item !== currentLever.item
);
Expand Down

0 comments on commit 63043e6

Please sign in to comment.