feat: update collaboration session handling and schedule date status
- Removed redundant code for adding current user ID to collaborators in collaboration sessions. - Implemented updates to schedule date status based on collaboration session conditions, enhancing the workflow for both customers and mentors. - Improved error handling to ensure only authorized users can access collaboration sessions, maintaining data integrity and user experience.
This commit is contained in:
@@ -20,7 +20,7 @@ export class CronService {
|
||||
const schedules = await this.prisma.scheduleDate.findMany({
|
||||
where: {
|
||||
end: {
|
||||
lt: DateTimeUtils.now().toJSDate(),
|
||||
lt: DateTimeUtils.now().toJSDate(), // past
|
||||
},
|
||||
status: {
|
||||
notIn: [ScheduleDateStatus.COMPLETED, ScheduleDateStatus.MISSING_MENTOR, ScheduleDateStatus.MISSING_CUSTOMER],
|
||||
@@ -48,12 +48,12 @@ export class CronService {
|
||||
}
|
||||
}
|
||||
|
||||
if (collaborationSession.collaboratorsIds.length === 1) {
|
||||
return {
|
||||
id: schedule.id,
|
||||
status: ScheduleDateStatus.MISSING_CUSTOMER,
|
||||
}
|
||||
}
|
||||
// if (collaborationSession.collaboratorsIds.length === 1) {
|
||||
// return {
|
||||
// id: schedule.id,
|
||||
// status: ScheduleDateStatus.MISSING_CUSTOMER,
|
||||
// }
|
||||
// }
|
||||
|
||||
if (collaborationSession.collaboratorsIds.length === 2) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user