Loading code/test3.php +54 −0 Original line number Diff line number Diff line Loading @@ -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 config/autoload/laminas-developer-tools.dev.php +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ return [ * Expects: bool * Default: false */ 'enabled' => false, 'enabled' => true, /** * If enabled, every empty collector will be hidden. Loading data/ddl/view/V_INDICATEUR_420.sql +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 Loading data/ddl/view/V_INDICATEUR_430.sql +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 Loading @@ -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' Loading data/ddl/view/V_INDICATEUR_440.sql +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
code/test3.php +54 −0 Original line number Diff line number Diff line Loading @@ -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
config/autoload/laminas-developer-tools.dev.php +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ return [ * Expects: bool * Default: false */ 'enabled' => false, 'enabled' => true, /** * If enabled, every empty collector will be hidden. Loading
data/ddl/view/V_INDICATEUR_420.sql +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 Loading
data/ddl/view/V_INDICATEUR_430.sql +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 Loading @@ -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' Loading
data/ddl/view/V_INDICATEUR_440.sql +1 −1 Original line number Diff line number Diff line Loading @@ -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