feat: add CollaboratorPicker component and integrate into CollaboratorScheduleSummaryFlow
- Implemented CollaboratorPicker for selecting employees with support for single and multiple selections. - Created CollaboratorScheduleSummaryFlow to display collaborator schedules and exceptions. - Added ServicePublicationFlow for managing service visibility on public pages. - Introduced CSS styles for ServicePrivate component to enhance UI.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { Body, Controller, Middlewares, Post, Response, Route, SuccessResponse } from "tsoa";
|
||||
import { ApiValidationError } from "../../Models/Server.Error.model";
|
||||
import {
|
||||
CollaboratorScheduleDetailsParams,
|
||||
CollaboratorScheduleDetailsView,
|
||||
} from "../../Models/AdminAssistant/AdminAssistant.Interface";
|
||||
import { authenticateMiddleware } from "../../middleware/authentication";
|
||||
import { AdminAssistantService } from "./AdminAssistant.Service";
|
||||
|
||||
@Route("admin-assistant/collaborator-schedule-details")
|
||||
@Middlewares(authenticateMiddleware)
|
||||
export class GetCollaboratorScheduleDetailsController extends Controller {
|
||||
@Response<ApiValidationError>(500, "Ha ocurrido un error")
|
||||
@SuccessResponse(200, "Done")
|
||||
@Post()
|
||||
public async getCollaboratorScheduleDetails(
|
||||
@Body() requestBody: CollaboratorScheduleDetailsParams
|
||||
): Promise<CollaboratorScheduleDetailsView | ApiValidationError> {
|
||||
try {
|
||||
const details = await new AdminAssistantService().getCollaboratorScheduleDetails(requestBody);
|
||||
this.setStatus(200);
|
||||
return details;
|
||||
} catch (e) {
|
||||
const errorOccurred: Error = e as Error;
|
||||
this.setStatus(500);
|
||||
return new ApiValidationError(500, errorOccurred.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user