Commit Graph
1174 Commits
Author SHA1 Message Date
Jeppe Bundgaard 81bd4c8583 Add interval-based status polling and toggle functionality to SelfServeMachineRelayControls:
- Refactored relay status retrieval with a polling mechanism using `setInterval`.
- Added relay toggle controls (`b-switch`) for machine, program picker, and cleaner relays.
- Improved error handling for relay status fetch and toggle operations.
- Updated lifecycle hooks to clean up polling on component unmount.
2026-03-25 12:24:10 +01:00
Jeppe Bundgaard 97bcf73db8 Add relay machine controls and program picker integration:
- Added `relay_machine_program_picker_id` and `relay_machine_cleaner_id` fields across components, views, and localization files.
- Updated relay control logic to include program picker and cleaner relays.
- Extended e2e and unit tests to validate new relay functionalities.
- Refactored related components to handle expanded relay configurations.
2026-03-25 11:42:02 +01:00
Jeppe Bundgaard c6531076ae Add Department Self-Serve dashboard with machine relay controls and API integration:
- Implemented `DepartmentSelfServe` dashboard for managing machine statuses and relays.
- Added components for machine display, controls, and relay connectivity (`SelfServeMachine`, `SelfServeMachineControls`, `SelfServeMachineRelayControls`).
- Integrated machine relay API endpoints (`/modules/self-serve/lane/relay/machine/*`) for status retrieval and updates.
- Updated router configuration with a new route for the self-serve dashboard.
- Extended OpenAPI definition to include machine relay APIs and enhance department weather targets documentation.
2026-03-25 11:24:20 +01:00
Jeppe Bundgaard 1b97332c38 Add unit tests for shared date range synchronization and refactor DepartmentDashboardOverviewNavigation components:
- Added behavior tests covering shared date range updates across multiple components, including `DepartmentDailyReportThisWeek` and `DepartmentDailyReportSmall`.
- Updated `DepartmentDashboardOverviewNavigation` to route date updates via the shared daily report store.
- Refactored components to use shared `DepartmentDailyReportObject` for date state management.
- Adjusted e2e tests to validate date range synchronization and department goal progress tracking.
2026-03-24 16:53:16 +01:00
Jeppe Bundgaard 477688d16e Add cadence target calculation for timeframe-based goal progress resolution:
- Implemented `computeCadenceTargetForTimeframe` utility to calculate dynamic targets based on timeframe and cadence criteria.
- Extended tests to validate timeframe-specific progress key selection, slice resolution, and cadence-based targets.
- Refactored `DepartmentGoals` to integrate cadence-aware target resolution and fallback logic.
- Enhanced e2e tests to cover bi-weekly cadence goals and dynamic target updates across timeframes.
2026-03-24 16:32:35 +01:00
Jeppe Bundgaard bc043b95f9 Refactor DepartmentWeather status computation with work-hour-based thresholds: add health categories and fallback for zero hours. 2026-03-24 15:07:55 +01:00
Jeppe Bundgaard 1e6590e2df Add goal progress resolver utility with extensive tests and DepartmentGoals refactor.
- Implemented `goalProgressResolver` utility for resolving progress keys, slices, and periods.
- Refactored `DepartmentGoals` to integrate `goalProgressResolver` for improved clarity and modularity.
- Updated progress calculations with cadence-aware key handling and fallback resolution.
- Add isLoading handling and loader animations to `DepartmentWeather` and improve `GET` request concurrency.
2026-03-24 14:58:48 +01:00
Jeppe Bundgaard 8b8780bbaf Refactor DepartmentWeather for key-based rendering and summary toggle improvements:
- Added `getEntryKey` function to generate unique keys for dynamic entries.
- Enhanced `isMultiDaySelection` watcher with immediate execution option.
- Updated DOM structure for action buttons with inline export button support.
- Adjusted unit tests to cover functional changes and new test case for summary mode toggling.
2026-03-24 13:59:38 +01:00
Jeppe Bundgaard 5a0d1b7712 Add daily summary toggle to DepartmentWeather with tests and refactor:
- Implemented a daily summary toggle for multi-day selections in `DepartmentWeather`.
- Refactored state computation to support hourly and daily views with weather/status aggregation.
- Added unit tests for summary toggle functionality and entry summarization logic.
2026-03-24 13:39:15 +01:00
Jeppe Bundgaard 3cc0a5bb15 Add tests for DepartmentWeather and update daily report wiring:
- Added unit tests for `DepartmentWeather` component to validate weather API calls, state handling, and edge cases (e.g., no departments, stale responses, hidden hours).
- Updated `DepartmentDailyReport` wiring to pass `department_ids`, `date_from`, and `date_to` to `DepartmentWeather`.
- Enhanced OpenAPI definition for weather timeline API with refined query parameters (`date_from`, `date_to`) and updated descriptions.
- Improved `GoalFormModal` layout, adding `department-grid--single-scroll` for better scrolling behavior and responsiveness.
2026-03-24 13:33:17 +01:00
Jeppe Bundgaard ff944ad1f2 Refactor goal form modal, update internationalization strings, and enhance API parameters:
- Restructured goal form modal with new tabbed layout for better usability.
- Updated and corrected i18n strings across multiple languages.
- Enhanced API descriptions for department weather timeline, added support for multiple department IDs, and refined query parameter logic.
2026-03-24 13:07:26 +01:00
Jeppe Bundgaard 1ee2da7ad8 Add advanced goal criteria handling with input normalization, duration modes, and improved validation:
- Introduced target duration modes (`weeks`, `months`, `years`, `legacy`) with optional cadence.
- Implemented input normalization for department daily targets and progress alerts.
- Added validations for duration cadence and date ranges.
- Updated internationalization strings for new form fields and validation messages.
- Extended tests for goal criteria serialization, normalization, and API payload generation.
2026-03-24 12:48:54 +01:00
Jeppe Bundgaard f372e59a07 Enhance Workfeed diagnostics and localization:
- Updated `listShifts` diagnostic modal to include new filters (date range, employee, release state) with improved UI/UX.
- Simplified employee and department lookup diagnostics by removing unnecessary search inputs.
- Standardized error handling and validation messages for shift diagnostics.
- Extended localization files across all supported languages with new diagnostic strings.
- Adjusted Workfeed module logic to reflect updated query parameters (`startFrom`, `startTo`, `employeeID`, `released`).
- Updated and added unit and e2e tests to validate new diagnostic flows and parameter constraints.
2026-03-24 11:52:15 +01:00
Jeppe Bundgaard eeef782705 Simplify Workfeed schemas and endpoint descriptions:
- Removed unnecessary query parameters and pagination fields from `employees`, `shifts`, and `departments` endpoints.
- Standardized `description` fields with explicit API request details.
- Consolidated schema components (e.g., `WorkfeedPagination`) and enhanced examples for clarity.
- Updated API URL from `https://api.workfeed.io` to the new production endpoint.
- Improved shift schemas with granular fields for approvals, breaks, and comments.
2026-03-24 11:37:16 +01:00
Jeppe Bundgaard 44031da7b1 Add support for CompanyID in Workfeed configuration and update localization files:
- Extend i18n locales to include `company_id` and `company_id_desc` strings for API synchronization.
- Add `CompanyID` field to Workfeed configuration UI in `ConfigurationWorkfeed.vue`.
- Update unit and e2e tests to validate `CompanyID` functionality.
- Adjust Workfeed module logic to handle `CompanyID` get/set operations.
2026-03-24 11:22:36 +01:00
Jeppe Bundgaard 943bc8ec97 Add Workfeed module with configuration management, diagnostics, and API integration:
- Implement `Workfeed` module with endpoints for employees, shifts, departments, and diagnostics.
- Add configuration UI for enabling Workfeed, API settings (`api_url`, `api_key`), and integration diagnostics.
- Add unit tests for module schema validation, API endpoints, and diagnostics contract.
- Introduce smoke test for Workfeed configuration and modal diagnostics.
- Extend i18n locales to support Workfeed integration.
2026-03-24 11:19:09 +01:00
Jeppe Bundgaard 0949d861f9 Add detailed examples and extend schema definitions for Workfeed configurations:
- Introduced examples for `WorkfeedConfigResponse` to demonstrate configurations like `enabled`, `api_url`, `api_key`, and `CompanyID`.
- Split `WorkfeedConfigEntry` into specific schema components with updated discriminator logic for easier validation and understanding.
- Enhanced OpenAPI documentation for `Workfeed` module configuration endpoints.
2026-03-24 10:56:45 +01:00
Jeppe Bundgaard 2903cdf57d Add Workfeed module endpoints and schemas to OpenAPI:
- Introduced `Workfeed` API endpoints for employees, shifts, and departments with optional filtering and pagination.
- Added configuration endpoints for Workfeed including `getWorkfeedConfig` and `updateWorkfeedConfig`.
- Defined schema components for `WorkfeedEmployee`, `WorkfeedShift`, `WorkfeedDepartment`, and related list/pagination responses.
- Updated tags to include new `Security` and `Modules` categories.
2026-03-24 10:37:05 +01:00
Jeppe Bundgaard 66682040e7 Merge remote-tracking branch 'origin/master' 2026-03-20 13:18:39 +01:00
Jeppe Bundgaard 2685888e24 Add unit tests for ActionSettingsWheelButton and refactor user resolution logic:
- Add unit tests covering `ActionSettingsWheelButton` behavior for resolving user ID and customer lookups.
- Refactor `ActionSettingsWheelButton` to use `watch` for reactive user ID and customer number changes.
- Replace `getUserId` with `resolveUserId` for improved error handling and cancellation of outdated requests.
- Simplify `hasUser` logic using a computed property and update dependent logic accordingly.
2026-03-20 13:16:33 +01:00
Jeppe Bundgaard 43cf2b302d Add tests for EditableTableColumn and fix tooltip multiline logic:
- Add unit tests for `EditableTableColumn` covering tooltip multiline behavior with `hoverHtml`.
- Update tooltip logic to use `isTooltipMultiline` computed property for slot checks.
- Adjust `OrderBookingsTable` to fix incorrect usage of `permissionCheckFunction` arguments.
- Optimize `RequestQueueProgress` state handling by removing unused visibility logic.
- Add unit test to ensure no recursive update errors occur during large request processing.
2026-03-20 13:10:35 +01:00
gold-dev add9839916 Feat: 202603 - truckwash.io dashboard V3 - slides 2-5 2026-03-20 11:23:01 +02:00
Jeppe Bundgaard f9bde54956 Add component-level permission tracking and visibility handling:
- Introduce `RequiresPermission` component for permission-based UI controls.
- Add missing permission reporting logic with throttling to `requestQueueState`.
- Update `DepartmentGoals.vue` to wrap actions with `RequiresPermission`.
- Extend unit and e2e tests to validate permission handling scenarios.
2026-03-19 18:29:00 +01:00
Jeppe Bundgaard 6ea51a70d8 Add system-search:close event handling and triple-Shift dispatch for superuser:
- Handle `system-search:close` events in `NavigationMenuGlobalSearch` to close modal.
- Implement `closeSystemSearchForSuperuser` dispatch from `RequestQueueProgress` on triple-Shift.
- Update booking API logic in `NavigationMenuItemsAdmin` for refined date filtering.
- Extend unit tests to validate `system-search:close` behavior and triple-Shift handling.
2026-03-19 16:36:58 +01:00
Jeppe Bundgaard 9cccf49a4d Enhance network tracking and insights in RequestQueue and RequestQueueProgress:
- Add network totals tracking (requests, responses, and bandwidth) in `requestQueueState`.
- Introduce byte estimation functions for requests and responses.
- Update `RequestQueueProgress` layout to display network metrics and runtime insights.
- Add dedicated bottom panel for recent request latency insights (e.g., Ping, Bookings).
- Extend unit tests to verify runtime metrics and insight behavior.
2026-03-19 16:23:53 +01:00
Jeppe Bundgaard af7d894f5c Update RequestQueueProgress layout: adjust alignment and add flexbox styling for improved responsiveness 2026-03-19 15:37:08 +01:00
Jeppe Bundgaard 3ac49b4c65 Add Escape key support to close RequestQueueProgress and corresponding unit test:
- Update keyboard handler to close and reset state when Escape is pressed.
- Add unit test to validate Escape key behavior.
2026-03-19 15:33:45 +01:00
Jeppe Bundgaard cb81058611 Replace double-Alt shortcut with triple-Shift for expanding and displaying RequestQueueProgress:
- Update shortcut detection logic to use triple-Shift within a configurable time window.
- Rename variables and constants for clarity (`lastShiftKeyPressedAtMs`, `SHIFT_MULTI_PRESS_WINDOW_MS`, etc.).
- Adjust unit tests to validate new triple-Shift behavior and visibility changes.
2026-03-19 15:27:54 +01:00
Jeppe Bundgaard 23f5fdfcbf Add double-Alt shortcut to expand and display RequestQueueProgress:
- Update visibility logic with a double-Alt keypress detection.
- Introduce `isShortcutActivated` and `lastAltKeyPressedAtMs` for shortcut tracking.
- Adjust template rendering to depend on the shortcut activation state.
- Add unit tests to validate double-Alt behavior and its impact on visibility and expansion.
2026-03-19 15:25:30 +01:00
Jeppe Bundgaard 159da161d7 Add runtime metadata and session user details to RequestQueueProgress:
- Display runtime information (API URL, environment, commit hash, version, build time).
- Introduce session user details with support for subusers, including grants and customer numbers.
- Update layout with new dedicated side panels for runtime and user information.
- Extend tests to validate new sections and session user behavior.
2026-03-19 15:22:43 +01:00
Jeppe Bundgaard 076bddab90 Enhance request tracking and error management in RequestQueue:
- Add missing permissions tracking with configurable limits.
- Introduce `clearMissingPermissions` and `pushMissingPermissions` functions.
- Update `RequestQueueProgress` layout to display missing permissions.
- Improve error handling with permission extraction from response payloads.
- Update tests for new functionality and expanded edge cases.
2026-03-19 15:18:31 +01:00
Jeppe Bundgaard 2011887a4b Redesign and improve RequestQueueProgress layout and functionality:
- Introduce a new expanded layout using a responsive grid structure.
- Add separate side panels to display errors and missing permissions.
- Reorganize and enhance error handling with detailed payload previews.
- Adjust styling for better alignment and scalability.
- Update unit tests to validate new structure and functionality.
2026-03-19 15:02:04 +01:00
Jeppe Bundgaard b4c5c8a62f Update RequestQueueProgress to remain visible when errors occur and add corresponding tests 2026-03-19 14:39:35 +01:00
Jeppe Bundgaard ae75a954a4 Expand request queue functionality with enhanced tracking and error management:
- Add request tracking with active, recent, and error request histories, along with configurable retention limits.
- Introduce payload sanitization tools, including request/response redaction, truncation, and safe text handling.
- Update `RequestQueueProgress` to display detailed request stats (ping latency, active requests, errors with payload previews).
- Enhance `installAxiosRequestQueue` to standardize URLs and include request metadata.
- Add tests for updated queue behavior, detailed request tracking, and error storage limits.
2026-03-19 14:30:57 +01:00
Jeppe Bundgaard 861e263dfa Add configurable retry logic to request queue:
- Introduce retry settings for specific HTTP status codes with exponential backoff and jitter.
- Refactor `requestQueue` to support method-based concurrency limits and retry configuration.
- Update `RequestQueueProgress` to respect minimum batch size for progress visibility.
- Add unit tests for retry logic, progress visibility, and updated queue behavior.
- Centralize request queue configuration in `REQUEST_QUEUE_CONFIG`.
2026-03-19 14:15:12 +01:00
Jeppe Bundgaard 73b838cf28 Add support for separate max concurrency limits for GET and non-GET requests:
- Update `requestQueue` to differentiate between GET and other request types with configurable limits.
- Refactor `enqueueRequest` and queue draining logic for type-based concurrent handling.
- Add unit tests to validate GET-specific concurrency and proper queue functionality.
2026-03-19 14:07:59 +01:00
Jeppe Bundgaard 3f1502184a Add axios request queue interceptor with unit tests:
- Introduce `installAxiosRequestQueue` to manage and queue requests globally.
- Update `main.js` to install the interceptor at app initialization.
- Add `__skipRequestQueue` configuration in `authenticatedRequest` for bypassing the queue.
- Create unit tests to validate queue behavior and ensure request sequencing.
2026-03-19 14:01:25 +01:00
Jeppe Bundgaard a73c28795b Add request queue system with progress tracking:
- Introduce `enqueueRequest` function and reactive state for managing request queues.
- Add `RequestQueueProgress` Vue component to display request queue states (active, queued, completed).
- Update `authenticatedRequest` to utilize the new request queue system for sequential request handling.
- Add unit tests for `RequestQueueProgress` and enhanced `authenticatedRequest` behavior.
- Remove debug `console.log` statements from affected components.
2026-03-19 13:52:03 +01:00
Jeppe Bundgaard 17036a0ae7 Refactor navigation route handling for admin menu:
- Replace `router` reference with reactive `routeContext` to remove router dependency.
- Add `syncAdminNavigationRoute` for syncing route data.
- Update `NavigationMenuItems.vue` to utilize the new syncing approach.
- Adjust unit tests to validate route context handling changes.
2026-03-19 13:25:42 +01:00
Jeppe Bundgaard 1493261ef7 Refactor department ID handling across components:
- Update `NavigationMenuItemsAdmin` and `NavigationMenuDepartment` to improve route-based department ID resolution.
- Enhance `authenticatedRequest` to suppress specific errors with custom error responses.
2026-03-19 13:23:05 +01:00
Jeppe Bundgaard cef187956e Add unit tests for authenticatedRequest error handling and NavigationMenuDepartment functionality:
- `authenticatedRequest`: Test suppression of specific errors, rejection of non-suppressed errors, and general error handling.
- `NavigationMenuDepartment`: Test dynamic department label updates based on route changes.
- Add contract tests for `NavigationMenuItemsAdmin` reactive route context usage.
2026-03-19 13:22:55 +01:00
Jeppe Bundgaard 9745b106e6 Update translations for booking statuses in locales (sv, de, no) and remove redundant console.log statements in dashboard components. 2026-03-19 13:13:24 +01:00
Jeppe Bundgaard 27bd9df995 Remove debug console.log and console.warn statements, and update translations for booking statuses in locales (en, da). 2026-03-19 13:06:06 +01:00
Jeppe Bundgaard 70440e8855 Optimize attachment preview handling in POS:
- Add `createEmbeddablePreviewUrl` utility to generate blob URLs for attachment previews.
- Introduce `releaseObjectUrl` and `onBeforeUnmount` cleanup to manage and revoke blob URLs.
- Enhance error handling and URL parsing logic for preview link generation in `POSDepartmentProcess`.
2026-03-19 12:50:00 +01:00
Jeppe Bundgaard 60742bf947 Refactor and migrate Playwright E2E tests:
- Remove `playwright.config.js` to clean up configuration.
- Add new E2E test suites (`admin-pos-orders`, `admin-module-goals`, `admin-module-pos-mobile-order-flow`) to structure Admin module tests.
- Introduce reusable authentication and data seeding utilities in `fixtures` for streamlined test flows and maintainability.
2026-03-19 12:46:47 +01:00
Jeppe Bundgaard acbeef438b Add "add_to_cart" translations for multiple locales (sv, de, no, en, da) in POS strings. 2026-03-19 12:17:05 +01:00
Jeppe Bundgaard 5b411de9e6 Refactor SelectProductsFormPOS.vue to use optional chaining for route parameter access and improve department ID fallback logic. 2026-03-19 12:12:20 +01:00
Jeppe Bundgaard 79e6ec61c2 Remove debug console.log and console.warn statements across multiple components to clean up logging and improve production readiness. 2026-03-19 12:09:52 +01:00
Jeppe Bundgaard 87b8814bcf Remove redundant console.log and console.warn statements across components to improve production readiness and clean up logging. 2026-03-19 12:00:20 +01:00
Jeppe Bundgaard 2e6b420913 Remove debug console.log and console.warn statements across POS-related components to improve production readiness and streamline logging. 2026-03-19 11:51:20 +01:00