mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-03-31 02:20:22 +02:00
ticket system show user's tickets and all tickets separately in sidebar
This commit is contained in:
parent
674c7b9958
commit
75bd00770c
@ -440,12 +440,15 @@ class erpooSystem extends Application
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Creates user specific items
|
// Creates user specific items
|
||||||
|
|
||||||
|
$offene_tickets = $this->erp->AnzahlOffeneTickets(false);
|
||||||
|
$offene_tickets_user = $this->erp->AnzahlOffeneTickets(true);
|
||||||
|
|
||||||
$possibleUserItems = [
|
$possibleUserItems = [
|
||||||
'Tickets' => [
|
'Tickets' => [
|
||||||
'link' => 'index.php?module=ticket&action=list',
|
'link' => 'index.php?module=ticket&action=list',
|
||||||
'counter' => $this->erp->AnzahlOffeneTickets()
|
'counter' => ($offene_tickets+$offene_tickets_user > 0)?$offene_tickets_user."/".$offene_tickets:""
|
||||||
],
|
],
|
||||||
'Aufgaben' => [
|
'Aufgaben' => [
|
||||||
'link' => 'index.php?module=aufgaben&action=list',
|
'link' => 'index.php?module=aufgaben&action=list',
|
||||||
|
@ -2696,7 +2696,14 @@ public function NavigationHooks(&$menu)
|
|||||||
|
|
||||||
public function AnzahlOffeneTickets($eigene=true)
|
public function AnzahlOffeneTickets($eigene=true)
|
||||||
{
|
{
|
||||||
$sql = "SELECT COUNT(t.id) FROM ticket t WHERE t.status = 'neu' AND ((t.warteschlange = '') OR (t.warteschlange IN (SELECT w.label FROM warteschlangen w WHERE w.adresse = '".$this->app->User->GetAdresse()."')))";
|
|
||||||
|
if ($eigene) {
|
||||||
|
$sql = "SELECT COUNT(t.id) FROM ticket t WHERE t.status = 'neu' AND (t.warteschlange IN (SELECT w.label FROM warteschlangen w WHERE w.adresse = '".$this->app->User->GetAdresse()."'))";
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
$sql = "SELECT COUNT(t.id) FROM ticket t WHERE t.status = 'neu' AND (t.warteschlange = '')";
|
||||||
|
}
|
||||||
|
|
||||||
return (int)$this->app->DB->Select($sql);
|
return (int)$this->app->DB->Select($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user