This commit is contained in:
2025-09-30 21:24:37 +02:00
parent d603fb452a
commit b7b9cebacb
258 changed files with 416 additions and 601 deletions

23
config/bootstrap.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__).'/vendor/autoload.php';
// Load cached env vars if the .env.local.php file exists
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
if (is_array($env = @include dirname(__DIR__).'/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) {
foreach ($env as $k => $v) {
$_ENV[$k] = $_ENV[$k] ?? (isset($_SERVER[$k]) && 0 !== strpos($k, 'HTTP_') ? $_SERVER[$k] : $v);
}
} elseif (!class_exists(Dotenv::class)) {
throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
} else {
// load all the .env files
(new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env');
}
$_SERVER += $_ENV;
$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev';
$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV'];
$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0';

24
config/bundles.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
FOS\RestBundle\FOSRestBundle::class => ['all' => true],
Nelmio\ApiDocBundle\NelmioApiDocBundle::class => ['all' => true],
FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true],
Tetranz\Select2EntityBundle\TetranzSelect2EntityBundle::class => ['all' => true],
Oneup\UploaderBundle\OneupUploaderBundle::class => ['all' => true],
Knp\Bundle\SnappyBundle\KnpSnappyBundle::class => ['all' => true],
Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
Sentry\SentryBundle\SentryBundle::class => ['all' => true],
];

View File

@@ -0,0 +1,3 @@
framework:
assets:
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'

View File

@@ -0,0 +1,19 @@
framework:
cache:
# Unique name of your app: used to compute stable namespaces for cache keys.
#prefix_seed: your_vendor_name/app_name
# The "app" cache stores to the filesystem by default.
# The data in this cache should persist between deploys.
# Other options include:
# Redis
#app: cache.adapter.redis
#default_redis_provider: redis://localhost
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
#app: cache.adapter.apcu
# Namespaced pools use the above "app" backend by default
#pools:
#my.dedicated.cache: null

View File

@@ -0,0 +1,4 @@
debug:
# Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
# See the "server:dump" command to start a new server.
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"

View File

@@ -0,0 +1,16 @@
services:
EasyCorp\EasyLog\EasyLogHandler:
public: false
arguments: ['%kernel.logs_dir%/%kernel.environment%.log']
#// FIXME: How to add this configuration automatically without messing up with the monolog configuration?
#monolog:
# handlers:
# buffered:
# type: buffer
# handler: easylog
# channels: ['!event']
# level: debug
# easylog:
# type: service
# id: EasyCorp\EasyLog\EasyLogHandler

View File

@@ -0,0 +1,19 @@
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]

View File

@@ -0,0 +1,4 @@
# See https://symfony.com/doc/current/email/dev_environment.html
swiftmailer:
# send all emails to a specific address
#delivery_addresses: ['me@example.com']

View File

@@ -0,0 +1,6 @@
web_profiler:
toolbar: true
intercept_redirects: false
framework:
profiler: { only_exceptions: false }

View File

@@ -0,0 +1,21 @@
doctrine:
dbal:
dbname: '%env(resolve:DATABASE_NAME)%'
user: '%env(resolve:DATABASE_USER)%'
password: '%env(resolve:DATABASE_PASSWORD)%'
host: '%env(resolve:DATABASE_HOST)%'
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '5.7'
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App

View File

@@ -0,0 +1,5 @@
doctrine_migrations:
dir_name: '%kernel.project_dir%/src/Migrations'
# namespace is arbitrary but should be different from App\Migrations
# as migrations classes should NOT be autoloaded
namespace: DoctrineMigrations

View File

@@ -0,0 +1,9 @@
# Read the documentation: https://symfony.com/doc/current/bundles/FOSCKEditorBundle/index.html
twig:
form_themes:
- '@FOSCKEditor/Form/ckeditor_widget.html.twig'
fos_ck_editor:
base_path: "build/ckeditor"
js_path: "build/ckeditor/ckeditor.js"

View File

@@ -0,0 +1,11 @@
# Read the documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/index.html
fos_rest:
param_fetcher_listener: true
body_listener: true
format_listener:
enabled: true
rules:
- { path: '/rest', priorities: ['json', 'xml'], fallback_format: 'html' }
- { path: '/', fallback_format: 'html' }

