From bf6655a534a6775d30cafa67bd801276bda1d98d Mon Sep 17 00:00:00 2001 From: polo Date: Tue, 13 Aug 2024 23:45:21 +0200 Subject: =?UTF-8?q?VERSION=200.2=20doctrine=20ORM=20et=20entit=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sections/1_customer.php | 46 ++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) (limited to 'src/sections/1_customer.php') diff --git a/src/sections/1_customer.php b/src/sections/1_customer.php index b0e3283..db5c448 100644 --- a/src/sections/1_customer.php +++ b/src/sections/1_customer.php @@ -3,42 +3,46 @@ // // -- SECTION 1: Fichier clients et propects -- +use Doctrine\ORM\EntityManager; + function newCustomer(): array { // fenĂȘtres - $TypeDeClient = new ZenityList(ZenitySetup::$type_client['text'], ZenitySetup::$type_client['entrees']); + //$TypeDeClient = new ZenityList(ZenitySetup::$type_client['text'], ZenitySetup::$type_client['entrees']); + $NouveauClient = new ZenityForms(ZenitySetup::$nouveau_client['text'], ZenitySetup::$nouveau_client['entrees']); $FinSection1 = new ZenityList(ZenitySetup::$fin_section_1['text'], ZenitySetup::$fin_section_1['entrees']); - + + $Customer = new Client; + // -- partie 1: client ou prospect? -- - $Client = new Clients; - $choix_niv2 = exec($TypeDeClient->get()); - if($choix_niv2 === ZenitySetup::$type_client['entrees'][0]) - { - echo "choix: " . $choix_niv2 . "\n"; - $Client->setType('client'); - } - elseif($choix_niv2 === ZenitySetup::$type_client['entrees'][1]) - { - echo "choix: " . $choix_niv2 . "\n"; - $Client->setType('prospect'); - } - else - { - return [0, null]; // menu principal - } + //~ $choix_niv2 = exec($TypeDeClient->get()); + //~ if($choix_niv2 === ZenitySetup::$type_client['entrees'][0]) + //~ { + //~ echo "choix: " . $choix_niv2 . "\n"; + //~ $Customer->setType('client'); + //~ } + //~ elseif($choix_niv2 === ZenitySetup::$type_client['entrees'][1]) + //~ { + //~ echo "choix: " . $choix_niv2 . "\n"; + //~ $Customer->setType('prospect'); + //~ } + //~ else + //~ { + //~ return [0, null]; // menu principal + //~ } // -- partie 2: saisie des infos -- - if(enterCustomer($Client)) + if($Customer->enterCustomer($NouveauClient)) { // -- partie 3: on fait quoi maintenant -- $choix_niv3 = exec($FinSection1->get()); if($choix_niv3 === ZenitySetup::$fin_section_1['entrees'][0]) { - return [2, $Client]; // section 2: newService() + return [2, $Customer]; // section 2: newService() } elseif($choix_niv3 === ZenitySetup::$fin_section_1['entrees'][1]) { - return [3, $Client]; // section 3: modifyData() + return [3, $Customer]; // section 3: modifyData() } elseif($choix_niv3 === ZenitySetup::$fin_section_1['entrees'][2]) { -- cgit v1.2.3