123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286 |
- @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;
- }
- .glyphicon { margin-right:10px; }
- .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; }
-
- .active { color: #d84315; }
- .active:hover { color: #d84315; }
- </style>
-
- <div class="inner-page">
- <div class="row">
- <div class="col-md-10 offset-1">
- <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>
-
- <div class="row">
-
- <div class="col-xl-10 col-md-12 offset-1">
-
- <div class="row">
- <div class="col-sm-12">
- <div class="card">
- <div class="card-header">
- <h5>Kemaskini Maklumat Kompaun</h5>
- </div>
- <div class="card-block">
- <div id="pelbagai">
- @include('main-dashboard.compound._edit_type.pelbagai')
- </div>
- <div id="petak">
- @include('main-dashboard.compound._edit_type.petak')
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endsection
-
- @section('external_js')
-
- <script type="text/javascript">
-
- var ellipsis = "...";
- function TrimLength(text, maxLength)
- {
- text = $.trim(text);
-
- if (text.length > maxLength)
- {
- text = text.substring(0, maxLength - ellipsis.length)
- return text.substring(0, text.lastIndexOf(" ")) + ellipsis;
- }
- else
- return text;
- }
-
- $.ajaxSetup({
- headers: {
- 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
- }
- });
-
- $(document).ready(function() {
-
- $('#pelbagai').hide();
- $('#petak').hide();
-
- var origin = window.location.origin;
-
- $(".theme-loader").animate({
- opacity: "0"
- },1000);
-
- setTimeout(function() {
- $(".theme-loader").remove();
- }, 800);
-
- $('[data-toggle="tooltip"]').tooltip();
-
- var jenis = '{{ $compound->jenis }}';
- if(jenis != "Parkir")
- {
- $('#petak').hide();
- $('#pelbagai').show();
- }
- else if(jenis == "Parkir")
- {
- $('#pelbagai').hide();
- $('#petak').show();
- }
-
- // if(jenis == "Pelbagai"){
- // $('#petak').hide();
- // $('#pelbagai').show();
- // }else if(jenis == "Parkir"){
- // $('#pelbagai').hide();
- // $('#petak').show();
- // }
-
- //Kompaun Parking
- $('#seksyen').change(function(){
- if( $(this).val()==""){
- $("#jabatan").prop("checked", false);
- $('#jabatan').empty();
- $('#jabatan').append('<option value="">Sila pilih jabatan</option>');
-
- $("#akta").val('-');
- }
- else {
- $('#jabatan').empty();
- $('#jabatan').append('<option value="">Sila pilih jabatan</option>');
-
- $.ajax({
- type: "GET",
- url: "{{ url('api/filter-department-based-faulty') }}"+"/"+$(this).val(),
- success: function(result){
- $("#jabatan").val(result.data);
- }
- });
-
- $.ajax({
- type: "GET",
- url: "{{ url('api/get-deedlaw-based-faulty') }}"+"/"+$(this).val(),
- success: function(result){
- $("#akta").val(result.data);
- }
- });
- }
- });
-
- $('#namaJalan').change(function(){
- if( $(this).val()==""){
- $("#namaKawasan").prop("checked", false);
- $('#namaKawasan').empty();
- $('#namaKawasan').val('-');
-
- $("#namaTaman").val('-');
- }
- else {
-
- $.ajax({
- type: "GET",
- url: "{{ url('api/filter-taman') }}"+"/"+$(this).val(),
- success: function(result){
- $("#namaTaman").val(result.data);
- }
- });
-
- $.ajax({
- type: "GET",
- url: "{{ url('api/filter-kawasan') }}"+"/"+$(this).val(),
- success: function(result){
- $("#namaKawasan").val(result.data);
- }
- });
- }
- });
-
- //Kompaun Pelbagai
- $('#seksyen2').change(function(){
- if( $(this).val()==""){
- $("#jabatan2").prop("checked", false);
- $('#jabatan2').empty();
- $('#jabatan2').append('<option value="">Sila pilih jabatan</option>');
-
- $("#akta2").val('-');
- }
- else {
- $('#jabatan2').empty();
- $('#jabatan2').append('<option value="">Sila pilih jabatan</option>');
-
- $.ajax({
- type: "GET",
- url: "{{ url('api/filter-department-based-faulty') }}"+"/"+$(this).val(),
- success: function(result){
- $("#jabatan2").val(result.data);
- }
- });
-
- $.ajax({
- type: "GET",
- url: "{{ url('api/get-deedlaw-based-faulty') }}"+"/"+$(this).val(),
- success: function(result){
- $("#akta2").val(result.data);
- }
- });
- }
- });
-
- $('#namaJalan2').change(function(){
- if( $(this).val()==""){
- $("#namaKawasan2").prop("checked", false);
- $('#namaKawasan2').empty();
- $('#namaKawasan2').val('-');
-
- $("#namaTaman2").val('-');
- }
- else {
-
- $.ajax({
- type: "GET",
- url: "{{ url('api/filter-taman') }}"+"/"+$(this).val(),
- success: function(result){
- $("#namaTaman2").val(result.data);
- }
- });
-
- $.ajax({
- type: "GET",
- url: "{{ url('api/filter-kawasan') }}"+"/"+$(this).val(),
- success: function(result){
- $("#namaKawasan2").val(result.data);
- }
- });
- }
- });
-
- //Limited Numbers
- $(".js-section").select2({
- maximumSelectionLength: 1
- });
- });
- </script>
- @endsection
|