Commit Graph

22 Commits

Author SHA1 Message Date
70ff392d2e feat: enhance RefundTicketSchema with additional role checks for refund requests
- Updated RefundTicketSchema to include CENTER_OWNER in the authorization check for refund requests, ensuring that only authorized roles can request refunds.
- Improved error handling to provide clearer feedback for unauthorized access attempts.

These changes enhance the security and functionality of the refund ticket process, ensuring proper role validation and user experience.
2024-12-13 20:22:29 +07:00
0a1b42f908 feat: update refund ticket handling and enhance service schemas
- Removed the taskRefundTicket method from CronService to streamline scheduling logic.
- Updated PayosService to include MessageContextType for chat messages, improving message context handling.
- Enhanced RefundTicketSchema with additional fields for requester and improved error handling for unauthorized access.
- Implemented logic to update order and schedule statuses upon refund ticket approval, ensuring proper state management.
- Modified ServiceSchema to utilize createManyAndReturn for message creation, enhancing notification efficiency.

These changes improve the handling of refund tickets and enhance the overall functionality of the service schemas, ensuring better user experience and state management.
2024-12-13 19:35:23 +07:00
092a15753b feat: enhance notification system and role-based access across schemas
- Updated MessageSchema to include context-aware filtering for notifications, allowing retrieval based on recipientId for NOTIFICATION and SYSTEM contexts.
- Enhanced RefundTicketSchema to notify moderators upon refund requests, improving communication and response times.
- Modified ResumeSchema to send notifications to mentors and center owners when a new resume is submitted, ensuring timely updates.
- Improved ServiceSchema to notify center owners and mentors about service approvals, enhancing user engagement and awareness.
- Implemented role-based access control checks across schemas to ensure only authorized users can perform specific actions, enhancing security and user experience.
2024-12-09 19:38:36 +07:00
9732d7b904 feat: enhance message retrieval logic with context-based filtering
- Updated the MessageSchema to include context-aware filtering for notifications, allowing retrieval of messages based on recipientId when the context is NOTIFICATION.
- Improved the resolve function to handle subscription checks, ensuring that unauthorized access is properly managed.
- Added error handling for cases where the context is not allowed, enhancing overall robustness of the message retrieval process.
2024-12-09 19:08:25 +07:00
4ba3077a9b refactor: enhance refund ticket logic and role-based access control
- Updated the RefundTicket schema to allow both customers and center mentors to request refunds, improving flexibility in refund processing.
- Refined bank detail checks to differentiate between customers and center mentors, ensuring appropriate handling of bank information.
- Implemented special handling for center mentors to always allow full refunds, enhancing user experience.
- Improved error messages and validation checks throughout the refund process for better clarity and user guidance.
2024-12-09 18:43:03 +07:00
45dca51990 chore: update biome configuration and enhance error handling in schema files
- Enabled useIgnoreFile in biome.json for better file management.
- Updated various correctness and style rules in biome.json to enforce stricter coding standards.
- Added new biome lint command in package.json for improved code quality checks.
- Refactored error handling in multiple schema files to use consistent error throwing patterns, enhancing readability and maintainability.
- Improved user authentication checks across various schemas to ensure proper access control.
2024-12-08 21:01:26 +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
7cff5069de Update RefundTicket schema to rename 'reason' field to 'rejectedReason' for clarity in status updates. Update subproject reference in epess-database. Enhance generated types in pothos.generated.ts for improved schema management. 2024-11-29 13:56:57 +07:00
01aede0b09 Update RefundTicketSchema to include additional fields for bank details and refund reasons; modify refund logic to enhance validation and error handling. Update TypeScript configuration to resolve JSON modules and bump subproject commit reference in epess-database. 2024-11-26 23:55:39 +07:00
12b1e8e764 update refund ticket 2024-11-26 21:02:14 +07:00
e63f900cf4 expose workshop metric 2024-11-26 18:07:03 +07:00
1062f5944d update sth :) 2024-11-26 17:55:34 +07:00
537b6fd359 Refactor ClerkService and OrderSchema for improved type safety; update RefundTicketSchema to include new refund request and processing mutations. Clean up import statements and enhance descriptions for better clarity. Update subproject commit reference in epess-database. 2024-11-26 17:08:38 +07:00
57037a59ec update websocket 2024-11-06 17:16:10 +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
7e25e8d96b merge change from db 2024-10-25 14:49:16 +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
5c56e79d63 phong bat 2024-10-17 15:15:08 +07:00
06d7c3a935 fix unexpected prismaclient generate 2024-10-12 22:37:02 +07:00
ba77bd4e1c update many graphql field 2024-10-12 16:34:43 +07:00