UPDATE 1405-01-29
This commit is contained in:
@@ -385,12 +385,12 @@
|
||||
<button type="button" onclick="submitForm('/', 'GET')">
|
||||
<i class="fa-solid fa-house text-white"></i>
|
||||
</button>
|
||||
@if(!request()->is("admin") && (isset($_COOKIE['ad']) && $_COOKIE['ad']==1))
|
||||
@if(!request()->is("admin") && (isset($_COOKIE['ad']) && $_COOKIE['ad']!=null))
|
||||
|
||||
<button type="button" onclick="submitForm('{{route('admin.dashboard')}}', 'GET')">
|
||||
<i class="fa-solid fa-users text-white"></i>
|
||||
</button>
|
||||
@elseif(request()->is("admin") && (isset($_COOKIE['ad']) && $_COOKIE['ad']==1))
|
||||
@elseif(request()->is("admin") && (isset($_COOKIE['ad']) && $_COOKIE['ad']!=null))
|
||||
<button type="button" onclick="submitForm('/', 'GET')">
|
||||
<i class="fa-solid fa-users text-white"></i>
|
||||
</button>
|
||||
|
||||
@@ -8,35 +8,35 @@ use Carbon\Carbon;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
||||
//if (!empty($user->tasks)) {
|
||||
// $in_progress = '#fca000';
|
||||
// $todo = '#7d7d7d';
|
||||
// $error = '#fc0000';
|
||||
// $backlog = '#bababa';
|
||||
// $done = '#40de02';
|
||||
// $cancelled = 'black';
|
||||
//
|
||||
// $state = [
|
||||
// "c73c2044-ea14-42cb-b08d-cecf3d1fdfb5" => "$in_progress",// in progress
|
||||
// "a9ce312f-cfca-491e-8e3d-1975aa6ebc10" => "$todo",//to do
|
||||
// "dea1fb57-a281-4fe7-8f3e-ee5567637e35" => "$error",// error
|
||||
// "770fbe42-99f6-41db-9b9e-773d9cced1a5" => "$backlog",//backlog
|
||||
// "b0e464e1-34eb-41ea-b2f7-3ef7483bc9f0" => "$done",//done
|
||||
// "d61d14a3-72f7-4f44-894b-efe8b2a75be1" => "$cancelled",//canceled
|
||||
// ];
|
||||
// $state_order = [
|
||||
// "c73c2044-ea14-42cb-b08d-cecf3d1fdfb5",
|
||||
// "a9ce312f-cfca-491e-8e3d-1975aa6ebc10",
|
||||
// "dea1fb57-a281-4fe7-8f3e-ee5567637e35",
|
||||
// "770fbe42-99f6-41db-9b9e-773d9cced1a5",
|
||||
// "b0e464e1-34eb-41ea-b2f7-3ef7483bc9f0",
|
||||
// "d61d14a3-72f7-4f44-894b-efe8b2a75be1",
|
||||
// ];
|
||||
//
|
||||
// $user->tasks = $user->tasks->sortBy(function ($task) use ($state_order) {
|
||||
// return array_search($task->state, $state_order);
|
||||
// });
|
||||
//}
|
||||
if (!empty($user->tasks)) {
|
||||
$in_progress = '#fca000';
|
||||
$todo = '#7d7d7d';
|
||||
$error = '#fc0000';
|
||||
$backlog = '#bababa';
|
||||
$done = '#40de02';
|
||||
$cancelled = 'black';
|
||||
|
||||
$state = [
|
||||
"c73c2044-ea14-42cb-b08d-cecf3d1fdfb5" => "$in_progress",// in progress
|
||||
"a9ce312f-cfca-491e-8e3d-1975aa6ebc10" => "$todo",//to do
|
||||
"dea1fb57-a281-4fe7-8f3e-ee5567637e35" => "$error",// error
|
||||
"770fbe42-99f6-41db-9b9e-773d9cced1a5" => "$backlog",//backlog
|
||||
"b0e464e1-34eb-41ea-b2f7-3ef7483bc9f0" => "$done",//done
|
||||
"d61d14a3-72f7-4f44-894b-efe8b2a75be1" => "$cancelled",//canceled
|
||||
];
|
||||
$state_order = [
|
||||
"c73c2044-ea14-42cb-b08d-cecf3d1fdfb5",
|
||||
"a9ce312f-cfca-491e-8e3d-1975aa6ebc10",
|
||||
"dea1fb57-a281-4fe7-8f3e-ee5567637e35",
|
||||
"770fbe42-99f6-41db-9b9e-773d9cced1a5",
|
||||
"b0e464e1-34eb-41ea-b2f7-3ef7483bc9f0",
|
||||
"d61d14a3-72f7-4f44-894b-efe8b2a75be1",
|
||||
];
|
||||
|
||||
$user->tasks = $user->tasks->sortBy(function ($task) use ($state_order) {
|
||||
return array_search($task->state, $state_order);
|
||||
});
|
||||
}
|
||||
//dd(count($break = $user->attendanceBreaks));
|
||||
if (count($user->attendanceBreaks) > 0){
|
||||
$break = $user->attendanceBreaks[0];
|
||||
|
||||
Reference in New Issue
Block a user