This commit is contained in:
Nur Izzati Zulkifli
2023-10-30 10:31:30 +08:00
14 changed files with 679 additions and 3 deletions
+2
View File
@@ -432,6 +432,8 @@ class HomeController extends Controller
return view('homeoperasikpi');
} else if ($user->hasRole('hr')) {
return view('homehr');
} else if ($user->hasRole('pemasaran')) {
return view('homepemasaran');
} else if ($user->hasRole('admin')) {
return view('homeadmin');
} else if ($user->hasRole('account')) {
@@ -1472,6 +1472,7 @@ class LelongController extends Controller
}
public function senaraimarhun($lelongid, $cawid){
$user = Auth::user();
$total_berat = 0;
$total_pinjaman = 0;
$total_upah = 0;
@@ -1547,6 +1548,7 @@ class LelongController extends Controller
'total_nilaimarhun',
'lelonglel',
'cawanganDetail',
'user',
'total_cazlelong'));
}
+67 -3
View File
@@ -32,6 +32,7 @@ use Illuminate\Support\Facades\Request as FacadesRequest;
use App\Models\TempPengesahan;
use DateTime;
use App\Models\LogUser;
use Illuminate\Support\Facades\Storage;
class MarhunController extends Controller
{
@@ -2598,14 +2599,77 @@ class MarhunController extends Controller
public function pengurusanGambarMarhun()
{
return view('pengurusangambar.index');
$lelong_all = Lelong::select('id', 'tarikh_lelong', 'fasa')->get();
foreach($lelong_all as $index => $lelong)
{
$date_convert = strtotime($lelong->tarikh_lelong);
$lelong_all[$index]['tarikh_lelong'] = date("d-m-Y", $date_convert);
}
return view('pengurusangambar.operasi', compact('lelong_all'));
}
public function galeriMarhun()
{
$user = Auth::user();
$kodcaw = Cawangan::select('id')->where('caw_code', $user->kodcaw)->first();
return view('pengurusangambar.galerimarhun', compact('kodcaw'));
$cawangan = Cawangan::with('lelong')->where('caw_code', $user->kodcaw)->first();
$caw_id = $cawangan->id;
$lelong_all = $cawangan->lelong;
foreach($lelong_all as $index => $lelong)
{
$date_convert = strtotime($lelong->tarikh_lelong);
$lelong_all[$index]['tarikh_lelong'] = date("d-m-Y", $date_convert);
$lelong_all[$index]['new_id'] = str_pad($lelong->id, 3, "0", STR_PAD_LEFT);
}
return view('pengurusangambar.cawangan', compact('caw_id', 'lelong_all'));
}
public function listCawangan(Request $request)
{
$cawangan_all = CawanganLelong::join('cawangan', 'cawangan_lelong.caw_id', '=', 'cawangan.id')
->where('lelong_id', $request->lelong_id)
->select('cawangan_lelong.caw_id', 'cawangan.caw_name')->get();
return response()->json($cawangan_all);
}
public function listLelongBid(Request $request)
{
$lelong_bid_all = LelongBid::with('fileMarhunMain')
->where('caw_id', $request->caw_id)
->where('lelong_id', $request->lelong_id)
->select(['id','norujukan', 'marhun', 'nilaimarhun', 'status_semak', 'berat', 'hargaasas'])
->get();
foreach ($lelong_bid_all as $index => $lelong_bid) {
$lelong_bid_all[$index]['nilaimarhun'] = number_format($lelong_bid->nilaimarhun, 2, '.', ',');
$lelong_bid_all[$index]['hargaasas'] = number_format($lelong_bid->hargaasas, 2, '.', ',');
if ($lelong_bid->fileMarhunMain != null) {
$directory = "/{$lelong_bid->norujukan}/overall_photo/";
$imageExtension = $lelong_bid->fileMarhunMain->file_type;
$marhunImageFileName = "overall.{$imageExtension}";
if (Storage::disk('marhun')->exists("{$directory}${marhunImageFileName}")) {
$marhun_photo = Storage::disk('marhun')->get("{$directory}${marhunImageFileName}");
$lelong_bid_all[$index]['fileMarhunMain']['gambar'] = base64_encode($marhun_photo);
} else {
$lelong_bid_all[$index]['fileMarhunMain']['gambar'] = 0;
}
}
}
$belum_semak = $lelong_bid_all->where('status_semak', 0)->count();
return response()->json([
"jumlah_surat" => $lelong_bid_all->count(),
"belum_semak" => $belum_semak,
"lelong_bid" => $lelong_bid_all,
]);
}
}
+12
View File
@@ -286,6 +286,10 @@ class RolesSeeder extends Seeder
$role13 = Role::create(['name' => 'hr']);
$role13->givePermissionTo('skoptugasan');
$role14 = Role::create(['name' => 'pemasaran']);
$role14->givePermissionTo('pengurusangambar');
$role14->givePermissionTo('pendaftaranbatch');
// $role3 = Role::create(['name' => 'Super-Admin']);
// gets all permissions via Gate::before rule; see AuthServiceProvider
@@ -398,5 +402,13 @@ class RolesSeeder extends Seeder
'user_type' => 1
]);
$user->assignRole($role13);
$user = \App\Models\User::factory()->create([
'name' => 'Pemasaran',
'username' => 'pemasaran',
'email' => 'pemasaran@example.com',
'user_type' => 1
]);
$user->assignRole($role14);
}
}
+16
View File
@@ -368,4 +368,20 @@ a.article:hover {
.user-info {
/* display: flex; */
}
.blink {
animation: blinker 0.6s linear infinite;
}
@keyframes blinker {
50% {
opacity: 0;
}
}
.unchecked {
border: 2px solid red !important;
border-start-start-radius: 7px;
border-start-end-radius: 7px;
}
+16
View File
@@ -0,0 +1,16 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-md-11 mx-auto">
<div class="card">
<div class="card-header">{{ __('Dashboard') }}</div>
<div class="card-body">
Selamat Datang
</div>
</div>
</div>
</div>
</div>
@endsection
@@ -1021,6 +1021,28 @@
@endhasrole
@hasrole('pembida')
@endhasrole
@hasrole('pemasaran')
<li class="{{ (request()->is('lelong/*') || request()->is('lelong/*')) ? 'active' : '' }}">
<a href="{{url('lelong/senarailelong')}}">
<div class="sidebar-menu-main-title">
<span class="material-symbols-rounded sidebar-menu-item-main">
published_with_changes
</span>
Senarai Lelong
</div>
</a>
</li>
<li class="{{ (request()->is('pengurusangambar/marhun') || request()->is('pengurusangambar/marhun/*')) ? 'active' : '' }}">
<a href="{{url('pengurusangambar/marhun')}}">
<div class="sidebar-menu-main-title">
<span class="material-symbols-rounded sidebar-menu-item-main">
gallery_thumbnail
</span>
Galeri Marhun
</div>
</a>
</li>
@endhasrole
</ul>
<div class="sidebar-footer">
<div class="sidebar-footer-content">Beta V1.0</div>
@@ -223,7 +223,9 @@
<td style="white-space: nowrap;">
{{-- <a class="btn m-1 btn-info" href="{{ route('lelong.showsimulasi',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Lihat Simulasi"><i class="far fa-edit"></i></a> --}}
<a class="btn m-1 btn-warning" href="{{ route('lelong.showlelongdone',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Lihat Senarai Lelong Selesai"><i class="far fa-calendar"></i></a>
@hasrole('operasi')
<a class="btn m-1 btn-success" href="{{ route('lelong.exportDataByCawangan',$lelong->id) }}" data-toggle="tooltip" data-placement="top" title="Export Data"><i class="fas fa-file-export"></i></a>
@endhasrole
</td>
</tr>
@endforeach
@@ -65,7 +65,9 @@
<table class="table text-right table-bordered" id="marhun" style="width:100%">
<thead class="bg-primary text-white">
<tr>
@hasrole('operasi')
<th>Tindakan</th>
@endhasrole
<th>No</th>
<th>No Rujukan</th>
{{-- <th>Nama Pelanggan</th> --}}
@@ -87,9 +89,11 @@
@endphp
@foreach ($marhuns as $index=> $marhun)
<tr>
@hasrole('operasi')
<td class="text-center">
<input type="checkbox" aria-label="Checkbox for following text input" id="checkboxdata[]" name="checkboxdata[]" value="{{ $marhun['norujukan'] }}">
</td>
@endhasrole
<td>{{$loop->iteration}}</td>
<td align = 'left' style="white-space: nowrap;">{{ $marhun['norujukan']}}</td>
{{-- <td align = 'left' style="white-space: nowrap;">{{ $marhun['nama']['nama']}}</td> --}}
@@ -128,7 +132,11 @@
<tfoot>
<tr>
{{-- <td align = 'right'></td> --}}
@if($user->hasRole('operasi'))
<td colspan="4"><b>JUMLAH KESELURUHAN</b></td>
@else
<td colspan="3"><b>JUMLAH KESELURUHAN</b></td>
@endif
<td align = 'right'><b><b>{{ number_format($total_berat, 2, '.', ',') }}</b></td>
<td align = 'right'><b>{{ number_format($total_nilaimarhun, 2, '.', ',') }}</b></td>
<td align = 'right'><b>{{ number_format($total_pinjaman, 2, '.', ',') }}</b></td>
@@ -145,10 +153,12 @@
</table>
@hasrole('operasi')
<div class="text-right pt-4">
{{-- <a href="{{ route('lelong.show',$lelongid) }}" class="btn btn-primary">Kembali</a> --}}
<button type="button" class="btn btn-danger" onclick="confirm()">Hapus</button>
</div>
@endhasrole
{{-- <a href="{{url('lelong/senarailelong')}}" class="btn btn-primary">Kembali</a> --}}
</form>
@@ -56,7 +56,9 @@
</div>
<div class="mb-3">
{{-- <a href=" {{ route('report.lelongreport',[$lelongid,$cawid]) }}" class="btn btn-outline-success">Muat Turun PDF</a> --}}
@hasrole('operasi')
<a href="{{ route('lelong.ubahrugilelong',[$lelongid,'cawid'=>$cawid]) }}" class="btn btn-primary">Ubah Rugi Lelong</a>
@endhasrole
</div>
<form id="deletesag" method="POST">
@csrf
@@ -28,7 +28,9 @@
<nav>
<div class="nav mb-3 nav-tabs" id="nav-tab" role="tablist">
<a class="nav-link active" id="nav-simulasi-tab" data-toggle="tab" href="#nav-simulasi" role="tab" aria-controls="nav-simulasi" aria-selected="true">Lelong</a>
@hasrole('operasi')
<a class="nav-link" id="nav-hargaasas-tab" data-toggle="tab" href="#nav-hargaasas" role="tab" aria-controls="nav-hargaasas" aria-selected="false">Harga Emas Asas</a>
@endhasrole
</div>
</nav>
<div class="tab-content" id="nav-tabContent">
@@ -0,0 +1,265 @@
@extends('layouts.app')
@section('content')
<link rel="stylesheet" href="{{ asset('css/viewer.min.css') }}">
<style>
.image-style {
display: grid;
justify-content: center;
align-items: center;
width: 245px;
height: 137.812px;
border-start-start-radius: 7px;
border-start-end-radius: 7px;
}
.marhun-div-style {
max-width: 225px;
margin: 0.5rem;
}
.icon-image {
font-size: 50px;
}
.false-style {
background: #fdf3f3;
}
.item-wrapper {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, auto));
gap: 1rem;
}
.item-main {
border: 1px solid #00000026;
margin: 10px;
border-start-start-radius: 8px;
border-start-end-radius: 8px;
}
.spinner-style {
display: flex;
justify-content: center;
align-items: center;
margin: 5rem 0;
}
</style>
<div class="container-fluid">
<div class="row ">
<div class="col mx-auto p-4">
<div class="card">
<div class="card-header header-style">
<div class="header-style-title">
Galeri Marhun
</div>
</div>
<div class="card-body">
<div>
<label>Pilih Batch Lelong</label>
<select class="custom-select" id="batchLelong">
<option value="null" selected>Batch Lelong</option>
@foreach ($lelong_all as $lelong)
<option value="{{ $lelong->id }}">{{ $lelong->id }}, {{ $lelong->tarikh_lelong }}
(fasa {{ $lelong->fasa }})
</option>
@endforeach
</select>
</div>
<div id="divCawangan" style="display: none" class="mt-3">
<label>Pilih Cawangan</label>
<div class="d-flex">
<select class="custom-select" id="cawanganLelong">
</select>
<button class="btn btn-primary d-flex text-nowrap" onclick="reloadListLelongBid()">Kemaskini
Data
Cawangan <span class="material-symbols-rounded">refresh</span></button>
</div>
</div>
<div class="spinner-style" id="divSpinner" style="display: none">
<div class="spinner-border text-primary" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<div class="mt-4">
<h6 id="divJumlahSurat" style="display: none">Jumlah Surat: <span id="text-jumlah-surat"></span>
</h6>
<h4 class="text-danger blink" id="divBelumSemak" style="display: none">Belum Semak: <span
id="text-belum-semak"></span></h4>
</div>
<div id="divGambar" style="display: none">
<div class="row justify-content-center" id="divComponentGambar">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
var cawId = '<?php echo $caw_id; ?>';
$('#batchLelong').on('change', function() {
var valBatch = $("#batchLelong").val();
console.log("1st function: " + valBatch);
if (valBatch != "null") {
$("#divGambar").attr("style", "display:block");
// $('#cawanganLelong').find('option')
// .remove()
// .end()
// .append('<option selected value="null">Pilih Cawangan</option>');
// $.ajax({
// url: '{{ route('pengurusangambar.listcawangan') }}',
// method: 'GET',
// data: {
// "lelong_id": valBatch,
// },
// }).done(function(response) {
// for (var data of response) {
// $('#cawanganLelong').append($('<option>', {
// value: data.caw_id,
// text: data.caw_name
// }));
// }
// }).fail(function(error) {
// alert(error);
// });
reloadListLelongBid();
} else {
// $("#divCawangan").attr("style", "display:none")
$("#divGambar").attr("style", "display:none")
$("#divJumlahSurat").attr("style", "display:none")
$("#divBelumSemak").attr("style", "display:none")
}
// $("#divGambar").attr("style", "display:none")
// $("#divJumlahSurat").attr("style", "display:none")
// $("#divBelumSemak").attr("style", "display:none")
});
$('#cawanganLelong').on('change', function() {
var valCawangan = $("#cawanganLelong").val();
var valBatchLelong = $("#batchLelong").val();
console.log("2nd function: caw_id -> " + valCawangan);
if (valCawangan != "null") {
reloadListLelongBid();
$("#divGambar").attr("style", "display:block")
} else {
$("#divGambar").attr("style", "display:none")
$("#divJumlahSurat").attr("style", "display:none")
$("#divBelumSemak").attr("style", "display:none")
}
});
function reloadListLelongBid() {
$("#divJumlahSurat").attr("style", "display:none")
$("#divBelumSemak").attr("style", "display:none")
var dataCawangan = cawId;
var dataBatchLelong = $("#batchLelong").val();
if (dataCawangan == 'null') {
$.alert({
title: 'Gagal',
content: 'Sila pilih cawangan terlebih dahulu.',
backgroundDismiss: true,
type: 'red',
buttons: {
Kembali: {
keys: ['enter']
},
}
});
return;
}
$("#divSpinner").attr("style", "display:flex")
$("#divComponentGambar").empty();
console.log('reloadcawangan:' + dataCawangan);
console.log('reloadbatchlelong:' + dataBatchLelong);
$.ajax({
url: '{{ route('pengurusangambar.listlelongbid') }}',
method: 'GET',
data: {
"lelong_id": dataBatchLelong,
"caw_id": dataCawangan,
},
}).done(function(response) {
$("#text-jumlah-surat").text(response.jumlah_surat);
$("#divJumlahSurat").attr("style", "display:block")
if (response.belum_semak != 0) {
$("#text-belum-semak").text(response.belum_semak);
$("#divBelumSemak").attr("style", "display:block")
} else {
$("#divBelumSemak").attr("style", "display:none")
}
console.log(response);
for (var dataLelBid of response.lelong_bid) {
const gambarComponent = document.createElement('div');
if (dataLelBid.file_marhun_main != null) {
if (dataLelBid.file_marhun_main.gambar == 0) {
gambarComponent.innerHTML = `
<div class="text-primary bg-light image-style">
<span class="material-symbols-rounded icon-image">
cycle
</span>
<div>No Image in Storage</div>
</div>
`;
} else {
gambarComponent.innerHTML = `
<div style='cursor:pointer'>
<img id='image` + dataLelBid.id + `' src='data:image/png;base64,` + dataLelBid
.file_marhun_main.gambar + `' class="image-style" alt="gambar-marhun">
</div>
`;
}
} else {
gambarComponent.innerHTML = `
<div class="text-danger false-style image-style">
<span class="material-symbols-rounded icon-image">
cancel
</span>
<div>Gambar Belum Di Muat Naik</div>
</div>
`;
}
if (dataLelBid.status_semak == 0) {
var statusSem = 'unchecked';
} else {
var statusSem = '';
}
const marhunComponent = document.createElement('div');
marhunComponent.innerHTML = `
<div class="item-wrapper">
<div class="item-main">
<div class="text-center ` + statusSem + `">
` + gambarComponent.innerHTML + `
<div class="my-2">` + dataLelBid.norujukan + `</div>
<div class="marhun-div-style">` + dataLelBid.marhun + `</div>
<div class="my-2">` + dataLelBid.berat + `g</div>
<div class="my-2"><strong>N. Marhun: </strong>RM` + dataLelBid.nilaimarhun + `</div>
<div class="my-2"><strong>H. Asas: </strong>RM` + dataLelBid.hargaasas + `</div>
</div>
</div>
</div>
`;
$('#divComponentGambar').append(marhunComponent);
if (dataLelBid.file_marhun_main != null && dataLelBid.file_marhun_main.gambar != 0) {
const viewer = new Viewer(document.getElementById('image' + dataLelBid.id), {
inline: false,
title: false,
});
}
}
$("#divSpinner").attr("style", "display:none")
}).fail(function(error) {
alert(error);
});
}
</script>
@endsection
@@ -0,0 +1,259 @@
@extends('layouts.app')
@section('content')
<link rel="stylesheet" href="{{ asset('css/viewer.min.css') }}">
<style>
.image-style {
display: grid;
justify-content: center;
align-items: center;
width: 245px;
height: 137.812px;
border-start-start-radius: 7px;
border-start-end-radius: 7px;
}
.marhun-div-style {
max-width: 225px;
margin: 0.5rem;
}
.icon-image {
font-size: 50px;
}
.false-style {
background: #fdf3f3;
}
.item-wrapper {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, auto));
gap: 1rem;
}
.item-main {
border: 1px solid #00000026;
margin: 10px;
border-start-start-radius: 8px;
border-start-end-radius: 8px;
}
.spinner-style {
display: flex;
justify-content: center;
align-items: center;
margin: 5rem 0;
}
</style>
<div class="container-fluid">
<div class="row ">
<div class="col mx-auto p-4">
<div class="card">
<div class="card-header header-style">
<div class="header-style-title">
Galeri Marhun
</div>
</div>
<div class="card-body">
<div>
<label>Pilih Batch Lelong</label>
<select class="custom-select" id="batchLelong">
<option value="null" selected>Batch Lelong</option>
@foreach ($lelong_all as $lelong)
<option value="{{ $lelong->id }}">{{ $lelong->id }}, {{ $lelong->tarikh_lelong }}
(fasa {{ $lelong->fasa }})
</option>
@endforeach
</select>
</div>
<div id="divCawangan" style="display: none" class="mt-3">
<label>Pilih Cawangan</label>
<div class="d-flex">
<select class="custom-select" id="cawanganLelong">
</select>
<button class="btn btn-primary d-flex text-nowrap" onclick="reloadListLelongBid()">Kemaskini
Data
Cawangan <span class="material-symbols-rounded">refresh</span></button>
</div>
</div>
<div class="spinner-style" id="divSpinner" style="display: none">
<div class="spinner-border text-primary" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<div class="mt-4">
<h6 id="divJumlahSurat" style="display: none">Jumlah Surat: <span id="text-jumlah-surat"></span>
</h6>
<h4 class="text-danger blink" id="divBelumSemak" style="display: none">Belum Semak: <span
id="text-belum-semak"></span></h4>
</div>
<div id="divGambar" style="display: none">
<div class="row justify-content-center" id="divComponentGambar">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$('#batchLelong').on('change', function() {
var valBatch = $("#batchLelong").val();
console.log("1st function: " + valBatch);
if (valBatch != "null") {
$("#divCawangan").attr("style", "display:block")
$('#cawanganLelong').find('option')
.remove()
.end()
.append('<option selected value="null">Pilih Cawangan</option>');
$.ajax({
url: '{{ route('pengurusangambar.listcawangan') }}',
method: 'GET',
data: {
"lelong_id": valBatch,
},
}).done(function(response) {
for (var data of response) {
$('#cawanganLelong').append($('<option>', {
value: data.caw_id,
text: data.caw_name
}));
}
}).fail(function(error) {
alert(error);
});
} else {
$("#divCawangan").attr("style", "display:none")
}
$("#divGambar").attr("style", "display:none")
$("#divJumlahSurat").attr("style", "display:none")
$("#divBelumSemak").attr("style", "display:none")
});
$('#cawanganLelong').on('change', function() {
var valCawangan = $("#cawanganLelong").val();
var valBatchLelong = $("#batchLelong").val();
console.log("2nd function: caw_id -> " + valCawangan);
if (valCawangan != "null") {
reloadListLelongBid();
$("#divGambar").attr("style", "display:block")
} else {
$("#divGambar").attr("style", "display:none")
$("#divJumlahSurat").attr("style", "display:none")
$("#divBelumSemak").attr("style", "display:none")
}
});
function reloadListLelongBid() {
$("#divJumlahSurat").attr("style", "display:none")
$("#divBelumSemak").attr("style", "display:none")
var dataCawangan = $("#cawanganLelong").val();
var dataBatchLelong = $("#batchLelong").val();
if (dataCawangan == 'null') {
$.alert({
title: 'Gagal',
content: 'Sila pilih cawangan terlebih dahulu.',
backgroundDismiss: true,
type: 'red',
buttons: {
Kembali: {
keys: ['enter']
},
}
});
return;
}
$("#divSpinner").attr("style", "display:flex")
$("#divComponentGambar").empty();
console.log('reloadcawangan:' + dataCawangan);
console.log('reloadbatchlelong:' + dataBatchLelong);
$.ajax({
url: '{{ route('pengurusangambar.listlelongbid') }}',
method: 'GET',
data: {
"lelong_id": dataBatchLelong,
"caw_id": dataCawangan,
},
}).done(function(response) {
$("#text-jumlah-surat").text(response.jumlah_surat);
$("#divJumlahSurat").attr("style", "display:block")
if (response.belum_semak != 0) {
$("#text-belum-semak").text(response.belum_semak);
$("#divBelumSemak").attr("style", "display:block")
} else {
$("#divBelumSemak").attr("style", "display:none")
}
console.log(response);
for (var dataLelBid of response.lelong_bid) {
const gambarComponent = document.createElement('div');
if (dataLelBid.file_marhun_main != null) {
if (dataLelBid.file_marhun_main.gambar == 0) {
gambarComponent.innerHTML = `
<div class="text-primary bg-light image-style">
<span class="material-symbols-rounded icon-image">
cycle
</span>
<div>No Image in Storage</div>
</div>
`;
} else {
gambarComponent.innerHTML = `
<div style='cursor:pointer'>
<img id='image` + dataLelBid.id + `' src='data:image/png;base64,` + dataLelBid
.file_marhun_main.gambar + `' class="image-style" alt="gambar-marhun">
</div>
`;
}
} else {
gambarComponent.innerHTML = `
<div class="text-danger false-style image-style">
<span class="material-symbols-rounded icon-image">
cancel
</span>
<div>Gambar Belum Di Muat Naik</div>
</div>
`;
}
if (dataLelBid.status_semak == 0) {
var statusSem = 'unchecked';
} else {
var statusSem = '';
}
const marhunComponent = document.createElement('div');
marhunComponent.innerHTML = `
<div class="item-wrapper">
<div class="item-main">
<div class="text-center ` + statusSem + `">
` + gambarComponent.innerHTML + `
<div class="my-2">` + dataLelBid.norujukan + `</div>
<div class="marhun-div-style">` + dataLelBid.marhun + `</div>
<div class="my-2">` + dataLelBid.berat + `g</div>
<div class="my-2"><strong>N. Marhun: </strong>RM` + dataLelBid.nilaimarhun + `</div>
<div class="my-2"><strong>H. Asas: </strong>RM` + dataLelBid.hargaasas + `</div>
</div>
</div>
</div>
`;
$('#divComponentGambar').append(marhunComponent);
if (dataLelBid.file_marhun_main != null && dataLelBid.file_marhun_main.gambar != 0) {
const viewer = new Viewer(document.getElementById('image' + dataLelBid.id), {
inline: false,
title: false,
});
}
}
$("#divSpinner").attr("style", "display:none")
}).fail(function(error) {
alert(error);
});
}
</script>
@endsection
+2
View File
@@ -666,6 +666,8 @@ Route::group(['middleware' => ['permission:backdate'],'prefix'=>'backdate'], fun
Route::group(['middleware' => ['permission:pengurusangambar'], 'prefix' => 'pengurusangambar'], function () {
Route::get('/marhun', ['as' => 'pengurusangambar.marhun', 'uses' => 'MarhunController@pengurusanGambarMarhun']);
Route::get('/galerimarhun', ['as' => 'pengurusangambar.galerimarhun', 'uses' => 'MarhunController@galeriMarhun']);
Route::get('/listCawangan', ['as' => 'pengurusangambar.listcawangan', 'uses' => 'MarhunController@listCawangan']);
Route::get('/listLelongBid', ['as' => 'pengurusangambar.listlelongbid', 'uses' => 'MarhunController@listLelongBid']);
});
Route::group(['middleware' => ['permission:pengurusanuploaddownload'], 'prefix' => 'pengurusanuploaddownload'], function () {
Route::get('/testupload', ['as' => 'pengurusanuploaddownload.testupload', 'uses' => 'DatabaseController@pengurusanMaxUploadSize']);