public IActionResult Confirm(Guid vacationId)
        {
            Vacation vacation = Vacationrepository.FindById(vacationId);

            vacation.ConfirmedVacation = true;
            Vacationrepository.Update(vacation);
            return(Redirect("/Home/NewVacation"));
        }
        public void ChangeDateVacation([FromBody] CalendarEventy request)
        {
            string   start          = request.start.Substring(0, 10).Replace("-", "/");
            string   end            = request.end.Substring(0, 10).Replace("-", "/");
            Vacation updatevacation = Vacationrepository.FindById((Guid)request.Id);

            updatevacation.FirstDate  = DateTime.ParseExact(start, "yyyy/M/d", CultureInfo.InvariantCulture);
            updatevacation.SecontDate = DateTime.ParseExact(end, "yyyy/M/d", CultureInfo.InvariantCulture);
            Vacationrepository.Update(updatevacation);
        }
        public IActionResult DeleteVacation(Guid vacationId, Guid personId)
        {
            Vacation vacation = Vacationrepository.FindById(vacationId);
            Person   person   = Personrepository.FindById(personId);

            person.Days += vacation.Days;
            Vacationrepository.Remove(vacation);
            Personrepository.Update(person);
            return(Redirect("/Home/Workers/Home/Workers"));
        }