Files
BarangaySystem/docs/completed/prt-20260402230000.md
2026-06-06 18:43:00 +08:00

28 lines
1.7 KiB
Markdown

# Plan: Cooperative Member and User Information Enhancement
## 🎯 Objective
Expand the user information and cooperative membership system to include all fields defined in the `README.md` specification. Ensure a premium UI is maintained for managing these fields. Add logic to automatically link emergency contact info to existing system users.
## 🏗️ Architecture & Requirements
1. **Database Expansion**:
- **Table `user_infos`**: Add fields for personal info, social accounts, address fragments, family/education, employment/livelihood, and government info.
- **Table `cooperative_members`**: Add membership-specific details (level, officer status, concurrent positions, etc.).
- **Foreign Keys**: Ensure `emergency_contact_user_id` is added to `user_infos` to link emergency contacts to existing users.
2. **Model Updates**:
- `UserInfo.php`: Add new fillables and an `emergencyContactUser` relation.
- `CooperativeMember.php`: Add fillables for membership details.
3. **Logic Enhancements**:
- `UserInfoController.php`: Add logic to search for a user by name or phone during emergency contact updates to link them.
4. **UI Updates**:
- `UserInfoEdit.vue`: Redesign to handle the expanded field set with a cleaner, grouped layout (Personal, Social, Family/Education, etc.).
- Add a toggle/search for linking emergency contacts to existing users.
## 🛠️ Proposed Tech Stack
- **Backend**: Laravel-style Hypervel (PHP 8.2+).
- **Frontend**: Vue 3 with Composition API.
- **Styling**: Bootstrap 5 with premium glassmorphism and `.rounded-pill`.
## 🔄 Dependencies
- Existing `user_infos` and `cooperative_members` tables.
- `UserPermissions` and `UserActions` for access control.