load->model('ModelProgress', 'MP'); $this->load->model('ModelService', 'MS'); $this->load->model('ModelOperator', 'MO'); $this->load->model('ModelTeknisi', 'MT'); $this->load->model('ModelAdminGudang', 'MAG'); $this->load->library(['datatables', 'form_validation']); $this->form_validation->set_error_delimiters('', ''); } public function output_json($data, $encode = true) { if ($encode) $data = json_encode($data); $this->output->set_content_type('application/json')->set_output($data); } public function index() { $datKonfirmasi = $this->MP->getViewKonfirmasiGudang(); $datService = $this->MS->getDataService(); $datTeknisi = $this->MT->getDataAdmin(); $datAGudang = $this->MAG->getDataAdminGudang(); $data = [ 'sidebar' => "data konfirmasi service", 'navChild' => "data konfirmasi gudang", 'konfirmasi'=> $datKonfirmasi, 'service' => $datService, 'admin' => $datTeknisi, 'agudang' => $datAGudang ]; $this->load->view('master/KonfirmasiGudang', $data); } public function edit() { $method = $this->input->post('method'); $id_progress = $this->input->post('id_progress'); $id_admingudang = $this->input->post('id_admingudanged'); $updateprogress = [ 'STATUS_PROGRESS' => "DITERIMA GUDANG", 'ADMINGUDANG_ID' => $id_admingudang, 'INTERNAL_PROGRESS' => date('Y-m-d H:i:s') ]; $actionprogress = $this->MP->update('progress', $updateprogress, 'ID_PROGRESS',$id_progress); if ($actionprogress) { $this->session->set_flashdata('flash', 'diproses'); redirect('ManageKonfirmasiGudang'); } else { $this->session->set_flashdata('flashgagal', 'diproses'); redirect('ManageKonfirmasiGudang'); } } }