push -- izzat

parent 957594b6
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Portal\Timesheet\Model\Ts_master;
use Portal\Timesheet\Model\VwTpStatus;
use Portal\Timesheet\Model\VwPelulus;
use Mail;
use App\Mail\ApprovalNotification;
class Approval extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'approval:cron';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$year = date('Y');
$month = date('n');
$day = date('j');
if($day<16)
{
$phase = 2;
if ($month == 1)
{
$month = 12;
$year -= 1;
}
else
{
$month -=1;
}
}
else
{
$phase = 1;
}
$checktm = Ts_master::where('tm_year', $year)
->where('tm_month', $month)
->where('tm_phase', $phase)
->where('tm_timesheet_master_sts', 3)
->get();
$checktpproject = VwTpStatus::select('staffid', 'tp_project_type', 'fk_tm_id', 'tp_year', 'tp_month', 'tp_phase', 'tp_timesheet_sts', 'tp_pd')
->where('tp_year', $year)
->where('tp_month', $month)
->where('tp_phase', $phase)
->where('tp_timesheet_sts', 3)
->whereIn('tp_project_type', [1,3])
->with('pelulus')
->with('staffdetails')
->whereHas('tm', function($query) {
$query->where('tm_timesheet_master_sts', 3);
})
->distinct()
->get();
$pelulus = VwPelulus::with('details')->get();
foreach ($pelulus as $key => $value)
{
$projectstafflist = [];
if (count($checktpproject) > 0)
{
$projectstafflist = $checktpproject->where('tp_pd', data_get($value,'pelulus'));
}
if(env('EMAIL_ENV') == 'local')
{
$mailTo = '3fetimesheet@gmail.com';
$data_email = [
'subject' => 'Timesheet: Notification for Timesheet Approval',
'sender_name' => '3fetimesheet@gmail.com',
'cc' => '143hannan@gmail.com',
'name' => data_get($value,'name'),
'phase' => $phase,
'month' => $month,
'year' => $year,
];
}
elseif (env('EMAIL_ENV') == 'DEVELOPMENT')
{
// $mailTo = '3fetimesheet@gmail.com';
$data_email = [
'subject' => 'Timesheet: Notification for Timesheet Approval',
'sender_name' => '3fetimesheet@gmail.com',
'name' => data_get($value,'name'),
'phase' => $phase,
'month' => $month,
'year' => $year,
];
}
elseif (env('EMAIL_ENV') == 'PRODUCTION')
{
$mailTo = data_get($value,'details.email');
$data_email = [
'subject' => 'Timesheet: Notification for Timesheet Approval',
'sender_name' => '3fetimesheet@gmail.com',
'cc' => '3fetimesheet@gmail.com',
'name' => data_get($value,'name'),
'phase' => $phase,
'month' => $month,
'year' => $year,
];
}
if ( count($projectstafflist) > 0 )
{
Mail::to($mailTo)->send(new ApprovalNotification($data_email, $projectstafflist));
// return new ApprovalNotification($data_email, $projectstafflist);
}
}
}
}
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Portal\Timesheet\Model\Ts_master;
use Portal\Timesheet\Model\VwStaff;
use Mail;
use App\Mail\Reminder;
class DemoCron extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'demo:cron';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$today = date('d-m-Y');
$currday = date('j');
$currmonth = date('n');
$curryear = date('Y');
// $currday = 20;
// $currmonth = 1;
// $curryear = 2022;
if ($currday > 15)
{
$checkphase = 1;
$checkyear = $curryear;
$checkmonth = $currmonth;
}
else
{
$checkphase = 2;
if ($currmonth == 1)
{
$checkmonth = 12;
$checkyear = $curryear-1;
}
else
{
$checkmonth = $currmonth-1;
$checkyear = $curryear;
}
}
$timesheets = Ts_master::select('tm_staff_id')
->where('tm_year', $checkyear)
->where('tm_month', $checkmonth)
->where('tm_phase', $checkphase)
->whereIn('tm_timesheet_master_sts', ['2','3','4','5','6'])
->get();
$staffsubmitted = [];
foreach ($timesheets as $key => $value) {
$staffsubmitted[] = $value->tm_staff_id;
}
$users = VwStaff::whereNotIn('staffid', $staffsubmitted)
->where('deptID', '<>', 8)
->where('status', 'ACTIVE')
->with('penyokong')
->get();
if (env('EMAIL_ENV') == 'local')
{
foreach ($users as $key => $value)
{
// dd($value);
$mailTo = '3fetimesheet@gmail.com';
$cc = ['azhanhannan@3fresources.com'];
$data_email = [
'subject' => 'Test Local Timesheet: Reminder for Timesheet Submission',
'sender_name' => '3fetimesheet@gmail.com',
'name' => data_get($value,'name'),
'cc' => $cc,
'today' => $today,
'phase' => $checkphase,
'month' => $checkmonth,
'year' => $checkyear,
];
Mail::to($mailTo)->cc($data_email['cc'])->send(new Reminder($data_email));
// return new Reminder($data_email);
}
}
elseif (env('EMAIL_ENV') == 'DEVELOPMENT')
{
foreach ($users as $key => $value)
{
$mailTo = '3fetimesheet@gmail.com';
$cc = ['azhanhannan@3fresources.com'];
$data_email = [
'subject' => 'Test Dev Timesheet: Reminder for Timesheet Submission',
'sender_name' => '3fetimesheet@gmail.com',
'name' => data_get($value,'name'),
'cc' => $cc,
'today' => $today,
'phase' => $checkphase,
'month' => $checkmonth,
'year' => $checkyear,
];
// Mail::to($mailTo)->cc($data_email['cc'])->send(new Reminder($data_email));
// return new Reminder($data_email);
}
}
elseif (env('EMAIL_ENV') == 'PRODUCTION')
{
foreach ($users as $key => $value)
{
$mailTo = $value->email;
$cc = [data_get($value,'penyokong.email'), 'hasni@3fresources.com'];
$data_email = [
'subject' => 'Timesheet: Reminder for Timesheet Submission',
'sender_name' => '3fetimesheet@gmail.com',
'name' => data_get($value,'name'),
'cc' => $cc,
'today' => $today,
'phase' => $checkphase,
'month' => $checkmonth,
'year' => $checkyear,
];
Mail::to($mailTo)->cc($data_email['cc'])->send(new Reminder($data_email));
// return new Reminder($data_email);
}
}
}
}
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Portal\Timesheet\Model\Ts_master;
use Portal\Timesheet\Model\VwTpStatus;
use Portal\Timesheet\Model\VwPenyokong;
use Mail;
use App\Mail\VerificationNotification;
class Verification extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'verification:cron';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$year = date('Y');
$month = date('n');
$day = date('j');
if($day<16){
$phase = 2;
if ($month == 1)
{
$month = 12;
$year -= 1;
} else
{
$month -=1;
}
}
else
{
$phase = 1;
}
$checktm = Ts_master::where('tm_year', $year)
->where('tm_month', $month)
->where('tm_phase', $phase)
->where('tm_timesheet_master_sts', 2)
->get();
$checktpproject = VwTpStatus::select('staffid', 'tp_project_type', 'fk_tm_id', 'tp_year', 'tp_month', 'tp_phase', 'tp_timesheet_sts', 'tp_pm')
->where('tp_year', $year)
->where('tp_month', $month)
->where('tp_phase', $phase)
->where('tp_timesheet_sts', 2)
->where('tp_project_type', 1)
->with('penyokongproject')
->with('staffdetails')
->distinct()
->get();
// dd($checktpproject);
$checktpoverhead = VwTpStatus::where('tp_year', $year)
->where('tp_month', $month)
->where('tp_phase', $phase)
->where('tp_timesheet_sts', 2)
->where('tp_project_type', 3)
->with('staffdetails')
->with('penyokongoverhead')
->get();
$penyokong = VwPenyokong::with('details')->get();
foreach ($penyokong as $key => $value) {
$projectstafflist = [];
if (count($checktpproject->where('tp_pm', data_get($value,'details.u_staffID'))) > 0) {
$projectstafflist = $checktpproject->where('tp_pm', data_get($value,'details.u_staffID'));
}
$overheadstafflist = [];
if (count($checktpoverhead) > 0) {
$overheadstafflist = $checktpoverhead->where('tp_pm', data_get($value, 'penyokong'));
}
if (env('EMAIL_ENV') == 'local') {
$mailTo = '3fetimesheet@gmail.com';
$data_email = [
'subject' => 'Timesheet: Notification for Timesheet Verification',
'sender_name' => '3fetimesheet@gmail.com',
'name' => data_get($value,'name'),
'cc' => '143hannan@gmail.com',
'phase' => $phase,
'month' => $month,
'year' => $year,
];
}
elseif (env('EMAIL_ENV') == 'DEVELOPMENT')
{
// $mailTo = '3fetimesheet@gmail.com';
$data_email = [
'subject' => 'Timesheet: Notification for Timesheet Verification',
'sender_name' => '3fetimesheet@gmail.com',
'name' => data_get($value,'name'),
'phase' => $phase,
'month' => $month,
'year' => $year,
];
}
elseif (env('EMAIL_ENV') == 'PRODUCTION')
{
$mailTo = data_get($value,'details.email');
$data_email = [
'subject' => 'Timesheet: Notification for Timesheet Verification',
'sender_name' => '3fetimesheet@gmail.com',
'name' => data_get($value,'name'),
'cc' => '3fetimesheet@gmail.com',
'phase' => $phase,
'month' => $month,
'year' => $year,
];
}
if ( count($projectstafflist) > 0 || count($overheadstafflist) > 0) {
Mail::to($mailTo)->send(new VerificationNotification($data_email, $projectstafflist, $overheadstafflist));
// return new VerificationNotification($data_email, $projectstafflist, $overheadstafflist);
}
}
}
}
......@@ -13,7 +13,9 @@ class Kernel extends ConsoleKernel
* @var array
*/
protected $commands = [
//
Commands\DemoCron::class,
Commands\Verification::class,
Commands\Approval::class
];
/**
......@@ -26,6 +28,22 @@ class Kernel extends ConsoleKernel
{
// $schedule->command('inspire')
// ->hourly();
$schedule->command('demo:cron')->monthlyOn(5, '09:00');
$schedule->command('demo:cron')->monthlyOn(7, '09:00');
$schedule->command('demo:cron')->monthlyOn(10, '09:00');
$schedule->command('demo:cron')->monthlyOn(20, '09:00');
$schedule->command('demo:cron')->monthlyOn(22, '09:00');
$schedule->command('demo:cron')->monthlyOn(25, '09:00');
$schedule->command('verification:cron')->weeklyOn(1, '9:00');
$schedule->command('verification:cron')->weeklyOn(2, '9:00');
$schedule->command('verification:cron')->weeklyOn(3, '9:00');
$schedule->command('verification:cron')->weeklyOn(4, '9:00');
$schedule->command('verification:cron')->weeklyOn(5, '9:00');
$schedule->command('approval:cron')->weeklyOn(1, '9:00');
$schedule->command('approval:cron')->weeklyOn(3, '9:00');
$schedule->command('approval:cron')->weeklyOn(5, '9:00');
}
/**
......
......@@ -29,5 +29,6 @@ final class Permission extends Enum
const tsapproval = 'tsapproval';
const stafftimesheet = 'stafftimesheet';
const timesheetnotsubmit = 'timesheetnotsubmit';
const usermanagement = 'usermanagement';
}
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class ApprovalNotification extends Mailable
{
use Queueable, SerializesModels;
public $data_email;
public $projectstafflist;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($data_email, $projectstafflist)
{
$this->data_email = $data_email;
$this->projectstafflist = $projectstafflist;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->subject($this->data_email['subject'])
->from($this->data_email['sender_name'])
->markdown('mail.content.ApprovalNotification');
}
}
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class BodRejectProject extends Mailable
{
use Queueable, SerializesModels;
public $data_email;
public $data_timesheet;
public $data_project;
public $data_overheads;
public $emailcc;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($data_email, $data_timesheet, $data_project, $data_overheads, $emailcc)
{
$this->data_email = $data_email;
$this->data_timesheet = $data_timesheet;
$this->data_project = $data_project;
$this->data_overheads = $data_overheads;
$this->emailcc = $emailcc;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->subject($this->data_email['subject'])
->from($this->data_email['sender_name'])
->markdown('mail.content.BodRejectProject');
}
}
......@@ -13,16 +13,20 @@ class PmRejectProject extends Mailable
public $data_email;
public $data_timesheet;
public $data_project;
public $data_overheads;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($data_email, $data_timesheet)
public function __construct($data_email, $data_timesheet, $data_project, $data_overheads)
{
$this->data_email = $data_email;
$this->data_timesheet = $data_timesheet;
$this->data_project = $data_project;
$this->data_overheads = $data_overheads;
}
/**
......
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class Reminder extends Mailable
{
use Queueable, SerializesModels;
public $data_email;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($data_email)
{
$this->data_email = $data_email;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->subject($this->data_email['subject'])
->from($this->data_email['sender_name'])
->markdown('mail.content.Reminder');
}
}
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class VerificationNotification extends Mailable
{
use Queueable, SerializesModels;
public $data_email;
public $projectstafflist;
public $overheadstafflist;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($data_email, $projectstafflist, $overheadstafflist)
{
$this->data_email = $data_email;
$this->projectstafflist = $projectstafflist;
$this->overheadstafflist = $overheadstafflist;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->subject($this->data_email['subject'])
->from($this->data_email['sender_name'])
->markdown('mail.content.VerificationNotification');
}
}
......@@ -80,7 +80,8 @@ return [
|
*/
'locale' => 'ms',
// 'locale' => 'ms',
'locale' => 'en',
/*
|--------------------------------------------------------------------------
......
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddStartEndDateColumnInProject extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('project', function (Blueprint $table) {
$table->date('start_date')->after('p_project_sts')->nullable();
$table->date('end_date')->after('start_date')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('project', function (Blueprint $table) {
$table->dropColumn('start_date');
$table->dropColumn('end_date');
});
}
}
......@@ -341,6 +341,25 @@
<th style="width: 5%">@if($totaloverheadhrs) {{ number_format($totaloverheadhrs/8, 1, '.', '') }} @else 0 @endif</th>
</tfoot> -->
</table>
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach(data_get($profile,'notes') as $key => $value)
@if(data_get($profile,'fk_o_id') == data_get($value, 'fk_o_id'))
<tr>
<td style="width: 10%" class="center aligned">{{ date("d-m-Y", strtotime(data_get($value, 'td_date'))) }}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endif
@endforeach
</table>
@endif
</div>
......
......@@ -339,7 +339,26 @@
</tfoot> -->
</table>
@endif
@if(count($notes) > 0)
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach($notes as $key => $value)
<tr>
<td style="width: 10%" class="center aligned">{{ date("d-m-Y", strtotime(data_get($value, 'td_date'))) }}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endforeach
</table>
@endif
</div>
<div class="ui segment">
......
......@@ -3,10 +3,10 @@
@section('content')
<!-- Staff Timesheet Section Start -->
<div class="ui segment">
<div class="ui blue left ribbon label">
<div class="ui segment">
<div class="ui blue left ribbon label">
Timesheet Approval
</div>
</div>
<br>
<br>
......@@ -15,11 +15,13 @@
@foreach($profiles as $key => $staff)
<?php
$td = $checktd->where('tm_staff_id', $staff->staffid);
$detail = $details->where('staffid', $staff->staffid);
// $detail = $details->where('staffid', $staff->staffid);
$detail = $details->where('fk_tm_id', $staff->tmid);
$checkchargeable = $detail->where('tp_project_type',1)->first();
$checkoverhead = $detail->where('tp_project_type',3)->first();
// dump($staff);
// dump($detail);
// dd($staff);
// dump(count($detail->where('tp_timesheet_sts',4)));
// dump(count($detail));
// dump(count($checkoverhead));
......@@ -34,7 +36,7 @@
<tr>
<th style="width: 40%;"><i class="dropdown icon"></i>{{ data_get($staff,'fullname') }}</th>
<th style="width: 20%" class="text-center">
@if(data_get($staff,'phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, data_get($staff,'month'), 10)) }} - {{ data_get($staff,'year') }}
@if(data_get($staff,'phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, data_get($staff,'month'), 10)) }} - {{ data_get($staff,'year') }}
</th>
<th style="width: 15%;" class="center aligned">
@if($staff->status == 1 || $staff->status == null) In Preparation
......@@ -44,7 +46,7 @@
@endif
</th>
<th style="width: 15%" class="text-center">Verified at:
{{ date("d/m/Y", strtotime(data_get($staff,'verified'))) }}
{{ date("d/m/Y", strtotime(data_get($staff,'verified'))) }}
</th>
<th style="width: 10%" class="text-center">
<button class="center aligned ui blue icon button single line">View Details</button>
......@@ -75,8 +77,8 @@
</thead>
@if($detail->where('tp_project_type', 1))
@foreach($detail->where('tp_project_type', 1) as $key => $chargeable)
<?php
// dd($chargeable);
<?php
// dd($chargeable);
?>
@if(data_get($staff,'tmid') == data_get($chargeable,'fk_tm_id'))
<tr>
......@@ -109,14 +111,14 @@
</td>
<td style="width: 10%;" class="text-center single line">
@if(data_get($chargeable, 'tp_timesheet_sts') == 3)
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approvalaction', ['tpid'=>data_get($chargeable, 'id'), 'phase'=>data_get($chargeable, 'tp_phase'), 'month'=>data_get($chargeable, 'tp_month'), 'year'=>data_get($chargeable, 'tp_year'), 'page'=>$page ]) }}';">Approval</button>
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approvalaction', ['tpid'=>data_get($chargeable, 'id'), 'phase'=>data_get($chargeable, 'tp_phase'), 'month'=>data_get($chargeable, 'tp_month'), 'year'=>data_get($chargeable, 'tp_year'), 'page'=>$page ]) }}';">Approval</button>
@else
<a class="center aligned ui blue icon button" href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staffid') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}" target='_blank'>View</a>
@endif
</td>
</tr>
@endif
@endforeach
@endforeach
@endif
</table>
@endif
......@@ -166,7 +168,7 @@
</td>
<td style="width: 10%;" class="text-center single line">
@if(data_get($overhead, 'tp_timesheet_sts') == 3)
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approvalaction', ['tpid'=>data_get($overhead, 'id'), 'phase'=>data_get($overhead, 'tp_phase'), 'month'=>data_get($overhead, 'tp_month'), 'year'=>data_get($overhead, 'tp_year'), 'page'=>$page ]) }}';">Approval</button>
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approvalaction', ['tpid'=>data_get($overhead, 'id'), 'phase'=>data_get($overhead, 'tp_phase'), 'month'=>data_get($overhead, 'tp_month'), 'year'=>data_get($overhead, 'tp_year'), 'page'=>$page ]) }}';">Approval</button>
@else
<a href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staffid') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}" type="button" class="center aligned ui blue icon button" target='_blank'>View</a>
@endif
......@@ -178,11 +180,11 @@
<tr>
<td class="text-center" colspan="6">No overhead submitted</td>
</tr>
@endif
@endif
</table>
@endif
<?php
<?php
$checknotes = $td->where('td_overhead_note', '<>', null);
?>
......@@ -206,7 +208,7 @@
</tr>
@endif
@endforeach
@endif
@endif
</table>
@endif
@endif
......@@ -223,7 +225,7 @@
<td style="width: 15%;">{{ data_get($staff,'attachment.filename') }}</td>
<td>
<a href="{{ asset(data_get($staff,'attachment.path'))}}" target="_blank">
<button class="ui active button" type="button">
<i class="download icon"></i>
View
......@@ -274,7 +276,7 @@
@endif
<button type="submit" class="center aligned ui green icon button">Approve</button>
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.approveallaction', ['tmid'=>data_get($staff, 'tmid'), 'phase'=>data_get($staff, 'phase'), 'month'=>data_get($staff, 'month'), 'year'=>data_get($staff, 'year'), 'page'=>$page ]) }}';">Approve All</button>
</form>
</div>
......@@ -282,25 +284,190 @@
@endforeach
</div>
</div>
</div>
<!-- Staff Timesheet Section End -->
<!-- Project Verification Section Start -->
<?php
$others = null;
foreach ($chargeprofile as $key => $value) {
$others = $value;
}
// dd($others);
?>
<div class="ui segment">
<div class="ui blue left ribbon label">
Project Verification
</div>
<br>
<br>
<div class="ui styled fluid accordion">
<?php
$page = 1; $project = $checksts = 0;
$notpms = $chargeprofile->where('dept', '<>',4);
?>
@if($others)
@foreach($notpms as $key => $staff)
<?php
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $approval->u_staffID));
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $approval->u_staffID)->where('tp_timesheet_sts', 3));
?>
@endforeach
<!-- @if($project == $checksts)
<table class="ui unstackable celled table">
<thead>
<tr>
<th class="text-center">All timesheet has been verified</th>
</tr>
</thead>
</table>
@endif -->
@foreach($notpms as $key => $staff)
<?php
// dd($notpms);
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $approval->u_staffID));
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $approval->u_staffID)->where('tp_timesheet_sts', 3));
?>
@if($project == $checksts)
@else
<div class="title">
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 40%;"><i class="dropdown icon"></i>{{ data_get($staff,'fullname') }}</th>
<th style="width: 20%" class="text-center">
@if(data_get($staff,'phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, data_get($staff,'month'), 10)) }} - {{ data_get($staff,'year') }}
</th>
<th style="width: 15%;" class="center aligned">
<?php
// dd($notpms);
$status = $staff->status;
$verified = count(data_get($notpms[$key], 'countchargeable')->where('tp_timesheet_sts', 3));
$allproject = count(data_get($notpms[$key], 'countchargeable'));
?>
@if($status == 1 || $status == null) In Preparation
@elseif($verified == $allproject) <i class="green check icon"></i> Verified by PM
@elseif($status == 2) <i class="red attention icon"></i> Submitted
@elseif($status == 4) <i class="green check icon"></i>Verified by PD
@elseif($status == 5) <i class="red attention icon"></i>Dissaproved by PD
@elseif($status == 6) <i class="red attention icon"></i>Rejected by PM
@elseif($status == 7) <i class="red attention icon"></i>Rejected by HR
@endif
</th>
<th style="width: 13%" class="text-center">Submitted on: {{ date("d/m/Y", strtotime(data_get($staff,'submission'))) }}</th>
<th style="width: 12%" class="text-center">
<button class="center aligned ui blue icon button">View Details</button>
</th>
</tr>
</thead>
</table>
</div>
<div class="content" style="padding-top: 0px;">
<form class="ui form" action="{{ route('timesheet::dashboard.selectverification') }}" method="POST">
{{csrf_field()}}
<input type="hidden" name="tmid" value="{{data_get($staff,'tmid')}}">
<input type="hidden" name="page" value="{{$page}}">
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%;">Project Code</th>
<th style="width: 15;">Project Name</th>
<th style="width: 10%;" class="center aligned">Total Hours</th>
<th style="width: 10%;" class="center aligned">Total Days</th>
<th style="width: 30%">Remarks</th>
<th style="width: 13%" class="text-center">Status</th>
<th style="width: 12%;" class="text-center">Action</th>
</tr>
</thead>
@php
$details = $chargedetails->where('tp_project_type', 1);
// dd($details);
@endphp
@foreach($details as $key => $detail)
@if(data_get($detail,'fk_tm_id') == data_get($staff, 'tmid'))
<tr>
<td style="width: 10%;" class="single line">
@if(data_get($detail,'tp_timesheet_sts') == 2)
<div class="ui toggle checkbox">
<input type="checkbox" name="pid[{{data_get($detail,'id')}}]" value="{{data_get($detail,'id')}}">
</div>
@else
<div class="ui toggle checkbox">
<input type="checkbox" disabled="disabled">
</div>
@endif
{{data_get($detail, 'project.p_project_code')}}
</td>
<td style="width: 15;">{{data_get($detail, 'project.p_project_description')}}</td>
<td style="width: 10%;" class="center aligned">{{data_get($detail, 'tp_hours')}}</td>
<td style="width: 10%;" class="center aligned">
{{ number_format(data_get($detail, 'tp_hours')/8, 1, '.', '') }}
</td>
<td style="width: 30%">{{data_get($detail, 'verifier_remark')}}</td>
<td style="width: 13%" class="text-center">
@if(data_get($detail, 'tp_timesheet_sts') == 1 || data_get($detail, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($detail, 'tp_timesheet_sts') == 2) <i class="red attention icon"></i> Submitted
@elseif(data_get($detail, 'tp_timesheet_sts') == 3) <i class="green check icon"></i> Verified by PM
@elseif(data_get($detail, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by PD
@elseif(data_get($detail, 'tp_timesheet_sts') == 6) <i class="red attention icon"></i>Rejected by PM
@elseif(data_get($detail, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR
@endif
</td>
<td style="width: 12%;" class="text-center single line">
@if(data_get($detail, 'tp_timesheet_sts') == 2)
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.projectaction', ['tpid'=> data_get($detail, 'id'), 'phase' => data_get($staff,'tp_phase'), 'month' => data_get($staff,'tp_month'), 'year' => data_get($staff,'tp_year'), 'page' => $page]) }}';" type="button">Verify | Reject</button>
@else
<!-- <button class="center aligned ui green icon button disabled">Verify | Reject</button> -->
<a class="center aligned ui blue icon button" href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}" target='_blank'>View</a>
@endif
</td>
</tr>
@endif
@endforeach
</table>
<button type="submit" class="center aligned ui green icon button">Verify</button>
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.verifyallaction', ['tmid'=>data_get($staff, 'tmid'), 'phase'=>data_get($staff, 'tm_phase'), 'month'=>data_get($staff, 'tm_month'), 'year'=>data_get($staff, 'tm_year'), 'page'=>$page ]) }}';">Verify All</button>
</form>
</div>
@endif
@endforeach
@else
<table class="ui unstackable celled table">
<thead>
<tr>
<th class="text-center">No pending verification</th>
</tr>
</thead>
</table>
@endif
</div>
</div>
<!-- Project Verification Section End -->
<!-- Verification Section Start -->
@if(count($profile) > 0)
<div class="ui segment">
<div class="ui blue left ribbon label">
<div class="ui segment">
<div class="ui blue left ribbon label">
Timesheet Verification
</div>
</div>
<br>
<br>
<div class="ui styled fluid accordion">
<?php $page = 1; ?>
@foreach($profile as $key => $staff)
@if(data_get($staff,'status') == 2 || data_get($staff,'status') == 3 || data_get($staff,'status') == 5 || data_get($staff,'status') == 6 )
@if(data_get($staff,'status') == 2 || data_get($staff,'status') == 3 || data_get($staff,'status') == 5 || data_get($staff,'status') == 6 )
<?php
$detail = $detailsverification->where('staffid', $staff->staff_id)->where('fk_tm_id', $staff->tmid)->where('tp_project_type', 3)->whereIn('tp_timesheet_sts', [2,3,6]);
$ts = $checkts->where('tm_staff_id', $staff->staff_id);
?>
?>
@if(count($detail) > 0)
<div class="title">
......@@ -311,14 +478,14 @@
<th style="width: 20%" class="text-center">
@if(data_get($staff,'tm_phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, data_get($staff,'tm_month'), 10)) }} - {{ data_get($staff,'tm_year') }}
</th>
<th style="width: 15%;" class="center aligned">
<?php
<th style="width: 15%;" class="center aligned">
<?php
$overheadverified = 0;
foreach ($detailsverification as $key => $value)
foreach ($detailsverification as $key => $value)
{
if(data_get($value,'staffid') == data_get($staff,'staff_id') && data_get($value,'tp_timesheet_sts') == 3)
$overheadverified += 1;
}
}
?>
......@@ -376,7 +543,7 @@
</td>
<td style="width: 12%;" class="text-center single line">
@if(data_get($tp, 'tp_timesheet_sts') == 2)
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.revaction', ['tpid'=>data_get($tp, 'id'), 'phase'=>data_get($tp,'tp_phase'), 'month'=>data_get($tp,'tp_month'), 'year'=>data_get($tp,'tp_year'), 'page'=>$page ]) }}';">Verify | Reject</button>
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.revaction', ['tpid'=>data_get($tp, 'id'), 'phase'=>data_get($tp,'tp_phase'), 'month'=>data_get($tp,'tp_month'), 'year'=>data_get($tp,'tp_year'), 'page'=>$page ]) }}';">Verify | Reject</button>
@else
<a href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'tm_phase'), 'month' => data_get($staff,'tm_month'), 'year' => data_get($staff,'tm_year') ]) }}" class="center aligned ui blue icon button" target='_blank'>View</a>
@endif
......@@ -386,12 +553,12 @@
@endforeach
</table>
<?php $n = null; ?>
<?php $n = null; ?>
@foreach($detailsverification as $key => $detail)
@if(data_get($staff,'tmid') == data_get($detail, 'fk_tm_id'))
@foreach(data_get($detail,'notes') as $key => $value)
<?php $n = $value; ?>
@endforeach
@endforeach
@endif
@endforeach
......@@ -414,7 +581,7 @@
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endif
@endforeach
@endforeach
@endif
@endforeach
</table>
......@@ -477,7 +644,7 @@
</table>
@endif
</div>
</div>
</div>
@endif
<!-- Verification Section End -->
......@@ -487,4 +654,4 @@
<script>
$('.ui.accordion').accordion();
</script>
@endpush
\ No newline at end of file
@endpush
......@@ -69,7 +69,7 @@
<?php
$chargeable = $projects->where('tp_project_type', 1)->where('fk_tm_id', data_get($time,'id'));
$overhead = $projects->where('tp_project_type', 3)->where('fk_tm_id', data_get($time,'id'));
// dd($overhead);
// dd($projects);
?>
<div class="content" style="padding-top: 0px;">
......
......@@ -29,7 +29,7 @@
<h3 class="header link">Timesheet Diluluskan</h3>
</div>
<div class="extra content">
<span class="right floated"><i class="icon calendar check outline"></i>1</span>
</div>
</a>
......@@ -40,8 +40,8 @@
<br>
<br>
@foreach($timesheet as $key => $time)
<!-- <?php
// dd($time->tm_timesheet_master_sts);
<!-- <?php
// dd($time->tm_timesheet_master_sts);
?> -->
<div class="ui styled fluid accordion">
<?php $page = 1; ?>
......@@ -58,7 +58,7 @@
@elseif(data_get($time,'tm_timesheet_master_sts') == 3) <i class="green check icon"></i> Verified by HOD/HOU/PM
@elseif(data_get($time,'tm_timesheet_master_sts') == 4) <i class="green check icon"></i> Approved by PD
@elseif(data_get($time,'tm_timesheet_master_sts') == 5) <i class="red attention icon"></i> Rejected by PD
@elseif(data_get($time,'tm_timesheet_master_sts') == 6) <i class="red attention icon"></i> Rejected by HOD/HOU/PM
@elseif(data_get($time,'tm_timesheet_master_sts') == 6) <i class="red attention icon"></i> Rejected by HOD/HOU/PM
@endif
</th>
<th style="width: 13%" class="text-center">Submitted on: {{ date("d/m/Y", strtotime(data_get($time,'tm_submission_at'))) }}</th>
......@@ -70,9 +70,9 @@
</table>
</div>
<?php
$chargeable = $projects->where('tp_project_type', 1)->where('fk_tm_id', data_get($time,'id'));
$overhead = $projects->where('tp_project_type', 3)->where('fk_tm_id', data_get($time,'id'));
<?php
$chargeable = $projects->where('tp_project_type', 1)->where('fk_tm_id', data_get($time,'id'));
$overhead = $projects->where('tp_project_type', 3)->where('fk_tm_id', data_get($time,'id'));
// dd($overhead);
?>
......@@ -100,7 +100,7 @@
@if(count($chargeable) == '0')
<tr>
<td class="text-center" colspan="5">No Project Submitted</td>
</tr>
</tr>
@else
@foreach($chargeable as $key => $tpcharge)
<tr>
......@@ -141,13 +141,13 @@
@elseif(data_get($tpcharge,'tp_timesheet_sts') == 3) Waiting for Approval
@else
<!-- <button class="center aligned ui red icon button disabled">Resubmit</button> -->
@endif
@endif
</td>
</tr>
</tr>
@endforeach
@endif
</table>
<!-- overhead -->
<table class="ui unstackable celled table">
<thead>
......@@ -171,7 +171,7 @@
@if(count($overhead) == 0)
<tr>
<td class="text-center" colspan="5">No Overhead Submitted</td>
</tr>
</tr>
@else
@foreach($overhead as $key => $tpoverhead)
<tr>
......@@ -220,13 +220,13 @@
</table>
<!-- Overhead Notes Start -->
<?php $n = null; ?>
<?php $n = null; ?>
@foreach($staffnotes as $key => $detail)
@if(data_get($time,'id') == data_get($detail, 'fk_tm_id'))
@foreach(data_get($detail,'notes') as $key => $tm_detail)
<?php $n = $tm_detail; ?>
@endforeach
@endforeach
@endif
@endforeach
......@@ -249,7 +249,7 @@
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endif
@endforeach
@endforeach
@endif
@endforeach
</table>
......@@ -267,32 +267,32 @@
<?php
$pms = $others = null;
foreach ($profile as $key => $value) {
// dump(data_get($value,'dept'));
if (data_get($value,'dept') == 4) {
$pms = $value;
$pms = $value;
} else {
$others = $value;
// dd($others);
}
}
}
?>
<div class="ui segment">
<div class="ui purple left ribbon label">
<div class="ui segment">
<div class="ui purple left ribbon label">
PMS
</div>
</div>
<br>
<br>
<div class="ui styled fluid accordion">
<?php
$page = 1;
<?php
$page = 1;
$project = $checksts = 0;
$pmss = $profile->where('dept', 4)->where('staff_id', '<>', $verifier->u_staffID);
$ovpmss = $ovprofiles->where('dept', 4)->where('staff_id', '<>', $verifier->u_staffID);
// dd($ovpmss);
?>
@if($pms)
@foreach($pmss as $key => $staff)
<?php
<?php
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID));
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)->where('tp_timesheet_sts', 3));
?>
......@@ -310,15 +310,15 @@
@foreach($pmss as $key => $staff)
<?php
// dd($staff);
<?php
// dump($staff);
// dd(data_get($staff,'countchargeable'));
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID));
$projectoverhead = count(data_get($staff,'countoverhead')->where('tp_pm', $verifier->id));
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)->where('tp_timesheet_sts', 3));
$checkstsoverhead = count(data_get($staff,'countoverhead')->where('tp_pm', $verifier->id)->where('tp_timesheet_sts', 3));
?>
@if(($project+$projectoverhead) == ($checksts+$checkstsoverhead))
@else
<div class="title">
......@@ -330,7 +330,7 @@
@if(data_get($staff,'phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, data_get($staff,'month'), 10)) }} - {{ data_get($staff,'year') }}
</th>
<th style="width: 15%;" class="center aligned">
<?php
<?php
// dd($pmss);
$status = $staff->status;
$verified = count(data_get($pmss[$key], 'countchargeable')->where('tp_timesheet_sts', 3));
......@@ -359,7 +359,7 @@
{{csrf_field()}}
<input type="hidden" name="tmid" value="{{data_get($staff,'tmid')}}">
<input type="hidden" name="page" value="{{$page}}">
<table class="ui unstackable celled table">
<thead>
<tr>
......@@ -405,7 +405,7 @@
</td>
<td style="width: 12%;" class="text-center single line">
@if(data_get($detail, 'tp_timesheet_sts') == 2)
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.projectaction', ['tpid'=> data_get($detail, 'id'), 'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year'), 'page' => $page]) }}';" type="button">Verify | Reject</button>
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.projectaction', ['tpid'=> data_get($detail, 'id'), 'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year'), 'page' => $page]) }}';" type="button">Verify | Reject</button>
@else
<!-- <button class="center aligned ui green icon button disabled">Verify | Reject</button> -->
<a class="center aligned ui blue icon button" href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}" target='_blank'>View</a>
......@@ -420,7 +420,7 @@
<?php
$overhead = $overheads->where('staffid', $staff->staff_id);
$checkoverhead = $overheads->where('staffid', $staff->staff_id)->first();
?>
?>
@if($checkoverhead)
<table class="ui unstackable celled table">
......@@ -435,7 +435,7 @@
</tr>
</thead>
@foreach($overheads as $key => $tp)
@foreach($overheads as $key => $tp)
@if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id'))
<tr>
<td style="width: 25;">
......@@ -467,10 +467,10 @@
</td>
<td style="width: 12%;" class="text-center single line">
@if(data_get($tp, 'tp_timesheet_sts') == 2)
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.revaction', ['tpid'=>data_get($tp, 'id'), 'phase'=>data_get($tp, 'tp_phase'), 'month'=>data_get($tp, 'tp_month'), 'year'=>data_get($tp, 'tp_year') ]) }}';">Verify | Reject</button>
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.revaction', ['tpid'=>data_get($tp, 'id'), 'phase'=>data_get($tp, 'tp_phase'), 'month'=>data_get($tp, 'tp_month'), 'year'=>data_get($tp, 'tp_year') ]) }}';" type="button">Verify | Reject</button>
@else
<!-- <button class="center aligned ui green icon button disabled">Verify | Reject</button> -->
<a class="center aligned ui blue icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}';" target='_blank'>View</a>
<a class="center aligned ui blue icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}';" type="button" target='_blank'>View</a>
@endif
</td>
......@@ -478,7 +478,7 @@
@endif
@endforeach
</table>
<table class="ui unstackable celled table">
<thead>
<tr>
......@@ -487,7 +487,10 @@
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach($overheads as $key => $overhead)
<?php
$pmsoverheads = $overheads->where('fk_tm_id', data_get($staff,'tmid'));
?>
@foreach($pmsoverheads as $key => $overhead)
@if(data_get($staff,'staff_id') == data_get($overhead, 'staffid'))
@foreach(data_get($overhead,'notes') as $key => $value)
@if(data_get($value,'td_hours'))
......@@ -497,7 +500,7 @@
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endif
@endforeach
@endforeach
@endif
@endforeach
</table>
......@@ -518,30 +521,197 @@
</thead>
</table> -->
@endif
@if(count($ovpmss) > 0)
@foreach($ovpmss as $key => $staff)
<?php
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->id));
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->id)->where('tp_timesheet_sts', 3));
?>
@endforeach
<!-- @if($project == $checksts)
<table class="ui unstackable celled table">
<thead>
<tr>
<th class="text-center">All timesheet has been verified</th>
</tr>
</thead>
</table>
@endif -->
@foreach($ovpmss as $key => $staff)
<?php
// dump($staff);
// dd(data_get($staff,'countchargeable'));
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->id));
$projectoverhead = count(data_get($staff,'countoverhead')->where('tp_pm', $verifier->id));
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->id)->where('tp_timesheet_sts', 3));
$checkstsoverhead = count(data_get($staff,'countoverhead')->where('tp_pm', $verifier->id)->where('tp_timesheet_sts', 3));
?>
@if(($project+$projectoverhead) == ($checksts+$checkstsoverhead))
@else
<div class="title">
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 40%;"><i class="dropdown icon"></i>{{ data_get($staff,'sname.fullname') }}</th>
<th style="width: 20%" class="text-center">
@if(data_get($staff,'phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, data_get($staff,'month'), 10)) }} - {{ data_get($staff,'year') }}
</th>
<th style="width: 15%;" class="center aligned">
<?php
// dd($ovpmss);
$status = $staff->status;
$verified = count(data_get($ovpmss[$key], 'countchargeable')->where('tp_timesheet_sts', 3));
$allproject = count(data_get($ovpmss[$key], 'countchargeable'));
?>
@if($status == 1 || $status == null) In Preparation
@elseif($status == 2) <i class="red attention icon"></i> Submitted
@elseif($status == 3) <i class="green check icon"></i> Verified by PM
@elseif($status == 4) <i class="green check icon"></i>Verified by PD
@elseif($status == 5) <i class="red attention icon"></i>Dissaproved by PD
@elseif($status == 6) <i class="red attention icon"></i>Rejected by PM
@elseif($status == 7) <i class="red attention icon"></i>Rejected by HR
@endif
</th>
<th style="width: 13%" class="text-center">Submitted on: {{ date("d/m/Y", strtotime(data_get($staff,'submission'))) }}</th>
<th style="width: 12%" class="text-center">
<button class="center aligned ui blue icon button">View Details</button>
</th>
</tr>
</thead>
</table>
</div>
<div class="content" style="padding-top: 0px;">
<form class="ui form" action="{{ route('timesheet::dashboard.selectverification') }}" method="POST">
{{csrf_field()}}
<input type="hidden" name="tmid" value="{{data_get($staff,'tmid')}}">
<input type="hidden" name="page" value="{{$page}}">
<?php
$overhead = $overheads->where('staffid', $staff->staff_id);
$checkoverhead = $overheads->where('staffid', $staff->staff_id)->first();
?>
@if($checkoverhead)
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 25%;">Overhead</th>
<th style="width: 10%;" class="center aligned">Total Hours</th>
<th style="width: 10%;" class="center aligned">Total Days</th>
<th style="width: 30%">Remarks</th>
<th style="width: 13%" class="text-center">Status</th>
<th style="width: 12%;" class="text-center">Action</th>
</tr>
</thead>
@foreach($overheads as $key => $tp)
@if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id'))
<tr>
<td style="width: 25;">
@if(data_get($tp,'tp_timesheet_sts') == 2)
<div class="ui toggle checkbox">
<input type="checkbox" name="pid[{{data_get($tp,'id')}}]" value="{{data_get($tp,'id')}}">
</div>
@else
<div class="ui toggle checkbox">
<input type="checkbox" disabled="disabled">
</div>
@endif
{{data_get($tp, 'tp_project_name')}}
</td>
<td style="width: 10%;" class="center aligned">{{data_get($tp, 'tp_hours')}}</td>
<td style="width: 10%;" class="center aligned">
{{ number_format(data_get($tp, 'tp_hours')/8, 1, '.', '') }}
</td>
<td style="width: 30%">{{data_get($tp, 'verifier_remark')}}</td>
<td style="width: 13%" class="text-center">
@if(data_get($tp, 'tp_timesheet_sts') == 1 || data_get($tp, 'tp_timesheet_sts') == null) In Preparation
@elseif(data_get($tp, 'tp_timesheet_sts') == 2) <i class="red attention icon"></i> Submitted
@elseif(data_get($tp, 'tp_timesheet_sts') == 3) <i class="green check icon"></i> Verified by HOD/HOU
@elseif(data_get($tp, 'tp_timesheet_sts') == 4) <i class="green check icon"></i>Verified by BOD
@elseif(data_get($tp, 'tp_timesheet_sts') == 5) <i class="red attention icon"></i>Dissaproved by BOD
@elseif(data_get($tp, 'tp_timesheet_sts') == 6) <i class="red attention icon"></i>Rejected by HOD/HOU
@elseif(data_get($tp, 'tp_timesheet_sts') == 7) <i class="red attention icon"></i>Rejected by HR
@endif
</td>
<td style="width: 12%;" class="text-center single line">
@if(data_get($tp, 'tp_timesheet_sts') == 2)
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.revaction', ['tpid'=>data_get($tp, 'id'), 'phase'=>data_get($tp, 'tp_phase'), 'month'=>data_get($tp, 'tp_month'), 'year'=>data_get($tp, 'tp_year') ]) }}';" type="button">Verify | Reject</button>
@else
<!-- <button class="center aligned ui green icon button disabled">Verify | Reject</button> -->
<a class="center aligned ui blue icon button" onclick="window.location.href='{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}';" type="button" target='_blank'>View</a>
@endif
</td>
</tr>
@endif
@endforeach
</table>
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
<?php
$pmsoverheads = $overheads->where('fk_tm_id', data_get($staff,'tmid'));
?>
@foreach($pmsoverheads as $key => $overhead)
@if(data_get($staff,'staff_id') == data_get($overhead, 'staffid'))
@foreach(data_get($overhead,'notes') as $key => $value)
@if(data_get($value,'td_hours'))
<tr>
<td style="width: 10%" class="center aligned">{{ date("d-m-Y", strtotime(data_get($value, 'td_date'))) }}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endif
@endforeach
@endif
@endforeach
</table>
@endif
<button type="submit" class="center aligned ui green icon button">Verify</button>
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.verifyallaction', ['tmid'=>data_get($staff, 'tmid'), 'phase'=>data_get($staff, 'tm_phase'), 'month'=>data_get($staff, 'tm_month'), 'year'=>data_get($staff, 'tm_year'), 'page'=>$page ]) }}';">Verify All</button>
</form>
</div>
@endif
@endforeach
@endif
</div>
</div>
</div>
<div class="ui segment">
<div class="ui blue left ribbon label">
<div class="ui segment">
<div class="ui blue left ribbon label">
Other Departments
</div>
</div>
<br>
<br>
<div class="ui styled fluid accordion">
<?php
<?php
$page = 1; $project = $checksts = 0;
$notpms = $profile->where('dept', '<>',4);
?>
@if($others)
@foreach($notpms as $key => $staff)
<?php
<?php
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID));
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)->where('tp_timesheet_sts', 3));
?>
@endforeach
@if($project == $checksts)
<!-- @if($project == $checksts)
<table class="ui unstackable celled table">
<thead>
<tr>
......@@ -549,14 +719,15 @@
</tr>
</thead>
</table>
@endif
@endif -->
@foreach($notpms as $key => $staff)
<?php
<?php
// dd($notpms);
$project = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID));
$checksts = count(data_get($staff,'countchargeable')->where('tp_pm', $verifier->u_staffID)->where('tp_timesheet_sts', 3));
?>
@if($project == $checksts)
@else
<div class="title">
......@@ -568,7 +739,7 @@
@if(data_get($staff,'phase') == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, data_get($staff,'month'), 10)) }} - {{ data_get($staff,'year') }}
</th>
<th style="width: 15%;" class="center aligned">
<?php
<?php
// dd($notpms);
$status = $staff->status;
$verified = count(data_get($notpms[$key], 'countchargeable')->where('tp_timesheet_sts', 3));
......@@ -642,7 +813,7 @@
</td>
<td style="width: 12%;" class="text-center single line">
@if(data_get($detail, 'tp_timesheet_sts') == 2)
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.projectaction', ['tpid'=> data_get($detail, 'id'), 'phase' => data_get($staff,'tp_phase'), 'month' => data_get($staff,'tp_month'), 'year' => data_get($staff,'tp_year'), 'page' => $page]) }}';">Verify | Reject</button>
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.projectaction', ['tpid'=> data_get($detail, 'id'), 'phase' => data_get($staff,'tp_phase'), 'month' => data_get($staff,'tp_month'), 'year' => data_get($staff,'tp_year'), 'page' => $page]) }}';" type="button">Verify | Reject</button>
@else
<!-- <button class="center aligned ui green icon button disabled">Verify | Reject</button> -->
<a class="center aligned ui blue icon button" href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'phase'), 'month' => data_get($staff,'month'), 'year' => data_get($staff,'year')]) }}" target='_blank'>View</a>
......@@ -657,7 +828,7 @@
<?php
$overhead = $overheads->where('staffid', $staff->staff_id);
$checkoverhead = $overheads->where('staffid', $staff->staff_id)->first();
?>
?>
@if($checkoverhead)
<table class="ui unstackable celled table">
......@@ -672,7 +843,7 @@
</tr>
</thead>
@foreach($overheads as $key => $tp)
@foreach($overheads as $key => $tp)
@if(data_get($staff, 'tmid') == data_get($tp, 'fk_tm_id'))
<tr>
<td style="width: 25;" class="single line">
......@@ -704,7 +875,7 @@
</td>
<td style="width: 12%;" class="text-center single line">
@if(data_get($tp, 'tp_timesheet_sts') == 2)
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.revaction', ['tpid'=>data_get($tp, 'id'), 'phase'=>data_get($tp, 'tp_phase'), 'month'=>data_get($tp, 'tp_month'), 'year'=>data_get($tp, 'tp_year') ]) }}';">Verify | Reject</button>
<button class="center aligned ui green icon button" onclick="window.location.href='{{route('timesheet::dashboard.revaction', ['tpid'=>data_get($tp, 'id'), 'phase'=>data_get($tp, 'tp_phase'), 'month'=>data_get($tp, 'tp_month'), 'year'=>data_get($tp, 'tp_year') ]) }}';" type="button">Verify | Reject</button>
@else
<!-- <button class="center aligned ui green icon button disabled">Verify | Reject</button> -->
<a class="center aligned ui blue icon button" href="{{ route('timesheet::dashboard.timesheetViewer', [ 'user'=>data_get($staff,'staff_id') ,'phase' => data_get($staff,'tp_phase'), 'month' => data_get($staff,'tp_month'), 'year' => data_get($staff,'tp_year')]) }}" target='_blank'>View</a>
......@@ -715,7 +886,7 @@
@endif
@endforeach
</table>
<table class="ui unstackable celled table">
<thead>
<tr>
......@@ -734,7 +905,7 @@
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endif
@endforeach
@endforeach
@endif
@endforeach
</table>
......@@ -743,7 +914,7 @@
<button type="button" class="center aligned ui green icon button" onclick="window.location.href='{{ route('timesheet::dashboard.verifyallaction', ['tmid'=>data_get($staff, 'tmid'), 'phase'=>data_get($staff, 'tm_phase'), 'month'=>data_get($staff, 'tm_month'), 'year'=>data_get($staff, 'tm_year'), 'page'=>$page ]) }}';">Verify All</button>
</form>
</div>
@endif
@endif
@endforeach
@else
<table class="ui unstackable celled table">
......@@ -763,4 +934,4 @@
<script>
$('.ui.accordion').accordion();
</script>
@endpush
\ No newline at end of file
@endpush
......@@ -40,6 +40,15 @@
<a class="ui teal left ribbon label">Timesheet Status</a>
<br>
<br>
<!-- kak shikin -->
@if(auth()->user()->id == 6)
<button class="tiny center aligned ui purple right compact labeled icon button" onclick="window.location.href='{{ route('timesheet::users.syncNewUsers') }}';">
<i class="angle double right icon"></i>
Sync New User
</button>
<br>
<br>
@endif
@foreach($timesheet as $key => $time)
<!-- <?php
// dd($time->tm_timesheet_master_sts);
......
......@@ -35,7 +35,7 @@
@endif
</td>
<td class="text-center">
<a class="ui purple compact icon button" href="{{ route('timesheet::dashboard.timesheetViewer', ['phase' => data_get($timesheet,'tm_phase'), 'month' =>data_get($timesheet,'tm_month')] ) }}" target="_blank">
<a class="ui purple compact icon button" href="{{ route('timesheet::dashboard.timesheetViewer', ['phase' => data_get($timesheet,'tm_phase'), 'month' =>data_get($timesheet,'tm_month'), 'year' =>data_get($timesheet,'tm_year')] ) }}" target="_blank">
<i class="eye icon"></i>
</a>
</td>
......
......@@ -10,42 +10,42 @@
<br>
<table class="ui unstackable collapsing table" style="width: 100%">
<tbody>
<tr>
<td rowspan="3">
<img src="{{ url('img/3f-logo.svg') }}" height="126" width="126" alt="3f-logo">
</td>
<td>Name</td>
<td>:</td>
<td>{{ data_get($staff,'STAFF_NAME') }}</td>
<td rowspan="3"></td>
<td>Department</td>
<td>:</td>
<td>{{ data_get($staff,'DEPARTMENT') }}</td>
<td rowspan="3"></td>
</tr>
<tr>
<td>Staff No</td>
<td>:</td>
<td>{{ data_get($staff,'STAFF_ID') }}</td>
<td>Reporting Manager</td>
<td>:</td>
<td>{{ data_get($staff,'HOD_NAME') }}</td>
</tr>
<tr>
<td>Month</td>
<td>:</td>
<td>{{ $strMonth }}</td>
<td>Phase</td>
<td>:</td>
<td>
@if($phase == 1) 1st Half-month
@else 2nd Half-month
@endif
</td>
</tr>
</tbody>
</table>
<tbody>
<tr>
<td rowspan="3">
<img src="{{ url('img/3f-logo.svg') }}" height="126" width="126" alt="3f-logo">
</td>
<td>Name</td>
<td>:</td>
<td>{{ data_get($staff,'STAFF_NAME') }}</td>
<td rowspan="3"></td>
<td>Department</td>
<td>:</td>
<td>{{ data_get($staff,'DEPARTMENT') }}</td>
<td rowspan="3"></td>
</tr>
<tr>
<td>Staff No</td>
<td>:</td>
<td>{{ data_get($staff,'STAFF_ID') }}</td>
<td>Reporting Manager</td>
<td>:</td>
<td>{{ data_get($staff,'HOD_NAME') }}</td>
</tr>
<tr>
<td>Month</td>
<td>:</td>
<td>{{ $strMonth }}</td>
<td>Phase</td>
<td>:</td>
<td>
@if($phase == 1) 1st Half-month
@else 2nd Half-month
@endif
</td>
</tr>
</tbody>
</table>
<table class="ui celled structured table unstackable">
<thead>
......@@ -193,6 +193,25 @@
</tfoot> -->
</table>
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach(data_get($profile,'notes') as $key => $value)
@if(data_get($profile,'fk_o_id') == data_get($value, 'fk_o_id'))
<tr>
<td style="width: 10%" class="center aligned">{{ date("d-m-Y", strtotime(data_get($value, 'td_date'))) }}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endif
@endforeach
</table>
<form action="{{ route('timesheet::dashboard.verifyoverhead') }}" method="POST" class="ui form">
{{csrf_field()}}
<input type="hidden" name="tpid" value="{{ data_get($profile,'id') }}">
......
......@@ -338,6 +338,25 @@
<th style="width: 5%">@if($totaloverheadhrs) {{ number_format($totaloverheadhrs/8, 1, '.', '') }} @else 0 @endif</th>
</tfoot> -->
</table>
@if(count($notes) > 0)
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach($notes as $key => $value)
<tr>
<td style="width: 10%" class="center aligned">{{ date("d-m-Y", strtotime(data_get($value, 'td_date'))) }}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endforeach
</table>
@endif
@endif
<div class="ui segment">
......
......@@ -338,6 +338,26 @@
<th style="width: 5%">@if($totaloverheadhrs) {{ number_format($totaloverheadhrs/8, 1, '.', '') }} @else 0 @endif</th>
</tfoot> -->
</table>
@if(count($notes) > 0)
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach($notes as $key => $value)
<tr>
<td style="width: 10%" class="center aligned">{{ date("d-m-Y", strtotime(data_get($value, 'td_date'))) }}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endforeach
</table>
@endif
@endif
<div class="ui segment">
......@@ -350,7 +370,7 @@
@endforeach
<div class="two fields">
<div class="field">
<input type="hidden" name="approval" value="{{ data_get($pm,'id') }}">
<input type="hidden" name="verifier" value="{{ data_get($pm,'id') }}">
<label>Verifier</label>
<input type="text" readonly="readonly" value="{{ data_get($pm,'name') }}">
</div>
......
......@@ -864,7 +864,7 @@
</table>
</div>
@if(data_get($profile,'HOD_NAME'))
<!-- @if(data_get($profile,'HOD_NAME'))
<div class="ui segment">
<table id="printtable7" class="ui celled structured table unstackable">
<thead>
......@@ -909,7 +909,7 @@
</tbody>
</table>
</div>
@endif
@endif -->
</div>
<br>
......
......@@ -339,6 +339,25 @@
</tfoot> -->
</table>
@endif
@if(count($notes) > 0)
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned">Date</th>
<th style="width: 15%" class="single line"> Overhead Description</th>
<th class="center aligned">Notes</th>
</tr>
</thead>
@foreach($notes as $key => $value)
<tr>
<td style="width: 10%" class="center aligned">{{ date("d-m-Y", strtotime(data_get($value, 'td_date'))) }}</td>
<td style="width: 15%" class="single line">{{data_get($value, 'td_overhead_desc')}}</td>
<td>{{data_get($value, 'td_overhead_note')}}</td>
</tr>
@endforeach
</table>
@endif
</div>
......
......@@ -5,16 +5,20 @@
<th colspan="3">Project Report</th>
</tr>
<tr>
<th></th>
<th style="width: 10%">Project </th>
<th style="width: 1%">:</th>
<th> {{data_get($pdetail,'pcode')}} - {{data_get($pdetail,'pname')}}</th>
<th style="width: 20%"> {{data_get($pdetail,'pcode')}} - {{data_get($pdetail,'pname')}}</th>
<th style="width: 10%">Start Date </th>
<th style="width: 1%">:</th>
<th style="width: 20%"> {{ date("j M Y", strtotime(data_get($pdetail,'start_date'))) }}</th>
</tr>
<tr>
<th></th>
<th style="width: 10%"> Month/Year</th>
<th style="width: 1%">:</th>
<th> {{ date("F", mktime(0, 0, 0, $month, 10)) }} {{$year}}</th>
<th style="width: 20%"> {{$month}} {{$year}}</th>
<th style="width: 10%"> End Date</th>
<th style="width: 1%">:</th>
<th style="width: 20%"> {{ date("j M Y", strtotime(data_get($pdetail,'end_date'))) }}</th>
</tr>
</thead>
</table>
......@@ -22,24 +26,24 @@
<table class="ui unstackable celled table">
<thead>
<tr>
<th style="width: 10%" class="center aligned" rowspan="2">role</th>
<th style="width: 10%" class="center aligned" rowspan="2">allocation</th>
<th style="width: 10%" class="center aligned" rowspan="2">total accumulate</th>
<th style="width: 15%" class="center aligned" rowspan="2">staff name</th>
<th style="width: 20%" class="center aligned" colspan="2">Mandays</th>
<th style="width: 10%" class="center aligned" rowspan="2">balance</th>
<th style="width: 10%" class="center aligned" rowspan="2">{{strtoupper('role')}}</th>
<th style="width: 10%" class="center aligned" rowspan="2">{{strtoupper('allocation')}}</th>
<th style="width: 10%" class="center aligned" rowspan="2">{{strtoupper('total accumulate')}}</th>
<th style="width: 15%" class="center aligned" rowspan="2">{{strtoupper('staff name')}}</th>
<th style="width: 20%" class="center aligned" colspan="2">{{strtoupper('Mandays')}}</th>
<th style="width: 10%" class="center aligned" rowspan="2">{{strtoupper('balance')}}</th>
</tr>
<tr>
<th style="width: 15%" class="center aligned">total hours</th>
<th style="width: 15%" class="center aligned">total days</th>
<th style="width: 15%" class="center aligned">{{strtoupper('total hours')}}</th>
<th style="width: 15%" class="center aligned">{{strtoupper('total days')}}</th>
</tr>
</thead>
<tbody>
<?php
<?php
$pteam = [];
?>
@foreach($roles as $key => $role)
<?php
<?php
$pteam = $pteams->where('role_id', data_get($role,'pm_roles'));
?>
<tr>
......@@ -47,7 +51,7 @@
<td rowspan="{{count($pteam)+1}}">{{data_get($role,'pm_hours')}} Hours <br> {{data_get($role,'pm_days')}} Days
</td>
<td rowspan="{{count($pteam)+1}}">
<?php
<?php
$accumulatehours = 0;
$staffaccumulateshours = $accumulates->where('tp_roles', data_get($role,'pm_roles'));
foreach ($staffaccumulateshours as $key => $accumulateshours) {
......@@ -55,7 +59,7 @@
}
?>
{{ number_format($accumulatehours, 1, '.', '') }} Hours <br>
{{ number_format($accumulatehours/8, 1, '.', '') }} Days
{{ number_format($accumulatehours/8, 1, '.', '') }} Days
</td>
</tr>
<?php $count = 0; ?>
......@@ -63,11 +67,11 @@
<tr>
<td>{{data_get($team,'pt_team')}}</td>
<td class="center aligned">
<?php
<?php
$currhour = 0;
$currmonthhours = $currentmonthhours->where('staffid', data_get($team,'pt_staff_id'));
foreach ($currmonthhours as $key => $hours) {
$currhour = data_get($hours,'tp_hours');
$currhour += data_get($hours,'tp_hours');
}
?>
{{ number_format($currhour, '1', '.', '') }} Hours
......@@ -77,7 +81,7 @@
</td>
@if($count == 0)
<td rowspan="{{count($pteam)}}" class="center aligned">
<?php
<?php
$balancehours = data_get($role,'pm_hours') - $accumulatehours;
?>
{{ number_format($balancehours, '1', '.', '') }} Hours <br>
......@@ -85,7 +89,7 @@
</td>
@else
@endif
<?php
<?php
$count++;
?>
</tr>
......@@ -93,4 +97,4 @@
@endforeach
</tbody>
</table>
\ No newline at end of file
</table>
......@@ -88,15 +88,30 @@
<td class="center aligned">{{ number_format($totalc/8, 1, '.', '') }}</td>
@endif
<?php $totalnc = 0; ?>
<?php $totalnc = $ocuti = 0; ?>
@foreach($overhead as $key => $value)
<td class="center aligned">
<?php $monthly_hours = 0; ?>
@foreach($ovhours as $key => $hours)
@if(data_get($staff,'staffid') == data_get($hours,'staffid') && data_get($value,'id') == data_get($hours,'oid'))
<!-- {{data_get($hours,'hours')}} -->
<?php $monthly_hours += data_get($hours,'hours') ?>
<!-- <?php $totalnc += data_get($hours,'hours'); ?> -->
<?php
$monthly_hours += data_get($hours,'hours');
if (data_get($hours,'oid') == 6) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 7) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 8) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 10) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 15) {
$ocuti += data_get($hours,'hours');
}else{
}
$totalnc += data_get($hours,'hours');
?>
@endif
@endforeach
......@@ -108,7 +123,9 @@
@endforeach
<td class="center aligned">{{ number_format($totalnc, '1', '.', '') }}</td>
<td class="center aligned">{{ number_format($totalnc/8, 1, '.', '') }}</td>
<?php $totaldays = number_format($totalc/8, 1, '.', '') + number_format($totalnc/8, 1, '.', ''); ?>
<?php
$totalnc -= $ocuti;
$totaldays = number_format($totalc/8, 1, '.', '') + number_format($totalnc/8, 1, '.', ''); ?>
<td class="center aligned">{{ number_format($totaldays, '1', '.', '') }}</td>
</tr>
</tbody>
......@@ -141,13 +158,25 @@
<th class="text-center">{{ number_format($tch, '1', '.', '') }}</th>
<th class="text-center">{{ number_format($tch/8, 1, '.', '') }}</th>
@endif
<?php $totaloverhead = 0; ?>
<?php $totaloverhead = 0;$cuti = 0; ?>
@foreach($overhead as $key => $value)
<?php
$monthly_ov = 0;
$oid = data_get($value,'id');
$ov = $ovhours->where('oid', $oid);
foreach ($ov as $key => $val) {
if (data_get($val,'oid') == 6) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 7) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 8) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 10) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 15) {
$cuti += data_get($val,'hours');
}else{
}
$monthly_ov += data_get($val,'hours');
}
?>
......
......@@ -27,7 +27,7 @@ input[type=number] {
<br>
@if($lastupdated)
<div class="ui right floated center compact aligned basic right button">
<div class="tiny ui right floated center compact aligned basic right button">
<div class="header item" style="color: #000000;">
<strong>
Last Updated : {{ date('d/m/Y', strtotime(data_get($lastupdated,'updated_at'))) }}
......@@ -36,7 +36,7 @@ input[type=number] {
</div>
@endif
<div class="ui right floated center compact aligned basic right button">
<div class="tiny ui right floated center compact aligned basic right button">
<div class="header item" style="color: #000000;">
<strong>
@if($phase == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, $month, 10)) }} - {{ $year }}
......@@ -44,278 +44,542 @@ input[type=number] {
</div>
</div>
<button class="center aligned ui purple right compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.overheadForm', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<button class="tiny center aligned ui purple right compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.overheadForm', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double right icon"></i>
Go to Overhead Form
</button>
<a href="{{ route('timesheet::dashboard.timesheetViewer', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}" class="center aligned ui pink right compact labeled icon button" target="_blank">
<a href="{{ route('timesheet::dashboard.timesheetViewer', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}" class="tiny center aligned ui pink right compact labeled icon button" target="_blank">
<i class="angle double right icon"></i>
View and Submit Timesheet
</a>
<br>
<!-- <br> -->
<form class="ui form" action="{{ route('timesheet::form.savechargeablehours' )}}" method="POST">
{{csrf_field()}}
<!-- <input type="text" disabled="disabled" name="" value="{{$year}}"> -->
<input type="hidden" name="userId" value="{{$userId}}">
<input type="hidden" name="year" value="{{$year}}">
<input type="hidden" name="month" value="{{$month}}">
<input type="hidden" name="phase" value="{{$phase}}">
<table class="ui celled structured table unstackable">
<thead>
<tr>
<?php
// dd(data_get($check,'tm_timesheet_master_sts'));
?>
<th colspan="2" rowspan="2" class="center aligned">Chargeable</th>
<!-- <th colspan="{{count($lat)}}" class="center aligned">Date</th> -->
<th colspan="@if($phase == 1) 15 @else {{$daymonth-15}} @endif" class="center aligned">Date</th>
<th rowspan="2">
<!-- @if($projectlist == [])
<button type="submit" class="ui disabled fluid center aligned ui blue compact labeled icon button">
<i class="save icon"></i>
Save
</button>
@else
<button type="submit" class="fluid center aligned ui blue compact labeled icon button">
<i class="save icon"></i>
Save as Draft
</button>
@endif -->
</th>
</tr>
<tr>
@if(count($lat) > 0)
@foreach($lat as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@endif
@endforeach
@if($phase == 1)
@for($i = count($lat); $i < 15 ; $i++)
<th class="center aligned">{{$i+1}}</th>
@endfor
@else
@for($i = 15+count($lat); $i < $daymonth; $i++)
<th class="center aligned">{{$i+1}}</th>
@endfor
@endif
@else
@if($phase == 1)
<!-- overhead detail start -->
<table id="printtable4" class="ui celled structured table unstackable">
<thead>
<tr>
<th colspan="" rowspan="3" class="center aligned" @if($phase == 2 && ($daymonth-15) == 16) style="width: 21.5%;" @elseif($phase == 2 && ($daymonth-15) == 13) style="width: 17.5%;" @elseif($phase == 2 && ($daymonth-15) == 14) style="width: 19%;" @else style="width: 20%;" @endif>Overhead</th>
<th colspan="@if($phase == 1) 15 @else {{$daymonth-15}} @endif" class="center aligned">Date</th>
<th colspan="" rowspan="2" class="center aligned">Total</th>
</tr>
<tr>
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<th class="center aligned">{{$i+1}}</th>
<th style="width: 4%;">{{$i+1}}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<th class="center aligned">{{$i+1}}</th>
@endfor
@endif
@endif
</tr>
<tr>
<th class="single line">Project Code</th>
<th class="single line">Project Name</th>
@if(count($lat) > 0)
@foreach($lat as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@endif
@endforeach
@if($phase == 1)
@for($i = count($lat); $i < 15 ; $i++)
<th class="center aligned">{{ $strdays[$i] }}</th>
@endfor
@else
@for($i = 15+count($lat); $i < $daymonth; $i++)
<th class="center aligned">{{ $strdays[$i] }}</th>
<th style="width: 4%;">{{$i+1}}</th>
@endfor
@endif
@else
@if($phase == 1)
</tr>
<tr>
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<th class="center aligned">{{ $strdays[$i] }}</th>
<th>{{$strdays[$i]}}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<th class="center aligned">{{ $strdays[$i] }}</th>
<th>{{$strdays[$i]}}</th>
@endfor
@endif
@endif
<th class="center aligned">Hours</th>
</tr>
</thead>
<tbody>
<?php
$all = 0;
$lasttd = count($projectlist);
// dd($lat);
?>
@if(count($projectlist) > 0)
@foreach($projectlist as $key => $project)
<?php $total = 0;?>
<tr>
<td class="single line">
{{$project['td_project_code']}}
</td>
<td class="single line">
{{$project['td_project_name']}}
</td>
@if(count($lat) > 0)
@foreach($lat as $key => $value)
<?php
// dd($value);
$day = date_parse_from_format('Y-m-d', data_get($value,'DATE'))['day'];
// dd($day);
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $day);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('td_project',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
@if(data_get($value,'attendance_status') == 1)
<td class="center aligned">
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$day}}]" name="hour[{{$project['td_project']}}][{{$day}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{ $project['td_project'] }}');">
</td>
@else
<td class="center aligned" style="background-color: #DCDCDC;">
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$day}}]" name="hour[{{$project['td_project']}}][{{$day}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset;background-color: #DCDCDC;" onchange="limiter(this,'{{ $project['td_project'] }}');">
</td>
@endif
@endforeach
@if($phase == 1)
@for($i = count($lat); $i < 15 ; $i++)
<?php
$valuehour = '';
<th>Hours</th>
<!-- <th>Days</th> -->
</tr>
</thead>
<tbody>
@if(count($overheadlist) > 0)
@foreach($overheadlist as $key => $projectoverhead)
<?php
$totaloverhead = 0;
?>
<tr>
<!-- <td style="width: 4%;"></td> -->
<td style="width: 20%;">{{ $projectoverhead['pname']}}</td>
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<?php
$valoverheadhour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
if($overheadhour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('td_project',$project['td_project'])
->where('tm_phase',$phase)
->first();
$valoverheadhour = $overheadhour->where('td_date','=',$date)
->where('fk_o_id',$projectoverhead['pid'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
$totaloverhead += data_get($valoverheadhour,'td_hours');
}
<td>
<input class="center aligned" type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{$valuehour->td_hours}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{ $project['td_project'] }}');">
</td>
@endfor
@else
@for($i = 15+count($lat); $i < $daymonth; $i++)
<?php
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('td_project',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
<td>
<input class="center aligned" type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{$valuehour->td_hours}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endfor
@endif
@else
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<?php
$valuehour = '';
@if($valoverheadhour)
<td style="width: 4%;">{{ data_get($valoverheadhour,'td_hours') }}</td>
@else
<td style="width: 4%;"></td>
@endif
@endfor
@else
@for($i = 15; $i < $daymonth ; $i++)
<?php
$valoverheadhour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('td_project',$project['td_project'])
->where('tm_phase',$phase)
->first();
if($overheadhour)
{
$valoverheadhour = $overheadhour->where('td_date','=',$date)
->where('fk_o_id',$projectoverhead['pid'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
<td>
<input class="center aligned" type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{$valuehour->td_hours}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{ $project['td_project'] }}');">
</td>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<?php
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
$totaloverhead += data_get($valoverheadhour,'td_hours');
}
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('td_project',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
@if($valoverheadhour)
<td style="width: 4%;">{{ data_get($valoverheadhour,'td_hours') }}</td>
@else
<td style="width: 4%;"></td>
@endif
@endfor
@endif
@if($totaloverhead)
<td style="width: 5%">{{ number_format($totaloverhead, 1, '.', '') }}</td>
<!-- <td style="width: 5%">{{ number_format($totaloverhead/8, 1, '.', '') }}</td> -->
@else
<td style="width: 5%">0.0</td>
<!-- <td style="width: 5%">0.0</td> -->
@endif
</tr>
@endforeach
@else
<tr>
<td class="text-center" colspan="@if($phase==1){{4+15}} @else {{4+($daymonth-15)}} @endif">No Data Overhead</td>
</tr>
@endif
</tbody>
<tfoot>
<th colspan="">Total (Overhead)</th>
<?php $totaloverheadall = 0; ?>
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<?php
$totaloverheadbyday = 0;
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if ($overheadhour) {
$valoverheadbyday = $overheadhour->where('td_date','=', $date)
->where('tm_phase',$phase);
foreach($valoverheadbyday as $key => $value) {
$totaloverheadbyday += data_get($value,'td_hours');
}
$totaloverheadall += $totaloverheadbyday;
}
?>
<th style="width: 4%">{{ number_format($totaloverheadbyday, 1, '.', '') }}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<?php
$totaloverheadbyday = 0;
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if ($overheadhour) {
$valoverheadbyday = $overheadhour->where('td_date','=', $date)
->where('tm_phase',$phase);
foreach($valoverheadbyday as $key => $value) {
$totaloverheadbyday += data_get($value,'td_hours');
}
$totaloverheadall += $totaloverheadbyday;
}
?>
<th style="width: 4%">{{ number_format($totaloverheadbyday, '1', '.', '') }}</th>
@endfor
@endif
<?php
// dd($totaloverheadhrs);
?>
<th style="width: 5%">@if($totaloverheadall) {{ number_format($totaloverheadall, 1, '.', '') }} @else 0.0 @endif</th>
<!-- <th style="width: 5%">@if($totaloverheadall) {{ number_format($totaloverheadall/8, 1, '.', '') }} @else 0.0 @endif</th> -->
</tfoot>
</table>
<!-- overhead detail end -->
<td>
<input class="center aligned" type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{$valuehour->td_hours}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endfor
@endif
@endif
<td>
<input class="center aligned" type="text" name="total-{{$project['td_project']}}" id="total-{{$project['td_project']}}" style="padding-right: 4px;padding-left: 4px;" onchange="limiter(this,'{{$project['td_project']}}');" readonly="readonly" value="{{number_format($total,'1','.','')}}">
</td>
</tr>
<?php $all += $total; ?>
@endforeach
@else
<form class="ui form" action="{{ route('timesheet::form.savechargeablehours' )}}" method="POST">
{{csrf_field()}}
<!-- <input type="text" disabled="disabled" name="" value="{{$year}}"> -->
<input type="hidden" name="userId" value="{{$userId}}">
<input type="hidden" name="year" value="{{$year}}">
<input type="hidden" name="month" value="{{$month}}">
<input type="hidden" name="phase" value="{{$phase}}">
{{-- <div class="table-responsive" style="overflow-x: auto; height: 400px; white-space: nowrap;"> --}}
<table id="table-chargeable-form" class="ui celled structured table unstackable">
<thead>
<tr>
<?php
// dd(data_get($check,'tm_timesheet_master_sts'));
?>
<th colspan="2" rowspan="2" class="center aligned" style="width: 23%;">Chargeable</th>
<!-- <th colspan="{{count($lat)}}" class="center aligned">Date</th> -->
<th colspan="@if($phase == 1) 15 @else {{$daymonth-15}} @endif" class="center aligned">Date</th>
<th rowspan="2" class="center aligned">Total
<!-- @if($projectlist == [])
<button type="submit" class="ui disabled fluid center aligned ui blue compact labeled icon button">
<i class="save icon"></i>
Save
</button>
@else
<button type="submit" class="fluid center aligned ui blue compact labeled icon button">
<i class="save icon"></i>
Save as Draft
</button>
@endif -->
</th>
</tr>
<tr>
@if(count($lat) > 0)
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
@php
$filteredData = $lat->filter(function ($item) use ($i) {
return date('d', strtotime($item['DATE'])) == $i+1;
});
@endphp
@if($filteredData->isEmpty())
<th class="center aligned">
{{ $i+1 }}
</th>
@else
@foreach($filteredData as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@endif
@endforeach
@endif
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
{{-- <th class="center aligned">{{$i+1}}</th> --}}
@php
$filteredData = $lat->filter(function ($item) use ($i) {
return date('d', strtotime($item['DATE'])) == $i+1;
});
@endphp
@if($filteredData->isEmpty())
<th class="center aligned">
{{ $i+1 }}
</th>
@else
@foreach($filteredData as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@endif
@endforeach
@endif
@endfor
@endif
@else
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<th class="center aligned">{{$i+1}}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<th class="center aligned">{{$i+1}}</th>
@endfor
@endif
@endif
</tr>
<tr>
<td class="center aligned" colspan="@if($phase == 1){{ 15+3 }}@else {{ ($daymonth-15)+3 }} @endif">
No Project Added
</td>
<th class="">Project Code</th>
<th class="">Project Name</th>
@if(count($lat) > 0)
{{-- @foreach($lat as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@endif
@endforeach --}}
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
@php
$filteredData = $lat->filter(function ($item) use ($i) {
return date('d', strtotime($item['DATE'])) == $i+1;
});
@endphp
@if($filteredData->isEmpty())
<th class="center aligned">
{{ $strdays[$i] }}
</th>
@else
@foreach($filteredData as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@endif
@endforeach
@endif
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
{{-- <th class="center aligned">{{ $strdays[$i] }}</th> --}}
@php
$filteredData = $lat->filter(function ($item) use ($i) {
return date('d', strtotime($item['DATE'])) == $i+1;
});
@endphp
@if($filteredData->isEmpty())
<th class="center aligned">
{{ $strdays[$i] }}
</th>
@else
@foreach($filteredData as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@endif
@endforeach
@endif
@endfor
@endif
@else
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<th class="center aligned">{{ $strdays[$i] }}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<th class="center aligned">{{ $strdays[$i] }}</th>
@endfor
@endif
@endif
<th class="center aligned">Hours</th>
</tr>
@endif
</tbody>
</table>
</thead>
<tbody>
<?php
$all = 0;
$lasttd = count($projectlist);
?>
@if(count($projectlist) > 0)
@foreach($projectlist as $key => $project)
<?php $total = 0;?>
<tr>
<td class="">
{{$project['td_project_code']}}
</td>
<td class="">
{{$project['td_project_name']}}
</td>
@if(count($lat) > 0)
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
@php
$filteredData = $lat->filter(function ($item) use ($i) {
return date('d', strtotime($item['DATE'])) == $i+1;
});
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('td_project',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
@endphp
@if($filteredData->isEmpty())
<td>
<input class="center aligned" type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{$valuehour->td_hours}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{ $project['td_project'] }}');">
</td>
@else
@foreach($filteredData as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<td class="center aligned">
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{ $project['td_project'] }}');">
</td>
@else
<td class="center aligned" style="background-color: #DCDCDC;">
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset;background-color: #DCDCDC;" onchange="limiter(this,'{{ $project['td_project'] }}');">
</td>
@endif
@endforeach
@endif
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
@php
$filteredData = $lat->filter(function ($item) use ($i) {
return date('d', strtotime($item['DATE'])) == $i+1;
});
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('td_project',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
@endphp
@if($filteredData->isEmpty())
<td class="center aligned">
<input class="center aligned" type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{$valuehour->td_hours}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@else
@foreach($filteredData as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<td class="center aligned">
<input class="center aligned" type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{$valuehour->td_hours}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@else
<td class="center aligned" style="background-color: #DCDCDC;">
<input class="center aligned" type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{$valuehour->td_hours}}@else @endif" min="0" max="24" style="padding:2px;margin:unset;background-color: #DCDCDC;" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endif
@endforeach
@endif
@endfor
@endif
@else
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<?php
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('td_project',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
<td>
<input class="center aligned" type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{$valuehour->td_hours}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{ $project['td_project'] }}');">
</td>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<?php
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('td_project',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
<td>
<input class="center aligned" type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{$valuehour->td_hours}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endfor
@endif
@endif
<td>
<input class="center aligned" type="text" name="total-{{$project['td_project']}}" id="total-{{$project['td_project']}}" style="padding-right: 4px;padding-left: 4px;" onchange="limiter(this,'{{$project['td_project']}}');" readonly="readonly" value="{{number_format($total,'1','.','')}}">
</td>
</tr>
<?php $all += $total; ?>
@endforeach
@else
<tr>
<td class="center aligned" colspan="@if($phase == 1){{ 15+3 }}@else {{ ($daymonth-15)+3 }} @endif">
No Project Added
</td>
</tr>
@endif
</tbody>
</table>
{{-- </div> --}}
<?php
// dd(count($projectlist));
?>
......@@ -356,9 +620,6 @@ input[type=number] {
</script>
<script>
$().ready(function() {
});
function limiter(input,pid) {
......@@ -392,6 +653,4 @@ input[type=number] {
document.getElementById('total-'+pid).value = currenttotal.toFixed(1);
}
</script>
@endpush
\ No newline at end of file
</script>
\ No newline at end of file
......@@ -37,7 +37,7 @@
@if(data_get($draft,'tm_timesheet_master_sts') == 1) Draft @endif
</td>
<td class="text-center" style="width: 15%;">
<button class="ui purple compact icon button" type="button" onclick="window.location.href='{{ route('timesheet::form.chargeableForm', ['phase' => data_get($draft,'tm_phase'), 'month' =>data_get($draft,'tm_month')] ) }}';">
<button class="ui purple compact icon button" type="button" onclick="window.location.href='{{ route('timesheet::form.chargeableForm', ['phase' => data_get($draft,'tm_phase'), 'month' =>data_get($draft,'tm_month'), 'year'=>data_get($draft,'tm_year')] ) }}';">
<i class="edit outline icon"></i>
</button>
<button class="ui red compact icon button" type="button" onclick="window.location.href='{{ route('timesheet::form.deletedraft', ['tmid'=>data_get($draft,'id')]) }}';">
......
......@@ -70,7 +70,7 @@
Save
</button> -->
<button type="button" class="center aligned ui purple compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.overheadForm', ['phase' => $phase, 'month' => $month]) }}';">
<button type="button" class="center aligned ui purple compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.overheadForm', ['phase' => $phase, 'month' => $month, 'year'=> $year]) }}';">
<i class="angle double left icon"></i>
Back To Overhead Form
</button>
......
......@@ -23,16 +23,16 @@ input[type=number] {
<div class="ui segment">
<a class="ui purple left ribbon label">
<h3>
<!-- <h3> -->
Overhead Form
</h3>
<!-- </h3> -->
</a>
<br>
<br>
@if($lastupdated)
<div class="ui right floated center compact aligned basic right button">
<div class="tiny ui right floated center compact aligned basic right button">
<div class="header item" style="color: #000000;">
<strong>
Last Updated : {{ date('d/m/Y', strtotime(data_get($lastupdated,'updated_at'))) }}
......@@ -41,7 +41,7 @@ input[type=number] {
</div>
@endif
<div class="ui right floated center compact aligned basic right button">
<div class="tiny ui right floated center compact aligned basic right button">
<div class="header item" style="color: #000000;">
<strong>
@if($phase == 1) 1st Halfmonth @else 2nd Half-month @endif - {{ date("F", mktime(0, 0, 0, $month, 10)) }} - {{ $year }}
......@@ -49,253 +49,534 @@ input[type=number] {
</div>
</div>
<button class="center aligned ui blue compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.chargeableForm', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<button class="tiny center aligned ui blue compact labeled icon button" onclick="window.location.href='{{ route('timesheet::form.chargeableForm', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}';">
<i class="angle double left icon"></i>
Go to Chargeable Form
</button>
@if($checkoverhead)
<button class="center aligned ui yellow compact labeled icon button" id="notes" onclick="window.location.href='{{ route('timesheet::form.notelist', ['year'=> $year, 'month'=> $month, 'phase'=> $phase, 'fk_tm_id'=> $fk_tm_id] ) }} ';">
<button class="tiny center aligned ui yellow compact labeled icon button" id="notes" onclick="window.location.href='{{ route('timesheet::form.notelist', ['year'=> $year, 'month'=> $month, 'phase'=> $phase, 'fk_tm_id'=> $fk_tm_id] ) }} ';">
<i class="plus icon"></i>
Add Task Description
</button>
@else
@endif
<a href="{{ route('timesheet::dashboard.timesheetViewer', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}" class="center aligned ui pink compact right labeled icon button" target="_blank">
<a href="{{ route('timesheet::dashboard.timesheetViewer', ['phase' => $phase, 'month' => $month, 'year' => $year]) }}" class="tiny center aligned ui pink compact right labeled icon button" target="_blank">
<i class="angle double right icon"></i>
View and Submit Timesheet
</a>
<a href="{{ route('timesheet::form.sync', ['tmid' => $fk_tm_id]) }}" class="tiny center aligned ui gery compact right labeled icon button">
<i class="sync icon"></i>
Sync from Webtas
</a>
<form class="ui form" action="{{ route('timesheet::form.saveoverheadhours' )}}" method="POST">
{{csrf_field()}}
<input type="hidden" name="userId" value="{{$userId}}">
<input type="hidden" name="year" value="{{$year}}">
<input type="hidden" name="month" value="{{$month}}">
<input type="hidden" name="phase" value="{{$phase}}">
<!-- Table Chargeable Start -->
<table id="printtable2" class="ui celled structured table unstackable">
<thead>
<tr>
<th colspan="2" rowspan="2" class="center aligned" style="width: 27%;">Chargeable</th>
<th colspan="@if($phase == 1) 15 @else {{$daymonth-15}} @endif" class="center aligned">Date</th>
<th colspan="" rowspan="2" class="center aligned">Total</th>
</tr>
<tr>
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<th style="width: 4%;">{{$i+1}}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<th style="width: 4%;">{{$i+1}}</th>
@endfor
@endif
</tr>
<tr>
<!-- <th style="width: 4%;"></th> -->
<th style="width: 10%;">Project Code</th>
<th style="width: 13%;">Project Name</th>
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<th>{{$strdays[$i]}}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<th>{{$strdays[$i]}}</th>
@endfor
@endif
<th>Hours</th>
<!-- <th>Days</th> -->
</tr>
</thead>
<tbody>
@if(count($chargeablelist) > 0)
@foreach($chargeablelist as $key => $projectchargeable)
<?php $totalcharge = 0; ?>
<tr>
<!-- <td style="width: 4%;"></td> -->
<td style="width: 10%;">{{ $projectchargeable['pcode']}}</td>
<td style="width: 13%;">{{ $projectchargeable['pname']}}</td>
@if($phase == 1)
<table class="ui celled structured unstackable table" >
<thead>
<tr>
<th rowspan="3" class="center aligned">Overhead</th>
<!-- <th colspan="{{count($lat)}}" class="center aligned">Date</th> -->
<th colspan="@if($phase == 1) 15 @else {{$daymonth-15}} @endif" class="center aligned">Date</th>
<th rowspan="2">
<!-- <button type="submit" class="fluid center aligned ui blue compact labeled icon button">
<i class="save icon"></i>
Save as Draft
</button> -->
</th>
</tr>
<tr>
@if(count($lat) > 0)
@foreach($lat as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@endif
@endforeach
@if($phase == 1)
@for($i = count($lat); $i < 15 ; $i++)
<th class="center aligned">{{$i+1}}</th>
@endfor
@else
@for($i = 15+count($lat); $i < $daymonth; $i++)
<th class="center aligned">{{$i+1}}</th>
@endfor
@endif
@else
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<th class="center aligned">{{$i+1}}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<th class="center aligned">{{$i+1}}</th>
@endfor
@endif
@endif
</tr>
<tr>
@if(count($lat) > 0)
@foreach($lat as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@endif
@endforeach
@if($phase == 1)
@for($i = count($lat); $i < 15 ; $i++)
<th class="center aligned">{{ $strdays[$i] }}</th>
@endfor
@else
@for($i = 15+count($lat); $i < $daymonth; $i++)
<th class="center aligned">{{ $strdays[$i] }}</th>
@endfor
<?php
@endif
@else
@if($phase == 1)
$valchargehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($chargehour)
{
$valchargehour = $chargehour->where('td_date','=',$date)
->where('td_project',$projectchargeable['pid'])
->where('tm_phase',$phase)
->first();
$totalcharge += data_get($valchargehour,'td_hours');
}
?>
@if($valchargehour)
<td style="width: 4%;">
@if(data_get($valchargehour,'td_hours') == 0)
@else {{ data_get($valchargehour,'td_hours') }}
@endif
</td>
@else
<td style="width: 4%;"></td>
@endif
@for($i = 0; $i < 15 ; $i++)
<th class="center aligned">{{ $strdays[$i] }}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<th class="center aligned">{{ $strdays[$i] }}</th>
@endfor
<?php
@endif
@endif
<th class="center aligned">Hours</th>
</tr>
</thead>
<tbody>
@foreach($projectlist as $key => $project)
<?php $total = 0; ?>
<tr>
<td>
{{$project['td_project_name']}}
</td>
@if(count($lat) > 0)
@foreach($lat as $key => $value)
<?php
// dd($value);
$day = date_parse_from_format('Y-m-d', data_get($value,'DATE'))['day'];
// dd($day);
$valuehour = '';
$valchargehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $day);
if($hour)
if($chargehour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('fk_o_id',$project['td_project'])
->where('tm_phase',$phase)
->first();
$valchargehour = $chargehour->where('td_date','=',$date)
->where('td_project',$projectchargeable['pid'])
->where('tm_phase',$phase)
->first();
$totalcharge += data_get($valchargehour,'td_hours');
}
$total += data_get($valuehour,'td_hours');
}
?>
@if(data_get($value,'attendance_status') == 1)
<td style="width: 5%;">
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$day}}]" name="hour[{{$project['td_project']}}][{{$day}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{ $project['td_project'] }}');">
</td>
@else
<td style="width: 5%; background-color: #DCDCDC;">
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$day}}]" name="hour[{{$project['td_project']}}][{{$day}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset;background-color: #DCDCDC;" onchange="limiter(this,'{{ $project['td_project'] }}');">
</td>
@endif
@endforeach
@if($phase == 1)
@for($i = count($lat); $i < 15 ; $i++)
<?php
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('fk_o_id',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
<td >
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endfor
@else
@for($i = 15+count($lat); $i < $daymonth; $i++)
<?php
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('fk_o_id',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
<td>
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endfor
@endif
@else
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<?php
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('fk_o_id',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
<td >
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<?php
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('fk_o_id',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
<td>
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endfor
@endif
@endif
<td>
<input type="text" class="text-center" onkeypress="onlynumber(event)" name="total-{{$project['td_project']}}" id="total-{{$project['td_project']}}" style="padding-right: 4px;padding-left: 4px;" onchange="limiter(this,'{{$project['td_project']}}');" readonly="" value="{{number_format($total, '1', '.', '')}}">
</td>
@if($valchargehour)
<td style="width: 4%;">
@if(data_get($valchargehour,'td_hours') == 0)
@else {{ data_get($valchargehour,'td_hours') }}
@endif
</td>
@else
<td style="width: 4%;"></td>
@endif
@endfor
@endif
@if($totalcharge)
<td style="width: 5%">{{ number_format($totalcharge, 1, '.', '') }}</td>
<!-- <td style="width: 5%">{{ number_format($totalcharge/8, 1, '.', '') }}</td> -->
@else
<td style="width: 5%">0</td>
<!-- <td style="width: 5%">0</td> -->
@endif
</tr>
@endforeach
</tbody>
@else
<tr>
<td class="text-center" colspan="@if($phase==1){{5+15}} @else {{5+($daymonth-15)}} @endif">No Data Project</td>
</tr>
@endif
</tbody>
<tfoot>
<th colspan="2">Total</th>
<?php $totalchargeableall = 0; ?>
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<?php
$totalcbyday = 0;
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if ($chargehour) {
$valcbyday = $chargehour->where('td_date','=', $date)
->where('tm_phase',$phase);
foreach($valcbyday as $key => $value) {
$totalcbyday += data_get($value,'td_hours');
}
$totalchargeableall += $totalcbyday;
}
?>
<th>{{ number_format($totalcbyday, '1', '.', '') }}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<?php
$totalcbyday = 0;
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if ($chargehour) {
$valcbyday = $chargehour->where('td_date','=', $date)
->where('tm_phase',$phase);
foreach($valcbyday as $key => $value) {
$totalcbyday += data_get($value,'td_hours');
}
$totalchargeableall += $totalcbyday;
}
?>
<th>{{ number_format($totalcbyday, '1', '.', '') }}</th>
@endfor
@endif
<th style="width: 5%">@if($totalchargeableall){{ number_format($totalchargeableall, 1, '.', '') }}@else 0.0 @endif</th>
<!-- <th style="width: 5%">@if($totalchargeableall){{ number_format($totalchargeableall/8, 1, '.', '') }}@else 0.0 @endif</th> -->
</tfoot>
</table>
<!-- Table Chargeable End -->
<form class="ui form" action="{{ route('timesheet::form.saveoverheadhours' )}}" method="POST">
{{csrf_field()}}
<input type="hidden" name="userId" value="{{$userId}}">
<input type="hidden" name="year" value="{{$year}}">
<input type="hidden" name="month" value="{{$month}}">
<input type="hidden" name="phase" value="{{$phase}}">
{{-- <div class="table-responsive" style="overflow-x: auto; height: 400px; white-space: nowrap;"> --}}
<table class="ui celled structured unstackable table" >
<thead>
<tr>
<th rowspan="3" class="center aligned" style="width: 27%;">Overhead</th>
<!-- <th colspan="{{count($lat)}}" class="center aligned">Date</th> -->
<th colspan="@if($phase == 1) 15 @else {{$daymonth-15}} @endif" class="center aligned">Date</th>
<th rowspan="2" class="center aligned" style="width: 10%;">Total
<!-- <button type="submit" class="fluid center aligned ui blue compact labeled icon button">
<i class="save icon"></i>
Save as Draft
</button> -->
</th>
</tr>
<tr>
@if(count($lat) > 0)
{{-- @foreach($lat as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@endif
@endforeach --}}
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
@php
$filteredData = $lat->filter(function ($item) use ($i) {
return date('d', strtotime($item['DATE'])) == $i+1;
});
@endphp
@if($filteredData->isEmpty())
<th class="center aligned">
{{ $i+1 }}
</th>
@else
@foreach($filteredData as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@endif
@endforeach
@endif
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
{{-- <th class="center aligned">{{$i+1}}</th> --}}
@php
$filteredData = $lat->filter(function ($item) use ($i) {
return date('d', strtotime($item['DATE'])) == $i+1;
});
@endphp
@if($filteredData->isEmpty())
<th class="center aligned">
{{ $i+1 }}
</th>
@else
@foreach($filteredData as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date_parse_from_format('Y-m-d', data_get($date,'DATE'))['day'] }}
</th>
@endif
@endforeach
@endif
@endfor
@endif
@else
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<th class="center aligned">{{$i+1}}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<th class="center aligned">{{$i+1}}</th>
@endfor
@endif
@endif
</tr>
<tr>
@if(count($lat) > 0)
{{-- @foreach($lat as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@endif
@endforeach --}}
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
@php
$filteredData = $lat->filter(function ($item) use ($i) {
return date('d', strtotime($item['DATE'])) == $i+1;
});
@endphp
@if($filteredData->isEmpty())
<th class="center aligned">
{{ $strdays[$i] }}
</th>
@else
@foreach($filteredData as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@endif
@endforeach
@endif
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
{{-- <th class="center aligned">{{ $strdays[$i] }}</th> --}}
@php
$filteredData = $lat->filter(function ($item) use ($i) {
return date('d', strtotime($item['DATE'])) == $i+1;
});
@endphp
@if($filteredData->isEmpty())
<th class="center aligned">
{{ $strdays[$i] }}
</th>
@else
@foreach($filteredData as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<th class="center aligned">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@else
<th class="center aligned" style="background-color: #DCDCDC;">
{{ date('D', strtotime(data_get($date,'DATE')) ) }}
</th>
@endif
@endforeach
@endif
@endfor
@endif
@else
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<th class="center aligned">{{ $strdays[$i] }}</th>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<th class="center aligned">{{ $strdays[$i] }}</th>
@endfor
@endif
@endif
<th class="center aligned">Hours</th>
</tr>
</thead>
<tbody>
@foreach($projectlist as $key => $project)
<?php $total = 0; ?>
<tr>
<td>
{{$project['td_project_name']}}
</td>
@if(count($lat) > 0)
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
@php
$filteredData = $lat->filter(function ($item) use ($i) {
return date('d', strtotime($item['DATE'])) == $i+1;
});
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('fk_o_id',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
@endphp
@if($filteredData->isEmpty())
<td class="center aligned">
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@else
@foreach($filteredData as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<td class="center aligned">
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{ $project['td_project'] }}');">
</td>
@else
<td class="center aligned" style="background-color: #DCDCDC;">
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset;background-color: #DCDCDC;" onchange="limiter(this,'{{ $project['td_project'] }}');">
</td>
@endif
@endforeach
@endif
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
@php
$filteredData = $lat->filter(function ($item) use ($i) {
return date('d', strtotime($item['DATE'])) == $i+1;
});
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('fk_o_id',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
@endphp
@if($filteredData->isEmpty())
<td class="center aligned">
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@else
@foreach($filteredData as $key => $date)
@if(data_get($date,'attendance_status') == 1)
<td class="center aligned">
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@else
<td class="center aligned" style="background-color: #DCDCDC;">
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset;background-color: #DCDCDC;" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endif
@endforeach
@endif
@endfor
@endif
@else
@if($phase == 1)
@for($i = 0; $i < 15 ; $i++)
<?php
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('fk_o_id',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
<td >
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endfor
@else
@for($i = 15; $i < $daymonth; $i++)
<?php
$valuehour = '';
$date = $year.'-'.sprintf('%02d', $month).'-'.sprintf('%02d', $i+1);
if($hour)
{
$valuehour = $hour->where('td_date','=',$date)
->where('fk_o_id',$project['td_project'])
->where('tm_phase',$phase)
->first();
$total += data_get($valuehour,'td_hours');
}
?>
<td>
<input type="text" onkeypress="onlynumber(event)" id="hour[{{$project['td_project']}}][{{$i+1}}]" name="hour[{{$project['td_project']}}][{{$i+1}}]" value="@if($valuehour){{data_get($valuehour,'td_hours')}}@else @endif" min="0" max="24" style="padding:2px;margin:unset" onchange="limiter(this,'{{$project['td_project']}}');">
</td>
@endfor
@endif
@endif
<td>
<input type="text" class="text-center" onkeypress="onlynumber(event)" name="total-{{$project['td_project']}}" id="total-{{$project['td_project']}}" style="padding-right: 4px;padding-left: 4px;" onchange="limiter(this,'{{$project['td_project']}}');" readonly="" value="{{number_format($total, '1', '.', '')}}">
</td>
</tr>
@endforeach
</tbody>
</table>
{{-- </div> --}}
<?php
// dd(data_get($checkoverhead,'tm_timesheet_master_sts'));
......
......@@ -14,9 +14,15 @@
<label>Month</label>
<select name="month" class="ui fluid dropdown" required="required">
@foreach ($month as $key => $value)
<option value="{{ $key+1 }}" @if($key+1 == date('m')) selected="selected" @endif>{{ $value }}</option>
@endforeach
@if($currmonth == 1 && date('j') < 16)
@foreach ($month as $key => $value)
<option value="{{ $key+1 }}" @if($key+1 == 12) selected="selected" @endif>{{ $value }}</option>
@endforeach
@else
@foreach ($month as $key => $value)
<option value="{{ $key+1 }}" @if($key+1 == date('m')) selected="selected" @endif>{{ $value }}</option>
@endforeach
@endif
</select>
</div>
......@@ -27,8 +33,18 @@
<option value="2" @if(date('d') < 16) selected="selected" @endif >2nd Half-month</option>
</select>
</div>
@if($currmonth == 1)
{{-- yg year tu dah x boleh pilih 2023? sbb ade lagi pss yg lom submit tahun 2023 -> shikin 18/01/2024 --}}
<div class="three wide field">
<label>Year</label>
<select name="year" class="ui fluid dropdown" required="required">
<option value="{{ $curryear }}">{{ $curryear }}</option>
<option value="{{ $curryear-1 }}">{{ $curryear-1 }}</option>
</select>
</div>
{{-- @if($currmonth == 1 && date('j') < 16)
<div class="three wide field">
<label>Year</label>
<select name="year" class="ui fluid dropdown" required="required">
......@@ -41,7 +57,7 @@
<label>Year</label>
<input type="text" name="year" class="ui fluid dropdown" value="{{ $curryear }}" readonly="readonly">
</div>
@endif
@endif --}}
</div>
<button class="ui green button" type="submit">Open Form</button>
......
......@@ -41,6 +41,18 @@
</div>
</div>
<div class="two fields">
<div class="eight wide field">
<label>Start Date</label>
<input type="date" name="startdate">
</div>
<div class="eight wide field">
<label>End Date</label>
<input type="date" name="enddate">
</div>
</div>
<input type="hidden" name="status" value="1">
<!-- <div class="field">
<label>Project Status</label>
......
......@@ -30,6 +30,19 @@
@endforeach
</select>
</div>
<div class="two fields">
<div class="eight wide field">
<label>Start Date</label>
<!-- <input type="hidden" name="startdate" value="{{ data_get($project,'start_date') }}"> -->
<input placeholder="{{ date('d-m-Y', strtotime(data_get($project,'start_date'))) }}" name="startdate" value="{{ data_get($project,'start_date') }}" class="textbox-n" type="text" onfocus="(this.type='date')" onblur="(this.type='text')" id="date" />
</div>
<div class="eight wide field">
<label>End Date</label>
<!-- <input type="hidden" name="enddate" value="{{ data_get($project,'end_date') }}"> -->
<input placeholder="{{ date('d-m-Y', strtotime(data_get($project,'end_date'))) }}" name="enddate" value="{{ data_get($project,'end_date') }}" class="textbox-n" type="text" onfocus="(this.type='date')" onblur="(this.type='text')" id="date" />
</div>
</div>
<div class="field">
<label>Project Status</label>
<select name="status" class="ui fluid dropdown">
......
......@@ -75,13 +75,17 @@
</tr>
</thead>
<tbody>
@foreach($list as $key => $listname)
@forelse($list as $key => $listname)
<tr>
<td class="center aligned" data-label="no">{{ $key+1 }}</td>
<td data-label="name">{{ data_get($listname,'name') }}</td>
<td data-label="department">{{ data_get($listname,'department') }}</td>
</tr>
@endforeach
@empty
<tr>
<td class="center aligned" data-label="no" colspan="3">No Data</td>
</tr>
@endforelse
</tbody>
</table>
</div>
......
......@@ -5,7 +5,7 @@
<div class="ui segment">
<a class="ui green left ribbon label">Report by Project</a>
<br><br>
<form class="ui form" action="{{ route('timesheet::report.generateprojectreport') }}" method="POST">
{{csrf_field()}}
<div class="one fields">
......@@ -17,13 +17,13 @@
<option value="{{ data_get($value,'id') }}" @if(data_get($value,'id') == data_get($pdetail,'pid')) selected="selected" @endif>{{ data_get($value,'p_project_code') }} | {{ data_get($value,'p_project_description') }}</option>
@endforeach
@else
<option value="noproject">No Project</option>
<option value="noproject">No Project</option>
@endif
</select>
</div>
</div>
<?php
// dd($year);
<?php
// dd($year);
?>
<div class="two fields">
<div class="three wide field">
......@@ -39,7 +39,7 @@
</select>
</div>
<div class="three wide field">
<label>Month</label>
<label>Month</label>
<select name="month" class="ui fluid dropdown search" required="required">
@foreach($listmonth as $key => $value)
<option value="{{ $key+1 }}" @if($value == $month) selected="selected" @endif>{{ $value }}</option>
......@@ -52,8 +52,8 @@
</form>
</div>
<div class="ui segment">
<div class="ui purple left ribbon label">
<div class="ui segment">
<div class="ui purple left ribbon label">
Reporting
</div>
......@@ -72,16 +72,26 @@
<tr>
<th style="width: 10%">Project </th>
<th style="width: 1%">:</th>
<th colspan="2"> {{data_get($pdetail,'pcode')}} - {{data_get($pdetail,'pname')}}</th>
<th style="width: 20%"> {{data_get($pdetail,'pcode')}} - {{data_get($pdetail,'pname')}}</th>
<th style="width: 10%">Start Date </th>
<th style="width: 1%">:</th>
<th style="width: 20%">
@if(data_get($pdetail,'start_date')) {{ date("j M Y", strtotime(data_get($pdetail,'start_date'))) }} @endif
</th>
</tr>
<tr>
<th style="width: 10%"> Month/Year</th>
<th style="width: 1%">:</th>
<th colspan="2"> {{$month}} {{$year}}</th>
<th style="width: 20%"> {{$month}} {{$year}}</th>
<th style="width: 10%"> End Date</th>
<th style="width: 1%">:</th>
<th style="width: 20%">
@if(data_get($pdetail,'end_date')) {{ date("j M Y", strtotime(data_get($pdetail,'end_date'))) }} @endif
</th>
</tr>
</thead>
</table>
<table class="ui unstackable celled table">
<thead>
<tr>
......@@ -98,11 +108,11 @@
</tr>
</thead>
<tbody>
<?php
<?php
$pteam = [];
?>
@foreach($roles as $key => $role)
<?php
<?php
$pteam = $pteams->where('role_id', data_get($role,'pm_roles'));
// dump($role);
// dump($pteams);
......@@ -111,7 +121,7 @@
<td rowspan="{{count($pteam)+1}}" class="center aligned">{{data_get($role,'role.role')}}</td>
<td rowspan="{{count($pteam)+1}}" class="center aligned">
<?php $hannan = 0; ?>
<?php
<?php
$hannan = data_get($role,'pm_hours');
if ($hannan) {
} else {
......@@ -121,10 +131,10 @@
{{ number_format($hannan, 1, '.', '') }} Hours<br>
{{ number_format($hannan/8, 1, '.', '') }} Days
</td>
<td rowspan="{{count($pteam)+1}}" class="center aligned">
<?php
<?php
$accumulatehours = 0;
$staffaccumulateshours = $accumulates->where('tp_roles', data_get($role,'pm_roles'));
foreach ($staffaccumulateshours as $key => $accumulateshours) {
......@@ -132,8 +142,8 @@
$accumulatehours += data_get($accumulateshours,'tp_hours');
}
?>
{{ number_format($accumulatehours, 1, '.', '') }} Hours <br>
{{ number_format($accumulatehours/8, 1, '.', '') }} Days
{{ number_format($accumulatehours, 1, '.', '') }} Hours <br>
{{ number_format($accumulatehours/8, 1, '.', '') }} Days
</td>
<?php $count = 0; ?>
@foreach($pteam as $key => $team)
......@@ -142,12 +152,12 @@
{{ data_get($team,'pt_team') }}
</td>
<td class="center aligned">
<?php
<?php
// dd($count);
$currhour = 0;
$currmonthhours = $currentmonthhours->where('staffid', data_get($team,'pt_staff_id'));
foreach ($currmonthhours as $key => $hours) {
$currhour = data_get($hours,'tp_hours');
$currhour += data_get($hours,'tp_hours');
}
// dd($currmonthhours);
?>
......@@ -170,7 +180,7 @@
</td>
@else
@endif
<?php
<?php
$count++;
?>
</tr>
......@@ -181,7 +191,7 @@
</table>
</div>
</div>
</div>
</div>
......@@ -189,4 +199,4 @@
@endsection
@push('script')
@endpush
\ No newline at end of file
@endpush
......@@ -145,15 +145,30 @@
<td class="center aligned">{{ number_format($totalc/8, 1, '.', '') }}</td>
@endif
<?php $totalnc = 0; ?>
<?php $totalnc = $ocuti = 0; ?>
@foreach($overhead as $key => $value)
<td class="center aligned">
<?php $monthly_hours = 0; ?>
@foreach($ovhours as $key => $hours)
@if(data_get($staff,'staffid') == data_get($hours,'staffid') && data_get($value,'id') == data_get($hours,'oid'))
<!-- {{data_get($hours,'hours')}} -->
<?php $monthly_hours += data_get($hours,'hours') ?>
<!-- <?php $totalnc += data_get($hours,'hours'); ?> -->
<?php
$monthly_hours += data_get($hours,'hours');
if (data_get($hours,'oid') == 6) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 7) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 8) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 10) {
$ocuti += data_get($hours,'hours');
}else if (data_get($hours,'oid') == 15) {
$ocuti += data_get($hours,'hours');
}else{
}
$totalnc += data_get($hours,'hours');
?>
@endif
@endforeach
......@@ -165,7 +180,9 @@
@endforeach
<td class="center aligned">{{ number_format($totalnc, '1', '.', '') }}</td>
<td class="center aligned">{{ number_format($totalnc/8, 1, '.', '') }}</td>
<?php $totaldays = number_format($totalc/8, 1, '.', '') + number_format($totalnc/8, 1, '.', ''); ?>
<?php
$totalnc -= $ocuti;
$totaldays = number_format($totalc/8, 1, '.', '') + number_format($totalnc/8, 1, '.', ''); ?>
<td class="center aligned">{{ number_format($totaldays, '1', '.', '') }}</td>
</tr>
</tbody>
......@@ -198,14 +215,26 @@
<th class="text-center">{{ number_format($tch, '1', '.', '') }}</th>
<th class="text-center">{{ number_format($tch/8, 1, '.', '') }}</th>
@endif
<?php $totaloverhead = 0; ?>
<?php $totaloverhead = 0;$cuti = 0; ?>
@foreach($overhead as $key => $value)
<?php
$monthly_ov = 0;
$oid = data_get($value,'id');
$ov = $ovhours->where('oid', $oid);
foreach ($ov as $key => $val) {
$monthly_ov += data_get($val,'hours');
if (data_get($val,'oid') == 6) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 7) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 8) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 10) {
$cuti += data_get($val,'hours');
}else if (data_get($val,'oid') == 15) {
$cuti += data_get($val,'hours');
}else{
}
$monthly_ov += data_get($val,'hours');
}
?>
<th class="center aligned">{{ number_format($monthly_ov, '1', '.', '') }}</th>
......
@extends('ui::layouts.app')
@section('content')
<div class="ui segment">
<a class="ui blue left ribbon label">List of Users</a>
<br>
<br>
<button class="tiny center aligned ui purple right compact labeled icon button" onclick="window.location.href='{{ route('timesheet::users.syncNewUsers') }}';">
<i class="angle double right icon"></i>
Sync New User
</button>
<br>
<br>
<table id="listUser" class="datatable">
<thead>
<tr>
<th>No</th>
<th>Name</th>
<th>Email</th>
<th>Status</th>
<th>Created At</th>
</tr>
</thead>
<tbody>
@foreach($users as $key => $user)
<?php
// dd($user);
?>
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$user->name}}</td>
<td>{{$user->email}}</td>
<td>{{$user->status}}</td>
<td>{{$user->created_at}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endsection
@push('script')
<script>
$(document).ready(function() {
$('#listUser').DataTable({
"searching": true,
"bSort": false,
"pageLength": 50,
language: {
url: "{{ url('web/d.json') }}" // file yang translate ke bahasa melayu
}
});
});
</script>
@endpush
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -57,8 +57,9 @@ class ReportController extends Controller
$year = Ts_master::select('tm_year')
->distinct('tm_year')
->orderby('tm_year','DESC')
->where('tm_timesheet_master_sts', 4)
// ->where('tm_timesheet_master_sts', 4)
->get();
// dd($year);
return view('timesheet::report.ringkasanLaporan', compact('dept', 'month', 'year'));
}
......@@ -72,7 +73,7 @@ class ReportController extends Controller
$yearlist = Ts_master::select('tm_year')
->distinct('tm_year')
->orderby('tm_year','DESC')
->where('tm_timesheet_master_sts', 4)
// ->where('tm_timesheet_master_sts', 4)
->get();
$monthlist = [];
......@@ -364,11 +365,11 @@ class ReportController extends Controller
}
$year = Ts_master::select('tm_year')
->where('tm_timesheet_master_sts', 4)
// ->where('tm_timesheet_master_sts', 4)
->distinct('tm_year')
->orderby('tm_year','DESC')
->get();
return view('timesheet::report.deptReport', compact('month', 'year', 'dept'));
}
......@@ -378,7 +379,7 @@ class ReportController extends Controller
->except([8]);
$yearlist = Ts_master::select('tm_year')
->where('tm_timesheet_master_sts', 4)
// ->where('tm_timesheet_master_sts', 4)
->distinct('tm_year')
->orderby('tm_year','DESC')
->get();
......@@ -446,11 +447,11 @@ class ReportController extends Controller
}
$year = Ts_master::select('tm_year')
->where('tm_timesheet_master_sts', 4)
// ->where('tm_timesheet_master_sts', 4)
->distinct('tm_year')
->orderby('tm_year','DESC')
->get();
// dd($year);
return view('timesheet::report.filterOvertime', compact('month', 'year', 'dept'));
}
......@@ -466,7 +467,7 @@ class ReportController extends Controller
}
$yearlist = Ts_master::select('tm_year')
->where('tm_timesheet_master_sts', 4)
// ->where('tm_timesheet_master_sts', 4)
->distinct('tm_year')
->orderby('tm_year','DESC')
->get();
......@@ -501,8 +502,18 @@ class ReportController extends Controller
public function filterNotSubmit()
{
$user = Staff_info::where('fk_users', Auth::id())->first();
$roleid = auth()->user()->roles['0']->id;
// dd($roleid);
if ($roleid == 6) {
$dept = Department::all()->except([8]);
// dd($dept);
}else{
$dept = Department::where('id', data_get($user,'fk_lkp_department'))->get();
}
$dept = Department::where('id', data_get($user,'fk_lkp_department'))->get();
// $dept = Department::where('id', data_get($user,'fk_lkp_department'))->get();
// dd($dept);
// $dept = Department::all()
// ->except([8]);
......@@ -514,7 +525,7 @@ class ReportController extends Controller
}
$year = Ts_master::select('tm_year')
->where('tm_timesheet_master_sts', 4)
// ->where('tm_timesheet_master_sts', 4)
->distinct('tm_year')
->orderby('tm_year','DESC')
->get();
......@@ -527,7 +538,15 @@ class ReportController extends Controller
$keyword = data_get($request,'keyword');
$user = Staff_info::where('fk_users', Auth::id())->first();
$dept = Department::where('id', data_get($user,'fk_lkp_department'))->get();
$roleid = auth()->user()->roles['0']->id;
// dd($roleid);
if ($roleid == 6) {
$dept = Department::all()->except([8]);
// dd($dept);
}else{
$dept = Department::where('id', data_get($user,'fk_lkp_department'))->get();
}
// $dept = Department::all()
// ->except([8]);
......@@ -539,7 +558,7 @@ class ReportController extends Controller
}
$year = Ts_master::select('tm_year')
->where('tm_timesheet_master_sts', 4)
// ->where('tm_timesheet_master_sts', 4)
->distinct('tm_year')
->orderby('tm_year','DESC')
->get();
......
<?php
namespace Portal\Timesheet\Http\Controllers;
use Illuminate\Routing\Controller;
use Carbon\Carbon;
use DB;
use Portal\Timesheet\Model\Users;
use Portal\Timesheet\Model\Ts_master;
use Portal\Timesheet\Model\Ts_detail;
use Portal\Timesheet\Model\Project;
use Portal\Timesheet\Model\Department;
use Portal\Timesheet\Model\Pteam;
use Portal\Timesheet\Model\Staff_info;
use Portal\Timesheet\Model\Overhead;
use Portal\Timesheet\Model\Role;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use File;
use Redirect;
use App\Mail\StatusAccept;
use App\Mail\StatusReject;
use Mail;
use Curl;
use Auth;
use App\User as AppUsers;
use Portal\Timesheet\Model\Urole as Aclrole;
use Portal\Timesheet\Model\Staff_info as StaffInfo;
use Illuminate\Support\Facades\Artisan;
class UsersController extends Controller
{
public function senaraiUsers()
{
$users = Users::all();
return view('timesheet::users.list', compact('users'));
}
public function syncNewUsers()
{
// Run command manual
// $output = shell_exec('php /www/html/timesheet3f/artisan migrate:user-cron 2>&1');
// // Log the output for debugging
// \Log::info("migrate:user-cron output: " . $output);
$migrateuser = DB::connection('mysql')->table('migrate_user')->where('id',1)->first();
// dump($migrateuser);
$user = DB::connection('mysql2')
->table('users')
->join('staff_info','staff_info.fk_users','=','users.id')
->where('users.id','>',$migrateuser->userid)
->select('users.id','users.email','users.fullname','users.staff_id','staff_info.fk_lkp_country','staff_info.fk_lkp_state','staff_info.ic_no','staff_info.email')
->get();
// dd($user);
if($user){
foreach ($user as $key => $value){
$new = new AppUsers;
$new->name = strtoupper($value->fullname);
$new->email = $value->email;
$new->status = 'ACTIVE';
$new->timezone = 'UTC';
$new->meta = NULL;
$new->email_verified_at = NULL;
$new->password = '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm'; //secret
$new->password_last_set = NULL;
$new->u_staffID = $value->staff_id;
$new->save();
$role = new Aclrole;
$role->user_id = $new->id;
$role->role_id = 5;
$role->save();
$saveinfo = new StaffInfo;
$saveinfo->fk_lkp_country = $value->fk_lkp_country;
$saveinfo->fk_lkp_state = $value->fk_lkp_state;
$saveinfo->fk_users = $new->id;
$saveinfo->ic_no = $value->ic_no;
$saveinfo->email = $value->email;
$saveinfo->staff_id = $value->staff_id;
$saveinfo->fullname = strtoupper($value->fullname);
$saveinfo->status = 1;
$saveinfo->save();
//update migrate user
$updmigrate = DB::connection('mysql')->table('migrate_user')->where('id',1)
->update(['userid' => $value->id]);
// $updmigrate->userid = $value->id;
// $updmigrate->save();
}//endforeach
} //end if user
return redirect('users/list')->withSuccess('Senarai staff telah dikemaskini');
}
}
......@@ -33,7 +33,10 @@ class VwChargeableVerification extends Model
return $this->hasMany('Portal\Timesheet\Model\Tproject','fk_tm_id','tmid')->where('tp_project_type', 3);
}
public function sname()
{
return $this->hasOne('Portal\Timesheet\Model\Staff_info','staff_id','staff_id');
}
// public function department()
// {
......
<?php
namespace Portal\Timesheet\Model;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class VwPelulus extends Model
{
use Notifiable;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'vw_pelulus';
public function details()
{
return $this->hasOne('Portal\Timesheet\Model\Users','id','pelulus');
}
// public function penyokong()
// {
// return $this->hasOne('Portal\Timesheet\Model\Staff_info','id','penyokong');
// }
/**
* undocumented function
*
* @return void
* @author
**/
public function info()
{
}
}
<?php
namespace Portal\Timesheet\Model;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class VwPenyokong extends Model
{
use Notifiable;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'vw_penyokong';
public function details()
{
return $this->hasOne('Portal\Timesheet\Model\Users','id','penyokong');
}
/**
* undocumented function
*
* @return void
* @author
**/
public function info()
{
}
}
......@@ -16,6 +16,11 @@ class VwStaff extends Model
*/
protected $table = 'vw_staff';
public function penyokong()
{
return $this->hasOne('Portal\Timesheet\Model\Staff_info','id','penyokong');
}
/**
* undocumented function
*
......
<?php
namespace Portal\Timesheet\Model;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Portal\Timesheet\Model\Ts_master;
class VwTpStatus extends Model
{
use Notifiable;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'vw_tp_status';
public function staffdetails()
{
return $this->hasOne('Portal\Timesheet\Model\Staff_info','staff_id','staffid');
}
public function penyokongproject()
{
return $this->hasOne('Portal\Timesheet\Model\Staff_info','staff_id','tp_pm');
}
public function penyokongoverhead()
{
return $this->hasOne('Portal\Timesheet\Model\Staff_info','fk_users','tp_pm');
}
public function pelulus()
{
return $this->hasOne('Portal\Timesheet\Model\Staff_info','fk_users','tp_pd');
}
public function tm()
{
return $this->hasOne(Ts_master::class, 'id', 'fk_tm_id');
}
/**
* undocumented function
*
* @return void
* @author
**/
public function info()
{
}
}
......@@ -34,4 +34,9 @@ class Ts_master extends Model
return $this->belongsTo('Portal\Timesheet\Model\Staff_info','staff_id','tm_staff_id');
}
public function staffs()
{
return $this->hasOne('Portal\Timesheet\Model\Staff_info','staff_id','tm_staff_id');
}
}
......@@ -181,6 +181,13 @@ class ServiceProvider extends BaseServiceProvider
->active('pengurusan/*')
->data('permission', Permission::pengurusan);
// dd(auth());
$pengurusanSistem = $this->app['laravolt.menu']->add(__('System Management'))->data('icon', 'align justify');
$pengurusanSistem->add(__('List of Users'), route('timesheet::users.senaraiUsers'))
->data('icon', 'users icon')
->active('usermanagement/*')
->data('permission', Permission::usermanagement);
// $calendar->add(__('Chargeable'), route('timesheet::dashboard.kalendarCharge'))
// ->data('icon', 'calendar alternate outline')
// ->active('kalendarCharge/*')
......
{
"emptyTable": "Tiada data",
"info": "Paparan dari _START_ hingga _END_ dari _TOTAL_ rekod",
"infoEmpty": "Paparan 0 hingga 0 dari 0 rekod",
"infoFiltered": "(Ditapis dari jumlah _MAX_ rekod)",
"infoThousands": ",",
"lengthMenu": "Papar _MENU_ rekod",
"loadingRecords": "Diproses...",
"processing": "Sedang diproses...",
"search": "Carian:",
"zeroRecords": "Tiada padanan rekod yang dijumpai.",
"paginate": {
"first": "Pertama",
"previous": "Sebelum",
"next": "Seterusnya",
"last": "Akhir"
},
"aria": {
"sortAscending": ": diaktifkan kepada susunan lajur menaik",
"sortDescending": ": diaktifkan kepada susunan lajur menurun"
},
"autoFill": {
"cancel": "batal",
"fill": "Isi semua sel dengan <i>%d<\/i>",
"fillHorizontal": "Isi sel secara mendatar",
"fillVertical": "Isi sel secara menegak"
},
"buttons": {
"collection": "Koleksi <span class=\"ui-button-icon-primary ui-icon ui-icon-triangle-1-s\"><\/span>",
"copy": "Salin",
"print": "Cetak",
"colvis": "Kolum Pilihan"
},
"thousands": ",",
"_comment":{
"select": {
"cells": {
"1": "1 sel terpilih",
"_": "%d sel terpilih"
},
"columns": {
"1": "1 kolum terpilih",
"_": "%d kolum terpilih"
},
"rows": {
"1": "1 baris terpilih",
"_": "%d baris terpilih"
}
}
},
"editor": {
"close": "Tutup"
}
}
......@@ -30,7 +30,7 @@ Project details : <br>
</table>
<br>
New project @if(count($data_staffs) > 1)members @else member @endif : <br>
Project @if(count($data_staffs) > 1)members @else member @endif : <br>
<table style="border: black 1px solid; font-size: 16px; text-align: center; width: 150%;" id="project">
<thead>
<tr>
......
......@@ -17,6 +17,8 @@ The previous project details : <br>
<th style="border: black 1px solid;">Project Manager</th>
<th style="border: black 1px solid;">Project Director</th>
<th style="border: black 1px solid; width: 10%;">Status</th>
<th style="border: black 1px solid; width: 10%;">Start Date</th>
<th style="border: black 1px solid; width: 10%;">End Date</th>
<th style="border: black 1px solid;">Updated by</th>
</tr>
</thead>
......@@ -27,6 +29,8 @@ The previous project details : <br>
<td style="border: black 1px solid;"> {!! ucwords(strtolower($old_data['projectmanager'])) !!} </td>
<td style="border: black 1px solid;"> {!! ucwords(strtolower($old_data['projectdirector'])) !!} </td>
<td style="border: black 1px solid; width: 10%;"> @if( $old_data['status'] == 1) Active @else Inactive @endif </td>
<td style="border: black 1px solid;"> {!! date('j M Y', strtotime($old_data['startdate'])) !!} </td>
<td style="border: black 1px solid;"> {!! date('j M Y', strtotime($old_data['enddate'])) !!} </td>
<td style="border: black 1px solid;"> {!! ucwords(strtolower($old_data['editor'])) !!} </td>
</tr>
</tbody>
......@@ -42,6 +46,8 @@ The new project details : <br>
<th style="border: black 1px solid;">Project Manager</th>
<th style="border: black 1px solid;">Project Director</th>
<th style="border: black 1px solid; width: 10%;">Status</th>
<th style="border: black 1px solid; width: 10%;">Start Date</th>
<th style="border: black 1px solid; width: 10%;">End Date</th>
<th style="border: black 1px solid;">Updated by</th>
</tr>
</thead>
......@@ -52,6 +58,8 @@ The new project details : <br>
<td style="border: black 1px solid;"> {!! ucwords(strtolower($data_email['projectmanager'])) !!} </td>
<td style="border: black 1px solid;"> {!! ucwords(strtolower($data_email['projectdirector'])) !!} </td>
<td style="border: black 1px solid; width: 10%;"> @if( $data_email['status'] == 1) Active @else Inactive @endif </td>
<td style="border: black 1px solid;"> {!! date('j M Y', strtotime($data_email['startdate'])) !!} </td>
<td style="border: black 1px solid;"> {!! date('j M Y', strtotime($data_email['enddate'])) !!} </td>
<td style="border: black 1px solid;"> {!! ucwords(strtolower($data_email['editor'])) !!} </td>
</tr>
</tbody>
......
@component('mail::message')
# Timesheet Approval
Assalamualaikum w.b.t Mr/Mrs.
{!! ucwords(strtolower($data_email['name'])) !!},
We greatly appreciate your help to approve several timesheets as stated below.
@if(count($projectstafflist)>0)
Timesheet approval :
<br>
@foreach($projectstafflist as $key => $staff)
- {{ ucwords(strtolower(data_get($staff,'staffdetails.fullname'))) }}.
<br>
@endforeach
@endif
Your cooperation is highly appreciated.
Thank you.
@component('mail::button', ['url' => 'https://timesheet.3fresources.com/home'])
Etimesheet
@endcomponent
---
<br>
<i>This is an auto generated message, please do not reply.</i>
@endcomponent
@component('mail::message')
@if(count($data_overheads) > 0 && count($data_project) == 0)
# Your overhead has been rejected!
@elseif(count($data_overheads) == 0 && count($data_project) > 0)
# Your project has been rejected!
@else
# Your projects & overhead has been rejected!
@endif
Assalamualaikum w.b.t Dato' /Datin /En /Pn / Cik
{!! ucwords(strtolower($data_email['staffname'])) !!}
We would like to inform you as your
@if(count($data_overheads) > 0 && count($data_project) == 0)
overhead has been rejected.
@elseif(count($data_overheads) == 0 && count($data_project) > 0)
timesheet @if(count($data_project) == 1) project has @else projects have @endif been rejected.
@else
projects & overhead has been rejected.
@endif
The details of timesheet submission is as below: <br>
<table style="border: black 1px solid; font-size: 16px; text-align: center; width: 150%;" id="project">
<thead>
<tr>
<th style="border: black 1px solid;">Phase</th>
<th style="border: black 1px solid;">Month</th>
<th style="border: black 1px solid;">Year</th>
<th style="border: black 1px solid;">Submission Date</th>
</tr>
</thead>
<tbody>
<tr>
<td style="border: black 1px solid;">@if($data_timesheet['phase'] == 1) 1st Halfmonth @else 2nd Halfmonth @endif</td>
<td style="border: black 1px solid;">{!! date("F", mktime(0, 0, 0, $data_timesheet['month'], 10)) !!}</td>
<td style="border: black 1px solid;">{!! ucwords(strtolower($data_timesheet['year'])) !!}</td>
<td style="border: black 1px solid;">{!! date("d F Y", strtotime($data_timesheet['submissionDate'])) !!}</td>
</tr>
</tbody>
</table>
<br>
@if(count($data_project) > 0)
The details of the project rejection is as below: <br>
<table style="border: black 1px solid; font-size: 16px; text-align: center; width: 150%;" id="project">
<thead>
<tr>
<th style="border: black 1px solid;">Project Code</th>
<th style="border: black 1px solid;">Project Name</th>
<th style="border: black 1px solid;">Rejected By</th>
<th style="border: black 1px solid;">Remarks</th>
</tr>
</thead>
<tbody>
@foreach($data_project as $key => $project)
<tr>
<td style="border: black 1px solid;">{!! $project['pcode'] !!} </td>
<td style="border: black 1px solid;">{!! $project['projectname'] !!}</td>
@if($key==0)
<td style="border: black 1px solid;" rowspan="{{count($data_project)}}">{!! ucwords(strtolower($project['projectdirector'])) !!}</td>
<td style="border: black 1px solid;" rowspan="{{count($data_project)}}">{!! ucwords(strtolower($project['remarks'])) !!}</td>
@endif
</tr>
@endforeach
</tbody>
</table>
<br>
@endif
@if(count($data_overheads) > 0)
The details of the rejected overhead is as below: <br>
<table style="border: black 1px solid; font-size: 16px; text-align: center; width: 150%;" id="project">
<thead>
<tr>
<th style="border: black 1px solid;">Overhead</th>
<th style="border: black 1px solid;">Rejected By</th>
<th style="border: black 1px solid;">Remarks</th>
</tr>
</thead>
<tbody>
@foreach($data_overheads as $key => $overhead)
<tr>
<td style="border: black 1px solid;">{!! $overhead['projectname'] !!}</td>
@if($key==0)
<td style="border: black 1px solid;" rowspan="{{count($data_overheads)}}">{!! ucwords(strtolower($overhead['projectdirector'])) !!}</td>
<td style="border: black 1px solid;" rowspan="{{count($data_overheads)}}">{!! ucwords(strtolower($overhead['remarks'])) !!}</td>
@endif
</tr>
@endforeach
</tbody>
</table>
<br>
@endif
Thank you. <br>
<!-- <br> -->
---
<br>
<i>This is an auto generated message, please do not reply.</i>
<!-- Thanks,<br> -->
<!-- {{ config('app.name') }} -->
@endcomponent
\ No newline at end of file
@component('mail::message')
@if(count($data_overheads) > 0 && count($data_project) == 0)
# Your overhead has been rejected!
@elseif(count($data_overheads) == 0 && count($data_project) > 0)
# Your project has been rejected!
@else
# Your projects & overhead has been rejected!
@endif
Assalamualaikum w.b.t Dato' /Datin /En /Pn / Cik
{!! ucwords(strtolower($data_email['staffname'])) !!}
We would like to inform you as one of your timesheet project namely, {!! $data_email['projectname'] !!}, has been rejected.
We would like to inform you as your
@if(count($data_overheads) > 0 && count($data_project) == 0)
overhead has been rejected.
@elseif(count($data_overheads) == 0 && count($data_project) > 0)
timesheet @if(count($data_project) == 1) project has @else projects have @endif been rejected.
@else
projects & overhead has been rejected.
@endif
The details of timesheet submission is as below: <br>
<table style="border: black 1px solid; font-size: 16px; text-align: center; width: 150%;" id="project">
......@@ -27,6 +44,9 @@ The details of timesheet submission is as below: <br>
</tbody>
</table>
<br>
@if(count($data_project) > 0)
The details of the project rejection is as below: <br>
<table style="border: black 1px solid; font-size: 16px; text-align: center; width: 150%;" id="project">
<thead>
......@@ -38,17 +58,49 @@ The details of the project rejection is as below: <br>
</tr>
</thead>
<tbody>
@foreach($data_project as $key => $project)
<tr>
<td style="border: black 1px solid;">{!! $project['pcode'] !!} </td>
<td style="border: black 1px solid;">{!! $project['projectname'] !!}</td>
@if($key==0)
<td style="border: black 1px solid;" rowspan="{{count($data_project)}}">{!! ucwords(strtolower($project['projectmanager'])) !!}</td>
<td style="border: black 1px solid;" rowspan="{{count($data_project)}}">{!! ucwords(strtolower($project['remarks'])) !!}</td>
@endif
</tr>
@endforeach
</tbody>
</table>
<br>
@endif
@if(count($data_overheads) > 0)
The details of the rejected overhead is as below: <br>
<table style="border: black 1px solid; font-size: 16px; text-align: center; width: 150%;" id="project">
<thead>
<tr>
<td style="border: black 1px solid;">{!! $data_email['pcode'] !!} </td>
<td style="border: black 1px solid;">{!! ucwords(strtolower($data_email['projectname'])) !!}</td>
<td style="border: black 1px solid;">{!! ucwords(strtolower($data_email['projectmanager'])) !!}</td>
<td style="border: black 1px solid;">{!! ucwords(strtolower($data_email['remarks'])) !!}</td>
<th style="border: black 1px solid;">Overhead</th>
<th style="border: black 1px solid;">Rejected By</th>
<th style="border: black 1px solid;">Remarks</th>
</tr>
</thead>
<tbody>
@foreach($data_overheads as $key => $overhead)
<tr>
<td style="border: black 1px solid;">{!! $overhead['projectname'] !!}</td>
@if($key==0)
<td style="border: black 1px solid;" rowspan="{{count($data_overheads)}}">{!! ucwords(strtolower($overhead['hod'])) !!}</td>
<td style="border: black 1px solid;" rowspan="{{count($data_overheads)}}">{!! ucwords(strtolower($overhead['remarks'])) !!}</td>
@endif
</tr>
@endforeach
</tbody>
</table>
<br>
Thank you. <br>
@endif
Thank you. <br>
<!-- <br> -->
---
<br>
......
@component('mail::message')
# Reminder for Timesheet Submission!
Assalamualaikum w.b.t Mr/Mrs.
{!! ucwords(strtolower($data_email['name'])) !!},
We would like to inform you as of today, {!! date('j F Y', strtotime($data_email['today'])) !!} , we have not receive your timesheet for @if($data_email['phase'] == 1) 1st Halfmonth @else 2nd Halfmonth @endif {!! date('F', mktime(0, 0, 0, $data_email['month'], 10)).' '.$data_email['year'] !!}.
Kindly submit your timesheet as soon as possible.
Thank you. <br>
<!-- <br> -->
---
<br>
<i>This is an auto generated message, please do not reply.</i>
<!-- Thanks,<br> -->
<!-- {{ config('app.name') }} -->
@endcomponent
\ No newline at end of file
@component('mail::message')
# Timesheet Verification
Assalamualaikum w.b.t Mr/Mrs.
{!! ucwords(strtolower($data_email['name'])) !!},
We greatly appreciate your help to verify several timesheet as stated below.
@if(count($projectstafflist)>0)
Project verification :
<br>
@foreach($projectstafflist as $key => $staff)
- {{ ucwords(strtolower(data_get($staff,'staffdetails.fullname'))) }}.
<br>
@endforeach
@endif
@if(count($overheadstafflist)>0)
Overhead verification :
<br>
@foreach($overheadstafflist as $key => $staff)
- {{ ucwords(strtolower(data_get($staff,'staffdetails.fullname'))) }}.
<br>
@endforeach
@endif
Your cooperation is highly appreciated.
Thank you.
@component('mail::button', ['url' => 'https://timesheet.3fresources.com/home'])
Etimesheet
@endcomponent
---
<br>
<i>This is an auto generated message, please do not reply.</i>
@endcomponent
......@@ -16,8 +16,8 @@
<i class="mail icon"></i>
</div>
<div class="ui field left icon input fluid">
<input type="password" name="password" placeholder="Password">
<!-- <input type="password" name="password" placeholder="@lang('auth::auth.password')"> -->
<!-- <input type="password" name="password" placeholder="Password"> -->
<input type="password" name="password" placeholder="@lang('auth::auth.password')">
<i class="lock icon"></i>
</div>
@if(config('laravolt.auth.captcha'))
......@@ -26,19 +26,19 @@
</div>
@endif
<div class="ui field">
<button type="submit" class="ui fluid button primary">Login</button>
<!-- <button type="submit" class="ui fluid button primary">@lang('auth::auth.login')</button> -->
<!-- <button type="submit" class="ui fluid button primary">Login</button> -->
<button type="submit" class="ui fluid button primary">@lang('auth::auth.login')</button>
</div>
<div class="ui equal width grid field">
<div class="column left aligned">
<div class="ui checkbox">
<input type="checkbox" name="remember" {{ request()->old('remember')?'checked':'' }}>
<label>Remember me</label>
<!-- <label>@lang('auth::auth.remember')</label> -->
<!-- <label>Remember me</label> -->
<label>@lang('auth::auth.remember')</label>
</div>
</div>
<div class="column right aligned">
<a href="{{route('auth::forgot')}}">Forgot password</a>
<a href="{{route('auth::forgot')}}">@lang('auth::auth.forgot_password')</a>
</div>
</div>
......
......@@ -62,13 +62,13 @@
}
.langdisp
{
background-color: unset !important;
border-radius: unset !important;
margin: unset !important;
padding: unset !important;
{
background-color: unset !important;
border-radius: unset !important;
margin: unset !important;
padding: unset !important;
}
}
}
</style>
......@@ -77,6 +77,11 @@
<script type="text/javascript" src="{{ asset('js/jquery-3.1.1.min.js') }}"></script>
<script type="text/javascript" src="{{ mix('js/all.js', 'laravolt') }}"></script>
<!-- ✅ Load DataTables (AFTER all.js) -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.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 src="https://cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js"></script>
......
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