|
|
@ -5,6 +5,7 @@ namespace App\Http\Controllers; |
|
|
|
use Illuminate\Http\Request; |
|
|
|
use Illuminate\Http\Request; |
|
|
|
use App\Models\UserToVersionGantt; |
|
|
|
use App\Models\UserToVersionGantt; |
|
|
|
use App\Models\ShowHideColumn; |
|
|
|
use App\Models\ShowHideColumn; |
|
|
|
|
|
|
|
use App\Models\GanttColumnByType; |
|
|
|
|
|
|
|
|
|
|
|
class ShowHideColumnController extends Controller |
|
|
|
class ShowHideColumnController extends Controller |
|
|
|
{ |
|
|
|
{ |
|
|
@ -111,11 +112,21 @@ class ShowHideColumnController extends Controller |
|
|
|
$success--; |
|
|
|
$success--; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if($success > 0){ |
|
|
|
if($success > 0){ |
|
|
|
return response()->json(['status'=>'success','message'=>'data show hide column successfully updated!','code'=>200], 200); |
|
|
|
return response()->json(['status'=>'success','message'=>'data show hide column successfully updated!','code'=>200], 200); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
return response()->json(['status'=>'failed','message'=>'data show hide column failed updated!','code'=>400], 400); |
|
|
|
return response()->json(['status'=>'failed','message'=>'data show hide column failed updated!','code'=>400], 400); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getColumnByType($type = 'detail') |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$data = GanttColumnByType::where("calculation_type", $type)->get(); |
|
|
|
|
|
|
|
if(!$data) |
|
|
|
|
|
|
|
return response()->json(['status'=>'failed','message'=>'No data found!','code'=> 404], 404); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return response()->json(['status'=>'success','code'=>200,'data'=>$data], 200); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|