mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
Update schedule editor
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\OCOM;
|
||||
use Illuminate\Http\Request;
|
||||
use function GuzzleHttp\json_encode;
|
||||
use function GuzzleHttp\Psr7\str;
|
||||
|
||||
class OCOMController extends Controller
|
||||
@@ -699,4 +700,30 @@ X20,\"Participer à des activités
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function jsonList()
|
||||
{
|
||||
$ocoms = \App\OCOM::all();
|
||||
|
||||
$name = [];
|
||||
|
||||
foreach ($ocoms as $ocom) {
|
||||
array_push($name, $ocom->ocom);
|
||||
}
|
||||
|
||||
return json_encode($name);
|
||||
}
|
||||
|
||||
public function getName(string $ocom)
|
||||
{
|
||||
$foo = \App\OCOM::all()->where('ocom','=',$ocom)->first();
|
||||
if($foo != null)
|
||||
{
|
||||
return $foo->objectif_competence;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class ScheduleEditorController extends Controller
|
||||
"end_time" => "20:30"
|
||||
],
|
||||
2 => [
|
||||
"name" => "Periode 1",
|
||||
"name" => "Periode 2",
|
||||
"begin_time" => "20:30",
|
||||
"end_time" => "21:20"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user