public function ticket_type() { $md = Masterdata::where('id', '=', $this->ticket_type_id)->get()->first(); if (!is_null($md)) { return $md->name; } }
public function run() { ////////////////////////////////////////////////////////////////////////////////// // new row should be added at the bottom. do no insert in between /////////// /////////////////////////////////////////////////////////////////////////////// DB::table('lat_long_area')->truncate(); LatLongDetails::create(array('area' => 'Sholinganallur', 'lat' => 12.894712, 'long' => 80.230402)); LatLongDetails::create(array('area' => 'Karapakam', 'lat' => 12.918059, 'long' => 80.229844)); LatLongDetails::create(array('area' => 'Navallur', 'lat' => 12.847677, 'long' => 80.224925)); LatLongDetails::create(array('area' => 'Kumaran Nagar', 'lat' => 12.876499, 'long' => 80.22698)); LatLongDetails::create(array('area' => 'Chemencherry', 'lat' => 12.858658, 'long' => 80.23048799999999)); LatLongDetails::create(array('area' => 'Ogiyyam Thoraipakkam', 'lat' => 12.945899, 'long' => 80.23936999999999)); LatLongDetails::create(array('area' => 'Mettukuppam', 'lat' => 12.939925, 'long' => 80.23596000000001)); LatLongDetails::create(array('area' => 'PTC', 'lat' => 12.933609, 'long' => 80.232879)); LatLongDetails::create(array('area' => 'Thoraipakkam', 'lat' => 12.951943, 'long' => 80.241434)); LatLongDetails::create(array('area' => 'Perungudi', 'lat' => 12.968241, 'long' => 80.241984)); LatLongDetails::create(array('area' => 'Neelankarai', 'lat' => 12.948612, 'long' => 80.254546)); LatLongDetails::create(array('area' => 'kottivakkam', 'lat' => 12.969478, 'long' => 80.258962)); LatLongDetails::create(array('area' => 'thiruvanmayur', 'lat' => 12.983187, 'long' => 80.25997599999999)); LatLongDetails::create(array('area' => 'adayar', 'lat' => 13.006565, 'long' => 80.25748299999999)); LatLongDetails::create(array('area' => 'Besant Nagar', 'lat' => 12.999359, 'long' => 80.26797999999999)); LatLongDetails::create(array('area' => 'pallavakkam', 'lat' => 12.962583, 'long' => 80.256863)); LatLongDetails::create(array('area' => 'Medavakkam', 'lat' => 12.920203, 'long' => 80.186015)); LatLongDetails::create(array('area' => 'Perumbakkam', 'lat' => 12.898582, 'long' => 80.199358)); Masterdata::create(array('name' => 'Incident', 'type' => 'Complaint', 'active' => 1)); }
public function viewStatus($id) { $name = Masterdata::where('id', '=', $id)->get()->first(); if (!is_null($name)) { return $name->name; } }
public static function statusSanityCheck($customer_id) { $message = ""; $status_list = CustomerApplicationStatus::where('customer_id', '=', $customer_id)->where('done', '=', 1)->get(); foreach ($status_list as $key => $current_status) { if ($current_status->statusName() == "fiber") { //check for splicing $splicing_check = CustomerApplicationStatus::where('customer_id', '=', $customer_id)->where('status_id', '=', Masterdata::getId("splicing", "customer_activation_process"))->first(); if (!$splicing_check->done) { $current_status->done = 0; $current_status->save(); $message .= "Splicing Should be Done before proceed to Fiber!! "; } } //check the rest of the status and add the condition if ($current_status->statusName() == "configuration") { //check for all status the is done $all_status = CustomerApplicationStatus::where('customer_id', '=', $customer_id)->lists('done'); if (in_array("0", $all_status)) { $current_status->done = 0; $current_status->save(); $message .= "All the steps has to be Done before proceed to configuration!! "; } } } if (empty($message)) { return array('status' => true); } else { return array('status' => false, 'message' => $message); } }
public static function getId($name, $type) { $id = Masterdata::where('name', '=', $name)->where('type', '=', $type)->first(); if (!is_null($id)) { return $id->id; } else { return null; } }
public function ticket($thread_id) { $data['ticket_type'] = Masterdata::where('type', '=', 'ticket_type')->get(); $data['team_type'] = Masterdata::where('type', '=', 'customer_activation_process')->get(); $data['complaints'] = Masterdata::where('type', '=', 'complaint')->get(); $data['list'] = MailSupport::where('thread_id', $thread_id)->orderBy('time', 'ASC')->get()->first(); $data['mails'] = MailSupport::where('thread_id', $thread_id)->orderBy('time', 'ASC')->get(); $data['team_list'] = Masterdata::where('type', '=', 'customer_activation_process')->get(); //return View::make('support.mailSupport.ticket', $data); return View::make('support.mailSupport.ticket1', $data); }
public function run() { ////////////////////////////////////////////////////////////////////////////////// // new row should be added at the bottom. do no insert in between /////////// /////////////////////////////////////////////////////////////////////////////// DB::table('master_data')->truncate(); Masterdata::create(array('name' => 'New Connection', 'type' => 'ticket_type', 'active' => 1)); Masterdata::create(array('name' => 'Complaint', 'type' => 'ticket_type', 'active' => 1)); Masterdata::create(array('name' => 'Open', 'type' => 'ticket_status', 'active' => 1)); Masterdata::create(array('name' => 'Closed', 'type' => 'ticket_status', 'active' => 1)); Masterdata::create(array('name' => 'Processing', 'type' => 'ticket_status', 'active' => 1)); Masterdata::create(array('name' => 'Invalid', 'type' => 'ticket_status', 'active' => 1)); Masterdata::create(array('name' => 'Trash', 'type' => 'ticket_status', 'active' => 1)); Masterdata::create(array('name' => 'Urgent', 'type' => 'ticket_priority', 'active' => 1)); Masterdata::create(array('name' => 'High', 'type' => 'ticket_priority', 'active' => 1)); Masterdata::create(array('name' => 'Medium', 'type' => 'ticket_priority', 'active' => 1)); Masterdata::create(array('name' => 'Low', 'type' => 'ticket_priority', 'active' => 1)); Masterdata::create(array('name' => 'Chennai', 'type' => 'city', 'active' => 1)); Masterdata::create(array('name' => 'OFAPL', 'type' => 'document_type', 'active' => 1)); Masterdata::create(array('name' => 'OFPHO', 'type' => 'document_type', 'active' => 1)); Masterdata::create(array('name' => 'OFPOI', 'type' => 'document_type', 'active' => 1)); Masterdata::create(array('name' => 'OFPOA', 'type' => 'document_type', 'active' => 1)); Masterdata::create(array('name' => 'fiber', 'type' => 'customer_activation_process', 'active' => 1)); Masterdata::create(array('name' => 'splicing', 'type' => 'customer_activation_process', 'active' => 1)); Masterdata::create(array('name' => 'ethernet', 'type' => 'customer_activation_process', 'active' => 1)); Masterdata::create(array('name' => 'HUT boxes', 'type' => 'customer_activation_process', 'active' => 1)); Masterdata::create(array('name' => 'configuration', 'type' => 'customer_activation_process', 'active' => 1)); Masterdata::create(array('name' => 'Sholinganaloor', 'type' => 'area', 'active' => 1)); Masterdata::create(array('name' => 'Karapakam', 'type' => 'area', 'active' => 1)); Masterdata::create(array('name' => 'Navallur', 'type' => 'area', 'active' => 1)); Masterdata::create(array('name' => 'Kumaran nager', 'type' => 'area', 'active' => 1)); Masterdata::create(array('name' => 'Chemencherry', 'type' => 'area', 'active' => 1)); Masterdata::create(array('name' => 'NewConnections Pre Request', 'type' => 'ticket_type', 'active' => 1)); Masterdata::create(array('name' => 'Technical Complaint', 'type' => 'Complaint', 'active' => 1)); Masterdata::create(array('name' => 'Billing Complaint', 'type' => 'Complaint', 'active' => 1)); }
public function ticket_type() { $md = Masterdata::where('type', '=', 'customer_activation_process')->get(); return $md; }
public function statuslist() { $statuslist = Masterdata::where('type', '=', 'ticket_status')->get(); return $statuslist; }