tambah function auto tamat lelong selepas 2jam lelong
This commit is contained in:
@@ -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">
|
||||
Ahli Jawatan Kuasa Page
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -88,7 +88,8 @@
|
||||
@else
|
||||
@endif
|
||||
@elseif ($lel['info']['sts_lelong'] == 1)
|
||||
<a class="stoplelongall btn btn-danger" href="{{ route('lelong.stopall',$lel['info']['id']) }}" data-toggle="tooltip" data-placement="top" title="Tamat Lelong">Tamat Lelong Semua Cawangan</a>
|
||||
<!-- <a class="stoplelongall btn btn-danger" href="{{ route('lelong.stopall',$lel['info']['id']) }}" data-toggle="tooltip" data-placement="top" title="Tamat Lelong">Tamat Lelong Semua Cawangan</a> -->
|
||||
<a class="stoplelongall btn btn-danger" data-placement="top" title="Tamat Lelong">Tamat Lelong Semua Cawangan</a>
|
||||
@elseif ($lel['info']['sts_lelong'] == 2)
|
||||
<a class="janapemenangall btn btn-success" href="{{ route('lelong.janapemenangallcaw',$lel['info']['id']) }}" data-toggle="tooltip" data-placement="top" title="Jana Pemenang">Jana Pemenang <i class="fas fa-users-cog"></i></a>
|
||||
@else
|
||||
@@ -124,7 +125,8 @@
|
||||
@if($cawangan_detail['status_online'] == 0 && $cawangan_detail['belum_semak'] == 0)
|
||||
<a class="btn btn-success btn-sm" href="{{ route('lelong.startcawangan',[$lel['info']['id'], 'cawid'=>$cawangan_detail['caw_id']]) }}" data-toggle="tooltip" data-placement="top" title="Mula Lelong Cawangan">Mula Lelong</a>
|
||||
@elseif($cawangan_detail['status_online'] == 1)
|
||||
<a class="btn btn-danger btn-sm" href="{{ route('lelong.stopcawangan',[$lel['info']['id'], 'cawid'=>$cawangan_detail['caw_id']]) }}" data-toggle="tooltip" data-placement="top" title="Tamat Lelong Cawangan">Tamat Lelong</a>
|
||||
<a class="btn btn-danger btn-sm" data-placement="top" title="Tamat Lelong Cawangan">Tamat Lelong</a>
|
||||
<!-- <a class="btn btn-danger btn-sm" href="{{ route('lelong.stopcawangan',[$lel['info']['id'], 'cawid'=>$cawangan_detail['caw_id']]) }}" data-toggle="tooltip" data-placement="top" title="Tamat Lelong Cawangan">Tamat Lelong</a> -->
|
||||
@endif
|
||||
@elseif($lel['info']['sts_lelong'] == 2)
|
||||
@endif
|
||||
@@ -347,24 +349,24 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('a.stoplelongall').confirm({
|
||||
title: 'Tamat Lelong Semua Cawangan',
|
||||
content: 'Adakah anda pasti?',
|
||||
type: 'red',
|
||||
typeAnimated: true,
|
||||
buttons: {
|
||||
Kembali: {
|
||||
btnClass: 'btn-default',
|
||||
action: function() {}
|
||||
},
|
||||
Teruskan: {
|
||||
btnClass: 'btn-danger',
|
||||
action: function() {
|
||||
location.href = this.$target.attr('href');
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
// $('a.stoplelongall').confirm({
|
||||
// title: 'Tamat Lelong Semua Cawangan',
|
||||
// content: 'Adakah anda pasti?',
|
||||
// type: 'red',
|
||||
// typeAnimated: true,
|
||||
// buttons: {
|
||||
// Kembali: {
|
||||
// btnClass: 'btn-default',
|
||||
// action: function() {}
|
||||
// },
|
||||
// Teruskan: {
|
||||
// btnClass: 'btn-danger',
|
||||
// action: function() {
|
||||
// location.href = this.$target.attr('href');
|
||||
// }
|
||||
// },
|
||||
// }
|
||||
// });
|
||||
|
||||
$('a.janapemenangall').confirm({
|
||||
title: 'Jana Pemenang',
|
||||
|
||||
@@ -211,6 +211,16 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ (request()->is('parameter/listajk') || request()->is('parameter/listajk/*')) ? 'active' : '' }}">
|
||||
<a href="{{url('parameter/listajk')}}">
|
||||
<div class="sidebar-menu-main-title">
|
||||
<span class="material-symbols-rounded sidebar-menu-item-main">
|
||||
phone
|
||||
</span>
|
||||
Parameter AJK
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@endhasrole
|
||||
@hasrole('callcenter')
|
||||
<li>
|
||||
@@ -1043,6 +1053,33 @@
|
||||
</a>
|
||||
</li>
|
||||
@endhasrole
|
||||
@hasrole('ajk')
|
||||
<li>
|
||||
<a href="#pembidaSubmenu" data-toggle="collapse" aria-expanded="false">
|
||||
<div class="sidebar-menu">
|
||||
<div class="sidebar-menu-main-title">
|
||||
<span class="material-symbols-rounded sidebar-menu-item-main">
|
||||
assignment_ind
|
||||
</span>
|
||||
Pembida
|
||||
</div>
|
||||
<span class="material-symbols-rounded sidebar-menu-item-expand">expand_more</span>
|
||||
</div>
|
||||
</a>
|
||||
<ul class="list-unstyled collapse {{ (request()->is('pembida/*')) ? 'show' : '' }}" id="pembidaSubmenu">
|
||||
<li class="{{ (request()->is('report/lapbidaanpembidaindex/*') || request()->is('report/lapbidaanpembidaindex') ) ? 'active' : '' }}">
|
||||
<a href="{{url('report/lapbidaanpembidaindex')}}">Bidaan Pembida</a>
|
||||
</li>
|
||||
<li class="{{ (request()->is('pembida/statuspembayaran/*') || request()->is('pembida/statuspembayaran') ) ? 'active' : '' }}">
|
||||
<a href="{{url('pembida/statuspembayaran')}}">Status Pembayaran</a>
|
||||
</li>
|
||||
{{-- <li class="{{ (request()->is('pembida/statusserahanbidaan/*') || request()->is('pembida/statusserahanbidaan') ) ? 'active' : '' }}">
|
||||
<a href="{{url('pembida/statusserahanbidaan')}}">Status Serahan Bidaan</a>
|
||||
</li> --}}
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@endhasrole
|
||||
</ul>
|
||||
<div class="sidebar-footer">
|
||||
<div class="sidebar-footer-content">Beta V1.0</div>
|
||||
|
||||
@@ -0,0 +1,304 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header header-style">
|
||||
<div class="header-style-title">
|
||||
Senarai Ahli Jawatan Kuasa Lelong
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($message = Session::get('failed'))
|
||||
<div class="alert alert-danger">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@endif
|
||||
<?php
|
||||
$totaluser = count($alluser);
|
||||
?>
|
||||
<form id="exportform" action="{{route('pengguna.export')}}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="type" value="User">
|
||||
<div class="overflow-auto">
|
||||
<table class="table table-bordered" id="pengguna" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Nama</th>
|
||||
<th>Nama AJK</th>
|
||||
<th>Emel</th>
|
||||
<th class="text-center">No.Telefon</th>
|
||||
<th class="text-center">Taraf</th>
|
||||
<th>Status</th>
|
||||
<!-- <th class="text-center">Tindakan</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($alluser as $user)
|
||||
<tr>
|
||||
<td>{{$loop->iteration}}</td>
|
||||
<td style='white-space:nowrap;'>{{ $user->name }}</td>
|
||||
<td>{{ $user->username }}</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td>{{ $user->notelbimbit }}</td>
|
||||
<td class="text-center">
|
||||
@foreach ($user->roles as $taraf)
|
||||
<span class="badge badge-pill badge-primary">{{$taraf->name}}</span>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
@if ($user->status =='active')
|
||||
<span class="badge badge-pill badge-success">Aktif</span>
|
||||
@elseif ($user->status == 'inactive')
|
||||
<span class="badge badge-pill badge-warning">Tidak Aktif</span>
|
||||
@elseif ($user->status =='banned')
|
||||
<span class="badge badge-pill badge-danger">Disekat</span>
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<!-- <td class="text-center" style="white-space:nowrap;"> -->
|
||||
<!-- <a class="btn m-1 btn-primary" href="{{ route('pengguna.show',$user->id) }}" data-toggle="tooltip" data-placement="top" title="Kemaskini" style="margin-right:30px"><i class="far fa-edit"></i></a> -->
|
||||
<!-- <a class="confirmdel btn m-1 btn-danger" href="{{ route('pengguna.delete',$user->id) }}" data-toggle="tooltip" data-placement="top" title="Padam"><i class="far fa-trash-alt"></i></a> -->
|
||||
<!-- </td> -->
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal fade" tabindex="-1" id="myModal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Tambah Pengguna</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{ route('pengguna.storepengguna') }}" method="POST" id="formpengguna">
|
||||
@csrf
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="name">Nama</label>
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="username">Nama Pengguna</label>
|
||||
<input type="text" class="form-control" name="username" id="username" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="name">Cawangan</label>
|
||||
<select class="custom-select" name="caw" id="caw" required>
|
||||
<option disabled>Pilih Cawangan</option>
|
||||
<option selected value="">-</option>
|
||||
@foreach ($caw as $item)
|
||||
<option value="{{$item->caw_code}}">{{$item->caw_name}}</option>
|
||||
@endforeach
|
||||
|
||||
<!-- <option value="all">Select All</option> -->
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="email">Emel</label>
|
||||
<input type="email" class="form-control" name="email" id="email" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="notelbimbit">No.Telefon Bimbit</label>
|
||||
<input type="text" class="form-control" name="notelbimbit" id="notelbimbit" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<h4 class="col-md-3">Taraf Pengguna</h4>
|
||||
<div class="form-group col-md-9">
|
||||
@foreach ($allRolesPluck as $namataraf)
|
||||
<div class="col-4 form-check form-check-inline">
|
||||
<input class="form-check-input checkbox" name="taraf{{$namataraf}}" onclick="checkboxRoles(this)" type="checkbox" id="taraf{{$namataraf}}" value="{{$namataraf}}">
|
||||
<label class="form-check-label" for="taraf{{$namataraf}}">{{$namataraf}}</label>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
|
||||
<button type="button" class="btn btn-primary" onclick="storepengguna()">Simpan</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var allRoles = JSON.parse('<?php echo json_encode($allRolesPluck) ?>');
|
||||
var allRolesWithTaraf = [];
|
||||
for (item of allRoles) {
|
||||
var itemToAdded = "";
|
||||
itemToAdded = itemToAdded.concat("taraf", item);
|
||||
allRolesWithTaraf.push(itemToAdded);
|
||||
}
|
||||
|
||||
function checkboxRoles(taraf) {
|
||||
for (const item of allRolesWithTaraf) {
|
||||
if (taraf.id == item) {
|
||||
if (taraf.checked == true) {
|
||||
if (taraf.id == "tarafadmin") {
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafadmin').prop("disabled", true);
|
||||
});
|
||||
} else if (taraf.id == "tarafaccount") {
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafaccount').prop("disabled", true);
|
||||
});
|
||||
}else if (taraf.id == "tarafajk") {
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafajk').prop("disabled", true);
|
||||
});
|
||||
} else if (taraf.id == "tarafcallcenter") {
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafcallcenter').prop("disabled", true);
|
||||
});
|
||||
} else if (taraf.id == "tarafpembida") {
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafpembida').prop("disabled", true);
|
||||
});
|
||||
} else if (taraf.id == "tarafpenilai" || taraf.id == "tarafkhazanah" || taraf.id == "tarafpengurus-cawangan") {
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafpenilai, #tarafkhazanah, #tarafpengurus-cawangan').prop("disabled", true);
|
||||
});
|
||||
} else if (taraf.id == "tarafoperasi" || taraf.id == "tarafjurulelong" || taraf.id == "tarafpengurus-operasi") {
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafoperasi, #tarafjurulelong, #tarafpengurus-operasi').prop("disabled", true);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$(".checkbox").each(function() {
|
||||
if ($('.checkbox:checked').length == 0) {
|
||||
$(this).prop("disabled", false);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Enable tooltips everywhere
|
||||
$(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
$('a.confirmdel').confirm({
|
||||
title: 'Padam Simulasi',
|
||||
content: 'Adakah anda pasti? Tindakan ini tidak dapat dikembalikan.',
|
||||
icon: 'fa fa-exclamation-triangle',
|
||||
type: 'red',
|
||||
boxWidth: '500px',
|
||||
useBootstrap: false,
|
||||
typeAnimated: true,
|
||||
buttons: {
|
||||
Batal: {
|
||||
btnClass: 'btn-default',
|
||||
action: function() {}
|
||||
},
|
||||
Hapus: {
|
||||
btnClass: 'btn-red',
|
||||
action: function() {
|
||||
location.href = this.$target.attr('href');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var tablepengguna = $('#pengguna').DataTable({
|
||||
"columnDefs": [{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 4,
|
||||
// "orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 5,
|
||||
// "orderable": false
|
||||
}
|
||||
],
|
||||
order: [
|
||||
[0, 'asc']
|
||||
],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
// 'copy', 'excel', 'pdf'
|
||||
// { text: 'copy', className: 'btn btn-primary' },
|
||||
// {
|
||||
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm adduser',
|
||||
// text: '<i class="fas fa-plus" id="test"></i>',
|
||||
// titleAttr: 'Tambah Pengguna',
|
||||
// action: function(e, dt, node, config) {
|
||||
// //alert( 'Button activated' );
|
||||
// // console.log('hye');
|
||||
|
||||
// $('#myModal').modal("show");
|
||||
// $('#myModal').on('shown.bs.modal', function() {
|
||||
// $('#rolename').trigger('focus')
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
|
||||
// {
|
||||
// className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
|
||||
// titleAttr: 'Eksport kpd CSV',
|
||||
// text: '<i class="fas fa-download"></i>',
|
||||
// action: function(e, dt, node, config) {
|
||||
// $("#exportform").submit();
|
||||
// }
|
||||
// }
|
||||
]
|
||||
});
|
||||
|
||||
$('.adduser').tooltip();
|
||||
$('.export').tooltip();
|
||||
// $( '.dt-buttons').addClass('btn-group');
|
||||
$('.adduser').removeClass('dt-button');
|
||||
$('.export').removeClass('dt-button');
|
||||
|
||||
|
||||
function selectall(cb) {
|
||||
tablepengguna.rows().nodes().to$().find('input[type="checkbox"]').each(function() {
|
||||
$(this).prop('checked', cb.checked);
|
||||
})
|
||||
}
|
||||
|
||||
function storepengguna() {
|
||||
$("#formpengguna").submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -130,6 +130,13 @@
|
||||
<input type="email" class="form-control" name="email" id="email" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="notelbimbit">No.Telefon Bimbit</label>
|
||||
<input type="text" class="form-control" name="notelbimbit" id="notelbimbit" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<h4 class="col-md-3">Taraf Pengguna</h4>
|
||||
<div class="form-group col-md-9">
|
||||
@@ -172,6 +179,10 @@
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafaccount').prop("disabled", true);
|
||||
});
|
||||
}else if (taraf.id == "tarafajk") {
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafajk').prop("disabled", true);
|
||||
});
|
||||
} else if (taraf.id == "tarafcallcenter") {
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafcallcenter').prop("disabled", true);
|
||||
|
||||
@@ -40,6 +40,12 @@
|
||||
<!-- <option value="all">Select All</option> -->
|
||||
</select>
|
||||
</div>
|
||||
@if($user->user_type == 3)
|
||||
<div class="form-group col-md-6">
|
||||
<label for="inputPassword4">No.Telefon</label>
|
||||
<input type="text" value="{{$user->notelbimbit}}" class="form-control" name="notelbimbit" id="notelbimbit" required>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<h4 class="col-md-3">Taraf Pengguna</h4>
|
||||
@@ -53,7 +59,7 @@
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@if($user->user_type == 1)
|
||||
@if($user->user_type == 1 | $user->user_type == 3)
|
||||
<div class="d-flex form-group">
|
||||
<div class="d-flex col-md-6">
|
||||
<div style="margin-right:2%;">
|
||||
@@ -110,7 +116,12 @@
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafaccount').prop("disabled", true);
|
||||
});
|
||||
} else if (taraf.id == "tarafcallcenter") {
|
||||
}else if (taraf.id == "tarafajk") {
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafajk').prop("disabled", true);
|
||||
});
|
||||
}
|
||||
else if (taraf.id == "tarafcallcenter") {
|
||||
$(".checkbox").each(function() {
|
||||
$(this).not('#tarafcallcenter').prop("disabled", true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user