/**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $statuses = Status::all();
     $products = Product::all();
     $productionschedule = Batch::find($id);
     return view('production.edit', ['productionschedule' => $productionschedule, 'products' => $products, 'statuses' => $statuses]);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $tarea = \App\Tarea::find($id);
     $proyectos = Proyecto::all();
     $users = DB::table('users')->where('id_type', '=', '3')->get();
     $status = Status::all();
     return view('tarea.edit', compact('tarea', 'proyectos', 'users', 'status'));
 }
 public function edit($project_id, $ticket_id)
 {
     $ticket = \App\Ticket::find($ticket_id);
     if ($ticket->project->user_id == \Auth::user()->id) {
         return view('projects.tickets.edit', ['ticket' => $ticket, 'project' => $ticket->project, 'statuses' => \App\Status::all()]);
     } else {
         return \Redirect::route('projects.index')->with('danger', 'Permission denied.');
     }
 }
 /**
  * Return all orders and add option to change status or order.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //@to-do add city limitation
     $orders = Order::where('status_id', '!=', 1)->get();
     foreach ($orders as $order) {
         $orderlines[$order->id] = $order->orderlines->toArray();
         $userData[$order->id] = User::findOrFail($order->user_id);
         $cityData[$order->id] = $order->city->toArray();
     }
     $statusData = Status::all();
     $productData = Product::where('week_no', date('W'))->get();
     return view('manager.overview', compact('orders', 'orderlines', 'userData', 'statusData', 'cityData', 'productData'));
 }
 public function index(Status $status)
 {
     if (Auth::check()) {
         $userIds = Auth::user()->followedUsers()->lists('followed_id');
         $userIds[] = Auth::user()->id;
         // WhereIn to find where a column's value equals the value in an array
         // Eager loading comments
         $statuses = $status->with('comments')->whereIn('user_id', $userIds)->latest()->get();
     } else {
         $statuses = $status->all();
     }
     return view('statuses.index')->with('statuses', $statuses);
 }
 /**
  * Display a list of all of the user's tickets.
  *
  * @param  Project  $project
  * @return Response
  */
 public function scrum(Project $project)
 {
     $tickets = $this->tickets->byProject($project);
     $statuses = Status::all();
     $data = array();
     $i = 0;
     foreach ($statuses as $status) {
         $data[] = array('status' => $status, 'tickets' => array());
         foreach ($tickets as $ticket) {
             if ($ticket->status->id == $status->id) {
                 array_push($data[$i]['tickets'], $ticket);
             }
         }
         $i++;
     }
     //		dd($data);
     return view('scrum.board', ['scrum_data' => $data, 'project' => $project]);
 }
