Dashboard sipadu mbip
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

compound_form_edit.blade.php 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. @extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase])
  2. @section('page_title', 'Kompaun')
  3. @section('sub_page_title', '')
  4. @section('name', $user->StaffDetail->full_name)
  5. @section('img_profile', $user->StaffDetail->profile_img)
  6. @section('content')
  7. <style type="text/css">
  8. select.form-control, select.form-control:focus, select.form-control:hover {
  9. border: 1px solid #ccc !important;
  10. height: auto !important;
  11. }
  12. .panel-group .panel {
  13. margin-bottom: 0;
  14. overflow: hidden;
  15. border-radius: 4px;
  16. }
  17. .panel-default {
  18. border-color: #ddd;
  19. }
  20. .panel-default>.panel-heading {
  21. color: #333;
  22. background-color: #f5f5f5;
  23. border-color: #ddd;
  24. }
  25. .panel-title {
  26. margin-top: 0;
  27. margin-bottom: 0;
  28. font-size: 16px;
  29. color: inherit;
  30. }
  31. .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{
  32. padding: 8px 15px;
  33. line-height: 1.428571429;
  34. vertical-align: top;
  35. border-top: 1px solid #ddd;
  36. }
  37. .glyphicon { margin-right:10px; }
  38. .panel-body { padding:0px; }
  39. .panel-body table tr td { padding-left: 15px }
  40. .panel-body table tr td a:hover , .panel-body div a:hover{ color: #d84315 !important; }
  41. .panel-body .table, .panel-body div {margin-bottom: 0px; }
  42. .active { color: #d84315; }
  43. .active:hover { color: #d84315; }
  44. </style>
  45. <div class="inner-page">
  46. <div class="row">
  47. <div class="col-md-10 offset-1">
  48. <div class="fluid">
  49. @if(count($errors) > 0)
  50. <div class="alert alert-danger icons-alert">
  51. @foreach($errors->all() as $error)
  52. <p>{{$error}}</p>
  53. @endforeach
  54. </div>
  55. @endif
  56. @if(Session::get('error_msg'))
  57. <div class="alert alert-danger icons-alert">
  58. {!! Session::get('error_msg') !!}
  59. </div>
  60. @elseif(Session::get('success_msg'))
  61. <div class="alert alert-success icons-alert">
  62. {!! Session::get('success_msg') !!}
  63. </div>
  64. @endif
  65. </div>
  66. </div>
  67. </div>
  68. <div class="row">
  69. <div class="col-xl-10 col-md-12 offset-1">
  70. <div class="row">
  71. <div class="col-sm-12">
  72. <div class="card">
  73. <div class="card-header">
  74. <h5>Kemaskini Maklumat Kompaun</h5>
  75. </div>
  76. <div class="card-block">
  77. <div id="pelbagai">
  78. @include('main-dashboard.compound._edit_type.pelbagai')
  79. </div>
  80. <div id="petak">
  81. @include('main-dashboard.compound._edit_type.petak')
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. @endsection
  91. @section('external_js')
  92. <script type="text/javascript">
  93. var ellipsis = "...";
  94. function TrimLength(text, maxLength)
  95. {
  96. text = $.trim(text);
  97. if (text.length > maxLength)
  98. {
  99. text = text.substring(0, maxLength - ellipsis.length)
  100. return text.substring(0, text.lastIndexOf(" ")) + ellipsis;
  101. }
  102. else
  103. return text;
  104. }
  105. $.ajaxSetup({
  106. headers: {
  107. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  108. }
  109. });
  110. $(document).ready(function() {
  111. $('#pelbagai').hide();
  112. $('#petak').hide();
  113. var origin = window.location.origin;
  114. $(".theme-loader").animate({
  115. opacity: "0"
  116. },1000);
  117. setTimeout(function() {
  118. $(".theme-loader").remove();
  119. }, 800);
  120. $('[data-toggle="tooltip"]').tooltip();
  121. var jenis = '{{ $compound->jenis }}';
  122. if(jenis != "Parkir")
  123. {
  124. $('#petak').hide();
  125. $('#pelbagai').show();
  126. }
  127. else if(jenis == "Parkir")
  128. {
  129. $('#pelbagai').hide();
  130. $('#petak').show();
  131. }
  132. // if(jenis == "Pelbagai"){
  133. // $('#petak').hide();
  134. // $('#pelbagai').show();
  135. // }else if(jenis == "Parkir"){
  136. // $('#pelbagai').hide();
  137. // $('#petak').show();
  138. // }
  139. //Kompaun Parking
  140. $('#seksyen').change(function(){
  141. if( $(this).val()==""){
  142. $("#jabatan").prop("checked", false);
  143. $('#jabatan').empty();
  144. $('#jabatan').append('<option value="">Sila pilih jabatan</option>');
  145. $("#akta").val('-');
  146. }
  147. else {
  148. $('#jabatan').empty();
  149. $('#jabatan').append('<option value="">Sila pilih jabatan</option>');
  150. $.ajax({
  151. type: "GET",
  152. url: "{{ url('api/filter-department-based-faulty') }}"+"/"+$(this).val(),
  153. success: function(result){
  154. $("#jabatan").val(result.data);
  155. }
  156. });
  157. $.ajax({
  158. type: "GET",
  159. url: "{{ url('api/get-deedlaw-based-faulty') }}"+"/"+$(this).val(),
  160. success: function(result){
  161. $("#akta").val(result.data);
  162. }
  163. });
  164. }
  165. });
  166. $('#namaJalan').change(function(){
  167. if( $(this).val()==""){
  168. $("#namaKawasan").prop("checked", false);
  169. $('#namaKawasan').empty();
  170. $('#namaKawasan').val('-');
  171. $("#namaTaman").val('-');
  172. }
  173. else {
  174. $.ajax({
  175. type: "GET",
  176. url: "{{ url('api/filter-taman') }}"+"/"+$(this).val(),
  177. success: function(result){
  178. $("#namaTaman").val(result.data);
  179. }
  180. });
  181. $.ajax({
  182. type: "GET",
  183. url: "{{ url('api/filter-kawasan') }}"+"/"+$(this).val(),
  184. success: function(result){
  185. $("#namaKawasan").val(result.data);
  186. }
  187. });
  188. }
  189. });
  190. //Kompaun Pelbagai
  191. $('#seksyen2').change(function(){
  192. if( $(this).val()==""){
  193. $("#jabatan2").prop("checked", false);
  194. $('#jabatan2').empty();
  195. $('#jabatan2').append('<option value="">Sila pilih jabatan</option>');
  196. $("#akta2").val('-');
  197. }
  198. else {
  199. $('#jabatan2').empty();
  200. $('#jabatan2').append('<option value="">Sila pilih jabatan</option>');
  201. $.ajax({
  202. type: "GET",
  203. url: "{{ url('api/filter-department-based-faulty') }}"+"/"+$(this).val(),
  204. success: function(result){
  205. $("#jabatan2").val(result.data);
  206. }
  207. });
  208. $.ajax({
  209. type: "GET",
  210. url: "{{ url('api/get-deedlaw-based-faulty') }}"+"/"+$(this).val(),
  211. success: function(result){
  212. $("#akta2").val(result.data);
  213. }
  214. });
  215. }
  216. });
  217. $('#namaJalan2').change(function(){
  218. if( $(this).val()==""){
  219. $("#namaKawasan2").prop("checked", false);
  220. $('#namaKawasan2').empty();
  221. $('#namaKawasan2').val('-');
  222. $("#namaTaman2").val('-');
  223. }
  224. else {
  225. $.ajax({
  226. type: "GET",
  227. url: "{{ url('api/filter-taman') }}"+"/"+$(this).val(),
  228. success: function(result){
  229. $("#namaTaman2").val(result.data);
  230. }
  231. });
  232. $.ajax({
  233. type: "GET",
  234. url: "{{ url('api/filter-kawasan') }}"+"/"+$(this).val(),
  235. success: function(result){
  236. $("#namaKawasan2").val(result.data);
  237. }
  238. });
  239. }
  240. });
  241. //Limited Numbers
  242. $(".js-section").select2({
  243. maximumSelectionLength: 1
  244. });
  245. });
  246. </script>
  247. @endsection