Skip to content

Conversation

@kathyavini
Copy link
Collaborator

@kathyavini kathyavini commented Jan 24, 2026

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:

  • updateUserFarmWage and setUserFarmWageDoNotAskAgain options were removed from the <HourlyWageInputs /> radio group along with all supporting logic
    • The patchWageUrl exists unchanged on the backend, but is now only called through updateUserFarmSaga
    • The setUserFarmWageDoNotAskAgain flow 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 backend
  • The bifurcated logic between assignees who have a wage and those two don't has been removed; now all admin users see the same two radios
    • Note: the removed logic was defined in contentForWorkerWithWage and only seen in the task creation flow
  • A new UI element reports the userFarm wage in <TaskAssign /> if there is one
  • the saga and the API on patchTaskWage have been updated so that override_hourly_wage can be unset instead of just set
  • override_hourly_wage is returned back to the frontend so it can be displayed once its set
  • wage logic has been removed from the <QuickAssignModal />, which is accessed through <TaskCard /> and <TaskReadOnly />
    • Now that logic exists only in the new <EditTaskWageModal />
  • There is a new UI element on <PureTaskReadOnly /> to display the task wage
  • the offline adjusts related to this part of this app have been added:
    • the snackbar + optimistic update on patchTaskWage
    • hiding the "Assign all tasks on this date to {{name}}" checkbox when offline

Jira link: https://lite-farm.atlassian.net/browse/LF-5124

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Passes test case
  • UI components visually reviewed on desktop view
  • UI components visually reviewed on mobile view
  • Other (please explain)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The precommit and linting ran successfully
  • I have added or updated language tags for text that's part of the UI
  • I have ordered translation keys alphabetically (optional: run pnpm i18n to help with this)
  • I have added the GNU General Public License to all new files

…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?
@kathyavini kathyavini self-assigned this Jan 24, 2026
@kathyavini kathyavini force-pushed the LF-5124-remove-the-ability-to-set-an-hourly-wage-from-the-task-flows branch from 67f4745 to 93f9518 Compare January 24, 2026 00:15
…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
@kathyavini kathyavini added enhancement New feature or request new translations New translations to be sent to CrowdIn are present labels Jan 27, 2026
@kathyavini kathyavini requested a review from SayakaOno January 29, 2026 22:09
try {
const irrigationTaskTypes =
await IrrigationTypesModel.getAllIrrigationTaskTypesByFarmId(farm_id);
const irrigationTaskTypes = await IrrigationTypesModel.getAllIrrigationTaskTypesByFarmId(
Copy link
Collaborator Author

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(
Copy link
Collaborator Author

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."
Copy link
Collaborator Author

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.

@kathyavini kathyavini marked this pull request as ready for review January 30, 2026 20:28
@kathyavini kathyavini requested review from a team as code owners January 30, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request new translations New translations to be sent to CrowdIn are present

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants