Commit Graph
265 Commits
Author SHA1 Message Date
Jepp9350 743928459e Add customer default department handling and routes 2025-05-26 16:58:09 +02:00
Jepp9350 b837f572af Add handling for forced prices, arrays, and improved type checks
Introduced support for forced pricing in `addItemToOrder` and added stricter validation for array inputs in SQL queries. Enhanced JSON handling in type validation and improved code reuse with new objects. Added new endpoint `/modules/xlvask/related-orders` to fetch related orders by wash IDs.
2025-05-22 22:51:05 +02:00
Jepp9350 b42c864bff Add wash_id property and support for listing own orders
Introduced a new `wash_id` property to the `orders_o` object and updated related order handling logic. Implemented functionality to restrict users to only list their own orders if they lack permissions to view all orders. Updated permissions and adjusted queries accordingly.
2025-05-22 10:27:09 +02:00
Jepp9350 543a02c8e6 Update dependencies in composer.lock
Upgraded multiple dependencies to their latest versions to ensure compatibility, address bug fixes, and incorporate new features. Notable updates include `aws/aws-sdk-php`, `guzzlehttp/guzzle`, `illuminate/*`, and several others.
2025-05-21 15:07:04 +02:00
Jepp9350 bf68432484 Add Graph API client integration to entra class
Introduce methods to initialize a GraphServiceClient and ClientCredentialContext, leveraging configuration values for authentication. This enables interaction with Microsoft Graph API in a structured and secure manner.
2025-05-21 14:44:39 +02:00
Jepp9350 458e2916a6 Add Entra module for handling Microsoft integration
This commit introduces the Entra module, enabling configuration management and handling callbacks for Microsoft's authorization. It includes new classes, routes, and configuration variables to support integration, ensuring flexibility and logging support for related operations.
2025-05-21 14:20:50 +02:00
Jepp9350 a45e2706c3 Refactor customer number handling for clarity.
Reassign the customer number to a variable before reuse, improving code readability and reducing redundant calls to the value method. This change streamlines object property creation and simplifies maintainability.
2025-05-20 14:05:47 +02:00
Jepp9350 d65d49b31e Add support for retrieving and displaying customer details
Enhanced plate scans to include customer name and vehicle type. Introduced a method in `customer_vehicles_o` for fetching vehicle details by plate and adjusted `users_o` to manage display names more effectively.
2025-05-20 14:01:29 +02:00
Jepp9350 b37499e0f0 Add PO number handling and user invoices route
Introduced a new `po_number` property in `collected_order_invoices_o` and updated related methods to handle it. Added `userInvoicesRoute` to manage user invoice APIs with GET and PUT endpoints for listing and updating invoices. Updated `microsoft/microsoft-graph` dependency to version `^2.8`.
2025-05-20 12:15:35 +02:00
Jepp9350 d00bfef583 Add 'product' support to department time bookings
This update incorporates the 'product' parameter into the department time bookings API, supporting its addition, update, and validation processes. Additionally, composer dependencies are updated with several new libraries, enhancing functionality and compatibility.
2025-05-19 15:16:58 +02:00
Jepp9350 77f01112db Add support for managing department variables
Introduced endpoints for fetching and setting department variables in `superuserDepartmentRoute`. Enhanced `getDepartmentOptions` to filter by specific positive variables. Updated SMS notifications and booking forms to utilize department variables for improved flexibility.
2025-05-14 15:09:36 +02:00
Jepp9350 ca71c34b75 Add department time bookings functionality
Implemented management of department time bookings, including API routes, objects, and logic for opening hours, types, and entries. Enhanced the gateway API to handle optional empty recipient handling.
2025-05-13 12:33:44 +02:00
Jepp9350 023b6992b6 Add xlvask module API integration
Introduced xlvask module with request handling, endpoints, and route mappings. Implemented functionalities to fetch usage logs, vehicles, and customers from the API, along with basic authentication support. Includes error handling and configuration setup for seamless integration.
2025-05-08 14:03:13 +02:00
Jepp9350 5550e2e57f Add xlvask module with configuration and API endpoints
Introduce the xlvask module, including classes for configuration variables (enabled, username, password) and main functionality. Integrated xlvask into the app by adding GET/POST API routes for managing its configuration.
2025-05-08 12:17:27 +02:00
Jepp9350 e3d67acd07 Allow vehicle type to be unset and improve related checks
Updated logic to allow vehicle type to be set to 0 and handle related subscription behavior. Added safeguards to prevent setting subscriptions when type is unset. Introduced `isPlateSeenBefore` in `orders_o` and enhanced `plateScansRoute` to include `seen_before` data.
2025-05-06 16:36:24 +02:00
Jepp9350 84b6d4de3e Fix incorrect date handling for closing order invoices
Replaced `created_at` with `closed_at` to accurately set the timestamp when closing collected order invoices. This ensures the correct date is applied during the invoice update process.
2025-05-06 12:14:41 +02:00
Jepp9350 45faa7c56a Add 'barred' status to customer and vehicle data
Introduced the 'barred' property to identify barred customers and vehicles. Updated relevant classes, methods, and API endpoints to handle this new field. Enhanced plate scans to include the barred status for vehicles based on customer association.
2025-05-06 12:14:21 +02:00
Jepp9350 4cc2ff462e Add XLVask OpenAPI v1 JSON specification
Introduced a new OpenAPI v1 specification for XLVask within the services/nginx/app/modules directory. This includes detailed endpoint definitions for Customers, Vehicles, UsageLog, and associated schemas like Customer, Vehicle, and others. The API specification will facilitate integration and validation for related services.
2025-05-06 12:13:57 +02:00
Jepp9350 22562be135 Add API reference topics for XLVask OpenAPI v1
Added documentation topics for API endpoints related to `/Customers` and `/Vehicles` with GET, POST, PUT, and DELETE methods. Included a general API Reference topic and updated redirection rules for removed structure pages.
2025-05-06 12:13:47 +02:00
Jepp9350 b1ba8a2e34 Add support for vehicle reference field
Introduce a new "reference" field for vehicles to allow storing and validating additional information. Updates include parameter handling, validation, and database integration for creating, modifying, and retrieving the "reference" field.
2025-05-06 09:09:17 +02:00
Jepp9350 be9ba1a2fa Add fixed pricing logic for order invoices
Introduced a check to apply fixed pricing for customers with predefined rates. This ensures that customer-specific fixed prices override default prices before adding invoices to E-Conomic. The change improves pricing consistency and accuracy for eligible customers.
2025-05-05 16:42:03 +02:00
Jepp9350 30ff7d385e Add support for fixed pricing in collected order invoices
Introduced functionality to handle fixed prices for collected order invoices, allowing customer-specific pricing overrides. Added a new route and methods to integrate fixed pricing logic, modify invoice items, and ensure proper data management in E-Conomic. Adjusted discount calculations to accommodate cases where final price is zero.
2025-05-05 16:21:31 +02:00
Jepp9350 3868b2b867 Add attribute management methods and set default attributes
Introduced methods to add, delete, and check user attributes. Updated the user object initialization to set default attributes (`invoiceAllOrdersIndividually` and `restrictTankCleaning`). Removed redundant definitions of these methods to avoid duplication.
2025-05-05 13:53:35 +02:00
Jepp9350 91d215ffcc Add customer fixed pricing routes and object
Introduce routes for managing customer fixed pricing, including retrieval, creation, and deletion. Create `customer_fixed_pricing_o` object to handle database operations for fixed pricing data. This change enables structured handling of fixed pricing-related logic and functionality.
2025-05-05 13:36:04 +02:00
Jepp9350 8d2fe8d75d Add support for closed_at field in order invoices
Introduce the closed_at field to track closure dates for order invoices. Updated validation, processing logic, and database integration to ensure correct handling of the new field. Adjusted related routes to pass and store the closed_at value where applicable.
2025-05-01 15:45:59 +02:00
Jepp9350 8ae3a35a91 Add endpoints for unknown customer vehicles and suggestions
Introduced two new endpoints: one for listing unknown customer vehicles and another for fetching customer suggestions based on a vehicle registration. These changes include authentication, input validation, and proper logging for each new route.
2025-04-30 14:37:53 +02:00
Jepp9350 29e76b58d8 Fix and enhance order processing with improved data handling
Set proper timestamps for collected invoices and added `getLastOrderId` for vehicles. Streamlined order fetching logic by fixing parameter usage, refining customer and order item retrieval, and improving type casting in multiple methods.
2025-04-29 15:22:26 +02:00
Jepp9350 6cc5e6bbf0 Add custom routes, subscription features, and refactor orders
Introduced a new POST route for collected vehicle subscription invoices and enhanced responses with wash subscription transactions. Refactored order handling by adding department-based pricing logic and simplifying reusable methods. Various minor improvements include exception handling, input validation, and updated permissions.
2025-04-28 14:24:11 +02:00
Jepp9350 c19ed3389c Update permission check for Stripe payment intent
Replaced 'charge_order_stripe' with a more general 'charge_order' permission check in the Stripe payment intent endpoint. This ensures consistent permission handling across payment modules.
2025-04-28 09:01:15 +02:00
Jepp9350 c56955ee28 Add logic to remove vehicle subscription transactions
Introduced a method to handle the removal of vehicle subscription transactions from invoice collections. Refactored references to a hardcoded cashier ID by using a class property for better maintainability. This ensures a cleaner and more dynamic transaction-handling process.
2025-04-28 08:26:44 +02:00
Jepp9350 941ed2dce6 Disable transaction creation in wash certificate generation
Commented out the transaction creation step for bookings to prevent unnecessary or redundant transactions. This ensures the booking process focuses solely on wash certificate completion and status updates without altering the transactional state.
2025-04-28 08:11:03 +02:00
Jepp9350 e140c3242f Add default addons functionality to customer vehicles
Introduced a method to automatically add default addons to customer vehicles based on predefined product IDs. Updated the vehicle creation workflow to include the addition of these default addons. Adjusted type casting and comments for better clarity and functionality.
2025-04-24 12:40:27 +02:00
Jepp9350 28dd7d39ce Fix invoice processing logic and improve null safety checks
Updated default values for department IDs to prevent null issues and ensure proper handling of optional fields. Adjusted logic to skip non-invoiceable items and corrected department validation to avoid invalid entries. Improved overall robustness and consistency in invoice-related operations.
2025-04-23 15:47:34 +02:00
Jepp9350 7c49514a34 Ensure visibility filtering for departments
Added a `visible` property to manage department visibility. Updated routes, traits, and objects to filter out non-visible departments and restrict access to internal system departments for end-users. This improves data security and enhances control over information exposure.
2025-04-23 13:09:36 +02:00
Jepp9350 a92781cceb Add user email and phone support with security routes
Introduced support for user email and phone management, including phone country code and email validation. Added API endpoints for email change and password validation to enhance account security features. Updated Stripe processor logic for better external ID handling.
2025-04-23 10:52:13 +02:00
Jepp9350 56fa77be11 Remove unnecessary return statement in slack.php
The return statement was redundant as the function naturally concludes without it. Removing it improves code clarity and eliminates dead code.
2025-04-22 15:47:57 +02:00
Jepp9350 7a48710fb1 Validate recipients and improve SMS notification handling
Add recipient validation to the SMS gateway API to ensure no empty recipient arrays are processed. Enhance department SMS notification logic by dynamically retrieving phone numbers and logging failures for improved error tracking. Simplify SMS delivery flag logic for better readability.
2025-04-22 15:24:04 +02:00
Jepp9350 0511e6e31e Fix type casting and validation issues in SMS delete route
Ensure proper type casting for 'id' parameter and validate its length for consistency. Address potential type mismatch in department access check with explicit casting. These changes improve data integrity and robustness of the delete operation.
2025-04-22 15:08:14 +02:00
Jepp9350 3b6949cb21 Refactor phone number field and add update endpoint.
Renamed `phone_number` field to `phone` across the codebase for consistency and simplicity. Introduced a new endpoint to update department notification SMS, supporting edits to fields like `label`, `phone_country_code`, `phone`, and `enabled`.
2025-04-22 14:54:38 +02:00
Jepp9350 9025ad79b7 Set specific subscription addons to zero-priced where applicable.
Introduced logic to handle free subscription addons by setting their price to zero based on a predefined list. Updated affected areas to apply this change consistently when adding or modifying order items. This ensures correct pricing and aligns with business rules for these products.
2025-04-22 13:01:23 +02:00
Jepp9350 6edb1fdd8d Add support for fetching economic payment terms
Introduced `economicPaymentTermsRoute` and `economic_payment_terms_endpoint` to handle fetching payment terms from the economic API. Updated the `economic` class to include the new payment terms endpoint. Logging and session validation were also implemented for enhanced traceability and security.
2025-04-22 12:30:39 +02:00
Jepp9350 26ccab3d3c Add endpoint for booking collected invoices to Stripe
Introduce a new POST endpoint to handle adding collected order invoices to Stripe, with necessary validations and logging. Extend `collected_order_invoices_o` to include Stripe integration, fetching details of Stripe payment intents when applicable.
2025-04-22 12:01:55 +02:00
Jepp9350 60de6ae998 Add Stripe payment capture functionality
Introduced methods to handle Stripe payment capture and updated related classes and endpoints. Refactored constants for payment processors and integrated order collections to reflect Stripe payments. Ensured robust error handling and session validation for payment operations.
2025-04-22 10:17:06 +02:00
Jepp9350 8c70e6e3bc Enhance booking handling with service options and transactions
Added support for including customer name, department name, and parsed services in `asArray()` method. Introduced functionality for creating transactions, linking bookings to orders, and properly handling related services. Improved department daily report handling and removed unnecessary fields.
2025-04-16 12:37:57 +02:00
Jepp9350 69b39fcba2 Enhance query to include 'val' and skip empty values
Update the SQL query to fetch 'val' alongside 'user_id' and modify the logic to skip rows with empty 'val'. This ensures only relevant data is processed, improving data integrity and correctness.
2025-04-15 13:32:24 +02:00
Jepp9350 dfe3950866 Fix default values for country and currency in customer data
Previously, the country and currency fields could return null if not explicitly set. This update ensures that 'Ukendt' is returned as the default country and 'DKK' as the default currency when no value is provided, enhancing data consistency.
2025-04-15 11:32:18 +02:00
Jepp9350 627e4d87c2 Update text constants and add fallback values for customer data
Revised a string constant for transaction purposes to improve clarity. Added fallback values for address, zip code, and city in customer data methods to ensure defaults are returned when data is missing. These changes enhance robustness and readability.
2025-04-15 11:29:24 +02:00
Jepp9350 7b82be6c57 Implement vehicle subscription handling and department SMS feature
Added functionality to handle vehicle subscriptions in invoices, including validation and item visibility. Introduced department notification SMS capability with endpoints for creating, retrieving, and deleting SMS records. Enhanced invoice drafting logic to exclude items not flagged for inclusion in invoices.
2025-04-14 16:03:29 +02:00
Jepp9350 6efa414251 Refactor SMS and notification logic; add email template.
Updated the SMS sending logic to improve validation and handling of recipients in `gatewayapi.php`. Refactored notification conditions in `bookings_o.php` to ensure proper fallback mechanisms. Additionally, included a new booking notification email template in `email.php`.
2025-04-14 09:58:25 +02:00
Jepp9350 e0b2e5dade Remove permission check from PDF generator test route
The unused permission check was commented out, so it has been fully removed to simplify the code. This change maintains the existing functionality while cleaning up redundant code.
2025-04-11 13:59:58 +02:00