Commit f6681a6e authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Merge remote-tracking branch 'origin/master'

parents 37df2bfe 8a09d29b
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
@@ -7,3 +7,57 @@
 * @var $viewName   string
 * @var $viewFile   string
 */

$form = new \Laminas\Form\Form();


$form->add([
    'type'       => 'Date',
    'name'       => 'd1',
    'options'    => [
        'label' => 'Date de début',
    ],
    'attributes' => [
        'step' => '1',
    ],
]);

$form->add([
    'type'       => 'DateTime',
    'name'       => 'd2',
    'options'    => [
        'label' => 'Date de début',
    ],
    'attributes' => [
        'step' => '60',
    ],
]);

$form->add([
    'name'       => 'submit',
    'type'       => 'Submit',
    'attributes' => [
        'value' => 'Enregistrer',
        'class' => 'btn btn-primary',
    ],
]);
//$form->inpu

var_dump($_POST);

if (isset($_POST['d1'])) {
    $d1 = \Application\Filter\DateTimeFromString::run($_POST['d1']);
    var_dump($d1);
}

if (isset($_POST['d2'])) {
    $d2 = \Application\Filter\DateTimeFromString::run($_POST['d2']);
    var_dump($d2);
}


$form->get('d1')->setValue($d1?->format('Y-m-d\TH:i'));
$form->get('d2')->setValue($d2?->format('Y-m-d\TH:i'));


echo $this->form($form);
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ return [
             * Expects: bool
             * Default: false
             */
            'enabled'       => false,
            'enabled'       => true,

            /**
             * If enabled, every empty collector will be hidden.
+7 −5
Original line number Diff line number Diff line
CREATE OR REPLACE FORCE VIEW V_INDICATEUR_420 AS
SELECT DISTINCT
  w.intervenant_id,
  i.structure_id
FROM
  tbl_workflow w
  CASE
    WHEN w.structure_id IS NOT NULL
    THEN w.structure_id
    ELSE i.structure_id
  END structure_id
  FROM tbl_workflow w
  JOIN intervenant  i ON w.intervenant_id = i.id
  JOIN statut      si ON si.id = i.statut_id
  LEFT JOIN contrat c ON c.intervenant_id = w.intervenant_id
  LEFT JOIN contrat c ON c.intervenant_id = w.intervenant_id AND c.histo_destruction IS NULL
WHERE
  w.atteignable = 1
  AND w.etape_code = 'CONTRAT'
  AND w.objectif > 0
  AND w.realisation = 0
  AND c.histo_destruction IS NULL
  AND i.histo_destruction IS NULL
  AND si.histo_destruction IS NULL
  AND c.id IS NULL
+6 −2
Original line number Diff line number Diff line
CREATE OR REPLACE FORCE VIEW V_INDICATEUR_430 AS
SELECT
  w.intervenant_id,
  i.structure_id
  CASE
    WHEN w.structure_id IS NOT NULL
    THEN w.structure_id
    ELSE i.structure_id
  END structure_id
FROM
  intervenant i
  JOIN tbl_workflow w ON w.intervenant_id = i.id
@@ -15,7 +19,7 @@ FROM
      c.type_contrat_id = 1 --a déjà un contrat de type 'CONTRAT'
      AND c.histo_destruction IS NULL
  ) hc ON hc.intervenant_id = i.id
  LEFT JOIN contrat c ON c.intervenant_id = i.id AND c.structure_id = w.structure_id AND c.histo_destruction IS NULL
  LEFT JOIN contrat c ON c.intervenant_id = i.id AND (w.structure_id = c.structure_id OR w.structure_id is NULL) AND c.histo_destruction IS NULL
WHERE
  w.atteignable = 1
  AND w.etape_code = 'CONTRAT'
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ SELECT
  s.structure_id
FROM
  tbl_service s
  JOIN tbl_workflow w ON w.intervenant_id = s.intervenant_id AND w.structure_id = s.structure_id
  JOIN tbl_workflow w ON w.intervenant_id = s.intervenant_id AND (w.structure_id = s.structure_id OR w.structure_id is NULL)
WHERE
  s.type_intervenant_code = 'V'
  AND s.type_volume_horaire_code = 'PREVU'
Loading