93 lines
4.6 KiB
PHP
93 lines
4.6 KiB
PHP
@extends('layouts.master')
|
|
|
|
@section('title', 'Tambah Kalkulasi Emisi')
|
|
|
|
@section('content')
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-8">
|
|
<div class="card shadow-sm">
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
<h5 class="mb-0 font-weight-bold">Tambah Kalkulasi Emisi</h5>
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
@if ($errors->has('error'))
|
|
<div class="alert alert-danger">
|
|
{{ $errors->first('error') }}
|
|
</div>
|
|
@endif
|
|
|
|
|
|
<form action="{{ route('calculation.store') }}" method="POST">
|
|
@csrf
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
<label for="inventory_year">Tahun Inventory</label>
|
|
<div class="input-group">
|
|
<select name="inventory_year" id="inventory_year" class="form-control">
|
|
@for ($year = date('Y'); $year >= 2000; $year--)
|
|
<option value="{{ $year }}"
|
|
{{ old('inventory_year', date('Y')) == $year ? 'selected' : '' }}>
|
|
{{ $year }}
|
|
</option>
|
|
@endfor
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Sektor</label>
|
|
<div class="d-flex flex-wrap">
|
|
<div class="form-check mr-3">
|
|
<input type="checkbox" name="energy" id="energy" class="form-check-input"
|
|
value="1" {{ old('energy', 1) == 1 ? 'checked' : '' }}>
|
|
<label class="form-check-label" for="energy">Energi</label>
|
|
</div>
|
|
<div class="form-check mr-3">
|
|
<input type="checkbox" name="agriculture" id="agriculture" class="form-check-input"
|
|
value="1" {{ old('agriculture', 1) == 1 ? 'checked' : '' }}>
|
|
<label class="form-check-label" for="agriculture">Pertanian</label>
|
|
</div>
|
|
<div class="form-check mr-3">
|
|
<input type="checkbox" name="folu" id="folu" class="form-check-input"
|
|
value="1" {{ old('folu', 1) == 1 ? 'checked' : '' }}>
|
|
<label class="form-check-label" for="folu">Lahan</label>
|
|
</div>
|
|
<div class="form-check mr-3">
|
|
<input type="checkbox" name="waste" id="waste" class="form-check-input"
|
|
value="1" {{ old('waste', 1) == 1 ? 'checked' : '' }}>
|
|
<label class="form-check-label" for="waste">Limbah</label>
|
|
</div>
|
|
<div class="form-check">
|
|
<input type="checkbox" name="ippu" id="ippu" class="form-check-input"
|
|
value="1" {{ old('ippu', 1) == 1 ? 'checked' : '' }}>
|
|
<label class="form-check-label" for="ippu">IPPU</label>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<a href="{{ route('calculation.index') }}" class="btn btn-secondary">Kembali</a>
|
|
<button type="submit" class="btn btn-primary">Simpan</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{{-- </div> --}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@section('js')
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#inventory_year').select2({
|
|
placeholder: 'Pilih Tahun',
|
|
// allowClear: true,
|
|
});
|
|
});
|
|
</script>
|
|
@endsection
|