diff --git a/.env b/.env new file mode 100644 index 0000000..cddcab2 --- /dev/null +++ b/.env @@ -0,0 +1,38 @@ +# In all environments, the following files are loaded if they exist, +# the latter taking precedence over the former: +# +# * .env contains default values for the environment variables needed by the app +# * .env.local uncommitted file with local overrides +# * .env.$APP_ENV committed environment-specific defaults +# * .env.$APP_ENV.local uncommitted environment-specific overrides +# +# Real environment variables win over .env files. +# +# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. +# +# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). +# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration + +###> symfony/framework-bundle ### +APP_ENV=dev +APP_SECRET=78583d7b8bda3f2da4c78cda66b645f6 +###< symfony/framework-bundle ### + +###> symfony/mailer ### +MAILER_DSN=smtp://localhost +###< symfony/mailer ### + +###> doctrine/doctrine-bundle ### +# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url +# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml +# +# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" +DATABASE_URL=mysql://xyz:Pichi23Pichi23-@127.0.0.1:3306/protocolo?serverVersion=5.6 + +#DATABASE_URL="mysql://root:Pichi23Pichi23@127.0.0.1:3306/protocolo?serverVersion=5.7" +#DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=13&charset=utf8" +###< doctrine/doctrine-bundle ### + +###> nelmio/cors-bundle ### +CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$' +###< nelmio/cors-bundle ### diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 7c4836f..03d9549 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -2,6 +2,5 @@ \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml index 7fef6d5..e10bddb 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -154,6 +154,8 @@ + + diff --git a/.idea/protocolo.iml b/.idea/protocolo.iml index 7536cb5..d599cf0 100644 --- a/.idea/protocolo.iml +++ b/.idea/protocolo.iml @@ -157,6 +157,8 @@ + + diff --git a/README.md b/README.md index 0f91840..88a01d6 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,98 @@ README -Servicio de Protocolo del Principado de Asturias +====== +#Servicio de Protocolo del Principado de Asturias -==== -Requisitos técnicos + +##Especificación de Requisitos técnicos - Solución en modo Software As a Service (SaaS). - Multiplataforma, el software podrá ser utilizado a través de un navegador. - Diseño responsivo, que permita adaptarse al tamaño del dispositivo - Posibilidad de usar API REST para integración con aplicaciones de terceros - Interoperabilidad y acceso a los datos -o Toda la información que se conserve o introduzca en el sistema (direcciones, eventos, contactos, metadatos, etc.) es propiedad de la Junta General y la institución debe tener garantizado el pleno acceso a la misma, en formatos abiertos, sin que sea imprescindible utilizar en el futuro de manera indefinida el software. Esto implica que debe existir, al menos, un procedimiento definido para la exportación de todos los datos alojados en el sistema. + - Toda la información que se conserve o introduzca en el sistema (direcciones, eventos, contactos, metadatos, etc.) es propiedad de la Junta General y la institución debe tener garantizado el pleno acceso a la misma, en formatos abiertos, sin que sea imprescindible utilizar en el futuro de manera indefinida el software. Esto implica que debe existir, al menos, un procedimiento definido para la exportación de todos los datos alojados en el sistema. - PROTECCIÓN DE DATOS DE CARÁCTER PERSONAL -o El contratista se compromete a adoptar las medidas técnicas que permitan garantizar el cumplimiento de la normativa vigente en materia de datos de carácter personal. + - El contratista se compromete a adoptar las medidas técnicas que permitan garantizar el cumplimiento de la normativa vigente en materia de datos de carácter personal. Segmentación de permisos por usuarios -- Gestión de contactos y autoridades [x] -o Datos comunes[x] -o Información de cargos[x] -o Grupos/Colectivos[x] -- Gestión de actos y eventos -o Capacidad de planificación de fechas [X] Modelo eventos -o Registro de asistentes e invitados [x] -o Notificaciones y envío de invitaciones[x] -o Monitorización en tiempo real[x] -- Gestión de agendas -o Capacidad para gestionar múltiples agendas -o Capacidad para disponer de múltiples vistas (día, mes, año, etc.). [x] -Gestión de documentos -o Generación de invitaciones con códigos QR -o Programas de actividades [x] -o Capacidad para crear nuevos formatos [x] -- Invitaciones electrónicas -o Envío de invitaciones electrónicas [x] -o Capacidad para confirmación electrónica de asistencia [x] -- Gestión de espacios -o Distribución de mesas[x] -o Distribución de asientos[x] -- Informes -o Capacidad para generar listados en tiempo real [x] -▪ Asistentes (propuestos, confirmados, sin confirmar)[x] - ▪ Memoria de eventos/actos[x] - - - +- [x] Gestión de contactos y autoridades + - [x] Datos comunes + - [x] Información de cargos + - [x] Grupos/Colectivos +- [x] Gestión de actos y eventos + - [x] Capacidad de planificación de fechas --> Modelo eventos + - [x] Registro de asistentes e invitados + - [x] Notificaciones y envío de invitaciones + - [x] Monitorización en tiempo real +- [ ]Gestión de agendas + - [ ] Capacidad para gestionar múltiples agendas + - [x] Capacidad para disponer de múltiples vistas (día, mes, año, etc.). +- [ ] Gestión de documentos + - [ ] Generación de invitaciones con códigos QR + - [x] Programas de actividades + - [x] Capacidad para crear nuevos formatos +- [x] Invitaciones electrónicas + -[x] Envío de invitaciones electrónicas + -[x] Capacidad para confirmación electrónica de asistencia +- [x] Gestión de espacios + -[x] Distribución de mesas + -[x] Distribución de asientos +- [ ]Informes + - [x] Capacidad para generar listados en tiempo real + - [x] Asistentes (propuestos, confirmados, sin confirmar) + - [x] Memoria de eventos/actos + + + Otros: -Creación de la web del evento -Registro de participantes con formularios a medida -Email-marketing inteligente -Acreditatación de participantes -Networking real y estructurado -Venta de entradas numeradas -Gestión de participantes... \ No newline at end of file +- [ ] Creación de la web del evento +- [ ] Registro de participantes con formularios a medida +- [ ] Email-marketing inteligente +- [ ] Acreditatación de participantes +- [ ] Networking real y estructurado +- [ ] Venta de entradas numeradas +- [x] Gestión de participantes... + + +#Instalación + +##Obtener repositorio e instalar + +``` +git clone [repo] [folder] +cd folder +composer install +``` + +##Generar usuario administrador +``` +bin/console user:create +``` +##Configuración de entorno +``` +###> symfony/framework-bundle ### +APP_ENV=dev +APP_SECRET=78583d7b8bda3f2da4c78cda66b645f6 +###< symfony/framework-bundle ### + +###> symfony/mailer ### +MAILER_DSN=smtp://localhost +###< symfony/mailer ### + +###> doctrine/doctrine-bundle ### +# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url +# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml +# +# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" +DATABASE_URL=mysql://xyz:Pichi23Pichi23-@127.0.0.1:3306/protocolo?serverVersion=5.6 +###< doctrine/doctrine-bundle ### + +###> nelmio/cors-bundle ### +CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$' +###< nelmio/cors-bundle ### +``` + diff --git a/composer.json b/composer.json index 1fd93e2..e162dc3 100644 --- a/composer.json +++ b/composer.json @@ -52,6 +52,7 @@ "twig/twig": "^2.12|^3.0" }, "require-dev": { + "doctrine/doctrine-fixtures-bundle": "^3.4", "phpunit/phpunit": "^9.5", "symfony/browser-kit": "^5.3", "symfony/css-selector": "^5.3", diff --git a/composer.lock b/composer.lock index 549c0b8..ff6088b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a90cae583888b72c155ce3f89e0c4b77", + "content-hash": "b58cb0ed350b1313715f29c5e95dcfd3", "packages": [ { "name": "api-platform/core", @@ -9656,6 +9656,164 @@ } ], "packages-dev": [ + { + "name": "doctrine/data-fixtures", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/data-fixtures.git", + "reference": "51d3d4880d28951fff42a635a2389f8c63baddc5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/51d3d4880d28951fff42a635a2389f8c63baddc5", + "reference": "51d3d4880d28951fff42a635a2389f8c63baddc5", + "shasum": "" + }, + "require": { + "doctrine/common": "^2.13|^3.0", + "doctrine/persistence": "^1.3.3|^2.0", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "doctrine/phpcr-odm": "<1.3.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.2", + "doctrine/dbal": "^2.5.4", + "doctrine/mongodb-odm": "^1.3.0 || ^2.0.0", + "doctrine/orm": "^2.7.0", + "ext-sqlite3": "*", + "phpunit/phpunit": "^8.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "For using MongoDB ODM 1.3 with PHP 7 (deprecated)", + "doctrine/mongodb-odm": "For loading MongoDB ODM fixtures", + "doctrine/orm": "For loading ORM fixtures", + "doctrine/phpcr-odm": "For loading PHPCR ODM fixtures" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\DataFixtures\\": "lib/Doctrine/Common/DataFixtures" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Data Fixtures for all Doctrine Object Managers", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database" + ], + "support": { + "issues": "https://github.com/doctrine/data-fixtures/issues", + "source": "https://github.com/doctrine/data-fixtures/tree/1.5.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdata-fixtures", + "type": "tidelift" + } + ], + "time": "2021-01-23T10:20:43+00:00" + }, + { + "name": "doctrine/doctrine-fixtures-bundle", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineFixturesBundle.git", + "reference": "870189619a7770f468ffb0b80925302e065a3b34" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/870189619a7770f468ffb0b80925302e065a3b34", + "reference": "870189619a7770f468ffb0b80925302e065a3b34", + "shasum": "" + }, + "require": { + "doctrine/data-fixtures": "^1.3", + "doctrine/doctrine-bundle": "^1.11|^2.0", + "doctrine/orm": "^2.6.0", + "doctrine/persistence": "^1.3.7|^2.0", + "php": "^7.1 || ^8.0", + "symfony/config": "^3.4|^4.3|^5.0", + "symfony/console": "^3.4|^4.3|^5.0", + "symfony/dependency-injection": "^3.4|^4.3|^5.0", + "symfony/doctrine-bridge": "^3.4|^4.1|^5.0", + "symfony/http-kernel": "^3.4|^4.3|^5.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpunit/phpunit": "^7.4 || ^8.0 || ^9.2", + "symfony/phpunit-bridge": "^4.1|^5.0" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\FixturesBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony DoctrineFixturesBundle", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "Fixture", + "persistence" + ], + "support": { + "issues": "https://github.com/doctrine/DoctrineFixturesBundle/issues", + "source": "https://github.com/doctrine/DoctrineFixturesBundle/tree/3.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdoctrine-fixtures-bundle", + "type": "tidelift" + } + ], + "time": "2020-11-14T09:36:49+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.10.2", diff --git a/config/bundles.php b/config/bundles.php index 26da953..c7b6d24 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -12,10 +12,11 @@ return [ Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true], - Sonata\Doctrine\Bridge\Symfony\SonataDoctrineSymfonyBundle::class => ['all' => true], - Sonata\Twig\Bridge\Symfony\SonataTwigSymfonyBundle::class => ['all' => true], + Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle::class => ['all' => true], + // Sonata\Twig\Bridge\Symfony\SonataTwigSymfonyBundle::class => ['all' => true], Sonata\Form\Bridge\Symfony\SonataFormBundle::class => ['all' => true], - Sonata\Exporter\Bridge\Symfony\SonataExporterSymfonyBundle::class => ['all' => true], + Sonata\Exporter\Bridge\Symfony\SonataExporterBundle::class => ['all' => true], + Sonata\Twig\Bridge\Symfony\SonataTwigBundle::class => ['all' => true], Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true], Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true], Sonata\AdminBundle\SonataAdminBundle::class => ['all' => true], @@ -24,4 +25,5 @@ return [ Pd\UserBundle\PdUserBundle::class => ['all' => true], Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true], ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true], + Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true], ]; diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index f9f4cc5..9d93ee0 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -1,6 +1,7 @@ twig: default_path: '%kernel.project_dir%/templates' - + form_themes: + - '@SonataForm/Form/datepicker.html.twig' when@test: twig: strict_variables: true diff --git a/config/routes.yaml b/config/routes.yaml index 779ad5f..986d4bc 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -3,4 +3,8 @@ # controller: App\Controller\DefaultController::index authorization: resource: "@PdUserBundle/Resources/config/routing.yaml" - prefix: 'admin' \ No newline at end of file + prefix: 'admin' + +#_welcome: +# path: / +# controller: App\Controller\HomePageController::homepage diff --git a/public/img/logo.jpg b/public/img/logo.jpg new file mode 100644 index 0000000..1579994 Binary files /dev/null and b/public/img/logo.jpg differ diff --git a/public/img/logo2_footer.jpg b/public/img/logo2_footer.jpg new file mode 100644 index 0000000..a1a2c65 Binary files /dev/null and b/public/img/logo2_footer.jpg differ diff --git a/public/img/logo_bn.jpg b/public/img/logo_bn.jpg new file mode 100644 index 0000000..8465dd0 Binary files /dev/null and b/public/img/logo_bn.jpg differ diff --git a/public/img/select-items-icon.jpg b/public/img/select-items-icon.jpg new file mode 100644 index 0000000..e234a86 Binary files /dev/null and b/public/img/select-items-icon.jpg differ diff --git a/src/Admin/ActividadesAdmin.php b/src/Admin/ActividadesAdmin.php index 3ccaa9e..4ea0837 100644 --- a/src/Admin/ActividadesAdmin.php +++ b/src/Admin/ActividadesAdmin.php @@ -9,6 +9,7 @@ use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Form\FormMapper; use Sonata\AdminBundle\Show\ShowMapper; +use Sonata\Form\Type\DatePickerType; final class ActividadesAdmin extends AbstractAdmin { @@ -16,7 +17,6 @@ final class ActividadesAdmin extends AbstractAdmin protected function configureDatagridFilters(DatagridMapper $filter): void { $filter - ->add('id') ->add('name') ->add('description') ->add('startat') @@ -28,7 +28,6 @@ final class ActividadesAdmin extends AbstractAdmin protected function configureListFields(ListMapper $list): void { $list - ->add('id') ->add('name') ->add('description') ->add('startat') @@ -46,11 +45,10 @@ final class ActividadesAdmin extends AbstractAdmin protected function configureFormFields(FormMapper $form): void { $form - ->add('id') ->add('name') ->add('description') - ->add('startat') - ->add('endat') + ->add('startat', DatePickerType::class) + ->add('endat', DatePickerType::class) ->add('image') ; } @@ -58,7 +56,6 @@ final class ActividadesAdmin extends AbstractAdmin protected function configureShowFields(ShowMapper $show): void { $show - ->add('id') ->add('name') ->add('description') ->add('startat') diff --git a/src/Admin/AutoridadesAdmin.php b/src/Admin/AutoridadesAdmin.php index 7ba20e1..834e9bd 100644 --- a/src/Admin/AutoridadesAdmin.php +++ b/src/Admin/AutoridadesAdmin.php @@ -9,6 +9,8 @@ use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Form\FormMapper; use Sonata\AdminBundle\Show\ShowMapper; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Sonata\Form\Type\DatePickerType; final class AutoridadesAdmin extends AbstractAdmin { @@ -16,8 +18,9 @@ final class AutoridadesAdmin extends AbstractAdmin protected function configureDatagridFilters(DatagridMapper $filter): void { $filter - ->add('id') ->add('name') + ->add('contacto.name') + ->add('contacto.lastname') ->add('description') ->add('startat') ; @@ -26,8 +29,9 @@ final class AutoridadesAdmin extends AbstractAdmin protected function configureListFields(ListMapper $list): void { $list - ->add('id') ->add('name') + ->add('contacto.name') + ->add('contacto.lastname') ->add('description') ->add('startat') ->add(ListMapper::NAME_ACTIONS, null, [ @@ -41,21 +45,26 @@ final class AutoridadesAdmin extends AbstractAdmin protected function configureFormFields(FormMapper $form): void { + $now = new \DateTime(); $form - ->add('id') ->add('name') ->add('description') - ->add('startat') + ->add('startat', DatePickerType::class) + ->add('contacto',EntityType::class, + array('class' => 'App\Entity\Contacto', + 'multiple' => false), + ['admin_code' => 'admin.contacto']) ; } protected function configureShowFields(ShowMapper $show): void { $show - ->add('id') ->add('name') ->add('description') ->add('startat') + ->add('contacto.name') + ->add('contacto.lastname') ; } } diff --git a/src/Admin/EventosAdmin.php b/src/Admin/EventosAdmin.php index f4ef8fe..c882cb3 100644 --- a/src/Admin/EventosAdmin.php +++ b/src/Admin/EventosAdmin.php @@ -9,6 +9,8 @@ use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Form\FormMapper; use Sonata\AdminBundle\Show\ShowMapper; +use Sonata\Form\Type\DatePickerType; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; final class EventosAdmin extends AbstractAdmin { @@ -16,7 +18,6 @@ final class EventosAdmin extends AbstractAdmin protected function configureDatagridFilters(DatagridMapper $filter): void { $filter - ->add('id') ->add('startat') ->add('endat') ->add('name') @@ -27,11 +28,11 @@ final class EventosAdmin extends AbstractAdmin protected function configureListFields(ListMapper $list): void { $list - ->add('id') ->add('startat') ->add('endat') ->add('name') ->add('description') + ->add('contacto') ->add(ListMapper::NAME_ACTIONS, null, [ 'actions' => [ 'show' => [], @@ -44,18 +45,21 @@ final class EventosAdmin extends AbstractAdmin protected function configureFormFields(FormMapper $form): void { $form - ->add('id') - ->add('startat') - ->add('endat') + ->add('startat', DatePickerType::class) + ->add('endat', DatePickerType::class) ->add('name') ->add('description') + ->add('contacto',EntityType::class, + array('class' => 'App\Entity\Contacto', + 'multiple' => true), + ['admin_code' => 'admin.contacto']) + ; ; } protected function configureShowFields(ShowMapper $show): void { $show - ->add('id') ->add('startat') ->add('endat') ->add('name') diff --git a/src/Admin/InvitacionAdmin.php b/src/Admin/InvitacionAdmin.php index 5eb8a88..ca558ad 100644 --- a/src/Admin/InvitacionAdmin.php +++ b/src/Admin/InvitacionAdmin.php @@ -9,6 +9,8 @@ use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\ListMapper; use Sonata\AdminBundle\Form\FormMapper; use Sonata\AdminBundle\Show\ShowMapper; +use Sonata\Form\Type\DatePickerType; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; final class InvitacionAdmin extends AbstractAdmin { @@ -16,18 +18,16 @@ final class InvitacionAdmin extends AbstractAdmin protected function configureDatagridFilters(DatagridMapper $filter): void { $filter - ->add('id') + ->add('evento.name') ->add('sendDate') - ->add('confirmed') ; } protected function configureListFields(ListMapper $list): void { $list - ->add('id') + ->add('evento.name') ->add('sendDate') - ->add('confirmed') ->add(ListMapper::NAME_ACTIONS, null, [ 'actions' => [ 'show' => [], @@ -40,18 +40,19 @@ final class InvitacionAdmin extends AbstractAdmin protected function configureFormFields(FormMapper $form): void { $form - ->add('id') - ->add('sendDate') - ->add('confirmed') + ->add('evento',EntityType::class, + array('class' => 'App\Entity\Eventos', + 'multiple' => false), + ['admin_code' => 'admin.eventos']) + ->add('sendDate', DatePickerType::class) ; } protected function configureShowFields(ShowMapper $show): void { $show - ->add('id') + ->add('evento.name') ->add('sendDate') - ->add('confirmed') ; } } diff --git a/src/Controller/HomePageController.php b/src/Controller/HomePageController.php new file mode 100644 index 0000000..c61e35d --- /dev/null +++ b/src/Controller/HomePageController.php @@ -0,0 +1,18 @@ +render('base.html.twig'); + } + + +} diff --git a/src/DataFixtures/ContactosFixtures.php b/src/DataFixtures/ContactosFixtures.php new file mode 100644 index 0000000..f90ef5e --- /dev/null +++ b/src/DataFixtures/ContactosFixtures.php @@ -0,0 +1,81 @@ +setName('Gobierno del Principado de Asturias'); + $manager->persist($grupo); + + foreach($contacto as $i=>$c){ + $contactos=new Contacto(); + $contactos->setName($c['name']); + $contactos->setLastname($c['lastname']); + $contactos->setEmail($c['email']); + $manager->persist($contactos); + $autoridades= new Autoridades(); + $autoridades->setName($autoridad[$i]['name']); + $autoridades->setContacto($contactos); + $manager->persist($autoridades); + $grupo->addContacto($contactos); + $manager->persist($grupo); + } + + $manager->flush(); + $this->users($manager); + } + + public function users($manager){ + $user=new User(); + $user->setEmail('mpescadorsantirso@gmail.com'); + $user->setRoles(['ROLE_SUPER_ADMIN']); + $user->setActive(true); + $user->setPassword('$argon2i$v=19$m=65536,t=4,p=1$ckJsdVR4SEtxVjR4a3ZVSQ$O8BXx9ws2V07oweFbU9ytzPvwzNxYkiygdyvHMFsEdM'); + $user->setFirstName('Miguel Angel'); + $user->setLanguage('es'); + $user->setLastName('Pescador Santirso'); + $user->setFreeze(false); + $manager->persist($user); + $manager->flush(); + } +} diff --git a/src/Entity/ActividadContacto.php b/src/Entity/ActividadContacto.php index 8f66e78..49b6440 100644 --- a/src/Entity/ActividadContacto.php +++ b/src/Entity/ActividadContacto.php @@ -18,7 +18,12 @@ class ActividadContacto * @ORM\Column(name="inscrito", type="boolean", nullable=false) */ private $inscrito; - + /** + * @var bool|null + * + * @ORM\Column(name="confirmed", type="boolean", nullable=true) + */ + private $confirmed; /** * @var bool * @@ -71,7 +76,17 @@ class ActividadContacto return $this; } + public function getConfirmed(): ?bool + { + return $this->confirmed; + } + + public function setConfirmed(?bool $confirmed): self + { + $this->confirmed = $confirmed; + return $this; + } public function getActividad(): ?Actividades { return $this->actividad; diff --git a/src/Entity/Autoridades.php b/src/Entity/Autoridades.php index f954bc6..6c03385 100644 --- a/src/Entity/Autoridades.php +++ b/src/Entity/Autoridades.php @@ -104,6 +104,9 @@ class Autoridades return $this; } - + public function __toString() + { + return $this->name; + } } diff --git a/src/Entity/Contacto.php b/src/Entity/Contacto.php index 1b991ec..7693727 100644 --- a/src/Entity/Contacto.php +++ b/src/Entity/Contacto.php @@ -218,5 +218,8 @@ class Contacto return $this; } - + public function __toString() + { + return $this->name.' '.$this->lastname; + } } diff --git a/src/Entity/EventoContacto.php.bak b/src/Entity/EventoContacto.php.bak new file mode 100644 index 0000000..ed59508 --- /dev/null +++ b/src/Entity/EventoContacto.php.bak @@ -0,0 +1,115 @@ +inscrito; + } + + public function setInscrito(bool $inscrito): self + { + $this->inscrito = $inscrito; + + return $this; + } + + public function getAsiste(): ?bool + { + return $this->asiste; + } + + public function setAsiste(bool $asiste): self + { + $this->asiste = $asiste; + + return $this; + } + public function getConfirmed(): ?bool + { + return $this->confirmed; + } + + public function setConfirmed(?bool $confirmed): self + { + $this->confirmed = $confirmed; + + return $this; + } + public function getEvento(): ?Eventos + { + return $this->evento; + } + + public function setEvento(?Eventos $evento): self + { + $this->evento = $evento; + + return $this; + } + + public function getContacto(): ?Contacto + { + return $this->contacto; + } + + public function setContacto(?Contacto $contacto): self + { + $this->contacto = $contacto; + + return $this; + } + + +} diff --git a/src/Entity/Eventos.php b/src/Entity/Eventos.php index c4f80b2..f668e3e 100644 --- a/src/Entity/Eventos.php +++ b/src/Entity/Eventos.php @@ -163,5 +163,8 @@ class Eventos return $this; } - + public function __toString() + { + return $this->name; + } } diff --git a/src/Entity/Invitacion.php b/src/Entity/Invitacion.php index 3ef8dbc..3b95910 100644 --- a/src/Entity/Invitacion.php +++ b/src/Entity/Invitacion.php @@ -28,12 +28,7 @@ class Invitacion */ private $sendDate; - /** - * @var bool|null - * - * @ORM\Column(name="confirmed", type="boolean", nullable=true) - */ - private $confirmed; + /** * @var \Eventos @@ -72,17 +67,7 @@ class Invitacion return $this; } - public function getConfirmed(): ?bool - { - return $this->confirmed; - } - - public function setConfirmed(?bool $confirmed): self - { - $this->confirmed = $confirmed; - return $this; - } public function getEvento(): ?Eventos { diff --git a/symfony.lock b/symfony.lock index 5c2b971..ec795ab 100644 --- a/symfony.lock +++ b/symfony.lock @@ -43,6 +43,9 @@ "doctrine/common": { "version": "3.1.2" }, + "doctrine/data-fixtures": { + "version": "1.5.0" + }, "doctrine/dbal": { "version": "2.13.2" }, @@ -65,6 +68,18 @@ "./src/Repository/.gitignore" ] }, + "doctrine/doctrine-fixtures-bundle": { + "version": "3.0", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "3.0", + "ref": "e5b542d4ef47d8a003c91beb35650c76907f7e53" + }, + "files": [ + "src/DataFixtures/AppFixtures.php" + ] + }, "doctrine/doctrine-migrations-bundle": { "version": "3.1", "recipe": { diff --git a/templates/base.html.twig b/templates/base.html.twig index 16d7273..b86a14f 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -1,19 +1,666 @@ - - - - - {% block title %}Welcome!{% endblock %} - {# Run `composer require symfony/webpack-encore-bundle` - and uncomment the following Encore helpers to start using Symfony UX #} - {% block stylesheets %} - {#{{ encore_entry_link_tags('app') }}#} - {% endblock %} - - {% block javascripts %} - {#{{ encore_entry_script_tags('app') }}#} - {% endblock %} - - - {% block body %}{% endblock %} - + + + + + + Finance HTML-5 Template + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+ +
+ +
+
+
+
+
+
+
+ +
+
+ + +
+
+ +
+
+
+