View File

@@ -0,0 +1,19 @@
framework:
secret: '%env(APP_SECRET)%'
#csrf_protection: true
#http_method_override: true
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
session:
handler_id: null
cookie_secure: auto
cookie_samesite: lax
#esi: true
#fragments: true
php_errors:
log: true
validation: { enable_annotations: true }

View File

@@ -0,0 +1,6 @@
# config/packages/framework.yaml
framework:
http_client:
default_options:
headers:
DOLAPIKEY: '%env(DOLIBARR_API_KEY)%'

View File

@@ -0,0 +1,10 @@
knp_snappy:
temporary_folder: "%kernel.cache_dir%/snappy"
pdf:
enabled: true
binary: '/var/www/html/schedule/scripts/wkhtmltopdf/wkhtmltopdf'
options: []
image:
enabled: true
binary: '/var/www/html/schedule/scripts/wkhtmltopdf/wkhtmltoimage'
options: []

View File

@@ -0,0 +1,3 @@
framework:
mailer:
dsn: '%env(MAILER_DSN)%'

View File

@@ -0,0 +1,9 @@
nelmio_api_doc:
documentation:
info:
title: '%appName%'
description:
version: 1.0.0
areas: # to filter documented areas
path_patterns:
- /rest # Accepts routes under /rest except /rest/doc

View File

@@ -0,0 +1,4 @@
oneup_uploader:
mappings:
avatar:
frontend: dropzone

View File

@@ -0,0 +1,6 @@
# Read the documentation: https://github.com/1up-lab/OneupUploaderBundle/blob/master/Resources/doc/index.md
oneup_uploader:
mappings:
# This is a mapping example, remove it and create your own mappings.
gallery:
frontend: dropzone # or any uploader you use in the frontend

View File

@@ -0,0 +1,20 @@
doctrine:
orm:
auto_generate_proxy_classes: false
metadata_cache_driver:
type: pool
pool: doctrine.system_cache_pool
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool
result_cache_driver:
type: pool
pool: doctrine.result_cache_pool
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system

View File

@@ -0,0 +1,24 @@
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
deprecation_filter:
type: filter
handler: deprecation
max_level: info
channels: ["php"]

View File

@@ -0,0 +1,3 @@
framework:
router:
strict_requirements: null

View File

@@ -0,0 +1,4 @@
#webpack_encore:
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
# Available in version 1.2
#cache: true

View File

@@ -0,0 +1,3 @@
framework:
router:
utf8: true

View File

@@ -0,0 +1,54 @@
security:
encoders:
App\Entity\User:
id: app.password.encoder
role_hierarchy:
ROLE_USER_ACCUEIL:
ROLE_USER_GUICHET:
ROLE_GESTION:
ROLE_ADMIN:
ROLE_SUPER_ADMIN:
- ROLE_ADMIN
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: ^/
anonymous: true
provider: main
form_login:
login_path: app_login
check_path: app_login
default_target_path: app_logincheck
use_referer: true
csrf_parameter: _csrf_security_token
csrf_token_id: a_private_string
logout:
invalidate_session: true
path: app_logout
target: app_home
providers:
main:
entity:
class: App\Entity\User
property: username
# ROLE_ADMIN = accède à tout
# ROLE_VALIDATOR = accède aux validations de planning
# ROLE_MASTER = accède à la gestion de client / projet / commande / tache
# ROLE_USER = accède
# ROLE_VISITOR = accède à rien
access_control:
- { path: ^/user, roles: [ROLE_ADMIN, ROLE_MASTER, ROLE_VALIDATOR, ROLE_USER] }
- { path: ^/master, roles: [ROLE_ADMIN, ROLE_MASTER] }
- { path: ^/validator, roles: [ROLE_ADMIN, ROLE_VALIDATOR] }
- { path: ^/admin, roles: [ROLE_ADMIN] }

View File

@@ -0,0 +1,3 @@
sensio_framework_extra:
router:
annotations: false

View File

@@ -0,0 +1,2 @@
sentry:
dsn: '%env(SENTRY_DSN)%'

