public ShiftPointMapView() { InitializeComponent(); _tool = ((App)Application.Current).GeoLayoutBuildingService.ShiftModifier; _model = (GeoLocationViewModel)CoordinatesView.DataContext; _tool.PropertyChanged += _tool_PropertyChanged; }
public GeoLayoutBuildingService(WaypointsService waypointsService, GroupsService groupsService) { WaypointBuilder = new SingleWaypointBuilder(waypointsService, groupsService); ProfileBuilder = new ProfileBuilder(waypointsService, groupsService); GridBuilder = new GridBuilder(waypointsService, groupsService); ShiftModifier = new ShiftModifier(); RotateModifier = new RotateModifier(); CropModifier = new CropModifier(waypointsService); TdmLayoutBuilder = new TdmLayoutBuilder(waypointsService, groupsService); }
public IActionResult EditShift(int id, [FromBody] ShiftDto shift) { var shiftToEdit = new Shift { ShiftId = id, Date = shift.Date, EmployeeId = shift.EmployeeId, ManagerId = shift.ManagerId, WorkFromHome = shift.WorkFromHome, Callout = shift.Callout, Planned = shift.Planned, ShiftLengthId = shift.ShiftLengthId, Email = shift.Email, Phone = shift.Phone, Integrations = shift.Integrations, NonCoverage = shift.NonCoverage }; var editShift = new ShiftModifier(_repo).EditShift(shiftToEdit); switch (editShift) { case StatusCodes.Success: return(StatusCode((int)HttpStatusCode.OK, "The shift has been edited!")); case StatusCodes.NotFound: return(StatusCode((int)HttpStatusCode.NotFound, "There does not appear to be a shift associated with that day.")); case StatusCodes.Unsuccessful: return(StatusCode((int)HttpStatusCode.InternalServerError, "Sorry, something went wrong. Please try again later.")); default: return(StatusCode((int)HttpStatusCode.InternalServerError, "Sorry, something went wrong. Please try again later.")); } }