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
...@@ -3,69 +3,69 @@ ...@@ -3,69 +3,69 @@
@section('content') @section('content')
<div class="ui tiny orange modal uploadmodal"> <div class="ui tiny orange modal uploadmodal">
<div class="header"> <div class="header">
Upload Attachment Upload Attachment
</div>
<div class="content">
<form class="ui form" action="/action/upload" method="POST" enctype="multipart/form-data">
{{csrf_field()}}
<input type="hidden" name="id" value="{{$fk_tm_id}}">
<div class="field">
<label for="title">File Name</label>
<input type="text" name="filename">
</div>
<div class="field">
<label>Upload file</label>
<input type="file" name="attachment" id="uploadfile" style="" accept=".xls, .xlsx, .pdf">
</div>
<button class="ui blue button" type="submit">Upload</button>
</form>
</div> </div>
<div class="content">
<form class="ui form" action="/action/upload" method="POST" enctype="multipart/form-data">
{{csrf_field()}}
<input type="hidden" name="id" value="{{$fk_tm_id}}">
<div class="field">
<label for="title">File Name</label>
<input type="text" name="filename">
</div>
<div class="field">
<label>Upload file</label>
<input type="file" name="attachment" id="uploadfile" style="" accept=".xls, .xlsx, .pdf">
</div>
<button class="ui blue button" type="submit">Upload</button>
</form>
</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)
<button class="right floated aligned ui olive compact labeled icon button" id="uploadmodal"> <button class="right floated aligned ui olive compact labeled icon button" id="uploadmodal">
<i class="file icon"></i> <i class="file icon"></i>
Upload File Upload File
</button> </button>
@endif @endif
<a href="{{ route('timesheet::form.penambahannote') }}" class="right floated aligned ui orange compact labeled icon button"> <a href="{{ route('timesheet::form.penambahannote') }}" class="right floated aligned ui orange compact labeled icon button">
<i class="plus icon"></i>Add New Notes <i class="plus icon"></i>Add New Notes
</a> </a>
<button class="center aligned ui purple compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.overheadForm', ['phase' => $phase, 'month' => $month]) }}';"> <button class="center aligned ui purple compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.overheadForm', ['phase' => $phase, 'month' => $month]) }}';">
<i class="angle double left icon"></i> <i class="angle double left icon"></i>
Overhead Form Overhead Form
</button> </button>
<button class="center aligned ui pink compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';"> <button class="center aligned ui pink compact right labeled icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i> <i class="angle double right icon"></i>
Timesheet Viewer Timesheet Viewer
</button> </button>
<table class="ui celled padded table"> <table class="ui celled padded table">
<thead> <thead>
<tr> <tr>
<th style="width: 3%;">No</th> <th style="width: 3%;">No</th>
<th style="width: 10%;">Date</th> <th style="width: 10%;">Date</th>
<th style="width: 20%;">Task</th> <th style="width: 20%;">Task</th>
<th>Description</th> <th>Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach($notes as $key => $value) @foreach($notes as $key => $value)
<tr> <tr>
<td>{{$key+1}} </td> <td>{{$key+1}} </td>
<td>{{ data_get($value,'td_date') }} </td> <td>{{ data_get($value,'td_date') }} </td>
<td>{{ data_get($value,'td_overhead_desc') }} </td> <td>{{ data_get($value,'td_overhead_desc') }} </td>
<td>{{ data_get($value,'td_overhead_note') }} </td> <td>{{ data_get($value,'td_overhead_note') }} </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
......
@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">
{{csrf_field()}} {{csrf_field()}}
<div class="two fields"> <div class="two fields">
<div class="three wide field"> <div class="three wide field">
<label>Date</label> <label>Date</label>
<input type="Date" name="date"> <input type="Date" name="date">
</div> </div>
<div class="three wide field"> <div class="three wide field">
<label>Task</label> <label>Task</label>
<select name="task" class="ui fluid dropdown"> <select name="task" class="ui fluid dropdown">
@foreach($task as $key => $value) @foreach($task as $key => $value)
<option value="{{$value->id}}">{{data_get($value,'o_overhead_desc')}}</option> <option value="{{$value->id}}">{{data_get($value,'o_overhead_desc')}}</option>
@endforeach @endforeach
<option value="0">Others</option> <option value="0">Others</option>
</select> </select>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label>Description</label> <label>Description</label>
<textarea name="description" cols="30" rows="10"></textarea> <textarea name="description" cols="30" rows="10"></textarea>
</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
...@@ -6,28 +6,29 @@ ...@@ -6,28 +6,29 @@
<a class="ui blue left ribbon label">Kalendar</a> <a class="ui blue left ribbon label">Kalendar</a>
<br> <br>
<br> <br>
<div class="column sixteen wide"> <div class="column sixteen wide">
<div id='calendar'></div> <div id='calendar'></div>
</div> </div>
</div> </div>
<div class="ui small modal"> <div class="ui small modal">
<i class="close icon"></i> <i class="close icon"></i>
<div class="header"> <div class="header">
Project Detail's Project Detail's
</div> </div>
<div class="content">
<div class="content">
</div>
<div class="actions">
<div class="ui black deny button">
Cancel
</div> </div>
<div class="ui positive right labeled icon button">
Save <div class="actions">
<i class="ui save outline icon"></i> <div class="ui black deny button">
Cancel
</div>
<div class="ui positive right labeled icon button">
Save
<i class="ui save outline icon"></i>
</div>
</div> </div>
</div>
</div> </div>
@endsection @endsection
...@@ -36,17 +37,17 @@ ...@@ -36,17 +37,17 @@
<script> <script>
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar'); var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, { var calendar = new FullCalendar.Calendar(calendarEl, {
eventClick: function(info) { eventClick: function(info) {
var eventObj = info.event; var eventObj = info.event;
if (eventObj.url) { if (eventObj.url) {
alert( alert(
'Clicked ' + eventObj.title + '.\n' + 'Clicked ' + eventObj.title + '.\n' +
'Will open ' + eventObj.url + ' in a new tab' 'Will open ' + eventObj.url + ' in a new tab'
); );
window.open(eventObj.url); window.open(eventObj.url);
......
@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')}}">
<div class="field"> <div class="field">
<label>Role Description</label> <label>Role Description</label>
<input type="text" name="role" value="{{data_get($role,'role')}} "> <input type="text" name="role" value="{{data_get($role,'role')}} ">
</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">
<option value=""> {{$status}} </option> <option value=""> {{$status}} </option>
<option value="1">Active</option> <option value="1">Active</option>
<option value="0">Inactive</option> <option value="0">Inactive</option>
</select> </select>
</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">
<a class="ui blue left ribbon label">Edit Project Team</a> <div class="ui segment">
<br><br> <a class="ui blue left ribbon label">Edit Project Team</a>
<form class="ui form" action="{{ route('timesheet::maintenance.updateprojectteam')}}" method="POST"> <br><br>
<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">
<option value="{{data_get($team,'role_id')}}">{{data_get($teamRole,'role')}}</option> <option value="{{data_get($team,'role_id')}}">{{data_get($teamRole,'role')}}</option>
@foreach($role as $key => $value) @foreach($role as $key => $value)
<option value="{{data_get($value,'id')}} ">{{data_get($value,'role')}}</option> <option value="{{data_get($value,'id')}} ">{{data_get($value,'role')}}</option>
@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">
<option value="1">Active</option> <option value="1">Active</option>
<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
...@@ -2,23 +2,28 @@ ...@@ -2,23 +2,28 @@
@section('content') @section('content')
<div class="ui segment"> <div class="ui segment">
<a class="ui blue left ribbon label">Edit Overhead</a> <a class="ui blue left ribbon label">Edit Overhead</a>
<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')}}">
<div class="field"> <input type="hidden" name="id" value="{{data_get($data,'id')}}">
<label>Overhead Description</label>
<input type="text" name="description" value="{{ data_get($data,'o_overhead_desc') }}"> <div class="field">
</div> <label>Overhead Description</label>
<div class="field"> <input type="text" name="description" value="{{ data_get($data,'o_overhead_desc') }}">
<label>Role Status</label> </div>
<select name="status" class="ui fluid dropdown">
<option value="1">Active</option> <div class="field">
<option value="0">Inactive</option> <label>Role Status</label>
</select> <select name="status" class="ui fluid dropdown">
</div> <option value="1">Active</option>
<button class="ui green button" type="submit">Update</button> <option value="0">Inactive</option>
</form> </select>
</div>
<button class="ui green button" type="submit">Update</button>
</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">
{{csrf_field()}} {{csrf_field()}}
<div class="field"> <div class="field">
<label>Overhead Lookup</label> <label>Overhead Lookup</label>
<input type="text" name="overheadlookup" placeholder="Enter new lookup overhead"> <input type="text" name="overheadlookup" placeholder="Enter new lookup overhead">
</div> </div>
<div class="field"> <div class="field">
<label>Overhead Status</label> <label>Overhead Status</label>
<select name="status" class="ui fluid dropdown"> <select name="status" class="ui fluid dropdown">
<option value="">Overhead Status</option> <option value="">Overhead Status</option>
<option value="1">Active</option> <option value="1">Active</option>
<option value="0">Inactive</option> <option value="0">Inactive</option>
</select> </select>
</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">
{{csrf_field()}} {{csrf_field()}}
<div class="field"> <div class="field">
<label>Role Description</label> <label>Role Description</label>
<input type="text" name="role" placeholder="Enter new role"> <input type="text" name="role" placeholder="Enter new role">
</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">
<option value="">Role Status</option> <option value="">Role Status</option>
<option value="1">Active</option> <option value="1">Active</option>
<option value="0">Inactive</option> <option value="0">Inactive</option>
</select> </select>
</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">
{{csrf_field()}} {{csrf_field()}}
<div class="two fields"> <div class="two fields">
<div class="five wide field"> <div class="five wide field">
<label>Project Code</label> <label>Project Code</label>
<input type="text" name="projectcode" placeholder="Project Code"> <input type="text" name="projectcode" placeholder="Project Code">
</div> </div>
<div class="five wide field"> <div class="five wide field">
<label>Project Name</label> <label>Project Name</label>
<input type="text" name="projectname" placeholder="Project Name"> <input type="text" name="projectname" placeholder="Project Name">
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label>Project Manager</label> <label>Project Manager</label>
<select name="projectmanager" class="ui fluid dropdown"> <select name="projectmanager" class="ui fluid dropdown">
<option value="">Project Manager</option> <option value="">Project Manager</option>
@foreach($pm as $key => $value) @foreach($pm as $key => $value)
<option value="{{data_get($value,'staff_id')}}">{{data_get($value,'fullname')}}</option> <option value="{{data_get($value,'staff_id')}}">{{data_get($value,'fullname')}}</option>
@endforeach @endforeach
</select> </select>
</div> </div>
<div class="field"> <div class="field">
<label>Project Status</label> <label>Project Status</label>
<select name="status" class="ui fluid dropdown"> <select name="status" class="ui fluid dropdown">
<option value="1">Active</option> <option value="1">Active</option>
<option value="0">Inactive</option> <option value="0">Inactive</option>
</select> </select>
</div> </div>
<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">
{{csrf_field()}} {{csrf_field()}}
<input type="hidden" name="pid" value="{{$pid}}"> <input type="hidden" name="pid" value="{{$pid}}">
<input type="hidden" name="pcode" value="{{ data_get($project,'p_project_code') }}"> <input type="hidden" name="pcode" value="{{ data_get($project,'p_project_code') }}">
<input type="hidden" name="pname" value="{{ data_get($project,'p_project_description') }}"> <input type="hidden" name="pname" value="{{ data_get($project,'p_project_description') }}">
<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="{{ data_get($project,'p_project_code') }} | {{ data_get($project,'p_project_description') }}" readonly="readonly"> <input onselect="myDepartment()" type="text" name="projectcode" placeholder="Project Code" value="{{ data_get($project,'p_project_code') }} | {{ data_get($project,'p_project_description') }}" readonly="readonly">
</div> </div>
<div class="field"> <div class="field">
<label>Department</label> <label>Department</label>
<select onchange="selectDepartment(value);" name="department" id="department" class="ui fluid dropdown"> <select onchange="selectDepartment(value);" name="department" id="department" class="ui fluid dropdown">
<option value="">Department</option> <option value="">Department</option>
@foreach($departments as $key => $department) @foreach($departments as $key => $department)
<option value="{{data_get($department,'id')}}">{{data_get($department,'code')}} | {{data_get($department,'description')}} </option> <option value="{{data_get($department,'id')}}">{{data_get($department,'code')}} | {{data_get($department,'description')}} </option>
@endforeach @endforeach
</select> </select>
</div> </div>
<div class="field"> <div class="field">
<label>Staff Name</label> <label>Staff Name</label>
<div class="ui fluid multiple search selection dropdown"> <div class="ui fluid multiple search selection dropdown">
<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="default text">Staff Name</div>
<div class="menu" id="divstaff" name="divstaff"> <div class="menu" id="divstaff" name="divstaff">
@foreach($staffs as $key => $staff) @foreach($staffs as $key => $staff)
<div class="item" data-value="{{data_get($staff,'id')}}" data-text="{{data_get($staff,'fullname')}}"> <div class="item" data-value="{{data_get($staff,'id')}}" data-text="{{data_get($staff,'fullname')}}">
{{data_get($staff,'fullname')}} {{data_get($staff,'fullname')}}
</div> </div>
@endforeach @endforeach
</div>
</div> </div>
</div>
</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">
<option value="">Role</option> <option value="">Role</option>
@foreach($roles as $key => $role) @foreach($roles as $key => $role)
<option value="{{data_get($role,'id')}}"> {{data_get($role,'role')}} </option> <option value="{{data_get($role,'id')}}"> {{data_get($role,'role')}} </option>
@endforeach @endforeach
</select> </select>
</div> </div>
<div class="field"> <div class="field">
<label>Project Status</label> <label>Project Status</label>
<select name="status" class="ui fluid dropdown"> <select name="status" class="ui fluid dropdown">
<!-- <option value="">Project Team Status</option> --> <!-- <option value="">Project Team Status</option> -->
<option value="1">Active</option> <option value="1">Active</option>
<option value="0">Inactive</option> <option value="0">Inactive</option>
</select> </select>
</div> </div>
<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,33 +2,33 @@ ...@@ -2,33 +2,33 @@
@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>
<br> <br>
<table class="ui celled structured unstackable table"> <table class="ui celled structured unstackable table">
<thead> <thead>
<tr> <tr>
<th style="width: 5%" class="center aligned">No</th> <th style="width: 5%" class="center aligned">No</th>
<th>Overhead Lookup</th> <th>Overhead Lookup</th>
<th style="width: 10%" class="center aligned">Status</th> <th style="width: 10%" class="center aligned">Status</th>
<th style="width: 10%" class="center aligned">Action</th> <th style="width: 10%" class="center aligned">Action</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach($overheads as $key => $overhead) @foreach($overheads as $key => $overhead)
<tr> <tr>
<td class="single line center aligned">{{$key+1}} </td> <td class="single line center aligned">{{$key+1}} </td>
<td class="single line">{{$overhead['lkp_overhead']}} </td> <td class="single line">{{$overhead['lkp_overhead']}} </td>
<td class="single line center aligned">{{$overhead['status']}} </td> <td class="single line center aligned">{{$overhead['status']}} </td>
<td class="single line center aligned"> <td class="single line center aligned">
<a href="{{ route('timesheet::maintenance.editoverhead', ['id'=>data_get($overhead, ['id'])])}}" class="ui center aligned small olive button"><i class="edit icon"></i>Edit <a href="{{ route('timesheet::maintenance.editoverhead', ['id'=>data_get($overhead, ['id'])])}}" class="ui center aligned small olive button"><i class="edit icon"></i>Edit
</a> </a>
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
@endsection @endsection
\ No newline at end of file
...@@ -2,34 +2,32 @@ ...@@ -2,34 +2,32 @@
@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> <tr>
<tr> <th class="center aligned single line" style="width: 4%;">No</th>
<th class="center aligned single line" style="width: 4%;">No</th> <th class="single line">Role Description</th>
<th class="single line">Role Description</th> <th class="center aligned single line" style="width: 10%;">Status</th>
<th class="center aligned single line" style="width: 10%;">Status</th> <th class="center aligned single line" style="width: 10%;">Action</th>
<th class="center aligned single line" style="width: 10%;">Action</th> </tr>
</tr> </thead>
</thead> <tbody>
<tbody>
@foreach($roles as $key => $role) @foreach($roles as $key => $role)
<tr> <tr>
<td class="center aligned single line">{{$key+1}} </td> <td class="center aligned single line">{{$key+1}} </td>
<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,46 +2,44 @@ ...@@ -2,46 +2,44 @@
@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> <tr>
<tr> <th class="single line">No</th>
<th class="single line">No</th> <th class="single line">Project Code</th>
<th class="single line">Project Code</th> <th class="single line">Project Name</th>
<th class="single line">Project Name</th> <th class="single line">Project Manager</th>
<th class="single line">Project Manager</th> <th class="text-center single line">Status</th>
<th class="text-center single line">Status</th> <th class="text-center single line">Action</th>
<th class="text-center single line">Action</th> </tr>
</tr> </thead>
</thead> <tbody>
<tbody> @foreach($projectlist as $key => $project)
@foreach($projectlist as $key => $project) <tr>
<tr> <td>{{$key+1}} </td>
<td>{{$key+1}} </td> <td class="single line">{{ data_get($project,'projectcode') }} </td>
<td class="single line">{{ data_get($project,'projectcode') }} </td> <td class="single line">{{ data_get($project,'projectname') }} </td>
<td class="single line">{{ data_get($project,'projectname') }} </td> <td class="single line">{{ data_get($project,'projectmanager') }} </td>
<td class="single line">{{ data_get($project,'projectmanager') }} </td> <td class="text-center single line">{{ data_get($project,'status') }} </td>
<td class="text-center single line">{{ data_get($project,'status') }} </td> <td class="text-center single line">
<td class="text-center single line"> <button class="compact green ui button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProjectTeam', ['id' => $project['id']]) }}';">
<button class="compact green ui button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiProjectTeam', ['id' => $project['id']]) }}';"> Team
Team </button>
</button> <button class="compact olive ui button" onclick="window.location.href='{{ route('timesheet::maintenance.updateProject', ['id' => $project['id']]) }}';">
<button class="compact olive ui button" onclick="window.location.href='{{ route('timesheet::maintenance.updateProject', ['id' => $project['id']]) }}';"> Edit Project
Edit Project </button>
</button> <button class="compact purple ui button" onclick="window.location.href='{{ route('timesheet::maintenance.mandays', ['id' => $project['id']]) }}';">
<button class="compact purple ui button" onclick="window.location.href='{{ route('timesheet::maintenance.mandays', ['id' => $project['id']]) }}';"> Mandays
Mandays </button>
</button> </td>
</td> </tr>
</tr> @endforeach
@endforeach </tbody>
</tbody>
</table> </table>
</div> </div>
@endsection @endsection
...@@ -2,63 +2,42 @@ ...@@ -2,63 +2,42 @@
@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> <tr>
<tr> <th>No</th>
<th>No</th> <th class="single line">Project Code</th>
<th class="single line">Project Code</th> <th class="single line">Project Name</th>
<th class="single line">Project Name</th> <th class="single line">Project Team</th>
<th class="single line">Project Team</th> <th class="single line">Role</th>
<th class="single line">Role</th> <th class="single line">Status</th>
<th class="single line">Status</th> <th class="single line">Action</th>
<th class="single line">Action</th> </tr>
</tr> </thead>
</thead> <tbody>
<tbody> @foreach($projectlist as $key => $project)
@foreach($projectlist as $key => $project) <tr>
<tr> <td class="single line">{{$key+1}} </td>
<td class="single line">{{$key+1}} </td> <td class="single line">{{$project['projectcode']}} </td>
<td class="single line">{{$project['projectcode']}} </td> <td class="single line">{{$project['projectname']}} </td>
<td class="single line">{{$project['projectname']}} </td> <td class="single line">{{$project['projectteam']}} </td>
<td class="single line">{{$project['projectteam']}} </td> <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>
<button class="compact ui olive button" onclick="window.location.href='{{ route('timesheet::maintenance.editprojectteam', ['id' => $project['id']])}}';">Edit </td>
</button> </tr>
</td> @endforeach
</tr> </tbody>
@endforeach
</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">
{{csrf_field()}} {{csrf_field()}}
<input type="hidden" name="staffid" value="{{$staffid}}"> <input type="hidden" name="staffid" value="{{$staffid}}">
<input type="hidden" name="pid" value="{{$pid}}"> <input type="hidden" name="pid" value="{{$pid}}">
<div class="field"> <div class="field">
<label>Project Code</label> <label>Project Code</label>
<input type="text" name="projectcode" value="{{data_get($project,'p_project_code')}}" disabled="disabled"> <input type="text" name="projectcode" value="{{data_get($project,'p_project_code')}}" disabled="disabled">
</div> </div>
<div class="field"> <div class="field">
<label>Project Name</label> <label>Project Name</label>
<input type="text" name="projectname" value="{{data_get($project,'p_project_description')}}" disabled="disabled"> <input type="text" name="projectname" value="{{data_get($project,'p_project_description')}}" disabled="disabled">
</div> </div>
<div class="field"> <div class="field">
<label>Project Manager</label> <label>Project Manager</label>
<select name="projectmanager" class="ui fluid dropdown"> <select name="projectmanager" class="ui fluid dropdown">
<option value="{{data_get($project,'p_project_task_team')}}"> <option value="{{data_get($project,'p_project_task_team')}}">
@foreach($pm as $key => $value) @foreach($pm as $key => $value)
@if($value->staff_id == $project->p_project_task_team){{data_get($value,'fullname')}}@endif @if($value->staff_id == $project->p_project_task_team){{data_get($value,'fullname')}}@endif
@endforeach @endforeach
</option> </option>
@foreach($pm as $key => $value) @foreach($pm as $key => $value)
<option value="{{data_get($value,'staff_id')}}">{{data_get($value,'fullname')}}</option> <option value="{{data_get($value,'staff_id')}}">{{data_get($value,'fullname')}}</option>
@endforeach @endforeach
</select> </select>
</div> </div>
<div class="field"> <div class="field">
<label>Project Status</label> <label>Project Status</label>
<select name="status" class="ui fluid dropdown"> <select name="status" class="ui fluid dropdown">
<option value="1">Active</option> <option value="1">Active</option>
<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.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