Browse Source

get pull

pull/3/head
wahyuun 1 year ago
parent
commit
3d62b5cdd3
  1. 3
      Dockerfile
  2. 6
      app/Console/Commands/syncHumanResourceIntegration.php
  3. 42
      app/Helpers/MasterFunctionsHelper.php
  4. 813
      app/Http/Controllers/ActivityController.php
  5. 153
      app/Http/Controllers/BroadcastController.php
  6. 242
      app/Http/Controllers/Controller.php
  7. 183
      app/Http/Controllers/DashboardBoDController.php
  8. 27
      app/Http/Controllers/HumanResourceController.php
  9. 90
      app/Http/Controllers/MapMonitoringController.php
  10. 185
      app/Http/Controllers/PresenceController.php
  11. 1071
      app/Http/Controllers/ProjectController.php
  12. 2
      app/Http/Controllers/RequestMaterialController.php
  13. 6
      app/Http/Controllers/ShowHideColumnController.php
  14. 2
      app/Http/Controllers/UserToProyekController.php
  15. 36
      app/Jobs/ProcessSCurve.php
  16. 6
      app/Models/Activity.php
  17. 2
      app/Models/AssignMaterial.php
  18. 2
      app/Models/Broadcast.php
  19. 4
      app/Models/Project.php
  20. 4
      app/Models/UserToProyek.php
  21. 49
      app/Services/FCMService.php
  22. 1
      bootstrap/app.php
  23. 2
      config/api.php
  24. 5
      config/fcm.php
  25. 36
      database/migrations/2023_08_29_130624_create_jobs_table.php
  26. 9
      docker/nginx/conf.d/default.conf
  27. 1947
      docker/php/php.ini
  28. 72
      rest-client.http
  29. 912
      routes/web.php

3
Dockerfile

@ -29,6 +29,9 @@ RUN docker-php-ext-install \
pgsql \ pgsql \
tokenizer tokenizer
# Copy php.ini to the container
COPY /docker/php/php.ini /usr/local/etc/php/
#Install Extensions #Install Extensions
RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql

6
app/Console/Commands/syncHumanResourceIntegration.php

