update
This commit is contained in:
@ -16,392 +16,398 @@ class DevicesController extends Controller
|
|||||||
{
|
{
|
||||||
public function view_devices(Request $req)
|
public function view_devices(Request $req)
|
||||||
{
|
{
|
||||||
$vhcs = Vehicles::listVehicles($req->auth);
|
$vhcs = Vehicles::listVehicles($req->auth);
|
||||||
$data = [
|
$data = [
|
||||||
'vhcs' => $vhcs,
|
"vhcs" => $vhcs,
|
||||||
];
|
];
|
||||||
return view('menu_v1.configs.devices', $data);
|
return view("menu_v1.configs.devices", $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API
|
* API
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function api_list_devices(Request $req)
|
public function api_list_devices(Request $req)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$now = time();
|
$now = time();
|
||||||
$input = [];
|
$input = [];
|
||||||
$rulesInput = [];
|
$rulesInput = [];
|
||||||
|
|
||||||
// validasi input
|
// validasi input
|
||||||
// $isValidInput = Validator::make($input, $rulesInput);
|
// $isValidInput = Validator::make($input, $rulesInput);
|
||||||
// if (!$isValidInput->passes()) {
|
// if (!$isValidInput->passes()) {
|
||||||
// $apiResp = Responses::bad_input($isValidInput->messages()->first());
|
// $apiResp = Responses::bad_input($isValidInput->messages()->first());
|
||||||
// return new Response($apiResp, $apiResp['meta']['code']);
|
// return new Response($apiResp, $apiResp['meta']['code']);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
$list = Devices::listDevices();
|
$list = Devices::listDevices();
|
||||||
foreach ($list as $key => $row) {
|
foreach ($list as $key => $row) {
|
||||||
$list[$key]->DT_RowIndex = $key + 1;
|
$list[$key]->DT_RowIndex = $key + 1;
|
||||||
$list[$key]->action = '-';
|
$list[$key]->action = "-";
|
||||||
if ($row->vhc_id == null) {
|
if ($row->vhc_id == null) {
|
||||||
$list[$key]->is_idle = 'yes';
|
$list[$key]->is_idle = "yes";
|
||||||
} else {
|
} else {
|
||||||
$list[$key]->is_idle = 'no';
|
$list[$key]->is_idle = "no";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$apiResp = Responses::success('success list devices');
|
$apiResp = Responses::success("success list devices");
|
||||||
$apiResp['count'] = count($list);
|
$apiResp["count"] = count($list);
|
||||||
$apiResp['data'] = $list;
|
$apiResp["data"] = $list;
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$apiResp = Responses::error($e->getMessage());
|
$apiResp = Responses::error($e->getMessage());
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function api_show_device(Request $req, $id)
|
public function api_show_device(Request $req, $id)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$now = time();
|
$now = time();
|
||||||
|
|
||||||
$input = [
|
$input = [
|
||||||
'id' => $id,
|
"id" => $id,
|
||||||
];
|
];
|
||||||
$rulesInput = [
|
$rulesInput = [
|
||||||
'id' => 'required|integer|not_in:0',
|
"id" => "required|integer|not_in:0",
|
||||||
];
|
];
|
||||||
|
|
||||||
// validasi input
|
// validasi input
|
||||||
$isValidInput = Validator::make($input, $rulesInput);
|
$isValidInput = Validator::make($input, $rulesInput);
|
||||||
if (!$isValidInput->passes()) {
|
if (!$isValidInput->passes()) {
|
||||||
$apiResp = Responses::bad_input($isValidInput->messages()->first());
|
$apiResp = Responses::bad_input($isValidInput->messages()->first());
|
||||||
return new Response($apiResp, $apiResp['meta']['code']);
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$device = Devices::showDeviceById($id);
|
$device = Devices::showDeviceById($id);
|
||||||
if (count($device) < 1) {
|
if (count($device) < 1) {
|
||||||
$apiResp = Responses::not_found('device not found');
|
$apiResp = Responses::not_found("device not found");
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$apiResp = Responses::success('success get detail device');
|
|
||||||
$apiResp['data'] = $device[0];
|
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
$apiResp = Responses::error($e->getMessage());
|
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function api_add_device(Request $req)
|
$apiResp = Responses::success("success get detail device");
|
||||||
{
|
$apiResp["data"] = $device[0];
|
||||||
try {
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
$now = time();
|
} catch (\Exception $e) {
|
||||||
|
$apiResp = Responses::error($e->getMessage());
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$input = [
|
public function api_add_device(Request $req)
|
||||||
'device_id' => $req->device_id,
|
{
|
||||||
'name' => $req->name,
|
try {
|
||||||
'simcard' => $req->simcard,
|
$now = time();
|
||||||
'type' => $req->type,
|
|
||||||
'status' => $req->status,
|
|
||||||
'assigned' => $req->assigned,
|
|
||||||
'vid' => $req->vid,
|
|
||||||
'available' => $req->available,
|
|
||||||
];
|
|
||||||
$rulesInput = [
|
|
||||||
'device_id' => 'required|numeric',
|
|
||||||
'name' => 'required|string',
|
|
||||||
'simcard' => 'required|numeric',
|
|
||||||
'type' => 'required|integer|not_in:0',
|
|
||||||
'status' => 'required|numeric|min:0',
|
|
||||||
'assigned' => 'required|numeric',
|
|
||||||
'vid' => 'nullable|numeric',
|
|
||||||
'available' => 'required|numeric',
|
|
||||||
];
|
|
||||||
|
|
||||||
// validasi input
|
$input = [
|
||||||
$isValidInput = Validator::make($input, $rulesInput);
|
"device_id" => $req->device_id,
|
||||||
if (!$isValidInput->passes()) {
|
"name" => $req->name,
|
||||||
$apiResp = Responses::bad_input($isValidInput->messages()->first());
|
"simcard" => $req->simcard,
|
||||||
return new Response($apiResp, $apiResp['meta']['code']);
|
"type" => $req->type,
|
||||||
}
|
"status" => $req->status,
|
||||||
|
"assigned" => $req->assigned,
|
||||||
|
"vid" => $req->vid,
|
||||||
|
"available" => $req->available,
|
||||||
|
];
|
||||||
|
$rulesInput = [
|
||||||
|
"device_id" => "required|numeric",
|
||||||
|
"name" => "required|string",
|
||||||
|
"simcard" => "required|numeric",
|
||||||
|
"type" => "required|integer|not_in:0",
|
||||||
|
"status" => "required|numeric|min:0",
|
||||||
|
"assigned" => "required|numeric",
|
||||||
|
"vid" => "nullable|numeric",
|
||||||
|
"available" => "required|numeric",
|
||||||
|
];
|
||||||
|
|
||||||
$device_id = str_pad($req->device_id, Devices::MAX_DEVICE_ID, '0', STR_PAD_LEFT);
|
// validasi input
|
||||||
if (strlen($device_id) > 16) {
|
$isValidInput = Validator::make($input, $rulesInput);
|
||||||
$apiResp = Responses::bad_request('device id maksimal 16 digit');
|
if (!$isValidInput->passes()) {
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
$apiResp = Responses::bad_input($isValidInput->messages()->first());
|
||||||
}
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
if (strlen($req->simcard) > 14) {
|
}
|
||||||
$apiResp = Responses::bad_request('simcard maksimal 14 digit');
|
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
|
||||||
}
|
|
||||||
|
|
||||||
$uniqDeviceId = Devices::getDeviceByDeviceId($device_id);
|
$device_id = str_pad($req->device_id, Devices::MAX_DEVICE_ID, "0", STR_PAD_LEFT);
|
||||||
if (count($uniqDeviceId) > 0) {
|
if (strlen($device_id) > 16) {
|
||||||
$apiResp = Responses::bad_request('device id has been used');
|
$apiResp = Responses::bad_request("Device ID must be a maximum of 16 digits");
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
}
|
}
|
||||||
$uniqSimcard = Devices::getDeviceBySimcard($req->simcard);
|
if (strlen($req->simcard) > 14) {
|
||||||
if (count($uniqSimcard) > 0) {
|
$apiResp = Responses::bad_request("SIM card number must be a maximum of 14 digits");
|
||||||
$apiResp = Responses::bad_request('simcard has been used');
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
}
|
||||||
}
|
|
||||||
|
|
||||||
DB::beginTransaction();
|
$uniqDeviceId = Devices::getDeviceByDeviceId($device_id);
|
||||||
|
if (count($uniqDeviceId) > 0) {
|
||||||
|
$apiResp = Responses::bad_request("device id has been used");
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
$uniqSimcard = Devices::getDeviceBySimcard($req->simcard);
|
||||||
|
if (count($uniqSimcard) > 0) {
|
||||||
|
$apiResp = Responses::bad_request("simcard has been used");
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
|
||||||
$insDevice = [
|
DB::beginTransaction();
|
||||||
'device_id' => $device_id,
|
|
||||||
'name' => $req->name,
|
|
||||||
'simcard' => (int)$req->simcard,
|
|
||||||
'type' => $req->type,
|
|
||||||
'is_active' => $req->status,
|
|
||||||
'is_assigned' => $req->assigned,
|
|
||||||
'is_available' => $req->available,
|
|
||||||
'crt' => $now,
|
|
||||||
'crt_by' => $req->auth->uid,
|
|
||||||
'updt' => $now,
|
|
||||||
'updt_by' => $req->auth->uid,
|
|
||||||
];
|
|
||||||
$id = Devices::addDevice($insDevice);
|
|
||||||
|
|
||||||
if ($req->assigned == Devices::IS_ASSIGNED) {
|
$insDevice = [
|
||||||
if ($req->vid == null || $req->vid == "") {
|
"device_id" => $device_id,
|
||||||
DB::rollBack();
|
"name" => $req->name,
|
||||||
$apiResp = Responses::bad_request('kendaraan belum dipilih');
|
"simcard" => (int) $req->simcard,
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
"type" => $req->type,
|
||||||
}
|
"is_active" => $req->status,
|
||||||
$vhc = Vehicles::getVehicleByDeviceId($device_id);
|
"is_assigned" => $req->assigned,
|
||||||
if (count($vhc) > 0) {
|
"is_available" => $req->available,
|
||||||
DB::rollBack();
|
"crt" => $now,
|
||||||
$apiResp = Responses::bad_request('kendaraan sudah dipasang oleh device id ' . $vhc[0]->device_id);
|
"crt_by" => $req->auth->uid,
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
"updt" => $now,
|
||||||
}
|
"updt_by" => $req->auth->uid,
|
||||||
$vhc = Vehicles::getVehicleById($req->vid);
|
];
|
||||||
if (count($vhc) > 0 && $vhc[0]->dvc_id !== 0 && $vhc[0]->device_id !== $device_id) {
|
$id = Devices::addDevice($insDevice);
|
||||||
DB::rollBack();
|
|
||||||
$apiResp = Responses::bad_request('kendaraan sudah dipasang oleh device id ' . $vhc[0]->device_id);
|
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
|
||||||
}
|
|
||||||
$vid = $req->vid;
|
|
||||||
Vehicles::updateVehicle($vid, [
|
|
||||||
'dvc_id' => $id,
|
|
||||||
'device_id' => $device_id,
|
|
||||||
'simcard' => (int)$req->simcard,
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
$vid = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$apiResp = Responses::created('success add new device');
|
if ($req->assigned == Devices::IS_ASSIGNED) {
|
||||||
|
if ($req->vid == null || $req->vid == "") {
|
||||||
|
DB::rollBack();
|
||||||
|
$apiResp = Responses::bad_request("Vehicle has not been selected");
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
$vhc = Vehicles::getVehicleByDeviceId($device_id);
|
||||||
|
if (count($vhc) > 0) {
|
||||||
|
DB::rollBack();
|
||||||
|
$apiResp = Responses::bad_request(
|
||||||
|
"The vehicle is already assigned to device ID " . $vhc[0]->device_id
|
||||||
|
);
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
$vhc = Vehicles::getVehicleById($req->vid);
|
||||||
|
if (count($vhc) > 0 && $vhc[0]->dvc_id !== 0 && $vhc[0]->device_id !== $device_id) {
|
||||||
|
DB::rollBack();
|
||||||
|
$apiResp = Responses::bad_request(
|
||||||
|
"The vehicle is already assigned to device ID " . $vhc[0]->device_id
|
||||||
|
);
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
$vid = $req->vid;
|
||||||
|
Vehicles::updateVehicle($vid, [
|
||||||
|
"dvc_id" => $id,
|
||||||
|
"device_id" => $device_id,
|
||||||
|
"simcard" => (int) $req->simcard,
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
$vid = 0;
|
||||||
|
}
|
||||||
|
|
||||||
DB::commit();
|
$apiResp = Responses::created("success add new device");
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
DB::rollBack();
|
|
||||||
$apiResp = Responses::error($e->getMessage());
|
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function api_updt_device(Request $req, $id)
|
DB::commit();
|
||||||
{
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
try {
|
} catch (\Exception $e) {
|
||||||
$now = time();
|
DB::rollBack();
|
||||||
|
$apiResp = Responses::error($e->getMessage());
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$input = [
|
public function api_updt_device(Request $req, $id)
|
||||||
'id' => $id,
|
{
|
||||||
'device_id' => $req->device_id,
|
try {
|
||||||
'name' => $req->name,
|
$now = time();
|
||||||
'simcard' => $req->simcard,
|
|
||||||
'type' => $req->type,
|
|
||||||
'status' => $req->status,
|
|
||||||
'assigned' => $req->assigned,
|
|
||||||
'vid' => $req->vid,
|
|
||||||
'available' => $req->available,
|
|
||||||
];
|
|
||||||
$rulesInput = [
|
|
||||||
'id' => 'required|integer|not_in:0',
|
|
||||||
'device_id' => 'required|numeric',
|
|
||||||
'name' => 'required|string',
|
|
||||||
'simcard' => 'required|numeric',
|
|
||||||
'type' => 'required|integer|not_in:0',
|
|
||||||
'status' => 'required|numeric',
|
|
||||||
'assigned' => 'required|numeric',
|
|
||||||
'vid' => 'nullable|numeric',
|
|
||||||
'available' => 'required|numeric',
|
|
||||||
];
|
|
||||||
|
|
||||||
// validasi input
|
$input = [
|
||||||
$isValidInput = Validator::make($input, $rulesInput);
|
"id" => $id,
|
||||||
if (!$isValidInput->passes()) {
|
"device_id" => $req->device_id,
|
||||||
$apiResp = Responses::bad_input($isValidInput->messages()->first());
|
"name" => $req->name,
|
||||||
return new Response($apiResp, $apiResp['meta']['code']);
|
"simcard" => $req->simcard,
|
||||||
}
|
"type" => $req->type,
|
||||||
|
"status" => $req->status,
|
||||||
|
"assigned" => $req->assigned,
|
||||||
|
"vid" => $req->vid,
|
||||||
|
"available" => $req->available,
|
||||||
|
];
|
||||||
|
$rulesInput = [
|
||||||
|
"id" => "required|integer|not_in:0",
|
||||||
|
"device_id" => "required|numeric",
|
||||||
|
"name" => "required|string",
|
||||||
|
"simcard" => "required|numeric",
|
||||||
|
"type" => "required|integer|not_in:0",
|
||||||
|
"status" => "required|numeric",
|
||||||
|
"assigned" => "required|numeric",
|
||||||
|
"vid" => "nullable|numeric",
|
||||||
|
"available" => "required|numeric",
|
||||||
|
];
|
||||||
|
|
||||||
$device = Devices::showDeviceById($id);
|
// validasi input
|
||||||
if (count($device) < 1) {
|
$isValidInput = Validator::make($input, $rulesInput);
|
||||||
$apiResp = Responses::not_found('device not found');
|
if (!$isValidInput->passes()) {
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
$apiResp = Responses::bad_input($isValidInput->messages()->first());
|
||||||
}
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
|
||||||
$device_id = str_pad($req->device_id, Devices::MAX_DEVICE_ID, '0', STR_PAD_LEFT);
|
$device = Devices::showDeviceById($id);
|
||||||
if (strlen($device_id) > 16) {
|
if (count($device) < 1) {
|
||||||
$apiResp = Responses::bad_request('device id maksimal 16 digit');
|
$apiResp = Responses::not_found("device not found");
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
}
|
}
|
||||||
if (strlen($req->simcard) > 14) {
|
|
||||||
$apiResp = Responses::bad_request('simcard maksimal 14 digit');
|
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
|
||||||
}
|
|
||||||
|
|
||||||
$uniqDeviceId = Devices::getDeviceByDeviceId($device_id);
|
$device_id = str_pad($req->device_id, Devices::MAX_DEVICE_ID, "0", STR_PAD_LEFT);
|
||||||
if (count($uniqDeviceId) > 0) {
|
if (strlen($device_id) > 16) {
|
||||||
$notSameUser = 1;
|
$apiResp = Responses::bad_request("Device ID must be a maximum of 16 digits");
|
||||||
foreach ($uniqDeviceId as $key => $row) {
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
if ($row->id == $id) {
|
}
|
||||||
$notSameUser = 0;
|
if (strlen($req->simcard) > 14) {
|
||||||
}
|
$apiResp = Responses::bad_request("SIM card number must be a maximum of 14 digits");
|
||||||
}
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
if ($notSameUser) {
|
}
|
||||||
$apiResp = Responses::bad_request('device id has been used');
|
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$uniqSimcard = Devices::getDeviceBySimcard($req->simcard);
|
|
||||||
if (count($uniqSimcard) > 0) {
|
|
||||||
$notSameUser = 1;
|
|
||||||
foreach ($uniqSimcard as $key => $row) {
|
|
||||||
if ($row->id == $id) {
|
|
||||||
$notSameUser = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($notSameUser) {
|
|
||||||
$apiResp = Responses::bad_request('simcard has been used');
|
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($req->status == Devices::IS_INACTIVE) {
|
$uniqDeviceId = Devices::getDeviceByDeviceId($device_id);
|
||||||
$isUsed = Vehicles::getVehicleByDeviceId($device_id);
|
if (count($uniqDeviceId) > 0) {
|
||||||
if (count($isUsed) > 0) {
|
$notSameUser = 1;
|
||||||
$apiResp = Responses::bad_request('tidak dapat mengubah menjadi nonaktif, device sedang digunakan');
|
foreach ($uniqDeviceId as $key => $row) {
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
if ($row->id == $id) {
|
||||||
}
|
$notSameUser = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if ($notSameUser) {
|
||||||
|
$apiResp = Responses::bad_request("device id has been used");
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$uniqSimcard = Devices::getDeviceBySimcard($req->simcard);
|
||||||
|
if (count($uniqSimcard) > 0) {
|
||||||
|
$notSameUser = 1;
|
||||||
|
foreach ($uniqSimcard as $key => $row) {
|
||||||
|
if ($row->id == $id) {
|
||||||
|
$notSameUser = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($notSameUser) {
|
||||||
|
$apiResp = Responses::bad_request("simcard has been used");
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DB::beginTransaction();
|
if ($req->status == Devices::IS_INACTIVE) {
|
||||||
|
$isUsed = Vehicles::getVehicleByDeviceId($device_id);
|
||||||
|
if (count($isUsed) > 0) {
|
||||||
|
$apiResp = Responses::bad_request("Cannot deactivate, the device is currently in use.");
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($device[0]->vhc_id) {
|
DB::beginTransaction();
|
||||||
Vehicles::updateVehicle($device[0]->vhc_id, [
|
|
||||||
'dvc_id' => 0,
|
|
||||||
'device_id' => str_pad(0, Devices::MAX_DEVICE_ID, '0', STR_PAD_LEFT),
|
|
||||||
'simcard' => 0,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($req->assigned == Devices::IS_ASSIGNED) {
|
if ($device[0]->vhc_id) {
|
||||||
if ($req->vid == null || $req->vid == "") {
|
Vehicles::updateVehicle($device[0]->vhc_id, [
|
||||||
DB::rollBack();
|
"dvc_id" => 0,
|
||||||
$apiResp = Responses::bad_request('kendaraan belum dipilih');
|
"device_id" => str_pad(0, Devices::MAX_DEVICE_ID, "0", STR_PAD_LEFT),
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
"simcard" => 0,
|
||||||
}
|
]);
|
||||||
$vhc = Vehicles::getVehicleById($req->vid);
|
}
|
||||||
if (count($vhc) > 0 && $vhc[0]->dvc_id !== 0 && $vhc[0]->device_id !== $device_id) {
|
|
||||||
DB::rollBack();
|
|
||||||
$apiResp = Responses::bad_request('kendaraan sudah dipasang dengan device id ' . $vhc[0]->device_id);
|
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
|
||||||
}
|
|
||||||
$vid = $req->vid;
|
|
||||||
Vehicles::updateVehicle($vid, [
|
|
||||||
'dvc_id' => $id,
|
|
||||||
'device_id' => $device_id,
|
|
||||||
'simcard' => (int)$req->simcard,
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
$vhc = Vehicles::getVehicleByDeviceId($device_id);
|
|
||||||
if (count($vhc) > 0) {
|
|
||||||
$vid = $vhc[0]->id;
|
|
||||||
Vehicles::updateVehicle($vid, [
|
|
||||||
'dvc_id' => 0,
|
|
||||||
'device_id' => str_pad(0, Devices::MAX_DEVICE_ID, '0', STR_PAD_LEFT),
|
|
||||||
'simcard' => 0,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$updtDevice = [
|
if ($req->assigned == Devices::IS_ASSIGNED) {
|
||||||
'device_id' => $req->device_id,
|
if ($req->vid == null || $req->vid == "") {
|
||||||
'name' => $req->name,
|
DB::rollBack();
|
||||||
'simcard' => (int)$req->simcard,
|
$apiResp = Responses::bad_request("Vehicle has not been selected");
|
||||||
'type' => $req->type,
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
'is_active' => $req->status,
|
}
|
||||||
'is_assigned' => $req->assigned,
|
$vhc = Vehicles::getVehicleById($req->vid);
|
||||||
'is_available' => $req->available,
|
if (count($vhc) > 0 && $vhc[0]->dvc_id !== 0 && $vhc[0]->device_id !== $device_id) {
|
||||||
'updt' => $now,
|
DB::rollBack();
|
||||||
'updt_by' => $req->auth->uid,
|
$apiResp = Responses::bad_request(
|
||||||
];
|
"This vehicle is already linked to a device " . $vhc[0]->device_id
|
||||||
Devices::updateDevice($id, $updtDevice);
|
);
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
$vid = $req->vid;
|
||||||
|
Vehicles::updateVehicle($vid, [
|
||||||
|
"dvc_id" => $id,
|
||||||
|
"device_id" => $device_id,
|
||||||
|
"simcard" => (int) $req->simcard,
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
$vhc = Vehicles::getVehicleByDeviceId($device_id);
|
||||||
|
if (count($vhc) > 0) {
|
||||||
|
$vid = $vhc[0]->id;
|
||||||
|
Vehicles::updateVehicle($vid, [
|
||||||
|
"dvc_id" => 0,
|
||||||
|
"device_id" => str_pad(0, Devices::MAX_DEVICE_ID, "0", STR_PAD_LEFT),
|
||||||
|
"simcard" => 0,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$apiResp = Responses::created('success update device');
|
$updtDevice = [
|
||||||
|
"device_id" => $req->device_id,
|
||||||
|
"name" => $req->name,
|
||||||
|
"simcard" => (int) $req->simcard,
|
||||||
|
"type" => $req->type,
|
||||||
|
"is_active" => $req->status,
|
||||||
|
"is_assigned" => $req->assigned,
|
||||||
|
"is_available" => $req->available,
|
||||||
|
"updt" => $now,
|
||||||
|
"updt_by" => $req->auth->uid,
|
||||||
|
];
|
||||||
|
Devices::updateDevice($id, $updtDevice);
|
||||||
|
|
||||||
DB::commit();
|
$apiResp = Responses::created("success update device");
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
DB::rollBack();
|
|
||||||
$apiResp = Responses::error($e->getMessage());
|
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function api_del_device(Request $req, $id)
|
DB::commit();
|
||||||
{
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
try {
|
} catch (\Exception $e) {
|
||||||
$now = time();
|
DB::rollBack();
|
||||||
|
$apiResp = Responses::error($e->getMessage());
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$input = [
|
public function api_del_device(Request $req, $id)
|
||||||
'id' => $id,
|
{
|
||||||
];
|
try {
|
||||||
$rulesInput = [
|
$now = time();
|
||||||
'id' => 'required|integer|not_in:0',
|
|
||||||
];
|
|
||||||
|
|
||||||
// validasi input
|
$input = [
|
||||||
$isValidInput = Validator::make($input, $rulesInput);
|
"id" => $id,
|
||||||
if (!$isValidInput->passes()) {
|
];
|
||||||
$apiResp = Responses::bad_input($isValidInput->messages()->first());
|
$rulesInput = [
|
||||||
return new Response($apiResp, $apiResp['meta']['code']);
|
"id" => "required|integer|not_in:0",
|
||||||
}
|
];
|
||||||
|
|
||||||
$device = Devices::showDeviceById($id);
|
// validasi input
|
||||||
if (count($device) < 1) {
|
$isValidInput = Validator::make($input, $rulesInput);
|
||||||
$apiResp = Responses::not_found('device not found');
|
if (!$isValidInput->passes()) {
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
$apiResp = Responses::bad_input($isValidInput->messages()->first());
|
||||||
}
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
|
||||||
$isUsed = Vehicles::getVehicleByDeviceId($device[0]->device_id);
|
$device = Devices::showDeviceById($id);
|
||||||
if (count($isUsed) > 0) {
|
if (count($device) < 1) {
|
||||||
$apiResp = Responses::bad_request('tidak dapat menghapus, device sedang digunakan');
|
$apiResp = Responses::not_found("Device not found");
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::beginTransaction();
|
$isUsed = Vehicles::getVehicleByDeviceId($device[0]->device_id);
|
||||||
|
if (count($isUsed) > 0) {
|
||||||
|
$apiResp = Responses::bad_request("Cannot delete, the device is currently in use");
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
|
||||||
Devices::updateDevice($id, [
|
DB::beginTransaction();
|
||||||
'dlt' => $now,
|
|
||||||
'dlt_by' => $req->auth->uid,
|
|
||||||
]);
|
|
||||||
|
|
||||||
DB::commit();
|
Devices::updateDevice($id, [
|
||||||
|
"dlt" => $now,
|
||||||
$apiResp = Responses::success('success delete device');
|
"dlt_by" => $req->auth->uid,
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
]);
|
||||||
} catch (\Exception $e) {
|
|
||||||
DB::rollBack();
|
DB::commit();
|
||||||
$apiResp = Responses::error($e->getMessage());
|
|
||||||
return (new Response($apiResp, $apiResp['meta']['code']));
|
$apiResp = Responses::success("success delete device");
|
||||||
}
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
}
|
} catch (\Exception $e) {
|
||||||
|
DB::rollBack();
|
||||||
|
$apiResp = Responses::error($e->getMessage());
|
||||||
|
return new Response($apiResp, $apiResp["meta"]["code"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -133,7 +133,7 @@
|
|||||||
Lakukan pembayaran dengan jumlah diatas</li>
|
Lakukan pembayaran dengan jumlah diatas</li>
|
||||||
<li
|
<li
|
||||||
style="font-size: 14px;color: #212B36;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
|
style="font-size: 14px;color: #212B36;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
|
||||||
Setelah transaksi berhasil, Anda akan menerima bukti pembayaran. Simpan
|
Setelah transaksi berhasil, Anda akan menerima bukti pembayaran. Save
|
||||||
bukti pembayaran.</li>
|
bukti pembayaran.</li>
|
||||||
</ol>
|
</ol>
|
||||||
<h4
|
<h4
|
||||||
|
|||||||
@ -369,7 +369,7 @@
|
|||||||
},
|
},
|
||||||
passData: function(data) {
|
passData: function(data) {
|
||||||
$('#filter-company').html(`
|
$('#filter-company').html(`
|
||||||
<option value="all" data-cptid="0" data-cptname="Semua Perusahaan">Semua Perusahaan</option>
|
<option value="all" data-cptid="0" data-cptname="Semua Perusahaan">All Company</option>
|
||||||
`);
|
`);
|
||||||
for (let iData in data) {
|
for (let iData in data) {
|
||||||
$('#filter-company').append(`
|
$('#filter-company').append(`
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-4 text-end">
|
<div class="col-4 text-end">
|
||||||
|
|
||||||
<button class="btn btn-warning btn-block btn-sm" type="submit">Simpan</button>
|
<button class="btn btn-warning btn-block btn-sm" type="submit">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1226,9 +1226,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" id="btnDelItem_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
<button type="button" id="btnDelItem_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitAddItem">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitAddItem">Save</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitUpdtItem">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitUpdtItem">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1246,7 +1246,7 @@
|
|||||||
<embed id="imgViewProofImg" src="https://i.pinimg.com/736x/a5/0e/5e/a50e5e839949d2f19271d83c12bd0abc.jpg" style="width:100%;height:100%;" />
|
<embed id="imgViewProofImg" src="https://i.pinimg.com/736x/a5/0e/5e/a50e5e839949d2f19271d83c12bd0abc.jpg" style="width:100%;height:100%;" />
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1270,7 +1270,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitDelItem" type="button" class="btn btn-sm btn-secondary">Ya, hapus</button>
|
<button id="btnSubmitDelItem" type="button" class="btn btn-sm btn-secondary">Ya, hapus</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -977,9 +977,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" id="btnDelItem_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
<button type="button" id="btnDelItem_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitAddItem">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitAddItem">Save</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitUpdtItem">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitUpdtItem">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -998,7 +998,7 @@
|
|||||||
class="img-fluid mb-3" alt="" />
|
class="img-fluid mb-3" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1022,7 +1022,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitDelItem" type="button" class="btn btn-sm btn-secondary">Ya, hapus</button>
|
<button id="btnSubmitDelItem" type="button" class="btn btn-sm btn-secondary">Ya, hapus</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1869,7 +1869,7 @@
|
|||||||
action += `
|
action += `
|
||||||
<p class="mb-0 text-muted small">Pengajuan ditolak oleh ${row.urjct_name} pada tanggal ${moment.unix(row.rjct_at).format('DD MMM YYYY HH:mm:ss')}</p>
|
<p class="mb-0 text-muted small">Pengajuan ditolak oleh ${row.urjct_name} pada tanggal ${moment.unix(row.rjct_at).format('DD MMM YYYY HH:mm:ss')}</p>
|
||||||
`;
|
`;
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
if (State.ddln_pay_type.ord_finish == row.ddln_pay_type) {
|
if (State.ddln_pay_type.ord_finish == row.ddln_pay_type) {
|
||||||
if (row.drop_chk_at != 0) {
|
if (row.drop_chk_at != 0) {
|
||||||
@ -1993,7 +1993,7 @@
|
|||||||
text += `
|
text += `
|
||||||
<p class="mb-0 text-muted text-nowrap small">Ditolak</p>
|
<p class="mb-0 text-muted text-nowrap small">Ditolak</p>
|
||||||
`;
|
`;
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
return `
|
return `
|
||||||
<p class="mb-0 text-danger text-nowrap small">Belum Dibayar</p>
|
<p class="mb-0 text-danger text-nowrap small">Belum Dibayar</p>
|
||||||
@ -2077,7 +2077,7 @@
|
|||||||
OrdAItem.toggleGroupPayPurpose('show');
|
OrdAItem.toggleGroupPayPurpose('show');
|
||||||
OrdAItem.toggleGroupSubmissionProof('show');
|
OrdAItem.toggleGroupSubmissionProof('show');
|
||||||
OrdAItem.toggleGroupFillDdln('show');
|
OrdAItem.toggleGroupFillDdln('show');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#invcToClient').on('change', function() {
|
$('#invcToClient').on('change', function() {
|
||||||
$('#add-invc_item_price').val('');
|
$('#add-invc_item_price').val('');
|
||||||
|
|||||||
@ -79,7 +79,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="" type="submit" class="btn btn-sm btn-danger">Simpan</button>
|
<button id="" type="submit" class="btn btn-sm btn-danger">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -7,8 +7,8 @@
|
|||||||
@section('customcss')
|
@section('customcss')
|
||||||
<style>
|
<style>
|
||||||
/* .select2-container {
|
/* .select2-container {
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
} */
|
} */
|
||||||
</style>
|
</style>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@ -227,8 +227,8 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" id="btnDelDevice_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
<button type="button" id="btnDelDevice_updt" class="btn btn-sm btn-warning">Delete ?</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitUpdtDevices" type="button" class="btn btn-sm btn-danger">Ubah data</button>
|
<button id="btnSubmitUpdtDevices" type="button" class="btn btn-sm btn-danger">Ubah data</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -245,7 +245,7 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
Kamu yakin ingin menghapus device
|
Kamu yakin ingin mengDelete device
|
||||||
<a href="#" class="text-danger">
|
<a href="#" class="text-danger">
|
||||||
<span id="del-device_id"></span>
|
<span id="del-device_id"></span>
|
||||||
</a>
|
</a>
|
||||||
@ -254,8 +254,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitDelDevice" type="button" class="btn btn-sm btn-secondary">Iya, hapus</button>
|
<button id="btnSubmitDelDevice" type="button" class="btn btn-sm btn-secondary">Yes, Delete</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -7,9 +7,8 @@
|
|||||||
@section('customcss')
|
@section('customcss')
|
||||||
<style>
|
<style>
|
||||||
/* .select2-container {
|
/* .select2-container {
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@ -55,8 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlNewInsurance"
|
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlNewInsurance" aria-labelledby="mdlNewInsuranceLabel" aria-hidden="true">
|
||||||
aria-labelledby="mdlNewInsuranceLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog modal-dialog-centered modal-dialog-scrollable modal-xl">
|
<div class="modal-dialog modal-dialog modal-dialog-centered modal-dialog-scrollable modal-xl">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -72,23 +70,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<label for="add-name" class="col-form-label">Nama Premi<span
|
<label for="add-name" class="col-form-label">Nama Premi<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="add-name" id="add-name" class="form-control">
|
<input type="text" name="add-name" id="add-name" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<label for="add-price" class="col-form-label">Harga Premi<span
|
<label for="add-price" class="col-form-label">Harga Premi<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="add-price" id="add-price" class="form-control">
|
<input type="text" name="add-price" id="add-price" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<label for="add-min_price" class="col-form-label">Jumlah Minimal Pertangguhan<span
|
<label for="add-min_price" class="col-form-label">Jumlah Minimal Pertangguhan<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="add-min_price" id="add-min_price" class="form-control">
|
<input type="text" name="add-min_price" id="add-min_price" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<label for="add-max_price" class="col-form-label">Jumlah Maksimal Pertangguhan<span
|
<label for="add-max_price" class="col-form-label">Jumlah Maksimal Pertangguhan<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="add-max_price" id="add-max_price" class="form-control">
|
<input type="text" name="add-max_price" id="add-max_price" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
@ -104,12 +98,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6 col-md-3">
|
<div class="col-sm-6 col-md-3">
|
||||||
<label for="add-status" class="form-label">Status<span
|
<label for="add-status" class="form-label">Status<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<div class="form-check form-switch">
|
<div class="form-check form-switch">
|
||||||
<input class="form-check-input" type="checkbox" id="add-status">
|
<input class="form-check-input" type="checkbox" id="add-status">
|
||||||
<label class="form-check-label" for="add-status"><span class="text-dark"
|
<label class="form-check-label" for="add-status"><span class="text-dark" id="add-txtStatus">Inactive</span></label>
|
||||||
id="add-txtStatus">Inactive</span></label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -124,8 +116,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlEdtInsurances"
|
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlEdtInsurances" aria-labelledby="mdlEdtInsurancesLabel" aria-hidden="true">
|
||||||
aria-labelledby="mdlEdtInsurancesLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog modal-dialog-centered modal-dialog-scrollable modal-xl">
|
<div class="modal-dialog modal-dialog modal-dialog-centered modal-dialog-scrollable modal-xl">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -141,23 +132,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<label for="updt-name" class="col-form-label">Nama Premi<span
|
<label for="updt-name" class="col-form-label">Nama Premi<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="updt-name" id="updt-name" class="form-control">
|
<input type="text" name="updt-name" id="updt-name" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<label for="updt-price" class="col-form-label">Harga Premi<span
|
<label for="updt-price" class="col-form-label">Harga Premi<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="updt-price" id="updt-price" class="form-control">
|
<input type="text" name="updt-price" id="updt-price" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<label for="updt-min_price" class="col-form-label">Jumlah Minimal Pertangguhan<span
|
<label for="updt-min_price" class="col-form-label">Jumlah Minimal Pertangguhan<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="updt-min_price" id="updt-min_price" class="form-control">
|
<input type="text" name="updt-min_price" id="updt-min_price" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<label for="updt-max_price" class="col-form-label">Jumlah Maksimal Pertangguhan<span
|
<label for="updt-max_price" class="col-form-label">Jumlah Maksimal Pertangguhan<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="updt-max_price" id="updt-max_price" class="form-control">
|
<input type="text" name="updt-max_price" id="updt-max_price" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
@ -173,12 +160,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6 col-md-3">
|
<div class="col-sm-6 col-md-3">
|
||||||
<label for="updt-status" class="form-label">Status<span
|
<label for="updt-status" class="form-label">Status<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<div class="form-check form-switch">
|
<div class="form-check form-switch">
|
||||||
<input class="form-check-input" type="checkbox" id="updt-status">
|
<input class="form-check-input" type="checkbox" id="updt-status">
|
||||||
<label class="form-check-label" for="updt-status"><span class="text-dark"
|
<label class="form-check-label" for="updt-status"><span class="text-dark" id="updt-txtStatus">Inactive</span></label>
|
||||||
id="updt-txtStatus">Inactive</span></label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -187,15 +172,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" id="btnDelInsurance_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
<button type="button" id="btnDelInsurance_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitEdtInsurances" type="button" class="btn btn-sm btn-danger">Ubah data</button>
|
<button id="btnSubmitEdtInsurances" type="button" class="btn btn-sm btn-danger">Ubah data</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlDelInsurance"
|
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlDelInsurance" aria-labelledby="mdlDelInsuranceLabel" aria-hidden="true">
|
||||||
aria-labelledby="mdlDelInsuranceLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered modal-sm">
|
<div class="modal-dialog modal-dialog-centered modal-sm">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -214,7 +198,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitDelInsurance" type="button" class="btn btn-sm btn-secondary">Iya, hapus</button>
|
<button id="btnSubmitDelInsurance" type="button" class="btn btn-sm btn-secondary">Iya, hapus</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -44,8 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlEdtInsurances"
|
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlEdtInsurances" aria-labelledby="mdlEdtInsurancesLabel" aria-hidden="true">
|
||||||
aria-labelledby="mdlEdtInsurancesLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog modal-dialog-centered modal-dialog-scrollable modal-sm">
|
<div class="modal-dialog modal-dialog modal-dialog-centered modal-dialog-scrollable modal-sm">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -60,16 +59,15 @@
|
|||||||
<h6>Data Premi</h6>
|
<h6>Data Premi</h6>
|
||||||
</div> --}}
|
</div> --}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{-- <div class="col-sm-12">
|
{{-- <div class="col-sm-12">
|
||||||
<label for="updt-desc" class="col-form-label">Deskripsi</label>
|
<label for="updt-desc" class="col-form-label">Deskripsi</label>
|
||||||
<textarea name="updt-desc" id="updt-desc" class="form-control"></textarea>
|
<textarea name="updt-desc" id="updt-desc" class="form-control"></textarea>
|
||||||
</div> --}}
|
</div> --}}
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<label for="updt-amt_percent" class="col-form-label">Percent dari nilai pertangguhan<span
|
<label for="updt-amt_percent" class="col-form-label">Percent dari nilai pertangguhan<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="updt-amt_percent" id="updt-amt_percent" class="form-control">
|
<input type="text" name="updt-amt_percent" id="updt-amt_percent" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
{{-- <div class="col-sm-12">
|
{{-- <div class="col-sm-12">
|
||||||
<label for="updt-amt_flat" class="col-form-label">Percent<span
|
<label for="updt-amt_flat" class="col-form-label">Percent<span
|
||||||
class="text-danger">*</span></label>
|
class="text-danger">*</span></label>
|
||||||
<input type="text" name="updt-amt_flat" id="updt-amt_flat" class="form-control">
|
<input type="text" name="updt-amt_flat" id="updt-amt_flat" class="form-control">
|
||||||
@ -97,7 +95,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
{{-- <button type="button" id="btnDelInsurance_updt" class="btn btn-sm btn-warning">Hapus ?</button> --}}
|
{{-- <button type="button" id="btnDelInsurance_updt" class="btn btn-sm btn-warning">Hapus ?</button> --}}
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitEdtInsurances" type="button" class="btn btn-sm btn-danger">Ubah data</button>
|
<button id="btnSubmitEdtInsurances" type="button" class="btn btn-sm btn-danger">Ubah data</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -200,7 +198,7 @@
|
|||||||
$(td).attr('data-desc', rowData.desc);
|
$(td).attr('data-desc', rowData.desc);
|
||||||
$(td).attr('data-amt_percent', rowData.amt_percent);
|
$(td).attr('data-amt_percent', rowData.amt_percent);
|
||||||
},
|
},
|
||||||
render: function(data, type, row, meta) {
|
render: function(data, type, row, meta) {
|
||||||
if (!data) return '-';
|
if (!data) return '-';
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
@ -211,11 +209,11 @@
|
|||||||
visible: true,
|
visible: true,
|
||||||
orderable: true,
|
orderable: true,
|
||||||
searchable: true,
|
searchable: true,
|
||||||
render: function(data, type, row, meta) {
|
render: function(data, type, row, meta) {
|
||||||
return data + '%';
|
return data + '%';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// data: 'amt_flat',
|
// data: 'amt_flat',
|
||||||
// className: 'text-end text-nowrap',
|
// className: 'text-end text-nowrap',
|
||||||
// visible: true,
|
// visible: true,
|
||||||
@ -265,8 +263,8 @@
|
|||||||
// button
|
// button
|
||||||
$('#btnSubmitEdtInsurances').on('click', function() {
|
$('#btnSubmitEdtInsurances').on('click', function() {
|
||||||
let data = AUpdt.getData();
|
let data = AUpdt.getData();
|
||||||
let isValid = AUpdt.checkData(data);
|
let isValid = AUpdt.checkData(data);
|
||||||
if (!isValid) return false;
|
if (!isValid) return false;
|
||||||
AUpdt.submitData(data);
|
AUpdt.submitData(data);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -311,7 +309,7 @@
|
|||||||
passDataToView: async function(data) {
|
passDataToView: async function(data) {
|
||||||
// $('#updt-desc').val(data.desc);
|
// $('#updt-desc').val(data.desc);
|
||||||
|
|
||||||
$('#updt-amt_percent').val(data.amt_percent);
|
$('#updt-amt_percent').val(data.amt_percent);
|
||||||
// $('#updt-amt_flat').val((new Intl.NumberFormat('id-ID').format(data.amt_flat)));
|
// $('#updt-amt_flat').val((new Intl.NumberFormat('id-ID').format(data.amt_flat)));
|
||||||
|
|
||||||
// if (data.is_active == State.stts_isact.active) {
|
// if (data.is_active == State.stts_isact.active) {
|
||||||
@ -329,7 +327,7 @@
|
|||||||
|
|
||||||
data.amt_percent = Number($('#updt-amt_percent').val());
|
data.amt_percent = Number($('#updt-amt_percent').val());
|
||||||
// data.desc = $('#updt-desc').val();
|
// data.desc = $('#updt-desc').val();
|
||||||
data.desc = data.amt_percent + '% dari nilai pertangguhan';
|
data.desc = data.amt_percent + '% dari nilai pertangguhan';
|
||||||
// data.amt_flat = $('#updt-amt_flat').val().split('.').join('');
|
// data.amt_flat = $('#updt-amt_flat').val().split('.').join('');
|
||||||
|
|
||||||
// if ($('#updt-status').prop('checked')) {
|
// if ($('#updt-status').prop('checked')) {
|
||||||
@ -340,7 +338,7 @@
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
checkData: function(data, isAlert = true) {
|
checkData: function(data, isAlert = true) {
|
||||||
if (data.amt_percent < 1 || isNaN(data.amt_percent)) {
|
if (data.amt_percent < 1 || isNaN(data.amt_percent)) {
|
||||||
if (isAlert) Helper.toast('Warning', 'just now', 'Percent tidak valid');
|
if (isAlert) Helper.toast('Warning', 'just now', 'Percent tidak valid');
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
@extends('app.app')
|
@extends('app.app')
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$no_permission = App\Models\UsersMenuPermissions::IS_NOPERMISSION;
|
$no_permission = App\Models\UsersMenuPermissions::IS_NOPERMISSION;
|
||||||
$no_permission_text = 'Ditolak';
|
$no_permission_text = 'Ditolak';
|
||||||
$is_permission = App\Models\UsersMenuPermissions::IS_PERMISSION;
|
$is_permission = App\Models\UsersMenuPermissions::IS_PERMISSION;
|
||||||
$is_permission_text = 'Diizinkan';
|
$is_permission_text = 'Diizinkan';
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
@ -12,11 +12,11 @@ $is_permission_text = 'Diizinkan';
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('customcss')
|
@section('customcss')
|
||||||
<style>
|
<style>
|
||||||
th {
|
th {
|
||||||
border: 1px solid #bbb;
|
border: 1px solid #bbb;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@ -80,8 +80,7 @@ $is_permission_text = 'Diizinkan';
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlNewPermission"
|
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlNewPermission" aria-labelledby="mdlNewPermissionLabel" aria-hidden="true">
|
||||||
aria-labelledby="mdlNewPermissionLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -110,87 +109,87 @@ $is_permission_text = 'Diizinkan';
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="add-menu_trx" class="col-form-label">Menu Transaksi<span class="text-danger">*</span></label>
|
<label for="add-menu_trx" class="col-form-label">Menu Transaksi<span class="text-danger">*</span></label>
|
||||||
<select name="add-menu_trx" id="add-menu_trx" class="form-control" style="width:100%;">
|
<select name="add-menu_trx" id="add-menu_trx" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="add-menu_company" class="col-form-label">Menu Perusahaan<span class="text-danger">*</span></label>
|
<label for="add-menu_company" class="col-form-label">Menu Perusahaan<span class="text-danger">*</span></label>
|
||||||
<select name="add-menu_company" id="add-menu_company" class="form-control" style="width:100%;">
|
<select name="add-menu_company" id="add-menu_company" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="add-menu_zone" class="col-form-label">Menu Zona<span class="text-danger">*</span></label>
|
<label for="add-menu_zone" class="col-form-label">Menu Zona<span class="text-danger">*</span></label>
|
||||||
<select name="add-menu_zone" id="add-menu_zone" class="form-control" style="width:100%;">
|
<select name="add-menu_zone" id="add-menu_zone" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="add-menu_users" class="col-form-label">Menu Pengguna<span class="text-danger">*</span></label>
|
<label for="add-menu_users" class="col-form-label">Menu Pengguna<span class="text-danger">*</span></label>
|
||||||
<select name="add-menu_users" id="add-menu_users" class="form-control" style="width:100%;">
|
<select name="add-menu_users" id="add-menu_users" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="add-menu_conf_rates" class="col-form-label">Menu Konfigurasi Harga<span class="text-danger">*</span></label>
|
<label for="add-menu_conf_rates" class="col-form-label">Menu Konfigurasi Harga<span class="text-danger">*</span></label>
|
||||||
<select name="add-menu_conf_rates" id="add-menu_conf_rates" class="form-control" style="width:100%;">
|
<select name="add-menu_conf_rates" id="add-menu_conf_rates" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="add-menu_conf_insurance" class="col-form-label">Menu Konfigurasi Asuransi<span class="text-danger">*</span></label>
|
<label for="add-menu_conf_insurance" class="col-form-label">Menu Konfigurasi Asuransi<span class="text-danger">*</span></label>
|
||||||
<select name="add-menu_conf_insurance" id="add-menu_conf_insurance" class="form-control" style="width:100%;">
|
<select name="add-menu_conf_insurance" id="add-menu_conf_insurance" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="add-menu_conf_truck_type" class="col-form-label">Menu Konfigurasi Tipe Kendaraan<span class="text-danger">*</span></label>
|
<label for="add-menu_conf_truck_type" class="col-form-label">Menu Konfigurasi Tipe Kendaraan<span class="text-danger">*</span></label>
|
||||||
<select name="add-menu_conf_truck_type" id="add-menu_conf_truck_type" class="form-control" style="width:100%;">
|
<select name="add-menu_conf_truck_type" id="add-menu_conf_truck_type" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="add-menu_devices" class="col-form-label">Menu Konfigurasi Master Devices<span class="text-danger">*</span></label>
|
<label for="add-menu_devices" class="col-form-label">Menu Konfigurasi Master Devices<span class="text-danger">*</span></label>
|
||||||
<select name="add-menu_devices" id="add-menu_devices" class="form-control" style="width:100%;">
|
<select name="add-menu_devices" id="add-menu_devices" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="add-menu_logs_devices" class="col-form-label">Menu Konfigurasi Daftar GPS<span class="text-danger">*</span></label>
|
<label for="add-menu_logs_devices" class="col-form-label">Menu Konfigurasi Daftar GPS<span class="text-danger">*</span></label>
|
||||||
<select name="add-menu_logs_devices" id="add-menu_logs_devices" class="form-control" style="width:100%;">
|
<select name="add-menu_logs_devices" id="add-menu_logs_devices" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="add-menu_conf_adt_items" class="col-form-label">Menu Konfigurasi Additional Items<span class="text-danger">*</span></label>
|
<label for="add-menu_conf_adt_items" class="col-form-label">Menu Konfigurasi Additional Items<span class="text-danger">*</span></label>
|
||||||
<select name="add-menu_conf_adt_items" id="add-menu_conf_adt_items" class="form-control" style="width:100%;">
|
<select name="add-menu_conf_adt_items" id="add-menu_conf_adt_items" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="add-menu_drivers" class="col-form-label">Menu Pengemudi<span class="text-danger">*</span></label>
|
<label for="add-menu_drivers" class="col-form-label">Menu Pengemudi<span class="text-danger">*</span></label>
|
||||||
<select name="add-menu_drivers" id="add-menu_drivers" class="form-control" style="width:100%;">
|
<select name="add-menu_drivers" id="add-menu_drivers" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="add-menu_vehicles" class="col-form-label">Menu Kendaraan<span class="text-danger">*</span></label>
|
<label for="add-menu_vehicles" class="col-form-label">Menu Kendaraan<span class="text-danger">*</span></label>
|
||||||
<select name="add-menu_vehicles" id="add-menu_vehicles" class="form-control" style="width:100%;">
|
<select name="add-menu_vehicles" id="add-menu_vehicles" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -255,8 +254,7 @@ $is_permission_text = 'Diizinkan';
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlUpdtPermission"
|
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlUpdtPermission" aria-labelledby="mdlUpdtPermissionLabel" aria-hidden="true">
|
||||||
aria-labelledby="mdlUpdtPermissionLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -285,87 +283,87 @@ $is_permission_text = 'Diizinkan';
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="updt-menu_trx" class="col-form-label">Menu Transaksi<span class="text-danger">*</span></label>
|
<label for="updt-menu_trx" class="col-form-label">Menu Transaksi<span class="text-danger">*</span></label>
|
||||||
<select name="updt-menu_trx" id="updt-menu_trx" class="form-control" style="width:100%;">
|
<select name="updt-menu_trx" id="updt-menu_trx" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="updt-menu_company" class="col-form-label">Menu Perusahaan<span class="text-danger">*</span></label>
|
<label for="updt-menu_company" class="col-form-label">Menu Perusahaan<span class="text-danger">*</span></label>
|
||||||
<select name="updt-menu_company" id="updt-menu_company" class="form-control" style="width:100%;">
|
<select name="updt-menu_company" id="updt-menu_company" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="updt-menu_zone" class="col-form-label">Menu Zona<span class="text-danger">*</span></label>
|
<label for="updt-menu_zone" class="col-form-label">Menu Zona<span class="text-danger">*</span></label>
|
||||||
<select name="updt-menu_zone" id="updt-menu_zone" class="form-control" style="width:100%;">
|
<select name="updt-menu_zone" id="updt-menu_zone" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="updt-menu_users" class="col-form-label">Menu Pengguna<span class="text-danger">*</span></label>
|
<label for="updt-menu_users" class="col-form-label">Menu Pengguna<span class="text-danger">*</span></label>
|
||||||
<select name="updt-menu_users" id="updt-menu_users" class="form-control" style="width:100%;">
|
<select name="updt-menu_users" id="updt-menu_users" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="updt-menu_conf_rates" class="col-form-label">Menu Konfigurasi Harga<span class="text-danger">*</span></label>
|
<label for="updt-menu_conf_rates" class="col-form-label">Menu Konfigurasi Harga<span class="text-danger">*</span></label>
|
||||||
<select name="updt-menu_conf_rates" id="updt-menu_conf_rates" class="form-control" style="width:100%;">
|
<select name="updt-menu_conf_rates" id="updt-menu_conf_rates" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="updt-menu_conf_insurance" class="col-form-label">Menu Konfigurasi Asuransi<span class="text-danger">*</span></label>
|
<label for="updt-menu_conf_insurance" class="col-form-label">Menu Konfigurasi Asuransi<span class="text-danger">*</span></label>
|
||||||
<select name="updt-menu_conf_insurance" id="updt-menu_conf_insurance" class="form-control" style="width:100%;">
|
<select name="updt-menu_conf_insurance" id="updt-menu_conf_insurance" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="updt-menu_conf_truck_type" class="col-form-label">Menu Konfigurasi Tipe Kendaraan<span class="text-danger">*</span></label>
|
<label for="updt-menu_conf_truck_type" class="col-form-label">Menu Konfigurasi Tipe Kendaraan<span class="text-danger">*</span></label>
|
||||||
<select name="updt-menu_conf_truck_type" id="updt-menu_conf_truck_type" class="form-control" style="width:100%;">
|
<select name="updt-menu_conf_truck_type" id="updt-menu_conf_truck_type" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="updt-menu_devices" class="col-form-label">Menu Konfigurasi Master Devices<span class="text-danger">*</span></label>
|
<label for="updt-menu_devices" class="col-form-label">Menu Konfigurasi Master Devices<span class="text-danger">*</span></label>
|
||||||
<select name="updt-menu_devices" id="updt-menu_devices" class="form-control" style="width:100%;">
|
<select name="updt-menu_devices" id="updt-menu_devices" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="updt-menu_logs_devices" class="col-form-label">Menu Konfigurasi Daftar GPS<span class="text-danger">*</span></label>
|
<label for="updt-menu_logs_devices" class="col-form-label">Menu Konfigurasi Daftar GPS<span class="text-danger">*</span></label>
|
||||||
<select name="updt-menu_logs_devices" id="updt-menu_logs_devices" class="form-control" style="width:100%;">
|
<select name="updt-menu_logs_devices" id="updt-menu_logs_devices" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="updt-menu_conf_adt_items" class="col-form-label">Menu Konfigurasi Additional Items<span class="text-danger">*</span></label>
|
<label for="updt-menu_conf_adt_items" class="col-form-label">Menu Konfigurasi Additional Items<span class="text-danger">*</span></label>
|
||||||
<select name="updt-menu_conf_adt_items" id="updt-menu_conf_adt_items" class="form-control" style="width:100%;">
|
<select name="updt-menu_conf_adt_items" id="updt-menu_conf_adt_items" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="updt-menu_drivers" class="col-form-label">Menu Pengemudi<span class="text-danger">*</span></label>
|
<label for="updt-menu_drivers" class="col-form-label">Menu Pengemudi<span class="text-danger">*</span></label>
|
||||||
<select name="updt-menu_drivers" id="updt-menu_drivers" class="form-control" style="width:100%;">
|
<select name="updt-menu_drivers" id="updt-menu_drivers" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<label for="updt-menu_vehicles" class="col-form-label">Menu Kendaraan<span class="text-danger">*</span></label>
|
<label for="updt-menu_vehicles" class="col-form-label">Menu Kendaraan<span class="text-danger">*</span></label>
|
||||||
<select name="updt-menu_vehicles" id="updt-menu_vehicles" class="form-control" style="width:100%;">
|
<select name="updt-menu_vehicles" id="updt-menu_vehicles" class="form-control" style="width:100%;">
|
||||||
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
<option value="{{ $no_permission }}">{{ $no_permission_text }}</option>
|
||||||
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
<option value="{{ $is_permission }}">{{ $is_permission_text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -424,15 +422,14 @@ $is_permission_text = 'Diizinkan';
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" id="btnDelPer_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
<button type="button" id="btnDelPer_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitUpdtPer" type="button" class="btn btn-sm btn-danger">Ubah data</button>
|
<button id="btnSubmitUpdtPer" type="button" class="btn btn-sm btn-danger">Ubah data</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlDelPer"
|
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlDelPer" aria-labelledby="mdlDelPerLabel" aria-hidden="true">
|
||||||
aria-labelledby="mdlDelPerLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered modal-sm">
|
<div class="modal-dialog modal-dialog-centered modal-sm">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -451,7 +448,7 @@ $is_permission_text = 'Diizinkan';
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitDelPer" type="button" class="btn btn-sm btn-secondary">Iya, hapus</button>
|
<button id="btnSubmitDelPer" type="button" class="btn btn-sm btn-secondary">Iya, hapus</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -500,11 +497,11 @@ $is_permission_text = 'Diizinkan';
|
|||||||
else
|
else
|
||||||
$('#updt-txtStatus').html('Inactive')
|
$('#updt-txtStatus').html('Inactive')
|
||||||
});
|
});
|
||||||
// fix modal select2
|
// fix modal select2
|
||||||
$('#add-type').select2({
|
$('#add-type').select2({
|
||||||
dropdownParent: $('#mdlNewPermission'),
|
dropdownParent: $('#mdlNewPermission'),
|
||||||
});
|
});
|
||||||
$('#updt-type').select2({
|
$('#updt-type').select2({
|
||||||
dropdownParent: $('#mdlUpdtPermission'),
|
dropdownParent: $('#mdlUpdtPermission'),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -571,7 +568,7 @@ $is_permission_text = 'Diizinkan';
|
|||||||
$(td).attr('data-name', rowData.name);
|
$(td).attr('data-name', rowData.name);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'is_trx',
|
data: 'is_trx',
|
||||||
className: 'text-nowrap',
|
className: 'text-nowrap',
|
||||||
visible: true,
|
visible: true,
|
||||||
@ -816,7 +813,7 @@ $is_permission_text = 'Diizinkan';
|
|||||||
getData: function() {
|
getData: function() {
|
||||||
let data = {};
|
let data = {};
|
||||||
|
|
||||||
$.map($('#formNewPermission').serializeArray(), function(n, i){
|
$.map($('#formNewPermission').serializeArray(), function(n, i) {
|
||||||
let key = n['name'].replace('add-', '');
|
let key = n['name'].replace('add-', '');
|
||||||
data[key] = n['value'];
|
data[key] = n['value'];
|
||||||
});
|
});
|
||||||
@ -976,7 +973,7 @@ $is_permission_text = 'Diizinkan';
|
|||||||
let data = {};
|
let data = {};
|
||||||
data.id = $('#mdlUpdtPermission').data('id');
|
data.id = $('#mdlUpdtPermission').data('id');
|
||||||
|
|
||||||
$.map($('#formUpdtPermission').serializeArray(), function(n, i){
|
$.map($('#formUpdtPermission').serializeArray(), function(n, i) {
|
||||||
let key = n['name'].replace('updt-', '');
|
let key = n['name'].replace('updt-', '');
|
||||||
data[key] = n['value'];
|
data[key] = n['value'];
|
||||||
});
|
});
|
||||||
@ -1056,7 +1053,7 @@ $is_permission_text = 'Diizinkan';
|
|||||||
let name = row.find('td[data-name]').data('name');
|
let name = row.find('td[data-name]').data('name');
|
||||||
PerDel.passDataToView({
|
PerDel.passDataToView({
|
||||||
id,
|
id,
|
||||||
name,
|
name,
|
||||||
});
|
});
|
||||||
$('#mdlDelPer').data('id', id);
|
$('#mdlDelPer').data('id', id);
|
||||||
$('#mdlDelPer').modal('show');
|
$('#mdlDelPer').modal('show');
|
||||||
@ -1069,7 +1066,10 @@ $is_permission_text = 'Diizinkan';
|
|||||||
});
|
});
|
||||||
// on modal update
|
// on modal update
|
||||||
$('#btnDelPer_updt').on('click', function(e) {
|
$('#btnDelPer_updt').on('click', function(e) {
|
||||||
const { id, name } = PerUpdt.getData();
|
const {
|
||||||
|
id,
|
||||||
|
name
|
||||||
|
} = PerUpdt.getData();
|
||||||
PerDel.passDataToView({
|
PerDel.passDataToView({
|
||||||
id,
|
id,
|
||||||
name,
|
name,
|
||||||
|
|||||||
@ -98,7 +98,7 @@
|
|||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">Close</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -154,7 +154,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitMergeItem" type="button" class="btn btn-sm btn-warning">Ya, merge</button>
|
<button id="btnSubmitMergeItem" type="button" class="btn btn-sm btn-warning">Ya, merge</button>
|
||||||
<div id="btnSubmitMergeItem-loader" class="d-none">
|
<div id="btnSubmitMergeItem-loader" class="d-none">
|
||||||
<div class="spinner-border" role="status">
|
<div class="spinner-border" role="status">
|
||||||
|
|||||||
@ -11,18 +11,18 @@
|
|||||||
@section('customcss')
|
@section('customcss')
|
||||||
<style>
|
<style>
|
||||||
/* .select2-container {
|
/* .select2-container {
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
/* .landscape-photo {
|
/* .landscape-photo {
|
||||||
max-height: max(21vh, 210px);
|
max-height: max(21vh, 210px);
|
||||||
} */
|
} */
|
||||||
|
|
||||||
/* .thumb-img-table {
|
/* .thumb-img-table {
|
||||||
width: max(4vw, 75px);
|
width: max(4vw, 75px);
|
||||||
height: max(4vh, 55px);
|
height: max(4vh, 55px);
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
} */
|
} */
|
||||||
</style>
|
</style>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@ -1523,8 +1523,8 @@
|
|||||||
let fileSize = window.atob(pureDataURL).length // in Byte
|
let fileSize = window.atob(pureDataURL).length // in Byte
|
||||||
// (fileSize/1000) + ' Kb'
|
// (fileSize/1000) + ' Kb'
|
||||||
$('#add-group_' + x + '_spinner').addClass('d-none');
|
$('#add-group_' + x + '_spinner').addClass('d-none');
|
||||||
$('#add-' + x + '-status').html('Compressed')
|
// $('#add-' + x + '-status').html('Compressed')
|
||||||
$('#add-' + x + '-filesize').html('<samp>(' + fileSize / 1000 + ' Kb)</samp>')
|
// $('#add-' + x + '-filesize').html('<samp>(' + fileSize / 1000 + ' Kb)</samp>')
|
||||||
$('#add-' + x + '-img').attr('src', res.data)
|
$('#add-' + x + '-img').attr('src', res.data)
|
||||||
$('#add-' + x + '-img').removeClass('d-none');
|
$('#add-' + x + '-img').removeClass('d-none');
|
||||||
$('#add-' + x + '-base64').val(res.data)
|
$('#add-' + x + '-base64').val(res.data)
|
||||||
@ -1597,7 +1597,7 @@
|
|||||||
DUploadAdd.readFile(reader, newFile);
|
DUploadAdd.readFile(reader, newFile);
|
||||||
|
|
||||||
$('#add-' + x + '-filesize').html('')
|
$('#add-' + x + '-filesize').html('')
|
||||||
$('#add-' + x + '-status').html('Loading on compressing...')
|
// $('#add-' + x + '-status').html('Loading on compressing...')
|
||||||
// $('#add-' + x + '-img').attr('src', '')
|
// $('#add-' + x + '-img').attr('src', '')
|
||||||
$('#add-' + x + '-base64').val('')
|
$('#add-' + x + '-base64').val('')
|
||||||
} else {
|
} else {
|
||||||
@ -1751,8 +1751,8 @@
|
|||||||
let fileSize = window.atob(pureDataURL).length // in Byte
|
let fileSize = window.atob(pureDataURL).length // in Byte
|
||||||
// (fileSize/1000) + ' Kb'
|
// (fileSize/1000) + ' Kb'
|
||||||
$('#edt-group_' + x + '_spinner').addClass('d-none');
|
$('#edt-group_' + x + '_spinner').addClass('d-none');
|
||||||
$('#edt-' + x + '-status').html('Compressed')
|
// $('#edt-' + x + '-status').html('Compressed')
|
||||||
$('#edt-' + x + '-filesize').html('<samp>(' + fileSize / 1000 + ' Kb)</samp>')
|
// $('#edt-' + x + '-filesize').html('<samp>(' + fileSize / 1000 + ' Kb)</samp>')
|
||||||
$('#edt-' + x + '-img').attr('src', res.data)
|
$('#edt-' + x + '-img').attr('src', res.data)
|
||||||
$('#edt-' + x + '-img').removeClass('d-none');
|
$('#edt-' + x + '-img').removeClass('d-none');
|
||||||
$('#edt-' + x + '-base64').val(res.data)
|
$('#edt-' + x + '-base64').val(res.data)
|
||||||
@ -1825,7 +1825,7 @@
|
|||||||
DUploadEdt.readFile(reader, newFile);
|
DUploadEdt.readFile(reader, newFile);
|
||||||
|
|
||||||
$('#edt-' + x + '-filesize').html('')
|
$('#edt-' + x + '-filesize').html('')
|
||||||
$('#edt-' + x + '-status').html('Loading on compressing...')
|
// $('#edt-' + x + '-status').html('Loading on compressing...')
|
||||||
// $('#edt-' + x + '-img').attr('src', '')
|
// $('#edt-' + x + '-img').attr('src', '')
|
||||||
$('#edt-' + x + '-base64').val('')
|
$('#edt-' + x + '-base64').val('')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -838,7 +838,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -927,7 +927,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" id="btnSubmitAccident" class="btn btn-sm btn-primary">Kirim</button>
|
<button type="button" id="btnSubmitAccident" class="btn btn-sm btn-primary">Kirim</button>
|
||||||
<div id="btnSubmitAccidentSpinner" class="d-none">
|
<div id="btnSubmitAccidentSpinner" class="d-none">
|
||||||
<div class="spinner-border" role="status">
|
<div class="spinner-border" role="status">
|
||||||
@ -1100,7 +1100,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" id="btnSubmitPck" class="btn btn-sm btn-primary">Kirim</button>
|
<button type="button" id="btnSubmitPck" class="btn btn-sm btn-primary">Kirim</button>
|
||||||
<div id="btnSubmitPckSpinner" class="d-none">
|
<div id="btnSubmitPckSpinner" class="d-none">
|
||||||
<div class="spinner-border" role="status">
|
<div class="spinner-border" role="status">
|
||||||
@ -1208,7 +1208,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" id="btnSubmitDrop" class="btn btn-sm btn-primary">Kirim</button>
|
<button type="button" id="btnSubmitDrop" class="btn btn-sm btn-primary">Kirim</button>
|
||||||
<div id="btnSubmitDropSpinner" class="d-none">
|
<div id="btnSubmitDropSpinner" class="d-none">
|
||||||
<div class="spinner-border" role="status">
|
<div class="spinner-border" role="status">
|
||||||
@ -1247,7 +1247,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" id="btnSubmitAprvPck" class="btn btn-sm btn-primary" disabled>Setujui</button>
|
<button type="button" id="btnSubmitAprvPck" class="btn btn-sm btn-primary" disabled>Setujui</button>
|
||||||
<div id="btnSubmitAprvPckSpinner" class="d-none">
|
<div id="btnSubmitAprvPckSpinner" class="d-none">
|
||||||
<div class="spinner-border" role="status">
|
<div class="spinner-border" role="status">
|
||||||
|
|||||||
@ -7,54 +7,54 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p class="text-dark text-bold mb-2">Konfigurasi Dana</p>
|
<p class="text-dark text-bold mb-2">Konfigurasi Dana</p>
|
||||||
<p class="mb-2 border-bottom"></p>
|
<p class="mb-2 border-bottom"></p>
|
||||||
<form id="formDanaUpdt">
|
<form id="formDanaUpdt">
|
||||||
<div class="form-group mb-3 d-none">
|
<div class="form-group mb-3 d-none">
|
||||||
<label for="dana_id" class="form-label">Saldo Dana <span class="text-danger">*</span></label>
|
<label for="dana_id" class="form-label">Saldo Dana <span class="text-danger">*</span></label>
|
||||||
<input type="number" id="dana_id" name="dana_id" class="form-control" value="{{ $dana->id }}" required />
|
<input type="number" id="dana_id" name="dana_id" class="form-control" value="{{ $dana->id }}" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group mb-3">
|
<div class="form-group mb-3">
|
||||||
<label for="amt" class="form-label">Saldo Dana <span class="text-danger">*</span></label>
|
<label for="amt" class="form-label">Saldo Dana <span class="text-danger">*</span></label>
|
||||||
<input type="text" id="amt" name="amt" class="form-control" value="{{ $dana->amt }}" required />
|
<input type="text" id="amt" name="amt" class="form-control" value="{{ $dana->amt }}" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group mb-3 text-end">
|
<div class="form-group mb-3 text-end">
|
||||||
<button type="button" id="btnUpdtDana" class="btn btn-sm btn-primary">Simpan</button>
|
<button type="button" id="btnUpdtDana" class="btn btn-sm btn-primary">Save</button>
|
||||||
<div id="btnUpdtDanaSpinner" class="d-none">
|
<div id="btnUpdtDanaSpinner" class="d-none">
|
||||||
<div class="spinner-border" role="status">
|
<div class="spinner-border" role="status">
|
||||||
<span class="visually-hidden">Loading...</span>
|
<span class="visually-hidden">Loading...</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('customjs')
|
@section('customjs')
|
||||||
<script>
|
<script>
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
const State = {
|
const State = {
|
||||||
delay_type_number: 1000,
|
delay_type_number: 1000,
|
||||||
storage_lara: "{{ asset('storage') }}/",
|
storage_lara: "{{ asset('storage') }}/",
|
||||||
file_jimp_worker: "{{ asset('assets/js/worker/jimp.js') }}",
|
file_jimp_worker: "{{ asset('assets/js/worker/jimp.js') }}",
|
||||||
};
|
};
|
||||||
|
|
||||||
const Wrapper = {
|
const Wrapper = {
|
||||||
activate: function() {
|
activate: function() {
|
||||||
DanaUpdt.activate();
|
DanaUpdt.activate();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const DanaUpdt = {
|
const DanaUpdt = {
|
||||||
activate: function() {
|
activate: function() {
|
||||||
DanaUpdt.event();
|
DanaUpdt.event();
|
||||||
},
|
},
|
||||||
@ -62,10 +62,10 @@
|
|||||||
$('#btnUpdtDana').on('click', async function(e) {
|
$('#btnUpdtDana').on('click', async function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const data = DanaUpdt.getData();
|
const data = DanaUpdt.getData();
|
||||||
if (!DanaUpdt.checkData(data, true)) return false;
|
if (!DanaUpdt.checkData(data, true)) return false;
|
||||||
DanaUpdt.submitData(data);
|
DanaUpdt.submitData(data);
|
||||||
});
|
});
|
||||||
// input
|
// input
|
||||||
$('#amt').on('keyup', function() {
|
$('#amt').on('keyup', function() {
|
||||||
let price = $('#amt').val().split('.').join('');
|
let price = $('#amt').val().split('.').join('');
|
||||||
$('#amt').val((new Intl.NumberFormat('id-ID')).format(price));
|
$('#amt').val((new Intl.NumberFormat('id-ID')).format(price));
|
||||||
@ -73,7 +73,7 @@
|
|||||||
},
|
},
|
||||||
getData: function(props) {
|
getData: function(props) {
|
||||||
const data = Helper.objectifyForm($('#formDanaUpdt').serializeArray());
|
const data = Helper.objectifyForm($('#formDanaUpdt').serializeArray());
|
||||||
data.amt = $('#amt').val().split('.').join('');
|
data.amt = $('#amt').val().split('.').join('');
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
@ -93,7 +93,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$('#btnUpdtDana').attr('disabed', true);
|
$('#btnUpdtDana').attr('disabed', true);
|
||||||
$('#btnUpdtDanaSpinner').removeClass('d-none');
|
$('#btnUpdtDanaSpinner').removeClass('d-none');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{{ route('api_edit_dana', '') }}/" + data.dana_id,
|
url: "{{ route('api_edit_dana', '') }}/" + data.dana_id,
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
@ -106,7 +106,7 @@
|
|||||||
data,
|
data,
|
||||||
success: (data, textStatus, jqXHR) => {
|
success: (data, textStatus, jqXHR) => {
|
||||||
$('#btnUpdtDana').removeAttr('disabed');
|
$('#btnUpdtDana').removeAttr('disabed');
|
||||||
$('#btnUpdtDanaSpinner').addClass('d-none');
|
$('#btnUpdtDanaSpinner').addClass('d-none');
|
||||||
if (data.meta.type != 'success') {
|
if (data.meta.type != 'success') {
|
||||||
resolve({
|
resolve({
|
||||||
type: 'fail'
|
type: 'fail'
|
||||||
@ -117,11 +117,11 @@
|
|||||||
resolve({
|
resolve({
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
Helper.toast('Success', 'sukses update saldo', data.meta.message);
|
Helper.toast('Success', 'sukses update saldo', data.meta.message);
|
||||||
},
|
},
|
||||||
error: (jqXHR, textStatus, error) => {
|
error: (jqXHR, textStatus, error) => {
|
||||||
$('#btnUpdtDana').removeAttr('disabed');
|
$('#btnUpdtDana').removeAttr('disabed');
|
||||||
$('#btnUpdtDanaSpinner').addClass('d-none');
|
$('#btnUpdtDanaSpinner').addClass('d-none');
|
||||||
if (jqXHR.status >= 500) {
|
if (jqXHR.status >= 500) {
|
||||||
Helper.toast('Error', 'just now', 'Please try again');
|
Helper.toast('Error', 'just now', 'Please try again');
|
||||||
} else {
|
} else {
|
||||||
@ -137,6 +137,6 @@
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
Wrapper.activate();
|
Wrapper.activate();
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@ -656,8 +656,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSaveDisc">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSaveDisc">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -746,8 +746,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitAddItem">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitAddItem">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -772,7 +772,7 @@
|
|||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" name="isCheckConfirmInvc" type="checkbox" value="yes" id="isCheckConfirmInvc">
|
<input class="form-check-input" name="isCheckConfirmInvc" type="checkbox" value="yes" id="isCheckConfirmInvc">
|
||||||
<label class="form-check-label text-dark" for="isCheckConfirmInvc">
|
<label class="form-check-label text-dark" for="isCheckConfirmInvc">
|
||||||
Setelah konfirmasi pembayaran maka data penagihan yang dikonfirmasi akan ditutup dan tidak bisa dirubah
|
Setelah konfirmasi pembayaran maka data penagihan yang dikonfirmasi akan diClose dan tidak bisa dirubah
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -803,7 +803,7 @@
|
|||||||
</div> --}}
|
</div> --}}
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnConfirmInvc" disabled>Konfirmasi</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnConfirmInvc" disabled>Konfirmasi</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -837,8 +837,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSaveTax">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSaveTax">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -861,7 +861,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitDelItem" type="button" class="btn btn-sm btn-secondary">Ya, hapus</button>
|
<button id="btnSubmitDelItem" type="button" class="btn btn-sm btn-secondary">Ya, hapus</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -350,8 +350,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSaveDisc">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSaveDisc">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -408,8 +408,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitAddItem">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitAddItem">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -849,7 +849,7 @@
|
|||||||
},
|
},
|
||||||
getData: function() {
|
getData: function() {
|
||||||
const data = {};
|
const data = {};
|
||||||
|
|
||||||
data.ord_id = State.ord_id;
|
data.ord_id = State.ord_id;
|
||||||
data.ord_code = State.ord_code;
|
data.ord_code = State.ord_code;
|
||||||
data.termin_id = $('#subTotal').data('terminid');
|
data.termin_id = $('#subTotal').data('terminid');
|
||||||
|
|||||||
@ -4,12 +4,12 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('customcss')
|
@section('customcss')
|
||||||
<style>
|
<style>
|
||||||
.tepiBottom {
|
.tepiBottom {
|
||||||
border-bottom: 1.5px groove #000;
|
border-bottom: 1.5px groove #000;
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@ -30,8 +30,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col text-end">
|
<div class="col text-end">
|
||||||
<button class="btn btn-secondary btn-sm"
|
<button class="btn btn-secondary btn-sm" onclick="location.href='{{ route('view_keuangan_payment') }}'">Kembali</button>
|
||||||
onclick="location.href='{{ route('view_keuangan_payment') }}'">Kembali</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -218,9 +217,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
<a href="https://api.whatsapp.com/send/?phone=62{{ $order->drv_phone_val }}&text=Halo&app_absent=0"
|
<a href="https://api.whatsapp.com/send/?phone=62{{ $order->drv_phone_val }}&text=Halo&app_absent=0" class="" target="_blank"><i class="text-success ion-social-whatsapp"></i>
|
||||||
class="" target="_blank"><i
|
|
||||||
class="text-success ion-social-whatsapp"></i>
|
|
||||||
{{ implode(' ', str_split('0' . $order->drv_phone_val, 4)) }}</a>
|
{{ implode(' ', str_split('0' . $order->drv_phone_val, 4)) }}</a>
|
||||||
</p>
|
</p>
|
||||||
@else
|
@else
|
||||||
@ -241,9 +238,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
<a href="https://api.whatsapp.com/send/?phone=62{{ $order->drv_phone2_val }}&text=Halo&app_absent=0"
|
<a href="https://api.whatsapp.com/send/?phone=62{{ $order->drv_phone2_val }}&text=Halo&app_absent=0" class="" target="_blank"><i class="text-success ion-social-whatsapp"></i>
|
||||||
class="" target="_blank"><i
|
|
||||||
class="text-success ion-social-whatsapp"></i>
|
|
||||||
{{ implode(' ', str_split('0' . $order->drv_phone2_val, 4)) }}</a>
|
{{ implode(' ', str_split('0' . $order->drv_phone2_val, 4)) }}</a>
|
||||||
</p>
|
</p>
|
||||||
@else
|
@else
|
||||||
@ -298,7 +293,7 @@
|
|||||||
<div class="col-sm-12 mb-3">
|
<div class="col-sm-12 mb-3">
|
||||||
<label for="" class="form-label">Catatan Finance</label>
|
<label for="" class="form-label">Catatan Finance</label>
|
||||||
<textarea name="" id="" cols="30" rows="4" class="form-control radius"></textarea>
|
<textarea name="" id="" cols="30" rows="4" class="form-control radius"></textarea>
|
||||||
<button class="btn btn-sm btn-primary mt-3">Simpan</button>
|
<button class="btn btn-sm btn-primary mt-3">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -364,14 +359,11 @@
|
|||||||
<div class="accordion mb-3">
|
<div class="accordion mb-3">
|
||||||
<div class="accordion-item border-0 radius-8">
|
<div class="accordion-item border-0 radius-8">
|
||||||
<h2 class="accordion-header" id="panelsStayOpen-headingFive">
|
<h2 class="accordion-header" id="panelsStayOpen-headingFive">
|
||||||
<button class="accordion-button radius-8 collapsed" type="button"
|
<button class="accordion-button radius-8 collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseFive" aria-expanded="false" aria-controls="panelsStayOpen-collapseFive">
|
||||||
data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseFive"
|
|
||||||
aria-expanded="false" aria-controls="panelsStayOpen-collapseFive">
|
|
||||||
Berkas Driver
|
Berkas Driver
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<div id="panelsStayOpen-collapseFive" class="accordion-collapse collapse"
|
<div id="panelsStayOpen-collapseFive" class="accordion-collapse collapse" aria-labelledby="panelsStayOpen-headingFive">
|
||||||
aria-labelledby="panelsStayOpen-headingFive">
|
|
||||||
<div class="accordion-body pb-0">
|
<div class="accordion-body pb-0">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@php
|
@php
|
||||||
@ -386,8 +378,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card bg-light border mb-0">
|
<div class="card bg-light border mb-0">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<img src="{{ isset($drvUp->img)? \App\Helper::changeIpToDomain($drvUp->img): 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}"
|
<img src="{{ isset($drvUp->img) ? \App\Helper::changeIpToDomain($drvUp->img) : 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}" alt="" class="img-fluid img-report">
|
||||||
alt="" class="img-fluid img-report">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -399,8 +390,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card bg-light border mb-0">
|
<div class="card bg-light border mb-0">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<img src="{{ isset($drvUp->img)? \App\Helper::changeIpToDomain($drvUp->img): 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}"
|
<img src="{{ isset($drvUp->img) ? \App\Helper::changeIpToDomain($drvUp->img) : 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}" alt="" class="img-fluid img-report">
|
||||||
alt="" class="img-fluid img-report">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -412,14 +402,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card bg-light border mb-0">
|
<div class="card bg-light border mb-0">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<img src="{{ isset($drvUp->img)? \App\Helper::changeIpToDomain($drvUp->img): 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}"
|
<img src="{{ isset($drvUp->img) ? \App\Helper::changeIpToDomain($drvUp->img) : 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}" alt="" class="img-fluid img-report">
|
||||||
alt="" class="img-fluid img-report">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@elseif ($drvUp->stts === \App\Models\OrdersDriversUploads::STTS_UP_TRAVEL_DOCUMENT)
|
@elseif ($drvUp->stts === \App\Models\OrdersDriversUploads::STTS_UP_TRAVEL_DOCUMENT)
|
||||||
@php
|
@php
|
||||||
$afterTravelDoc = 1;
|
$afterTravelDoc = 1;
|
||||||
@endphp
|
@endphp
|
||||||
<div class="col-12 mb-3 tepiBottom">
|
<div class="col-12 mb-3 tepiBottom">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
@ -428,8 +417,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card bg-light border mb-0">
|
<div class="card bg-light border mb-0">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<img src="{{ isset($drvUp->img)? \App\Helper::changeIpToDomain($drvUp->img): 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}"
|
<img src="{{ isset($drvUp->img) ? \App\Helper::changeIpToDomain($drvUp->img) : 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}" alt="" class="img-fluid img-report">
|
||||||
alt="" class="img-fluid img-report">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -441,8 +429,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card bg-light border mb-0">
|
<div class="card bg-light border mb-0">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<img src="{{ isset($drvUp->img)? \App\Helper::changeIpToDomain($drvUp->img): 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}"
|
<img src="{{ isset($drvUp->img) ? \App\Helper::changeIpToDomain($drvUp->img) : 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}" alt="" class="img-fluid img-report">
|
||||||
alt="" class="img-fluid img-report">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -454,8 +441,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card bg-light border mb-0">
|
<div class="card bg-light border mb-0">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<img src="{{ isset($drvUp->img)? \App\Helper::changeIpToDomain($drvUp->img): 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}"
|
<img src="{{ isset($drvUp->img) ? \App\Helper::changeIpToDomain($drvUp->img) : 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}" alt="" class="img-fluid img-report">
|
||||||
alt="" class="img-fluid img-report">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -467,8 +453,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card bg-light border mb-0">
|
<div class="card bg-light border mb-0">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<img src="{{ isset($drvUp->img)? \App\Helper::changeIpToDomain($drvUp->img): 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}"
|
<img src="{{ isset($drvUp->img) ? \App\Helper::changeIpToDomain($drvUp->img) : 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}" alt="" class="img-fluid img-report">
|
||||||
alt="" class="img-fluid img-report">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -480,8 +465,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card bg-light border mb-0">
|
<div class="card bg-light border mb-0">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<img src="{{ isset($drvUp->img)? \App\Helper::changeIpToDomain($drvUp->img): 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}"
|
<img src="{{ isset($drvUp->img) ? \App\Helper::changeIpToDomain($drvUp->img) : 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}" alt="" class="img-fluid img-report">
|
||||||
alt="" class="img-fluid img-report">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -493,8 +477,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card bg-light border mb-0">
|
<div class="card bg-light border mb-0">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<img src="{{ isset($drvUp->img)? \App\Helper::changeIpToDomain($drvUp->img): 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}"
|
<img src="{{ isset($drvUp->img) ? \App\Helper::changeIpToDomain($drvUp->img) : 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}" alt="" class="img-fluid img-report">
|
||||||
alt="" class="img-fluid img-report">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -506,8 +489,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card bg-light border mb-0">
|
<div class="card bg-light border mb-0">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<img src="{{ isset($drvUp->img)? \App\Helper::changeIpToDomain($drvUp->img): 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}"
|
<img src="{{ isset($drvUp->img) ? \App\Helper::changeIpToDomain($drvUp->img) : 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDVPuMlKfGrFErmCt6hCuECLbbhekJF-GCtAJvPIZpHX5upTT-hABFlp8qZY8rkgaZ0DE&usqp=CAU' }}" alt="" class="img-fluid img-report">
|
||||||
alt="" class="img-fluid img-report">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -557,9 +539,7 @@
|
|||||||
<tr class="">
|
<tr class="">
|
||||||
<td class="text-center small">1</td>
|
<td class="text-center small">1</td>
|
||||||
<td class="text-center" id="tblColAction">
|
<td class="text-center" id="tblColAction">
|
||||||
<a href="javascript:void(0)"
|
<a href="javascript:void(0)" class="btn btn-primary btn-sm text-nowrap small w-100" data-bs-toggle="modal" data-bs-target="#mdlpayAdd">Bayar</a>
|
||||||
class="btn btn-primary btn-sm text-nowrap small w-100"
|
|
||||||
data-bs-toggle="modal" data-bs-target="#mdlpayAdd">Bayar</a>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="small">Biaya inap kendaraan</td>
|
<td class="small">Biaya inap kendaraan</td>
|
||||||
<td class="text-nowrap small text-end">Rp350.000</td>
|
<td class="text-nowrap small text-end">Rp350.000</td>
|
||||||
@ -576,8 +556,7 @@
|
|||||||
<tr class="">
|
<tr class="">
|
||||||
<td class="text-center small">2</td>
|
<td class="text-center small">2</td>
|
||||||
<td class="text-center small">
|
<td class="text-center small">
|
||||||
<a href="javascript:void(0)" class="text-nowrap text-success"
|
<a href="javascript:void(0)" class="text-nowrap text-success" data-bs-toggle="modal" data-bs-target="#mdlViewAdd">Lihat Bukti</a>
|
||||||
data-bs-toggle="modal" data-bs-target="#mdlViewAdd">Lihat Bukti</a>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="small">Biaya pengemudi tambahan</td>
|
<td class="small">Biaya pengemudi tambahan</td>
|
||||||
<td class="text-nowrap small text-end">Rp530.000</td>
|
<td class="text-nowrap small text-end">Rp530.000</td>
|
||||||
@ -623,9 +602,7 @@
|
|||||||
<tr class="">
|
<tr class="">
|
||||||
<td class="text-center small">1</td>
|
<td class="text-center small">1</td>
|
||||||
<td class="text-center" id="tblColAction">
|
<td class="text-center" id="tblColAction">
|
||||||
<a href="javascript:void(0)"
|
<a href="javascript:void(0)" class="btn btn-primary btn-sm text-nowrap small w-100" data-bs-toggle="modal" data-bs-target="#mdlpayAdd">Bayar</a>
|
||||||
class="btn btn-primary btn-sm text-nowrap small w-100"
|
|
||||||
data-bs-toggle="modal" data-bs-target="#mdlpayAdd">Bayar</a>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="small">Biaya inap kendaraan</td>
|
<td class="small">Biaya inap kendaraan</td>
|
||||||
<td class="text-nowrap small text-end">Rp350.000</td>
|
<td class="text-nowrap small text-end">Rp350.000</td>
|
||||||
@ -642,8 +619,7 @@
|
|||||||
<tr class="">
|
<tr class="">
|
||||||
<td class="text-center small">2</td>
|
<td class="text-center small">2</td>
|
||||||
<td class="text-center small">
|
<td class="text-center small">
|
||||||
<a href="javascript:void(0)" class="text-nowrap text-success"
|
<a href="javascript:void(0)" class="text-nowrap text-success" data-bs-toggle="modal" data-bs-target="#mdlViewAdd">Lihat Bukti</a>
|
||||||
data-bs-toggle="modal" data-bs-target="#mdlViewAdd">Lihat Bukti</a>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="small">Biaya pengemudi tambahan</td>
|
<td class="small">Biaya pengemudi tambahan</td>
|
||||||
<td class="text-nowrap small text-end">Rp530.000</td>
|
<td class="text-nowrap small text-end">Rp530.000</td>
|
||||||
@ -678,7 +654,7 @@
|
|||||||
{{-- <label for="fnnc-note{{ $iOrd }}" class="form-label">Catatan Finance</label> --}}
|
{{-- <label for="fnnc-note{{ $iOrd }}" class="form-label">Catatan Finance</label> --}}
|
||||||
<p class="text-danger text-bold mb-0">Catatan Finance #{{ $order->ord_code }}</p>
|
<p class="text-danger text-bold mb-0">Catatan Finance #{{ $order->ord_code }}</p>
|
||||||
<textarea name="fnnc-note{{ $iOrd }}" id="fnnc-note{{ $iOrd }}" data-ord_id="{{ $order->ord_id }}" cols="30" rows="2" class="form-control radius">{{ $order->fnnc_note }}</textarea>
|
<textarea name="fnnc-note{{ $iOrd }}" id="fnnc-note{{ $iOrd }}" data-ord_id="{{ $order->ord_id }}" cols="30" rows="2" class="form-control radius">{{ $order->fnnc_note }}</textarea>
|
||||||
<button id="btnSaveFnncNote{{ $iOrd }}" class="btn btn-sm btn-primary mt-3">Simpan</button>
|
<button id="btnSaveFnncNote{{ $iOrd }}" class="btn btn-sm btn-primary mt-3">Save</button>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
@ -690,8 +666,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Modal Term 1 --}}
|
{{-- Modal Term 1 --}}
|
||||||
<div class="modal" id="mdlTerm1" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false"
|
<div class="modal" id="mdlTerm1" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false" aria-labelledby="mdlTerm1Label" aria-hidden="true">
|
||||||
aria-labelledby="mdlTerm1Label" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered">
|
<div class="modal-dialog modal-dialog-centered">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -705,15 +680,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSaveTerm1">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSaveTerm1">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal" id="mdlpayAdd" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false"
|
<div class="modal" id="mdlpayAdd" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false" aria-labelledby="mdlpayAddLabel" aria-hidden="true">
|
||||||
aria-labelledby="mdlpayAddLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered">
|
<div class="modal-dialog modal-dialog-centered">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -729,8 +703,7 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="up_paid_proof" class="col-form-label">Unggah Bukti Pembayaran <span class="text-danger">*</span></label>
|
<label for="up_paid_proof" class="col-form-label">Unggah Bukti Pembayaran <span class="text-danger">*</span></label>
|
||||||
<br>
|
<br>
|
||||||
<img id="inpt-up_paid_proof-img" class="img-fluid d-none" src="#"
|
<img id="inpt-up_paid_proof-img" class="img-fluid d-none" src="#" alt="inpt-up_paid_proof-img">
|
||||||
alt="inpt-up_paid_proof-img">
|
|
||||||
<div id="inpt-group_up_paid_proof_spinner" class="d-none">
|
<div id="inpt-group_up_paid_proof_spinner" class="d-none">
|
||||||
<div class="spinner-border" role="status">
|
<div class="spinner-border" role="status">
|
||||||
<span class="visually-hidden">Loading...</span>
|
<span class="visually-hidden">Loading...</span>
|
||||||
@ -741,27 +714,22 @@
|
|||||||
<span id="inpt-up_paid_proof-filesize" class="d-none"></span>
|
<span id="inpt-up_paid_proof-filesize" class="d-none"></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="inpt-group_rotate_up_paid_proof" class="pt-2 d-flex justify-content-start d-none">
|
<div id="inpt-group_rotate_up_paid_proof" class="pt-2 d-flex justify-content-start d-none">
|
||||||
<button type="button" class="btnRotateLeft btn btn-sm btn-outline-primary ml-1"
|
<button type="button" class="btnRotateLeft btn btn-sm btn-outline-primary ml-1" style="padding:0.25rem 0.5rem;border-radius:0.25rem;"><i class="icon ion-arrow-return-left"></i></button>
|
||||||
style="padding:0.25rem 0.5rem;border-radius:0.25rem;"><i
|
<button type="button" class="btnRotateRight btn btn-sm btn-outline-primary ml-1" style="padding:0.25rem 0.5rem;border-radius:0.25rem;"><i class="icon ion-arrow-return-right"></i></button>
|
||||||
class="icon ion-arrow-return-left"></i></button>
|
|
||||||
<button type="button" class="btnRotateRight btn btn-sm btn-outline-primary ml-1"
|
|
||||||
style="padding:0.25rem 0.5rem;border-radius:0.25rem;"><i
|
|
||||||
class="icon ion-arrow-return-right"></i></button>
|
|
||||||
</div>
|
</div>
|
||||||
<input type="file" id="inpt-up_paid_proof-file" class="form-control form-control-sm">
|
<input type="file" id="inpt-up_paid_proof-file" class="form-control form-control-sm">
|
||||||
<input type="text" id="inpt-up_paid_proof-base64" class="form-control" hidden>
|
<input type="text" id="inpt-up_paid_proof-base64" class="form-control" hidden>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnPayAdd">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnPayAdd">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal" id="mdlViewAdd" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false"
|
<div class="modal" id="mdlViewAdd" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false" aria-labelledby="mdlViewAddLabel" aria-hidden="true">
|
||||||
aria-labelledby="mdlViewAddLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered">
|
<div class="modal-dialog modal-dialog-centered">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -785,7 +753,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -801,7 +769,7 @@
|
|||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div id="addSlcTrxCode" class="mb-3 {{ (count($orders) > 1 ? '' : 'd-none') }}">
|
<div id="addSlcTrxCode" class="mb-3 {{ count($orders) > 1 ? '' : 'd-none' }}">
|
||||||
<label for="slcTrxCode" class="form-label w-100">Masukkan ke transaksi <span class="text-danger">*</span></label>
|
<label for="slcTrxCode" class="form-label w-100">Masukkan ke transaksi <span class="text-danger">*</span></label>
|
||||||
<select name="slcTrxCode" id="slcTrxCode" class="select2 form-control" style="width: 100% !important">
|
<select name="slcTrxCode" id="slcTrxCode" class="select2 form-control" style="width: 100% !important">
|
||||||
@foreach ($orders as $order)
|
@foreach ($orders as $order)
|
||||||
@ -894,16 +862,16 @@
|
|||||||
<div class="col-sm-6 col-md-4 col-lg-3" style="padding:0 0 0 0.75rem;">
|
<div class="col-sm-6 col-md-4 col-lg-3" style="padding:0 0 0 0.75rem;">
|
||||||
<select name="ddln_pay_time_hour" id="ddln_pay_time_hour" class="form-control">
|
<select name="ddln_pay_time_hour" id="ddln_pay_time_hour" class="form-control">
|
||||||
<option value="" selected disabled hidden>--</option>
|
<option value="" selected disabled hidden>--</option>
|
||||||
@for ($i=0; $i<24; $i++)
|
@for ($i = 0; $i < 24; $i++)
|
||||||
<option value="{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}">{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}</option>
|
<option value="{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}">{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}</option>
|
||||||
@endfor
|
@endfor
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6 col-md-4 col-lg-3" style="padding:0 0 0 0.75rem;">
|
<div class="col-sm-6 col-md-4 col-lg-3" style="padding:0 0 0 0.75rem;">
|
||||||
<select name="ddln_pay_time_minute" id="ddln_pay_time_minute" class="form-control">
|
<select name="ddln_pay_time_minute" id="ddln_pay_time_minute" class="form-control">
|
||||||
<option value="" selected disabled hidden>--</option>
|
<option value="" selected disabled hidden>--</option>
|
||||||
@for ($i=0; $i<60; $i++)
|
@for ($i = 0; $i < 60; $i++)
|
||||||
<option value="{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}">{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}</option>
|
<option value="{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}">{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}</option>
|
||||||
@endfor
|
@endfor
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -914,8 +882,7 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="submission_proof" class="col-form-label">Unggah Bukti Pengajuan <span class="text-danger">*</span></label>
|
<label for="submission_proof" class="col-form-label">Unggah Bukti Pengajuan <span class="text-danger">*</span></label>
|
||||||
<br>
|
<br>
|
||||||
<img id="inpt-submission_proof-img" class="img-fluid d-none" src="#"
|
<img id="inpt-submission_proof-img" class="img-fluid d-none" src="#" alt="inpt-submission_proof-img">
|
||||||
alt="inpt-submission_proof-img">
|
|
||||||
<div id="inpt-group_submission_proof_spinner" class="d-none">
|
<div id="inpt-group_submission_proof_spinner" class="d-none">
|
||||||
<div class="spinner-border" role="status">
|
<div class="spinner-border" role="status">
|
||||||
<span class="visually-hidden">Loading...</span>
|
<span class="visually-hidden">Loading...</span>
|
||||||
@ -926,12 +893,8 @@
|
|||||||
<span id="inpt-submission_proof-filesize" class="d-none"></span>
|
<span id="inpt-submission_proof-filesize" class="d-none"></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="inpt-group_rotate_submission_proof" class="pt-2 d-flex justify-content-start d-none">
|
<div id="inpt-group_rotate_submission_proof" class="pt-2 d-flex justify-content-start d-none">
|
||||||
<button type="button" class="btnRotateLeft btn btn-sm btn-outline-primary ml-1"
|
<button type="button" class="btnRotateLeft btn btn-sm btn-outline-primary ml-1" style="padding:0.25rem 0.5rem;border-radius:0.25rem;"><i class="icon ion-arrow-return-left"></i></button>
|
||||||
style="padding:0.25rem 0.5rem;border-radius:0.25rem;"><i
|
<button type="button" class="btnRotateRight btn btn-sm btn-outline-primary ml-1" style="padding:0.25rem 0.5rem;border-radius:0.25rem;"><i class="icon ion-arrow-return-right"></i></button>
|
||||||
class="icon ion-arrow-return-left"></i></button>
|
|
||||||
<button type="button" class="btnRotateRight btn btn-sm btn-outline-primary ml-1"
|
|
||||||
style="padding:0.25rem 0.5rem;border-radius:0.25rem;"><i
|
|
||||||
class="icon ion-arrow-return-right"></i></button>
|
|
||||||
</div>
|
</div>
|
||||||
<input type="file" id="inpt-submission_proof-file" class="form-control form-control-sm">
|
<input type="file" id="inpt-submission_proof-file" class="form-control form-control-sm">
|
||||||
<input type="text" id="inpt-submission_proof-base64" class="form-control" hidden>
|
<input type="text" id="inpt-submission_proof-base64" class="form-control" hidden>
|
||||||
@ -956,13 +919,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="bank_acc_number" class="form-label">Nomor Rekening <span class="text-danger">*</span></label>
|
<label for="bank_acc_number" class="form-label">Nomor Rekening <span class="text-danger">*</span></label>
|
||||||
<input type="number" class="form-control form-control-sm" name="bank_acc_number"
|
<input type="number" class="form-control form-control-sm" name="bank_acc_number" id="bank_acc_number">
|
||||||
id="bank_acc_number">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="bank_acc_name" class="form-label">Pemilik Rekening <span class="text-danger">*</span></label>
|
<label for="bank_acc_name" class="form-label">Pemilik Rekening <span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control form-control-sm" name="bank_acc_name"
|
<input type="text" class="form-control form-control-sm" name="bank_acc_name" id="bank_acc_name">
|
||||||
id="bank_acc_name">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
@ -970,8 +931,7 @@
|
|||||||
<label for="is_paid" class="form-label">Status Pembayaran</label>
|
<label for="is_paid" class="form-label">Status Pembayaran</label>
|
||||||
<div class="form-check form-switch">
|
<div class="form-check form-switch">
|
||||||
<input class="form-check-input" type="checkbox" id="is_paid">
|
<input class="form-check-input" type="checkbox" id="is_paid">
|
||||||
<label class="form-check-label" for="is_paid"><span class="text-dark"
|
<label class="form-check-label" for="is_paid"><span class="text-dark" id="txtIsPaid">Belum dibayar</span></label>
|
||||||
id="txtIsPaid">Belum dibayar</span></label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="groupIsPaid" class="form-group d-none">
|
<div id="groupIsPaid" class="form-group d-none">
|
||||||
@ -983,8 +943,7 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="is_paid_proof" class="col-form-label">Unggah Bukti Pembayaran <span class="text-danger">*</span></label>
|
<label for="is_paid_proof" class="col-form-label">Unggah Bukti Pembayaran <span class="text-danger">*</span></label>
|
||||||
<br>
|
<br>
|
||||||
<img id="inpt-is_paid_proof-img" class="img-fluid d-none" src="#"
|
<img id="inpt-is_paid_proof-img" class="img-fluid d-none" src="#" alt="inpt-is_paid_proof-img">
|
||||||
alt="inpt-is_paid_proof-img">
|
|
||||||
<div id="inpt-group_is_paid_proof_spinner" class="d-none">
|
<div id="inpt-group_is_paid_proof_spinner" class="d-none">
|
||||||
<div class="spinner-border" role="status">
|
<div class="spinner-border" role="status">
|
||||||
<span class="visually-hidden">Loading...</span>
|
<span class="visually-hidden">Loading...</span>
|
||||||
@ -995,12 +954,8 @@
|
|||||||
<span id="inpt-is_paid_proof-filesize" class="d-none"></span>
|
<span id="inpt-is_paid_proof-filesize" class="d-none"></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="inpt-group_rotate_is_paid_proof" class="pt-2 d-flex justify-content-start d-none">
|
<div id="inpt-group_rotate_is_paid_proof" class="pt-2 d-flex justify-content-start d-none">
|
||||||
<button type="button" class="btnRotateLeft btn btn-sm btn-outline-primary ml-1"
|
<button type="button" class="btnRotateLeft btn btn-sm btn-outline-primary ml-1" style="padding:0.25rem 0.5rem;border-radius:0.25rem;"><i class="icon ion-arrow-return-left"></i></button>
|
||||||
style="padding:0.25rem 0.5rem;border-radius:0.25rem;"><i
|
<button type="button" class="btnRotateRight btn btn-sm btn-outline-primary ml-1" style="padding:0.25rem 0.5rem;border-radius:0.25rem;"><i class="icon ion-arrow-return-right"></i></button>
|
||||||
class="icon ion-arrow-return-left"></i></button>
|
|
||||||
<button type="button" class="btnRotateRight btn btn-sm btn-outline-primary ml-1"
|
|
||||||
style="padding:0.25rem 0.5rem;border-radius:0.25rem;"><i
|
|
||||||
class="icon ion-arrow-return-right"></i></button>
|
|
||||||
</div>
|
</div>
|
||||||
<input type="file" id="inpt-is_paid_proof-file" class="form-control form-control-sm">
|
<input type="file" id="inpt-is_paid_proof-file" class="form-control form-control-sm">
|
||||||
<input type="text" id="inpt-is_paid_proof-base64" class="form-control" hidden>
|
<input type="text" id="inpt-is_paid_proof-base64" class="form-control" hidden>
|
||||||
@ -1015,7 +970,7 @@
|
|||||||
<div class="col-sm-6 col-md-4 col-lg-3" style="padding:0 0 0 0.75rem;">
|
<div class="col-sm-6 col-md-4 col-lg-3" style="padding:0 0 0 0.75rem;">
|
||||||
<select name="is_paid_time_hour" id="is_paid_time_hour" class="form-control">
|
<select name="is_paid_time_hour" id="is_paid_time_hour" class="form-control">
|
||||||
<option value="" selected disabled hidden>--</option>
|
<option value="" selected disabled hidden>--</option>
|
||||||
@for ($i=0; $i<24; $i++)
|
@for ($i = 0; $i < 24; $i++)
|
||||||
<option value="{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}">{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}</option>
|
<option value="{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}">{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}</option>
|
||||||
@endfor
|
@endfor
|
||||||
</select>
|
</select>
|
||||||
@ -1023,7 +978,7 @@
|
|||||||
<div class="col-sm-6 col-md-4 col-lg-3" style="padding:0 0 0 0.75rem;">
|
<div class="col-sm-6 col-md-4 col-lg-3" style="padding:0 0 0 0.75rem;">
|
||||||
<select name="is_paid_time_minute" id="is_paid_time_minute" class="form-control">
|
<select name="is_paid_time_minute" id="is_paid_time_minute" class="form-control">
|
||||||
<option value="" selected disabled hidden>--</option>
|
<option value="" selected disabled hidden>--</option>
|
||||||
@for ($i=0; $i<60; $i++)
|
@for ($i = 0; $i < 60; $i++)
|
||||||
<option value="{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}">{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}</option>
|
<option value="{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}">{{ str_pad($i, 2, '0', STR_PAD_LEFT) }}</option>
|
||||||
@endfor
|
@endfor
|
||||||
</select>
|
</select>
|
||||||
@ -1043,8 +998,7 @@
|
|||||||
<div id="groupPriceToClient" class="d-none">
|
<div id="groupPriceToClient" class="d-none">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="add-invc_item_price" class="form-label">Harga Satuan yang Ditagihkan <span class="text-danger">*</span></label>
|
<label for="add-invc_item_price" class="form-label">Harga Satuan yang Ditagihkan <span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control form-control-sm" name="add-invc_item_price"
|
<input type="text" class="form-control form-control-sm" name="add-invc_item_price" id="add-invc_item_price">
|
||||||
id="add-invc_item_price">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3 d-none">
|
<div class="mb-3 d-none">
|
||||||
<label for="add-item_bill_tax_type" class="form-label">Perpajakan <span class="text-danger">*</span></label>
|
<label for="add-item_bill_tax_type" class="form-label">Perpajakan <span class="text-danger">*</span></label>
|
||||||
@ -1082,8 +1036,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" id="btnDelItem_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
<button type="button" id="btnDelItem_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitAddItem">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitAddItem">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1107,7 +1061,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitDelItem" type="button" class="btn btn-sm btn-secondary">Ya, hapus</button>
|
<button id="btnSubmitDelItem" type="button" class="btn btn-sm btn-secondary">Ya, hapus</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1148,7 +1102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitRejectItem" type="button" class="btn btn-sm btn-secondary">Ya, tolak</button>
|
<button id="btnSubmitRejectItem" type="button" class="btn btn-sm btn-secondary">Ya, tolak</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1174,7 +1128,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
Status pembayaran
|
Status pembayaran
|
||||||
<div id="mrg-stts_pay"></div>
|
<div id="mrg-stts_pay"></div>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1197,7 +1151,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitMergeItem" type="button" class="btn btn-sm btn-warning">Ya, merge</button>
|
<button id="btnSubmitMergeItem" type="button" class="btn btn-sm btn-warning">Ya, merge</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1239,12 +1193,12 @@
|
|||||||
|
|
||||||
// $('#btnPayAdd').on('click', function() {
|
// $('#btnPayAdd').on('click', function() {
|
||||||
// let a = `
|
// let a = `
|
||||||
// <a href="javascript:void(0)" class="text-nowrap text-success" data-bs-toggle="modal" data-bs-target="#mdlViewAdd">Lihat Bukti</a>
|
// <a href="javascript:void(0)" class="text-nowrap text-success" data-bs-toggle="modal" data-bs-target="#mdlViewAdd">Lihat Bukti</a>
|
||||||
// `
|
// `
|
||||||
// let b = `
|
// let b = `
|
||||||
// <p class="mb-0 text-success text-nowrap small">Lunas</p>
|
// <p class="mb-0 text-success text-nowrap small">Lunas</p>
|
||||||
// <p class="mb-0 text-nowrap small text-muted">23 Apr 2022 06:00</p>
|
// <p class="mb-0 text-nowrap small text-muted">23 Apr 2022 06:00</p>
|
||||||
// `
|
// `
|
||||||
// $('#tblColAction').html(a)
|
// $('#tblColAction').html(a)
|
||||||
// $('#tblColStatus').html(b)
|
// $('#tblColStatus').html(b)
|
||||||
// $('#mdlpayAdd').modal('hide');
|
// $('#mdlpayAdd').modal('hide');
|
||||||
@ -1341,7 +1295,9 @@
|
|||||||
ArcvTable.activate();
|
ArcvTable.activate();
|
||||||
},
|
},
|
||||||
event: function() {
|
event: function() {
|
||||||
const { orders } = State;
|
const {
|
||||||
|
orders
|
||||||
|
} = State;
|
||||||
for (const iOrd in orders) {
|
for (const iOrd in orders) {
|
||||||
$(`#view${iOrd}-pickup_at`).text(moment.unix(orders[iOrd].set_pck_at).format('DD MMM YYYY HH:mm:ss'));
|
$(`#view${iOrd}-pickup_at`).text(moment.unix(orders[iOrd].set_pck_at).format('DD MMM YYYY HH:mm:ss'));
|
||||||
$(`#view${iOrd}-pickup_date_at`).text(moment.unix(orders[iOrd].set_pck_at).format('DD MMM YYYY'));
|
$(`#view${iOrd}-pickup_date_at`).text(moment.unix(orders[iOrd].set_pck_at).format('DD MMM YYYY'));
|
||||||
@ -1463,7 +1419,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
initDateAdtPoints: function() {
|
initDateAdtPoints: function() {
|
||||||
const { orders } = State;
|
const {
|
||||||
|
orders
|
||||||
|
} = State;
|
||||||
for (let iOrd in orders) {
|
for (let iOrd in orders) {
|
||||||
iOrd = Number(iOrd);
|
iOrd = Number(iOrd);
|
||||||
for (let iAdtPoint in orders[iOrd].adtPoints) {
|
for (let iAdtPoint in orders[iOrd].adtPoints) {
|
||||||
@ -1502,7 +1460,9 @@
|
|||||||
let ids = $('#mdlpayAdd').data('ord_a_item_id').split(',');
|
let ids = $('#mdlpayAdd').data('ord_a_item_id').split(',');
|
||||||
let lastPaid = null;
|
let lastPaid = null;
|
||||||
for (let id of ids) {
|
for (let id of ids) {
|
||||||
let data = OrdPaidItem.getData({ ord_a_item_id: Number(id) });
|
let data = OrdPaidItem.getData({
|
||||||
|
ord_a_item_id: Number(id)
|
||||||
|
});
|
||||||
let isValid = OrdPaidItem.checkData(data, true);
|
let isValid = OrdPaidItem.checkData(data, true);
|
||||||
if (!isValid) return false;
|
if (!isValid) return false;
|
||||||
lastPaid = await OrdPaidItem.submitData(data);
|
lastPaid = await OrdPaidItem.submitData(data);
|
||||||
@ -1690,7 +1650,7 @@
|
|||||||
// event checklist
|
// event checklist
|
||||||
$('#add-item_isAdmPrice').on('change', function() {
|
$('#add-item_isAdmPrice').on('change', function() {
|
||||||
$('#invcToClient').prop('checked', false).trigger('change');
|
$('#invcToClient').prop('checked', false).trigger('change');
|
||||||
if($('#add-item_isAdmPrice').prop('checked')) {
|
if ($('#add-item_isAdmPrice').prop('checked')) {
|
||||||
OrdAItem.toggleGroupPayPurpose('hide');
|
OrdAItem.toggleGroupPayPurpose('hide');
|
||||||
OrdAItem.toggleGroupSubmissionProof('hide');
|
OrdAItem.toggleGroupSubmissionProof('hide');
|
||||||
OrdAItem.toggleGroupFillDdln('hide');
|
OrdAItem.toggleGroupFillDdln('hide');
|
||||||
@ -1698,7 +1658,7 @@
|
|||||||
OrdAItem.toggleGroupPayPurpose('show');
|
OrdAItem.toggleGroupPayPurpose('show');
|
||||||
OrdAItem.toggleGroupSubmissionProof('show');
|
OrdAItem.toggleGroupSubmissionProof('show');
|
||||||
OrdAItem.toggleGroupFillDdln('show');
|
OrdAItem.toggleGroupFillDdln('show');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#invcToClient').on('change', function() {
|
$('#invcToClient').on('change', function() {
|
||||||
$('#add-invc_item_price').val('');
|
$('#add-invc_item_price').val('');
|
||||||
@ -1763,15 +1723,23 @@
|
|||||||
},
|
},
|
||||||
eventTax: function() {
|
eventTax: function() {
|
||||||
// vendor
|
// vendor
|
||||||
$('#add-item_tax_type').on('change', function () {
|
$('#add-item_tax_type').on('change', function() {
|
||||||
const val = $('#add-item_tax_type').val();
|
const val = $('#add-item_tax_type').val();
|
||||||
if (val == State.tax_type.include) {
|
if (val == State.tax_type.include) {
|
||||||
$('.groupTax').removeClass('d-none');
|
$('.groupTax').removeClass('d-none');
|
||||||
if (State.vdr_pkp.is_pkp == State.vdr_pkp.pkp) { $('#add-item_tax_ppn_percent').val(State.tax_type.ppn_percent); } else { $('#add-item_tax_ppn_percent').val(0); }
|
if (State.vdr_pkp.is_pkp == State.vdr_pkp.pkp) {
|
||||||
|
$('#add-item_tax_ppn_percent').val(State.tax_type.ppn_percent);
|
||||||
|
} else {
|
||||||
|
$('#add-item_tax_ppn_percent').val(0);
|
||||||
|
}
|
||||||
$('#add-item_tax_pph_percent').val(State.tax_type.pph_percent);
|
$('#add-item_tax_pph_percent').val(State.tax_type.pph_percent);
|
||||||
} else if (val == State.tax_type.exclude) {
|
} else if (val == State.tax_type.exclude) {
|
||||||
$('.groupTax').removeClass('d-none');
|
$('.groupTax').removeClass('d-none');
|
||||||
if (State.vdr_pkp.is_pkp == State.vdr_pkp.pkp) { $('#add-item_tax_ppn_percent').val(State.tax_type.ppn_percent); } else { $('#add-item_tax_ppn_percent').val(0); }
|
if (State.vdr_pkp.is_pkp == State.vdr_pkp.pkp) {
|
||||||
|
$('#add-item_tax_ppn_percent').val(State.tax_type.ppn_percent);
|
||||||
|
} else {
|
||||||
|
$('#add-item_tax_ppn_percent').val(0);
|
||||||
|
}
|
||||||
$('#add-item_tax_pph_percent').val(State.tax_type.pph_percent);
|
$('#add-item_tax_pph_percent').val(State.tax_type.pph_percent);
|
||||||
} else { // without
|
} else { // without
|
||||||
$('.groupTax').addClass('d-none');
|
$('.groupTax').addClass('d-none');
|
||||||
@ -1784,7 +1752,11 @@
|
|||||||
$('#add-item_tax_pph_flat').val((new Intl.NumberFormat('id-ID')).format(calcTax.pph_flat));
|
$('#add-item_tax_pph_flat').val((new Intl.NumberFormat('id-ID')).format(calcTax.pph_flat));
|
||||||
$('#add-item_tax_total_flat').val((new Intl.NumberFormat('id-ID')).format(calcTax.total_tax));
|
$('#add-item_tax_total_flat').val((new Intl.NumberFormat('id-ID')).format(calcTax.total_tax));
|
||||||
|
|
||||||
if (State.vdr_pkp.is_pkp == State.vdr_pkp.pkp) { $('.groupPpn').removeClass('d-none'); } else { $('.groupPpn').addClass('d-none'); }
|
if (State.vdr_pkp.is_pkp == State.vdr_pkp.pkp) {
|
||||||
|
$('.groupPpn').removeClass('d-none');
|
||||||
|
} else {
|
||||||
|
$('.groupPpn').addClass('d-none');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
$('#add-item_tax_type').trigger('change');
|
$('#add-item_tax_type').trigger('change');
|
||||||
let ppnPercentTimeout = null;
|
let ppnPercentTimeout = null;
|
||||||
@ -1830,7 +1802,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// client
|
// client
|
||||||
$('#add-item_bill_tax_type').on('change', function () {
|
$('#add-item_bill_tax_type').on('change', function() {
|
||||||
const val = $('#add-item_bill_tax_type').val();
|
const val = $('#add-item_bill_tax_type').val();
|
||||||
if (val == State.tax_type.include) {
|
if (val == State.tax_type.include) {
|
||||||
$('.groupTaxBill').removeClass('d-none');
|
$('.groupTaxBill').removeClass('d-none');
|
||||||
@ -1898,10 +1870,9 @@
|
|||||||
vdr_pkp: State.vdr_pkp.is_pkp,
|
vdr_pkp: State.vdr_pkp.is_pkp,
|
||||||
};
|
};
|
||||||
let slcType = $('#slcItem option:selected');
|
let slcType = $('#slcItem option:selected');
|
||||||
if (slcType.val() === 'new') {
|
if (slcType.val() === 'new') {
|
||||||
calc.price = Number($('#add-item_price').val().split('.').join(''));
|
calc.price = Number($('#add-item_price').val().split('.').join(''));
|
||||||
} else if (slcType.val() === '') {
|
} else if (slcType.val() === '') {} else {
|
||||||
} else {
|
|
||||||
calc.price = Number(slcType.data('price'));
|
calc.price = Number(slcType.data('price'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1976,18 +1947,17 @@
|
|||||||
const data = {};
|
const data = {};
|
||||||
|
|
||||||
let slcType = $('#slcItem option:selected');
|
let slcType = $('#slcItem option:selected');
|
||||||
if (slcType.val() === 'new') {
|
if (slcType.val() === 'new') {
|
||||||
data.a_id = '00';
|
data.a_id = '00';
|
||||||
data.a_name = $('#add-item_name').val();
|
data.a_name = $('#add-item_name').val();
|
||||||
data.a_type = $('#add-item_type').val();
|
data.a_type = $('#add-item_type').val();
|
||||||
data.a_price = $('#add-item_price').val().split('.').join('');
|
data.a_price = $('#add-item_price').val().split('.').join('');
|
||||||
if($('#add-item_isAdmPrice').prop('checked')) {
|
if ($('#add-item_isAdmPrice').prop('checked')) {
|
||||||
data.is_adm_price = State.is_adm_price.yes
|
data.is_adm_price = State.is_adm_price.yes
|
||||||
} else {
|
} else {
|
||||||
data.is_adm_price = State.is_adm_price.no
|
data.is_adm_price = State.is_adm_price.no
|
||||||
}
|
}
|
||||||
} else if (slcType.val() === '') {
|
} else if (slcType.val() === '') {} else {
|
||||||
} else {
|
|
||||||
data.a_id = slcType.val(); // id
|
data.a_id = slcType.val(); // id
|
||||||
data.a_name = slcType.data('name');
|
data.a_name = slcType.data('name');
|
||||||
data.a_type = slcType.data('type');
|
data.a_type = slcType.data('type');
|
||||||
@ -2534,7 +2504,9 @@
|
|||||||
// $('#tblAdditional').DataTable();
|
// $('#tblAdditional').DataTable();
|
||||||
// if (Driver.Table.firstInitDataTable == 1) { loadTableSkeletonLoading() } else { Driver.Table.firstInitDataTable = 1; }
|
// if (Driver.Table.firstInitDataTable == 1) { loadTableSkeletonLoading() } else { Driver.Table.firstInitDataTable = 1; }
|
||||||
let ord_ids = '';
|
let ord_ids = '';
|
||||||
const { orders } = State;
|
const {
|
||||||
|
orders
|
||||||
|
} = State;
|
||||||
for (let iOrd in orders) {
|
for (let iOrd in orders) {
|
||||||
ord_ids += `${orders[iOrd].ord_id},`;
|
ord_ids += `${orders[iOrd].ord_id},`;
|
||||||
}
|
}
|
||||||
@ -2639,9 +2611,9 @@
|
|||||||
// if (State.a_item_type.second == row.a_item_type) {
|
// if (State.a_item_type.second == row.a_item_type) {
|
||||||
// if (row.is_merge_to == State.is_merge.yes || row.is_merge_from == State.is_merge.yes) {} else {
|
// if (row.is_merge_to == State.is_merge.yes || row.is_merge_from == State.is_merge.yes) {} else {
|
||||||
// action += `
|
// action += `
|
||||||
// <br>
|
// <br>
|
||||||
// <a href="javascript:void(0)" class="btn btn-warning btn-sm text-nowrap small mt-2 w-100 btnMergeItem">Merge</a>
|
// <a href="javascript:void(0)" class="btn btn-warning btn-sm text-nowrap small mt-2 w-100 btnMergeItem">Merge</a>
|
||||||
// `;
|
// `;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
return action;
|
return action;
|
||||||
@ -2691,8 +2663,11 @@
|
|||||||
orderable: true,
|
orderable: true,
|
||||||
searchable: true,
|
searchable: true,
|
||||||
render: function(data, type, row, meta) {
|
render: function(data, type, row, meta) {
|
||||||
let totalTax = 0, totalBase = 0;
|
let totalTax = 0,
|
||||||
let textTax = '', textBase = '', taxType = '';
|
totalBase = 0;
|
||||||
|
let textTax = '',
|
||||||
|
textBase = '',
|
||||||
|
taxType = '';
|
||||||
|
|
||||||
if (row.amt_tax_type == State.tax_type.include) {
|
if (row.amt_tax_type == State.tax_type.include) {
|
||||||
taxType = 'Perpajakan: Sudah Termasuk Pajak<br>';
|
taxType = 'Perpajakan: Sudah Termasuk Pajak<br>';
|
||||||
@ -2725,7 +2700,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let text = '';
|
let text = '';
|
||||||
if (row.amt_tax_type == State.tax_type.include) {
|
if (row.amt_tax_type == State.tax_type.include) {
|
||||||
text += taxType + textBase + (new Intl.NumberFormat('id-ID')).format(totalBase) + '<br>' + textTax + (new Intl.NumberFormat('id-ID')).format(totalTax) + '<br>';
|
text += taxType + textBase + (new Intl.NumberFormat('id-ID')).format(totalBase) + '<br>' + textTax + (new Intl.NumberFormat('id-ID')).format(totalTax) + '<br>';
|
||||||
@ -2818,7 +2793,9 @@
|
|||||||
// $('#tblAdditionalArchv').DataTable();
|
// $('#tblAdditionalArchv').DataTable();
|
||||||
// if (Driver.Table.firstInitDataTable == 1) { loadTableSkeletonLoading() } else { Driver.Table.firstInitDataTable = 1; }
|
// if (Driver.Table.firstInitDataTable == 1) { loadTableSkeletonLoading() } else { Driver.Table.firstInitDataTable = 1; }
|
||||||
let ord_ids = '';
|
let ord_ids = '';
|
||||||
const { orders } = State;
|
const {
|
||||||
|
orders
|
||||||
|
} = State;
|
||||||
for (let iOrd in orders) {
|
for (let iOrd in orders) {
|
||||||
ord_ids += `${orders[iOrd].ord_id},`;
|
ord_ids += `${orders[iOrd].ord_id},`;
|
||||||
}
|
}
|
||||||
@ -2973,7 +2950,9 @@
|
|||||||
OrdNoteFnnc.event();
|
OrdNoteFnnc.event();
|
||||||
},
|
},
|
||||||
event: function() {
|
event: function() {
|
||||||
const { orders } = State;
|
const {
|
||||||
|
orders
|
||||||
|
} = State;
|
||||||
for (let iOrd in orders) {
|
for (let iOrd in orders) {
|
||||||
$(`#btnSaveFnncNote${iOrd}`).on('click', function(e) {
|
$(`#btnSaveFnncNote${iOrd}`).on('click', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -3222,7 +3201,7 @@
|
|||||||
// reader.readAsArrayBuffer(file);
|
// reader.readAsArrayBuffer(file);
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
},
|
},
|
||||||
clearFile: function (x) {
|
clearFile: function(x) {
|
||||||
$('#inpt-' + x + '-img').addClass('d-none')
|
$('#inpt-' + x + '-img').addClass('d-none')
|
||||||
$('#inpt-' + x + '-filesize').html('');
|
$('#inpt-' + x + '-filesize').html('');
|
||||||
$('#inpt-' + x + '-base64').val('');
|
$('#inpt-' + x + '-base64').val('');
|
||||||
|
|||||||
@ -287,7 +287,7 @@
|
|||||||
<div class="col-sm-12 mb-3" id="bankAcc">
|
<div class="col-sm-12 mb-3" id="bankAcc">
|
||||||
<label for="" class="form-label">Catatan Finance</label>
|
<label for="" class="form-label">Catatan Finance</label>
|
||||||
<textarea name="" id="" cols="30" rows="4" class="form-control radius"></textarea>
|
<textarea name="" id="" cols="30" rows="4" class="form-control radius"></textarea>
|
||||||
<button class="btn btn-sm btn-primary mt-3">Simpan</button>
|
<button class="btn btn-sm btn-primary mt-3">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -492,7 +492,7 @@
|
|||||||
<div class="col-sm-12 col-md-12 col-lg-12" id="bankAcc">
|
<div class="col-sm-12 col-md-12 col-lg-12" id="bankAcc">
|
||||||
<label for="fnnc-note" class="form-label">Catatan Finance</label>
|
<label for="fnnc-note" class="form-label">Catatan Finance</label>
|
||||||
<textarea name="fnnc-note" id="fnnc-note" cols="30" rows="2" class="form-control radius">{{ $order->fnnc_note }}</textarea>
|
<textarea name="fnnc-note" id="fnnc-note" cols="30" rows="2" class="form-control radius">{{ $order->fnnc_note }}</textarea>
|
||||||
<button id="btnSaveFnncNote" class="btn btn-sm btn-primary mt-3">Simpan</button>
|
<button id="btnSaveFnncNote" class="btn btn-sm btn-primary mt-3">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -518,8 +518,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSaveTerm1">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSaveTerm1">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -566,8 +566,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnPayAdd">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnPayAdd">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -598,7 +598,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -823,8 +823,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" id="btnDelItem_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
<button type="button" id="btnDelItem_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitAddItem">Simpan</button>
|
<button type="button" class="btn btn-sm btn-primary" id="btnSubmitAddItem">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -848,7 +848,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitDelItem" type="button" class="btn btn-sm btn-secondary">Ya, hapus</button>
|
<button id="btnSubmitDelItem" type="button" class="btn btn-sm btn-secondary">Ya, hapus</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -889,7 +889,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitRejectItem" type="button" class="btn btn-sm btn-secondary">Ya, tolak</button>
|
<button id="btnSubmitRejectItem" type="button" class="btn btn-sm btn-secondary">Ya, tolak</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -938,7 +938,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitMergeItem" type="button" class="btn btn-sm btn-warning">Ya, merge</button>
|
<button id="btnSubmitMergeItem" type="button" class="btn btn-sm btn-warning">Ya, merge</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1363,7 +1363,7 @@
|
|||||||
OrdAItem.toggleGroupPayPurpose('show');
|
OrdAItem.toggleGroupPayPurpose('show');
|
||||||
OrdAItem.toggleGroupSubmissionProof('show');
|
OrdAItem.toggleGroupSubmissionProof('show');
|
||||||
OrdAItem.toggleGroupFillDdln('show');
|
OrdAItem.toggleGroupFillDdln('show');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#invcToClient').on('change', function() {
|
$('#invcToClient').on('change', function() {
|
||||||
$('#add-invc_item_price').val('');
|
$('#add-invc_item_price').val('');
|
||||||
@ -2213,7 +2213,7 @@
|
|||||||
action += `
|
action += `
|
||||||
<p class="mb-0 text-muted small">Pengajuan ditolak oleh ${row.urjct_name} pada tanggal ${moment.unix(row.rjct_at).format('DD MMM YYYY HH:mm:ss')}</p>
|
<p class="mb-0 text-muted small">Pengajuan ditolak oleh ${row.urjct_name} pada tanggal ${moment.unix(row.rjct_at).format('DD MMM YYYY HH:mm:ss')}</p>
|
||||||
`;
|
`;
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,9 +7,8 @@
|
|||||||
@section('customcss')
|
@section('customcss')
|
||||||
<style>
|
<style>
|
||||||
/* .select2-container {
|
/* .select2-container {
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@ -54,8 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlNewItem"
|
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlNewItem" aria-labelledby="mdlNewItemLabel" aria-hidden="true">
|
||||||
aria-labelledby="mdlNewItemLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -71,23 +69,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<label for="add-name" class="col-form-label">Nama<span
|
<label for="add-name" class="col-form-label">Nama<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="add-name" id="add-name" class="form-control">
|
<input type="text" name="add-name" id="add-name" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<label for="add-type" class="col-form-label">Satuan<span
|
<label for="add-type" class="col-form-label">Satuan<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<select name="add-type" id="add-type" class="form-control" style="width:100%;">
|
||||||
<select name="add-type" id="add-type" class="form-control" style="width:100%;">
|
<option value="" selected disabled>Belum dipilih</option>
|
||||||
<option value="" selected disabled>Belum dipilih</option>
|
@foreach ($unitTypes as $type)
|
||||||
@foreach ($unitTypes as $type)
|
|
||||||
<option value="{{ $type->id }}">{{ $type->name }}</option>
|
<option value="{{ $type->id }}">{{ $type->name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<label for="add-price" class="col-form-label">Harga Satuan<span
|
<label for="add-price" class="col-form-label">Harga Satuan<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="add-price" id="add-price" class="form-control">
|
<input type="text" name="add-price" id="add-price" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -99,12 +94,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<label for="add-status" class="form-label">Status<span
|
<label for="add-status" class="form-label">Status<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<div class="form-check form-switch">
|
<div class="form-check form-switch">
|
||||||
<input class="form-check-input" type="checkbox" id="add-status">
|
<input class="form-check-input" type="checkbox" id="add-status">
|
||||||
<label class="form-check-label" for="add-status"><span class="text-dark"
|
<label class="form-check-label" for="add-status"><span class="text-dark" id="add-txtStatus">Inactive</span></label>
|
||||||
id="add-txtStatus">Inactive</span></label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -129,8 +122,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlUpdtItem"
|
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlUpdtItem" aria-labelledby="mdlUpdtItemLabel" aria-hidden="true">
|
||||||
aria-labelledby="mdlUpdtItemLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -146,23 +138,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<label for="updt-name" class="col-form-label">Nama<span
|
<label for="updt-name" class="col-form-label">Nama<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="updt-name" id="updt-name" class="form-control">
|
<input type="text" name="updt-name" id="updt-name" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<label for="updt-type" class="col-form-label">Satuan<span
|
<label for="updt-type" class="col-form-label">Satuan<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<select name="updt-type" id="updt-type" class="form-control" style="width:100%;">
|
||||||
<select name="updt-type" id="updt-type" class="form-control" style="width:100%;">
|
<option value="" selected disabled>Belum dipilih</option>
|
||||||
<option value="" selected disabled>Belum dipilih</option>
|
@foreach ($unitTypes as $type)
|
||||||
@foreach ($unitTypes as $type)
|
|
||||||
<option value="{{ $type->id }}">{{ $type->name }}</option>
|
<option value="{{ $type->id }}">{{ $type->name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<label for="updt-price" class="col-form-label">Harga Satuan<span
|
<label for="updt-price" class="col-form-label">Harga Satuan<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<input type="text" name="updt-price" id="updt-price" class="form-control">
|
<input type="text" name="updt-price" id="updt-price" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -174,12 +163,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<label for="updt-status" class="form-label">Status<span
|
<label for="updt-status" class="form-label">Status<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<div class="form-check form-switch">
|
<div class="form-check form-switch">
|
||||||
<input class="form-check-input" type="checkbox" id="updt-status">
|
<input class="form-check-input" type="checkbox" id="updt-status">
|
||||||
<label class="form-check-label" for="updt-status"><span class="text-dark"
|
<label class="form-check-label" for="updt-status"><span class="text-dark" id="updt-txtStatus">Inactive</span></label>
|
||||||
id="updt-txtStatus">Inactive</span></label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -198,15 +185,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" id="btnDelItem_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
<button type="button" id="btnDelItem_updt" class="btn btn-sm btn-warning">Hapus ?</button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitUpdtItems" type="button" class="btn btn-sm btn-danger">Ubah data</button>
|
<button id="btnSubmitUpdtItems" type="button" class="btn btn-sm btn-danger">Ubah data</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlDelItem"
|
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlDelItem" aria-labelledby="mdlDelItemLabel" aria-hidden="true">
|
||||||
aria-labelledby="mdlDelItemLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-dialog-centered modal-sm">
|
<div class="modal-dialog modal-dialog-centered modal-sm">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -225,7 +211,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Tutup</button>
|
<button type="button" class="btn btn-sm btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button id="btnSubmitDelItem" type="button" class="btn btn-sm btn-secondary">Iya, hapus</button>
|
<button id="btnSubmitDelItem" type="button" class="btn btn-sm btn-secondary">Iya, hapus</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -272,11 +258,11 @@
|
|||||||
else
|
else
|
||||||
$('#updt-txtStatus').html('Inactive')
|
$('#updt-txtStatus').html('Inactive')
|
||||||
});
|
});
|
||||||
// fix modal select2
|
// fix modal select2
|
||||||
$('#add-type').select2({
|
$('#add-type').select2({
|
||||||
dropdownParent: $('#mdlNewItem'),
|
dropdownParent: $('#mdlNewItem'),
|
||||||
});
|
});
|
||||||
$('#updt-type').select2({
|
$('#updt-type').select2({
|
||||||
dropdownParent: $('#mdlUpdtItem'),
|
dropdownParent: $('#mdlUpdtItem'),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -344,7 +330,7 @@
|
|||||||
$(td).attr('data-price', rowData.price);
|
$(td).attr('data-price', rowData.price);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'type_name',
|
data: 'type_name',
|
||||||
className: 'text-end text-nowrap',
|
className: 'text-end text-nowrap',
|
||||||
visible: true,
|
visible: true,
|
||||||
@ -357,7 +343,7 @@
|
|||||||
visible: true,
|
visible: true,
|
||||||
orderable: true,
|
orderable: true,
|
||||||
searchable: true,
|
searchable: true,
|
||||||
render: function(data, type, row, meta) {
|
render: function(data, type, row, meta) {
|
||||||
return (new Intl.NumberFormat('id-ID')).format(data);
|
return (new Intl.NumberFormat('id-ID')).format(data);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -412,7 +398,7 @@
|
|||||||
data.status = State.stts_isact.inactive;
|
data.status = State.stts_isact.inactive;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($('#add-isAdmPrice').prop('checked')) {
|
if ($('#add-isAdmPrice').prop('checked')) {
|
||||||
data.is_adm_price = State.is_adm_price.yes
|
data.is_adm_price = State.is_adm_price.yes
|
||||||
} else {
|
} else {
|
||||||
data.is_adm_price = State.is_adm_price.no
|
data.is_adm_price = State.is_adm_price.no
|
||||||
@ -552,7 +538,7 @@
|
|||||||
$('#updt-status').prop('checked', false).trigger('change');
|
$('#updt-status').prop('checked', false).trigger('change');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.is_adm_price == State.is_adm_price.yes) {
|
if (data.is_adm_price == State.is_adm_price.yes) {
|
||||||
$('#updt-isAdmPrice').prop('checked', true).trigger('change');
|
$('#updt-isAdmPrice').prop('checked', true).trigger('change');
|
||||||
} else {
|
} else {
|
||||||
$('#updt-isAdmPrice').prop('checked', false).trigger('change');
|
$('#updt-isAdmPrice').prop('checked', false).trigger('change');
|
||||||
@ -575,7 +561,7 @@
|
|||||||
data.status = State.stts_isact.inactive;
|
data.status = State.stts_isact.inactive;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($('#updt-isAdmPrice').prop('checked')) {
|
if ($('#updt-isAdmPrice').prop('checked')) {
|
||||||
data.is_adm_price = State.is_adm_price.yes
|
data.is_adm_price = State.is_adm_price.yes
|
||||||
} else {
|
} else {
|
||||||
data.is_adm_price = State.is_adm_price.no
|
data.is_adm_price = State.is_adm_price.no
|
||||||
@ -648,8 +634,8 @@
|
|||||||
let price = row.find('td[data-price]').data('price');
|
let price = row.find('td[data-price]').data('price');
|
||||||
ADel.passDataToView({
|
ADel.passDataToView({
|
||||||
id,
|
id,
|
||||||
name,
|
name,
|
||||||
price,
|
price,
|
||||||
});
|
});
|
||||||
$('#mdlDelItem').data('id', id);
|
$('#mdlDelItem').data('id', id);
|
||||||
$('#mdlDelItem').modal('show');
|
$('#mdlDelItem').modal('show');
|
||||||
@ -662,11 +648,15 @@
|
|||||||
});
|
});
|
||||||
// on modal update
|
// on modal update
|
||||||
$('#btnDelItem_updt').on('click', function(e) {
|
$('#btnDelItem_updt').on('click', function(e) {
|
||||||
const { id, name, price } = AUpdt.getData();
|
const {
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
price
|
||||||
|
} = AUpdt.getData();
|
||||||
ADel.passDataToView({
|
ADel.passDataToView({
|
||||||
id,
|
id,
|
||||||
name,
|
name,
|
||||||
price,
|
price,
|
||||||
});
|
});
|
||||||
$('#mdlDelItem').data('id', id);
|
$('#mdlDelItem').data('id', id);
|
||||||
$('#mdlDelItem').modal('show');
|
$('#mdlDelItem').modal('show');
|
||||||
|
|||||||
Reference in New Issue
Block a user