From 23273dad3868163c54d2b6c194e368b241a25567 Mon Sep 17 00:00:00 2001 From: mapescador Date: Tue, 18 May 2021 17:22:51 +0200 Subject: [PATCH] Cambios en nombres de usuarios --- httpdocs/.idea/.gitignore | 8 ++ httpdocs/.idea/httpdocs.iml | 8 ++ httpdocs/.idea/modules.xml | 8 ++ httpdocs/.idea/php.xml | 4 + httpdocs/.idea/vcs.xml | 6 ++ httpdocs/config/services.yaml | 10 +- httpdocs/config/services/admin.yaml | 6 +- httpdocs/config/services/registrations.yaml | 10 +- httpdocs/config/validator/validator.yaml | 6 +- .../Command/ActionProcessorCommand.php | 2 +- .../Command/FAImporterCommand.php | 8 +- .../Command/FillTranslationCommand.php | 2 +- .../Command/GEImporterCommand.php | 6 +- .../Command/NormalizeTranslationsCommand.php | 2 +- ...ancialActorAdmin.php => ContableAdmin.php} | 4 +- httpdocs/src/Admin/ContactsAdmin.php | 8 +- httpdocs/src/Admin/ConvocatoriaAdmin.php | 6 +- ...trepreneurAdmin.php => LicitadorAdmin.php} | 8 +- .../Admin/{BsoAdmin.php => ServicioAdmin.php} | 2 +- .../{TrainerAdmin.php => SupervisorAdmin.php} | 2 +- httpdocs/src/Admin/WorkShopAdmin.php | 12 +-- httpdocs/src/Blocks/StatsBlockService.php | 10 +- httpdocs/src/Blocks/TrainerClassesBlock.php | 4 +- .../Admin/CalendarAdminController.php | 10 +- ...roller.php => ContableAdminController.php} | 6 +- .../Admin/ContadorAdminController.php | 10 +- .../Admin/DashboardAdminController.php | 2 +- .../Admin/EncuestaAdminController.php | 4 +- .../Admin/FormularioAdminController.php | 4 +- .../Admin/IndicadorAdminController.php | 2 +- ...oller.php => LicitadorAdminController.php} | 18 ++-- .../Admin/ProcesoTareaAdminController.php | 6 +- .../Admin/RealizarTareaAdminController.php | 10 +- .../RespuestasFormularioAdminController.php | 2 +- .../Admin/RespuestasTareaAdminController.php | 4 +- ...roller.php => ServicioAdminController.php} | 2 +- ...ller.php => SupervisorAdminController.php} | 14 +-- .../Controller/Admin/TareaAdminController.php | 4 +- .../Admin/TrainerAdminController.php.save | 79 ---------------- .../Admin/TrainerAdminController.php.save.1 | 91 ------------------- .../Admin/WorkShopsAdminController.php | 4 +- .../Controller/Api/CountersApiController.php | 6 +- .../Api/GuardarTareaApiController.php | 22 ++--- .../Api/GuardarTareaApiNonAdminController.php | 4 +- .../Controller/Api/PreguntasApiController.php | 22 ++--- httpdocs/src/Controller/ChatController.php | 4 +- .../RegistrationFinancialActorController.php | 6 +- ...egistrationGreenEnterpreneurController.php | 4 +- .../RegistrationTrainerController.php | 6 +- .../src/Controller/TareaErrorController.php | 2 +- httpdocs/src/Entity/.gitignore | 0 httpdocs/src/Entity/Bookmarks.php | 8 +- httpdocs/src/Entity/BussinessStage.php | 6 +- httpdocs/src/Entity/Comentarios.php | 6 +- .../{FinancialActor.php => Contable.php} | 12 +-- httpdocs/src/Entity/Convocatoria.php | 8 +- httpdocs/src/Entity/Encuesta.php | 6 +- httpdocs/src/Entity/Goal.php | 8 +- httpdocs/src/Entity/Inscripcion.php | 6 +- .../{GreenEntrepreneur.php => Licitador.php} | 18 ++-- httpdocs/src/Entity/Preguntas.php | 2 +- httpdocs/src/Entity/PreguntasFormulario.php | 2 +- .../src/Entity/ProcesoGreenEnterpreneur.php | 6 +- httpdocs/src/Entity/Respuestas.php | 6 +- httpdocs/src/Entity/RespuestasFormulario.php | 6 +- httpdocs/src/Entity/Sector.php | 14 +-- httpdocs/src/Entity/{Bso.php => Servicio.php} | 12 +-- .../Entity/{Trainer.php => Supervisor.php} | 10 +- .../src/Entity/TareaGreenEnterpreneur.php | 6 +- httpdocs/src/Entity/User.php | 6 +- httpdocs/src/Entity/WorkShop.php | 16 ++-- .../RegistrationFinancialActorFormType.php | 6 +- .../RegistrationGreenEnterpreneurFormType.php | 4 +- .../Form/Type/RegistrationTrainerFormType.php | 4 +- .../Repository/FinancialActorRepository.php | 2 +- .../GreenEntrepreneurRepository.php | 4 +- .../CRUD/list__action_share_files.html.twig | 2 +- .../CRUD/list__action_view_files.html.twig | 2 +- .../views/formcomponents/datatable.html.twig | 6 +- .../formcomponents/repetible/range.html.twig | 4 +- .../formcomponents/repetible/text.html.twig | 4 +- .../views/formcomponents/text.html.twig | 6 +- .../Conditions/PerfilesCondition.php | 2 +- .../Conditions/RespuestasCondition.php | 2 +- .../formcomponents/datatable.html.twig | 6 +- .../components/formcomponents/text.html.twig | 6 +- 86 files changed, 289 insertions(+), 425 deletions(-) create mode 100644 httpdocs/.idea/.gitignore create mode 100644 httpdocs/.idea/httpdocs.iml create mode 100644 httpdocs/.idea/modules.xml create mode 100644 httpdocs/.idea/php.xml create mode 100644 httpdocs/.idea/vcs.xml rename httpdocs/src/Admin/{FinancialActorAdmin.php => ContableAdmin.php} (99%) rename httpdocs/src/Admin/{GreenEntrepreneurAdmin.php => LicitadorAdmin.php} (98%) rename httpdocs/src/Admin/{BsoAdmin.php => ServicioAdmin.php} (99%) rename httpdocs/src/Admin/{TrainerAdmin.php => SupervisorAdmin.php} (99%) rename httpdocs/src/Controller/Admin/{FinancialActorAdminController.php => ContableAdminController.php} (93%) rename httpdocs/src/Controller/Admin/{GreenEntrepreneurAdminController.php => LicitadorAdminController.php} (93%) rename httpdocs/src/Controller/Admin/{BsoAdminController.php => ServicioAdminController.php} (98%) rename httpdocs/src/Controller/Admin/{TrainerAdminController.php => SupervisorAdminController.php} (93%) delete mode 100644 httpdocs/src/Controller/Admin/TrainerAdminController.php.save delete mode 100644 httpdocs/src/Controller/Admin/TrainerAdminController.php.save.1 delete mode 100644 httpdocs/src/Entity/.gitignore rename httpdocs/src/Entity/{FinancialActor.php => Contable.php} (96%) rename httpdocs/src/Entity/{GreenEntrepreneur.php => Licitador.php} (97%) rename httpdocs/src/Entity/{Bso.php => Servicio.php} (94%) rename httpdocs/src/Entity/{Trainer.php => Supervisor.php} (95%) diff --git a/httpdocs/.idea/.gitignore b/httpdocs/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/httpdocs/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/httpdocs/.idea/httpdocs.iml b/httpdocs/.idea/httpdocs.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/httpdocs/.idea/httpdocs.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/httpdocs/.idea/modules.xml b/httpdocs/.idea/modules.xml new file mode 100644 index 0000000..a3ac1f6 --- /dev/null +++ b/httpdocs/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/httpdocs/.idea/php.xml b/httpdocs/.idea/php.xml new file mode 100644 index 0000000..4bf4979 --- /dev/null +++ b/httpdocs/.idea/php.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/httpdocs/.idea/vcs.xml b/httpdocs/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/httpdocs/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/httpdocs/config/services.yaml b/httpdocs/config/services.yaml index 798f742..22097cc 100644 --- a/httpdocs/config/services.yaml +++ b/httpdocs/config/services.yaml @@ -77,18 +77,18 @@ services: $translator: '@translator.default' $mailer: '@mailer' public: true - #Trainer + #Supervisor fos_user.trainer.registration: class: App\Form\Type\RegistrationTrainerFormType arguments: - $class: "Trainer" + $class: "Supervisor" tags: - { name: form.type, alias: fos_user_trainer_registration} public: true fos_user.registration.form.trainer.factory: class: FOS\UserBundle\Form\Factory\FormFactory arguments: - $name: Trainer + $name: Supervisor $type: App\Form\Type\RegistrationTrainerFormType public: true App\Controller\RegistrationTrainerController: @@ -100,14 +100,14 @@ services: fos_user.financialactor.registration: class: App\Form\Type\RegistrationTrainerFormType arguments: - $class: "FinancialActor" + $class: "Contable" tags: - { name: form.type, alias: fos_user_financialactor_registration} public: true fos_user.registration.form.financialactor.factory: class: FOS\UserBundle\Form\Factory\FormFactory arguments: - $name: FinancialActor + $name: Contable $type: App\Form\Type\RegistrationFinancialActorFormType public: true App\Controller\RegistrationFinancialActorController: diff --git a/httpdocs/config/services/admin.yaml b/httpdocs/config/services/admin.yaml index 2d67949..388b117 100644 --- a/httpdocs/config/services/admin.yaml +++ b/httpdocs/config/services/admin.yaml @@ -246,7 +246,7 @@ services: class: App\Admin\TrainerAdmin arguments: [~, App\Entity\Trainer, App\Controller\Admin\TrainerAdminController] tags: - - { name: sonata.admin, manager_type: orm, group: admin, label: Trainer } + - { name: sonata.admin, manager_type: orm, group: admin, label: Supervisor } public: true calls: - [ setUserManager, [ "@fos_user.user_manager" ] ] @@ -256,7 +256,7 @@ services: class: App\Admin\FinancialActorAdmin arguments: [~, App\Entity\FinancialActor, App\Controller\Admin\FinancialActorAdminController, "@security.token_storage" ] tags: - - { name: sonata.admin, manager_type: orm, group: admin, label: FinancialActor } + - { name: sonata.admin, manager_type: orm, group: admin, label: Contable } public: true calls: - [ setUserManager, [ "@fos_user.user_manager" ] ] @@ -265,7 +265,7 @@ services: class: App\Admin\GreenEntrepreneurAdmin arguments: [~, App\Entity\GreenEntrepreneur, App\Controller\Admin\GreenEntrepreneurAdminController] tags: - - { name: sonata.admin, manager_type: orm, group: admin, label: GreenEntrepreneur } + - { name: sonata.admin, manager_type: orm, group: admin, label: Licitador } public: true calls: - [ setUserManager, [ "@fos_user.user_manager" ] ] diff --git a/httpdocs/config/services/registrations.yaml b/httpdocs/config/services/registrations.yaml index e1a15f6..55ea9e6 100644 --- a/httpdocs/config/services/registrations.yaml +++ b/httpdocs/config/services/registrations.yaml @@ -17,18 +17,18 @@ services: arguments: $formFactory: '@fos_user.registration.form.bso.factory' public: true - #Trainer + #Supervisor fos_user.trainer.registration: class: App\Form\Type\RegistrationTrainerFormType arguments: - $class: "Trainer" + $class: "Supervisor" tags: - { name: form.type, alias: fos_user_trainer_registration} public: true fos_user.registration.form.trainer.factory: class: FOS\UserBundle\Form\Factory\FormFactory arguments: - $name: Trainer + $name: Supervisor $type: App\Form\Type\RegistrationTrainerFormType public: true App\Controller\RegistrationTrainerController: @@ -39,14 +39,14 @@ services: fos_user.financialactor.registration: class: App\Form\Type\RegistrationTrainerFormType arguments: - $class: "FinancialActor" + $class: "Contable" tags: - { name: form.type, alias: fos_user_financialactor_registration} public: true fos_user.registration.form.financialactor.factory: class: FOS\UserBundle\Form\Factory\FormFactory arguments: - $name: FinancialActor + $name: Contable $type: App\Form\Type\RegistrationFinancialActorFormType public: true App\Controller\RegistrationFinancialActorController: diff --git a/httpdocs/config/validator/validator.yaml b/httpdocs/config/validator/validator.yaml index 53faad3..fb5ab83 100644 --- a/httpdocs/config/validator/validator.yaml +++ b/httpdocs/config/validator/validator.yaml @@ -10,7 +10,7 @@ # - Email: ~ # emailCanonical: # - Email: ~ -#App\Entity\FinancialActor: +#App\Entity\Contable: # constraints: # - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: { fields: email, message: "This email has already been registered"} # - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: { fields: username, message: "This username has already been registered"} @@ -32,7 +32,7 @@ # - Email: ~ # username: # - NotBlank: ~ -#App\Entity\GreenEntrepreneur: +#App\Entity\Licitador: # constraints: # - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: { fields: email, message: "This email has already been registered"} # - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: { fields: username, message: "This username has already been registered"} @@ -43,7 +43,7 @@ # - Email: ~ # username: # - NotBlank: ~ -#App\Entity\Trainer: +#App\Entity\Supervisor: # constraints: # - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: { fields: email, message: "This email has already been registered"} # - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: { fields: username, message: "This username has already been registered"} diff --git a/httpdocs/repositories/rule-engine-bundle-acdr/Command/ActionProcessorCommand.php b/httpdocs/repositories/rule-engine-bundle-acdr/Command/ActionProcessorCommand.php index c096c14..4e3c1b1 100644 --- a/httpdocs/repositories/rule-engine-bundle-acdr/Command/ActionProcessorCommand.php +++ b/httpdocs/repositories/rule-engine-bundle-acdr/Command/ActionProcessorCommand.php @@ -73,7 +73,7 @@ { //Get EntityManager $this->output=$output; - $this->usuario = $this->em->getRepository('App:GreenEntrepreneur') + $this->usuario = $this->em->getRepository('App:Licitador') ->findOneById($input->getArgument('userid')); if(empty($this->usuario)){ diff --git a/httpdocs/repositories/rule-engine-bundle-acdr/Command/FAImporterCommand.php b/httpdocs/repositories/rule-engine-bundle-acdr/Command/FAImporterCommand.php index 490e4f4..89cc776 100644 --- a/httpdocs/repositories/rule-engine-bundle-acdr/Command/FAImporterCommand.php +++ b/httpdocs/repositories/rule-engine-bundle-acdr/Command/FAImporterCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Doctrine\ORM\EntityManagerInterface; - use App\Entity\FinancialActor; + use App\Entity\Contable; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\IOFactory; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; @@ -106,7 +106,7 @@ } if(empty($repetido)){ - $repetido=$this->em->getRepository('App:FinancialActor')->findOneByEmail('rep'.$data['email']); + $repetido=$this->em->getRepository('App:Contable')->findOneByEmail('rep'.$data['email']); if(!empty($repetido)){ $data['email']='rep'.$data['email']; } @@ -116,7 +116,7 @@ $repetidoUser=$this->em->getRepository('App:User')->findOneByEmail($data['email']); $repetidoUser2=$this->em->getRepository('App:User')->findOneByEmail('rep'.$data['email']); echo 'No Repetido'; - $user=new FinancialActor(); + $user=new Contable(); $parts = explode("@", $data['email']); $data['email']=$data['email']; $data['username']=$data['email']; @@ -129,7 +129,7 @@ $this->updateUser($user, $data); }else{ if (empty($repetido)){ - $repetido=new FinancialActor(); + $repetido=new Contable(); } $parts = explode("@", $data['email']); $data['username']=$data['email']; diff --git a/httpdocs/repositories/rule-engine-bundle-acdr/Command/FillTranslationCommand.php b/httpdocs/repositories/rule-engine-bundle-acdr/Command/FillTranslationCommand.php index 0619b75..2da8405 100644 --- a/httpdocs/repositories/rule-engine-bundle-acdr/Command/FillTranslationCommand.php +++ b/httpdocs/repositories/rule-engine-bundle-acdr/Command/FillTranslationCommand.php @@ -9,7 +9,7 @@ use Symfony\Component\PropertyAccess\PropertyAccess; use Doctrine\ORM\EntityManagerInterface; // use Doctrine\Common\Annotations\Reader; - use App\Entity\GreenEntrepreneur; + use App\Entity\Licitador; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\IOFactory; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; diff --git a/httpdocs/repositories/rule-engine-bundle-acdr/Command/GEImporterCommand.php b/httpdocs/repositories/rule-engine-bundle-acdr/Command/GEImporterCommand.php index 6d6d201..63eb123 100644 --- a/httpdocs/repositories/rule-engine-bundle-acdr/Command/GEImporterCommand.php +++ b/httpdocs/repositories/rule-engine-bundle-acdr/Command/GEImporterCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Doctrine\ORM\EntityManagerInterface; - use App\Entity\GreenEntrepreneur; + use App\Entity\Licitador; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\IOFactory; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; @@ -87,9 +87,9 @@ } $data['sector']=$this->getSector($geuser[6]); $data['email']=$geuser[10]; - $repetido=$this->em->getRepository('App:GreenEntrepreneur')->findByEmail($data['email']); + $repetido=$this->em->getRepository('App:Licitador')->findByEmail($data['email']); if($this->checkemail($data['email']) && empty($repetido)){ - $user=new GreenEntrepreneur(); + $user=new Licitador(); $parts = explode("@", $data['email']); $data['username']=$data['email']; $data['plainPassword']=$parts[0]; diff --git a/httpdocs/repositories/rule-engine-bundle-acdr/Command/NormalizeTranslationsCommand.php b/httpdocs/repositories/rule-engine-bundle-acdr/Command/NormalizeTranslationsCommand.php index 5ff9863..8e724b2 100644 --- a/httpdocs/repositories/rule-engine-bundle-acdr/Command/NormalizeTranslationsCommand.php +++ b/httpdocs/repositories/rule-engine-bundle-acdr/Command/NormalizeTranslationsCommand.php @@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Doctrine\ORM\EntityManagerInterface; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\IOFactory; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; diff --git a/httpdocs/src/Admin/FinancialActorAdmin.php b/httpdocs/src/Admin/ContableAdmin.php similarity index 99% rename from httpdocs/src/Admin/FinancialActorAdmin.php rename to httpdocs/src/Admin/ContableAdmin.php index 575f7cd..66379f9 100644 --- a/httpdocs/src/Admin/FinancialActorAdmin.php +++ b/httpdocs/src/Admin/ContableAdmin.php @@ -4,7 +4,7 @@ declare(strict_types=1); namespace App\Admin; -use App\Entity\FinancialActor; +use App\Entity\Contable; use FM\ElfinderBundle\Form\Type\ElFinderType; use Sonata\AdminBundle\Admin\AbstractAdmin; use Sonata\AdminBundle\Datagrid\DatagridMapper; @@ -32,7 +32,7 @@ use Vich\UploaderBundle\Form\Type\VichImageType; use Symfony\Bridge\Doctrine\Form\Type\EntityType; -final class FinancialActorAdmin extends UserAdmin +final class ContableAdmin extends UserAdmin { private $tokenStorage; diff --git a/httpdocs/src/Admin/ContactsAdmin.php b/httpdocs/src/Admin/ContactsAdmin.php index af4c5f9..70faeed 100644 --- a/httpdocs/src/Admin/ContactsAdmin.php +++ b/httpdocs/src/Admin/ContactsAdmin.php @@ -4,8 +4,8 @@ declare(strict_types=1); namespace App\Admin; -use App\Entity\FinancialActor; -use App\Entity\GreenEntrepreneur; +use App\Entity\Contable; +use App\Entity\Licitador; use Sonata\AdminBundle\Admin\AbstractAdmin; use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\ListMapper; @@ -79,12 +79,12 @@ final class ContactsAdmin extends AbstractAdmin ] ]; $current_user = $this->getConfigurationPool()->getContainer()->get('security.token_storage')->getToken()->getUser(); - if($current_user instanceof GreenEntrepreneur){ + if($current_user instanceof Licitador){ $actions['shareFiles'] = [ 'template' => '@SonataAdmin/CRUD/list__action_share_files.html.twig' ]; } - if($current_user instanceof FinancialActor){ + if($current_user instanceof Contable){ $actions['viewFiles'] = [ 'template' => '@SonataAdmin/CRUD/list__action_view_files.html.twig' ]; diff --git a/httpdocs/src/Admin/ConvocatoriaAdmin.php b/httpdocs/src/Admin/ConvocatoriaAdmin.php index 758e17c..eec8124 100644 --- a/httpdocs/src/Admin/ConvocatoriaAdmin.php +++ b/httpdocs/src/Admin/ConvocatoriaAdmin.php @@ -6,7 +6,7 @@ namespace App\Admin; use App\Entity\Convocatoria; use App\Entity\Formulario; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use App\Entity\Procesos; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query\ResultSetMapping; @@ -239,7 +239,7 @@ final class ConvocatoriaAdmin extends AbstractAdmin ->setParameter('user', $current_user); }elseif( $authChecker->isGranted('ROLE_GREENENTERPRENEUR')) { $qb1 = $this->getModelManager() - ->createQuery(GreenEntrepreneur::class, 'ge') + ->createQuery(Licitador::class, 'ge') ->join('ge.convocatoria', 'gec') ->select("COUNT(ge.id)") ->where('gec = '.$alias); @@ -352,7 +352,7 @@ final class ConvocatoriaAdmin extends AbstractAdmin ) ->add('greenEntrepreneur',EntityType::class, array( - 'class' => GreenEntrepreneur::class, + 'class' => Licitador::class, 'choice_label' => 'nombreCompleto', 'query_builder' => function (EntityRepository $er) { return diff --git a/httpdocs/src/Admin/GreenEntrepreneurAdmin.php b/httpdocs/src/Admin/LicitadorAdmin.php similarity index 98% rename from httpdocs/src/Admin/GreenEntrepreneurAdmin.php rename to httpdocs/src/Admin/LicitadorAdmin.php index 52b8292..24dbc59 100644 --- a/httpdocs/src/Admin/GreenEntrepreneurAdmin.php +++ b/httpdocs/src/Admin/LicitadorAdmin.php @@ -6,8 +6,8 @@ namespace App\Admin; use App\Entity\Bso; use App\Entity\BussinessStage; -use App\Entity\FinancialActor; -use App\Entity\GreenEntrepreneur; +use App\Entity\Contable; +use App\Entity\Licitador; use App\Entity\Sector; use Doctrine\ORM\Query\Expr\Join; use Sonata\AdminBundle\Admin\AbstractAdmin; @@ -33,7 +33,7 @@ use Vich\UploaderBundle\Form\Type\VichImageType; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Sonata\DoctrineORMAdminBundle\Filter\DateRangeFilter; -final class GreenEntrepreneurAdmin extends UserAdmin +final class LicitadorAdmin extends UserAdmin { private $isDashboard = false; @@ -163,7 +163,7 @@ final class GreenEntrepreneurAdmin extends UserAdmin $query->expr()->eq('gec.bso', ':user') ) ->setParameter('user', $current_user); - }else if ($current_user instanceof FinancialActor && $this->isDashboard){ + }else if ($current_user instanceof Contable && $this->isDashboard){ $query->orWhere("0=1"); }else if ($current_user->getType() == 'trainer') { $query diff --git a/httpdocs/src/Admin/BsoAdmin.php b/httpdocs/src/Admin/ServicioAdmin.php similarity index 99% rename from httpdocs/src/Admin/BsoAdmin.php rename to httpdocs/src/Admin/ServicioAdmin.php index 6bba536..daa4c38 100644 --- a/httpdocs/src/Admin/BsoAdmin.php +++ b/httpdocs/src/Admin/ServicioAdmin.php @@ -21,7 +21,7 @@ use Symfony\Component\Form\Extension\Core\Type\TelType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Vich\UploaderBundle\Form\Type\VichImageType; -final class BsoAdmin extends UserAdmin +final class ServicioAdmin extends UserAdmin { public function getExportFields() diff --git a/httpdocs/src/Admin/TrainerAdmin.php b/httpdocs/src/Admin/SupervisorAdmin.php similarity index 99% rename from httpdocs/src/Admin/TrainerAdmin.php rename to httpdocs/src/Admin/SupervisorAdmin.php index e5f611d..524e054 100644 --- a/httpdocs/src/Admin/TrainerAdmin.php +++ b/httpdocs/src/Admin/SupervisorAdmin.php @@ -25,7 +25,7 @@ use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\EmailType; use Vich\UploaderBundle\Form\Type\VichImageType; -final class TrainerAdmin extends UserAdmin +final class SupervisorAdmin extends UserAdmin { public function getExportFields() diff --git a/httpdocs/src/Admin/WorkShopAdmin.php b/httpdocs/src/Admin/WorkShopAdmin.php index 1f82127..49ec04d 100644 --- a/httpdocs/src/Admin/WorkShopAdmin.php +++ b/httpdocs/src/Admin/WorkShopAdmin.php @@ -20,7 +20,7 @@ use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormEvent; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use Symfony\Component\Form\Extension\Core\Type\NumberType; use Symfony\Component\Form\FormEvents; use Sonata\AdminBundle\Route\RouteCollection; @@ -191,7 +191,7 @@ final class WorkShopAdmin extends AbstractAdmin { $user = $this->getConfigurationPool()->getContainer()->get('security.token_storage')->getToken()->getUser(); $workshop = $this->getSubject(); - $repo = $this->getModelManager()->getEntityManager(GreenEntrepreneur::class)->getRepository(GreenEntrepreneur::class); + $repo = $this->getModelManager()->getEntityManager(Licitador::class)->getRepository(Licitador::class); $entrepreneurs=$repo->getFilteredEntrepreneursByConvocatoria($workshop->getConvocatoria(), $workshop->getProcesos()); foreach($workshop->getGreenEntrepreneur() as $empre){ $entrepreneurs[]=$empre; @@ -228,7 +228,7 @@ final class WorkShopAdmin extends AbstractAdmin ) ->add('trainer',EntityType::class, array( - 'class' => 'App\Entity\Trainer', + 'class' => 'App\Entity\Supervisor', 'choice_label' => 'username', 'multiple'=> true, 'placeholder' => 'placeholder.select.trainer', @@ -241,7 +241,7 @@ final class WorkShopAdmin extends AbstractAdmin ) ->add('greenEntrepreneur',EntityType::class, array( - 'class' => 'App\Entity\GreenEntrepreneur', + 'class' => 'App\Entity\Licitador', 'placeholder' => 'Seleccione los Emprendedores', 'attr' => ['class' => 'sel-entrepreneur'], 'choices'=>$entrepreneurs, @@ -283,9 +283,9 @@ final class WorkShopAdmin extends AbstractAdmin } if(array_key_exists('greenEntrepreneur', $data)){ $repo = $this->getModelManager(); - $emprendedores = $repo->findBy(GreenEntrepreneur::class, ['id' => $data['greenEntrepreneur']]); + $emprendedores = $repo->findBy(Licitador::class, ['id' => $data['greenEntrepreneur']]); $form->add('greenEntrepreneur',EntityType::class, [ - 'class' => 'App\Entity\GreenEntrepreneur', + 'class' => 'App\Entity\Licitador', 'placeholder' => 'Seleccione los Emprendedores', 'attr' => ['class' => 'sel-entrepreneur'], 'choice_label' => 'nombreCompleto', diff --git a/httpdocs/src/Blocks/StatsBlockService.php b/httpdocs/src/Blocks/StatsBlockService.php index c5ec2de..06966c4 100644 --- a/httpdocs/src/Blocks/StatsBlockService.php +++ b/httpdocs/src/Blocks/StatsBlockService.php @@ -77,7 +77,7 @@ class StatsBlockService extends AbstractBlockService { $qbfa = $this->em->createQueryBuilder(); $qbbso = $this->em->createQueryBuilder(); $qb->select('count(ge.id)'); - $qb->from('App:GreenEntrepreneur','ge'); + $qb->from('App:Licitador','ge'); $countEntrepreneurs = $qb->getQuery()->getSingleScalarResult(); $contadorge->valor=$countEntrepreneurs; $contadorge->text='Entrepreneurs supported to develop their Sustainable Businesses'; @@ -87,7 +87,7 @@ class StatsBlockService extends AbstractBlockService { $contadorwge=new \stdClass(); $qb = $this->em->createQueryBuilder(); $qb->select('count(ge.id)'); - $qb->from('App:GreenEntrepreneur','ge'); + $qb->from('App:Licitador','ge'); $qb->where("ge.gender = 'f'"); $countWomenEntrepreneurs = $qb->getQuery()->getSingleScalarResult(); $contadorwge->valor=($countWomenEntrepreneurs/$countEntrepreneurs)*100; @@ -97,10 +97,10 @@ class StatsBlockService extends AbstractBlockService { $contadortr=new \stdClass(); $qb = $this->em->createQueryBuilder(); $qb->select('count(tr.id)'); - $qb->from('App:Trainer','tr'); + $qb->from('App:Supervisor','tr'); $countTrainers = $qb->getQuery()->getSingleScalarResult(); $contadortr->valor=$countTrainers; - $contadortr->text='Trainer Mentors trained in Sustainable Business Model Development'; + $contadortr->text='Supervisor Mentors trained in Sustainable Business Model Development'; $stats->add($contadortr); //BSOS $contadorbso=new \stdClass(); @@ -113,7 +113,7 @@ class StatsBlockService extends AbstractBlockService { //Financial Actors $contadorfa=new \stdClass(); $qbfa->select('count(fa.id)'); - $qbfa->from('App:FinancialActor','fa'); + $qbfa->from('App:Contable','fa'); $countfa = $qbfa->getQuery()->getSingleScalarResult(); $contadorfa->valor=$countfa; $contadorfa->text='Sources of financing available in our database'; diff --git a/httpdocs/src/Blocks/TrainerClassesBlock.php b/httpdocs/src/Blocks/TrainerClassesBlock.php index 7ad99e2..b7314a6 100644 --- a/httpdocs/src/Blocks/TrainerClassesBlock.php +++ b/httpdocs/src/Blocks/TrainerClassesBlock.php @@ -2,7 +2,7 @@ namespace App\Blocks; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use App\Entity\Mensaje; use App\Entity\Procesos; use App\Entity\Respuestas; @@ -106,7 +106,7 @@ class TrainerClassesBlock extends AbstractBlockService { return $this->response($blockContext, $response); }// endif $userId = $request->query->get('userId'); - $alumno = $this->em->getReference(GreenEntrepreneur::class, $userId); + $alumno = $this->em->getReference(Licitador::class, $userId); /* * Si el aluno es nulo o el usuario logado no pertenece al workshop cargamos la vista inicial * del dashboard diff --git a/httpdocs/src/Controller/Admin/CalendarAdminController.php b/httpdocs/src/Controller/Admin/CalendarAdminController.php index 12b70ea..db75580 100644 --- a/httpdocs/src/Controller/Admin/CalendarAdminController.php +++ b/httpdocs/src/Controller/Admin/CalendarAdminController.php @@ -3,8 +3,8 @@ namespace App\Controller\Admin; use App\Entity\Calendario; -use App\Entity\GreenEntrepreneur; -use App\Entity\Trainer; +use App\Entity\Licitador; +use App\Entity\Supervisor; use App\Entity\User; use App\Entity\WorkShop; use Sonata\AdminBundle\Controller\CRUDController; @@ -49,11 +49,11 @@ class CalendarAdminController extends CRUDController $calendarRepo = $this->getDoctrine()->getRepository(Calendario::class); $logedInUser = $this->getUser(); - if($logedInUser instanceof GreenEntrepreneur){ + if($logedInUser instanceof Licitador){ $events = $calendarRepo->findEventsByUSer($logedInUser, true); return new JsonResponse($events); } - if($logedInUser instanceof Trainer){ + if($logedInUser instanceof Supervisor){ $events = $calendarRepo->findEventsByUSer($logedInUser, true); return new JsonResponse($events); } @@ -81,7 +81,7 @@ class CalendarAdminController extends CRUDController } private function loggedUserCanSeeUserEvents($logedInUser, $user, $class){ - if(!$logedInUser instanceof Trainer){ + if(!$logedInUser instanceof Supervisor){ return false; } if($logedInUser->getWorkShop()->contains($class) && $user->getWorkshop()->contains($class)){ diff --git a/httpdocs/src/Controller/Admin/FinancialActorAdminController.php b/httpdocs/src/Controller/Admin/ContableAdminController.php similarity index 93% rename from httpdocs/src/Controller/Admin/FinancialActorAdminController.php rename to httpdocs/src/Controller/Admin/ContableAdminController.php index 4f3f665..6305b35 100644 --- a/httpdocs/src/Controller/Admin/FinancialActorAdminController.php +++ b/httpdocs/src/Controller/Admin/ContableAdminController.php @@ -4,7 +4,7 @@ declare(strict_types=1); namespace App\Controller\Admin; -use App\Entity\FinancialActor; +use App\Entity\Contable; use HttpInvalidParamException; use Sonata\AdminBundle\Controller\CRUDController; use Symfony\Component\HttpFoundation\JsonResponse; @@ -14,7 +14,7 @@ use Symfony\Component\Intl\Countries; use Symfony\Component\Routing\Exception\InvalidParameterException; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; -final class FinancialActorAdminController extends CRUDController +final class ContableAdminController extends CRUDController { /** @@ -74,7 +74,7 @@ final class FinancialActorAdminController extends CRUDController $country = $request->query->get('country'); $stage = $request->query->get('stage'); - $financialRepo = $this->getDoctrine()->getRepository(FinancialActor::class); + $financialRepo = $this->getDoctrine()->getRepository(Contable::class); $financialActors = $financialRepo->findByCountryAndInvestmentScopes($country, $stage); diff --git a/httpdocs/src/Controller/Admin/ContadorAdminController.php b/httpdocs/src/Controller/Admin/ContadorAdminController.php index dd358b2..0d73204 100644 --- a/httpdocs/src/Controller/Admin/ContadorAdminController.php +++ b/httpdocs/src/Controller/Admin/ContadorAdminController.php @@ -32,7 +32,7 @@ final class ContadorAdminController extends CRUDController $qbfa = $em->createQueryBuilder(); $qbbso = $em->createQueryBuilder(); $qbge->select('count(ge.id)'); - $qbge->from('App:GreenEntrepreneur','ge'); + $qbge->from('App:Licitador','ge'); $countEntrepreneurs = $qbge->getQuery()->getSingleScalarResult(); $contadorge->setCount($countEntrepreneurs); $contadorge->setText('Entrepreneurs supported to develop their Sustainable Businesses'); @@ -41,7 +41,7 @@ final class ContadorAdminController extends CRUDController //Porcentaje de mujeres $contadorwge=new Contador; $qbwge->select('count(ge.id)'); - $qbwge->from('App:GreenEntrepreneur','ge'); + $qbwge->from('App:Licitador','ge'); $qbwge->where("ge.gender = 'f'"); $countWomenEntrepreneurs = $qbwge->getQuery()->getSingleScalarResult(); $contadorwge->setCount(($countWomenEntrepreneurs/$countEntrepreneurs)*100); @@ -50,10 +50,10 @@ final class ContadorAdminController extends CRUDController //Trainers $contadortr=new Contador; $qb->select('count(tr.id)'); - $qb->from('App:Trainer','tr'); + $qb->from('App:Supervisor','tr'); $countTrainers = $qb->getQuery()->getSingleScalarResult(); $contadortr->setCount($countTrainers); - $contadortr->setText('Trainer Mentors trained in Sustainable Business Model Development'); + $contadortr->setText('Supervisor Mentors trained in Sustainable Business Model Development'); $results[]=$contadortr; //BSOS $contadorbso=new Contador; @@ -66,7 +66,7 @@ final class ContadorAdminController extends CRUDController //Financial Actors $contadorfa=new Contador; $qbfa->select('count(fa.id)'); - $qbfa->from('App:FinancialActor','fa'); + $qbfa->from('App:Contable','fa'); $countfa = $qbfa->getQuery()->getSingleScalarResult(); $contadorfa->setCount($countfa); $contadorfa->setText('Sources of financing available in our database'); diff --git a/httpdocs/src/Controller/Admin/DashboardAdminController.php b/httpdocs/src/Controller/Admin/DashboardAdminController.php index 87cb9dc..71f4b15 100644 --- a/httpdocs/src/Controller/Admin/DashboardAdminController.php +++ b/httpdocs/src/Controller/Admin/DashboardAdminController.php @@ -85,7 +85,7 @@ final class DashboardAdminController extends CRUDController } // die(print_r($data)); $em = $this->getDoctrine()->getManager(); - $trainers = $em->getRepository('App:Trainer') + $trainers = $em->getRepository('App:Supervisor') ->findAll(); $convocatorias = $em->getRepository('App:Convocatoria') ->findAll(); diff --git a/httpdocs/src/Controller/Admin/EncuestaAdminController.php b/httpdocs/src/Controller/Admin/EncuestaAdminController.php index 72a9fc4..7e3be7a 100644 --- a/httpdocs/src/Controller/Admin/EncuestaAdminController.php +++ b/httpdocs/src/Controller/Admin/EncuestaAdminController.php @@ -5,7 +5,7 @@ declare(strict_types=1); namespace App\Controller\Admin; use App\Entity\Convocatoria; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use App\Entity\Inscripcion; use App\Entity\RespuestasFormulario; use Sonata\AdminBundle\Controller\CRUDController; @@ -213,7 +213,7 @@ final class EncuestaAdminController extends CRUDController $request = $this->getRequest(); $id = $request->get($this->admin->getIdParameter()); $userCall=explode('~',$id); - $user=$this->getDoctrine()->getRepository(GreenEntrepreneur::class)->findOneById($userCall[1]); + $user=$this->getDoctrine()->getRepository(Licitador::class)->findOneById($userCall[1]); $convocatoria=$this->getDoctrine()->getRepository(Convocatoria::class)->findOneById($userCall[0]); $inscripcion = $this->getDoctrine()->getRepository(Inscripcion::class) ->findOneBy(['greenEntrepreneur' => $user, 'convocatoria'=>$convocatoria]); diff --git a/httpdocs/src/Controller/Admin/FormularioAdminController.php b/httpdocs/src/Controller/Admin/FormularioAdminController.php index d3ba38e..9ec0b9b 100644 --- a/httpdocs/src/Controller/Admin/FormularioAdminController.php +++ b/httpdocs/src/Controller/Admin/FormularioAdminController.php @@ -4,7 +4,7 @@ declare(strict_types=1); namespace App\Controller\Admin; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use App\Entity\Tarea; use App\Entity\WorkShop; use Pix\SortableBehaviorBundle\Services\PositionHandler; @@ -427,7 +427,7 @@ final class FormularioAdminController extends CRUDController return $errorResponse; }// endif $userId = $request->query->get('userId'); - $alumno = $em->getReference(GreenEntrepreneur::class, $userId); + $alumno = $em->getReference(Licitador::class, $userId); /* * Si el aluno es nulo o el usuario logado no pertenece al workshop cargamos la vista inicial * del dashboard diff --git a/httpdocs/src/Controller/Admin/IndicadorAdminController.php b/httpdocs/src/Controller/Admin/IndicadorAdminController.php index 6848ee5..2ed06a2 100644 --- a/httpdocs/src/Controller/Admin/IndicadorAdminController.php +++ b/httpdocs/src/Controller/Admin/IndicadorAdminController.php @@ -4,7 +4,7 @@ declare(strict_types=1); namespace App\Controller\Admin; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use App\Entity\Tarea; use App\Entity\WorkShop; use Pix\SortableBehaviorBundle\Services\PositionHandler; diff --git a/httpdocs/src/Controller/Admin/GreenEntrepreneurAdminController.php b/httpdocs/src/Controller/Admin/LicitadorAdminController.php similarity index 93% rename from httpdocs/src/Controller/Admin/GreenEntrepreneurAdminController.php rename to httpdocs/src/Controller/Admin/LicitadorAdminController.php index 9655f0d..de37d28 100644 --- a/httpdocs/src/Controller/Admin/GreenEntrepreneurAdminController.php +++ b/httpdocs/src/Controller/Admin/LicitadorAdminController.php @@ -5,9 +5,9 @@ declare(strict_types=1); namespace App\Controller\Admin; use App\Controller\ChatController; -use App\Entity\FinancialActor; +use App\Entity\Contable; use App\Entity\Bso; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use App\Entity\Sala; use App\Entity\SalaLastAccess; use App\Entity\Tarea; @@ -24,7 +24,7 @@ use Symfony\Component\Intl\Countries; use Symfony\Component\Routing\Exception\InvalidParameterException; use Symfony\Component\HttpFoundation\Request; -final class GreenEntrepreneurAdminController extends CRUDController +final class LicitadorAdminController extends CRUDController { private $chatController; @@ -106,12 +106,12 @@ final class GreenEntrepreneurAdminController extends CRUDController public function contactarAjaxAction($id){ $user = $this->getUser(); - if(!($user instanceof FinancialActor) && !($user instanceof Bso)){ + if(!($user instanceof Contable) && !($user instanceof Bso)){ throw new AccessDeniedHttpException(); } $em = $this->getDoctrine()->getManager(); $ge = $em->getReference(User::class, $id); - if(!($ge instanceof GreenEntrepreneur)){ + if(!($ge instanceof Licitador)){ throw new AccessDeniedHttpException(); } $sala = new Sala(); @@ -146,12 +146,12 @@ return new RedirectResponse($this->generateUrl('sonata_admin_dashboard')); throw new AccessDeniedHttpException(); } $user = $this->getUser(); - if(!($user instanceof GreenEntrepreneur)){ + if(!($user instanceof Licitador)){ throw new AccessDeniedHttpException(); } $em = $this->getDoctrine()->getManager(); $fa = $em->getReference(User::class, $id); - if(!($fa instanceof FinancialActor) or !($fa instanceof Bso)){ + if(!($fa instanceof Contable) or !($fa instanceof Bso)){ throw new AccessDeniedHttpException(); } $user->addFinancial($fa); @@ -170,12 +170,12 @@ return new RedirectResponse($this->generateUrl('sonata_admin_dashboard')); throw new AccessDeniedHttpException(); } $user = $this->getUser(); - if(!($user instanceof FinancialActor)){ + if(!($user instanceof Contable)){ throw new AccessDeniedHttpException(); } $em = $this->getDoctrine()->getManager(); $ge = $em->getReference(User::class, $id); - if(!($ge instanceof GreenEntrepreneur)){ + if(!($ge instanceof Licitador)){ throw new AccessDeniedHttpException(); } $achievements = new ArrayCollection(); diff --git a/httpdocs/src/Controller/Admin/ProcesoTareaAdminController.php b/httpdocs/src/Controller/Admin/ProcesoTareaAdminController.php index d99a215..f4c0395 100644 --- a/httpdocs/src/Controller/Admin/ProcesoTareaAdminController.php +++ b/httpdocs/src/Controller/Admin/ProcesoTareaAdminController.php @@ -2,7 +2,7 @@ namespace App\Controller\Admin; - use App\Entity\GreenEntrepreneur; + use App\Entity\Licitador; use App\Entity\Procesos; use App\Entity\Respuestas; use App\Entity\Tarea; @@ -90,7 +90,7 @@ $tareas = $proceso->getTarea(); // the key used to lookup the template $templateKey = 'edit'; - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); // Mapeamos las Preguntas de la Tarea foreach($tareas as $tarea){ @@ -141,7 +141,7 @@ { $request = $this->getRequest(); $user = $this->getUser(); - if(!$request->isXmlHttpRequest() || !$user || !($user instanceof GreenEntrepreneur)){ + if(!$request->isXmlHttpRequest() || !$user || !($user instanceof Licitador)){ throw new AccessDeniedHttpException(); } $procesoId = $request->query->get('proceso_id'); diff --git a/httpdocs/src/Controller/Admin/RealizarTareaAdminController.php b/httpdocs/src/Controller/Admin/RealizarTareaAdminController.php index 0a9bde6..e9a0f69 100644 --- a/httpdocs/src/Controller/Admin/RealizarTareaAdminController.php +++ b/httpdocs/src/Controller/Admin/RealizarTareaAdminController.php @@ -77,7 +77,7 @@ $getvars['modal']=$modal; } $em = $this->getDoctrine()->getManager(); - $userCasoEstudio=$em->getRepository('App:GreenEntrepreneur') + $userCasoEstudio=$em->getRepository('App:Licitador') ->findOneByUsername('caso_estudio_'.$this->get('request_stack')->getCurrentRequest()->getLocale()); @@ -99,7 +99,7 @@ ->findBy(['preguntas'=>$mapPreguntas, 'greenEntrepreneur'=> $userCasoEstudio->getId()]); } - $user=$em->getRepository('App:GreenEntrepreneur') + $user=$em->getRepository('App:Licitador') ->findOneById($userge); if($tarea[0]->getPrecondition()) { try{ @@ -129,7 +129,7 @@ $respuestas=null; $respuestasArray=null; } - /** @var \App\Entity\Trainer $trainer */ + /** @var \App\Entity\Supervisor $trainer */ $trainer = $this->getUser(); $comentarios=[]; $reviewed=[]; @@ -177,7 +177,7 @@ $getvars=$this->getRequest()->query->all(); $em = $this->getDoctrine()->getManager(); - $userCasoEstudio=$em->getRepository('App:GreenEntrepreneur') + $userCasoEstudio=$em->getRepository('App:Licitador') ->findOneByUsername('caso_estudio_'.$this->get('request_stack')->getCurrentRequest()->getLocale()); $tarea = $em->getRepository('App:Tarea') ->findById($id); @@ -195,7 +195,7 @@ $respuestasCasoEstudio = $em->getRepository('App:Respuestas') ->findBy(['preguntas'=>$mapPreguntas, 'greenEntrepreneur'=> $userCasoEstudio->getId()]); } - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); if($user->getType()=='green_entrepreneur'){ diff --git a/httpdocs/src/Controller/Admin/RespuestasFormularioAdminController.php b/httpdocs/src/Controller/Admin/RespuestasFormularioAdminController.php index 1841f07..63ff973 100644 --- a/httpdocs/src/Controller/Admin/RespuestasFormularioAdminController.php +++ b/httpdocs/src/Controller/Admin/RespuestasFormularioAdminController.php @@ -4,7 +4,7 @@ declare(strict_types=1); namespace App\Controller\Admin; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use App\Entity\Tarea; use App\Entity\WorkShop; use Pix\SortableBehaviorBundle\Services\PositionHandler; diff --git a/httpdocs/src/Controller/Admin/RespuestasTareaAdminController.php b/httpdocs/src/Controller/Admin/RespuestasTareaAdminController.php index 5bb1e0c..d88f3b5 100644 --- a/httpdocs/src/Controller/Admin/RespuestasTareaAdminController.php +++ b/httpdocs/src/Controller/Admin/RespuestasTareaAdminController.php @@ -83,7 +83,7 @@ class RespuestasTareaAdminController extends CRUDController } //die('Llega hasta desvio'.print_r($request->request->get('ge'))); - $ge = $em->getRepository('App:GreenEntrepreneur')->findOneById([$request->request->get('ge')]); + $ge = $em->getRepository('App:Licitador')->findOneById([$request->request->get('ge')]); $tareasRealizadas = $em->getRepository('App:TareaGreenEnterpreneur') ->findBy(['greenEntrepreneur'=> $ge]); $sendMessage = $this->trainerSaveOnly($preguntas, $request, $ge, $em); @@ -258,7 +258,7 @@ class RespuestasTareaAdminController extends CRUDController $tarea = $em->getRepository('App:Tarea') ->findById($id); $preguntas = $tarea[0]->getPreguntasId(); - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); switch ($user->getType()) { case 'trainer': diff --git a/httpdocs/src/Controller/Admin/BsoAdminController.php b/httpdocs/src/Controller/Admin/ServicioAdminController.php similarity index 98% rename from httpdocs/src/Controller/Admin/BsoAdminController.php rename to httpdocs/src/Controller/Admin/ServicioAdminController.php index 6e47335..78110ce 100644 --- a/httpdocs/src/Controller/Admin/BsoAdminController.php +++ b/httpdocs/src/Controller/Admin/ServicioAdminController.php @@ -13,7 +13,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Intl\Countries; use Symfony\Component\Routing\Exception\InvalidParameterException; use Symfony\Component\HttpFoundation\RedirectResponse; -final class BsoAdminController extends IsOwnerCRUDController +final class ServicioAdminController extends IsOwnerCRUDController { /* public function deleteAction($id) { diff --git a/httpdocs/src/Controller/Admin/TrainerAdminController.php b/httpdocs/src/Controller/Admin/SupervisorAdminController.php similarity index 93% rename from httpdocs/src/Controller/Admin/TrainerAdminController.php rename to httpdocs/src/Controller/Admin/SupervisorAdminController.php index d171538..dde24f3 100644 --- a/httpdocs/src/Controller/Admin/TrainerAdminController.php +++ b/httpdocs/src/Controller/Admin/SupervisorAdminController.php @@ -5,9 +5,9 @@ declare(strict_types=1); namespace App\Controller\Admin; use App\Controller\ChatController; -use App\Entity\FinancialActor; +use App\Entity\Contable; use App\Entity\Bso; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use App\Entity\Sala; use App\Entity\SalaLastAccess; use App\Entity\Tarea; @@ -24,7 +24,7 @@ use Symfony\Component\Intl\Countries; use Symfony\Component\Routing\Exception\InvalidParameterException; use Symfony\Component\HttpFoundation\Request; -final class TrainerAdminController extends CRUDController +final class SupervisorAdminController extends CRUDController { private $chatController; @@ -79,14 +79,14 @@ final class TrainerAdminController extends CRUDController } public function contactarAjaxAction($id){ $user = $this->getUser(); - if(!($user instanceof FinancialActor) && !($user instanceof Bso)){ + if(!($user instanceof Contable) && !($user instanceof Bso)){ die("not instance of Bso"); throw new AccessDeniedHttpException(); } $em = $this->getDoctrine()->getManager(); $ge = $em->getReference(User::class, $id); if($ge->getType()!=='trainer'){ - die("not instance of Trainer".$ge->getType()); + die("not instance of Supervisor".$ge->getType()); throw new AccessDeniedHttpException(); } $sala = new Sala(); @@ -122,12 +122,12 @@ final class TrainerAdminController extends CRUDController throw new AccessDeniedHttpException(); } $user = $this->getUser(); - if(!($user instanceof GreenEntrepreneur)){ + if(!($user instanceof Licitador)){ throw new AccessDeniedHttpException(); } $em = $this->getDoctrine()->getManager(); $fa = $em->getReference(User::class, $id); - if(!($fa instanceof FinancialActor)){ + if(!($fa instanceof Contable)){ throw new AccessDeniedHttpException(); } $user->addFinancial($fa); diff --git a/httpdocs/src/Controller/Admin/TareaAdminController.php b/httpdocs/src/Controller/Admin/TareaAdminController.php index 2e6c296..70ca4ac 100644 --- a/httpdocs/src/Controller/Admin/TareaAdminController.php +++ b/httpdocs/src/Controller/Admin/TareaAdminController.php @@ -4,7 +4,7 @@ declare(strict_types=1); namespace App\Controller\Admin; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use App\Entity\Tarea; use App\Entity\WorkShop; use Pix\SortableBehaviorBundle\Services\PositionHandler; @@ -401,7 +401,7 @@ final class TareaAdminController extends CRUDController return $errorResponse; }// endif $userId = $request->query->get('userId'); - $alumno = $em->getReference(GreenEntrepreneur::class, $userId); + $alumno = $em->getReference(Licitador::class, $userId); /* * Si el aluno es nulo o el usuario logado no pertenece al workshop cargamos la vista inicial * del dashboard diff --git a/httpdocs/src/Controller/Admin/TrainerAdminController.php.save b/httpdocs/src/Controller/Admin/TrainerAdminController.php.save deleted file mode 100644 index e1cc5e9..0000000 --- a/httpdocs/src/Controller/Admin/TrainerAdminController.php.save +++ /dev/null @@ -1,79 +0,0 @@ -getUser(); - if(!($user instanceof FinancialActor) && !($user instanceof Bso)){ - throw new AccessDeniedHttpException(); - } - $em = $this->getDoctrine()->getManager(); - $ge = $em->getReference(Trainer::class, $id); - if(!($ge instanceof Trainer)){ - throw new AccessDeniedHttpException(); - } - $sala = new Sala(); - $sala->addUser($user); - $sala->addUser($ge); - $sala->setDenominacion('Contacto'); - $lastAccess = new SalaLastAccess(); - $lastAccess->setSala($sala); - $lastAccess->setUser($ge); - $lastAccess->setLastAccess(new \DateTime("1970-01-01")); - $em->persist($lastAccess); - $sala->addSalaLastAccess($lastAccess); - $em->persist($sala); - $ge->addContacto($user); - $user->addContacto($ge); - $em->persist($ge); - $em->persist($user); - $em->flush(); - $route = $this->generateUrl('admin_app_trainer_giveAccessToFiles', ['id'=> $user->getId()]); - $message = "A financial actor would like to talk to you.
Give access to files"; - $this->chatController->publishMessage($message, $user, $sala); - return new JsonResponse("success", 200); - } - public function giveAccessToFilesAction($id){ - if(!$this->isXmlHttpRequest()){ - throw new AccessDeniedHttpException(); - } - $user = $this->getUser(); - if(!($user instanceof Trainer)){ - throw new AccessDeniedHttpException(); - } - $em = $this->getDoctrine()->getManager(); - $fa = $em->getReference(User::class, $id); - if(!($fa instanceof FinancialActor)){ - throw new AccessDeniedHttpException(); - } - $user->addFinancial($fa); - $em->persist($user); - $em->flush(); - $modalBody = "You have successfully shared your documents with ".$fa->getNombreCompleto(); - $modalTitle = "Congratulations!!!"; - return $this->renderWithExtraParams('listajaxactions/modal_content.html.twig', [ - 'modalTitle' => $modalTitle, - 'modalBody' => $modalBody, - ], null); - } - -} diff --git a/httpdocs/src/Controller/Admin/TrainerAdminController.php.save.1 b/httpdocs/src/Controller/Admin/TrainerAdminController.php.save.1 deleted file mode 100644 index 603617e..0000000 --- a/httpdocs/src/Controller/Admin/TrainerAdminController.php.save.1 +++ /dev/null @@ -1,91 +0,0 @@ -chatController = $chatController; - } - - - public function contactarAjaxAction($id){ - $user = $this->getUser(); - if(!($user instanceof FinancialActor) && !($user instanceof Bso)){ - throw new AccessDeniedHttpException(); - } - $em = $this->getDoctrine()->getManager(); - $ge = $em->getReference(User::class, $id); - if(!($ge instanceof Trainer)){ - throw new AccessDeniedHttpException(); - } - $sala = new Sala(); - $sala->addUser($user); - $sala->addUser($ge); - $sala->setDenominacion('Contacto'); - $lastAccess = new SalaLastAccess(); - $lastAccess->setSala($sala); - $lastAccess->setUser($ge); - $lastAccess->setLastAccess(new \DateTime("1970-01-01")); - $em->persist($lastAccess); - $sala->addSalaLastAccess($lastAccess); - $em->persist($sala); - $ge->addContacto($user); - $user->addContacto($ge); - $em->persist($ge); - $em->persist($user); - $em->flush(); - $route = $this->generateUrl('admin_app_trainer_giveAccessToFiles', ['id'=> $user->getId()]); - $message = "A financial actor would like to talk to you.
Give access to files"; - $message = "A financial actor would like to talk to you.
Give access to files"; - $this->chatController->publishMessage($message, $user, $sala); - return new RedirectResponse($this->generateUrl('sonata_admin_dashboard')); - - return new JsonResponse("success", 200); - } - public function giveAccessToFilesAction($id){ - if(!$this->isXmlHttpRequest()){ - throw new AccessDeniedHttpException(); - } - $user = $this->getUser(); - if(!($user instanceof GreenEntrepreneur)){ - throw new AccessDeniedHttpException(); - } - $em = $this->getDoctrine()->getManager(); - $fa = $em->getReference(User::class, $id); - if(!($fa instanceof FinancialActor)){ - throw new AccessDeniedHttpException(); - } - $user->addFinancial($fa); - $em->persist($user); - $em->flush(); - $modalBody = "You have successfully shared your documents with ".$fa->getNombreCompleto(); - $modalTitle = "Congratulations!!!"; - return $this->renderWithExtraParams('listajaxactions/modal_content.html.twig', [ - 'modalTitle' => $modalTitle, - 'modalBody' => $modalBody, - ], null); - } - -} diff --git a/httpdocs/src/Controller/Admin/WorkShopsAdminController.php b/httpdocs/src/Controller/Admin/WorkShopsAdminController.php index f7610b1..d902bf9 100644 --- a/httpdocs/src/Controller/Admin/WorkShopsAdminController.php +++ b/httpdocs/src/Controller/Admin/WorkShopsAdminController.php @@ -5,7 +5,7 @@ declare(strict_types=1); namespace App\Controller\Admin; use App\Entity\Convocatoria; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use App\Entity\Procesos; use App\Twig\Extension\JsonDecode; use phpDocumentor\Reflection\DocBlock\Serializer; @@ -67,7 +67,7 @@ final class WorkShopsAdminController extends IsOwnerCRUDController return new Response ($output); } try{ - $entrepreneurs = $doctrine->getRepository(GreenEntrepreneur::class) + $entrepreneurs = $doctrine->getRepository(Licitador::class) ->findByConvocatoria($convocatoria, $proceso); }catch(\Exception $e){ throw new BadRequestHttpException('Hay algún error en la petición'); diff --git a/httpdocs/src/Controller/Api/CountersApiController.php b/httpdocs/src/Controller/Api/CountersApiController.php index 8832ef2..745aff4 100644 --- a/httpdocs/src/Controller/Api/CountersApiController.php +++ b/httpdocs/src/Controller/Api/CountersApiController.php @@ -58,9 +58,9 @@ class CountersApiController extends AbstractController // if(!$workshop){ // return new JsonResponse(["Error"=>"403: Unauthorized"],403); // } - $trainer = $em->getRepository('App:Trainer') + $trainer = $em->getRepository('App:Supervisor') ->findOneBy(['id'=>$request->request->get('trainer')]); - if (empty($trainer) || !($trainer instanceof \App\Entity\Trainer) ){ + if (empty($trainer) || !($trainer instanceof \App\Entity\Supervisor) ){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); } @@ -78,7 +78,7 @@ class CountersApiController extends AbstractController } } foreach( $usuarios as $usuario){ - $ge = $em->getRepository('App:GreenEntrepreneur') + $ge = $em->getRepository('App:Licitador') ->findOneBy(['id'=>$usuario]); $evento = new Calendario(); $evento->setTitulo($titulo); diff --git a/httpdocs/src/Controller/Api/GuardarTareaApiController.php b/httpdocs/src/Controller/Api/GuardarTareaApiController.php index 491821f..f9c1841 100644 --- a/httpdocs/src/Controller/Api/GuardarTareaApiController.php +++ b/httpdocs/src/Controller/Api/GuardarTareaApiController.php @@ -5,7 +5,7 @@ use App\Controller\ChatController; use App\Entity\Comentarios; use App\Entity\ComentariosHistorico; - use App\Entity\GreenEntrepreneur; + use App\Entity\Licitador; use App\Entity\Respuestas; use App\Entity\RespuestasHistoricas; use App\Traits\SaveTasks; @@ -69,7 +69,7 @@ $this->translator = $translator; $em = $this->getDoctrine()->getManager(); $tarea = $em->getRepository('App:Tarea') ->findOneById($id); - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); if (empty($user) ){ @@ -81,7 +81,7 @@ $this->translator = $translator; $res['error'] = 'Unidentified Green Entrepreneur'; return $this->renderWithExtraParams('admin/errorprecondition_view.html.twig', ['tarea' => $tarea, 'error' => $res['error']]); } - $ge = $em->getRepository('App:GreenEntrepreneur')->findOneById([$request->request->get('ge')]); + $ge = $em->getRepository('App:Licitador')->findOneById([$request->request->get('ge')]); $this->savetrainer($tarea, $request, $em, $ge); break; case 'green_entrepreneur': @@ -107,7 +107,7 @@ $this->translator = $translator; ->findOneBy(['hash'=>$hash]); $user=$external->getGreenEntrepreneur(); $tarea=$external->getTarea(); - if (empty($user) || !($user instanceof \App\Entity\GreenEntrepreneur) ){ + if (empty($user) || !($user instanceof \App\Entity\Licitador) ){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); } $this->save($tarea, $request, $em, $user); @@ -129,7 +129,7 @@ $this->translator = $translator; ->findOneBy(['hash'=>$hash]); $user=$external->getGreenEntrepreneur(); $tarea=$external->getTarea(); - if (empty($user) || !($user instanceof \App\Entity\GreenEntrepreneur) ){ + if (empty($user) || !($user instanceof \App\Entity\Licitador) ){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); } $preguntas = $tarea->getPreguntasId(); @@ -213,15 +213,15 @@ $this->translator = $translator; $pregunta=$em->getRepository('App:Preguntas')->findOneById((int)$id); $template=$pregunta->getTarea()->getTemplateId()->getEmailfilename(); - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); - //Nos aseguramos que es un GreenEntrepreneur + //Nos aseguramos que es un Licitador if (empty($user)){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); }else{ - $user=$em->getRepository('App:GreenEntrepreneur')->findOneById((int)$user->getId()); + $user=$em->getRepository('App:Licitador')->findOneById((int)$user->getId()); if (empty($user)) { return new JsonResponse(["Error" => "401: Unauthorized"], 401); } @@ -342,11 +342,11 @@ $this->translator = $translator; $template = 'financialtool/email-results.html.twig'; - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); - //Nos aseguramos que es un GreenEntrepreneur - if (empty($user) || !($user instanceof GreenEntrepreneur)){ + //Nos aseguramos que es un Licitador + if (empty($user) || !($user instanceof Licitador)){ throw new AccessDeniedHttpException(); } diff --git a/httpdocs/src/Controller/Api/GuardarTareaApiNonAdminController.php b/httpdocs/src/Controller/Api/GuardarTareaApiNonAdminController.php index 582ad45..d7cc161 100644 --- a/httpdocs/src/Controller/Api/GuardarTareaApiNonAdminController.php +++ b/httpdocs/src/Controller/Api/GuardarTareaApiNonAdminController.php @@ -49,7 +49,7 @@ ->findOneBy(['hash'=>$hash]); $user=$external->getGreenEntrepreneur(); $tarea=$external->getTarea(); - if (empty($user) || !($user instanceof \App\Entity\GreenEntrepreneur) ){ + if (empty($user) || !($user instanceof \App\Entity\Licitador) ){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); } $this->save($tarea, $request, $em, $user); @@ -71,7 +71,7 @@ ->findOneBy(['hash'=>$hash]); $user=$external->getGreenEntrepreneur(); $tarea=$external->getTarea(); - if (empty($user) || !($user instanceof \App\Entity\GreenEntrepreneur) ){ + if (empty($user) || !($user instanceof \App\Entity\Licitador) ){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); } $preguntas = $tarea->getPreguntasId(); diff --git a/httpdocs/src/Controller/Api/PreguntasApiController.php b/httpdocs/src/Controller/Api/PreguntasApiController.php index 4ea19e6..4b4da53 100644 --- a/httpdocs/src/Controller/Api/PreguntasApiController.php +++ b/httpdocs/src/Controller/Api/PreguntasApiController.php @@ -14,7 +14,7 @@ use App\Entity\Indicador; use App\Entity\Bookmarks; use \App\Entity\Goal; - use App\Entity\GreenEntrepreneur; + use App\Entity\Licitador; use App\Entity\Respuestas; use Symfony\Component\HttpFoundation\JsonResponse; use Doctrine\ORM\Query\ResultSetMapping; @@ -38,7 +38,7 @@ */ public function getPreguntasAction(Request $request) { - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); if (empty($user)){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); @@ -98,7 +98,7 @@ */ public function getEmailAction(Request $request) { - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); if (empty($user)){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); @@ -136,7 +136,7 @@ */ public function getTareasAction(Request $request ) { - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); if (empty($user)){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); @@ -506,14 +506,14 @@ *@return Response */ public function toggleBookmark($userId, $indicadorId){ - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); if (empty($user)){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); } $request = $this->requestStack->getCurrentRequest(); $em = $this->getDoctrine()->getManager(); - $ge = $em->getRepository('App:GreenEntrepreneur') + $ge = $em->getRepository('App:Licitador') ->findOneById($userId); $indicador = $em->getRepository('App:Indicador') ->findOneById($indicadorId); @@ -539,14 +539,14 @@ *@return Response */ public function toggleGoal($userId, $indicadorId){ - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); if (empty($user)){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); } $request = $this->requestStack->getCurrentRequest(); $em = $this->getDoctrine()->getManager(); - $ge = $em->getRepository('App:GreenEntrepreneur') + $ge = $em->getRepository('App:Licitador') ->findOneById($userId); $indicador = $em->getRepository('App:Indicador') ->findOneById($indicadorId); @@ -573,7 +573,7 @@ *@return Response */ public function addIndicator($userId){ - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); if (empty($user)){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); @@ -583,7 +583,7 @@ return new JsonResponse(["Error"=>"400: Bad Request"],400); } $em = $this->getDoctrine()->getManager(); - $ge = $em->getRepository('App:GreenEntrepreneur') + $ge = $em->getRepository('App:Licitador') ->findOneById($userId); $indicador=new Indicador(); $indicador->setGenerico(false); @@ -602,7 +602,7 @@ *@return Response */ public function editGoal($goalId){ - /** @var \App\Entity\GreenEntrepreneur $user */ + /** @var \App\Entity\Licitador $user */ $user = $this->getUser(); if (empty($user)){ return new JsonResponse(["Error"=>"401: Unauthorized"],401); diff --git a/httpdocs/src/Controller/ChatController.php b/httpdocs/src/Controller/ChatController.php index 4cbf970..8123d43 100644 --- a/httpdocs/src/Controller/ChatController.php +++ b/httpdocs/src/Controller/ChatController.php @@ -7,14 +7,14 @@ namespace App\Controller; use App\Entity\Calendario; use App\Entity\Comentarios; use App\Entity\Convocatoria; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use App\Entity\Mensaje; use App\Entity\Preguntas; use App\Entity\Procesos; use App\Entity\Respuestas; use App\Entity\Sala; use App\Entity\SalaLastAccess; -use App\Entity\Trainer; +use App\Entity\Supervisor; use App\Entity\WorkShop; use DateTime; use Doctrine\ORM\EntityManagerInterface; diff --git a/httpdocs/src/Controller/RegistrationFinancialActorController.php b/httpdocs/src/Controller/RegistrationFinancialActorController.php index 981003b..9b84fc9 100644 --- a/httpdocs/src/Controller/RegistrationFinancialActorController.php +++ b/httpdocs/src/Controller/RegistrationFinancialActorController.php @@ -28,7 +28,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Exception\AccessDeniedException; use FOS\UserBundle\Controller\RegistrationController; -use App\Entity\FinancialActor; +use App\Entity\Contable; use App\Kernel; use Symfony\Contracts\Translation\TranslatorInterface; @@ -67,7 +67,7 @@ public function __construct(EventDispatcherInterface $eventDispatcher, FactoryIn */ public function registerAction(Request $request) { - $user = new FinancialActor(); + $user = new Contable(); $user->setEnabled(false); $event = new GetResponseUserEvent($user, $request); @@ -207,7 +207,7 @@ public function __construct(EventDispatcherInterface $eventDispatcher, FactoryIn private function updateUser($user, $request){ $em = $this->getDoctrine()->getManager(); $datos=$request->request->all(); - $data=$datos['FinancialActor']; + $data=$datos['Contable']; echo print_r($data,true); //Contact Details $user->setFirstname($data['register_usuario']['firstname']); diff --git a/httpdocs/src/Controller/RegistrationGreenEnterpreneurController.php b/httpdocs/src/Controller/RegistrationGreenEnterpreneurController.php index 10cd9f3..c7a8dbf 100644 --- a/httpdocs/src/Controller/RegistrationGreenEnterpreneurController.php +++ b/httpdocs/src/Controller/RegistrationGreenEnterpreneurController.php @@ -30,7 +30,7 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException; use FOS\UserBundle\Controller\RegistrationController; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use App\Kernel; use Symfony\Contracts\Translation\TranslatorInterface; @@ -65,7 +65,7 @@ class RegistrationGreenEnterpreneurController extends Controller */ public function registerAction(Request $request) { - $user = new GreenEntrepreneur(); + $user = new Licitador(); $user->setEnabled(true); $event = new GetResponseUserEvent($user, $request); diff --git a/httpdocs/src/Controller/RegistrationTrainerController.php b/httpdocs/src/Controller/RegistrationTrainerController.php index 4ce6e25..ba6ef06 100644 --- a/httpdocs/src/Controller/RegistrationTrainerController.php +++ b/httpdocs/src/Controller/RegistrationTrainerController.php @@ -29,7 +29,7 @@ use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInt use Symfony\Component\Security\Core\Exception\AccessDeniedException; use FOS\UserBundle\Controller\RegistrationController; use Doctrine\ORM\EntityManagerInterface; -use App\Entity\Trainer; +use App\Entity\Supervisor; use App\Entity\Bso; use App\Kernel; use Symfony\Contracts\Translation\TranslatorInterface; @@ -68,7 +68,7 @@ class RegistrationTrainerController extends Controller */ public function registerAction(Request $request) { - $user = new Trainer(); + $user = new Supervisor(); $user->setEnabled(true); $event = new GetResponseUserEvent($user, $request); @@ -210,7 +210,7 @@ class RegistrationTrainerController extends Controller private function updateUser($user, $request){ $datos=$request->request->all(); - $data=$datos['Trainer']; + $data=$datos['Supervisor']; //echo print_r($data,true); //Required Data $user->setFirstname($data['datos_usuario']['firstname']); diff --git a/httpdocs/src/Controller/TareaErrorController.php b/httpdocs/src/Controller/TareaErrorController.php index 8f3b3dd..09abd7b 100644 --- a/httpdocs/src/Controller/TareaErrorController.php +++ b/httpdocs/src/Controller/TareaErrorController.php @@ -18,7 +18,7 @@ class TareaErrorController extends Controller foreach($preguntas as $pregunta){ $mapPreguntas[]=$pregunta->getId(); } - $usuario = $em->getRepository('App:GreenEntrepreneur') + $usuario = $em->getRepository('App:Licitador') ->findById(13); $respuestas = $em->getRepository('App:Respuestas') ->findBy(['preguntas'=>$mapPreguntas, 'greenEntrepreneur'=> $usuario[0]->getId()]); diff --git a/httpdocs/src/Entity/.gitignore b/httpdocs/src/Entity/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/httpdocs/src/Entity/Bookmarks.php b/httpdocs/src/Entity/Bookmarks.php index 1e35b72..8c15413 100644 --- a/httpdocs/src/Entity/Bookmarks.php +++ b/httpdocs/src/Entity/Bookmarks.php @@ -3,7 +3,7 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use App\Entity\Indicador; - use App\Entity\GreenEntrepreneur; + use App\Entity\Licitador; /** * @ORM\Table( @@ -34,7 +34,7 @@ private $indicador; /** - * @ORM\ManyToOne(targetEntity="App\Entity\GreenEntrepreneur", inversedBy="indicadorUsuario",cascade={"persist"}) + * @ORM\ManyToOne(targetEntity="App\Entity\Licitador", inversedBy="indicadorUsuario",cascade={"persist"}) * @ORM\JoinColumn(name="green_entrepreneur_id", referencedColumnName="id") */ private $greenEntrepreneur; @@ -60,12 +60,12 @@ return $this; } - public function getGreenEntrepreneur(): ?GreenEntrepreneur + public function getGreenEntrepreneur(): ?Licitador { return $this->greenEntrepreneur; } - public function setGreenEntrepreneur(?GreenEntrepreneur $greenEntrepreneur): self + public function setGreenEntrepreneur(?Licitador $greenEntrepreneur): self { $this->greenEntrepreneur = $greenEntrepreneur; diff --git a/httpdocs/src/Entity/BussinessStage.php b/httpdocs/src/Entity/BussinessStage.php index 184d1e6..b75aebd 100644 --- a/httpdocs/src/Entity/BussinessStage.php +++ b/httpdocs/src/Entity/BussinessStage.php @@ -41,7 +41,7 @@ class BussinessStage extends AbstractPersonalTranslatable implements Translatabl /** - * @ORM\OneToMany(targetEntity="App\Entity\GreenEntrepreneur", mappedBy="bussiness_stage") + * @ORM\OneToMany(targetEntity="App\Entity\Licitador", mappedBy="bussiness_stage") */ private $greenEntrepreneurs; @@ -91,7 +91,7 @@ class BussinessStage extends AbstractPersonalTranslatable implements Translatabl return $this->greenEntrepreneurs; } - public function addGreenEntrepreneur(GreenEntrepreneur $greenEntrepreneur): self + public function addGreenEntrepreneur(Licitador $greenEntrepreneur): self { if (!$this->greenEntrepreneurs->contains($greenEntrepreneur)) { $this->greenEntrepreneurs->add($greenEntrepreneur); @@ -100,7 +100,7 @@ class BussinessStage extends AbstractPersonalTranslatable implements Translatabl return $this; } - public function removeGreenEntrepreneur(GreenEntrepreneur $greenEntrepreneur): self + public function removeGreenEntrepreneur(Licitador $greenEntrepreneur): self { if ($this->greenEntrepreneurs->contains($greenEntrepreneur)) { $this->greenEntrepreneurs->removeElement($greenEntrepreneur); diff --git a/httpdocs/src/Entity/Comentarios.php b/httpdocs/src/Entity/Comentarios.php index cedd79d..b4cfc7c 100644 --- a/httpdocs/src/Entity/Comentarios.php +++ b/httpdocs/src/Entity/Comentarios.php @@ -27,7 +27,7 @@ class Comentarios private $fecha; /** - * @ORM\ManyToOne(targetEntity="App\Entity\Trainer", inversedBy="comentarios") + * @ORM\ManyToOne(targetEntity="App\Entity\Supervisor", inversedBy="comentarios") * @ORM\JoinColumn(name="trainer_id", referencedColumnName="id", onDelete="NO ACTION") */ private $trainer; @@ -77,12 +77,12 @@ class Comentarios return $this; } - public function getTrainer(): ?Trainer + public function getTrainer(): ?Supervisor { return $this->trainer; } - public function setTrainer(?Trainer $trainer): self + public function setTrainer(?Supervisor $trainer): self { $this->trainer = $trainer; diff --git a/httpdocs/src/Entity/FinancialActor.php b/httpdocs/src/Entity/Contable.php similarity index 96% rename from httpdocs/src/Entity/FinancialActor.php rename to httpdocs/src/Entity/Contable.php index 2cc643f..550e21d 100644 --- a/httpdocs/src/Entity/FinancialActor.php +++ b/httpdocs/src/Entity/Contable.php @@ -8,7 +8,7 @@ use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity(repositoryClass="App\Repository\FinancialActorRepository") */ -class FinancialActor extends \App\Entity\User +class Contable extends \App\Entity\User { /** * @ORM\Column(type="string", nullable=false) @@ -109,7 +109,7 @@ class FinancialActor extends \App\Entity\User private $investment_criteria; /** - * @ORM\ManyToMany(targetEntity="App\Entity\GreenEntrepreneur", inversedBy="financials") + * @ORM\ManyToMany(targetEntity="App\Entity\Licitador", inversedBy="financials") * @ORM\JoinTable( * name="greenentrepreneursharedfiles", * joinColumns={@ORM\JoinColumn(name="financial_actor_id", referencedColumnName="id", nullable=false)}, @@ -128,7 +128,7 @@ class FinancialActor extends \App\Entity\User /** - * @return Collection|GreenEntrepreneur[] + * @return Collection|Licitador[] */ public function getScopeOperations(): Collection { @@ -156,7 +156,7 @@ class FinancialActor extends \App\Entity\User return $this; } /** - * @return Collection|GreenEntrepreneur[] + * @return Collection|Licitador[] */ public function getGreenEntrepreneur(): Collection { @@ -164,7 +164,7 @@ class FinancialActor extends \App\Entity\User } - public function addGreenEntrepreneur(GreenEntrepreneur $greenEntrepreneur): self + public function addGreenEntrepreneur(Licitador $greenEntrepreneur): self { if (!$this->greenEntrepreneur->contains($greenEntrepreneur)) { $this->greenEntrepreneur[] = $greenEntrepreneur; @@ -174,7 +174,7 @@ class FinancialActor extends \App\Entity\User return $this; } - public function removeGreenEntrepreneur(GreenEntrepreneur $greenEntrepreneur): self + public function removeGreenEntrepreneur(Licitador $greenEntrepreneur): self { if ($this->greenEntrepreneur->contains($greenEntrepreneur)) { $this->greenEntrepreneur->removeElement($greenEntrepreneur); diff --git a/httpdocs/src/Entity/Convocatoria.php b/httpdocs/src/Entity/Convocatoria.php index 3f61142..aabd8d9 100644 --- a/httpdocs/src/Entity/Convocatoria.php +++ b/httpdocs/src/Entity/Convocatoria.php @@ -88,7 +88,7 @@ class Convocatoria private $bso; /** - * @ORM\ManyToMany(targetEntity="App\Entity\GreenEntrepreneur", inversedBy="convocatoria") + * @ORM\ManyToMany(targetEntity="App\Entity\Licitador", inversedBy="convocatoria") * @ORM\JoinTable( * name="GreenEnterPreneurConvocatoria", * joinColumns={@ORM\JoinColumn(name="convocatoria_id", referencedColumnName="id", nullable=false)}, @@ -151,14 +151,14 @@ class Convocatoria } /** - * @return Collection|GreenEntrepreneur[] + * @return Collection|Licitador[] */ public function getGreenEntrepreneur(): Collection { return $this->greenEntrepreneur; } - public function addGreenEntrepreneur(GreenEntrepreneur $greenEntrepreneur): self + public function addGreenEntrepreneur(Licitador $greenEntrepreneur): self { if (!$this->greenEntrepreneur->contains($greenEntrepreneur)) { $this->greenEntrepreneur[] = $greenEntrepreneur; @@ -167,7 +167,7 @@ class Convocatoria return $this; } - public function removeGreenEntrepreneur(GreenEntrepreneur $greenEntrepreneur): self + public function removeGreenEntrepreneur(Licitador $greenEntrepreneur): self { if ($this->greenEntrepreneur->contains($greenEntrepreneur)) { $this->greenEntrepreneur->removeElement($greenEntrepreneur); diff --git a/httpdocs/src/Entity/Encuesta.php b/httpdocs/src/Entity/Encuesta.php index f1d9ed6..49e3670 100644 --- a/httpdocs/src/Entity/Encuesta.php +++ b/httpdocs/src/Entity/Encuesta.php @@ -35,7 +35,7 @@ class Encuesta /** * @ORM\Id - * @ORM\ManyToOne(targetEntity="App\Entity\GreenEntrepreneur", inversedBy="formularioUsuario", cascade={"persist"}) + * @ORM\ManyToOne(targetEntity="App\Entity\Licitador", inversedBy="formularioUsuario", cascade={"persist"}) * @ORM\JoinColumn(name="green_entrepreneur_id", referencedColumnName="id", onDelete="NO ACTION") */ private $greenEntrepreneur; @@ -65,12 +65,12 @@ class Encuesta - public function getGreenEntrepreneur(): ?GreenEntrepreneur + public function getGreenEntrepreneur(): ?Licitador { return $this->greenEntrepreneur; } - public function setGreenEntrepreneur(?GreenEntrepreneur $greenEntrepreneur): self + public function setGreenEntrepreneur(?Licitador $greenEntrepreneur): self { $this->greenEntrepreneur = $greenEntrepreneur; diff --git a/httpdocs/src/Entity/Goal.php b/httpdocs/src/Entity/Goal.php index 98080ad..7dd4e6f 100644 --- a/httpdocs/src/Entity/Goal.php +++ b/httpdocs/src/Entity/Goal.php @@ -3,7 +3,7 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use App\Entity\Indicador; - use App\Entity\GreenEntrepreneur; + use App\Entity\Licitador; /** * @ORM\Table( @@ -34,7 +34,7 @@ private $indicador; /** - * @ORM\ManyToOne(targetEntity="App\Entity\GreenEntrepreneur", inversedBy="goalUsuario",cascade={"persist"}) + * @ORM\ManyToOne(targetEntity="App\Entity\Licitador", inversedBy="goalUsuario",cascade={"persist"}) * @ORM\JoinColumn(name="green_entrepreneur_id", referencedColumnName="id") */ private $greenEntrepreneur; @@ -89,12 +89,12 @@ return $this; } - public function getGreenEntrepreneur(): ?GreenEntrepreneur + public function getGreenEntrepreneur(): ?Licitador { return $this->greenEntrepreneur; } - public function setGreenEntrepreneur(?GreenEntrepreneur $greenEntrepreneur): self + public function setGreenEntrepreneur(?Licitador $greenEntrepreneur): self { $this->greenEntrepreneur = $greenEntrepreneur; diff --git a/httpdocs/src/Entity/Inscripcion.php b/httpdocs/src/Entity/Inscripcion.php index 3939358..958b717 100644 --- a/httpdocs/src/Entity/Inscripcion.php +++ b/httpdocs/src/Entity/Inscripcion.php @@ -38,7 +38,7 @@ class Inscripcion private $campo_3; /** - * @ORM\ManyToOne(targetEntity="App\Entity\GreenEntrepreneur", inversedBy="inscripciones") + * @ORM\ManyToOne(targetEntity="App\Entity\Licitador", inversedBy="inscripciones") * @ORM\JoinColumn(name="green_entrepreneur_id", referencedColumnName="id", nullable=false) */ private $greenEntrepreneur; @@ -107,12 +107,12 @@ class Inscripcion return $this; } - public function getGreenEntrepreneur(): ?GreenEntrepreneur + public function getGreenEntrepreneur(): ?Licitador { return $this->greenEntrepreneur; } - public function setGreenEntrepreneur(?GreenEntrepreneur $greenEntrepreneur): self + public function setGreenEntrepreneur(?Licitador $greenEntrepreneur): self { $this->greenEntrepreneur = $greenEntrepreneur; diff --git a/httpdocs/src/Entity/GreenEntrepreneur.php b/httpdocs/src/Entity/Licitador.php similarity index 97% rename from httpdocs/src/Entity/GreenEntrepreneur.php rename to httpdocs/src/Entity/Licitador.php index 9170bc4..3f36df2 100644 --- a/httpdocs/src/Entity/GreenEntrepreneur.php +++ b/httpdocs/src/Entity/Licitador.php @@ -17,7 +17,7 @@ use App\Entity\Goal; /** * @ORM\Entity(repositoryClass="App\Repository\GreenEntrepreneurRepository") */ -class GreenEntrepreneur extends User +class Licitador extends User { /** * @ORM\ManyToOne(targetEntity="App\Entity\BussinessStage", inversedBy="greenEntrepreneurs") @@ -80,12 +80,12 @@ class GreenEntrepreneur extends User private $convocatoria; /** - * @ORM\ManyToMany(targetEntity="App\Entity\Trainer", mappedBy="greenEntrepreneur") + * @ORM\ManyToMany(targetEntity="App\Entity\Supervisor", mappedBy="greenEntrepreneur") */ private $trainer; /** - * @ORM\ManyToMany(targetEntity="App\Entity\FinancialActor", mappedBy="greenEntrepreneur") + * @ORM\ManyToMany(targetEntity="App\Entity\Contable", mappedBy="greenEntrepreneur") */ private $financials; @@ -458,14 +458,14 @@ class GreenEntrepreneur extends User } /** - * @return Collection|Trainer[] + * @return Collection|Supervisor[] */ public function getTrainer(): Collection { return $this->trainer; } - public function addTrainer(Trainer $trainer): self + public function addTrainer(Supervisor $trainer): self { if (!$this->trainer->contains($trainer)) { $this->trainer[] = $trainer; @@ -475,7 +475,7 @@ class GreenEntrepreneur extends User return $this; } - public function removeTrainer(Trainer $trainer): self + public function removeTrainer(Supervisor $trainer): self { if ($this->trainer->contains($trainer)) { $this->trainer->removeElement($trainer); @@ -486,14 +486,14 @@ class GreenEntrepreneur extends User } /** - * @return Collection|Trainer[] + * @return Collection|Supervisor[] */ public function getFinancials(): Collection { return $this->financials; } - public function addFinancial(FinancialActor $financialActor): self + public function addFinancial(Contable $financialActor): self { if (!$this->financials->contains($financialActor)) { $this->financials[] = $financialActor; @@ -503,7 +503,7 @@ class GreenEntrepreneur extends User return $this; } - public function removeFinancial(FinancialActor $financialActor): self + public function removeFinancial(Contable $financialActor): self { if ($this->financials->contains($financialActor)) { $this->financials->removeElement($financialActor); diff --git a/httpdocs/src/Entity/Preguntas.php b/httpdocs/src/Entity/Preguntas.php index 9cbc911..913bf1d 100644 --- a/httpdocs/src/Entity/Preguntas.php +++ b/httpdocs/src/Entity/Preguntas.php @@ -58,7 +58,7 @@ class Preguntas extends AbstractPersonalTranslatable implements TranslatableInte */ private $isEmail=0; /** - * Is marked to Trainer review + * Is marked to Supervisor review * @ORM\Column( type="boolean", nullable=true) */ private $isRevisable=0; diff --git a/httpdocs/src/Entity/PreguntasFormulario.php b/httpdocs/src/Entity/PreguntasFormulario.php index 5eb3862..808ebfe 100644 --- a/httpdocs/src/Entity/PreguntasFormulario.php +++ b/httpdocs/src/Entity/PreguntasFormulario.php @@ -62,7 +62,7 @@ class PreguntasFormulario //extends Preguntas */ private $isEmail=0; /** - * Is marked to Trainer review + * Is marked to Supervisor review * @ORM\Column( type="boolean", nullable=true) */ private $isRevisable=0; diff --git a/httpdocs/src/Entity/ProcesoGreenEnterpreneur.php b/httpdocs/src/Entity/ProcesoGreenEnterpreneur.php index 02834aa..6b18453 100644 --- a/httpdocs/src/Entity/ProcesoGreenEnterpreneur.php +++ b/httpdocs/src/Entity/ProcesoGreenEnterpreneur.php @@ -37,7 +37,7 @@ private $proceso; /** - * @ORM\ManyToOne(targetEntity="App\Entity\GreenEntrepreneur", inversedBy="procesoUsuario",cascade={"persist"}) + * @ORM\ManyToOne(targetEntity="App\Entity\Licitador", inversedBy="procesoUsuario",cascade={"persist"}) * @ORM\JoinColumn(name="green_entrepreneur_id", referencedColumnName="id",onDelete="NO ACTION") */ private $greenEntrepreneur; @@ -84,12 +84,12 @@ return $this; } - public function getGreenEntrepreneur(): ?GreenEntrepreneur + public function getGreenEntrepreneur(): ?Licitador { return $this->greenEntrepreneur; } - public function setGreenEntrepreneur(?GreenEntrepreneur $greenEntrepreneur): self + public function setGreenEntrepreneur(?Licitador $greenEntrepreneur): self { $this->greenEntrepreneur = $greenEntrepreneur; diff --git a/httpdocs/src/Entity/Respuestas.php b/httpdocs/src/Entity/Respuestas.php index 1ea3d0b..3dca030 100644 --- a/httpdocs/src/Entity/Respuestas.php +++ b/httpdocs/src/Entity/Respuestas.php @@ -44,7 +44,7 @@ class Respuestas /** * @ORM\Id - * @ORM\ManyToOne(targetEntity="App\Entity\GreenEntrepreneur", inversedBy="respuestas") + * @ORM\ManyToOne(targetEntity="App\Entity\Licitador", inversedBy="respuestas") * @ORM\JoinColumn(name="green_entrepreneur_id", referencedColumnName="id", nullable=false, onDelete="NO ACTION") */ private $greenEntrepreneur; @@ -179,12 +179,12 @@ class Respuestas } - public function getGreenEntrepreneur(): ?GreenEntrepreneur + public function getGreenEntrepreneur(): ?Licitador { return $this->greenEntrepreneur; } - public function setGreenEntrepreneur(?GreenEntrepreneur $greenEntrepreneur): self + public function setGreenEntrepreneur(?Licitador $greenEntrepreneur): self { $this->greenEntrepreneur = $greenEntrepreneur; diff --git a/httpdocs/src/Entity/RespuestasFormulario.php b/httpdocs/src/Entity/RespuestasFormulario.php index 69354db..b037fe7 100644 --- a/httpdocs/src/Entity/RespuestasFormulario.php +++ b/httpdocs/src/Entity/RespuestasFormulario.php @@ -34,7 +34,7 @@ class RespuestasFormulario private $convocatoria; /** * @ORM\Id - * @ORM\ManyToOne(targetEntity="App\Entity\GreenEntrepreneur", inversedBy="respuestasformulario") + * @ORM\ManyToOne(targetEntity="App\Entity\Licitador", inversedBy="respuestasformulario") * @ORM\JoinColumn(name="green_entrepreneur_id", referencedColumnName="id", nullable=false, onDelete="NO ACTION") */ private $greenEntrepreneur; @@ -81,12 +81,12 @@ class RespuestasFormulario - public function getGreenEntrepreneur(): ?GreenEntrepreneur + public function getGreenEntrepreneur(): ?Licitador { return $this->greenEntrepreneur; } - public function setGreenEntrepreneur(?GreenEntrepreneur $greenEntrepreneur): self + public function setGreenEntrepreneur(?Licitador $greenEntrepreneur): self { $this->greenEntrepreneur = $greenEntrepreneur; diff --git a/httpdocs/src/Entity/Sector.php b/httpdocs/src/Entity/Sector.php index 56f3efe..200a2d6 100644 --- a/httpdocs/src/Entity/Sector.php +++ b/httpdocs/src/Entity/Sector.php @@ -36,11 +36,11 @@ */ private $indicadores; /** - * @ORM\OneToMany(targetEntity="App\Entity\GreenEntrepreneur", mappedBy="sector") + * @ORM\OneToMany(targetEntity="App\Entity\Licitador", mappedBy="sector") */ private $greenEntrepreneurs; /** - * @ORM\ManyToMany(targetEntity="App\Entity\FinancialActor", mappedBy="scope_operations") + * @ORM\ManyToMany(targetEntity="App\Entity\Contable", mappedBy="scope_operations") */ private $financialactor; @@ -70,7 +70,7 @@ return $this->id; } /** - * @return Collection|GreenEntrepreneur[] + * @return Collection|Licitador[] */ public function getFinancialactor(): Collection { @@ -78,7 +78,7 @@ } - public function addFinancialactor(FinancialActor $fa): self + public function addFinancialactor(Contable $fa): self { if (!$this->financialactor->contains($fa)) { $this->financialactor[] = $fa; @@ -88,7 +88,7 @@ return $this; } - public function removeFinancialactor(FinancialActor $fa): self + public function removeFinancialactor(Contable $fa): self { if ($this->financialactor->contains($fa)) { $this->financialactor->removeElement($fa); @@ -143,7 +143,7 @@ return $this->greenEntrepreneurs; } - public function addGreenEntrepreneur(GreenEntrepreneur $greenEntrepreneur): self + public function addGreenEntrepreneur(Licitador $greenEntrepreneur): self { if (!$this->greenEntrepreneurs->contains($greenEntrepreneur)) { $this->greenEntrepreneurs->add($greenEntrepreneur); @@ -152,7 +152,7 @@ return $this; } - public function removeGreenEntrepreneur(GreenEntrepreneur $greenEntrepreneur): self + public function removeGreenEntrepreneur(Licitador $greenEntrepreneur): self { if ($this->greenEntrepreneurs->contains($greenEntrepreneur)) { $this->greenEntrepreneurs->removeElement($greenEntrepreneur); diff --git a/httpdocs/src/Entity/Bso.php b/httpdocs/src/Entity/Servicio.php similarity index 94% rename from httpdocs/src/Entity/Bso.php rename to httpdocs/src/Entity/Servicio.php index d278118..48dbfc7 100644 --- a/httpdocs/src/Entity/Bso.php +++ b/httpdocs/src/Entity/Servicio.php @@ -10,12 +10,12 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity */ -class Bso extends \App\Entity\User +class Servicio extends \App\Entity\User { /** * @ORM\Column(type="string", nullable=false) - * @Assert\NotBlank(message="Nombre de la compañia no puede estar en blanco") + * @Assert\NotBlank(message="Nombre del servicio no puede estar en blanco") * @Assert\Length( * min = 2, * max = 255, @@ -60,7 +60,7 @@ class Bso extends \App\Entity\User private $news; /** - * @ORM\ManyToMany(targetEntity="App\Entity\Trainer", mappedBy="bso") + * @ORM\ManyToMany(targetEntity="App\Entity\Supervisor", mappedBy="bso") */ private $trainer; @@ -137,14 +137,14 @@ class Bso extends \App\Entity\User } /** - * @return Collection|Trainer[] + * @return Collection|Supervisor[] */ public function getTrainer(): Collection { return $this->trainer; } - public function addTrainer(Trainer $trainer): self + public function addTrainer(Supervisor $trainer): self { if (!$this->trainer->contains($trainer)) { $this->trainer[] = $trainer; @@ -155,7 +155,7 @@ class Bso extends \App\Entity\User return $this; } - public function removeTrainer(Trainer $trainer): self + public function removeTrainer(Supervisor $trainer): self { if ($this->trainer->contains($trainer)) { $this->trainer->removeElement($trainer); diff --git a/httpdocs/src/Entity/Trainer.php b/httpdocs/src/Entity/Supervisor.php similarity index 95% rename from httpdocs/src/Entity/Trainer.php rename to httpdocs/src/Entity/Supervisor.php index 531ddc9..9eee298 100644 --- a/httpdocs/src/Entity/Trainer.php +++ b/httpdocs/src/Entity/Supervisor.php @@ -9,7 +9,7 @@ use FOS\UserBundle\Model\GroupInterface as Group; /** * @ORM\Entity(repositoryClass="App\Repository\TrainerRepository") */ -class Trainer extends \App\Entity\User +class Supervisor extends \App\Entity\User { /** * @ORM\Column(type="array", nullable=false) @@ -50,7 +50,7 @@ class Trainer extends \App\Entity\User $this->activities = $activities; } /** - * @ORM\ManyToMany(targetEntity="App\Entity\GreenEntrepreneur", inversedBy="trainer") + * @ORM\ManyToMany(targetEntity="App\Entity\Licitador", inversedBy="trainer") * @ORM\JoinTable( * name="GreenEntrepreneurHasTrainer", * joinColumns={@ORM\JoinColumn(name="trainer_id", referencedColumnName="id", nullable=false)}, @@ -114,7 +114,7 @@ class Trainer extends \App\Entity\User } /** - * @return Collection|GreenEntrepreneur[] + * @return Collection|Licitador[] */ public function getGreenEntrepreneur(): Collection { @@ -190,7 +190,7 @@ class Trainer extends \App\Entity\User return $this; } - public function addGreenEntrepreneur(GreenEntrepreneur $greenEntrepreneur): self + public function addGreenEntrepreneur(Licitador $greenEntrepreneur): self { if (!$this->greenEntrepreneur->contains($greenEntrepreneur)) { $this->greenEntrepreneur[] = $greenEntrepreneur; @@ -199,7 +199,7 @@ class Trainer extends \App\Entity\User return $this; } - public function removeGreenEntrepreneur(GreenEntrepreneur $greenEntrepreneur): self + public function removeGreenEntrepreneur(Licitador $greenEntrepreneur): self { if ($this->greenEntrepreneur->contains($greenEntrepreneur)) { $this->greenEntrepreneur->removeElement($greenEntrepreneur); diff --git a/httpdocs/src/Entity/TareaGreenEnterpreneur.php b/httpdocs/src/Entity/TareaGreenEnterpreneur.php index a8e6814..16d0406 100644 --- a/httpdocs/src/Entity/TareaGreenEnterpreneur.php +++ b/httpdocs/src/Entity/TareaGreenEnterpreneur.php @@ -31,7 +31,7 @@ class TareaGreenEnterpreneur /** * @ORM\Id - * @ORM\ManyToOne(targetEntity="App\Entity\GreenEntrepreneur", inversedBy="tareaUsuario", cascade={"persist"}) + * @ORM\ManyToOne(targetEntity="App\Entity\Licitador", inversedBy="tareaUsuario", cascade={"persist"}) * @ORM\JoinColumn(name="green_entrepreneur_id", referencedColumnName="id", onDelete="NO ACTION") */ private $greenEntrepreneur; @@ -71,12 +71,12 @@ class TareaGreenEnterpreneur return $this; } - public function getGreenEntrepreneur(): ?GreenEntrepreneur + public function getGreenEntrepreneur(): ?Licitador { return $this->greenEntrepreneur; } - public function setGreenEntrepreneur(?GreenEntrepreneur $greenEntrepreneur): self + public function setGreenEntrepreneur(?Licitador $greenEntrepreneur): self { $this->greenEntrepreneur = $greenEntrepreneur; diff --git a/httpdocs/src/Entity/User.php b/httpdocs/src/Entity/User.php index d8aa3ee..0c3f59f 100644 --- a/httpdocs/src/Entity/User.php +++ b/httpdocs/src/Entity/User.php @@ -27,10 +27,10 @@ use Vich\UploaderBundle\Mapping\Annotation as Vich; * @ORM\DiscriminatorColumn(name="type", type="string") * @ORM\DiscriminatorMap({ * "backend_user":"App\Entity\User", - * "green_entrepreneur":"App\Entity\GreenEntrepreneur", + * "green_entrepreneur":"App\Entity\Licitador", * "bso":"App\Entity\Bso", - * "trainer":"App\Entity\Trainer", - * "financial_actor":"App\Entity\FinancialActor" + * "trainer":"App\Entity\Supervisor", + * "financial_actor":"App\Entity\Contable" * }) * @Vich\Uploadable */ diff --git a/httpdocs/src/Entity/WorkShop.php b/httpdocs/src/Entity/WorkShop.php index bc832f4..4e62de8 100644 --- a/httpdocs/src/Entity/WorkShop.php +++ b/httpdocs/src/Entity/WorkShop.php @@ -59,7 +59,7 @@ class WorkShop private $sala; /** - * @ORM\ManyToMany(targetEntity="App\Entity\Trainer", inversedBy="workShop") + * @ORM\ManyToMany(targetEntity="App\Entity\Supervisor", inversedBy="workShop") * @ORM\JoinColumn(name="trainer_id", referencedColumnName="id") * @Assert\NotBlank() * @Assert\Valid() @@ -79,7 +79,7 @@ class WorkShop private $procesos; /** - * @ORM\ManyToMany(targetEntity="App\Entity\GreenEntrepreneur", mappedBy="workShop", cascade={"persist"}) + * @ORM\ManyToMany(targetEntity="App\Entity\Licitador", mappedBy="workShop", cascade={"persist"}) */ private $greenEntrepreneur; @@ -184,14 +184,14 @@ class WorkShop return $this; } /** - * @return Collection|Trainer[] + * @return Collection|Supervisor[] */ public function getTrainer(): Collection { return $this->trainer; } - public function addTrainer(Trainer $trainer): self + public function addTrainer(Supervisor $trainer): self { if (!$this->trainer->contains($trainer)) { $this->trainer->add($trainer); @@ -201,7 +201,7 @@ class WorkShop return $this; } - public function removeTrainer(Trainer $trainer): self + public function removeTrainer(Supervisor $trainer): self { if ($this->trainer->contains($trainer)) { $this->trainer->removeElement($trainer); @@ -242,14 +242,14 @@ class WorkShop } /** - * @return Collection|GreenEntrepreneur[] + * @return Collection|Licitador[] */ public function getGreenEntrepreneur(): Collection { return $this->greenEntrepreneur; } - public function addGreenEntrepreneur(GreenEntrepreneur $greenEntrepreneur): self + public function addGreenEntrepreneur(Licitador $greenEntrepreneur): self { if (!$this->greenEntrepreneur->contains($greenEntrepreneur)) { $this->greenEntrepreneur->add($greenEntrepreneur); @@ -259,7 +259,7 @@ class WorkShop return $this; } - public function removeGreenEntrepreneur(GreenEntrepreneur $greenEntrepreneur): self + public function removeGreenEntrepreneur(Licitador $greenEntrepreneur): self { if ($this->greenEntrepreneur->contains($greenEntrepreneur)) { $this->greenEntrepreneur->removeElement($greenEntrepreneur); diff --git a/httpdocs/src/Form/Type/RegistrationFinancialActorFormType.php b/httpdocs/src/Form/Type/RegistrationFinancialActorFormType.php index e0eb54b..3ad6eb4 100644 --- a/httpdocs/src/Form/Type/RegistrationFinancialActorFormType.php +++ b/httpdocs/src/Form/Type/RegistrationFinancialActorFormType.php @@ -3,7 +3,7 @@ namespace App\Form\Type; use AdamQuaile\Bundle\FieldsetBundle\Form\FieldsetType; -use App\Entity\FinancialActor; +use App\Entity\Contable; use App\Entity\Sector; use Sonata\Form\Type\DatePickerType; use Sonata\UserBundle\Model\UserInterface; @@ -36,7 +36,7 @@ class RegistrationFinancialActorFormType extends RegistrationFormType /** * @param string $class The User class name */ - public function __construct(string $class='FinancialActor') + public function __construct(string $class='Contable') { $this->class = $class; } @@ -209,7 +209,7 @@ class RegistrationFinancialActorFormType extends RegistrationFormType { $resolver->setDefaults( [ - 'data_class' => 'App\Entity\FinancialActor' + 'data_class' => 'App\Entity\Contable' ] ); } diff --git a/httpdocs/src/Form/Type/RegistrationGreenEnterpreneurFormType.php b/httpdocs/src/Form/Type/RegistrationGreenEnterpreneurFormType.php index 4b2f675..30ec0cb 100644 --- a/httpdocs/src/Form/Type/RegistrationGreenEnterpreneurFormType.php +++ b/httpdocs/src/Form/Type/RegistrationGreenEnterpreneurFormType.php @@ -35,7 +35,7 @@ class RegistrationGreenEnterpreneurFormType extends AbstractType /** * @param string $class The User class name */ - public function __construct(string $class='GreenEntrepreneur') + public function __construct(string $class='Licitador') { $this->class = $class; } @@ -190,7 +190,7 @@ class RegistrationGreenEnterpreneurFormType extends AbstractType { $resolver->setDefaults( [ - 'data_class' => 'App\Entity\GreenEntrepreneur' + 'data_class' => 'App\Entity\Licitador' ] ); } diff --git a/httpdocs/src/Form/Type/RegistrationTrainerFormType.php b/httpdocs/src/Form/Type/RegistrationTrainerFormType.php index 5f377d5..57afa3f 100644 --- a/httpdocs/src/Form/Type/RegistrationTrainerFormType.php +++ b/httpdocs/src/Form/Type/RegistrationTrainerFormType.php @@ -34,7 +34,7 @@ class RegistrationTrainerFormType extends AbstractType /** * @param string $class The User class name */ - public function __construct(string $class= 'Trainer') + public function __construct(string $class= 'Supervisor') { $this->class = $class; } @@ -166,7 +166,7 @@ class RegistrationTrainerFormType extends AbstractType { $resolver->setDefaults( [ - 'data_class' => 'App\Entity\Trainer' + 'data_class' => 'App\Entity\Supervisor' ] ); } diff --git a/httpdocs/src/Repository/FinancialActorRepository.php b/httpdocs/src/Repository/FinancialActorRepository.php index d18b7b7..3df432c 100644 --- a/httpdocs/src/Repository/FinancialActorRepository.php +++ b/httpdocs/src/Repository/FinancialActorRepository.php @@ -2,7 +2,7 @@ namespace App\Repository; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\ORM\EntityRepository; diff --git a/httpdocs/src/Repository/GreenEntrepreneurRepository.php b/httpdocs/src/Repository/GreenEntrepreneurRepository.php index fdf35ff..b5a6a03 100644 --- a/httpdocs/src/Repository/GreenEntrepreneurRepository.php +++ b/httpdocs/src/Repository/GreenEntrepreneurRepository.php @@ -2,7 +2,7 @@ namespace App\Repository; -use App\Entity\GreenEntrepreneur; +use App\Entity\Licitador; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Common\Persistence\ManagerRegistry; @@ -10,7 +10,7 @@ class GreenEntrepreneurRepository extends ServiceEntityRepository { public function __construct(ManagerRegistry $registry) { - parent::__construct($registry, GreenEntrepreneur::class); + parent::__construct($registry, Licitador::class); } public function findCasoEstudio($language){ return $this->createQueryBuilder('ge')->where('username = :username') diff --git a/httpdocs/src/Resources/SonataAdminBundle/views/CRUD/list__action_share_files.html.twig b/httpdocs/src/Resources/SonataAdminBundle/views/CRUD/list__action_share_files.html.twig index dda6ddf..2130e45 100644 --- a/httpdocs/src/Resources/SonataAdminBundle/views/CRUD/list__action_share_files.html.twig +++ b/httpdocs/src/Resources/SonataAdminBundle/views/CRUD/list__action_share_files.html.twig @@ -9,7 +9,7 @@ file that was distributed with this source code. #} -{% if instanceof(object, "\\App\\Entity\\FinancialActor") %} +{% if instanceof(object, "\\App\\Entity\\Contable") %} {% if pregunta.isRevisable %}
- +
- +
{% endif %} @@ -133,7 +133,7 @@ {% set encontrada=true %} {% if pregunta.isRevisable and reviewed[pregunta.alias] and comentarios[pregunta.alias].comentario is defined and comentarios[pregunta.alias].comentario is not empty%} -
+
{{ comentarios[pregunta.alias].comentario|raw }}
{% endif %} diff --git a/httpdocs/src/Resources/views/formcomponents/repetible/range.html.twig b/httpdocs/src/Resources/views/formcomponents/repetible/range.html.twig index 72b5ba8..d9bc1fd 100644 --- a/httpdocs/src/Resources/views/formcomponents/repetible/range.html.twig +++ b/httpdocs/src/Resources/views/formcomponents/repetible/range.html.twig @@ -36,11 +36,11 @@
{% if pregunta.isRevisable %}
- +
- +
{% endif %} diff --git a/httpdocs/src/Resources/views/formcomponents/repetible/text.html.twig b/httpdocs/src/Resources/views/formcomponents/repetible/text.html.twig index f374ac9..f7c4a12 100644 --- a/httpdocs/src/Resources/views/formcomponents/repetible/text.html.twig +++ b/httpdocs/src/Resources/views/formcomponents/repetible/text.html.twig @@ -42,11 +42,11 @@ {% if pregunta.isRevisable %}
- +
- +
{% endif %} diff --git a/httpdocs/src/Resources/views/formcomponents/text.html.twig b/httpdocs/src/Resources/views/formcomponents/text.html.twig index 5088e30..1e7eef4 100644 --- a/httpdocs/src/Resources/views/formcomponents/text.html.twig +++ b/httpdocs/src/Resources/views/formcomponents/text.html.twig @@ -40,11 +40,11 @@ {% if pregunta.isRevisable %}
- +
- +
{% endif %} @@ -58,7 +58,7 @@ {% set encontrada=true %} {% if pregunta.isRevisable and reviewed[pregunta.alias] and comentarios[pregunta.alias].comentario is defined and comentarios[pregunta.alias].comentario is not empty%} -
+
{{ comentarios[pregunta.alias].comentario|raw }}
{% endif %} diff --git a/httpdocs/src/RuleEngine/Conditions/PerfilesCondition.php b/httpdocs/src/RuleEngine/Conditions/PerfilesCondition.php index 91c8753..6d9f9e5 100644 --- a/httpdocs/src/RuleEngine/Conditions/PerfilesCondition.php +++ b/httpdocs/src/RuleEngine/Conditions/PerfilesCondition.php @@ -35,7 +35,7 @@ class PerfilesCondition extends AbstractArrayCondition ['key' => '5', 'label' => 'Financial Actor'], ['key' => '2', 'label' => 'BSO'], ['key' => '1', 'label' => 'GreenEntrepeneur'], - ['key' => '0', 'label' => 'Trainer'], + ['key' => '0', 'label' => 'Supervisor'], ]; // Details about the operator definition structure can be found in the Operator definition section. diff --git a/httpdocs/src/RuleEngine/Conditions/RespuestasCondition.php b/httpdocs/src/RuleEngine/Conditions/RespuestasCondition.php index 9fd58ee..38e4168 100644 --- a/httpdocs/src/RuleEngine/Conditions/RespuestasCondition.php +++ b/httpdocs/src/RuleEngine/Conditions/RespuestasCondition.php @@ -2,7 +2,7 @@ namespace App\RuleEngine\Conditions; - use App\Entity\GreenEntrepreneur; + use App\Entity\Licitador; use Zitec\RuleEngineBundle\Conditions\AbstractValueCondition; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage; diff --git a/httpdocs/templates/database/components/formcomponents/datatable.html.twig b/httpdocs/templates/database/components/formcomponents/datatable.html.twig index c499209..3f3b4e5 100644 --- a/httpdocs/templates/database/components/formcomponents/datatable.html.twig +++ b/httpdocs/templates/database/components/formcomponents/datatable.html.twig @@ -40,11 +40,11 @@
{% if pregunta.isRevisable %}
- +
- +
{% endif %} @@ -69,7 +69,7 @@
{% if pregunta.isRevisable and reviewed[pregunta.alias] and comentarios[pregunta.alias].comentario is defined and comentarios[pregunta.alias].comentario is not empty%} -
+
{{ comentarios[pregunta.alias].comentario|raw }}
{% endif %} diff --git a/httpdocs/templates/database/components/formcomponents/text.html.twig b/httpdocs/templates/database/components/formcomponents/text.html.twig index 7e897f6..6aa6326 100644 --- a/httpdocs/templates/database/components/formcomponents/text.html.twig +++ b/httpdocs/templates/database/components/formcomponents/text.html.twig @@ -40,11 +40,11 @@
{% if pregunta.isRevisable %}
- +
- +
{% endif %} @@ -58,7 +58,7 @@ {% set encontrada=true %} {% if pregunta.isRevisable and reviewed[pregunta.alias] and comentarios[pregunta.alias].comentario is defined and comentarios[pregunta.alias].comentario is not empty%} -
+
{{ comentarios[pregunta.alias].comentario|raw }}
{% endif %}