View File

@@ -0,0 +1,5 @@
swiftmailer:
url: '%env(MAILER_URL)%'
spool:
type: file
path: '%kernel.project_dir%/var/spoolmail'

View File

@@ -0,0 +1,4 @@
framework:
test: true
session:
storage_id: session.storage.mock_file

View File

@@ -0,0 +1,12 @@
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
channels: ["!event"]
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug

View File

@@ -0,0 +1,5 @@
swiftmailer:
url: '%env(MAILER_URL)%'
spool:
type: file
path: '%kernel.project_dir%/var/spoolmail'

View File

@@ -0,0 +1,2 @@
twig:
strict_variables: true

View File

@@ -0,0 +1,3 @@
framework:
validation:
not_compromised_password: false

View File

@@ -0,0 +1,6 @@
web_profiler:
toolbar: false
intercept_redirects: false
framework:
profiler: { collect: false }

View File

@@ -0,0 +1,2 @@
#webpack_encore:
# strict_mode: false

View File

@@ -0,0 +1,6 @@
framework:
default_locale: en
translator:
default_path: '%kernel.project_dir%/translations'
fallbacks:
- en

15
config/packages/twig.yaml Normal file
View File

@@ -0,0 +1,15 @@
twig:
default_path: '%kernel.project_dir%/templates'
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
exception_controller: null
form_themes:
- 'Form/fields.html.twig'
- '@TetranzSelect2Entity/Form/fields.html.twig'
globals:
appAlias: '%appAlias%'
appAuth: '%appAuth%'
appName: '%appName%'
appCron: '%appCron%'
doliActive: '%doliActive%'
doliUri: '%doliUri%'

View File

@@ -0,0 +1,8 @@
framework:
validation:
email_validation_mode: html5
# Enables validator auto-mapping support.
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
#auto_mapping:
# App\Entity\: []

View File

@@ -0,0 +1,25 @@
webpack_encore:
# The path where Encore is building the assets - i.e. Encore.setOutputPath()
output_path: '%kernel.project_dir%/public/build'
# If multiple builds are defined (as shown below), you can disable the default build:
# output_path: false
# if using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')
# crossorigin: 'anonymous'
# preload all rendered script and link tags automatically via the http2 Link header
# preload: true
# Throw an exception if the entrypoints.json file is missing or an entry is missing from the data
# strict_mode: false
# if you have multiple builds:
# builds:
# pass "frontend" as the 3rg arg to the Twig functions
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}
# frontend: '%kernel.project_dir%/public/frontend/build'
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
# Put in config/packages/prod/webpack_encore.yaml
# cache: true

520
config/routes.yaml Normal file
View File

@@ -0,0 +1,520 @@
#== Home ========================================================================================================
app_home:
path: /
defaults: { _controller: App\Controller\HomeController:home }
app_home_selectmonth:
path: /customer/selectmonth
defaults: { _controller: App\Controller\HomeController:selectmonth }
app_home_selectuser:
path: /user/selectuser
defaults: { _controller: App\Controller\HomeController:selectuser }
app_home_selectproject:
path: /user/selectproject
defaults: { _controller: App\Controller\HomeController:selectproject }
app_home_selectservice:
path: /user/selectservice
defaults: { _controller: App\Controller\HomeController:selectservice }
app_home_selectdomaine:
path: /user/selectdomaine
defaults: { _controller: App\Controller\HomeController:selectdomaine }
#== Security ====================================================================================================
app_login:
path: /login
defaults: { _controller: App\Controller\SecurityController:login }
app_logincheck:
path: /logincheck
defaults: { _controller: App\Controller\SecurityController:logincheck }
app_logout:
path: /logout
defaults: { _controller: App\Controller\SecurityController:logout }
app_logincas:
path: /logincas
defaults: { _controller: App\Controller\SecurityController:logincas }
app_logoutcas:
path: /logoutcas
defaults: { _controller: App\Controller\SecurityController:logoutcas }
#== Crop =========================================================================================================
app_crop01:
path: /user/crop01
defaults: { _controller: App\Controller\CropController:crop01 }
app_crop02:
path: /user/crop02
defaults: { _controller: App\Controller\CropController:crop02 }
oneup_uploader:
resource: .
type: uploader
#== Cron =================================================================================================================
app_cron:
path: /admin/cron
defaults: { _controller: App\Controller\CronController:list }
app_cron_ajax_list:
path: /admin/cron/ajax/list
defaults: { _controller: App\Controller\CronController:ajaxlist }
app_cron_update:
path: /admin/cron/update/{id}
defaults: { _controller: App\Controller\CronController:update }
app_cron_exec:
path: /admin/cron/exec/{id}
defaults: { _controller: App\Controller\CronController:exec }
app_cron_log:
path: /admin/cron/log
defaults: { _controller: App\Controller\CronController:log }
app_cron_getlog:
path: /admin/cron/getlog/{id}
defaults: { _controller: App\Controller\CronController:getlog }
#== User ========================================================================================================
app_user:
path: /admin/user
defaults: { _controller: App\Controller\UserController:list }
app_user_submit:
path: /admin/user/submit
defaults: { _controller: App\Controller\UserController:submit }
app_user_update:
path: /admin/user/update/{id}
defaults: { _controller: App\Controller\UserController:update }
app_user_delete:
path: /admin/user/delete/{id}
defaults: { _controller: App\Controller\UserController:delete }
app_user_profil:
path: /user/profil
defaults: { _controller: App\Controller\UserController:profil }
#== Service =====================================================================================================
app_service:
path: /admin/service
defaults: { _controller: App\Controller\ServiceController:list }
app_service_submit:
path: /admin/service/submit
defaults: { _controller: App\Controller\ServiceController:submit }
app_service_update:
path: /admin/service/update/{id}
defaults: { _controller: App\Controller\ServiceController:update }
app_service_delete:
path: /admin/service/delete/{id}
defaults: { _controller: App\Controller\ServiceController:delete }
#== Domaine =====================================================================================================
app_domaine:
path: /admin/domaine
defaults: { _controller: App\Controller\DomaineController:list }
app_domaine_submit:
path: /admin/domaine/submit
defaults: { _controller: App\Controller\DomaineController:submit }
app_domaine_update:
path: /admin/domaine/update/{id}
defaults: { _controller: App\Controller\DomaineController:update }
app_domaine_delete:
path: /admin/domaine/delete/{id}
defaults: { _controller: App\Controller\DomaineController:delete }
#== Nature =====================================================================================================
app_nature:
path: /admin/nature
defaults: { _controller: App\Controller\NatureController:list }
app_nature_submit:
path: /admin/nature/submit
defaults: { _controller: App\Controller\NatureController:submit }
app_nature_update:
path: /admin/nature/update/{id}
defaults: { _controller: App\Controller\NatureController:update }
app_nature_delete:
path: /admin/nature/delete/{id}
defaults: { _controller: App\Controller\NatureController:delete }
#== Customer ===================================================================================================
app_customer:
path: /master/customer
defaults: { _controller: App\Controller\CustomerController:list }
app_customer_submit:
path: /master/customer/submit
defaults: { _controller: App\Controller\CustomerController:submit }
app_customer_update:
path: /master/customer/update/{id}
defaults: { _controller: App\Controller\CustomerController:update }
app_customer_delete:
path: /master/customer/delete/{id}
defaults: { _controller: App\Controller\CustomerController:delete }
#== Job =====================================================================================================
app_job:
path: /admin/job
defaults: { _controller: App\Controller\JobController:list }
app_job_submit:
path: /admin/job/submit
defaults: { _controller: App\Controller\JobController:submit }
app_job_update:
path: /admin/job/update/{id}
defaults: { _controller: App\Controller\JobController:update }
app_job_delete:
path: /admin/job/delete/{id}
defaults: { _controller: App\Controller\JobController:delete }
app_job_select:
path: /user/job/select
defaults: { _controller: App\Controller\JobController:select }
#== Project ====================================================================================================
app_project:
path: /master/project
defaults: { _controller: App\Controller\ProjectController:list }
app_project_submit:
path: /master/project/submit
defaults: { _controller: App\Controller\ProjectController:submit }
app_project_update:
path: /master/project/update/{id}
defaults: { _controller: App\Controller\ProjectController:update }
app_project_delete:
path: /master/project/delete/{id}
defaults: { _controller: App\Controller\ProjectController:delete }
app_project_activeproject:
path: /master/project/activeproject
defaults: { _controller: App\Controller\ProjectController:activeproject }
app_project_viewservice:
path: /master/project/viewservice
defaults: { _controller: App\Controller\ProjectController:viewservice }
app_project_select:
path: /master/project/select
defaults: { _controller: App\Controller\ProjectController:select }
app_project_users_add:
path: /master/project/users/add
defaults: { _controller: App\Controller\ProjectController:usersadd }
app_project_users_del:
path: /master/project/users/del
defaults: { _controller: App\Controller\ProjectController:usersdel }
app_project_users:
path: /master/project/users/{id}
defaults: { _controller: App\Controller\ProjectController:users }
#== Offer ====================================================================================================
app_offer:
path: /master/offer
defaults: { _controller: App\Controller\OfferController:list }
app_offer_submit:
path: /master/offer/submit
defaults: { _controller: App\Controller\OfferController:submit }
app_offer_update:
path: /master/offer/update/{id}
defaults: { _controller: App\Controller\OfferController:update }
app_offer_delete:
path: /master/offer/delete/{id}
defaults: { _controller: App\Controller\OfferController:delete }
app_offer_activeproject:
path: /master/offer/activeproject
defaults: { _controller: App\Controller\OfferController:activeproject }
app_offer_activeoffer:
path: /master/offer/activeoffer
defaults: { _controller: App\Controller\OfferController:activeoffer }
app_offer_viewservice:
path: /master/offer/viewservice
defaults: { _controller: App\Controller\OfferController:viewservice }
app_offer_dolibarr:
path: /master/offer/dolibarr
defaults: { _controller: App\Controller\OfferController:dolibarr }
app_offer_getdolibarr:
path: /master/offer/getdolibarr
defaults: { _controller: App\Controller\OfferController:getdolibarr }
#== Task ====================================================================================================
app_task:
path: /master/task
defaults: { _controller: App\Controller\TaskController:list }
app_task_submit:
path: /master/task/submit
defaults: { _controller: App\Controller\TaskController:submit }
app_task_update:
path: /master/task/update/{id}
defaults: { _controller: App\Controller\TaskController:update }
app_task_delete:
path: /master/task/delete/{id}
defaults: { _controller: App\Controller\TaskController:delete }
app_task_activeproject:
path: /master/task/activeproject
defaults: { _controller: App\Controller\TaskController:activeproject }
app_task_activetask:
path: /master/task/activetask
defaults: { _controller: App\Controller\TaskController:activetask }
app_task_viewservice:
path: /master/task/viewservice
defaults: { _controller: App\Controller\TaskController:viewservice }
#== Event ====================================================================================================
app_event:
path: /user/event
defaults: { _controller: App\Controller\EventController:list }
app_event_load:
path: /user/event/load/{iduser}
defaults: { _controller: App\Controller\EventController:load }
app_event_submit:
path: /user/event/submit
defaults: { _controller: App\Controller\EventController:submit }
app_event_update:
path: /user/event/update
defaults: { _controller: App\Controller\EventController:update }
app_event_delete:
path: /user/event/delete
defaults: { _controller: App\Controller\EventController:delete }
#== Report ====================================================================================================
app_synthese:
path: /user/synthese
defaults: { _controller: App\Controller\ReportController:synthese }
app_planning:
path: /user/planning
defaults: { _controller: App\Controller\ReportController:planning }
app_report:
path: /user/report
defaults: { _controller: App\Controller\ReportController:report }
app_holiday:
path: /user/holiday
defaults: { _controller: App\Controller\ReportController:holiday }
app_holiday_activeholiday:
path: /user/holiday/activeholiday
defaults: { _controller: App\Controller\ReportController:activeholiday }
#== Breakday =================================================================================================
app_breakday:
path: /admin/breakday
defaults: { _controller: App\Controller\BreakdayController:list }
app_breakday_submit:
path: /admin/breakday/submit
defaults: { _controller: App\Controller\BreakdayController:submit }
app_breakday_update:
path: /admin/breakday/update/{id}
defaults: { _controller: App\Controller\BreakdayController:update }
app_breakday_delete:
path: /admin/breakday/delete/{id}
defaults: { _controller: App\Controller\BreakdayController:delete }
#== Validation ====================================================================================================
app_validation:
path: /validator/validation
defaults: { _controller: App\Controller\ValidationController:validation }
app_validation_validate:
path: /validator/validate
defaults: { _controller: App\Controller\ValidationController:validate }
app_validation_devalidate:
path: /validator/devalidate
defaults: { _controller: App\Controller\ValidationController:devalidate }
#== Validationholiday ====================================================================================================
app_validationholiday:
path: /validator/validationholiday
defaults: { _controller: App\Controller\ValidationController:validationholiday }
app_validationholiday_validate:
path: /validator/validateholiday
defaults: { _controller: App\Controller\ValidationController:validateholiday }
app_validationholiday_devalidate:
path: /validator/devalidateholiday
defaults: { _controller: App\Controller\ValidationController:devalidateholiday }
app_validationholiday_activeholiday:
path: /validator/validateholiday/activeholiday
defaults: { _controller: App\Controller\ValidationController:activeholiday }
#== Validationtimer ====================================================================================================
app_validationtimer:
path: /validator/validationtimer
defaults: { _controller: App\Controller\ValidationController:validationtimer }
app_validationtimer_validate:
path: /validator/validatetimer
defaults: { _controller: App\Controller\ValidationController:validatetimer }
app_validationtimer_devalidate:
path: /validator/devalidatetimer
defaults: { _controller: App\Controller\ValidationController:devalidatetimer }
app_validationtimer_activetimer:
path: /validator/validateholiday/activetimer
defaults: { _controller: App\Controller\ValidationController:activetimer }
#== Timer ====================================================================================================
app_timer:
path: /timer
defaults: { _controller: App\Controller\TimerController:list }
app_timer_view:
path: /timer/event
defaults: { _controller: App\Controller\TimerController:view }
app_timer_load:
path: /timer/event/load
defaults: { _controller: App\Controller\TimerController:load }
app_timer_submit:
path: /timer/submit
defaults: { _controller: App\Controller\TimerController:submit }
app_timer_create:
path: /timer/create
defaults: { _controller: App\Controller\TimerController:create }
app_timer_update:
path: /timer/update/{id}
defaults: { _controller: App\Controller\TimerController:update }
app_timer_delete:
path: /timer/delete/{id}
defaults: { _controller: App\Controller\TimerController:delete }
#== Year =====================================================================================================
app_year:
path: /admin/year
defaults: { _controller: App\Controller\YearController:list }
app_year_submit:
path: /admin/year/submit
defaults: { _controller: App\Controller\YearController:submit }
app_year_update:
path: /admin/year/update/{id}
defaults: { _controller: App\Controller\YearController:update }
app_year_delete:
path: /admin/year/delete/{id}
defaults: { _controller: App\Controller\YearController:delete }
#== Budget =====================================================================================================
app_budget_last:
path: /master/budget
defaults: { _controller: App\Controller\BudgetController:list }
app_budget:
path: /master/budget/{id}
defaults: { _controller: App\Controller\BudgetController:list }
app_budget_update:
path: /master/budget/update/{type}/{id}/{year}
defaults: { _controller: App\Controller\BudgetController:update }
#== Customer ======================================================================================================
app_customer_home:
path: /customer
defaults: { _controller: App\Controller\HomeController:customer }
app_customer_report:
path: /customer/report/{key}
defaults: { _controller: App\Controller\ReportController:report, access: 'customer' }
app_customer_planning:
path: /customer/planning/{key}
defaults: { _controller: App\Controller\ReportController:planning, access: 'customer' }
#== Export ======================================================================================================
app_export_view:
path: /export
defaults: { _controller: App\Controller\ExportController:view }
app_export_penalty_additional:
path: /export/export_penalty_additional
defaults: { _controller: App\Controller\ExportController:export_penalty_additional }
export_project_weekly:
path: /export/export_project_weekly
defaults: { _controller: App\Controller\ExportController:export_project_weekly }
export_full_worked_days:
path: /export/export_full_worked_days
defaults: { _controller: App\Controller\ExportController:export_full_worked_days }
export_offers:
path: /export/export_offers
defaults: { _controller: App\Controller\ExportController:export_offers }
export_month_charged_days:
path: /export/export_month_charged_days
defaults: { _controller: App\Controller\ExportController:export_month_charged_days }
#== Export ======================================================================================================
app_stat_view:
path: /user/stat
defaults: { _controller: App\Controller\StatController:view }
#== API ===========================================================================================================
app_api:
path: /api/{key}
defaults: { _controller: App\Controller\ApiController:api }

