Commit f467cb0a by Azhan Hannan

senarai project order by status desc

parent 9a1fc224
...@@ -276,7 +276,7 @@ class FormController extends Controller ...@@ -276,7 +276,7 @@ class FormController extends Controller
->where('td_project', $projectid) ->where('td_project', $projectid)
->where('td_hours', '!=', '0') ->where('td_hours', '!=', '0')
->get(); ->get();
if ($checktproject) { if ($checktproject) {
$checktproject->tp_hours = $checkhours->sum('td_hours'); $checktproject->tp_hours = $checkhours->sum('td_hours');
$checktproject->save(); $checktproject->save();
......
...@@ -42,6 +42,7 @@ class MaintenanceController extends Controller ...@@ -42,6 +42,7 @@ class MaintenanceController extends Controller
$project = Project::where('p_project_type', $chargeable) $project = Project::where('p_project_type', $chargeable)
->with('projectDirector') ->with('projectDirector')
->with('projectManager') ->with('projectManager')
->orderBy('p_project_sts', 'desc')
->get(); ->get();
} }
...@@ -51,6 +52,7 @@ class MaintenanceController extends Controller ...@@ -51,6 +52,7 @@ class MaintenanceController extends Controller
->where('p_project_task_team', $user->staff_id) ->where('p_project_task_team', $user->staff_id)
->with('projectDirector') ->with('projectDirector')
->with('projectManager') ->with('projectManager')
->orderBy('p_project_sts', 'desc')
->get(); ->get();
} }
......
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