mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01: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
|
||||
|
||||
$offene_tickets = $this->erp->AnzahlOffeneTickets(false);
|
||||
$offene_tickets_user = $this->erp->AnzahlOffeneTickets(true);
|
||||
|
||||
$possibleUserItems = [
|
||||
'Tickets' => [
|
||||
'link' => 'index.php?module=ticket&action=list',
|
||||
'counter' => $this->erp->AnzahlOffeneTickets()
|
||||
'counter' => ($offene_tickets+$offene_tickets_user > 0)?$offene_tickets_user."/".$offene_tickets:""
|
||||
],
|
||||
'Aufgaben' => [
|
||||
'link' => 'index.php?module=aufgaben&action=list',
|
||||
|
@ -2696,7 +2696,14 @@ public function NavigationHooks(&$menu)
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user