add username edit to users page
This commit is contained in:
parent
02762bb355
commit
7ee5332edf
2
.gitignore
vendored
2
.gitignore
vendored
@ -125,4 +125,4 @@ _modules/*
|
||||
/results/
|
||||
/phpunit*.xml
|
||||
|
||||
.roo/
|
||||
.venv/
|
||||
38
CHECKLIST.md
38
CHECKLIST.md
@ -1,27 +1,15 @@
|
||||
# Project Checklist: Glen RME & Lab Management System
|
||||
|
||||
**Last Updated:** January 19, 2026
|
||||
**Source:** PROJECT_BACKLOG.md
|
||||
**Last Updated:** January 21, 2026
|
||||
|
||||
---
|
||||
|
||||
## P0 - Critical (Access Control & Security)
|
||||
|
||||
_Must be completed first to ensure basic process flow is correct._
|
||||
|
||||
- [ ] **T-002:** Hide/Disable 'Validation' button after 2nd validation
|
||||
- Prevent redundant validation actions
|
||||
- [ ] **T-003:** Restrict Print/Save-to-PDF to CS Role only
|
||||
- Lab can only preview, CS can print/save
|
||||
- [X] **T-004:** Update User Role levels
|
||||
- Standardize roles: Superuser, Admin, Lab, Phlebo, CS
|
||||
|
||||
---
|
||||
|
||||
## P1 - High (Dashboard & UI Improvements)
|
||||
|
||||
_Features that improve speed and correctness of lab operations._
|
||||
|
||||
- [X] **T-005:** Role-Based Dashboard Filtering
|
||||
- Filter by patient_status or service_type (Klinik+Lab vs Lab Only)
|
||||
- [ ] **T-006:** Create Clinical Patients Dashboard
|
||||
@ -38,13 +26,6 @@ _Features that improve speed and correctness of lab operations._
|
||||
- Log unvalidation actions with timestamp, user ID, and reason
|
||||
- [ ] **T-013:** Enhanced Patient Detail Logging
|
||||
- Track: Sample Collection Time, Sample Received Time, Print History
|
||||
|
||||
---
|
||||
|
||||
## P2 - Medium (Maintenance & UX)
|
||||
|
||||
_UI improvements and backend optimizations._
|
||||
|
||||
- [ ] **T-014:** Add Dedicated Print Button
|
||||
- Trigger browser/system print dialog
|
||||
- [ ] **T-015:** Add Error Handling for Preview Button
|
||||
@ -57,30 +38,13 @@ _UI improvements and backend optimizations._
|
||||
- Verify API integration: GDC_cmod, GDC_CS2, Report2
|
||||
- [X] **T-018: Delayed** Dashboard Performance
|
||||
- When getting data more than 100 rows, it load too slow.
|
||||
- Answer : Its Alpine Limitation, later will create pagination for dashboard.
|
||||
|
||||
---
|
||||
|
||||
## P3 - Onsite / Onprem Tasks
|
||||
|
||||
- [ ] **T-010:** Update PDF Report Metadata
|
||||
- Replace 'Printed By' with validating user's name
|
||||
- Add 'Finish Validation' status per sample
|
||||
|
||||
---
|
||||
## Quick Progress Summary
|
||||
|
||||
| Priority | Total | Completed |
|
||||
|----------|-------|-----------|
|
||||
| P0 - Critical | 4 | 0 |
|
||||
| P1 - High | 9 | 0 |
|
||||
| P2 - Medium | 4 | 0 |
|
||||
| **Total** | **17** | **0** |
|
||||
|
||||
---
|
||||
|
||||
## Legend
|
||||
|
||||
- Tasks are ordered by priority (P0 → P1 → P2)
|
||||
- Check items as you complete them
|
||||
- Refer to PROJECT_BACKLOG.md for detailed technical specifications
|
||||
|
||||
@ -71,6 +71,7 @@ class UsersController extends BaseController
|
||||
{
|
||||
$input = $this->request->getJSON(true);
|
||||
$userid = $input['userid'];
|
||||
$username = $input['username'];
|
||||
$userroleid = $input['userroleid'];
|
||||
$password = $input['password'];
|
||||
$password_2 = $input['password_2'];
|
||||
@ -83,8 +84,7 @@ class UsersController extends BaseController
|
||||
$hashedPassword = password_hash($password, PASSWORD_DEFAULT);
|
||||
$sqlUpdate = "
|
||||
UPDATE gdc_cmod.dbo.USERS
|
||||
SET USERROLEID = ?,
|
||||
PASSWORD = ?
|
||||
SET USERROLEID = ?, PASSWORD = ?, USERNAME = ?
|
||||
WHERE USERID = ?
|
||||
";
|
||||
$fullUpdate = true;
|
||||
@ -92,7 +92,7 @@ class UsersController extends BaseController
|
||||
} else {
|
||||
$sqlUpdate = "
|
||||
UPDATE gdc_cmod.dbo.USERS
|
||||
SET USERROLEID = ?
|
||||
SET USERROLEID = ?, USERNAME = ?
|
||||
WHERE USERID = ?
|
||||
";
|
||||
$fullUpdate = false;
|
||||
@ -102,9 +102,9 @@ class UsersController extends BaseController
|
||||
try {
|
||||
|
||||
if ($fullUpdate) {
|
||||
$this->db->query($sqlUpdate, [$userroleid, $hashedPassword, $userid]);
|
||||
$this->db->query($sqlUpdate, [$userroleid, $hashedPassword, $username, $userid]);
|
||||
} else {
|
||||
$this->db->query($sqlUpdate, [$userroleid, $userid]);
|
||||
$this->db->query($sqlUpdate, [$userroleid, $username, $userid]);
|
||||
}
|
||||
|
||||
$this->db->transCommit();
|
||||
|
||||
@ -129,7 +129,7 @@
|
||||
<label class="label">
|
||||
<span class="label-text font-medium text-base-content/70">Username</span>
|
||||
</label>
|
||||
<label class="input input-bordered flex items-center gap-2 focus-within:input-primary transition-all">
|
||||
<label class="input input-bordered w-full flex items-center gap-2 focus-within:input-primary transition-all">
|
||||
<i class="fa fa-user text-base-content/40"></i>
|
||||
<input type="text" class="grow font-mono" x-model="form.username" placeholder="e.g. john.doe" />
|
||||
</label>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user