Commit Graph
1146 Commits
Author SHA1 Message Date
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
Jeppe Bundgaard 23a72b08cf Add restoreStoredPosOrderId functionality with validations, update dependent POS logic, and introduce unit tests for order restoration scenarios. 2026-03-19 11:43:17 +01:00
Jeppe Bundgaard 8db78ec937 Clean up service workers and caches in development mode:
- Add `unregisterDevServiceWorkers` utility to remove service worker registrations and stale caches during development.
- Disable service worker registration injection in `vite.config.js` for non-production environments.
2026-03-19 11:30:35 +01:00
Jeppe Bundgaard 835438049c Expand allowed origins in configuration to support local environments 2026-03-19 11:25:36 +01:00
Jeppe Bundgaard 6a8e19b3e2 Refactor and optimize component logic and tests:
- Consolidate route search handling in `PosDepartmentMVP.vue` using `applyPosRouteSearch` for improved maintainability.
- Refactor tab visibility logic in `ElementTabsBox.vue` with reusable `isHidden` utility, removing redundant code.
- Enhance `SessionUser.vue` and `superUserObject.vue` modules with lazy bindings for improved initialization and performance.
- Update `NavigationMenuItemsAdmin.vue` to validate department IDs with `hasValidDepartmentId` and watchers for reactive booking count updates.
- Improve error handling logic in `HandleGlobalError.vue` and `loadOrderItems` for robustness against invalid inputs.
- Add and update regression tests for session and superuser initialization to ensure compliance with binding contracts.
- Refactor POS step components to streamline order-related logic and support immediate reactivity.
2026-03-19 11:25:17 +01:00
Jeppe Bundgaard a02ee3a700 Add unit tests for POS department processes, route states, and session token handling:
- Add tests for `POSDepartmentProcess.loadOrderItems` to validate order item loading, skipping invalid IDs, and handling malformed responses.
- Add tests for `applyPosRouteSearch` and `parsePosRouteSearch` to ensure correct state parsing and application from route search params.
- Introduce contract tests for session token and superuser initialization to verify decoupling and lazy binding logic.
2026-03-19 11:19:00 +01:00
Jeppe Bundgaard 95a371375f Introduce origin migration handling with outdated route guards, redirect logic, and migration-related error views.
- Add `originMigration.js` for handling allowed origins, standalone contexts, and redirect routes.
- Create `OutdatedGateway.vue` and `OutdatedInstallation.vue` error views with timer-based redirection and user instructions.
- Update router to include `/outdated-installation` and `/outdated-gateway` paths.
- Implement unit tests for migration utility methods and route guards.
- Remove debug `console.log` statements across multiple components.
2026-03-19 10:51:45 +01:00
Jeppe Bundgaard efed5ac557 Introduce origin migration handling with outdated route guards, redirect logic, and migration-related error views.
- Add `originMigration.js` for handling allowed origins, standalone contexts, and redirect routes.
- Create `OutdatedGateway.vue` and `OutdatedInstallation.vue` error views with timer-based redirection and user instructions.
- Update router to include `/outdated-installation` and `/outdated-gateway` paths.
- Implement unit tests for migration utility methods and route guards.
- Remove debug `console.log` statements across multiple components.
2026-03-19 10:44:10 +01:00
Jeppe Bundgaard 7e9489573a Add E2E tests for POS and Superuser modules; refactor POS step components for consistent data-test attributes. 2026-03-18 23:11:59 +01:00
Jeppe Bundgaard 8f7e8b565b Refactor and enhance order item functionality:
- Add unit tests for `createOrderItem` to validate behavior under various conditions (e.g., missing token, invalid order ID).
- Introduce `getAttachmentContent` utility in `PosDepartmentStepMobileAttachment.vue` for streamlined attachment property handling.
- Refactor vehicle wash configuration logic in `VehicleDisplay.vue` with null-safe checks.
- Improve invoice-related logic in `ordersSyncTable.vue` using utility functions for consistent property access.
- Enhance computed properties for customer and product handling in order displays (e.g., `MyOrder.vue`, `ProductBox.vue`).
- Consolidate department lookup logic in `departmentTabs.vue` with safer handling of missing data.
- Add utility functions in `orderItemsTable.vue` for consistent product property access and computation.
2026-03-18 22:25:28 +01:00
Jeppe Bundgaard bd0f212662 Refactor lane selection and restoration logic in MyWashStart.vue:
- Introduce `normalizeLaneId` utility for consistent lane ID parsing.
- Enhance `getEffectiveLaneId` and `ensureEffectiveLaneSelection` to dynamically handle stale lanes and effective selection.
- Modify `fetchSelfServeData` to validate and normalize license plate inputs.
- Add `isRestoring` handling throughout workflow to improve transitions and prevent unnecessary data fetches.
- Update unit tests to cover restoration scenarios and stale lane fallback behavior.
2026-03-18 16:06:38 +01:00
Jeppe Bundgaard 8917893f43 Enhance Self-Serve progress display in MyWashStart.vue and SelfServeDepartmentHeader.vue:
- Add `progressRegistration` and `progressVehicleProduct` props for improved progress details.
- Update `SelfServeDepartmentHeader.vue` template and styles for better layout and item wrapping.
- Refactor computed properties in `MyWashStart.vue` to include `selectedVehicleTypeProductName`.
2026-03-18 15:06:12 +01:00
Jeppe Bundgaard d3ed03a4a1 Refactor Self-Serve progress and department header components:
- Consolidate progress display logic into `SelfServeDepartmentHeader.vue` for better reusability.
- Remove redundant progress headers and styles in `MyWashStart.vue` and `SelfServeTasksStep.vue`.
- Update scoped styles in `SelfServeTasksStep.vue` and `SelfServeDepartmentHeader.vue` to improve layout and readability.
- Fix API URL in `vite.config.js` for version update endpoint.
2026-03-18 14:35:42 +01:00
Jeppe Bundgaard e785275c24 Refactor Self-Serve task handling and enhance UI components:
- Update `SelfServeTaskList.vue` to handle image and non-image task attachments separately and improve task card styling.
- Add utility methods for filtering task services, attachments, and images.
- Modify `MyWashStart.vue` and `SelfServeTasksStep.vue` headers for better readability, styling, and alignment.
- Improve layout responsiveness with scoped styles for task cards and progress headers.
2026-03-18 13:56:39 +01:00
Jeppe Bundgaard 65b173094f Refactor task description handling in SelfServeTaskList.vue:
- Add `hasTaskDescription` utility to validate and handle task descriptions more robustly.
- Update template to conditionally render task descriptions using the new utility.
2026-03-18 13:49:28 +01:00
Jeppe Bundgaard 9a62417981 Refactor Self-Serve logic and POS order creation handling:
- Enhance `useSelfServeLogic.js` with `setSummaryVisibleQuestions` for streamlined question visibility and ordering updates.
- Update logic to retain preview questions when summary data is unavailable.
- Add unit test to validate fallback behavior and preview question handling.
- Prevent duplicate POS orders by introducing `isCreatingOrder` flag in `POSDepartmentProcess.vue`.
- Adjust `PosDepartmentStepMobileButtonNextStep.vue` to reflect button loading state during order creation.
2026-03-18 13:42:15 +01:00
Jeppe Bundgaard ed1a23bac6 Improve lane selection logic and guided instructions in Self-Serve module:
- Refactor `MyWashStart.vue` to ensure effective lane selection is applied dynamically when transitioning steps.
- Enhance `SelfServeGuidedInstructions.vue` by normalizing step management, simplifying the layout, and improving computed property usage.
- Update `useSelfServeLogic.js` to handle missing questions via fallback to lane/registration summary.
- Add and update unit tests for lane selection, step transitions, guided instructions rendering, and fallback logic.
2026-03-18 13:29:56 +01:00
Jeppe Bundgaard dc130229b5 Refactor ViewportResponsiveWrapper to use defineComponent and simplify slot rendering logic. 2026-03-18 13:10:49 +01:00
Jeppe Bundgaard e53b751f81 Refactor Self-Serve logic and improve question visibility handling:
- Refactor `useSelfServeLogic.js` to ensure summary-driven question and condition synchronization.
- Update tests to validate correct question visibility, ordering, and condition evaluation.
- Replace hardcoded logic with dynamic IDs for conditional handling.
- Introduce `summaryVisibleQuestionIds` and `summaryQuestionOrder` to manage question filtering and sorting.
- Enhance workflow for task visibility and activation based on updated rules.
- Migrate dropdown and action handling to `PaginationDisplayGeneralSearchReload.vue` for better readability and feature expansion.
2026-03-18 13:05:06 +01:00
Jeppe Bundgaard f619487f6f Implement automatic table Excel exports with unit tests:
- Add `AutoTableExportService` for dynamic Excel export button generation and visible row extraction.
- Integrate auto-export initialization in `main.js` for legacy non-paginated tables.
- Extend `PaginationDisplay.vue` with support for paginated Excel export.
- Add export functionality to vehicle views and dependencies, including full-table export handling.
- Add tests for `TableExcelExportService.js`, export workflows, and normalization logic.
- Enhance localization with `download_excel` translation key.
2026-03-18 12:46:40 +01:00
Jeppe Bundgaard 25f9d7c071 Add unit tests and services for Self-Serve Vehicle Step and Excel export:
- Introduce `TableExcelExportService` with functions for workbook creation and export (`normalizeExcelValue`, `createWorkbookFromRows`, `downloadWorkbook`).
- Add unit tests for `SelfServeVehicleStep` to test vehicle selection persistence, registration normalization, and emission behavior.
- Extend logic and tests for Self-Serve vehicle management with error handling, dynamic state updates, and step transitions (`MyWashStart.vue`).
- Integrate Excel export in `PaginatedList.vue` with user-defined transformations and error resilience.
2026-03-18 12:05:40 +01:00
Jeppe Bundgaard ad33cfedf8 Merge remote-tracking branch 'origin/master' 2026-03-18 11:06:11 +01:00
Jeppe Bundgaard 36dfed1c3c Improve department display and loading states across components:
- Add computed properties for loading data messages and department visibility in `MyWashStart.vue` to enhance user feedback and state management.
- Introduce department list feature to `GuestQRNewCustomer.vue` and `GuestQRNewDriver.vue`, including support for addresses, lanes, and self-serve availability.
- Refactor shared department-related methods (e.g., navigation links, lane descriptions) for reusability.
- Update UI styles for better consistency and user experience in department and registration views.
- Add unit test for self-serve disabled warning in `MyWashStart.vue` to ensure accurate feedback rendering.
2026-03-18 10:53:15 +01:00
Jeppe Bundgaard b6f6cfd0aa Modularize registration forms and refactor MyWashStart component:
- Extract customer and driver registration logic into reusable `CustomerRegistrationForm` and `DriverRegistrationForm` components for improved modularity and reuse.
- Replace inline forms with new components in `CustomerCreationPage`, `GuestQRNewCustomer`, and `GuestQRNewDriver`.
- Update `MyWashStart.vue` to include developer access conditions alongside superuser checks.
- Improve UI consistency and styling across registration views.
2026-03-18 09:39:34 +01:00
Jeppe Bundgaard abc033bb05 Remove self-serve-logic.spec.js and related integration tests.
- Delete outdated tests for `useSelfServeLogic` composable, step navigation, and validation related to the Self-Serve module.
- These tests have been deprecated in favor of newer, streamlined testing strategies and refactored logic.
2026-03-17 16:49:36 +01:00
gold-dev 6223fc8af4 Feat: 202603 - truckwash.io dashboard V3 - slides 2-5 2026-03-17 13:44:14 +02:00
gold-dev 356bf7147e Feat: 202603 - truckwash.io dashboard V3 - slide 6 2026-03-17 12:37:13 +02:00
Jeppe Bundgaard c68215a451 Add unit tests for Self-Serve alignment features and refactor logic for task normalization, configuration management, and lane services:
- Introduce comprehensive unit tests for machine types, lane wiring, config management, rule conditions, and runtime data integration in the Self-Serve module.
- Refactor configuration handling in `ConfigurationSelfServe.vue` to use normalized mappings and improve payload parsing.
- Enhance `useSelfServeLogic.js` with functions for task preview, summary synchronization, attachment handling, and service updates.
- Optimize wash start flow in `MyWashStart.vue` with streamlined condition saving and endpoint integrations.
2026-03-16 14:01:35 +01:00
Jeppe Bundgaard 5b3e59bbb4 Introduce scope filtering and machine type integration for Self-Serve module:
- Add scope label computation for tasks, questions, and conditions based on department, lane, product, and machine type.
- Introduce filters for machine type, lane, and department in Self-Serve pagination.
- Replace `EditableTableColumn` with scoped rendering for improved flexibility.
- Extend API and schema to support machine type integration in department redistribution.
- Optimize UI for task, question, and condition management with machine type-aware workflows.
2026-03-16 13:43:08 +01:00