97 lines
3.5 KiB
PHP
97 lines
3.5 KiB
PHP
<div class="container mw-100 containerOrderArchiveModule" >
|
|
@include('modules.orderArchive.advanceSearch')
|
|
<form class="OrderArchiveModuleForm" enctype="multipart/form-data">
|
|
@csrf
|
|
<div class="container-fluid" >
|
|
<table id="dataTableOrderArchive" class="dataTable display" style="width:100%">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Szállító</th>
|
|
<th>Szállítási dátum</th>
|
|
@role(['root','developer','admin'])
|
|
<th>Profitcenter</th>
|
|
@endrole
|
|
<th>szállítási cím</th>
|
|
<th>Leadási időpont</th>
|
|
<th>Azonosító</th>
|
|
<th>Jóváhagyva</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr>
|
|
<th>Szállító</th>
|
|
<th>Szállítási dátum</th>
|
|
@role(['root','developer','admin'])
|
|
<th>Profitcenter</th>
|
|
@endrole
|
|
<th>szállítási cím</th>
|
|
<th>Leadási időpont</th>
|
|
<th>Azonosító</th>
|
|
<th>Jóváhagyva</th>
|
|
<th></th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
@php
|
|
$adminMode=false;
|
|
if(auth()->user()->hasRole(['root','developer','admin'])){
|
|
$adminMode=true;
|
|
}
|
|
|
|
@endphp
|
|
|
|
|
|
@role(['root','developer','admin'])
|
|
<script>
|
|
APP.IsUserAdmin=true;
|
|
</script>
|
|
@else
|
|
<script>
|
|
APP.IsUserAdmin=false;
|
|
</script>
|
|
@endrole
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
console.log('[OA-DEBUG] 1. $(document).ready() fired');
|
|
console.log('[OA-DEBUG] 2. APP.IsUserAdmin =', APP.IsUserAdmin);
|
|
console.log('[OA-DEBUG] 3. typeof OrderArchiveModule =', typeof OrderArchiveModule);
|
|
console.log('[OA-DEBUG] 4. typeof DataModelOrderArchive =', typeof DataModelOrderArchive);
|
|
console.log('[OA-DEBUG] 5. typeof ModuleBase =', typeof ModuleBase);
|
|
|
|
|
|
console.log('[OA-DEBUG] 6. APP.OrderArchiveModule before check =', typeof APP.OrderArchiveModule);
|
|
if(typeof APP.OrderArchiveModule ==="undefined") {
|
|
console.log('[OA-DEBUG] 7. Creating new OrderArchiveModule...');
|
|
APP.OrderArchiveModule=new OrderArchiveModule();
|
|
console.log('[OA-DEBUG] 8. OrderArchiveModule created =', APP.OrderArchiveModule);
|
|
} else {
|
|
console.log('[OA-DEBUG] 7. APP.OrderArchiveModule already exists, reusing.');
|
|
}
|
|
console.log('[OA-DEBUG] 9. Calling APP.OrderArchiveModule.init()...');
|
|
APP.OrderArchiveModule.init(
|
|
{
|
|
URL: {
|
|
root:'{{url('')}}',
|
|
getDataTableContent:'{{route('orderArchive.getDataTableContent')}}',
|
|
index:'{{route('orderArchive.index')}}',
|
|
show:'{{route('orderArchive.show',"%id%")}}',
|
|
edit:'{{route('orderArchive.edit',"%id%")}}',
|
|
},
|
|
testMode: {{$testMode ? 'true' : 'false'}}
|
|
}
|
|
);
|
|
|
|
console.log('[OA-DEBUG] 10. init() done. Opts.URL =', APP.OrderArchiveModule.Opts?.URL);
|
|
console.log('[OA-DEBUG] 11. Calling initViewList()...');
|
|
APP.OrderArchiveModule.initViewList({orderDirective:[[4, "desc"]]});
|
|
console.log('[OA-DEBUG] 12. initViewList() returned. dataTable =', APP.OrderArchiveModule.dataTable);
|
|
});
|
|
</script>
|
|
|