wip: timeline view

This commit is contained in:
Supan Adit Pratama 2025-03-13 15:46:56 +00:00
parent 3d0a8f361f
commit a5f719d082
5 changed files with 56 additions and 1 deletions

View File

@ -86,7 +86,7 @@ class SecurityController extends Controller
$user = \App\User::where("email", $request->input("email"))->first(); $user = \App\User::where("email", $request->input("email"))->first();
if ($user != null) { if ($user != null) {
return response()->json([ return response()->json([
"message" => "User with email " . $user->email . " is exist", "message" => "User with email " . $user->email . " is not available",
], 400); ], 400);
} else { } else {
if ($request->input('password') != $request->input('password_confirm')) { if ($request->input('password') != $request->input('password_confirm')) {

View File

@ -11,6 +11,11 @@ class TodoController extends Controller
return view('home'); return view('home');
} }
public function viewTimeline()
{
return view('timeline');
}
// Todo // Todo
public function todoList(Request $request) public function todoList(Request $request)
{ {

View File

@ -62,6 +62,7 @@
Change Password Change Password
</a> </a>
</li> </li>
<li><a href="/timeline">Timeline</a></li>
<li> <li>
<a href="#" class="logout-button visible-xs"> <a href="#" class="logout-button visible-xs">
Sign Out Sign Out

View File

@ -0,0 +1,48 @@
@extends('layout.admin')
@section('css')
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/frappe-gantt/dist/frappe-gantt.css">
@endsection
@section('title')
Timeline View
@endsection
@section('subtitle')
Your todo in a timeline view
@endsection
@section('css')
<style>
.widget-user {
cursor: pointer;
}
</style>
@endsection
@section('content')
<br/>
<div id="gantt"></div>
@endsection
@section('js')
<script src="https://cdn.jsdelivr.net/npm/frappe-gantt/dist/frappe-gantt.umd.js"></script>
<script type="application/javascript">
let tasks = [
{
id: '1',
name: 'Redesign website',
start: '2025-02-28',
end: '2025-03-16',
progress: 20
},
];
let gantt = new Gantt("#gantt", tasks, {
bar_height: 16,
container_height: 670,
view_mode_select: true,
});
</script>
@endsection

View File

@ -22,6 +22,7 @@ Route::get('/register', "SecurityController@viewRegister");
Route::middleware('auth.web')->group(function () { Route::middleware('auth.web')->group(function () {
Route::get('/home', "TodoController@viewHome"); Route::get('/home', "TodoController@viewHome");
Route::get('/timeline', "TodoController@viewTimeline");
Route::post('/web/change/password', "SecurityController@formChangePassword"); Route::post('/web/change/password', "SecurityController@formChangePassword");
// This group is used for internal API provided by session // This group is used for internal API provided by session