Compare commits
2 commits
b8a5a1ff58
...
a48aa86b09
Author | SHA1 | Date | |
---|---|---|---|
a48aa86b09 | |||
d350e2381a |
10 changed files with 15 additions and 16 deletions
|
@ -1,7 +1,5 @@
|
||||||
# 🌈✨ SAUFEN - The Ultimate Drink Management Experience! 🍹🍻
|
# 🌈✨ SAUFEN - The Ultimate Drink Management Experience! 🍹🍻
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 🎉 Welcome to Drink Paradise! 🎊
|
## 🎉 Welcome to Drink Paradise! 🎊
|
||||||
|
|
||||||
**SAUFEN** is not just a drink management system - it's a **REVOLUTION** in how we celebrate and enjoy our favorite beverages! With its STUNNING interface and INCREDIBLE features, you'll wonder how you ever lived without it!
|
**SAUFEN** is not just a drink management system - it's a **REVOLUTION** in how we celebrate and enjoy our favorite beverages! With its STUNNING interface and INCREDIBLE features, you'll wonder how you ever lived without it!
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use App\Service\ConfigurationService;
|
||||||
use App\Enum\SystemSettingKey;
|
use App\Enum\SystemSettingKey;
|
||||||
use Doctrine\ORM\Configuration;
|
use Doctrine\ORM\Configuration;
|
||||||
use App\Settings;
|
use App\Settings;
|
||||||
|
@ -44,7 +45,7 @@ return [
|
||||||
Configuration $configuration
|
Configuration $configuration
|
||||||
): EntityManagerInterface => new EntityManager($connection, $configuration),
|
): EntityManagerInterface => new EntityManager($connection, $configuration),
|
||||||
|
|
||||||
Twig::class => function (\App\Service\ConfigurationService $config): Twig {
|
Twig::class => function (ConfigurationService $config): Twig {
|
||||||
$paths = [__DIR__ . '/../templates'];
|
$paths = [__DIR__ . '/../templates'];
|
||||||
$cache = __DIR__ . '/../var/cache/twig';
|
$cache = __DIR__ . '/../var/cache/twig';
|
||||||
|
|
||||||
|
|
6
ecs.php
6
ecs.php
|
@ -14,11 +14,15 @@ return ECSConfig::configure()
|
||||||
__DIR__ . '/bin',
|
__DIR__ . '/bin',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
->withRootFiles()
|
||||||
|
|
||||||
// add a single rule
|
// add a single rule
|
||||||
->withRules([
|
->withRules([
|
||||||
NoUnusedImportsFixer::class,
|
NoUnusedImportsFixer::class,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
->withPhpCsFixerSets(
|
->withPhpCsFixerSets(
|
||||||
per: true,
|
per: true,
|
||||||
php84Migration: true,
|
php84Migration: true,
|
||||||
|
@ -30,4 +34,4 @@ return ECSConfig::configure()
|
||||||
->withPreparedSets(
|
->withPreparedSets(
|
||||||
strict: true,
|
strict: true,
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Rector\Config\RectorConfig;
|
use Rector\Config\RectorConfig;
|
||||||
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
|
|
||||||
|
|
||||||
return RectorConfig::configure()
|
return RectorConfig::configure()
|
||||||
->withPaths([
|
->withPaths([
|
||||||
|
@ -13,6 +12,7 @@ return RectorConfig::configure()
|
||||||
__DIR__ . '/tests',
|
__DIR__ . '/tests',
|
||||||
__DIR__ . '/bin',
|
__DIR__ . '/bin',
|
||||||
])
|
])
|
||||||
|
->withRootFiles()
|
||||||
->withImportNames(removeUnusedImports: true)
|
->withImportNames(removeUnusedImports: true)
|
||||||
->withPhpSets()
|
->withPhpSets()
|
||||||
->withPreparedSets(
|
->withPreparedSets(
|
||||||
|
@ -21,7 +21,4 @@ return RectorConfig::configure()
|
||||||
earlyReturn: true,
|
earlyReturn: true,
|
||||||
strictBooleans: true,
|
strictBooleans: true,
|
||||||
)
|
)
|
||||||
->withSkip([
|
;
|
||||||
ReadonlyPropertyRector::class,
|
|
||||||
])
|
|
||||||
;
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class DashboardController
|
||||||
'lowStockItems' => $lowStockItems,
|
'lowStockItems' => $lowStockItems,
|
||||||
'drinkTypes' => $drinkTypes,
|
'drinkTypes' => $drinkTypes,
|
||||||
'showLowStockAlerts' => $showLowStockAlerts,
|
'showLowStockAlerts' => $showLowStockAlerts,
|
||||||
'showQuickUpdateForm' => $showQuickUpdateForm
|
'showQuickUpdateForm' => $showQuickUpdateForm,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class SettingsController
|
||||||
{
|
{
|
||||||
|
|
||||||
$settings = [];
|
$settings = [];
|
||||||
foreach($this->configurationService->getAllConfigs() as $setting) {
|
foreach ($this->configurationService->getAllConfigs() as $setting) {
|
||||||
$settings[$setting->getKey()] = $setting->getValue();
|
$settings[$setting->getKey()] = $setting->getValue();
|
||||||
}
|
}
|
||||||
return $this->view->render($response, 'settings/index.twig', [
|
return $this->view->render($response, 'settings/index.twig', [
|
||||||
|
|
|
@ -24,4 +24,4 @@ enum SystemSettingKey: string
|
||||||
case SHOW_LOW_STOCK_ALERTS = 'show_low_stock_alerts';
|
case SHOW_LOW_STOCK_ALERTS = 'show_low_stock_alerts';
|
||||||
case SHOW_QUICK_UPDATE_FORM = 'show_quick_update_form';
|
case SHOW_QUICK_UPDATE_FORM = 'show_quick_update_form';
|
||||||
case ITEMS_PER_PAGE = 'items_per_page';
|
case ITEMS_PER_PAGE = 'items_per_page';
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@ namespace App\Service;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use App\Entity\DrinkType;
|
use App\Entity\DrinkType;
|
||||||
use App\Repository\DrinkTypeRepository;
|
use App\Repository\DrinkTypeRepository;
|
||||||
use App\Service\ConfigurationService;
|
|
||||||
|
|
||||||
class DrinkTypeService
|
class DrinkTypeService
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,6 @@ use App\Entity\DrinkType;
|
||||||
use App\Entity\InventoryRecord;
|
use App\Entity\InventoryRecord;
|
||||||
use App\Repository\DrinkTypeRepository;
|
use App\Repository\DrinkTypeRepository;
|
||||||
use App\Repository\InventoryRecordRepository;
|
use App\Repository\InventoryRecordRepository;
|
||||||
use App\Service\ConfigurationService;
|
|
||||||
use App\Enum\SystemSettingKey;
|
use App\Enum\SystemSettingKey;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use App\Settings;
|
||||||
use App\Middleware\ErrorHandlerMiddleware;
|
use App\Middleware\ErrorHandlerMiddleware;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use Slim\App;
|
use Slim\App;
|
||||||
|
@ -12,12 +13,12 @@ return (function (): App {
|
||||||
// Create container
|
// Create container
|
||||||
$container = (require __DIR__ . '/../config/container.php')();
|
$container = (require __DIR__ . '/../config/container.php')();
|
||||||
/** @var \App\Settings $settings */
|
/** @var \App\Settings $settings */
|
||||||
$settings = $container->get(\App\Settings::class);
|
$settings = $container->get(Settings::class);
|
||||||
|
|
||||||
// create cache dirs
|
// create cache dirs
|
||||||
foreach (['twig', 'doctrine/proxy'] as $dir) {
|
foreach (['twig', 'doctrine/proxy'] as $dir) {
|
||||||
if (!is_dir($settings->cacheDir . '/' . $dir)) {
|
if (!is_dir($settings->cacheDir . '/' . $dir)) {
|
||||||
mkdir($settings->cacheDir . '/' . $dir, 0777, true);
|
mkdir($settings->cacheDir . '/' . $dir, 0o777, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue