feat: implement barangay system phases 2-14
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

Complete adaptation from BukidBountyApp to Philippine barangay governance:

- Barangay models: Resident, Household, HouseholdMember, Blotter, BlotterHearing,
  DocumentRequest, RequestPayment, RequestType, BarangayProject, BarangayBudget
- Controllers: ResidentController, HouseholdController, BlotterController,
  BlotterHearingController, DocumentRequestController, RequestTypeController,
  ProjectController, BudgetController, QRPHController, AdminConsoleController,
  UserController, FileController, ChapterController, LoginController
- Vue pages: Home, ManageResidents, ResidentProfile, ManageHouseholds, ManageBlotters,
  BlotterDetail, RequestDocument, ManageDocumentRequests, DocumentRequestDetail,
  ManageRequestTypes, ManageProjects, BudgetLedger, AdminConsole
- Barangay roles: PunongBarangay, Kagawad, Secretary, Treasurer, SK, Tanod, BHW, Staff, Resident
- UserPermissions matrix rewritten with barangay-specific permission mappings
- VueRouteMap replaced with barangay SPA routes
- UserActions enum references corrected across all controllers
- Removed all market/cooperative/POS/subscription code and models
This commit is contained in:
Jonathan Sykes
2026-06-07 03:09:09 +08:00
parent 19fec0933b
commit fbb7e3ff37
234 changed files with 5582 additions and 39457 deletions

View File

@@ -4,7 +4,6 @@ declare(strict_types=1);
namespace App\Support;
use App\Models\Accounting\Account;
use App\Models\SystemSetting;
use Hypervel\Support\Facades\Config;
use Hypervel\Support\Str;

View File

@@ -6,8 +6,7 @@ namespace App\Support;
use Hypervel\Codec\Json;
use App\Models\User;
use App\Models\Market\Product;
use App\Models\Market\Store;
use App\Models\Barangay\Resident;
/**
* HashkeyResolver provides a universal resolver for any model by hashkey.
@@ -51,25 +50,11 @@ class HashkeyResolver
}
/**
* Resolve a product by its hashkey.
*
* @param string $hashkey The product's hashkey
* @return mixed|null The resolved Product instance or null if not found
* Resolve a resident by their hashkey.
*/
public function resolveProductByHashkey($hashkey)
public function resolveResidentByHashkey($hashkey)
{
return $this->resolveByHashkey($hashkey, Product::class);
}
/**
* Resolve a store by its hashkey.
*
* @param string $hashkey The store's hashkey
* @return mixed|null The resolved Store instance or null if not found
*/
public function resolveStoreByHashkey($hashkey)
{
return $this->resolveByHashkey($hashkey, Store::class);
return $this->resolveByHashkey($hashkey, Resident::class);
}
/**

View File

@@ -86,15 +86,11 @@ class SystemSettingsHelper
}
/**
* Get the main cooperative/organization model (if any).
* Get the barangay name from settings.
*/
public static function mainOrganization(): ?\App\Models\Market\Organization
public static function barangayName(): ?string
{
$hashkey = static::mainOrganizationHashkey();
if (!$hashkey) {
return null;
}
return \App\Models\Market\Organization::where('hashkey', $hashkey)->first();
return static::get('barangay_name');
}
/**