-
Notifications
You must be signed in to change notification settings - Fork 96
LF-5124 Remove the ability to set an hourly wage from the task flows #4006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: integration
Are you sure you want to change the base?
LF-5124 Remove the ability to set an hourly wage from the task flows #4006
Conversation
…ide_hourly_wage override_hourly_wage was saved in the database entry for the task but never read again by the frontend; I'm assuming this was unintentional?
67f4745 to
93f9518
Compare
…ntend This should complete the missing frontend <--> backend communication around override_hourly_wage and the wage override
…restore controller return wage_at_moment null is actually the correct value until task completion if override_hourly_wage is false
The other grabCurrencySymbol is marked deprecated
…hourly-wage-from-the-task-flows
…hourly-wage-from-the-task-flows
…signForm There is no longer any context in which TaskAssign will read those properties; only set them initially
| try { | ||
| const irrigationTaskTypes = | ||
| await IrrigationTypesModel.getAllIrrigationTaskTypesByFarmId(farm_id); | ||
| const irrigationTaskTypes = await IrrigationTypesModel.getAllIrrigationTaskTypesByFarmId( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linting
| const new_soil_amendment_task = fakeTaskData.soil_amendment_task(farm_id); | ||
| const new_soil_amendment_task_products = | ||
| await fakeProductData.soil_amendment_task_products(farm_id); | ||
| const new_soil_amendment_task_products = await fakeProductData.soil_amendment_task_products( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linting
| "HOURLY_WAGE": "Hourly Wage", | ||
| "HOURLY_WAGE_RANGE_ERROR": "Hourly Wage must be a positive number less than 999,999,999", | ||
| "HOURLY_WAGE_TOOLTIP": "Hourly wages can be set by selecting an individual on the People tab under 'my farm'." | ||
| "HOURLY_WAGE_TOOLTIP": "This task-specific wage will override the assignee's default wage. Default worker wages can be managed in the People tab." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rather like this tooltip, but I totally made it up 😅 Loïc was already out for the day; will need checking next week.
Also I'm not sure what to call the "People" section other than "tab" -- I took that from the original text but I don't think it's the right term.
Description
Okay, this PR went through some phases of being quite convoluted, but I think with the new modal, it's become much more manageable. Still a lot of files touched, but many are now just straight removal of logic -- hopefully not too bad to review 🤞
Summary of changes:
updateUserFarmWageandsetUserFarmWageDoNotAskAgainoptions were removed from the<HourlyWageInputs />radio group along with all supporting logicpatchWageUrlexists unchanged on the backend, but is now only called throughupdateUserFarmSagasetUserFarmWageDoNotAskAgainflow was cleaned up, and the saga itself marked as deprecated rather than deleted. This is a full-stack flow that would include an irreversible migration test changes to completely purge; the deprecation is a reminder that the functionality still exists on the backendcontentForWorkerWithWageand only seen in the task creation flow<TaskAssign />if there is onepatchTaskWagehave been updated so thatoverride_hourly_wagecan be unset instead of just setoverride_hourly_wageis returned back to the frontend so it can be displayed once its set<QuickAssignModal />, which is accessed through<TaskCard />and<TaskReadOnly /><EditTaskWageModal /><PureTaskReadOnly />to display the task wagepatchTaskWageJira link: https://lite-farm.atlassian.net/browse/LF-5124
Type of change
How Has This Been Tested?
Checklist:
pnpm i18nto help with this)