Commit Graph

34 Commits

Author SHA1 Message Date
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
a1ca5c62fb Enhance NestJS application with SWC builder configuration, add @nestjs/devtools-integration for development support, and refactor various components for improved readability. Update package dependencies and streamline import statements across multiple files. 2024-11-26 04:26:55 +07:00
6d509a4487 update scheduleDate props 2024-11-25 15:02:56 +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
3114357515 thieu dau ngoac vuong lam gi cang 2024-10-30 12:09:33 +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
3c5b09ed5d update resume and service 2024-10-29 16:04:48 +07:00
b5d23ac930 handle error on create user 2024-10-29 15:42:36 +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
f9967ac5bd refactor and update get url logic 2024-10-17 17:02:03 +07:00
59923b02cb push code push code 2024-10-17 15:02:25 +07:00
4fac0a052b 🔥🔥🔥🔥🔥🔥 2024-10-12 17:11:09 +07:00