Worksheet
parent
89bc6bfc3b
commit
0b6cb5882a
|
|
@ -21,7 +21,7 @@ class WorksheetExport implements FromView, WithStyles
|
|||
|
||||
public function view(): View
|
||||
{
|
||||
return view('reports.worksheet.report', [
|
||||
return view('modules.reports.worksheet.report', [
|
||||
'wsData' => $this->wsData,
|
||||
'emisiData' => $this->emisiData,
|
||||
'isExport' => true
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ use Illuminate\Support\Facades\Validator;
|
|||
|
||||
class WorksheetController extends Controller
|
||||
{
|
||||
protected $title = 'Laporan Worksheet';
|
||||
protected $template = 'modules.reports.worksheet';
|
||||
protected $route = 'modules.laporan.worksheet';
|
||||
protected $service;
|
||||
|
||||
public function __construct(WorksheetService $service)
|
||||
|
|
@ -35,7 +38,9 @@ class WorksheetController extends Controller
|
|||
$emisiData = [];
|
||||
}
|
||||
|
||||
return view('reports.worksheet.index', [
|
||||
return view($this->template.'.index', [
|
||||
'title' => $this->title,
|
||||
'route' => $this->route,
|
||||
'inventoryYear' => $inventoryYear ?? date('Y'),
|
||||
'activityYear' => $activityYear,
|
||||
'sectorCode' => $sectorCode,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ use Illuminate\Support\Facades\Auth;
|
|||
|
||||
class ProdusenCalculateController implements HasMiddleware
|
||||
{
|
||||
protected $title = 'Hitung Data dari Produsen';
|
||||
protected $template = 'modules.tool.produsen-calculate';
|
||||
protected $route = 'modules.kalkulasi.hitung-produsen';
|
||||
protected $service;
|
||||
|
||||
public function __construct(ProdusenCalculateService $service)
|
||||
|
|
@ -31,63 +34,14 @@ class ProdusenCalculateController implements HasMiddleware
|
|||
|
||||
public function index(Request $request)
|
||||
{
|
||||
$availableYears = ActivityForm::select('inventory_year')->whereNotNull('agency_id')
|
||||
$data['availableYears'] = ActivityForm::select('inventory_year')->whereNotNull('agency_id')
|
||||
->distinct()->rowActive()->orderBy('inventory_year', 'desc')
|
||||
->get()->pluck('inventory_year')->toArray();
|
||||
|
||||
if ($request->ajax()) {
|
||||
$query = $this->service->getRawAll();
|
||||
$data['route'] = $this->route;
|
||||
$data['title'] = $this->title;
|
||||
|
||||
$result = datatables()->of($query)
|
||||
->addColumn('duration', function ($row) {
|
||||
if ($row->finished_time === null || $row->executed_time === null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$start = Carbon::parse($row->executed_time);
|
||||
$end = Carbon::parse($row->finished_time);
|
||||
|
||||
// Calculate the difference in seconds
|
||||
$diffInSeconds = $start->diffInSeconds($end);
|
||||
|
||||
// Format the duration as HH:MM:SS
|
||||
$hours = floor($diffInSeconds / 3600);
|
||||
$minutes = floor(($diffInSeconds % 3600) / 60);
|
||||
$seconds = $diffInSeconds % 60;
|
||||
|
||||
return sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds);
|
||||
})
|
||||
->editColumn('created_at', function ($row) {
|
||||
return $row->created_at->format('d-m-Y H:i:s')
|
||||
?? '';
|
||||
})
|
||||
->editColumn('executed_time', function ($row) {
|
||||
if ($row->executed_time === null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $row->executed_time->format('d-m-Y H:i:s');
|
||||
})
|
||||
->editColumn('finished_time', function ($row) {
|
||||
if ($row->finished_time === null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $row->finished_time->format('d-m-Y H:i:s');
|
||||
})
|
||||
->addColumn('status', function ($row) {
|
||||
$status = SigdStatus::from($row->status);
|
||||
return $status->badge() ?? '';
|
||||
})
|
||||
->rawColumns(['status', 'duration'])
|
||||
->make(true);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
return view('tool.produsen-calculate.index', [
|
||||
'availableYears' => $availableYears
|
||||
]);
|
||||
return view($this->template.'.index', $data);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
|
|
@ -108,9 +62,52 @@ class ProdusenCalculateController implements HasMiddleware
|
|||
|
||||
$this->service->create($data);
|
||||
|
||||
return redirect()->route('produsenCalculate.index')->with('success', 'Proses Hitung Data dari Produsen berhasil ditambahkan.');
|
||||
return redirect()->route($this->route.'.index')->with('success', 'Proses Hitung Data dari Produsen berhasil ditambahkan.');
|
||||
} catch (\Exception $e) {
|
||||
return back()->withErrors(['error' => 'Proses Hitung Data dari Produsen Aktivitas gagal disimpan. Silakan coba lagi. Error: ' . $e->getMessage()]);
|
||||
}
|
||||
}
|
||||
|
||||
public function grid(Request $request)
|
||||
{
|
||||
$_data = [];
|
||||
|
||||
$data = $this->service->getRawAll();
|
||||
|
||||
foreach ($data->get() as $key => $row) {
|
||||
|
||||
$status = SigdStatus::from($row->status);
|
||||
if ($row->finished_time === null || $row->executed_time === null) {
|
||||
$duration = '';
|
||||
}
|
||||
|
||||
// Parse the date-time strings into Carbon instances
|
||||
$start = Carbon::parse($row->executed_time);
|
||||
$end = Carbon::parse($row->finished_time);
|
||||
|
||||
// Calculate the difference in seconds
|
||||
$diffInSeconds = $start->diffInSeconds($end);
|
||||
|
||||
// Format the duration as HH:MM:SS
|
||||
$hours = floor($diffInSeconds / 3600);
|
||||
$minutes = floor(($diffInSeconds % 3600) / 60);
|
||||
$seconds = $diffInSeconds % 60;
|
||||
|
||||
$duration = sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds);
|
||||
|
||||
|
||||
$_data[] = [
|
||||
'no' => $key+1,
|
||||
'inventory_year' => $row->inventory_year,
|
||||
'status' => $status->badge() ?? '',
|
||||
'finished_time' => @$row->finished_time ? date('d-m-Y H:i:s', strtotime(@$row->finished_time)) : '',
|
||||
'executed_time' => @$row->executed_time ? date('d-m-Y H:i:s', strtotime(@$row->executed_time)) : '',
|
||||
'created_at' => @$row->created_at ? date('d-m-Y H:i:s', strtotime(@$row->created_at)) : '',
|
||||
'duration' => $duration,
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
return response()->json($_data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ class ActivityYearSelect extends Component
|
|||
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.activity-year-select');
|
||||
return view('modules.components.activity-year-select');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ class InventoryYearSelect extends Component
|
|||
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.inventory-year-select');
|
||||
return view('modules.components.inventory-year-select');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
@section('js')
|
||||
@push('js')
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
$('#inventoryYear').on('change', function() {
|
||||
|
|
@ -35,4 +35,4 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@endpush
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
@endphp
|
||||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;width: 700px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th class="align-middle" width="50%">Kategori</th>
|
||||
<th width="120">CO<sub>2</sub><br>(Gg)</th>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
@if ($gpcOutput)
|
||||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th rowspan="2" class="align-middle" style="width: 300px;">Sectors and Subsectors</th>
|
||||
<th colspan="2">Direct Emissions (tCO2e)</th>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-bordered">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th colspan="2" style="width: 35%;">Notation Key</th>
|
||||
<th>Deskripsi dan Contoh</th>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th rowspan="2" class="align-middle" style="width: 400px;">Sectors and Subsectors</th>
|
||||
<th colspan="2" class="align-middle" style="width: 350px;">Direct Emissions (tCO2e)</th>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Populasi</th>
|
||||
|
|
|
|||
|
|
@ -22,18 +22,6 @@
|
|||
</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if ($errors->has('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ $errors->first('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form id="worksheetForm" method="GET">
|
||||
@csrf
|
||||
<div class="row">
|
||||
|
|
@ -45,64 +33,66 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-2 pr-1">
|
||||
<div class="form-group">
|
||||
<label for="category">Sektor:</label>
|
||||
<div class="input-group">
|
||||
<select name="category" id="category" class="form-control">
|
||||
<option value="">Sektor</option>
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{ $category->code }}"
|
||||
{{ $sectorCode == $category->code ? 'selected' : '' }}>
|
||||
{{ $category->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="col-12 mt-2">
|
||||
<div class="row">
|
||||
<div class="col-lg-2 pr-1">
|
||||
<div class="form-group">
|
||||
<label for="category">Sektor:</label>
|
||||
<div class="input-group">
|
||||
<select name="category" id="category" class="form-control">
|
||||
<option value="">Sektor</option>
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{ $category->code }}"
|
||||
{{ $sectorCode == $category->code ? 'selected' : '' }}>
|
||||
{{ $category->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 pr-1">
|
||||
<div class="form-group">
|
||||
<label for="worksheet">Worksheet:</label>
|
||||
<div class="input-group">
|
||||
<select name="worksheet" id="worksheet" class="form-control">
|
||||
<option value="">Pilih Worksheet</option>
|
||||
@foreach ($worksheets as $worksheet)
|
||||
<option value="{{ $worksheet->ws_code }}"
|
||||
{{ $wsCode == $worksheet->ws_code ? 'selected' : '' }}>
|
||||
{{ $worksheet->ws_code }} - {{ $worksheet->ws_title }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 pr-1">
|
||||
<div class="form-group">
|
||||
<label for="worksheet">Worksheet:</label>
|
||||
<div class="input-group">
|
||||
<select name="worksheet" id="worksheet" class="form-control">
|
||||
<option value="">Pilih Worksheet</option>
|
||||
@foreach ($worksheets as $worksheet)
|
||||
<option value="{{ $worksheet->ws_code }}"
|
||||
{{ $wsCode == $worksheet->ws_code ? 'selected' : '' }}>
|
||||
{{ $worksheet->ws_code }} - {{ $worksheet->ws_title }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 d-flex align-items-end align-items-center pt-1 pr-1">
|
||||
<div class="col-lg-4 d-flex align-items-end align-items-center pt-1 pr-1 gap-2">
|
||||
<div class="form-group mt-2 mb-0 mr-2">
|
||||
<button type="submit" class="btn btn-info">Tampilkan</button>
|
||||
</div>
|
||||
<div class="form-group mt-2 mb-0">
|
||||
<a href="{{ route('worksheet.export', [
|
||||
<a href="{{ route($route.'.export', [
|
||||
'inventoryYear' => $inventoryYear,
|
||||
'activityYear' => $activityYear,
|
||||
'sectorCode' => $sectorCode,
|
||||
'wsCode' => $wsCode,
|
||||
]) }}"
|
||||
class="btn btn-info">Ekspor Excel</a>
|
||||
class="btn btn-success">Ekspor Excel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
@if (\Illuminate\Support\Facades\File::exists(resource_path('views/reports/worksheet/tables/' . ($wsData ? $wsData->ws_code : 'test') . '.blade.php')))
|
||||
@include('reports.worksheet.tables.' . $wsData->ws_code)
|
||||
@if (\Illuminate\Support\Facades\File::exists(resource_path('views/modules/reports/worksheet/tables/' . ($wsData ? $wsData->ws_code : 'test') . '.blade.php')))
|
||||
@include('modules.reports.worksheet.tables.' . $wsData->ws_code)
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script>
|
||||
|
|
@ -125,13 +115,12 @@
|
|||
var actionUrl = updateFormAction();
|
||||
window.location.href = actionUrl;
|
||||
});
|
||||
|
||||
$('#category').change(function() {
|
||||
$('#category').on('change',function(){
|
||||
var sectorCode = $(this).val();
|
||||
var options = '<option value="">Pilih Worksheet</option>';
|
||||
$('#worksheet').html(options).val('');
|
||||
$.ajax({
|
||||
url: '{{ route('ws.getWorksheetsBySector') }}',
|
||||
url: '{{ route('modules.laporan.ws.getWorksheetsBySector') }}',
|
||||
method: 'GET',
|
||||
data: {
|
||||
sector: sectorCode
|
||||
|
|
@ -156,7 +145,7 @@
|
|||
var sectorCode = $('#category').val() || '';
|
||||
var worksheetCode = $('#worksheet').val() || '';
|
||||
|
||||
var actionUrl = `{{ url('reports/worksheet') }}/${inventoryYear}`;
|
||||
var actionUrl = `{{ url('laporan/worksheet') }}/${inventoryYear}`;
|
||||
if (activityYear) actionUrl += `/${activityYear}`;
|
||||
if (sectorCode) actionUrl += `/${sectorCode}`;
|
||||
if (worksheetCode) actionUrl += `/${worksheetCode}`;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
<p></p>
|
||||
</div>
|
||||
|
||||
@if (\Illuminate\Support\Facades\File::exists(resource_path('views/reports/worksheet/tables/' . ($wsData ? $wsData->ws_code : 'test') . '.blade.php')))
|
||||
@include('reports.worksheet.tables.' . $wsData->ws_code)
|
||||
@if (\Illuminate\Support\Facades\File::exists(resource_path('views/modules/reports/worksheet/tables/' . ($wsData ? $wsData->ws_code : 'test') . '.blade.php')))
|
||||
@include('modules.reports.worksheet.tables.' . $wsData->ws_code)
|
||||
@endif
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th colspan="3">Energy Consumption</th>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.1A1a')
|
||||
@include('modules.reports.worksheet.tables.1A1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.1A1a')
|
||||
@include('modules.reports.worksheet.tables.1A1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.1A1a')
|
||||
@include('modules.reports.worksheet.tables.1A1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.1A1a')
|
||||
@include('modules.reports.worksheet.tables.1A1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.1A1a')
|
||||
@include('modules.reports.worksheet.tables.1A1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.1A1a')
|
||||
@include('modules.reports.worksheet.tables.1A1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.1A1a')
|
||||
@include('modules.reports.worksheet.tables.1A1a')
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th rowspan="3">Species / Livestock Category</th>
|
||||
<th>Number of Animals</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th rowspan="3">Species / Livestock Category</th>
|
||||
<th>Number of Animals</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th rowspan="3">Species / Livestock Category</th>
|
||||
<th>Number of Animals</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th rowspan="2">Island</th>
|
||||
<th rowspan="2">Before</th>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.3B1a')
|
||||
@include('modules.reports.worksheet.tables.3B1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.3B1a')
|
||||
@include('modules.reports.worksheet.tables.3B1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.3B1a')
|
||||
@include('modules.reports.worksheet.tables.3B1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.3B1a')
|
||||
@include('modules.reports.worksheet.tables.3B1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.3B1a')
|
||||
@include('modules.reports.worksheet.tables.3B1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.3B1a')
|
||||
@include('modules.reports.worksheet.tables.3B1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.3B1a')
|
||||
@include('modules.reports.worksheet.tables.3B1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.3B1a')
|
||||
@include('modules.reports.worksheet.tables.3B1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.3B1a')
|
||||
@include('modules.reports.worksheet.tables.3B1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.3B1a')
|
||||
@include('modules.reports.worksheet.tables.3B1a')
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.3B1a')
|
||||
@include('modules.reports.worksheet.tables.3B1a')
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th rowspan="4"></th>
|
||||
<th>Area Burnt</th>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.3C1a')
|
||||
@include('modules.reports.worksheet.tables.3C1a')
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th rowspan="4">Subcategories for reporting year</th>
|
||||
<th>Annual amount of Urea Fertilization</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th rowspan="4" colspan="2">Anthropogenic N input type</th>
|
||||
<th colspan="2">Annual amount of N applied</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th rowspan="4">Anthropogenic N input type</th>
|
||||
<th>Annual amount of synthetic fertilizer N applied to soils</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th rowspan="3">Species / Livestock Category</th>
|
||||
<th>Total nitrogen excretion for the MMS</th>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
@endphp
|
||||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<!-- <th></th> -->
|
||||
<th>Unmanaged, Shallow</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Terangkut ke TPA<br>Gg</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Sisa Makanan<br>%</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Sisa Makanan<br>Gg</th>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
@endphp
|
||||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th>Year</th>
|
||||
<th>Amount deposited</th>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.4A-e', [$activity = 'kertas'])
|
||||
@include('modules.reports.worksheet.tables.4A-e', [$activity = 'kertas'])
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.4A-e', [$activity = 'nappies'])
|
||||
@include('modules.reports.worksheet.tables.4A-e', [$activity = 'nappies'])
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.4A-e', [$activity = 'taman'])
|
||||
@include('modules.reports.worksheet.tables.4A-e', [$activity = 'taman'])
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.4A-e', [$activity = 'kayu'])
|
||||
@include('modules.reports.worksheet.tables.4A-e', [$activity = 'kayu'])
|
||||
|
|
@ -1 +1 @@
|
|||
@include('reports.worksheet.tables.4A-e', [$activity = 'tekstil'])
|
||||
@include('modules.reports.worksheet.tables.4A-e', [$activity = 'tekstil'])
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>A</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>A</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>A</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>A</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th>Jenis Sampah / Tahun</th>
|
||||
<th>Total Amount of Waste open-burned<br>(Wet Weight)<br>(Gg Waste)</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th>Type of Waste / Tahun</th>
|
||||
<th>Total Amount of Waste Open-burned (Wet Weight)<br>(Gg Sampah)</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th>Type of Waste / Tahun</th>
|
||||
<th>Total Amount of Waste Open-burned (Wet Weight)<br>(Gg Sampah)</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>A</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>A</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>A</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
||||
<thead class="bg-header text-white text-center">
|
||||
<thead class="table-info text-white text-center">
|
||||
|
||||
<tr>
|
||||
<th></th>
|
||||
|
|
|
|||
|
|
@ -1,44 +1,42 @@
|
|||
@extends('layouts.master')
|
||||
|
||||
@section('title', 'Hitung Data dari Produsen')
|
||||
|
||||
@section('content')
|
||||
{{-- <div class="container"> --}}
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h5 class="mb-0 font-weight-bold">Hitung Data dari Produsen</h5>
|
||||
<button type="button" class="btn btn-sm btn-primary float-right" data-toggle="modal" data-target="#lockModal">
|
||||
<h5 class="mb-0 font-weight-bold">{{ @$title }}</h5>
|
||||
<button type="button" class="btn btn-sm btn-primary float-right" data-bs-toggle="modal" data-bs-target="#lockModal">
|
||||
Hitung Data
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($errors->has('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ $errors->first('error') }}
|
||||
</div>
|
||||
@endif
|
||||
<div class="card-body">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table align-items-center mb-0 display" id="data-table" style="width:100%">
|
||||
<thead>
|
||||
<table class="table w-100"
|
||||
data-search="true"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-toolbar="#toolbar"
|
||||
data-show-refresh="false"
|
||||
data-url="{{route($route.'.grid')}}"
|
||||
data-ajax-options='{"xhrFields": {"withCredentials": true}}'
|
||||
data-sort-name="ids"
|
||||
data-sort-order="desc"
|
||||
data-page-size="10"
|
||||
data-id-field="id"
|
||||
id="grid-data">
|
||||
<thead class="table-primary text-primary">
|
||||
<tr>
|
||||
<th scope="col">Waktu Input</th>
|
||||
<th scope="col">Tahun Inventory</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col">Waktu Eksekusi</th>
|
||||
<th scope="col">Waktu Selesai</th>
|
||||
<th scope="col">Durasi</th>
|
||||
<th data-field="created_at">Waktu Input</th>
|
||||
<th data-field="inventory_year">Tahun Inventory</th>
|
||||
<th data-field="status">Status</th>
|
||||
<th data-field="executed_time">Waktu Eksekusi</th>
|
||||
<th data-field="finished_time">Waktu Selesai</th>
|
||||
<th data-field="duration">Durasi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -51,11 +49,8 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="lockModalLabel">Hitung Data dari Produsen</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="{{ route('produsenCalculate.store') }}" method="POST" id="lockForm">
|
||||
<form action="{{ route($route.'.store') }}" method="POST" id="lockForm">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
|
|
@ -73,7 +68,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Batal</button>
|
||||
<button type="submit" class="btn btn-primary">Hitung Data</button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -84,48 +79,7 @@
|
|||
|
||||
@section('js')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#data-table').DataTable({
|
||||
pageLength: 10,
|
||||
responsive: true,
|
||||
serverSide: true,
|
||||
scrollX: true,
|
||||
searchDelay: 1000,
|
||||
ajax: {
|
||||
url: '{{ route('produsenCalculate.index') }}',
|
||||
type: 'GET',
|
||||
dataSrc: 'data'
|
||||
},
|
||||
columns: [{
|
||||
data: 'created_at',
|
||||
name: 'created_at'
|
||||
},
|
||||
{
|
||||
data: 'inventory_year',
|
||||
name: 'inventory_year'
|
||||
},
|
||||
{
|
||||
data: 'status',
|
||||
name: 'status'
|
||||
},
|
||||
{
|
||||
data: 'executed_time',
|
||||
name: 'executed_time'
|
||||
},
|
||||
{
|
||||
data: 'finished_time',
|
||||
name: 'finished_time'
|
||||
},
|
||||
{
|
||||
data: 'duration',
|
||||
name: 'duration'
|
||||
},
|
||||
],
|
||||
order: [
|
||||
[0, 'desc']
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
$(document).on('click', 'form button', function(e) {
|
||||
|
|
|
|||
|
|
@ -204,10 +204,11 @@ Route::name('management.')->prefix('management')->group(function () {
|
|||
Route::get('salin-aktivitas/grid', [CopyActivityController::class, 'grid'])->name('salin-aktivitas.grid');
|
||||
Route::resource('salin-aktivitas', CopyActivityController::class)->only('index', 'store')->names('salin-aktivitas');
|
||||
|
||||
Route::get('hitung-produsen/grid', [ProdusenCalculateController::class, 'grid'])->name('hitung-produsen.grid');
|
||||
Route::resource('hitung-produsen', ProdusenCalculateController::class)->only('index', 'store')->names('hitung-produsen');
|
||||
});
|
||||
|
||||
Route::prefix('reports')->group(function () {
|
||||
Route::prefix('laporan')->name('laporan.')->group(function () {
|
||||
Route::get('worksheet/export', [WorksheetController::class, 'export'])->name('worksheet.export');
|
||||
Route::get('worksheet/{inventoryYear?}/{activityYear?}/{sectorCode?}/{wsCode?}', [WorksheetController::class, 'show'])->name('worksheet.show');
|
||||
|
||||
|
|
@ -230,7 +231,7 @@ Route::name('management.')->prefix('management')->group(function () {
|
|||
Route::resource('form/metadata', FormMetadataController::class)->only('index', 'store', 'destroy')->names('form.metadata');
|
||||
Route::get('form/aktivitas_user', [FormController::class, 'getUserActivities'])->name('form.aktivitasUser');
|
||||
|
||||
Route::get('ws/get_worksheets_by_sector', [WorksheetController::class, 'getWorksheetsBySector'])->name('ws.getWorksheetsBySector');
|
||||
Route::get('ws/get_worksheets_by_sector', [WorksheetController::class, 'getWorksheetsBySector'])->name('laporan.ws.getWorksheetsBySector');
|
||||
Route::get('activity_year_range', [CalculationController::class, 'getActivityYearRange'])->name('getActivityYearRange');
|
||||
Route::get('get_subsectors', [DataAktivitasController::class, 'fetchSubSectors'])->name('subsectors.fetch');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue