latest
This commit is contained in:
@@ -63,10 +63,13 @@
|
||||
@endhasrole
|
||||
@hasrole('operasi')
|
||||
<li class="{{ (request()->is('analisa/*')) ? 'active' : '' }}">
|
||||
<a href="#analisaSubmenu" data-toggle="collapse" aria-expanded="false" style="">Analisa</a>
|
||||
<a href="#analisaSubmenu" data-toggle="collapse" aria-expanded="false" style="">Simulasi</a>
|
||||
<ul class="list-unstyled collapse {{ (request()->is('analisa/*')) ? 'show' : '' }}" id="analisaSubmenu" >
|
||||
<li class="{{ (request()->is('analisa/janasimulasi/*') || request()->is('analisa/janasimulasi') ) ? 'active' : '' }}">
|
||||
<a href="{{url('analisa/janasimulasi')}}">Jana Analisa</a>
|
||||
<a href="{{url('analisa/janasimulasi')}}">Jana Simulasi</a>
|
||||
</li>
|
||||
<li class="{{ (request()->is('analisa/senaraisimulasi/*') || request()->is('analisa/senaraisimulasi') ) ? 'active' : '' }}">
|
||||
<a href="{{url('analisa/senaraisimulasi')}}">Senarai Simulasi</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
@endif
|
||||
<form id="exportform" action="{{route('sistem.export')}}" method="POST">
|
||||
<table class="table table-striped" id="roles">
|
||||
<table class="table table-striped" id="cawangan">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th><input type="checkbox" aria-label="Checkbox for following text input" onclick="selectall(this)"></th>
|
||||
@@ -178,14 +178,14 @@
|
||||
});
|
||||
}
|
||||
|
||||
var tablerole = $('#roles').DataTable({
|
||||
var tablecawangan = $('#cawangan').DataTable({
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 2,
|
||||
"targets": 8,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
@@ -196,9 +196,9 @@
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
{
|
||||
className: 'btn btn-outline-success pl-4 pr-4 btn-sm adduser',
|
||||
className: 'btn btn-outline-success pl-4 pr-4 btn-sm addcaw',
|
||||
text: '<i class="fas fa-plus" id="test"></i>',
|
||||
titleAttr: 'Tambah Role',
|
||||
titleAttr: 'Tambah Cawangan',
|
||||
action: function ( e, dt, node, config ) {
|
||||
// alert( 'Button activated' );
|
||||
// console.log('hye');
|
||||
@@ -220,15 +220,15 @@
|
||||
]
|
||||
});
|
||||
|
||||
$('.adduser').tooltip();
|
||||
$('.addcaw').tooltip();
|
||||
$('.export').tooltip();
|
||||
// $( '.dt-buttons').addClass('btn-group');
|
||||
$( '.adduser').removeClass('dt-button');
|
||||
$( '.addcaw').removeClass('dt-button');
|
||||
$( '.export').removeClass('dt-button');
|
||||
|
||||
|
||||
function selectall(cb) {
|
||||
tablerole.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
||||
tablecawangan.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
||||
$(this).prop('checked', cb.checked);
|
||||
})
|
||||
}
|
||||
|
||||
@@ -47,13 +47,8 @@
|
||||
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<form action="{{ route('pengguna.delete',$user->id) }}" method="POST" id="formdelpengguna-{{$user->id}}">
|
||||
@csrf
|
||||
{{-- <input type="userid" value="{{$user->id}}"> --}}
|
||||
<a href="{{ route('pengguna.show',$user->id) }}"><i class="far fa-edit"></i></a>
|
||||
{{-- <a href="{{ route('pengguna.show',$user->id) }}"><i class="far fa-eye"></i></a> --}}
|
||||
<a onclick="confirm({{$user->id}})"><i class="far fa-trash-alt"></i></a>
|
||||
</form>
|
||||
<a href="{{ route('pengguna.show',$user->id) }}"><i class="far fa-edit"></i></a>
|
||||
<a class="confirmdel" href="{{ route('pengguna.delete',$user->id) }}"><i class="far fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@@ -66,9 +61,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function confirm(id) {
|
||||
// console.log(id);
|
||||
$.confirm({
|
||||
$('a.confirmdel').confirm({
|
||||
title: 'Confirmation',
|
||||
content: 'Anda pasti?',
|
||||
type: 'orange',
|
||||
@@ -77,7 +70,7 @@
|
||||
Delete: {
|
||||
btnClass: 'btn-warning',
|
||||
action: function () {
|
||||
$("#formdelpengguna-"+id).submit();
|
||||
location.href = this.$target.attr('href');
|
||||
}
|
||||
},
|
||||
Batal: {
|
||||
@@ -86,7 +79,6 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var tablepengguna = $('#pengguna').DataTable( {
|
||||
|
||||
@@ -27,14 +27,8 @@
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>{{ $role->description }}</td>
|
||||
<td class="text-center">
|
||||
<form action="{{ route('pengguna.deleterole',$role->id) }}" method="POST" id="formdelrole-{{$role->id}}">
|
||||
@csrf
|
||||
<a href="{{ route('pengguna.showrole',$role->id) }}"><i class="far fa-edit"></i></a>
|
||||
{{-- <a href="{{ route('pengguna.showrole',$role->id) }}"><i class="far fa-eye"></i></a> --}}
|
||||
<a onclick="confirm({{$role->id}})"><i class="far fa-trash-alt"></i></a>
|
||||
</form>
|
||||
{{-- <a class="btn btn-info" href="{{ route('pengguna.showtaraf',$role->id) }}">Edit</a> --}}
|
||||
|
||||
<a href="{{ route('pengguna.showrole',$role->id) }}"><i class="far fa-edit"></i></a>
|
||||
<a class="confirmdel" href="{{ route('pengguna.deleterole',$role->id) }}"><i class="far fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@@ -82,9 +76,7 @@
|
||||
function newrole() {
|
||||
$("#formnewrole").submit();
|
||||
}
|
||||
function confirm(id) {
|
||||
// console.log(id);
|
||||
$.confirm({
|
||||
$('a.confirmdel').confirm({
|
||||
title: 'Confirmation',
|
||||
content: 'Anda pasti?',
|
||||
type: 'orange',
|
||||
@@ -93,7 +85,7 @@
|
||||
Delete: {
|
||||
btnClass: 'btn-warning',
|
||||
action: function () {
|
||||
$("#formdelrole-"+id).submit();
|
||||
location.href = this.$target.attr('href');
|
||||
}
|
||||
},
|
||||
Batal: {
|
||||
@@ -102,7 +94,6 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var tablerole = $('#roles').DataTable({
|
||||
"columnDefs": [
|
||||
|
||||
@@ -32,12 +32,8 @@
|
||||
@endforeach
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<form action="{{ route('pengguna.deletetaraf',$role->id) }}" method="POST" id="checkboxdata">
|
||||
@csrf
|
||||
<a href="{{ route('pengguna.showtaraf',$role->id) }}"><i class="far fa-edit"></i></a>
|
||||
{{-- <a href="{{ route('pengguna.showtaraf',$role->id) }}"><i class="far fa-eye"></i></a> --}}
|
||||
<a onclick="confirm({{$role->id}})"><i class="far fa-trash-alt"></i></a>
|
||||
</form>
|
||||
<a href="{{ route('pengguna.showtaraf',$role->id) }}"><i class="far fa-edit"></i></a>
|
||||
<a class="confirmdel" href="{{ route('pengguna.deletetaraf',$role->id) }}"><i class="far fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@@ -50,9 +46,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function confirm(id) {
|
||||
// console.log(id);
|
||||
$.confirm({
|
||||
$('a.confirmdel').confirm({
|
||||
title: 'Confirmation',
|
||||
content: 'Anda pasti?',
|
||||
type: 'orange',
|
||||
@@ -61,16 +55,15 @@
|
||||
Delete: {
|
||||
btnClass: 'btn-warning',
|
||||
action: function () {
|
||||
$("#formdeltaraf-"+id).submit();
|
||||
location.href = this.$target.attr('href');
|
||||
}
|
||||
},
|
||||
Batal: {
|
||||
btnClass: 'btn-default',
|
||||
action: function () {}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var tabletaraf = $('#taraf').DataTable({
|
||||
"columnDefs": [
|
||||
|
||||
@@ -5,23 +5,24 @@
|
||||
<div class="row ">
|
||||
<div class="col-md-12 mx-auto card">
|
||||
<h3 class="pt-3">Simulasi</h3>
|
||||
<form action="" method="POST">
|
||||
<form action="{{route('analisa.janadata')}}" method="POST">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label for="inputEmail3" class="col-sm-1 col-form-label">Tarikh</label>
|
||||
<label for="tarikh_lelong" class="col-sm-1 col-form-label">Tarikh</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="date" class="form-control" id="inputEmail3" placeholder="Tarikh">
|
||||
<input type="date" class="form-control" id="tarikh_lelong" name="tarikh_lelong" placeholder="Tarikh">
|
||||
</div>
|
||||
<label for="inputEmail3" class="col-sm-1 col-form-label">Harga Emas Asas</label>
|
||||
<label for="hargaasas" class="col-sm-1 col-form-label">Harga Emas Asas</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="inputEmail3" placeholder="RM">
|
||||
<input type="text" class="form-control" id="hargaasas" name="hargaasas" placeholder="RM">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputPassword3" class="col-sm-1 col-form-label">JBG</label>
|
||||
<label for="jbg" class="col-sm-1 col-form-label">JBG</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="inputPassword3" placeholder="JBG">
|
||||
<input type="text" class="form-control" id="jbg" name="jbg" placeholder="JBG">
|
||||
</div>
|
||||
<label for="inputEmail3" class="col-sm-1 col-form-label">Cawangan</label>
|
||||
<label for="caw" class="col-sm-1 col-form-label">Cawangan</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" name="caw" id="caw">
|
||||
<option value="">Please select</option>
|
||||
@@ -34,14 +35,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputPassword3" class="col-sm-1 col-form-label">Caj Lelong</label>
|
||||
<label for="cajlelong" class="col-sm-1 col-form-label">Caj Lelong</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="inputPassword3" placeholder="Caj Lelong">
|
||||
<input type="text" class="form-control" id="cajlelong" name="cajlelong" placeholder="%">
|
||||
</div>
|
||||
<label for="inputEmail3" class="col-sm-1 col-form-label">Upah</label>
|
||||
{{-- <label for="inputEmail3" class="col-sm-1 col-form-label">Upah</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="inputEmail3" placeholder="Upah">
|
||||
</div>
|
||||
</div> --}}
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-md-11 mx-auto card p-4">
|
||||
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success">
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
<form id="exportform" action="" method="POST">
|
||||
<input type="hidden" name="type" value="User">
|
||||
<table class="table table-striped table-xl" id="simulasi" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th><input type="checkbox" aria-label="Checkbox for following text input" onclick="selectall(this)"></th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Harga Emas Asas</th>
|
||||
<th>JBG</th>
|
||||
<th>Caj Lelong</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($simulasi as $sim)
|
||||
<tr>
|
||||
<td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $sim->id }}"></td>
|
||||
<td>{{ $sim->tarikh_lelong }}</td>
|
||||
<td>{{ $sim->harga_emas_asas }}</td>
|
||||
<td>{{ $sim->jbg }}</td>
|
||||
<td>{{ $sim->cajlelong }}</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ route('analisa.showsimulasi',$sim->id) }}"><i class="far fa-edit"></i></a>
|
||||
{{-- <a href="{{ route('sistem.showConn',$data->id) }}"><i class="far fa-eye"></i></a> --}}
|
||||
<a class="confirmdel" href="{{ route('analisa.deletesimulasi',$sim->id) }}"><i class="far fa-trash-alt"></i></a>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('a.confirmdel').confirm({
|
||||
title: 'Confirmation',
|
||||
content: 'Anda pasti?',
|
||||
type: 'orange',
|
||||
typeAnimated: true,
|
||||
buttons: {
|
||||
Delete: {
|
||||
btnClass: 'btn-warning',
|
||||
action: function () {
|
||||
location.href = this.$target.attr('href');
|
||||
}
|
||||
},
|
||||
Batal: {
|
||||
btnClass: 'btn-default',
|
||||
action: function () {}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var tablesimulasi = $('#simulasi').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 5,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
// 'copy', 'excel', 'pdf'
|
||||
// { text: 'copy', className: 'btn btn-primary' },
|
||||
{
|
||||
className: 'btn btn-outline-success pl-4 pr-4 btn-sm addsim',
|
||||
text: '<i class="fas fa-plus" id="test"></i>',
|
||||
titleAttr: 'Tambah Simulasi',
|
||||
action: function ( e, dt, node, config ) {
|
||||
alert( 'Button activated' );
|
||||
}
|
||||
},
|
||||
{
|
||||
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
|
||||
titleAttr: 'Export to CSV',
|
||||
text: '<i class="fas fa-download"></i>',
|
||||
action: function ( e, dt, node, config ) {
|
||||
$("#exportform").submit();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('.addsim').tooltip();
|
||||
$('.export').tooltip();
|
||||
// $( '.dt-buttons').addClass('btn-group');
|
||||
$( '.addsim').removeClass('dt-button');
|
||||
$( '.export').removeClass('dt-button');
|
||||
|
||||
|
||||
function selectall(cb) {
|
||||
tablesimulasi.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
||||
$(this).prop('checked', cb.checked);
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,130 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-md-11 mx-auto card p-4">
|
||||
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success">
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
{{$arraycaw[0]->cawangan }}
|
||||
<form id="exportform" action="" method="POST">
|
||||
<input type="hidden" name="type" value="User">
|
||||
<table class="table table-striped table-xl" id="simulasi" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Cawangan</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Bil Marhun (Paket)</th>
|
||||
<th>Berat (gm)</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>Pinjaman (RM)</th>
|
||||
<th>Upah (RM)</th>
|
||||
<th>Harga Asas (RM)</th>
|
||||
<th>Caj Lelong (RM)</th>
|
||||
<th>Rugi Lelong (RM)</th>
|
||||
<th>Baki Lelong (RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($arraycaw as $caw)
|
||||
<tr>
|
||||
<td>{{ $caw->cawangan }}</td>
|
||||
<td>{{ $caw->t_lelong }}</td>
|
||||
<td>{{ $caw->bil_marhun }}</td>
|
||||
<td>{{ $caw->berat }}</td>
|
||||
<td>{{ $caw->n_marhun }}</td>
|
||||
<td>{{ $caw->pinjaman }}</td>
|
||||
<td>{{ $caw->upah }}</td>
|
||||
<td>{{ $caw->hargaasas }}</td>
|
||||
<td>{{ $caw->cajlelong }}</td>
|
||||
<td>{{ $caw->rugilelong }}</td>
|
||||
<td>{{ $caw->bakilelong }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('a.confirmdel').confirm({
|
||||
title: 'Confirmation',
|
||||
content: 'Anda pasti?',
|
||||
type: 'orange',
|
||||
typeAnimated: true,
|
||||
buttons: {
|
||||
Delete: {
|
||||
btnClass: 'btn-warning',
|
||||
action: function () {
|
||||
location.href = this.$target.attr('href');
|
||||
}
|
||||
},
|
||||
Batal: {
|
||||
btnClass: 'btn-default',
|
||||
action: function () {}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var tablesimulasi = $('#simulasi').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 5,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
// 'copy', 'excel', 'pdf'
|
||||
// { text: 'copy', className: 'btn btn-primary' },
|
||||
{
|
||||
className: 'btn btn-outline-success pl-4 pr-4 btn-sm addsim',
|
||||
text: '<i class="fas fa-plus" id="test"></i>',
|
||||
titleAttr: 'Tambah Simulasi',
|
||||
action: function ( e, dt, node, config ) {
|
||||
alert( 'Button activated' );
|
||||
}
|
||||
},
|
||||
{
|
||||
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
|
||||
titleAttr: 'Export to CSV',
|
||||
text: '<i class="fas fa-download"></i>',
|
||||
action: function ( e, dt, node, config ) {
|
||||
$("#exportform").submit();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('.addsim').tooltip();
|
||||
$('.export').tooltip();
|
||||
// $( '.dt-buttons').addClass('btn-group');
|
||||
$( '.addsim').removeClass('dt-button');
|
||||
$( '.export').removeClass('dt-button');
|
||||
|
||||
|
||||
function selectall(cb) {
|
||||
tablesimulasi.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
||||
$(this).prop('checked', cb.checked);
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user