From 6f4cc3afffde36a13618458ffda72e6104624f36 Mon Sep 17 00:00:00 2001 From: polo Date: Wed, 30 Aug 2023 12:20:39 +0200 Subject: =?UTF-8?q?section=20client=20=C3=A0=20part,=20section=20modif=20e?= =?UTF-8?q?n=20cours,=20bug=20dans=20Dates,?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sections/1_customer.php | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'src/sections/1_customer.php') diff --git a/src/sections/1_customer.php b/src/sections/1_customer.php index cdec448..ca20d08 100644 --- a/src/sections/1_customer.php +++ b/src/sections/1_customer.php @@ -12,29 +12,36 @@ function newCustomer(): array // -- partie 1: client ou prospect? -- $Client = new Clients; - if(exec($TypeDeClient->get()) === 'Client') + $choix_niv2 = exec($TypeDeClient->get()); + if($choix_niv2 === ZenitySetup::$type_client_entrees[0]) { + echo "choix: " . $choix_niv2 . "\n"; $Client->setType('client'); } - //~ else // - //~ { - //~ $Client->setType('prospect'); - //~ } + elseif($choix_niv2 === ZenitySetup::$type_client_entrees[1]) + { + echo "choix: " . $choix_niv2 . "\n"; + $Client->setType('prospect'); + } + else + { + return [0, null]; // menu principal + } // -- partie 2: saisie des infos -- if(enterCustomer($Client)) { // -- partie 3: on fait quoi maintenant -- - $choix_niv2 = exec($FinSection1->get()); - if($choix_niv2 === ZenitySetup::$fin_section_1_entrees[0]) + $choix_niv3 = exec($FinSection1->get()); + if($choix_niv3 === ZenitySetup::$fin_section_1_entrees[0]) { return [2, $Client]; // section 2: newService() } - elseif($choix_niv2 === ZenitySetup::$fin_section_1_entrees[1]) + elseif($choix_niv3 === ZenitySetup::$fin_section_1_entrees[1]) { return [3, $Client]; // section 3: modifyData() } - elseif($choix_niv2 === ZenitySetup::$fin_section_1_entrees[2]) + elseif($choix_niv3 === ZenitySetup::$fin_section_1_entrees[2]) { return [1, null]; // relancer section 1: newCustomer() } -- cgit v1.2.3