commit 5e2a7fe255cda4646ad213a228c93ffdda387465 Author: Markus Scherg Date: Wed Aug 7 11:17:23 2024 +0200 original codebase from it_itt11h_23 diff --git a/README.md b/README.md new file mode 100644 index 0000000..285b7cc --- /dev/null +++ b/README.md @@ -0,0 +1,71 @@ +# Schulanmeldung + +## Install project + +1. Projekt klonen https://git-scm.com: `git clone https://github.com/SimonHaas/schulanmeldung.git` +2. `cd schulanmeldung` +3. PHP-Fremdbibliotheken installieren mit Hilfe von https://getcomposer.org `composer install` +4. .env.dist nach .env kopieren: `cp .env.dist .env` +3. .env Datei bearbeiten: + * APP_ENV=prod + * DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name + - Die Datenbank muss zu diesem Zeitpunkt noch nicht angelegt sein! + * EINTRITTSDATUM_ERSTE_HAELFTE=2019-09-10 + - Bei Anmeldungen vor diesem Datum wird das als Eintrittsdatum gespeichert, bei Anmeldungen danach das folgende: + * EINTRITTSDATUM_ZWEITE_HAELFTE=2020-09-11 + * ADMIN_EMAIL=admin@test.de + * ADMIN_PASSWORD=1234 + - Mit diesen Daten kann ein neuer Admin-Account erstellt werden. Einfach Schritt 8 ausführen und es wird ein neuer User in der Datenbank angelegt. Dann können diese zwei Variablen theoretischer Weise wieder gelöscht werden. + - Den Adminbereich erreicht man über `/admin`. +4. `php bin/console doctrine:database:create` + * Das legt die in der .env Datei konfigurierte Datenbank an. +5. `php bin/console migrate` + * Das führt die unter `src/Migrations` liegenden Datenbank-Migrationen aus um die Tabellen zu erstellen. +6. In der PHP-ini muss die Extension `intl` aktiviert sein um die richtigen Länder bei der Auswahl des Herkunftslandes anzeigen zu können. +6. Im Browser `/user`aufrufen. + * Das legt einen neuen Admin-Account mit den Zugangsdaten aus der .env Datei an. + + +## Datenmigration + +In den JSON-Export dürfen keine Kommentare sein. In der Ersten Zeile muss es gleich mit dem Inhalt losgehen. + +### Berufe +1. Tabelle `berufekennungen` im Format `JSON` exportieren. +2. Datei `berufekennungen.json` in das Root-Verzeichnis der Schulanmeldung legen. +3. `/migration/berufe` im Browser aufrufen + +### Berufe +1. Tabelle `betriebedaten` im Format `JSON` exportieren. +2. Datei `betriebedaten.json` in das Root-Verzeichnis der Schulanmeldung legen. +3. `/migration/betriebe` im Browser aufrufen + +### Schulen +1. Tabelle `herkunftsschulen` im Format `JSON` exportieren. +2. Datei `herkunftsschulen.json` in das Root-Verzeichnis der Schulanmeldung legen. +3. `/migration/schulen` im Browser aufrufen. + +## Apache virtual host config + +``` + + DocumentRoot "/public" + ServerName + DirectoryIndex index.php + /public"> + AllowOverride All + Allow from All + + + Options -MultiViews + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ index.php [QSA,L] + + + +``` +Es empfiehlt sich die Schulanmeldung unter einer Subdomain zu installieren. + + + diff --git a/bin/console b/bin/console new file mode 100644 index 0000000..5187d02 --- /dev/null +++ b/bin/console @@ -0,0 +1,39 @@ +#!/usr/bin/env php +load(__DIR__.'/../.env'); +} + +$input = new ArgvInput(); +$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true); +$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true); + +if ($debug) { + umask(0000); + + if (class_exists(Debug::class)) { + Debug::enable(); + } +} + +$kernel = new Kernel($env, $debug); +$application = new Application($kernel); +$application->run($input); diff --git a/bin/infophp.php b/bin/infophp.php new file mode 100644 index 0000000..c9f5eeb --- /dev/null +++ b/bin/infophp.php @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..3b582cf --- /dev/null +++ b/composer.json @@ -0,0 +1,90 @@ +{ + "type": "project", + "license": "proprietary", + "require": { + "php": ">=8.2", + "ext-ctype": "*", + "ext-iconv": "*", + "ext-json": "*", + "ext-xml": "*", + "doctrine/cache": "^2.2", + "doctrine/common": "^3.4", + "doctrine/doctrine-bundle": "^2.10.2", + "doctrine/doctrine-fixtures-bundle": "^3.4.4", + "doctrine/doctrine-migrations-bundle": "^3.2.4", + "doctrine/orm": "^2.16.2", + "dompdf/dompdf": "^2.0", + "phpmailer/phpmailer": "^6.9", + "phpoffice/phpspreadsheet": "^2.0", + "sensio/framework-extra-bundle": "^6.2.10", + "symfony/asset": "^6.3.0", + "symfony/cache": "^6.3.4", + "symfony/config": "^6.3.2", + "symfony/console": "^6.3.4", + "symfony/debug-bundle": "^6.3.2", + "symfony/dotenv": "^6.3.0", + "symfony/error-handler": "^6.3.2", + "symfony/form": "^6.3.2", + "symfony/framework-bundle": "^6.3.4", + "symfony/http-kernel": "^6.3.4", + "symfony/intl": "^7.0", + "symfony/mailer": "^6.3.0", + "symfony/maker-bundle": "^1.51.1", + "symfony/monolog-bundle": "^3.10", + "symfony/profiler-pack": "^1.0.6", + "symfony/requirements-checker": "^2.0", + "symfony/routing": "^6.3.3", + "symfony/security-bundle": "^6.3.4", + "symfony/translation": "^6.3.3", + "symfony/twig-bundle": "^6.3.0", + "symfony/validator": "^6.3.4", + "symfony/web-profiler-bundle": "^6.3.12", + "symfony/yaml": "^6.3.3", + "twig/extensions": "^1.5.4" + }, + "config": { + "preferred-install": { + "*": "dist" + }, + "sort-packages": true, + "allow-plugins": { + "symfony/flex": true + } + }, + "autoload": { + "psr-4": { + "App\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "App\\Tests\\": "tests/" + } + }, + "scripts": { + "auto-scripts": [ + "vendor/bin/requirements-checker php-script", + "symfony console cache:clear" + ], + "post-install-cmd": [ + "@auto-scripts" + ], + "post-update-cmd": [ + "@auto-scripts" + ] + }, + "replace": { + "paragonie/random_compat": "2.*", + "symfony/polyfill-ctype": "*", + "symfony/polyfill-iconv": "*", + "symfony/polyfill-php71": "*", + "symfony/polyfill-php70": "*", + "symfony/polyfill-php56": "*" + }, + "extra": { + "symfony": { + "allow-contrib": false, + "require": "6.3.*" + } + } +} diff --git a/config/bundles.php b/config/bundles.php new file mode 100644 index 0000000..ae7cdac --- /dev/null +++ b/config/bundles.php @@ -0,0 +1,16 @@ + ['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\TwigBundle\TwigBundle::class => ['all' => true], + Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], + Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true], + Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], + //Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true], + Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true], +]; diff --git a/config/packages/debug.yaml b/config/packages/debug.yaml new file mode 100644 index 0000000..ce519f3 --- /dev/null +++ b/config/packages/debug.yaml @@ -0,0 +1,5 @@ +when@dev: + 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)%" diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml new file mode 100644 index 0000000..4513d58 --- /dev/null +++ b/config/packages/doctrine.yaml @@ -0,0 +1,57 @@ +parameters: + # Adds a fallback DATABASE_URL if the env var is not set. + # This allows you to run cache:warmup even if your + # environment variables are not available yet. + # You should not need to change this value. + env(DATABASE_URL): '' + +doctrine: + dbal: + # configure these for your database server + driver: 'pdo_mysql' + server_version: '5.7' + charset: utf8mb4 + default_table_options: + charset: utf8mb4 + collate: utf8mb4_unicode_ci + + url: '%env(resolve:DATABASE_URL)%' + orm: + auto_generate_proxy_classes: '%kernel.debug%' + naming_strategy: doctrine.orm.naming_strategy.underscore + auto_mapping: true + mappings: + App: + is_bundle: false + type: attribute + dir: '%kernel.project_dir%/src/Entity' + prefix: 'App\Entity' + alias: App + +when@prod: + services: + doctrine.result_cache_provider: + class: Doctrine\Common\Cache\Psr6\DoctrineProvider + factory: ['Doctrine\Common\Cache\Psr6\DoctrineProvider', 'wrap'] + public: false + arguments: + - '@doctrine.result_cache_pool' + tags: + - { name: 'kernel.reset', method: 'reset' } + doctrine.system_cache_provider: + class: Doctrine\Common\Cache\Psr6\DoctrineProvider + factory: ['Doctrine\Common\Cache\Psr6\DoctrineProvider', 'wrap'] + public: false + arguments: + - '@doctrine.system_cache_pool' + tags: + - { name: 'kernel.reset', method: 'reset' } + + framework: + cache: + pools: + doctrine.result_cache_pool: + adapter: cache.app + doctrine.system_cache_pool: + adapter: cache.system + diff --git a/config/packages/doctrine_migrations.yaml b/config/packages/doctrine_migrations.yaml new file mode 100644 index 0000000..49c3517 --- /dev/null +++ b/config/packages/doctrine_migrations.yaml @@ -0,0 +1,3 @@ +doctrine_migrations: + migrations_paths: + 'DoctrineMigrations': '%kernel.project_dir%/src/Migrations' \ No newline at end of file diff --git a/config/packages/easy_log_handler.yaml b/config/packages/easy_log_handler.yaml new file mode 100644 index 0000000..eed08e8 --- /dev/null +++ b/config/packages/easy_log_handler.yaml @@ -0,0 +1,17 @@ +when@dev: + 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 diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml new file mode 100644 index 0000000..3ab6362 --- /dev/null +++ b/config/packages/framework.yaml @@ -0,0 +1,36 @@ +framework: + secret: '%env(APP_SECRET)%' + #default_locale: en + #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: ~ + + #esi: true + #fragments: true + php_errors: + log: true + + cache: + # Put the unique name of your app here: the prefix seed + # is used to compute stable namespaces for cache keys. + #prefix_seed: your_vendor_name/app_name + + # The app cache caches to the filesystem by default. + # 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 + +when@test: + framework: + test: true + session: + storage_id: session.storage.mock_file diff --git a/config/packages/mailer.yaml b/config/packages/mailer.yaml new file mode 100644 index 0000000..56a650d --- /dev/null +++ b/config/packages/mailer.yaml @@ -0,0 +1,3 @@ +framework: + mailer: + dsn: '%env(MAILER_DSN)%' diff --git a/config/packages/monolog.yaml b/config/packages/monolog.yaml new file mode 100644 index 0000000..a92474d --- /dev/null +++ b/config/packages/monolog.yaml @@ -0,0 +1,56 @@ +when@prod: + monolog: + handlers: + main: + type: fingers_crossed + action_level: error + handler: nested + excluded_404s: + # regex: exclude all 404 errors from the logs + - ^/ + 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" ] + +when@dev: + 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" ] + +when@test: + monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + channels: [ "!event" ] diff --git a/config/packages/routing.yaml b/config/packages/routing.yaml new file mode 100644 index 0000000..9d0e6de --- /dev/null +++ b/config/packages/routing.yaml @@ -0,0 +1,4 @@ +when@test: + framework: + router: + strict_requirements: true diff --git a/config/packages/security.yaml b/config/packages/security.yaml new file mode 100644 index 0000000..fdac966 --- /dev/null +++ b/config/packages/security.yaml @@ -0,0 +1,58 @@ +security: + password-hashers: + App\Entity\AdminUser: auto + Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: + algorithm: 'auto' + cost: 15 + + # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers + providers: + # used to reload user from session & other features (e.g. switch_user) + app_user_provider: + entity: + class: App\Entity\AdminUser + property: email + firewalls: + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + main: + lazy: true + provider: app_user_provider + #anonymous: true + #guard: + #custom_authenticators: + # - App\Security\AdminAuthenticator + # entry_point: App\Security\AdminAuthenticator + form-login: + login-path: app_login + check-path: app_login + enable-csrf: true + logout: + path: app_logout + # where to redirect after logout + # target: app_any_route + + custom_authenticator: App\Security\AdminAuthenticator + entry-point: App\Security\AdminAuthenticator + + remember_me: + secret: '%kernel.secret%' + lifetime: 604800 + path: / + always_remember_me: true + + + # activate different ways to authenticate + + # http_basic: true + # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate + + # form_login: true + # https://symfony.com/doc/current/security/form_login_setup.html + + # Easy way to control access for large sections of your site + # Note: Only the *first* access control that matches will be used + access_control: + - { path: ^/admin, roles: ROLE_ADMIN } + - { path: ^/eintrittsdatum, roles: ROLE_ADMIN } diff --git a/config/packages/sensio_framework_extra.yaml b/config/packages/sensio_framework_extra.yaml new file mode 100644 index 0000000..1821ccc --- /dev/null +++ b/config/packages/sensio_framework_extra.yaml @@ -0,0 +1,3 @@ +sensio_framework_extra: + router: + annotations: false diff --git a/config/packages/translation.yaml b/config/packages/translation.yaml new file mode 100644 index 0000000..e6b1cd6 --- /dev/null +++ b/config/packages/translation.yaml @@ -0,0 +1,6 @@ +framework: + default_locale: '%locale%' + translator: + default_path: '%kernel.project_dir%/translations' + fallbacks: + - '%locale%' diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml new file mode 100644 index 0000000..d1582a2 --- /dev/null +++ b/config/packages/twig.yaml @@ -0,0 +1,4 @@ +twig: + default_path: '%kernel.project_dir%/templates' + debug: '%kernel.debug%' + strict_variables: '%kernel.debug%' diff --git a/config/packages/twig_extensions.yaml b/config/packages/twig_extensions.yaml new file mode 100644 index 0000000..0881cc9 --- /dev/null +++ b/config/packages/twig_extensions.yaml @@ -0,0 +1,11 @@ +services: + _defaults: + public: false + autowire: true + autoconfigure: true + + # Uncomment any lines below to activate that Twig extension + #Twig\Extensions\ArrayExtension: ~ + #Twig\Extensions\DateExtension: ~ + #Twig\Extensions\IntlExtension: ~ + #Twig\Extensions\TextExtension: ~ diff --git a/config/packages/validator.yaml b/config/packages/validator.yaml new file mode 100644 index 0000000..a695e1a --- /dev/null +++ b/config/packages/validator.yaml @@ -0,0 +1,3 @@ +framework: + validation: + email_validation_mode: html5 diff --git a/config/packages/web_profiler.yaml b/config/packages/web_profiler.yaml new file mode 100644 index 0000000..3d5e117 --- /dev/null +++ b/config/packages/web_profiler.yaml @@ -0,0 +1,15 @@ +when@dev: + web_profiler: + toolbar: true + intercept_redirects: false + + framework: + profiler: { only_exceptions: false } + +when@test: + web_profiler: + toolbar: false + intercept_redirects: false + + framework: + profiler: { collect: false } diff --git a/config/routes/attributes.yaml b/config/routes/attributes.yaml new file mode 100644 index 0000000..24051c3 --- /dev/null +++ b/config/routes/attributes.yaml @@ -0,0 +1,9 @@ +controllers: + resource: + path: ../../src/Controller/ + namespace: App\Controller + type: attribute + +kernel: + resource: App\Kernel + type: attribute diff --git a/config/routes/dev/web_profiler.yaml b/config/routes/dev/web_profiler.yaml new file mode 100644 index 0000000..c82beff --- /dev/null +++ b/config/routes/dev/web_profiler.yaml @@ -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 diff --git a/config/services.yaml b/config/services.yaml new file mode 100644 index 0000000..0f5974c --- /dev/null +++ b/config/services.yaml @@ -0,0 +1,30 @@ +# 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: + locale: 'de' + dir.downloads: '%kernel.project_dir%/download' + +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. + public: false # Allows optimizing the container by removing unused services; this also means + # fetching services directly from the container via $container->get() won't work. + # The best practice is to be explicit about your dependencies anyway. + + # 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}' + + # add more service definitions when explicit configuration is needed + # please note that last definitions always *replace* previous ones + twig.extension.intl: + class: Twig_Extensions_Extension_Intl + tags: + - { name: twig.extension } diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf new file mode 100644 index 0000000..e650838 --- /dev/null +++ b/docker/nginx/nginx.conf @@ -0,0 +1,26 @@ +server { + listen 80 default; + + client_max_body_size 108M; + + access_log /var/log/nginx/application.access.log; + + + root /application/public; + index index.php; + + if (!-e $request_filename) { + rewrite ^.*$ /index.php last; + } + + location ~ \.php$ { + fastcgi_pass php-fpm:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log"; + fastcgi_buffers 16 16k; + fastcgi_buffer_size 32k; + include fastcgi_params; + } + +} diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile new file mode 100644 index 0000000..20e1307 --- /dev/null +++ b/docker/php/Dockerfile @@ -0,0 +1,22 @@ +FROM php:8.2-fpm + +RUN apt-get update && apt-get install -y zlib1g-dev libicu-dev g++ +RUN docker-php-ext-configure intl +RUN docker-php-ext-install intl +RUN docker-php-ext-install pdo pdo_mysql + +RUN apt-get install -y \ + libzip-dev \ + zip \ + && docker-php-ext-configure zip --with-libzip \ + && docker-php-ext-install zip + +RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ + && php -r "if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \ + && php composer-setup.php --filename=composer \ + && php -r "unlink('composer-setup.php');" \ + && mv composer /usr/local/bin/composer + +CMD ["php-fpm"] + +EXPOSE 9000 \ No newline at end of file diff --git a/docker_setup_composer/.env.dist b/docker_setup_composer/.env.dist new file mode 100644 index 0000000..f96cca0 --- /dev/null +++ b/docker_setup_composer/.env.dist @@ -0,0 +1,3 @@ +REPO_DIR=/Users/paulbaumgartner/WebstormProjects/AnmeldungBS1Bayreuth +TMP_DIR=/Users/paulbaumgartner/tmp +MYSQL_ROOT_PASSWORD=example diff --git a/docker_setup_composer/Dockerfile b/docker_setup_composer/Dockerfile new file mode 100644 index 0000000..db7593e --- /dev/null +++ b/docker_setup_composer/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:latest + +ARG DEBIAN_FRONTEND=noninteractive +ENV TZ=Europe/Berlin + +RUN mkdir /home/composer +RUN apt-get update -y --fix-missing && apt-get upgrade -y +RUN apt install -y software-properties-common +RUN add-apt-repository -y ppa:ondrej/php +RUN apt-get install -y composer php8.2 php-mbstring php-xml php-mysql php-fpm php-gd php-zip php-intl php8.2-intl php8.2-xml php8.2-pdo php8.2-mysql wget apache2 +RUN wget https://get.symfony.com/cli/installer -O - | bash +COPY ./symfony-httpd.conf /etc/apache2/sites-available/000-default.conf +RUN a2enmod rewrite +RUN service apache2 restart +ENV PATH="/root/.symfony5/bin:$PATH". +WORKDIR /var/www/app diff --git a/docker_setup_composer/db-entrypoint.sql b/docker_setup_composer/db-entrypoint.sql new file mode 100644 index 0000000..871dd9e --- /dev/null +++ b/docker_setup_composer/db-entrypoint.sql @@ -0,0 +1,4 @@ +CREATE DATABASE db_anmeldung; +CREATE USER 'anmeldung'@'%' IDENTIFIED BY 'ABS12019_691'; +GRANT ALL PRIVILEGES ON db_anmeldung.* TO 'anmeldung'@'%'; +FLUSH PRIVILEGES; diff --git a/docker_setup_composer/docker-compose.yaml b/docker_setup_composer/docker-compose.yaml new file mode 100644 index 0000000..753dfdf --- /dev/null +++ b/docker_setup_composer/docker-compose.yaml @@ -0,0 +1,44 @@ +version: "3.3" + +services: + + db: + image: mysql:latest + restart: unless-stopped + volumes: + - ./data:/var/lib/mysql + - ./db-entrypoint.sql:/docker-entrypoint-initdb.d/db_entrypoint.sql:ro + environment: + MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} + + composer: + stdin_open: true + tty: true + image: bs1anmeldung + restart: on-failure + build: + context: . + dockerfile: ${REPO_DIR}/docker_setup_composer/Dockerfile + container_name: composer_symfony + depends_on: + - db + volumes: + - ${REPO_DIR}:/var/www/app + - ${TMP_DIR}:/tmp + ports: + - "8000:8000" #Port Symfony + - "8080:80" #Port Apache2 + #Command für Testzwecke sinnvoll: Startet Symfony Testserver + #command: symfony server:start + + adminer: + image: adminer + restart: always + ports: + - "8282:8282" + command: + - 'php' + - '-S' + - '[::]:8282' + - '-t' + - '/var/www/html' \ No newline at end of file diff --git a/docker_setup_composer/symfony-httpd.conf b/docker_setup_composer/symfony-httpd.conf new file mode 100644 index 0000000..1674f7f --- /dev/null +++ b/docker_setup_composer/symfony-httpd.conf @@ -0,0 +1,16 @@ + + DocumentRoot "/var/www/app/public" + ServerName 127.0.0.1 + DirectoryIndex index.php + + AllowOverride All + Allow from All + + + Options -MultiViews + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ index.php [QSA,L] + + + \ No newline at end of file diff --git a/download/bestaetigungen/.gitkeep b/download/bestaetigungen/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/export-asv-xml-tmp.txt b/export-asv-xml-tmp.txt new file mode 100644 index 0000000..7903c29 --- /dev/null +++ b/export-asv-xml-tmp.txt @@ -0,0 +1,199 @@ + + %beruf_klasse% + ORG + + + %schueler_nachname% + %schueler_vorname% + %schueler_rufname% + + + + %schueler_anrede% + + %schueler_geburtsdatum% + G + %schueler_geschlecht% + %schueler_geburtsort% + %schueler_staat% + + + %schueler_geburtsland% + AYB + + %schueler_zuzug% + + + + + 01 + + + %kontakt_person_1_strasse% + %kontakt_person_1_hausnummer% + %kontakt_person_1_plz% + %kontakt_person_1_ort% + + + + + + + + + + %kontakt_person_1_art% + %kontakt_person_1_nachname% + %kontakt_person_1_vorname% + + + + %kontakt_person_1_anrede% + + + + + 01 + %kontakt_person_1_telefonnummer% + + + + + 04 + %kontakt_person_1__email% + + + + + + + + + + + + 02 + + + %kontakt_person_2_strasse% + %kontakt_person_2_hausnummer% + %kontakt_person_2_plz% + %kontakt_person_2_ort% + + + + + + + + + + %kontakt_person_2_art% + %kontakt_person_2_nachname% + %kontakt_person_2_vorname% + + + + %kontakt_person_2_anrede% + + + + + 01 + %kontakt_person_2_telefonnummer% + + + + + 04 + %kontakt_person_2__email% + + + + + + + + + + + + 03 + + + %schueler_str% + %schueler_hausnr% + %schueler_plz% + %schueler_ort% + + + + + + + + + + 01 + %schueler_tel% + + + + + 04 + %schueler_email% + + + + + + + + %schueler_bekenntnis% + + + + + + + + + + + + %registrierung_eintritt_am% + %von_schulart% + %von_schulnr% + + + + %von_schulvorbildung% + + + + + + + + + + + + + + + %gastschueler% + %registrierung_wohnheim_ASV% + + + + + %beruf_nummer% + %ausbildung_ende% + %ausbildung_beginn% + + + %schueler_reliunterricht% + + + \ No newline at end of file diff --git a/export-asv.txt b/export-asv.txt new file mode 100644 index 0000000..a7fa6b6 --- /dev/null +++ b/export-asv.txt @@ -0,0 +1,78 @@ +"%beruf_klasse%", +"%schueler_nachname%", +"%schueler_vorname%", +"%schueler_rufname%", +"%schueler_geburtsdatum%", +"G", +"%schueler_geburtsort%", +"%schueler_geburtsland%", +"%schueler_geschlecht%", +"%schueler_bekenntnis%", +"%schueler_reliunterricht%", +"%schueler_staat%", +"", +"%schueler_str%", +"%schueler_hausnr%", +"%schueler_plz%", +"%schueler_ort%", +"", +"D", +"%schueler_tel%", +"", +"%schueler_email%", +"%schueler_muttersprache%", +"%registrierung_eintritt_am%", +"", +"", +"", +"%kontakt_person_1_art%", +"%kontakt_person_1_anrede%", +"%kontakt_person_1_nachname%", +"%kontakt_person_1_vorname%", +"%kontakt_person_1_strasse%", +"%kontakt_person_1_hausnummer%", +"%kontakt_person_1_plz%", +"%kontakt_person_1_ort%", +"", +"%kontakt_person_1_telefonnummer%", +"", +"%kontakt_person_1_email%", +"", +"", +"%Erz1Hauptansprechpartner%", +"%kontakt_person_2_art%", +"%kontakt_person_2_anrede%", +"%kontakt_person_2_nachname%", +"%kontakt_person_2_vorname%", +"%kontakt_person_2_strasse%", +"%kontakt_person_2_hausnummer%", +"%kontakt_person_2_plz%", +"%kontakt_person_2_ort%", +"", +"%kontakt_person_2_telefonnummer%", +"", +"%kontakt_person_2_email%", +"", +"", +"", +"", +"", +"", +"", +"%schueler_zuzugsart%", +"%von_schulnr%", +"%ausbildung_dauer%", +"%ausbildung_beginn%", +"%ausbildung_ende%", +"%betrieb_nummer%", +"%beruf_nummer%0", +"%art_der_beschaeftigung%", +"%von_schulvorbildung%", +"%von_schulvorbildung_an%", +"%von_schulart%", +"%art_wohnheim%", +"", +"%gastschueler%", +"%schueler_zuzug%", +"", +"", \ No newline at end of file diff --git a/export-kontrollausdruck-template.txt b/export-kontrollausdruck-template.txt new file mode 100644 index 0000000..a2d39de --- /dev/null +++ b/export-kontrollausdruck-template.txt @@ -0,0 +1,223 @@ +

Datenblatt %schueler_nachname%, %schueler_rufname% - %beruf_klasse%

+

1. Schüler/-in - Exportdatum: %date%

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nachname.......: %schueler_nachname%  Anrede.........: %schueler_anrede%
Vornamen (alle): %schueler_vorname%Geschlecht.....: %schueler_geschlecht%
Rufname........: %schueler_rufname%Bekenntnis.....: %schueler_bekenntnis%
Geburtsort.....: %schueler_geburtsort%Staatsanghörig.: %schueler_staat%
Geburtsdatum...: %schueler_geburtsdatum%
Straße, Nr.....: %schueler_str% %schueler_hausnr%
PLZ, Ort.......: %schueler_plz% %schueler_ort%
Telefon........: %schueler_tel%
E-Mail.........: %schueler_email%
Bei nichtdeutschem Geburtsort!
Geburtsland....: %schueler_geburtsland_ohne_de%Zuzugsjahr.....: %schueler_zuzug%
Art des Zuzugs.: %schueler_zuzugsart_read% (%schueler_zuzugsart%)
+

2. Kontaktpersonen

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Kontaktperson 1 (%kontakt_person_1_art%)  Kontaktperson 2 (%kontakt_person_2_art%)
Anrede..: %kontakt_person_1_anrede%Anrede..: %kontakt_person_2_anrede%
Nachname: %kontakt_person_1_nachname%Nachname: %kontakt_person_2_nachname%
Vorname.: %kontakt_person_1_vorname%Vorname.: %kontakt_person_2_vorname%
Telefon.: %kontakt_person_1__telefonnummer%Telefon.: %kontakt_person_2__telefonnummer%
E-Mail..: %kontakt_person_1_email%E-Mail..: %kontakt_person_2_email%
PLZ, Ort: %kontakt_person_1_plz% %kontakt_person_1_ort%PLZ, Ort: %kontakt_person_2_plz% %kontakt_person_2_ort%
Str., Nr: %kontakt_person_1_strasse% %kontakt_person_1_hausnummer%Str., Nr: %kontakt_person_2_strasse% %kontakt_person_2_hausnummer%
+

3. Berufsausbildung / Berufstätigkeit / Maßnahmenträger

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Betrieb............: %betrieb_name% (Nr. %betrieb_nummer%)
Anschrift..........: %betrieb_strasse% %betrieb_hausnr%, %betrieb_plz% %betrieb_ort%
Telefon (Durchwahl): %betrieb_teldurchwahl%  Telefon (Zentrale).: %betrieb_telzentrale%
Ausbilder/Ansp.Part: %betrieb_anprechpartner%
Ausbilder-E-Mail...: %ausbildung_ausbilderemail%
Ausbildungsart.....: %registrierung_typtext% (%registrierung_typ%)
Ausbildungsberuf...: %beruf_bezeichnung% (Nr. %beruf_nummer%)
Beginn Ausbildung..: %ausbildung_beginn%  Ende Ausbildung....: %ausbildung_ende%
Dauer Ausbildung...: %ausbildung_dauer% Jahre  Kammer.............: %betrieb_kammerread%
Gast-/FS-Schüler...: %gastschueler%  Umschüler..........: %umschueler%
Träger.............: %umschueler_traeger%  Fördernummer.......: %umschueler_foerderer_nr%
+ + +

4. Schulische Daten

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eintrittsdatum........: %registrierung_eintritt_am%
Zuletzt besucht Schule: %von_schulname%, %von_schulort% (Nr.: %von_schulnr%)
letzte Schulart....: %von_schulart% %von_schulart_read%  höchster Absch.....: %von_schulvorbildung% %von_schulvorbildung_read%
erworben an........: %von_schulvorbildung_an% %von_schulvorbildung_an_read%  
Schullaufbahn (%anzahl_schulbesuche% Schulbesuche wurden angegeben)
Schulname - OrtEintrittAustritt
%schulbesuch_1_schule_name% %schulbesuch_1_schule_ort%%schulbesuch_1_eintritt%%schulbesuch_1_austritt%
%schulbesuch_2_schule_name% %schulbesuch_2_schule_ort%%schulbesuch_2_eintritt%%schulbesuch_2_austritt%
%schulbesuch_3_schule_name% %schulbesuch_3_schule_ort%%schulbesuch_3_eintritt%%schulbesuch_3_austritt%
+

5. Mitteilungen an die Schule

+

Heimunterbringung: %registrierung_wohnheim%
+Mitteilung:
+%registierung_mitteilung%

