Files
BarangaySystem/app/Enums/UserActions.php
Jonathan Sykes 19fec0933b
Some checks failed
tests / PHP 8.2 (swoole-5.1.6) (push) Has been cancelled
tests / PHP 8.3 (swoole-5.1.6) (push) Has been cancelled
tests / PHP 8.4 (swoole-6.0) (push) Has been cancelled
feat: Phase 1 bootstrap — adapt BukidBountyApp as BarangaySystem
- Replace UserTypes with barangay roles (super_admin, punong_barangay,
  kagawad, secretary, treasurer, sk_chairperson, sk_councilor, tanod,
  bhw, daycare_worker, staff, resident, audit)
- Replace UserActions with barangay-specific permissions (residents,
  households, blotters, documents, fee payments, projects, budget)
- Replace modules config with barangay modules (residents, households,
  blotters, documents, certificates, projects, budget, announcements,
  accounting, chapters, qr_payment, subscriptions, landing_pages)
- Update app name, seeders, and landing page to barangay defaults
- Add new enums: DocumentStatus, BlotterStatus, PaymentStatus
- Add 6 new migrations: residents, households, blotters, document
  requests, projects, budget
- Add RequestTypeSeeder with default certificate fee schedule
- Update README with BarangaySystem stack, roles, and remotes
2026-06-06 18:47:20 +08:00

127 lines
4.8 KiB
PHP

<?php
namespace App\Enums;
enum UserActions: string
{
// User management
case DeleteUser = 'deleteuser';
case ModifyUser = 'modifyuser';
case SetActiveUser = 'setactiveuser';
case SetInActiveUser = 'setinactiveuser';
case CreateUser = 'createuser';
case CreateUserSuperAdmin = 'createusersuperadmin';
case CreateUserPunongBarangay = 'createuserpunongbarangay';
case CreateUserKagawad = 'createuserkagawad';
case CreateUserSecretary = 'createusersecretary';
case CreateUserTreasurer = 'createusertreasurer';
case CreateUserSkChairperson = 'createuserskchairperson';
case CreateUserSkCouncilor = 'createuserskcouncilor';
case CreateUserTanod = 'createusertanod';
case CreateUserBhw = 'createuserbhw';
case CreateUserDaycareWorker = 'createuserdaycareworker';
case CreateUserStaff = 'createuserstaff';
case CreateUserResident = 'createuserresident';
case CreateUserAudit = 'createuseraudit';
// Console access
case DeveloperConsole = 'devconsole';
case UltimateConsole = 'ultconsole';
case UltimateLogs = 'ultlogs';
case UltimateReports = 'ultreports';
case UltimateMaintenance = 'ultmaintenance';
case UltimateQuery = 'ultquery';
case UltimateGlobalMessage = 'ultglobalmessage';
case UltimateFlush = 'ultflush';
// User notes/exec
case SetUserNotes = 'setusernotes';
case DeleteUserNotes = 'deleteusernotes';
case ViewUserNotes = 'viewusernotes';
case ViewUserExec = 'viewuserexec';
case DeleteUserExec = 'deleteuserexec';
case UpdateUserExec = 'updateuserexec';
case SetSelfNotes = 'setselfnotes';
case ViewSelfExec = 'viewselfexec';
case DeleteSelfNotes = 'delteselfnotes';
case UpdateSelfExec = 'updateselfexec';
// Reports & roles
case ViewGlobalReports = 'viewglobalreports';
case ModifyGlobalReports = 'modifyglobalreports';
case DeleteGlobalReports = 'deleteglobalreports';
case ChangeUserPassword = 'changeuserpassword';
case ForceLogoutUser = 'forcelogoutuser';
case UserAllowedtoChangeAnotherUserRoles = 'userchangeroles';
case UserAllowedtoViewSelfRoles = 'selfviewroles';
case UserAllowedtoViewOtherUserRoles = 'userviewroles';
case UserAllowedtoViewAllRoles = 'viewallroles';
case ChangeAnotherUsersParent = 'changeotherusersparents';
case ViewAllUserTypes = 'viewallusertypes';
case ListAllUsersAsParentforUserCreation = 'listallusersasparentforUserCreation';
case CheckifUsernameExists = 'checkifusernameexists';
case CheckifMobileNumberExists = 'checkifmobilenumberexists';
case BypassMobileNumberFormat = 'bypassmobilenumberformat';
// Files
case UploadAllFiles = 'uploadallfiles';
case ViewAllFiles = 'viewallfiles';
case DeleteAllFiles = 'deleteallfiles';
case ModifyAllFiles = 'modifyallfiles';
// Announcements
case CreateAnnouncement = 'createannouncement';
case ModifyAnnouncement = 'modifyannouncement';
case DeleteAnnouncement = 'deleteannouncement';
case ViewAllAnnouncements = 'viewallannouncements';
// User info & settings
case ViewUserInfo = 'viewuserinfo';
case ManageUserInfo = 'manageuserinfo';
case ManageLandingPages = 'managelandingpages';
// QR PH Payment
case ManageQrphPaymentCode = 'manageqrphpaymentcode';
// Chapters / Geography
case ViewChapterOrgChart = 'viewchapterorgchart';
case ManageChapterMembers = 'managechaptermembers';
case ViewScopedMemberReports = 'viewscopedmemberreports';
case AssignChapterOfficer = 'assignchapterofficer';
// Accounting
case ViewAccountingReports = 'viewaccountingreports';
case ManageAccounting = 'manageaccounting';
// Barangay residents & households
case ViewResidents = 'viewresidents';
case ManageResidents = 'manageresidents';
case ImportResidents = 'importresidents';
case ExportResidents = 'exportresidents';
case ViewHouseholds = 'viewhouseholds';
case ManageHouseholds = 'managehouseholds';
// Barangay documents & certificates
case ViewDocumentRequests = 'viewdocumentrequests';
case CreateDocumentRequest = 'createdocumentrequest';
case ProcessDocumentRequest = 'processdocumentrequest';
case ManageRequestTypes = 'managerequesttypes';
case ManageFeeSchedules = 'managefeeschedules';
// Blotter / Incident
case ViewBlotters = 'viewblotters';
case CreateBlotter = 'createblotter';
case ProcessBlotter = 'processblotter';
case ManageBlotterHearings = 'manageblotterhearings';
// Barangay projects & budget
case ViewBarangayProjects = 'viewbarangayprojects';
case ManageBarangayProjects = 'managebarangayprojects';
case ViewBarangayBudget = 'viewbarangaybudget';
case ManageBarangayBudget = 'managebarangaybudget';
// Fee payments
case ViewFeePayments = 'viewfeepayments';
case ManageFeePayments = 'managefeepayments';
}