Skip to content

Conversation

@udayjain26
Copy link
Contributor

@udayjain26 udayjain26 commented Jan 20, 2026

Summary

  • Add ability to deactivate processes (soft delete) similar to work centers
  • Deactivated processes are hidden from dropdowns but remain in the database for historical records
  • Users can reactivate processes when needed

Changes

  • Add active column to process table with database migration
  • Recreate processes view to include the new column
  • Add activateProcess service function and update deleteProcess to do soft delete
  • Filter getProcessesList to only return active processes (hides from dropdowns)
  • Add Active column to ProcessesTable with filter capability
  • Add Deactivate/Activate context menu options based on current state
  • Create processes.activate route for reactivation

Test plan

  • Go to Resources > Processes
  • Click on a process row menu and see "Deactivate Process" option
  • Deactivate a process and verify it shows as inactive
  • Filter by Active status to see inactive processes
  • Reactivate a process using "Activate Process" option
  • Verify deactivated processes don't appear in Bill of Process dropdowns

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.
output.mp4

Builds #440

- Add `active` column to process table with migration
- Recreate processes view to include new column
- Add activateProcess and update deleteProcess to soft delete
- Filter getProcessesList to only return active processes
- Add Active column to ProcessesTable with filter
- Add Deactivate/Activate context menu options
- Create processes.activate route for reactivation

Builds crbnos#440
@vercel
Copy link

vercel bot commented Jan 20, 2026

@udayjain26 is attempting to deploy a commit to the Carbon Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@crudmachine crudmachine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@barbinbrad
Copy link
Contributor

This looks great, but can we support the ability to both Delete and Deactivate? Sometimes a process gets created in error. It's good to be able to delete it if it hasn't been used anywhere.

- Add deactivateProcess service function for soft delete
- Restore deleteProcess to do actual hard delete
- Add deactivate route for soft delete (deactivation)
- Update ProcessesTable to show both Deactivate and Delete options
- Add deactivateProcess path helper
@udayjain26
Copy link
Contributor Author

@crudmachine @barbinbrad This is done.

Comment on lines +1583 to +1586
activateProcess: (id: string) =>
generatePath(`${x}/resources/processes/activate/${id}`),
deactivateProcess: (id: string) =>
generatePath(`${x}/resources/processes/deactivate/${id}`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be alphabetized. Maybe rename them processActivate and processDeactivate` so that we can group them together

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants