Selaa lähdekoodia

name for form col, debug link admin

v1
charly 3 vuotta sitten
vanhempi
commit
1fd9deb9d0
7 muutettua tiedostoa jossa 71 lisäystä ja 17 poistoa
  1. +31
    -0
      migrations/Version20210930114405.php
  2. +1
    -1
      public/build/entrypoints.json
  3. +1
    -1
      public/build/manifest.json
  4. +2
    -3
      src/Controller/Admin/CollectifDataCrudController.php
  5. +18
    -12
      src/Controller/Admin/DashboardController.php
  6. +17
    -0
      src/Entity/CollectifData.php
  7. +1
    -0
      translations/admin.fr.yaml

+ 31
- 0
migrations/Version20210930114405.php Näytä tiedosto

@@ -0,0 +1,31 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20210930114405 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}

public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE collectif_data ADD name VARCHAR(255) DEFAULT NULL');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE collectif_data DROP name');
}
}

+ 1
- 1
public/build/entrypoints.json Näytä tiedosto

@@ -130,7 +130,7 @@
"/build/vendors-node_modules_core-js_internals_export_js.2e873f33.js",
"/build/vendors-node_modules_core-js_internals_advance-string-index_js-node_modules_core-js_internals-bed4a0.74e1ccb1.js",
"/build/vendors-node_modules_amcharts_amcharts4_charts_js-node_modules_amcharts_amcharts4_core_js-nod-680fc8.d2df4450.js",
"/build/app-bulle.1628dbdd.js"
"/build/app-bulle.d8331347.js"
]
}
}

+ 1
- 1
public/build/manifest.json Näytä tiedosto

@@ -19,7 +19,7 @@
"build/app-backend.js": "/build/app-backend.e87ef456.js",
"build/app-frontend.css": "/build/app-frontend.2ddca656.css",
"build/app-frontend.js": "/build/app-frontend.1e3b4ae2.js",
"build/app-bulle.js": "/build/app-bulle.1628dbdd.js",
"build/app-bulle.js": "/build/app-bulle.d8331347.js",
"build/runtime.js": "/build/runtime.ef68e0db.js",
"build/pdfmake.js": "/build/pdfmake.fbf70324.js",
"build/canvg.js": "/build/canvg.881f9fc1.js",

+ 2
- 3
src/Controller/Admin/CollectifDataCrudController.php Näytä tiedosto

@@ -35,6 +35,7 @@ class CollectifDataCrudController extends AbstractCrudController
{
$fields = array();

$fields[] = TextField::new('name');
$fields[] = AssociationField::new('territory')
->setTemplatePath('crud/field/association.html.twig');
$fields[] = IntegerField::new('nbParticipant');
@@ -69,7 +70,6 @@ class CollectifDataCrudController extends AbstractCrudController
$hasAccess = $this->isGranted('ROLE_ADMIN');
if ($hasAccess) {
$fields[] = StatusField::new('status')
->setFormTypeOption('data', 0)
->setFormTypeOption('choices', ['Validé' => 1, 'En attente' => 0])
->setCustomOption('toggle_label', 'Valider')
->hideOnIndex();
@@ -88,8 +88,7 @@ class CollectifDataCrudController extends AbstractCrudController
EntityDto $entityDto,
FieldCollection $fields,
FilterCollection $filters
): QueryBuilder
{
): QueryBuilder {
$queryBuilder = parent::createIndexQueryBuilder(
$searchDto,
$entityDto,

+ 18
- 12
src/Controller/Admin/DashboardController.php Näytä tiedosto

@@ -81,6 +81,7 @@ class DashboardController extends SovDashboardController
public function configureMenuItems(): iterable
{
$urlNewCollectif = $this->adminUrlGenerator
->unsetAll()
->setController(CollectifDataCrudController::class)
->setAction(Action::NEW)
->set('menuIndex', 4)
@@ -88,14 +89,16 @@ class DashboardController extends SovDashboardController
->generateUrl();

$urlOfflineCollectif = $this->adminUrlGenerator
->setController(CollectifDataCrudController::class)
->setAction(Action::INDEX)
->set('status', 0)
->set('menuIndex', 4)
->set('submenuIndex', 0)
->generateUrl();
->unsetAll()
->setController(CollectifDataCrudController::class)
->setAction(Action::INDEX)
->set('status', 0)
->set('menuIndex', 4)
->set('submenuIndex', 0)
->generateUrl();

$urlOnlineCollectif = $this->adminUrlGenerator
->unsetAll()
->setController(CollectifDataCrudController::class)
->setAction(Action::INDEX)
->set('status', 1)
@@ -104,6 +107,7 @@ class DashboardController extends SovDashboardController
->generateUrl();

$urlNewIndividuel = $this->adminUrlGenerator
->unsetAll()
->setController(IndividualDataCrudController::class)
->setAction(Action::NEW)
->set('menuIndex', 3)
@@ -111,14 +115,16 @@ class DashboardController extends SovDashboardController
->generateUrl();

$urlOfflineIndividuel = $this->adminUrlGenerator
->setController(IndividualDataCrudController::class)
->setAction(Action::INDEX)
->set('status', 0)
->set('menuIndex', 3)
->set('submenuIndex', 0)
->generateUrl();
->unsetAll()
->setController(IndividualDataCrudController::class)
->setAction(Action::INDEX)
->set('status', 0)
->set('menuIndex', 3)
->set('submenuIndex', 0)
->generateUrl();

$urlOnlineIndividuel = $this->adminUrlGenerator
->unsetAll()
->setController(IndividualDataCrudController::class)
->setAction(Action::INDEX)
->set('status', 1)

+ 17
- 0
src/Entity/CollectifData.php Näytä tiedosto

@@ -23,6 +23,11 @@ class CollectifData extends AbstractData
*/
private $id;

/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $name;

/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="collectifData")
*/
@@ -103,6 +108,18 @@ class CollectifData extends AbstractData
return $this->id;
}

public function getName(): ?string
{
return $this->name;
}

public function setName(string $name): self
{
$this->name = $name;

return $this;
}

public function getUser(): ?User
{
return $this->user;

+ 1
- 0
translations/admin.fr.yaml Näytä tiedosto

@@ -33,6 +33,7 @@ entity:
nbRevolt: Révolte(s)
nbProjectBoost: Projet(s) boosté(s)
nbProjectInspiring: Projet(s) inspirant(s)
name: Nom
IndividualData:
label: Données individuel
label_plurial: Données du formulaire individuel

Loading…
Peruuta
Tallenna