65 Commits
Author SHA1 Message Date
Jeppe B 5204536f92 Fix self-serve settings state and contract (#229)
Ensure department-scoped self-serve settings load and save safely across route transitions, document the API contract, and cover stale in-flight state.
2026-07-28 18:34:35 +02:00
Jeppe BandJeppe Bundgaard aa5e0a5507 Add EAN to customer registration flows (#147)
* Add EAN to economic customer registration

* Focus EAN PR Playwright mapping

---------

Co-authored-by: Jeppe Bundgaard <jb@truckwash.dk>
2026-07-06 18:12:05 +02:00
Jeppe B d63a62a921 Gate self-serve gateway actions 2026-06-01 22:26:44 +02:00
Jeppe B 98c1c61cbd Merge pull request #77 from copenhagentruckwash/fix-active-wash-endpoint-information-leak
Scope active-wash restore to authenticated customer (my-active-wash)
2026-06-01 22:06:25 +02:00
Jeppe B 4463a5326a Fix scoped active wash restoration 2026-06-01 22:06:14 +02:00
Jeppe B ee40f16232 Harden self-serve vehicle condition mutations 2026-06-01 22:05:27 +02:00
Jeppe B 37973f8fcb Add x-api-coverage happy path flag to listOrders operation 2026-06-01 13:31:48 +02:00
Jeppe Bundgaard a261f2f3bd Add unit tests and components for invoicing period flag handling and self-wash view rendering 2026-05-11 21:40:51 +02:00
Jeppe Bundgaard fb162eef6c Add archived department filtering feature for superusers, including E2E tests, UI updates, and OpenAPI enhancements. Extend department table with archived toggle switch and update translations. 2026-05-07 12:54:31 +02:00
Jeppe Bundgaard 4752b3d096 Add self-serve feature logic, including lane filtering, normalization, and OpenAPI updates. Enhance Self-Serve Studio with progress indicators, UI controls, path projection streaming, and abort handling. Update E2E and unit tests for enhanced self-serve behaviors. 2026-04-29 17:27:53 +02:00
Jeppe Bundgaard a658fe7863 Resume active self-serve washes for authenticated customers across devices. Update OpenAPI, UI components, and extend E2E/unit tests. 2026-04-28 18:00:09 +02:00
Jeppe Bundgaard 503fb84f10 Extend Self-Serve Studio with deferred relay logic and Bookinger-style loading states. Update OpenAPI, UI components, and related E2E/unit tests. 2026-04-28 17:09:50 +02:00
Jeppe Bundgaard 11bb8f824d Extend Self-Serve Studio with vehicle type management, mutation options, and enhanced simulation/debug tools. Update OpenAPI, UI components, and related E2E/unit tests. 2026-04-28 16:54:27 +02:00
Jeppe Bundgaard f9d8b87768 Add new table and enhance studio layout logic
Introduce `department_selfserve_studio_layouts` table for department-specific layouts and implement advanced auto-layout functionality in the DepartmentSelfServeStudio module. Added custom node definitions, updated styling, and integrated new logics for sorting and visualizing nodes in the Vue Flow interface.
2026-04-28 14:21:26 +02:00
Jeppe Bundgaard e9cbb40559 Add all-in-one self-serve studio with flow editor, simulator, versioning, and enhanced E2E/OpenAPI support. Extend legacy edge gateway workflows. 2026-04-28 13:36:16 +02:00
Jeppe Bundgaard 1a784bbbfd Remove edge gateway components and templates associated with outdated workflows. 2026-04-20 14:51:53 +02:00
Jeppe Bundgaard 2bf1f5b385 Add enhanced department complaint functionality with category and date support alongside POS improvements:
- Introduced `departmentDailyReportComplaintCategories.js` for managing complaint categories with validation utilities.
- Added category and wash date fields to the complaint editing interface with validation in `DepartmentDailyReportComplaints.vue`.
- Developed `PosOrderDetailItemsTable.vue` for displaying order details with inline actions and price highlighting.
- Implemented `PosOrderItemEditModal.vue` for editable order items with validations for price and quantity.
- Created unit tests for `PosLastScannedLicensePlatesV2.vue` to verify scanning, caching, and error handling behaviors.
2026-04-09 12:55:30 +02:00
Jeppe Bundgaard 78648a0b7f Add customer complaints, edge gateway terminal, and mobile POS functionalities with e2e and unit test coverage:
- Implemented `departmentDailyReportComplaintCustomers.js` module for handling customer complaint data, including search, normalization, and API integration.
- Added `EdgeGatewayTerminal.vue` for root shell access with session approval, dynamic status handling, and user feedback.
- Developed `mobilePos.js` for simulating mobile POS fixtures and workflows in e2e tests.
- Introduced relevant e2e and unit tests to ensure functionality and error handling across modules.
2026-04-09 11:35:18 +02:00
Jeppe Bundgaard 8eb315f439 Add comprehensive unit and e2e tests for invoice collection, queue logic, and modal interactions:
- Introduced e2e test for "Change Invoice Collection" in `change-invoice-collection.spec.ts`.
- Added unit tests for `CollectedOrderInvoiceOverview.vue` including edit flow for `closed_at`.
- Implemented tests for queue reliability, state handling, and customer actions:
  - `CollectedOrderInvoicesQueueHistory.vue`: polling, error handling, richer diagnostics, and retry logic.
  - `InvoicingBillingPeriod` views: refresh and queue state handling.
- Enhanced test coverage for Stripe queue functionality and related actions.
2026-04-08 15:53:52 +02:00
Jeppe Bundgaard 2b6129db29 Add economic queue functionality with Vue component, unit tests, and e2e tests:
- Introduced `CollectedOrderInvoicesQueueHistory.vue` for displaying and managing job queue history.
- Added queue management features: polling with active status detection, error handling, retry logic, and pagination controls.
- Implemented e2e tests for economic queue workflows, including export polling, retries, validation errors, and component unmount behavior.
- Added unit tests for queue logic, payload normalization, and retry scenarios.
- Created `EconomicQueuePlaywrightHarness.vue` to support e2e testing with mock workflows.
2026-04-08 11:19:16 +02:00
Jeppe Bundgaard d03b7d86bf Add shared gate control logic and in-progress wash API integration:
- Implement shared gate relay handling in `SelfServeMachineRelayControls` with unified button for entrance/exit.
- Add unit tests for gate control variations (shared vs. separate relays).
- Extend OpenAPI with endpoints for in-progress wash session details and gate operations.
- Update `MachineType` with relay configurations for comprehensive gate handling.
2026-03-25 13:39:38 +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 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 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 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 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
Jeppe Bundgaard b7b19d1ad9 Add comprehensive documentation for Self-Serve Module.
- Describe architecture, domain models, eligibility rules, API endpoints, runtime status, and lane control.
- Include end-to-end examples for happy paths and failure scenarios.
- Provide PHP and Bash usage samples for integration.
- Add detailed flow diagrams and entity definitions for clarity.
2026-03-16 13:08:12 +01:00
Jeppe Bundgaard 6c3e04e8b8 Update OpenAPI schema to include users resource in SystemSearchRequest 2026-03-12 23:34:16 +01:00
Jeppe Bundgaard 2a9a2ea93d Update OpenAPI schema to include additional resource types in SystemSearchRequest 2026-03-12 21:20:30 +01:00
Jeppe Bundgaard d197f7f8cf Add system-wide search endpoints and integrate compare visibility filter:
- Add new search endpoints to OpenAPI schema with cache management functionality.
- Extend invoice distribution functionality with `compareVisibility` filter for result categorization.
- Update unit tests and UI components for compare visibility options.
2026-03-12 20:30:09 +01:00
Jeppe Bundgaard e1e3187d69 Add unit and e2e tests for superuser invoice distribution, update i18n translations, and implement distribution API/logic helpers. 2026-03-12 18:03:44 +01:00
Jeppe Bundgaard e48c52a9b7 Add unit tests for superuser invoices route wiring, tabs, and API contracts; enhance calculations and logic in InvoicingBillingPeriodStatistics.vue; update OpenAPI schema with WeatherAPI and fixed pricing distribution functionality. 2026-03-12 14:24:12 +01:00
Jeppe Bundgaard 655bb622f5 Update OpenAPI schema:
- Make workspaceId and channelId parameters optional with fallback logic across multiple endpoints.
- Replace object schemas with $ref references for bird voice calls, numbers, and related responses.
- Introduce WeatherAPI endpoints (current, forecast, search) and department weather timeline functionality.
- Add WeatherAPI configuration endpoints and corresponding schema updates.
2026-03-11 14:32:06 +01:00
Jeppe Bundgaard 9473a514da Refactor DepartmentGate and DepartmentRelay schemas: replace object types with explicit $ref definitions and add detailed configuration schemas 2026-03-03 12:27:25 +01:00
Jeppe Bundgaard 3691abd9a2 Add DepartmentGate and DepartmentRelay endpoints and schemas to OpenAPI spec 2026-03-03 12:03:36 +01:00
Jeppe Bundgaard 6c2b2b7d96 Enhance OpenAPI documentation for configuration endpoints with detailed success messages and add Bird configuration endpoints 2026-02-27 01:58:03 +01:00
Jeppe Bundgaard 78587485df Add API endpoints for test outbound calls and number management 2026-02-27 01:29:18 +01:00
Jeppe Bundgaard e50a288be8 Enhance DepartmentGoal schema by adding date range fields and improving progress descriptions 2026-02-27 00:46:14 +01:00
Jeppe Bundgaard bb57a3f357 Update Goal Progress Logic in DepartmentGoals module
- Refined the `getGoalProgress` function to use new `all?.count` and `all?.target` properties for accurate progress calculation.
- Enhanced department progress display by accessing nested progress details, ensuring correct values are shown per department.
- Updated OpenAPI spec to include detailed progress structures, introducing new schemas like `GoalProgressDetails` and `DepartmentGoalProgress` for comprehensive goal tracking.
2026-02-25 14:53:05 +01:00
Jeppe Bundgaard ee04e213f1 Add Connectivity Issue Page and Improve Table Semantics
- Introduced `ConnectivityIssue.vue` for handling and displaying connectivity problems.
- Added new route for the connectivity issue error page.
- Enhanced accessibility by wrapping table headers in `OrderBookingsTable.vue` with `<thead>` and `<tbody>` tags.
- Included connectivity-related internationalization keys across various locale files.
- Updated components to integrate `ConnectivityIssue` as a fallback display for connection errors.
2026-02-25 12:59:10 +01:00
Jeppe Bundgaard 41c2a2575e Improve authentication and API integration
- Refined hostname handling in `PasskeyAuthService.js` for correct `rpId` assignment based on domain matching.
- Expanded OpenAPI spec with multiple production server URLs and added `g_recaptcha_response` in various API endpoints for enhanced security.
- Updated `LoginForm.vue` to ensure `customer_number` is accurately parsed as an integer for API compliance.
2026-02-24 01:26:49 +01:00
Jeppe Bundgaard 4e7def8559 Add passkey authentication endpoints and fix passkey data handling in UI
- Introduced `/auth/passkey/challenge` and `/auth/passkey/verify` endpoints for passkey authentication.
- Adjusted `PasskeyManagement.vue` to correctly parse nested passkey data.
2026-02-23 23:02:40 +01:00
Jeppe Bundgaard be60ce8fdf Integrate passkey authentication and management
- Added passkey support for secure, passwordless authentication using WebAuthn.
- Implemented passkey management in user profiles, enabling users to add, rename, and delete passkeys.
- Updated authentication forms to support passkey login, including feature detection and login flow.
- Enhanced internationalization files with passkey-related translations for multiple locales.
- Introduced new components and services for handling passkey operations and WebAuthn interactions.
2026-02-23 21:59:01 +01:00
Jeppe Bundgaard 2ede884959 Add force enable/disable machine functionality for department lanes
- Introduced endpoints to handle force enable/disable machine actions (`/modules/self-serve/lane/force/machine/enable`, `/disable`).
- Updated OpenAPI spec to document the new endpoints.
- Extended `DepartmentLane.vue` and `departmentLanesTable.vue` with buttons for force enable/disable, including loading states and toast notifications.
- Added corresponding i18n translations for force control actions.
- Created E2E tests to verify translation keys, non-empty values, and source file functionality in `department-lane-force-machine.spec.js`.
2026-02-19 11:39:36 +01:00
Jeppe Bundgaard fe5140f74a Add dynamic image and button handling for department lanes and self-serve tasks
- Updated i18n files to include "Dynamic Image ID" translations.
- Extended `SelfServeTasks` and `DepartmentLanes` with columns for dynamic image and button configurations.
- Integrated new OpenAPI endpoint to generate dynamic images for department lanes.
- Enhanced tables, forms, and dashboards to display and manage new attributes.
2026-02-18 16:53:13 +01:00
Jeppe Bundgaard d2f2354efd Extend OpenAPI spec and refine self-serve wash logic
- Updated OpenAPI schemas to include dynamic button IDs and vehicle type overrides for tasks.
- Refined `isMachineAvailable` type definition in `MyWashStart.vue` to improve type safety.
- Simplified lane selection watcher logic in `MyWashStart.vue` by removing redundant step condition.
2026-02-18 16:36:46 +01:00
Jeppe Bundgaard a29b978bc5 Add guidelines for creating and maintaining tests in .aiassistant/rules/Creating and maintaining tests.md
- Introduced detailed instructions for test development using WebdriverIO, covering structure, naming conventions, and best practices.
- Added examples for browser interactions, assertions, and handling internationalization (i18n) in tests.
- Documented prerequisites for mobile testing and best practices for maintaining test cases.

Enhance SelfServeTasks capabilities by introducing `services` management

- Added `services` property to `SelfServeTasks` for task-specific service handling.
- Implemented logic to determine and update allowed services dynamically based on active tasks.
- Extended machine availability check (`isMachineAvailable`) to consider services allowed per task.

Expand backend support for lane services

- Added new endpoints to manage lane services (`/modules/self-serve/lane/services/allowed` and `/modules/self-serve/lane/relay/machine/enable`).
- Extended OpenAPI specifications to include service configuration for tasks and validation of lane services.

Modify SelfServe UI components for displaying allowed services

- Updated multiple screens to show allowed services based on active tasks.
- Added tags for visualizing allowed task services in `SelfServeTryModal` and `SelfServeTasksTable`.

Add `i18n-settings-wheel.spec.js` for translation key verification

- Added new test suite to ensure i18n translation parity between English and Danish locale files for `settings_wheel`.
- Implemented checks to validate key presence and exact match across both languages.
2026-02-18 14:12:12 +01:00
Jeppe Bundgaard 1f27f3b069 Add subuser session management and authentication support
- Introduced subuser-specific session data handling, including `getSubuserSessionData`.
- Added `authenticateSubuser` to enable password-based authentication for subusers.
- Updated `SessionUser` to support subuser sessions with fields like `isSubuser` and `subuser` details.
- Adjusted logic for clearing and initializing sessions to differentiate subuser and classic user contexts.
- Enhanced OpenAPI spec to include subuser-specific endpoints and permissions, updating customer-targeting behavior.
2026-02-12 17:00:51 +01:00