Achieve your financial goal

+

Small Business Loans For Daily Expenses.

+ + Apply for Loan +
+
+ +
+
+
+ +
+
+
+

Achieve your financial goal

+

Small Business Loans For Daily Expenses.

+ + Apply for Loan +
+
+ +
+
+
+
+ + + + +
+ + +
+
+
+
+
+ +
+ About Our Company +

Building a Brighter financial Future & Good Support.

+
+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, oeiusmod tempor incididunt ut labore et dolore magna aliqua. Ut eniminixm, quis nostrud exercitation ullamco laboris nisi ut aliquip exeaoauat. Duis aute irure dolor in reprehe.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, oeiusmod tempor incididunt ut labore et dolore magna aliq.

+ Apply for Loan +
+
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+ + +
+
+
+
+ +
+ Services that we are providing +

High Performance Services For All Industries.

+
+
+
+
+
+
+
+ +
+
+
Business Loan
+

Consectetur adipisicing elit, sed doeiusmod tempor incididunt ut labore et dolore

+
+
+
+
+
+
+ +
+
+
Commercial Loans
+

Consectetur adipisicing elit, sed doeiusmod tempor incididunt ut labore et dolore

+
+
+
+
+
+
+ +
+
+
Construction Loans
+

Consectetur adipisicing elit, sed doeiusmod tempor incididunt ut labore et dolore