Beispiel #7
0
 /**
  *
  */
 protected function createOrganizations()
 {
     $this->misc['statuses'] = Status::all()->keyBy('name');
     $this->misc['opfs'] = Opf::all()->keyBy('name');
     $this->misc['cities'] = City::all()->keyBy('name');
     $this->misc['types'] = Type::all()->keyBy('name');
     foreach ($this->data as $row) {
         $this->createOrganization($row);
     }
 }
 public function index()
 {
     $message = Session::get('message');
     $quote_requests = QuoteRequest::where('customer_id', '>', 0)->where('status', '>', 0)->where('status', '<', 9)->get();
     $statuses = Status::all();
     $array = array();
     $i = 0;
     foreach ($quote_requests as $quote_request) {
         $array[$i]['quote_number'] = $quote_request->id;
         $array[$i]['title'] = $quote_request->title;
         $array[$i]['description'] = $quote_request->summary;
         $array[$i]['artwork_image'] = $quote_request->artwork_image;
         $array[$i]['customer_id'] = $quote_request->customer_id;
         if (count($quote_request->customer) > 0) {
             $array[$i]['customer_name'] = $quote_request->customer->customer_name;
         } else {
             $array[$i]['customer_name'] = '';
         }
         $array[$i]['request_date'] = $quote_request->request_date;
         $array[$i]['expiry_date'] = $quote_request->expiry_date;
         $array[$i]['status'] = $quote_request->get_status->value;
         $array[$i]['status_id'] = $quote_request->get_status->id;
         // Quotes
         if (isset($quote_request->get_quote->id)) {
             $array[$i]['supplier_id'] = $quote_request->get_quote->supplier->id;
             $array[$i]['supplier_name'] = $quote_request->get_quote->supplier->supplier_name;
         } else {
             $array[$i]['supplier_id'] = '';
             $array[$i]['supplier_name'] = '';
         }
         // Jobs
         if (isset($quote_request->job->id) && $quote_request->quote_id != 0) {
             $array[$i]['job_number'] = $quote_request->id;
             $array[$i]['quantity'] = $quote_request->job->job_item->quantity;
             $array[$i]['total'] = $quote_request->job->job_item->total;
             $array[$i]['request_date'] = $quote_request->job->updated_at->format('d/m/Y');
             if ($array[$i]['status'] == 'New Job') {
                 // Working on the stages of a new job
                 $count = $quote_request->job->outside_work * 100 + $quote_request->job->design * 10 + $quote_request->job->on_proof;
                 switch ($count) {
                     case 0:
                         $array[$i]['stage'] = '';
                         break;
                     case 1:
                         $array[$i]['stage'] = '<span class="label label-danger">On Proof</span>';
                         break;
                     case 10:
                         $array[$i]['stage'] = '<span class="label label-primary">Design</span>';
                         break;
                     case 11:
                         $array[$i]['stage'] = '<span class="label label-primary">Design</span>';
                         foreach ($array[$i] as $key => $item) {
                             $array[$i + 1][$key] = $array[$i][$key];
                         }
                         $i++;
                         $array[$i]['stage'] = '<span class="label label-danger">On Proof</span>';
                         break;
                     case 100:
                         $array[$i]['stage'] = '<span class="label label-success">Outside Work</span>';
                         break;
                     case 101:
                         $array[$i]['stage'] = '<span class="label label-success">Outside Work</span>';
                         foreach ($array[$i] as $key => $item) {
                             $array[$i + 1][$key] = $array[$i][$key];
                         }
                         $i++;
                         $array[$i]['stage'] = '<span class="label label-danger">On Proof</span>';
                         break;
                     case 110:
                         $array[$i]['stage'] = '<span class="label label-success">Outside Work</span>';
                         foreach ($array[$i] as $key => $item) {
                             $array[$i + 1][$key] = $array[$i][$key];
                         }
                         $i++;
                         $array[$i]['stage'] = '<span class="label label-primary">Design</span>';
                         break;
                     case 111:
                         $array[$i]['stage'] = '<span class="label label-success">Outside Work</span>';
                         foreach ($array[$i] as $key => $item) {
                             $array[$i + 1][$key] = $array[$i][$key];
                             $array[$i + 2][$key] = $array[$i][$key];
                         }
                         $i++;
                         $array[$i]['stage'] = '<span class="label label-primary">Design</span>';
                         $i++;
                         $array[$i]['stage'] = '<span class="label label-danger">On Proof</span>';
                         break;
                 }
             } else {
                 $array[$i]['stage'] = '';
             }
         } else {
             $array[$i]['job_number'] = '';
             $array[$i]['quantity'] = '';
             $array[$i]['stage'] = '';
             $array[$i]['total'] = '';
         }
         $i++;
     }
     return view('workflow.index', compact('array', 'message', 'statuses'));
 }
Beispiel #9
0
 public static function getStatusCount()
 {
     return count(Status::all());
 }
Beispiel #10
0
 /**
  * Главная страница админки статусов организаций
  *
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function main()
 {
     return view('admin.status.main', ['statuses' => Status::all()]);
 }
 function getStatus()
 {
     return Status::all()->lists('name', 'id');
 }
 /**
  * Changes the status and priority of a ticket
  * @param  Request  $request
  */
 public function changeStatus(Request $request)
 {
     $statuses = Status::all();
     //$this->authorize('changeStatus');
     if ($request->has('data')) {
         $jsons = json_decode($request->data, false);
         // TODO: fix ugly hack for data validation (send proper json data)
         $ticketIds = array();
         $i = 0;
         foreach ($jsons as $json) {
             array_push($ticketIds, array());
             foreach ($json as $js) {
                 if (property_exists($js, 'ticketId')) {
                     // TODO: fix ugly hack
                     array_push($ticketIds[$i], $js->ticketId);
                 }
             }
             $i++;
         }
         $k = 0;
         foreach ($statuses as $status) {
             $priority = 1.0;
             foreach ($ticketIds[$k] as $ticketId) {
                 DB::table('tickets')->where('id', intval($ticketId))->update(['status_id' => $status->id, 'priority' => $priority]);
                 // TODO: replace with proper model
                 $priority = $priority - 0.01;
             }
             $k++;
         }
     }
     //$ticket->save();
 }
Beispiel #13
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return Status::all();
 }
Beispiel #14
0
 public function fetchStatus()
 {
     $json = array();
     $statuses = Status::all();
     foreach ($statuses as $status) {
         $json[] = ['id' => $status->id, 'status' => $status->status];
     }
     return json_encode($json);
 }
Beispiel #15
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // Get all statuses
     $statuses = Status::all();
     return view('statuses.index', compact('statuses'));
 }
 public function index()
 {
     //$status=Status::orderBy('solution_id','desc')->first();
     $status = Status::all();
     return view('status.status')->with('status', $status);
 }
 public function editar(Request $request, $id)
 {
     $data = Clippings::find($id);
     $editorias = Editorias::all();
     $status = Status::all();
     $fontes = Fontes::all();
     return view('sistemas.clippings.editClippings', compact('data', $data, 'editorias', $editorias, 'status', $status, 'fontes', $fontes));
 }