public IActionResult GetIncidentsReport([FromBody] DatesFilter datesFilter)
        {
            ResponseModelWithData <IEnumerable <IncidentReportModel> > responseModel = new ResponseModelWithData <IEnumerable <IncidentReportModel> >();

            try
            {
                var token = Utils.GetToken(Request);

                var dateFrom = new DateTime(datesFilter.YearFrom, datesFilter.MonthFrom, datesFilter.DayFrom);
                var dateTo   = new DateTime(datesFilter.YearTo, datesFilter.MonthTo, datesFilter.DayTo);

                var admin = sessionService.AuthorizeAdminByToken(token);

                var list = trajectService.GetIncidentsReport(admin, dateFrom, dateTo);

                responseModel.Data         = IncidentReportModel.ToModel(list);
                responseModel.IsResponseOK = true;

                return(Ok(responseModel));
            }
            catch (HandledException he)
            {
                responseModel.IsResponseOK = false;
                responseModel.ErrorMessage = he.Message;

                return(Ok(responseModel));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.ToString()));
            }
        }
        public IActionResult RemoveEmployee(Guid id)
        {
            try
            {
                ResponseModel responseModel = new ResponseModel();
                var           token         = new Guid(Request.Headers["Authorization"]);
                var           admin         = sessionService.AuthorizeAdminByToken(token);
                //Administrator admin = administratorService.GetAdminById(user.Id);

                var company   = admin.Company;
                var companyId = company.Id;
                companyService.RemoveEmployee(companyId, id);
                employeeService.RemoveEmployee(id);
                responseModel.IsResponseOK = true;

                return(Ok(responseModel));
            }
            catch (HandledException he)
            {
                var response = new ResponseModel()
                {
                    IsResponseOK = true,
                    ErrorMessage = he.Message
                };

                return(Ok(response));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.ToString()));
            }
        }