Commit Graph

36 Commits

Author SHA1 Message Date
03cf3f48a7 fix: refine schedule overlap validation in ScheduleSchema
- Updated the logic for checking overlapping schedules by querying existing schedule dates for the same user, improving accuracy in overlap detection.
- Simplified the overlap validation process by consolidating checks into a single function, enhancing code clarity and maintainability.
- This change aims to strengthen the integrity of scheduling operations and provide clearer error messages for users regarding scheduling conflicts.
2025-01-17 23:23:10 +07:00
9aec02568d fix: improve schedule overlap validation in ScheduleSchema
- Enhanced the validation logic to check for overlapping schedules by incorporating checks against existing user schedule dates.
- Added comprehensive overlap detection for new schedules, ensuring they do not conflict with any existing schedules for the user.
- This update aims to improve the integrity of scheduling operations and provide clearer error messages for users regarding scheduling conflicts.
2025-01-17 23:08:32 +07:00
d36460fc12 refactor: standardize formatting and improve readability in ScheduleSchema
- Reformatted import statements and code structure for consistency and clarity.
- Enhanced field descriptions across the ScheduleSchema to ensure uniformity and better understanding.
- Updated error messages for improved user feedback during scheduling operations.
- Improved the organization of query and mutation fields for better maintainability.

These changes aim to enhance code readability, maintainability, and user experience within the scheduling features.
2025-01-17 21:14:17 +07:00
776881f961 chore: combine context 2024-12-20 18:30:50 +07:00
6b0b95bb32 update schedule 2024-12-16 20:00:11 +07:00
11f234522b chore: fix order and schedule creation logic 2024-12-16 16:26:18 +07:00
3652fda7d3 feat: add grammar check functionality and enhance quiz schema
- Introduced a new 'testCheckGrammar' field in DocumentSchema to facilitate grammar checking for documents, leveraging the document service for processing.
- Updated DocumentService to implement grammar checking logic, including caching results and publishing suggestions.
- Enhanced QuizSchema by adding filter arguments for quiz attempts, allowing for more flexible data retrieval based on user and quiz IDs.
- Cleaned up whitespace and improved error handling in quiz attempt creation to ensure better user feedback.

