You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2019-12-10 15:23:32

APC83
Member
Registered: 2019-06-11
Posts: 3

Masquer l'onglet statistique et historique pour un profil

Bonjour à tous,

Par manque de temps, nous créons nos tickets et renseignons les différentes tâches/suivis plusieurs heures après intervention, ce qui fausse les statistiques (ca ne nous pose aucun problème en interne). Du coup ce n'est pas compréhensible pour nos clients et ne reflète pas la réalité du temps de prise en charge par exemple.
Nous aimerions masquer l'onglet statistique et historique pour notre profil "client".
Malgré que la case "Statistiques" ne soit pas cochée dans le profil (Profils/Client/Assistance/Visibilité), l'onglet est toujours visible sur l'interface du client.
Comment masquer "Statistique" et "Historique" ?

Merci pour votre aide.

Offline

#2 2023-07-28 14:26:07

breizhoo
Member
Registered: 2022-03-10
Posts: 10

Re: Masquer l'onglet statistique et historique pour un profil

Bonjour,
Une solution insatisfaisante mais fonctionnelle pour masquer ces deux onglets dans GLPI 10.
Modifier la fonction defineTabs dans "htdocs\glpi\src\Ticket.php" de la manière suivante :

    public function defineTabs($options = [])
    {
        $ong = [];
        $this->addDefaultFormTab($ong);
       
       /** Première adaptation ci-dessous **/
        if (Session::getCurrentInterface() == 'central') {
            $this->addStandardTab(__CLASS__, $ong, $options);
        }
        $this->addStandardTab('TicketValidation', $ong, $options);
        $this->addStandardTab('KnowbaseItem_Item', $ong, $options);
        $this->addStandardTab('Item_Ticket', $ong, $options);

        if ($this->hasImpactTab()) {
            $this->addStandardTab('Impact', $ong, $options);
        }

        $this->addStandardTab('TicketCost', $ong, $options);
        $this->addStandardTab('Itil_Project', $ong, $options);
        $this->addStandardTab('ProjectTask_Ticket', $ong, $options);
        $this->addStandardTab('Problem_Ticket', $ong, $options);
        $this->addStandardTab('Change_Ticket', $ong, $options);

        if (Session::getCurrentInterface() == 'central') {
            $this->addStandardTab(Ticket_Contract::class, $ong, $options);
        }

        if (
            Entity::getAnonymizeConfig($this->getEntityID()) == Entity::ANONYMIZE_DISABLED
            || Session::getCurrentInterface() == 'central'
        ) {
            /** seconde et dernière adaptation ci-dessous **/
            if (Session::getCurrentInterface() == 'central') {
                  $this->addStandardTab('Log', $ong, $options);
            }
         }

        return $ong;
    }

Offline

Board footer

Powered by FluxBB