feat: add collaboratorUserId to appointment model and update dashboard filtering logic
This commit is contained in:
@@ -245,6 +245,7 @@ export interface AppointmentEventByClient {
|
||||
serviceName: string;
|
||||
serviceDescription: string;
|
||||
collaboratorId: string;
|
||||
collaboratorUserId: string;
|
||||
collaboratorName: string;
|
||||
collaboratorAvatar: string;
|
||||
appointmentDate: string;
|
||||
|
||||
@@ -1313,6 +1313,7 @@ class AppointmentManager implements IAppointmentsManager {
|
||||
serviceName: service.name,
|
||||
serviceDescription: service.description,
|
||||
collaboratorId: employee.id,
|
||||
collaboratorUserId: String(employee.userId),
|
||||
collaboratorName: collaboratorFullName,
|
||||
collaboratorAvatar: collaboratorAvatar,
|
||||
appointmentDate: dayjs(appointment.start).toISOString(),
|
||||
@@ -1422,6 +1423,7 @@ class AppointmentManager implements IAppointmentsManager {
|
||||
serviceName: service.name,
|
||||
serviceDescription: service.description,
|
||||
collaboratorId: employee.id,
|
||||
collaboratorUserId: String(employee.userId),
|
||||
collaboratorName: employeeFullName,
|
||||
collaboratorAvatar: employeeAvatar,
|
||||
appointmentDate: dayjs(appointment.start).toISOString(),
|
||||
@@ -1531,6 +1533,7 @@ class AppointmentManager implements IAppointmentsManager {
|
||||
serviceName: service.name,
|
||||
serviceDescription: service.description,
|
||||
collaboratorId: employee.id,
|
||||
collaboratorUserId: String(employee.userId),
|
||||
collaboratorName: employeeFullName,
|
||||
collaboratorAvatar: employeeAvatar,
|
||||
appointmentDate: dayjs(appointment.start).toISOString(),
|
||||
@@ -1649,6 +1652,7 @@ class AppointmentManager implements IAppointmentsManager {
|
||||
serviceName: service.name,
|
||||
serviceDescription: service.description,
|
||||
collaboratorId: String(employee.id || (employee as any)._id),
|
||||
collaboratorUserId: String(employee.userId),
|
||||
collaboratorName: employeeFullName,
|
||||
collaboratorAvatar: employeeAvatar,
|
||||
appointmentDate: dayjs(appointment.start).toISOString(),
|
||||
@@ -1766,6 +1770,7 @@ class AppointmentManager implements IAppointmentsManager {
|
||||
serviceName: service.name,
|
||||
serviceDescription: service.description,
|
||||
collaboratorId: employee.id,
|
||||
collaboratorUserId: String(employee.userId),
|
||||
collaboratorName: employeeFullName,
|
||||
collaboratorAvatar: employeeAvatar,
|
||||
appointmentDate: dayjs(appointment.start).toISOString(),
|
||||
@@ -1893,6 +1898,7 @@ public async findAppointmentsByCollaboratorPaginated(
|
||||
serviceName: service.name,
|
||||
serviceDescription: service.description,
|
||||
collaboratorId: String(employee.id || (employee as any)._id),
|
||||
collaboratorUserId: String(employee.userId),
|
||||
collaboratorName: employeeFullName,
|
||||
collaboratorAvatar: employeeAvatar,
|
||||
appointmentDate: dayjs(appointment.start).toISOString(),
|
||||
|
||||
Reference in New Issue
Block a user