Commit 25205ccca8eb128374c75d99af940c04acf5ab0c

Authored by Shikha Mishra
1 parent 7d08167583

show school logo and name modification in some pages and done task of global payment

src/Services/http.js
... ... @@ -4,13 +4,18 @@ import store from '@/store/store'
4 4 const baseDomain = "http://15.206.52.174:8001/v1";
5 5  
6 6 const baseURL = `${baseDomain}`;
7   -
  7 +var token = ""
  8 +if (store.state.role === "ADMIN") {
  9 + token = `${store.state.token}`
  10 +} else if (store.state.schoolRole === "SUPERADMIN") {
  11 + token = `${store.state.schoolToken}`
  12 +}
8 13 export default () => {
9 14 return axios.create({
10   - // baseURL: 'http://192.168.0.105:3002/v1',
  15 + // baseURL: 'http://192.168.0.127:3002/v1',
11 16 baseURL,
12 17 headers: {
13   - Authorization: `Bearer ${store.state.token}`
  18 + Authorization: `Bearer ${token}`
14 19 }
15 20 })
16 21 }
17 22 \ No newline at end of file
... ...
src/components/pageHeader/AppToolbar.vue
... ... @@ -106,7 +106,11 @@ export default {
106 106 },
107 107 getUserData() {
108 108 http()
109   - .get("/getParticularUserDetail")
  109 + .get("/getParticularUserDetail", {
  110 + headers: {
  111 + Authorization: "Bearer " + this.$store.state.token
  112 + }
  113 + })
110 114 .then(response => {
111 115 this.userData = response.data.data;
112 116 })
... ...
src/pages/Account/globalPayment.vue
... ... @@ -94,10 +94,7 @@
94 94 style="margin: auto;display:block;margin-bottom:10px !important"
95 95 >
96 96 <img src="/static/icon/user.png" v-if="!invoiceData.studentId.profilePicUrl" />
97   - <img
98   - :src="invoiceData.studentId.profilePicUrl"
99   - v-else-if="invoiceData.studentId.profilePicUrl"
100   - />
  97 + <img :src="invoiceData.studentId.profilePicUrl" v-else-if="invoiceData.studentId.profilePicUrl" />
101 98 </v-avatar>
102 99 </v-flex>
103 100 </v-layout>
... ... @@ -134,7 +131,7 @@
134 131 </v-card>
135 132 </v-flex>
136 133 <v-flex xs12 sm12 md8 v-show="showInvoiceTable">
137   - <v-card>
  134 + <v-card class="transparent">
138 135 <v-data-table
139 136 :headers="headers"
140 137 :items="studentInvoiceData"
... ... @@ -142,27 +139,28 @@
142 139 hide-actions
143 140 >
144 141 <template slot="items" slot-scope="props">
145   - <td id="td" class="text-xs-center">{{ props.item.invoiceNumber }}</td>
146   - <td id="td" class="text-xs-center">{{ props.item.totalAmount }}</td>
147   - <td id="td" class="text-xs-center">{{ props.item.totalDiscount }}</td>
148   - <td id="td" class="text-xs-center">{{ props.item.totalSubTotal }}</td>
149   - <td id="td" class="text-xs-center">{{ props.item.paymentStatus}}</td>
150   - <td id="td" class="text-xs-center">{{ dates(props.item.date) }}</td>
151   - <td class="text-xs-center">
152   - <router-link
153   - :to="{ name:'View Invoice',params: { viewInvoiceId:props.item._id } }"
154   - >
155   - <v-tooltip top>
156   - <img
157   - slot="activator"
158   - style="cursor:pointer; width:25px; height:18px; "
159   - @click="profile(props.item)"
160   - src="/static/icon/eye1.png"
161   - />
162   - <span>View</span>
163   - </v-tooltip>
164   - </router-link>
165   - </td>
  142 + <tr class="tr">
  143 + <td class="td td-row text-xs-center">{{ props.item.invoiceNumber }}</td>
  144 + <td class="td td-row text-xs-center">{{ props.item.totalAmount }}</td>
  145 + <td class="td td-row text-xs-center">{{ props.item.totalDiscount }}</td>
  146 + <td class="td td-row text-xs-center">{{ props.item.totalSubTotal }}</td>
  147 + <td class="td td-row text-xs-center">{{ props.item.paymentStatus}}</td>
  148 + <td class="td td-row text-xs-center">{{ dates(props.item.date) }}</td>
  149 + <td class="text-xs-center td td-row">
  150 + <router-link
  151 + :to="{ name:'View Invoice',params: { viewInvoiceId:props.item._id } }"
  152 + >
  153 + <v-tooltip top>
  154 + <img
  155 + slot="activator"
  156 + style="cursor:pointer; width:25px; height:18px; "
  157 + src="/static/icon/eye1.png"
  158 + />
  159 + <span>View</span>
  160 + </v-tooltip>
  161 + </router-link>
  162 + </td>
  163 + </tr>
166 164 </template>
167 165 <v-alert
168 166 slot="no-results"
... ... @@ -175,25 +173,36 @@
175 173 </v-flex>
176 174 </v-layout>
177 175 </v-flex>
178   - <!-- &nbsp -->
  176 +
179 177 <v-flex xs12>
180 178 <v-layout wrap>
181   - <v-flex xs12 sm12 md8 v-show="showInvoiceTable">
182   - <v-card>
  179 + <v-flex xs12 sm12 md12 v-show="showInvoiceTable">
  180 + <v-card class="transparent">
183 181 <v-data-table
184 182 :headers="header"
185 183 :items="studentInvoiceData"
186 184 :search="search"
187 185 hide-actions
188   - >
189   - <template slot="items" slot-scope="props" >
190   - <!-- <span v-for="feetype in props.item.feeType"> -->
191   - <!-- <td style="width:40px">{{ index + 1 }}</td> -->
192   - <td id="td" class="text-xs-center" v-for="feetype in props.item.feeType">{{ feetype.feeTypeName}}</td>
193   - <td id="td" class="text-xs-center" v-for="feetype in props.item.feeType">{{ feetype.amount }}</td>
194   - <td id="td" class="text-xs-center" v-for="feetype in props.item.feeType">{{ props.item.totalSubTotal - props.item.totalPaidAmount }}</td>
195   - <td id="td" class="text-xs-center" v-for="feetype in props.item.feeType">{{ feetype.paidAmount }}</td>
196   - <!-- </span> -->
  186 + >
  187 + <template slot="items" slot-scope="props">
  188 + <tr class="tr" v-for="feetype in props.item.feeType">
  189 + <td class="td td-row">{{ props.index + 1}}</td>
  190 + <td
  191 + class="td td-row text-xs-center"
  192 + >{{ feetype.feeTypeName}}</td>
  193 + <td
  194 + class="td td-row text-xs-center"
  195 + >{{ feetype.amount }}</td>
  196 + <td
  197 + class="td td-row text-xs-center"
  198 + >{{ props.item.totalSubTotal - props.item.totalPaidAmount }}</td>
  199 + <td
  200 + class="td td-row text-xs-center"
  201 + >{{ feetype.paidAmount }}</td>
  202 + <td
  203 + class="td td-row text-xs-center"
  204 + ><input type="text" maxlength="20"></td>
  205 + </tr>
197 206 </template>
198 207 <v-alert
199 208 slot="no-results"
... ... @@ -282,11 +291,11 @@ export default {
282 291 ],
283 292  
284 293 header: [
285   - // {
286   - // text: "#",
287   - // align: "center",
288   - // sortable: false
289   - // },
  294 + {
  295 + text: "#",
  296 + // align: "center",
  297 + sortable: false
  298 + },
290 299 {
291 300 text: "Fees Name",
292 301 align: "center",
... ... @@ -309,6 +318,12 @@ export default {
309 318 align: "center",
310 319 sortable: false,
311 320 value: "paidAmount"
  321 + },
  322 + {
  323 + text: "Weaver",
  324 + align: "center",
  325 + sortable: false,
  326 + value: "paidAmount"
312 327 }
313 328 ],
314 329 studentData: [],
... ... @@ -377,7 +392,7 @@ export default {
377 392 })
378 393 .then(response => {
379 394 this.studentInvoiceData = response.data.data;
380   - console.log("this.studentInvoiceData", this.studentInvoiceData);
  395 + // console.log("this.studentInvoiceData", this.studentInvoiceData);
381 396 this.showLoader = false;
382 397 })
383 398 .catch(err => {
... ...
src/pages/Account/invoice.vue
... ... @@ -114,7 +114,7 @@
114 114 >{{ props.item.totalPaidAmount ? props.item.totalPaidAmount : 0}}</td>
115 115 <td
116 116 class="text-xs-center td td-row"
117   - >{{ props.item.totalPaidAmount ? props.item.totalSubTotal - props.item.totalPaidAmount : props.item.totalSubTotal }}</td>
  117 + >{{ props.item.totalPaidAmount ? props.item.totalSubTotal - props.item.totalPaidAmount : props.item.totalSubTotal }}</td>
118 118 <td class="text-xs-center td td-row" v-if="props.item.paymentStatus === 'NOT_PAID'">
119 119 <span
120 120 class="red lighten-1 py-1 px-2 white--text paymentStatus"
... ... @@ -590,7 +590,7 @@ export default {
590 590 feeTypeId = this.feeTypes[i]._id;
591 591 }
592 592 }
593   - if (this.$refs.form.validate()) {
  593 + // if (this.$refs.form.validate()) {
594 594 let invoiceData = {
595 595 classId: this.invoiceData.classNum,
596 596 students: this.invoiceData.students,
... ... @@ -601,11 +601,12 @@ export default {
601 601 totalAmount: this.feeType.amount,
602 602 totalDiscount: this.feeType.discount,
603 603 totalSubTotal: this.feeType.subTotal,
604   - // totalPaidAmount: this.feeType.paidAmount
  604 + totalPaidAmount: this.feeType.paidAmount
605 605 };
606   - if (invoiceData.paymentStatus == "NOT_PAID") {
607   - delete invoiceData.totalPaidAmount;
608   - }
  606 + console.log("invoiceData",invoiceData)
  607 + // if (invoiceData.paymentStatus == "NOT_PAID") {
  608 + // delete invoiceData.totalPaidAmount;
  609 + // }
609 610 http()
610 611 .post("/createInvoice", invoiceData)
611 612 .then(response => {
... ... @@ -633,7 +634,7 @@ export default {
633 634 this.color = "error";
634 635 this.loading = false;
635 636 });
636   - }
  637 + // }
637 638 },
638 639 clear() {
639 640 this.$refs.form.reset();
... ...
src/pages/Account/viewInvoice.vue
... ... @@ -2,124 +2,139 @@
2 2 <v-app id="pages-dasboard">
3 3 <!-- ****** Edit INVOICE ****** -->
4 4 <v-container fluid grid-list-md>
5   - <v-card>
  5 + <v-layout>
  6 + <v-flex xs12 sm8 md10>
  7 + <v-btn class="open-dialog-button mt-3" round dark @click="printInvoice()">
  8 + Print
  9 + <v-icon size="18" right dark>print</v-icon>
  10 + </v-btn>
  11 + </v-flex>
  12 + </v-layout>
  13 + <v-flex xs12 sm12 id="printMe">
6 14 <v-layout wrap>
7   - <v-flex 12>
8   - <br />
9   - <v-layout wrap>
10   - <v-flex xs12 sm6>
11   - <v-layout>
12   - <v-flex xs4 sm2>
13   - <h5 class="right my-1">
14   - <b>invoice:</b>
15   - </h5>
16   - </v-flex>
17   - <v-flex sm11 xs8>
18   - <h5 class="my-1">#{{ invoiceParticularData.invoiceNumber }}</h5>
19   - </v-flex>
20   - </v-layout>
21   - <v-layout>
22   - <v-flex xs4 sm2>
23   - <h5 class="right my-1">
24   - <b>Name:</b>
25   - </h5>
26   - </v-flex>
27   - <v-flex sm11 xs8>
28   - <h5 class="my-1">{{ invoiceParticularData.studentId.name }}</h5>
29   - </v-flex>
30   - </v-layout>
31   - <v-layout>
32   - <v-flex xs4 sm2>
33   - <h5 class="right my-1">
34   - <b>Class:</b>
35   - </h5>
36   - </v-flex>
37   - <v-flex sm11 xs8>
38   - <h5 class="my-1">{{ invoiceParticularData.classId.classNum }}</h5>
39   - </v-flex>
40   - </v-layout>
41   - </v-flex>
42   - <v-flex xs12 sm6>
43   - <v-layout>
44   - <v-flex xs4 sm2>
45   - <h5 class="right my-1">
46   - <b>Roll No:</b>
47   - </h5>
48   - </v-flex>
49   - <v-flex sm6 xs8>
50   - <h5 class="my-1">{{ invoiceParticularData.studentId.rollNo }}</h5>
51   - </v-flex>
52   - </v-layout>
53   - <v-layout>
54   - <v-flex xs4 sm2>
55   - <h5 class="right my-1">
56   - <b>email:</b>
57   - </h5>
58   - </v-flex>
59   - <v-flex sm6 xs8>
60   - <h5 class="my-1 linkCover">{{ invoiceParticularData.studentId.email }}</h5>
61   - </v-flex>
62   - </v-layout>
63   - <v-layout>
64   - <v-flex xs4 sm2>
65   - <h5 class="right my-1">
66   - <b>Status :</b>
67   - </h5>
68   - </v-flex>
69   - <v-flex sm6 xs8>
70   - <h5 class="my-1">{{ invoiceParticularData.paymentStatus }}</h5>
  15 + <!-- ****** TABLE DATA MARK ****** -->
  16 + <v-flex xs12 sm12 md12>
  17 + <v-card>
  18 + <v-layout wrap>
  19 + <v-flex 12>
  20 + <br />
  21 + <v-layout>
  22 + <v-flex xs12 sm12 md12 class="text-xs-center">
  23 + <img :src="userData.schoolLogoUrl" width="140" alt="logo" />
  24 + <p class="title">{{ userData.name }}</p>
  25 + <p>{{ userData.address }}</p>
  26 + </v-flex>
  27 +
  28 + <v-flex xs12 sm12 md12 class="text-xs-center">
  29 + <v-layout>
  30 + <v-flex xs4 sm2>
  31 + <h5 class="right my-1">
  32 + <b>invoice:</b>
  33 + </h5>
  34 + </v-flex>
  35 + <v-flex sm11 xs8>
  36 + <h5 class="my-1">#{{ invoiceParticularData.invoiceNumber }}</h5>
  37 + </v-flex>
  38 + </v-layout>
  39 + <v-layout>
  40 + <v-flex xs4 sm2>
  41 + <h5 class="right my-1">
  42 + <b>Name:</b>
  43 + </h5>
  44 + </v-flex>
  45 + <v-flex sm11 xs8>
  46 + <h5 class="my-1">{{ invoiceParticularData.studentId.name }}</h5>
  47 + </v-flex>
  48 + </v-layout>
  49 + <v-layout>
  50 + <v-flex xs4 sm2>
  51 + <h5 class="right my-1">
  52 + <b>Class:</b>
  53 + </h5>
  54 + </v-flex>
  55 + <v-flex sm11 xs8>
  56 + <h5 class="my-1">{{ invoiceParticularData.classId.classNum }}</h5>
  57 + </v-flex>
  58 + </v-layout>
  59 + <!-- <v-flex xs12 sm6> -->
  60 + <v-layout>
  61 + <v-flex xs4 sm2>
  62 + <h5 class="right my-1">
  63 + <b>Roll No:</b>
  64 + </h5>
  65 + </v-flex>
  66 + <v-flex sm6 xs8>
  67 + <h5 class="my-1">{{ invoiceParticularData.studentId.rollNo }}</h5>
  68 + </v-flex>
  69 + </v-layout>
  70 + <v-layout>
  71 + <v-flex xs4 sm2>
  72 + <h5 class="right my-1">
  73 + <b>email:</b>
  74 + </h5>
  75 + </v-flex>
  76 + <v-flex sm6 xs8>
  77 + <h5 class="my-1 linkCover">{{ invoiceParticularData.studentId.email }}</h5>
  78 + </v-flex>
  79 + </v-layout>
  80 + <v-layout>
  81 + <v-flex xs4 sm2>
  82 + <h5 class="right my-1">
  83 + <b>Status :</b>
  84 + </h5>
  85 + </v-flex>
  86 + <v-flex sm6 xs8>
  87 + <h5 class="my-1">{{ invoiceParticularData.paymentStatus }}</h5>
  88 + </v-flex>
  89 + </v-layout>
  90 + </v-flex>
  91 + </v-layout>
71 92 </v-flex>
72 93 </v-layout>
73   - </v-flex>
74   - </v-layout>
  94 + <table class="feeTypeTable tableRsponsive">
  95 + <tr class="info white--text">
  96 + <th>#</th>
  97 + <th>Fee Type</th>
  98 + <th>Amount</th>
  99 + <th>Discount</th>
  100 + <th>Subtotal</th>
  101 + </tr>
  102 + <tr
  103 + v-for="(feeType, index) in feeTypeData"
  104 + :key="index"
  105 + v-on:keyup="getAmmountDetails(feeType)"
  106 + >
  107 + <td style="width:40px">{{ index + 1 }}</td>
  108 + <td style="width:120px">{{ feeType.feeTypeName }}</td>
  109 + <td style="width:120px">{{ feeType.amount }}</td>
  110 + <td style="width:120px">{{ feeType.amount-feeType.subTotal }}</td>
  111 + <td style="width:120px">{{ feeType.subTotal }}</td>
  112 + </tr>
  113 + <!-- <tfoot>
  114 + <tr>
  115 + <td colspan="4">
  116 + <span class="right subheding">Total Amount (RS) :</span>
  117 + </td>
  118 + <td>{{ feeType.subTotal }}</td>
  119 + </tr>
  120 + <tr>
  121 + <td colspan="4">
  122 + <span class="right subheding">Paid (RS) :</span>
  123 + </td>
  124 + <td>{{ feeType.totalPaidAmount ? feeType.totalPaidAmount : 0 }}</td>
  125 + </tr>
  126 + <tr>
  127 + <td colspan="4">
  128 + <span class="right subheding">Balance (RS) :</span>
  129 + </td>
  130 + <td>{{ feeType.totalPaidAmount ? feeType.subTotal - feeType.totalPaidAmount : feeType.subTotal }}</td>
  131 + </tr>
  132 + </tfoot>-->
  133 + </table>
  134 + </v-card>
75 135 </v-flex>
76 136 </v-layout>
77   - </v-card>
78   - <table class="feeTypeTable tableRsponsive">
79   - <tr class="info white--text">
80   - <th>#</th>
81   - <th>Fee Type</th>
82   - <th>Amount</th>
83   - <th>Discount</th>
84   - <th>Subtotal</th>
85   - </tr>
86   - <tr
87   - v-for="(feeType, index) in feeTypeData"
88   - :key="index"
89   - v-on:keyup="getAmmountDetails(feeType)"
90   - >
91   - <td style="width:40px">{{ index + 1 }}</td>
92   - <td style="width:120px">{{ feeType.feeTypeName }}</td>
93   - <td style="width:120px">{{ feeType.amount }}</td>
94   - <td style="width:120px">{{ feeType.amount-feeType.subTotal }}</td>
95   - <td style="width:120px">{{ feeType.subTotal }}</td>
96   - </tr>
97   - <tfoot>
98   - <tr>
99   - <td colspan="4">
100   - <span class="right subheding">Total Amount (RS) :</span>
101   - </td>
102   - <td>{{ feeType.subTotal }}</td>
103   - </tr>
104   - <tr>
105   - <td colspan="4">
106   - <span class="right subheding">Paid (RS) :</span>
107   - </td>
108   - <td>{{ feeType.totalPaidAmount ? feeType.totalPaidAmount : 0 }}</td>
109   - </tr>
110   - <tr>
111   - <td colspan="4">
112   - <span class="right subheding">Balance (RS) :</span>
113   - </td>
114   - <td>{{ feeType.totalPaidAmount ? feeType.subTotal - feeType.totalPaidAmount : feeType.subTotal }}</td>
115   - </tr>
116   - </tfoot>
117   - </table>
118   - <!-- </v-card> -->
119   - <!-- </v-flex> -->
120   - <!-- </v-layout> -->
121   - <!-- </v-container> -->
122   - <!-- </v-flex> -->
  137 + </v-flex>
123 138 </v-container>
124 139 <div class="loader" v-if="showLoader">
125 140 <v-progress-circular indeterminate color="white"></v-progress-circular>
... ... @@ -135,6 +150,7 @@ export default {
135 150 data: () => ({
136 151 showLoader: false,
137 152 feeTypes: [],
  153 + filterData: [],
138 154 invoiceData: {},
139 155 feeType: {
140 156 amount: "",
... ... @@ -145,7 +161,8 @@ export default {
145 161 },
146 162 feeTypeData: [],
147 163 token: "",
148   - invoiceParticularData: {}
  164 + invoiceParticularData: {},
  165 + userData: {}
149 166 }),
150 167  
151 168 methods: {
... ... @@ -206,12 +223,32 @@ export default {
206 223 feeType.paidAmount =
207 224 Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount);
208 225 this.feeType.paidAmount = feeType.paidAmount.toFixed(2);
  226 + },
  227 + printInvoice() {
  228 + // Pass the element id here
  229 + this.$htmlToPaper("printMe");
  230 + },
  231 + getUserData() {
  232 + http()
  233 + .get("/getParticularUserDetail")
  234 + .then(response => {
  235 + this.userData = response.data.data;
  236 + })
  237 + .catch(error => {
  238 + // if (error.response.status === 401) {
  239 + // this.$router.replace({ path: "/" });
  240 + // this.$store.dispatch("setToken", null);
  241 + // this.$store.dispatch("Id", null);
  242 + // }
  243 + });
209 244 }
210 245 },
211 246 mounted() {
212 247 this.token = this.$store.state.token;
213 248 this.getInvoiceList();
214 249 this.getfeeType();
  250 + this.getUserData();
  251 +
215 252 },
216 253 created() {
217 254 this.$root.$on("app:search", search => {
... ... @@ -238,6 +275,11 @@ table {
238 275 border-collapse: collapse;
239 276 border: 1px solid #e2e7eb;
240 277 }
  278 +.open-dialog-button {
  279 + background: #827bfa !important;
  280 + border-color: #827bfa !important;
  281 + text-transform: none !important;
  282 +}
241 283  
242 284 th,
243 285 td {
... ...
src/pages/Dashboard/dashboard.vue
... ... @@ -462,8 +462,9 @@ export default {
462 462 getStudents() {
463 463 http()
464 464 .get("/getStudentsList", {
465   - headers: { Authorization: "Bearer " + token }
466   -
  465 + headers: {
  466 + Authorization: "Bearer " + this.$store.state.token
  467 + }
467 468 })
468 469 .then(response => {
469 470 this.students = response.data.data;
... ... @@ -481,7 +482,11 @@ export default {
481 482 },
482 483 getParents() {
483 484 http()
484   - .get("/getParentsList")
  485 + .get("/getParentsList", {
  486 + headers: {
  487 + Authorization: "Bearer " + this.$store.state.token
  488 + }
  489 + })
485 490 .then(response => {
486 491 this.parents = response.data.data;
487 492 this.showLoader = false;
... ... @@ -499,8 +504,9 @@ export default {
499 504 getTeachers() {
500 505 http()
501 506 .get("/getTeachersList", {
502   - headers: { Authorization: "Bearer " + token }
503   -
  507 + headers: {
  508 + Authorization: "Bearer " + this.$store.state.token
  509 + }
504 510 })
505 511 .then(response => {
506 512 this.teachers = response.data.data;
... ... @@ -518,7 +524,11 @@ export default {
518 524 },
519 525 getClasses() {
520 526 http()
521   - .get("/getClassesList")
  527 + .get("/getClassesList", {
  528 + headers: {
  529 + Authorization: "Bearer " + this.$store.state.token
  530 + }
  531 + })
522 532 .then(response => {
523 533 this.classes = response.data.data;
524 534 this.showLoader = false;
... ... @@ -536,7 +546,11 @@ export default {
536 546 getNoticeData() {
537 547 this.showLoader = true;
538 548 http()
539   - .get("/getEventsList")
  549 + .get("/getEventsList", {
  550 + headers: {
  551 + Authorization: "Bearer " + this.$store.state.token
  552 + }
  553 + })
540 554 .then(response => {
541 555 this.noticeData = response.data.data;
542 556 this.showLoader = false;
... ... @@ -553,7 +567,11 @@ export default {
553 567 getUserData() {
554 568 // this.showLoader = true;
555 569 http()
556   - .get("/getParticularUserDetail")
  570 + .get("/getParticularUserDetail", {
  571 + headers: {
  572 + Authorization: "Bearer " + this.$store.state.token
  573 + }
  574 + })
557 575 .then(response => {
558 576 this.userData = response.data.data;
559 577 this.showLoader = false;
... ...
src/pages/Mark/viewMark.vue
... ... @@ -29,37 +29,13 @@
29 29 flat
30 30 style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px"
31 31 >
32   - <!-- <v-layout>
33   - <v-flex xs12>
34   - <v-btn class="add-button right" round dark @click="printStudentReport()">
35   - Print
36   - <v-icon right dark>print</v-icon>
37   - </v-btn>
38   - </v-flex>
39   - </v-layout> -->
40 32 <v-layout>
41   - <v-flex xs12 class="text-xs-center">
  33 + <v-flex xs12 sm12 md12 class="text-xs-center">
42 34 <img :src="userData.schoolLogoUrl" width="140" alt="logo" />
43 35 <p class="title">{{ userData.name }}</p>
44 36 <p>{{ userData.address }}</p>
45 37 </v-flex>
46   - </v-layout>
47   - <v-layout style="padding-top:10px" v-if="index === 0">
48   - <v-flex xs5>
49   - <p
50   - style="font-size:20px;margin:0px;margin-bottom:4px;"
51   - >{{ value[0].studentId.name }}</p>
52   - <p
53   - style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;"
54   - >Class : {{ value[0].classId.classNum }}</p>
55   - <p
56   - style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;"
57   - >Roll NO : {{ value[0].studentId.rollNo }}</p>
58   - <p
59   - style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;"
60   - >Section : {{ value[0].sectionId.name }}</p>
61   - </v-flex>
62   - <v-flex xs2>
  38 + <v-flex xs12 sm12 md12 class="text-xs-center">
63 39 <v-avatar size="100">
64 40 <img
65 41 :src="value[0].studentId.profilePicUrl"
... ... @@ -72,6 +48,18 @@
72 48 width="100px"
73 49 />
74 50 </v-avatar>
  51 + <p
  52 + style="font-size:20px;margin:0px;margin-bottom:4px;"
  53 + >{{ value[0].studentId.name }}</p>
  54 + <p
  55 + style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;"
  56 + >Class : {{ value[0].classId.classNum }}</p>
  57 + <p
  58 + style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;"
  59 + >Roll NO : {{ value[0].studentId.rollNo }}</p>
  60 + <p
  61 + style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;"
  62 + >Section : {{ value[0].sectionId.name }}</p>
75 63 </v-flex>
76 64 </v-layout>
77 65 <v-card-title class="subheading">{{value[0].examId.examName}}</v-card-title>
... ... @@ -244,11 +232,11 @@ export default {
244 232 this.userData = response.data.data;
245 233 })
246 234 .catch(error => {
247   - if (error.response.status === 401) {
248   - this.$router.replace({ path: "/" });
249   - this.$store.dispatch("setToken", null);
250   - this.$store.dispatch("Id", null);
251   - }
  235 + // if (error.response.status === 401) {
  236 + // this.$router.replace({ path: "/" });
  237 + // this.$store.dispatch("setToken", null);
  238 + // this.$store.dispatch("Id", null);
  239 + // }
252 240 });
253 241 },
254 242 selectMarkData(select) {
... ...
src/pages/Report/progressCardReport.vue
... ... @@ -87,26 +87,7 @@
87 87 </v-btn>
88 88 </v-flex>
89 89 </v-layout>
90   - <v-layout>
91   - <v-flex xs12 class="text-xs-center">
92   - <img :src="userData.schoolLogoUrl" width="140" alt="logo" />
93   - <p class="title">{{ userData.name }}</p>
94   - <p>{{ userData.address }}</p>
95   - </v-flex>
96   - </v-layout>
97   - <!-- </v-card>
98   - </v-flex>
99   - </v-layout>-->
100 90 <v-container grid-list-md v-show="showReport">
101   - <!-- {{ filterData }} -->
102   - <!-- <v-layout>
103   - <v-flex xs12 sm12 v-if="filterData != {}">
104   - <v-btn class="add-button right" round dark @click="printProgressReport()">
105   - Print
106   - <v-icon right dark>print</v-icon>
107   - </v-btn>
108   - </v-flex>
109   - </v-layout>-->
110 91 <v-flex xs12 sm12 id="printMe">
111 92 <v-layout wrap>
112 93 <!-- ****** TABLE DATA MARK ****** -->
... ... @@ -117,34 +98,29 @@
117 98 flat
118 99 style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px"
119 100 >
120   - <v-layout style="padding-top:10px" v-if="index === 0">
121   - <v-flex xs5>
122   - <p
123   - style="font-size:20px;margin:0px;margin-bottom:4px;"
124   - >{{ value[0].studentId.name }}</p>
125   - <p
126   - style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;"
127   - >Class : {{ value[0].classId.classNum }}</p>
128   - <p
129   - style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;"
130   - >Roll NO : {{ value[0].studentId.rollNo }}</p>
131   - <p
132   - style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;"
133   - >Section : {{ value[0].sectionId.name }}</p>
  101 + <v-layout>
  102 + <v-flex xs12 sm12 md12 class="text-xs-center">
  103 + <img :src="userData.schoolLogoUrl" width="140" alt="logo" />
  104 + <p class="title">{{ userData.name }}</p>
  105 + <p>{{ userData.address }}</p>
134 106 </v-flex>
135   - <v-flex xs2>
136   - <v-avatar size="100">
137   - <img
138   - :src="value[0].studentId.profilePicUrl"
139   - v-if="value[0].studentId.profilePicUrl"
140   - width="100px"
141   - />
142   - <img
143   - src="/static/icon/user.png"
144   - v-else-if="!value[0].studentId.profilePicUrl"
145   - width="100px"
146   - />
147   - </v-avatar>
  107 + <v-flex xs12 sm12 md12 class="text-xs-center">
  108 + <v-avatar size="100">
  109 + <img :src="value[0].studentId.profilePicUrl" v-if="value[0].studentId.profilePicUrl" width="100px" />
  110 + <img src="/static/icon/user.png" v-else-if="!value[0].studentId.profilePicUrl" width="100px" />
  111 + </v-avatar>
  112 + <p
  113 + style="font-size:20px;margin:0px;margin-bottom:4px;"
  114 + >{{ value[0].studentId.name }}</p>
  115 + <p
  116 + style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;"
  117 + >Class : {{ value[0].classId.classNum }}</p>
  118 + <p
  119 + style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;"
  120 + >Roll NO : {{ value[0].studentId.rollNo }}</p>
  121 + <p
  122 + style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;"
  123 + >Section : {{ value[0].sectionId.name }}</p>
148 124 </v-flex>
149 125 </v-layout>
150 126 <v-card-title class="subheading">{{value[0].examId.examName}}</v-card-title>
... ... @@ -156,7 +132,7 @@
156 132 width: 100% !important;
157 133 overflow: hidden;
158 134 display: block;"
159   - >
  135 + >
160 136 <thead style="border: 1px solid lightgrey !important;">
161 137 <tr style="border: 1px solid lightgrey !important;padding:4px;">
162 138 <td
... ... @@ -402,11 +378,11 @@ export default {
402 378 this.userData = response.data.data;
403 379 })
404 380 .catch(error => {
405   - if (error.response.status === 401) {
406   - this.$router.replace({ path: "/" });
407   - this.$store.dispatch("setToken", null);
408   - this.$store.dispatch("Id", null);
409   - }
  381 + // if (error.response.status === 401) {
  382 + // this.$router.replace({ path: "/" });
  383 + // this.$store.dispatch("setToken", null);
  384 + // this.$store.dispatch("Id", null);
  385 + // }
410 386 });
411 387 }
412 388 }
... ...
src/pages/Report/studentReport.vue
... ... @@ -185,18 +185,20 @@
185 185 <v-card class="transparent elevation-0">
186 186 <v-layout>
187 187 <v-flex xs12>
188   - <v-btn class="add-button right" round dark @click="printStudentReport()">
  188 + <v-btn class="open-dialog-button right" round dark @click="printStudentReport()">
189 189 Print
190 190 <v-icon right dark>print</v-icon>
191 191 </v-btn>
192 192 </v-flex>
193 193 </v-layout>
194 194 <v-layout>
195   - <v-flex xs12 class="text-xs-center">
  195 + <v-flex xs12 sm12 md12 class="text-xs-center">
196 196 <img :src="userData.schoolLogoUrl" width="140" alt="logo" />
197 197 <p class="title">{{ userData.name }}</p>
198 198 <p>{{ userData.address }}</p>
199 199 </v-flex>
  200 + <v-flex xs12 sm12 md12 class="text-xs-center">
  201 + </v-flex>
200 202 </v-layout>
201 203 <v-data-table
202 204 :headers="headers"
... ... @@ -266,7 +268,7 @@
266 268 >{{ studentReport.name }}</td>
267 269 <!-- <td
268 270 style="border: 1px solid lightgrey !important;padding: 6px;"
269   - >{{ studentReport.rollNo }}</td> -->
  271 + >{{ studentReport.rollNo }}</td>-->
270 272 <td
271 273 style="border: 1px solid lightgrey !important;padding: 6px;"
272 274 >{{ studentReport.email }}</td>
... ... @@ -558,11 +560,11 @@ export default {
558 560 this.userData = response.data.data;
559 561 })
560 562 .catch(error => {
561   - if (error.response.status === 401) {
562   - this.$router.replace({ path: "/" });
563   - this.$store.dispatch("setToken", null);
564   - this.$store.dispatch("Id", null);
565   - }
  563 + // if (error.response.status === 401) {
  564 + // this.$router.replace({ path: "/" });
  565 + // this.$store.dispatch("setToken", null);
  566 + // this.$store.dispatch("Id", null);
  567 + // }
566 568 });
567 569 }
568 570 },
... ...
src/pages/School/school.vue
... ... @@ -834,7 +834,7 @@ export default {
834 834 this.showLoader = true;
835 835 http()
836 836 .get("/getSchoolList", {
837   - headers: { Authorization: "Bearer " + this.schoolToken }
  837 + headers: { Authorization: "Bearer " + this.$store.state.token }
838 838 })
839 839 .then(response => {
840 840 this.schoolList = response.data.data;
... ...