123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494 |
- @extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase])
- @section('page_title', 'Kompaun')
- @section('sub_page_title', '')
- @section('name', $user->StaffDetail->full_name)
- @section('img_profile', $user->StaffDetail->profile_img)
-
- @section('content')
- <style type="text/css">
- select.form-control, select.form-control:focus, select.form-control:hover {
- border: 1px solid #ccc !important;
- height: auto !important;
- }
-
- .panel-group .panel {
- margin-bottom: 0;
- overflow: hidden;
- border-radius: 4px;
- }
- .panel-default {
- border-color: #ddd;
- }
- .panel-default>.panel-heading {
- color: #333;
- background-color: #f5f5f5;
- border-color: #ddd;
- }
- .panel-title {
- margin-top: 0;
- margin-bottom: 0;
- font-size: 16px;
- color: inherit;
- }
-
- .panel-body .table>thead>tr>th, .panel-body .table>tbody>tr>th, .panel-body .table>tfoot>tr>th, .panel-body .table>thead>tr>td, .panel-body .table>tbody>tr>td, .panel-body .table>tfoot>tr>td , .panel-body div{
- padding: 8px 15px;
- line-height: 1.428571429;
- vertical-align: top;
- border-top: 1px solid #ddd;
- }
- .panel-body { padding:0px; }
- .panel-body table tr td { padding-left: 15px }
- .panel-body table tr td a:hover , .panel-body div a:hover{ color: #d84315 !important; }
- .panel-body .table, .panel-body div {margin-bottom: 0px; }
-
- .glyphicon { margin-right:10px; }
- .active { color: #d84315; }
- .active:hover { color: #d84315; }
-
- #custom table {
- table-layout:fixed !important;
- border-collapse: collapse !important;
- width: 100%;
- word-wrap:break-word !important;
- }
- #custom td, #custom th {
- border-top: 1px solid #dee2e6;
- border-bottom: 1px solid #dee2e6;
- }
- .longtext{
- word-wrap: break-word !important;
- word-break: break-word !important;
- padding: 0.6rem 2rem;
- }
- </style>
-
- <div class="inner-page">
- <div class="row">
- <div class="col-xl-2 col-md-12">
- <div class="panel panel-default">
- <div class="panel-heading">
- <h4 class="panel-title"> Maklumat Terperinci </h4>
- </div>
-
- <div class="panel-body">
- @if($compound->status == 'Belum Bayar')
- <div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div>
- <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}" class="active">Kompaun</a></div>
- @if($compound->modul == '04')
- <!-- <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/investigation" class="{{ Request::is('main/compound/*/investigation') ? 'active' : '' }}">Pengesahan Kompaun</a></div> -->
- <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/memo" class="{{ Request::is('main/compound/*/memo') ? 'active' : '' }}">Memo/Nota</a></div>
- @elseif($compound->modul == '05')
- <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/notice" class="{{ Request::is('main/compound/*/notice') ? 'active' : '' }}">Notis Amaran</a></div>
- <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/memo" class="{{ Request::is('main/compound/*/memo') ? 'active' : '' }}">Memo/Nota</a></div>
- @elseif($compound->modul == '06')
- <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/inventory" class="{{ Request::is('main/compound/*/inventory') ? 'active' : '' }}">Inventori</a></div>
- <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/memo" class="{{ Request::is('main/compound/*/memo') ? 'active' : '' }}">Memo/Nota</a></div>
- @elseif($compound->modul == '07')
- <div><a href="{{ url('main/compound') }}/{{$compound->kpd}}/inventory/auction" class="{{ Request::is('main/compound/*/inventory/auction') ? 'active' : '' }}">Jualan Lelong</a></div>
- <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/memo" class="{{ Request::is('main/compound/*/memo') ? 'active' : '' }}">Memo/Nota</a></div>
- @endif
- <div><a target="_blank" href="{{ url('/main/compound') }}/{{$compound->kpd}}/pdf">Cetak/Papar PDF</a></div>
- <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/task" class="{{ Request::is('main/compound/*/task') ? 'active' : '' }}">Serahan Modul/PenguatKuasa</a></div>
- @elseif($compound->status == 'Berbayar')
- <div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div>
- <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}" class="{{ Request::is('main/compound/*') ? 'active' : '' }}">Kompaun</a></div>
- <div><a target="_blank" href="{{ url('/main/compound') }}/{{$compound->kpd}}/pdf">Cetak/Papar PDF</a></div>
- @endif
- </div>
- </div>
- </div>
-
- <div class="col-xl-10 col-md-12">
- <!-- Display message -->
- <div class="row">
- <div class="col-md-12">
- <div class="fluid">
- @if(count($errors) > 0)
- <div class="alert alert-danger icons-alert">
- @foreach($errors->all() as $error)
- <p>{{$error}}</p>
- @endforeach
- </div>
- @endif
-
- @if(Session::get('error_msg'))
- <div class="alert alert-danger icons-alert">
- {!! Session::get('error_msg') !!}
- </div>
- @elseif(Session::get('success_msg'))
- <div class="alert alert-success icons-alert">
- {!! Session::get('success_msg') !!}
- </div>
- @endif
- </div>
- </div>
- </div>
- <!-- Display message -->
-
- <div class="row">
- <div class="col-md-12">
- <div class="card">
- <div class="card-header">
- @if(empty($role))
- <h5 class="card-header-text">
- Maklumat Kertas Kompaun [ No.Kompaun : <code>{{ $compound->kpd }}</code> | No.Siri : <code>{{ $file->no_siri }}</code> | Modul: <code>-</code>]
- </h5>
- @else
- <h5 class="card-header-text">
- Maklumat Kertas Kompaun [ No.Kompaun : <code>{{ $compound->kpd }}</code> | No.Siri : <code>{{ $file->no_siri }}</code> | Modul: <code>{{ $role->name }}</code>]
- </h5>
- @endif
- </div>
- </div>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-12">
- <div class="card">
- <div class="card-header">
- <h5>Maklumat Kompaun <code data-toggle="tooltip" data-placement="left" title data-original-title="Tarikh & Masa Kompaun Dikeluarkan">({{ date('d/m/Y h:i:s a', strtotime($compound->created_at)) }})</code></h5>
- <span><code>Perhatian!! Semua maklumat yang anda kemaskini disini akan direkodkan dalam kertas siasatan dan bukan pada kertas kompaun/pdf</code></span>
-
- </div>
- <div class="card-block">
- @if($compound->jenis == 'Pelbagai_KT')
- @include('main-dashboard.compound_detail.part.compound_KT')
- @elseif($compound->jenis == 'Pelbagai_JPB')
- @include('main-dashboard.compound_detail.part.compound_JPB')
- @elseif($compound->jenis == "Parkir")
- @include('main-dashboard.compound_detail.part.compound_parkir')
- @endif
- </div>
- </div>
- </div>
- </div>
- @if($compound->modul == '04')
- <div class="row">
- <div class="col-md-12">
- <div class="card">
- <div class="card-header">
- <h5>Lampiran PDF (SSM/JPJ)</h5>
- <button id="lampiran-btn" type="button" class="btn btn-sm btn-outline-danger waves-effect f-right" data-toggle="tooltip" data-placement="top" title data-original-title="Tambah Lampiran">
- <i class="icofont icofont-edit"></i>
- </button>
- </div>
- <div class="card-block">
- <div id="view-lampiran" class="row">
- <div class="col-lg-12">
- <div class="data_table_main dt-responsive table-responsive">
- <table id="lampiran_ssm_jpj" class="table table-sm table-striped table-bordered nowrap" width="100%">
- <thead>
- <tr>
- <th>Tarikh</th>
- <th>Masa</th>
- <th>Subjek</th>
- <th>Kategori</th>
- <th>Tindakan</th>
- </tr>
- </thead>
-
- <tfoot>
- <tr>
- <th>Tarikh</th>
- <th>Masa</th>
- <th>Subjek</th>
- <th>Kategori</th>
- <th>Tindakan</th>
- </tr>
- </tfoot>
- </table>
- </div>
- </div>
- </div>
- <div id="edit-lampiran" class="row">
- <div class="col-lg-12 col-md-12">
- <form method="POST" action="{{ url('/main/compound/investigation/attachment/add') }}" enctype="multipart/form-data">
-
- <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
- <input type="hidden" name="kpd" value="{{ $compound->kpd }}">
- <input type="hidden" name="nosiri" value="{{ $file->no_siri }}">
-
- <div class="row">
- <div class="col-lg-6 col-md-12">
- <div class="form-group form-primary">
- <label class="float-label">Subjek</label>
- <input type="text" name="subjek" class="form-control" required="">
- <span class="form-bar"></span>
- </div>
- </div>
- <div class="col-lg-6 col-md-12">
- <div class="form-group form-primary">
- <label class="float-label">Kategori</label>
- <select id="kategori" name="kategori" class="form-control" required>
- <option value="">Pilih Kategori </option>
- <option value="SSM">SSM</option>
- <option value="JPJ">JPJ</option>
- </select>
- <span class="form-bar"></span>
- </div>
- </div>
- <div class="col-lg-12 col-md-12">
- <div class="form-group form-primary">
- <label class="float-label">Lampiran PDF</label>
- <input name="attachment" id="attachment" type="file" class="form-control form-control-sm" />
- <span class="form-bar"></span>
- <code>Format <b>PDF</b> sahaja yang diterima</code>
- </div>
- </div>
- </div>
- <hr>
- <div class="md-group-add-on"></div>
- <div class="f-right m-t-20">
- <button type="submit" class="btn btn-sm btn-outline-danger waves-effect">Simpan/Muat Naik</button>
- <a href="javascript:;" id="lampiran-cancel" class="btn btn-sm btn-out-dashed waves-effect waves-light btn-default btn-square">Batal</a>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endif
- </div>
-
- </div>
- </div>
- @endsection
-
- @section('external_js')
- @parent
- <script type="text/javascript">
- $.ajaxSetup({
- headers: {
- 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
- }
- });
-
- var table = $('#lampiran_ssm_jpj').DataTable({
- "ordering": false,
- "serverSide": true,
- "processing": true,
- "ajax": "{{ url('/api/investigation') }}/{{$file->no_siri}}/attachment/list",
- "columns": [
- { "data": "tarikh","name": "tarikh"},
- { "data": "masa","name": "masa"},
- { "data": "subjek","name": "subjek"},
- { "data": "kategori","name": "kategori"},
- { "data": "tindakan","name": "tindakan"}
- ],
- "columnDefs": [
- {
- "render": function ( data, type, row ) {
- if (data.indexOf("Baru/") >= 0) {
- var split = data.split('/');
- return '<label class="label label-success">'+split[0]+'</label> '+split[1];
- }else {
- return data;
- }
- },
- "targets": 0,
- },
- {
- "render": function ( data, type, row ) {
- var kpd = '{{ $compound->kpd }}';
- var siri = '{{ $file->no_siri }}';
- var staff = "{{ $user->_id }}";
-
- var editLink = "{{ url('/document') }}"+"/"+siri+"/investigation/"+data+".pdf";
- //<a href="'+editLink+'" class="tabledit-edit-button btn btn-primary waves-effect waves-light" style="float: none;" data-toggle="tooltip" data-placement="top" title="Kemaskini Lampiran"><span class="icofont icofont-ui-edit" style="color:white"></span></a>
-
- var pdfLink = "{{ url('/main/compound/investigation') }}"+"/"+data+"/detail/view";
- return '<div class="btn-group btn-group-sm" style="float: none;"><a target="_blank" href="'+pdfLink+'" class="tabledit-edit-button btn btn-success waves-effect waves-light" style="float: none;" data-toggle="tooltip" data-placement="top" title="Maklumat Lampiran"><span class="icofont icofont-eye-alt" style="color:white"></span></a> <a onclick="deleteA(\''+data+'\',\'' + row.subjek + '\',\'' + staff + '\',\'' + siri + '\')" data-toggle="tooltip" data-placement="top" title="Buang Lampiran" class="tabledit-delete-button btn btn-danger waves-effect waves-light" style="float: none;"><span class="icofont icofont-ui-delete" style="color:white"></span></a></div>';
-
- },
- "targets": 4,
- },
- ],
- "language": {
- "paginate": {
- "previous": "Sebelum",
- "next": "Selepas"
- },
- "sLengthMenu": "Tunjukkan _MENU_ entri",
- "zeroRecords": "Tiada Data Ditemui",
- "infoEmpty": "Tiada Rekod Yang Wujud",
- "infoFiltered": "(Ditapis daripada _MAX_ jumlah rekod)",
- "info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri",
- "sSearch": "Cari:",
- }
- });
-
- function deleteA(cid,subjek,staff,siri) {
- var cid = cid;
- var subjek = subjek;
-
- swal({
- title: "Adakah anda pasti?",
- text: "Anda tidak akan dapat memulihkan rekod lampiran ini ( " + subjek + " )",
- html: true,
- type: "warning",
- showCancelButton: true,
- confirmButtonClass: "btn-danger",
- confirmButtonText: "Ya!",
- cancelButtonText: "Batal!",
- closeOnConfirm: false
- },
- function(isConfirm){
- if (!isConfirm) return;
- $.ajax({
- type: "POST",
- url: "{{ url('api/investigation/attachment/delete') }}",
- data: { "_token": "{{ csrf_token() }}", id: cid, staff: staff, no_siri: siri},
- success:function(data){
- if(data['status'] == "true"){
- swal({
- title: "Berjaya",
- text: data['desc'],
- type: "success",
- showCancelButton: false,
- confirmButtonText: "OK!",
- closeOnConfirm: true
- },
- function(){
- table.ajax.url("{{ url('/api/investigation') }}/{{$file->no_siri}}/attachment/list").load();
- });
- }else if(data['status'] == "false"){
- swal({
- title: "Tidak Berjaya",
- text: data['desc'],
- type: "error",
- showCancelButton: false,
- confirmButtonText: "OK!",
- closeOnConfirm: true
- },
- function(){
- table.ajax.url("{{ url('/api/investigation') }}/{{$file->no_siri}}/attachment/list").load();
- });
- }
- },
- error: function (xhr, ajaxOptions, thrownError) {
- swal("Error deleting!", "Rekod tidak berjaya di buang", "error");
- }
- });
- });
- };
-
- $(document).ready(function() {
-
- var origin = window.location.origin;
- $(".theme-loader").animate({
- opacity: "0"
- },1000);
-
- setTimeout(function() {
- $(".theme-loader").remove();
- }, 800);
-
- $('[data-toggle="tooltip"]').tooltip();
-
- /** Lampiran **/
- $('#edit-lampiran').hide();
- $('#lampiran-cancel').on('click', function() {
- var c = $('#lampiran-btn').find("i");
- c.removeClass('icofont-close');
- c.addClass('icofont-edit');
- $('#view-lampiran').show();
- $('#edit-lampiran').hide();
- });
- $('#lampiran-save').on('click', function() {
- var c = $('#lampiran-btn').find("i");
- c.removeClass('icofont-close');
- c.addClass('icofont-edit');
- $('#view-lampiran').show();
- $('#edit-lampiran').hide();
- });
- $('#lampiran-btn').on('click', function() {
- var b = $(this).find("i");
- var edit_class = b.attr('class');
- if (edit_class == 'icofont icofont-edit') {
- b.removeClass('icofont-edit');
- b.addClass('icofont-close');
- $('#view-lampiran').hide();
- $('#edit-lampiran').show();
- } else {
- b.removeClass('icofont-close');
- b.addClass('icofont-edit');
- $('#view-lampiran').show();
- $('#edit-lampiran').hide();
- }
- });
-
- });
- </script>
- <script type="text/javascript">
- var compoundLatlog = '{{ $compound->latlong }}';
-
- if(compoundLatlog != '') {
-
- var split = compoundLatlog.split(',');
- var centerLat = parseFloat(split[0]);
- var centerLong = parseFloat(split[1]);
-
- // Standard google maps function
- function initialize() {
- var map;
- var bounds = new google.maps.LatLngBounds();
- var myLatlng = new google.maps.LatLng(centerLat, centerLong);
- var myOptions = {
- zoom: 18,
- center: myLatlng,
- mapTypeId: google.maps.MapTypeId.ROADMAP
- }
- map = new google.maps.Map(document.getElementById("map"), myOptions);
-
- displayMarker(bounds, map);
- }
-
- // Testing the addMarker function
- function displayMarker(bounds, map) {
-
- // Markers
- var markers = [
- ['Kompaun Dikeluarkan', centerLat, centerLong, 1]
- ];
-
- // Info Windows
- var infoWindowContent = [
- ['<div class="info_content">' + '<small>Kompaun Dikeluarkan </small>' + '</div>']
- ];
-
- var infoWindow = new google.maps.InfoWindow(), marker, i;
-
- //<!-- Loop through our array of markers & place each one on the map -->
- for( i = 0; i < markers.length; i++ ) {
- // Display multiple markers on a map -->
- var position = new google.maps.LatLng(markers[i][1], markers[i][2]);
- bounds.extend(position);
- marker = new google.maps.Marker({
- position: position,
- map: map,
- title: markers[i][0]
- });
-
- //<!-- Allow each marker to have an info window -->
- google.maps.event.addListener(marker, 'click', (function(marker, i) {
- return function() {
- infoWindow.setContent(infoWindowContent[i][0]);
- infoWindow.open(map, marker);
- }
- })(marker, i));
- //<!-- Automatically center the map fitting all markers on the screen -->
- map.fitBounds(bounds);
- }
- //<!-- Override our map zoom level once our fitBounds function runs (Make sure it only runs once) -->
- var boundsListener = google.maps.event.addListener((map), 'bounds_changed', function(event) {
- this.setZoom(18);
- google.maps.event.removeListener(boundsListener);
- });
- }
- }
- </script>
- @endsection
|