mirror of
https://github.com/grocy/grocy.git
synced 2025-04-30 01:55:47 +00:00
Sort all dropdowns
This commit is contained in:
parent
6dd3c26ddd
commit
92e648490a
@ -26,7 +26,7 @@ class BatteriesController extends BaseController
|
|||||||
$countDueNextXDays = count(FindAllItemsInArrayByValue($nextChargeTimes, date('Y-m-d', strtotime("+$nextXDays days")), '<'));
|
$countDueNextXDays = count(FindAllItemsInArrayByValue($nextChargeTimes, date('Y-m-d', strtotime("+$nextXDays days")), '<'));
|
||||||
$countOverdue = count(FindAllItemsInArrayByValue($nextChargeTimes, date('Y-m-d', strtotime('-1 days')), '<'));
|
$countOverdue = count(FindAllItemsInArrayByValue($nextChargeTimes, date('Y-m-d', strtotime('-1 days')), '<'));
|
||||||
return $this->AppContainer->view->render($response, 'batteriesoverview', [
|
return $this->AppContainer->view->render($response, 'batteriesoverview', [
|
||||||
'batteries' => $this->Database->batteries(),
|
'batteries' => $this->Database->batteries()->orderBy('name'),
|
||||||
'current' => $this->BatteriesService->GetCurrent(),
|
'current' => $this->BatteriesService->GetCurrent(),
|
||||||
'nextChargeTimes' => $nextChargeTimes,
|
'nextChargeTimes' => $nextChargeTimes,
|
||||||
'nextXDays' => $nextXDays,
|
'nextXDays' => $nextXDays,
|
||||||
@ -38,14 +38,14 @@ class BatteriesController extends BaseController
|
|||||||
public function TrackChargeCycle(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
public function TrackChargeCycle(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'batterytracking', [
|
return $this->AppContainer->view->render($response, 'batterytracking', [
|
||||||
'batteries' => $this->Database->batteries()
|
'batteries' => $this->Database->batteries()->orderBy('name')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function BatteriesList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
public function BatteriesList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'batteries', [
|
return $this->AppContainer->view->render($response, 'batteries', [
|
||||||
'batteries' => $this->Database->batteries()
|
'batteries' => $this->Database->batteries()->orderBy('name')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class HabitsController extends BaseController
|
|||||||
$countDueNextXDays = count(FindAllItemsInArrayByValue($nextHabitTimes, date('Y-m-d', strtotime("+$nextXDays days")), '<'));
|
$countDueNextXDays = count(FindAllItemsInArrayByValue($nextHabitTimes, date('Y-m-d', strtotime("+$nextXDays days")), '<'));
|
||||||
$countOverdue = count(FindAllItemsInArrayByValue($nextHabitTimes, date('Y-m-d', strtotime('-1 days')), '<'));
|
$countOverdue = count(FindAllItemsInArrayByValue($nextHabitTimes, date('Y-m-d', strtotime('-1 days')), '<'));
|
||||||
return $this->AppContainer->view->render($response, 'habitsoverview', [
|
return $this->AppContainer->view->render($response, 'habitsoverview', [
|
||||||
'habits' => $this->Database->habits(),
|
'habits' => $this->Database->habits()->orderBy('name'),
|
||||||
'currentHabits' => $this->HabitsService->GetCurrentHabits(),
|
'currentHabits' => $this->HabitsService->GetCurrentHabits(),
|
||||||
'nextHabitTimes' => $nextHabitTimes,
|
'nextHabitTimes' => $nextHabitTimes,
|
||||||
'nextXDays' => $nextXDays,
|
'nextXDays' => $nextXDays,
|
||||||
@ -38,14 +38,14 @@ class HabitsController extends BaseController
|
|||||||
public function TrackHabitExecution(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
public function TrackHabitExecution(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'habittracking', [
|
return $this->AppContainer->view->render($response, 'habittracking', [
|
||||||
'habits' => $this->Database->habits()
|
'habits' => $this->Database->habits()->orderBy('name')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function HabitsList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
public function HabitsList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'habits', [
|
return $this->AppContainer->view->render($response, 'habits', [
|
||||||
'habits' => $this->Database->habits()
|
'habits' => $this->Database->habits()->orderBy('name')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@ class StockController extends BaseController
|
|||||||
$countExpiringNextXDays = count(FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('+5 days')), '<'));
|
$countExpiringNextXDays = count(FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('+5 days')), '<'));
|
||||||
$countAlreadyExpired = count(FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('-1 days')), '<'));
|
$countAlreadyExpired = count(FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('-1 days')), '<'));
|
||||||
return $this->AppContainer->view->render($response, 'stockoverview', [
|
return $this->AppContainer->view->render($response, 'stockoverview', [
|
||||||
'products' => $this->Database->products(),
|
'products' => $this->Database->products()->orderBy('name'),
|
||||||
'quantityunits' => $this->Database->quantity_units(),
|
'quantityunits' => $this->Database->quantity_units()->orderBy('name'),
|
||||||
'currentStock' => $currentStock,
|
'currentStock' => $currentStock,
|
||||||
'missingProducts' => $this->StockService->GetMissingProducts(),
|
'missingProducts' => $this->StockService->GetMissingProducts(),
|
||||||
'nextXDays' => $nextXDays,
|
'nextXDays' => $nextXDays,
|
||||||
@ -35,21 +35,21 @@ class StockController extends BaseController
|
|||||||
public function Purchase(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
public function Purchase(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'purchase', [
|
return $this->AppContainer->view->render($response, 'purchase', [
|
||||||
'products' => $this->Database->products()
|
'products' => $this->Database->products()->orderBy('name')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Consume(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
public function Consume(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'consume', [
|
return $this->AppContainer->view->render($response, 'consume', [
|
||||||
'products' => $this->Database->products()
|
'products' => $this->Database->products()->orderBy('name')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Inventory(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
public function Inventory(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'inventory', [
|
return $this->AppContainer->view->render($response, 'inventory', [
|
||||||
'products' => $this->Database->products()
|
'products' => $this->Database->products()->orderBy('name')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,8 +57,8 @@ class StockController extends BaseController
|
|||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'shoppinglist', [
|
return $this->AppContainer->view->render($response, 'shoppinglist', [
|
||||||
'listItems' => $this->Database->shopping_list(),
|
'listItems' => $this->Database->shopping_list(),
|
||||||
'products' => $this->Database->products(),
|
'products' => $this->Database->products()->orderBy('name'),
|
||||||
'quantityunits' => $this->Database->quantity_units(),
|
'quantityunits' => $this->Database->quantity_units()->orderBy('name'),
|
||||||
'missingProducts' => $this->StockService->GetMissingProducts()
|
'missingProducts' => $this->StockService->GetMissingProducts()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -66,23 +66,23 @@ class StockController extends BaseController
|
|||||||
public function ProductsList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
public function ProductsList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'products', [
|
return $this->AppContainer->view->render($response, 'products', [
|
||||||
'products' => $this->Database->products(),
|
'products' => $this->Database->products()->orderBy('name'),
|
||||||
'locations' => $this->Database->locations(),
|
'locations' => $this->Database->locations()->orderBy('name'),
|
||||||
'quantityunits' => $this->Database->quantity_units()
|
'quantityunits' => $this->Database->quantity_units()->orderBy('name')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function LocationsList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
public function LocationsList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'locations', [
|
return $this->AppContainer->view->render($response, 'locations', [
|
||||||
'locations' => $this->Database->locations()
|
'locations' => $this->Database->locations()->orderBy('name')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function QuantityUnitsList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
public function QuantityUnitsList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'quantityunits', [
|
return $this->AppContainer->view->render($response, 'quantityunits', [
|
||||||
'quantityunits' => $this->Database->quantity_units()
|
'quantityunits' => $this->Database->quantity_units()->orderBy('name')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,8 +91,8 @@ class StockController extends BaseController
|
|||||||
if ($args['productId'] == 'new')
|
if ($args['productId'] == 'new')
|
||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'productform', [
|
return $this->AppContainer->view->render($response, 'productform', [
|
||||||
'locations' => $this->Database->locations(),
|
'locations' => $this->Database->locations()->orderBy('name'),
|
||||||
'quantityunits' => $this->Database->quantity_units(),
|
'quantityunits' => $this->Database->quantity_units()->orderBy('name'),
|
||||||
'mode' => 'create'
|
'mode' => 'create'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -100,8 +100,8 @@ class StockController extends BaseController
|
|||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'productform', [
|
return $this->AppContainer->view->render($response, 'productform', [
|
||||||
'product' => $this->Database->products($args['productId']),
|
'product' => $this->Database->products($args['productId']),
|
||||||
'locations' => $this->Database->locations(),
|
'locations' => $this->Database->locations()->orderBy('name'),
|
||||||
'quantityunits' => $this->Database->quantity_units(),
|
'quantityunits' => $this->Database->quantity_units()->orderBy('name'),
|
||||||
'mode' => 'edit'
|
'mode' => 'edit'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ class StockController extends BaseController
|
|||||||
if ($args['itemId'] == 'new')
|
if ($args['itemId'] == 'new')
|
||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'shoppinglistform', [
|
return $this->AppContainer->view->render($response, 'shoppinglistform', [
|
||||||
'products' => $this->Database->products(),
|
'products' => $this->Database->products()->orderBy('name'),
|
||||||
'mode' => 'create'
|
'mode' => 'create'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ class StockController extends BaseController
|
|||||||
{
|
{
|
||||||
return $this->AppContainer->view->render($response, 'shoppinglistform', [
|
return $this->AppContainer->view->render($response, 'shoppinglistform', [
|
||||||
'listItem' => $this->Database->shopping_list($args['itemId']),
|
'listItem' => $this->Database->shopping_list($args['itemId']),
|
||||||
'products' => $this->Database->products(),
|
'products' => $this->Database->products()->orderBy('name'),
|
||||||
'mode' => 'edit'
|
'mode' => 'edit'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user