These changes improve the document editing experience and enhance the quiz feature's data handling capabilities.
2024-12-11 22:36:35 +07:00
10e20092ab chore: update configuration and improve schema imports
- Updated biome.json to include "graphql.d.ts" in the ignored files list.
- Updated subproject commit reference in epess-database to the latest version.
- Removed unused script from package.json and streamlined module file extensions in tsconfig.json.
- Consolidated exclude patterns in tsconfig.build.json for clarity.
- Refactored imports across multiple schema files for consistency and improved readability.
- Enhanced various schema files by ensuring proper import order and removing redundant code.
- Improved error handling and data integrity checks in several service and schema files.
2024-12-08 20:49:52 +07:00
bb88d6ed00 feat: enhance QuizSchema and related schemas with new fields and relations
- Updated QuizSchema to expose correctAnswer as a field with a resolver, improving data retrieval for quizzes.
- Introduced new object types for correctAnswer, allowing for flexible data structures (StringType and StringListType).
- Modified createQuiz mutation to automatically associate the current user as centerMentorId, enhancing data integrity.
- Added personalMilestone relation to ScheduleSchema, linking schedules to personal milestones for better tracking.
- Included quiz relation in ServiceSchema, establishing a connection between services and their associated quizzes.
- Updated Prisma types to reflect the new relationships and fields, ensuring consistency across the application.
2024-12-07 18:18:33 +07:00
77e3526564 feat: add scheduleDates field to ScheduleSchema for retrieving schedule dates
- Introduced a new `scheduleDates` field in the ScheduleSchema to allow users to fetch a list of schedule dates.
- Implemented argument handling for pagination and filtering, ensuring efficient data retrieval.
- Added error handling to prevent access during subscriptions and ensure user authentication before data access.
- Enhanced the overall functionality of the ScheduleSchema, improving user experience and data management.
2024-12-07 16:05:12 +07:00
a516dce800 chore: update Node version and enhance debugging capabilities
- Removed .nvmrc file to eliminate version locking.
- Updated Dockerfile to use Node 22.6.0-alpine for improved performance and security.
- Modified package.json to enhance the 'start:dev' script with debugging options.
- Added new launch configuration in VSCode for attaching to Node processes by PID.
- Cleaned up settings.json by removing unused configurations.
- Refactored main.ts to simplify the bootstrap process.
- Enhanced logging in OrderSchema and ScheduleSchema for better traceability of operations.
2024-12-03 22:46:23 +07:00
951d61f3ac feat: improve schedule querying with flexible filtering and pagination
- Updated ScheduleSchema to enhance the querying logic for schedules by allowing dynamic filtering, ordering, and pagination.
- Replaced static customerId filtering with flexible arguments for filtering, ordering, skipping, and taking results.
- This change increases the versatility of schedule retrieval based on user-defined criteria.
2024-12-03 21:10:14 +07:00
6f5db20324 feat: enhance schedule querying logic based on user roles in ScheduleSchema
- Updated ScheduleSchema to implement role-based querying for schedules.
- Added logic to handle different user roles: CUSTOMER, CENTER_MENTOR, and CENTER_OWNER.
- Improved error handling for cases where the center is not found for mentors and owners.
- This change enhances the flexibility and usability of the schedule querying functionality.
2024-12-03 21:06:22 +07:00
111acacf2d refactor: simplify schedule filtering logic in ScheduleSchema
- Replace complex where clause with a direct reference to args.filter for schedule retrieval.
- This change enhances code readability and maintainability by streamlining the filtering process.
2024-12-01 14:29:39 +07:00
2c38110183 refactor: enhance schedule retrieval logic in ScheduleSchema
- Update schedule retrieval to restrict access to authorized centers based on center ownership and mentorship.
- Implement checks to ensure that schedules are only fetched for approved centers.
- Improve error handling for user and center validation during schedule queries, preventing access in subscription contexts.
2024-11-30 21:02:03 +07:00
c26bf36084 refactor: enhance schedule and document handling in schemas
- Simplify schedule expiration logic in CronService by removing unnecessary date checks.
- Improve error handling in DocumentSchema for document page retrieval, ensuring graceful failure.
- Add validation in ScheduleSchema to restrict schedule retrieval to authorized centers and prevent subscription-based access.
- Implement checks to reject schedules with start dates in the past or today, enhancing data integrity.
2024-11-30 20:35:34 +07:00
abb7e38df3 Enhance DocumentSchema and MinioService to support document folder creation. Update document creation logic to include folder setup in Minio after document creation. Refactor createDocumentFolder method to initialize a default page in the document folder. This improves document management and organization within the Minio storage system. 2024-11-28 20:09:37 +07:00
unclebonn
19a19b00c4 relation Schedules to Order 2024-11-28 15:27:41 +07:00
28d0374435 database bi kiet pha banh roi 2024-11-25 14:17:32 +07:00
675460c39c update api 2024-11-24 15:12:05 +07:00
56ba2808c8 day len server theo loi Khoi noi, toi xin tuyen bo mien tru trach nhiem 2024-11-05 15:02:53 +07:00
bc2eda7490 update payment 2024-11-03 20:28:14 +07:00
1a5577f8e6 fix some bug and produce many problem to solve later 2024-11-02 16:27:28 +07:00
e86d979ddb implement preview for center 2024-11-01 21:10:54 +07:00
db9f3213fd lennnn 2024-11-01 20:02:43 +07:00
ec77f07de1 fix time geneate logic and replace default datetime by luxon 2024-11-01 17:27:25 +07:00
a09785ec71 update preview date 2024-10-30 17:56:19 +07:00
e003bcd634 implement platform config 2024-10-29 19:06:01 +07:00
152bb50da8 refactor source code 2024-10-29 17:42:54 +07:00
f787d0c194 9h sang tao code tiep 2024-10-28 02:56:36 +07:00
9e0e97a560 refactor schema to match database schema 2024-10-27 13:12:24 +07:00
7e25e8d96b merge change from db 2024-10-25 14:49:16 +07:00
1523642b9d update schema due to majority database change 2024-10-18 01:50:26 +07:00
8817f961a8 update pagination 2024-10-17 19:06:51 +07:00
59923b02cb push code push code 2024-10-17 15:02:25 +07:00
4fac0a052b 🔥🔥🔥🔥🔥🔥 2024-10-12 17:11:09 +07:00