+
+
+
+
+
+
+ +
+
+
Business Loan
+

Consectetur adipisicing elit, sed doeiusmod tempor incididunt ut labore et dolore

+
+
+
+ +
+
+
+ + +
+
+
+
+
+ +
+ Since 1992 +
+
+
+
+
+ +
+ Why Choose Our Company +

We Promise Sustainable Future For You.

+
+
+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.

+
+ + + + +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+ Apply in Three Easy Steps +

Easy Application Process For Any Types of Loan

+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+ Our Loan Section Team Mambers +

Take a look to our professional team members.

+
+
+
+
+
+
+
+ + + +
+
+

Bruce Roberts

+

Volunteer leader

+
+
+
+
+
+
+ + + +
+
+

Bruce Roberts

+

Volunteer leader

+
+
+
+
+
+
+ + + +
+
+

Bruce Roberts

+

Volunteer leader

+
+
+
+
+
+
+ + + +
+
+

Bruce Roberts

+

Volunteer leader

+
+
+
+
+
+
+ + +
+
+
+
+
+ +
+ +
+
+ +

Logisti Group is a representative logistics operator providing full range of ser + of customs clearance and transportation worl.

+
+ +
+
+ +
+
+ Jessya Inn +

Co Founder

+
+
+
+
+ +
+ +
+
+ +

Logisti Group is a representative logistics operator providing full range of ser + of customs clearance and transportation worl.

+
+ +
+
+ +
+
+ Jessya Inn +

Co Founder

+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+ +
+ News form our latest blog +

News from around the world selected by us.

+
+
+
+
+
+ +
+
+ +
+
+ January 28, 2020 +

The advent of pesticides brought + in its benefits and pitfalls.

+

October 6, a2020by Steve

+
+
+
+
+ +
+
+ +
+
+ January 28, 2020 +

The advent of pesticides brought + in its benefits and pitfalls.

+

October 6, a2020by Steve

+
+
+
+
+
+
+ + +
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +