Skip to content

Commit

Permalink
removing sort order from diff in change requests (#2587)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Dec 2, 2022
1 parent 0a9fdfc commit 055c2ac
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions frontend/package.json
Expand Up @@ -42,6 +42,7 @@
"@types/deep-diff": "1.0.1",
"@types/jest": "29.2.3",
"@types/lodash.clonedeep": "4.5.7",
"@types/lodash.omit": "4.5.7",
"@types/node": "17.0.18",
"@types/react": "17.0.52",
"@types/react-dom": "17.0.18",
Expand Down Expand Up @@ -69,6 +70,7 @@
"immer": "9.0.16",
"jsdom": "20.0.3",
"lodash.clonedeep": "4.5.0",
"lodash.omit": "4.5.0",
"millify": "^5.0.1",
"msw": "0.49.1",
"pkginfo": "0.4.1",
Expand Down
Expand Up @@ -9,9 +9,10 @@ import {
GetFeatureStrategyIcon,
} from '../../../../utils/strategyNames';
import { Popover, Typography } from '@mui/material';
import { useFeature } from '../../../../hooks/api/getters/useFeature/useFeature';
import { useFeature } from 'hooks/api/getters/useFeature/useFeature';
import { StyledCodeSection } from '../../../events/EventCard/EventCard';
import EventDiff from '../../../events/EventDiff/EventDiff';
import omit from 'lodash.omit';

const useCurrentStrategy = (
change:
Expand Down Expand Up @@ -47,14 +48,15 @@ export const PopoverDiff: FC<{
feature,
environmentName
);

const changeRequestStrategy =
change.action === 'deleteStrategy' ? undefined : change.payload;

return (
<StyledCodeSection>
<EventDiff
entry={{
preData: currentStrategy,
preData: omit(currentStrategy, 'sortOrder'),
data: changeRequestStrategy,
}}
/>
Expand Down
12 changes: 12 additions & 0 deletions frontend/yarn.lock
Expand Up @@ -2432,6 +2432,13 @@
dependencies:
"@types/lodash" "*"

"@types/lodash.omit@4.5.7":
version "4.5.7"
resolved "https://registry.yarnpkg.com/@types/lodash.omit/-/lodash.omit-4.5.7.tgz#2357ed2412b4164344e8ee41f85bb0b2920304ba"
integrity sha512-6q6cNg0tQ6oTWjSM+BcYMBhan54P/gLqBldG4AuXd3nKr0oeVekWNS4VrNEu3BhCSDXtGapi7zjhnna0s03KpA==
dependencies:
"@types/lodash" "*"

"@types/lodash@*":
version "4.14.182"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2"
Expand Down Expand Up @@ -5491,6 +5498,11 @@ lodash.merge@^4.6.2:
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==

lodash.omit@4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60"
integrity sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg==

lodash.once@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac"
Expand Down

0 comments on commit 055c2ac

Please sign in to comment.