Skip to content

feat: modification and deletion admin routes - #43

Open
Rizzy-2005 wants to merge 15 commits into
mainfrom
modification-deletetion-admin-routes
Open

feat: modification and deletion admin routes#43
Rizzy-2005 wants to merge 15 commits into
mainfrom
modification-deletetion-admin-routes

Conversation

@Rizzy-2005

@Rizzy-2005 Rizzy-2005 commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

I have added admin routes for:

  • Changing the end-user isActive and soft-deleting end-users (PATCH /users/:userId, DELETE /users/:userId)
  • Updating and soft-deleting organizations (PATCH /organizations/:id, DELETE /organizations/:id)
  • Updating and soft-deleting venues (PATCH /venues/:id, DELETE /venues/:id)
  • Updating event categories (PATCH /event-categories/:id)
  • Updating and soft-deleting event types (PATCH /event-types/:id, DELETE /event-types/:id)
  • Updating and soft-deleting workflow templates (PATCH /workflow-templates/:templateId, DELETE /workflow-templates/:templateId)
  • Updating and soft-deleting workflow template steps (PATCH /workflow-templates/:templateId/steps/:stepId, DELETE /workflow-templates/:templateId/steps/:stepId)

Major things to be noticed:

  • Soft-deletion for Organizations (DELETE /organizations/:id) with child sub-organization guards (409 Conflict), cascading soft-deletions across managed_entity, member user_roles, and draft/pending hosted events, while revoking pending co-host invitations.
  • Soft-deletion for Venues (DELETE /venues/:id), cascading soft-deletions across managed_entity, member user_roles, and active venue_allotment records, alongside event-facility with venue-allotments cleanup.
  • Soft-deletion for Workflow Template Steps (DELETE /workflow-templates/:id/steps/:stepId) with automatic linked-list chain re-linking (initialStepId or prevStep.nextStepId repointing) and cascade soft-deletion of associated step roles.

Major fix:

  • When someone takes over a role (like HoD), we now automatically transfer their pending approval tasks to the new person so events don't get blocked. When roles are updated in assignOrganizationMemberRoles or assignVenueMemberRoles, the transaction automatically finds any replaced role IDs and updates all matching pending step assignments in workflow_instance_step_assignment to the new member's role ID.(only for pending)

All the routes are tested except the workflow-template, workflow-template-steps, and the major fix. I am doing the tests for this currently.

@Swassyman Swassyman changed the title Modification deletetion admin routes Modification deletion admin routes Jul 21, 2026
@Rizzy-2005
Rizzy-2005 marked this pull request as ready for review July 25, 2026 18:16
@Rizzy-2005
Rizzy-2005 requested a review from dcdunkan July 25, 2026 18:16
@dcdunkan dcdunkan changed the title Modification deletion admin routes feat: modification and deletion admin routes Aug 5, 2026
@dcdunkan

dcdunkan commented Aug 5, 2026

Copy link
Copy Markdown
Member

Facility handling logic was adjusted to reflect the current facility implementation. Also, the upstream doesn't have any methods for editing/deleting the new implementation of facilities & facility-types. (just saying)

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.

2 participants