Project

General

Profile

Revision e1c378c0

IDe1c378c02254906b8b2de7dd4fc79f49ea8a8987
Parent 0ff49d9f
Child 811c1e5a

Added by Francois POIROTTE about 7 years ago

Ajout de groupes pour les techniciens

Change-Id: If870608da01779b6b922ca57dae7aa36a5566138
Reviewed-on: https://vigilo-dev.si.c-s.fr/review/2392
Tested-by: Build system <>
Reviewed-by: Francois POIROTTE <>

View differences:

src/plugins/vigilo/inc/abstractmonitoreditem.class.php
49 49
        $entity = new Entity();
50 50
        $entity->getFromDB($this->item->fields["entities_id"]);
51 51

  
52
        // Association de l'objet à son emplacement et à son entité.
52 53
        $candidates = array(
53 54
            'Locations' => $location,
54 55
            'Entities'  => $entity,
55 56
        );
56

  
57 57
        foreach ($candidates as $type => $candidate) {
58
            if ('N/A' === $candidate->getName()) {
58
            if (NOT_AVAILABLE === $candidate->getName()) {
59 59
                continue;
60 60
            }
61 61

  
......
67 67
            $this->children[]   = new VigiloGroup($groupName);
68 68
        }
69 69

  
70
        // Association de l'objet à son équipementier.
70 71
        $manufacturer = new Manufacturer();
71 72
        $manufacturer->getFromDB($this->item->fields["manufacturers_id"]);
72
        if ('N/A' !== $manufacturer->getName()) {
73
        if (NOT_AVAILABLE !== $manufacturer->getName()) {
73 74
            $this->children[] = new VigiloGroup("/Manufacturers/" . $manufacturer->getName());
74 75
        }
76

  
77
        // Association de l'objet à son technicien.
78
        $technician = new User();
79
        $technician->getFromDB($this->item->fields["users_id_tech"]);
80
        if (NOT_AVAILABLE !== $technician->getName()) {
81
            $this->children[] = new VigiloGroup("/Technicians/" . $technician->getName());
82
        }
75 83
    }
76 84

  
77 85
    protected function selectAddress()

Also available in: Unified diff