How to delete or deactivate a branch
Club Admin · Bahasa Melayu below
Two ways to retire a branch: deactivate (soft, keeps history) or delete (hard, irreversible). Deactivate is almost always the right choice.
Deactivate (recommended)
- Sidebar → Branches → open branch → Toggle Active (or Deactivate)
- Confirm
Effects: - Can't create new sessions at this branch - Existing scheduled sessions can still run and take attendance - Assigned coaches / trainees stay linked - Reports still include this branch's historical data - Branch disappears from active dropdown lists (parent portal, session creation)
Reactivate later — same toggle. No data loss.
Delete (only for genuine cleanup)
- Branch detail → Delete Branch
- Enter reason (audit)
- Confirm the count twice
Requirements: - No active sessions scheduled at this branch (cancel or move them first) - No active coach or trainee assignments (transfer or unassign first — see Transfer between branches)
If either fails, AAU Club Manager blocks deletion and tells you what to fix.
What happens on delete:
- Branch record removed from the DB
- Historical sessions that pointed here — their branch FK is set to NULL (or reassigned to a placeholder branch if configured); attendance records survive
- Reports referencing the deleted branch show — (deleted branch)
- Verification codes on historical certificates that mentioned the branch stay valid
When to actually delete
- Test branch created during setup, never used in production
- Duplicate branch mistakenly created twice, both empty
- Data migration cleanup where a branch was import garbage
When NOT to delete
- Branch is closing after months/years of use → deactivate; keep history clean
- Merger with another branch → transfer everything first, then deactivate the old one
- You're not sure → deactivate first; you can always delete later
Bulk
- Branches → tick multiple → Bulk Deactivate or Bulk Delete
- Same restrictions apply per row for delete
Audit
Every deactivate / delete logged with operator, timestamp, reason.
Cara padam / deaktif cawangan
Dua cara: Deaktif (soft, kekal sejarah) atau Delete (hard, irreversible). Deaktif hampir selalu betul.
Deaktif (disyor)
- Menu sisi → Branches → buka → Toggle Active
- Confirm
Kesan: sesi baru tak boleh, sesi terjadual boleh jalan, coach/pelatih kekal link, report kekal. Boleh reactivate.
Delete
Branch → Delete Branch + sebab → confirm dua kali.
Syarat: tiada sesi aktif, tiada coach/pelatih assigned (transfer dulu).
Kesan: rekod padam; sesi lama FK jadi NULL; report tunjuk — (deleted branch); sijil dengan nama branch kekal sah.
Bila padam
Test branch tak diguna, duplikat, garbage import.
Bila jangan
Tutup selepas guna lama → Deaktif. Merger → transfer dulu → deaktif. Ragu → Deaktif.
Bulk
Tanda → Bulk Deactivate / Bulk Delete.