@ -39,9 +39,9 @@ class syncHumanResourceIntegration extends Command
*/ */
public function handle() public function handle()
{ {
// $url = config('api.adw').'/employees?page=1'; $url = config('api.adw').'/employees?page=1';
// echo "Requesting to " . $url; echo "Requesting to " . $url;
$response = null; $response = MasterFunctionsHelper::curlReq($url);
if(!$response) if(!$response)
return; return;

42
app/Helpers/MasterFunctionsHelper.php

@ -189,13 +189,18 @@ class MasterFunctionsHelper
/* $interval = \DateInterval::createFromDateString('1 day'); */// should be using this but its bugged /* $interval = \DateInterval::createFromDateString('1 day'); */// should be using this but its bugged
$interval = new \DateInterval('P7D'); $interval = new \DateInterval('P7D');
} else { } else {
$maxDate = DB::table('assign_material_to_activity as ama') $actualMaxDate = DB::table('assign_material_to_activity as ama')
->where("ama.proyek_id", $keyGantt['proyek_id']) ->where("ama.proyek_id", $keyGantt['proyek_id'])
->join('m_activity as a', 'a.id', '=', 'ama.activity_id') ->join('m_activity as a', 'a.id', '=', 'ama.activity_id')
->where('a.version_gantt_id', '=', $keyGantt['id']) ->where('a.version_gantt_id', '=', $keyGantt['id'])
->max("plan_date"); // plan date overlapped with assign_material_to_activity's, it should be m_activity's ->max("a.end_date"); // plan date overlapped with assign_material_to_activity's, it should be m_activity's
$end = new \DateTime($maxDate . ' Friday'); $plannedMaxDate = DB::table('assign_material_to_activity as ama')
$end->modify('next Friday'); ->where("ama.proyek_id", $keyGantt['proyek_id'])
->join('m_activity as a', 'a.id', '=', 'ama.activity_id')
->where('a.version_gantt_id', '=', $keyGantt['id'])
->max("a.planned_end"); // plan date overlapped with assign_material_to_activity's, it should be m_activity'
$maxDate = max(new \DateTime($plannedMaxDate), new \DateTime($actualMaxDate));
$end = new \DateTime($maxDate->format('Y-m-d') . ' Friday');
$end->modify('next Friday'); $end->modify('next Friday');
$interval = new \DateInterval('P7D'); $interval = new \DateInterval('P7D');
} }
@ -422,6 +427,8 @@ class MasterFunctionsHelper
$potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN"; $potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN";
} }
$lastReal = $tempPercentageReal[count($tempPercentageReal) - 1];
$totalBCWP = $lastReal * $dataProject->rencana_biaya / 100;
$dataResponse = array( $dataResponse = array(
"date" => $tempDate, "date" => $tempDate,
"percentage" => $tempPercentage, "percentage" => $tempPercentage,
@ -600,6 +607,12 @@ class MasterFunctionsHelper
->where('activity_id', '=', $keyActualM->activity_id) ->where('activity_id', '=', $keyActualM->activity_id)
->groupBy('activity_id') ->groupBy('activity_id')
->first(); ->first();
if (!isset($sumVolActual)) {
$sumVolActual = (object) [
'activity_id' => $keyActualM->activity_id,
'ttl_qty_plan' => "0"
];
}
$sumReportActual = DB::table('report_activity_material') $sumReportActual = DB::table('report_activity_material')
->where('activity_id', $keyActualM->activity_id) ->where('activity_id', $keyActualM->activity_id)
->sum('qty'); ->sum('qty');
@ -619,18 +632,29 @@ class MasterFunctionsHelper
->where('activity_id', '=', $keyActualM->activity_id) ->where('activity_id', '=', $keyActualM->activity_id)
->orderBy('status_activity', 'ASC') ->orderBy('status_activity', 'ASC')
->first(); ->first();
$dataTempReport[$w]['percentage'] = ($keyActualM->qty / $sumVolActual->ttl_qty_plan) * $keyActualM->bobot_planning; if (!isset($checkStatusActivity)) {
$checkStatusActivity = (object) [
'activity_id' => $keyActualM->activity_id,
'status_activity' => 'open'
];
}
if ($sumVolActual->ttl_qty_plan == "0") {
$actual = 0;
} else {
$actual = $keyActualM->qty / $sumVolActual->ttl_qty_plan;
}
$dataTempReport[$w]['percentage'] = $actual * $keyActualM->bobot_planning;
// $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; // $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning;
// if($keyActualM->qty/$sumVolActual->ttl_qty_plan >= 1){ // if($keyActualM->qty/$sumVolActual->ttl_qty_plan >= 1){
if ($checkStatusActivity->status_activity == 'done') { if ($checkStatusActivity->status_activity == 'done') {
$sumPercentageActual += $keyActualM->bobot_planning / $reportCount; $sumPercentageActual += $keyActualM->bobot_planning / $reportCount;
// $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual;
} else { } else {
if ($keyActualM->qty / $sumVolActual->ttl_qty_plan >= 1 || (int) $sumVolActual->ttl_qty_plan == (int) $sumReportActual) { if ( $actual >= 1 || (int) $sumVolActual->ttl_qty_plan == (int) $sumReportActual) {
$sumPercentageActual += (($keyActualM->qty / $sumVolActual->ttl_qty_plan) * $keyActualM->bobot_planning) * (95 / 100); $sumPercentageActual += ($actual * $keyActualM->bobot_planning) * (95 / 100);
// $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual;
} else { } else {
$sumPercentageActual += ($keyActualM->qty / $sumVolActual->ttl_qty_plan) * $keyActualM->bobot_planning; $sumPercentageActual += $actual * $keyActualM->bobot_planning;
// $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual;
} }
} }
@ -698,6 +722,8 @@ class MasterFunctionsHelper
$potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN"; $potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN";
} }
$lastReal = $tempPercentageReal[count($tempPercentageReal) - 1];
$totalBCWP = $lastReal * $dataProject->rencana_biaya / 100;
$dataResponse = array( $dataResponse = array(
"date" => $tempDate, "date" => $tempDate,
"percentage" => $tempPercentage, "percentage" => $tempPercentage,

813
app/Http/Controllers/ActivityController.php

File diff suppressed because it is too large Load Diff

153
app/Http/Controllers/BroadcastController.php

@ -3,7 +3,160 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Models\Broadcast;
use App\Models\User;
use App\Services\FCMService;
class BroadcastController extends Controller class BroadcastController extends Controller
{ {
public function add(Request $request)
{
$data = $request->all();
$data['status_send'] = true;
$data['created_by'] = $this->currentName;
// dd($data);
$result = Broadcast::create($data);
if($result){
$this->sendNotification($data);
return response()->json(['status'=>'success','message'=>'add broadcast successfully!','code'=>200], 200);
}else{
return response()->json(['status'=>'failed','message'=>'add broadcast failed!','code'=>400], 400);
}
}
public function edit($id){
if(!$id || (int) $id < 0 || $id==""){
return response()->json(['status'=>'failed','message'=>'id is required!','code'=>400], 400);
die();
}
$result = Broadcast::find($id);
if($result){
return response()->json(['status'=>'success','code'=>200,'data'=>$result], 200);
}else{
return response()->json(['status'=>'failed','message'=>'failed get data broadcast, please try again later!','code'=>400], 400);
}
}
public function update(Request $request, $id)
{
if(!$id || (int) $id < 0 || $id==""){
return response()->json(['status'=>'failed','message'=>'id is required!','code'=>400], 400);
}
$data = Broadcast::find($id);
if($data){
$result = $data->update($request->all());
}else{
return response()->json(['status'=>'failed','message'=>'data broadcast not found!','code'=>400], 400);
die();
}
if($result){
return response()->json(['status'=>'success','message'=>'data broadcast successfully updated!','code'=>200], 200);
}else{
return response()->json(['status'=>'failed','message'=>'data broadcast failed updated!','code'=>400], 400);
}
}
public function delete($id)
{
$data = Broadcast::find($id);
if($data){
$delete = $data->delete();
}else{
return response()->json(['status'=>'failed','message'=>'data broadcast not found!','code'=>400], 400);
die();
}
if($delete){
return response()->json(['status'=>'success','message'=>'data broadcast successfully deleted!','code'=>200], 200);
}else{
return response()->json(['status'=>'failed','message'=>'data broadcast failed deleted!','code'=>400], 400);
}
}
public function search(Request $request)
{
$payload = $request->all();
$dataBuilder = $this->setUpPayload($payload, 'm_broadcast');
$builder = $dataBuilder['builder'];
$countBuilder = $dataBuilder['count'];
$dataGet = $builder->get();
$totalRecord = $countBuilder->count();
return response()->json(['status'=>'success','code'=>200,'data'=>$dataGet, 'totalRecord'=>$totalRecord], 200);
}
public function list()
{
$data = Broadcast::all();
$countData = $data->count();
if($data){
return response()->json(['status'=>'success','code'=>200,'data'=>$data, 'totalRecord'=>$countData], 200);
}else{
return response()->json(['status'=>'failed','message'=>'failed get list broadcast, please try again later!','code'=>400], 400);
}
}
public function sendNotification($data)
{
// send_to_type (all, roles, user)
if (isset($data['send_to_type'])) {
switch ($data['send_to_type']) {
case 'all':
$users = User::whereNotNull('fcm_token')->get();
if (isset($users)) {
foreach ($users as $user) {
FCMService::send(
$user->fcm_token,
[
'title' => $data['title_notif'],
'body' => $data['message_notif'],
]
);
}
}
break;
case 'roles':
$users = User::where("role_id", $data['send_to_id'])->whereNotNull('fcm_token')->get();
if (isset($users)) {
foreach ($users as $user) {
FCMService::send(
$user->fcm_token,
[
'title' => $data['title_notif'],
'body' => $data['message_notif'],
]
);
}
}
break;
case 'user':
$user = User::where("id", $data['send_to_id'])->whereNotNull('fcm_token')->first();
if (isset($user)) {
FCMService::send(
$user->fcm_token,
[
'title' => $data['title_notif'],
'body' => $data['message_notif'],
]
);
}
break;
default:
# code...
break;
}
}
}
} }

242
app/Http/Controllers/Controller.php

@ -1,27 +1,23 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Activity;
use App\Models\UserToProyek;
use App\Models\AssignMaterial;
use App\Models\ReportK3Detail;
use App\Models\UserToActivity;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Http;
use App\Models\UserToActivity;
use App\Models\Activity;
use App\Models\AssignMaterial;
use Laravel\Lumen\Routing\Controller as BaseController; use Laravel\Lumen\Routing\Controller as BaseController;
use App\Models\ReportK3Detail;
class Controller extends BaseController class Controller extends BaseController
{ {
protected $pathImage = "assets/image/"; protected $pathImage = "assets/image/";
protected $pathDocument = "assets/file/project/"; protected $pathDocument = "assets/file/project/";
protected $pathTmpImport = "assets/file/tmpimport/"; protected $pathTmpImport = "assets/file/tmpimport/";
protected $pathActivityDocument = "assets/file/activity/"; protected $pathActivityDocument = "assets/file/activity/";
protected $listJoinAll = [ protected $listJoinAll = ['first', 'second', 'third', 'fourth', 'fifth',
'first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth', 'tenth'];
'sixth', 'seventh', 'eighth', 'ninth', 'tenth'
];
protected $currentDate; protected $currentDate;
protected $currentName; protected $currentName;
protected $currentId; protected $currentId;
@ -40,34 +36,41 @@ class Controller extends BaseController
protected function setUpPayload($condition, $tableSelf) protected function setUpPayload($condition, $tableSelf)
{ {
$alias = "selfTable"; $alias = "selfTable";
$builder = DB::table($tableSelf . " AS " . $alias); $builder = DB::table($tableSelf." AS ".$alias);
$builder = $builder->select($alias . ".*"); // $builder = $builder->select($alias.".*");
if ($condition) { if($condition){
if (isset($condition['joins'])) { if(isset($condition['select'])){
foreach($condition['select'] as $select){
$builder = $builder->addSelect($alias.".".$select);
}
}else{
$builder = $builder->addSelect($alias.".*");
}
if(isset($condition['joins'])){
$selectColumn = []; $selectColumn = [];
$no = 0; $no = 0;
foreach ($condition['joins'] as $join) { foreach($condition['joins'] as $join){
$tableJoin = isset($join['name1']) ? $join['name1'] : $alias; $tableJoin = isset($join['name1']) ? $join['name1'] : $alias;
$tableName = $join['name']; $tableName = $join['name'];
$columnJoin = $join['column_join']; // foreign key table sini $columnJoin = $join['column_join']; // foreign key table sini
$columnSelf = isset($join['column_self']) ? $join['column_self'] : "id"; // primary key table lawan $columnSelf = isset($join['column_self']) ? $join['column_self'] : "id"; // primary key table lawan
$columnResult = $join['column_results']; $columnResult = $join['column_results'];
foreach ($columnResult as $sColumn) { foreach($columnResult as $sColumn){
$builder = $builder->addSelect($tableName . "." . $sColumn . " as join_" . $this->listJoinAll[$no] . "_" . $sColumn); $builder = $builder->addSelect($tableName.".".$sColumn." as join_".$this->listJoinAll[$no]."_".$sColumn);
} }
$builder = $builder->leftJoin($tableName, $tableJoin . "." . $columnJoin, '=', $tableName . '.' . $columnSelf); $builder = $builder->leftJoin($tableName, $tableJoin.".".$columnJoin, '=', $tableName.'.'.$columnSelf);
$no++; $no++;
} }
} }
if (isset($condition['columns'])) { if(isset($condition['columns'])){
$listWhere = $condition['columns']; $listWhere = $condition['columns'];
$builder = $builder->where(function ($query) use ($listWhere, $alias) { $builder = $builder->where(function ($query) use($listWhere, $alias){
foreach ($listWhere as $where) { foreach($listWhere as $where){
$value = $where['value']; $value = $where['value'];
if ($value && $value != "" && $value != " ") { if($value && $value!="" && $value!=" "){
$column = $where['name']; $column = $where['name'];
$operator = strtolower($where['logic_operator']); // like, =, <>, range $operator = strtolower($where['logic_operator']); // like, =, <>, range
$value2 = isset($where['value1']) ? $where['value1'] : ""; $value2 = isset($where['value1']) ? $where['value1'] : "";
@ -78,22 +81,22 @@ class Controller extends BaseController
}); });
} }
if (isset($condition['group_column'])) { if(isset($condition['group_column'])){
$builder = $this->groupWhere($builder, $condition['group_column'], $alias); $builder = $this->groupWhere($builder, $condition['group_column'], $alias);
} }
$data['count'] = clone $builder; $data['count'] = clone $builder;
if (isset($condition['paging'])) { if(isset($condition['paging'])){
$builder = $builder->offset($condition['paging']['start'])->limit($condition['paging']['length']); $builder = $builder->offset($condition['paging']['start'])->limit($condition['paging']['length']);
} }
if (isset($condition['orders'])) { if(isset($condition['orders'])){
$orders = $condition['orders']; $orders = $condition['orders'];
$sortBy = $orders['ascending'] ? "ASC" : "DESC"; $sortBy = $orders['ascending'] ? "ASC" : "DESC";
$columnOrder = $orders['columns']; $columnOrder = $orders['columns'];
foreach ($columnOrder as $column) { foreach($columnOrder as $column){
$builder = $builder->orderBy($alias . "." . $column, $sortBy); $builder = $builder->orderBy($alias.".".$column, $sortBy);
} }
} }
} }
@ -108,8 +111,8 @@ class Controller extends BaseController
$operator = $listGroupWhere['operator']; $operator = $listGroupWhere['operator'];
$operatorGroup = $listGroupWhere['group_operator']; $operatorGroup = $listGroupWhere['group_operator'];
$listWhere = $listGroupWhere['where']; $listWhere = $listGroupWhere['where'];
if (strtolower($operator) == "and") { if(strtolower($operator)=="and"){
$builder = $builder->where(function ($query) use ($operatorGroup, $listWhere, $alias) { $builder = $builder->where(function($query) use($operatorGroup, $listWhere, $alias){
$no = 1; $no = 1;
foreach ($listWhere as $where) { foreach ($listWhere as $where) {
$value = $where['value']; $value = $where['value'];
@ -117,22 +120,22 @@ class Controller extends BaseController
$operator = strtolower($where['logic_operator']); $operator = strtolower($where['logic_operator']);
$value2 = isset($where['value1']) ? $where['value1'] : ""; $value2 = isset($where['value1']) ? $where['value1'] : "";
$tableColumn = isset($where['table_name']) ? $where['table_name'] : $alias; $tableColumn = isset($where['table_name']) ? $where['table_name'] : $alias;
if ($value && $value != "" && $value != " ") { if($value && $value!="" && $value!=" "){
if ($operatorGroup == "and") { if($operatorGroup=="and"){
$query = $this->whereCondition($query, $operator, $tableColumn, $column, $value, $value2); $query = $this->whereCondition($query, $operator, $tableColumn, $column, $value, $value2);
} else { }else{
if ($no == 1) { if($no==1){
$query = $this->whereCondition($query, $operator, $tableColumn, $column, $value, $value2); $query = $this->whereCondition($query, $operator, $tableColumn, $column, $value, $value2);
} else { }else{
$query = $this->orWhereCondition($query, $operator, $tableColumn, $column, $value, $value2); $query = $this->orWhereCondition($query, $operator, $tableColumn, $column, $value, $value2);
} }
} }
} }
$no = $no + 1; $no = $no+1;
} }
}); });
} else if (strtolower($operator) == "or") { }else if(strtolower($operator)=="or"){
$builder = $builder->orWhere(function ($query) use ($operatorGroup, $listWhere, $alias) { $builder = $builder->orWhere(function($query) use($operatorGroup, $listWhere, $alias){
$no = 1; $no = 1;
foreach ($listWhere as $where) { foreach ($listWhere as $where) {
$value = $where['value']; $value = $where['value'];
@ -140,13 +143,13 @@ class Controller extends BaseController
$operator = strtolower($where['logic_operator']); $operator = strtolower($where['logic_operator']);
$value2 = isset($where['value1']) ? $where['value1'] : ""; $value2 = isset($where['value1']) ? $where['value1'] : "";
$tableColumn = isset($where['table_name']) ? $where['table_name'] : $alias; $tableColumn = isset($where['table_name']) ? $where['table_name'] : $alias;
if ($value && $value != "" && $value != " ") { if($value && $value!="" && $value!=" "){
if ($operatorGroup == "and") { if($operatorGroup=="and"){
$query = $this->whereCondition($query, $operator, $tableColumn, $column, $value, $value2); $query = $this->whereCondition($query, $operator, $tableColumn, $column, $value, $value2);
} else { }else{
if ($no == 1) { if($no==1){
$query = $this->whereCondition($query, $operator, $tableColumn, $column, $value, $value2); $query = $this->whereCondition($query, $operator, $tableColumn, $column, $value, $value2);
} else { }else{
$query = $this->orWhereCondition($query, $operator, $tableColumn, $column, $value, $value2); $query = $this->orWhereCondition($query, $operator, $tableColumn, $column, $value, $value2);
} }
} }
@ -161,40 +164,39 @@ class Controller extends BaseController
private function whereCondition($oldQuery, $operator, $tableColumn, $column, $value, $value2) private function whereCondition($oldQuery, $operator, $tableColumn, $column, $value, $value2)
{ {
$query = $oldQuery; $query = $oldQuery;
if ($operator == "range") { if($operator=="range"){
$query = $query->whereBetween($tableColumn . "." . $column, [$value, $value2]); $query = $query->whereBetween($tableColumn.".".$column, [$value, $value2]);
} else if ($operator == "like") { }else if($operator=="like"){
$query = $query->where($tableColumn . "." . $column, 'like', '%' . $value . '%'); $query = $query->where($tableColumn.".".$column, 'like', '%'.$value.'%');
} else if ($operator == "ilike") { }else if($operator=="ilike"){
$query = $query->where($tableColumn . "." . $column, '~*', $value); $query = $query->where($tableColumn.".".$column, '~*', $value);
} else if ($operator == "=") { }else if($operator=="="){
$query = $query->where($tableColumn . "." . $column, $value); $query = $query->where($tableColumn.".".$column, $value);
} else if ($operator == "in") { }else if($operator=="in"){
$query = $query->whereIn($tableColumn . "." . $column, $value); $query = $query->whereIn($tableColumn.".".$column, $value);
} else if ($operator == "notin") { }else if($operator=="notin"){
$query = $query->whereNotIn($tableColumn . "." . $column, $value); $query = $query->whereNotIn($tableColumn.".".$column, $value);
} else { }else{
$query = $query->where($tableColumn . "." . $column, $operator, $value); $query = $query->where($tableColumn.".".$column, $operator, $value);
} }
return $query; return $query;
} }
private function whereConditionSingleTable($oldQuery, $operator, $column, $value, $value2) private function whereConditionSingleTable($oldQuery, $operator, $column, $value, $value2){
{
$query = $oldQuery; $query = $oldQuery;
if ($operator == "range") { if($operator=="range"){
$query = $query->whereBetween($column, [$value, $value2]); $query = $query->whereBetween($column, [$value, $value2]);
} else if ($operator == "like") { }else if($operator=="like"){
$query = $query->where($column, 'like', '%' . $value . '%'); $query = $query->where($column, 'like', '%'.$value.'%');
} else if ($operator == "ilike") { }else if($operator=="ilike"){
$query = $query->where($column, '~*', $value); $query = $query->where($column, '~*', $value);
} else if ($operator == "=") { }else if($operator=="="){
$query = $query->where($column, $value); $query = $query->where($column, $value);
} else if ($operator == "in") { }else if($operator=="in"){
$query = $query->whereIn($column, $value); $query = $query->whereIn($column, $value);
} else if ($operator == "notin") { }else if($operator=="notin"){
$query = $query->whereNotIn($column, $value); $query = $query->whereNotIn($column, $value);
} else { }else{
$query = $query->where($column, $operator, $value); $query = $query->where($column, $operator, $value);
} }
return $query; return $query;
@ -203,26 +205,25 @@ class Controller extends BaseController
private function orWhereCondition($oldQuery, $operator, $tableColumn, $column, $value, $value2) private function orWhereCondition($oldQuery, $operator, $tableColumn, $column, $value, $value2)
{ {
$query = $oldQuery; $query = $oldQuery;
if ($operator == "range") { if($operator=="range"){
$query = $query->orWhereBetween($tableColumn . "." . $column, [$value, $value2]); $query = $query->orWhereBetween($tableColumn.".".$column, [$value, $value2]);
} else if ($operator == "like") { }else if($operator=="like"){
$query = $query->orWhere($tableColumn . "." . $column, 'like', '%' . $value . '%'); $query = $query->orWhere($tableColumn.".".$column, 'like', '%'.$value.'%');
} else if ($operator == "ilike") { }else if($operator=="ilike"){
$query = $query->where($tableColumn . "." . $column, '~*', $value); $query = $query->where($tableColumn.".".$column, '~*', $value);
} else if ($operator == "=") { }else if($operator=="="){
$query = $query->orWhere($tableColumn . "." . $column, $value); $query = $query->orWhere($tableColumn.".".$column, $value);
} else if ($operator == "in") { }else if($operator=="in"){
$query = $query->orWhereIn($tableColumn . "." . $column, $value); $query = $query->orWhereIn($tableColumn.".".$column, $value);
} else if ($operator == "notin") { }else if($operator=="notin"){
$query = $query->orWhereNotIn($tableColumn . "." . $column, $value); $query = $query->orWhereNotIn($tableColumn.".".$column, $value);
} else { }else{
$query = $query->orWhere($tableColumn . "." . $column, $operator, $value); $query = $query->orWhere($tableColumn.".".$column, $operator, $value);
} }
return $query; return $query;
} }
protected function calculateAllCost($activity_id, $proyek_id) protected function calculateAllCost($activity_id, $proyek_id){
{
$humanCostPlanning = $this->calculateAllHumanCost($activity_id, $proyek_id); $humanCostPlanning = $this->calculateAllHumanCost($activity_id, $proyek_id);
$materialCostPlanning = $this->calculateMaterialCost($activity_id, $proyek_id); $materialCostPlanning = $this->calculateMaterialCost($activity_id, $proyek_id);
$toolsCostPlanning = 0; $toolsCostPlanning = 0;
@ -233,11 +234,11 @@ class Controller extends BaseController
private function calculateAllHumanCost($activity_id, $proyek_id) private function calculateAllHumanCost($activity_id, $proyek_id)
{ {
$dataHuman = UserToActivity::select("ahp.standart_rate as standart_rate", "ahp.max_used as max_used", "ahp.cost_per_used as cost_per_used", "ahp.uom_standart_rate as uom_standart_rate") $dataHuman = UserToActivity::select("ahp.standart_rate as standart_rate","ahp.max_used as max_used", "ahp.cost_per_used as cost_per_used", "ahp.uom_standart_rate as uom_standart_rate")
->leftJoin("assign_hr_to_proyek as ahp", "assign_hr_to_activity.user_id", "=", "ahp.user_id") ->leftJoin("assign_hr_to_proyek as ahp", "assign_hr_to_activity.user_id", "=", "ahp.user_id")
->where("assign_hr_to_activity.activity_id", $activity_id)->where("assign_hr_to_activity.proyek_id", $proyek_id) ->where("assign_hr_to_activity.activity_id", $activity_id)->where("assign_hr_to_activity.proyek_id", $proyek_id)
->where("ahp.proyek_id", $proyek_id) ->where("ahp.proyek_id", $proyek_id)
->get(); ->get();
$totalCost = 0; $totalCost = 0;
foreach ($dataHuman as $human) { foreach ($dataHuman as $human) {
@ -252,61 +253,58 @@ class Controller extends BaseController
$activity = Activity::find($activity_id); $activity = Activity::find($activity_id);
$duration = $activity->duration; $duration = $activity->duration;
$standarRate = $human->standart_rate; $standarRate = $human->standart_rate;
$maxUsed = $human->max_used / 100; $maxUsed = $human->max_used/100;
if ($human->uom_standart_rate == "Hour") { if ($human->uom_standart_rate == "Hour") {
$totalCost = ($standarRate * 8 * $duration) * $maxUsed; $totalCost = ($standarRate*8*$duration)*$maxUsed;
return $totalCost; return $totalCost;
} }
$totalCost = ($standarRate * $duration) * $maxUsed; $totalCost = ($standarRate*$duration)*$maxUsed;
return $totalCost; return $totalCost;
} }
private function calculateMaterialCost($activity_id, $proyek_id) private function calculateMaterialCost($activity_id, $proyek_id)
{ {
$totalCost = AssignMaterial::selectRaw("COALESCE(qty_planning,0)*COALESCE(budget,0) as totalCost") $totalCost = AssignMaterial::selectRaw("COALESCE(qty_planning,0)*COALESCE(budget,0) as totalCost")
->where("proyek_id", $proyek_id) ->where("proyek_id", $proyek_id)
->where("activity_id", $activity_id) ->where("activity_id", $activity_id)
->sum(AssignMaterial::raw("COALESCE(qty_planning, 0) * COALESCE(budget, 0)")); ->sum(AssignMaterial::raw("COALESCE(qty_planning, 0) * COALESCE(budget, 0)"));
return $totalCost; return $totalCost;
} }
protected function getLoc($lat, $lng) protected function getLoc($lat, $lng){
{
// $response = Http::get(config('api.nominatim') . "/reverse?lat=".$lat."&lon=".$lng."&format=json"); // $response = Http::get(config('api.nominatim') . "/reverse?lat=".$lat."&lon=".$lng."&format=json");
// return $response->json; // return $response->json;
$url = config('api.nominatim') . "/reverse?lat=" . $lat . "&lon=" . $lng . "&format=json"; $url = config('api.nominatim') . "/reverse?lat=".$lat."&lon=".$lng."&format=json";
// $token = config('api.adw_token'); // $token = config('api.adw_token');
$response = $this->curlRequest($url); $response = $this->curlRequest($url);
return $response; return $response;
} }
private function curlRequest($url) private function curlRequest($url){
{ $ch = curl_init();
$ch = curl_init(); // $headers = [
// $headers = [ // 'Authorization: '.$token
// 'Authorization: '.$token // ];
// ]; curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_URL, $url); // curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
// curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch); $response = curl_exec($ch);
if ($response === false) if ($response === false)
$response = curl_error($ch); $response = curl_error($ch);
curl_close($ch); curl_close($ch);
return json_decode($response); return json_decode($response);
} }
protected function addDetailK3($dataDetail, $report_id) protected function addDetailK3($dataDetail, $report_id){
{
foreach ($dataDetail as $value) { foreach ($dataDetail as $value) {
$dataNew = array( $dataNew = array(
"report_k3_id" => $report_id, "report_k3_id"=>$report_id,
"checklist_k3_id" => $value['checklist_id'], "checklist_k3_id"=>$value['checklist_id'],
"name_checklist_k3" => $value['checklist_name'], "name_checklist_k3"=>$value['checklist_name'],
"created_by" => $this->currentName "created_by"=>$this->currentName
); );
ReportK3Detail::create($dataNew); ReportK3Detail::create($dataNew);

183
app/Http/Controllers/DashboardBoDController.php

@ -14,16 +14,18 @@ use Illuminate\Support\Facades\Log;
class DashboardBoDController extends Controller class DashboardBoDController extends Controller
{ {
private function interpolateYear($year){ private function interpolateYear($year)
if($year) {
$year = '%'.$year.'%'; if ($year)
$year = '%' . $year . '%';
return $year; return $year;
} }
private function curlReq($url, $token){ private function curlReq($url, $token)
{
$ch = curl_init(); $ch = curl_init();
$headers = [ $headers = [
'Authorization: '.$token 'Authorization: ' . $token
]; ];
curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
@ -37,45 +39,47 @@ class DashboardBoDController extends Controller
return json_decode($response); return json_decode($response);
} }
private function getInvoiceIntegration($search) { private function getInvoiceIntegration($search)
// if(empty($search)) {
// return response()->json(['status'=>'error', 'message'=>'Empty query string!'], 400); if(empty($search))
// return response()->json(['status'=>'error', 'message'=>'Empty query string!'], 400);
// $url = str_replace("SEARCH", $search, config('api.adw').'/project_cost?project_no=SEARCH');
// $token = config('api.adw_token'); $url = str_replace("SEARCH", $search, config('api.adw').'/project_cost?project_no=SEARCH');
// $response = $this->curlReq($url, $token); $token = config('api.adw_token');
// $response = $this->curlReq($url, $token);
// if(@$response->data->project_no == "")
// return null; if(@$response->data->project_no == "")
// return null;
return null;
return $response;
} }
// to do // to do
public function getCompanyCashFlow($year = '%') { public function getCompanyCashFlow($year = '%')
{
$year = $this->interpolateYear($year); $year = $this->interpolateYear($year);
$totalExpenditure = $totalInvoice = $totalPaidInvoice = 0; $totalExpenditure = $totalInvoice = $totalPaidInvoice = 0;
// we can't use eloquent's sum() method because someone decided to use varchar as datatype in rencana_biaya field // we can't use eloquent's sum() method because someone decided to use varchar as datatype in rencana_biaya field
$totalBudgets = Project::select(DB::raw('SUM(CAST("rencana_biaya" AS DOUBLE PRECISION))')) $totalBudgets = Project::select(DB::raw('SUM(CAST("rencana_biaya" AS DOUBLE PRECISION))'))
->where('mulai_proyek', 'like', $year) ->where('mulai_proyek', 'like', $year)
/* ->orWhere('akhir_proyek', 'like', $year) */ /* ->orWhere('akhir_proyek', 'like', $year) */
->pluck('sum') ->pluck('sum')
->first(); ->first();
$projects = Project::where('mulai_proyek', 'like', $year) $projects = Project::where('mulai_proyek', 'like', $year)
/* ->orWhere('akhir_proyek', 'like', $year) */ /* ->orWhere('akhir_proyek', 'like', $year) */
->get(); ->get();
foreach($projects as $project){ foreach ($projects as $project) {
$project->expenses = 0; $project->expenses = 0;
$resp = null; $resp = null;
if($project->kode_sortname != ""){ if ($project->kode_sortname != "") {
$resp = $this->getInvoiceIntegration($project->kode_sortname); $resp = $this->getInvoiceIntegration($project->kode_sortname);
/* $resp = $project->kode_sortname; */ /* $resp = $project->kode_sortname; */
$cost = $resp->data->total_cost ?? 0; $cost = $resp->data->total_cost ?? 0;
$cost = substr($cost, 0, strpos($cost, ".")); $cost = substr($cost, 0, strpos($cost, "."));
$totalExpenditure+= (int) $cost; $totalExpenditure += (int) $cost;
$totalInvoice += $resp->data->total_invoice_amount ?? 0; $totalInvoice += $resp->data->total_invoice_amount ?? 0;
$totalPaidInvoice += $resp->data->total_invoice_paid_amount ?? 0; $totalPaidInvoice += $resp->data->total_invoice_paid_amount ?? 0;
} }
@ -87,20 +91,21 @@ class DashboardBoDController extends Controller
'total_budget' => (int) $totalBudgets ?? 0, 'total_budget' => (int) $totalBudgets ?? 0,
'total_expenditure' => $totalExpenditure, 'total_expenditure' => $totalExpenditure,
'total_invoice' => $totalInvoice, 'total_invoice' => $totalInvoice,
'total_paid_invoice' => $totalPaidInvoice , 'total_paid_invoice' => $totalPaidInvoice,
] ]
], 200); ], 200);
} }
public function getInvoiceOutstanding($year = '%'){ public function getInvoiceOutstanding($year = '%')
{
$year = $this->interpolateYear($year); $year = $this->interpolateYear($year);
$projects = Project::where('mulai_proyek', 'like', $year) $projects = Project::where('mulai_proyek', 'like', $year)
/* ->orWhere('akhir_proyek', 'like', $year) */ /* ->orWhere('akhir_proyek', 'like', $year) */
->get(); ->get();
$return = []; $return = [];
foreach($projects as $project){ foreach ($projects as $project) {
$resp = null; $resp = null;
if($project->kode_sortname != ""){ if ($project->kode_sortname != "") {
$resp = $this->getInvoiceIntegration($project->kode_sortname); $resp = $this->getInvoiceIntegration($project->kode_sortname);
array_push($return, [ array_push($return, [
'project' => $project->nama, 'project' => $project->nama,
@ -117,7 +122,8 @@ class DashboardBoDController extends Controller
], 200); ], 200);
} }
public function getTotalProjectPerScheduleHealth($year = '%'){ public function getTotalProjectPerScheduleHealth($year = '%')
{
$year = $this->interpolateYear($year); $year = $this->interpolateYear($year);
$return = [ $return = [
@ -127,48 +133,49 @@ class DashboardBoDController extends Controller
]; ];
$projects = Project::where('mulai_proyek', 'like', $year)->get(); $projects = Project::where('mulai_proyek', 'like', $year)->get();
foreach($projects as $project) { foreach ($projects as $project) {
$project->scurve = MasterFunctionsHelper::getSCurve($project->id); $project->scurve = MasterFunctionsHelper::getSCurve($project->id);
$selisihProgress = 0; $selisihProgress = 0;
if($project->scurve && $project->scurve[0]){ if ($project->scurve && $project->scurve[0]) {
$planningArray = $project->scurve[0]['data']['percentagePlan']; $planningArray = $project->scurve[0]['data']['percentagePlan'];
$actualArray = $project->scurve[0]['data']['percentageReal']; $actualArray = $project->scurve[0]['data']['percentageReal'];
$planningProgress = !empty($planningArray) ? $planningArray[count($planningArray) - 1] : 0; $planningProgress = !empty($planningArray) ? $planningArray[count($planningArray) - 1] : 0;
$actualProgress = !empty($actualArray) ? $actualArray[count($actualArray) - 1] : 0; $actualProgress = !empty($actualArray) ? $actualArray[count($actualArray) - 1] : 0;
} }
$selisihProgress = $planningProgress - $actualProgress; $selisihProgress = $planningProgress - $actualProgress;
try { try {
if($selisihProgress > 0 && $selisihProgress <= 5) if ($selisihProgress > 0 && $selisihProgress <= 5)
$return['warning'] += 1; $return['warning'] += 1;
elseif($selisihProgress == 0) elseif ($selisihProgress == 0)
$return['on-schedule'] += 1; $return['on-schedule'] += 1;
else else
$return['behind-schedule'] += 1; $return['behind-schedule'] += 1;
} catch (\Error $e) { } catch (\Error $e) {
return response()->json(['msg' => $e->getMessage(), 'data' => $project], 200); return response()->json(['msg' => $e->getMessage(), 'data' => $project], 200);
} }
} }
return response()->json(['data' => $return, 'q' => $projects], 200); return response()->json(['data' => $return, 'q' => $projects], 200);
} }
public function getTotalProjectScheduleHealthPerDivision($year = '%'){ public function getTotalProjectScheduleHealthPerDivision($year = '%')
{
$year = $this->interpolateYear($year); $year = $this->interpolateYear($year);
$divisions = Divisi::whereNull('parent')->get(); $divisions = Divisi::whereNull('parent')->get();
foreach($divisions as $division){ foreach ($divisions as $division) {
$scheduleData = new Collection(); $scheduleData = new Collection();
$behindSchedule = $warning = $onSchedule = 0; $behindSchedule = $warning = $onSchedule = 0;
$projects = Project::where('mulai_proyek', 'like', $year)->where('divisi_id', $division->id)->get(); $projects = Project::where('mulai_proyek', 'like', $year)->where('divisi_id', $division->id)->get();
foreach($projects as $project) { foreach ($projects as $project) {
$project->scurve = MasterFunctionsHelper::getSCurve($project->id); $project->scurve = MasterFunctionsHelper::getSCurve($project->id);
if(@$project->scurve['difference'] > 0 && @$project->scurve['difference'] <= 5) if (@$project->scurve['difference'] > 0 && @$project->scurve['difference'] <= 5)
$warning++; $warning++;
elseif(@$project->scurve['difference'] > 5 && @$project->scurve['difference'] <= 100) elseif (@$project->scurve['difference'] > 5 && @$project->scurve['difference'] <= 100)
$behindSchedule++; $behindSchedule++;
elseif(@$project->scurve['difference'] == 0) elseif (@$project->scurve['difference'] == 0)
$onSchedule++; $onSchedule++;
} }
@ -184,7 +191,8 @@ class DashboardBoDController extends Controller
], 200); ], 200);
} }
public function getTotalProjectPerBudgetHealth($year = '%'){ public function getTotalProjectPerBudgetHealth($year = '%')
{
$year = $this->interpolateYear($year); $year = $this->interpolateYear($year);
return response()->json([ return response()->json([
'data' => [ 'data' => [
@ -195,28 +203,30 @@ class DashboardBoDController extends Controller
], 200); ], 200);
} }
private function countTotalProjectByBudgetHealthInDivision($divisi, $year, $health){ private function countTotalProjectByBudgetHealthInDivision($divisi, $year, $health)
{
return Project::where('divisi_id', $divisi) return Project::where('divisi_id', $divisi)
->where('mulai_proyek', 'like', $year) ->where('mulai_proyek', 'like', $year)
/* ->orWhere('akhir_proyek', 'like', $year) */ /* ->orWhere('akhir_proyek', 'like', $year) */
->where('budget_health', $health) ->where('budget_health', $health)
->count(); ->count();
} }
public function getTotalProjectBudgetHealthPerDivision($year = '%'){ public function getTotalProjectBudgetHealthPerDivision($year = '%')
{
$year = $this->interpolateYear($year); $year = $this->interpolateYear($year);
$divisions = Divisi::select('id','name') $divisions = Divisi::select('id', 'name')
->with('children') ->with('children')
->whereNull('parent') ->whereNull('parent')
->get(); ->get();
// to do : count in more than 1 level child // to do : count in more than 1 level child
foreach($divisions as $division){ foreach ($divisions as $division) {
$budgetData = new Collection(); $budgetData = new Collection();
$budgetData->prepend($this->countTotalProjectByBudgetHealthInDivision($division->id, $year, 'overrun'), 'overrun'); $budgetData->prepend($this->countTotalProjectByBudgetHealthInDivision($division->id, $year, 'overrun'), 'overrun');
$budgetData->prepend($this->countTotalProjectByBudgetHealthInDivision($division->id, $year, 'warning'), 'warning'); $budgetData->prepend($this->countTotalProjectByBudgetHealthInDivision($division->id, $year, 'warning'), 'warning');
$budgetData->prepend($this->countTotalProjectByBudgetHealthInDivision($division->id, $year, 'on-budget'), 'on-budget'); $budgetData->prepend($this->countTotalProjectByBudgetHealthInDivision($division->id, $year, 'on-budget'), 'on-budget');
foreach($division->children as $d){ foreach ($division->children as $d) {
$budgetData['overrun'] += $this->countTotalProjectByBudgetHealthInDivision($d->id, $year, 'overrun'); $budgetData['overrun'] += $this->countTotalProjectByBudgetHealthInDivision($d->id, $year, 'overrun');
$budgetData['warning'] += $this->countTotalProjectByBudgetHealthInDivision($d->id, $year, 'warning'); $budgetData['warning'] += $this->countTotalProjectByBudgetHealthInDivision($d->id, $year, 'warning');
$budgetData['on-budget'] += $this->countTotalProjectByBudgetHealthInDivision($d->id, $year, 'on-budget'); $budgetData['on-budget'] += $this->countTotalProjectByBudgetHealthInDivision($d->id, $year, 'on-budget');
@ -224,7 +234,7 @@ class DashboardBoDController extends Controller
unset($division->children); unset($division->children);
$division->budgetData = $budgetData; $division->budgetData = $budgetData;
} }
foreach($divisions as $division){ foreach ($divisions as $division) {
} }
return response()->json([ return response()->json([
'data' => [ 'data' => [
@ -233,14 +243,15 @@ class DashboardBoDController extends Controller
], 200); ], 200);
} }
public function getTotalProjectPerPhase($year = '%'){ public function getTotalProjectPerPhase($year = '%')
{
$year = $this->interpolateYear($year); $year = $this->interpolateYear($year);
$projectPhases = ProjectPhase::orderBy('order')->get(); $projectPhases = ProjectPhase::orderBy('order')->get();
foreach($projectPhases as $phase){ foreach ($projectPhases as $phase) {
$phase->totalProject = Project::where('phase_id', $phase->id) $phase->totalProject = Project::where('phase_id', $phase->id)
->where('mulai_proyek', 'like', $year) ->where('mulai_proyek', 'like', $year)
/* ->orWhere('akhir_proyek', 'like', $year) */ /* ->orWhere('akhir_proyek', 'like', $year) */
->count(); ->count();
} }
return response()->json([ return response()->json([
'data' => [ 'data' => [
@ -249,24 +260,26 @@ class DashboardBoDController extends Controller
], 200); ], 200);
} }
private function countTotalProjectInDivision($id, $year){ private function countTotalProjectInDivision($id, $year)
{
return Project::where('divisi_id', $id) return Project::where('divisi_id', $id)
->where('mulai_proyek', 'like', $year) ->where('mulai_proyek', 'like', $year)
->count(); ->count();
} }
public function getTotalProjectPerDivision($year = '%') { public function getTotalProjectPerDivision($year = '%')
{
$year = $this->interpolateYear($year); $year = $this->interpolateYear($year);
$divisions = Divisi::select('id','name') $divisions = Divisi::select('id', 'name')
->with('children') ->with('children')
->whereNull('parent') ->whereNull('parent')
->get(); ->get();
// to do : count in more than 1 level child // to do : count in more than 1 level child
foreach($divisions as $v){ foreach ($divisions as $v) {
$v->total = $this->countTotalProjectInDivision($v->id, $year); $v->total = $this->countTotalProjectInDivision($v->id, $year);
foreach($v->children as $d){ foreach ($v->children as $d) {
$v->total += $this->countTotalProjectInDivision($d->id, $year); $v->total += $this->countTotalProjectInDivision($d->id, $year);
} }
unset($v->children); unset($v->children);
@ -277,27 +290,29 @@ class DashboardBoDController extends Controller
], 200); ], 200);
} }
private function countTotalProjectValueInDivision($id, $year){ private function countTotalProjectValueInDivision($id, $year)
{
return Project::select(DB::raw('SUM(CAST("rencana_biaya" AS DOUBLE PRECISION))')) return Project::select(DB::raw('SUM(CAST("rencana_biaya" AS DOUBLE PRECISION))'))
->where('mulai_proyek', 'like', $year) ->where('mulai_proyek', 'like', $year)
/* ->orWhere('akhir_proyek', 'like', $year) */ /* ->orWhere('akhir_proyek', 'like', $year) */
->where('divisi_id', $id) ->where('divisi_id', $id)
->pluck('sum') ->pluck('sum')
->first(); ->first();
} }
public function getTotalProjectValuePerDivision($year = '%') { public function getTotalProjectValuePerDivision($year = '%')
{
$year = $this->interpolateYear($year); $year = $this->interpolateYear($year);
$divisions = Divisi::select('id','name') $divisions = Divisi::select('id', 'name')
->with('children') ->with('children')
->whereNull('parent') ->whereNull('parent')
->get(); ->get();
// to do : count in more than 1 level child // to do : count in more than 1 level child
foreach($divisions as $v){ foreach ($divisions as $v) {
$v->total = $this->countTotalProjectValueInDivision($v->id, $year); $v->total = $this->countTotalProjectValueInDivision($v->id, $year);
foreach($v->children as $d){ foreach ($v->children as $d) {
$v->total += $this->countTotalProjectValueInDivision($d->id, $year); $v->total += $this->countTotalProjectValueInDivision($d->id, $year);
} }
unset($v->children); unset($v->children);
@ -309,16 +324,17 @@ class DashboardBoDController extends Controller
} }
public function getDetailExpenditure($year = '%'){ public function getDetailExpenditure($year = '%')
{
$year = $this->interpolateYear($year); $year = $this->interpolateYear($year);
$projects = Project::where('mulai_proyek', 'like', $year) $projects = Project::where('mulai_proyek', 'like', $year)
/* ->orWhere('akhir_proyek', 'like', $year) */ /* ->orWhere('akhir_proyek', 'like', $year) */
->orderBy('id', 'desc') ->orderBy('id', 'desc')
->get(); ->get();
foreach($projects as $project){ foreach ($projects as $project) {
$lastGantt = MasterFunctionsHelper::getLatestGantt($project->id); $lastGantt = MasterFunctionsHelper::getLatestGantt($project->id);
if($project->kode_sortname != ""){ if ($project->kode_sortname != "") {
$resp = $this->getInvoiceIntegration($project->kode_sortname); $resp = $this->getInvoiceIntegration($project->kode_sortname);
$project->invoice = [ $project->invoice = [
'invoiced' => $resp->data->total_invoice_amount ?? 0, 'invoiced' => $resp->data->total_invoice_amount ?? 0,
@ -328,12 +344,12 @@ class DashboardBoDController extends Controller
$project->pm = User::find($project->pm_id); $project->pm = User::find($project->pm_id);
/* $project->header = Activity::where('proyek_id', $project->id)->where('version_gantt_id', $lastGantt['last_gantt_id'])->whereNull('parent_id')->first(); */ /* $project->header = Activity::where('proyek_id', $project->id)->where('version_gantt_id', $lastGantt['last_gantt_id'])->whereNull('parent_id')->first(); */
if(!isset($lastGantt['last_gantt_id'])){ if (!isset($lastGantt['last_gantt_id'])) {
$project->manPowers = 0; $project->manPowers = 0;
} else { } else {
$project->manPowers = UserToVersionGantt::where('version_gantt_id', $lastGantt['last_gantt_id'])->count(); $project->manPowers = UserToVersionGantt::where('version_gantt_id', $lastGantt['last_gantt_id'])->count();
$project->scurve = MasterFunctionsHelper::getSCurve($project->id); $project->scurve = MasterFunctionsHelper::getSCurve($project->id);
} }
$project->lastGanttId = MasterFunctionsHelper::getLatestGantt($project->id); $project->lastGanttId = MasterFunctionsHelper::getLatestGantt($project->id);
} }
@ -343,4 +359,3 @@ class DashboardBoDController extends Controller
], 200); ], 200);
} }
} }

27
app/Http/Controllers/HumanResourceController.php

@ -112,7 +112,7 @@ class HumanResourceController extends Controller
public function list() public function list()
{ {
$data = HumanResource::all(); $data = HumanResource::select('id', 'name')->get();
$countData = $data->count(); $countData = $data->count();
if($data){ if($data){
@ -138,11 +138,26 @@ class HumanResourceController extends Controller
} }
} }
if($search && !empty($search)){ if ($search && !empty($search)) {
$data = UserToProyek::select("m_users.id as id", "m_users.name as name", "assign_hr_to_proyek.project_role as proyek_role")->join('m_users', 'm_users.id', '=', 'assign_hr_to_proyek.user_id') $data = UserToProyek::select("m_users.id as id", "m_users.name as name", "assign_hr_to_proyek.project_role as proyek_role")
->where("assign_hr_to_proyek.proyek_id", $idProyek)->where("m_users.name", 'like', '%'.$search.'%')->whereNotIn("m_users.id", $forbidden)->get(); ->join('m_users', 'm_users.id', '=', 'assign_hr_to_proyek.user_id')
}else{ ->where("assign_hr_to_proyek.proyek_id", $idProyek)
$data = UserToProyek::select("m_users.id as id", "m_users.name as name", "assign_hr_to_proyek.project_role as proyek_role")->where("assign_hr_to_proyek.proyek_id", $idProyek)->join('m_users', 'm_users.id', '=', 'assign_hr_to_proyek.user_id')->whereNotIn("m_users.id", $forbidden)->get(); ->where(function ($query) {
$query->where("assign_hr_to_proyek.is_customer", "!=", true)
->orWhereNull("assign_hr_to_proyek.is_customer");
})
->where("m_users.name", 'like', '%' . $search . '%')
->whereNotIn("m_users.id", $forbidden)->get();
} else {
$data = UserToProyek::select("m_users.id as id", "m_users.name as name", "assign_hr_to_proyek.project_role as proyek_role")
->where("assign_hr_to_proyek.proyek_id", $idProyek)
->where(function ($query) {
$query->where("assign_hr_to_proyek.is_customer", "!=", true)
->orWhereNull("assign_hr_to_proyek.is_customer");
})
->join('m_users', 'm_users.id', '=', 'assign_hr_to_proyek.user_id')
->whereNotIn("m_users.id", $forbidden)
->get();
} }
return response()->json($data); return response()->json($data);

90
app/Http/Controllers/MapMonitoringController.php

@ -19,52 +19,58 @@ class MapMonitoringController extends Controller
$dateNow = Carbon::today()->addHour(7)->format('Y-m-d'); $dateNow = Carbon::today()->addHour(7)->format('Y-m-d');
// get distinct human assign project // get distinct human assign project
$hr_assign_project = DB::table('assign_hr_to_proyek') $hr_assign_project = DB::table('assign_hr_to_proyek')
->select('user_id') ->select('user_id')
->whereIn('proyek_id', $request->project_id) ->whereIn('proyek_id', $request->project_id)
->distinct() ->distinct()
->get(); ->get();
// get position hr in presensi // get position hr in presensi
$tmp = []; $tmp = [];
foreach($hr_assign_project as $key){ foreach ($hr_assign_project as $key) {
$presensi = DB::table('t_clock_in_out as tcio') $presensi = DB::table('t_clock_in_out as tcio')
->select('tcio.id as clock_in_out_id','mu.id as user_id', 'mu.name as fullname', 'tcio.clock_in', 'tcio.clock_out', 'tcio.clock_in_lat', 'tcio.clock_in_lng', ->select(
'tcio.clock_out_lat', 'tcio.clock_out_lng', 'tcio.clock_in_loc', 'tcio.clock_out_loc', 'tcio.clock_in_boundary', 'tcio.id as clock_in_out_id',
'tcio.clock_out_boundary', 'mu.username', 'tcio.date_presence', 'tcio.created_at') 'mu.id as user_id',
->join('m_users as mu', 'mu.id', '=', 'tcio.user_id') 'mu.name as fullname',
->where('mu.id', $key->user_id) 'tcio.clock_in',
->orderBy('tcio.id', 'DESC') 'tcio.clock_out',
->first(); 'tcio.clock_in_lat',
$project = DB::table('assign_hr_to_proyek as ahtp') 'tcio.clock_in_lng',
->select('ahtp.proyek_id as id', 'mp.nama as project_name') 'tcio.clock_in_loc',
->join('m_proyek as mp', 'mp.id', '=', 'ahtp.proyek_id') 'tcio.clock_out_loc',
->whereIn('ahtp.proyek_id', $request->project_id) 'tcio.date_presence'
->where('ahtp.user_id', $key->user_id) )
->get(); ->join('m_users as mu', 'mu.id', '=', 'tcio.user_id')
if($presensi && isset($presensi->user_id)){ ->where('mu.id', $key->user_id)
->orderBy('tcio.clock_in', 'DESC')
->first();
$project = DB::table('assign_hr_to_proyek as ahtp')
->select('ahtp.proyek_id as id', 'mp.nama as project_name')
->join('m_proyek as mp', 'mp.id', '=', 'ahtp.proyek_id')
->whereIn('ahtp.proyek_id', $request->project_id)
->where('ahtp.user_id', $key->user_id)
->get();
if ($presensi && isset($presensi->user_id)) {
$image = DB::table('m_image')->select('image')->where('category', 'presensi')->where('ref_id', $presensi->clock_in_out_id)->first(); $image = DB::table('m_image')->select('image')->where('category', 'presensi')->where('ref_id', $presensi->clock_in_out_id)->first();
$waypoint = DB::table('m_waypoint')->select('lat', 'lon', 'wptime')->where('user_id', $presensi->user_id)->orderBy('wptime', 'DESC')->first();
$tmp[] = array( $tmp[] = array(
'user_id' => $presensi->user_id, 'user_id' => $presensi->user_id,
'clock_in' => $presensi->clock_in, 'wp_lat' => isset($waypoint) ? $waypoint->lat : $presensi->clock_in_lat,
'clock_out' => $presensi->clock_out, 'wp_lon' => isset($waypoint) ? $waypoint->lon : $presensi->clock_in_lng,
'date_presence' => $presensi->date_presence, 'wp_time' => isset($waypoint) ? $waypoint->wptime : $presensi->clock_in,
'clock_in_lat' => $presensi->clock_in_lat, 'clock_in' => $presensi->clock_in,
'clock_in_lng' => $presensi->clock_in_lng, 'clock_out' => $presensi->clock_out,
'clock_out_lat' => $presensi->clock_out_lat, 'clock_in_lat' => $presensi->clock_in_lat,
'clock_out_lng' => $presensi->clock_out_lng, 'clock_in_lng' => $presensi->clock_in_lng,
'clock_in_loc' => $presensi->clock_in_loc, 'clock_in_loc' => $presensi->clock_in_loc,
'clock_out_loc' => $presensi->clock_out_loc, 'clock_out_loc' => $presensi->clock_out_loc,
'clock_in_boundary' => $presensi->clock_in_boundary, 'name' => $presensi->fullname,
'clock_out_boundary' => $presensi->clock_out_boundary, 'image_selfie' => isset($image->image) ? $image->image : '-',
'username' => $presensi->username, 'presence_status' => $presensi->date_presence == $dateNow ? true : false, //true, //status date_presence,
'name' => $presensi->fullname, 'projects' => $project
'image_selfie' => isset($image->image) ? $image->image : '-',
'created_at' => $presensi->created_at,
'presence_status' => $presensi->date_presence == $dateNow ? true : false,//true, //status date_presence,
'projects' => $project
); );
} }
} }
return response()->json(['status'=>'success','code'=>200, 'data' => $tmp, 'totalRecord'=>count($tmp)], 200); return response()->json(['status' => 'success', 'code' => 200, 'data' => $tmp, 'totalRecord' => count($tmp)], 200);
} }
public function list() public function list()
@ -72,10 +78,10 @@ class MapMonitoringController extends Controller
$data = Presence::all(); $data = Presence::all();
$countData = $data->count(); $countData = $data->count();
if($data){ if ($data) {
return response()->json(['status'=>'success','code'=>200,'data'=>$data, 'totalRecord'=>$countData], 200); return response()->json(['status' => 'success', 'code' => 200, 'data' => $data, 'totalRecord' => $countData], 200);
}else{ } else {
return response()->json(['status'=>'failed','message'=>'failed get list presence, please try again later!','code'=>400], 400); return response()->json(['status' => 'failed', 'message' => 'failed get list presence, please try again later!', 'code' => 400], 400);
} }
} }

185
app/Http/Controllers/PresenceController.php

@ -2,6 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\HumanResource;
use Log; use Log;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Models\Presence; use App\Models\Presence;
@ -24,7 +25,10 @@ class PresenceController extends Controller
if(count($checkLocation) > 0 && $checkLocation[0]['boundary']){ if(count($checkLocation) > 0 && $checkLocation[0]['boundary']){
$statusBoundary = true; $statusBoundary = true;
} }
$statusRestriction = HumanResource::select('status_boundary')->where('id', $request->user_id)->first();
if ($statusRestriction->status_boundary) {
$statusBoundary = true;
}
// not assign // not assign
if(!$checkLocation[0]['status_assign'] && $checkLocation[0]['boundary'] == false){ if(!$checkLocation[0]['status_assign'] && $checkLocation[0]['boundary'] == false){
$data=array( $data=array(
@ -134,7 +138,10 @@ class PresenceController extends Controller
if(count($checkLocation) > 0 && $checkLocation[0]['boundary']){ if(count($checkLocation) > 0 && $checkLocation[0]['boundary']){
$statusBoundary = true; $statusBoundary = true;
} }
$statusRestriction = HumanResource::select('status_boundary')->where('id', $request->user_id)->first();
if ($statusRestriction->status_boundary) {
$statusBoundary = true;
}
// not assign // not assign
if(!$checkLocation[0]['status_assign'] && $checkLocation[0]['boundary'] == false){ if(!$checkLocation[0]['status_assign'] && $checkLocation[0]['boundary'] == false){
$data=array( $data=array(
@ -263,33 +270,169 @@ class PresenceController extends Controller
foreach($geom as $dataGeom){ foreach($geom as $dataGeom){
$valGeom = json_decode($dataGeom->geom); $valGeom = json_decode($dataGeom->geom);
if($params->clock_in_out['type']=="out"){ if($params->clock_in_out['type']=="out"){
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($valGeom->geometry)."'), if($valGeom->type == "FeatureCollection"){
$multiArea = $valGeom->features;
foreach($multiArea as $area){
if ($area->geometry->type === "Point") {
$pointCoordinates = $area->geometry->coordinates;
$pointLng = $pointCoordinates[0];
$pointLat = $pointCoordinates[1];
$check = DB::select(DB::raw("SELECT ST_Distance(
ST_GeomFromGeoJSON('" . json_encode($area->geometry) . "'),
ST_GeomFromText('POINT(" . $params->clock_in_out['clock_in_lng'] . " " . $params->clock_in_out['clock_in_lat'] . ")', 4326)
) <= " . $area->properties->radius . " as within_radius"));
if ($check[0]->within_radius) {
break;
}
}
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($area->geometry)."'),
ST_GeomFromText('POINT(".$params->clock_in_out['clock_out_lng']." ".$params->clock_in_out['clock_out_lat'].")', 4326)) as boundary"));
if($check[0]->boundary){
break;
}
}
}else{
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($valGeom->geometry)."'),
ST_GeomFromText('POINT(".$params->clock_in_out['clock_out_lng']." ".$params->clock_in_out['clock_out_lat'].")', 4326)) as boundary")); ST_GeomFromText('POINT(".$params->clock_in_out['clock_out_lng']." ".$params->clock_in_out['clock_out_lat'].")', 4326)) as boundary"));
}
}else{ }else{
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($valGeom->geometry)."'), if($valGeom->type == "FeatureCollection"){
$multiArea = $valGeom->features;
foreach($multiArea as $area){
if ($area->geometry->type === "Point") {
$pointCoordinates = $area->geometry->coordinates;
$pointLng = $pointCoordinates[0];
$pointLat = $pointCoordinates[1];
$check = DB::select(DB::raw("SELECT ST_Distance(
ST_GeomFromGeoJSON('" . json_encode($area->geometry) . "'),
ST_GeomFromText('POINT(" . $params->clock_in_out['clock_in_lng'] . " " . $params->clock_in_out['clock_in_lat'] . ")', 4326)
) <= " . $area->properties->radius . " as within_radius"));
if ($check[0]->within_radius) {
break;
}
}
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($area->geometry)."'),
ST_GeomFromText('POINT(".$params->clock_in_out['clock_in_lng']." ".$params->clock_in_out['clock_in_lat'].")', 4326)) as boundary")); ST_GeomFromText('POINT(".$params->clock_in_out['clock_in_lng']." ".$params->clock_in_out['clock_in_lat'].")', 4326)) as boundary"));
if($check[0]->boundary){
break;
}
}
}else{
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($valGeom->geometry)."'),
ST_GeomFromText('POINT(".$params->clock_in_out['clock_in_lng']." ".$params->clock_in_out['clock_in_lat'].")', 4326)) as boundary"));
}
} }
if(count($check)>0){ if(count($check)>0){
if($check[0]->boundary){ if(isset($check[0]->boundary) && $check[0]->boundary){
$temp[]=array( $temp[]=array(
"activity_id" => $dataGeom->id, "activity_id" => $dataGeom->id,
"boundary" => $check[0]->boundary, "boundary" => $check[0]->boundary,
"status_assign" => true "status_assign" => true
); );
} } else if (isset($check[0]->within_radius) && $check[0]->within_radius) {
$temp[]=array(
"activity_id" => $dataGeom->id,
"boundary" => $check[0]->within_radius,
"status_assign" => true
);
}
}
}
// assign and not in boundary
if(count($temp) < 1){
$temp[]=array(
"activity_id" => null,
"boundary" => false,
"status_assign" => true
// "geom" => $geom,
// "cek" => $check[0]->boundary
);
}
}
else{
// not assign
$temp[]=array(
"activity_id" => null,
"boundary" => false,
"status_assign" => false
);
}
return $temp;
}
public function checkLocationTest(Request $request){
// cek user tersebut apakah punya assign task yang ada bondary nya
// geom ada di table activity
// $clock_time =
$params = $request;
$geom = DB::table("assign_hr_to_activity as ahta")->select("ma.geom", "ma.id")
->join("m_activity as ma", "ma.id", "=", "ahta.activity_id")
->where("ahta.user_id", $params->user_id)
->whereNotNull("ma.geom")
->whereDate("ma.start_date", "<=", $params->time)
->whereDate("ma.end_date", ">=", $params->time)
->get();
$temp = [];
// return json_encode($geom);
if (count($geom) > 0) {
foreach($geom as $dataGeom){
$valGeom = json_decode($dataGeom->geom);
if($params->clock_in_out['type']=="out"){
if($valGeom->type == "FeatureCollection"){
// return count($valGeom->features);
$multiArea = $valGeom->features;
foreach($multiArea as $area){
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($area->geometry)."'),
ST_GeomFromText('POINT(".$params->clock_in_out['clock_out_lng']." ".$params->clock_in_out['clock_out_lat'].")', 4326)) as boundary"));
if($check[0]->boundary){
break;
}
}
}else{
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($valGeom->geometry)."'),
ST_GeomFromText('POINT(".$params->clock_in_out['clock_out_lng']." ".$params->clock_in_out['clock_out_lat'].")', 4326)) as boundary"));
}
}else{
if($valGeom->type == "FeatureCollection"){
// return count($valGeom->features);
$multiArea = $valGeom->features;
foreach($multiArea as $area){
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($area->geometry)."'),
ST_GeomFromText('POINT(".$params->clock_in_out['clock_in_lng']." ".$params->clock_in_out['clock_in_lat'].")', 4326)) as boundary"));
if($check[0]->boundary){
break;
}
}
}else{
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($valGeom->geometry)."'),
ST_GeomFromText('POINT(".$params->clock_in_out['clock_in_lng']." ".$params->clock_in_out['clock_in_lat'].")', 4326)) as boundary"));
}
} }
} if(count($check)>0){
// assign and not in boundary if($check[0]->boundary){
if(count($temp) < 1){ $temp[]=array(
$temp[]=array( "activity_id" => $dataGeom->id,
"activity_id" => null, "boundary" => $check[0]->boundary,
"boundary" => false, "status_assign" => true
"status_assign" => true );
// "geom" => $geom, }
// "cek" => $check[0]->boundary
);
} }
} }
// assign and not in boundary
if(count($temp) < 1){
$temp[]=array(
"activity_id" => null,
"boundary" => false,
"status_assign" => true
// "geom" => $geom,
// "cek" => $check[0]->boundary
);
}
}
else{ else{
// not assign // not assign
$temp[]=array( $temp[]=array(

1071
app/Http/Controllers/ProjectController.php

File diff suppressed because it is too large Load Diff

2
app/Http/Controllers/RequestMaterialController.php

@ -170,7 +170,7 @@ class RequestMaterialController extends Controller
} }
public function getMaterialIntegration(Request $request) { public function getMaterialIntegration(Request $request) {
$search = null; $search = urlencode($request->name);
if(empty($search)) if(empty($search))
return response()->json(['status'=>'error', 'message'=>'Empty query string!'], 400); return response()->json(['status'=>'error', 'message'=>'Empty query string!'], 400);
$url = str_replace("SEARCH", $search, config('api.adw').'/stock_master?name=SEARCH'); $url = str_replace("SEARCH", $search, config('api.adw').'/stock_master?name=SEARCH');

6
app/Http/Controllers/ShowHideColumnController.php

@ -45,12 +45,12 @@ class ShowHideColumnController extends Controller
$success = 0; $success = 0;
foreach ($columns as $column) { foreach ($columns as $key => $column) {
$dataAdd = array( $dataAdd = array(
'version_gantt_id'=>$request->version_gantt_id, 'version_gantt_id'=>$request->version_gantt_id,
'user_id'=>$this->currentId, 'user_id'=>$this->currentId,
'column_name'=>$column, 'column_name'=>$key,
'show'=>true, 'show'=>$column,
'created_by'=>$this->currentName 'created_by'=>$this->currentName
); );

2
app/Http/Controllers/UserToProyekController.php

@ -185,7 +185,7 @@ class UserToProyekController extends Controller
} }
public function getEmployeeIntegration(Request $request) { public function getEmployeeIntegration(Request $request) {
$search = null; $search = urlencode($request->name);
if(empty($search)) if(empty($search))
return response()->json(['status'=>'error', 'message'=>'Empty query string!'], 400); return response()->json(['status'=>'error', 'message'=>'Empty query string!'], 400);
$url = str_replace("SEARCH", $search, config('api.adw').'/employees?emp_name=SEARCH'); $url = str_replace("SEARCH", $search, config('api.adw').'/employees?emp_name=SEARCH');

36
app/Jobs/ProcessSCurve.php

@ -0,0 +1,36 @@
<?php
namespace App\Jobs;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\Queue;
use App\Helpers\MasterFunctionsHelper;
use App\Models\Project;
class ProcessSCurve extends Job
{
protected $project;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(Project $project)
{
$this->project = $project;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$data = MasterFunctionsHelper::CalculateSCurve($this->project->id);
$this->project->scurve = json_encode($data);
$this->project->calculation_status = true;
$this->project->save();
}
}

6
app/Models/Activity.php

@ -25,7 +25,7 @@ class Activity extends Model
'buffer_radius', 'duration', 'color_progress', 'jumlah_pekerjaan', 'satuan', 'buffer_radius', 'duration', 'color_progress', 'jumlah_pekerjaan', 'satuan',
'description', 'priority', 'bobot_planning', 'type_activity', 'open', 'geom', 'description', 'priority', 'bobot_planning', 'type_activity', 'open', 'geom',
'version_gantt_id', 'budget_plan', 'biaya_material_plan', 'biaya_human_plan', 'biaya_tools_plan', 'version_gantt_id', 'budget_plan', 'biaya_material_plan', 'biaya_human_plan', 'biaya_tools_plan',
'planned_start', 'planned_end', 'satuan_id', 'planned_start', 'planned_end', 'satuan_id', 'actual_start', 'actual_end',
'created_at', 'created_by', 'updated_at', 'updated_by', 'sortorder' 'created_at', 'created_by', 'updated_at', 'updated_by', 'sortorder'
]; ];
@ -71,8 +71,8 @@ class Activity extends Model
$data->updateCostPlanning(); $data->updateCostPlanning();
if($data->bobot_planning){ if($data->bobot_planning){
$data->updatePersentaseProgress(); $data->updatePersentaseProgress();
$data->updateCostActual();
} }
$data->updateCostActual();
// if($data->start_date != request()->start_date || $data->end_date != request()->end_date) { // if($data->start_date != request()->start_date || $data->end_date != request()->end_date) {
// $data->updateStartEndDateHeader(); // $data->updateStartEndDateHeader();
// } // }
@ -86,8 +86,8 @@ class Activity extends Model
$data->updateCostPlanning(); $data->updateCostPlanning();
if($data->bobot_planning){ if($data->bobot_planning){
$data->updatePersentaseProgress(); $data->updatePersentaseProgress();
$data->updateCostActual();
} }
$data->updateCostActual();
$data->updateStartEndDateHeader(); $data->updateStartEndDateHeader();
}); });

2
app/Models/AssignMaterial.php

@ -5,6 +5,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use App\Models\RequestMaterial; use App\Models\RequestMaterial;
use App\Models\Activity; use App\Models\Activity;
use App\Models\ReportActivityMaterial;
class AssignMaterial extends Model class AssignMaterial extends Model
{ {
@ -35,6 +36,7 @@ class AssignMaterial extends Model
}); });
static::deleted(function($data) { static::deleted(function($data) {
$reportActivities = ReportActivityMaterial::where('assign_material_id', $data->id)->delete();
$activity = Activity::where('id', $data->activity_id)->first(); $activity = Activity::where('id', $data->activity_id)->first();
$activity->rencana_biaya -= floatval($data->budget) * floatval($data->qty_planning); $activity->rencana_biaya -= floatval($data->budget) * floatval($data->qty_planning);
$activity->save(); $activity->save();

2
app/Models/Broadcast.php

@ -12,6 +12,6 @@ class Broadcast extends Model
const UPDATED_AT = 'updated_at'; const UPDATED_AT = 'updated_at';
protected $fillable = [ protected $fillable = [
'title_notif', 'message_notif', 'description', 'send_to_type', 'created_at', 'created_by', 'updated_at', 'updated_by' 'title_notif', 'message_notif', 'description', 'send_to_type', 'send_to_id', 'status_send', 'created_at', 'created_by', 'updated_at', 'updated_by'
]; ];
} }

4
app/Models/Project.php

@ -42,8 +42,8 @@ class Project extends Model
'currency_name', 'currency_name',
'budget_health', 'budget_health',
'phase_id', 'phase_id',
'calculation_status', 'calculation_status',
'scurve', 'scurve',
'created_at', 'created_at',
'created_by', 'created_by',
'updated_at', 'updated_at',

4
app/Models/UserToProyek.php

@ -12,8 +12,8 @@ class UserToProyek extends Model
const UPDATED_AT = 'updated_at'; const UPDATED_AT = 'updated_at';
protected $fillable = [ protected $fillable = [
'user_id', 'proyek_id', 'rbs', 'project_role', 'group_r', 'max_used', 'is_customer', 'standart_rate', 'user_id', 'proyek_id', 'rbs', 'project_role', 'group_r', 'max_used', 'standart_rate',
'uom_standart_rate', 'overtime_rate', 'uom_overtime_rate', 'cost_per_used', 'accrue_at', 'uom_standart_rate', 'overtime_rate', 'uom_overtime_rate', 'cost_per_used', 'accrue_at',
'base_calender', 'created_at', 'created_by', 'updated_at', 'updated_by' 'base_calender', 'is_customer', 'created_at', 'created_by', 'updated_at', 'updated_by'
]; ];
} }

49
app/Services/FCMService.php

@ -0,0 +1,49 @@
<?php
namespace App\Services;
use Illuminate\Support\Facades\Http;
class FCMService
{
public static function send($fcm_token, $notification)
{
$url = 'https://fcm.googleapis.com/fcm/send';
// $url = 'https://fcm.googleapis.com/v1/projects/594814396007/messages:send';
$serverKey = config('fcm.server_key');
$data = [
"registration_ids" => [$fcm_token],
"notification" => [
"title" => $notification['title'],
"body" => $notification['body'],
]
];
$encodedData = json_encode($data);
$headers = [
'Authorization:key=' . $serverKey,
'Content-Type: application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
// Disabling SSL Certificate support temporarly
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, $encodedData);
$result = curl_exec($ch);
if ($result === FALSE) {
return array("success"=> false, "message"=> curl_error($ch));
}
// Close connection
curl_close($ch);
return array("success"=> true, "message"=> $result);
}
}

1
bootstrap/app.php

@ -63,6 +63,7 @@ $app->configure('auth');
$app->configure('api'); $app->configure('api');
$app->configure('assets'); $app->configure('assets');
$app->configure('app'); $app->configure('app');
$app->configure('fcm');
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

2
config/api.php

@ -2,6 +2,6 @@
return [ return [
'nominatim' => env('API_NOMINATIM', 'https://nominatim.oslogdev.com'), 'nominatim' => env('API_NOMINATIM', 'https://nominatim.oslogdev.com'),
'adw' => env('API_ADW', 'http://ospro-api.adyawinsa.com:9083/api'), 'adw' => env('API_ADW', 'http://ospro-api.adyawinsa.com:9083/api'),
'adw_token' => env('API_ADW_TOKEN', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIxMjAyIiwiZXhwIjoxNjkxODMwNDkzfQ.DvBQIOZsdFndWsliPCZT65Y6G5Xx4vWBKz8Rhe7rvRA') 'adw_token' => env('API_ADW_TOKEN', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIxMjAyIiwiZXhwIjoxNzI0Mzk1NTExfQ.z9_Q7vjZbcbr8Mook4EmlOuOByNP12_DEDSabf0zanU')
]; ];
?> ?>

5
config/fcm.php

@ -0,0 +1,5 @@
<?php
return [
'server_key' => "AAAAin2zZmc:APA91bHFIYDzZGyVyXvt2C8I09wC2k8siWPQIo4b1Db0QjxCzQR5SRQU9KY1iNRIUhTL6OoLUs2x6UAiP1BNv-mwOlSR7C_405msoNL2p33JVBxrtqc7hdMc5TEdTBB4ZGRVH7ltQzSe",
];

36
database/migrations/2023_08_29_130624_create_jobs_table.php

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('jobs');
}
}

9
docker/nginx/conf.d/default.conf

@ -15,6 +15,15 @@ server {
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
client_max_body_size 100M;
client_body_buffer_size 5M;
fastcgi_read_timeout 900;
keepalive_timeout 900;
send_timeout 300;
proxy_read_timeout 900;
proxy_connect_timeout 900;
proxy_send_timeout 900;
} }
location / { location / {

1947
docker/php/php.ini

File diff suppressed because it is too large Load Diff

72
rest-client.http

@ -1,10 +1,12 @@
@token = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3Q6ODQ0NFwvYXBpXC9sb2dpbiIsImlhdCI6MTY3NzQ3NzIzMSwiZXhwIjoxNjc4MDgyMDMxLCJuYmYiOjE2Nzc0NzcyMzEsImp0aSI6ImR5WWhRY3ZIbUJEcmFKMG0iLCJzdWIiOjEsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.9zT6CBbQholzIdQ9ZBDoxMvrR-PKvIYkGzdNB6bim0Y @token = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3Q6ODQ0NFwvYXBpXC9sb2dpbiIsImlhdCI6MTY5MTc2MDYyNCwiZXhwIjoxNjkyMzY1NDI0LCJuYmYiOjE2OTE3NjA2MjQsImp0aSI6Ikd2bEFPTE4yZ2FuRFdVbjEiLCJzdWIiOjEsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.XNGbsmcgQ-CkV8vLlvnItGKM0R1am5X5b6qUFOR1DRo
@tokenS = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9hZHctYXBpLm9zcHJvLmlkXC9hcGlcL2xvZ2luIiwiaWF0IjoxNjkxNTcyMTIwLCJleHAiOjE2OTIxNzY5MjAsIm5iZiI6MTY5MTU3MjEyMCwianRpIjoiVUdqbnhLRVdlZzYyTTBnayIsInN1YiI6MSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.5QqK0dLW5jzbVOkSCSW0mFo0K7ycGOBW9NCG_2Zldm4
@hostname = https://adw-api.ospro.id/api
# @hostname = https://adw-api.ospro.id/api
# @hostname = https://ospro-api.ospro.id/api # @hostname = https://ospro-api.ospro.id/api
# @hostname = https://api-iu.ospro.id/api # @hostname = https://api-iu.ospro.id/api
# @hostname = https://api-staging-adw.ospro.id/api # @hostname = https://api-staging-adw.ospro.id/api
# @hostname = http://localhost:8444/api @hostname = http://localhost:8444/api
# @hostname = http://103.73.125.81:8444/api # @hostname = http://103.73.125.81:8444/api
# @hostname = http://localhost:8444/adw-backend/api # @hostname = http://localhost:8444/adw-backend/api
@ -402,6 +404,59 @@ GET {{hostname}}/project/list
Authorization: Bearer {{token}} Authorization: Bearer {{token}}
content-type: application/json content-type: application/json
###
POST {{hostname}}/project/search
Authorization: Bearer {{token}}
content-type: application/json
{
"columns": [
{
"name": "nama",
"logic_operator": "ilike",
"value": "",
"operator": "AND"
}
],
"select": ["kode_sortname", "nama", "mulai_proyek"],
"joins": [
{
"name": "m_users",
"column_join": "pm_id",
"column_results": [
"name",
"username"
]
},
{
"name": "m_type_proyek",
"column_join": "type_proyek_id",
"column_results": [
"name",
"description"
]
}
],
"orders": {
"columns": [
"id"
],
"ascending": false
},
"paging": {
"start": 0,
"length": 10
}
}
###
POST https://adw-api.ospro.id/api/project/search
Authorization: Bearer {{tokenS}}
content-type: application/json
{
"columns":[{"name":"nama","logic_operator":"ilike","value":"","operator":"AND"}],"joins":[{"name":"m_users","column_join":"pm_id","column_results":["name","username"]},{"name":"m_type_proyek","column_join":"type_proyek_id","column_results":["name","description"]}],"orders":{"columns":["id"],"ascending":false},"paging":{"start":0,"length":10}
}
### add ### add
POST {{hostname}}/project/add POST {{hostname}}/project/add
@ -1103,3 +1158,14 @@ content-type: application/json
} }
} }
#######
POST {{hostname}}/project/get-s-curve
Authorization: Bearer {{token}}
content-type: application/json
{
"period":"week",
"project_id":"118",
"gantt_id":"287"
}

912
routes/web.php

@ -4,457 +4,467 @@ $router->get('/', function () use ($router) {
return $router->app->version(); return $router->app->version();
}); });
$router->group(['prefix' => 'api', 'middleware' => 'cors'], function () use ($router) { $router->group(['prefix'=>'api', 'middleware' => 'cors'], function () use ($router) {
$router->post('/login', 'AuthController@login'); $router->post('/login', 'AuthController@login');
$router->post('/menu/add', 'MenuController@add'); $router->post('/menu/add', 'MenuController@add');
$router->get('/menu/edit/{id}', 'MenuController@edit'); $router->get('/menu/edit/{id}', 'MenuController@edit');
$router->put('/menu/update/{id}', 'MenuController@update'); $router->put('/menu/update/{id}', 'MenuController@update');
$router->delete('/menu/delete/{id}', 'MenuController@delete'); $router->delete('/menu/delete/{id}', 'MenuController@delete');
$router->post('/menu/search', 'MenuController@search'); $router->post('/menu/search', 'MenuController@search');
$router->get('/menu/management/{id}', 'MenuController@listMenu'); $router->get('/menu/management/{id}', 'MenuController@listMenu');
$router->get('/menu/list', 'MenuController@list'); $router->get('/menu/list', 'MenuController@list');
$router->post('/role-menu/add', 'RoleMenuController@add'); $router->post('/role-menu/add', 'RoleMenuController@add');
$router->put('/role-menu/update/{id}', 'RoleMenuController@update'); $router->put('/role-menu/update/{id}', 'RoleMenuController@update');
$router->delete('/role-menu/delete/{id}', 'RoleMenuController@delete'); $router->delete('/role-menu/delete/{id}', 'RoleMenuController@delete');
$router->delete('/role-menu/delete-byrole/{id}', 'RoleMenuController@deleteByRole'); $router->delete('/role-menu/delete-byrole/{id}', 'RoleMenuController@deleteByRole');
$router->post('/role-menu/search', 'RoleMenuController@search'); $router->post('/role-menu/search', 'RoleMenuController@search');
$router->get('/role-menu/get-role/{id}', 'RoleMenuController@listMenu'); $router->get('/role-menu/get-role/{id}', 'RoleMenuController@listMenu');
$router->group(['middleware' => ['auth', 'cors']], function () use ($router) { $router->group(['middleware' => ['auth', 'cors']], function () use ($router) {
$router->get('/dashboard/get-company-cashflow[/{year}]', 'DashboardBoDController@getCompanyCashFlow'); // project expenditure $router->get('/dashboard/get-company-cashflow[/{year}]', 'DashboardBoDController@getCompanyCashFlow'); // project expenditure
$router->get('/dashboard/get-invoice-outstanding[/{year}]', 'DashboardBoDController@getInvoiceOutstanding'); // project invoice vs cash in $router->get('/dashboard/get-invoice-outstanding[/{year}]', 'DashboardBoDController@getInvoiceOutstanding'); // project invoice vs cash in
$router->get('/dashboard/get-total-project-per-schedule-health[/{year}]', 'DashboardBoDController@getTotalProjectPerScheduleHealth'); $router->get('/dashboard/get-total-project-per-schedule-health[/{year}]', 'DashboardBoDController@getTotalProjectPerScheduleHealth');
$router->get('/dashboard/get-total-project-per-budget-health[/{year}]', 'DashboardBoDController@getTotalProjectPerBudgetHealth'); $router->get('/dashboard/get-total-project-per-budget-health[/{year}]', 'DashboardBoDController@getTotalProjectPerBudgetHealth');
$router->get('/dashboard/get-total-project-schedule-health-per-division[/{year}]', 'DashboardBoDController@getTotalProjectScheduleHealthPerDivision'); $router->get('/dashboard/get-total-project-schedule-health-per-division[/{year}]', 'DashboardBoDController@getTotalProjectScheduleHealthPerDivision');
$router->get('/dashboard/get-total-project-budget-health-per-division[/{year}]', 'DashboardBoDController@getTotalProjectBudgetHealthPerDivision'); $router->get('/dashboard/get-total-project-budget-health-per-division[/{year}]', 'DashboardBoDController@getTotalProjectBudgetHealthPerDivision');
$router->get('/dashboard/get-total-project-per-phase[/{year}]', 'DashboardBoDController@getTotalProjectPerPhase'); $router->get('/dashboard/get-total-project-per-phase[/{year}]', 'DashboardBoDController@getTotalProjectPerPhase');
$router->get('/dashboard/get-total-project-per-division[/{year}]', 'DashboardBoDController@getTotalProjectPerDivision'); $router->get('/dashboard/get-total-project-per-division[/{year}]', 'DashboardBoDController@getTotalProjectPerDivision');
$router->get('/dashboard/get-total-project-value-per-division[/{year}]', 'DashboardBoDController@getTotalProjectValuePerDivision'); $router->get('/dashboard/get-total-project-value-per-division[/{year}]', 'DashboardBoDController@getTotalProjectValuePerDivision');
$router->get('/dashboard/get-detail-expenditure[/{year}]', 'DashboardBoDController@getDetailExpenditure'); $router->get('/dashboard/get-detail-expenditure[/{year}]', 'DashboardBoDController@getDetailExpenditure');
$router->post('/role/search', 'RoleController@search'); $router->post('/role/search', 'RoleController@search');
$router->post('/role/add', 'RoleController@add'); $router->post('/role/add', 'RoleController@add');
$router->get('/role/edit/{id}', 'RoleController@edit'); $router->get('/role/edit/{id}', 'RoleController@edit');
$router->put('/role/update/{id}', 'RoleController@update'); $router->put('/role/update/{id}', 'RoleController@update');
$router->delete('/role/delete/{id}', 'RoleController@delete'); $router->delete('/role/delete/{id}', 'RoleController@delete');
$router->get('/role/list', 'RoleController@list'); $router->get('/role/list', 'RoleController@list');
$router->post('/document-project/upload', 'ProjectDokumenController@uploadProjectDokumen'); $router->post('/document-project/upload', 'ProjectDokumenController@uploadProjectDokumen');
$router->get('/document-project/get/{id}', 'ProjectDokumenController@dokumenByProyekId'); $router->get('/document-project/get/{id}', 'ProjectDokumenController@dokumenByProyekId');
$router->delete('/document-project/delete/{id}', 'ProjectDokumenController@delete'); $router->delete('/document-project/delete/{id}', 'ProjectDokumenController@delete');
$router->post('/document-project/search', 'ProjectDokumenController@searchDocProject'); $router->post('/document-project/search', 'ProjectDokumenController@searchDocProject');
$router->get('/document-project/download/{id}', 'ProjectDokumenController@downloadDokumen'); $router->get('/document-project/download/{id}', 'ProjectDokumenController@downloadDokumen');
$router->post('/document-activity/upload', 'ActivityDokumenController@uploadProjectDokumen'); $router->post('/document-activity/upload', 'ActivityDokumenController@uploadProjectDokumen');
$router->get('/document-activity/get/{id}', 'ActivityDokumenController@dokumenByActivityId'); $router->get('/document-activity/get/{id}', 'ActivityDokumenController@dokumenByActivityId');
$router->delete('/document-activity/delete/{id}', 'ActivityDokumenController@delete'); $router->delete('/document-activity/delete/{id}', 'ActivityDokumenController@delete');
$router->post('/document-activity/search', 'ActivityDokumenController@searchDocProject'); $router->post('/document-activity/search', 'ActivityDokumenController@searchDocProject');
$router->get('/document-activity/download/{id}', 'ActivityDokumenController@downloadDokumen'); $router->get('/document-activity/download/{id}', 'ActivityDokumenController@downloadDokumen');
$router->get('/project-by-customer/{id}','ProjectController@getByUser'); $router->get('/project-by-customer/{id}','ProjectController@getByUser');
$router->post('/project/search', 'ProjectController@search'); $router->post('/project/search', 'ProjectController@search');
$router->post('/project/add', 'ProjectController@add'); $router->post('/project/add', 'ProjectController@add');
$router->put('/project/update/{id}', 'ProjectController@update'); $router->put('/project/update/{id}', 'ProjectController@update');
$router->get('/project/edit/{id}', 'ProjectController@edit'); $router->get('/project/edit/{id}', 'ProjectController@edit');
$router->get('/project/detail/{id}', 'ProjectController@detail'); $router->get('/project/detail/{id}', 'ProjectController@detail');
$router->delete('/project/delete/{id}', 'ProjectController@delete'); $router->delete('/project/delete/{id}', 'ProjectController@delete');
$router->get('/project/list', 'ProjectController@list'); $router->get('/project/list', 'ProjectController@list');
$router->get('/project/set-baseline/{gantt_id}', 'ProjectController@setBaseline'); $router->get('/project/set-baseline/{gantt_id}', 'ProjectController@setBaseline');
$router->get('/project/synchronize-report/{gantt_id}', 'ProjectController@synchronizeReport'); $router->get('/project/synchronize-report/{gantt_id}', 'ProjectController@synchronizeReport');
$router->get('/project/manpower/{proyek_id}', 'ProjectController@getManpower'); $router->get('/project/manpower/{proyek_id}', 'ProjectController@getManpower');
$router->get('/project/manpower/assigned/{gantt_id}', 'ProjectController@getAssignedHR'); $router->get('/project/manpower/assigned/{gantt_id}', 'ProjectController@getAssignedHR');
$router->post('/project/get-s-curve', 'ProjectController@getSCurve'); $router->post('/project/get-s-curve', 'ProjectController@getSCurve');
$router->post('/project/calculate-s-curve', 'ProjectController@calculateSCurve'); $router->post('/project/calculate-s-curve', 'ProjectController@calculateSCurve');
$router->post('/project/s-curve-command', 'ProjectController@sCurveCommand'); $router->post('/project/s-curve-command', 'ProjectController@sCurveCommand');
$router->post('/project/get-linear-s-curve', 'ProjectController@getLinearSCurve'); $router->post('/project/get-linear-s-curve', 'ProjectController@getLinearSCurve');
$router->post('/project/get-overdue-activities', 'ProjectController@getOverdueActivities'); $router->post('/project/get-overdue-activities', 'ProjectController@getOverdueActivities');
$router->post('/project/get-integration-invoice', 'ProjectController@getInvoiceIntegration'); $router->post('/project/get-integration-invoice', 'ProjectController@getInvoiceIntegration');
$router->post('/project/get-report-distribution', 'ProjectController@getReportDistribution'); $router->post('/project/get-report-distribution', 'ProjectController@getReportDistribution');
/* $router->get('/project/get-expenditure/{id}/{date?}', 'ProjectController@getExpenditure'); */ /* $router->get('/project/get-expenditure/{id}/{date?}', 'ProjectController@getExpenditure'); */
/* $router->get('/project/get-total-expenditure/{id}', 'ProjectController@getTotalExpenditure'); */ /* $router->get('/project/get-total-expenditure/{id}', 'ProjectController@getTotalExpenditure'); */
/* $router->get('/project/get-status-health-schedule/{id}', 'ProjectController@getStatusSchedule'); */ /* $router->get('/project/get-status-health-schedule/{id}', 'ProjectController@getStatusSchedule'); */
/* $router->get('/project/get-status-health-budget/{id}', 'ProjectController@getStatusBudget'); */ /* $router->get('/project/get-status-health-budget/{id}', 'ProjectController@getStatusBudget'); */
$router->post('/project-charter/search', 'ProjectCharterController@search'); $router->post('/project-charter/search', 'ProjectCharterController@search');
$router->post('/project-charter/add', 'ProjectCharterController@add'); $router->post('/project-charter/add', 'ProjectCharterController@add');
$router->put('/project-charter/update/{id}', 'ProjectCharterController@update'); $router->put('/project-charter/update/{id}', 'ProjectCharterController@update');
$router->post('/divisi/add', 'DivisiController@add'); $router->post('/divisi/add', 'DivisiController@add');
$router->get('/divisi/edit/{id}', 'DivisiController@edit'); $router->get('/divisi/edit/{id}', 'DivisiController@edit');
$router->put('/divisi/update/{id}', 'DivisiController@update'); $router->put('/divisi/update/{id}', 'DivisiController@update');
$router->post('/divisi/search', 'DivisiController@search'); $router->post('/divisi/search', 'DivisiController@search');
$router->delete('/divisi/delete/{id}', 'DivisiController@delete'); $router->delete('/divisi/delete/{id}', 'DivisiController@delete');
$router->get('/divisi/list', 'DivisiController@list'); $router->get('/divisi/list', 'DivisiController@list');
$router->post('/config-alert/search', 'ConfigAlertController@search'); $router->post('/config-alert/search', 'ConfigAlertController@search');
$router->post('/config-alert/add', 'ConfigAlertController@add'); $router->post('/config-alert/add', 'ConfigAlertController@add');
$router->get('/config-alert/edit/{id}', 'ConfigAlertController@edit'); $router->get('/config-alert/edit/{id}', 'ConfigAlertController@edit');
$router->put('/config-alert/update/{id}', 'ConfigAlertController@update'); $router->put('/config-alert/update/{id}', 'ConfigAlertController@update');
$router->delete('/config-alert/delete/{id}', 'ConfigAlertController@delete'); $router->delete('/config-alert/delete/{id}', 'ConfigAlertController@delete');
$router->get('/config-alert/list', 'ConfigAlertController@list'); $router->get('/config-alert/list', 'ConfigAlertController@list');
$router->post('/config-alert-to-user/search', 'ConfigAlertUserController@search'); $router->post('/config-alert-to-user/search', 'ConfigAlertUserController@search');
$router->post('/config-alert-to-user/add', 'ConfigAlertUserController@add'); $router->post('/config-alert-to-user/add', 'ConfigAlertUserController@add');
$router->put('/config-alert-to-user/update/{id}', 'ConfigAlertUserController@update'); $router->put('/config-alert-to-user/update/{id}', 'ConfigAlertUserController@update');
$router->delete('/config-alert-to-user/delete/{id}', 'ConfigAlertUserController@delete'); $router->delete('/config-alert-to-user/delete/{id}', 'ConfigAlertUserController@delete');
$router->get('/config-alert/get-user/{id}', 'ConfigAlertUserController@getConfigUser'); $router->get('/config-alert/get-user/{id}', 'ConfigAlertUserController@getConfigUser');
$router->post('/human-resource/search', 'HumanResourceController@search'); $router->post('/human-resource/search', 'HumanResourceController@search');
$router->post('/human-resource/add', 'HumanResourceController@add'); $router->post('/human-resource/add', 'HumanResourceController@add');
$router->get('/human-resource/edit/{id}', 'HumanResourceController@edit'); $router->get('/human-resource/edit/{id}', 'HumanResourceController@edit');
$router->put('/human-resource/update/{id}', 'HumanResourceController@update'); $router->put('/human-resource/update/{id}', 'HumanResourceController@update');
$router->delete('/human-resource/delete/{id}', 'HumanResourceController@delete'); $router->delete('/human-resource/delete/{id}', 'HumanResourceController@delete');
$router->get('/human-resource/list', 'HumanResourceController@list'); $router->get('/human-resource/list', 'HumanResourceController@list');
$router->get('/human-resource/select', 'HumanResourceController@select'); $router->get('/human-resource/select', 'HumanResourceController@select');
$router->post('/human-resource/check-old-password/{id}', 'HumanResourceController@checkOldPassword'); $router->post('/human-resource/check-old-password/{id}', 'HumanResourceController@checkOldPassword');
$router->get('/human-resource/sync', 'HumanResourceController@sync'); $router->get('/human-resource/sync', 'HumanResourceController@sync');
$router->post('/project-role/search', 'ProjectRoleController@search'); $router->post('/project-role/search', 'ProjectRoleController@search');
$router->post('/project-role/add', 'ProjectRoleController@add'); $router->post('/project-role/add', 'ProjectRoleController@add');
$router->get('/project-role/edit/{id}', 'ProjectRoleController@edit'); $router->get('/project-role/edit/{id}', 'ProjectRoleController@edit');
$router->put('/project-role/update/{id}', 'ProjectRoleController@update'); $router->put('/project-role/update/{id}', 'ProjectRoleController@update');
$router->delete('/project-role/delete/{id}', 'ProjectRoleController@delete'); $router->delete('/project-role/delete/{id}', 'ProjectRoleController@delete');
$router->get('/project-role/list', 'ProjectRoleController@list'); $router->get('/project-role/list', 'ProjectRoleController@list');
$router->get('/project-role/select', 'ProjectRoleController@select'); $router->get('/project-role/select', 'ProjectRoleController@select');
$router->post('/project-type/search', 'ProjectTypeController@search'); $router->post('/project-type/search', 'ProjectTypeController@search');
$router->post('/project-type/add', 'ProjectTypeController@add'); $router->post('/project-type/add', 'ProjectTypeController@add');
$router->get('/project-type/edit/{id}', 'ProjectTypeController@edit'); $router->get('/project-type/edit/{id}', 'ProjectTypeController@edit');
$router->put('/project-type/update/{id}', 'ProjectTypeController@update'); $router->put('/project-type/update/{id}', 'ProjectTypeController@update');
$router->delete('/project-type/delete/{id}', 'ProjectTypeController@delete'); $router->delete('/project-type/delete/{id}', 'ProjectTypeController@delete');
$router->get('/project-type/list', 'ProjectTypeController@list'); $router->get('/project-type/list', 'ProjectTypeController@list');
$router->post('/project-phase/search', 'ProjectPhaseController@search'); $router->post('/project-phase/search', 'ProjectPhaseController@search');
$router->post('/project-phase/add', 'ProjectPhaseController@add'); $router->post('/project-phase/add', 'ProjectPhaseController@add');
$router->get('/project-phase/edit/{id}', 'ProjectPhaseController@edit'); $router->get('/project-phase/edit/{id}', 'ProjectPhaseController@edit');
$router->put('/project-phase/update/{id}', 'ProjectPhaseController@update'); $router->put('/project-phase/update/{id}', 'ProjectPhaseController@update');
$router->delete('/project-phase/delete/{id}', 'ProjectPhaseController@delete'); $router->delete('/project-phase/delete/{id}', 'ProjectPhaseController@delete');
$router->get('/project-phase/list', 'ProjectPhaseController@list'); $router->get('/project-phase/list', 'ProjectPhaseController@list');
$router->post('/user-to-project/assign', 'UserProyekController@assignUserProyek'); $router->post('/user-to-project/assign', 'UserProyekController@assignUserProyek');
$router->post('/request-material/add', 'RequestMaterialController@add'); $router->post('/request-material/add', 'RequestMaterialController@add');
$router->post('/request-material/search', 'RequestMaterialController@search'); $router->post('/request-material/search', 'RequestMaterialController@search');
$router->get('/request-material/edit/{id}', 'RequestMaterialController@edit'); $router->get('/request-material/edit/{id}', 'RequestMaterialController@edit');
$router->put('/request-material/update/{id}', 'RequestMaterialController@update'); $router->put('/request-material/update/{id}', 'RequestMaterialController@update');
$router->delete('/request-material/delete/{id}', 'RequestMaterialController@delete'); $router->delete('/request-material/delete/{id}', 'RequestMaterialController@delete');
$router->get('/request-material/list', 'RequestMaterialController@list'); $router->get('/request-material/list', 'RequestMaterialController@list');
$router->get('/request-material/get-material-integration', 'RequestMaterialController@getMaterialIntegration'); $router->get('/request-material/get-material-integration', 'RequestMaterialController@getMaterialIntegration');
$router->put('/request-material/update-warehouse-site/{id}', 'RequestMaterialController@updateWarehouseSite'); $router->put('/request-material/update-warehouse-site/{id}', 'RequestMaterialController@updateWarehouseSite');
$router->post('/material-to-project/assign', 'MaterialProjectController@assignMaterial'); $router->post('/material-to-project/assign', 'MaterialProjectController@assignMaterial');
$router->post('/material-resource/add', 'MaterialResourceController@add'); $router->post('/material-resource/add', 'MaterialResourceController@add');
$router->post('/material-resource/search', 'MaterialResourceController@search'); $router->post('/material-resource/search', 'MaterialResourceController@search');
$router->get('/material-resource/update/{id}', 'MaterialResourceController@edit'); $router->get('/material-resource/update/{id}', 'MaterialResourceController@edit');
$router->put('/material-resource/update/{id}', 'MaterialResourceController@update'); $router->put('/material-resource/update/{id}', 'MaterialResourceController@update');
$router->delete('/material-resource/delete/{id}', 'MaterialResourceController@delete'); $router->delete('/material-resource/delete/{id}', 'MaterialResourceController@delete');
$router->get('/material-resource/list', 'MaterialResourceController@list'); $router->get('/material-resource/list', 'MaterialResourceController@list');
$router->get('/material-resource/select', 'MaterialResourceController@select'); $router->get('/material-resource/select', 'MaterialResourceController@select');
$router->post('/tools-to-project/assign', 'ToolsProjectController@assignTools'); $router->post('/tools-to-project/assign', 'ToolsProjectController@assignTools');
$router->get('/tools-to-project/search', 'ToolsProjectController@searchTools'); $router->get('/tools-to-project/search', 'ToolsProjectController@searchTools');
$router->post('/tools-resource/add', 'ToolsResourceController@add'); $router->post('/tools-resource/add', 'ToolsResourceController@add');
$router->post('/tools-resource/search', 'ToolsResourceController@search'); $router->post('/tools-resource/search', 'ToolsResourceController@search');
$router->get('/tools-resource/edit/{id}', 'ToolsResourceController@edit'); $router->get('/tools-resource/edit/{id}', 'ToolsResourceController@edit');
$router->put('/tools-resource/update/{id}', 'ToolsResourceController@update'); $router->put('/tools-resource/update/{id}', 'ToolsResourceController@update');
$router->delete('/tools-resource/delete/{id}', 'ToolsResourceController@delete'); $router->delete('/tools-resource/delete/{id}', 'ToolsResourceController@delete');
$router->get('/tools-resource/list', 'ToolsResourceController@list'); $router->get('/tools-resource/list', 'ToolsResourceController@list');
$router->get('/tools-resource/select', 'ToolsResourceController@select'); $router->get('/tools-resource/select', 'ToolsResourceController@select');
$router->post('/req-tools/add', 'ToolsRequestController@add'); $router->post('/req-tools/add', 'ToolsRequestController@add');
$router->get('/req-tools/edit/{id}', 'ToolsRequestController@edit'); $router->get('/req-tools/edit/{id}', 'ToolsRequestController@edit');
$router->put('/req-tools/update/{id}', 'ToolsRequestController@update'); $router->put('/req-tools/update/{id}', 'ToolsRequestController@update');
$router->post('/req-tools/search', 'ToolsRequestController@search'); $router->post('/req-tools/search', 'ToolsRequestController@search');
$router->delete('/req-tools/delete/{id}', 'ToolsRequestController@delete'); $router->delete('/req-tools/delete/{id}', 'ToolsRequestController@delete');
$router->get('/req-tools/list', 'ToolsRequestController@list'); $router->get('/req-tools/list', 'ToolsRequestController@list');
$router->post('/version-gantt/add', 'VersionGanttController@add'); $router->post('/version-gantt/add', 'VersionGanttController@add');
$router->get('/version-gantt/edit/{id}', 'VersionGanttController@edit'); $router->get('/version-gantt/edit/{id}', 'VersionGanttController@edit');
$router->put('/version-gantt/update/{id}', 'VersionGanttController@update'); $router->put('/version-gantt/update/{id}', 'VersionGanttController@update');
$router->post('/version-gantt/search', 'VersionGanttController@search'); $router->post('/version-gantt/search', 'VersionGanttController@search');
$router->delete('/version-gantt/delete/{id}', 'VersionGanttController@delete'); $router->delete('/version-gantt/delete/{id}', 'VersionGanttController@delete');
$router->get('/version-gantt/list', 'VersionGanttController@list'); $router->get('/version-gantt/list', 'VersionGanttController@list');
$router->post('/user-to-version-gantt/add', 'UserToVersionGanttController@add'); $router->post('/user-to-version-gantt/add', 'UserToVersionGanttController@add');
$router->post('/user-to-version-gantt/add-multiple', 'UserToVersionGanttController@addMultiple'); $router->post('/user-to-version-gantt/add-multiple', 'UserToVersionGanttController@addMultiple');
$router->get('/user-to-version-gantt/edit/{id}', 'UserToVersionGanttController@edit'); $router->get('/user-to-version-gantt/edit/{id}', 'UserToVersionGanttController@edit');
$router->put('/user-to-version-gantt/update/{id}', 'UserToVersionGanttController@update'); $router->put('/user-to-version-gantt/update/{id}', 'UserToVersionGanttController@update');
$router->post('/user-to-version-gantt/search', 'UserToVersionGanttController@search'); $router->post('/user-to-version-gantt/search', 'UserToVersionGanttController@search');
$router->delete('/user-to-version-gantt/delete/{id}', 'UserToVersionGanttController@delete'); $router->delete('/user-to-version-gantt/delete/{id}', 'UserToVersionGanttController@delete');
$router->get('/user-to-version-gantt/list', 'UserToVersionGanttController@list'); $router->get('/user-to-version-gantt/list', 'UserToVersionGanttController@list');
$router->get('/user-to-version-gantt/get-by-gantt/{gantt_id}', 'UserToVersionGanttController@getByUserGantt'); $router->get('/user-to-version-gantt/get-by-gantt/{gantt_id}', 'UserToVersionGanttController@getByUserGantt');
$router->post('/user-to-activity/add', 'UserToActivityController@add'); $router->post('/user-to-activity/add', 'UserToActivityController@add');
$router->post('/user-to-activity/add-multiple', 'UserToActivityController@addMultiple'); $router->post('/user-to-activity/add-multiple', 'UserToActivityController@addMultiple');
$router->get('/user-to-activity/edit/{id}', 'UserToActivityController@edit'); $router->get('/user-to-activity/edit/{id}', 'UserToActivityController@edit');
$router->put('/user-to-activity/update/{id}', 'UserToActivityController@update'); $router->put('/user-to-activity/update/{id}', 'UserToActivityController@update');
$router->post('/user-to-activity/search', 'UserToActivityController@search'); $router->post('/user-to-activity/search', 'UserToActivityController@search');
$router->post('/user-to-activity/list-filtered', 'UserToActivityController@listFiltered'); $router->post('/user-to-activity/list-filtered', 'UserToActivityController@listFiltered');
$router->delete('/user-to-activity/delete/{id}', 'UserToActivityController@delete'); $router->delete('/user-to-activity/delete/{id}', 'UserToActivityController@delete');
$router->get('/user-to-activity/list', 'UserToActivityController@list'); $router->get('/user-to-activity/list', 'UserToActivityController@list');
$router->get('/user-to-activity/datatables', 'UserToActivityController@datatables'); $router->get('/user-to-activity/datatables', 'UserToActivityController@datatables');
$router->get('/sumVolActualM/{id}', 'ActivityController@sumVolumeActualMaterial'); $router->get('/sumVolActualM/{id}', 'ActivityController@sumVolumeActualMaterial');
$router->get('/activity/{id}/{proyek_id}/get', 'ActivityController@getByGanttId'); $router->get('/activity/{id}/{proyek_id}/get', 'ActivityController@getByGanttId');
$router->get('/activity/search', 'ActivityController@search'); $router->get('/activity/search', 'ActivityController@search');
$router->post('/activity/import', 'ActivityController@import'); $router->post('/activity/import', 'ActivityController@import');
$router->post('/activity/import-update', 'ActivityController@importUpdate'); $router->post('/activity/import-update', 'ActivityController@importUpdate');
$router->post('/activity/import-old', 'ActivityController@importOld'); $router->post('/activity/import-old', 'ActivityController@importOld');
$router->post('/task', 'ActivityController@add'); $router->post('/activity/batch-update/{ganttId}', 'ActivityController@batchUpdate');
$router->get('/task/edit/{id}', 'ActivityController@edit'); $router->post('/task', 'ActivityController@add');
$router->put('/task/{id}', 'ActivityController@update'); $router->get('/task/edit/{id}', 'ActivityController@edit');
$router->put('/task/update-regular/{id}', 'ActivityController@updateRegular'); $router->put('/task/{id}', 'ActivityController@update');
$router->delete('/task/{id}', 'ActivityController@delete'); $router->put('/task/update-regular/{id}', 'ActivityController@updateRegular');
$router->get('/task/get-update/{id}', 'ActivityController@getUpdate'); $router->delete('/task/{id}', 'ActivityController@delete');
$router->post('/tmp-import/upload', 'ActivityController@uploadTmpImport'); $router->get('/task/get-update/{id}', 'ActivityController@getUpdate');
$router->post('/tmp-import/upload', 'ActivityController@uploadTmpImport');
$router->post('/link', 'LinkController@add');
$router->put('/link/{id}', 'LinkController@update'); $router->post('/link', 'LinkController@add');
$router->delete('/link/{id}', 'LinkController@delete'); $router->put('/link/{id}', 'LinkController@update');
$router->delete('/link/{id}', 'LinkController@delete');
$router->post('/template-gantt/add', 'TemplateGanttController@add');
$router->get('/template-gantt/edit/{id}', 'TemplateGanttController@edit'); $router->post('/template-gantt/add', 'TemplateGanttController@add');
$router->put('/template-gantt/update/{id}', 'TemplateGanttController@update'); $router->get('/template-gantt/edit/{id}', 'TemplateGanttController@edit');
$router->post('/template-gantt/search', 'TemplateGanttController@search'); $router->put('/template-gantt/update/{id}', 'TemplateGanttController@update');
$router->delete('/template-gantt/delete/{id}', 'TemplateGanttController@delete'); $router->post('/template-gantt/search', 'TemplateGanttController@search');
$router->get('/template-gantt/list', 'TemplateGanttController@list'); $router->delete('/template-gantt/delete/{id}', 'TemplateGanttController@delete');
$router->get('/template-gantt/get-tree/{id}', 'TemplateGanttController@getTreeByTypeProject'); $router->get('/template-gantt/list', 'TemplateGanttController@list');
$router->get('/template-gantt/get-tree/{id}', 'TemplateGanttController@getTreeByTypeProject');
$router->post('/comment-activity/add', 'CommentActivityController@add');
$router->get('/comment-activity/edit/{id}', 'CommentActivityController@edit'); $router->post('/comment-activity/add', 'CommentActivityController@add');
$router->put('/comment-activity/update/{id}', 'CommentActivityController@update'); $router->get('/comment-activity/edit/{id}', 'CommentActivityController@edit');
$router->post('/comment-activity/search', 'CommentActivityController@search'); $router->put('/comment-activity/update/{id}', 'CommentActivityController@update');
$router->delete('/comment-activity/delete/{id}', 'CommentActivityController@delete'); $router->post('/comment-activity/search', 'CommentActivityController@search');
$router->get('/comment-activity/list', 'CommentActivityController@list'); $router->delete('/comment-activity/delete/{id}', 'CommentActivityController@delete');
$router->get('/comment-activity/list', 'CommentActivityController@list');
$router->post('/presence/add', 'PresenceController@add');
$router->get('/presence/edit/{id}', 'PresenceController@edit'); $router->post('/presence/add', 'PresenceController@add');
$router->put('/presence/update/{id}', 'PresenceController@update'); $router->post('/presence/test', 'PresenceController@checkLocationTest');
$router->post('/presence/search', 'PresenceController@search'); $router->get('/presence/edit/{id}', 'PresenceController@edit');
$router->delete('/presence/delete/{id}', 'PresenceController@delete'); $router->put('/presence/update/{id}', 'PresenceController@update');
$router->get('/presence/list', 'PresenceController@list'); $router->post('/presence/search', 'PresenceController@search');
$router->get('/presence/clockinout/{id}', 'PresenceController@clockinout'); $router->delete('/presence/delete/{id}', 'PresenceController@delete');
$router->post('/presence/reportk3', 'PresenceController@reportK3'); $router->get('/presence/list', 'PresenceController@list');
$router->get('/presence/bulk-update-location', 'PresenceController@bulkUpdateLocation'); $router->get('/presence/clockinout/{id}', 'PresenceController@clockinout');
$router->post('/presence/reportk3', 'PresenceController@reportK3');
$router->post('/permit/add', 'AbsentController@add'); $router->get('/presence/bulk-update-location', 'PresenceController@bulkUpdateLocation');
$router->get('/permit/edit/{id}', 'AbsentController@edit');
$router->put('/permit/update/{id}', 'AbsentController@update'); $router->post('/permit/add', 'AbsentController@add');
$router->post('/permit/search', 'AbsentController@search'); $router->get('/permit/edit/{id}', 'AbsentController@edit');
$router->delete('/permit/delete/{id}', 'AbsentController@delete'); $router->put('/permit/update/{id}', 'AbsentController@update');
$router->get('/permit/list', 'AbsentController@list'); $router->post('/permit/search', 'AbsentController@search');
$router->delete('/permit/delete/{id}', 'AbsentController@delete');
$router->post('/assign-tools/add', 'AssignToolsController@add'); $router->get('/permit/list', 'AbsentController@list');
$router->get('/assign-tools/edit/{id}', 'AssignToolsController@edit');
$router->put('/assign-tools/update/{id}', 'AssignToolsController@update'); $router->post('/assign-tools/add', 'AssignToolsController@add');
$router->post('/assign-tools/search', 'AssignToolsController@search'); $router->get('/assign-tools/edit/{id}', 'AssignToolsController@edit');
$router->delete('/assign-tools/delete/{id}', 'AssignToolsController@delete'); $router->put('/assign-tools/update/{id}', 'AssignToolsController@update');
$router->get('/assign-tools/list', 'AssignToolsController@list'); $router->post('/assign-tools/search', 'AssignToolsController@search');
$router->get('/assign-tools/datatables', 'AssignToolsController@datatables'); $router->delete('/assign-tools/delete/{id}', 'AssignToolsController@delete');
$router->get('/assign-tools/list', 'AssignToolsController@list');
$router->post('/assign-material/add', 'AssignMaterialController@add'); $router->get('/assign-tools/datatables', 'AssignToolsController@datatables');
$router->get('/assign-material/edit/{id}', 'AssignMaterialController@edit');
$router->put('/assign-material/update/{id}', 'AssignMaterialController@update'); $router->post('/assign-material/add', 'AssignMaterialController@add');
$router->post('/assign-material/search', 'AssignMaterialController@search'); $router->get('/assign-material/edit/{id}', 'AssignMaterialController@edit');
$router->delete('/assign-material/delete/{id}', 'AssignMaterialController@delete'); $router->put('/assign-material/update/{id}', 'AssignMaterialController@update');
$router->get('/assign-material/list', 'AssignMaterialController@list'); $router->post('/assign-material/search', 'AssignMaterialController@search');
$router->get('/assign-material/datatables', 'AssignMaterialController@datatables'); $router->delete('/assign-material/delete/{id}', 'AssignMaterialController@delete');
$router->get('/assign-material/datatablesForReportActivity', 'AssignMaterialController@datatablesForReportActivity'); $router->get('/assign-material/list', 'AssignMaterialController@list');
$router->post('/assign-material/ForReportActivityByMaterial', 'AssignMaterialController@ForReportActivityByMaterial'); $router->get('/assign-material/datatables', 'AssignMaterialController@datatables');
$router->get('/assign-material/datatablesForReportActivity', 'AssignMaterialController@datatablesForReportActivity');
$router->post('/image/search', 'ImageController@search'); $router->post('/assign-material/ForReportActivityByMaterial', 'AssignMaterialController@ForReportActivityByMaterial');
$router->delete('/image/delete/{id}', 'ImageController@delete');
$router->delete('/image/delete/{id}/{category}', 'ImageController@deleteByRef'); $router->post('/image/search', 'ImageController@search');
$router->post('/image/upload', 'ImageController@uploadImage'); $router->delete('/image/delete/{id}', 'ImageController@delete');
$router->get('/image/{id}/{category}', 'ImageController@getByRefId'); $router->delete('/image/delete/{id}/{category}', 'ImageController@deleteByRef');
$router->post('/image/upload', 'ImageController@uploadImage');
$router->post('/panic-button/add', 'PanicButtonController@add'); $router->get('/image/{id}/{category}', 'ImageController@getByRefId');
$router->get('/panic-button/edit/{id}', 'PanicButtonController@edit');
$router->put('/panic-button/update/{id}', 'PanicButtonController@update'); $router->post('/panic-button/add', 'PanicButtonController@add');
$router->post('/panic-button/search', 'PanicButtonController@search'); $router->get('/panic-button/edit/{id}', 'PanicButtonController@edit');
$router->delete('/panic-button/delete/{id}', 'PanicButtonController@delete'); $router->put('/panic-button/update/{id}', 'PanicButtonController@update');
$router->get('/panic-button/list', 'PanicButtonController@list'); $router->post('/panic-button/search', 'PanicButtonController@search');
$router->delete('/panic-button/delete/{id}', 'PanicButtonController@delete');
$router->post('/rate-sallary/add', 'RateSallaryController@add'); $router->get('/panic-button/list', 'PanicButtonController@list');
$router->get('/rate-sallary/edit/{id}', 'RateSallaryController@edit');
$router->put('/rate-sallary/update/{id}', 'RateSallaryController@update'); $router->post('/rate-sallary/add', 'RateSallaryController@add');
$router->post('/rate-sallary/search', 'RateSallaryController@search'); $router->get('/rate-sallary/edit/{id}', 'RateSallaryController@edit');
$router->delete('/rate-sallary/delete/{id}', 'RateSallaryController@delete'); $router->put('/rate-sallary/update/{id}', 'RateSallaryController@update');
$router->get('/rate-sallary/list', 'RateSallaryController@list'); $router->post('/rate-sallary/search', 'RateSallaryController@search');
$router->delete('/rate-sallary/delete/{id}', 'RateSallaryController@delete');
$router->post('/project-participants/add', 'ProjectParticipantsController@add'); $router->get('/rate-sallary/list', 'RateSallaryController@list');
$router->get('/project-participants/edit/{id}', 'ProjectParticipantsController@edit');
$router->put('/project-participants/update/{id}', 'ProjectParticipantsController@update'); $router->post('/project-participants/add', 'ProjectParticipantsController@add');
$router->post('/project-participants/search', 'ProjectParticipantsController@search'); $router->get('/project-participants/edit/{id}', 'ProjectParticipantsController@edit');
$router->delete('/project-participants/delete/{id}', 'ProjectParticipantsController@delete'); $router->put('/project-participants/update/{id}', 'ProjectParticipantsController@update');
$router->delete('/project-participants/delete-by-proyek/{id}', 'ProjectParticipantsController@deleteByProyek'); $router->post('/project-participants/search', 'ProjectParticipantsController@search');
$router->get('/project-participants/list', 'ProjectParticipantsController@list'); $router->delete('/project-participants/delete/{id}', 'ProjectParticipantsController@delete');
$router->get('/project-participants/{where}/{val}', 'ProjectParticipantsController@customWhere'); $router->delete('/project-participants/delete-by-proyek/{id}', 'ProjectParticipantsController@deleteByProyek');
$router->get('/project-participants/list', 'ProjectParticipantsController@list');
$router->post('/project-approval/add', 'ProjectApprovalController@add'); $router->get('/project-participants/{where}/{val}', 'ProjectParticipantsController@customWhere');
$router->get('/project-approval/edit/{id}', 'ProjectApprovalController@edit');
$router->put('/project-approval/update/{id}', 'ProjectApprovalController@update'); $router->post('/project-approval/add', 'ProjectApprovalController@add');
$router->post('/project-approval/search', 'ProjectApprovalController@search'); $router->get('/project-approval/edit/{id}', 'ProjectApprovalController@edit');
$router->delete('/project-approval/delete/{id}', 'ProjectApprovalController@delete'); $router->put('/project-approval/update/{id}', 'ProjectApprovalController@update');
$router->delete('/project-approval/delete-by-proyek/{id}', 'ProjectApprovalController@deleteByProyek'); $router->post('/project-approval/search', 'ProjectApprovalController@search');
$router->get('/project-approval/list', 'ProjectApprovalController@list'); $router->delete('/project-approval/delete/{id}', 'ProjectApprovalController@delete');
$router->get('/project-approval/{where}/{val}', 'ProjectApprovalController@customWhere'); $router->delete('/project-approval/delete-by-proyek/{id}', 'ProjectApprovalController@deleteByProyek');
$router->get('/project-approval/list', 'ProjectApprovalController@list');
$router->post('/project-milestone/add', 'ProjectMileStoneController@add'); $router->get('/project-approval/{where}/{val}', 'ProjectApprovalController@customWhere');
$router->get('/project-milestone/edit/{id}', 'ProjectMileStoneController@edit');
$router->put('/project-milestone/update/{id}', 'ProjectMileStoneController@update'); $router->post('/project-milestone/add', 'ProjectMileStoneController@add');
$router->post('/project-milestone/search', 'ProjectMileStoneController@search'); $router->get('/project-milestone/edit/{id}', 'ProjectMileStoneController@edit');
$router->delete('/project-milestone/delete/{id}', 'ProjectMileStoneController@delete'); $router->put('/project-milestone/update/{id}', 'ProjectMileStoneController@update');
$router->delete('/project-milestone/delete-by-proyek/{id}', 'ProjectMileStoneController@deleteByProyek'); $router->post('/project-milestone/search', 'ProjectMileStoneController@search');
$router->get('/project-milestone/list', 'ProjectMileStoneController@list'); $router->delete('/project-milestone/delete/{id}', 'ProjectMileStoneController@delete');
$router->get('/project-milestone/select', 'ProjectMileStoneController@select'); $router->delete('/project-milestone/delete-by-proyek/{id}', 'ProjectMileStoneController@deleteByProyek');
$router->get('/project-milestone/{where}/{val}', 'ProjectMileStoneController@customWhere'); $router->get('/project-milestone/list', 'ProjectMileStoneController@list');
$router->get('/project-milestone/select', 'ProjectMileStoneController@select');
$router->post('/report-activity/add', 'ReportActivityController@add'); $router->get('/project-milestone/{where}/{val}', 'ProjectMileStoneController@customWhere');
$router->get('/report-activity/edit/{id}', 'ReportActivityController@edit');
$router->put('/report-activity/update/{id}', 'ReportActivityController@update'); $router->post('/report-activity/add', 'ReportActivityController@add');
$router->post('/report-activity/search', 'ReportActivityController@search'); $router->get('/report-activity/edit/{id}', 'ReportActivityController@edit');
$router->delete('/report-activity/delete/{id}', 'ReportActivityController@delete'); $router->put('/report-activity/update/{id}', 'ReportActivityController@update');
$router->get('/report-activity/list', 'ReportActivityController@list'); $router->post('/report-activity/search', 'ReportActivityController@search');
$router->post('/report-activity/search-point', 'ReportActivityController@searchPoint'); $router->delete('/report-activity/delete/{id}', 'ReportActivityController@delete');
$router->get('/report-activity/datatables', 'ReportActivityController@datatables'); $router->get('/report-activity/list', 'ReportActivityController@list');
$router->post('/report-activity/search-point', 'ReportActivityController@searchPoint');
$router->post('/report-activity-material/add', 'ReportActivityMaterialController@add'); $router->get('/report-activity/datatables', 'ReportActivityController@datatables');
$router->post('/report-activity-material/search', 'ReportActivityMaterialController@search');
$router->delete('/report-activity-material/delete/{id}', 'ReportActivityMaterialController@delete'); $router->post('/report-activity-material/add', 'ReportActivityMaterialController@add');
$router->get('/report-activity-material/list', 'ReportActivityMaterialController@list'); $router->post('/report-activity-material/search', 'ReportActivityMaterialController@search');
$router->get('/report-activity-material/datatables', 'ReportActivityMaterialController@datatables'); $router->delete('/report-activity-material/delete/{id}', 'ReportActivityMaterialController@delete');
$router->post('/report-activity-material/update-status', 'ReportActivityMaterialController@updateStatusStartFinish'); $router->get('/report-activity-material/list', 'ReportActivityMaterialController@list');
$router->get('/report-activity-material/datatables', 'ReportActivityMaterialController@datatables');
$router->post('/waypoint/add', 'WaypointController@add'); $router->post('/report-activity-material/update-status', 'ReportActivityMaterialController@updateStatusStartFinish');
$router->post('/waypoint/add-bulk', 'WaypointController@addBulk');
$router->get('/waypoint/edit/{id}', 'WaypointController@edit'); $router->post('/waypoint/add', 'WaypointController@add');
$router->put('/waypoint/update/{id}', 'WaypointController@update'); $router->post('/waypoint/add-bulk', 'WaypointController@addBulk');
$router->post('/waypoint/search', 'WaypointController@search'); $router->get('/waypoint/edit/{id}', 'WaypointController@edit');
$router->delete('/waypoint/delete/{id}', 'WaypointController@delete'); $router->put('/waypoint/update/{id}', 'WaypointController@update');
$router->get('/waypoint/list', 'WaypointController@list'); $router->post('/waypoint/search', 'WaypointController@search');
$router->delete('/waypoint/delete/{id}', 'WaypointController@delete');
$router->post('/holiday/add', 'HolidayController@add'); $router->get('/waypoint/list', 'WaypointController@list');
$router->get('/holiday/edit/{id}', 'HolidayController@edit');
$router->put('/holiday/update/{id}', 'HolidayController@update'); $router->post('/holiday/add', 'HolidayController@add');
$router->post('/holiday/search', 'HolidayController@search'); $router->get('/holiday/edit/{id}', 'HolidayController@edit');
$router->delete('/holiday/delete/{id}', 'HolidayController@delete'); $router->put('/holiday/update/{id}', 'HolidayController@update');
$router->get('/holiday/list', 'HolidayController@list'); $router->post('/holiday/search', 'HolidayController@search');
$router->get('/holiday/datatables', 'HolidayController@datatables'); $router->delete('/holiday/delete/{id}', 'HolidayController@delete');
$router->get('/holiday/list', 'HolidayController@list');
$router->post('/satuan/add', 'SatuanController@add'); $router->get('/holiday/datatables', 'HolidayController@datatables');
$router->get('/satuan/edit/{id}', 'SatuanController@edit');
$router->put('/satuan/update/{id}', 'SatuanController@update'); $router->post('/satuan/add', 'SatuanController@add');
$router->post('/satuan/search', 'SatuanController@search'); $router->get('/satuan/edit/{id}', 'SatuanController@edit');
$router->delete('/satuan/delete/{id}', 'SatuanController@delete'); $router->put('/satuan/update/{id}', 'SatuanController@update');
$router->get('/satuan/list', 'SatuanController@list'); $router->post('/satuan/search', 'SatuanController@search');
$router->delete('/satuan/delete/{id}', 'SatuanController@delete');
$router->post('/checklist-k3/add', 'ChecklistK3Controller@add'); $router->get('/satuan/list', 'SatuanController@list');
$router->get('/checklist-k3/edit/{id}', 'ChecklistK3Controller@edit');
$router->put('/checklist-k3/update/{id}', 'ChecklistK3Controller@update'); $router->post('/checklist-k3/add', 'ChecklistK3Controller@add');
$router->post('/checklist-k3/search', 'ChecklistK3Controller@search'); $router->get('/checklist-k3/edit/{id}', 'ChecklistK3Controller@edit');
$router->delete('/checklist-k3/delete/{id}', 'ChecklistK3Controller@delete'); $router->put('/checklist-k3/update/{id}', 'ChecklistK3Controller@update');
$router->get('/checklist-k3/list', 'ChecklistK3Controller@list'); $router->post('/checklist-k3/search', 'ChecklistK3Controller@search');
$router->delete('/checklist-k3/delete/{id}', 'ChecklistK3Controller@delete');
$router->post('/report-k3/add', 'ReportK3Controller@add'); $router->get('/checklist-k3/list', 'ChecklistK3Controller@list');
$router->get('/report-k3/edit/{id}', 'ReportK3Controller@edit');
$router->put('/report-k3/update/{id}', 'ReportK3Controller@update'); $router->post('/report-k3/add', 'ReportK3Controller@add');
$router->post('/report-k3/search', 'ReportK3Controller@search'); $router->get('/report-k3/edit/{id}', 'ReportK3Controller@edit');
$router->delete('/report-k3/delete/{id}', 'ReportK3Controller@delete'); $router->put('/report-k3/update/{id}', 'ReportK3Controller@update');
$router->get('/report-k3/list', 'ReportK3Controller@list'); $router->post('/report-k3/search', 'ReportK3Controller@search');
$router->delete('/report-k3/delete/{id}', 'ReportK3Controller@delete');
$router->post('/report-k3-detail/add', 'ReportK3DetailController@add'); $router->get('/report-k3/list', 'ReportK3Controller@list');
$router->get('/report-k3-detail/edit/{id}', 'ReportK3DetailController@edit');
$router->put('/report-k3-detail/update/{id}', 'ReportK3DetailController@update'); $router->post('/report-k3-detail/add', 'ReportK3DetailController@add');
$router->post('/report-k3-detail/search', 'ReportK3DetailController@search'); $router->get('/report-k3-detail/edit/{id}', 'ReportK3DetailController@edit');
$router->delete('/report-k3-detail/delete/{id}', 'ReportK3DetailController@delete'); $router->put('/report-k3-detail/update/{id}', 'ReportK3DetailController@update');
$router->get('/report-k3-detail/list', 'ReportK3DetailController@list'); $router->post('/report-k3-detail/search', 'ReportK3DetailController@search');
$router->delete('/report-k3-detail/delete/{id}', 'ReportK3DetailController@delete');
$router->post('/user-to-proyek/add', 'UserToProyekController@add'); $router->get('/report-k3-detail/list', 'ReportK3DetailController@list');
$router->get('/user-to-proyek/edit/{id}', 'UserToProyekController@edit');
$router->put('/user-to-proyek/update/{id}', 'UserToProyekController@update'); $router->post('/user-to-proyek/add', 'UserToProyekController@add');
$router->post('/user-to-proyek/search', 'UserToProyekController@search'); $router->get('/user-to-proyek/edit/{id}', 'UserToProyekController@edit');
$router->delete('/user-to-proyek/delete/{id}', 'UserToProyekController@delete'); $router->put('/user-to-proyek/update/{id}', 'UserToProyekController@update');
$router->get('/user-to-proyek/list', 'UserToProyekController@list'); $router->post('/user-to-proyek/search', 'UserToProyekController@search');
$router->get('/user-to-proyek/select', 'UserToProyekController@select'); $router->delete('/user-to-proyek/delete/{id}', 'UserToProyekController@delete');
$router->get('/user-to-proyek/get-employee-integration', 'UserToProyekController@getEmployeeIntegration'); $router->get('/user-to-proyek/list', 'UserToProyekController@list');
$router->get('/user-to-proyek/select', 'UserToProyekController@select');
$router->post('/folder-document-proyek/add', 'FolderDocumentProyekController@add'); $router->get('/user-to-proyek/get-employee-integration', 'UserToProyekController@getEmployeeIntegration');
$router->get('/folder-document-proyek/edit/{id}', 'FolderDocumentProyekController@edit');
$router->put('/folder-document-proyek/update/{id}', 'FolderDocumentProyekController@update'); $router->post('/folder-document-proyek/add', 'FolderDocumentProyekController@add');
$router->post('/folder-document-proyek/search', 'FolderDocumentProyekController@search'); $router->get('/folder-document-proyek/edit/{id}', 'FolderDocumentProyekController@edit');
$router->delete('/folder-document-proyek/delete/{id}', 'FolderDocumentProyekController@delete'); $router->put('/folder-document-proyek/update/{id}', 'FolderDocumentProyekController@update');
$router->get('/folder-document-proyek/list', 'FolderDocumentProyekController@list'); $router->post('/folder-document-proyek/search', 'FolderDocumentProyekController@search');
$router->get('/folder-document-proyek/get-tree/{id}', 'FolderDocumentProyekController@getTree'); $router->delete('/folder-document-proyek/delete/{id}', 'FolderDocumentProyekController@delete');
$router->get('/folder-document-proyek/list', 'FolderDocumentProyekController@list');
$router->post('/office-hours/add', 'OfficeHoursController@add'); $router->get('/folder-document-proyek/get-tree/{id}', 'FolderDocumentProyekController@getTree');
$router->get('/office-hours/edit/{id}', 'OfficeHoursController@edit');
$router->put('/office-hours/update/{id}', 'OfficeHoursController@update'); $router->post('/office-hours/add', 'OfficeHoursController@add');
$router->post('/office-hours/search', 'OfficeHoursController@search'); $router->get('/office-hours/edit/{id}', 'OfficeHoursController@edit');
$router->delete('/office-hours/delete/{id}', 'OfficeHoursController@delete'); $router->put('/office-hours/update/{id}', 'OfficeHoursController@update');
$router->get('/office-hours/list', 'OfficeHoursController@list'); $router->post('/office-hours/search', 'OfficeHoursController@search');
$router->delete('/office-hours/delete/{id}', 'OfficeHoursController@delete');
$router->get('/gantt-show-hide/get-by-gantt/{gantt_id}', 'ShowHideColumnController@getByUserGantt'); $router->get('/office-hours/list', 'OfficeHoursController@list');
$router->post('/gantt-show-hide/add', 'ShowHideColumnController@add');
$router->post('/gantt-show-hide/update/{gantt_id}', 'ShowHideColumnController@update'); $router->get('/gantt-show-hide/get-by-gantt/{gantt_id}', 'ShowHideColumnController@getByUserGantt');
$router->get('/gantt-show-hide/get-column-by-type/{type}', 'ShowHideColumnController@getColumnByType'); $router->post('/gantt-show-hide/add', 'ShowHideColumnController@add');
$router->post('/gantt-show-hide/update/{gantt_id}', 'ShowHideColumnController@update');
$router->get('/gantt-show-hide/get-column-by-type/{type}', 'ShowHideColumnController@getColumnByType');
$router->post('/shift/add', 'ShiftController@add');
$router->get('/shift/edit/{id}', 'ShiftController@edit');
$router->put('/shift/update/{id}', 'ShiftController@update'); $router->post('/shift/add', 'ShiftController@add');
$router->post('/shift/search', 'ShiftController@search'); $router->get('/shift/edit/{id}', 'ShiftController@edit');
$router->delete('/shift/delete/{id}', 'ShiftController@delete'); $router->put('/shift/update/{id}', 'ShiftController@update');
$router->get('/shift/list', 'ShiftController@list'); $router->post('/shift/search', 'ShiftController@search');
$router->delete('/shift/delete/{id}', 'ShiftController@delete');
$router->post('/user-monthly-shift/add', 'UserMonthlyShiftController@add'); $router->get('/shift/list', 'ShiftController@list');
$router->put('/user-monthly-shift/update/{id}', 'UserMonthlyShiftController@update');
$router->post('/user-monthly-shift/search', 'UserMonthlyShiftController@search'); $router->post('/user-monthly-shift/add', 'UserMonthlyShiftController@add');
$router->delete('/user-monthly-shift/delete/{id}', 'UserMonthlyShiftController@delete'); $router->put('/user-monthly-shift/update/{id}', 'UserMonthlyShiftController@update');
$router->delete('/user-monthly-shift/delete-at/{yyyymm}', 'UserMonthlyShiftController@deleteYYYYMM'); $router->post('/user-monthly-shift/search', 'UserMonthlyShiftController@search');
$router->get('/user-monthly-shift/list', 'UserMonthlyShiftController@list'); $router->delete('/user-monthly-shift/delete/{id}', 'UserMonthlyShiftController@delete');
$router->post('/user-monthly-shift/import', 'UserMonthlyShiftController@import'); $router->delete('/user-monthly-shift/delete-at/{yyyymm}', 'UserMonthlyShiftController@deleteYYYYMM');
$router->get('/user-monthly-shift/list/{yyyymm}', 'UserMonthlyShiftController@listYYYYMM'); $router->get('/user-monthly-shift/list', 'UserMonthlyShiftController@list');
$router->post('/user-monthly-shift/import', 'UserMonthlyShiftController@import');
$router->post('/user-to-shift/add', 'UserToShiftController@add'); $router->get('/user-monthly-shift/list/{yyyymm}', 'UserMonthlyShiftController@listYYYYMM');
$router->get('/user-to-shift/edit/{id}', 'UserToShiftController@edit');
$router->put('/user-to-shift/update/{id}', 'UserToShiftController@update'); $router->post('/user-to-shift/add', 'UserToShiftController@add');
$router->post('/user-to-shift/search', 'UserToShiftController@search'); $router->get('/user-to-shift/edit/{id}', 'UserToShiftController@edit');
$router->delete('/user-to-shift/delete/{id}', 'UserToShiftController@delete'); $router->put('/user-to-shift/update/{id}', 'UserToShiftController@update');
$router->get('/user-to-shift/list', 'UserToShiftController@list'); $router->post('/user-to-shift/search', 'UserToShiftController@search');
$router->delete('/user-to-shift/delete/{id}', 'UserToShiftController@delete');
$router->post('/control-monitoring/search', 'ControlMonitoringController@search'); $router->get('/user-to-shift/list', 'UserToShiftController@list');
$router->get('/currency/list', 'CurrencyController@list');
$router->post('/control-monitoring/search', 'ControlMonitoringController@search');
$router->post('/project-to-checklist-k3/add', 'ProjectToChecklistK3Controller@add'); $router->get('/currency/list', 'CurrencyController@list');
$router->post('/project-to-checklist-k3/add-multiple', 'ProjectToChecklistK3Controller@addMultiple');
$router->get('/project-to-checklist-k3/edit/{id}', 'ProjectToChecklistK3Controller@edit'); $router->post('/project-to-checklist-k3/add', 'ProjectToChecklistK3Controller@add');
$router->put('/project-to-checklist-k3/update/{id}', 'ProjectToChecklistK3Controller@update'); $router->post('/project-to-checklist-k3/add-multiple', 'ProjectToChecklistK3Controller@addMultiple');
$router->post('/project-to-checklist-k3/search', 'ProjectToChecklistK3Controller@search'); $router->get('/project-to-checklist-k3/edit/{id}', 'ProjectToChecklistK3Controller@edit');
$router->delete('/project-to-checklist-k3/delete/{id}', 'ProjectToChecklistK3Controller@delete'); $router->put('/project-to-checklist-k3/update/{id}', 'ProjectToChecklistK3Controller@update');
$router->get('/project-to-checklist-k3/list', 'ProjectToChecklistK3Controller@list'); $router->post('/project-to-checklist-k3/search', 'ProjectToChecklistK3Controller@search');
$router->delete('/project-to-checklist-k3/delete/{id}', 'ProjectToChecklistK3Controller@delete');
$router->post('/project-comment/add', 'ProjectCommentController@add'); $router->get('/project-to-checklist-k3/list', 'ProjectToChecklistK3Controller@list');
$router->put('/project-comment/update/{id}', 'ProjectCommentController@update');
$router->post('/project-comment/search', 'ProjectCommentController@search'); $router->post('/project-comment/add', 'ProjectCommentController@add');
$router->put('/project-comment/update/{id}', 'ProjectCommentController@update');
$router->get('/hierarchy-ftths', 'HierarchyFtthController@index'); $router->post('/project-comment/search', 'ProjectCommentController@search');
$router->post('/hierarchy-ftths', 'HierarchyFtthController@store');
$router->post('/hierarchy-ftths/search', 'HierarchyFtthController@search'); $router->get('/hierarchy-ftths', 'HierarchyFtthController@index');
$router->get('/hierarchy-ftths/{id}', 'HierarchyFtthController@show'); $router->post('/hierarchy-ftths', 'HierarchyFtthController@store');
$router->put('/hierarchy-ftths/{id}', 'HierarchyFtthController@update'); $router->post('/hierarchy-ftths/search', 'HierarchyFtthController@search');
$router->delete('/hierarchy-ftths/{id}', 'HierarchyFtthController@destroy'); $router->get('/hierarchy-ftths/{id}', 'HierarchyFtthController@show');
$router->get('/hierarchy-ftths/tree/{project_id}', 'HierarchyFtthController@getTreeByProject'); $router->put('/hierarchy-ftths/{id}', 'HierarchyFtthController@update');
$router->get('/hierarchy-ftths/tree-gantt/{gantt_id}', 'HierarchyFtthController@getTreeByGantt'); $router->delete('/hierarchy-ftths/{id}', 'HierarchyFtthController@destroy');
$router->get('/hierarchy-ftths/tree/{project_id}', 'HierarchyFtthController@getTreeByProject');
$router->post('/map-monitoring/search', 'MapMonitoringController@search'); $router->get('/hierarchy-ftths/tree-gantt/{gantt_id}', 'HierarchyFtthController@getTreeByGantt');
});
$router->post('/map-monitoring/search', 'MapMonitoringController@search');
$router->post('/broadcast/add', 'BroadcastController@add');
$router->get('/broadcast/edit/{id}', 'BroadcastController@edit');
$router->put('/broadcast/update/{id}', 'BroadcastController@update');
$router->post('/broadcast/search', 'BroadcastController@search');
$router->delete('/broadcast/delete/{id}', 'BroadcastController@delete');
$router->get('/broadcast/list', 'BroadcastController@list');
});
}); });

Loading…
Cancel
Save