summaryrefslogtreecommitdiff
path: root/src/sections/3-1_windows.php
blob: 152c3d335c1e95f4aeb46f3eb50ee086531233d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
// src/sections/3-1_windows.php
//
// fonctions pour src/sections/3_modify_data.php

function makeModifyCustomerWindow(Client $Customer): ZenityList
{
    // fenêtre
    $ModifyCustomer = new ZenityList(ZenitySetup::$modification_client['text'], []);
    
    $entries = [];
    $i = 0;
    $client_data = $Customer->getAllWithWindowFields();
    //var_dump($client_data);
    foreach($client_data as $key => $value)
    {
        $entries[$i][] = $key;
        $entries[$i][] = $value;
        $i++;
    }
    $entries[$i][] = ZenitySetup::$modification_client['service'];
    $entries[$i][] = '';
    //~ $entries[$i][] = ZenitySetup::$modification_client['return'];
    //~ $entries[$i][] = '';
    
    $ModifyCustomer->setListRows($entries, 2, 2.5);
    return $ModifyCustomer;
}

function makeModifyServiceWindow(Prestation $Service): ZenityList
{
    // fenêtre
    $ModifyService = new ZenityList(ZenitySetup::$modification_presta['text'], []);
    
    $entrees = [];
    $i = 0;
    $presta_data = $Service->getAllWithWindowFields();
    //var_dump($presta_data);
    foreach($presta_data as $key => $value)
    {
        $entrees[$i][] = $key;
        $entrees[$i][] = $value;
        $i++;
    }

    $ModifyService->setListRows($entrees, 2, 2.5);
    return $ModifyService;
}