Spaces:
Sleeping
Sleeping
Commit
·
e60277c
1
Parent(s):
dd18d72
added basic functionality
Browse files
public/css/dashboard/skill.css
CHANGED
@@ -56,6 +56,7 @@ .tasks{
|
|
56 |
align-items: center;
|
57 |
background-color: #fff;
|
58 |
border-radius: 10px;
|
|
|
59 |
}
|
60 |
.task{
|
61 |
box-shadow:0px 0px 10px -6px #000;
|
@@ -77,7 +78,7 @@ .task>span{
|
|
77 |
color: rgb(90, 90, 90);
|
78 |
}
|
79 |
|
80 |
-
#
|
81 |
position: absolute;
|
82 |
top:50%;
|
83 |
left:50%;
|
@@ -89,31 +90,31 @@ #modal,#task_modal{
|
|
89 |
background-color: #fafafa;
|
90 |
}
|
91 |
|
92 |
-
#
|
93 |
position:absolute;
|
94 |
top:10px;
|
95 |
right:10px;
|
96 |
cursor: pointer;
|
97 |
}
|
98 |
|
99 |
-
#
|
100 |
display: flex;
|
101 |
flex-direction: column;
|
102 |
align-items: center;
|
103 |
}
|
104 |
|
105 |
-
#
|
106 |
font-size: 2rem;
|
107 |
margin-bottom: 1rem;
|
108 |
}
|
109 |
|
110 |
-
#
|
111 |
display: flex;
|
112 |
flex-direction: column;
|
113 |
margin-top: 1rem;
|
114 |
}
|
115 |
|
116 |
-
#
|
117 |
border-radius: 10px;
|
118 |
border: none;
|
119 |
outline: none;
|
@@ -123,7 +124,7 @@ #modal .task_input{
|
|
123 |
box-shadow: 0px 0px 10px -8px;
|
124 |
}
|
125 |
|
126 |
-
#
|
127 |
border-radius: 50px;
|
128 |
border: none;
|
129 |
outline: none;
|
|
|
56 |
align-items: center;
|
57 |
background-color: #fff;
|
58 |
border-radius: 10px;
|
59 |
+
min-height:200px;
|
60 |
}
|
61 |
.task{
|
62 |
box-shadow:0px 0px 10px -6px #000;
|
|
|
78 |
color: rgb(90, 90, 90);
|
79 |
}
|
80 |
|
81 |
+
#createtask_modal,#task_modal{
|
82 |
position: absolute;
|
83 |
top:50%;
|
84 |
left:50%;
|
|
|
90 |
background-color: #fafafa;
|
91 |
}
|
92 |
|
93 |
+
#createtask_modal>.close_btn , #task_modal>.close_btn{
|
94 |
position:absolute;
|
95 |
top:10px;
|
96 |
right:10px;
|
97 |
cursor: pointer;
|
98 |
}
|
99 |
|
100 |
+
#createtask_modal>.container , #task_modal>.container{
|
101 |
display: flex;
|
102 |
flex-direction: column;
|
103 |
align-items: center;
|
104 |
}
|
105 |
|
106 |
+
#createtask_modal>.container>.title{
|
107 |
font-size: 2rem;
|
108 |
margin-bottom: 1rem;
|
109 |
}
|
110 |
|
111 |
+
#createtask_modal .field{
|
112 |
display: flex;
|
113 |
flex-direction: column;
|
114 |
margin-top: 1rem;
|
115 |
}
|
116 |
|
117 |
+
#createtask_modal .task_input{
|
118 |
border-radius: 10px;
|
119 |
border: none;
|
120 |
outline: none;
|
|
|
124 |
box-shadow: 0px 0px 10px -8px;
|
125 |
}
|
126 |
|
127 |
+
#createtask_modal .submit_btn{
|
128 |
border-radius: 50px;
|
129 |
border: none;
|
130 |
outline: none;
|
public/js/dashboard/skill.js
CHANGED
@@ -1,3 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
function showTask(task_id){
|
2 |
fetch(`${taskdetail_url}/${task_id}`,{
|
3 |
method:"GET",
|
|
|
1 |
+
function showCreateTask(task_type){
|
2 |
+
var task_type_elem = createtask_modal.querySelector("#task_type");
|
3 |
+
task_type_elem.value = task_type;
|
4 |
+
createtask_modal.showModal();
|
5 |
+
}
|
6 |
+
function closeCreateTask(){
|
7 |
+
createtask_modal.close();
|
8 |
+
}
|
9 |
function showTask(task_id){
|
10 |
fetch(`${taskdetail_url}/${task_id}`,{
|
11 |
method:"GET",
|
resources/views/dashboard/skill.blade.php
CHANGED
@@ -15,30 +15,54 @@
|
|
15 |
<div class="task_container">
|
16 |
<div class='header_container'>
|
17 |
<h2>Basic/Core Skills</h2>
|
18 |
-
<button class="new_btn" onclick="
|
19 |
</div>
|
20 |
<div class="tasks">
|
21 |
|
22 |
@foreach ($tasks as $task)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
<div class='task' onclick='showTask({{ $task->id }})'>
|
24 |
<span>{{ $task->title }}</span>
|
25 |
</div>
|
26 |
@endforeach
|
27 |
-
{{-- <div class='task' onclick='showTask(id)'>
|
28 |
-
<span>learn how fret works</span>
|
29 |
-
</div>
|
30 |
-
<div class='task'>
|
31 |
-
<span>learn how tuning keys works</span>
|
32 |
-
</div>
|
33 |
-
<div class='task'>
|
34 |
-
<span>learn guitar string names</span>
|
35 |
-
</div> --}}
|
36 |
|
37 |
</div>
|
38 |
</div>
|
39 |
</section>
|
40 |
-
<dialog id="
|
41 |
-
<i onclick="
|
42 |
<form class="container" method="POST" action="{{ route('dashboard.createtask', $skill->id) }}">
|
43 |
{{-- <form class="container" method="POST"> --}}
|
44 |
@csrf
|
@@ -85,16 +109,14 @@
|
|
85 |
|
86 |
<script src="{{ asset('js/dashboard/skill.js') }}"></script>
|
87 |
<script>
|
88 |
-
|
89 |
var taskdetail_url = "{{ route('dashboard.taskdetail', 1) }}";
|
90 |
taskdetail_url = taskdetail_url.split('/').slice(0, -1).join("/");
|
91 |
var taskdetail_url = "{{ route('dashboard.taskdetail', 1) }}";
|
92 |
taskdetail_url = taskdetail_url.split('/').slice(0, -1).join("/");
|
93 |
|
94 |
// task_modal.showModal();
|
95 |
-
@foreach($errors->all() as $error)
|
96 |
addError('{{ $error }}');
|
97 |
@endforeach
|
98 |
-
|
99 |
</script>
|
100 |
@endsection
|
|
|
15 |
<div class="task_container">
|
16 |
<div class='header_container'>
|
17 |
<h2>Basic/Core Skills</h2>
|
18 |
+
<button class="new_btn" onclick="showCreateTask('basic')">New</button>
|
19 |
</div>
|
20 |
<div class="tasks">
|
21 |
|
22 |
@foreach ($tasks as $task)
|
23 |
+
@continue($task->type != 'basic')
|
24 |
+
<div class='task' onclick='showTask({{ $task->id }})'>
|
25 |
+
<span>{{ $task->title }}</span>
|
26 |
+
</div>
|
27 |
+
@endforeach
|
28 |
+
|
29 |
+
</div>
|
30 |
+
</div>
|
31 |
+
<div class="task_container">
|
32 |
+
<div class='header_container'>
|
33 |
+
<h2>Sub Skills</h2>
|
34 |
+
<button class="new_btn" onclick="showCreateTask('sub')">New</button>
|
35 |
+
</div>
|
36 |
+
<div class="tasks">
|
37 |
+
|
38 |
+
@foreach ($tasks as $task)
|
39 |
+
@continue($task->type != 'sub')
|
40 |
+
<div class='task' onclick='showTask({{ $task->id }})'>
|
41 |
+
<span>{{ $task->title }}</span>
|
42 |
+
</div>
|
43 |
+
@endforeach
|
44 |
+
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
<div class="task_container">
|
48 |
+
<div class='header_container'>
|
49 |
+
<h2>Applications</h2>
|
50 |
+
<button class="new_btn" onclick="showCreateTask('app')">New</button>
|
51 |
+
</div>
|
52 |
+
<div class="tasks">
|
53 |
+
|
54 |
+
@foreach ($tasks as $task)
|
55 |
+
@continue($task->type != 'app')
|
56 |
<div class='task' onclick='showTask({{ $task->id }})'>
|
57 |
<span>{{ $task->title }}</span>
|
58 |
</div>
|
59 |
@endforeach
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
</div>
|
62 |
</div>
|
63 |
</section>
|
64 |
+
<dialog id="createtask_modal">
|
65 |
+
<i onclick="closeCreateTask()" class="fa-solid fa-xmark close_btn"></i>
|
66 |
<form class="container" method="POST" action="{{ route('dashboard.createtask', $skill->id) }}">
|
67 |
{{-- <form class="container" method="POST"> --}}
|
68 |
@csrf
|
|
|
109 |
|
110 |
<script src="{{ asset('js/dashboard/skill.js') }}"></script>
|
111 |
<script>
|
|
|
112 |
var taskdetail_url = "{{ route('dashboard.taskdetail', 1) }}";
|
113 |
taskdetail_url = taskdetail_url.split('/').slice(0, -1).join("/");
|
114 |
var taskdetail_url = "{{ route('dashboard.taskdetail', 1) }}";
|
115 |
taskdetail_url = taskdetail_url.split('/').slice(0, -1).join("/");
|
116 |
|
117 |
// task_modal.showModal();
|
118 |
+
@foreach ($errors->all() as $error)
|
119 |
addError('{{ $error }}');
|
120 |
@endforeach
|
|
|
121 |
</script>
|
122 |
@endsection
|