Commit 7c9a3909 by hannan

add loading ui

parent a1399ef8
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<div class="ui fluid multiple search selection"> <div class="ui fluid multiple search selection">
<input type="hidden" name="staffId"> <input type="hidden" name="staffId">
<i class="dropdown icon"></i> <i class="dropdown icon"></i>
<div class="default text">Staff Name</div>
<div class="menu" id="selectBox"> <div class="menu" id="selectBox">
@foreach($staffs as $key => $staff) @foreach($staffs as $key => $staff)
<div class="item" data-value="{{$staff->id}}" data-text="{{$staff->fullname}}"> <div class="item" data-value="{{$staff->id}}" data-text="{{$staff->fullname}}">
......
@extends('ui::layouts.app') @extends('ui::layouts.app')
@section('content') @section('content')
<div class="ui segment"> <div class="ui segment loading-screen">
<a class="ui blue left ribbon label">Add New Project Team</a> <a class="ui blue left ribbon label">Add New Project Team</a>
<br><br> <br><br>
<form class="ui form" action="{{ route('timesheet::dashboard.addprojectteam' )}}" method="POST"> <form class="ui form" action="{{ route('timesheet::dashboard.addprojectteam' )}}" method="POST">
{{csrf_field()}} {{csrf_field()}}
<div class="field"> <div class="field">
<label>Project Code</label> <label>Project Code</label>
<input onselect="myDepartment()" type="text" name="projectcode" placeholder="Project Code" value="{{ $project->p_project_code }} | {{ $project->p_project_description }}"> <input onselect="myDepartment()" type="text" name="projectcode" placeholder="Project Code" value="{{ $project->p_project_code }} | {{ $project->p_project_description }}" readonly="readonly">
</div> </div>
<div class="field"> <div class="field">
<label>Department</label> <label>Department</label>
...@@ -68,6 +68,7 @@ function myDepartment() { ...@@ -68,6 +68,7 @@ function myDepartment() {
beforeSend: function () beforeSend: function ()
{ {
// $("#exampleModalCenter").modal('show'); // $("#exampleModalCenter").modal('show');
block('loading-screen');
}, },
success: function(html) success: function(html)
...@@ -76,6 +77,7 @@ function myDepartment() { ...@@ -76,6 +77,7 @@ function myDepartment() {
// $("#exampleModalCenter").modal('hide'); // $("#exampleModalCenter").modal('hide');
$('#divstaff').html(html); $('#divstaff').html(html);
// window.location.replace("{{ URL::to('ad/index')}}"); // window.location.replace("{{ URL::to('ad/index')}}");
unblock('loading-screen');
} }
...@@ -83,11 +85,11 @@ function myDepartment() { ...@@ -83,11 +85,11 @@ function myDepartment() {
} }
</script> </script>
<script> <!-- <script>
function selectedTeam() { function selectedTeam() {
var selectBox = document.getElementById("selectBox"); var selectBox = document.getElementById("selectBox");
var selectedValue = selectBox.options[selectBox.selectedIndex].value; var selectedValue = selectBox.options[selectBox.selectedIndex].value;
alert(selectedValue); alert(selectedValue);
} }
</script> </script> -->
@endpush @endpush
\ No newline at end of file
...@@ -870,7 +870,10 @@ class DashboardController extends Controller ...@@ -870,7 +870,10 @@ class DashboardController extends Controller
public function loadstaff($dept) public function loadstaff($dept)
{ {
$staffs = Staff_info::where('fk_lkp_department',$dept)->get(); $staffs = Staff_info::where('fk_lkp_department',$dept)
->where('status', 1)
->get();
return view('timesheet::ajax.senaraistaff', compact('staffs')); return view('timesheet::ajax.senaraistaff', compact('staffs'));
} }
} }
......
...@@ -27,10 +27,65 @@ ...@@ -27,10 +27,65 @@
<script type="text/javascript" src="{{ mix('js/all.js', 'laravolt') }}"></script> <script type="text/javascript" src="{{ mix('js/all.js', 'laravolt') }}"></script>
<script type="text/javascript" src="{{ asset('calendar/lib/main.js') }}"></script> <script type="text/javascript" src="{{ asset('calendar/lib/main.js') }}"></script>
<script type="text/javascript" src="{{ asset('calendar/lib/locales-all.js') }}"></script> <script type="text/javascript" src="{{ asset('calendar/lib/locales-all.js') }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js"></script>
<script type="text/javascript">
function block(className){
var message = '<div class="intro-y grid grid-cols-6 sm:gap-6 gap-y-6 box px-5 py-8 mt-5 mb-5" id="indeterminate-linear-fee">';
message += '<div class="col-span-6 sm:col-span-3 xl:col-span-10 flex flex-col items-center">';
message += '<svg width="20" viewBox="0 0 135 140" xmlns="http://www.w3.org/2000/svg" fill="rgb(30, 41, 59)" class="w-8 h-8">';
message += '<rect y="10" width="15" height="120" rx="6">';
message += '<animate attributeName="height" begin="0.5s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"></animate>';
message += '<animate attributeName="y" begin="0.5s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"></animate>';
message += '</rect>';
message += '<rect x="30" y="10" width="15" height="120" rx="6">';
message += '<animate attributeName="height" begin="0.25s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"></animate>';
message += '<animate attributeName="y" begin="0.25s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"></animate>';
message += '</rect>';
message += '<rect x="60" width="15" height="140" rx="6">';
message += '<animate attributeName="height" begin="0s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"></animate>';
message += '<animate attributeName="y" begin="0s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"></animate>';
message += '</rect>';
message += '<rect x="90" y="10" width="15" height="120" rx="6">';
message += '<animate attributeName="height" begin="0.25s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"></animate>';
message += '<animate attributeName="y" begin="0.25s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"></animate>';
message += '</rect>';
message += '<rect x="120" y="10" width="15" height="120" rx="6">';
message += '<animate attributeName="height" begin="0.5s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"></animate>';
message += '<animate attributeName="y" begin="0.5s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"></animate>';
message += '</rect>';
message += '</svg> ';
message += '<div class="text-center text-xs mt-2">In Progress</div>';
message += '</div>';
message += '</div>';
$("." + className).block({
message: message,
overlayCSS: {
backgroundColor: '#353c48',
opacity: 0.8,
cursor: 'wait',
'z-index' : 10010
},
css: {
border: 0,
padding: 0,
backgroundColor: 'transparent',
'z-index' : 10011
}
});
}
function unblock(className){
$("." + className).unblock();
}
</script>
@stack('script') @stack('script')
@stack('body') @stack('body')
</body> </body>
</html> </html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment