Commit a690a86fb95089591233c907b0f171637d9ac301

Authored by Neeraj Sharma
1 parent add6421d55

implement meet functinlaity and id card issues

... ... @@ -10,7 +10,8 @@
10 10 <title>School Management</title>
11 11 <link rel="shortcut icon" href="/static/logo.png" type="image/x-icon">
12 12 <meta name="description" content="School Management">
13   - <script src='https://meet.intrack.in/external_api.js'></script>
  13 + <!-- <script src='https://meet.intrack.in/external_api.js'></script> -->
  14 + <script src='https://meet.jit.si/external_api.js'></script>
14 15 <link href="./static/css/custom.css" rel="stylesheet" />
15 16 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
16 17 <!-- <style>
... ... @@ -20,7 +21,7 @@
20 21 </style> -->
21 22 </head>
22 23  
23   -<body >
  24 +<body>
24 25 <div id="app">
25 26 </div>
26 27 <!-- built files will be auto injected -->
... ...
... ... @@ -30,6 +30,7 @@ export default [{
30 30 this.$store.dispatch('Role', null)
31 31 this.$store.dispatch('setSchoolToken', null)
32 32 this.$store.dispatch('setSchoolRole', null)
  33 + localStorage.removeItem("teacherName")
33 34 this.$router.replace({ path: '/' });
34 35 } else if (this.$store.state.role === "ACCOUNTANT") {
35 36 this.$store.dispatch('setToken', null)
... ... @@ -51,6 +52,7 @@ export default [{
51 52 this.$store.dispatch('Role', null)
52 53 this.$store.dispatch('setSchoolToken', null)
53 54 this.$store.dispatch('setSchoolRole', null)
  55 + localStorage.removeItem("studentName")
54 56 this.$router.replace({ path: '/' });
55 57 }
56 58 }
... ...
src/pages/Authentication/Login.vue
... ... @@ -147,6 +147,7 @@ export default {
147 147 this.$store.dispatch("setToken", response.data.data.token);
148 148 this.$store.dispatch("Id", response.data.data.id);
149 149 this.$store.dispatch("Role", response.data.data.role);
  150 + localStorage.setItem("teacherName", response.data.data.name);
150 151 this.$router.push("/dashboard");
151 152 } else if (response.data.data.role === "LIBRARIAN") {
152 153 this.$store.dispatch("setToken", response.data.data.token);
... ... @@ -225,7 +226,8 @@ export default {
225 226 } else {
226 227 this.selectedStudent =
227 228 response.data.data.students[counter]._id;
228   -
  229 + var studentName = response.data.data.students[counter].name;
  230 + localStorage.setItem("studentName", studentName);
229 231 localStorage.setItem(
230 232 "parentStudentId",
231 233 this.selectedStudent
... ...
src/pages/Dashboard/LiveOnlineClass.vue
... ... @@ -163,6 +163,7 @@ export default {
163 163 async startChat() {
164 164 if (this.$store.state.role === "PARENT") {
165 165 if (this.counter == 0) {
  166 + console.log("enter start chat");
166 167 this.startConference();
167 168 this.counter += 1;
168 169 }
... ... @@ -225,16 +226,16 @@ export default {
225 226 teacherName: "",
226 227 romm: "",
227 228 };
228   -
229   - this.api = new JitsiMeetExternalAPI(domain, options);
230   - this.api.addEventListener("videoConferenceJoined", () => {
  229 + _this.api = new JitsiMeetExternalAPI(domain, options);
  230 + console.log("this.api ", this.api);
  231 + _this.api.addEventListener("videoConferenceJoined", () => {
231 232 console.log("Local User Joined");
232 233  
233 234 _this.api.executeCommand("displayName", _this.username);
234   - _this.api.executeCommand("password", _this.roomPassword);
  235 + _this.api.executeCommand("password", this_.roomPassword);
235 236 });
236   - this.api.on("readyToClose", () => {
237   - this.$router.push({name:"Refresh"})
  237 + _this.api.on("readyToClose", () => {
  238 + this.$router.push({ name: "Refresh" });
238 239 });
239 240 } catch (error) {
240 241 console.error("Failed to load Jitsi API", error);
... ... @@ -267,24 +268,33 @@ export default {
267 268 .then((response) => {
268 269 // this.addSection = response.data.data;
269 270 console.log("CREATE___ROOOM", response.data);
270   - this.room = response.data.data.roomName;
271   -
272   - // this.username = response.data.data.LiveClasses.teacherName;
273   - this.roomPassword = response.data.data.password;
274   -
  271 + var room = response.data.data.roomName;
  272 + var username = localStorage.getItem("teacherName")
  273 + var roomPassword = response.data.data.password;
  274 + console.log(
  275 + "room",
  276 + room,
  277 + "username",
  278 + username,
  279 + "roomPassword",
  280 + roomPassword
  281 + );
275 282 var this_ = this;
276   - if (this.username != "" || this.room != "") {
  283 + if (username != "" || room != "") {
277 284 if (window.JitsiMeetExternalAPI) {
278 285 // var person = prompt("Please enter your name:", "Rabie");
279   - if (this_.username != null || this_.username != "") {
280   - this.username = this.username;
  286 + if (username != null || username != "") {
  287 + this_.username = username;
281 288 }
282 289 // var room = prompt("Please enter your room:", "Test Room");
283   - if (this_.room != null || this_.room != "") {
284   - this.room = this.room;
  290 + if (room != null || room != "") {
  291 + this_.room = room;
  292 + }
  293 + if (roomPassword != null || roomPassword != "") {
  294 + this_.password = roomPassword;
285 295 }
286   - this.startConference();
287 296 } else alert("Jitsi Meet API script not loaded");
  297 + this_.startConference();
288 298 }
289 299 this.showLoader = false;
290 300 })
... ... @@ -320,20 +330,23 @@ export default {
320 330 } else {
321 331 this.liveLink = response.data.data[0].link;
322 332 var room = response.data.data[0].roomName;
323   - var username = response.data.data[0].teacherId.name;
324   - this.roomPassword = response.data.data[0].password;
  333 + var username = this.currentUser;
  334 + var roomPassword = response.data.data[0].password;
325 335 var this_ = this;
326   - console.log(this.room, this.roomPassword, this.username);
  336 + // console.log(this.room, this.roomPassword, this.username);
327 337  
328 338 if (username != "" || room != "") {
329 339 if (window.JitsiMeetExternalAPI) {
330 340 // var person = prompt("Please enter your name:", "Rabie");
331 341 if (username != null || username != "") {
332   - this.username = username;
  342 + this_.username = username;
  343 + }
  344 + if (roomPassword != null || roomPassword != "") {
  345 + this_.roomPassword = roomPassword;
333 346 }
334 347 // var room = prompt("Please enter your room:", "Test Room");
335 348 if (room != null || room != "") {
336   - this.room = room;
  349 + this_.room = room;
337 350 }
338 351 // this.startConference();
339 352 }
... ... @@ -343,6 +356,11 @@ export default {
343 356 },
344 357  
345 358 async created() {
  359 + console.log(
  360 + "this.$store.state.studentsData",
  361 + this.$store.state.studentsData[0].name
  362 + );
  363 + this.currentUser = localStorage.getItem("studentName");
346 364 this.token = this.$store.state.token;
347 365 if (this.$store.state.role === "PARENT") {
348 366 await this.studentClasses();
... ...
src/pages/Report/idCard.vue
... ... @@ -168,245 +168,249 @@
168 168 </v-flex>
169 169 </v-layout>
170 170 </v-card>
171   - <v-layout row wrap id='printMe' justify-center>
172   - <v-card v-for="(getCard,index) in getCard" :key="index" style="page-break-after: always;">
173   - <v-container grid-list-md>
174   - <v-layout class="col-sm-12">
175   - <div
176   - style="font-family: arial;
  171 + <v-layout row wrap id="printMe" justify-center>
  172 + <div
  173 + v-for="(getCard,index) in getCard"
  174 + :key="index"
  175 + style="page-break-after: always; width:100%;margin:14px auto;background:transparent;"
  176 + >
  177 + <v-container grid-list-md>
  178 + <v-layout class="col-sm-12">
  179 + <div
  180 + style="font-family: arial;
177 181 max-width: 794px;
178 182 max-height: 1123px;
179 183 margin-left: auto;
180 184 margin-right: auto;
181 185 -webkit-print-color-adjust: exact;"
182   - >
183   - <div
184   - style="
  186 + >
  187 + <div
  188 + style="
185 189 float: left;
186 190 height: 520px;
187 191 width: 520px;
188 192 background: #fff;
189 193 border: 1px solid lightgray;
190 194 position:relative;"
191   - >
192   - <!-- bottom-right-side-image -->
193   - <img
194   - src="/static/icon/shape1.png"
195   - alt="shape"
196   - style="position:absolute;width: 90px;"
197   - />
198   - <!-- Front Side -->
199   - <v-layout
200   - style="
  195 + >
  196 + <!-- bottom-right-side-image -->
  197 + <img
  198 + src="/static/icon/shape1.png"
  199 + alt="shape"
  200 + style="position:absolute;width: 90px;"
  201 + />
  202 + <!-- Front Side -->
  203 + <v-layout
  204 + style="
201 205 text-align: center;
202 206 margin-top: 50px;"
203   - v-if="frontPart"
204   - >
205   - <v-flex xs12>
206   - <!-- school Logo Url -->
207   - <img
208   - v-if="getCard.schoolLogoUrl"
209   - :src="getCard.schoolLogoUrl"
210   - alt="schoollogo"
211   - style="
  207 + v-if="frontPart"
  208 + >
  209 + <v-flex xs12>
  210 + <!-- school Logo Url -->
  211 + <img
  212 + v-if="getCard.schoolLogoUrl"
  213 + :src="getCard.schoolLogoUrl"
  214 + alt="schoollogo"
  215 + style="
212 216 width: 110px;
213 217 margin-top:10px;
214 218 overflow:hidden"
215   - />
216   - <img
217   - src="/static/default_thumb.png"
218   - v-if="!getCard.schoolLogoUrl"
219   - alt="schoollogo"
220   - style="
  219 + />
  220 + <img
  221 + src="/static/default_thumb.png"
  222 + v-if="!getCard.schoolLogoUrl"
  223 + alt="schoollogo"
  224 + style="
221 225 width: 110px;
222 226 margin-top:10px;
223 227 overflow:hidden"
224   - />
225   - <v-layout style="margin:auto">
226   - <!-- profile url -->
227   - <img
228   - v-if="getCard.profilePicUrl"
229   - :src="getCard.profilePicUrl"
230   - alt="profileImage"
231   - style=";
  228 + />
  229 + <v-layout style="margin:auto">
  230 + <!-- profile url -->
  231 + <img
  232 + v-if="getCard.profilePicUrl"
  233 + :src="getCard.profilePicUrl"
  234 + alt="profileImage"
  235 + style=";
232 236 width: 110px;
233 237 margin:10px auto;
234 238 width: 110px;
235 239 margin: 10px auto;
236 240 border: 3px solid #323232;
237 241 border-radius: 12px;"
238   - />
239   - <img
240   - style="
  242 + />
  243 + <img
  244 + style="
241 245 width: 110px;
242 246 margin:10px auto;
243 247 width: 110px;
244 248 margin: 10px auto;"
245   - alt="dummy"
246   - src="/static/icon/user.png"
247   - v-if="!getCard.profilePicUrl && getCard.role != '2'"
248   - />
249   - </v-layout>
  249 + alt="dummy"
  250 + src="/static/icon/user.png"
  251 + v-if="!getCard.profilePicUrl && getCard.role != '2'"
  252 + />
  253 + </v-layout>
250 254  
251   - <p
252   - style="color: #302653;font-size:24px;
  255 + <p
  256 + style="color: #302653;font-size:24px;
253 257 letter-spacing: 4px;
254 258 margin-bottom:14px;"
255   - >
256   - <b>{{ getCard.name}}</b>
257   - </p>
258   - <p
259   - style="color: #302653;
  259 + >
  260 + <b>{{ getCard.name}}</b>
  261 + </p>
  262 + <p
  263 + style="color: #302653;
260 264 font-size:14px;
261 265 letter-spacing: 4px;
262 266 margin-bottom:14px;"
263   - >
264   - <b>{{ getCard.gender}}</b>
265   - </p>
266   - <p
267   - v-if="getCard.classId"
268   - style="color: #302653;
  267 + >
  268 + <b>{{ getCard.gender}}</b>
  269 + </p>
  270 + <p
  271 + v-if="getCard.classId"
  272 + style="color: #302653;
269 273 font-size:24px;
270 274 letter-spacing: 4px;
271 275 margin-bottom:14px;"
272   - >{{ getCard.classId.classNum }}</p>
273   - <p
274   - v-if="getCard.classId"
275   - style="color: #302653;
  276 + >{{ getCard.classId.classNum }}</p>
  277 + <p
  278 + v-if="getCard.classId"
  279 + style="color: #302653;
276 280 font-size:24px;
277 281 letter-spacing: 4px;
278 282 margin-bottom:14px;"
279   - >{{ getCard.sectionId.name }}</p>
280   - <p
281   - v-if="getCard.rollNo"
282   - style="color: #302653;
  283 + >{{ getCard.sectionId.name }}</p>
  284 + <p
  285 + v-if="getCard.rollNo"
  286 + style="color: #302653;
283 287 font-size:24px;
284 288 letter-spacing: 2px;
285 289 margin-bottom:10px;"
286   - >Roll: {{ getCard.rollNo }}</p>
287   - <p
288   - v-if="getCard.joinDate"
289   - style="color: #302653;
  290 + >Roll: {{ getCard.rollNo }}</p>
  291 + <p
  292 + v-if="getCard.joinDate"
  293 + style="color: #302653;
290 294 margin-bottom:10px;
291 295 font-size:16px;
292 296 letter-spacing: 2px;"
293   - >{{ dates(getCard.joinDate) }}</p>
294   - <p
295   - v-if="getCard.joiningDate"
296   - style="color: #302653;
  297 + >{{ dates(getCard.joinDate) }}</p>
  298 + <p
  299 + v-if="getCard.joiningDate"
  300 + style="color: #302653;
297 301 margin-bottom:10px;
298 302 font-size:16px;
299 303 letter-spacing: 2px;"
300   - >{{ dates(getCard.joiningDate) }}</p>
301   - <p
302   - v-if="getCard.phone"
303   - style="color: #302653;
  304 + >{{ dates(getCard.joiningDate) }}</p>
  305 + <p
  306 + v-if="getCard.phone"
  307 + style="color: #302653;
304 308 margin-bottom:10px;
305 309 font-size:16px;
306 310 letter-spacing: 2px;"
307   - >{{ getCard.phone }}</p>
308   - <p
309   - style="
  311 + >{{ getCard.phone }}</p>
  312 + <p
  313 + style="
310 314 font-size: 19px;
311 315 font-weight: 100;
312 316 color: rgb(48, 38, 83);
313 317 letter-spacing: 5px;
314 318 margin-bottom:10px;"
315   - >
316   - <span v-if="getCard.mobile">{{ getCard.mobile}}</span>
317   - <span v-if="getCard.mobileNo">{{ getCard.mobileNo }}</span>
318   - </p>
319   - <p
320   - style="
  319 + >
  320 + <span v-if="getCard.mobile">{{ getCard.mobile}}</span>
  321 + <span v-if="getCard.mobileNo">{{ getCard.mobileNo }}</span>
  322 + </p>
  323 + <p
  324 + style="
321 325 font-size: 17px;
322 326 font-weight: 100;
323 327 color: rgb(48, 38, 83);
324 328 letter-spacing: 4px;
325 329 margin-bottom:14px;"
326   - >{{ getCard.email}}</p>
327   - </v-flex>
328   - </v-layout>
329   - <!-- back side -->
330   - <v-layout style="
  330 + >{{ getCard.email}}</p>
  331 + </v-flex>
  332 + </v-layout>
  333 + <!-- back side -->
  334 + <v-layout style="
331 335 text-align: center;" v-if="backPart">
332   - <v-flex xs12>
333   - <!-- school Logo Url -->
334   - <img
335   - v-if="getCard.schoolLogoUrl"
336   - :src="getCard.schoolLogoUrl"
337   - alt="schoollogo"
338   - style="
  336 + <v-flex xs12>
  337 + <!-- school Logo Url -->
  338 + <img
  339 + v-if="getCard.schoolLogoUrl"
  340 + :src="getCard.schoolLogoUrl"
  341 + alt="schoollogo"
  342 + style="
339 343 width: 110px;
340 344 margin-top:10px;
341 345 overflow:hidden"
342   - />
343   - <img
344   - v-if="getCard.schoolId"
345   - :src="getCard.schoolId.schoolLogoUrl"
346   - alt="schoollogo"
347   - style="
  346 + />
  347 + <img
  348 + v-if="getCard.schoolId"
  349 + :src="getCard.schoolId.schoolLogoUrl"
  350 + alt="schoollogo"
  351 + style="
348 352 width: 110px;
349 353 margin-top:10px;
350 354 overflow:hidden"
351   - />
352   - <p
353   - v-if="getCard.schoolLogoUrl"
354   - style="color: #302653;
  355 + />
  356 + <p
  357 + v-if="getCard.schoolLogoUrl"
  358 + style="color: #302653;
355 359 font-size:24px;
356 360 letter-spacing: 4px;
357 361 margin-bottom:14px;"
358   - >
359   - <b>{{ getCard.name}}</b>
360   - </p>
  362 + >
  363 + <b>{{ getCard.name}}</b>
  364 + </p>
361 365  
362   - <p
363   - v-if="getCard.city"
364   - style="
  366 + <p
  367 + v-if="getCard.city"
  368 + style="
365 369 font-size: 17px;
366 370 font-weight: 100;
367 371 color: rgb(48, 38, 83);
368 372 letter-spacing: 4px;
369 373 margin-bottom:14px;"
370   - >{{ getCard.city}}</p>
371   - <p
372   - style="
  374 + >{{ getCard.city}}</p>
  375 + <p
  376 + style="
373 377 font-size: 17px;
374 378 font-weight: 100;
375 379 color: rgb(48, 38, 83);
376 380 letter-spacing: 4px;
377 381 margin-bottom:14px;"
378   - >
379   - {{ getCard.address }}
380   - {{ getCard.presentAddress }}
381   - <span
382   - v-if="getCard.state"
383   - >({{ getCard.state }})</span>
384   - </p>
385   - <p
386   - v-if="getCard.establishmentYear"
387   - style="
  382 + >
  383 + {{ getCard.address }}
  384 + {{ getCard.presentAddress }}
  385 + <span
  386 + v-if="getCard.state"
  387 + >({{ getCard.state }})</span>
  388 + </p>
  389 + <p
  390 + v-if="getCard.establishmentYear"
  391 + style="
388 392 font-size: 17px;
389 393 font-weight: 100;
390 394 color: rgb(48, 38, 83);
391 395 letter-spacing: 4px;
392 396 margin-bottom:14px;"
393   - >{{ getCard.establishmentYear }}</p>
394   - </v-flex>
395   - </v-layout>
396   - <!-- bottom-right-side-image -->
397   - <img
398   - src="static/icon/shape2.png"
399   - alt="shape2"
400   - style="bottom: 0;
  397 + >{{ getCard.establishmentYear }}</p>
  398 + </v-flex>
  399 + </v-layout>
  400 + <!-- bottom-right-side-image -->
  401 + <img
  402 + src="static/icon/shape2.png"
  403 + alt="shape2"
  404 + style="bottom: 0;
401 405 position: absolute;
402 406 right: 0;
403 407 width: 110px;"
404   - />
  408 + />
  409 + </div>
405 410 </div>
406   - </div>
407   - </v-layout>
408   - </v-container>
409   - </v-card>
  411 + </v-layout>
  412 + </v-container>
  413 + </div>
410 414 </v-layout>
411 415 </v-flex>
412 416 </v-layout>
... ... @@ -560,9 +564,7 @@ export default {
560 564  
561 565 prindIDCardReport() {
562 566 // Pass the element id here
563   - this.$htmlToPaper("printMe");
564   -
565   -
  567 + this.$htmlToPaper("printMe");
566 568 },
567 569 getUserData() {
568 570 this.getSelectUserData = [];
... ...