LF-4672 (3) - rtk locations upgrade remove duplication#4099
LF-4672 (3) - rtk locations upgrade remove duplication#4099Duncan-Brain wants to merge 45 commits intortk-upgrade/locations-rebasefrom
Conversation
| loading: false, | ||
| loaded: false, | ||
| }, | ||
| irrigationTaskReducer: { |
There was a problem hiding this comment.
Missing some reducers...
| "MAP": { | ||
| "FAIL_PATCH": "Failed to update", | ||
| "FAIL_POST": "Failed to add new", | ||
| "FAIL_DELETE": "Failed to retire", |
There was a problem hiding this comment.
Using snackbars instead of WarningBox
| @@ -0,0 +1,678 @@ | |||
| /* | |||
There was a problem hiding this comment.
This could probably be reduced as well.. specifically RadioGroup
| @@ -0,0 +1,45 @@ | |||
| import { useTranslation } from 'react-i18next'; | |||
There was a problem hiding this comment.
Not a new file the git mv did not work on this one for some reason...
| <PageTitle | ||
| title={title} | ||
| onCancel={isCreateLocationPage && onCancel} | ||
| onCancel={isCreateLocationPage ? onCancel : undefined} |
There was a problem hiding this comment.
Typings didn't like the boolean here for a function.
| ...pick(data, locationProperties), | ||
| }; | ||
| }; | ||
| const getBarnFromLocationObject = (location) => { |
There was a problem hiding this comment.
no handled by clean() and flatten() in the location api hook.
| return result; | ||
| }; | ||
|
|
||
| const propertiesToPick = { |
There was a problem hiding this comment.
These utilities are moved from the aggregation of the slices.
| const AddNewCrop = React.lazy(() => import('../containers/AddNewCrop')); | ||
| const PlantingLocation = React.lazy( | ||
| () => import('../containers/Crop/AddManagementPlan/PlantingLocation'), | ||
| const PlantingLocation = React.lazy(() => |
There was a problem hiding this comment.
lol prettier love this.. some real edits in this file.
| @@ -0,0 +1,344 @@ | |||
| /* | |||
There was a problem hiding this comment.
This story isn't the best because it is intermittently laggy and slow sometimes freezes. I think it is because the service worker is weird when working with the readiness for offline reducer.
It is quite broken on integration already because it needs adding the store to that. This seems to be one of the few that isn't very pure.
So.. there room for improvement here but its a story so at least it is fixed and working.
| @@ -0,0 +1,177 @@ | |||
| /* | |||
There was a problem hiding this comment.
Not explicitly all necessary to make the story work but I didn't care to test the limits of what is all needed after running into some undefined errors
|
Waiting for others to be reviewed edited before merging and fixing conflict. It doesn't affect this pr |
Description
Removes ~7000 LOC ! Think of how easy it will be to make a new location now.
Removes location type specific elements for:
Adds
Review notes:
Future looking
Jira link: LF-4672
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist:
pnpm i18nto help with this)