Пример #1
0
 public function index()
 {
     $title = "Управление заявками";
     //Lang::get('admin/blogs/title.blog_management');
     $requests = \Ticket::all();
     $email = \DbConfig::get("app.admin.email_to_send_requests");
     if (!$email) {
         $email = "";
     }
     return View::make('admin/requests/index', compact('title', 'requests', 'email'));
 }
Пример #2
0
 function filter($condition)
 {
     switch ($condition) {
         case 'open':
             $options = array('conditions' => 'status != "closed" AND company_id = ' . $this->client->comapny_id);
             break;
         case 'closed':
             $options = array('conditions' => 'status = "closed" AND company_id = ' . $this->client->company_id);
             break;
     }
     $this->view_data['ticket'] = Ticket::all($options);
     $this->content_view = 'tickets/client_views/all';
 }
Пример #3
0
 function filter($condition)
 {
     switch ($condition) {
         case 'open':
             $options = array('conditions' => 'status = "open"');
             break;
         case 'closed':
             $options = array('conditions' => 'status = "closed"');
             break;
         case 'assigned':
             $options = array('conditions' => 'status != "closed" AND user_id = ' . $this->user->id);
             break;
     }
     $this->view_data['ticket'] = Ticket::all($options);
     $this->content_view = 'tickets/all';
 }
Пример #4
0
 function filter($condition)
 {
     $this->view_data['queues'] = Queue::find('all', array('conditions' => array('inactive=?', '0')));
     switch ($condition) {
         case 'open':
             $options = array('conditions' => 'status = "open"');
             break;
         case 'closed':
             $options = array('conditions' => 'status = "closed"');
             break;
         case 'assigned':
             $options = array('conditions' => 'status != "closed" AND user_id = ' . $this->user->id);
             break;
     }
     $this->view_data['ticket'] = Ticket::all($options);
     $this->content_view = 'tickets/all';
 }
Пример #5
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $tickets = $this->ticket->all();
     return View::make('tickets.index', compact('tickets'));
 }
Пример #6
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return View::make('user.ticket_list', ['tickets' => Ticket::all()]);
 }
Пример #7
0
 /**
  * Setup data
  *
  * @return null
  */
 private static function _seed()
 {
     $database = self::_database();
     User::all()->destroy();
     Bill::all()->destroy();
     Ticket::all()->destroy();
     Tocket::all()->destroy();
     Account::all()->destroy();
     $user = new User();
     $user->id = 1;
     $user->name = "Eustaquio Rangel";
     $user->email = "*****@*****.**";
     $user->code = "12345";
     $user->user_level = 1;
     $user->save();
     $user = new User();
     $user->id = 2;
     $user->name = "Rangel, Eustaquio";
     $user->email = "*****@*****.**";
     $user->code = "54321";
     $user->user_level = 2;
     $user->save();
     for ($i = 1; $i <= 10; $i++) {
         $bill = new Bill();
         $bill->id = $i;
         $bill->user_id = 1;
         $bill->description = "Bill #{$i}";
         $bill->value = $i;
         $bill->save();
         $ticket = new Ticket();
         $ticket->user_id = 1;
         $ticket->description = "Just another ticket";
         $ticket->save();
     }
     $account = new Account();
     $account->user_id = 1;
     $account->account_number = "12345";
     $account->save();
     $account = new Account();
     $account->user_id = 2;
     $account->account_number = "54321";
     $account->save();
 }