168 lines
6.6 KiB
PHP
168 lines
6.6 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container-fluid">
|
|
<div class="row ">
|
|
<div class="col">
|
|
<div class="card">
|
|
<div class="card-header header-style">
|
|
<div class="header-style-title">
|
|
senarai simulasi
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
@if ($message = Session::get('success'))
|
|
<div class="alert alert-success">
|
|
{{ $message }}
|
|
</div>
|
|
@endif
|
|
<form id="exportform" action="" method="POST">
|
|
<input type="hidden" name="type" value="User">
|
|
<div style="overflow-x: auto;">
|
|
<table class="table table-bordered text-center" id="simulasi">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th>No</th>
|
|
<th>Batch Lelong</th>
|
|
<th>Tarikh Lelong</th>
|
|
<th>Fasa</th>
|
|
<th>Cawangan</th>
|
|
<th>Harga Asas (RM)</th>
|
|
<th>Tindakan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($simulasiAll as $simulasi)
|
|
<tr>
|
|
@php
|
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $simulasi->tarikh_lelong );
|
|
$t_lelong = $myDateTime->format('d-m-Y');
|
|
@endphp
|
|
<td>{{$loop->iteration}}</td>
|
|
<td>{{$simulasi->id}}</td>
|
|
<td>{{$t_lelong}}</td>
|
|
<td>{{$simulasi->fasa}}</td>
|
|
<td>
|
|
@foreach($simulasi->cawangan as $caw)
|
|
<div class="row m-1 justify-content-center">
|
|
<span class="badge badge-pill badge-info text-white" style="font-size:100%">{{$caw->caw_name}}</span>
|
|
</div>
|
|
@endforeach
|
|
</td>
|
|
<td>{{$simulasi->harga_emas_asas}}</td>
|
|
<td>
|
|
<div class="row justify-content-center">
|
|
<a class="confirmrefresh btn m-1 btn-warning" href="{{ route('analisa.kemaskinidata',$simulasi->id) }}" data-toggle="tooltip" data-placement="top" title="Kemaskini Simulasi"><i class="fas fa-sync-alt"></i></a>
|
|
<a class="btn m-1 btn-primary" href="{{ route('analisa.show',$simulasi->id) }}" data-toggle="tooltip" data-placement="top" title="Butiran Simulasi"><i class="far fa-edit"></i></a>
|
|
<a class="confirmdel btn m-1 btn-danger" href="{{ route('analisa.delete',$simulasi->id) }}" data-toggle="tooltip" data-placement="top" title="Padam Simulasi"><i class="far fa-trash-alt"></i></a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
|
|
</table>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(function() {
|
|
$('[data-toggle="tooltip"]').tooltip()
|
|
});
|
|
|
|
$('a.confirmdel').confirm({
|
|
title: 'Padam Simulasi',
|
|
content: 'Adakah anda pasti? Tindakan ini tidak dapat dikembalikan.',
|
|
icon: 'fa fa-exclamation-triangle',
|
|
type: 'red',
|
|
boxWidth: '500px',
|
|
useBootstrap: false,
|
|
typeAnimated: true,
|
|
buttons: {
|
|
|
|
Batal: {
|
|
btnClass: 'btn-default',
|
|
action: function() {}
|
|
},
|
|
Padam: {
|
|
btnClass: 'btn-red',
|
|
action: function() {
|
|
location.href = this.$target.attr('href');
|
|
$.dialog({
|
|
icon: 'fa fa-spinner fa-spin',
|
|
title: 'Dalam Proses !',
|
|
content: 'Halaman akan dikemaskini selepas proses selesai.',
|
|
closeIcon: false,
|
|
boxWidth: '500px',
|
|
useBootstrap: false,
|
|
});
|
|
}
|
|
},
|
|
}
|
|
});
|
|
$('a.confirmrefresh').confirm({
|
|
title: 'Kemaskini Simulasi',
|
|
content: 'Adakah anda pasti? Tindakan ini tidak dapat dikembalikan.',
|
|
icon: 'fa fa-exclamation-triangle',
|
|
type: 'orange',
|
|
boxWidth: '500px',
|
|
useBootstrap: false,
|
|
typeAnimated: true,
|
|
buttons: {
|
|
Batal: {
|
|
btnClass: 'btn-default',
|
|
action: function() {}
|
|
|
|
},
|
|
Kemaskini: {
|
|
btnClass: 'btn-orange',
|
|
action: function() {
|
|
location.href = this.$target.attr('href');
|
|
$.dialog({
|
|
icon: 'fa fa-spinner fa-spin',
|
|
title: 'Dalam Proses !',
|
|
content: 'Halaman akan dikemaskini selepas proses selesai.',
|
|
closeIcon: false,
|
|
boxWidth: '500px',
|
|
useBootstrap: false,
|
|
});
|
|
}
|
|
},
|
|
}
|
|
});
|
|
|
|
var tablesimulasi = $('#simulasi').DataTable({
|
|
"columnDefs": [{
|
|
"orderable": false,
|
|
"targets": 4
|
|
},
|
|
{
|
|
"orderable": false,
|
|
"targets": 6
|
|
}
|
|
],
|
|
"pageLength": 100,
|
|
});
|
|
|
|
|
|
|
|
$('.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 |