Commit Graph

163 Commits

Author SHA1 Message Date
redz1029 7716460363 UI Phase 2 (L4): ISR status-pill consistency + shared status-kind mapper
The IT Service Requests list tile still used the legacy StatusPill (violet
"DRAFT"); make it semantic like the detail header. Extract the ISR status ->
StatusKind mapping into a shared helper so list and detail stay in sync.

- New isr_status_kind.dart (public isrStatusKind); removed the private duplicate
  from the detail screen.
- _RequestTile now uses StatusPill.kind(isrStatusKind(status), ...).

(The request cards were already content-dense; no layout change needed.)
Verified: flutter analyze lib clean; flutter build web green.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-09-26 16:11:14 +08:00
redz1029 ab5d385325 UI Phase 2 (L7): tighten Reports chart grid layout
Reduce dead whitespace and align the Reports charts to the cyber card language.
Layout only — charts, data and PDF export untouched.

- report_card_wrapper.dart: flat tonal fill + hairline outline + token radius
  (was surfaceContainerLow + hard 16 radius, no border); uppercase telemetry
  card title to match section headers.
- status_charts.dart / request_distribution_charts.dart: donut charts now use a
  fixed 150px donut with an Expanded legend beside it (was an Expanded donut +
  cramped right legend, leaving a large central gap); card height 220 -> 180.

Verified: flutter analyze lib clean; flutter build web green; visual QA (Reports)
in dark.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-09-26 16:06:32 +08:00
redz1029 9f764150a2 UI Phase 2 (L0): shared layout primitives + chrome standardization
Extract four shared layout widgets from the best existing implementations and
adopt them across list/overview screens, deleting duplicated inline code.
Layout/consistency only — no behavior change.

