Commit c8ce83fb by hannan

changes

parent 8e24e280
@extends('ui::layouts.app') @extends('ui::layouts.app')
@section('content') @section('content')
<?php
$admin = count($staffs->where('fk_lkp_department', 1));
$tms = count($staffs->where('fk_lkp_department', 2));
$pss = count($staffs->where('fk_lkp_department', 3));
$pms = count($staffs->where('fk_lkp_department', 4));
$pcs = count($staffs->where('fk_lkp_department', 5));
$spd = count($staffs->where('fk_lkp_department', 6));
$bdd = count($staffs->where('fk_lkp_department', 7));
// dd($data);
$dataPoints = array(
array("label"=> "ADMIN", "y"=> $admin),
array("label"=> "TMS", "y"=> $tms),
array("label"=> "PSS", "y"=> $pss),
array("label"=> "PMS", "y"=> $pms),
array("label"=> "PCS", "y"=> $pcs),
array("label"=> "SPD", "y"=> $spd),
array("label"=> "BDD", "y"=> $bdd)
);
?>
<!-- <div class="ui segment">
<div class="row">
<div class="col">
<canvas id="myChart"></canvas>
</div>
</div>
</div>
<div class="ui segment">
<div class="row">
<div id="chartContainer" style="height: 370px; width: 100%;"></div>
</div>
</div> -->
<div class="ui segment"> <div class="ui segment">
<!-- <a class="ui blue left ribbon label">Welcome Back</a> <!-- <a class="ui blue left ribbon label">Welcome Back</a>
<br> <br>
...@@ -40,23 +77,23 @@ ...@@ -40,23 +77,23 @@
<table class="ui unstackable celled table"> <table class="ui unstackable celled table">
<thead> <thead>
<tr> <tr>
<th>Year</th> <th class="single line">Year</th>
<th>Month</th> <th class="single line">Month</th>
<th>Phase</th> <th class="single line">Phase</th>
<th>Status</th> <th class="single line">Status</th>
<th>Action</th> <th class="single line">Action</th>
<th>Submission Date</th> <th class="single line">Submission Date</th>
<th>Verified Date</th> <th class="single line">Verified Date</th>
<th>Approval Date</th> <th class="single line">Approval Date</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach($timesheet as $key => $value) @foreach($timesheet as $key => $value)
<tr> <tr>
<td>{{ data_get($value,'tm_year') }}</td> <td class="single line">{{ data_get($value,'tm_year') }}</td>
<td>{{ data_get($value,'tm_month') }}</td> <td class="single line">{{ data_get($value,'tm_month') }}</td>
<td>{{ data_get($value,'tm_phase') }}</td> <td class="single line">{{ data_get($value,'tm_phase') }}</td>
<td> <td class="single line">
@if($value->tm_timesheet_master_sts == 1) Draft @if($value->tm_timesheet_master_sts == 1) Draft
@elseif($value->tm_timesheet_master_sts == 2) Submitted @elseif($value->tm_timesheet_master_sts == 2) Submitted
@elseif($value->tm_timesheet_master_sts == 3) Verified by HOD/HOU @elseif($value->tm_timesheet_master_sts == 3) Verified by HOD/HOU
...@@ -66,7 +103,7 @@ ...@@ -66,7 +103,7 @@
@elseif($value->tm_timesheet_master_sts == 7) Rejected by BOD @elseif($value->tm_timesheet_master_sts == 7) Rejected by BOD
@endif @endif
</td> </td>
<td> <td class="single line">
@if($value->tm_timesheet_master_sts == 1) Submit after timesheet completion @if($value->tm_timesheet_master_sts == 1) Submit after timesheet completion
@elseif($value->tm_timesheet_master_sts == 2) Need to verified by HOD @elseif($value->tm_timesheet_master_sts == 2) Need to verified by HOD
@elseif($value->tm_timesheet_master_sts == 3) Need to approved by BOD @elseif($value->tm_timesheet_master_sts == 3) Need to approved by BOD
...@@ -76,9 +113,9 @@ ...@@ -76,9 +113,9 @@
@elseif($value->tm_timesheet_master_sts == 7) Revised the timesheet @elseif($value->tm_timesheet_master_sts == 7) Revised the timesheet
@endif @endif
</td> </td>
<td>{{ data_get($value,'tm_submission_at') }}</td> <td class="single line">{{ data_get($value,'tm_submission_at') }}</td>
<td>{{ data_get($value,'tm_verified_at') }}</td> <td class="single line">{{ data_get($value,'tm_verified_at') }}</td>
<td>{{ data_get($value,'tm_approved_at') }}</td> <td class="single line">{{ data_get($value,'tm_approved_at') }}</td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
...@@ -87,3 +124,62 @@ ...@@ -87,3 +124,62 @@
</div> </div>
@endsection @endsection
@push('script')
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js"></script>
<script>
const data = {
labels: [
'Admin',
'TMS',
'PSS'
],
datasets: [{
label: 'My First Dataset',
data: [100, 150, 200],
backgroundColor: [
'rgb(255, 99, 132)',
'rgb(54, 162, 235)',
'rgb(255, 205, 86)'
],
hoverOffset: 4
}]
};
new Chart("myChart", {
type: "doughnut",
data: data,
});
</script>
<script>
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer", {
animationEnabled: true,
exportEnabled: true,
title:{
text: "Percentage of 3F Staffs"
},
subtitles: [{
text: "--------"
}],
data: [{
type: "pie",
showInLegend: "true",
legendText: "{label}",
indexLabelFontSize: 16,
indexLabel: "{label} - #percent%",
yValueFormatString: "#,##",
dataPoints: <?php echo json_encode($dataPoints, JSON_NUMERIC_CHECK); ?>
}]
});
chart.render();
}
</script>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
@endpush
\ No newline at end of file
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</div> </div>
</div> </div>
<div class="ui unstackable segment"> <div class="ui unstackable segment">
<a class="ui blue left ribbon label">Senarai Notes</a> <a class="ui blue left ribbon label">Senarai Notes</a>
<br><br> <br><br>
@if(data_get($staff,'fk_lkp_department') == 7) @if(data_get($staff,'fk_lkp_department') == 7)
......
@extends('ui::layouts.app') @extends('ui::layouts.app')
@section('content') @section('content')
<div class="ui segment"> <div class="ui segment">
<a class="ui blue left ribbon label">Penambahan Note</a> <a class="ui blue left ribbon label">Penambahan Note</a>
<br><br> <br><br>
<form class="ui form" action="{{ route('timesheet::form.addnote') }}" method="POST"> <form class="ui form" action="{{ route('timesheet::form.addnote') }}" method="POST">
...@@ -27,5 +27,5 @@ ...@@ -27,5 +27,5 @@
</div> </div>
<button class="ui button" type="submit">Submit</button> <button class="ui button" type="submit">Submit</button>
</form> </form>
</div> </div>
@endsection @endsection
\ No newline at end of file
...@@ -16,9 +16,10 @@ ...@@ -16,9 +16,10 @@
<div class="header"> <div class="header">
Project Detail's Project Detail's
</div> </div>
<div class="content">
<div class="content">
</div> </div>
<div class="actions"> <div class="actions">
<div class="ui black deny button"> <div class="ui black deny button">
Cancel Cancel
......
@extends('ui::layouts.app') @extends('ui::layouts.app')
@section('content') @section('content')
<div class="ui segment"> <div class="ui segment">
<a class="ui blue left ribbon label">Add New Role</a> <a class="ui blue left ribbon label">Add New Role</a>
<br><br> <br><br>
<form class="ui form" action="{{ route('timesheet::maintenance.updaterole' )}}" method="POST"> <form class="ui form" action="{{ route('timesheet::maintenance.updaterole' )}}" method="POST">
{{csrf_field()}} {{csrf_field()}}
<input type="hidden" name="id" value="{{data_get($role,'id')}}"> <input type="hidden" name="id" value="{{data_get($role,'id')}}">
...@@ -21,5 +22,5 @@ ...@@ -21,5 +22,5 @@
</div> </div>
<button class="ui button" type="submit">Update</button> <button class="ui button" type="submit">Update</button>
</form> </form>
</div> </div>
@endsection @endsection
\ No newline at end of file
@extends('ui::layouts.app') @extends('ui::layouts.app')
@section('content') @section('content')
<div class="ui segment">
<div class="ui segment">
<a class="ui blue left ribbon label">Edit Project Team</a> <a class="ui blue left ribbon label">Edit Project Team</a>
<br><br> <br><br>
<form class="ui form" action="{{ route('timesheet::maintenance.updateprojectteam')}}" method="POST"> <form class="ui form" action="{{ route('timesheet::maintenance.updateprojectteam')}}" method="POST">
{{csrf_field()}} {{csrf_field()}}
<input type="hidden" name="id" value="{{data_get($team,'id')}} "> <input type="hidden" name="id" value="{{data_get($team,'id')}} ">
<input type="hidden" name="pid" value="{{data_get($team,'fk_project_id')}} "> <input type="hidden" name="pid" value="{{data_get($team,'fk_project_id')}} ">
<div class="field"> <div class="field">
<label for="projectteam">Project Team</label> <label for="projectteam">Project Team</label>
<input type="text" name="projectteam" value="{{data_get($team,'pt_team')}}" readonly="readonly"> <input type="text" name="projectteam" value="{{data_get($team,'pt_team')}}" readonly="readonly">
</div> </div>
<div class="field"> <div class="field">
<label>Role</label> <label>Role</label>
<select name="role" class="ui fluid dropdown"> <select name="role" class="ui fluid dropdown">
...@@ -21,6 +24,7 @@ ...@@ -21,6 +24,7 @@
@endforeach @endforeach
</select> </select>
</div> </div>
<div class="field"> <div class="field">
<label>Project Team Status</label> <label>Project Team Status</label>
<select name="status" class="ui fluid dropdown"> <select name="status" class="ui fluid dropdown">
...@@ -28,9 +32,10 @@ ...@@ -28,9 +32,10 @@
<option value="0">Inactive</option> <option value="0">Inactive</option>
</select> </select>
</div> </div>
<button class="ui blue button" type="submit">Update</button> <button class="ui blue button" type="submit">Update</button>
<button class="ui green button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProjectTeam', ['id'=> $pid] ) }} ';">Back</button> <button class="ui green button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProjectTeam', ['id'=> $pid] ) }} ';">Back</button>
</form> </form>
</div> </div>
@endsection @endsection
\ No newline at end of file
...@@ -6,11 +6,14 @@ ...@@ -6,11 +6,14 @@
<br><br> <br><br>
<form class="ui form" action="{{ route('timesheet::maintenance.updateoverhead' )}}" method="POST"> <form class="ui form" action="{{ route('timesheet::maintenance.updateoverhead' )}}" method="POST">
{{csrf_field()}} {{csrf_field()}}
<input type="hidden" name="id" value="{{data_get($data,'id')}}"> <input type="hidden" name="id" value="{{data_get($data,'id')}}">
<div class="field"> <div class="field">
<label>Overhead Description</label> <label>Overhead Description</label>
<input type="text" name="description" value="{{ data_get($data,'o_overhead_desc') }}"> <input type="text" name="description" value="{{ data_get($data,'o_overhead_desc') }}">
</div> </div>
<div class="field"> <div class="field">
<label>Role Status</label> <label>Role Status</label>
<select name="status" class="ui fluid dropdown"> <select name="status" class="ui fluid dropdown">
...@@ -18,7 +21,9 @@ ...@@ -18,7 +21,9 @@
<option value="0">Inactive</option> <option value="0">Inactive</option>
</select> </select>
</div> </div>
<button class="ui green button" type="submit">Update</button> <button class="ui green button" type="submit">Update</button>
</form> </form>
</div> </div>
@endsection @endsection
\ No newline at end of file
@extends('ui::layouts.app') @extends('ui::layouts.app')
@section('content') @section('content')
<div class="ui segment"> <div class="ui segment">
<a class="ui blue left ribbon label">Add New Overhead Lookup</a> <a class="ui blue left ribbon label">Add New Overhead Lookup</a>
<br><br> <br><br>
<form class="ui form" action="{{ route('timesheet::maintenance.addoverheadlookup' )}}" method="POST"> <form class="ui form" action="{{ route('timesheet::maintenance.addoverheadlookup' )}}" method="POST">
...@@ -20,5 +20,5 @@ ...@@ -20,5 +20,5 @@
</div> </div>
<button class="ui blue button" type="submit">Add</button> <button class="ui blue button" type="submit">Add</button>
</form> </form>
</div> </div>
@endsection @endsection
\ No newline at end of file
@extends('ui::layouts.app') @extends('ui::layouts.app')
@section('content') @section('content')
<div class="ui segment"> <div class="ui segment">
<a class="ui blue left ribbon label">Add New Role</a> <a class="ui blue left ribbon label">Add New Role</a>
<br><br> <br><br>
<form class="ui form" action="{{ route('timesheet::maintenance.addrole' )}}" method="POST"> <form class="ui form" action="{{ route('timesheet::maintenance.addrole' )}}" method="POST">
...@@ -20,5 +20,5 @@ ...@@ -20,5 +20,5 @@
</div> </div>
<button class="ui button" type="submit">Add</button> <button class="ui button" type="submit">Add</button>
</form> </form>
</div> </div>
@endsection @endsection
\ No newline at end of file
@extends('ui::layouts.app') @extends('ui::layouts.app')
@section('content') @section('content')
<div class="ui segment"> <div class="ui segment">
<a class="ui blue left ribbon label">Add New Project</a> <a class="ui blue left ribbon label">Add New Project</a>
<br><br> <br><br>
<form class="ui form" action="{{ route('timesheet::maintenance.addnewproject' )}}" method="POST"> <form class="ui form" action="{{ route('timesheet::maintenance.addnewproject' )}}" method="POST">
...@@ -35,6 +35,6 @@ ...@@ -35,6 +35,6 @@
<button class="ui blue button" type="submit">Add</button> <button class="ui blue button" type="submit">Add</button>
<button class="ui green button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProject') }} ';">Back</button> <button class="ui green button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProject') }} ';">Back</button>
</form> </form>
</div> </div>
@endsection @endsection
\ No newline at end of file
@extends('ui::layouts.app') @extends('ui::layouts.app')
@section('content') @section('content')
<div class="ui segment loading-screen"> <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::maintenance.addprojectteam' )}}" method="POST"> <form class="ui form" action="{{ route('timesheet::maintenance.addprojectteam' )}}" method="POST">
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<button class="ui blue button" type="submit">Add</button> <button class="ui blue button" type="submit">Add</button>
<button class="ui green button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProjectTeam', ['id'=> $pid] ) }} ';">Back</button> <button class="ui green button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProjectTeam', ['id'=> $pid] ) }} ';">Back</button>
</form> </form>
</div> </div>
@endsection @endsection
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
@section('content') @section('content')
<div class="ui segment"> <div class="ui segment">
<a class="ui blue left ribbon label">List of Overhead</a> <a class="ui blue left ribbon label">List of Overhead</a>
<a href="{{ route('timesheet::maintenance.penambahanOverhead')}} " class="ui right floated small primary labeled icon button"><i class="plus icon"></i>Add Overhead Lookup <a href="{{ route('timesheet::maintenance.penambahanOverhead')}} " class="ui right floated small primary labeled icon button"><i class="plus icon"></i>Add Overhead Lookup
</a> </a>
...@@ -30,5 +30,5 @@ ...@@ -30,5 +30,5 @@
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
@endsection @endsection
\ No newline at end of file
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
@section('content') @section('content')
<div class="ui segment"> <div class="ui segment">
<a class="ui blue left ribbon label">List of Project Roles</a> <a class="ui blue left ribbon label">List of Project Roles</a>
<a href="{{ route('timesheet::maintenance.penambahanPeranan')}} " class="ui right floated small primary button"></i>Add New Project Role <a href="{{ route('timesheet::maintenance.penambahanPeranan')}} " class="ui right floated small primary button">Add New Project Role</a>
</a>
<br> <br>
<table class="ui celled padded unstackable table"> <table class="ui celled padded unstackable table">
<thead> <thead>
...@@ -23,13 +22,12 @@ ...@@ -23,13 +22,12 @@
<td class="single line">{{$role['role']}} </td> <td class="single line">{{$role['role']}} </td>
<td class="center aligned single line">{{$role['status']}} </td> <td class="center aligned single line">{{$role['status']}} </td>
<td class="center aligned single line"> <td class="center aligned single line">
<button class="compact ui olive button" onclick="window.location.href='{{ route('timesheet::maintenance.editPeranan', ['id' => $role['id']]) }}';">Edit <button class="compact ui olive button" onclick="window.location.href='{{ route('timesheet::maintenance.editPeranan', ['id' => $role['id']]) }}';">Edit</button>
</button>
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
@endsection @endsection
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
@section('content') @section('content')
<div class="ui segment"> <div class="ui segment">
<a class="ui blue left ribbon label">List of Project</a> <a class="ui blue left ribbon label">List of Project</a>
<a href="{{ route('timesheet::maintenance.penambahanProject')}} " class="ui right floated small primary labeled icon button"><i class="plus icon"></i>Add New Project <a href="{{ route('timesheet::maintenance.penambahanProject')}} " class="ui right floated small primary labeled icon button"><i class="plus icon"></i>Add New Project</a>
</a>
<br> <br>
<table class="ui celled structured table unstackable"> <table class="ui celled structured table unstackable">
<thead> <thead>
...@@ -40,8 +39,7 @@ ...@@ -40,8 +39,7 @@
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
@endsection @endsection
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
@section('content') @section('content')
<div class="ui segment"> <div class="ui segment">
<a class="ui blue left ribbon label">List of Project Team</a> <a class="ui blue left ribbon label">List of Project Team</a>
<a href="{{ route('timesheet::maintenance.penambahanProjectTeam', ['id' => $pid]) }} " class="ui right floated small primary labeled icon button"><i class="plus icon"></i>Add New Project Team <a href="{{ route('timesheet::maintenance.penambahanProjectTeam', ['id' => $pid]) }} " class="ui right floated small primary labeled icon button"><i class="plus icon"></i>Add New Project Team</a>
</a>
<br> <br>
<table class="ui celled structured unstackable table"> <table class="ui celled structured unstackable table">
<thead> <thead>
...@@ -29,36 +28,16 @@ ...@@ -29,36 +28,16 @@
<td class="single line">{{ data_get($project, 'role') }}</td> <td class="single line">{{ data_get($project, 'role') }}</td>
<td class="single line">{{$project['status']}} </td> <td class="single line">{{$project['status']}} </td>
<td class="single line"> <td class="single line">
<button class="compact ui olive button" onclick="window.location.href='{{ route('timesheet::maintenance.editprojectteam', ['id' => $project['id']])}}';">Edit <button class="compact ui olive button" onclick="window.location.href='{{ route('timesheet::maintenance.editprojectteam', ['id' => $project['id']])}}';">Edit</button>
</button>
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
<!-- <tfoot>
<tr>
<th colspan="7">
<div class="ui right floated pagination menu">
<a class="icon item">
<i class="left chevron icon"></i>
</a>
<a class="item">1</a>
<a class="item">2</a>
<a class="item">3</a>
<a class="item">4</a>
<a class="icon item">
<i class="right chevron icon"></i>
</a>
</div>
</th>
</tr>
</tfoot> -->
</table> </table>
<button class="center aligned ui teal compact labeled icon button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProject', [ 'id' => $pid ]) }}';"> <button class="center aligned ui teal compact labeled icon button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProject', [ 'id' => $pid ]) }}';">
<i class="angle double left icon"></i> <i class="angle double left icon"></i>
Back Back
</button> </button>
</div> </div>
@endsection @endsection
@extends('ui::layouts.app') @extends('ui::layouts.app')
@section('content') @section('content')
<div class="ui segment"> <div class="ui segment">
<a class="ui blue left ribbon label">Edit Project</a> <a class="ui blue left ribbon label">Edit Project</a>
<br><br> <br><br>
<form class="ui form" action="{{ route('timesheet::maintenance.editproject') }}" method="POST"> <form class="ui form" action="{{ route('timesheet::maintenance.editproject') }}" method="POST">
...@@ -39,5 +39,5 @@ ...@@ -39,5 +39,5 @@
<button class="ui blue button" type="submit">Update</button> <button class="ui blue button" type="submit">Update</button>
<button class="ui green button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProject') }} ';">Back</button> <button class="ui green button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProject') }} ';">Back</button>
</form> </form>
</div> </div>
@endsection @endsection
\ No newline at end of file
...@@ -53,9 +53,11 @@ class DashboardController extends Controller ...@@ -53,9 +53,11 @@ class DashboardController extends Controller
} }
if (($roleid == ('2'||'5'||'6'||'7'||'8'))) { if (($roleid == ('2'||'5'||'6'||'7'||'8'))) {
$staffid = users::find(Auth::id()) $staffid = Users::find(Auth::id())
->u_staffID; ->u_staffID;
$staffs = Staff_info::where('status', 1)->get();
// dd($staffs);
$timesheet = Ts_master::where('tm_staff_id', $staffid) $timesheet = Ts_master::where('tm_staff_id', $staffid)
->orderby('tm_year') ->orderby('tm_year')
->orderby('tm_month', 'DESC') ->orderby('tm_month', 'DESC')
...@@ -70,7 +72,7 @@ class DashboardController extends Controller ...@@ -70,7 +72,7 @@ class DashboardController extends Controller
} }
)->paginate(15); )->paginate(15);
return view('timesheet::dashboard.dashboardstaff',compact('user', 'timesheet')); return view('timesheet::dashboard.dashboardstaff',compact('user', 'timesheet', 'staffs'));
}if ($roleid == '3') { }if ($roleid == '3') {
......
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