+
diff --git a/export-template-vorschau.txt b/export-template-vorschau.txt new file mode 100644 index 0000000..935f214 --- /dev/null +++ b/export-template-vorschau.txt @@ -0,0 +1,7 @@ +'%registierung_datum%'(%registierung_id%) | +%schueler_nachname% %schueler_rufname% | +%beruf_klasse%: %beruf_bezeichnung%| +Dauer: %ausbildung_dauer% | +Betrieb: %betrieb_name% | +Mitteilung: %registierung_mitteilung% | +Wohnheim: %registrierung_wohnheim% \ No newline at end of file diff --git a/export-template.txt b/export-template.txt new file mode 100644 index 0000000..e893819 --- /dev/null +++ b/export-template.txt @@ -0,0 +1,275 @@ +"%schueler_nachname% %schueler_rufname%", +"BS %beruf_klasse% %schueler_nachname% %schueler_rufname%", +"", +"%schueler_nachname%", +"", +"", +"%schueler_vorname%", +"%schueler_rufname%", +"%schueler_geschlecht%", +"%schueler_anrede%", +"%schueler_geburtsdatum%", +"%schueler_geburtsjahr%", +"%schueler_geburtsort%", +"%schueler_staat%", +"%schueler_bekenntnis%", +"%kontakt_person_1_nachname%", +"%kontakt_person_1_vorname%", +"%kontakt_person_1_anrede%", +"%kontakt_person_1_art%", +"%kontakt_person_1_telefonnummer%", +"%kontakt_person_2_nachname%", +"%kontakt_person_2_vorname%", +"%kontakt_person_2_anrede%", +"%kontakt_person_2_art%", +"%kontakt_person_2_telefonnummer%", +"%schueler_plz%", +"%schueler_ort%", +"%schueler_str% %schueler_hausnr%", +"%schueler_tel%", +"S", +"%kontakt_person_1_art%", +"%kontakt_person_1_plz%", +"%kontakt_person_1_ort%", +"%kontakt_person_1_strasse% %kontakt_person_1_hausnummer%", +"%kontakt_person_1_telefonnummer%", +"%kontakt_person_1_art%", +"%kontakt_person_2_art%", +"%gastschueler%", +"", +"%umschueler%", +"%umschueler_traeger%", +"%umschueler_foerderer_nr%", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"%beruf_klasse%", +"10", +"", +"%registrierung_wohnheim%", +"", +"%schueler_schulpflicht%", +"", +"", +"", +"", +"", +"%schueler_reliunterricht%", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +0, +0, +0, +0, +0, +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +0, +0, +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"%registrierung_eintritt_am%", +"", +10, +"", +"", +"", +"", +"", +"", +"", +"%von_schulnr%", +"%von_schulart%", +0, +"%von_schulvorbildung%", +"", +"%ausbildung_beginn%", +"%ausbildung_ende%", +"%registrierung_typ%", +"%ausbildung_dauer%", +"%beruf_nummer%", +"%betrieb_nummer%", +"", +"", +"", +"", +"", +"", +"", +0, +"", +"", +"", +"", +"", +"", +" & & & &", +"", +"", +"", +1, +1, +1, +"%art_wohnheim%", +"O", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +0, +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"%schueler_zuzugsart%", +"%schueler_zuzug%", +"", +"", +"%von_schulvorbildung%", +"", +0, +"", +"", +"", +"", +"", +"", +" & & & &", +0, +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +0, +"", +"", +"", +"%von_schulart%", +"", +"", +"", +"", +"", +"", +"", +"", +"%schueler_geburtsland_ohne_de%", +"", +"", +"", +"", +"", +"%schueler_geburtsland_ohne_de%", +"", +"", +"", +"", +"", +"", +"", +"%schueler_email%", +"%ausbildung_ausbilderemail%", +"", +"", +"", +"%betrieb_kammer%" \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..488135d --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + tests + + + + + + src + + + + + + + diff --git a/public/Logo_Berufsschule_4c.jpg b/public/Logo_Berufsschule_4c.jpg new file mode 100644 index 0000000..aff679e Binary files /dev/null and b/public/Logo_Berufsschule_4c.jpg differ diff --git a/public/SchulansichtInDenLogofarbenSlideFarbe.png b/public/SchulansichtInDenLogofarbenSlideFarbe.png new file mode 100644 index 0000000..b4c0a25 Binary files /dev/null and b/public/SchulansichtInDenLogofarbenSlideFarbe.png differ diff --git a/public/customStyle.css b/public/customStyle.css new file mode 100644 index 0000000..4962826 --- /dev/null +++ b/public/customStyle.css @@ -0,0 +1,285 @@ + +html{ + height: 100%; +} + +body{ + background-color: rgba(102, 155, 204, 0.05) !important; + font-family: "Lato", sans-serif !important; + font-size: 18px; + height: 100%; +} + +/* Icon progressbar */ +#progressbar { + margin-bottom: 30px; + overflow: hidden; + color: lightgrey; + list-style: none; + padding: 0; +} + +#progressbar .active { + color: #00377B; +} + +#progressbar li { + font-size: 15px; + width: 25%; + float: left; + position: relative; + font-weight: 400; + text-align: center; /* Zentriert den Text */ +} + +/* Icons in der Progressbar */ +#progressbar li:before { + font-family: FontAwesome; + content: "\f13e"; /* Standardwert, falls kein anderes Icon spezifiziert ist */ + width: 50px; + height: 50px; + line-height: 50px; /* Anpassung der Linie an die Höhe des Kreises */ + display: block; + font-size: 20px; + color: #ffffff; + background: lightgray; + border-radius: 50%; + margin: 0 auto 10px auto; + padding: 2px; + position: relative; /* Position relativ für den z-index */ + z-index: 1; /* Z-index erhöht, um über Hintergrundfarbe der Icons zu liegen */ +} + +#progressbar #slot1:before { + content: "\f07c"; /* Icon für Ausbildungsdaten */ +} + +#progressbar #slot2:before { + content: "\f007"; /* Icon für Persondaten */ +} + +#progressbar #slot3:before { + content: "\f129"; /* Icon für Sonstiges */ +} + +#progressbar #slot4:before { + content: "\f00c"; /* Icon für Abschluss */ +} + +/* Progressbar-Connectors */ +#progressbar li:after { + content: ''; + width: calc(100%); + height: 2px; + background: lightgray; + position: absolute; + left: 50%; + top: 25px; + transform: translateX(-50%); /* Zentriert die Linie horizontal */ + z-index: 0; /* Z-index auf 0 gesetzt, um unter den Icons zu liegen */ +} + +/* Farbe von Nummer und Connector */ +#progressbar li.active:before, #progressbar li.active:after { + background: #00377B; +} + +/* Animiertes Fortschrittsbalken */ +.progress { + height: 20px; +} + +.progress-bar { + background-color: #00377B; +} + + +.labelFont{ + font-size: 20px; + font-weight: bold; + padding-top: 4%; +} + +.FontFirst{ + font-size: 20px; + font-weight: bold; +} + +.headlineFont{ + font-weight: bold; + color: #00377B; +} + +.buttonFont{ + font-weight: bolder!important; + font-size: 20px!important; + color: #00377B; +} + +.SpacingSides{ + padding: inherit; +} + +.containerColor{ + background-color: white; +} + +.containerFooter{ + background-color: #00377B; + color: #FFFFFF; +} + +.copyright{ + background-color: #222222; +} + +.SpacingTop{ + padding-top: 2%; +} + +.blankLink{ + text-decoration: none!important; + color: #FFFFFF; +} + +.controlButton{ + border-color: #00377B!important; + margin-bottom: 30px; + color: #00377B!important; + background-color: white; +} + +.controlButton:hover{ + background-color: #00377B!important; + color: white!important; +} + +.greyFooter{ + color: #7e7e7e; + border-bottom-style: dotted; + font-size: 15px!important; +} + +.table{ + table-layout:fixed; +} + +.blankLinkButton{ + color: black; +} + +.jumbotron{ + margin-bottom:0!important; +} + +.smallButtonDistance{ + margin-top: 2%; +} + +.RadioBtnSchool{ + margin-right: 10px; + font-size: large; + margin-bottom: 20px; + +} + +.invisibleItems{ + visibility: hidden; +} + +.confirmButton{ + border-color: #00cc00; +} + +.confirmButton:hover{ + background-color: #00cc00; + color: black; +} + +.redHighlight{ + color: red; +} + +.headlineGlobal{ + text-decoration: underline; +} + +#copyright{ + font-size: small; + text-align: center; + margin-top: 10px; +} + +#copyright a{ + text-decoration: none; + color: #a6a6a6; +} + +.optimizedPicture{ + background-image: url("/SchulansichtInDenLogofarbenSlideFarbe.png"); + background-size: cover; + height: 120%; +} + +@media only screen and (max-width: 768px) { + .hidePictures{ + display: none; + } +} + +@media only screen and (max-width: 400px) { + .hideLogo{ + display: none; + } +} + +.copyrightLine{ + background-color: #a6a6a6; + margin-bottom: 10px; +} + +.labelFontData{ + font-size: medium; +} + +.containerData{ + background-color: #00377B; + color: white; + border-radius: 5px; + padding-top: 1%!important; + padding-bottom: 1%!important; +} + +.fixSize{ + transform: scale(1.2)!important; +} + +.dataLink{ + color: white; +} + +.dataLink:hover{ + color: #5eb5e0; +} + +.required:after { + content: "*"; + color: red; +} +.form-error>ul>li { + font-size: .8em; + color: red; + font-weight: bold; +} + +.form-error>ul { + list-style-type: none; + padding: 0; +} +.datenschutz { + margin-right: 5px +} + +.importantInfo{ + color: red; +} \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..f1876ba Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..578deb7 --- /dev/null +++ b/public/index.php @@ -0,0 +1,44 @@ +load(__DIR__.'/../.env'); +} + +$env = $_SERVER['APP_ENV'] ?? 'dev'; +$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)); + +if ($debug) { + umask(0000); + + Debug::enable(); + //ErrorHandler::register(); +} + +if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { + Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); +} + +if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { + Request::setTrustedHosts(explode(',', $trustedHosts)); +} + +$kernel = new Kernel($env, $debug); +$request = Request::createFromGlobals(); +$response = $kernel->handle($request); +$response->send(); +$kernel->terminate($request, $response); diff --git a/src/Controller/.gitignore b/src/Controller/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/src/Controller/AdminAuthenticatorController.php b/src/Controller/AdminAuthenticatorController.php new file mode 100644 index 0000000..6cc218e --- /dev/null +++ b/src/Controller/AdminAuthenticatorController.php @@ -0,0 +1,34 @@ +getLastAuthenticationError(); + // last email entered by the user + $email = $authenticationUtils->getLastUsername(); + + return $this->render( + 'security/login.html.twig', + ['email' => $email, 'error' => $error,]); + } + + #[Route(path: '/logout', name: 'app_logout')] + public function logout(Security $security): Response + { + $response = $security->logout(); + return $this->redirectToRoute('anmeldung_start'); + } +} diff --git a/src/Controller/AdminController.php b/src/Controller/AdminController.php new file mode 100644 index 0000000..99bad32 --- /dev/null +++ b/src/Controller/AdminController.php @@ -0,0 +1,70 @@ +render('admin/index.html.twig', [ + 'controller_name' => 'AdminController', + ]); + } + + #[Route(path: '/user')] + public function user(Request $request, UserPasswordHasherInterface $passwordHasher, ManagerRegistry $doctrine) + { + + $user = new AdminUser(); + $user->setEmail($_ENV['ADMIN_EMAIL']); + $user->setRoles($user->getRoles()); + + $user->setPassword($passwordHasher->hashPassword( + $user, $_ENV['ADMIN_PASSWORD'] + )); + + $manager = $doctrine->getManager(); + $adminuser = $manager->getRepository(AdminUser::class)->findOneBy(['roles' => '["ROLE_USER","ROLE_ADMIN"]']); + + if (!$adminuser) + { + $manager->persist($user); + $manager->flush(); + } + + return $this->redirectToRoute('anmeldung_start'); + } + + #[Route(path: '/login', name: 'app_login')] + public function login(AuthenticationUtils $authenticationUtils): Response + { + if ($this->getUser()) { + return $this->redirectToRoute('admin'); + } + + // get the login error if there is one + $error = $authenticationUtils->getLastAuthenticationError(); + // last username entered by the user + $lastUsername = $authenticationUtils->getLastUsername(); + + return $this->render('security/login.html.twig', ['last_username' => $lastUsername, 'error' => $error]); + } + + #[Route(path: '/logout', name: 'app_logout')] + public function logout(): void + { + throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.'); + } +} diff --git a/src/Controller/AdminExport.php b/src/Controller/AdminExport.php new file mode 100644 index 0000000..435c0b1 --- /dev/null +++ b/src/Controller/AdminExport.php @@ -0,0 +1,750 @@ +getRepository(Registrierung::class)->findForExport(); + + $now = new DateTime(); + $manager = $doctrine->getManager(); + foreach ($doctrineRegistrations as $registration) { + $registration->setExportedAt($now); + $manager->persist($registration); + } + $manager->flush(); + + //build assoc array + $assocRegistrations = $this->buildRegistrationsAsAssocArray($doctrineRegistrations); + + // get array with year combo as key and return string as value + $exportStringPerYear = $this->buildRegistrationStringPerYearASV($assocRegistrations); + + //build kontrollausdruck + $exportStringsKontrollausdruckPerYear = $this->buildKonrollausdruckStringsPerYear($assocRegistrations); + + $dir = $this->getParameter('dir.downloads'); + + //create folder if not exists + if (!file_exists($dir)) { + mkdir($dir); + } + + // setup for the reader + $spreadsheet = new Spreadsheet(); + $reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv(); + /* Set CSV parsing options */ + $reader->setDelimiter(','); + $reader->setEnclosure('"'); + $reader->setSheetIndex(0); + + // Path List + $pathList = array(); + $pathListKontrollausruck = array(); + + foreach ($exportStringPerYear as $key => $exportString) { + //generate file name for csv base files + $fileNameASV = $this->buildExportFileASV($key); + $pathASV = $dir . '/' . $fileNameASV; + $handleASV = fopen($pathASV, "w"); + fwrite($handleASV, $exportString); + fclose($handleASV); + + /* Load a CSV file and save as a XLSX */ + //Generate file names for xlsx and set paths + $fileNameASVxlsx = $this->buildExportFileXLSX($key); + $pathASVxlsx = $dir . '/' . $fileNameASVxlsx; + //Load csv for old registrations + $spreadsheet = $reader->load($pathASV); + $writer = new Xlsx($spreadsheet); + $writer->save($pathASVxlsx); + $spreadsheet->disconnectWorksheets(); + unset($spreadsheet); + + $pathList[$key] = $pathASVxlsx; + } + + foreach ($exportStringsKontrollausdruckPerYear as $key => $exportStringsKontrollausdruck) { + $kontrollPDFPath = $this->kontrollaudruck($exportStringsKontrollausdruck, $dir, $key); + $pathListKontrollausruck[$key] = $kontrollPDFPath; + } + $this->deleteOldExports(); + + ksort($pathList, $flags = SORT_REGULAR); + ksort($pathListKontrollausruck, $flags = SORT_REGULAR); + + return $this->render('admin_export/filedownload.html.twig', [ + 'pathList' => $pathList, + 'pathListKontrollausruck' => $pathListKontrollausruck, + ]); + } + + /** + * @throws Exception + */ + #[Route(path: '/csvdownload', name: 'csvdownload')] + #[IsGranted("ROLE_ADMIN")] + public function csvDownload(Request $request) + { + $csvpath = $request->query->get('csvpath'); + return $this->file($csvpath); + } + + /** + * @throws Exception + */ + #[Route(path: '/asvdownload', name: 'asvdownload')] + #[IsGranted("ROLE_ADMIN")] + public function asvDownload(Request $request) + { + $asvpath = $request->query->get('asvpath'); + return $this->file($asvpath); + } + + /** + * @throws Exception + */ + #[Route(path: '/kontrollausdruck', name: 'kontrollausdruck')] + #[IsGranted("ROLE_ADMIN")] + public function kontrollausdruckDownload(Request $request) + { + $kontrollausdruckpath = $request->query->get('kontrollausdruckpath'); + return $this->file($kontrollausdruckpath); + } + + /** + * @throws Exception + */ + private function kontrollaudruck($htmlKontrollausdruckString, $dir, $key) + { + //https://ourcodeworld.com/articles/read/799/how-to-create-a-pdf-from-html-in-symfony-4-using-dompdf + // Configure Dompdf according to your needs + $pdfOptions = new Options(); + $pdfOptions->set('defaultFont', 'Arial'); + + // Instantiate Dompdf with our options + $dompdf = new Dompdf($pdfOptions); + + // Retrieve the HTML generated in our twig file + //$html = $this->renderView('default/mypdf.html.twig', [ + // 'title' => "Welcome to our PDF Test" + //]); + + // Load HTML to Dompdf + $dompdf->loadHtml($htmlKontrollausdruckString); + + // (Optional) Setup the paper size and orientation 'portrait' or 'portrait' + $dompdf->setPaper('A4', 'portrait'); + + // Render the HTML as PDF + $dompdf->render(); + + // Output the generated PDF to File + $output = $dompdf->output(); + + $fileName = $this->buildExportFileNameKontrollausdruck($key); + $path = $dir . '/' . $fileName; + file_put_contents($path, $output); + + return $path; + + } + + /** + * @throws Exception + */ + private function deleteOldExports(): void + { + $finder = new Finder(); + $finder->files()->in($this->getParameter('dir.downloads') . '/'); + $fileSystem = new Filesystem(); + foreach ($finder as $file) { + // Alle Dateien die älter als 30 Tag (* 24 Stunden * 60 Minuten * 60 Sekunden) sind werden gelöscht + if ($file->getMTime() < time() - (30 * 24 * 60 * 60)) { + $fileSystem->remove($file); + } + } + } + + /** + * @throws Exception + */ + #[Route(path: '/admin/export', name: 'admin_export')] + #[IsGranted("ROLE_ADMIN")] + public function index(ManagerRegistry $doctrine) + { + //get data from repository + $doctrineRegistrations = $doctrine->getRepository(Registrierung::class)->findForExport(); + + //build assoc array + $assocRegistrations = $this->buildRegistrationsAsAssocArray($doctrineRegistrations); + + //build export strings + $exportStrings = $this->buildRegistrationStringsVorschau($assocRegistrations); + + //render template + return $this->render('admin_export/index.html.twig', [ + 'controller_name' => 'AdminCreateImportController', + 'import_strings' => $exportStrings, + ]); + } + + private function buildRegistrationsAsAssocArray($doctrineRegistrations): array + { + $assocRegistrations = array(); + + /** @var Registrierung $registration */ + foreach ($doctrineRegistrations as $registration) { + + //Schueler-Daten + $schueler = $registration->getSchueler(); + + + //Umwandlung andere Religion als RK oder EV in ETH. + $tmpReli = $schueler->getBekenntnis(); + if (!($tmpReli == 'RK' || $tmpReli == 'EV')) { + $tmpReli = 'Eth'; + } + + //Umwandlung DE in D ergänzt. + $tmpStaat = $schueler->getStaatsangehoerigkeit(); + if ($tmpStaat == 'DE') { + $tmpStaat = 'D'; + } + + //Zuzug mit Jahr 01.01.?? ist ausreichend. + $zuzug = ''; + if ($schueler->getZuzugAm() != null) { + $zuzug = '01.01.' . $schueler->getZuzugAm()->format('Y'); + } + + if ($registration->getWohnheim() == 'J' and $schueler->getGeschlecht() == 'm') { + $artwohnheim = 'J'; + } elseif ($registration->getWohnheim() == 'J' and $schueler->getGeschlecht() == 'w') { + $artwohnheim = 'M'; + } elseif ($registration->getWohnheim() == 'J' and $schueler->getGeschlecht() == 'd') { + $artwohnheim = 'M'; + } else { + $artwohnheim = 'N'; + } + + $eintrittAm = $registration->getEintrittAm(); + if ($schueler->getAusbildung() != null) { + if ($schueler->getAusbildung()->getBeginn() > $eintrittAm) { + $eintrittAm = $schueler->getAusbildung()->getBeginn(); + } + } else { + if ($registration->getDatum() > $eintrittAm) { + $eintrittAm = $registration->getDatum(); + } + } + + + $registrationData = array( + '%registierung_id%' => $registration->getId(), + '%registierung_datum%' => $registration->getDatum()->format('d.m.Y'), + '%registierung_mitteilung%' => $registration->getMitteilung(), + '%registrierung_wohnheim%' => $registration->getWohnheim() ? 'J' : 'N', + '%registrierung_wohnheim_ASV%' => $registration->getWohnheim() ? 'true' : 'false', + '%art_wohnheim%' => $artwohnheim, + '%registrierung_eintritt_am%' => $eintrittAm->format('d.m.Y'), + '%registrierung_eq_massnahme%' => $registration->getTyp() == 'EQ' ? 'J' : 'N', + '%registrierung_typ%' => $registration->getTyp(), + '%registrierung_typtext%' => $registration->getTypText($registration->getTyp()), + '%schueler_nachname%' => $schueler->getNachname(), + '%schueler_vorname%' => $schueler->getVorname(), + '%schueler_rufname%' => $schueler->getRufname(), + '%schueler_anrede%' => $schueler->getGeschlecht() == 'w' ? 'F' : 'H', + '%schueler_email%' => $schueler->getEmail(), + '%schueler_geburtsdatum%' => $schueler->getGeburtsdatum()->format('d.m.Y'), + '%schueler_geburtsjahr%' => $schueler->getGeburtsdatum()->format('Y'), + '%schueler_geschlecht%' => $schueler->getGeschlecht(), + '%schueler_geburtsort%' => $schueler->getGeburtsort(), + '%schueler_geburtsland%' => $schueler->getGeburtsland(), + '%schueler_geburtsland_ohne_de%' => $schueler->getGeburtsland() == 'D' ? '' : $schueler->getGeburtsland(), + '%schueler_muttersprache%' => $schueler->getGeburtsland() == 'D' ? 'D' : 'ND', + '%schueler_zuzug%' => $zuzug, + '%schueler_zuzugsart_read%' => $schueler->getZuzugsartReadable(), + '%schueler_zuzugsart%' => $schueler->getZuzugsart(), + '%schueler_umschueler%' => $schueler->getUmschueler() != null ? 'J' : 'N', + '%schueler_plz%' => $schueler->getPlz(), + '%schueler_ort%' => $schueler->getOrt(), + '%schueler_str%' => $schueler->getStrasse(), + '%schueler_hausnr%' => $schueler->getHsnr(), + '%schueler_tel%' => $schueler->getTel(), + '%schueler_bekenntnis%' => $schueler->getBekenntnis(), + //Umwandlung alles ausser RK und EV in Eth und Übernahme in Zeile 64 Exprot + '%schueler_reliunterricht%' => $tmpReli, + //Umwandlung DE in D ergänzt. + '%schueler_staat%' => $tmpStaat, + //'%schueler_staat%' => $schueler->getStaatsangehoerigkeit(), + '%schueler_schulpflicht%' => $this->getSchulPflicht($schueler), + '%registrierung_schuljahr%' => $registration->getSchuljahr() + ); + + //Umschueler + $umschueler = $schueler->getUmschueler(); + + if (isset($umschueler)) { + $registrationData['%umschueler%'] = 'J'; + $registrationData['%umschueler_foerderer_nr%'] = $umschueler->getFoerdererNr(); + $registrationData['%umschueler_traeger%'] = $umschueler->getTraeger(); + $registrationData['%umschueler_traeger_sitz%'] = $umschueler->getTraegerSitz(); + } else { + $registrationData['%umschueler%'] = 'N'; + } + + //Kontaktperson-Daten + $kontaktPersonen = $schueler->getKontaktpersonen(); + + if (isset($kontaktPersonen) && sizeof($kontaktPersonen) > 0) { + for ($i = 0; $i < sizeof($kontaktPersonen); $i++) { + $baseKey = '%kontakt_person_' . ($i + 1); + + $kontaktPerson = $kontaktPersonen[$i]; + + $registrationData[$baseKey . '_anrede%'] = $kontaktPerson->getAnrede(); + $registrationData[$baseKey . '_art%'] = $kontaktPerson->getArt(); + $registrationData[$baseKey . '_vorname%'] = $kontaktPerson->getVorname(); + $registrationData[$baseKey . '_nachname%'] = $kontaktPerson->getNachname(); + $registrationData[$baseKey . '_strasse%'] = $kontaktPerson->getStrasse(); + $registrationData[$baseKey . '_hausnummer%'] = $kontaktPerson->getHausnummer(); + $registrationData[$baseKey . '_plz%'] = $kontaktPerson->getPlz(); + $registrationData[$baseKey . '_ort%'] = $kontaktPerson->getOrt(); + $registrationData[$baseKey . '_telefonnummer%'] = $kontaktPerson->getTelefonnummer(); + $registrationData[$baseKey . '_email%'] = $kontaktPerson->getEmail(); + if ($i == 0) { + $registrationData['%Erz1Hauptansprechpartner%'] = 1; + } + } + + } + + //Schulbesuche + $schulBesuche = $schueler->getSchulbesuche(); + $registrationData['%anzahl_schulbesuche%'] = sizeof($schulBesuche); + if (isset($schulBesuche) && sizeof($schulBesuche) > 0) { + for ($i = 0; $i < sizeof($schulBesuche); $i++) { + $baseKey = '%schulbesuch_' . ($i + 1); + + $schulBesuch = $schulBesuche[$i]; + + $registrationData[$baseKey . '_eintritt%'] = $schulBesuch->getEintritt()->format('d.m.Y'); + $registrationData[$baseKey . '_austritt%'] = $schulBesuch->getAustritt()->format('d.m.Y'); + + $schule = $schulBesuch->getSchule(); + + if (isset($schule)) { + $registrationData[$baseKey . '_schule_art%'] = $schule->getArt(); + $registrationData[$baseKey . '_schule_name%'] = $schule->getName(); + $registrationData[$baseKey . '_schule_strasse%'] = $schule->getStrasse(); + $registrationData[$baseKey . '_schule_ort%'] = $schule->getOrt(); + $registrationData[$baseKey . '_schule_plz%'] = $schule->getPlz(); + } + } + } + + //Ausbildung + $ausbildung = $schueler->getAusbildung(); + + if (isset($ausbildung)) { + $registrationData['%ausbildung_ausbilderemail%'] = $ausbildung->getAusbilderemail(); + $registrationData['%ausbildung_beginn%'] = $ausbildung->getBeginn()->format('d.m.Y'); + $registrationData['%ausbildung_ende%'] = $ausbildung->getEnde()->format('d.m.Y'); + $registrationData['%ausbildung_dauer%'] = $this->getAusbildungDauer($ausbildung->getEnde(), $ausbildung->getBeginn()); + + //Beruf + $beruf = $ausbildung->getBeruf(); + + $registrationData['%beruf_bezeichnung%'] = $beruf->getBezeichnung(); + $registrationData['%beruf_nummer%'] = $beruf->getNummer(); + + $wechselNklassenImportklassen = new DateTime(getenv('WECHSEL_NKLASSEN_IMPORTKLASSE')); + //echo "Wechsel: ".$wechselNklassenImportklassen$eintrittAm->format('d.m.Y')." Eintritt am: ".$eintrittAm->format('d.m.Y'); + if ($eintrittAm < $wechselNklassenImportklassen) { + $registrationData['%beruf_klasse%'] = "Import"; + } else { + $registrationData['%beruf_klasse%'] = $beruf->getKlasse(); + } + + + //Betrieb + $betrieb = $ausbildung->getBetrieb(); + + $registrationData['%betrieb_name%'] = $betrieb->getName(); + $registrationData['%betrieb_nummer%'] = $betrieb->getKuerzel(); + $registrationData['%betrieb_kammer%'] = $betrieb->getKammer(); + $registrationData['%betrieb_kammerread%'] = "nicht in ASV hinterlegt"; //$betrieb->getKammerText($betrieb->getKammer()); + $registrationData['%betrieb_strasse%'] = $betrieb->getStrasse(); + $registrationData['%betrieb_hausnr%'] = $betrieb->getHsnr(); + $registrationData['%betrieb_plz%'] = $betrieb->getPlz(); + $registrationData['%betrieb_ort%'] = $betrieb->getOrt(); + $registrationData['%betrieb_teldurchwahl%'] = $betrieb->getTelDurchwahl(); + $registrationData['%betrieb_telzentrale%'] = $betrieb->getTelZentrale(); + $registrationData['%betrieb_anprechpartner%'] = $betrieb->getAnsprPartner(); + } + + //BGJs Ausbildungsart hinzufügen und Registrierungsart + $ausbArtBGJ = $registration->getTyp(); + + //Spalte 66 Exportfile Ausbildung mit oder ohne Vertrag + if ($ausbArtBGJ == 'AUAU') { + $registrationData['%art_der_beschaeftigung%'] = 'm'; + } elseif ($ausbArtBGJ == 'EQ') { + $registrationData['%art_der_beschaeftigung%'] = 'e'; + } elseif ($ausbArtBGJ == 'UM') { + $registrationData['%art_der_beschaeftigung%'] = 'u'; + } else { + $registrationData['%art_der_beschaeftigung%'] = 'o'; + } + + if ($ausbArtBGJ == 'BGJH') { + $registrationData['%beruf_bezeichnung%'] = 'BGJ/s-Holztechnik'; + $registrationData['%beruf_nummer%'] = '99071'; + //$registrationData['%beruf_klasse%'] = 'HTE10n'; + $registrationData['%beruf_klasse%'] = 'Import'; + $registrationData['%registrierung_typ%'] = 'BGJs'; + } elseif ($ausbArtBGJ == 'BGJZ') { + $registrationData['%beruf_bezeichnung%'] = 'BGJ/s-Zimmerer'; + $registrationData['%beruf_nummer%'] = '99061'; + //$registrationData['%beruf_klasse%'] = 'BZI10n'; + $registrationData['%beruf_klasse%'] = 'Import'; + $registrationData['%registrierung_typ%'] = 'BGJs'; + } elseif ($ausbArtBGJ == 'BIK') { + $registrationData['%beruf_bezeichnung%'] = 'Unbegleitete Flüchtlinge'; + $registrationData['%beruf_nummer%'] = '99508'; + //$registrationData['%beruf_klasse%'] = 'BIKV10n'; + $registrationData['%beruf_klasse%'] = 'Import'; + } + + //Gastschueler + if ($ausbArtBGJ == 'AUAU' or $ausbArtBGJ == 'UM') { + $registrationData['%gastschueler%'] = $this->getGastSchueler($registration); + } else { + $registrationData['%gastschueler%'] = ''; + } + + + //Vorbildung + $registrationData['%von_schulart%'] = $schueler->getLetzteSchulart(); + $registrationData['%von_schulart_read%'] = $schueler->getLetzteSchulartReadable(); + $registrationData['%von_schulvorbildung%'] = $schueler->getHoechsterAbschluss(); + $registrationData['%von_schulvorbildung_read%'] = $schueler->getHoechsterAbschlussReadable(); + $registrationData['%von_schulvorbildung_an%'] = $schueler->getHoechAbschlAn(); + $registrationData['%von_schulvorbildung_an_read%'] = $schueler->getHoechAbschlAnReadable(); + + //$registrationData['%von_schulnr%'] = $schueler->getSchulbesuche()->get(0)->getSchule()->getNummer(); + //ergänzt um Fehler bei Expot zu beheben (null wenn kein Schulbesuch eingetragen ist) + if (isset($schulBesuche) && sizeof($schulBesuche) == 0) { + $registrationData['%von_schulnr%'] = ''; + $registrationData['%von_schulname%'] = 'keine Angaben'; + } else { + $schulnr = $schueler->getSchulbesuche()->get(0)->getSchule()->getNummer(); + if ($schulnr == 0) { + $registrationData['%von_schulnr%'] = ''; + } elseif ($schulnr < 10) { + $registrationData['%von_schulnr%'] = '000' . $schulnr; + } elseif ($schulnr < 100) { + $registrationData['%von_schulnr%'] = '00' . $schulnr; + } elseif ($schulnr < 1000) { + $registrationData['%von_schulnr%'] = '0' . $schulnr; + } else { + $registrationData['%von_schulnr%'] = $schulnr; + } + $registrationData['%von_schulname%'] = $schueler->getSchulbesuche()->get(0)->getSchule()->getName(); + $registrationData['%von_schulort%'] = $schueler->getSchulbesuche()->get(0)->getSchule()->getOrt(); + } + + //Exportdatum + $registrationData['%date%'] = date('d.m.Y H:i'); + + array_push($assocRegistrations, $registrationData); + } + + return $assocRegistrations; + } + + private function buildRegistrationStringsVorschau($assocRegistrations) + { + $exportTemplate = $this->getExportTemplateVorschau(); + + $importStrings = array(); + array_push($importStrings, "Anmeldedatum(ID) | Name Vorname | Klasse\Beruf | Ausbildungsdauer | Betrieb | Mitteilung | Wohnheim"); + + foreach ($assocRegistrations as $registration) { + $exportString = $exportTemplate; + + //apply parameters + foreach ($registration as $parameter => $value) { + $exportString = str_replace($parameter, $value, $exportString); + } + + //remove unmapped parameters + $exportString = preg_replace('/%\w+%/', '', $exportString); + $exportString = $exportString . "\r"; + array_push($importStrings, $exportString); + } + + return $importStrings; + } + + private function buildRegistrationStringPerYearASV($assocRegistrations) + { + $exportTemplate = $this->getExportTemplateASV(); + + $importStringsPerYear = array(); + $returnStringsPerYear = array(); + + foreach ($assocRegistrations as $registration) { + $key = $registration['%registrierung_schuljahr%']; + + $exportString = $exportTemplate; + + //apply parameters + foreach ($registration as $parameter => $value) { + $exportString = str_replace($parameter, $value, $exportString); + } + + //remove unmapped parameters + $exportString = preg_replace('/%\w+%/', '', $exportString); + $exportString = $exportString . "\r"; + + // pro jahr ein array import strings -> return string pro jahr + // Array list mit jahr als key und return string als value + + #echo $key . ' ' . $importStringsPerYear[$key]; + if (!array_key_exists($key, $importStringsPerYear)) { + $importStringsPerYear[$key] = array($exportString); + } else { + array_push($importStringsPerYear[$key], $exportString); + } + } + + foreach ($importStringsPerYear as $key => $importString) { + $returnString = "\"Klasse\",\"Name\",\"Vornamen\",\"Rufname\",\"Geburtstag\",\"Geburtsdatum Gültigkeit\",\"Geburtsort\",\"Geburtsland\",\"Geschlecht\",\"Konfession\",\"RU\",\"Land\",\"Land2\",\"Strasse\",\"HausNr\",\"PLZ\",\"Ort\",\"Teilort\",\"Staat\",\"Telefon\",\"Handy\",\"Email\",\"Muttersprache\",\"Schuleintrittam\",\"Einschulungam\",\"im Schriftverkehrverteiler\",\"auskunftsberechtigt\",\"Erz1Art\",\"Erz1Anrede\",\"Erz1Name\",\"Erz1Vorname\",\"Erz1Strasse\",\"Erz1Hausnr\",\"Erz1PLZ\",\"Erz1Ort\",\"Erz1Teilort\",\"Erz1Telefon\",\"Erz1Handy\",\"Erz1Email\",\"Erz1Schriftverkehrverteiler\",\"Erz1auskunftsberechtigt\",\"Erz1Hauptansprechpartner\",\"Erz2Art\",\"Erz2Anrede\",\"Erz2Name\",\"Erz2Vorname\",\"Erz2Strasse\",\"Erz2Hausnr\",\"Erz2PLZ\",\"Erz2Ort\",\"Erz2Teilort\",\"Erz2Telefon\",\"Erz2Handy\",\"Erz2Email\",\"Erz2Schriftverkehrverteiler\",\"Erz2auskunftsberechtigt\",\"Erz2Hauptansprechpartner\",\"Fremdsprache1\",\"Fremdsprache2\",\"Fremdsprache3\",\"Fremdsprache4\",\"Zuzugsart\",\"AbgebendeSchule\",\"Beschäftigungsdauer\",\"Ausbildungsbeginn\",\"Ausbildungsende\",\"Ausbildungsbetrieb\",\"Ausbild_beruf_id\",\"AusbArtDerBeschaeftigung\",\"VorbldgSchulischAbschluss\",\"VorbldgSchulart\",\"SchulbesuchAmStichtag\",\"ArtDerHeimunterbringung\",\"Unterbringung\",\"Gastschüler\",\"Zuzugsdatum\",\"Austrittsdatum\",\"BeruflicherAbschluss\",\r"; + $returnString = $returnString . implode(PHP_EOL, $importString); + $returnStringsPerYear[$key] = $returnString; + } + + return $returnStringsPerYear; + } + + private function buildKonrollausdruckStringsPerYear($assocRegistrations) + { + $exportTemplate = $this->getExportKontrollausdruckTemplate(); + + $importStringsPerYear = array(); + $returnStringsPerYear = array(); + + foreach ($assocRegistrations as $registration) { + $key = $registration['%registrierung_schuljahr%']; + + $exportString = $exportTemplate; + + //apply parameters + foreach ($registration as $parameter => $value) { + $exportString = str_replace($parameter, $value, $exportString); + } + + //remove unmapped parameters + $exportString = preg_replace('/%\w+%/', '', $exportString); + + if (!array_key_exists($key, $importStringsPerYear)) { + $importStringsPerYear[$key] = array($exportString); + } else { + array_push($importStringsPerYear[$key], $exportString); + } + } + + foreach ($importStringsPerYear as $key => $importString) { + $returnString = ' + Online-Export Kontrollausdrucke + + '; + $returnString = $returnString . implode(PHP_EOL, $importString); + $returnString .= ''; + $returnStringsPerYear[$key] = $returnString; + } + + return $returnStringsPerYear; + } + + private function buildExportFileASV($key) + { + return date('Y-m-d H:i') . '-' . $key . ' Anmeldungen.csv'; + } + + private function buildExportFileXLSX($key) + { + return date('Y-m-d H:i') . '-' . $key . ' Anmeldungen.xlsx'; + } + + private function buildExportFileNameKontrollausdruck($key) + { + return date('Y-m-d H:i') . '-' . $key . ' Kontrollausdruck_Anmeldungen.pdf'; + } + + private function getExportKontrollausdruckTemplate() + { + return preg_replace("/\r|\n/", "", + file_get_contents(APPLICATION_PATH . '/export-kontrollausdruck-template.txt') + ); + } + + private function getExportTemplate() + { + return preg_replace("/\r|\n/", "", + file_get_contents(APPLICATION_PATH . '/export-template.txt') + ); + } + + private function getExportTemplateVorschau() + { + return preg_replace("/\r|\n/", "", + file_get_contents(APPLICATION_PATH . '/export-template-vorschau.txt') + ); + } + + private function getExportTemplateASV() + { + return preg_replace("/\r|\n/", "", + file_get_contents(APPLICATION_PATH . '/export-asv.txt') + ); + } + + + private function getGastSchueler(Registrierung $registrierung) + { + $schueler = $registrierung->getSchueler(); + $ausbildung = $schueler->getAusbildung(); + + $ausbArt = $registrierung->getTyp(); + + //Umschueler koennen die Schule frei waehlen, alle anderen sind ohne Ausbildungsbetrieb (Jungarbeiter + BGJs) + if ($ausbArt == 'UM') { + return 'U'; + } + + $gemeindeSchluessel = $ausbildung->getBetrieb()->getGemeindeschluessel(); + + $B_GKennz1 = substr($gemeindeSchluessel, 0, 1); //erste Zahl der Gemeindekennzahl des Betriebes + $B_GKennz3 = substr($gemeindeSchluessel, 0, 3); //ersten drei Zahlen der Gemeindekennzahl des Betriebes + $klasse3 = substr($ausbildung->getBeruf()->getKlasse(), 0, 3); + + switch ($klasse3) { + case "EIE": //ganz Franken 4xxxxx - 6xxxxx + if ($B_GKennz1 == '4' or $B_GKennz1 == '5' or $B_GKennz1 == '6') + $GASTSCHUELER = 'S'; + else $GASTSCHUELER = ''; + break; + case "BFT": //ganz Bayern 1xxxxx - 7xxxxx + if ($B_GKennz1 == '1' or $B_GKennz1 == '2' or $B_GKennz1 == '3' or $B_GKennz1 == '4' or + $B_GKennz1 == '5' or $B_GKennz1 == '6' or $B_GKennz1 == '7') + $GASTSCHUELER = 'S'; + else $GASTSCHUELER = ''; + break; + case "IIK": + case "ITK": + case "ITE": + case "XFG": //ganz OFR 4xxxxx + if ($B_GKennz1 == '4') + $GASTSCHUELER = 'S'; + else $GASTSCHUELER = ''; + break; + case "IFI": + case "EME": //OFR-Ost Hof-Landkreis+Stadt, Kulmbach, Wunsiedel + if ($B_GKennz3 == "475" or $B_GKennz3 == "464" or $B_GKennz3 == "477" or $B_GKennz3 == "479") + $GASTSCHUELER = 'S'; + else $GASTSCHUELER = ''; + break; + case "FML": + case "KFR": //Kulmbach + if ($B_GKennz3 == '477') + $GASTSCHUELER = 'S'; + else $GASTSCHUELER = ''; + break; + case "MKF": + case "ETE": + case "MFT": + case "MIT": + case "NBA": + case "NFN": + $GASTSCHUELER = ''; //falls diese Berufe hier auftauchen, sind sie falsch oder Gastschueler!! + break; + default: //alle Klassen, die oben noch nicht aufgefuehrt wurden - sollte nicht zur Anwendung kommen + $GASTSCHUELER = ''; + break; + } + + return $GASTSCHUELER; + } + + private function getSchulPflicht(Schueler $schueler) + { + $schulbesuche = $schueler->getSchulbesuche(); + $jahre = 0; + + foreach ($schulbesuche as $schulbesuch) { + $jahre += (intval($schulbesuch->getAustritt()->format('Y')) + - intval($schulbesuch->getEintritt()->format('Y'))); + } + + return $jahre >= 12 ? 'J' : 'N'; + } + + private function getAusbildungDauer(\DateTimeInterface $ende, \DateTimeInterface $beginn) + { + $dayDiff = $ende->diff($beginn)->days; + $jahre = $dayDiff / 365; + + //runden auf halbe jahre + return floor($jahre * 2) / 2; + } + +} + diff --git a/src/Controller/AdminRegistrationsControllers.php b/src/Controller/AdminRegistrationsControllers.php new file mode 100644 index 0000000..815d5c4 --- /dev/null +++ b/src/Controller/AdminRegistrationsControllers.php @@ -0,0 +1,47 @@ +getRepository(Registrierung::class)->findForExport(); + + return $this->render('admin_registrations/index.html.twig', [ + 'controller_name' => 'AdminRegistrationController', + 'registrations' => $registrations + ]); + } + + /** + * @param Request $request + * @param Registrierung $registrierung + * @return Response + */ + #[Route(path: '/registration/{id}', name: 'registration_delete', methods: 'DELETE')] + public function delete(Request $request, Registrierung $registrierung, ManagerRegistry $doctrine): Response + { + if ($this->isCsrfTokenValid('delete'.$registrierung->getId(), $request->request->get('_token'))) { + $em = $doctrine->getManager(); + $em->remove($registrierung); + $em->flush(); + } + + return $this->redirectToRoute('admin'); + } + +} diff --git a/src/Controller/AllgemeinController.php b/src/Controller/AllgemeinController.php new file mode 100644 index 0000000..7c8cf7b --- /dev/null +++ b/src/Controller/AllgemeinController.php @@ -0,0 +1,88 @@ +hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + + $data = []; + if(!empty($session->get('registrierung')->getEintrittAm())) { + $data[] = $session->get('registrierung')->getEintrittAm(); + } + if(!empty($session->get('registrierung')->getWohnheim())) { + $data[] = $session->get('registrierung')->getWohnheim(); + } + if(!empty($session->get('registrierung')->getMitteilung())) { + $data[] = $session->get('registrierung')->getMitteilung(); + } + + $form = $this->createForm(AllgemeinType::class, $data); + $form->handleRequest($request); + if($form->isSubmitted() && $form->isValid()) { + $data = $form->getData(); + /** @var Registrierung $registrierung */ + $registrierung = $session->get('registrierung'); + $registrierung->setWohnheim($data['wohnheim']); + $registrierung->setMitteilung($data['mitteilung']); + $datumErsteHaelfte = new DateTime(getenv('EINTRITTSDATUM_ERSTE_HAELFTE')); + $datumZweiteHaelfte = new DateTime(getenv('EINTRITTSDATUM_ZWEITE_HAELFTE')); + $heute = new DateTime(); + if($heute < $datumErsteHaelfte) + $registrierung->setEintrittAm($datumErsteHaelfte); + else + $registrierung->setEintrittAm($datumZweiteHaelfte); + + return $this->redirectToRoute('daten_pruefen'); + } + return $this->render('allgemein/new.html.twig', [ + 'form' => $form->createView() + ]); + } + #[Route(path: '/update', name: 'allgemein_update')] + public function update(Request $request) + { + $session = $request->getSession(); + $registrierung = $session->get('registrierung'); + $form = $this->createForm(AllgemeinType::class, $registrierung); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $session->set('registrierung', $form->getData()); + return $this->redirectToRoute('daten_pruefen'); + } + + return $this->render('allgemein/update.html.twig', [ + 'registrierung' => $registrierung, + 'form' => $form->createView(), + ]); + } + +} diff --git a/src/Controller/AnmeldungController.php b/src/Controller/AnmeldungController.php new file mode 100644 index 0000000..069462e --- /dev/null +++ b/src/Controller/AnmeldungController.php @@ -0,0 +1,185 @@ +hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + $session = new Session(); + } + + + if ($session->has('registrierung')) { + $registrierung = $session->get('registrierung'); + } else { + $schueler = new Schueler(); + $registrierung = new Registrierung(); + $registrierung->setSchueler($schueler); + $registrierung->setIp($request->getClientIp()); + $registrierung->setDatum(new DateTime()); + } + + $form = $this->createForm(StartType::class, $registrierung); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $registrierung = $form->getData(); + $session->set('registrierung', $registrierung); + switch ($registrierung->getTyp()) { + case "AUAU": + case "EQ": + return $this->redirectToRoute('ausbildung_new'); + case "UM": + return $this->redirectToRoute('umschueler_new'); + case "BIK": + return $this->redirectToRoute('fluechtling_new'); + default: + return $this->redirectToRoute('schueler_new'); + } + } + return $this->render('anmeldung/start.html.twig', [ + 'form' => $form->createView(), + ]); + } + + #[Route('/daten-pruefen', name: 'daten_pruefen')] + public function check(Request $request) + { + //TODO sessionhandling ähnlich wie bei AnmeldungController-new + //TODO sessionhandling in Filter auslagern, oder zumindest in eine einfache Funktion?! + // https://symfony.com/doc/current/event_dispatcher/before_after_filters.html + $session = $request->getSession(); + if(!$session->has('registrierung')) { + $session->invalidate(); + return $this->redirectToRoute('anmeldung_start'); + } + + /** @var Registrierung $registrierung */ + $registrierung = $session->get('registrierung'); + $schueler = $registrierung->getSchueler(); + $ausbildung = $schueler->getAusbildung(); + $kontaktpersonen = $schueler->getKontaktpersonen(); + $fluechtling = $schueler->getFluechtling(); + $umschueler = $schueler->getUmschueler(); + $schulbesuche = $registrierung->getSchueler()->getSchulbesuche(); + if ($registrierung->getTyp()== 'BGJH') { + $klasse = 'HTE10n'; + }elseif ($registrierung->getTyp()== 'BGJZ') { + $klasse = 'BZI10n'; + }elseif ($registrierung->getTyp()=='BIK') { + $klasse = 'BIKV10n'; + } else{ + $beruf = $ausbildung->getBeruf(); + $klasse = $beruf->getKlasse(); + } + $vorname = mb_substr($schueler->getVorname(), 0, 3); + $nachname = mb_substr($schueler->getNachname(), 0, 3); + $untisbenutzer = $vorname.$nachname.$schueler->getGeburtsdatum()->format('Ymd'); + $unitspasswort = $schueler->getGeburtsdatum()->format('Ymd'); + + $templateOptions = [ + 'registrierung' => $registrierung, + 'kontaktpersonen' => $kontaktpersonen, + 'fluechtling' => $fluechtling, + 'umschueler' => $umschueler, + 'schulbesuche' => $schulbesuche, + 'schueler' => $schueler, + 'ausbildung' => $ausbildung, + 'klasse' => $klasse, + 'untisbenutzer' => $untisbenutzer, + 'untispasswort' => $unitspasswort, + ]; + return $this->render('anmeldung/check.html.twig', $templateOptions); + } + + + #[Route('/beenden', name: 'anmeldung_beenden')] + public function beenden(Request $request, ManagerRegistry $doctrine) + { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + //TODO sicherstellen, dass man vorher auf den 'Abschliessen'-Button gedrueckt hat + + $em = $doctrine->getManager(); + $registrierung = $session->get('registrierung'); + $schueler = $registrierung->getSchueler(); + if(!empty($schueler->getAusbildung())) { + // Handle Ausbildung-Entity related stuff + $ausbildung = $schueler->getAusbildung(); + $beruf = $doctrine->getRepository(Beruf::class)->find($ausbildung->getBeruf()->getId()); + $betrieb = $ausbildung->getBetrieb(); + if(empty($betrieb->getId())) { + // new betrieb, let's persist it! + $doctrine->getManager()->persist($betrieb); + } else { + // betrieb is canned, so search for it again and reassign it, because doctrine is really strange + $betrieb = $doctrine->getRepository(Betrieb::class)->find($betrieb->getId()); + } + + $ausbildung->setBeruf($beruf); + $ausbildung->setBetrieb($betrieb); + $schueler->setAusbildung($ausbildung); + } + $schulbesuche = $registrierung->getSchueler()->getSchulbesuche(); + + foreach ($schulbesuche as $schulbesuch) { + if(empty($schulbesuch->getSchule()->getId())) { + // New Schule added, let's persist it! + $em->persist($schulbesuch->getSchule()); + } else { + // Schule is canned, so search for it again and reassign it + + // First, let's remove the "old" schulbesuch from schueler + $registrierung->getSchueler()->removeSchulbesuch($schulbesuch); + // Then, let's search 'n' replace + $schule = $doctrine->getRepository(Schule::class)->find($schulbesuch->getSchule()->getId()); + $schulbesuch->setSchule($schule); + // Last, re-add schulbesuch to schueler + $registrierung->getSchueler()->addSchulbesuch($schulbesuch); + } + } + $registrierung->setSchueler($schueler); + + $em->persist($registrierung); + $em->flush(); + + + + //$session->invalidate(); + + return $this->redirectToRoute('mailer'); + + //return $this->render('anmeldung/beendet.html.twig'); + + + } +} diff --git a/src/Controller/AusbildungController.php b/src/Controller/AusbildungController.php new file mode 100644 index 0000000..8904792 --- /dev/null +++ b/src/Controller/AusbildungController.php @@ -0,0 +1,138 @@ +hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + + if(!empty($session->get('registrierung')->getSchueler()->getAusbildung())) { + $ausbildung = $session->get('registrierung')->getSchueler()->getAusbildung(); + if(!empty($ausbildung->getBetrieb())) { + $doctrine->getManager()->persist($ausbildung->getBetrieb()); + } + if(!empty($ausbildung->getBeruf())) { + $doctrine->getManager()->persist($ausbildung->getBeruf()); + } + } else { + $ausbildung = new Ausbildung(); + } + $betriebe[] = $betriebRepository->findAllVerified(); + + if($session->has('betrieb')) { + $betriebNeu = $session->get('betrieb'); + $doctrine->getManager()->persist($betriebNeu); + $betriebe[] = $betriebNeu; + } else { + $betriebNeu = null; + } + + + $form = $this->createForm(AusbildungType::class, $ausbildung, ['betriebe' => $betriebe, 'betriebNeu' => $betriebNeu]); + $form->handleRequest($request); + + if($form->isSubmitted() && $form->isValid()) { + $this->saveToSession($form->getData(), $session); + return $this->redirectToRoute('schueler_new'); + } + return $this->render('ausbildung/new.html.twig', [ + 'form' => $form->createView() + ]); + } + + /** + * @param Request $request + * @return Response + */ + #[Route(path: '/update', name: 'ausbildung_update', methods: 'GET|POST')] + public function update(Request $request, ManagerRegistry $doctrine) + { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + + if(!empty($session->get('registrierung')->getSchueler()->getAusbildung())) { + $ausbildung = $session->get('registrierung')->getSchueler()->getAusbildung(); + } else { + $request->getSession()->invalidate(); + return $this->redirectToRoute('anmeldung_start'); + } + + $session->set('update', true); + + $beruf = $doctrine->getRepository(Beruf::class)->find($ausbildung->getBeruf()->getId()); + $betriebe[] = $doctrine->getRepository(Betrieb::class)->findAllVerified(); + $betrieb = $ausbildung->getBetrieb(); + if($session->has('betrieb')) { + $betrieb = $session->get('betrieb'); + } + if(empty($betrieb->getId())) { + $doctrine->getManager()->persist($betrieb); + } else { + $betrieb = $doctrine->getRepository(Betrieb::class)->find($betrieb->getId()); + } + $betriebe[] = $betrieb; + $ausbildung->setBetrieb($betrieb); + $ausbildung->setBeruf($beruf); + $form = $this->createForm(AusbildungType::class, $ausbildung, ['betriebe' => $betriebe, 'betriebNeu' => $betrieb]); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $this->saveToSession($form->getData(), $session); + $session->remove('update'); + $session->remove('betrieb'); + return $this->redirectToRoute('daten_pruefen'); + } + + return $this->render('ausbildung/update.html.twig', [ + 'ausbildung' => $ausbildung, + 'form' => $form->createView(), + ]); + } + + + + private function saveToSession(Ausbildung $ausbildung, Session $session): void { + $schueler = $session->get('registrierung')->getSchueler(); + $schueler->setAusbildung($ausbildung); + $session->get('registrierung')->setSchueler($schueler); + } +} diff --git a/src/Controller/BerufController.php b/src/Controller/BerufController.php new file mode 100644 index 0000000..f8ee4e1 --- /dev/null +++ b/src/Controller/BerufController.php @@ -0,0 +1,87 @@ +render('beruf/index.html.twig', [ + 'berufs' => $berufRepository->findAll(), + ]); + } + + #[Route(path: '/new', name: 'beruf_new', methods: ['GET', 'POST'])] + public function new(Request $request, ManagerRegistry $doctrine): Response + { + $beruf = new Beruf(); + $form = $this->createForm(BerufType::class, $beruf); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager = $doctrine->getManager(); + $entityManager->persist($beruf); + $entityManager->flush(); + + return $this->redirectToRoute('beruf_index'); + } + + return $this->render('beruf/new.html.twig', [ + 'beruf' => $beruf, + 'form' => $form->createView(), + ]); + } + + #[Route(path: '/{id}', name: 'beruf_show', methods: ['GET'])] + public function show(Beruf $beruf): Response + { + return $this->render('beruf/show.html.twig', [ + 'beruf' => $beruf, + ]); + } + + #[Route(path: '/{id}/edit', name: 'beruf_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Beruf $beruf, ManagerRegistry $doctrine): Response + { + $form = $this->createForm(BerufType::class, $beruf); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $doctrine->getManager()->flush(); + + return $this->redirectToRoute('beruf_index', [ + 'id' => $beruf->getId(), + ]); + } + + return $this->render('beruf/edit.html.twig', [ + 'beruf' => $beruf, + 'form' => $form->createView(), + ]); + } + + #[Route(path: '/{id}', name: 'beruf_delete', methods: ['DELETE'])] + public function delete(Request $request, Beruf $beruf, ManagerRegistry $doctrine): Response + { + if ($this->isCsrfTokenValid('delete'.$beruf->getId(), $request->request->get('_token'))) { + $entityManager = $doctrine->getManager(); + $entityManager->remove($beruf); + $entityManager->flush(); + } + + return $this->redirectToRoute('beruf_index'); + } +} diff --git a/src/Controller/BetriebController.php b/src/Controller/BetriebController.php new file mode 100644 index 0000000..2110a5d --- /dev/null +++ b/src/Controller/BetriebController.php @@ -0,0 +1,230 @@ +render('betrieb/index.html.twig', ['betriebs' => $betriebRepository->findAll()]); + } + + #[Route(path: '/neu', name: 'betrieb_ausbildung')] + #[Route(path: '/new', name: 'betrieb_new', methods: ['GET', 'POST'])] + public function betriebNeu(Request $request) { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + + if($session->has('betrieb')) { + $betrieb = $session->get('betrieb'); + } else { + $betrieb = new Betrieb(); + } + + $form = $this->createForm(BetriebType::class, $betrieb); + $form->handleRequest($request); + + if($form->isSubmitted() && $form->isValid()) { + $betrieb = $form->getData(); + $betrieb->setIstVerifiziert(false); + $betrieb->setASVImport(false); + $session->set('betrieb', $betrieb); + + if($session->has('update') && $session->get('update') == true) { + return $this->redirectToRoute('ausbildung_update'); + } else { + return $this->redirectToRoute('ausbildung_new'); + } + } + + return $this->render('betrieb/new.html.twig', [ + 'betrieb' => $betrieb, + 'form' => $form->createView() + ]); + } + + /** + * @param Request $request + * @return Response + */ + #[Route(path: '/adminupdate', name: 'betrieb_admin_update', methods: 'GET|POST')] + #[IsGranted("ROLE_ADMIN")] + public function adminUpdate(Request $request) + { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('admin'); + } + $betrieb = new Betrieb(); + $form = $this->createForm(BetriebAdminType::class, $betrieb); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $betrieb = $form->getData(); + $session->get('registrierung')->getSchueler()->getAusbildung()->setBetrieb($betrieb); + return $this->redirectToRoute('daten_pruefen'); + } + + return $this->render('betrieb/update_verifiziert.html.twig', [ + 'betrieb' => $betrieb, + 'form' => $form->createView(), + ]); + } + + + + /** + * @param Request $request + * @return Response + */ + #[Route(path: '/update', name: 'betrieb_update', methods: 'GET|POST')] + public function update(Request $request) + { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + if(empty($session->get('registrierung')->getSchueler()->getAusbildung()->getBetrieb()->getId())) { + $betrieb = $session->get('registrierung')->getSchueler()->getAusbildung()->getBetrieb(); + } else { + $request->getSession()->invalidate(); + return $this->redirectToRoute('anmeldung_start'); + } + + $form = $this->createForm(BetriebType::class, $betrieb); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $betrieb = $form->getData(); + $betrieb->setIstVerifiziert(false); + $session->get('registrierung')->getSchueler()->getAusbildung()->setBetrieb($betrieb); + return $this->redirectToRoute('daten_pruefen'); + } + + return $this->render('betrieb/update.html.twig', [ + 'betrieb' => $betrieb, + 'form' => $form->createView(), + ]); + } + + + #[Route(path: '/{id}', name: 'betrieb_nichtverifiziert_admin_show', methods: 'GET')] + #[IsGranted("ROLE_ADMIN")] + public function adminNotVerifiedShow(Betrieb $betrieb): Response + { + return $this->render('betrieb/_nichtverifiziert_admin_show.html.twig', ['betrieb' => $betrieb]); + } + + + #[Route(path: '/{id}', name: 'betrieb_admin_show', methods: 'GET')] + #[IsGranted("ROLE_ADMIN")] + public function adminShow(Betrieb $betrieb): Response + { + return $this->render('betrieb/_admin_show.html.twig', ['betrieb' => $betrieb]); + } + + + #[Route(path: '/{id}', name: 'betrieb_show', methods: 'GET')] + public function show(Betrieb $betrieb): Response + { + return $this->render('betrieb/_show.html.twig', ['betrieb' => $betrieb]); + } + + + #[Route(path: '/{id}/edit', name: 'betrieb_nichtverifiziert_edit', methods: 'GET|POST')] + #[IsGranted("ROLE_ADMIN")] + public function notVerifiedEdit(Request $request, Betrieb $betrieb, ManagerRegistry $doctrine): Response + { + $form = $this->createForm(BetriebAdminType::class, $betrieb); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $doctrine->getManager()->flush(); + + return $this->redirectToRoute('betrieb_nichtverifiziert_edit', ['id' => $betrieb->getId()]); + } + + return $this->render('betrieb/_nichtverifiziert_edit.html.twig', [ + 'betrieb' => $betrieb, + 'form' => $form->createView(), + ]); + } + + #[Route(path: '/{id}/edit', name: 'betrieb_edit', methods: 'GET|POST')] + public function edit(Request $request, Betrieb $betrieb, ManagerRegistry $doctrine): Response + { + $form = $this->createForm(BetriebType::class, $betrieb); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $doctrine->getManager()->flush(); + + return $this->redirectToRoute('betrieb_edit', ['id' => $betrieb->getId()]); + } + + return $this->render('betrieb/edit.html.twig', [ + 'betrieb' => $betrieb, + 'form' => $form->createView(), + ]); + } + + #[Route(path: '/{id}', name: 'betrieb_delete', methods: 'DELETE')] + #[IsGranted("ROLE_ADMIN")] + public function delete(Request $request, Betrieb $betrieb, ManagerRegistry $doctrine): Response + { + if ($this->isCsrfTokenValid('delete'.$betrieb->getId(), $request->request->get('_token'))) { + $em = $doctrine->getManager(); + $em->remove($betrieb); + $em->flush(); + } + + return $this->redirectToRoute('betrieb_index'); + } + + + #[Route(name: 'betrieb_showNotVerified', methods: 'GET')] + #[IsGranted("ROLE_ADMIN")] + public function showNotVerified(BetriebRepository $betriebRepository): Response + { + return $this->render('betrieb/_admin_nicht_verifiziert.html.twig', ['betriebs' => $betriebRepository->findAllNotVerified()]); + } + + #[Route(path: '/showImportInASV', name: 'betrieb_showImportInASV', methods: 'GET')] + #[IsGranted("ROLE_ADMIN")] + public function showImportInASV(BetriebRepository $betriebRepository): Response + { + return $this->render('betrieb/_admin_import_in_asv.html.twig', ['betriebs' => $betriebRepository->findAllToImportInASV()]); + } + + +} + diff --git a/src/Controller/EintrittsdatumController.php b/src/Controller/EintrittsdatumController.php new file mode 100644 index 0000000..67af307 --- /dev/null +++ b/src/Controller/EintrittsdatumController.php @@ -0,0 +1,73 @@ +render('eintrittsdatum/index.html.twig', [ + 'ersteHaelfte' => $eintrittErsteHaelfte, + 'zweiteHaelfte' => $eintrittZweiteHaelfte, + 'wechselImportNKlassen' => $wechselNklassenImportklassen + ]); + } + + /** + * @param Request $request + * @return \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response + */ + #[Route(path: '/edit', name: 'eintrittsdatum_edit')] + public function edit(Request $request): Response + { + $form = $this->createForm(EintrittsdatumType::class); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $this->changeEnv('EINTRITTSDATUM_ERSTE_HAELFTE', $form->get('ersteHaelfte')->getViewData()); + $this->changeEnv('EINTRITTSDATUM_ZWEITE_HAELFTE', $form->get('zweiteHaelfte')->getViewData()); + $this->changeEnv('WECHSEL_NKLASSEN_IMPORTKLASSE', $form->get('wechselImportNKlassen')->getViewData()); + + return $this->redirectToRoute('eintrittsdatum'); + } + + return $this->render('eintrittsdatum/edit.html.twig', [ + 'form' => $form->createView(), + ]); + } + + public static function changeEnv($key,$value): void + { + $path = APPLICATION_PATH . '/.env'; + + if(is_bool($_ENV[$key])) + { + $old = $_ENV[$key]? 'true' : 'false'; + } + elseif($_ENV[$key]===null){ + $old = 'null'; + } + else{ + $old = $_ENV[$key]; + } + + if (file_exists($path)) { + file_put_contents($path, str_replace( + "$key=".$old, "$key=".$value, file_get_contents($path) + )); + } + } +} diff --git a/src/Controller/FluechtlingController.php b/src/Controller/FluechtlingController.php new file mode 100644 index 0000000..0886599 --- /dev/null +++ b/src/Controller/FluechtlingController.php @@ -0,0 +1,132 @@ +render('fluechtling/index.html.twig', ['fluechtlings' => $fluechtlingRepository->findAll()]); + } + + #[Route(path: '/', name: 'fluechtling_new', methods: 'GET|POST')] + public function new(Request $request): Response + { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + + if(!empty($session->get('registrierung')->getSchueler()->getFluechtling())) { + $fluechtling = $session->get('registrierung')->getSchueler()->getFluechtling(); + } else { + $fluechtling = new Fluechtling(); + } + + $form = $this->createForm(FluechtlingType::class, $fluechtling); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $fluechtling = $form->getData(); + + $fluechtling->setSchueler($session->get('registrierung')->getSchueler()); + $session->get('registrierung')->getSchueler()->setFluechtling($fluechtling); + + return $this->redirectToRoute('schueler_new'); + } + + return $this->render('fluechtling/new.html.twig', [ + 'fluechtling' => $fluechtling, + 'form' => $form->createView(), + ]); + } + + /** + * @param Request $request + * @return Response + */ + #[Route(path: '/update', name: 'fluechtling_update', methods: 'GET|POST')] + public function update(Request $request) + { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + + if(!empty($session->get('registrierung')->getSchueler()->getFluechtling())) { + $fluechtling = $session->get('registrierung')->getSchueler()->getFluechtling(); + } else { + $request->getSession()->invalidate(); + return $this->redirectToRoute('anmeldung_start'); + } + $form = $this->createForm(FluechtlingType::class, $fluechtling); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $session->get('registrierung')->getSchueler()->setFluechtling($form->getData()); + return $this->redirectToRoute('daten_pruefen'); + } + + return $this->render('fluechtling/update.html.twig', [ + 'fluechtling' => $fluechtling, + 'form' => $form->createView(), + ]); + } + + #[Route(path: '/{id}', name: 'fluechtling_show', methods: 'GET')] + public function show(Fluechtling $fluechtling): Response + { + return $this->render('fluechtling/show.html.twig', ['fluechtling' => $fluechtling]); + } + + #[Route(path: '/{id}/edit', name: 'fluechtling_edit', methods: 'GET|POST')] + public function edit(Request $request, Fluechtling $fluechtling, ManagerRegistry $doctrine): Response + { + $form = $this->createForm(FluechtlingType::class, $fluechtling); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $doctrine->getManager()->flush(); + + + return $this->redirectToRoute('fluechtling_edit', ['id' => $fluechtling->getId()]); + } + + return $this->render('fluechtling/edit.html.twig', [ + 'fluechtling' => $fluechtling, + 'form' => $form->createView(), + ]); + } + + #[Route(path: '/{id}', name: 'fluechtling_delete', methods: 'DELETE')] + public function delete(Request $request, Fluechtling $fluechtling, ManagerRegistry $doctrine): Response + { + if ($this->isCsrfTokenValid('delete'.$fluechtling->getId(), $request->request->get('_token'))) { + $em = $doctrine->getManager(); + $em->remove($fluechtling); + $em->flush(); + } + + return $this->redirectToRoute('fluechtling_index'); + } +} diff --git a/src/Controller/KontaktpersonController.php b/src/Controller/KontaktpersonController.php new file mode 100644 index 0000000..061cde5 --- /dev/null +++ b/src/Controller/KontaktpersonController.php @@ -0,0 +1,103 @@ +hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + $schueler = $session->get('registrierung')->getSchueler(); + $heute = new \DateTime('now'); + $geburtstag = $schueler->getGeburtsdatum(); + $alter = $geburtstag->diff($heute)->format('%y'); + $minderjaehrig = $alter<18?true:false; + return $this->render('kontaktperson/index.html.twig', [ + 'kontaktpeople' => $schueler->getKontaktpersonen(), + 'minderjaehrig' => $minderjaehrig, + 'alter' => $alter + ]); + } + + #[Route(path: '/neu', name: 'kontaktperson_new', methods: ['GET', 'POST'])] + public function new(Request $request): Response + { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + + $kontaktperson = new Kontaktperson(); + $form = $this->createForm(KontaktpersonType::class, $kontaktperson); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $kontaktperson = $form->getData(); + if($kontaktperson->getArt() == "ET") { + if($kontaktperson->getAnrede() == "H") { + $kontaktperson->setArt("VA"); + } elseif ($kontaktperson->getAnrede() == "F") { + $kontaktperson->setArt("MU"); + } + } + $session->get('registrierung')->getSchueler()->addKontaktperson($kontaktperson); + + return $this->redirectToRoute('kontaktperson_index'); + } + + return $this->render('kontaktperson/new.html.twig', [ + 'kontaktperson' => $kontaktperson, + 'form' => $form->createView(), + 'buttonPath' => 'kontaktperson_index' + ]); + } + #[Route(path: '/update', name: 'kontaktperson_update', methods: ['GET', 'POST'])] + public function update(Request $request): Response + { + $session = $request->getSession(); + $kontaktperson = new Kontaktperson(); + $form = $this->createForm(KontaktpersonType::class, $kontaktperson); + $form->handleRequest($request); + if ($form->isSubmitted() && $form->isValid()) { + $kontaktperson = $form->getData(); + /*if($kontaktperson->getArt() == "ET") { + if($kontaktperson->getAnrede() == "H") { + $kontaktperson->setArt("VA"); + } elseif ($kontaktperson->getAnrede() == "F") { + $kontaktperson->setArt("MU"); + } + }*/ + $session->get('registrierung')->getSchueler()->addKontaktperson($kontaktperson); + + return $this->redirectToRoute('daten_pruefen'); + } + + return $this->render('kontaktperson/new.html.twig', [ + 'kontaktperson' => $kontaktperson, + 'form' => $form->createView(), + 'buttonPath' => 'daten_pruefen' + ]); + } +} diff --git a/src/Controller/MailerController.php b/src/Controller/MailerController.php new file mode 100644 index 0000000..aaac6ae --- /dev/null +++ b/src/Controller/MailerController.php @@ -0,0 +1,192 @@ +getSession(); + if(!$session->has('registrierung')) { + $session->invalidate(); + return $this->redirectToRoute('anmeldung_start'); + } +// +// +// + /** @var Registrierung $registrierung */ + $registrierung = $session->get('registrierung'); + $regtype = $registrierung->getTyp(); + $schueler = $registrierung->getSchueler(); + $ausbildung = $schueler->getAusbildung(); + $kontaktpersonen = $schueler->getKontaktpersonen(); + $fluechtling = $schueler->getFluechtling(); + $umschueler = $schueler->getUmschueler(); + $schulbesuche = $registrierung->getSchueler()->getSchulbesuche(); + if ($registrierung->getTyp()== 'BGJH') { + $klasse = 'HTE10n'; + }elseif ($registrierung->getTyp()== 'BGJZ') { + $klasse = 'BZI10n'; + }elseif ($registrierung->getTyp()=='BIK') { + $klasse = 'BIKV10n'; + } else{ + $beruf = $ausbildung->getBeruf(); + $klasse = $beruf->getKlasse(); + } + $vorname = mb_substr($schueler->getVorname(), 0, 3); + $nachname = mb_substr($schueler->getNachname(), 0, 3); + $untisbenutzer = $vorname.$nachname.$schueler->getGeburtsdatum()->format('Ymd'); + $untispasswort = $schueler->getGeburtsdatum()->format('Ymd'); + + + + //HTML-Mail für PHP-Mailer und DOM-PDF erzeugen + $templateOptions = [ + 'registrierung' => $registrierung, + 'kontaktpersonen' => $kontaktpersonen, + 'fluechtling' => $fluechtling, + 'umschueler' => $umschueler, + 'schulbesuche' => $schulbesuche, + 'schueler' => $schueler, + 'ausbildung' => $ausbildung, + 'klasse' => $klasse, + 'untisbenutzer' => $untisbenutzer, + 'untispasswort' => $untispasswort, + ]; + $htmlMail = $this->renderView('mailer/mail.html.twig', $templateOptions); + + $mail = new PHPMailer(true); + + try { + //Server settings + $mail->isSMTP(); // Send using SMTP + $mail->Host = $_ENV['MAIL_HOST']; // Set the SMTP server to send through + $mail->SMTPAuth = true; // Enable SMTP authentication + $mail->Username = $_ENV['MAIL_USERNAME']; // SMTP username + $mail->Password = $_ENV['MAIL_PASSWORD']; // SMTP password + $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` also accepted + $mail->Port = $_ENV['MAIL_PORT']; // TCP port to connect to + + $mail->setFrom($_ENV['MAIL_SENT_FROM_ADDRESS'], $_ENV['MAIL_SENT_FROM_NAME']); + + $mail->addAddress($schueler->getEmail()); // Email Schüler + if ($regtype == 'BIK' or $regtype == 'BGJZ' or $regtype == 'BGJH') { + } else{ + $mail->addCC($ausbildung->getAusbilderemail()); + } + $mail->isHTML(true); + $mail->CharSet ="UTF-8"; + $mail->Subject = 'Online-Anmeldung Staatl. Berufsschule I Bayreuth'; + $mail->Body = $htmlMail; + $mail->send(); + + } catch (Exception $e) { + echo 'Message could not be sent.'; + echo 'Mailer Error: ' . $mail->ErrorInfo; + } + + + + + + + + //Bestätigungs-PDF generieren. + //https://ourcodeworld.com/articles/read/799/how-to-create-a-pdf-from-html-in-symfony-4-using-dompdf + // Configure Dompdf according to your needs + $pdfOptions = new Options(); + $pdfOptions -> set('defaultFont', 'Arial'); + + // Instantiate Dompdf with our options + $dompdf = new Dompdf($pdfOptions); + + // Retrieve the HTML generated in our twig file + //$html = $this->renderView('default/mypdf.html.twig', [ + // 'title' => "Welcome to our PDF Test" + //]); + + // Load HTML to Dompdf + $dompdf->loadHtml($htmlMail); + + // (Optional) Setup the paper size and orientation 'portrait' or 'portrait' + $dompdf->setPaper('A4', 'portrait'); + + // Render the HTML as PDF + $dompdf->render(); + + // Output the generated PDF to Browser (force download) + $output = $dompdf->output(); + $now = new DateTime(); + //$filename = "./pdfdownload/AnmeldungBS1BT-".$untispasswort."-".$now->format('UY-m-dHis').".pdf"; + $dir = $this->getParameter('dir.downloads'); + $filename = $dir . "/bestaetigungen/AnmeldungBS1BT-".$untispasswort."-".$now->format('UY-m-dHis').".pdf"; + file_put_contents($filename, $output); + + + + +//// Terminierung der Session und Anzeige der letzen Seite mit Link zum Download der Bestätigung + if ($regtype == 'BIK' or $regtype == 'BGJZ' or $regtype == 'BGJH') { + $templateOptions = [ + 'pdffile' => $filename, + 'emailschueler' => $schueler-> getEmail(), + 'emailausbilder' => NULL, + 'bestaetigungpath' => $filename, + ]; + } else{ + $templateOptions = [ + 'pdffile' => $filename, + 'emailschueler' => $schueler-> getEmail(), + 'emailausbilder' => $ausbildung-> getAusbilderemail(), + 'bestaetigungpath' => $filename, + ]; + } + $session->invalidate(); + return $this->render('anmeldung/beendet.html.twig', $templateOptions); + + } + + + /** + * @param Request $request + * @throws Exception + * @return BinaryFileResponse + */ + #[Route(path: '/bestaetigung', name: 'bestaetigung')] + public function bestaetigungDownload(Request $request) { + $bestaetigungPath = $request->query->get('bestaetigungpath'); + return $this->file($bestaetigungPath); + } + + +} + + diff --git a/src/Controller/MigrationController.php b/src/Controller/MigrationController.php new file mode 100644 index 0000000..e87c91a --- /dev/null +++ b/src/Controller/MigrationController.php @@ -0,0 +1,155 @@ +getManager(); + $migrationCount = 0; + foreach ($entries as $entry) + { + $item = json_decode($entry, true); + + $beruf = new Beruf(); + $beruf->setBezeichnung($item['AB_BEZEICHNG']); + $beruf->setNummer($item['AB_NR']); + $beruf->setKlasse($item['Klasse']); + $entityManager->persist($beruf); + + $migrationCount++; + } + $entityManager->flush(); + + return $this->render('migration/index.html.twig', [ + 'tabelle' => 'berufe', + 'count' => $migrationCount + ]); + } + + #[Route(path: '/betriebe')] + public function betriebe(ManagerRegistry $doctrine) + { + $path = APPLICATION_PATH . '/betriebedaten.json'; + + $entries = self::parseFile($path); + + $entityManager = $doctrine->getManager(); + $migrationCount = 0; + foreach ($entries as $entry) + { + $item = json_decode($entry, true); + + $betrieb = new Betrieb(); + $betrieb + ->setName($item['name1'] . ' ' . $item['name2'] . ' ' . $item['name3'] . ' ' . $item['name4']) + ->setStrasse($item['strasse']) + ->setHsnr($item['hausnummer']) + ->setPlz($item['postleitzahl']) + ->setOrt($item['ortsbezeichnung']) + ->setTelZentrale($item['telNummer']) + ->setTelDurchwahl($item['mobilNummer']) + ->setFax($item['faxNummer']) + ->setEmail($item['emailAdresse']) + ->setGemeindeschluessel($item['gkz']) + ->setKuerzel($item['kuerzel']) + ->setIstVerifiziert(1) + ->setAsvImport(1); + /* + ->setName($item['B_NAME1'] . ' ' . $item['B_NAME2']) + ->setStrasse($item['B_STRASSE']) + ->setPlz($item['B_PLZ']) + ->setOrt($item['B_ORT']) + ->setTelZentrale($item['B_TELEFON1']) + ->setTelDurchwahl($item['B_TELEFON2']) + ->setFax($item['B_TELEFON3']) + ->setEmail($item['B_E_MAIL']) + ->setGemeindeschluessel($item['B_GEMEINDEKZ']) + ->setKammer($item['B_BBIG']) + ->setAnsprPartner($item['B_NAME4']) + ->setKuerzel($item['B_SCHLUESSEL']) + ->setIstVerifiziert(true); + */ + $entityManager->persist($betrieb); + + $migrationCount++; + } + $entityManager->flush(); + + return $this->render('migration/index.html.twig', [ + 'tabelle' => 'betriebe', + 'count' => $migrationCount + ]); + } + + #[Route(path: '/schulen')] + public function schulen(ManagerRegistry $doctrine) + { + $path = APPLICATION_PATH . '/herkunftsschulen.json'; + + $entries = self::parseFile($path); + + $entityManager = $doctrine->getManager(); + $migrationCount = 0; + foreach ($entries as $entry) + { + $item = json_decode($entry, true); + + $schule = new Schule(); + $schule + ->setNummer($item['HKS_NUMMER']) + ->setName($item['HKS_NAME']) + ->setStrasse($item['HKS_STRASSE']) + ->setPlz($item['HKS_PLZ']) + ->setOrt($item['HKS_ORT']) + ->setArt('noch nicht definiert') + ->setIstVerifiziert(true); + + $entityManager->persist($schule); + $migrationCount++; + } + $entityManager->flush(); + + return $this->render('migration/index.html.twig', [ + 'tabelle' => 'schulen', + 'count' => $migrationCount + ]); + } + + private static function parseFile($path) + { + $content = file_get_contents($path); + + // Der Export ist kein valides JSON, deshalb das komplizierte Parsing. + $entries = explode('}', $content); + + // 1. entry + $entries[0] = $entries[0] . '}'; + $entries[0] = substr($entries[0], 1); + + // other entries + for($i = 1; $i < sizeof($entries); $i++) { + $entries[$i] = substr($entries[$i], 1); + $entries[$i] = $entries[$i] . '}'; + } + + // last element is only a square bracket + array_pop($entries); + + return $entries; + } +} diff --git a/src/Controller/RegistrierungController.php b/src/Controller/RegistrierungController.php new file mode 100644 index 0000000..721e704 --- /dev/null +++ b/src/Controller/RegistrierungController.php @@ -0,0 +1,101 @@ +render('registrierung/index.html.twig', ['registrierungs' => $registrierungRepository->findAll()]); + } + + #[Route(path: '/new', name: 'registrierung_new', methods: 'GET|POST')] + public function new(Request $request, ManagerRegistry $doctrine): Response + { + $registrierung = new Registrierung(); + $form = $this->createForm(RegistrierungType::class, $registrierung); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $em = $doctrine->getManager(); + $em->persist($registrierung); + $em->flush(); + + return $this->redirectToRoute('registrierung_index'); + } + + return $this->render('registrierung/new.html.twig', [ + 'registrierung' => $registrierung, + 'form' => $form->createView(), + ]); + } + + /** + * @param Request $request + * @return Response + */ + #[Route(path: '/update', name: 'registrierung_update', methods: 'GET|POST')] + public function update(Request $request) + { + $session = $request->getSession(); + $registrierung = $session->get('registrierung'); + $form = $this->createForm(RegistrierungType::class, $registrierung); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + return $this->redirectToRoute('daten_pruefen'); + } + + return $this->render('registrierung/update.html.twig', [ + 'registrierung' => $registrierung, + 'form' => $form->createView(), + ]); + } + + #[Route(path: '/{id}', name: 'registrierung_show', methods: 'GET')] + public function show(Registrierung $registrierung): Response + { + return $this->render('registrierung/show.html.twig', ['registrierung' => $registrierung]); + } + + #[Route(path: '/{id}/edit', name: 'registrierung_edit', methods: 'GET|POST')] + public function edit(Request $request, Registrierung $registrierung, ManagerRegistry $doctrine): Response + { + $form = $this->createForm(RegistrierungType::class, $registrierung); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $doctrine->getManager()->flush(); + + return $this->redirectToRoute('registrierung_edit', ['id' => $registrierung->getId()]); + } + + return $this->render('registrierung/edit.html.twig', [ + 'registrierung' => $registrierung, + 'form' => $form->createView(), + ]); + } + + #[Route(path: '/{id}', name: 'registrierung_delete', methods: 'DELETE')] + public function delete(Request $request, Registrierung $registrierung, ManagerRegistry $doctrine): Response + { + if ($this->isCsrfTokenValid('delete'.$registrierung->getId(), $request->request->get('_token'))) { + $em = $doctrine->getManager(); + $em->remove($registrierung); + $em->flush(); + } + + return $this->redirectToRoute('registrierung_index'); + } +} diff --git a/src/Controller/SchuelerController.php b/src/Controller/SchuelerController.php new file mode 100644 index 0000000..8ca3bbc --- /dev/null +++ b/src/Controller/SchuelerController.php @@ -0,0 +1,124 @@ +render('schueler/index.html.twig', ['schuelers' => $schuelerRepository->findAll()]); + } + + #[Route(path: '/', name: 'schueler_new', methods: 'GET|POST')] + public function new(Request $request): Response + { + + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + if(!empty($session->get('registrierung')->getSchueler())) { + $schueler = $session->get('registrierung')->getSchueler(); + } else { + $schueler = new Schueler(); + } + $form = $this->createForm(SchuelerType::class, $schueler); + $form->handleRequest($request); + if($form->isSubmitted() && $form->isValid()) { + $schueler = $form->getData(); + + $session->get('registrierung')->setSchueler($schueler); + return $this->redirectToRoute('kontaktperson_index'); + } + return $this->render('schueler/new.html.twig', [ + 'form' => $form->createView() + ]); + } + + /** + * @param Request $request + * @return Response + */ + #[Route(path: '/update', name: 'schueler_update', methods: 'GET|POST')] + public function update(Request $request) + { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + if(!empty($session->get('registrierung')->getSchueler())) { + $schueler = $session->get('registrierung')->getSchueler(); + } else { + $request->getSession()->invalidate(); + return $this->redirectToRoute('anmeldung_start'); + } + $form = $this->createForm(SchuelerType::class, $schueler); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $session->get('registrierung')->setSchueler($form->getData()); + return $this->redirectToRoute('daten_pruefen'); + } + + return $this->render('schueler/update.html.twig', [ + 'schueler' => $schueler, + 'form' => $form->createView(), + ]); + } + + #[Route(path: '/{id}', name: 'schueler_show', methods: 'GET')] + public function show(Schueler $schueler): Response + { + return $this->render('schueler/show.html.twig', ['schueler' => $schueler]); + } + + #[Route(path: '/{id}/edit', name: 'schueler_edit', methods: 'GET|POST')] + public function edit(Request $request, Schueler $schueler, ManagerRegistry $doctrine): Response + { + $form = $this->createForm(SchuelerType::class, $schueler); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $doctrine->getManager()->flush(); + + return $this->redirectToRoute('schueler_edit', ['id' => $schueler->getId()]); + } + + return $this->render('schueler/edit.html.twig', [ + 'schueler' => $schueler, + 'form' => $form->createView(), + ]); + } + + #[Route(path: '/{id}', name: 'schueler_delete', methods: 'DELETE')] + public function delete(Request $request, Schueler $schueler, ManagerRegistry $doctrine): Response + { + if ($this->isCsrfTokenValid('delete'.$schueler->getId(), $request->request->get('_token'))) { + $em = $doctrine->getManager(); + $em->remove($schueler); + $em->flush(); + } + + return $this->redirectToRoute('schueler_index'); + } +} diff --git a/src/Controller/SchulbesuchController.php b/src/Controller/SchulbesuchController.php new file mode 100644 index 0000000..5b390ac --- /dev/null +++ b/src/Controller/SchulbesuchController.php @@ -0,0 +1,104 @@ +hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + $schulen[] = $this->getVerified($doctrine); + $schulbesuch = new Schulbesuch(); + if($session->has('schule')) { + $schule = $session->get('schule'); + $schulen[] = $schule; + $doctrine->getManager()->persist($schule); + } else { + $schule = null; + } + + $form = $this->createForm(SchulbesuchType::class, $schulbesuch, ['schulen' => $schulen, 'schule' => $schule]); + + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $schulbesuch = $form->getData(); + if($session->has('schule')) { + $schulbesuch->setSchule($session->get('schule')); + $session->remove('schule'); + } + $session->get('registrierung')->getSchueler()->addSchulbesuch($form->getData()); + + return $this->redirectToRoute('vorbildung_index'); + } + + return $this->render('schulbesuch/new.html.twig', [ + 'schulbesuch' => $schulbesuch, + 'form' => $form->createView(), + 'buttonPath' => 'vorbildung_index' + ]); + } + #[Route(path: '/update', name: 'schulbesuch_update', methods: ['GET', 'POST'])] + public function update(Request $request, ManagerRegistry $doctrine): Response { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + $schulbesuch = new Schulbesuch(); + $session->set('update', true); + $schulen[] = $this->getVerified($doctrine); + if($session->has('schule')) { + $schule = $session->get('schule'); + $doctrine->getManager()->persist($schule); + $schulen[] = $schule; + } else { + $schule = null; + } + $form = $this->createForm(SchulbesuchType::class, new Schulbesuch(), [ + 'schule' => $schule, + 'schulen' => $schulen + ]); + $form->handleRequest($request); + if($form->isSubmitted() && $form->isValid()) { + $schulbesuch = $form->getData(); + if($session->has('schule')) { + $schulbesuch->setSchule($session->get('schule')); + $session->remove('schule'); + } + $session->remove('update'); + $session->get('registrierung')->getSchueler()->addSchulbesuch($schulbesuch); + return $this->redirectToRoute('daten_pruefen'); + } + return $this->render('schulbesuch/new.html.twig', [ + 'schulbesuch' => $schulbesuch, + 'form' => $form->createView(), + 'buttonPath' => 'daten_pruefen' + ]); + } + + private function getVerified(ManagerRegistry $doctrine) { + return $doctrine->getRepository(Schule::class)->findAllVerified(); + } +} diff --git a/src/Controller/SchuleController.php b/src/Controller/SchuleController.php new file mode 100644 index 0000000..e3142ad --- /dev/null +++ b/src/Controller/SchuleController.php @@ -0,0 +1,95 @@ +render('schule/index.html.twig', [ + 'schules' => $schuleRepository->findAll(), + ]); + } + + #[Route(path: '/neu', name: 'schule_new', methods: ['GET', 'POST'])] + public function new(Request $request): Response + { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + $schule = new Schule(); + $form = $this->createForm(SchuleType::class, $schule); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $schule = $form->getData(); + $schule->setIstVerifiziert(false); + $session->set('schule', $schule); + if($session->has('update')) { + return $this->redirectToRoute('schulbesuch_update'); + } else { + return $this->redirectToRoute('schulbesuch_new'); + } + } + + return $this->render('schule/new.html.twig', [ + 'form' => $form->createView(), + ]); + } + + #[Route(path: '/{id}', name: 'schule_show', methods: ['GET'])] + public function show(Schule $schule): Response + { + return $this->render('schule/show.html.twig', [ + 'schule' => $schule, + ]); + } + + #[Route(path: '/{id}/edit', name: 'schule_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Schule $schule, ManagerRegistry $doctrine): Response + { + $form = $this->createForm(SchuleType::class, $schule); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $doctrine->getManager()->flush(); + + return $this->redirectToRoute('schule_index', [ + 'id' => $schule->getId(), + ]); + } + + return $this->render('schule/edit.html.twig', [ + 'schule' => $schule, + 'form' => $form->createView(), + ]); + } + + #[Route(path: '/{id}', name: 'schule_delete', methods: ['DELETE'])] + public function delete(Request $request, Schule $schule, ManagerRegistry $doctrine): Response + { + if ($this->isCsrfTokenValid('delete'.$schule->getId(), $request->request->get('_token'))) { + $entityManager = $doctrine->getManager(); + $entityManager->remove($schule); + $entityManager->flush(); + } + + return $this->redirectToRoute('schule_index'); + } +} diff --git a/src/Controller/UmschuelerController.php b/src/Controller/UmschuelerController.php new file mode 100644 index 0000000..a1e8c3e --- /dev/null +++ b/src/Controller/UmschuelerController.php @@ -0,0 +1,111 @@ +render('umschueler/index.html.twig', ['umschuelers' => $umschuelerRepository->findAll()]); + } + #[Route(path: '/', name: 'umschueler_new', methods: 'GET|POST')] + public function new(Request $request): Response + { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + if(!empty($session->get('registrierung')->getSchueler()->getUmschueler())) { + $umschueler = $session->get('registrierung')->getSchueler()->getUmschueler(); + } else { + $umschueler = new Umschueler(); + } + + $form = $this->createForm(UmschuelerType::class, $umschueler); + $form->handleRequest($request); + if($form->isSubmitted() && $form->isValid()) { + $session->get('registrierung')->getSchueler()->setUmschueler($umschueler); + //return $this->redirectToRoute('schueler_new'); + return $this->redirectToRoute('ausbildung_new'); + } + return $this->render('umschueler/new.html.twig', [ + 'form' => $form->createView() + ]); + } + /** + * @param Request $request + * @return Response + */ + #[Route(path: '/update', name: 'umschueler_update', methods: 'GET|POST')] + public function update(Request $request) + { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + if(!empty($session->get('registrierung')->getSchueler()->getUmschueler())) { + $umschueler = $session->get('registrierung')->getSchueler()->getUmschueler(); + } else { + $request->getSession()->invalidate(); + return $this->redirectToRoute('anmeldung_start'); + } + $form = $this->createForm(UmschuelerType::class, $umschueler); + $form->handleRequest($request); + if ($form->isSubmitted() && $form->isValid()) { + $session->get('registrierung')->getSchueler()->setUmschueler($form->getData()); + return $this->redirectToRoute('daten_pruefen'); + } + return $this->render('umschueler/update.html.twig', [ + 'umschueler' => $umschueler, + 'form' => $form->createView(), + ]); + } + #[Route(path: '/{id}', name: 'umschueler_show', methods: 'GET')] + public function show(Umschueler $umschueler): Response + { + return $this->render('umschueler/show.html.twig', ['umschueler' => $umschueler]); + } + #[Route(path: '/{id}/edit', name: 'umschueler_edit', methods: 'GET|POST')] + public function edit(Request $request, Umschueler $umschueler, ManagerRegistry $doctrine): Response + { + $form = $this->createForm(UmschuelerType::class, $umschueler); + $form->handleRequest($request); + if ($form->isSubmitted() && $form->isValid()) { + $doctrine->getManager()->flush(); + return $this->redirectToRoute('umschueler_edit', ['id' => $umschueler->getId()]); + } + return $this->render('umschueler/edit.html.twig', [ + 'umschueler' => $umschueler, + 'form' => $form->createView(), + ]); + } + #[Route(path: '/{id}', name: 'umschueler_delete', methods: 'DELETE')] + public function delete(Request $request, Umschueler $umschueler, ManagerRegistry $doctrine): Response + { + if ($this->isCsrfTokenValid('delete'.$umschueler->getId(), $request->request->get('_token'))) { + $em = $doctrine->getManager(); + $em->remove($umschueler); + $em->flush(); + } + return $this->redirectToRoute('umschueler_view'); + } +} \ No newline at end of file diff --git a/src/Controller/VorbildungController.php b/src/Controller/VorbildungController.php new file mode 100644 index 0000000..235422a --- /dev/null +++ b/src/Controller/VorbildungController.php @@ -0,0 +1,68 @@ +hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + $schueler = $session->get('registrierung')->getSchueler(); + $form = $this->createForm(VorbildungType::class, $schueler); + $form->handleRequest($request); + if($form->get('save')->isClicked() || $form->isSubmitted() && $form->isValid()) { + $session->get('registrierung')->setSchueler($form->getData()); + + return $this->redirectToRoute('allgemein_new'); + } + return $this->render('vorbildung/index.html.twig', [ + 'form' => $form->createView(), + 'schulbesuche' => $session->get('registrierung')->getSchueler()->getSchulbesuche(), + ]); + } + #[Route(path: '/update', name: 'vorbildung_update', methods: ['GET|POST'])] + public function update(Request $request): Response + { + if($request->hasSession() && $request->getSession()->has('registrierung')) { + $session = $request->getSession(); + } else { + if($request->hasSession()) { + $request->getSession()->invalidate(); + } + return $this->redirectToRoute('anmeldung_start'); + } + if(!empty($session->get('registrierung')->getSchueler())) { + $schueler = $session->get('registrierung')->getSchueler(); + } else { + $request->getSession()->invalidate(); + return $this->redirectToRoute('anmeldung_start'); + } + $form = $this->createForm(VorbildungType::class, $schueler); + $form->handleRequest($request); + + if($form->isSubmitted() && $form->isValid()) { + $session->get('registrierung')->setSchueler($form->getData()); + + return $this->redirectToRoute('daten_pruefen'); + } + return $this->render('vorbildung/update.html.twig', [ + 'form' => $form->createView(), + 'schulbesuche' => $session->get('registrierung')->getSchueler()->getSchulbesuche(), + ]); + } +} diff --git a/src/DataFixtures/AdminUserFixtures.php b/src/DataFixtures/AdminUserFixtures.php new file mode 100644 index 0000000..6e6616e --- /dev/null +++ b/src/DataFixtures/AdminUserFixtures.php @@ -0,0 +1,36 @@ +passwordEncoder = $passwordEncoder; + } + + public function load(ObjectManager $manager): void + { + + $user = new AdminUser(1); + $user->setEmail('admin@bs1-bt.de'); + $user->setRoles($user->getRoles()); + + $user->setPassword($this->passwordEncoder->hashPassword( + $user, 'test123' + )); + + $manager->persist($user); + $manager->flush(); + } + + +} diff --git a/src/DataFixtures/AppFixtures.php b/src/DataFixtures/AppFixtures.php new file mode 100644 index 0000000..987f6fe --- /dev/null +++ b/src/DataFixtures/AppFixtures.php @@ -0,0 +1,17 @@ +persist($product); + + $manager->flush(); + } +} diff --git a/src/Entity/.gitignore b/src/Entity/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/src/Entity/AdminUser.php b/src/Entity/AdminUser.php new file mode 100644 index 0000000..97c3e93 --- /dev/null +++ b/src/Entity/AdminUser.php @@ -0,0 +1,108 @@ +id; + } + + public function getEmail(): ?string + { + return $this->email; + } + + public function setEmail(string $email): self + { + $this->email = $email; + + return $this; + } + + /** + * A visual identifier that represents this user. + * + * @see UserInterface + */ + public function getUsername(): string + { + return (string) $this->email; + } + + /** + * @see UserInterface + */ + public function getRoles(): array + { + return array('ROLE_USER', 'ROLE_ADMIN'); + } + + public function setRoles(array $roles): self + { + $this->roles = json_encode($roles); + return $this; + } + + /** + * @see UserInterface + */ + public function getPassword(): string + { + return (string) $this->password; + } + + public function setPassword(string $password): self + { + $this->password = $password; + + return $this; + } + + public function getUserIdentifier(): string { + return $this->email; + } + + /** + * @see UserInterface + */ + public function getSalt(): void + { + // not needed when using the "bcrypt" algorithm in security.yaml + } + + /** + * @see UserInterface + */ + public function eraseCredentials(): void + { + // If you store any temporary, sensitive data on the user, clear it here + // $this->plainPassword = null; + } +} diff --git a/src/Entity/Ausbildung.php b/src/Entity/Ausbildung.php new file mode 100644 index 0000000..048538e --- /dev/null +++ b/src/Entity/Ausbildung.php @@ -0,0 +1,118 @@ +id; + } + + public function getBeginn(): ?\DateTimeInterface + { + return $this->beginn; + } + + public function setBeginn(\DateTimeInterface $beginn): self + { + $this->beginn = $beginn; + + return $this; + } + + public function getEnde(): ?\DateTimeInterface + { + return $this->ende; + } + + public function setEnde(\DateTimeInterface $ende): self + { + $this->ende = $ende; + + return $this; + } + + public function getAusbilderemail(): ?string + { + return $this->ausbilderemail; + } + + public function setAusbilderemail(string $ausbilderemail): self + { + $this->ausbilderemail = $ausbilderemail; + + return $this; + } + + public function getSchueler(): ?Schueler + { + return $this->schueler; + } + + public function setSchueler(?Schueler $schueler): self + { + $this->schueler = $schueler; + + // set (or unset) the owning side of the relation if necessary + $newAusbildung = $schueler === null ? null : $this; + if ($newAusbildung !== $schueler->getAusbildung()) { + $schueler->setAusbildung($newAusbildung); + } + + return $this; + } + + public function getBetrieb(): ?Betrieb + { + return $this->betrieb; + } + + public function setBetrieb(?Betrieb $betrieb): self + { + $this->betrieb = $betrieb; + + return $this; + } + + public function getBeruf(): ?Beruf + { + return $this->beruf; + } + + public function setBeruf(?Beruf $beruf): self + { + $this->beruf = $beruf; + + return $this; + } +} diff --git a/src/Entity/Beruf.php b/src/Entity/Beruf.php new file mode 100644 index 0000000..dec1c39 --- /dev/null +++ b/src/Entity/Beruf.php @@ -0,0 +1,72 @@ +id; + } + + public function getBezeichnung(): ?string + { + return $this->bezeichnung; + } + + public function setBezeichnung(string $bezeichnung): self + { + $this->bezeichnung = $bezeichnung; + + return $this; + } + + public function __toString() + { + return $this->getBezeichnung(); + } + + public function getKlasse(): ?string + { + return $this->klasse; + } + + public function setKlasse(?string $klasse): self + { + $this->klasse = $klasse; + + return $this; + } + + public function getNummer(): ?int + { + return $this->nummer; + } + + public function setNummer(int $nummer): self + { + $this->nummer = $nummer; + + return $this; + } +} diff --git a/src/Entity/Betrieb.php b/src/Entity/Betrieb.php new file mode 100644 index 0000000..c7bada7 --- /dev/null +++ b/src/Entity/Betrieb.php @@ -0,0 +1,319 @@ + false])] + private $istVerifiziert; + + #[ORM\Column(type: 'boolean', options: ['default' => false])] + private $asv_import; + + #[ORM\Column(type: 'string', length: 8, nullable: true)] + private $gemeindeschluessel; + + #[ORM\Column(type: 'integer')] + private $kammer; + + #[ORM\Column(type: 'string', length: 255)] + private $kuerzel = ''; + + private $kammerReadable = ''; + + private const KAMMERN = [ + 'HWK Bayreuth' => 102, + 'IHK Bayreuth' => 153, + 'IHK Coburg' => 154, + 'IHK Aschaffenburg' => 151, + 'HWK Augsburg' => 101, + 'IHK Augsburg' => 152, + 'IHK Lindau' => 155, + 'IHK München' => 156, + 'HWK Nürnberg' => 105, + 'IHK Nürnberg' => 157, + 'HWK Passau' => 106, + 'IHK Passau' => 158, + 'HWK Regensburg' => 107, + 'IHK Regensburg' => 159, + 'HWK Würzburg' => 108, + 'IHK Würzburg-Schweinfurt' => 160, + 'sonstige' => 000, + ]; + + private const KAMMERNREAD = [ + 102 => 'HWK Bayreuth', + 153 => 'IHK Bayreuth', + 154 => 'IHK Coburg', + 151 => 'IHK Aschaffenburg', + 101 => 'HWK Augsburg', + 152 => 'IHK Augsburg', + 155 => 'IHK Lindau', + 156 => 'IHK München', + 105 => 'HWK Nürnberg', + 157 => 'IHK Nürnberg', + 106 => 'HWK Passau', + 158 => 'IHK Passau', + 107 => 'HWK Regensburg', + 159 => 'IHK Regensburg', + 108 => 'HWK Würzburg', + 160 => 'IHK Würzburg-Schweinfurt', + 000 => 'sonstige', + ]; + + + public function getId(): ?int + { + return $this->id; + } + + public function getName(): ?string + { + return $this->name; + } + + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + public function getAnsprPartner(): ?string + { + return $this->ansprPartner; + } + + public function setAnsprPartner(?string $ansprPartner): self + { + $this->ansprPartner = $ansprPartner; + + return $this; + } + + public function getStrasse(): ?string + { + return $this->strasse; + } + + public function setStrasse(string $strasse): self + { + $this->strasse = $strasse; + + return $this; + } + + public function getHsnr(): ?string + { + return $this->hsnr; + } + + public function setHsnr(string $hsnr): self + { + $this->hsnr = $hsnr; + + return $this; + } + + public function getPlz(): ?string + { + return $this->plz; + } + + public function setPlz(string $plz): self + { + $this->plz = $plz; + + return $this; + } + + public function getOrt(): ?string + { + return $this->ort; + } + + public function setOrt(string $ort): self + { + $this->ort = $ort; + + return $this; + } + + public function getTelZentrale(): ?string + { + return $this->telZentrale; + } + + public function setTelZentrale(string $telZentrale): self + { + $this->telZentrale = $telZentrale; + + return $this; + } + + public function getTelDurchwahl(): ?string + { + return $this->telDurchwahl; + } + + public function setTelDurchwahl(?string $telDurchwahl): self + { + $this->telDurchwahl = $telDurchwahl; + + return $this; + } + + public function getFax(): ?string + { + return $this->fax; + } + + public function setFax(?string $fax): self + { + $this->fax = $fax; + + return $this; + } + + public function getEmail(): ?string + { + return $this->email; + } + + public function setEmail(string $email): self + { + $this->email = $email; + + return $this; + } + + public function getIstVerifiziert(): ?bool + { + return $this->istVerifiziert; + } + + public function setIstVerifiziert(bool $istVerifiziert): self + { + $this->istVerifiziert = $istVerifiziert; + + return $this; + } + + public function getAsvImport(): ?bool + { + return $this->asv_import; + } + + public function setAsvImport(bool $asv_import): self + { + $this->asv_import = $asv_import; + + return $this; + } + + public function getGemeindeschluessel(): ?string + { + return $this->gemeindeschluessel; + } + + public function setGemeindeschluessel(string $gemeindeschluessel): self + { + $this->gemeindeschluessel = $gemeindeschluessel; + + return $this; + } + + public function __toString() + { + return $this->getName() . ', ' . $this->getStrasse() .' ' . $this->getHsnr() ; + } + + public function getKammer(): ?int + { + return $this->kammer; + } + + public function getKammerReadable() + { + return $this->kammerReadable; + } + + public function getKammerText(int $kammerNr) + { + return self::KAMMERNREAD[$kammerNr]; + } + + public static function getKammern() + { + return self::KAMMERN; + } + + private function setKammerReadable(int $kammer): void + { + $kammerReadable = array_search($kammer, self::KAMMERN); + if($kammerReadable === false) + $kammerReadable = 'Fehler'; + $this->kammerReadable = $kammerReadable; + } + + public function setKammer(int $kammer): self + { + $this->kammer = $kammer; + $this->setKammerReadable($kammer); + return $this; + } + + public function getKuerzel(): ?string + { + return $this->kuerzel; + } + + public function setKuerzel(string $kuerzel): self + { + $this->kuerzel = $kuerzel; + + return $this; + } +} diff --git a/src/Entity/Fluechtling.php b/src/Entity/Fluechtling.php new file mode 100644 index 0000000..3f7134a --- /dev/null +++ b/src/Entity/Fluechtling.php @@ -0,0 +1,103 @@ +id; + } + + public function getAnmeldeStelle(): ?string + { + return $this->anmeldeStelle; + } + + public function setAnmeldeStelle(string $anmeldeStelle): self + { + $this->anmeldeStelle = $anmeldeStelle; + + return $this; + } + + public function getAnsprechPartner(): ?string + { + return $this->ansprechPartner; + } + + public function setAnsprechPartner(string $ansprechPartner): self + { + $this->ansprechPartner = $ansprechPartner; + + return $this; + } + + public function getTel(): ?string + { + return $this->tel; + } + + public function setTel(string $tel): self + { + $this->tel = $tel; + + return $this; + } + + public function getSchueler(): ?Schueler + { + return $this->schueler; + } + + public function setSchueler(?Schueler $schueler): self + { + $this->schueler = $schueler; + + // set (or unset) the owning side of the relation if necessary + $newFluechtlingDaten = $schueler === null ? null : $this; + if ($newFluechtlingDaten !== $schueler->getFluechtling()) { + $schueler->setFluechtling($newFluechtlingDaten); + } + + return $this; + } + + public function getDeutschKenntnis(): ?int + { + return $this->deutschKenntnis; + } + + public function setDeutschKenntnis(int $deutschKenntnis): self + { + $this->deutschKenntnis = $deutschKenntnis; + + return $this; + } + +} diff --git a/src/Entity/Kontaktperson.php b/src/Entity/Kontaktperson.php new file mode 100644 index 0000000..2c4c0b5 --- /dev/null +++ b/src/Entity/Kontaktperson.php @@ -0,0 +1,186 @@ +id; + } + + public function getAnrede(): ?string + { + return $this->anrede; + } + + public function setAnrede(string $anrede): self + { + $this->anrede = $anrede; + + return $this; + } + + public function getVorname(): ?string + { + return $this->vorname; + } + + public function setVorname(string $vorname): self + { + $this->vorname = $vorname; + + return $this; + } + + public function getNachname(): ?string + { + return $this->nachname; + } + + public function setNachname(string $nachname): self + { + $this->nachname = $nachname; + + return $this; + } + + public function getStrasse(): ?string + { + return $this->strasse; + } + + public function setStrasse(string $strasse): self + { + $this->strasse = $strasse; + + return $this; + } + + public function getHausnummer(): ?string + { + return $this->hausnummer; + } + + public function setHausnummer(string $hausnummer): self + { + $this->hausnummer = $hausnummer; + + return $this; + } + + public function getPlz(): ?string + { + return $this->plz; + } + + public function setPlz(string $plz): self + { + $this->plz = $plz; + + return $this; + } + + public function getOrt(): ?string + { + return $this->ort; + } + + public function setOrt(string $ort): self + { + $this->ort = $ort; + + return $this; + } + + public function getTelefonnummer(): ?string + { + return $this->telefonnummer; + } + + public function setTelefonnummer(?string $telefonnummer): self + { + $this->telefonnummer = $telefonnummer; + + return $this; + } + + public function getEmail(): ?string + { + return $this->email; + } + + public function setEmail(?string $email): self + { + $this->email = $email; + + return $this; + } + + public function getSchueler(): ?Schueler + { + return $this->schueler; + } + + public function setSchueler(?Schueler $schueler): self + { + $this->schueler = $schueler; + + return $this; + } + + public function getArt(): ?string + { + return $this->art; + } + + public function setArt(?string $art): self + { + $this->art = $art; + + return $this; + } +} diff --git a/src/Entity/Registrierung.php b/src/Entity/Registrierung.php new file mode 100644 index 0000000..9224945 --- /dev/null +++ b/src/Entity/Registrierung.php @@ -0,0 +1,195 @@ + 'Ausbildung mit Ausbildungsvertrag', + 'EQ' => 'EQ-Maßnahme', + 'UM' => 'Umschüler mit Vertrag', + 'BGJH' => 'Berufsgrundschuljahr Bautechnik: Holztechnik (Schreiner/Holzmechaniker)', + 'BGJZ' => 'Berufsgrundschuljahr Bautechnik: Zimmerer', + 'OBA' => 'ohne Berufstätigkeit und arbeitslos', + 'UAR' => 'ungelernte Arbeitskräfte', + 'MF' => 'Mithelfende Familienangehörige', + 'AUPR' => 'Ausbildung mit Praktikumsvertrag', + 'BVJ' => 'Berufsvorbereitungsjahr', + 'BIK' => 'Klasse für Flüchtlinge und Asylbewerber', + ]; + + public function getId(): ?int + { + return $this->id; + } + + public function getDatum(): ?\DateTimeInterface + { + return $this->datum; + } + + public function setDatum(\DateTimeInterface $datum): self + { + $this->datum = $datum; + + return $this; + } + + public function getMitteilung(): ?string + { + return $this->mitteilung; + } + + public function setMitteilung(?string $mitteilung): self + { + $this->mitteilung = $mitteilung; + + return $this; + } + + public function getWohnheim(): ?bool + { + return $this->wohnheim; + } + + public function setWohnheim(bool $wohnheim): self + { + $this->wohnheim = $wohnheim; + + return $this; + } + + public function getEintrittAm(): ?\DateTimeInterface + { + return $this->eintrittAm; + } + + public function setEintrittAm(\DateTimeInterface $eintrittAm): self + { + $this->eintrittAm = $eintrittAm; + + return $this; + } + + public function getIp(): ?string + { + return $this->ip; + } + + public function setIp(string $ip): self + { + $this->ip = $ip; + + return $this; + } + + public function getTyp(): ?string + { + return $this->typ; + } + + public function getTypText(string $typ) + { + return self::AUSBART[$typ]; + } + + public function setTyp(string $typ): self + { + $this->typ = $typ; + + return $this; + } + + public function getSchueler(): ?Schueler + { + return $this->schueler; + } + + public function setSchueler(Schueler $schueler): self + { + $this->schueler = $schueler; + + return $this; + } + + public function __toString() + { + return (string)$this->getId(); + } + + public function getDatenschutz(): ?bool + { + return $this->datenschutz; + } + + public function setDatenschutz(bool $datenschutz): self + { + $this->datenschutz = $datenschutz; + + return $this; + } + + public function getExportedAt(): ?\DateTimeInterface + { + return $this->exportedAt; + } + + public function setExportedAt(?\DateTimeInterface $exportedAt): self + { + $this->exportedAt = $exportedAt; + + return $this; + } + + public function getSchuljahr(): ?string + { + return $this->schuljahr; + } + + public function setSchuljahr($schuljahr): self + { + $this->schuljahr = $schuljahr; + + return $this; + } +} diff --git a/src/Entity/Schueler.php b/src/Entity/Schueler.php new file mode 100644 index 0000000..08602c2 --- /dev/null +++ b/src/Entity/Schueler.php @@ -0,0 +1,666 @@ +"AFG","EG"=>"ET","AL"=>"AL","DZ"=>"DZ","AD"=>"AND","AO"=>"ANG","AQ"=>"ARK","AG"=>"AG","GQ"=>"GQ","SY"=>"SYR","AR"=>"RA","AM"=>"AM","AZ"=>"AZ","ET"=>"ETH","AU"=>"AUS","BS"=>"BS","BH"=>"BRN","BD"=>"BD","BB"=>"BDS","BE"=>"B","BZ"=>"BH","BJ"=>"DY","BT"=>"BHT","VE"=>"YV","BA"=>"BIH","BW"=>"BW","BR"=>"BR","BN"=>"BRU","BG"=>"BG","DE"=>"D","BF"=>"BF","BI"=>"RU","CV"=>"CV","CL"=>"RCH","CN"=>"RC","HK"=>"HKG","MO"=>"MAC","CK"=>"COI","CR"=>"CR","CI"=>"CI","DK"=>"DK","CD"=>"ZRE","KP"=>"NOK","LA"=>"LAO","DM"=>"WD","DO"=>"DOM","DJ"=>"DJI","EC"=>"EC","SV"=>"ES","ER"=>"ER","EE"=>"EST","SZ"=>"SD","FJ"=>"FJI","FI"=>"FIN","FM"=>"FSM","FR"=>"F","GA"=>"G","GM"=>"WAG","GE"=>"GE","GH"=>"GH","GI"=>"GBZ","GD"=>"WG","GR"=>"GR","GT"=>"GCA","GN"=>"RG","GW"=>"GUB","GY"=>"GUY","HT"=>"RH","HN"=>"HN","IN"=>"IND","ID"=>"RI","IQ"=>"IRQ","IE"=>"IRL","IR"=>"IR","IS"=>"IS","IL"=>"IL","IT"=>"I","JM"=>"JA","JP"=>"J","YE"=>"YAR","JO"=>"HKJ","KH"=>"K","CM"=>"CAM","CA"=>"CDN","KZ"=>"KZ","QA"=>"Q","KE"=>"EAK","KG"=>"KS","KI"=>"KIR","CO"=>"CO","KM"=>"COM","CG"=>"RCB","XK"=>"XK","HR"=>"HR","CU"=>"CU","KW"=>"KWT","LS"=>"LS","LV"=>"LV","LB"=>"RL","LR"=>"LB","LY"=>"LAR","LI"=>"FL","LT"=>"LT","LU"=>"L","MG"=>"RM","MW"=>"MW","MY"=>"MAL","MV"=>"MV","ML"=>"RMM","MT"=>"M","MA"=>"MA","MH"=>"MH","MR"=>"RIM","MU"=>"MS","MX"=>"MEX","MC"=>"MC","MN"=>"MGL","ME"=>"MNE","MZ"=>"MOC","MM"=>"BUR","NA"=>"NAM","NR"=>"NAU","NP"=>"NEP","NZ"=>"NZ","NI"=>"NIC","NL"=>"NL","NE"=>"RN","NG"=>"WAN","NU"=>"NIU","MK"=>"MK","NO"=>"N","OM"=>"OM","AT"=>"A","PK"=>"PK","PW"=>"PAL","PA"=>"PA","PG"=>"PNG","PY"=>"PY","PE"=>"PE","PH"=>"RP","BO"=>"BOL","PL"=>"PL","PT"=>"P","KR"=>"ROK","MD"=>"MD","RW"=>"RWA","RO"=>"RO","RU"=>"RUS","SB"=>"SOL","ZM"=>"RNR","WS"=>"WS","SM"=>"RSM","ST"=>"STP","SA"=>"SA","SE"=>"S","CH"=>"CH","SN"=>"SN","RS"=>"SRB","SC"=>"SY","SL"=>"WAL","ZW"=>"ZW","SG"=>"SGP","SK"=>"SK","SI"=>"SLO","SO"=>"SO","ES"=>"E","LK"=>"CL","KN"=>"KAN","LC"=>"WL","VC"=>"WV","ZA"=>"ZA","SD"=>"SUD","SS"=>"SSD","SR"=>"SME","TJ"=>"TJ","TW"=>"TWN","TH"=>"T","TL"=>"TL","TG"=>"TG","TO"=>"TON","TT"=>"TT","TD"=>"TD","CZ"=>"CZ","TN"=>"TN","TR"=>"TR","TM"=>"TM","TV"=>"TUV","UG"=>"EAU","UA"=>"UA","HU"=>"H","UY"=>"ROU","UZ"=>"UZ","VU"=>"VAN","VA"=>"SCV","AE"=>"UAE","TZ"=>"EAT","US"=>"USA","GB"=>"GB","VN"=>"VN","BY"=>"BY","CF"=>"RCA","CY"=>"CY"); + private $zuzugsartReadable; + private $hoechsterAbschlussReadable; + private $letzteSchulartReadable; + private $hoechAbschlAnReadable; + private $bekenntnisReadable; + private const BEKENNTNISSE = [ + 'römisch-katholisch' => 'RK', + 'evangelisch' => 'EV', + 'islamisch' => 'IL', + 'orthodox' => 'OX', + 'syrisch-orthodox' => 'SO', + 'alevitisch' => 'AL', + 'israelitisch' => 'IS', + 'neuapostolisch' => 'NA', + 'Sieben Tags-Adven.' => 'ST', + 'alt-katholisch' => 'AK', + 'sonstige' => 'SR', + 'ohne Religionszugehörigkeit' => 'OR' + ]; + private const LETZTE_SCHULARTEN = [ + 'Mittelschule/Hauptschule' => 'MS', + 'Förderzentrum' => 'FZ', + 'Realschule' => 'RS', + 'Realschule z. sp. F.' => 'RSF', + 'Gymnasium' => 'GY', + 'Integrierte Gesamtschule' => 'IGS', + 'Freie Waldorfschule' => 'FWS', + 'Wirtschaftsschule' => 'WS', + 'Wirtschaftsschule z. sp. F.' => 'WSF', + 'Fachoberschule' => 'FOS', + 'Berufsoberschule' => 'BOS', + 'Berufsschule' => 'BS', + 'Berufsschule z. sp. F.' => 'BSF', + 'Berufsfachschule' => 'BFS', + 'Berufsfachschule Ges.W.' => 'BFG', + 'Fachschule' => 'FS', + 'Fachakademie' => 'FAK', + 'Abendrealschule' => 'ARS', + 'Abendgymnasium' => 'AGY', + 'Kolleg' => 'KOL', + 'andere Schulart' => 'AN', + 'Maßnahme Arbeitsverwaltung' => 'AV', + 'Zuzug Aussiedler' => 'AS', + 'Zuzug Ausländer' => 'AL', + 'keine Schule' => '' + ]; + + private const HOECHSTE_ABSCHLUESSE = [ + 'erfüllte Schulpflicht ohne Abschluss' => 'OM', + 'Mittelschulabschluss ohne Quali' => 'MSOQ', + 'Qualifizierter Mittelschulabschluss' => 'QUAL', + 'mittlerer Schulabschluss' => 'M', + 'Fachhochschulreife' => 'FHSR', + 'Fachgebundene Fachhochschulreife' => 'F', + 'Allgemeine Hochschulreife' => 'A', + 'Fachgebundene Hochschulreife' => 'FGHS', + 'Abschluss Bildungsgang FS Lernen' => 'AL', + 'sonstiger Abschluss' => 'SONS' + ]; + private const HOECHSTE_ABSCHLUESSE_AN = [ + 'Mittelschule/Hauptschule' => 'MS', + 'Realschule' => 'RS', + 'Wirtschaftsschule' => 'WS', + 'Gymnasium' => 'GY', + 'Berufsschule' => 'BS', + 'Fachoberschule' => 'FOS', + 'Berufsoberschule' => 'BOS', + 'Berufsfachschule Gesundheitsw.' => 'BFG', + 'Berufsfachschule' => 'BFS', + 'Berufsschule z. sp. F.' => 'BSF', + 'Fachakademie' => 'FAK', + 'Fachschule' => 'FS', + 'Freie Waldorfschule' => 'FWS', + 'Förderzentrum' => 'FZ', + 'Gymnasium z. sp. F.' => 'GYF', + 'Integrierte Gesamtschule' => 'IGS', + 'Realschule z. sp. F.' => 'RSF', + 'Begabtenprüfung (am StMUK)' => 'SNB_Begabt', + 'Telekolleg' => 'SNB_TelKol', + 'andere Schulart' => 'AN' + ]; + + private const ZUZUGSARTEN = [ + 'Aussiedler' => 'AU', + 'Asylberechtigter' => 'AY', + 'Asylbewerber' => 'AYB', + 'Kriegsflüchtling' => 'KF', + 'Ausländer (nicht Asylbew.)' => 'AS', + 'sonstiger Zuzug' => 'SO' + ]; + + + public function __construct() + { + $this->kontaktpersonen = new ArrayCollection(); + $this->schulbesuche = new ArrayCollection(); + } + + public function getId(): ?int + { + return $this->id; + } + + public function getVorname(): ?string + { + return $this->vorname; + } + + public function setVorname(string $vorname, bool $uppercase = true): self + { + if($uppercase) + $this->vorname = ucwords($vorname); + + return $this; + } + + public function getNachname(): ?string + { + return $this->nachname; + } + + public function setNachname(string $nachname, bool $uppercase = true): self + { + if($uppercase) + $this->nachname = ucwords($nachname); + + return $this; + } + + public function getRufname(): ?string + { + return $this->rufname; + } + + public function setRufname(string $rufname, bool $uppercase = true): self + { + if($uppercase) + $this->rufname = ucwords($rufname); + + return $this; + } + + public function getGeburtsdatum(): ?\DateTimeInterface + { + return $this->geburtsdatum; + } + + public function setGeburtsdatum(\DateTimeInterface $geburtsdatum): self + { + $this->geburtsdatum = $geburtsdatum; + + return $this; + } + + public function getGeburtsort(): ?string + { + return $this->geburtsort; + } + + public function setGeburtsort(string $geburtsort): self + { + $this->geburtsort = $geburtsort; + + return $this; + } + + /** + * @return Collection|Kontaktperson[] + */ + public function getKontaktpersonen(): Collection + { + return $this->kontaktpersonen; + } + + public function addKontaktperson(Kontaktperson $kontaktperson): self + { + if (!$this->kontaktpersonen->contains($kontaktperson)) { + $this->kontaktpersonen[] = $kontaktperson; + $kontaktperson->setSchueler($this); + } + + return $this; + } + + public function removeKontaktperson(Kontaktperson $kontaktperson): self + { + if ($this->kontaktpersonen->contains($kontaktperson)) { + $this->kontaktpersonen->removeElement($kontaktperson); + // set the owning side to null (unless already changed) + if ($kontaktperson->getSchueler() === $this) { + $kontaktperson->setSchueler(null); + } + } + + return $this; + } + + /** + * @return Collection|Schulbesuch[] + */ + public function getSchulbesuche(): Collection + { + return $this->schulbesuche; + } + + public function addSchulbesuch(Schulbesuch $schulbesuch): self + { + if (!$this->schulbesuche->contains($schulbesuch)) { + $this->schulbesuche[] = $schulbesuch; + $schulbesuch->setSchueler($this); + } + + return $this; + } + + public function removeSchulbesuch(Schulbesuch $schulbesuch): self + { + if ($this->schulbesuche->contains($schulbesuch)) { + $this->schulbesuche->removeElement($schulbesuch); + // set the owning side to null (unless already changed) + if ($schulbesuch->getSchueler() === $this) { + $schulbesuch->setSchueler(null); + } + } + + return $this; + } + + public function getRegistrierung(): ?Registrierung + { + return $this->registrierung; + } + + public function setRegistrierung(Registrierung $registrierung): self + { + $this->registrierung = $registrierung; + + // set the owning side of the relation if necessary + if ($this !== $registrierung->getSchueler()) { + $registrierung->setSchueler($this); + } + + return $this; + } + + public function getAusbildung(): ?Ausbildung + { + return $this->ausbildung; + } + + public function setAusbildung(?Ausbildung $ausbildung): self + { + $this->ausbildung = $ausbildung; + + return $this; + } + + public function getFluechtling(): ?Fluechtling + { + return $this->fluechtling; + } + + public function setFluechtling(?Fluechtling $fluechtling): self + { + $this->fluechtling = $fluechtling; + + return $this; + } + + public function getUmschueler(): ?Umschueler + { + return $this->umschueler; + } + + public function setUmschueler(?Umschueler $umschueler): self + { + $this->umschueler = $umschueler; + + return $this; + } + + public function getGeschlecht(): ?string + { + return $this->geschlecht; + } + + public function setGeschlecht(string $geschlecht): self + { + $this->geschlecht = $geschlecht; + + return $this; + } + + public function getStrasse(): ?string + { + return $this->strasse; + } + + public function setStrasse(string $strasse): self + { + $this->strasse = $strasse; + + return $this; + } + + public function getHsnr(): ?string + { + return $this->hsnr; + } + + public function setHsnr(string $hsnr): self + { + $this->hsnr = $hsnr; + + return $this; + } + + public function getPlz(): ?string + { + return $this->plz; + } + + public function setPlz(string $plz): self + { + $this->plz = $plz; + + return $this; + } + + public function getOrt(): ?string + { + return $this->ort; + } + + public function setOrt(string $ort): self + { + $this->ort = $ort; + + return $this; + } + + public function getTel(): ?string + { + return $this->tel; + } + + public function setTel(string $tel): self + { + $this->tel = $tel; + + return $this; + } + + public function getEmail(): ?string + { + return $this->email; + } + + public function setEmail(string $email): self + { + $this->email = $email; + + return $this; + } + + public function getGeburtsland(): ?string + { + return $this->geburtsland; + } + + public function setGeburtsland(string $geburtsland): self + { + //$this->geburtsland = $geburtsland; + if(array_key_exists($geburtsland, $this->laenderCodes)){ + $this->geburtsland = $this->laenderCodes[$geburtsland]; + $this->geburtslandReadable = Countries::getName($geburtsland); + }else{ + $this->geburtsland = "U"; + $this->geburtslandReadable = "Ungeklärt"; + } + + + + return $this; + } + + public function getGeburtslandReadable() + { + return $this->geburtslandReadable; + } + + public function getStaatsangehoerigkeit(): ?string + { + return $this->staatsangehoerigkeit; + } + + public function setStaatsangehoerigkeit(string $staatsangehoerigkeit): self + { + //$this->staatsangehoerigkeit = $staatsangehoerigkeit; + if(array_key_exists($staatsangehoerigkeit, $this->laenderCodes)){ + $this->staatsangehoerigkeit = $this->laenderCodes[$staatsangehoerigkeit]; + $this->staatsangehoerigkeitReadable = Countries::getName($staatsangehoerigkeit); + }else{ + $this->staatsangehoerigkeit = "U"; + $this->staatsangehoerigkeitReadable = "Ungeklärt"; + } + + + + return $this; + } + + public function getStaatsangehoerigkeitReadable(): ?string + { + return $this->staatsangehoerigkeitReadable; + } + + public function getBekenntnis(): ?string + { + return $this->bekenntnis; + } + + public function getBekenntnisReadable(): ?string + { + return $this->bekenntnisReadable; + + } + + public function setBekenntnis(string $bekenntnis): self + { + $this->bekenntnis = $bekenntnis; + + $bekenntnisReadable = array_search($bekenntnis, $this->getBekenntnisse()); + if($bekenntnisReadable === false) + $bekenntnisReadable = 'Fehler'; + $this->bekenntnisReadable = $bekenntnisReadable; + + return $this; + } + + public function getLetzteSchulart(): ?string + { + return $this->letzteSchulart; + } + + public function setLetzteSchulart(string $letzteSchulart): self + { + $this->letzteSchulart = $letzteSchulart; + + $letzteSchulartReadable = array_search($letzteSchulart, self::LETZTE_SCHULARTEN); + if($letzteSchulartReadable === false) + $letzteSchulartReadable = 'Fehler'; + $this->letzteSchulartReadable = $letzteSchulartReadable; + return $this; + } + + public function getLetzteSchulartReadable(): ?string + { + return $this->letzteSchulartReadable; + } + + public function getHoechsterAbschluss(): ?string + { + return $this->hoechsterAbschluss; + } + + public function setHoechsterAbschluss(string $hoechsterAbschluss): self + { + $this->hoechsterAbschluss = $hoechsterAbschluss; + + $hoechsterAbschlussReadable = array_search($hoechsterAbschluss, self::HOECHSTE_ABSCHLUESSE); + if($hoechsterAbschlussReadable === false) + $hoechsterAbschlussReadable = 'Fehler'; + $this->hoechsterAbschlussReadable = $hoechsterAbschlussReadable; + return $this; + } + + public function getHoechsterAbschlussReadable(): ?string + { + return $this->hoechsterAbschlussReadable; + } + + public function getHoechAbschlAn(): ?string + { + return $this->hoechAbschlAn; + } + + public function setHoechAbschlAn(string $hoechAbschlAn): self + { + $this->hoechAbschlAn = $hoechAbschlAn; + + $hoechAbschlAnReadable = array_search($hoechAbschlAn, self::HOECHSTE_ABSCHLUESSE_AN); + if($hoechAbschlAnReadable === false) + $hoechAbschlAnReadable = 'Fehler'; + $this->hoechAbschlAnReadable = $hoechAbschlAnReadable; + + return $this; + } + + public function getHoechAbschlAnReadable(): ?string + { + return $this->hoechAbschlAnReadable; + } + + + /** + * @return string + */ + public function __toString() + { + return $this->getVorname() . ' ' . $this->getNachname(); + } + + public function getZuzugAm(): ?\DateTimeInterface + { + return $this->zuzugAm; + } + + public function setZuzugAm(?\DateTimeInterface $zuzugAm): self + { + $this->zuzugAm = $zuzugAm; + + return $this; + } + + public function getZuzugsart(): ?string + { + return $this->zuzugsart; + + } + + public function getZuzugsartReadable(): ?string + { + return $this->zuzugsartReadable; + + } + + public function setZuzugsart(string $zuzugsart): self + { + $this->zuzugsart = $zuzugsart; + + $zuzugsartReadable = array_search($zuzugsart, $this->getZuzugsarten()); + if($zuzugsartReadable === false) + $zuzugsartReadable = 'Fehler'; + $this->zuzugsartReadable = $zuzugsartReadable; + + return $this; + } + + public static function getZuzugsarten() { + return self::ZUZUGSARTEN; + } + + public static function getBekenntnisse() { + return self::BEKENNTNISSE; + } + public static function getLetzteSchularten() { + return self::LETZTE_SCHULARTEN; + } + public static function getHoechsteAbschluesse() { + return self::HOECHSTE_ABSCHLUESSE; + } + public static function getHoechsteAbschluesseAn() { + return self::HOECHSTE_ABSCHLUESSE_AN; + } +} diff --git a/src/Entity/Schulbesuch.php b/src/Entity/Schulbesuch.php new file mode 100644 index 0000000..87340a9 --- /dev/null +++ b/src/Entity/Schulbesuch.php @@ -0,0 +1,82 @@ +id; + } + + public function getSchule(): ?Schule + { + return $this->schule; + } + + public function setSchule(?Schule $schule): self + { + $this->schule = $schule; + + return $this; + } + + public function getEintritt(): ?\DateTimeInterface + { + return $this->eintritt; + } + + public function setEintritt(\DateTimeInterface $eintritt): self + { + $this->eintritt = $eintritt; + + return $this; + } + + public function getAustritt(): ?\DateTimeInterface + { + return $this->austritt; + } + + public function setAustritt(\DateTimeInterface $austritt): self + { + $this->austritt = $austritt; + + return $this; + } + + public function getSchueler(): ?Schueler + { + return $this->schueler; + } + + public function setSchueler(?Schueler $schueler): self + { + $this->schueler = $schueler; + + return $this; + } +} diff --git a/src/Entity/Schule.php b/src/Entity/Schule.php new file mode 100644 index 0000000..12e3f18 --- /dev/null +++ b/src/Entity/Schule.php @@ -0,0 +1,145 @@ +id; + } + + public function getName(): ?string + { + return $this->name; + } + + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } + + public function getArt(): ?string + { + return $this->art; + } + + public function setArt(string $art): self + { + $this->art = $art; + + return $this; + } + + public function getStrasse(): ?string + { + return $this->strasse; + } + + public function setStrasse(string $strasse): self + { + $this->strasse = $strasse; + + return $this; + } + + public function getOrt(): ?string + { + return $this->ort; + } + + public function setOrt(string $ort): self + { + $this->ort = $ort; + + return $this; + } + + public function getPlz(): ?string + { + return $this->plz; + } + + public function setPlz(string $plz): self + { + $this->plz = $plz; + + return $this; + } + + /** + * @param mixed $nummer + * @return Schule + */ + public function setNummer($nummer) + { + $this->nummer = $nummer; + return $this; + } + + /** + * @return mixed + */ + public function getNummer() + { + return $this->nummer; + } + + public function getIstVerifiziert(): ?bool + { + return $this->istVerifiziert; + } + + public function setIstVerifiziert(bool $istVerifiziert): self + { + $this->istVerifiziert = $istVerifiziert; + + return $this; + } + + public function __toString() + { + return $this->getName() . ', ' . $this->getStrasse(); + } + /* + public static function loadValidatorMetadata(ClassMetadata $metadata) + { + $metadata->addConstraint(new Callback('validate')); + } + */ +} diff --git a/src/Entity/Umschueler.php b/src/Entity/Umschueler.php new file mode 100644 index 0000000..c4d48b4 --- /dev/null +++ b/src/Entity/Umschueler.php @@ -0,0 +1,87 @@ +id; + } + + public function getTraeger(): ?string + { + return $this->traeger; + } + + public function setTraeger(string $traeger): self + { + $this->traeger = $traeger; + + return $this; + } + + public function getTraegerSitz(): ?string + { + return $this->traegerSitz; + } + + public function setTraegerSitz(string $traegerSitz): self + { + $this->traegerSitz = $traegerSitz; + + return $this; + } + + public function getFoerdererNr(): ?int + { + return $this->foerdererNr; + } + + public function setFoerdererNr(?int $foerdererNr): self + { + $this->foerdererNr = $foerdererNr; + + return $this; + } + + public function getSchueler(): ?Schueler + { + return $this->schueler; + } + + public function setSchueler(?Schueler $schueler): self + { + $this->schueler = $schueler; + + // set (or unset) the owning side of the relation if necessary + $newUmschuelerDaten = $schueler === null ? null : $this; + if ($newUmschuelerDaten !== $schueler->getUmschueler()) { + $schueler->setUmschueler($newUmschuelerDaten); + } + + return $this; + } + +} diff --git a/src/Form/AllgemeinType.php b/src/Form/AllgemeinType.php new file mode 100644 index 0000000..440163a --- /dev/null +++ b/src/Form/AllgemeinType.php @@ -0,0 +1,28 @@ +add('wohnheim', CheckboxType::class, [ + 'required' => false + ]) + ->add('mitteilung', TextareaType::class, [ + 'required' => false + ]); + } + + public function configureOptions(OptionsResolver $resolver) + {} +} diff --git a/src/Form/AusbildungType.php b/src/Form/AusbildungType.php new file mode 100644 index 0000000..9c8e0a9 --- /dev/null +++ b/src/Form/AusbildungType.php @@ -0,0 +1,72 @@ +add('ausbilderemail', EmailType::class) + ->add('beginn', DateType::class, [ + 'widget' => 'single_text', + 'input' => 'datetime', + 'html5' => false, + 'format' => 'dd.MM.yyyy' + ]) + ->add('ende', DateType::class, [ + 'widget' => 'single_text', + 'input' => 'datetime', + 'html5' => false, + 'format' => 'dd.MM.yyyy' + ]); + if(!empty($options['betriebNeu'])) { + $builder->add('betrieb', EntityType::class, [ + 'class' => Betrieb::class, + 'choices' => $options['betriebe'], + 'data' => $options['betriebNeu'], + 'group_by' => 'ort', + 'placeholder' => 'Auswählen...', + 'attr' => ['onchange' => 'toggle()'] + ]); + } else { + $builder->add('betrieb', EntityType::class, [ + 'class' => Betrieb::class, + 'choices' => $options['betriebe'], + 'group_by' => 'ort', + 'placeholder' => 'Auswählen...', + 'attr' => ['onchange' => 'toggle()'] + ]); + } + + $builder->add('beruf', EntityType::class, [ + 'class' => Beruf::class, + 'query_builder' => function (EntityRepository $er) { + return $er->createQueryBuilder('u') + ->orderBy('u.bezeichnung', 'ASC'); + }, + 'placeholder' => 'Auswählen...' + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Ausbildung::class, + ]) + ->setRequired(["betriebe", "betriebNeu"]) + ; + } +} diff --git a/src/Form/BerufType.php b/src/Form/BerufType.php new file mode 100644 index 0000000..937d2e8 --- /dev/null +++ b/src/Form/BerufType.php @@ -0,0 +1,27 @@ +add('bezeichnung') + ->add('klasse') + ->add('nummer') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Beruf::class, + ]); + } +} diff --git a/src/Form/BetriebAdminType.php b/src/Form/BetriebAdminType.php new file mode 100644 index 0000000..9557829 --- /dev/null +++ b/src/Form/BetriebAdminType.php @@ -0,0 +1,73 @@ +add('name', null, [ + + ]) + ->add('strasse', null, [ + + ]) + ->add('hsnr', null, [ + + ]) + ->add('plz', null, [ + + ]) + ->add('ort', null, [ + + ]) + ->add('telZentrale', TelType::class, [ + + ]) + ->add('ansprPartner', null, [ + + ]) + ->add('telDurchwahl', TelType::class, [ + 'required' => false + ]) + ->add('fax', TelType::class, [ + 'required' => false + ]) + ->add('email', EmailType::class, [ + 'required' => true + ]) + ->add('kammer', ChoiceType::class, [ + 'placeholder' => 'Auswählen...', + 'choices' => Betrieb::getKammern() + ]) + ->add('asv_import', CheckboxType::class, [ + 'required' => false + ]) + ->add('ist_verifiziert', CheckboxType::class, [ + 'required' => false + ]) + ->add('kuerzel', null, [ + 'required' => true + ]) + ->add('gemeindeschluessel', null, [ + 'required' => true + ]); + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Betrieb::class + ]); + } +} diff --git a/src/Form/BetriebType.php b/src/Form/BetriebType.php new file mode 100644 index 0000000..781c994 --- /dev/null +++ b/src/Form/BetriebType.php @@ -0,0 +1,60 @@ +add('name', null, [ + + ]) + ->add('strasse', null, [ + + ]) + ->add('hsnr', null, [ + + ]) + ->add('plz', null, [ + + ]) + ->add('ort', null, [ + + ]) + ->add('telZentrale', TelType::class, [ + + ]) + ->add('ansprPartner', null, [ + + ]) + ->add('telDurchwahl', TelType::class, [ + 'required' => false + ]) + ->add('fax', TelType::class, [ + 'required' => false + ]) + ->add('email', EmailType::class, [ + + ]) + ->add('kammer', ChoiceType::class, [ + 'placeholder' => 'Auswählen...', + 'choices' => Betrieb::getKammern() + ]); + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Betrieb::class + ]); + } +} diff --git a/src/Form/EintrittsdatumType.php b/src/Form/EintrittsdatumType.php new file mode 100644 index 0000000..7449e7c --- /dev/null +++ b/src/Form/EintrittsdatumType.php @@ -0,0 +1,39 @@ +add('ersteHaelfte', DateType::class, [ + 'label' => 'Eintrittsdatum bei Registrierungen am Jahres Anfang', + 'widget' => 'single_text', + 'input' => 'datetime', + ]) + ->add('zweiteHaelfte', DateType::class, [ + 'label' => 'Eintrittsdatum bei Registrierungen am Jahres Ende', + 'widget' => 'single_text', + 'input' => 'datetime', + ]) + ->add('wechselImportNKlassen', DateType::class, [ + 'label' => 'Eintrittsdatum bei Registrierungen am Jahres Ende', + 'widget' => 'single_text', + 'input' => 'datetime', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + // Configure your form options here + ]); + } +} diff --git a/src/Form/FluechtlingType.php b/src/Form/FluechtlingType.php new file mode 100644 index 0000000..5788aae --- /dev/null +++ b/src/Form/FluechtlingType.php @@ -0,0 +1,41 @@ +add('deutschKenntnis', ChoiceType::class, [ + 'choices' => [ + 'keine' => 0, + 'sehr schlecht' => 1, + 'eher schlecht' => 2, + 'durchschnittlich' => 3, + 'eher gut' => 4, + 'sehr gut' => 5 + ], + 'placeholder' => 'Auswählen...', + 'expanded' => true + ]) + ->add('anmeldeStelle') + ->add('ansprechPartner') + ->add('tel', TelType::class) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Fluechtling::class, + ]); + } +} diff --git a/src/Form/KontaktpersonType.php b/src/Form/KontaktpersonType.php new file mode 100644 index 0000000..1c853e1 --- /dev/null +++ b/src/Form/KontaktpersonType.php @@ -0,0 +1,55 @@ +add('art', ChoiceType::class, [ + 'placeholder' => 'Auswählen...', + 'choices' => [ + //'Elternteil' => 'EL', + 'Mutter' => 'Mu', + 'Vater' => 'Va', + 'Vormund' => 'Vo', + 'Verwandter' => 'Vw', + 'Pflegeeltern' => 'Pf', + 'Schüler außerh. Unterbr.' => 'SU' + ] + ]) + ->add('anrede', ChoiceType::class, [ + 'placeholder' => 'Auswählen...', + 'choices' => [ + 'Herr' => 'H', + 'Frau' => 'F', + 'keine' => 'K' + ] + ]) + ->add('vorname') + ->add('nachname') + ->add('strasse') + ->add('hausnummer') + ->add('plz') + ->add('ort') + ->add('telefonnummer', TelType::class) + ->add('email', EmailType::class) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Kontaktperson::class, + ]); + } +} diff --git a/src/Form/RegistrierungType.php b/src/Form/RegistrierungType.php new file mode 100644 index 0000000..ac74e77 --- /dev/null +++ b/src/Form/RegistrierungType.php @@ -0,0 +1,30 @@ +add('datum') + ->add('mitteilung') + ->add('wohnheim') + ->add('eintrittAm') + ->add('ip') + ->add('typ') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Registrierung::class, + ]); + } +} diff --git a/src/Form/SchuelerType.php b/src/Form/SchuelerType.php new file mode 100644 index 0000000..5bf2640 --- /dev/null +++ b/src/Form/SchuelerType.php @@ -0,0 +1,83 @@ +add('vorname', null, [ + 'label' => 'Vornamen', + 'help' => 'Alle Vornamen' + ]) + ->add('rufname') + ->add('nachname') + ->add('geschlecht', ChoiceType::class, [ + 'placeholder' => 'Auswählen...', + 'choices' => [ + 'männlich' => 'm', + 'weiblich' => 'w', + 'divers' => 'd' + ] + ]) + ->add('strasse') + ->add('hsnr') + ->add('plz') + ->add('ort') + ->add('tel', TelType::class) + ->add('email', EmailType::class) + ->add('geburtsdatum', BirthdayType::class, [ + 'widget' => 'single_text', + 'input' => 'datetime', + 'html5' => false, + 'format' => 'dd.MM.yyyy' + ]) + ->add('geburtsort') + ->add('geburtsland', CountryType::class, [ + 'placeholder' => 'Geburtsland...', + 'choice_translation_locale' => 'de', + 'preferred_choices' => ['Deutschland' => "DE"] + ]) + ->add('zuzugAm', DateType::class, [ + 'widget' => 'single_text', + 'html5' => false, + 'input' => 'datetime', + 'format' => 'yyyy', + 'required' => false, + ]) + ->add('zuzugsart', ChoiceType::class, [ + 'placeholder' => 'Zuzugsart...', + 'required' => false, + 'choices' => Schueler::getZuzugsarten() + ]); + $builder->add('staatsangehoerigkeit', CountryType::class, [ + 'placeholder' => 'Auswählen...', + 'choice_translation_locale' => 'de', + 'preferred_choices' => ['Deutschland' => "DE"] + ]) + ->add('bekenntnis', ChoiceType::class, [ + 'placeholder' => 'Bekenntnis...', + 'choices' => Schueler::getBekenntnisse() + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Schueler::class, + ]); + } +} diff --git a/src/Form/SchulbesuchType.php b/src/Form/SchulbesuchType.php new file mode 100644 index 0000000..ed4f94e --- /dev/null +++ b/src/Form/SchulbesuchType.php @@ -0,0 +1,56 @@ +add('schule', EntityType::class, [ + 'class' => Schule::class, + 'choices' => $options['schulen'], + 'data' => $options['schule'], + 'group_by' => 'ort', + 'placeholder' => 'Auswählen...' + ]); + } else { + $builder->add('schule', EntityType::class, [ + 'class' => Schule::class, + 'choices' => $options['schulen'], + 'group_by' => 'ort', + 'placeholder' => 'Auswählen...' + ]); + } + $builder + ->add('eintritt', DateType::class, [ + 'widget' => 'single_text', + 'input' => 'datetime', + 'html5' => false, + 'format' => 'dd.MM.yyyy' + ]) + ->add('austritt', DateType::class, [ + 'widget' => 'single_text', + 'input' => 'datetime', + 'html5' => false, + 'format' => 'dd.MM.yyyy' + ]) + + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Schulbesuch::class, + ])->setRequired(["schulen", "schule"]); + } +} diff --git a/src/Form/SchuleType.php b/src/Form/SchuleType.php new file mode 100644 index 0000000..56cb3d5 --- /dev/null +++ b/src/Form/SchuleType.php @@ -0,0 +1,44 @@ +add('name') + ->add('art', ChoiceType::class, [ + 'choices' => [ + 'Hauptschule oder Mittelschule' => 'VS', + 'Volksschule zur sonderpäd. Förderung' => 'SVS', + 'Realschule' => 'RS', + 'Wirtschaftsschule' => 'WS', + 'Gymnasium' => 'GY', + 'Berufsschule' => 'BS', + 'Berufsschule zur sonderpäd. Förderung' => 'SBS', + 'Fachoberschule' => 'FOS', + 'Grundschule' => 'G', + 'Sonstige Schule' => 'SO' + ], + 'placeholder' => 'Auswählen...' + ]) + ->add('strasse') + ->add('plz') + ->add('ort') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Schule::class, + ]); + } +} diff --git a/src/Form/StartType.php b/src/Form/StartType.php new file mode 100644 index 0000000..31bce31 --- /dev/null +++ b/src/Form/StartType.php @@ -0,0 +1,55 @@ +add('typ', ChoiceType::class, [ + 'label' => 'Art der Beschäftigung', + 'placeholder' => 'Auswählen...', + 'choices' => [ + 'Ausbildung mit Ausbildungsvertrag' => 'AUAU', + 'EQ-Maßnahme' => 'EQ', + 'Umschüler mit Vertrag' => 'UM', + 'Berufsgrundschuljahr: Holztechnik (Schreiner/Holzmechaniker)' => 'BGJH', + 'Berufsgrundschuljahr: Zimmerer' => 'BGJZ', + //'ohne Berufstätigkeit und arbeitslos' => 'OBA', + //'ungelernte Arbeitskräfte' => 'UAR', + //'Mithelfende Familienangehörige' => 'MF', + //'Ausbildung mit Praktikumsvertrag' => 'AUPR', + //'Berufsvorbereitungsjahr' => 'BVJ', + 'Berufsintegrationsklasse (BIK)' => 'BIK' + ] + ]) + ->add('datenschutz', CheckboxType::class, [ + 'label' => 'Ich akzeptiere die Datenschutzbestimmungen.', + 'required' => true, + 'value' => true, + ]) + ->add('schuljahr', ChoiceType::class, [ + 'label' => 'Schuljahr', + 'placeholder' => 'Auswählen...', + 'choices' => [ + 'für das kommende Schuljahr (ab 01.08.' . (intval(date("m")) < 8 ? date("Y") : (date("Y")+1)) . ')' => (intval(date("m")) < 8 ? date("Y") . "_" . (date("Y")+1) : (date("Y")+1) . "_" . (date("Y")+2)), + 'für das laufende Schuljahr (bis 31.07.' . (intval(date("m")) < 8 ? date("Y") : (date("Y")+1)) . ')' => (intval(date("m")) < 8 ? date("Y") . "_" . (date("Y")+1) : (date("Y")+1) . "_" . (date("Y")+2)) + ], + 'expanded' => true + ]); + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + // Configure your form options here + ]); + } +} diff --git a/src/Form/UmschuelerType.php b/src/Form/UmschuelerType.php new file mode 100644 index 0000000..013f0d1 --- /dev/null +++ b/src/Form/UmschuelerType.php @@ -0,0 +1,27 @@ +add('traeger') + ->add('traegerSitz') + ->add('foerdererNr') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Umschueler::class, + ]); + } +} diff --git a/src/Form/VorbildungType.php b/src/Form/VorbildungType.php new file mode 100644 index 0000000..64559e7 --- /dev/null +++ b/src/Form/VorbildungType.php @@ -0,0 +1,39 @@ +add('letzteSchulart', ChoiceType::class, [ + 'choices' => Schueler::getLetzteSchularten(), + 'placeholder' => 'Auswählen...' + ]) + ->add('hoechsterAbschluss', ChoiceType::class, [ + 'choices' => Schueler::getHoechsteAbschluesse(), + 'placeholder' => 'Auswählen...' + ]) + ->add('hoechAbschlAn', ChoiceType::class, [ + 'choices' => Schueler::getHoechsteAbschluesseAn(), + 'placeholder' => 'Auswählen...' + ]) + ->add('save', SubmitType::class, [ + 'attr' => ['class' => 'save btn controlButton buttonFont btn-block blankLinkButton'], + 'label' => 'Weiter' + ]);; + } + + public function configureOptions(OptionsResolver $resolver) + { + + } +} diff --git a/src/Kernel.php b/src/Kernel.php new file mode 100644 index 0000000..898f8fc --- /dev/null +++ b/src/Kernel.php @@ -0,0 +1,63 @@ +getProjectDir().'/var/cache/'.$this->environment; + } + + public function getLogDir() : string + { + return $this->getProjectDir().'/var/log'; + } + + public function registerBundles() : iterable + { + $contents = require $this->getProjectDir().'/config/bundles.php'; + foreach ($contents as $class => $envs) { + if (isset($envs['all']) || isset($envs[$this->environment])) { + yield new $class(); + } + } + } + + protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader) + { + $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php')); + // Feel free to remove the "container.autowiring.strict_mode" parameter + // if you are using symfony/dependency-injection 4.0+ as it's the default behavior + $container->setParameter('container.dumper.inline_class_loader', true); + $confDir = $this->getProjectDir().'/config'; + + $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob'); + $loader->load($confDir.'/{packages}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob'); + $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob'); + $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob'); + } + + protected function configureRoutes(RoutingConfigurator $routes): void + { + $confDir = $this->getProjectDir().'/config'; + + $routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob'); + $routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob'); + + $routes->import($confDir.'/{routes}/'.$this->environment.'/*.yaml', 'glob'); + $routes->import(__DIR__.'/Controller/', 'attribute'); + } +} diff --git a/src/Migrations/Version20190228183925.php b/src/Migrations/Version20190228183925.php new file mode 100644 index 0000000..2de6060 --- /dev/null +++ b/src/Migrations/Version20190228183925.php @@ -0,0 +1,73 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('CREATE TABLE kontaktperson (id INT AUTO_INCREMENT NOT NULL, schueler_id INT NOT NULL, anrede VARCHAR(1) NOT NULL, vorname VARCHAR(255) NOT NULL, nachname VARCHAR(255) NOT NULL, strasse VARCHAR(255) NOT NULL, hausnummer VARCHAR(10) NOT NULL, plz VARCHAR(5) NOT NULL, ort VARCHAR(255) NOT NULL, telefonnummer VARCHAR(30) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, art VARCHAR(2) NOT NULL, INDEX IDX_1A28E53D9AC0A64E (schueler_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('CREATE TABLE ausbildung (id INT AUTO_INCREMENT NOT NULL, betrieb_id INT NOT NULL, beruf_id INT NOT NULL, beginn DATE NOT NULL, ende DATE NOT NULL, INDEX IDX_E482F6FE587A3BD (betrieb_id), ausbilderemail VARCHAR(255) NOT NULL, INDEX IDX_E482F6FEDEF76C65 (beruf_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('CREATE TABLE schuldaten (id INT AUTO_INCREMENT NOT NULL, nummer INT NOT NULL, name VARCHAR(255) NOT NULL, art VARCHAR(255) NOT NULL, strasse VARCHAR(255) NOT NULL, ort VARCHAR(255) NOT NULL, plz VARCHAR(5) NOT NULL, ist_verifiziert TINYINT(1) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('CREATE TABLE schulbesuch (id INT AUTO_INCREMENT NOT NULL, schueler_id INT NOT NULL, schule_id INT NOT NULL, eintritt DATE NOT NULL, austritt DATE NOT NULL, INDEX IDX_4B6D821F9AC0A64E (schueler_id), INDEX IDX_4B6D821F5BCF5349 (schule_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('CREATE TABLE betriebedaten (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, anspr_partner VARCHAR(255) DEFAULT NULL, strasse VARCHAR(255) NOT NULL, plz VARCHAR(5) NOT NULL, ort VARCHAR(255) NOT NULL, tel_zentrale VARCHAR(255) NOT NULL, tel_durchwahl VARCHAR(255) DEFAULT NULL, fax VARCHAR(255) DEFAULT NULL, email VARCHAR(255) NOT NULL, ist_verifiziert TINYINT(1) NOT NULL, gemeindeschluessel VARCHAR(8) NOT NULL, kammer INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('CREATE TABLE berufsdaten (id INT AUTO_INCREMENT NOT NULL, bezeichnung VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('CREATE TABLE schueler (id INT AUTO_INCREMENT NOT NULL, ausbildung_id INT DEFAULT NULL, fluechtling_id INT DEFAULT NULL, umschueler_id INT DEFAULT NULL, vorname VARCHAR(255) NOT NULL, nachname VARCHAR(255) NOT NULL, rufname VARCHAR(255) NOT NULL, geburtsdatum DATE NOT NULL, geburtsort VARCHAR(255) NOT NULL, geschlecht VARCHAR(1) NOT NULL, strasse VARCHAR(255) NOT NULL, hsnr VARCHAR(5) NOT NULL, plz VARCHAR(5) NOT NULL, ort VARCHAR(255) NOT NULL, tel VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, geburtsland VARCHAR(255) NOT NULL, staatsangehoerigkeit VARCHAR(255) NOT NULL, bekenntnis VARCHAR(255) NOT NULL, letzte_schulart VARCHAR(255) NOT NULL, hoechster_abschluss VARCHAR(255) NOT NULL, hoech_abschl_an VARCHAR(255) NOT NULL, zuzug_am DATE DEFAULT NULL, UNIQUE INDEX UNIQ_C382476D984B3F39 (ausbildung_id), UNIQUE INDEX UNIQ_C382476D23E87371 (fluechtling_id), UNIQUE INDEX UNIQ_C382476DEF15F351 (umschueler_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('CREATE TABLE admin_user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(180) NOT NULL, roles VARCHAR(255) DEFAULT NULL, password VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_AD8A54A9E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('CREATE TABLE umschueler (id INT AUTO_INCREMENT NOT NULL, traeger VARCHAR(255) NOT NULL, traeger_sitz VARCHAR(255) NOT NULL, foerderer_nr INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('CREATE TABLE fluechtling (id INT AUTO_INCREMENT NOT NULL, anmelde_stelle VARCHAR(255) NOT NULL, ansprech_partner VARCHAR(255) NOT NULL, tel VARCHAR(255) NOT NULL, deutsch_kenntnis INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('CREATE TABLE registrierung (id INT AUTO_INCREMENT NOT NULL, schueler_id INT NOT NULL, datum DATETIME NOT NULL, mitteilung LONGTEXT DEFAULT NULL, wohnheim TINYINT(1) NOT NULL, eintritt_am DATE NOT NULL, ip VARCHAR(255) NOT NULL, typ VARCHAR(4) NOT NULL, UNIQUE INDEX UNIQ_6E7E4FFD9AC0A64E (schueler_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); + $this->addSql('ALTER TABLE kontaktperson ADD CONSTRAINT FK_1A28E53D9AC0A64E FOREIGN KEY (schueler_id) REFERENCES schueler (id)'); + $this->addSql('ALTER TABLE ausbildung ADD CONSTRAINT FK_E482F6FE587A3BD FOREIGN KEY (betrieb_id) REFERENCES betriebedaten (id)'); + $this->addSql('ALTER TABLE ausbildung ADD CONSTRAINT FK_E482F6FEDEF76C65 FOREIGN KEY (beruf_id) REFERENCES berufsdaten (id)'); + $this->addSql('ALTER TABLE schulbesuch ADD CONSTRAINT FK_4B6D821F9AC0A64E FOREIGN KEY (schueler_id) REFERENCES schueler (id)'); + $this->addSql('ALTER TABLE schulbesuch ADD CONSTRAINT FK_4B6D821F5BCF5349 FOREIGN KEY (schule_id) REFERENCES schuldaten (id)'); + $this->addSql('ALTER TABLE schueler ADD CONSTRAINT FK_C382476D984B3F39 FOREIGN KEY (ausbildung_id) REFERENCES ausbildung (id)'); + $this->addSql('ALTER TABLE schueler ADD CONSTRAINT FK_C382476D23E87371 FOREIGN KEY (fluechtling_id) REFERENCES fluechtling (id)'); + $this->addSql('ALTER TABLE schueler ADD CONSTRAINT FK_C382476DEF15F351 FOREIGN KEY (umschueler_id) REFERENCES umschueler (id)'); + $this->addSql('ALTER TABLE registrierung ADD CONSTRAINT FK_6E7E4FFD9AC0A64E FOREIGN KEY (schueler_id) REFERENCES schueler (id)'); + } + + public function down(Schema $schema) : void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE schueler DROP FOREIGN KEY FK_C382476D984B3F39'); + $this->addSql('ALTER TABLE schulbesuch DROP FOREIGN KEY FK_4B6D821F5BCF5349'); + $this->addSql('ALTER TABLE ausbildung DROP FOREIGN KEY FK_E482F6FE587A3BD'); + $this->addSql('ALTER TABLE ausbildung DROP FOREIGN KEY FK_E482F6FEDEF76C65'); + $this->addSql('ALTER TABLE kontaktperson DROP FOREIGN KEY FK_1A28E53D9AC0A64E'); + $this->addSql('ALTER TABLE schulbesuch DROP FOREIGN KEY FK_4B6D821F9AC0A64E'); + $this->addSql('ALTER TABLE registrierung DROP FOREIGN KEY FK_6E7E4FFD9AC0A64E'); + $this->addSql('ALTER TABLE schueler DROP FOREIGN KEY FK_C382476DEF15F351'); + $this->addSql('ALTER TABLE schueler DROP FOREIGN KEY FK_C382476D23E87371'); + $this->addSql('DROP TABLE kontaktperson'); + $this->addSql('DROP TABLE ausbildung'); + $this->addSql('DROP TABLE schuldaten'); + $this->addSql('DROP TABLE schulbesuch'); + $this->addSql('DROP TABLE betriebedaten'); + $this->addSql('DROP TABLE berufsdaten'); + $this->addSql('DROP TABLE schueler'); + $this->addSql('DROP TABLE admin_user'); + $this->addSql('DROP TABLE umschueler'); + $this->addSql('DROP TABLE fluechtling'); + $this->addSql('DROP TABLE registrierung'); + } +} diff --git a/src/Migrations/Version20190301080544.php b/src/Migrations/Version20190301080544.php new file mode 100644 index 0000000..5bbf944 --- /dev/null +++ b/src/Migrations/Version20190301080544.php @@ -0,0 +1,39 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE schuldaten CHANGE nummer nummer INT DEFAULT NULL'); + $this->addSql('ALTER TABLE betriebedaten CHANGE gemeindeschluessel gemeindeschluessel VARCHAR(8) DEFAULT NULL'); + $this->addSql('ALTER TABLE berufsdaten ADD klasse VARCHAR(255) DEFAULT NULL'); + } + + public function down(Schema $schema) : void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE berufsdaten DROP klasse'); + $this->addSql('ALTER TABLE betriebedaten CHANGE gemeindeschluessel gemeindeschluessel VARCHAR(8) NOT NULL COLLATE utf8mb4_unicode_ci'); + $this->addSql('ALTER TABLE schuldaten CHANGE nummer nummer INT NOT NULL'); + } +} diff --git a/src/Migrations/Version20190308181800.php b/src/Migrations/Version20190308181800.php new file mode 100644 index 0000000..f7ae1ce --- /dev/null +++ b/src/Migrations/Version20190308181800.php @@ -0,0 +1,37 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE betriebedaten ADD kuerzel VARCHAR(255) NOT NULL'); + $this->addSql('ALTER TABLE berufsdaten ADD nummer INT NOT NULL'); + } + + public function down(Schema $schema) : void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE berufsdaten DROP nummer'); + $this->addSql('ALTER TABLE betriebedaten DROP kuerzel'); + } +} diff --git a/src/Migrations/Version20190312140553.php b/src/Migrations/Version20190312140553.php new file mode 100644 index 0000000..aed4d3a --- /dev/null +++ b/src/Migrations/Version20190312140553.php @@ -0,0 +1,35 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE registrierung ADD datenschutz INT NOT NULL'); + } + + public function down(Schema $schema) : void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE registrierung DROP datenschutz'); + } +} diff --git a/src/Migrations/Version20190316101523.php b/src/Migrations/Version20190316101523.php new file mode 100644 index 0000000..dc339d2 --- /dev/null +++ b/src/Migrations/Version20190316101523.php @@ -0,0 +1,35 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE registrierung CHANGE datenschutz datenschutz TINYINT(1) NOT NULL'); + } + + public function down(Schema $schema) : void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE registrierung CHANGE datenschutz datenschutz INT NOT NULL'); + } +} diff --git a/src/Migrations/Version20190317153627.php b/src/Migrations/Version20190317153627.php new file mode 100644 index 0000000..1b58987 --- /dev/null +++ b/src/Migrations/Version20190317153627.php @@ -0,0 +1,35 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE registrierung ADD exported_at DATETIME DEFAULT NULL'); + } + + public function down(Schema $schema) : void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE registrierung DROP exported_at'); + } +} diff --git a/src/Migrations/Version20230921082200.php b/src/Migrations/Version20230921082200.php new file mode 100644 index 0000000..87c31b2 --- /dev/null +++ b/src/Migrations/Version20230921082200.php @@ -0,0 +1,38 @@ +abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + $this->addSql('ALTER TABLE betriebedaten ADD hsnr VARCHAR(255)'); + $this->addSql('ALTER TABLE betriebedaten ADD asv_import INT'); + $this->addSql('ALTER TABLE schueler ADD zuzugsart VARCHAR(255)'); + } + + public function down(Schema $schema) : void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); + + $this->addSql('ALTER TABLE betriebedaten DROP hsnr'); + $this->addSql('ALTER TABLE betriebedaten DROP asv_import'); + $this->addSql('ALTER TABLE schueler DROP zuzugsart VARCHAR(255)'); + } +} diff --git a/src/Migrations/Version20240314073559.php b/src/Migrations/Version20240314073559.php new file mode 100644 index 0000000..0f20d87 --- /dev/null +++ b/src/Migrations/Version20240314073559.php @@ -0,0 +1,33 @@ +addSql('ALTER TABLE betriebedaten CHANGE hsnr hsnr VARCHAR(10) NOT NULL, CHANGE asv_import asv_import TINYINT(1) NOT NULL'); + $this->addSql('ALTER TABLE registrierung ADD schuljahr VARCHAR(255) NOT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE betriebedaten CHANGE hsnr hsnr VARCHAR(255) DEFAULT NULL, CHANGE asv_import asv_import INT DEFAULT NULL'); + $this->addSql('ALTER TABLE registrierung DROP schuljahr'); + } +} diff --git a/src/Repository/.gitignore b/src/Repository/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/src/Repository/AdminUserRepository.php b/src/Repository/AdminUserRepository.php new file mode 100644 index 0000000..9b1a54e --- /dev/null +++ b/src/Repository/AdminUserRepository.php @@ -0,0 +1,22 @@ +createQueryBuilder('b') + ->andWhere('b.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('b.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Beruf + { + return $this->createQueryBuilder('b') + ->andWhere('b.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Repository/BerufRepository.php b/src/Repository/BerufRepository.php new file mode 100644 index 0000000..2016b26 --- /dev/null +++ b/src/Repository/BerufRepository.php @@ -0,0 +1,48 @@ +createQueryBuilder('b') + ->orderBy('b.bezeichnung', 'ASC') + ->getQuery() + ->getResult(); + } + + + /* + public function findOneBySomeField($value): ?Beruf + { + return $this->createQueryBuilder('b') + ->andWhere('b.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Repository/BetriebRepository.php b/src/Repository/BetriebRepository.php new file mode 100644 index 0000000..43e06ec --- /dev/null +++ b/src/Repository/BetriebRepository.php @@ -0,0 +1,90 @@ +createQueryBuilder('b') + ->andWhere('b.istVerifiziert = :val') + ->setParameter('val', true) + ->orderBy('b.ort, b.name', 'ASC') + ->getQuery() + ->getResult(); + } + + /** + * @return Betrieb[] Returns all NOTverified Betriebe + */ + public function findAllNotVerified() + { + return $this->createQueryBuilder('b') + ->andWhere('b.istVerifiziert = :val') + ->setParameter('val', false) + ->orderBy('b.ort, b.name', 'ASC') + ->getQuery() + ->getResult(); + } + + /** + * @return Betrieb[] Returns all to import Betriebe in ASV + */ + public function findAllToImportInASV() + { + return $this->createQueryBuilder('b') + ->andWhere('b.asv_import = :val') + ->setParameter('val', true) + ->orderBy('b.ort, b.name', 'ASC') + ->getQuery() + ->getResult(); + } + +// /** +// * @return Betrieb[] Returns an array of Betrieb objects +// */ + /* + public function findByExampleField($value) + { + return $this->createQueryBuilder('b') + ->andWhere('b.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('b.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Betrieb + { + return $this->createQueryBuilder('b') + ->andWhere('b.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Repository/FluechtlingRepository.php b/src/Repository/FluechtlingRepository.php new file mode 100644 index 0000000..1ddfca8 --- /dev/null +++ b/src/Repository/FluechtlingRepository.php @@ -0,0 +1,52 @@ +createQueryBuilder('s') + ->andWhere('s.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('s.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Schule + { + return $this->createQueryBuilder('s') + ->andWhere('s.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Repository/KammerRepository.php b/src/Repository/KammerRepository.php new file mode 100644 index 0000000..ee22c81 --- /dev/null +++ b/src/Repository/KammerRepository.php @@ -0,0 +1,51 @@ +createQueryBuilder('s') + ->andWhere('s.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('s.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Kammer + { + return $this->createQueryBuilder('s') + ->andWhere('s.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Repository/KontaktpersonRepository.php b/src/Repository/KontaktpersonRepository.php new file mode 100644 index 0000000..a51d0be --- /dev/null +++ b/src/Repository/KontaktpersonRepository.php @@ -0,0 +1,51 @@ +createQueryBuilder('k') + ->andWhere('k.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('k.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Kontaktperson + { + return $this->createQueryBuilder('k') + ->andWhere('k.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Repository/RegistrierungRepository.php b/src/Repository/RegistrierungRepository.php new file mode 100644 index 0000000..2a807c9 --- /dev/null +++ b/src/Repository/RegistrierungRepository.php @@ -0,0 +1,34 @@ +createQueryBuilder('b') + ->where('b.exportedAt IS NULL') + ->getQuery() + ->getResult(); + } +} diff --git a/src/Repository/SchuelerRepository.php b/src/Repository/SchuelerRepository.php new file mode 100644 index 0000000..6cc43dc --- /dev/null +++ b/src/Repository/SchuelerRepository.php @@ -0,0 +1,51 @@ +createQueryBuilder('s') + ->andWhere('s.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('s.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Schueler + { + return $this->createQueryBuilder('s') + ->andWhere('s.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Repository/SchulbesuchRepository.php b/src/Repository/SchulbesuchRepository.php new file mode 100644 index 0000000..bc512ab --- /dev/null +++ b/src/Repository/SchulbesuchRepository.php @@ -0,0 +1,51 @@ +createQueryBuilder('s') + ->andWhere('s.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('s.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Schulbesuch + { + return $this->createQueryBuilder('s') + ->andWhere('s.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Repository/SchuleRepository.php b/src/Repository/SchuleRepository.php new file mode 100644 index 0000000..132539c --- /dev/null +++ b/src/Repository/SchuleRepository.php @@ -0,0 +1,63 @@ +createQueryBuilder('s') + ->andWhere('s.istVerifiziert = :val') + ->setParameter('val', true) + ->orderBy('s.ort, s.name', 'ASC') + ->getQuery() + ->getResult(); + } +// /** +// * @return Schule[] Returns an array of Schule objects +// */ + /* + public function findByExampleField($value) + { + return $this->createQueryBuilder('s') + ->andWhere('s.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('s.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Schule + { + return $this->createQueryBuilder('s') + ->andWhere('s.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Repository/UmschuelerRepository.php b/src/Repository/UmschuelerRepository.php new file mode 100644 index 0000000..1b470a9 --- /dev/null +++ b/src/Repository/UmschuelerRepository.php @@ -0,0 +1,52 @@ +createQueryBuilder('s') + ->andWhere('s.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('s.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Schule + { + return $this->createQueryBuilder('s') + ->andWhere('s.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +} diff --git a/src/Security/AdminAuthenticator.php b/src/Security/AdminAuthenticator.php new file mode 100644 index 0000000..b997484 --- /dev/null +++ b/src/Security/AdminAuthenticator.php @@ -0,0 +1,60 @@ +request->get('email', ''); + + $request->getSession()->set(SecurityRequestAttributes::LAST_USERNAME, $email); + + return new Passport( + new UserBadge($email), + new PasswordCredentials($request->request->get('password', '')), + [ + new CsrfTokenBadge('authenticate', $request->request->get('_csrf_token')), + new RememberMeBadge(), + ] + ); + } + + public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response + { + if ($targetPath = $this->getTargetPath($request->getSession(), $firewallName)) { + return new RedirectResponse($targetPath); + } + + // For example: + return new RedirectResponse($this->urlGenerator->generate('admin')); + // throw new \Exception('TODO: provide a valid redirect inside '.__FILE__); + } + + protected function getLoginUrl(Request $request): string + { + return $this->urlGenerator->generate(self::LOGIN_ROUTE); + } +} \ No newline at end of file diff --git a/symfony.lock b/symfony.lock new file mode 100644 index 0000000..6f7c7ef --- /dev/null +++ b/symfony.lock @@ -0,0 +1,506 @@ +{ + "doctrine/annotations": { + "version": "1.0", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "1.0", + "ref": "cb4152ebcadbe620ea2261da1a1c5a9b8cea7672" + } + }, + "doctrine/cache": { + "version": "v1.8.0" + }, + "doctrine/collections": { + "version": "v1.5.0" + }, + "doctrine/common": { + "version": "v2.9.0" + }, + "doctrine/data-fixtures": { + "version": "v1.3.1" + }, + "doctrine/dbal": { + "version": "v2.8.0" + }, + "doctrine/deprecations": { + "version": "v0.5.3" + }, + "doctrine/doctrine-bundle": { + "version": "1.6", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "1.6", + "ref": "ae205d5114e719deb64d2110f56ef910787d1e04" + } + }, + "doctrine/doctrine-fixtures-bundle": { + "version": "3.0", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "3.0", + "ref": "fc52d86631a6dfd9fdf3381d0b7e3df2069e51b3" + } + }, + "doctrine/doctrine-migrations-bundle": { + "version": "1.2", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "1.2", + "ref": "c1431086fec31f17fbcfe6d6d7e92059458facc1" + } + }, + "doctrine/event-manager": { + "version": "v1.0.0" + }, + "doctrine/inflector": { + "version": "v1.3.0" + }, + "doctrine/instantiator": { + "version": "1.1.0" + }, + "doctrine/lexer": { + "version": "v1.0.1" + }, + "doctrine/migrations": { + "version": "v1.8.1" + }, + "doctrine/orm": { + "version": "v2.6.2" + }, + "doctrine/persistence": { + "version": "v1.0.1" + }, + "doctrine/sql-formatter": { + "version": "1.1.1" + }, + "dompdf/dompdf": { + "version": "v0.8.5" + }, + "egulias/email-validator": { + "version": "2.1.5" + }, + "ezyang/htmlpurifier": { + "version": "v4.13.0" + }, + "laminas/laminas-zendframework-bridge": { + "version": "1.2.0" + }, + "maennchen/zipstream-php": { + "version": "2.1.0" + }, + "markbaker/complex": { + "version": "2.0.3" + }, + "markbaker/matrix": { + "version": "2.1.3" + }, + "monolog/monolog": { + "version": "1.23.0" + }, + "myclabs/php-enum": { + "version": "1.8.3" + }, + "nikic/php-parser": { + "version": "v4.0.3" + }, + "ocramius/package-versions": { + "version": "1.3.0" + }, + "ocramius/proxy-manager": { + "version": "2.1.1" + }, + "phenx/php-font-lib": { + "version": "0.5.2" + }, + "phenx/php-svg-lib": { + "version": "v0.3.3" + }, + "php": { + "version": "7.3" + }, + "phpdocumentor/reflection-common": { + "version": "1.0.1" + }, + "phpdocumentor/reflection-docblock": { + "version": "4.3.0" + }, + "phpdocumentor/type-resolver": { + "version": "0.4.0" + }, + "phpmailer/phpmailer": { + "version": "v6.1.5" + }, + "phpoffice/phpspreadsheet": { + "version": "1.18.0" + }, + "psr/cache": { + "version": "1.0.1" + }, + "psr/container": { + "version": "1.0.0" + }, + "psr/http-client": { + "version": "1.0.1" + }, + "psr/http-factory": { + "version": "1.0.1" + }, + "psr/http-message": { + "version": "1.0.1" + }, + "psr/link": { + "version": "1.0.0" + }, + "psr/log": { + "version": "1.0.2" + }, + "psr/simple-cache": { + "version": "1.0.1" + }, + "sabberworm/php-css-parser": { + "version": "8.3.0" + }, + "sensio/framework-extra-bundle": { + "version": "5.2", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "5.2", + "ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b" + } + }, + "symfony/asset": { + "version": "v4.1.4" + }, + "symfony/browser-kit": { + "version": "v4.1.4" + }, + "symfony/cache": { + "version": "v4.1.4" + }, + "symfony/cache-contracts": { + "version": "v1.1.7" + }, + "symfony/config": { + "version": "v4.1.4" + }, + "symfony/console": { + "version": "3.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "3.3", + "ref": "e3868d2f4a5104f19f844fe551099a00c6562527" + } + }, + "symfony/css-selector": { + "version": "v4.1.4" + }, + "symfony/debug": { + "version": "v4.1.4" + }, + "symfony/debug-bundle": { + "version": "4.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "4.1", + "ref": "f8863cbad2f2e58c4b65fa1eac892ab189971bea" + } + }, + "symfony/debug-pack": { + "version": "v1.0.6" + }, + "symfony/dependency-injection": { + "version": "v4.1.4" + }, + "symfony/deprecation-contracts": { + "version": "v2.2.0" + }, + "symfony/doctrine-bridge": { + "version": "v4.1.4" + }, + "symfony/dom-crawler": { + "version": "v4.1.4" + }, + "symfony/dotenv": { + "version": "v4.1.4" + }, + "symfony/error-handler": { + "version": "v4.4.7" + }, + "symfony/event-dispatcher": { + "version": "v4.1.4" + }, + "symfony/event-dispatcher-contracts": { + "version": "v1.1.7" + }, + "symfony/expression-language": { + "version": "v4.1.4" + }, + "symfony/filesystem": { + "version": "v4.1.4" + }, + "symfony/finder": { + "version": "v4.1.4" + }, + "symfony/flex": { + "version": "1.0", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "1.0", + "ref": "e921bdbfe20cdefa3b82f379d1cd36df1bc8d115" + } + }, + "symfony/form": { + "version": "v4.1.4" + }, + "symfony/framework-bundle": { + "version": "3.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "3.3", + "ref": "87c585d24de9f43bca80ebcfd5cf5cb39445d95f" + } + }, + "symfony/http-client-contracts": { + "version": "v2.3.1" + }, + "symfony/http-foundation": { + "version": "v4.1.4" + }, + "symfony/http-kernel": { + "version": "v4.1.4" + }, + "symfony/inflector": { + "version": "v4.1.4" + }, + "symfony/intl": { + "version": "v4.1.4" + }, + "symfony/mailer": { + "version": "4.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "4.3", + "ref": "15658c2a0176cda2e7dba66276a2030b52bd81b2" + }, + "files": [ + "config/packages/mailer.yaml" + ] + }, + "symfony/maker-bundle": { + "version": "1.0", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "1.0", + "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f" + } + }, + "symfony/mime": { + "version": "v4.3.11" + }, + "symfony/monolog-bridge": { + "version": "v4.1.4" + }, + "symfony/monolog-bundle": { + "version": "3.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "3.1", + "ref": "18ebf5a940573a20de06f9c4060101eeb438cf3d" + } + }, + "symfony/options-resolver": { + "version": "v4.1.4" + }, + "symfony/orm-pack": { + "version": "v1.0.5" + }, + "symfony/phpunit-bridge": { + "version": "4.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "4.1", + "ref": "b14c7f62fabeedf256d3211b0f704402b5530ba1" + } + }, + "symfony/polyfill-intl-icu": { + "version": "v1.9.0" + }, + "symfony/polyfill-intl-idn": { + "version": "v1.10.0" + }, + "symfony/polyfill-intl-normalizer": { + "version": "v1.22.1" + }, + "symfony/polyfill-mbstring": { + "version": "v1.9.0" + }, + "symfony/polyfill-php72": { + "version": "v1.9.0" + }, + "symfony/polyfill-php73": { + "version": "v1.15.0" + }, + "symfony/polyfill-php80": { + "version": "v1.22.1" + }, + "symfony/process": { + "version": "v4.1.4" + }, + "symfony/profiler-pack": { + "version": "v1.0.3" + }, + "symfony/property-access": { + "version": "v4.1.4" + }, + "symfony/property-info": { + "version": "v4.1.4" + }, + "symfony/proxy-manager-bridge": { + "version": "v4.4.7" + }, + "symfony/routing": { + "version": "4.0", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "4.0", + "ref": "5f514d9d3b8a8aac3d62ae6a86b18b90ed0c7826" + } + }, + "symfony/security-bundle": { + "version": "3.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "3.3", + "ref": "f8a63faa0d9521526499c0a8f403c9964ecb0527" + } + }, + "symfony/security-core": { + "version": "v4.2.3" + }, + "symfony/security-csrf": { + "version": "v4.2.3" + }, + "symfony/security-guard": { + "version": "v4.2.3" + }, + "symfony/security-http": { + "version": "v4.2.3" + }, + "symfony/serializer": { + "version": "v4.1.4" + }, + "symfony/serializer-pack": { + "version": "v1.0.1" + }, + "symfony/service-contracts": { + "version": "v1.1.8" + }, + "symfony/stopwatch": { + "version": "v4.1.4" + }, + "symfony/test-pack": { + "version": "v1.0.2" + }, + "symfony/translation": { + "version": "3.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "3.3", + "ref": "1fb02a6e1c8f3d4232cce485c9afa868d63b115a" + } + }, + "symfony/translation-contracts": { + "version": "v2.0.1" + }, + "symfony/twig-bridge": { + "version": "v4.1.4" + }, + "symfony/twig-bundle": { + "version": "3.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "3.3", + "ref": "369b5b29dc52b2c190002825ae7ec24ab6f962dd" + } + }, + "symfony/validator": { + "version": "4.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "4.1", + "ref": "0cdc982334f45d554957a6167e030482795bf9d7" + } + }, + "symfony/var-dumper": { + "version": "v4.1.4" + }, + "symfony/var-exporter": { + "version": "v4.2.3" + }, + "symfony/web-link": { + "version": "v4.1.4" + }, + "symfony/web-profiler-bundle": { + "version": "3.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "3.3", + "ref": "6bdfa1a95f6b2e677ab985cd1af2eae35d62e0f6" + } + }, + "symfony/web-server-bundle": { + "version": "3.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "3.3", + "ref": "dae9b39fd6717970be7601101ce5aa960bf53d9a" + } + }, + "symfony/yaml": { + "version": "v4.1.4" + }, + "twig/extensions": { + "version": "1.0", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "1.0", + "ref": "ddb2e0a77773b7fd75d8d649545f174e664500ab" + }, + "files": [ + "./config/packages/twig_extensions.yaml" + ] + }, + "twig/twig": { + "version": "v2.5.0" + }, + "webmozart/assert": { + "version": "1.3.0" + }, + "zendframework/zend-code": { + "version": "3.3.1" + }, + "zendframework/zend-eventmanager": { + "version": "3.2.1" + } +} diff --git a/templates/admin/index.html.twig b/templates/admin/index.html.twig new file mode 100644 index 0000000..c62a7ad --- /dev/null +++ b/templates/admin/index.html.twig @@ -0,0 +1,46 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Verwaltung der Anmeldungen{% endblock %} + +{% block body %} + + +
+ +
+ +{% endblock %} diff --git a/templates/admin_export/filedownload.html.twig b/templates/admin_export/filedownload.html.twig new file mode 100644 index 0000000..25cd3e2 --- /dev/null +++ b/templates/admin_export/filedownload.html.twig @@ -0,0 +1,24 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Download Exportdateien{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+ {% for key,value in pathList %} +
+ Download ASV-Datei für Jahr {{ key }} +
+ {% endfor %} + {% for key,value in pathListKontrollausruck %} +
+ Download + Kontrollausdruck für Jahr {{ key }} +
+ {% endfor %} +
+
+{% endblock %} diff --git a/templates/admin_export/index.html.twig b/templates/admin_export/index.html.twig new file mode 100644 index 0000000..446f48b --- /dev/null +++ b/templates/admin_export/index.html.twig @@ -0,0 +1,19 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Hello AdminCreateImportController!{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+
+ Anmeldungen exportieren +
+ {% if import_strings|length > 1 %} +
{% for import_string in import_strings %}{{ import_string }}
{% endfor %}
+ {% else %} +

Es gibt keine Registrierungen die noch nicht exportiert wurden.

+ {% endif %} +
+
+{% endblock %} diff --git a/templates/admin_registrations/index.html.twig b/templates/admin_registrations/index.html.twig new file mode 100644 index 0000000..4f1c158 --- /dev/null +++ b/templates/admin_registrations/index.html.twig @@ -0,0 +1,46 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Offene Registrierungen!{% endblock %} + +{% block body %} + + +
+
+ Zurück zur Verwaltung... +
+ {% if registrations|length > 0 %} +
+ + + + + + + + + + + + {% for entry in registrations %} + + + + + + + + {% endfor %} + +
IDSchülerAnmeldung amMitteilungAktionen
{{ entry.id }}{{ entry.schueler.nachname }}, {{ entry.schueler.vorname }}{{ entry.datum | date('d.m.Y') }}{{ entry.mitteilung }} + {{ include('registrierung/_delete_form.html.twig', {'registrierung': entry}) }} +
+
+ {% else %} +

Es gibt keine Registrierungen die noch nicht exportiert wurden.

+ {% endif %} +
+{% endblock %} diff --git a/templates/allgemein/_form.html.twig b/templates/allgemein/_form.html.twig new file mode 100644 index 0000000..e918434 --- /dev/null +++ b/templates/allgemein/_form.html.twig @@ -0,0 +1,33 @@ +{{ form_start(form) }} + +
+
+
+ {{ form_errors(form.wohnheim) }} +
+ + {{ form_widget(form.wohnheim) }} +
Hier für weitere Informationen zur Wohnheimunterbringung klicken. +
+
+ +
+
+ +
+ {{ form_errors(form.mitteilung) }} +
+ {{ form_widget(form.mitteilung, {'attr':{'placeholder': 'Hier wichtige Informationen notieren', 'class':'form-control'}}) }} +
+
+
+
+
+ +
+
+ +
+
+{{ form_end(form) }} + diff --git a/templates/allgemein/_mail_show.html.twig b/templates/allgemein/_mail_show.html.twig new file mode 100644 index 0000000..635a012 --- /dev/null +++ b/templates/allgemein/_mail_show.html.twig @@ -0,0 +1,16 @@ + + + + + + + + + {% if registrierung.mitteilung is not null %}{{ registrierung.mitteilung }}{% else %}Keine Mitteilung{% endif %} + + + +
Unterbringung in Wohnheim gewünscht:{{ registrierung.wohnheim ? 'Ja' : 'Nein'}} + {% if registrierung.wohnheim == 1 %}
+ Hier für weitere Informationen zur Wohnheimunterbringung klicken.{% endif %} +
Mitteilung an die Berufsschule I:
\ No newline at end of file diff --git a/templates/allgemein/_show.html.twig b/templates/allgemein/_show.html.twig new file mode 100644 index 0000000..e13ab39 --- /dev/null +++ b/templates/allgemein/_show.html.twig @@ -0,0 +1,17 @@ + + + + + + + + + + {% if registrierung.mitteilung is not null %}{{ registrierung.mitteilung }}{% else %}Keine Mitteilung{% endif %} + + + +
Unterbringung in Wohnheim gewünscht{{ registrierung.wohnheim ? 'Ja' : 'Nein'}} + {% if registrierung.wohnheim == 1 %}
+ Hier für weitere Informationen zur Wohnheimunterbringung klicken.{% endif %} +
Mitteilung an die Berufsschule I
\ No newline at end of file diff --git a/templates/allgemein/new.html.twig b/templates/allgemein/new.html.twig new file mode 100644 index 0000000..4b11171 --- /dev/null +++ b/templates/allgemein/new.html.twig @@ -0,0 +1,10 @@ +{% extends 'base.html.twig' %} + +{% block title %}Allgemeine Infos{% endblock %} + +{% block body %} +

Allgemein

+ + {{ include('allgemein/_form.html.twig') }} + +{% endblock %} \ No newline at end of file diff --git a/templates/allgemein/update.html.twig b/templates/allgemein/update.html.twig new file mode 100644 index 0000000..637083f --- /dev/null +++ b/templates/allgemein/update.html.twig @@ -0,0 +1,10 @@ +{% extends 'base.html.twig' %} + +{% block title %}Allgemeine Infos ändern{% endblock %} + +{% block body %} +

Allgemein

+ + {{ include('allgemein/_form.html.twig') }} + +{% endblock %} \ No newline at end of file diff --git a/templates/anmeldung/_checkButton.html.twig b/templates/anmeldung/_checkButton.html.twig new file mode 100644 index 0000000..eef7b42 --- /dev/null +++ b/templates/anmeldung/_checkButton.html.twig @@ -0,0 +1,8 @@ + +{% if text == '' %} + Bearbeiten +{% else %} + {{ text }} +{% endif %} + +{# TODO BayreuthButton umbenennen#} diff --git a/templates/anmeldung/beendet.html.twig b/templates/anmeldung/beendet.html.twig new file mode 100644 index 0000000..4f2bed8 --- /dev/null +++ b/templates/anmeldung/beendet.html.twig @@ -0,0 +1,9 @@ +{% extends 'base.html.twig' %} +{% block title %}Anmeldung abgeschlossen{% endblock %} +{% block body %} + + + PDF-Bestätigung zum Download +{% endblock %} + diff --git a/templates/anmeldung/check.html.twig b/templates/anmeldung/check.html.twig new file mode 100644 index 0000000..acc4ebb --- /dev/null +++ b/templates/anmeldung/check.html.twig @@ -0,0 +1,80 @@ +{% extends 'base.html.twig' %} +{% block title %}Daten prüfen{% endblock %} +{% block body %} +
+

Bitte prüfen Sie ihre Angaben und schließen Sie die Anmeldung ab.

+
+ {% if registrierung.typ != "AUAU" and registrierung.typ != "EQ" and registrierung.typ != "UM" %} + + {% endif %} +

Schüler

+ {{ include('schueler/_show.html.twig', { 'schueler': schueler}) }} + {{ include('anmeldung/_checkButton.html.twig', {'route': 'schueler_update', 'text': ''}) }} + {% if schueler.fluechtling %} +

Zusatzinformationen BIK

+ {{ include('fluechtling/_show.html.twig', { 'fluechtling': fluechtling}) }} + {{ include('anmeldung/_checkButton.html.twig', {'route': 'fluechtling_update', 'text': ''}) }} + {% endif %} + {% if schueler.umschueler %} +

Informationen zu Umschüler

+ {{ include('umschueler/_show.html.twig', { 'umschueler': umschueler}) }} + {{ include('anmeldung/_checkButton.html.twig', {'route': 'umschueler_update', 'text': ''}) }} + {% endif %} + {% if ausbildung is not null %} +

Ausbildung

+ {{ include('ausbildung/_show.html.twig', { 'ausbildung': ausbildung}) }} + {{ include('anmeldung/_checkButton.html.twig', {'route': 'ausbildung_update', 'text': ''}) }} + {% if ausbildung.betrieb.id is null %} +

Betrieb

+ {{ include('betrieb/_show.html.twig', { 'betrieb': ausbildung.betrieb }) }} + {{ include('anmeldung/_checkButton.html.twig', {'route': 'betrieb_update', 'text': ''}) }} + {% endif %} + {% endif %} +

Kontaktpersonen

+ {% for kontaktperson in kontaktpersonen %} + {{ include('kontaktperson/_show.html.twig', { 'kontaktperson': kontaktperson}) }} + {% else %} +
Keine Kontaktpersonen erfasst
+ {% endfor %} + {{ include('anmeldung/_checkButton.html.twig', {'route': 'kontaktperson_update', 'text': 'Hinzufügen'}) }} +

Vorbildung

+ {% if schulbesuche is not null %} +

Schulbesuche

+ {{ include('schulbesuch/_showtable.html.twig', { 'schulbesuche': schulbesuche}) }} + {{ include('anmeldung/_checkButton.html.twig', {'route': 'schulbesuch_update', 'text': 'Hinzufügen'}) }} + {% endif %} + {{ include('vorbildung/_show.html.twig') }} + {{ include('anmeldung/_checkButton.html.twig', {'route': 'vorbildung_update', 'text': ''}) }} +

Allgemein

+ {{ include('allgemein/_show.html.twig', { 'registrierung': registrierung}) }} + {{ include('anmeldung/_checkButton.html.twig', {'route': 'allgemein_update', 'text': ''}) }} + +

Hinweise zum Schuljahresbeginn

+

Klasseneinteilung

+ Ihre vorläufige Klasse ist die {{klasse }}. Die aktuellen Blockpläne finden Sie hier.
+ Eine endgültige Klasseneinteilung erfolgt erst zum neuen Schuljahr.
+ Diese kann ab dem 01. September in WebUntis eingesehen werden.
+ Zugangsdaten für WebUntis:
+ Benutzername: {{untisbenutzer}}
+ Passwort: {{untispasswort}}

+ +

Mitzubringende Unterlagen am 1. Schultag

+
+ +

Willkommensbroschüre

+ Viele weitergehende Fragen können mit Hilfe unserer Willkommensbroschüre geklärt werden, welche jeder Schüler zu Beginn des Schuljahres auch in gedruckter Form erhält.
+ +
+ Anmeldung abschließen + + Eine Betätigungs-E-Mail mit diesen Daten wird an {{ schueler.email }} + {% if ausbildung is not null %}und {{ausbildung.ausbilderemail }} {% endif %} versandt. + +{% endblock %} diff --git a/templates/anmeldung/start.html.twig b/templates/anmeldung/start.html.twig new file mode 100644 index 0000000..110025d --- /dev/null +++ b/templates/anmeldung/start.html.twig @@ -0,0 +1,35 @@ +{% extends 'base.html.twig' %} + +{% block title %}Start{% endblock %} + +{% block body %} + {{ form_start(form) }} +

Auswahl des Schuljahres

+
+ {% for year in form.schuljahr %} + {{ form_widget(year, {'attr': {'class': 'form-check-input'}}) }} +
+ {% endfor %} +
+
+ +

Auswahl der Ausbildungsart

+
+ +
+ {{ form_errors(form.typ) }} +
+ {{ form_widget(form.typ, {'attr':{'class':'form-control'}}) }} +
+ +
+ {{ form_errors(form.datenschutz) }} +
+ Ich akzeptiere die Datenschutzbestimmungen: + {{ form_widget(form.datenschutz, {'attr':{'class':'fixSize'}}) }} +
+
+ +
+ {{ form_end(form) }} +{% endblock %} diff --git a/templates/ausbildung/_form.html.twig b/templates/ausbildung/_form.html.twig new file mode 100644 index 0000000..840ea03 --- /dev/null +++ b/templates/ausbildung/_form.html.twig @@ -0,0 +1,55 @@ +{{ form_start(form) }} +
+
+ +
+ {{ form_errors(form.betrieb) }} +
+ {{ form_widget(form.betrieb, {'attr':{'class':'form-control'}}) }} + Neuen Betrieb anlegen +
+
+ +
+ {{ form_errors(form.ausbilderemail) }} +
+ {{ form_widget(form.ausbilderemail, {'attr': {'placeholder': 'mein.ausbilder@musterfirma.de', 'class': 'form-control',}}) }} +
+
+
+
+ +
+ {{ form_errors(form.beginn) }} +
+ {{ form_widget(form.beginn, {'attr':{'class':'form-control',}}) }} +
+
+ +
+ {{ form_errors(form.ende) }} +
+ {{ form_widget(form.ende, {'attr':{'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.beruf) }} +
+ {{ form_widget(form.beruf, {'attr':{'class':'form-control'}}) }} +
+
+
+
+
+
+ +
+
+ +
+
+ +{{ form_end(form) }} \ No newline at end of file diff --git a/templates/ausbildung/_mail_show.html.twig b/templates/ausbildung/_mail_show.html.twig new file mode 100644 index 0000000..f3c2f9c --- /dev/null +++ b/templates/ausbildung/_mail_show.html.twig @@ -0,0 +1,27 @@ + + + {% if ausbildung.betrieb.id is not null %} + + + + + + + + + + {% endif %} + + + + + + + + + + + + + +
Betrieb:{{ ausbildung.betrieb.name }}, {{ ausbildung.betrieb.strasse }} {{ ausbildung.betrieb.hsnr }}, {{ ausbildung.betrieb.plz }} {{ ausbildung.betrieb.ort }}
Ausbilder*innen-E-Mail-Adresse:{{ausbildung.ausbilderemail }}
Ausbildungsbeginn:{{ ausbildung.beginn ? ausbildung.beginn|date('d.m.Y') : ''}}
Ausbildungsende:{{ ausbildung.ende ? ausbildung.ende|date('d.m.Y') : ''}}
Beruf:{{ ausbildung.beruf.bezeichnung }}
\ No newline at end of file diff --git a/templates/ausbildung/_show.html.twig b/templates/ausbildung/_show.html.twig new file mode 100644 index 0000000..14081d0 --- /dev/null +++ b/templates/ausbildung/_show.html.twig @@ -0,0 +1,27 @@ + + + {% if ausbildung.betrieb.id is not null %} + + + + + + + + + + {% endif %} + + + + + + + + + + + + + +
Betrieb{{ ausbildung.betrieb.name }}, {{ ausbildung.betrieb.strasse }}, {{ ausbildung.betrieb.plz }} {{ ausbildung.betrieb.ort }}
Ausbilder*innen-E-Mail-Adresse{{ausbildung.ausbilderemail }}
Ausbildungsbeginn{{ ausbildung.beginn ? ausbildung.beginn|date('d.m.Y') : ''}}
Ausbildungsende{{ ausbildung.ende ? ausbildung.ende|date('d.m.Y') : ''}}
Beruf{{ ausbildung.beruf.bezeichnung }}
\ No newline at end of file diff --git a/templates/ausbildung/new.html.twig b/templates/ausbildung/new.html.twig new file mode 100644 index 0000000..ff6186c --- /dev/null +++ b/templates/ausbildung/new.html.twig @@ -0,0 +1,51 @@ +{% extends 'base.html.twig' %} + +{% block title %}Ausbildung{% endblock %} + +{% block body %} +
+

Erfassen der Ausbildungsdaten

+ + {{ include('ausbildung/_form.html.twig') }} + +{% endblock %} +{% block stylesheets %} + {{ parent() }} + +{% endblock stylesheets %} +{% block javascripts_footer %} + {{ parent() }} + + + +{% endblock javascripts_footer %} \ No newline at end of file diff --git a/templates/ausbildung/update.html.twig b/templates/ausbildung/update.html.twig new file mode 100644 index 0000000..6a86037 --- /dev/null +++ b/templates/ausbildung/update.html.twig @@ -0,0 +1,48 @@ +{% extends 'base.html.twig' %} + +{% block title %}Ausbildung aktualisieren{% endblock %} + +{% block body %} +

Ausbildung

+ {{ include('ausbildung/_form.html.twig', {'button_label': 'Update'}) }} +{% endblock %} +{% block stylesheets %} + {{ parent() }} + +{% endblock stylesheets %} +{% block javascripts_footer %} + {{ parent() }} + + + +{% endblock javascripts_footer %} \ No newline at end of file diff --git a/templates/base-admin.html.twig b/templates/base-admin.html.twig new file mode 100644 index 0000000..cbc3ab4 --- /dev/null +++ b/templates/base-admin.html.twig @@ -0,0 +1,121 @@ + + + + {% block head %} + {% block title %}{% endblock %} + {% endblock %} + + + + + + + + {# + + #} + + {% block stylesheets %} + + {% endblock %} + + + + + + +
+
+
+ +
+
+
+ {#
+
#} +
+ Logout +
+ + + {# Ansicht#} +
+
+
+
+
+

Admin-Bereich

+
+
+
+
+
+ +
+
+
+
+ {% block body %} + {% endblock %} +
+
+
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/templates/base.html.twig b/templates/base.html.twig new file mode 100644 index 0000000..29a5640 --- /dev/null +++ b/templates/base.html.twig @@ -0,0 +1,145 @@ + + + + + {% block head %} + {% block title %}{% endblock %} - BS1 Schulanmeldung + + + + + + + + + + + + + {# + + #} + + {% block stylesheets %} + + {% endblock %} + {% endblock %} + + + + +
+
+
+ +
+
+
+
+
+ {# Ansicht#} +
+
+
+
+

Schulanmeldung

+
+
+
+ +
    +
  • + Ausbildungsdaten +
  • +
  • + Schülerdaten +
  • +
  • + Sonstiges +
  • +
  • + Abschluss +
  • +
+
+
+
+
+ +
+
+
+
+ {% block body %} + {% endblock %} +
+
+
+
+
+
+ + + +{% block javascripts_footer %} + + + + + +{% endblock %} + + + diff --git a/templates/beruf/_delete_form.html.twig b/templates/beruf/_delete_form.html.twig new file mode 100644 index 0000000..299ad54 --- /dev/null +++ b/templates/beruf/_delete_form.html.twig @@ -0,0 +1,5 @@ +
+ + + +
diff --git a/templates/beruf/_form.html.twig b/templates/beruf/_form.html.twig new file mode 100644 index 0000000..0b526e6 --- /dev/null +++ b/templates/beruf/_form.html.twig @@ -0,0 +1,39 @@ +{{ form_start(form) }} + +
+
+
+ +
+ {{ form_errors(form.bezeichnung) }} +
+ {{ form_widget(form.bezeichnung, {'attr': {'placeholder': 'Bezeichnung', 'class': 'form-control',}}) }} +
+
+ +
+ {{ form_errors(form.nummer) }} +
+ {{ form_widget(form.nummer, {'attr': {'placeholder': 'Nummer', 'class': 'form-control',}}) }} +
+
+ +
+ {{ form_errors(form.bezeichnung) }} +
+ {{ form_widget(form.klasse, {'attr': {'placeholder': 'Klasse', 'class': 'form-control',}}) }} +
+
+
+
+
+ +
+
+ +
+
+ +
+{{ form_end(form) }} + diff --git a/templates/beruf/edit.html.twig b/templates/beruf/edit.html.twig new file mode 100644 index 0000000..5f25939 --- /dev/null +++ b/templates/beruf/edit.html.twig @@ -0,0 +1,16 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Beruf bearbeiten{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+

Beruf bearbeiten

+ + {{ include('beruf/_form.html.twig', {'button_label': 'Update'}) }} + + zur Liste + + {{ include('beruf/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/beruf/index.html.twig b/templates/beruf/index.html.twig new file mode 100644 index 0000000..c1ac98f --- /dev/null +++ b/templates/beruf/index.html.twig @@ -0,0 +1,44 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Berufe anzeigen{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+
+
+

Übersicht über alle Berufe

+ + + + + + + + + + + + + {% for beruf in berufs %} + + + + + + + {% else %} + + + + {% endfor %} + +
IdBezeichnungKlasseNummerAktionen
{{ beruf.id }}{{ beruf.bezeichnung }}{{ beruf.klasse }}{{ beruf.nummer }} + + anzeigen + bearbeiten +
keine Berufe gefunden
+ + neuen Beruf anlegen +{% endblock %} diff --git a/templates/beruf/new.html.twig b/templates/beruf/new.html.twig new file mode 100644 index 0000000..52e8dd3 --- /dev/null +++ b/templates/beruf/new.html.twig @@ -0,0 +1,16 @@ +{% extends 'base.html.twig' %} + +{% block title %}Neuer Beruf{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+
+
+

Neuen Beruf anlegen

+ + {{ include('beruf/_form.html.twig') }} + + zur Liste +{% endblock %} diff --git a/templates/beruf/show.html.twig b/templates/beruf/show.html.twig new file mode 100644 index 0000000..39b5792 --- /dev/null +++ b/templates/beruf/show.html.twig @@ -0,0 +1,33 @@ +{% extends 'base.html.twig' %} + +{% block title %}Beruf{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+

Beruf

+ + + + + + + + + + + + + + + + +
Id{{ beruf.id }}
Bezeichnung{{ beruf.bezeichnung }}
Klasse{{ beruf.klasse }}
+ + zur Liste + + bearbeiten + + {{ include('beruf/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/betrieb/_admin_import_in_asv.html.twig b/templates/betrieb/_admin_import_in_asv.html.twig new file mode 100644 index 0000000..f87ce2c --- /dev/null +++ b/templates/betrieb/_admin_import_in_asv.html.twig @@ -0,0 +1,44 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Berufe zum Import in die ASV{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+
+
+

Übersicht aller Betriebe zum Imort in die ASV

+ + + + + + + + + + + {% for betrieb in betriebs %} + + + + + + + {% else %} + + + + {% endfor %} + +
NameStraßeOrt
{{ betrieb.name }}{{ betrieb.strasse }} {{ betrieb.hsnr }}{{ betrieb.plz }} {{ betrieb.ort }} + anzeigen + bearbeiten +
keine Betriebe gefunden
+{% endblock %} + + + + + \ No newline at end of file diff --git a/templates/betrieb/_admin_nicht_verifiziert.html.twig b/templates/betrieb/_admin_nicht_verifiziert.html.twig new file mode 100644 index 0000000..1bef95e --- /dev/null +++ b/templates/betrieb/_admin_nicht_verifiziert.html.twig @@ -0,0 +1,44 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Nicht verifizierte Berufe anzeigen{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+
+
+

Übersicht aller noch nicht verifizierten Betriebe

+ + + + + + + + + + + {% for betrieb in betriebs %} + + + + + + + {% else %} + + + + {% endfor %} + +
NameStraßeOrt
{{ betrieb.name }}{{ betrieb.strasse }} {{ betrieb.hsnr }}{{ betrieb.plz }} {{ betrieb.ort }} + anzeigen + bearbeiten +
keine Betriebe gefunden
+{% endblock %} + + + + + \ No newline at end of file diff --git a/templates/betrieb/_admin_show.html.twig b/templates/betrieb/_admin_show.html.twig new file mode 100644 index 0000000..3ce1bcc --- /dev/null +++ b/templates/betrieb/_admin_show.html.twig @@ -0,0 +1,59 @@ +{% extends 'base.html.twig' %} + +{% block title %}Betriebe{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+

Betriebe

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name{{ betrieb.name }}
Straße{{ betrieb.strasse }} {{ betrieb.hsnr }}
Ort{{ betrieb.plz }} {{ betrieb.ort }}
Telefonnummer Zentrale{{ betrieb.telZentrale }}
Kammer{{ betrieb.kammerReadable }}
Ansprechpartner{{ betrieb.ansprPartner }}
Telefonnummer Durchwahl{{ betrieb.telDurchwahl }}
Fax{{ betrieb.fax }}
Email{{ betrieb.email }}
+ + zur Liste + + bearbeiten + + {{ include('betrieb/_delete_form.html.twig') }} + +{% endblock %} \ No newline at end of file diff --git a/templates/betrieb/_delete_form.html.twig b/templates/betrieb/_delete_form.html.twig new file mode 100644 index 0000000..06a3e5b --- /dev/null +++ b/templates/betrieb/_delete_form.html.twig @@ -0,0 +1,5 @@ +
+ + + +
diff --git a/templates/betrieb/_form.html.twig b/templates/betrieb/_form.html.twig new file mode 100644 index 0000000..985066c --- /dev/null +++ b/templates/betrieb/_form.html.twig @@ -0,0 +1,104 @@ +{{ form_start(form) }} + + +
+
+ +
+ {{ form_errors(form.name) }} +
+ {{ form_widget(form.name, {'attr':{'placeholder': 'Beispielfirma GmbH', 'class':'form-control',}}) }} +
+
+
+
+ +
+ {{ form_errors(form.strasse) }} +
+ {{ form_widget(form.strasse, {'attr':{'placeholder': 'Musterstraße', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.hsnr) }} +
+ {{ form_widget(form.hsnr, {'attr': {'placeholder': '15', 'class': 'form-control',}}) }} +
+
+
+
+ +
+ {{ form_errors(form.plz) }} +
+ {{ form_widget(form.plz, {'attr':{'placeholder': '91234', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.ort) }} +
+ {{ form_widget(form.ort, {'attr':{'placeholder': 'Musterstadt', 'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.telZentrale) }} +
+ {{ form_widget(form.telZentrale, {'attr':{'placeholder': '0124/56789', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.kammer) }} +
+ {{ form_widget(form.kammer, {'attr':{'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.ansprPartner) }} +
+ {{ form_widget(form.ansprPartner, {'attr':{'placeholder': 'Max Mustermann', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.telDurchwahl) }} +
+ {{ form_widget(form.telDurchwahl, {'attr':{'placeholder': '0124/56789', 'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.fax) }} +
+ {{ form_widget(form.fax, {'attr':{'placeholder': '0124/56789', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.email) }} +
+ {{ form_widget(form.email, {'attr':{'placeholder': 'm.mustermann@beispielfirma.de', 'class':'form-control'}}) }} +
+
+
+
+
+
+ +
+
+ +
+
+{{ form_end(form) }} + diff --git a/templates/betrieb/_form_verifiziert.html.twig b/templates/betrieb/_form_verifiziert.html.twig new file mode 100644 index 0000000..7b9a43a --- /dev/null +++ b/templates/betrieb/_form_verifiziert.html.twig @@ -0,0 +1,136 @@ +{{ form_start(form) }} + + +
+
+ +
+ {{ form_errors(form.name) }} +
+ {{ form_widget(form.name, {'attr':{'placeholder': 'Beispielfirma GmbH', 'class':'form-control',}}) }} +
+
+
+
+ +
+ {{ form_errors(form.strasse) }} +
+ {{ form_widget(form.strasse, {'attr':{'placeholder': 'Musterstraße', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.hsnr) }} +
+ {{ form_widget(form.hsnr, {'attr':{'placeholder': '1a', 'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.plz) }} +
+ {{ form_widget(form.plz, {'attr':{'placeholder': '91234', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.ort) }} +
+ {{ form_widget(form.ort, {'attr':{'placeholder': 'Musterstadt', 'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.telZentrale) }} +
+ {{ form_widget(form.telZentrale, {'attr':{'placeholder': '0124/56789', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.kammer) }} +
+ {{ form_widget(form.kammer, {'attr':{'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.ansprPartner) }} +
+ {{ form_widget(form.ansprPartner, {'attr':{'placeholder': 'Max Mustermann', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.telDurchwahl) }} +
+ {{ form_widget(form.telDurchwahl, {'attr':{'placeholder': '0124/56789', 'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.fax) }} +
+ {{ form_widget(form.fax, {'attr':{'placeholder': '0124/56789', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.email) }} +
+ {{ form_widget(form.email, {'attr':{'placeholder': 'm.mustermann@beispielfirma.de', 'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.kuerzel) }} +
+ {{ form_widget(form.kuerzel, {'attr':{'placeholder': 'Kürzel', 'class':'form-control',}}) }} +
+
+ +
+ {{ form_errors(form.gemeindeschluessel) }} +
+ {{ form_widget(form.gemeindeschluessel, {'attr':{'placeholder': 'Gemeindeschlüssel', 'class':'form-control'}}) }} +
+
+ +
+
+ +
+ {{ form_errors(form.ist_verifiziert) }} +
+ {{ form_widget(form.ist_verifiziert, {'attr':{'class':'fixSize'}}) }} + +
+
+ +
+ {{ form_errors(form.asv_import) }} +
+ {{ form_widget(form.asv_import, {'attr':{'class':'fixSize'}}) }} + +
+
+ + + + +
+
+ +{{ form_end(form) }} + diff --git a/templates/betrieb/_import_in_asv_admin_show.html.twig b/templates/betrieb/_import_in_asv_admin_show.html.twig new file mode 100644 index 0000000..7e86459 --- /dev/null +++ b/templates/betrieb/_import_in_asv_admin_show.html.twig @@ -0,0 +1,59 @@ +{% extends 'base.html.twig' %} + +{% block title %}Betriebe{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+

Betriebe

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name{{ betrieb.name }}
Straße{{ betrieb.strasse }} {{ betrieb.hsnr }}
Ort{{ betrieb.plz }} {{ betrieb.ort }}
Telefonnummer Zentrale{{ betrieb.telZentrale }}
Kammer{{ betrieb.kammerReadable }}
Ansprechpartner{{ betrieb.ansprPartner }}
Telefonnummer Durchwahl{{ betrieb.telDurchwahl }}
Fax{{ betrieb.fax }}
Email{{ betrieb.email }}
+ + zur Liste + + bearbeiten + + {{ include('betrieb/_delete_form.html.twig') }} + +{% endblock %} \ No newline at end of file diff --git a/templates/betrieb/_import_in_asv_edit.html.twig b/templates/betrieb/_import_in_asv_edit.html.twig new file mode 100644 index 0000000..96d4f97 --- /dev/null +++ b/templates/betrieb/_import_in_asv_edit.html.twig @@ -0,0 +1,16 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Betrieb bearbeiten{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+

Betrieb bearbeiten

+ + {{ include('betrieb/_form_verifiziert.html.twig', {'button_label': 'Update'}) }} + + zur Liste + + {{ include('betrieb/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/betrieb/_mail_show.html.twig b/templates/betrieb/_mail_show.html.twig new file mode 100644 index 0000000..df5f800 --- /dev/null +++ b/templates/betrieb/_mail_show.html.twig @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name:{{ betrieb.name }}
Straße:{{ betrieb.strasse }} {{ betrieb.hsnr }}
Ort:{{ betrieb.plz }} {{ betrieb.ort }}
Telefonnummer Zentrale:{{ betrieb.telZentrale }}
Kammer:{{ betrieb.kammerReadable }}
Ansprechpartner:{{ betrieb.ansprPartner }}
Telefonnummer Durchwahl:{{ betrieb.telDurchwahl }}
Fax:{{ betrieb.fax }}
Email:{{ betrieb.email }}
\ No newline at end of file diff --git a/templates/betrieb/_nichtverifiziert_admin_show.html.twig b/templates/betrieb/_nichtverifiziert_admin_show.html.twig new file mode 100644 index 0000000..e2b53e1 --- /dev/null +++ b/templates/betrieb/_nichtverifiziert_admin_show.html.twig @@ -0,0 +1,59 @@ +{% extends 'base.html.twig' %} + +{% block title %}Betriebe{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+

Betriebe

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name{{ betrieb.name }}
Straße{{ betrieb.strasse }} {{ betrieb.hsnr }}
Ort{{ betrieb.plz }} {{ betrieb.ort }}
Telefonnummer Zentrale{{ betrieb.telZentrale }}
Kammer{{ betrieb.kammerReadable }}
Ansprechpartner{{ betrieb.ansprPartner }}
Telefonnummer Durchwahl{{ betrieb.telDurchwahl }}
Fax{{ betrieb.fax }}
Email{{ betrieb.email }}
+ + zur Liste + + bearbeiten + + {{ include('betrieb/_delete_form.html.twig') }} + +{% endblock %} \ No newline at end of file diff --git a/templates/betrieb/_nichtverifiziert_edit.html.twig b/templates/betrieb/_nichtverifiziert_edit.html.twig new file mode 100644 index 0000000..96d4f97 --- /dev/null +++ b/templates/betrieb/_nichtverifiziert_edit.html.twig @@ -0,0 +1,16 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Betrieb bearbeiten{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+

Betrieb bearbeiten

+ + {{ include('betrieb/_form_verifiziert.html.twig', {'button_label': 'Update'}) }} + + zur Liste + + {{ include('betrieb/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/betrieb/_show.html.twig b/templates/betrieb/_show.html.twig new file mode 100644 index 0000000..47104e2 --- /dev/null +++ b/templates/betrieb/_show.html.twig @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name{{ betrieb.name }}
Straße{{ betrieb.strasse }} {{ betrieb.hsnr }}
Ort{{ betrieb.plz }} {{ betrieb.ort }}
Telefonnummer Zentrale{{ betrieb.telZentrale }}
Kammer{{ betrieb.kammerReadable }}
Ansprechpartner{{ betrieb.ansprPartner }}
Telefonnummer Durchwahl{{ betrieb.telDurchwahl }}
Fax{{ betrieb.fax }}
Email{{ betrieb.email }}
\ No newline at end of file diff --git a/templates/betrieb/edit.html.twig b/templates/betrieb/edit.html.twig new file mode 100644 index 0000000..ac5d07c --- /dev/null +++ b/templates/betrieb/edit.html.twig @@ -0,0 +1,16 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Betrieb bearbeiten{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+

Beruf bearbeiten

+ + {{ include('betrieb/_form.html.twig', {'button_label': 'Speichern'}) }} + + zur Liste + + {{ include('betrieb/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/betrieb/index.html.twig b/templates/betrieb/index.html.twig new file mode 100644 index 0000000..65771ec --- /dev/null +++ b/templates/betrieb/index.html.twig @@ -0,0 +1,46 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Berufe anzeigen{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+
+
+

Übersicht über alle Betriebe

+ + + + + + + + + + + {% for betrieb in betriebs %} + + + + + + + {% else %} + + + + {% endfor %} + +
NameStraße, HausnummerOrt
{{ betrieb.name }}{{ betrieb.strasse }} {{ betrieb.hsnr }} {{ betrieb.plz }} {{ betrieb.ort }} + anzeigen + bearbeiten +
keine Betriebe gefunden
+ + neuen Betrieb anlegen +{% endblock %} + + + + + \ No newline at end of file diff --git a/templates/betrieb/new.html.twig b/templates/betrieb/new.html.twig new file mode 100644 index 0000000..40b969a --- /dev/null +++ b/templates/betrieb/new.html.twig @@ -0,0 +1,9 @@ +{% extends 'base.html.twig' %} + +{% block title %}Neuen Betrieb anlegen{% endblock %} + +{% block body %} +

Anlage eines Betriebs

+ {{ include('betrieb/_form.html.twig', {'button_label': 'Speichern'}) }} + +{% endblock %} \ No newline at end of file diff --git a/templates/betrieb/update.html.twig b/templates/betrieb/update.html.twig new file mode 100644 index 0000000..4cdac41 --- /dev/null +++ b/templates/betrieb/update.html.twig @@ -0,0 +1,10 @@ +{% extends 'base.html.twig' %} + +{% block title %}Update Betrieb{% endblock %} + +{% block body %} +

Update Betrieb

+ + {{ include('betrieb/_form.html.twig', {'button_label': 'Update'}) }} + +{% endblock %} diff --git a/templates/betrieb/update_verifiziert.html.twig b/templates/betrieb/update_verifiziert.html.twig new file mode 100644 index 0000000..0981aa7 --- /dev/null +++ b/templates/betrieb/update_verifiziert.html.twig @@ -0,0 +1,10 @@ +{% extends 'base.html.twig' %} + +{% block title %}Update Betrieb{% endblock %} + +{% block body %} +

Update Betrieb

+ + {{ include('betrieb/_form_verifiziert.html.twig', {'button_label': 'Update'}) }} + +{% endblock %} diff --git a/templates/eintrittsdatum/_form.html.twig b/templates/eintrittsdatum/_form.html.twig new file mode 100644 index 0000000..6ed68ae --- /dev/null +++ b/templates/eintrittsdatum/_form.html.twig @@ -0,0 +1,35 @@ +{{ form_start(form) }} +
+
+ +
+ {{ form_errors(form.ersteHaelfte) }} +
+ {{ form_widget(form.ersteHaelfte, {'attr': {'class': 'form-control',}}) }} +
+
+
+ +
+ {{ form_errors(form.zweiteHaelfte) }} +
+ {{ form_widget(form.zweiteHaelfte, {'attr': {'class': 'form-control',}}) }} +
+
+ +
+ {{ form_errors(form.wechselImportNKlassen) }} +
+ {{ form_widget(form.wechselImportNKlassen, {'attr': {'class': 'form-control',}}) }} +
+
+
+
+
+ +
+
+ +
+
+{{ form_end(form) }} diff --git a/templates/eintrittsdatum/edit.html.twig b/templates/eintrittsdatum/edit.html.twig new file mode 100644 index 0000000..53e7c6e --- /dev/null +++ b/templates/eintrittsdatum/edit.html.twig @@ -0,0 +1,14 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Eintrittsdatum bearbeiten{% endblock %} + +{% block body %} +
+ Zurück zur Verwaltung... +
+

Eintrittsdatum bearbeiten

+

Füllen Sie immer alle Felder aus!

+ + {{ include('eintrittsdatum/_form.html.twig', {'button_label': 'Speichern'}) }} +{% endblock %} + diff --git a/templates/eintrittsdatum/index.html.twig b/templates/eintrittsdatum/index.html.twig new file mode 100644 index 0000000..4af757d --- /dev/null +++ b/templates/eintrittsdatum/index.html.twig @@ -0,0 +1,26 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Eintrittsdatum{% endblock %} + +{% block body %} +
+ +
+

Bei Anmeldungen vor dem {{ ersteHaelfte }} wird {{ ersteHaelfte }} als Eintrittsdatum gespeichert.

+

Danach wird der {{ zweiteHaelfte }} als Eintrittsdatum gespeichert.

+

Bis zum Ausbildungsbeginn {{ wechselImportNKlassen }} wird die Import-Klasse verwendet, danach die nKlassen.

+
+
+ +
+ + +{% endblock %} + + diff --git a/templates/fluechtling/_form.html.twig b/templates/fluechtling/_form.html.twig new file mode 100644 index 0000000..011366d --- /dev/null +++ b/templates/fluechtling/_form.html.twig @@ -0,0 +1,103 @@ +{{ form_start(form) }} + +
+
+
+ +
+ {{ form_errors(form.deutschKenntnis) }} +
+
+
+ +
+
+ {{ form_widget(form.deutschKenntnis.0) }} +
+
+
+
+ +
+
+ {{ form_widget(form.deutschKenntnis.1) }} +
+
+
+
+ +
+
+ {{ form_widget(form.deutschKenntnis.2) }} +
+
+
+
+ +
+
+ {{ form_widget(form.deutschKenntnis.3) }} +
+
+
+
+ +
+
+ {{ form_widget(form.deutschKenntnis.4) }} +
+
+
+
+ +
+
+ {{ form_widget(form.deutschKenntnis.5) }} +
+
+
+
+
+
+ +
+
+ +
+ {{ form_errors(form.anmeldeStelle) }} +
+ {{ form_widget(form.anmeldeStelle, {'attr':{'placeholder': 'Anmeldestelle', 'class':'form-control'}}) }} +
+
+ +
+
+ +
+ {{ form_errors(form.ansprechPartner) }} +
+ {{ form_widget(form.ansprechPartner, {'attr':{'placeholder': 'Max Mustermann', 'class':'form-control'}}) }} +
+
+ +
+
+ +
+ {{ form_errors(form.tel) }} +
+ {{ form_widget(form.tel, {'attr':{'placeholder': '0123/456789', 'class':'form-control'}}) }} +
+
+ +
+
+
+ +
+
+ +
+
+{{ form_end(form) }} + diff --git a/templates/fluechtling/_mail_show.html.twig b/templates/fluechtling/_mail_show.html.twig new file mode 100644 index 0000000..42ee8ca --- /dev/null +++ b/templates/fluechtling/_mail_show.html.twig @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + +
Deutschkenntnisse: + {% if fluechtling.deutschKenntnis == 0 %} + keine + {% elseif fluechtling.deutschKenntnis == 1 %} + sehr schlecht + {% elseif fluechtling.deutschKenntnis == 2 %} + eher schlecht + {% elseif fluechtling.deutschKenntnis == 3 %} + durchschnittlich + {% elseif fluechtling.deutschKenntnis == 4 %} + eher gut + {% elseif fluechtling.deutschKenntnis == 5 %} + sehr gut + {% else %} + Fehler + {% endif %} +
Anmeldende Stelle:{{ fluechtling.anmeldeStelle }}
Ansprechpartner:{{ fluechtling.ansprechPartner }}
Telefonnummer:{{ fluechtling.tel }}
\ No newline at end of file diff --git a/templates/fluechtling/_show.html.twig b/templates/fluechtling/_show.html.twig new file mode 100644 index 0000000..99b04cc --- /dev/null +++ b/templates/fluechtling/_show.html.twig @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + +
Deutschkenntnisse + {% if fluechtling.deutschKenntnis == 0 %} + keine + {% elseif fluechtling.deutschKenntnis == 1 %} + sehr schlecht + {% elseif fluechtling.deutschKenntnis == 2 %} + eher schlecht + {% elseif fluechtling.deutschKenntnis == 3 %} + durchschnittlich + {% elseif fluechtling.deutschKenntnis == 4 %} + eher gut + {% elseif fluechtling.deutschKenntnis == 5 %} + sehr gut + {% else %} + Fehler + {% endif %} +
Anmeldende Stelle{{ fluechtling.anmeldeStelle }}
Ansprechpartner{{ fluechtling.ansprechPartner }}
Telefonnummer{{ fluechtling.tel }}
\ No newline at end of file diff --git a/templates/fluechtling/new.html.twig b/templates/fluechtling/new.html.twig new file mode 100644 index 0000000..04563c6 --- /dev/null +++ b/templates/fluechtling/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Fluechtling{% endblock %} + +{% block body %} +
+

Zusatzinformationen BIK

+ + {{ include('fluechtling/_form.html.twig') }} + +{% endblock %} \ No newline at end of file diff --git a/templates/fluechtling/show.html.twig b/templates/fluechtling/show.html.twig new file mode 100644 index 0000000..c92488d --- /dev/null +++ b/templates/fluechtling/show.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Fluechtling{% endblock %} + +{% block body %} + {{ include('fluechtling/_show.html.twig') }} + + back to list + + edit + + {{ include('fluechtling/_delete_form.html.twig') }} +{% endblock %} \ No newline at end of file diff --git a/templates/fluechtling/update.html.twig b/templates/fluechtling/update.html.twig new file mode 100644 index 0000000..0fe8412 --- /dev/null +++ b/templates/fluechtling/update.html.twig @@ -0,0 +1,10 @@ +{% extends 'base.html.twig' %} + +{% block title %}Update Flüchtlingsinformationen{% endblock %} + +{% block body %} +

Update Zusatzinformationen BIK

+ + {{ include('fluechtling/_form.html.twig', {'button_label': 'Update'}) }} + +{% endblock %} diff --git a/templates/kontaktperson/_delete_form.html.twig b/templates/kontaktperson/_delete_form.html.twig new file mode 100644 index 0000000..13c074e --- /dev/null +++ b/templates/kontaktperson/_delete_form.html.twig @@ -0,0 +1,5 @@ +
+ + + +
diff --git a/templates/kontaktperson/_form.html.twig b/templates/kontaktperson/_form.html.twig new file mode 100644 index 0000000..867ad44 --- /dev/null +++ b/templates/kontaktperson/_form.html.twig @@ -0,0 +1,86 @@ +{{ form_start(form) }} + +
+
+ +
+ {{ form_errors(form.art) }} +
+ {{ form_widget(form.art, {'attr':{'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.anrede) }} +
+ {{ form_widget(form.anrede, {'attr':{'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.vorname) }} +
+ {{ form_widget(form.vorname, {'attr':{'placeholder': 'Max', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.nachname) }} +
+ {{ form_widget(form.nachname, {'attr':{'placeholder': 'Mustermann', 'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.strasse) }} +
+ {{ form_widget(form.strasse, {'attr':{'placeholder': 'Musterstraße', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.hausnummer) }} +
+ {{ form_widget(form.hausnummer, {'attr':{'placeholder': '15', 'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.plz) }} +
+ {{ form_widget(form.plz, {'attr':{'placeholder': '91234', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.ort) }} +
+ {{ form_widget(form.ort, {'attr':{'placeholder': 'Musterstadt', 'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.telefonnummer) }} +
+ {{ form_widget(form.telefonnummer, {'attr':{'placeholder': '0123456789', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.email) }} +
+ {{ form_widget(form.email, {'attr':{'placeholder': 'm.mustermann@musterkontakt.de', 'class':'form-control'}}) }} +
+
+ +
+ +{{ form_end(form) }} diff --git a/templates/kontaktperson/_mail_show.html.twig b/templates/kontaktperson/_mail_show.html.twig new file mode 100644 index 0000000..6c1a7db --- /dev/null +++ b/templates/kontaktperson/_mail_show.html.twig @@ -0,0 +1,22 @@ +

{{ kontaktperson.anrede == 'H' ? 'Herr' : 'Frau' }} {{ kontaktperson.vorname }} {{ kontaktperson.nachname }}

+ + + + + + + + + + + + + + + + + + + + +
Straße und Hausnummer:{{ kontaktperson.strasse }} {{ kontaktperson.hausnummer }}
Ort:{{ kontaktperson.plz }} {{ kontaktperson.ort }}
Telefonnummer:{{ kontaktperson.telefonnummer }}
E-Mail Adresse:{{ kontaktperson.email }}
\ No newline at end of file diff --git a/templates/kontaktperson/_show.html.twig b/templates/kontaktperson/_show.html.twig new file mode 100644 index 0000000..69ae6e3 --- /dev/null +++ b/templates/kontaktperson/_show.html.twig @@ -0,0 +1,22 @@ +

{{ kontaktperson.anrede == 'H' ? 'Herr' : 'Frau' }} {{ kontaktperson.vorname }} {{ kontaktperson.nachname }}

+ + + + + + + + + + + + + + + + + + + + +
Straße und Hausnummer{{ kontaktperson.strasse }} {{ kontaktperson.hausnummer }}
Ort{{ kontaktperson.plz }} {{ kontaktperson.ort }}
Telefonnummer{{ kontaktperson.telefonnummer }}
E-Mail Adresse{{ kontaktperson.email }}
\ No newline at end of file diff --git a/templates/kontaktperson/_showtable.html.twig b/templates/kontaktperson/_showtable.html.twig new file mode 100644 index 0000000..aa0f456 --- /dev/null +++ b/templates/kontaktperson/_showtable.html.twig @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + {% for kontaktperson in kontaktpeople %} + + + + + + + + + + + {% else %} + + + + {% endfor %} + + +
VornameNachnameStrasseHausnr.PlzOrtTelefonrE-Mail
{{ kontaktperson.vorname }}{{ kontaktperson.nachname }}{{ kontaktperson.strasse }}{{ kontaktperson.hausnummer }}{{ kontaktperson.plz }}{{ kontaktperson.ort }}{{ kontaktperson.telefonnummer }}{{ kontaktperson.email }}
keine Einträge gefunden
diff --git a/templates/kontaktperson/edit.html.twig b/templates/kontaktperson/edit.html.twig new file mode 100644 index 0000000..1d3c78a --- /dev/null +++ b/templates/kontaktperson/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Kontaktperson{% endblock %} + +{% block body %} +

Edit Kontaktperson

+ + {{ include('kontaktperson/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('kontaktperson/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/kontaktperson/index.html.twig b/templates/kontaktperson/index.html.twig new file mode 100644 index 0000000..03bff12 --- /dev/null +++ b/templates/kontaktperson/index.html.twig @@ -0,0 +1,29 @@ +{% extends 'base.html.twig' %} + +{% block title %}Kontaktperson index{% endblock %} + +{% block body %} +

Kontaktpersonen

+ {% if minderjaehrig and kontaktpeople is empty %} + + {% elseif not minderjaehrig%} + + {% endif %} + + {{ include('kontaktperson/_showtable.html.twig', {'kontaktpeople': kontaktpeople}) }} + +
+ +
+
+
+ +
+
+ Weiter +
+
+ +{% endblock %} diff --git a/templates/kontaktperson/new.html.twig b/templates/kontaktperson/new.html.twig new file mode 100644 index 0000000..0c43ffa --- /dev/null +++ b/templates/kontaktperson/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Kontaktperson{% endblock %} + +{% block body %} +

Erfassen einer neuen Kontaktperson

+ + {{ include('kontaktperson/_form.html.twig') }} + + Zurück zur Übersicht +{% endblock %} diff --git a/templates/kontaktperson/show.html.twig b/templates/kontaktperson/show.html.twig new file mode 100644 index 0000000..f5cb551 --- /dev/null +++ b/templates/kontaktperson/show.html.twig @@ -0,0 +1,58 @@ +{% extends 'base.html.twig' %} + +{% block title %}Kontaktperson{% endblock %} + +{% block body %} +

Kontaktperson

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Id{{ kontaktperson.id }}
Anrede{{ kontaktperson.anrede }}
Vorname{{ kontaktperson.vorname }}
Nachname{{ kontaktperson.nachname }}
Strasse{{ kontaktperson.strasse }}
Hausnummer{{ kontaktperson.hausnummer }}
Plz{{ kontaktperson.plz }}
Ort{{ kontaktperson.ort }}
Telefonnummer{{ kontaktperson.telefonnummer }}
Email{{ kontaktperson.email }}
+ + back to list + + edit + + {{ include('kontaktperson/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/mailer/mail.html.twig b/templates/mailer/mail.html.twig new file mode 100644 index 0000000..d422364 --- /dev/null +++ b/templates/mailer/mail.html.twig @@ -0,0 +1,62 @@ + +{% block title %}

Kopie der Anmeldedaten
an der Staatlichen Berufsschule 1 Bayreuth

{% endblock %} +{% block body %} + {% if registrierung.typ != "AUAU" and registrierung.typ != "EQ" and registrierung.typ != "UM" %} + + {% endif %} +

Schüler

+ {{ include('schueler/_mail_show.html.twig', { 'schueler': schueler}) }} + {% if schueler.fluechtling %} +

Informationen zu Flüchtling

+ {{ include('fluechtling/_mail_show.html.twig', { 'fluechtling': fluechtling}) }} + {% endif %} + {% if schueler.umschueler %} +

Informationen zu Umschüler

+ {{ include('umschueler/_mail_show.html.twig', { 'umschueler': umschueler}) }} + {% endif %} + {% if ausbildung is not null %} +

Ausbildung

+ {{ include('ausbildung/_mail_show.html.twig', { 'ausbildung': ausbildung}) }} + {% if ausbildung.betrieb.id is null %} +

Betrieb

+ {{ include('betrieb/_mail_show.html.twig', { 'betrieb': ausbildung.betrieb }) }} + {% endif %} + {% endif %} +

Kontaktpersonen

+ {% for kontaktperson in kontaktpersonen %} + {{ include('kontaktperson/_mail_show.html.twig', { 'kontaktperson': kontaktperson}) }} + {% else %} +
Keine Kontaktpersonen erfasst
+ {% endfor %} +

Vorbildung

+ {% if schulbesuche is not null %} +

Schulbesuche

+ {{ include('schulbesuch/_mail_showtable.html.twig', { 'schulbesuche': schulbesuche}) }} + {% endif %} + {{ include('vorbildung/_mail_show.html.twig') }} +

Allgemein

+ {{ include('allgemein/_mail_show.html.twig', { 'registrierung': registrierung}) }} + +

Hinweise zum Schuljahresbeginn

+

Klasseneinteilung

+ Ihre vorläufige Klasse ist die {{klasse }}. Die vorläufigen Blockpläne finden Sie hier .
+ Eine endgültige Klasseneinteilung erfolgt erst zum neuen Schuljahr.
+ Diese kann ab dem 01. September in WebUntis eingesehen werden.
+ Zugangsdaten für WebUntis:
+ Benutzername: {{untisbenutzer}}
+ Passwort: {{untispasswort}}

+ +

Mitzubringende Unterlagen am 1. Schultag

+
+ +

Willkommensbroschüre

+ Viele weitergehende Fragen können mit Hilfe unserer Willkommensbroschüre geklärt werden, welche jeder Schüler zu Beginn des Schuljahres auch in gedruckter Form erhält.
+ +{% endblock %} diff --git a/templates/migration/index.html.twig b/templates/migration/index.html.twig new file mode 100644 index 0000000..4c52a0d --- /dev/null +++ b/templates/migration/index.html.twig @@ -0,0 +1,14 @@ +{% extends 'base.html.twig' %} + +{% block title %}Hello MigrationController!{% endblock %} + +{% block body %} + + +
+

Es wurden {{ count }} {{ tabelle }} migriert

+
+{% endblock %} diff --git a/templates/registrierung/_delete_form.html.twig b/templates/registrierung/_delete_form.html.twig new file mode 100644 index 0000000..a70f972 --- /dev/null +++ b/templates/registrierung/_delete_form.html.twig @@ -0,0 +1,5 @@ +
+ + + +
diff --git a/templates/registrierung/_form.html.twig b/templates/registrierung/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/registrierung/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/registrierung/_show.html.twig b/templates/registrierung/_show.html.twig new file mode 100644 index 0000000..81576b9 --- /dev/null +++ b/templates/registrierung/_show.html.twig @@ -0,0 +1,26 @@ +

Registrierung

+ + + + + + + + + + + + + + + + + + + + + + + + +
Datum{{ registrierung.datum ? registrierung.datum|date('Y-m-d H:i:s') : '' }}
Mitteilung{{ registrierung.mitteilung }}
Wohnheim{{ registrierung.wohnheim ? 'Yes' : 'No' }}
Eintritt am{{ registrierung.eintrittAm ? registrierung.eintrittAm|date('Y-m-d') : '' }}
Typ{{ registrierung.typ }}
\ No newline at end of file diff --git a/templates/registrierung/show.html.twig b/templates/registrierung/show.html.twig new file mode 100644 index 0000000..959709e --- /dev/null +++ b/templates/registrierung/show.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Registrierung{% endblock %} + +{% block body %} + {{ include('registrierung/_show.html.twig') }} + + back to list + + edit + + {{ include('registrierung/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/registrierung/update.html.twig b/templates/registrierung/update.html.twig new file mode 100644 index 0000000..c9b8e0d --- /dev/null +++ b/templates/registrierung/update.html.twig @@ -0,0 +1,10 @@ +{% extends 'base.html.twig' %} + +{% block title %}Update Registrierung{% endblock %} + +{% block body %} +

Update Registrierung

+ + {{ include('registrierung/_form.html.twig', {'button_label': 'Update'}) }} + +{% endblock %} diff --git a/templates/schueler/_form.html.twig b/templates/schueler/_form.html.twig new file mode 100644 index 0000000..1328746 --- /dev/null +++ b/templates/schueler/_form.html.twig @@ -0,0 +1,153 @@ +{{ form_start(form) }} +
+
+
+ +
+ {{ form_errors(form.vorname) }} +
+ {{ form_widget(form.vorname, {'attr': {'placeholder': 'Max', 'class': 'form-control',}}) }} +
+
+ +
+ {{ form_errors(form.nachname) }} +
+ {{ form_widget(form.nachname, {'attr': {'placeholder': 'Mustermann', 'class': 'form-control',}}) }} +
+
+
+
+ +
+ {{ form_errors(form.rufname) }} +
+ {{ form_widget(form.rufname, {'attr': {'placeholder': 'Max', 'class': 'form-control',}}) }} +
+
+ +
+ {{ form_errors(form.geschlecht) }} +
+ {{ form_widget(form.geschlecht, {'attr': {'placeholder': 'Geschlecht', 'class': 'form-control',}}) }} +
+
+
+
+ +
+ {{ form_errors(form.strasse) }} +
+ {{ form_widget(form.strasse, {'attr': {'placeholder': 'Mustertraße', 'class': 'form-control',}}) }} +
+
+ +
+ {{ form_errors(form.hsnr) }} +
+ {{ form_widget(form.hsnr, {'attr': {'placeholder': '15', 'class': 'form-control',}}) }} +
+
+
+
+ +
+ {{ form_errors(form.plz) }} +
+ {{ form_widget(form.plz, {'attr': {'placeholder': '91234', 'class': 'form-control',}}) }} +
+
+ +
+ {{ form_errors(form.ort) }} +
+ {{ form_widget(form.ort, {'attr': {'placeholder': 'Musterstadt', 'class': 'form-control',}}) }} +
+
+
+
+ +
+ {{ form_errors(form.tel) }} +
+ {{ form_widget(form.tel, {'attr': {'placeholder': '0123/456789', 'class': 'form-control',}}) }} +
+
+ +
+ {{ form_errors(form.email) }} +
+ {{ form_widget(form.email, {'attr': {'placeholder': 'm.mustermann@musterfirma.de', 'class': 'form-control',}}) }} +
+
+
+
+ +
+ {{ form_errors(form.geburtsdatum) }} +
+ {{ form_widget(form.geburtsdatum, {'attr': {'placeholder': '01.01.2015', 'class': 'form-control',}}) }} +
+
+
+
+
+ {{ form_errors(form.geburtsort) }} +
+ {{ form_widget(form.geburtsort, {'attr': {'placeholder': 'Musterstadt', 'class': 'form-control',}}) }} +
+
+ +
+ {{ form_errors(form.geburtsland) }} +
+ {{ form_widget(form.geburtsland, {'attr': {'placeholder': 'Geburtsland', 'class': 'form-control',}}) }} +
+
+ {% if form.zuzugAm is defined %} + + {% endif %} +
+
+ +
+ {{ form_errors(form.staatsangehoerigkeit) }} +
+ {{ form_widget(form.staatsangehoerigkeit, {'attr': {'placeholder': 'Staatsangehörigkeit', 'class': 'form-control',}}) }} +
+
+ +
+ {{ form_errors(form.bekenntnis) }} +
+ {{ form_widget(form.bekenntnis, {'attr': {'class': 'form-control',}}) }} +
+
+
+ +
+
+
+
+ +
+
+ +
+
+{{ form_end(form) }} \ No newline at end of file diff --git a/templates/schueler/_mail_show.html.twig b/templates/schueler/_mail_show.html.twig new file mode 100644 index 0000000..8c9a4d2 --- /dev/null +++ b/templates/schueler/_mail_show.html.twig @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if schueler.zuzugAm is not null %} + + + + + + + + + {% endif %} + + + + + + + + + +
Name (gesamt):{{ schueler.vorname }} {{ schueler.nachname }}
Rufname:{{ schueler.rufname }}
Geburtsdatum:{{ schueler.geburtsdatum ? schueler.geburtsdatum|date('d.m.Y') : '' }}
Geburtsort:{{ schueler.geburtsort }}
Geschlecht: + {% if schueler.geschlecht == 'm' %} + Männlich + {% elseif schueler.geschlecht == 'w' %} + Weiblich + {% elseif schueler.geschlecht == 'd' %} + Divers + {% else %} + + {% endif %} +
Straße:{{ schueler.strasse }} {{ schueler.hsnr }}
Ort:{{ schueler.plz }} {{ schueler.ort }}
Telefonnummer:{{ schueler.tel }}
E-Mail Adresse:{{ schueler.email }}
Geburtsland:{{ schueler.geburtslandReadable }}
Zuzug nach Deutschland:{{ schueler.zuzugAm ? schueler.zuzugAm|localizeddate('full', 'none', 'de' , null, 'MMMM yyyy') : '' }}
Zuzugsart:{{ schueler.zuzugsart ? schueler.zuzugsartReadable }}
Staatsangehörigkeit:{{ schueler.staatsangehoerigkeitReadable }}
Bekenntnis:{{ schueler.bekenntnisReadable }}
\ No newline at end of file diff --git a/templates/schueler/_show.html.twig b/templates/schueler/_show.html.twig new file mode 100644 index 0000000..7081900 --- /dev/null +++ b/templates/schueler/_show.html.twig @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if schueler.zuzugAm is not null %} + + + + + + + + + {% endif %} + + + + + + + + + +
Name (gesamt){{ schueler.vorname }} {{ schueler.nachname }}
Rufname{{ schueler.rufname }}
Geburtsdatum{{ schueler.geburtsdatum ? schueler.geburtsdatum|date('d.m.Y') : '' }}
Geburtsort{{ schueler.geburtsort }}
Geschlecht + {% if schueler.geschlecht == 'm' %} + Männlich + {% elseif schueler.geschlecht == 'w' %} + Weiblich + {% elseif schueler.geschlecht == 'w' %} + Divers + {% else %} + + {% endif %} +
Straße{{ schueler.strasse }} {{ schueler.hsnr }}
Ort{{ schueler.plz }} {{ schueler.ort }}
Telefonnummer{{ schueler.tel }}
E-Mail Adresse{{ schueler.email }}
Geburtsland{{ schueler.geburtslandReadable }}
Zuzug nach Deutschland{{ schueler.zuzugAm ? schueler.zuzugAm|localizeddate('full', 'none', 'de' , null, 'yyyy') : '' }}
Zuzugsart:{{ schueler.zuzugsart ? schueler.zuzugsartReadable }}
Staatsangehörigkeit{{ schueler.staatsangehoerigkeitReadable }}
Bekenntnis{{ schueler.bekenntnisReadable }}
\ No newline at end of file diff --git a/templates/schueler/new.html.twig b/templates/schueler/new.html.twig new file mode 100644 index 0000000..30c6e3d --- /dev/null +++ b/templates/schueler/new.html.twig @@ -0,0 +1,61 @@ +{% extends 'base.html.twig' %} +{% block title %}Schülerdaten{% endblock %} +{% block body %} +

Daten des Schülers

+ + {{ include('schueler/_form.html.twig') }} + +{% endblock %} +{% block stylesheets %} + {{ parent() }} + +{% endblock stylesheets %} +{% block javascripts_footer %} + {{ parent() }} + + + +{% endblock javascripts_footer%} \ No newline at end of file diff --git a/templates/schueler/show.html.twig b/templates/schueler/show.html.twig new file mode 100644 index 0000000..be4a2b4 --- /dev/null +++ b/templates/schueler/show.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Schueler{% endblock %} + +{% block body %} + {{ include('schueler/_show.html.twig') }} + + back to list + + edit + + {{ include('schueler/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/schueler/update.html.twig b/templates/schueler/update.html.twig new file mode 100644 index 0000000..f122b64 --- /dev/null +++ b/templates/schueler/update.html.twig @@ -0,0 +1,61 @@ +{% extends 'base.html.twig' %} + +{% block title %}Schülerdaten aktualisieren{% endblock %} + +{% block body %} +

Schülerdaten aktualisieren

+ {{ include('schueler/_form.html.twig', {'button_label': 'Update'}) }} +{% endblock %} +{% block stylesheets %} + {{ parent() }} + +{% endblock stylesheets %} +{% block javascripts_footer %} + {{ parent() }} + + + +{% endblock javascripts_footer%} \ No newline at end of file diff --git a/templates/schulbesuch/_form.html.twig b/templates/schulbesuch/_form.html.twig new file mode 100644 index 0000000..5e932fd --- /dev/null +++ b/templates/schulbesuch/_form.html.twig @@ -0,0 +1,31 @@ +{{ form_start(form) }} + +
+
+ + {{ form_widget(form.schule, {'attr':{'class':'form-control'}}) }} +
+
+ +Neue Schule anlegen + + + +
+
+ + {{ form_widget(form.eintritt, {'attr':{'class':'form-control'}}) }} +
+
+ + {{ form_widget(form.austritt, {'attr':{'class':'form-control'}}) }} +
+
+ +
+
+ + + + +{{ form_end(form) }} \ No newline at end of file diff --git a/templates/schulbesuch/_mail_showtable.html.twig b/templates/schulbesuch/_mail_showtable.html.twig new file mode 100644 index 0000000..e14d242 --- /dev/null +++ b/templates/schulbesuch/_mail_showtable.html.twig @@ -0,0 +1,22 @@ + + + + + + + + + + {% for schulbesuch in schulbesuche %} + + + + + + {% else %} + + + + {% endfor %} + +
Schulname:Eintritt:Austritt:
{{ schulbesuch.schule.name }}{{ schulbesuch.eintritt ? schulbesuch.eintritt|date('Y-m-d') : '' }}{{ schulbesuch.austritt ? schulbesuch.austritt|date('Y-m-d') : '' }}
Noch keine Schulbesuche hinterlegt.
\ No newline at end of file diff --git a/templates/schulbesuch/_show.html.twig b/templates/schulbesuch/_show.html.twig new file mode 100644 index 0000000..e69de29 diff --git a/templates/schulbesuch/_showtable.html.twig b/templates/schulbesuch/_showtable.html.twig new file mode 100644 index 0000000..6d7bd29 --- /dev/null +++ b/templates/schulbesuch/_showtable.html.twig @@ -0,0 +1,22 @@ + + + + + + + + + + {% for schulbesuch in schulbesuche %} + + + + + + {% else %} + + + + {% endfor %} + +
SchulnameEintrittAustritt
{{ schulbesuch.schule.name }}{{ schulbesuch.eintritt ? schulbesuch.eintritt|date('Y-m-d') : '' }}{{ schulbesuch.austritt ? schulbesuch.austritt|date('Y-m-d') : '' }}
\ No newline at end of file diff --git a/templates/schulbesuch/index.html.twig b/templates/schulbesuch/index.html.twig new file mode 100644 index 0000000..e749e8a --- /dev/null +++ b/templates/schulbesuch/index.html.twig @@ -0,0 +1,6 @@ +{% extends 'base.html.twig' %} + +{% block title %}Kontaktperson index{% endblock %} +{% block body %} + {{ include('schulbesuch/table.html.twig', {'schulbesuche': schulbesuche}) }} +{% endblock %} \ No newline at end of file diff --git a/templates/schulbesuch/new.html.twig b/templates/schulbesuch/new.html.twig new file mode 100644 index 0000000..2b061b4 --- /dev/null +++ b/templates/schulbesuch/new.html.twig @@ -0,0 +1,48 @@ +{% extends 'base.html.twig' %} + +{% block title %}Schulbesuch{% endblock %} + +{% block body %} +

Schulbesuch

+ + {{ include('schulbesuch/_form.html.twig') }} + + Zurück zur Übersicht +{% endblock %} +{% block stylesheets %} + {{ parent() }} + +{% endblock stylesheets %} +{% block javascripts_footer %} + {{ parent() }} + + + +{% endblock javascripts_footer %} \ No newline at end of file diff --git a/templates/schulbesuch/show.html.twig b/templates/schulbesuch/show.html.twig new file mode 100644 index 0000000..a8ff985 --- /dev/null +++ b/templates/schulbesuch/show.html.twig @@ -0,0 +1,30 @@ +{% extends 'base.html.twig' %} + +{% block title %}Schulbesuch{% endblock %} + +{% block body %} +

Schulbesuch

+ + + + + + + + + + + + + + + + +
Id{{ schulbesuch.id }}
Eintritt{{ schulbesuch.eintritt ? schulbesuch.eintritt|date('Y-m-d') : '' }}
Austritt{{ schulbesuch.austritt ? schulbesuch.austritt|date('Y-m-d') : '' }}
+ + back to list + + edit + + {{ include('schulbesuch/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/schulbesuch/table.html.twig b/templates/schulbesuch/table.html.twig new file mode 100644 index 0000000..b7ae70a --- /dev/null +++ b/templates/schulbesuch/table.html.twig @@ -0,0 +1,2 @@ +{{ include('schulbesuch/_showtable.html.twig', {'schulbesuche': schulbesuche}) }} +Schulbesuch hinzufügen \ No newline at end of file diff --git a/templates/schule/_delete_form.html.twig b/templates/schule/_delete_form.html.twig new file mode 100644 index 0000000..9bdff49 --- /dev/null +++ b/templates/schule/_delete_form.html.twig @@ -0,0 +1,5 @@ +
+ + + +
diff --git a/templates/schule/_form.html.twig b/templates/schule/_form.html.twig new file mode 100644 index 0000000..031f62b --- /dev/null +++ b/templates/schule/_form.html.twig @@ -0,0 +1,55 @@ +{{ form_start(form) }} + +
+
+ +
+ {{ form_errors(form.name) }} +
+ {{ form_widget(form.name, {'attr':{'placeholder': 'Beispielschule', 'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.art) }} +
+ {{ form_widget(form.art, {'attr':{'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.strasse) }} +
+ {{ form_widget(form.strasse, {'attr':{'placeholder': 'Beispielstraße 15', 'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.plz) }} +
+ {{ form_widget(form.plz, {'attr':{'placeholder': '91234', 'class':'form-control'}}) }} +
+
+ +
+ {{ form_errors(form.ort) }} +
+ {{ form_widget(form.ort, {'attr':{'placeholder': 'Beispielstadt', 'class':'form-control'}}) }} +
+
+ +
+
+
+ +
+
+ +
+
+ +{{ form_end(form) }} diff --git a/templates/schule/_show.html.twig b/templates/schule/_show.html.twig new file mode 100644 index 0000000..d682241 --- /dev/null +++ b/templates/schule/_show.html.twig @@ -0,0 +1,31 @@ +

Schule

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Schulname{{ schule.name }}
Schulart{{ schule.art }}
Straße{{ schule.strasse }}
Hausnummer{{ schule.hausnummer }}
Ort{{ schule.ort }}
Postleitzahl{{ schule.plz }}
\ No newline at end of file diff --git a/templates/schule/edit.html.twig b/templates/schule/edit.html.twig new file mode 100644 index 0000000..c26e572 --- /dev/null +++ b/templates/schule/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Schule{% endblock %} + +{% block body %} +

Edit Schule

+ + {{ include('schule/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('schule/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/schule/index.html.twig b/templates/schule/index.html.twig new file mode 100644 index 0000000..5a48e9a --- /dev/null +++ b/templates/schule/index.html.twig @@ -0,0 +1,47 @@ +{% extends 'base.html.twig' %} + +{% block title %}Schule index{% endblock %} + +{% block body %} +

Schule index

+ + + + + + + + + + + + + + + + + {% for schule in schules %} + + + + + + + + + + + + {% else %} + + + + {% endfor %} + +
IdNameArtStrasseHausnummerOrtPlzIstVerifiziertactions
{{ schule.id }}{{ schule.name }}{{ schule.art }}{{ schule.strasse }}{{ schule.hausnummer }}{{ schule.ort }}{{ schule.plz }}{{ schule.istVerifiziert ? 'Yes' : 'No' }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/schule/new.html.twig b/templates/schule/new.html.twig new file mode 100644 index 0000000..78509ed --- /dev/null +++ b/templates/schule/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Schule{% endblock %} + +{% block body %} +

Anlegen einer neuen Schule

+ + {{ include('schule/_form.html.twig') }} + + Zurück +{% endblock %} diff --git a/templates/schule/show.html.twig b/templates/schule/show.html.twig new file mode 100644 index 0000000..0e5b604 --- /dev/null +++ b/templates/schule/show.html.twig @@ -0,0 +1,50 @@ +{% extends 'base.html.twig' %} + +{% block title %}Schule{% endblock %} + +{% block body %} +

Schule

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Id{{ schule.id }}
Name{{ schule.name }}
Art{{ schule.art }}
Strasse{{ schule.strasse }}
Hausnummer{{ schule.hausnummer }}
Ort{{ schule.ort }}
Plz{{ schule.plz }}
IstVerifiziert{{ schule.istVerifiziert ? 'Yes' : 'No' }}
+ + back to list + + edit + + {{ include('schule/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/schule/update.html.twig b/templates/schule/update.html.twig new file mode 100644 index 0000000..f8f3fbc --- /dev/null +++ b/templates/schule/update.html.twig @@ -0,0 +1,10 @@ +{% extends 'base.html.twig' %} + +{% block title %}Update Schule{% endblock %} + +{% block body %} +

Update Schule

+ + {{ include('schule/_form.html.twig', {'button_label': 'Update'}) }} + +{% endblock %} \ No newline at end of file diff --git a/templates/security/login.html.twig b/templates/security/login.html.twig new file mode 100644 index 0000000..9e60ca3 --- /dev/null +++ b/templates/security/login.html.twig @@ -0,0 +1,42 @@ +{% extends 'base-admin.html.twig' %} + +{% block title %}Log in!{% endblock %} + +{% block body %} +
+ {% if error %} +
{{ error.messageKey|trans(error.messageData, 'security') }}
+ {% endif %} + + {% if app.user %} +
+ You are logged in as {{ app.user.userIdentifier }}, Logout +
+ {% endif %} + +

Bitte melden Sie sich an.

+
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
+ +
+{% endblock %} diff --git a/templates/security/login.html.twig.bu b/templates/security/login.html.twig.bu new file mode 100644 index 0000000..f2fb0ef --- /dev/null +++ b/templates/security/login.html.twig.bu @@ -0,0 +1,48 @@ +{% extends 'base-admin.html.twig' %} + + +{% block title %}Log in!{% endblock %} + +{% block body %} +
+ {% if error %} +
{{ error.messageKey|trans(error.messageData, 'security') }}
+ {% endif %} + +

Bitte melden Sie sich an.

+
+
+ + + +
+
+ + + +
+
+ + + + {# + Uncomment this section and add a remember_me option below your firewall to activate remember me functionality. + See https://symfony.com/doc/current/security/remember_me.html + +
+ +
+ #} +
+
+
+ +
+
+ +
+{% endblock %} diff --git a/templates/start/_form.html.twig b/templates/start/_form.html.twig new file mode 100644 index 0000000..4ce4a31 --- /dev/null +++ b/templates/start/_form.html.twig @@ -0,0 +1,6 @@ +{{ form_start(form) }} +{{ form_widget(form) }} + +{{ form_end(form) }} +{# TODO wird das irgendwo verwendet? #} +{# TODO jetzt können wir auch mal die unnötigen Actions (Methoden in Controllern) und Templates aufräumen #} \ No newline at end of file diff --git a/templates/umschueler/_form.html.twig b/templates/umschueler/_form.html.twig new file mode 100644 index 0000000..e73fea0 --- /dev/null +++ b/templates/umschueler/_form.html.twig @@ -0,0 +1,34 @@ +{{ form_start(form) }} + +

Umschüler

+ +
+
+ +
+ {{ form_errors(form.traeger) }} +
+ {{ form_widget(form.traeger, {'attr':{'placeholder': 'Träger', 'class':'form-control'}}) }} + +
+ {{ form_errors(form.traegerSitz) }} +
+ {{ form_widget(form.traegerSitz, {'attr':{'placeholder': 'Trägersitz', 'class':'form-control'}}) }} + +
+ {{ form_errors(form.foerdererNr) }} +
+ {{ form_widget(form.foerdererNr, {'attr':{'class':'form-control'}}) }} +
+
+
+
+
+ +
+
+ +
+
+{{ form_end(form) }} + diff --git a/templates/umschueler/_mail_show.html.twig b/templates/umschueler/_mail_show.html.twig new file mode 100644 index 0000000..4e4c249 --- /dev/null +++ b/templates/umschueler/_mail_show.html.twig @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +
Träger:{{ umschueler.traeger }}
Trägersitz:{{ umschueler.traegerSitz }}
Förderernummer:{{ umschueler.foerdererNr }}
\ No newline at end of file diff --git a/templates/umschueler/_show.html.twig b/templates/umschueler/_show.html.twig new file mode 100644 index 0000000..a4c917c --- /dev/null +++ b/templates/umschueler/_show.html.twig @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +
Träger{{ umschueler.traeger }}
Trägersitz{{ umschueler.traegerSitz }}
Förderernummer{{ umschueler.foerdererNr }}
\ No newline at end of file diff --git a/templates/umschueler/new.html.twig b/templates/umschueler/new.html.twig new file mode 100644 index 0000000..20fdccc --- /dev/null +++ b/templates/umschueler/new.html.twig @@ -0,0 +1,7 @@ +{% extends 'base.html.twig' %} + +{% block title %}Umschulung{% endblock %} + +{% block body %} + {{ include('umschueler/_form.html.twig') }} +{% endblock %} diff --git a/templates/umschueler/show.html.twig b/templates/umschueler/show.html.twig new file mode 100644 index 0000000..637954d --- /dev/null +++ b/templates/umschueler/show.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Umschueler{% endblock %} + +{% block body %} + {{ include('umschueler/_show.html.twig') }} + + back to list + + edit + + {{ include('umschueler/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/umschueler/update.html.twig b/templates/umschueler/update.html.twig new file mode 100644 index 0000000..5288cd4 --- /dev/null +++ b/templates/umschueler/update.html.twig @@ -0,0 +1,10 @@ +{% extends 'base.html.twig' %} + +{% block title %}Update Umschülerinformationen{% endblock %} + +{% block body %} +

Update Umschülerinformationen

+ + {{ include('umschueler/_form.html.twig', {'button_label': 'Update'}) }} + +{% endblock %} diff --git a/templates/vorbildung/_delete_form.html.twig b/templates/vorbildung/_delete_form.html.twig new file mode 100644 index 0000000..dc915c8 --- /dev/null +++ b/templates/vorbildung/_delete_form.html.twig @@ -0,0 +1,5 @@ +
+ + + +
diff --git a/templates/vorbildung/_form.html.twig b/templates/vorbildung/_form.html.twig new file mode 100644 index 0000000..1cf92f9 --- /dev/null +++ b/templates/vorbildung/_form.html.twig @@ -0,0 +1,44 @@ +{{ form_start(form) }} +
+
+ +
+ {{ form_errors(form.letzteSchulart) }} +
+ {{ form_widget(form.letzteSchulart, {'attr':{'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.hoechsterAbschluss) }} +
+ {{ form_widget(form.hoechsterAbschluss, {'attr':{'class':'form-control'}}) }} +
+
+
+
+ +
+ {{ form_errors(form.hoechAbschlAn) }} +
+ {{ form_widget(form.hoechAbschlAn, {'attr':{'class':'form-control'}}) }} +
+
+
+
+
+
+ +
+
+ {% set boolean = (schulbesuche|length == 0) %} + {{ form_widget(form.save, { 'disabled': boolean }) }} +
+
+ + + + +{{ form_end(form) }} \ No newline at end of file diff --git a/templates/vorbildung/_mail_show.html.twig b/templates/vorbildung/_mail_show.html.twig new file mode 100644 index 0000000..32ba880 --- /dev/null +++ b/templates/vorbildung/_mail_show.html.twig @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +
letzte Schulart:{{ schueler.letzteSchulartReadable }}
Höchster erreichter bzw. in diesem Schuljahr angestrebter allgemeinbildender Schulabschluss:{{ schueler.hoechsterAbschlussReadable }}
Dieser Abschluss wurde bzw. wird an folgender Schulart erworben:{{ schueler.hoechAbschlAnReadable }}
\ No newline at end of file diff --git a/templates/vorbildung/_show.html.twig b/templates/vorbildung/_show.html.twig new file mode 100644 index 0000000..fa0dbc4 --- /dev/null +++ b/templates/vorbildung/_show.html.twig @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +
letzte Schulart{{ schueler.letzteSchulartReadable }}
Höchster erreichter bzw. in diesem Schuljahr angestrebter allgemeinbildender Schulabschluss:{{ schueler.hoechsterAbschlussReadable }}
Dieser Abschluss wurde bzw. wird an folgender Schulart erworben:{{ schueler.hoechAbschlAnReadable }}
\ No newline at end of file diff --git a/templates/vorbildung/index.html.twig b/templates/vorbildung/index.html.twig new file mode 100644 index 0000000..4a9c966 --- /dev/null +++ b/templates/vorbildung/index.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}Schulbesuch index{% endblock %} + +{% block body %} +

Vorbildung erfassen

+ +

Schullaufbahn

+ {{ include('schulbesuch/table.html.twig') }} + {{ include('vorbildung/_form.html.twig') }} +{% endblock %} diff --git a/templates/vorbildung/update.html.twig b/templates/vorbildung/update.html.twig new file mode 100644 index 0000000..86788e8 --- /dev/null +++ b/templates/vorbildung/update.html.twig @@ -0,0 +1,9 @@ +{% extends 'base.html.twig' %} + +{% block title %}Schulbesuch index{% endblock %} + +{% block body %} +

Vorbildung erfassen

+ {# TODO: TBD #} + {{ include('vorbildung/_form.html.twig') }} +{% endblock %} diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/translations/.gitignore b/translations/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/translations/security.de.php b/translations/security.de.php new file mode 100644 index 0000000..c4cfa00 --- /dev/null +++ b/translations/security.de.php @@ -0,0 +1,4 @@ + 'Zugangsdaten falsch!', +]; \ No newline at end of file