New primitives (lib/widgets/):
- app_section_header.dart  — AppSectionHeader (azure accent bar + uppercase
  telemetry label; promoted from the dashboard's _sectionTitle).
- app_metric_card.dart     — AppMetricCard (uppercase label + mono value on a
  flat hairline surface; unifies KPI/stat tiles).
- app_status_summary.dart  — AppStatusSummaryRow/Item/Chip (dot + count + label,
  selectable; semantic AppStatusColors).
- app_filter_bar.dart      — AppFilterBar (responsive filter-row chrome).

Adopted / de-duplicated:
- Dashboard: _MetricCard now wraps AppMetricCard; section titles use
  AppSectionHeader (removed local _sectionTitle).
- Tickets / Tasks / ISR: three separate summary-chip implementations
  (_StatusSummaryCard x2, _SummaryChip) collapsed into AppStatusSummaryRow.
- Network Map overview: Sites/Devices tiles -> AppMetricCard (removed local
  _SummaryCard).
- Workforce: "Duty Schedules" header -> AppSectionHeader with trailing chip.

Verified: flutter analyze lib clean; flutter build web green; visual QA (tickets
+ ISR summary chips) in dark.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-09-26 15:42:26 +08:00
redz1029 57377b1b21 UI: Cyber/IT design overhaul with semantic status tokens (Material 3)
Re-theme TasQ with a refined enterprise "Cyber/IT" identity on Material 3.
Functionality is unchanged — only color/shape tokens and a few state widgets.

Foundation:
- Hand-tuned light + dark ColorSchemes (deep-slate surfaces, azure/teal/violet
  accents), tightened 12-16dp shape language, flat hairline-outlined cards.
- New AppStatusColors theme extension (success/warning/danger/info/neutral,
  per-brightness) replacing scattered raw Colors.green/orange/red/grey so status
  color is consistent and legible in dark mode.
- New TechChip mono primitive; StatusPill.kind; M3Card hairline variants;
  tightened AppSurfaces radii.

Per-screen:
- Tokenized status colors + radii across dashboard, tickets, tasks, IT service
  requests, attendance, whereabouts, network map, reports charts, auth, and
  shared/admin screens. Added _ticketStatusKind/_taskStatusKind/_isrStatusKind
  mappers so status carries meaning consistently.
- Fixed white pie-slice borders for dark mode; dropped ad-hoc dialog radius
  overrides in favor of the theme default. Categorical palettes (leave-type
  icons, team color picker, distribution charts) intentionally preserved.

Verified: flutter analyze lib clean; flutter build web green; visual QA in
light and dark (dashboard, tickets, attendance).

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-09-26 15:13:47 +08:00
redz1029 3cb980b629 QA hardening: security RLS fixes, Flutter 3.47.5 upgrade, UI/validation fixes
Security — enforce write authorization server-side (was UI/RPC-only):
- it_service_requests RLS: block cross-office read/edit + self-approve (QA-015)
- pass_slips RLS: owner can complete but not self-approve (QA-046)
- swap_requests RLS: scope select/update to participants + admin (QA-047)
- storage: tighten it_service_attachments + task_attachments write/delete (QA-027)
- admin_user_management edge function: allow programmers to manage users (QA-016)

Fixes:
- workforce generator "uncovered shifts" false alarms (QA-043/044)
- network-map VLAN + New-location dialog validation, disabled-until-valid (QA-048)
- de-flake time-of-day-dependent dashboard metrics test (QA-045)

Toolchain:
- upgrade to Flutter 3.47.5 / Dart 3.13.4; font_awesome_flutter 11.0.0,
  flutter_quill 11.6.0, pdfrx 2.6.5; clear resulting deprecations (QA-002)

analyze clean; 139 tests pass; web build succeeds. Report + evidence in docs/qa/.

Note: also carries the in-progress Brick model cleanup already present in the
working tree. QA-001 (AI keys public in the build) is deferred by owner decision.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-09-26 11:52:16 +08:00
redz1029 e49b52949c Fixed Edit Port Dialog on Network Map 2026-06-06 18:30:58 +08:00
redz1029 65a42039ee Enhanced Leave and Pass Slip UI/UX 2026-06-06 18:29:56 +08:00
redz1029 d813ee45a2 Network map enhancements and fixes 2026-06-05 16:42:56 +08:00
redz1029 e2ddc9a3ae Enhanced UI of IT Job Checklist 2026-06-05 10:48:53 +08:00
redz1029 5e20d14f23 Fixed attendance 2026-06-05 10:34:26 +08:00
redz1029 5d818e0d4f Enhanced APK Update Screen 2026-06-05 09:15:48 +08:00
redz1029 a91c049353 Scrollable Navigation Rail 2026-06-05 09:15:22 +08:00
redz1029 1768ed7b04 Fixed custom shift type not appearing in dropdown.
Fixed inconsitent time reflection on edit.
2026-06-05 07:10:38 +08:00
redz1029 f39bc2cc06 Fixed overtime checkin not showing 2026-06-04 07:43:23 +08:00
redz1029 5d0a66bb52 Initial Commit : Network Map 2026-05-21 06:29:14 +08:00
redz1029 82141dd61c Improved attendance screen navigations on mobile 2026-05-18 23:53:08 +08:00
redz1029 425fe8e683 Weekly, Monthly and Custom Range Worklog 2026-05-16 05:10:04 +08:00
redz1029 4b9b0c7a20 Fixed report rendering in web 2026-05-14 22:08:15 +08:00
redz1029 e9d1af867a Notification Screen and tasq_adaptive_list enhancements 2026-05-11 11:34:34 +08:00
redz1029 30b301765b * Improved Task and Ticket Detail Screen
* Made Office assignment searchable in Task and Ticket Creation and Edit Screen
2026-05-10 17:54:03 +08:00
redz1029 4d0d4d5ab3 Attendance DTR and UI Improvement for Offline Rediness 2026-05-09 17:32:07 +08:00
redz1029 ccedf6e5f0 Worklog, anti geo spoofing and UI Polish 2026-05-05 05:51:19 +08:00
redz1029 858520bd8d Offline rediness 2026-05-03 14:50:14 +08:00
redz1029 783c5eb0be * Task/Ticket desktop dialogs — widened from 520 → 600dp, and tasks now uses SizedBox(width: 600) instead of ConstrainedBox(maxWidth:) which was the root cause of the "still small" issue (max-only never forced expansion)
* Pass Slip + Leave — both dialogs gained an isSheet flag; callers now branch on AppBreakpoints.tablet: bottom sheet on mobile, dialog on desktop
2026-04-30 06:45:51 +08:00
redz1029 48cd3bcd60 Offline Support 2026-04-27 06:20:39 +08:00
redz1029 f223d1f958 iOS PWA and IT Job Checklist for IT Staff view 2026-04-11 07:40:12 +08:00
redz1029 5cb6561924 added ruflo 2026-04-09 19:01:53 +08:00
redz1029 872c2aab87 UI Enhancements in IT Service Request, Announcements, Workforce and notification fixes 2026-03-22 18:00:10 +08:00
redz1029 049ab2c794 Added My Schedule tab in attendance screen
Allow 1 Day, Whole Week and Date Range swapping
2026-03-22 11:52:25 +08:00
redz1029 ba155885c0 Immediate feedback on sending IT Job Reminder 2026-03-21 19:28:53 +08:00
redz1029 beb21e48d0 Announcements: Show snackbar on event and enhanced comment notification messages 2026-03-21 19:28:18 +08:00
redz1029 3fb6fd5c93 Announcements and IT Job Checklist 2026-03-21 18:51:04 +08:00
redz1029 b2c3202317 Enhaced m3 motion 2026-03-21 12:57:41 +08:00
redz1029 d484f62cbd Implement push notification reminder system with 9 notification types
Adds comprehensive push notification reminders using pg_cron + pg_net:
- Shift check-in reminder (15 min before, with countdown banner)
- Shift check-out reminder (hourly, persistent until checkout)
- Overtime idle reminder (15 min without task)
- Overtime checkout reminder (30 min after task completion)
- IT service request event reminder (1 hour before event)
- IT service request evidence reminder (daily)
- Paused task reminder (daily)
- Backlog reminder (15 min before shift end)
- Pass slip expiry reminder (15 min before 1-hour limit, with countdown banner)

Database: Extended scheduled_notifications table to support polymorphic references
(schedule_id, task_id, it_service_request_id, pass_slip_id) with unique constraint
and epoch column for deduplication. Implemented 8 enqueue functions + master dispatcher.
Uses pg_cron every minute to enqueue and pg_net to trigger process_scheduled_notifications
edge function, eliminating need for external cron job. Credentials stored in vault with
GUC fallback for flexibility.

Flutter: Added ShiftCountdownBanner and PassSlipCountdownBanner widgets that display
persistent countdown timers for active shifts and pass slips. Both auto-dismiss when
user completes the action. FCM handler triggers shift countdown on start_15 messages.
navigate_to field in data payload enables flexible routing to any screen.

Edge function: Updated process_scheduled_notifications to handle all 9 types with
appropriate titles, bodies, and routing. Includes pass_slip_id in idempotency tracking.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-20 18:26:48 +08:00
redz1029 74197c525d Enhanced material design 3 implementation 2026-03-20 15:15:38 +08:00
redz1029 a39e33bc6b Added Team Activity Dashboard 2026-03-18 22:04:15 +08:00
redz1029 3af7a1e348 Added configurable shift types and holiday settings 2026-03-18 16:51:34 +08:00
redz1029 4eaf9444f0 Enhanced Logbook layout 2026-03-18 10:56:31 +08:00
redz1029 84837c4bf2 Show overtime checkin when a user does not have a schedule for the day or the schedule ended for the day 2026-03-18 04:51:45 +08:00
redz1029 3e3e4d560e Ensures allowing assigned IT Staff to check in outside geofence when and IT Service Request venue is outside premise 2026-03-17 07:20:24 +08:00
redz1029 eeab3b1fcf render overtime anytime needed 2026-03-16 19:46:51 +08:00
redz1029 81853c4367 Added programmer role and fixed snackbar not showing 2026-03-16 07:23:20 +08:00
redz1029 885b543fb5 Pass Slip and Leave approval/rejection push notifications 2026-03-15 22:36:33 +08:00
redz1029 6fd3b66251 OTA Updates for adnroid app and web apk uploader 2026-03-15 19:24:34 +08:00
redz1029 9bbaf67fef A more robust self hosted OTA updates implementation 2026-03-13 07:15:28 +08:00
redz1029 9267ebee2c No need update check for web 2026-03-12 20:38:19 +08:00
redz1029 0bd2a94ece OTA Update attempt 2026-03-11 22:28:38 +08:00
redz1029 f8c79acbbc Fixed Leave rejection and approvals 2026-03-11 18:59:28 +08:00
redz1029 21e6d68910 Fixed In Progress ISR not reflecting on IT Staff Pulse Dashboard Status Pill
Made the Location Tracking more persistent
2026-03-11 07:43:14 +08:00
redz1029 24ecca9f06 Background location notification icon and a much more user friendly Location Tracking toggle 2026-03-09 22:57:28 +08:00