Commit 5ceb88b4443fe6dede631114f0a9402cd8b704ec
1 parent
cbf69abb68
Exists in
master
and in
3 other branches
added pdf option while uploading file in assignment and ser roution option in academic
Showing
2 changed files
with
556 additions
and
521 deletions
Show diff stats
src/pages/Academic/assignment.vue
... | ... | @@ -12,6 +12,34 @@ |
12 | 12 | <v-container fluid> |
13 | 13 | <v-form ref="formEditAssignment" v-model="validEditAssignment" lazy-validation> |
14 | 14 | <v-layout> |
15 | + <v-flex | |
16 | + xs12 | |
17 | + class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" | |
18 | + > | |
19 | + <v-avatar size="140px" v-if="!editedItem.file && !imageUrl"> | |
20 | + <img src="/static/icon/user.png" /> | |
21 | + </v-avatar> | |
22 | + <img | |
23 | + :src="editedItem.file" | |
24 | + v-else-if="editedItem.file && !imageUrl" | |
25 | + style="border-radius:50%; width:150px" | |
26 | + /> | |
27 | + <img | |
28 | + v-if="imageUrl" | |
29 | + :src="imageUrl" | |
30 | + height="150" | |
31 | + style="border-radius:50%; width:150px" | |
32 | + /> | |
33 | + <input | |
34 | + type="file" | |
35 | + style="display:none" | |
36 | + ref="image" | |
37 | + accept="image/*" | |
38 | + @change="onFilePicked" | |
39 | + /> | |
40 | + </v-flex> | |
41 | + </v-layout> | |
42 | + <v-layout> | |
15 | 43 | <v-flex xs4 class="pt-4 subheading"> |
16 | 44 | <label class="right">Title:</label> |
17 | 45 | </v-flex> |
... | ... | @@ -114,18 +142,11 @@ |
114 | 142 | </v-flex> |
115 | 143 | <v-flex xs8 class="ml-3"> |
116 | 144 | <v-text-field |
117 | - label="Select file" | |
145 | + label="Select Image" | |
118 | 146 | @click="pickFile" |
119 | - v-model="editedItem.imageName" | |
147 | + v-model="imageName" | |
120 | 148 | append-icon="attach_file" |
121 | 149 | ></v-text-field> |
122 | - <input | |
123 | - type="file" | |
124 | - style="display:none" | |
125 | - ref="image" | |
126 | - accept="image/*" | |
127 | - @change="onFilePicked" | |
128 | - /> | |
129 | 150 | </v-flex> |
130 | 151 | </v-layout> |
131 | 152 | <v-flex xs12 sm12> |
... | ... | @@ -253,10 +274,22 @@ |
253 | 274 | <td class="text-xs-center td td-row">{{ props.item.description }}</td> |
254 | 275 | <td class="text-xs-center td td-row">{{ props.item.deadline }}</td> |
255 | 276 | <td class="text-xs-center td td-row">{{ props.item.sectionId.name }}</td> |
256 | - <td class="text-xs-center td td-row" v-if="role != 'ADMIN' ">{{ props.item.teacherId.name }}</td> | |
257 | - <td class="text-xs-center td td-row" v-if="role != 'TEACHER' ">{{ props.item.schoolId .name }}</td> | |
277 | + <td | |
278 | + class="text-xs-center td td-row" | |
279 | + v-if="role != 'ADMIN' " | |
280 | + >{{ props.item.teacherId.name }}</td> | |
281 | + <td | |
282 | + class="text-xs-center td td-row" | |
283 | + v-if="role != 'TEACHER' " | |
284 | + >{{ props.item.schoolId .name }}</td> | |
258 | 285 | <!-- <td class="text-xs-center td td-row">{{ props.item.file }}</td> --> |
259 | 286 | <td class="text-xs-center td td-row"> |
287 | + <v-avatar> | |
288 | + <img :src="props.item.file" v-if="props.item.file" /> | |
289 | + <img src="/static/icon/user.png" v-else-if="!props.item.file" /> | |
290 | + </v-avatar> | |
291 | + </td> | |
292 | + <td class="text-xs-center td td-row"> | |
260 | 293 | <span> |
261 | 294 | <v-tooltip top> |
262 | 295 | <img |
... | ... | @@ -321,6 +354,19 @@ |
321 | 354 | <v-flex xs12> |
322 | 355 | <v-form ref="form" v-model="valid" lazy-validation> |
323 | 356 | <v-layout> |
357 | + <v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center"> | |
358 | + <v-avatar size="80px"> | |
359 | + <img src="/static/icon/user.png" v-if="!imageUrl" /> | |
360 | + </v-avatar> | |
361 | + <img | |
362 | + :src="imageUrl" | |
363 | + height="150" | |
364 | + v-if="imageUrl" | |
365 | + style="border-radius:50%; width:150px" | |
366 | + /> | |
367 | + </v-flex> | |
368 | + </v-layout> | |
369 | + <v-layout> | |
324 | 370 | <v-flex xs4 sm4 class="pt-4 subheading"> |
325 | 371 | <label class="right">Title :</label> |
326 | 372 | </v-flex> |
... | ... | @@ -442,7 +488,7 @@ |
442 | 488 | <v-text-field |
443 | 489 | label="Select file" |
444 | 490 | @click="pickFile" |
445 | - v-model="addAssignment.file" | |
491 | + v-model="imageName" | |
446 | 492 | append-icon="attach_file" |
447 | 493 | ></v-text-field> |
448 | 494 | <input |
... | ... | @@ -553,12 +599,12 @@ export default { |
553 | 599 | sortable: false, |
554 | 600 | align: "center" |
555 | 601 | }, |
556 | - // { | |
557 | - // text: "File", | |
558 | - // value: "file", | |
559 | - // sortable: false, | |
560 | - // align: "center" | |
561 | - // }, | |
602 | + { | |
603 | + text: "File", | |
604 | + value: "file", | |
605 | + sortable: false, | |
606 | + align: "center" | |
607 | + }, | |
562 | 608 | { text: "Action", value: "", sortable: false, align: "center" } |
563 | 609 | ], |
564 | 610 | assignmentData: [], |
... | ... | @@ -578,7 +624,7 @@ export default { |
578 | 624 | file: "" |
579 | 625 | }, |
580 | 626 | addAssignment: {}, |
581 | - | |
627 | + | |
582 | 628 | imageData: {}, |
583 | 629 | imageName: "", |
584 | 630 | imageUrl: "", |
... | ... | @@ -809,7 +855,7 @@ export default { |
809 | 855 | // console.log(e) |
810 | 856 | const files = e.target.files; |
811 | 857 | this.upload = e.target.files[0]; |
812 | - // console.log("imageData-upload========>", this.upload); | |
858 | + console.log("imageData-upload========>", this.upload); | |
813 | 859 | if (files[0] !== undefined) { |
814 | 860 | this.imageName = files[0].name; |
815 | 861 | if (this.imageName.lastIndexOf(".") <= 0) { |
... | ... | @@ -820,9 +866,9 @@ export default { |
820 | 866 | fr.addEventListener("load", () => { |
821 | 867 | this.imageUrl = fr.result; |
822 | 868 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
823 | - this.imageData.imageUrl = URL.createObjectURL(this.imageFile); | |
824 | - // console.log("upload=======>", this.imageData.imageUrl); | |
825 | - // console.log("imageFile", this.imageUrl); | |
869 | + // this.imageData.imageUrl = URL.createObjectURL(this.imageFile); | |
870 | + // console.log("upload=======>", this.imageData.imageUrl); | |
871 | + console.log("imageFile", this.imageUrl); | |
826 | 872 | }); |
827 | 873 | } else { |
828 | 874 | this.imageName = ""; | ... | ... |
src/pages/Academic/routine.vue
... | ... | @@ -5,25 +5,85 @@ |
5 | 5 | <v-card flat class="card-style pa-2" dark> |
6 | 6 | <v-layout> |
7 | 7 | <v-flex xs12> |
8 | - <label class="title text-xs-center">Edit Subject</label> | |
8 | + <label class="title text-xs-center">Edit Routine</label> | |
9 | 9 | <v-icon size="24" class="right" @click="editRoutineDialog = false">cancel</v-icon> |
10 | 10 | </v-flex> |
11 | 11 | </v-layout> |
12 | 12 | <v-container fluid> |
13 | 13 | <v-form ref="formEditRoutine" v-model="validEditRoutine" lazy-validation> |
14 | 14 | <v-layout> |
15 | - <v-flex xs4 class="pt-4 subheading"> | |
16 | - <label class="right">Class:</label> | |
15 | + <v-flex xs4 sm4 class="pt-4 subheading"> | |
16 | + <label class="right">School Year :</label> | |
17 | + </v-flex> | |
18 | + <v-flex xs8 sm8 class="ml-3"> | |
19 | + <v-text-field v-model="editedItem.schoolYear" label="Select Year"></v-text-field> | |
20 | + </v-flex> | |
21 | + </v-layout> | |
22 | + <v-layout> | |
23 | + <v-flex xs4 sm4 class="pt-4 subheading"> | |
24 | + <label class="right">Class :</label> | |
17 | 25 | </v-flex> |
18 | - <v-flex xs8 class="ml-3"> | |
26 | + <v-flex xs8 sm8 class="ml-3"> | |
19 | 27 | <v-select |
20 | - v-model="editedItem.classId" | |
21 | - label="Select your class" | |
22 | - type="text" | |
23 | 28 | :items="classList" |
29 | + label="Select Class" | |
24 | 30 | item-text="classNum" |
25 | 31 | item-value="_id" |
32 | + v-model="editedItem.classId" | |
33 | + name="Select Class" | |
26 | 34 | :rules="classRules" |
35 | + @change="getSections(addRoutine.classId)" | |
36 | + class="pl-2" | |
37 | + required | |
38 | + ></v-select> | |
39 | + </v-flex> | |
40 | + </v-layout> | |
41 | + <v-layout> | |
42 | + <v-flex xs4 sm4 class="pt-4 subheading"> | |
43 | + <label class="right">Section :</label> | |
44 | + </v-flex> | |
45 | + <v-flex xs8 sm8 class="ml-3"> | |
46 | + <v-select | |
47 | + :items="addSection" | |
48 | + label="Select Section" | |
49 | + item-text="name" | |
50 | + item-value="_id" | |
51 | + v-model="editedItem.sectionId" | |
52 | + name="Select Section" | |
53 | + :rules="sectionRules" | |
54 | + @change="getClassSubject(addRoutine.classId)" | |
55 | + class="px-2" | |
56 | + required | |
57 | + ></v-select> | |
58 | + </v-flex> | |
59 | + </v-layout> | |
60 | + <v-layout> | |
61 | + <v-flex xs3 sm4 class="pt-4 subheading"> | |
62 | + <label class="right">Subject :</label> | |
63 | + </v-flex> | |
64 | + <v-flex xs8 sm8 class="ml-2"> | |
65 | + <v-select | |
66 | + :items="subjectList.subjects" | |
67 | + label="Select your subject" | |
68 | + v-model="editedItem.subjectName" | |
69 | + item-text="subjectName" | |
70 | + item-value="_id" | |
71 | + :rules="subjectRules" | |
72 | + required | |
73 | + ></v-select> | |
74 | + </v-flex> | |
75 | + </v-layout> | |
76 | + <v-layout> | |
77 | + <v-flex xs3 sm4 class="pt-4 subheading"> | |
78 | + <label class="right">Day :</label> | |
79 | + </v-flex> | |
80 | + <v-flex xs8 sm8 class="ml-2"> | |
81 | + <v-select | |
82 | + :items="day" | |
83 | + label="Select your day" | |
84 | + v-model="editedItem.day" | |
85 | + item-text="text" | |
86 | + :rules="dayRules" | |
27 | 87 | required |
28 | 88 | ></v-select> |
29 | 89 | </v-flex> |
... | ... | @@ -47,174 +107,116 @@ |
47 | 107 | </v-layout> |
48 | 108 | <v-layout> |
49 | 109 | <v-flex xs4 sm4 class="pt-4 subheading"> |
50 | - <label class="right">Pass Mark :</label> | |
110 | + <label class="right">Starting time:</label> | |
51 | 111 | </v-flex> |
52 | 112 | <v-flex xs8 sm8 class="ml-3"> |
53 | - <v-text-field | |
54 | - label="Fill your Pass Mark" | |
55 | - name="name" | |
56 | - type="text" | |
57 | - :rules="markRules" | |
58 | - v-model="editedItem.passMarks" | |
59 | - required | |
60 | - ></v-text-field> | |
113 | + <v-menu | |
114 | + ref="menuA" | |
115 | + :close-on-content-click="false" | |
116 | + v-model="menuB" | |
117 | + :nudge-right="40" | |
118 | + :return-value.sync="addRoutine.startingTime" | |
119 | + lazy | |
120 | + transition="scale-transition" | |
121 | + offset-y | |
122 | + full-width | |
123 | + max-width="290px" | |
124 | + min-width="290px" | |
125 | + > | |
126 | + <v-text-field | |
127 | + slot="activator" | |
128 | + v-model="editedItem.startingTime" | |
129 | + label="Select your starting time" | |
130 | + append-icon="access_time" | |
131 | + :rules="timeInRules" | |
132 | + readonly | |
133 | + ></v-text-field> | |
134 | + <v-time-picker | |
135 | + v-model="editedItem.startingTime" | |
136 | + @change="$refs.menuA.save(addRoutine.startingTime)" | |
137 | + ></v-time-picker> | |
138 | + </v-menu> | |
61 | 139 | </v-flex> |
62 | 140 | </v-layout> |
63 | 141 | <v-layout> |
64 | 142 | <v-flex xs4 sm4 class="pt-4 subheading"> |
65 | - <label class="right">Final Mark :</label> | |
143 | + <label class="right">Ending Time:</label> | |
66 | 144 | </v-flex> |
67 | 145 | <v-flex xs8 sm8 class="ml-3"> |
68 | - <v-text-field | |
69 | - label="Fill your final mark" | |
70 | - name="name" | |
71 | - type="text" | |
72 | - :rules="finalRules" | |
73 | - v-model="editedItem.finalMarks" | |
74 | - required | |
75 | - ></v-text-field> | |
146 | + <v-menu | |
147 | + ref="menu" | |
148 | + :close-on-content-click="false" | |
149 | + v-model="menu1" | |
150 | + :nudge-right="40" | |
151 | + :return-value.sync="addRoutine.endingTime" | |
152 | + lazy | |
153 | + transition="scale-transition" | |
154 | + offset-y | |
155 | + full-width | |
156 | + max-width="290px" | |
157 | + min-width="290px" | |
158 | + > | |
159 | + <v-text-field | |
160 | + slot="activator" | |
161 | + v-model="editedItem.endingTime" | |
162 | + label="Select your end time" | |
163 | + append-icon="access_time" | |
164 | + :rules="timeOutRules" | |
165 | + readonly | |
166 | + ></v-text-field> | |
167 | + <v-time-picker | |
168 | + v-model="editedItem.endingTime" | |
169 | + @change="$refs.menu.save(addRoutine.endingTime)" | |
170 | + ></v-time-picker> | |
171 | + </v-menu> | |
76 | 172 | </v-flex> |
77 | 173 | </v-layout> |
78 | 174 | <v-layout> |
79 | - <v-flex xs4 class="pt-4 subheading"> | |
80 | - <label class="right">Subject:</label> | |
175 | + <v-flex xs4 sm4 class="pt-4 subheading"> | |
176 | + <label class="right">Room:</label> | |
81 | 177 | </v-flex> |
82 | - <v-flex xs8 class="ml-3"> | |
178 | + <v-flex xs8 sm8 class="ml-3"> | |
83 | 179 | <v-text-field |
84 | - placeholder="fill your Subject" | |
85 | - v-model="editedItem.subjectName" | |
86 | - :rules="subjectRules" | |
87 | - type="text" | |
88 | - name="email" | |
89 | - required | |
180 | + label="fill your room" | |
181 | + :rules="roomRules" | |
182 | + v-model="editedItem.room" | |
183 | + @keyup.enter="submit" | |
90 | 184 | ></v-text-field> |
91 | 185 | </v-flex> |
92 | 186 | </v-layout> |
93 | 187 | <v-layout> |
94 | 188 | <v-flex xs4 sm4 class="pt-4 subheading"> |
95 | - <label class="right">Subject Author :</label> | |
189 | + <label class="right">Period:</label> | |
96 | 190 | </v-flex> |
97 | 191 | <v-flex xs8 sm8 class="ml-3"> |
98 | 192 | <v-text-field |
99 | - v-model="editedItem.subjectAuthor" | |
100 | - placeholder="fill your Subject Author" | |
101 | - name="name" | |
102 | - type="text" | |
193 | + label="fill your period" | |
194 | + :rules="periodRules" | |
195 | + v-model="editedItem.period" | |
196 | + @keyup.enter="submit" | |
103 | 197 | ></v-text-field> |
104 | 198 | </v-flex> |
105 | 199 | </v-layout> |
106 | 200 | <v-layout> |
107 | - <v-flex xs4 sm4 class="pt-4 subheading"> | |
108 | - <label class="right">Subject Code:</label> | |
109 | - </v-flex> | |
110 | - <v-flex xs8 sm8 class="ml-3"> | |
111 | - <v-text-field | |
112 | - v-model="editedItem.subjectCode" | |
113 | - placeholder="fill your Subject Code" | |
114 | - name="name" | |
115 | - type="text" | |
116 | - ></v-text-field> | |
201 | + <v-flex xs12 sm12> | |
202 | + <v-card-actions> | |
203 | + <v-spacer></v-spacer> | |
204 | + <v-btn | |
205 | + @click="update" | |
206 | + round | |
207 | + dark | |
208 | + :loading="loading" | |
209 | + class="add-button" | |
210 | + >Update Routine</v-btn> | |
211 | + </v-card-actions> | |
117 | 212 | </v-flex> |
118 | 213 | </v-layout> |
119 | - <v-flex xs12 sm12> | |
120 | - <v-card-actions> | |
121 | - <v-spacer></v-spacer> | |
122 | - <v-btn | |
123 | - round | |
124 | - dark | |
125 | - @click="save" | |
126 | - :loading="editLoading" | |
127 | - class="add-button" | |
128 | - >Update Subject</v-btn> | |
129 | - </v-card-actions> | |
130 | - </v-flex> | |
131 | 214 | </v-form> |
132 | 215 | </v-container> |
133 | 216 | </v-card> |
134 | 217 | </v-dialog> |
135 | 218 | |
136 | - <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> | |
137 | - | |
138 | - <!-- <v-dialog v-model="viewSubjectDialog" max-width="500px"> | |
139 | - <v-card flat class="card-style pa-3" dark> | |
140 | - <v-layout> | |
141 | - <v-flex xs12> | |
142 | - <label class="title text-xs-center">View Subject</label> | |
143 | - <v-icon size="24" class="right" @click="viewSubjectDialog = false">cancel</v-icon> | |
144 | - </v-flex> | |
145 | - </v-layout> | |
146 | - <v-card-text> | |
147 | - <v-container grid-list-md> | |
148 | - <v-layout wrap> | |
149 | - <v-flex> | |
150 | - <v-layout> | |
151 | - <v-flex xs6 sm4> | |
152 | - <h5 class="right my-1"> | |
153 | - <b>Subject Name:</b> | |
154 | - </h5> | |
155 | - </v-flex> | |
156 | - <v-flex sm8 xs6> | |
157 | - <h5 class="my-1">{{ editedItem.subjectName }}</h5> | |
158 | - </v-flex> | |
159 | - </v-layout> | |
160 | - <v-layout> | |
161 | - <v-flex xs6 sm4> | |
162 | - <h5 class="right my-1"> | |
163 | - <b>Subject Author:</b> | |
164 | - </h5> | |
165 | - </v-flex> | |
166 | - <v-flex sm8 xs6> | |
167 | - <h5 class="my-1">{{ editedItem.subjectAuthor }}</h5> | |
168 | - </v-flex> | |
169 | - </v-layout> | |
170 | - <v-layout> | |
171 | - <v-flex xs6 sm4> | |
172 | - <h5 class="right my-1"> | |
173 | - <b>Subject :</b> | |
174 | - </h5> | |
175 | - </v-flex> | |
176 | - <v-flex sm8 xs6> | |
177 | - <h5 class="my-1">{{ editedItem.subjectCode }}</h5> | |
178 | - </v-flex> | |
179 | - </v-layout> | |
180 | - <v-layout> | |
181 | - <v-flex xs6 sm4> | |
182 | - <h5 class="right my-1"> | |
183 | - <b>Pass Marks :</b> | |
184 | - </h5> | |
185 | - </v-flex> | |
186 | - <v-flex sm8 xs6> | |
187 | - <h5 class="my-1">{{ editedItem.passMarks }}</h5> | |
188 | - </v-flex> | |
189 | - </v-layout> | |
190 | - <v-layout> | |
191 | - <v-flex xs6 sm4> | |
192 | - <h5 class="right my-1"> | |
193 | - <b>Final Marks :</b> | |
194 | - </h5> | |
195 | - </v-flex> | |
196 | - <v-flex sm8 xs6> | |
197 | - <h5 class="my-1">{{ editedItem.finalMarks }}</h5> | |
198 | - </v-flex> | |
199 | - </v-layout> | |
200 | - <v-layout> | |
201 | - <v-flex xs6 sm4> | |
202 | - <h5 class="right my-1"> | |
203 | - <b>Type :</b> | |
204 | - </h5> | |
205 | - </v-flex> | |
206 | - <v-flex sm8 xs6> | |
207 | - <h5 class="my-1">{{ editedItem.type }}</h5> | |
208 | - </v-flex> | |
209 | - </v-layout> | |
210 | - </v-flex> | |
211 | - </v-layout> | |
212 | - </v-container> | |
213 | - </v-card-text> | |
214 | - </v-card> | |
215 | - </v-dialog>--> | |
216 | - | |
217 | - <!-- ****** EXISTING SUBJECTS TABLE ****** --> | |
219 | + <!-- ****** EXISTING ROUTINE TABLE ****** --> | |
218 | 220 | <v-toolbar color="transparent" flat> |
219 | 221 | <v-btn |
220 | 222 | fab |
... | ... | @@ -255,11 +257,13 @@ |
255 | 257 | <v-select |
256 | 258 | v-model="addRoutine.sectionId" |
257 | 259 | label="Select your section" |
258 | - type="text" | |
259 | 260 | :items="addSection" |
260 | 261 | item-text="name" |
261 | 262 | item-value="_id" |
263 | + name="Select Section" | |
264 | + :rules="sectionRules" | |
262 | 265 | @change="getRoutineList()" |
266 | + class="pl-2" | |
263 | 267 | required |
264 | 268 | ></v-select> |
265 | 269 | </v-flex> |
... | ... | @@ -285,168 +289,136 @@ |
285 | 289 | </v-toolbar> |
286 | 290 | |
287 | 291 | <div class="col-sm-12"> |
288 | - <!-- <h5 class="page-header"> | |
289 | - <div class="col-lg-2 col-sm-2 col-md-2 col-xs-12 pull-right drop-marg"> | |
290 | - <div class="select2-container form-control select2" id="s2id_classesID"> | |
291 | - <a | |
292 | - href="javascript:void(0)" | |
293 | - onclick="return false;" | |
294 | - class="select2-choice" | |
295 | - tabindex="-1" | |
296 | - > | |
297 | - <span class="select2-chosen">Select Class</span> | |
298 | - <abbr class="select2-search-choice-close"></abbr> | |
299 | - <span class="select2-arrow"> | |
300 | - <b></b> | |
301 | - </span> | |
302 | - </a> | |
303 | - <input class="select2-focusser select2-offscreen" type="text" id="s2id_autogen1" /> | |
304 | - <div class="select2-drop select2-display-none select2-with-searchbox"> | |
305 | - <div class="select2-search"> | |
306 | - <input | |
307 | - type="text" | |
308 | - autocomplete="off" | |
309 | - autocorrect="off" | |
310 | - autocapitalize="off" | |
311 | - spellcheck="false" | |
312 | - class="select2-input" | |
313 | - /> | |
314 | - </div> | |
315 | - <ul class="select2-results"></ul> | |
316 | - </div> | |
317 | - </div> | |
318 | - <select | |
319 | - name="classesID" | |
320 | - id="classesID" | |
321 | - class="form-control select2 select2-offscreen" | |
322 | - tabindex="-1" | |
323 | - > | |
324 | - <option value="0" selected="selected">Select Class</option> | |
325 | - <option value="3">ONE</option> | |
326 | - </select> | |
327 | - </div> | |
328 | - </h5>--> | |
292 | + <div class="box-body"> | |
293 | + <div class="row"> | |
294 | + <div class="col-sm-12"> | |
295 | + <div class="nav-tabs-custom"> | |
296 | + <ul class="nav nav-tabs"> | |
297 | + <li class="active"> | |
298 | + <a data-toggle="tab" href="#all" aria-expanded="true">All Routines</a> | |
299 | + </li> | |
300 | + </ul> | |
329 | 301 | |
330 | - <div class="nav-tabs-custom"> | |
331 | - <ul class="nav nav-tabs"> | |
332 | - <li class="active"> | |
333 | - <a data-toggle="tab" href="#all" aria-expanded="true">All Routines</a> | |
334 | - </li> | |
335 | - </ul> | |
336 | - | |
337 | - <div class="tab-content"> | |
338 | - <div id="all" class="tab-pane active mCustomScrollbar _mCS_1 mCS_no_scrollbar"> | |
339 | - <div | |
340 | - id="mCSB_1" | |
341 | - class="mCustomScrollBox mCS-light mCSB_horizontal mCSB_inside" | |
342 | - style="max-height: none;" | |
343 | - tabindex="0" | |
344 | - > | |
345 | - <div | |
346 | - id="mCSB_1_container" | |
347 | - class="mCSB_container mCS_x_hidden mCS_no_scrollbar_x" | |
348 | - style="position: relative; top: 0px; left: 0px; width: 100%;" | |
349 | - dir="ltr" | |
350 | - > | |
351 | - <div id="hide-table-2"> | |
352 | - <table id="table" class="table table-striped"> | |
353 | - <tbody> | |
354 | - <tr> | |
355 | - <td>MONDAY</td> | |
356 | - </tr> | |
357 | - <tr> | |
358 | - <td>TUESDAY</td> | |
359 | - </tr> | |
360 | - <tr> | |
361 | - <td>WEDNESDAY</td> | |
362 | - </tr> | |
363 | - <tr> | |
364 | - <td>THURSDAY</td> | |
365 | - </tr> | |
366 | - <tr> | |
367 | - <td>FRIDAY</td> | |
368 | - </tr> | |
369 | - <tr> | |
370 | - <td>SATURDAY</td> | |
371 | - </tr> | |
372 | - <tr> | |
373 | - <td style="font-weight:bold">SUNDAY</td> | |
374 | - </tr> | |
375 | - </tbody> | |
376 | - </table> | |
377 | - </div> | |
378 | - </div> | |
379 | - <div | |
380 | - id="mCSB_1_scrollbar_horizontal" | |
381 | - class="mCSB_scrollTools mCSB_1_scrollbar mCS-light mCSB_scrollTools_horizontal" | |
382 | - style="display: none;" | |
383 | - > | |
384 | - <div class="mCSB_draggerContainer"> | |
302 | + <div class="tab-content" v-show="hideTable"> | |
303 | + <div id="all" class="tab-pane active mCustomScrollbar _mCS_1 mCS_no_scrollbar"> | |
385 | 304 | <div |
386 | - id="mCSB_1_dragger_horizontal" | |
387 | - class="mCSB_dragger" | |
388 | - style="position: absolute; min-width: 30px; width: 0px; left: 0px;" | |
305 | + id="mCSB_1" | |
306 | + class="mCustomScrollBox mCS-light" | |
307 | + style="max-height: none;" | |
308 | + tabindex="0" | |
389 | 309 | > |
390 | - <div class="mCSB_dragger_bar"></div> | |
310 | + <div | |
311 | + id="mCSB_1_container" | |
312 | + class="mCSB_container mCS_x_hidden mCS_no_scrollbar_x" | |
313 | + style="position: relative; top: 0px; left: 0px; width: 100%;" | |
314 | + dir="ltr" | |
315 | + > | |
316 | + <div id="hide-table-2"> | |
317 | + <table id="table" class="table table-striped"> | |
318 | + <tbody> | |
319 | + <tr> | |
320 | + <td>MONDAY</td> | |
321 | + </tr> | |
322 | + <tr> | |
323 | + <td>TUESDAY</td> | |
324 | + </tr> | |
325 | + <tr> | |
326 | + <td>WEDNESDAY</td> | |
327 | + </tr> | |
328 | + <tr> | |
329 | + <td>THURSDAY</td> | |
330 | + </tr> | |
331 | + <tr> | |
332 | + <td>FRIDAY</td> | |
333 | + </tr> | |
334 | + <tr> | |
335 | + <td>SATURDAY</td> | |
336 | + </tr> | |
337 | + </tbody> | |
338 | + </table> | |
339 | + </div> | |
340 | + </div> | |
341 | + <div | |
342 | + id="mCSB_1_scrollbar_horizontal" | |
343 | + class="mCSB_scrollTools mCSB_1_scrollbar mCS-light mCSB_scrollTools_horizontal" | |
344 | + style="display: none;" | |
345 | + > | |
346 | + <div class="mCSB_draggerContainer"> | |
347 | + <div | |
348 | + id="mCSB_1_dragger_horizontal" | |
349 | + class="mCSB_dragger" | |
350 | + style="position: absolute; min-width: 30px; width: 0px; left: 0px;" | |
351 | + > | |
352 | + <div class="mCSB_dragger_bar"></div> | |
353 | + </div> | |
354 | + <div class="mCSB_draggerRail"></div> | |
355 | + </div> | |
356 | + </div> | |
391 | 357 | </div> |
392 | - <div class="mCSB_draggerRail"></div> | |
393 | 358 | </div> |
394 | 359 | </div> |
360 | + <div> | |
361 | + <table id="table" class="table table-bordered" v-show="showTable"> | |
362 | + <tbody> | |
363 | + <div class="nav-tabs-custom"> | |
364 | + <div class="tab-content" id="scrolling"> | |
365 | + <div id="hide-table-2"> | |
366 | + <v-data-table :items="routineList"> | |
367 | + <template slot="items" slot-scope="props"> | |
368 | + <tr class="tr"> | |
369 | + <td>{{ props.item.day }}</td> | |
370 | + <td class="text-center"> | |
371 | + <br /> | |
372 | + {{ props.item.classId.classNum }} | |
373 | + <br /> | |
374 | + {{ props.item.sectionId.name }} | |
375 | + </td> | |
376 | + <td class="text-center" v-for="list in props.item.lectureRoutine"> | |
377 | + {{ list.startingTime }} - {{ list.endingTime }} | |
378 | + <br /> | |
379 | + {{ list.room }} | |
380 | + <br /> | |
381 | + {{ list.subjectName }} | |
382 | + <br /> | |
383 | + {{ list.teacherId .name}} | |
384 | + <br /> | |
385 | + <span> | |
386 | + <v-tooltip top> | |
387 | + <img | |
388 | + slot="activator" | |
389 | + style="cursor:pointer; width:20px; height:18px; " | |
390 | + class="mr-3" | |
391 | + @click="editItem()" | |
392 | + src="/static/icon/edit.png" | |
393 | + /> | |
394 | + <span>Edit</span> | |
395 | + </v-tooltip> | |
396 | + <v-tooltip top> | |
397 | + <img | |
398 | + slot="activator" | |
399 | + style="cursor:pointer; width:20px; height:18px; " | |
400 | + class="mr-3" | |
401 | + @click="deleteItem(props.item)" | |
402 | + src="/static/icon/delete.png" | |
403 | + /> | |
404 | + <span>Delete</span> | |
405 | + </v-tooltip> | |
406 | + </span> | |
407 | + </td> | |
408 | + </tr> | |
409 | + </template> | |
410 | + </v-data-table> | |
411 | + </div> | |
412 | + </div> | |
413 | + </div> | |
414 | + </tbody> | |
415 | + </table> | |
416 | + </div> | |
395 | 417 | </div> |
396 | 418 | </div> |
397 | 419 | </div> |
398 | 420 | </div> |
399 | 421 | </div> |
400 | - | |
401 | - <!-- <v-data-table | |
402 | - :headers="headers" | |
403 | - :items="routineList" | |
404 | - :pagination.sync="pagination" | |
405 | - :search="search" | |
406 | - > | |
407 | - <template slot="items" slot-scope="props"> | |
408 | - <tr class="tr"> | |
409 | - <td class="td-row td">{{ props.index + 1 }}</td> | |
410 | - <td class="text-xs-center td td-row">{{ props.item.schoolYear }}</td> | |
411 | - <td class="text-xs-center td td-row">{{ props.item.classId }}</td> | |
412 | - <td class="text-xs-center td td-row">{{ props.item.sectionId }}</td> | |
413 | - <td class="text-xs-center td td-row">{{ props.item.day }}</td> | |
414 | - <td class="text-xs-center td td-row">{{ props.item.lectureRoutine.staringTime }}</td> | |
415 | - <td class="text-xs-center td td-row">{{ props.item.lectureRoutine.endingTime }}</td> | |
416 | - <td class="text-xs-center td td-row">{{ props.item.lectureRoutine.subjectName }}</td> | |
417 | - <td class="text-xs-center td td-row"> | |
418 | - <span> | |
419 | - <v-tooltip top> | |
420 | - <img | |
421 | - slot="activator" | |
422 | - style="cursor:pointer; width:20px; height:18px; " | |
423 | - class="mr-3" | |
424 | - @click="editItem(props.item)" | |
425 | - src="/static/icon/edit.png" | |
426 | - /> | |
427 | - <span>Edit</span> | |
428 | - </v-tooltip> | |
429 | - <v-tooltip top> | |
430 | - <img | |
431 | - slot="activator" | |
432 | - style="cursor:pointer; width:20px; height:20px; " | |
433 | - class="mr-3" | |
434 | - @click="deleteItem(props.item)" | |
435 | - src="/static/icon/delete.png" | |
436 | - /> | |
437 | - <span>Delete</span> | |
438 | - </v-tooltip> | |
439 | - </span> | |
440 | - </td> | |
441 | - </tr> | |
442 | - </template> | |
443 | - <v-alert | |
444 | - slot="no-results" | |
445 | - :value="true" | |
446 | - color="error" | |
447 | - icon="warning" | |
448 | - >Your search for "{{ search }}" found no results.</v-alert> | |
449 | - </v-data-table> --> | |
450 | 422 | <!-- ****** ADD MULTIPLE Subject ****** --> |
451 | 423 | <v-snackbar |
452 | 424 | :timeout="timeout" |
... | ... | @@ -474,21 +446,10 @@ |
474 | 446 | </v-flex> |
475 | 447 | <v-flex xs8 sm8 class="ml-3"> |
476 | 448 | <v-text-field |
477 | - placeholder="fill your year" | |
449 | + label="fill your year" | |
478 | 450 | :rules="schoolRules" |
479 | 451 | v-model="addRoutine.schoolYear" |
480 | 452 | ></v-text-field> |
481 | - <!-- <v-select | |
482 | - :items="classList" | |
483 | - label="Select School Year" | |
484 | - item-text="classNum" | |
485 | - item-value="_id" | |
486 | - v-model="addRoutine.classId" | |
487 | - name="Select School Year" | |
488 | - :rules="schoolRules" | |
489 | - class="pl-2" | |
490 | - required | |
491 | - ></v-select>--> | |
492 | 453 | </v-flex> |
493 | 454 | </v-layout> |
494 | 455 | <v-layout> |
... | ... | @@ -498,11 +459,10 @@ |
498 | 459 | <v-flex xs8 sm8 class="ml-3"> |
499 | 460 | <v-select |
500 | 461 | :items="classList" |
501 | - label="Select Class" | |
502 | 462 | item-text="classNum" |
503 | 463 | item-value="_id" |
504 | 464 | v-model="addRoutine.classId" |
505 | - name="Select Class" | |
465 | + label="Select Class" | |
506 | 466 | :rules="classRules" |
507 | 467 | @change="getSections(addRoutine.classId)" |
508 | 468 | class="pl-2" |
... | ... | @@ -517,11 +477,10 @@ |
517 | 477 | <v-flex xs8 sm8 class="ml-3"> |
518 | 478 | <v-select |
519 | 479 | :items="addSection" |
520 | - label="Select Section" | |
521 | 480 | item-text="name" |
522 | 481 | item-value="_id" |
523 | 482 | v-model="addRoutine.sectionId" |
524 | - name="Select Section" | |
483 | + label="Select Section" | |
525 | 484 | :rules="sectionRules" |
526 | 485 | @change="getClassSubject(addRoutine.classId)" |
527 | 486 | class="px-2" |
... | ... | @@ -539,7 +498,7 @@ |
539 | 498 | label="Select your subject" |
540 | 499 | v-model="addRoutine.subjectName" |
541 | 500 | item-text="subjectName" |
542 | - item-value="_id" | |
501 | + item-value="subjectName" | |
543 | 502 | :rules="subjectRules" |
544 | 503 | required |
545 | 504 | ></v-select> |
... | ... | @@ -587,7 +546,7 @@ |
587 | 546 | :close-on-content-click="false" |
588 | 547 | v-model="menuB" |
589 | 548 | :nudge-right="40" |
590 | - :return-value.sync="addRoutine.staringTime" | |
549 | + :return-value.sync="addRoutine.startingTime" | |
591 | 550 | lazy |
592 | 551 | transition="scale-transition" |
593 | 552 | offset-y |
... | ... | @@ -597,15 +556,15 @@ |
597 | 556 | > |
598 | 557 | <v-text-field |
599 | 558 | slot="activator" |
600 | - v-model="addRoutine.staringTime" | |
559 | + v-model="addRoutine.startingTime" | |
601 | 560 | label="Select your starting time" |
602 | 561 | append-icon="access_time" |
603 | 562 | :rules="timeInRules" |
604 | 563 | readonly |
605 | 564 | ></v-text-field> |
606 | 565 | <v-time-picker |
607 | - v-model="addRoutine.staringTime" | |
608 | - @change="$refs.menuA.save(addRoutine.staringTime)" | |
566 | + v-model="addRoutine.startingTime" | |
567 | + @change="$refs.menuA.save(addRoutine.startingTime)" | |
609 | 568 | ></v-time-picker> |
610 | 569 | </v-menu> |
611 | 570 | </v-flex> |
... | ... | @@ -649,7 +608,7 @@ |
649 | 608 | </v-flex> |
650 | 609 | <v-flex xs8 sm8 class="ml-3"> |
651 | 610 | <v-text-field |
652 | - placeholder="fill your room" | |
611 | + label="fill your room" | |
653 | 612 | :rules="roomRules" |
654 | 613 | v-model="addRoutine.room" |
655 | 614 | @keyup.enter="submit" |
... | ... | @@ -662,7 +621,7 @@ |
662 | 621 | </v-flex> |
663 | 622 | <v-flex xs8 sm8 class="ml-3"> |
664 | 623 | <v-text-field |
665 | - placeholder="fill your room" | |
624 | + label="fill your period" | |
666 | 625 | :rules="periodRules" |
667 | 626 | v-model="addRoutine.period" |
668 | 627 | @keyup.enter="submit" |
... | ... | @@ -716,11 +675,13 @@ export default { |
716 | 675 | editLoading: false, |
717 | 676 | date: null, |
718 | 677 | search: "", |
719 | - // viewSubjectDialog: false, | |
720 | 678 | editRoutineDialog: false, |
721 | 679 | valid: true, |
722 | 680 | validEditRoutine: true, |
723 | 681 | addRoutineDialog: false, |
682 | + showTable: false, | |
683 | + hideTable: true, | |
684 | + name: "", | |
724 | 685 | |
725 | 686 | day: [ |
726 | 687 | "Monday", |
... | ... | @@ -731,9 +692,7 @@ export default { |
731 | 692 | "Saturday", |
732 | 693 | "Sunday" |
733 | 694 | ], |
734 | - pagination: { | |
735 | - rowsPerPage: 10 | |
736 | - }, | |
695 | + | |
737 | 696 | token: "", |
738 | 697 | |
739 | 698 | menu1: false, |
... | ... | @@ -752,58 +711,7 @@ export default { |
752 | 711 | timeOutRules: [v => !!v || "End Time is required"], |
753 | 712 | roomRules: [v => !!v || "Room is required"], |
754 | 713 | periodRules: [v => !!v || "Period is required"], |
755 | - headers: [ | |
756 | - { | |
757 | - text: "No", | |
758 | - align: "", | |
759 | - sortable: false, | |
760 | - value: "No" | |
761 | - }, | |
762 | - { | |
763 | - text: "Subject Name", | |
764 | - value: "subjectName", | |
765 | - sortable: false, | |
766 | - align: "center" | |
767 | - }, | |
768 | - { | |
769 | - text: "Subject Author", | |
770 | - value: "subjectAuthor", | |
771 | - sortable: false, | |
772 | - align: "center" | |
773 | - }, | |
774 | - { | |
775 | - text: "Subject Code", | |
776 | - value: "subjectCode", | |
777 | - sortable: false, | |
778 | - align: "center" | |
779 | - }, | |
780 | - // { | |
781 | - // text: "Teacher", | |
782 | - // value: "teacherId", | |
783 | - // sortable: false, | |
784 | - // align: "center" | |
785 | - // }, | |
786 | - { | |
787 | - text: "Pass Marks", | |
788 | - value: "passMarks", | |
789 | - sortable: false, | |
790 | - align: "center" | |
791 | - }, | |
792 | - { | |
793 | - text: "Final Marks", | |
794 | - value: "finalMarks", | |
795 | - sortable: false, | |
796 | - align: "center" | |
797 | - }, | |
798 | - { | |
799 | - text: "Type", | |
800 | - value: "type", | |
801 | - sortable: false, | |
802 | - align: "center" | |
803 | - }, | |
804 | - { text: "Action", value: "", sortable: false, align: "center" } | |
805 | - ], | |
806 | - subjectList: [], | |
714 | + | |
807 | 715 | classList: [], |
808 | 716 | addSection: [], |
809 | 717 | subjectList: [], |
... | ... | @@ -814,45 +722,47 @@ export default { |
814 | 722 | routineList: [], |
815 | 723 | editedIndex: -1, |
816 | 724 | addRoutine: {}, |
725 | + startingTime: "", | |
726 | + editedItem: {} | |
817 | 727 | |
818 | - editedItem: { | |
819 | - // subjectName: "", | |
820 | - // subjectAuthor: "" | |
821 | - } | |
728 | + // editedItem: { | |
729 | + // schoolYear: "", | |
730 | + // day: "", | |
731 | + // teacherId: "", | |
732 | + // classId: "", | |
733 | + // sectionId: "", | |
734 | + // startingTime: "", | |
735 | + // endingTime: "", | |
736 | + // room: "", | |
737 | + // period: "", | |
738 | + // subjectName: "" | |
739 | + // } | |
822 | 740 | }), |
823 | 741 | methods: { |
824 | - pickFile() { | |
825 | - this.$refs.image.click(); | |
826 | - }, | |
827 | 742 | editItem(item) { |
828 | - this.editedIndex = this.subjectList.subjects; | |
743 | + this.editedIndex = this.routineList; | |
829 | 744 | this.editedItem = Object.assign({}, item); |
745 | + // this.editedItem.subjectName = item.lectureRoutine.subjectName; | |
830 | 746 | this.dialog = true; |
831 | 747 | this.editRoutineDialog = true; |
832 | 748 | }, |
833 | - // profile(item) { | |
834 | - // this.editedIndex = this.subjectList.subjects; | |
835 | - // this.editedItem = Object.assign({}, item); | |
836 | - // this.dialog1 = true; | |
837 | - // this.viewSubjectDialog = true; | |
838 | - // }, | |
839 | 749 | deleteItem(item) { |
840 | - let deleteSubject = { | |
841 | - classId: this.addRoutine.classId, | |
842 | - subjectId: item._id | |
750 | + let deleteLecture = { | |
751 | + routineId: item._id, | |
752 | + lectureId: item.lectureRoutine[0]._id | |
843 | 753 | }; |
844 | 754 | http() |
845 | 755 | .delete( |
846 | - "/deleteSubject", | |
756 | + "/deleteRoutineLecture", | |
847 | 757 | confirm("Are you sure you want to delete this?") && { |
848 | - params: deleteSubject | |
758 | + params: deleteLecture | |
849 | 759 | } |
850 | 760 | ) |
851 | 761 | .then(response => { |
852 | - this.getClassSubject(_id); | |
853 | 762 | this.snackbar = true; |
854 | - this.text = "Successfully delete Existing Subject"; | |
763 | + this.text = "Successfully delete Existing Routine"; | |
855 | 764 | this.color = "green"; |
765 | + this.getRoutineList(); | |
856 | 766 | }) |
857 | 767 | .catch(error => { |
858 | 768 | this.snackbar = true; |
... | ... | @@ -875,7 +785,7 @@ export default { |
875 | 785 | if (this.$refs.form.validate()) { |
876 | 786 | routineData.lectureRoutine.push({ |
877 | 787 | teacherId: this.addRoutine.teacherId, |
878 | - staringTime: this.addRoutine.staringTime, | |
788 | + startingTime: this.addRoutine.startingTime, | |
879 | 789 | endingTime: this.addRoutine.endingTime, |
880 | 790 | room: this.addRoutine.room, |
881 | 791 | period: this.addRoutine.period, |
... | ... | @@ -884,6 +794,7 @@ export default { |
884 | 794 | http() |
885 | 795 | .post("/createRoutine", routineData) |
886 | 796 | .then(response => { |
797 | + this.getRoutineList(); | |
887 | 798 | this.text = "Routine added successfully"; |
888 | 799 | this.clear(); |
889 | 800 | this.snackbar = true; |
... | ... | @@ -902,72 +813,53 @@ export default { |
902 | 813 | this.$refs.form.reset(); |
903 | 814 | }, |
904 | 815 | |
905 | - save() { | |
906 | - if (this.$refs.formEditRoutine.validate()) { | |
907 | - let editSubject = { | |
908 | - classId: this.editedItem.classId, | |
909 | - subjectId: this.editedItem._id, | |
910 | - teacherId: this.editedItem.teacherId, | |
911 | - type: this.editedItem.type, | |
912 | - passMarks: this.editedItem.passMarks, | |
913 | - finalMarks: this.editedItem.finalMarks, | |
914 | - subjectAuthor: this.editedItem.subjectAuthor, | |
915 | - subjectCode: this.editedItem.subjectCode, | |
916 | - subjectName: this.editedItem.subjectName | |
917 | - }; | |
918 | - this.editLoading = true; | |
919 | - http() | |
920 | - .put("/updateSubject", editSubject) | |
921 | - .then(response => { | |
922 | - this.snackbar = true; | |
923 | - this.text = "Successfully Edit Existing Subject"; | |
924 | - this.color = "green"; | |
925 | - this.editLoading = false; | |
926 | - this.editRoutineDialog = false; | |
927 | - http() | |
928 | - .get( | |
929 | - "/getParticularClass", | |
930 | - { params: { classId: _id } }, | |
931 | - { | |
932 | - headers: { Authorization: "Bearer " + this.token } | |
933 | - } | |
934 | - ) | |
935 | - .then(response => { | |
936 | - this.subjectList = response.data.data; | |
937 | - this.snackbar = true; | |
938 | - this.color = "green"; | |
939 | - this.text = response.data.message; | |
940 | - this.close(); | |
941 | - }) | |
942 | - .catch(err => { | |
943 | - console.log("err====>", err); | |
944 | - }); | |
945 | - }) | |
946 | - .catch(error => { | |
947 | - this.editLoading = false; | |
816 | + update() { | |
817 | + // if (this.$refs.formEditRoutine.validate()) { | |
818 | + // let editSubject = { | |
819 | + // classId: this.editedItem.classId, | |
820 | + // subjectId: this.editedItem._id, | |
821 | + // teacherId: this.editedItem.teacherId, | |
822 | + // type: this.editedItem.type, | |
823 | + // passMarks: this.editedItem.passMarks, | |
824 | + // finalMarks: this.editedItem.finalMarks, | |
825 | + // subjectAuthor: this.editedItem.subjectAuthor, | |
826 | + // subjectCode: this.editedItem.subjectCode, | |
827 | + // subjectName: this.editedItem.subjectName | |
828 | + // }; | |
829 | + // this.editLoading = true; | |
830 | + // http() | |
831 | + // .put("/updateSubject", editSubject) | |
832 | + // .then(response => { | |
833 | + // this.snackbar = true; | |
834 | + // this.text = "Successfully Edit Existing Subject"; | |
835 | + // this.color = "green"; | |
836 | + // this.editLoading = false; | |
837 | + // this.editRoutineDialog = false; | |
838 | + // http() | |
839 | + // .get( | |
840 | + // "/getParticularClass", | |
841 | + // { params: { classId: _id } }, | |
842 | + // { | |
843 | + // headers: { Authorization: "Bearer " + this.token } | |
844 | + // } | |
845 | + // ) | |
846 | + // .then(response => { | |
847 | + // this.subjectList = response.data.data; | |
848 | + // this.snackbar = true; | |
849 | + // this.color = "green"; | |
850 | + // this.text = response.data.message; | |
851 | + // this.close(); | |
852 | + // }) | |
853 | + // .catch(err => { | |
854 | + // console.log("err====>", err); | |
855 | + // }); | |
856 | + // }) | |
857 | + // .catch(error => { | |
858 | + // this.editLoading = false; | |
948 | 859 | |
949 | - // console.log(error); | |
950 | - }); | |
951 | - } | |
952 | - }, | |
953 | - getClassSubject(_id) { | |
954 | - this.showLoader = true; | |
955 | - // this.classId = this.classId; | |
956 | - http() | |
957 | - .get( | |
958 | - "/getParticularClass", | |
959 | - { params: { classId: _id } }, | |
960 | - { | |
961 | - headers: { Authorization: "Bearer " + this.token } | |
962 | - } | |
963 | - ) | |
964 | - .then(response => { | |
965 | - this.subjectList = response.data.data; | |
966 | - this.showLoader = false; | |
967 | - }) | |
968 | - .catch(err => { | |
969 | - this.showLoader = false; | |
970 | - }); | |
860 | + // // console.log(error); | |
861 | + // }); | |
862 | + // } | |
971 | 863 | }, |
972 | 864 | getClass() { |
973 | 865 | http() |
... | ... | @@ -1062,6 +954,8 @@ export default { |
1062 | 954 | .then(response => { |
1063 | 955 | this.routineList = response.data.data; |
1064 | 956 | this.showLoader = false; |
957 | + this.showTable = true; | |
958 | + this.hideTable = false; | |
1065 | 959 | }) |
1066 | 960 | .catch(err => { |
1067 | 961 | this.showLoader = false; |
... | ... | @@ -1078,7 +972,6 @@ export default { |
1078 | 972 | }, |
1079 | 973 | mounted() { |
1080 | 974 | this.token = this.$store.state.token; |
1081 | - // this.getNoticeDataList(); | |
1082 | 975 | this.getClass(); |
1083 | 976 | this.getTeacherList(); |
1084 | 977 | this.role = this.$store.state.role; |
... | ... | @@ -1087,16 +980,22 @@ export default { |
1087 | 980 | </script> |
1088 | 981 | |
1089 | 982 | <style scoped> |
983 | +html, | |
984 | +body { | |
985 | + font-family: "OpenSans Regular"; | |
986 | +} | |
987 | +.box .box-body { | |
988 | + padding: 15px; | |
989 | + border-top-left-radius: 0; | |
990 | + border-top-right-radius: 0; | |
991 | + border-bottom-right-radius: 3px; | |
992 | + border-bottom-left-radius: 3px; | |
993 | +} | |
1090 | 994 | .nav-tabs-custom { |
1091 | 995 | margin-bottom: 20px; |
1092 | 996 | background: #fff; |
1093 | 997 | box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); |
1094 | 998 | } |
1095 | -.nav-tabs-custom > .nav-tabs { | |
1096 | - background-color: #e5e5e54d; | |
1097 | - margin: 0; | |
1098 | - border-bottom-color: #e5e5e54d; | |
1099 | -} | |
1100 | 999 | .nav-tabs { |
1101 | 1000 | border-bottom: 1px solid #ddd; |
1102 | 1001 | } |
... | ... | @@ -1104,13 +1003,27 @@ export default { |
1104 | 1003 | padding-left: 0; |
1105 | 1004 | list-style: none; |
1106 | 1005 | } |
1006 | +.tab-content > .active { | |
1007 | + display: block; | |
1008 | +} | |
1009 | +.nav-tabs-custom > .nav-tabs > li.active > a { | |
1010 | + border-top: 0; | |
1011 | + border-left-color: #09a3a3; | |
1012 | + border-right-color: #09a3a3; | |
1013 | +} | |
1014 | +.nav-tabs-custom > .nav-tabs { | |
1015 | + background-color: #e5e5e5; | |
1016 | + margin: 0; | |
1017 | + border-bottom-color: #e5e5e5; | |
1018 | +} | |
1107 | 1019 | .nav-tabs-custom > .nav-tabs > li:first-of-type { |
1108 | 1020 | margin-left: 0px; |
1109 | 1021 | } |
1110 | 1022 | .nav-tabs-custom > .nav-tabs > li.active { |
1111 | - border-top-color: #09a3a3; | |
1023 | + border-bottom-color: #09a3a3; | |
1112 | 1024 | } |
1113 | 1025 | .nav-tabs-custom > .nav-tabs > li { |
1026 | + border-bottom: 2px solid transparent; | |
1114 | 1027 | border-top: 3px solid transparent; |
1115 | 1028 | margin-bottom: -2px; |
1116 | 1029 | margin-right: 5px; |
... | ... | @@ -1120,18 +1033,118 @@ export default { |
1120 | 1033 | } |
1121 | 1034 | .nav-tabs-custom > .nav-tabs > li.active > a { |
1122 | 1035 | border-top: 0; |
1123 | - border-left-color: #09a3a3; | |
1124 | - border-right-color: #09a3a3; | |
1036 | + border-bottom-color: #09a3a3; | |
1037 | +} | |
1038 | +.nav-tabs-custom > .nav-tabs > li.active > a, | |
1039 | +.nav-tabs-custom > .nav-tabs > li.active:hover > a { | |
1040 | + background-color: #e5e5e5; | |
1041 | + border: 0px; | |
1042 | + color: #000000db; | |
1043 | +} | |
1044 | +.nav-tabs-custom > .nav-tabs > li > a, | |
1045 | +.nav-tabs-custom > .nav-tabs > li > a:hover { | |
1046 | + border-radius: 0 !important; | |
1125 | 1047 | } |
1126 | 1048 | .nav-tabs-custom > .tab-content { |
1127 | 1049 | background: #fff; |
1050 | + padding: 10px; | |
1051 | +} | |
1052 | +.page-header { | |
1053 | + margin: 10px 0 20px 0; | |
1054 | + padding: 0px 0px 16px; | |
1055 | + font-size: 22px; | |
1056 | + border: none; | |
1128 | 1057 | } |
1058 | +.table { | |
1059 | + width: 100%; | |
1060 | + border-collapse: collapse; | |
1061 | + border-spacing: 0; | |
1062 | +} | |
1063 | +.table > tbody > tr > th, | |
1064 | +.table > tfoot > tr > th, | |
1065 | +.table > tbody > tr > td, | |
1066 | +.table > tfoot > tr > td { | |
1067 | + padding: 8px; | |
1068 | + line-height: 1.428571429; | |
1069 | + vertical-align: top; | |
1070 | + border-top: 1px solid #ddd; | |
1071 | +} | |
1072 | +.nav::before, | |
1073 | +.nav::after { | |
1074 | + display: table; | |
1075 | + content: ""; | |
1076 | +} | |
1077 | +.box .box-body .table { | |
1078 | + margin-bottom: 0; | |
1079 | +} | |
1080 | +.table-bordered { | |
1081 | + border: 1px solid #e2e7eb; | |
1082 | +} | |
1083 | +.table-striped > tbody > tr:nth-child(2n + 1) > td, | |
1084 | +.table-striped > tbody > tr:nth-child(2n + 1) > th { | |
1085 | + background-color: #f0f3f5; | |
1086 | +} | |
1087 | +.table-bordered > tbody > v-data-table > template > tr > th, | |
1088 | +.table-bordered > tbody > tr > td { | |
1089 | + border-color: #e2e7eb; | |
1090 | + font-size: 12px; | |
1091 | +} | |
1092 | +.table-bordered > tbody > tr > td { | |
1093 | + color: #707070; | |
1094 | +} | |
1095 | +/* | |
1096 | +.table-bordered > tbody > tr > th, | |
1097 | +.table-bordered > tfoot > tr > th, | |
1098 | +.table-bordered > tbody > tr > td, | |
1099 | +.table-bordered > tfoot > tr > td { | |
1100 | + border: 1px solid #ddd; | |
1101 | +} */ | |
1129 | 1102 | .mCustomScrollbar.mCS_no_scrollbar, |
1130 | 1103 | .mCustomScrollbar.mCS_touch_action { |
1131 | 1104 | touch-action: auto; |
1132 | 1105 | } |
1133 | -.tab-content > .active { | |
1134 | - display: block; | |
1106 | +.mCSB_scrollTools.mCSB_scrollTools_horizontal { | |
1107 | + width: auto; | |
1108 | + height: 16px; | |
1109 | + top: auto; | |
1110 | + right: 0; | |
1111 | + bottom: 0; | |
1112 | + left: 0; | |
1113 | +} | |
1114 | +.mCSB_scrollTools { | |
1115 | + opacity: 0.75; | |
1116 | +} | |
1117 | +.mCSB_scrollTools .mCSB_draggerContainer { | |
1118 | + position: absolute; | |
1119 | + height: auto; | |
1120 | + top: 0; | |
1121 | + left: 0; | |
1122 | + bottom: 0; | |
1123 | + right: 0; | |
1124 | +} | |
1125 | +.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger { | |
1126 | + height: 100%; | |
1127 | +} | |
1128 | +.mCSB_scrollTools .mCSB_dragger { | |
1129 | + cursor: pointer; | |
1130 | + z-index: 1; | |
1131 | +} | |
1132 | +.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar { | |
1133 | + width: 100%; | |
1134 | + height: 4px; | |
1135 | + margin: 6px auto; | |
1136 | +} | |
1137 | +.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar { | |
1138 | + background-color: rgba(255, 255, 255, 0.75); | |
1139 | +} | |
1140 | +.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_draggerRail { | |
1141 | + width: 100%; | |
1142 | + height: 2px; | |
1143 | + margin: 7px 0; | |
1144 | +} | |
1145 | +.mCSB_scrollTools .mCSB_draggerRail { | |
1146 | + background-color: rgba(0, 0, 0, 0.4); | |
1147 | + border-radius: 16px; | |
1135 | 1148 | } |
1136 | 1149 | .mCustomScrollBox { |
1137 | 1150 | position: relative; |
... | ... | @@ -1141,40 +1154,16 @@ export default { |
1141 | 1154 | outline: none; |
1142 | 1155 | direction: ltr; |
1143 | 1156 | } |
1144 | -.mCSB_horizontal > .mCSB_container.mCS_no_scrollbar_x.mCS_x_hidden { | |
1157 | +/* .mCSB_horizontal > .mCSB_container.mCS_no_scrollbar_x.mCS_x_hidden { | |
1145 | 1158 | margin-bottom: 0; |
1146 | 1159 | } |
1147 | 1160 | .mCSB_horizontal.mCSB_inside > .mCSB_container { |
1148 | 1161 | margin-right: 0; |
1149 | -} | |
1162 | +} */ | |
1150 | 1163 | .mCSB_container { |
1151 | 1164 | overflow: hidden; |
1152 | 1165 | height: auto; |
1153 | 1166 | } |
1154 | -.mCSB_scrollTools.mCSB_scrollTools_horizontal { | |
1155 | - width: auto; | |
1156 | - height: 16px; | |
1157 | - top: auto; | |
1158 | - right: 0; | |
1159 | - bottom: 0; | |
1160 | - left: 0; | |
1161 | -} | |
1162 | -.box .box-body .table { | |
1163 | - margin-bottom: 0; | |
1164 | -} | |
1165 | -.table { | |
1166 | - width: 100%; | |
1167 | -} | |
1168 | -.table-striped > tbody > tr:nth-child(odd) > td, | |
1169 | -.table-striped > tbody > tr:nth-child(odd) > th { | |
1170 | - background-color: #f0f3f5; | |
1171 | -} | |
1172 | -.page-header { | |
1173 | - margin: 10px 0 20px 0; | |
1174 | - padding: 0px 0px 16px; | |
1175 | - font-size: 22px; | |
1176 | - border: none; | |
1177 | -} | |
1178 | 1167 | |
1179 | 1168 | @media (min-width: 768px) { |
1180 | 1169 | .col-sm-12 { | ... | ... |