Skip to content

Commit

Permalink
Refactoring : renommer ClosingExceptionController en AdminClosingExce…
Browse files Browse the repository at this point in the history
…ptionController (#966)
  • Loading branch information
raphodn authored Aug 29, 2023
1 parent 948065d commit 3c93df1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@


/**
* ClosingException controller.
* Admin ClosingException controller ("fermetures exceptionnelles" coté admin)
*
* @Route("admin/closingexceptions")
*/
class ClosingExceptionController extends Controller
{
/**
* List all closing exceptions.
* List all closing exceptions
*
* @Route("/", name="admin_closingexception_index", methods={"GET"})
* @Security("has_role('ROLE_ADMIN')")
Expand All @@ -37,7 +37,7 @@ public function indexAction(Request $request)
}

/**
* Add new closing exception.
* Add new closing exception
*
* @Route("/new", name="admin_closingexception_new", methods={"GET","POST"})
* @Security("has_role('ROLE_ADMIN')")
Expand Down
6 changes: 3 additions & 3 deletions src/AppBundle/Controller/AdminEventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@


/**
* Admin Event controller.
* Admin Event controller
*
* @Route("admin/events")
*/
class AdminEventController extends Controller
{
/**
* Filter form.
* Filter form
*/
private function filterFormFactory(Request $request): array
{
Expand Down Expand Up @@ -246,7 +246,7 @@ public function listProxiesAction()
}

/**
* Lists all proxy for one event.
* Lists all proxy for one event
*
* @Route("/{id}/proxies", name="admin_event_proxies_list", methods={"GET"})
* @Security("has_role('ROLE_PROCESS_MANAGER')")
Expand Down
18 changes: 15 additions & 3 deletions src/AppBundle/Controller/AdminPeriodController.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public function indexAction(Request $request, PeriodFormHelper $formHelper)
}

/**
* Create a period
*
* @Route("/new", name="admin_period_new", methods={"GET","POST"})
* @Security("has_role('ROLE_SHIFT_MANAGER')")
*/
Expand Down Expand Up @@ -124,6 +126,8 @@ public function newPeriodAction(Request $request)
}

/**
* Edit a period
*
* @Route("/{id}/edit", name="admin_period_edit", methods={"GET","POST"})
* @Security("has_role('ROLE_SHIFT_MANAGER')")
*/
Expand Down Expand Up @@ -190,6 +194,8 @@ public function editPeriodAction(Request $request, Period $period)
}

/**
* Create a position
*
* @Route("/{id}/position/add", name="admin_periodposition_new", methods={"POST"})
* @Security("has_role('ROLE_SHIFT_MANAGER')")
*/
Expand Down Expand Up @@ -237,6 +243,8 @@ public function newPeriodPositionAction(Request $request, Period $period)
}

/**
* Delete a position
*
* @Route("/{id}/position/{position}", name="admin_periodposition_delete", methods={"DELETE"})
* @Security("has_role('ROLE_ADMIN')")
*/
Expand All @@ -259,7 +267,7 @@ public function deletePeriodPositionAction(Request $request, Period $period, Per
}

/**
* Book a period.
* Book a position
*
* @Route("/{id}/position/{position}/book", name="admin_periodposition_book", methods={"POST"})
* @Security("has_role('ROLE_SHIFT_MANAGER')")
Expand Down Expand Up @@ -303,7 +311,7 @@ public function bookPeriodPositionAction(Request $request, Period $period, Perio
}

/**
* Free a position.
* Free a position
*
* @Route("/{id}/position/{position}/free", name="admin_periodposition_free", methods={"POST"})
* @Security("has_role('ROLE_SHIFT_MANAGER')")
Expand Down Expand Up @@ -338,7 +346,7 @@ public function freePeriodPositionAction(Request $request, Period $period, Perio
}

/**
* Deletes a period entity.
* Delete a period
*
* @Route("/{id}", name="admin_period_delete", methods={"DELETE"})
* @Security("has_role('ROLE_ADMIN')")
Expand All @@ -362,6 +370,8 @@ public function deletePeriodAction(Request $request, Period $period)
}

/**
* Duplicate a period
*
* @Route("/copyPeriod/", name="admin_period_copy", methods={"GET","POST"})
* @Security("has_role('ROLE_ADMIN')")
*/
Expand Down Expand Up @@ -406,6 +416,8 @@ public function copyPeriodAction(Request $request)
}

/**
* Generate shifts for a given date
*
* @Route("/generateShifts/", name="admin_shifts_generation", methods={"GET","POST"})
* @Security("has_role('ROLE_ADMIN')")
*/
Expand Down

0 comments on commit 3c93df1

Please sign in to comment.