copy dari repo om Irfan
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class ManageSTInternal extends CI_Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('ModelProgress', 'MP');
|
||||
$this->load->model('ModelSerahTerima', 'MSt');
|
||||
$this->load->model('ModelService', 'MS');
|
||||
$this->load->model('ModelOperator', 'MO');
|
||||
$this->load->model('ModelTeknisi', 'MT');
|
||||
$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()
|
||||
{
|
||||
|
||||
$datSerahTerima = $this->MSt->getViewSTInternal();
|
||||
$datService = $this->MS->getDataService();
|
||||
$datTeknisi = $this->MT->getDataTeknisi();
|
||||
|
||||
$data = [
|
||||
'sidebar' => "data serahterima service",
|
||||
'navChild' => "data serahterima internal",
|
||||
'serahterima' => $datSerahTerima,
|
||||
'service' => $datService,
|
||||
'teknisi' => $datTeknisi
|
||||
];
|
||||
|
||||
$this->load->view('master/STInternal', $data);
|
||||
}
|
||||
|
||||
public function edit()
|
||||
{
|
||||
$method = $this->input->post('method');
|
||||
$id_progress = $this->input->post('id_progress');
|
||||
|
||||
$updateprogress = [
|
||||
'STATUS_PROGRESS' => "SELESAI SERVICE",
|
||||
'SS_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('ManageSTInternal');
|
||||
} else {
|
||||
$this->session->set_flashdata('flashgagal', 'diproses');
|
||||
redirect('ManageSTInternal');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user