Vlad Chikalkin 7d94521c8b
Issues/76 (#77)
* fix(jwt): update import path for isTokenExpired function to remove file extension

* packages/graphql: add slot tests

* fix(slots): update error handling for customer and slot retrieval, enhance time validation in slot updates

* fix(slots): update error messages for missing datetime fields and improve validation logic in slot updates

* fix(slots): update error messages and validation logic for slot creation and updates, including handling of datetime fields and master status

* refactor(slots): rename checkUpdateIsTimeChanging to checkUpdateDatetime for clarity in slot update validation

* test(slots): add comprehensive tests for getAvailableTimeSlots method, including edge cases and error handling

* fix(api): standardize error messages for customer and slot retrieval, and improve validation logic in slots service

* refactor(slots): rename validation methods for clarity and consistency in slot service

* OrdersService: add checkBeforeCreate

* add orders.test.js

* test(orders): add validation test for missing datetime_end in order creation

* feat(orders): implement updateOrder functionality with comprehensive validation tests

- Added updateOrder method in OrdersService with checks for permissions, order state, and datetime validation.
- Implemented tests for various scenarios including successful updates, permission errors, and validation failures.
- Enhanced error handling for overlapping time and invalid state changes.
- Updated GraphQL operations to support sorting in GetOrders query.

* fix(orders): update datetime validation logic and test cases for order creation and completion

- Modified order creation tests to set datetime_start to one hour in the past for past orders.
- Updated the OrdersService to use isNowOrAfter for validating order completion against the start time.
- Enhanced datetime utility function to accept a unit parameter for more flexible comparisons.

* fix(calendar): initialize selected date in ScheduleCalendar component if not set

- Added useEffect to set the selected date to the current date if it is not already defined.
- Imported useEffect alongside useState for managing component lifecycle.

* fix(order-form): initialize selected date in DateSelect component if not set

- Added useEffect to set the selected date to the current date if it is not already defined.
- Renamed setDate to setSelectedDate for clarity in state management.

* refactor(orders): streamline order creation logic and enhance test setup

- Removed redundant variable assignments in the createOrder method for cleaner code.
- Updated test setup in orders.test.js to use global mocks for user and service retrieval, improving test clarity and maintainability.
- Added checks for required fields in order creation to ensure data integrity.
2025-08-11 16:25:14 +03:00
..
2025-08-01 19:54:10 +03:00
2025-08-02 15:42:06 +03:00
2025-08-11 16:25:14 +03:00
2025-07-02 17:46:33 +03:00
2025-06-27 13:44:17 +03:00
2025-08-11 16:25:14 +03:00
2025-06-27 13:44:17 +03:00
2025-08-02 15:42:06 +03:00
2025-06-27 13:44:17 +03:00
2024-12-10 18:15:51 +03:00
2025-06-27 13:44:17 +03:00
2025-08-02 15:42:06 +03:00
2024-12-10 18:15:51 +03:00
2025-07-02 21:05:59 +03:00
2024-12-16 18:53:55 +03:00
2025-06-27 13:44:17 +03:00
2024-12-10 18:15:51 +03:00
2024-11-27 14:29:35 +03:00
2024-11-26 15:33:59 +03:00
2024-11-27 14:29:35 +03:00
2024-12-24 18:34:50 +03:00
2025-08-11 16:25:14 +03:00

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.