mirror of
https://github.com/supanadit/todo.git
synced 2025-05-18 03:09:52 +00:00
wip: timeline view
This commit is contained in:
parent
3d0a8f361f
commit
a5f719d082
app/Http/Controllers
resources/views
routes
@ -86,7 +86,7 @@ class SecurityController extends Controller
|
||||
$user = \App\User::where("email", $request->input("email"))->first();
|
||||
if ($user != null) {
|
||||
return response()->json([
|
||||
"message" => "User with email " . $user->email . " is exist",
|
||||
"message" => "User with email " . $user->email . " is not available",
|
||||
], 400);
|
||||
} else {
|
||||
if ($request->input('password') != $request->input('password_confirm')) {
|
||||
|
@ -11,6 +11,11 @@ class TodoController extends Controller
|
||||
return view('home');
|
||||
}
|
||||
|
||||
public function viewTimeline()
|
||||
{
|
||||
return view('timeline');
|
||||
}
|
||||
|
||||
// Todo
|
||||
public function todoList(Request $request)
|
||||
{
|
||||
|
@ -62,6 +62,7 @@
|
||||
Change Password
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="/timeline">Timeline</a></li>
|
||||
<li>
|
||||
<a href="#" class="logout-button visible-xs">
|
||||
Sign Out
|
||||
|
48
resources/views/timeline.blade.php
Normal file
48
resources/views/timeline.blade.php
Normal 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
|
@ -22,6 +22,7 @@ Route::get('/register', "SecurityController@viewRegister");
|
||||
|
||||
Route::middleware('auth.web')->group(function () {
|
||||
Route::get('/home', "TodoController@viewHome");
|
||||
Route::get('/timeline', "TodoController@viewTimeline");
|
||||
Route::post('/web/change/password', "SecurityController@formChangePassword");
|
||||
|
||||
// This group is used for internal API provided by session
|
||||
|
Loading…
x
Reference in New Issue
Block a user