View File

@@ -0,0 +1,7 @@
controllers:
resource: ../../src/Controller/
type: annotation
kernel:
resource: ../../src/Kernel.php
type: annotation

View File

@@ -0,0 +1,3 @@
_errors:
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
prefix: /_error

View File

@@ -0,0 +1,7 @@
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler

View File

@@ -0,0 +1,4 @@
app_swagger_ui:
path: /rest
methods: GET
defaults: { _controller: nelmio_api_doc.controller.swagger_ui }

View File

@@ -0,0 +1,3 @@
oneup_uploader:
resource: .
type: uploader

86
config/services.yaml Normal file
View File

@@ -0,0 +1,86 @@
# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
appAlias: '%env(resolve:APP_ALIAS)%'
appAuth: '%env(resolve:APP_AUTH)%'
appSecret: '%env(resolve:APP_SECRET)%'
appName: '%env(resolve:APP_NAME)%'
appEnv: '%env(resolve:APP_ENV)%'
appCron: '%env(resolve:APP_CRON)%'
appMailmethod: '%env(resolve:MAILER_METHOD)%'
appMailnoreply: '%env(resolve:MAILER_NOREPLY)%'
appMailnotif: '%env(resolve:MAILER_DEFAULT_NOTIF)%'
casHost: '%env(resolve:CAS_HOST)%'
casPort: '%env(resolve:CAS_PORT)%'
casPath: '%env(resolve:CAS_PATH)%'
casUsername: '%env(resolve:CAS_USERNAME)%'
casEmail: '%env(resolve:CAS_EMAIL)%'
casLastname: '%env(resolve:CAS_LASTNAME)%'
casFirstname: '%env(resolve:CAS_FIRSTNAME)%'
officeHourStart: '%env(resolve:OFFICE_HOUR_START)%'
officeHourEnd: '%env(resolve:OFFICE_HOUR_END)%'
doliActive: '%env(resolve:DOLIBARR_ACTIVE)%'
doliApiKey: '%env(resolve:DOLIBARR_API_KEY)%'
doliUri: '%env(resolve:DOLIBARR_URI)%'
databaseName: '%env(resolve:DATABASE_NAME)%'
databaseUser: '%env(resolve:DATABASE_USER)%'
databasePassword: '%env(resolve:DATABASE_PASSWORD)%'
databaseHost: '%env(resolve:DATABASE_HOST)%'
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../src/*'
exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'
# controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class
App\Controller\:
resource: '../src/Controller'
tags: ['controller.service_arguments']
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
app.password.encoder:
public: true
class: App\Service\passwordEncoder
app.ics.service:
public: true
class: App\Service\icsService
app.upload.listener:
public: true
class: App\Service\uploadListener
arguments: ["@doctrine.orm.entity_manager","@security.token_storage","@session","@service_container"]
tags:
- { name: kernel.event_listener, event: oneup_uploader.post_persist, method: onUpload }
app.session.listener:
public: true
class: App\Service\sessionListener
arguments: ['@service_container','@doctrine.orm.entity_manager',"@security.token_storage"]
tags:
- { name: kernel.event_listener, event: kernel.request, method: onDomainParse }
app.sendmail.transport:
class: Swift_SendmailTransport
public: true
arguments: ['/usr/sbin/sendmail -t']
app.mail.service:
public: true
class: App\Service\mailService
arguments: ["@mailer", "@twig"]
App\Controller\RestController:
public: true