Commit 25205ccca8eb128374c75d99af940c04acf5ab0c
1 parent
7d08167583
Exists in
master
and in
3 other branches
show school logo and name modification in some pages and done task of global payment
Showing
10 changed files
with
320 additions
and
269 deletions
Show diff stats
src/Services/http.js
1 | import axios from 'axios' | 1 | import axios from 'axios' |
2 | import store from '@/store/store' | 2 | import store from '@/store/store' |
3 | 3 | ||
4 | const baseDomain = "http://15.206.52.174:8001/v1"; | 4 | const baseDomain = "http://15.206.52.174:8001/v1"; |
5 | 5 | ||
6 | const baseURL = `${baseDomain}`; | 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 | export default () => { | 13 | export default () => { |
9 | return axios.create({ | 14 | return axios.create({ |
10 | // baseURL: 'http://192.168.0.105:3002/v1', | 15 | // baseURL: 'http://192.168.0.127:3002/v1', |
11 | baseURL, | 16 | baseURL, |
12 | headers: { | 17 | headers: { |
13 | Authorization: `Bearer ${store.state.token}` | 18 | Authorization: `Bearer ${token}` |
14 | } | 19 | } |
15 | }) | 20 | }) |
16 | } | 21 | } |
src/components/pageHeader/AppToolbar.vue
1 | <template> | 1 | <template> |
2 | <v-toolbar flat class="white pt-2" fixed app> | 2 | <v-toolbar flat class="white pt-2" fixed app> |
3 | <v-toolbar-title> | 3 | <v-toolbar-title> |
4 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide darkBlue-color"></v-toolbar-side-icon> | 4 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide darkBlue-color"></v-toolbar-side-icon> |
5 | </v-toolbar-title> | 5 | </v-toolbar-title> |
6 | <!-- ****** SEARCH ALL EXISTING STUDENTS ****** --> | 6 | <!-- ****** SEARCH ALL EXISTING STUDENTS ****** --> |
7 | <v-flex xs12 class="white"> | 7 | <v-flex xs12 class="white"> |
8 | <!-- <v-text-field | 8 | <!-- <v-text-field |
9 | flat | 9 | flat |
10 | append-icon="search" | 10 | append-icon="search" |
11 | label="Seacrh" | 11 | label="Seacrh" |
12 | class="pl-3" | 12 | class="pl-3" |
13 | color="white" | 13 | color="white" |
14 | @input.native="emitSearch" | 14 | @input.native="emitSearch" |
15 | type="text" | 15 | type="text" |
16 | dark | 16 | dark |
17 | ></v-text-field>--> | 17 | ></v-text-field>--> |
18 | <v-toolbar-title class="header-route-name pl-2">{{ $route.name }}</v-toolbar-title> | 18 | <v-toolbar-title class="header-route-name pl-2">{{ $route.name }}</v-toolbar-title> |
19 | </v-flex> | 19 | </v-flex> |
20 | <v-spacer></v-spacer> | 20 | <v-spacer></v-spacer> |
21 | <v-toolbar-items class="hidden-sm-and-down"> | 21 | <v-toolbar-items class="hidden-sm-and-down"> |
22 | <v-icon class="header-icon">notifications_none</v-icon> | 22 | <v-icon class="header-icon">notifications_none</v-icon> |
23 | </v-toolbar-items> | 23 | </v-toolbar-items> |
24 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> | 24 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> |
25 | <v-btn icon large flat slot="activator"> | 25 | <v-btn icon large flat slot="activator"> |
26 | <v-avatar size="26"> | 26 | <v-avatar size="26"> |
27 | <img src="/static/icon/setting1.png" alt="icon" /> | 27 | <img src="/static/icon/setting1.png" alt="icon" /> |
28 | </v-avatar> | 28 | </v-avatar> |
29 | </v-btn> | 29 | </v-btn> |
30 | <v-list class="pa-0"> | 30 | <v-list class="pa-0"> |
31 | <v-list-tile | 31 | <v-list-tile |
32 | v-for="(item,index) in items" | 32 | v-for="(item,index) in items" |
33 | :to="!item.href ? { name: item.name } : null" | 33 | :to="!item.href ? { name: item.name } : null" |
34 | :href="item.href" | 34 | :href="item.href" |
35 | @click="item.click" | 35 | @click="item.click" |
36 | ripple="ripple" | 36 | ripple="ripple" |
37 | :disabled="item.disabled" | 37 | :disabled="item.disabled" |
38 | :target="item.target" | 38 | :target="item.target" |
39 | rel="noopener" | 39 | rel="noopener" |
40 | :key="index" | 40 | :key="index" |
41 | > | 41 | > |
42 | <v-list-tile-action v-if="item.icon"> | 42 | <v-list-tile-action v-if="item.icon"> |
43 | <v-icon class="iconSize">{{ item.icon }}</v-icon> | 43 | <v-icon class="iconSize">{{ item.icon }}</v-icon> |
44 | </v-list-tile-action> | 44 | </v-list-tile-action> |
45 | <v-list-tile-content> | 45 | <v-list-tile-content> |
46 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 46 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
47 | </v-list-tile-content> | 47 | </v-list-tile-content> |
48 | </v-list-tile> | 48 | </v-list-tile> |
49 | </v-list> | 49 | </v-list> |
50 | </v-menu> | 50 | </v-menu> |
51 | </v-toolbar> | 51 | </v-toolbar> |
52 | </template> | 52 | </template> |
53 | <script> | 53 | <script> |
54 | import http from "@/Services/http.js"; | 54 | import http from "@/Services/http.js"; |
55 | 55 | ||
56 | export default { | 56 | export default { |
57 | name: "app-toolbar", | 57 | name: "app-toolbar", |
58 | data: () => ({ | 58 | data: () => ({ |
59 | userName: "", | 59 | userName: "", |
60 | search: "", | 60 | search: "", |
61 | userData: {}, | 61 | userData: {}, |
62 | items: [ | 62 | items: [ |
63 | { | 63 | { |
64 | icon: "account_circle", | 64 | icon: "account_circle", |
65 | href: "/resetPassword", | 65 | href: "/resetPassword", |
66 | title: "Change Password", | 66 | title: "Change Password", |
67 | click: e => { | 67 | click: e => { |
68 | console.log(e); | 68 | console.log(e); |
69 | } | 69 | } |
70 | }, | 70 | }, |
71 | // { | 71 | // { |
72 | // icon: 'settings', | 72 | // icon: 'settings', |
73 | // href: '#', | 73 | // href: '#', |
74 | // title: 'Settings', | 74 | // title: 'Settings', |
75 | // click: (e) => { | 75 | // click: (e) => { |
76 | // console.log(e); | 76 | // console.log(e); |
77 | // } | 77 | // } |
78 | // }, | 78 | // }, |
79 | { | 79 | { |
80 | icon: "lock", | 80 | icon: "lock", |
81 | href: "#", | 81 | href: "#", |
82 | title: "Logout", | 82 | title: "Logout", |
83 | click: e => { | 83 | click: e => { |
84 | window.getApp.$emit("APP_LOGOUT"); | 84 | window.getApp.$emit("APP_LOGOUT"); |
85 | } | 85 | } |
86 | } | 86 | } |
87 | ] | 87 | ] |
88 | }), | 88 | }), |
89 | computed: { | 89 | computed: { |
90 | toolbarColor() { | 90 | toolbarColor() { |
91 | return this.$vuetify.options.extra.mainNav; | 91 | return this.$vuetify.options.extra.mainNav; |
92 | } | 92 | } |
93 | }, | 93 | }, |
94 | mounted() { | 94 | mounted() { |
95 | this.getUserData(); | 95 | this.getUserData(); |
96 | }, | 96 | }, |
97 | methods: { | 97 | methods: { |
98 | // emitSearch(ev) { | 98 | // emitSearch(ev) { |
99 | // this.$root.$emit("app:search", ev.target.value); | 99 | // this.$root.$emit("app:search", ev.target.value); |
100 | // }, | 100 | // }, |
101 | handleDrawerToggle() { | 101 | handleDrawerToggle() { |
102 | window.getApp.$emit("APP_DRAWER_TOGGLED"); | 102 | window.getApp.$emit("APP_DRAWER_TOGGLED"); |
103 | }, | 103 | }, |
104 | handleFullScreen() { | 104 | handleFullScreen() { |
105 | Util.toggleFullScreen(); | 105 | Util.toggleFullScreen(); |
106 | }, | 106 | }, |
107 | getUserData() { | 107 | getUserData() { |
108 | http() | 108 | http() |
109 | .get("/getParticularUserDetail") | 109 | .get("/getParticularUserDetail", { |
110 | headers: { | ||
111 | Authorization: "Bearer " + this.$store.state.token | ||
112 | } | ||
113 | }) | ||
110 | .then(response => { | 114 | .then(response => { |
111 | this.userData = response.data.data; | 115 | this.userData = response.data.data; |
112 | }) | 116 | }) |
113 | .catch(error => { | 117 | .catch(error => { |
114 | // if (error.response.status === 401) { | 118 | // if (error.response.status === 401) { |
115 | // this.$router.replace({ path: "/" }); | 119 | // this.$router.replace({ path: "/" }); |
116 | // this.$store.dispatch("setToken", null); | 120 | // this.$store.dispatch("setToken", null); |
117 | // this.$store.dispatch("Id", null); | 121 | // this.$store.dispatch("Id", null); |
118 | // } | 122 | // } |
119 | }); | 123 | }); |
120 | } | 124 | } |
121 | } | 125 | } |
122 | }; | 126 | }; |
123 | </script> | 127 | </script> |
124 | <style> | 128 | <style> |
125 | .v-icon { | 129 | .v-icon { |
126 | font-size: 30px; | 130 | font-size: 30px; |
127 | } | 131 | } |
128 | .fixcolors { | 132 | .fixcolors { |
129 | background: #444b54 !important; | 133 | background: #444b54 !important; |
130 | } | 134 | } |
131 | 135 | ||
132 | @media screen and (min-width: 1270px) { | 136 | @media screen and (min-width: 1270px) { |
133 | .hide { | 137 | .hide { |
134 | display: none; | 138 | display: none; |
135 | } | 139 | } |
136 | /* } | 140 | /* } |
137 | @media screen and (max-width: 962px) { | 141 | @media screen and (max-width: 962px) { |
138 | .imglogo{ | 142 | .imglogo{ |
139 | position: absolute; | 143 | position: absolute; |
140 | top: 13px; | 144 | top: 13px; |
141 | left: 13px !important; | 145 | left: 13px !important; |
142 | width: 70px; | 146 | width: 70px; |
143 | height: 24px; | 147 | height: 24px; |
144 | } */ | 148 | } */ |
145 | } | 149 | } |
146 | @media screen and (max-width: 420px) { | 150 | @media screen and (max-width: 420px) { |
147 | .v-list__tile { | 151 | .v-list__tile { |
148 | font-size: 14px; | 152 | font-size: 14px; |
149 | padding: 0 10px; | 153 | padding: 0 10px; |
150 | } | 154 | } |
151 | .name { | 155 | .name { |
152 | font-size: 15px; | 156 | font-size: 15px; |
153 | } | 157 | } |
154 | } | 158 | } |
155 | </style> | 159 | </style> |
156 | 160 |
src/pages/Account/globalPayment.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** EXISTING GLOBAL PAYMENT TABLE ****** --> | 3 | <!-- ****** EXISTING GLOBAL PAYMENT TABLE ****** --> |
4 | <v-form ref="form" v-model="valid" lazy-validation> | 4 | <v-form ref="form" v-model="valid" lazy-validation> |
5 | <v-container fluid> | 5 | <v-container fluid> |
6 | <v-flex xs12 sm12 lg12> | 6 | <v-flex xs12 sm12 lg12> |
7 | <v-layout wrap> | 7 | <v-layout wrap> |
8 | <v-flex xs12 sm12 lg10> | 8 | <v-flex xs12 sm12 lg10> |
9 | <v-layout wrap> | 9 | <v-layout wrap> |
10 | <v-flex xs12 sm12 lg4> | 10 | <v-flex xs12 sm12 lg4> |
11 | <v-flex xs12 sm4 lg4 class="subheading"> | 11 | <v-flex xs12 sm4 lg4 class="subheading"> |
12 | <label class="mt-4">Class:</label> | 12 | <label class="mt-4">Class:</label> |
13 | </v-flex> | 13 | </v-flex> |
14 | <v-flex xs12 sm12 lg10> | 14 | <v-flex xs12 sm12 lg10> |
15 | <v-select | 15 | <v-select |
16 | :items="addclass" | 16 | :items="addclass" |
17 | label="Select Class" | 17 | label="Select Class" |
18 | v-model="selectStudents.selectClassId" | 18 | v-model="selectStudents.selectClassId" |
19 | item-text="classNum" | 19 | item-text="classNum" |
20 | item-value="_id" | 20 | item-value="_id" |
21 | name="Select Class" | 21 | name="Select Class" |
22 | :rules="classRules" | 22 | :rules="classRules" |
23 | @change="getSection()" | 23 | @change="getSection()" |
24 | required | 24 | required |
25 | ></v-select> | 25 | ></v-select> |
26 | </v-flex> | 26 | </v-flex> |
27 | </v-flex> | 27 | </v-flex> |
28 | <v-flex xs12 sm12 lg4> | 28 | <v-flex xs12 sm12 lg4> |
29 | <v-flex xs12 sm4 lg4 class="subheading"> | 29 | <v-flex xs12 sm4 lg4 class="subheading"> |
30 | <label class="mt-4">Section:</label> | 30 | <label class="mt-4">Section:</label> |
31 | </v-flex> | 31 | </v-flex> |
32 | <v-flex xs12 sm12 lg10 class> | 32 | <v-flex xs12 sm12 lg10 class> |
33 | <v-select | 33 | <v-select |
34 | :items="addSection" | 34 | :items="addSection" |
35 | label="Select Section" | 35 | label="Select Section" |
36 | v-model="selectStudents.selectSection" | 36 | v-model="selectStudents.selectSection" |
37 | item-text="name" | 37 | item-text="name" |
38 | item-value="_id" | 38 | item-value="_id" |
39 | name="Select Section" | 39 | name="Select Section" |
40 | :rules="sectionRules" | 40 | :rules="sectionRules" |
41 | @change="getStudents()" | 41 | @change="getStudents()" |
42 | required | 42 | required |
43 | ></v-select> | 43 | ></v-select> |
44 | </v-flex> | 44 | </v-flex> |
45 | </v-flex> | 45 | </v-flex> |
46 | <v-flex xs12 sm12 lg4> | 46 | <v-flex xs12 sm12 lg4> |
47 | <v-flex xs12 sm4 lg4 class="subheading"> | 47 | <v-flex xs12 sm4 lg4 class="subheading"> |
48 | <label class="mt-4">Student:</label> | 48 | <label class="mt-4">Student:</label> |
49 | </v-flex> | 49 | </v-flex> |
50 | <v-flex xs12 sm12 lg10 class> | 50 | <v-flex xs12 sm12 lg10 class> |
51 | <v-select | 51 | <v-select |
52 | :items="studentData" | 52 | :items="studentData" |
53 | label="Select Student" | 53 | label="Select Student" |
54 | v-model="selectStudents.selectId" | 54 | v-model="selectStudents.selectId" |
55 | item-text="name" | 55 | item-text="name" |
56 | item-value="_id" | 56 | item-value="_id" |
57 | :rules="studentRules" | 57 | :rules="studentRules" |
58 | required | 58 | required |
59 | ></v-select> | 59 | ></v-select> |
60 | </v-flex> | 60 | </v-flex> |
61 | </v-flex> | 61 | </v-flex> |
62 | </v-layout> | 62 | </v-layout> |
63 | </v-flex> | 63 | </v-flex> |
64 | <v-flex xs12 sm12 lg2> | 64 | <v-flex xs12 sm12 lg2> |
65 | <v-flex xs12 sm12 lg12> | 65 | <v-flex xs12 sm12 lg12> |
66 | <v-btn | 66 | <v-btn |
67 | @click="getInvoicesData()" | 67 | @click="getInvoicesData()" |
68 | round | 68 | round |
69 | dark | 69 | dark |
70 | :loading="loading" | 70 | :loading="loading" |
71 | class="right mt-4 open-dialog-button" | 71 | class="right mt-4 open-dialog-button" |
72 | >Search</v-btn> | 72 | >Search</v-btn> |
73 | </v-flex> | 73 | </v-flex> |
74 | </v-flex> | 74 | </v-flex> |
75 | </v-layout> | 75 | </v-layout> |
76 | </v-flex> | 76 | </v-flex> |
77 | </v-container> | 77 | </v-container> |
78 | </v-form> | 78 | </v-form> |
79 | <v-container fluid grid-list-md> | 79 | <v-container fluid grid-list-md> |
80 | <v-flex xs12> | 80 | <v-flex xs12> |
81 | <v-layout wrap> | 81 | <v-layout wrap> |
82 | <v-flex xs12 sm12 md4> | 82 | <v-flex xs12 sm12 md4> |
83 | <v-card | 83 | <v-card |
84 | flat | 84 | flat |
85 | class="pa-3" | 85 | class="pa-3" |
86 | v-for="(invoiceData,i) in studentInvoiceData" | 86 | v-for="(invoiceData,i) in studentInvoiceData" |
87 | :key="i" | 87 | :key="i" |
88 | v-if="i === 0" | 88 | v-if="i === 0" |
89 | > | 89 | > |
90 | <v-layout> | 90 | <v-layout> |
91 | <v-flex xs12> | 91 | <v-flex xs12> |
92 | <v-avatar | 92 | <v-avatar |
93 | size="80px" | 93 | size="80px" |
94 | style="margin: auto;display:block;margin-bottom:10px !important" | 94 | style="margin: auto;display:block;margin-bottom:10px !important" |
95 | > | 95 | > |
96 | <img src="/static/icon/user.png" v-if="!invoiceData.studentId.profilePicUrl" /> | 96 | <img src="/static/icon/user.png" v-if="!invoiceData.studentId.profilePicUrl" /> |
97 | <img | 97 | <img :src="invoiceData.studentId.profilePicUrl" v-else-if="invoiceData.studentId.profilePicUrl" /> |
98 | :src="invoiceData.studentId.profilePicUrl" | ||
99 | v-else-if="invoiceData.studentId.profilePicUrl" | ||
100 | /> | ||
101 | </v-avatar> | 98 | </v-avatar> |
102 | </v-flex> | 99 | </v-flex> |
103 | </v-layout> | 100 | </v-layout> |
104 | <v-layout class="studentProfile"> | 101 | <v-layout class="studentProfile"> |
105 | <v-flex xs4 sm3 md3> | 102 | <v-flex xs4 sm3 md3> |
106 | <h4> | 103 | <h4> |
107 | <b>Name</b> | 104 | <b>Name</b> |
108 | </h4> | 105 | </h4> |
109 | </v-flex> | 106 | </v-flex> |
110 | <v-flex sm9 xs8 md9> | 107 | <v-flex sm9 xs8 md9> |
111 | <h4>: {{ invoiceData.studentId.name }}</h4> | 108 | <h4>: {{ invoiceData.studentId.name }}</h4> |
112 | </v-flex> | 109 | </v-flex> |
113 | </v-layout> | 110 | </v-layout> |
114 | <v-layout class="studentProfile"> | 111 | <v-layout class="studentProfile"> |
115 | <v-flex xs4 sm3 md3> | 112 | <v-flex xs4 sm3 md3> |
116 | <h4> | 113 | <h4> |
117 | <b>Class</b> | 114 | <b>Class</b> |
118 | </h4> | 115 | </h4> |
119 | </v-flex> | 116 | </v-flex> |
120 | <v-flex sm9 xs8 md9> | 117 | <v-flex sm9 xs8 md9> |
121 | <h4>: {{ invoiceData.classId.classNum }}</h4> | 118 | <h4>: {{ invoiceData.classId.classNum }}</h4> |
122 | </v-flex> | 119 | </v-flex> |
123 | </v-layout> | 120 | </v-layout> |
124 | <v-layout class="studentProfile"> | 121 | <v-layout class="studentProfile"> |
125 | <v-flex xs4 sm3 md3> | 122 | <v-flex xs4 sm3 md3> |
126 | <h4> | 123 | <h4> |
127 | <b>Roll No</b> | 124 | <b>Roll No</b> |
128 | </h4> | 125 | </h4> |
129 | </v-flex> | 126 | </v-flex> |
130 | <v-flex sm9 xs8 md9> | 127 | <v-flex sm9 xs8 md9> |
131 | <h4>: {{ invoiceData.studentId.rollNo }}</h4> | 128 | <h4>: {{ invoiceData.studentId.rollNo }}</h4> |
132 | </v-flex> | 129 | </v-flex> |
133 | </v-layout> | 130 | </v-layout> |
134 | </v-card> | 131 | </v-card> |
135 | </v-flex> | 132 | </v-flex> |
136 | <v-flex xs12 sm12 md8 v-show="showInvoiceTable"> | 133 | <v-flex xs12 sm12 md8 v-show="showInvoiceTable"> |
137 | <v-card> | 134 | <v-card class="transparent"> |
138 | <v-data-table | 135 | <v-data-table |
139 | :headers="headers" | 136 | :headers="headers" |
140 | :items="studentInvoiceData" | 137 | :items="studentInvoiceData" |
141 | :search="search" | 138 | :search="search" |
142 | hide-actions | 139 | hide-actions |
143 | > | 140 | > |
144 | <template slot="items" slot-scope="props"> | 141 | <template slot="items" slot-scope="props"> |
145 | <td id="td" class="text-xs-center">{{ props.item.invoiceNumber }}</td> | 142 | <tr class="tr"> |
146 | <td id="td" class="text-xs-center">{{ props.item.totalAmount }}</td> | 143 | <td class="td td-row text-xs-center">{{ props.item.invoiceNumber }}</td> |
147 | <td id="td" class="text-xs-center">{{ props.item.totalDiscount }}</td> | 144 | <td class="td td-row text-xs-center">{{ props.item.totalAmount }}</td> |
148 | <td id="td" class="text-xs-center">{{ props.item.totalSubTotal }}</td> | 145 | <td class="td td-row text-xs-center">{{ props.item.totalDiscount }}</td> |
149 | <td id="td" class="text-xs-center">{{ props.item.paymentStatus}}</td> | 146 | <td class="td td-row text-xs-center">{{ props.item.totalSubTotal }}</td> |
150 | <td id="td" class="text-xs-center">{{ dates(props.item.date) }}</td> | 147 | <td class="td td-row text-xs-center">{{ props.item.paymentStatus}}</td> |
151 | <td class="text-xs-center"> | 148 | <td class="td td-row text-xs-center">{{ dates(props.item.date) }}</td> |
152 | <router-link | 149 | <td class="text-xs-center td td-row"> |
153 | :to="{ name:'View Invoice',params: { viewInvoiceId:props.item._id } }" | 150 | <router-link |
154 | > | 151 | :to="{ name:'View Invoice',params: { viewInvoiceId:props.item._id } }" |
155 | <v-tooltip top> | 152 | > |
156 | <img | 153 | <v-tooltip top> |
157 | slot="activator" | 154 | <img |
158 | style="cursor:pointer; width:25px; height:18px; " | 155 | slot="activator" |
159 | @click="profile(props.item)" | 156 | style="cursor:pointer; width:25px; height:18px; " |
160 | src="/static/icon/eye1.png" | 157 | src="/static/icon/eye1.png" |
161 | /> | 158 | /> |
162 | <span>View</span> | 159 | <span>View</span> |
163 | </v-tooltip> | 160 | </v-tooltip> |
164 | </router-link> | 161 | </router-link> |
165 | </td> | 162 | </td> |
163 | </tr> | ||
166 | </template> | 164 | </template> |
167 | <v-alert | 165 | <v-alert |
168 | slot="no-results" | 166 | slot="no-results" |
169 | :value="true" | 167 | :value="true" |
170 | color="error" | 168 | color="error" |
171 | icon="warning" | 169 | icon="warning" |
172 | >Your search for "{{ search }}" found no results.</v-alert> | 170 | >Your search for "{{ search }}" found no results.</v-alert> |
173 | </v-data-table> | 171 | </v-data-table> |
174 | </v-card> | 172 | </v-card> |
175 | </v-flex> | 173 | </v-flex> |
176 | </v-layout> | 174 | </v-layout> |
177 | </v-flex> | 175 | </v-flex> |
178 | <!--   --> | 176 | |
179 | <v-flex xs12> | 177 | <v-flex xs12> |
180 | <v-layout wrap> | 178 | <v-layout wrap> |
181 | <v-flex xs12 sm12 md8 v-show="showInvoiceTable"> | 179 | <v-flex xs12 sm12 md12 v-show="showInvoiceTable"> |
182 | <v-card> | 180 | <v-card class="transparent"> |
183 | <v-data-table | 181 | <v-data-table |
184 | :headers="header" | 182 | :headers="header" |
185 | :items="studentInvoiceData" | 183 | :items="studentInvoiceData" |
186 | :search="search" | 184 | :search="search" |
187 | hide-actions | 185 | hide-actions |
188 | > | 186 | > |
189 | <template slot="items" slot-scope="props" > | 187 | <template slot="items" slot-scope="props"> |
190 | <!-- <span v-for="feetype in props.item.feeType"> --> | 188 | <tr class="tr" v-for="feetype in props.item.feeType"> |
191 | <!-- <td style="width:40px">{{ index + 1 }}</td> --> | 189 | <td class="td td-row">{{ props.index + 1}}</td> |
192 | <td id="td" class="text-xs-center" v-for="feetype in props.item.feeType">{{ feetype.feeTypeName}}</td> | 190 | <td |
193 | <td id="td" class="text-xs-center" v-for="feetype in props.item.feeType">{{ feetype.amount }}</td> | 191 | class="td td-row text-xs-center" |
194 | <td id="td" class="text-xs-center" v-for="feetype in props.item.feeType">{{ props.item.totalSubTotal - props.item.totalPaidAmount }}</td> | 192 | >{{ feetype.feeTypeName}}</td> |
195 | <td id="td" class="text-xs-center" v-for="feetype in props.item.feeType">{{ feetype.paidAmount }}</td> | 193 | <td |
196 | <!-- </span> --> | 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 | </template> | 206 | </template> |
198 | <v-alert | 207 | <v-alert |
199 | slot="no-results" | 208 | slot="no-results" |
200 | :value="true" | 209 | :value="true" |
201 | color="error" | 210 | color="error" |
202 | icon="warning" | 211 | icon="warning" |
203 | >Your search for "{{ search }}" found no results.</v-alert> | 212 | >Your search for "{{ search }}" found no results.</v-alert> |
204 | </v-data-table> | 213 | </v-data-table> |
205 | </v-card> | 214 | </v-card> |
206 | </v-flex> | 215 | </v-flex> |
207 | </v-layout> | 216 | </v-layout> |
208 | </v-flex> | 217 | </v-flex> |
209 | </v-container> | 218 | </v-container> |
210 | <div class="loader" v-if="showLoader"> | 219 | <div class="loader" v-if="showLoader"> |
211 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 220 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
212 | </div> | 221 | </div> |
213 | </v-container> | 222 | </v-container> |
214 | </template> | 223 | </template> |
215 | 224 | ||
216 | <script> | 225 | <script> |
217 | import http from "@/Services/http.js"; | 226 | import http from "@/Services/http.js"; |
218 | import moment from "moment"; | 227 | import moment from "moment"; |
219 | 228 | ||
220 | export default { | 229 | export default { |
221 | data: () => ({ | 230 | data: () => ({ |
222 | snackbar: false, | 231 | snackbar: false, |
223 | showInvoiceTable: false, | 232 | showInvoiceTable: false, |
224 | y: "top", | 233 | y: "top", |
225 | x: "right", | 234 | x: "right", |
226 | mode: "", | 235 | mode: "", |
227 | timeout: 3000, | 236 | timeout: 3000, |
228 | text: "", | 237 | text: "", |
229 | showLoader: false, | 238 | showLoader: false, |
230 | loading: false, | 239 | loading: false, |
231 | search: "", | 240 | search: "", |
232 | valid: true, | 241 | valid: true, |
233 | addclass: [], | 242 | addclass: [], |
234 | // index: '', | 243 | // index: '', |
235 | feeType: { | 244 | feeType: { |
236 | amount: "", | 245 | amount: "", |
237 | discount: "", | 246 | discount: "", |
238 | totalPaidAmount: "", | 247 | totalPaidAmount: "", |
239 | subTotal: "", | 248 | subTotal: "", |
240 | feeTypeName: "", | 249 | feeTypeName: "", |
241 | userData: {} | 250 | userData: {} |
242 | }, | 251 | }, |
243 | feeTypeData: [], | 252 | feeTypeData: [], |
244 | selectStudents: {}, | 253 | selectStudents: {}, |
245 | addSection: [], | 254 | addSection: [], |
246 | classRules: [v => !!v || " Class Name is required"], | 255 | classRules: [v => !!v || " Class Name is required"], |
247 | sectionRules: [v => !!v || " Section Name is required"], | 256 | sectionRules: [v => !!v || " Section Name is required"], |
248 | studentRules: [v => !!v || "Student Name is required"], | 257 | studentRules: [v => !!v || "Student Name is required"], |
249 | headers: [ | 258 | headers: [ |
250 | { | 259 | { |
251 | text: "Invoice Number", | 260 | text: "Invoice Number", |
252 | align: "center", | 261 | align: "center", |
253 | sortable: false, | 262 | sortable: false, |
254 | value: "invoiceNumber" | 263 | value: "invoiceNumber" |
255 | }, | 264 | }, |
256 | { | 265 | { |
257 | text: "Total Pay", | 266 | text: "Total Pay", |
258 | value: "totalAmount", | 267 | value: "totalAmount", |
259 | sortable: false, | 268 | sortable: false, |
260 | align: "center" | 269 | align: "center" |
261 | }, | 270 | }, |
262 | { | 271 | { |
263 | text: "Weaver", | 272 | text: "Weaver", |
264 | value: "totalDiscount", | 273 | value: "totalDiscount", |
265 | sortable: false, | 274 | sortable: false, |
266 | align: "center" | 275 | align: "center" |
267 | }, | 276 | }, |
268 | { | 277 | { |
269 | text: " Total Collection", | 278 | text: " Total Collection", |
270 | value: "totalSubTotal", | 279 | value: "totalSubTotal", |
271 | sortable: false, | 280 | sortable: false, |
272 | align: "center" | 281 | align: "center" |
273 | }, | 282 | }, |
274 | { | 283 | { |
275 | text: "Clearance", | 284 | text: "Clearance", |
276 | value: "paymentStatus", | 285 | value: "paymentStatus", |
277 | sortable: false, | 286 | sortable: false, |
278 | align: "center" | 287 | align: "center" |
279 | }, | 288 | }, |
280 | { text: "Payment Date", value: "date", sortable: false, align: "center" }, | 289 | { text: "Payment Date", value: "date", sortable: false, align: "center" }, |
281 | { text: "Action", value: "", sortable: false, align: "center" } | 290 | { text: "Action", value: "", sortable: false, align: "center" } |
282 | ], | 291 | ], |
283 | 292 | ||
284 | header: [ | 293 | header: [ |
285 | // { | 294 | { |
286 | // text: "#", | 295 | text: "#", |
287 | // align: "center", | 296 | // align: "center", |
288 | // sortable: false | 297 | sortable: false |
289 | // }, | 298 | }, |
290 | { | 299 | { |
291 | text: "Fees Name", | 300 | text: "Fees Name", |
292 | align: "center", | 301 | align: "center", |
293 | sortable: false, | 302 | sortable: false, |
294 | value: "feeTypeName" | 303 | value: "feeTypeName" |
295 | }, | 304 | }, |
296 | { | 305 | { |
297 | text: "Fees Amount", | 306 | text: "Fees Amount", |
298 | align: "center", | 307 | align: "center", |
299 | sortable: false, | 308 | sortable: false, |
300 | value: "amount" | 309 | value: "amount" |
301 | }, | 310 | }, |
302 | { | 311 | { |
303 | text: "Due", | 312 | text: "Due", |
304 | align: "center", | 313 | align: "center", |
305 | sortable: false | 314 | sortable: false |
306 | }, | 315 | }, |
307 | { | 316 | { |
308 | text: "Paid Amount", | 317 | text: "Paid Amount", |
309 | align: "center", | 318 | align: "center", |
310 | sortable: false, | 319 | sortable: false, |
311 | value: "paidAmount" | 320 | value: "paidAmount" |
321 | }, | ||
322 | { | ||
323 | text: "Weaver", | ||
324 | align: "center", | ||
325 | sortable: false, | ||
326 | value: "paidAmount" | ||
312 | } | 327 | } |
313 | ], | 328 | ], |
314 | studentData: [], | 329 | studentData: [], |
315 | studentInvoiceData: [] | 330 | studentInvoiceData: [] |
316 | }), | 331 | }), |
317 | methods: { | 332 | methods: { |
318 | dates: function(date) { | 333 | dates: function(date) { |
319 | return moment(date).format("MMMM DD, YYYY"); | 334 | return moment(date).format("MMMM DD, YYYY"); |
320 | }, | 335 | }, |
321 | getSection() { | 336 | getSection() { |
322 | var token = this.$store.state.token; | 337 | var token = this.$store.state.token; |
323 | this.showLoader = true; | 338 | this.showLoader = true; |
324 | http() | 339 | http() |
325 | .get( | 340 | .get( |
326 | "/getSectionsList", | 341 | "/getSectionsList", |
327 | { | 342 | { |
328 | params: { | 343 | params: { |
329 | classId: this.selectStudents.selectClassId, | 344 | classId: this.selectStudents.selectClassId, |
330 | schoolId: this.$store.state.schoolId | 345 | schoolId: this.$store.state.schoolId |
331 | } | 346 | } |
332 | }, | 347 | }, |
333 | { | 348 | { |
334 | headers: { Authorization: "Bearer " + token } | 349 | headers: { Authorization: "Bearer " + token } |
335 | } | 350 | } |
336 | ) | 351 | ) |
337 | .then(response => { | 352 | .then(response => { |
338 | this.addSection = response.data.data; | 353 | this.addSection = response.data.data; |
339 | this.showLoader = false; | 354 | this.showLoader = false; |
340 | // console.log("getSectionsList=====>", this.addSection); | 355 | // console.log("getSectionsList=====>", this.addSection); |
341 | }) | 356 | }) |
342 | .catch(error => { | 357 | .catch(error => { |
343 | this.showLoader = false; | 358 | this.showLoader = false; |
344 | // console.log("err====>", err); | 359 | // console.log("err====>", err); |
345 | // this.$router.replace({ path: '/' }); | 360 | // this.$router.replace({ path: '/' }); |
346 | }); | 361 | }); |
347 | }, | 362 | }, |
348 | getStudents() { | 363 | getStudents() { |
349 | this.showLoader = true; | 364 | this.showLoader = true; |
350 | http() | 365 | http() |
351 | .get("/getStudentWithClass", { | 366 | .get("/getStudentWithClass", { |
352 | params: { | 367 | params: { |
353 | classId: this.selectStudents.selectClassId, | 368 | classId: this.selectStudents.selectClassId, |
354 | sectionId: this.selectStudents.selectSection, | 369 | sectionId: this.selectStudents.selectSection, |
355 | schoolId: this.$store.state.schoolId | 370 | schoolId: this.$store.state.schoolId |
356 | } | 371 | } |
357 | }) | 372 | }) |
358 | .then(response => { | 373 | .then(response => { |
359 | this.studentData = response.data.data; | 374 | this.studentData = response.data.data; |
360 | this.showLoader = false; | 375 | this.showLoader = false; |
361 | }) | 376 | }) |
362 | .catch(err => { | 377 | .catch(err => { |
363 | console.log("err====>", err); | 378 | console.log("err====>", err); |
364 | this.showLoader = false; | 379 | this.showLoader = false; |
365 | }); | 380 | }); |
366 | }, | 381 | }, |
367 | getInvoicesData() { | 382 | getInvoicesData() { |
368 | this.showLoader = true; | 383 | this.showLoader = true; |
369 | this.showInvoiceTable = true; | 384 | this.showInvoiceTable = true; |
370 | http() | 385 | http() |
371 | .get("/getInvoicesList", { | 386 | .get("/getInvoicesList", { |
372 | params: { | 387 | params: { |
373 | classId: this.selectStudents.selectClassId, | 388 | classId: this.selectStudents.selectClassId, |
374 | studentId: this.selectStudents.selectId, | 389 | studentId: this.selectStudents.selectId, |
375 | schoolId: this.$store.state.schoolId | 390 | schoolId: this.$store.state.schoolId |
376 | } | 391 | } |
377 | }) | 392 | }) |
378 | .then(response => { | 393 | .then(response => { |
379 | this.studentInvoiceData = response.data.data; | 394 | this.studentInvoiceData = response.data.data; |
380 | console.log("this.studentInvoiceData", this.studentInvoiceData); | 395 | // console.log("this.studentInvoiceData", this.studentInvoiceData); |
381 | this.showLoader = false; | 396 | this.showLoader = false; |
382 | }) | 397 | }) |
383 | .catch(err => { | 398 | .catch(err => { |
384 | console.log("err====>", err); | 399 | console.log("err====>", err); |
385 | this.showLoader = false; | 400 | this.showLoader = false; |
386 | }); | 401 | }); |
387 | }, | 402 | }, |
388 | getAmmountDetails(feeTyp) { | 403 | getAmmountDetails(feeTyp) { |
389 | let feeType = { | 404 | let feeType = { |
390 | subTotal: "", | 405 | subTotal: "", |
391 | subParticularTotal: "", | 406 | subParticularTotal: "", |
392 | paidAmount: "" | 407 | paidAmount: "" |
393 | }; | 408 | }; |
394 | // *********** SUBTOTAL *********** | 409 | // *********** SUBTOTAL *********** |
395 | feeType.subTotal = | 410 | feeType.subTotal = |
396 | Number(feeType.subTotal) + Number(this.feeTypeData[i].subTotal); | 411 | Number(feeType.subTotal) + Number(this.feeTypeData[i].subTotal); |
397 | this.feeType.subTotal = feeType.subTotal.toFixed(2); | 412 | this.feeType.subTotal = feeType.subTotal.toFixed(2); |
398 | // *********** PAID-AMOUNT *********** | 413 | // *********** PAID-AMOUNT *********** |
399 | feeType.paidAmount = | 414 | feeType.paidAmount = |
400 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); | 415 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); |
401 | this.feeType.paidAmount = feeType.paidAmount.toFixed(2); | 416 | this.feeType.paidAmount = feeType.paidAmount.toFixed(2); |
402 | } | 417 | } |
403 | }, | 418 | }, |
404 | mounted() { | 419 | mounted() { |
405 | var token = this.$store.state.token; | 420 | var token = this.$store.state.token; |
406 | http() | 421 | http() |
407 | .get("/getClassesList", { | 422 | .get("/getClassesList", { |
408 | params: { | 423 | params: { |
409 | schoolId: this.$store.state.schoolId | 424 | schoolId: this.$store.state.schoolId |
410 | }, | 425 | }, |
411 | headers: { Authorization: "Bearer " + token } | 426 | headers: { Authorization: "Bearer " + token } |
412 | }) | 427 | }) |
413 | .then(response => { | 428 | .then(response => { |
414 | this.addclass = response.data.data; | 429 | this.addclass = response.data.data; |
415 | }) | 430 | }) |
416 | .catch(error => { | 431 | .catch(error => { |
417 | this.showLoader = false; | 432 | this.showLoader = false; |
418 | if (error.response.status === 401) { | 433 | if (error.response.status === 401) { |
419 | this.$router.replace({ path: "/" }); | 434 | this.$router.replace({ path: "/" }); |
420 | this.$store.dispatch("setToken", null); | 435 | this.$store.dispatch("setToken", null); |
421 | this.$store.dispatch("Id", null); | 436 | this.$store.dispatch("Id", null); |
422 | this.$store.dispatch("Role", null); | 437 | this.$store.dispatch("Role", null); |
423 | } | 438 | } |
424 | }); | 439 | }); |
425 | } | 440 | } |
426 | // created() { | 441 | // created() { |
427 | // this.$root.$on("app:search", search => { | 442 | // this.$root.$on("app:search", search => { |
428 | // this.search = search; | 443 | // this.search = search; |
429 | // }); | 444 | // }); |
430 | // }, | 445 | // }, |
431 | // beforeDestroy() { | 446 | // beforeDestroy() { |
432 | // // dont forget to remove the listener | 447 | // // dont forget to remove the listener |
433 | // this.$root.$off("app:search"); | 448 | // this.$root.$off("app:search"); |
434 | // } | 449 | // } |
435 | }; | 450 | }; |
436 | </script> | 451 | </script> |
437 | 452 | ||
438 | 453 | ||
439 | <style scoped> | 454 | <style scoped> |
440 | .studentProfile { | 455 | .studentProfile { |
src/pages/Account/invoice.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** PROFILE VIEW SECTION DATA ****** --> | 3 | <!-- ****** PROFILE VIEW SECTION DATA ****** --> |
4 | <!-- <v-dialog v-model="dialog1" max-width="600px"> | 4 | <!-- <v-dialog v-model="dialog1" max-width="600px"> |
5 | <v-card> | 5 | <v-card> |
6 | <v-flex align-center justify-center layout text-xs-center> | 6 | <v-flex align-center justify-center layout text-xs-center> |
7 | <v-avatar size="50px" style="position:absolute; top:20px;"> | 7 | <v-avatar size="50px" style="position:absolute; top:20px;"> |
8 | <img src="/static/icon/user.png" /> | 8 | <img src="/static/icon/user.png" /> |
9 | </v-avatar> | 9 | </v-avatar> |
10 | </v-flex> | 10 | </v-flex> |
11 | <v-card-text> | 11 | <v-card-text> |
12 | <v-container grid-list-md> | 12 | <v-container grid-list-md> |
13 | <v-layout wrap> | 13 | <v-layout wrap> |
14 | <v-flex> | 14 | <v-flex> |
15 | <br /> | 15 | <br /> |
16 | <br /> | 16 | <br /> |
17 | <v-layout> | 17 | <v-layout> |
18 | <v-flex xs5 sm6> | 18 | <v-flex xs5 sm6> |
19 | <h5 class="right my-1"> | 19 | <h5 class="right my-1"> |
20 | <b>Class Name:</b> | 20 | <b>Class Name:</b> |
21 | </h5> | 21 | </h5> |
22 | </v-flex> | 22 | </v-flex> |
23 | <v-flex sm6 xs8> | 23 | <v-flex sm6 xs8> |
24 | </v-flex> | 24 | </v-flex> |
25 | </v-layout> | 25 | </v-layout> |
26 | <v-layout> | 26 | <v-layout> |
27 | <v-flex xs5 sm6> | 27 | <v-flex xs5 sm6> |
28 | <h5 class="right my-1"> | 28 | <h5 class="right my-1"> |
29 | <b>Name:</b> | 29 | <b>Name:</b> |
30 | </h5> | 30 | </h5> |
31 | </v-flex> | 31 | </v-flex> |
32 | <v-flex sm6 xs8> | 32 | <v-flex sm6 xs8> |
33 | <h5 class="my-1">{{ editedItem.name }}</h5> | 33 | <h5 class="my-1">{{ editedItem.name }}</h5> |
34 | </v-flex> | 34 | </v-flex> |
35 | </v-layout> | 35 | </v-layout> |
36 | <v-layout> | 36 | <v-layout> |
37 | <v-flex xs5 sm6> | 37 | <v-flex xs5 sm6> |
38 | <h5 class="right my-1"> | 38 | <h5 class="right my-1"> |
39 | <b>Class Incharge:</b> | 39 | <b>Class Incharge:</b> |
40 | </h5> | 40 | </h5> |
41 | </v-flex> | 41 | </v-flex> |
42 | <v-flex sm6 xs8> | 42 | <v-flex sm6 xs8> |
43 | <h5 class="my-1">{{ editedItem.name }}</h5> | 43 | <h5 class="my-1">{{ editedItem.name }}</h5> |
44 | </v-flex> | 44 | </v-flex> |
45 | </v-layout> | 45 | </v-layout> |
46 | <v-layout> | 46 | <v-layout> |
47 | <v-flex xs5 sm6> | 47 | <v-flex xs5 sm6> |
48 | <h5 class="right my-1"> | 48 | <h5 class="right my-1"> |
49 | <b>Session:</b> | 49 | <b>Session:</b> |
50 | </h5> | 50 | </h5> |
51 | </v-flex> | 51 | </v-flex> |
52 | <v-flex sm6 xs8> | 52 | <v-flex sm6 xs8> |
53 | <h5 class="my-1">{{ editedItem.paymentStatus }}</h5> | 53 | <h5 class="my-1">{{ editedItem.paymentStatus }}</h5> |
54 | </v-flex> | 54 | </v-flex> |
55 | </v-layout> | 55 | </v-layout> |
56 | </v-flex> | 56 | </v-flex> |
57 | </v-layout> | 57 | </v-layout> |
58 | </v-container> | 58 | </v-container> |
59 | </v-card-text> | 59 | </v-card-text> |
60 | </v-card> | 60 | </v-card> |
61 | </v-dialog>--> | 61 | </v-dialog>--> |
62 | <!-- ****** Invoice Table ****** --> | 62 | <!-- ****** Invoice Table ****** --> |
63 | 63 | ||
64 | <v-toolbar color="transparent" flat> | 64 | <v-toolbar color="transparent" flat> |
65 | <v-btn | 65 | <v-btn |
66 | fab | 66 | fab |
67 | dark | 67 | dark |
68 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" | 68 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" |
69 | small | 69 | small |
70 | @click="addInvoiceDialog = true" | 70 | @click="addInvoiceDialog = true" |
71 | > | 71 | > |
72 | <v-icon dark>add</v-icon> | 72 | <v-icon dark>add</v-icon> |
73 | </v-btn> | 73 | </v-btn> |
74 | <v-btn | 74 | <v-btn |
75 | round | 75 | round |
76 | class="open-dialog-button hidden-sm-only hidden-xs-only" | 76 | class="open-dialog-button hidden-sm-only hidden-xs-only" |
77 | dark | 77 | dark |
78 | @click="addInvoiceDialog = true" | 78 | @click="addInvoiceDialog = true" |
79 | > | 79 | > |
80 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Invoice | 80 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Invoice |
81 | </v-btn> | 81 | </v-btn> |
82 | <v-spacer></v-spacer> | 82 | <v-spacer></v-spacer> |
83 | <v-card-title class="body-1" v-show="show"> | 83 | <v-card-title class="body-1" v-show="show"> |
84 | <v-btn icon large flat @click="displaySearch"> | 84 | <v-btn icon large flat @click="displaySearch"> |
85 | <v-avatar size="27"> | 85 | <v-avatar size="27"> |
86 | <img src="/static/icon/search.png" alt="icon" /> | 86 | <img src="/static/icon/search.png" alt="icon" /> |
87 | </v-avatar> | 87 | </v-avatar> |
88 | </v-btn> | 88 | </v-btn> |
89 | </v-card-title> | 89 | </v-card-title> |
90 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> | 90 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> |
91 | <v-layout> | 91 | <v-layout> |
92 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | 92 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> |
93 | <v-icon @click="closeSearch" color="error">close</v-icon> | 93 | <v-icon @click="closeSearch" color="error">close</v-icon> |
94 | </v-layout> | 94 | </v-layout> |
95 | </v-flex> | 95 | </v-flex> |
96 | </v-toolbar> | 96 | </v-toolbar> |
97 | <v-data-table | 97 | <v-data-table |
98 | :headers="headers" | 98 | :headers="headers" |
99 | :items="invoiceList" | 99 | :items="invoiceList" |
100 | :pagination.sync="pagination" | 100 | :pagination.sync="pagination" |
101 | :search="search" | 101 | :search="search" |
102 | > | 102 | > |
103 | <template slot="items" slot-scope="props"> | 103 | <template slot="items" slot-scope="props"> |
104 | <tr class="tr"> | 104 | <tr class="tr"> |
105 | <td class="td td-row">{{ props.index + 1 }}</td> | 105 | <td class="td td-row">{{ props.index + 1 }}</td> |
106 | <td class="text-xs-center td td-row">{{ props.item.studentId.name }}</td> | 106 | <td class="text-xs-center td td-row">{{ props.item.studentId.name }}</td> |
107 | <td class="text-xs-center td td-row">{{ props.item.classId.classNum }}</td> | 107 | <td class="text-xs-center td td-row">{{ props.item.classId.classNum }}</td> |
108 | <td class="text-xs-center td td-row">{{ props.item.totalAmount }}</td> | 108 | <td class="text-xs-center td td-row">{{ props.item.totalAmount }}</td> |
109 | <td | 109 | <td |
110 | class="text-xs-center td td-row" | 110 | class="text-xs-center td td-row" |
111 | >{{ props.item.totalAmount - props.item.totalSubTotal }}</td> | 111 | >{{ props.item.totalAmount - props.item.totalSubTotal }}</td> |
112 | <td | 112 | <td |
113 | class="text-xs-center td td-row" | 113 | class="text-xs-center td td-row" |
114 | >{{ props.item.totalPaidAmount ? props.item.totalPaidAmount : 0}}</td> | 114 | >{{ props.item.totalPaidAmount ? props.item.totalPaidAmount : 0}}</td> |
115 | <td | 115 | <td |
116 | class="text-xs-center td td-row" | 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 | <td class="text-xs-center td td-row" v-if="props.item.paymentStatus === 'NOT_PAID'"> | 118 | <td class="text-xs-center td td-row" v-if="props.item.paymentStatus === 'NOT_PAID'"> |
119 | <span | 119 | <span |
120 | class="red lighten-1 py-1 px-2 white--text paymentStatus" | 120 | class="red lighten-1 py-1 px-2 white--text paymentStatus" |
121 | >{{ props.item.paymentStatus }}</span> | 121 | >{{ props.item.paymentStatus }}</span> |
122 | </td> | 122 | </td> |
123 | <td class="text-xs-center td td-row" v-if="props.item.paymentStatus === 'FULLY_PAID'"> | 123 | <td class="text-xs-center td td-row" v-if="props.item.paymentStatus === 'FULLY_PAID'"> |
124 | <span | 124 | <span |
125 | class="green lighten-1 py-1 px-2 white--text paymentStatus" | 125 | class="green lighten-1 py-1 px-2 white--text paymentStatus" |
126 | >{{ props.item.paymentStatus }}</span> | 126 | >{{ props.item.paymentStatus }}</span> |
127 | </td> | 127 | </td> |
128 | <td class="text-xs-center td td-row" v-if="props.item.paymentStatus === 'PARTIALLY_PAID'"> | 128 | <td class="text-xs-center td td-row" v-if="props.item.paymentStatus === 'PARTIALLY_PAID'"> |
129 | <span | 129 | <span |
130 | class="yellow darken-3 py-1 px-2 white--text paymentStatus" | 130 | class="yellow darken-3 py-1 px-2 white--text paymentStatus" |
131 | >{{ props.item.paymentStatus }}</span> | 131 | >{{ props.item.paymentStatus }}</span> |
132 | </td> | 132 | </td> |
133 | <td class="text-xs-center td td-row">{{ dates(props.item.date) }}</td> | 133 | <td class="text-xs-center td td-row">{{ dates(props.item.date) }}</td> |
134 | <td class="text-xs-center td td-row"> | 134 | <td class="text-xs-center td td-row"> |
135 | <router-link :to="{ name:'View Invoice',params: { viewInvoiceId:props.item._id } }"> | 135 | <router-link :to="{ name:'View Invoice',params: { viewInvoiceId:props.item._id } }"> |
136 | <v-tooltip top> | 136 | <v-tooltip top> |
137 | <img | 137 | <img |
138 | slot="activator" | 138 | slot="activator" |
139 | style="cursor:pointer; width:25px; height:25px; " | 139 | style="cursor:pointer; width:25px; height:25px; " |
140 | class="mr-3" | 140 | class="mr-3" |
141 | src="/static/icon/view.png" | 141 | src="/static/icon/view.png" |
142 | /> | 142 | /> |
143 | <span>View</span> | 143 | <span>View</span> |
144 | </v-tooltip> | 144 | </v-tooltip> |
145 | </router-link> | 145 | </router-link> |
146 | <span v-if="props.item.paymentStatus === 'NOT_PAID'"> | 146 | <span v-if="props.item.paymentStatus === 'NOT_PAID'"> |
147 | <router-link :to="{ name:'EditInvoice',params: { invoiceid:props.item._id }}" exact> | 147 | <router-link :to="{ name:'EditInvoice',params: { invoiceid:props.item._id }}" exact> |
148 | <v-tooltip top> | 148 | <v-tooltip top> |
149 | <img | 149 | <img |
150 | slot="activator" | 150 | slot="activator" |
151 | style="cursor:pointer; width:20px; height:18px; " | 151 | style="cursor:pointer; width:20px; height:18px; " |
152 | class="mr-3" | 152 | class="mr-3" |
153 | src="/static/icon/edit.png" | 153 | src="/static/icon/edit.png" |
154 | /> | 154 | /> |
155 | <span>Edit</span> | 155 | <span>Edit</span> |
156 | </v-tooltip> | 156 | </v-tooltip> |
157 | </router-link> | 157 | </router-link> |
158 | <v-tooltip top> | 158 | <v-tooltip top> |
159 | <img | 159 | <img |
160 | slot="activator" | 160 | slot="activator" |
161 | style="cursor:pointer;width:20px; height:20px; " | 161 | style="cursor:pointer;width:20px; height:20px; " |
162 | class="mr-3" | 162 | class="mr-3" |
163 | @click="deleteItem(props.item)" | 163 | @click="deleteItem(props.item)" |
164 | src="/static/icon/delete.png" | 164 | src="/static/icon/delete.png" |
165 | /> | 165 | /> |
166 | <span>Delete</span> | 166 | <span>Delete</span> |
167 | </v-tooltip> | 167 | </v-tooltip> |
168 | </span> | 168 | </span> |
169 | </td> | 169 | </td> |
170 | </tr> | 170 | </tr> |
171 | </template> | 171 | </template> |
172 | <v-alert | 172 | <v-alert |
173 | slot="no-results" | 173 | slot="no-results" |
174 | :value="true" | 174 | :value="true" |
175 | color="error" | 175 | color="error" |
176 | icon="warning" | 176 | icon="warning" |
177 | >Your search for "{{ search }}" found no results.</v-alert> | 177 | >Your search for "{{ search }}" found no results.</v-alert> |
178 | </v-data-table> | 178 | </v-data-table> |
179 | <!-- ****** ADD INVOICE ****** --> | 179 | <!-- ****** ADD INVOICE ****** --> |
180 | <v-dialog v-model="addInvoiceDialog" max-width> | 180 | <v-dialog v-model="addInvoiceDialog" max-width> |
181 | <v-card flat class="text-xs-center white--text"> | 181 | <v-card flat class="text-xs-center white--text"> |
182 | <v-layout> | 182 | <v-layout> |
183 | <v-flex xs12 class="card-styles pa-2"> | 183 | <v-flex xs12 class="card-styles pa-2"> |
184 | <label class="title text-xs-center ">Add Invoice</label> | 184 | <label class="title text-xs-center ">Add Invoice</label> |
185 | <v-icon size="24" class="right white--text" @click="addInvoiceDialog = false">cancel</v-icon> | 185 | <v-icon size="24" class="right white--text" @click="addInvoiceDialog = false">cancel</v-icon> |
186 | </v-flex> | 186 | </v-flex> |
187 | </v-layout> | 187 | </v-layout> |
188 | <v-flex xs12 sm12> | 188 | <v-flex xs12 sm12> |
189 | <v-container fluid grid-list-md> | 189 | <v-container fluid grid-list-md> |
190 | <v-layout wrap> | 190 | <v-layout wrap> |
191 | <v-flex xs12 sm12 md5> | 191 | <v-flex xs12 sm12 md5> |
192 | <v-card flat> | 192 | <v-card flat> |
193 | <v-toolbar dark class="card-styles" flat> | 193 | <v-toolbar dark class="card-styles" flat> |
194 | <v-spacer></v-spacer> | 194 | <v-spacer></v-spacer> |
195 | <h3>Invoice</h3> | 195 | <h3>Invoice</h3> |
196 | <v-spacer></v-spacer> | 196 | <v-spacer></v-spacer> |
197 | </v-toolbar> | 197 | </v-toolbar> |
198 | <v-form ref="form" v-model="valid" lazy-validation class="py-4"> | 198 | <v-form ref="form" v-model="valid" lazy-validation class="py-4"> |
199 | <v-layout> | 199 | <v-layout> |
200 | <v-flex xs4 class="pt-4 subheading"> | 200 | <v-flex xs4 class="pt-4 subheading"> |
201 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> | 201 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> |
202 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> | 202 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> |
203 | </v-flex> | 203 | </v-flex> |
204 | <v-flex xs6 class="ml-3"> | 204 | <v-flex xs6 class="ml-3"> |
205 | <v-select | 205 | <v-select |
206 | :items="addclass" | 206 | :items="addclass" |
207 | label="Select Class" | 207 | label="Select Class" |
208 | v-model="invoiceData.classNum" | 208 | v-model="invoiceData.classNum" |
209 | item-text="classNum" | 209 | item-text="classNum" |
210 | item-value="_id" | 210 | item-value="_id" |
211 | @change="getAllStudents()" | 211 | @change="getAllStudents()" |
212 | :rules="classRules" | 212 | :rules="classRules" |
213 | required | 213 | required |
214 | ></v-select> | 214 | ></v-select> |
215 | </v-flex> | 215 | </v-flex> |
216 | </v-layout> | 216 | </v-layout> |
217 | <v-layout> | 217 | <v-layout> |
218 | <v-flex xs4 class="pt-4 subheading"> | 218 | <v-flex xs4 class="pt-4 subheading"> |
219 | <label class="right hidden-xs-only hidden-sm-only">Select Student:</label> | 219 | <label class="right hidden-xs-only hidden-sm-only">Select Student:</label> |
220 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Student:</label> | 220 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Student:</label> |
221 | </v-flex> | 221 | </v-flex> |
222 | <v-flex xs6 class="ml-3"> | 222 | <v-flex xs6 class="ml-3"> |
223 | <v-select | 223 | <v-select |
224 | :items="studentList" | 224 | :items="studentList" |
225 | label="Select Student" | 225 | label="Select Student" |
226 | v-model="invoiceData.studentId" | 226 | v-model="invoiceData.studentId" |
227 | item-text="name" | 227 | item-text="name" |
228 | item-value="_id" | 228 | item-value="_id" |
229 | :rules="inchargeRules" | 229 | :rules="inchargeRules" |
230 | @change="selectAllStudent()" | 230 | @change="selectAllStudent()" |
231 | required | 231 | required |
232 | ></v-select> | 232 | ></v-select> |
233 | </v-flex> | 233 | </v-flex> |
234 | </v-layout> | 234 | </v-layout> |
235 | <v-layout> | 235 | <v-layout> |
236 | <v-flex xs4 class="pt-4 subheading"> | 236 | <v-flex xs4 class="pt-4 subheading"> |
237 | <label class="right">Date:</label> | 237 | <label class="right">Date:</label> |
238 | </v-flex> | 238 | </v-flex> |
239 | <v-flex xs6 class="ml-3"> | 239 | <v-flex xs6 class="ml-3"> |
240 | <v-menu | 240 | <v-menu |
241 | ref="menu1" | 241 | ref="menu1" |
242 | :close-on-content-click="false" | 242 | :close-on-content-click="false" |
243 | v-model="menu1" | 243 | v-model="menu1" |
244 | :nudge-right="40" | 244 | :nudge-right="40" |
245 | lazy | 245 | lazy |
246 | :return-value.sync="invoiceData.date" | 246 | :return-value.sync="invoiceData.date" |
247 | transition="scale-transition" | 247 | transition="scale-transition" |
248 | offset-y | 248 | offset-y |
249 | full-width | 249 | full-width |
250 | min-width="290px" | 250 | min-width="290px" |
251 | > | 251 | > |
252 | <v-text-field | 252 | <v-text-field |
253 | slot="activator" | 253 | slot="activator" |
254 | :rules="dateRules" | 254 | :rules="dateRules" |
255 | v-model="invoiceData.date" | 255 | v-model="invoiceData.date" |
256 | placeholder="Select date" | 256 | placeholder="Select date" |
257 | ></v-text-field> | 257 | ></v-text-field> |
258 | <v-date-picker | 258 | <v-date-picker |
259 | v-model="invoiceData.date" | 259 | v-model="invoiceData.date" |
260 | @input="$refs.menu1.save(invoiceData.date)" | 260 | @input="$refs.menu1.save(invoiceData.date)" |
261 | ></v-date-picker> | 261 | ></v-date-picker> |
262 | </v-menu> | 262 | </v-menu> |
263 | </v-flex> | 263 | </v-flex> |
264 | </v-layout> | 264 | </v-layout> |
265 | <v-layout> | 265 | <v-layout> |
266 | <v-flex xs4 class="pt-4 subheading"> | 266 | <v-flex xs4 class="pt-4 subheading"> |
267 | <label class="right hidden-xs-only hidden-sm-only">Payment Status:</label> | 267 | <label class="right hidden-xs-only hidden-sm-only">Payment Status:</label> |
268 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Payment:</label> | 268 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Payment:</label> |
269 | </v-flex> | 269 | </v-flex> |
270 | <v-flex xs6 class="ml-3"> | 270 | <v-flex xs6 class="ml-3"> |
271 | <v-select | 271 | <v-select |
272 | :items="paymentStatus" | 272 | :items="paymentStatus" |
273 | v-model="invoiceData.paymentStatus" | 273 | v-model="invoiceData.paymentStatus" |
274 | item-text="name" | 274 | item-text="name" |
275 | item-value="value" | 275 | item-value="value" |
276 | label="Select Payment Status" | 276 | label="Select Payment Status" |
277 | @change="getPayMethodList" | 277 | @change="getPayMethodList" |
278 | :rules="paymentStatusRules" | 278 | :rules="paymentStatusRules" |
279 | required | 279 | required |
280 | ></v-select> | 280 | ></v-select> |
281 | </v-flex> | 281 | </v-flex> |
282 | </v-layout> | 282 | </v-layout> |
283 | <v-layout v-show="showPayMethods"> | 283 | <v-layout v-show="showPayMethods"> |
284 | <v-flex xs4 class="pt-4 subheading"> | 284 | <v-flex xs4 class="pt-4 subheading"> |
285 | <label class="right">Payment Method:</label> | 285 | <label class="right">Payment Method:</label> |
286 | </v-flex> | 286 | </v-flex> |
287 | <v-flex xs6 class="ml-3"> | 287 | <v-flex xs6 class="ml-3"> |
288 | <v-select | 288 | <v-select |
289 | :items="paymentMethods" | 289 | :items="paymentMethods" |
290 | v-model="invoiceData.paymentMethod" | 290 | v-model="invoiceData.paymentMethod" |
291 | label="Select Payment Method" | 291 | label="Select Payment Method" |
292 | required | 292 | required |
293 | ></v-select> | 293 | ></v-select> |
294 | </v-flex> | 294 | </v-flex> |
295 | </v-layout> | 295 | </v-layout> |
296 | <v-layout> | 296 | <v-layout> |
297 | <v-flex xs12 sm11> | 297 | <v-flex xs12 sm11> |
298 | <v-card-actions> | 298 | <v-card-actions> |
299 | <v-spacer></v-spacer> | 299 | <v-spacer></v-spacer> |
300 | <v-btn @click="clear" round dark class="clear-button">clear</v-btn> | 300 | <v-btn @click="clear" round dark class="clear-button">clear</v-btn> |
301 | <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> | 301 | <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> |
302 | </v-card-actions> | 302 | </v-card-actions> |
303 | </v-flex> | 303 | </v-flex> |
304 | </v-layout> | 304 | </v-layout> |
305 | </v-form> | 305 | </v-form> |
306 | </v-card> | 306 | </v-card> |
307 | </v-flex> | 307 | </v-flex> |
308 | <v-flex xs12 sm12 md7> | 308 | <v-flex xs12 sm12 md7> |
309 | <v-card> | 309 | <v-card> |
310 | <v-toolbar dark class="card-styles " flat> | 310 | <v-toolbar dark class="card-styles " flat> |
311 | <v-spacer></v-spacer> | 311 | <v-spacer></v-spacer> |
312 | <h3>Fee Type List</h3> | 312 | <h3>Fee Type List</h3> |
313 | <v-spacer></v-spacer> | 313 | <v-spacer></v-spacer> |
314 | </v-toolbar> | 314 | </v-toolbar> |
315 | <v-layout> | 315 | <v-layout> |
316 | <v-flex xs4 sm2 class="mt-4 hidden-xs-only hidden-sm-only"> | 316 | <v-flex xs4 sm2 class="mt-4 hidden-xs-only hidden-sm-only"> |
317 | <label class="right title ">Fee Type:</label> | 317 | <label class="right title ">Fee Type:</label> |
318 | </v-flex> | 318 | </v-flex> |
319 | <v-flex xs8 sm4> | 319 | <v-flex xs8 sm4> |
320 | <v-select | 320 | <v-select |
321 | :items="feeTypes" | 321 | :items="feeTypes" |
322 | v-model="feeType.feeTypeName" | 322 | v-model="feeType.feeTypeName" |
323 | item-text="feeType" | 323 | item-text="feeType" |
324 | item-value="feeType" | 324 | item-value="feeType" |
325 | label="Select Fee Type" | 325 | label="Select Fee Type" |
326 | ></v-select> | 326 | ></v-select> |
327 | </v-flex> | 327 | </v-flex> |
328 | <v-flex xs4 sm6> | 328 | <v-flex xs4 sm6> |
329 | <v-btn color="open-dialog-button" round dark class="right mt-3" @click="selectFeeType">ADD</v-btn> | 329 | <v-btn color="open-dialog-button" round dark class="right mt-3" @click="selectFeeType">ADD</v-btn> |
330 | </v-flex> | 330 | </v-flex> |
331 | </v-layout> | 331 | </v-layout> |
332 | <table class="feeTypeTable tableRsponsive"> | 332 | <table class="feeTypeTable tableRsponsive"> |
333 | <tr class="info white--text"> | 333 | <tr class="info white--text"> |
334 | <th>#</th> | 334 | <th>#</th> |
335 | <th>Fee Type</th> | 335 | <th>Fee Type</th> |
336 | <th>Amount</th> | 336 | <th>Amount</th> |
337 | <th>Discount(%)</th> | 337 | <th>Discount(%)</th> |
338 | <th>Subtotal</th> | 338 | <th>Subtotal</th> |
339 | <th>Paid Amount</th> | 339 | <th>Paid Amount</th> |
340 | <th>Action</th> | 340 | <th>Action</th> |
341 | </tr> | 341 | </tr> |
342 | <tr | 342 | <tr |
343 | v-show="showFeeType" | 343 | v-show="showFeeType" |
344 | v-for="(feeType, index) in feeTypeData" | 344 | v-for="(feeType, index) in feeTypeData" |
345 | :key="index" | 345 | :key="index" |
346 | v-on:keyup="getAmmountDetails(feeType)" | 346 | v-on:keyup="getAmmountDetails(feeType)" |
347 | > | 347 | > |
348 | <td style="width:40px" class="tdFeeType">{{ index + 1 }}</td> | 348 | <td style="width:40px" class="tdFeeType">{{ index + 1 }}</td> |
349 | <td style="width:120px" class="tdFeeType">{{ feeType.feeTypeName }}</td> | 349 | <td style="width:120px" class="tdFeeType">{{ feeType.feeTypeName }}</td> |
350 | <td class="tdFeeType"> | 350 | <td class="tdFeeType"> |
351 | <v-text-field | 351 | <v-text-field |
352 | placeholder="fill your Amount" | 352 | placeholder="fill your Amount" |
353 | v-model="feeType.amount" | 353 | v-model="feeType.amount" |
354 | type="number" | 354 | type="number" |
355 | ></v-text-field> | 355 | ></v-text-field> |
356 | </td> | 356 | </td> |
357 | <td class="tdFeeType"> | 357 | <td class="tdFeeType"> |
358 | <v-text-field | 358 | <v-text-field |
359 | placeholder="fill your Discount" | 359 | placeholder="fill your Discount" |
360 | v-model="feeType.discount" | 360 | v-model="feeType.discount" |
361 | type="number" | 361 | type="number" |
362 | ></v-text-field> | 362 | ></v-text-field> |
363 | </td> | 363 | </td> |
364 | <td class="tdFeeType">{{ feeType.subTotal }}</td> | 364 | <td class="tdFeeType">{{ feeType.subTotal }}</td> |
365 | <!-- <td class="tdFeeType" v-if="invoiceData.paymentStatus === 'NOT_PAID'"> | 365 | <!-- <td class="tdFeeType" v-if="invoiceData.paymentStatus === 'NOT_PAID'"> |
366 | <v-text-field | 366 | <v-text-field |
367 | placeholder="fill your Paid Amount" | 367 | placeholder="fill your Paid Amount" |
368 | v-model="feeType.paidAmount" | 368 | v-model="feeType.paidAmount" |
369 | type="number" | 369 | type="number" |
370 | :disabled="disabled" | 370 | :disabled="disabled" |
371 | ></v-text-field> | 371 | ></v-text-field> |
372 | </td> --> | 372 | </td> --> |
373 | <td class="tdFeeType" v-if="invoiceData.paymentStatus == ''"> | 373 | <td class="tdFeeType" v-if="invoiceData.paymentStatus == ''"> |
374 | <v-text-field | 374 | <v-text-field |
375 | placeholder="fill your Paid Amount" | 375 | placeholder="fill your Paid Amount" |
376 | v-model="feeType.paidAmount" | 376 | v-model="feeType.paidAmount" |
377 | type="number" | 377 | type="number" |
378 | :disabled="disabled" | 378 | :disabled="disabled" |
379 | ></v-text-field> | 379 | ></v-text-field> |
380 | </td> | 380 | </td> |
381 | <td | 381 | <td |
382 | class="tdFeeType" | 382 | class="tdFeeType" |
383 | v-if="invoiceData.paymentStatus != 'NOT_PAID' && invoiceData.paymentStatus != ''" | 383 | v-if="invoiceData.paymentStatus != 'NOT_PAID' && invoiceData.paymentStatus != ''" |
384 | > | 384 | > |
385 | <v-text-field | 385 | <v-text-field |
386 | placeholder="fill your Paid Amount" | 386 | placeholder="fill your Paid Amount" |
387 | v-model="feeType.paidAmount" | 387 | v-model="feeType.paidAmount" |
388 | type="number" | 388 | type="number" |
389 | ></v-text-field> | 389 | ></v-text-field> |
390 | </td> | 390 | </td> |
391 | <td class="tdFeeType"> | 391 | <td class="tdFeeType"> |
392 | <v-icon color="error" @click="deleteSelectFee(index)">delete</v-icon> | 392 | <v-icon color="error" @click="deleteSelectFee(index)">delete</v-icon> |
393 | </td> | 393 | </td> |
394 | </tr> | 394 | </tr> |
395 | <tfoot> | 395 | <tfoot> |
396 | <tr> | 396 | <tr> |
397 | <td colspan="2" class="tdFeeType">Total:</td> | 397 | <td colspan="2" class="tdFeeType">Total:</td> |
398 | <td class="tdFeeType">{{ feeType.amount }}</td> | 398 | <td class="tdFeeType">{{ feeType.amount }}</td> |
399 | <td class="tdFeeType">{{ feeType.discount }}</td> | 399 | <td class="tdFeeType">{{ feeType.discount }}</td> |
400 | <td class="tdFeeType">{{ feeType.subTotal }}</td> | 400 | <td class="tdFeeType">{{ feeType.subTotal }}</td> |
401 | <td class="tdFeeType">{{ feeType.paidAmount }}</td> | 401 | <td class="tdFeeType">{{ feeType.paidAmount }}</td> |
402 | </tr> | 402 | </tr> |
403 | </tfoot> | 403 | </tfoot> |
404 | </table> | 404 | </table> |
405 | </v-card> | 405 | </v-card> |
406 | </v-flex> | 406 | </v-flex> |
407 | </v-layout> | 407 | </v-layout> |
408 | </v-container> | 408 | </v-container> |
409 | </v-flex> | 409 | </v-flex> |
410 | </v-card> | 410 | </v-card> |
411 | </v-dialog> | 411 | </v-dialog> |
412 | <div class="loader" v-if="showLoader"> | 412 | <div class="loader" v-if="showLoader"> |
413 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 413 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
414 | </div> | 414 | </div> |
415 | </v-container> | 415 | </v-container> |
416 | </template> | 416 | </template> |
417 | 417 | ||
418 | <script> | 418 | <script> |
419 | import http from "@/Services/http.js"; | 419 | import http from "@/Services/http.js"; |
420 | import moment from "moment"; | 420 | import moment from "moment"; |
421 | 421 | ||
422 | export default { | 422 | export default { |
423 | data: () => ({ | 423 | data: () => ({ |
424 | snackbar: false, | 424 | snackbar: false, |
425 | showPayMethods: false, | 425 | showPayMethods: false, |
426 | y: "top", | 426 | y: "top", |
427 | x: "right", | 427 | x: "right", |
428 | mode: "", | 428 | mode: "", |
429 | timeout: 5000, | 429 | timeout: 5000, |
430 | text: "", | 430 | text: "", |
431 | color: "", | 431 | color: "", |
432 | show: true, | 432 | show: true, |
433 | showSearch: false, | 433 | showSearch: false, |
434 | showLoader: false, | 434 | showLoader: false, |
435 | loading: false, | 435 | loading: false, |
436 | date: null, | 436 | date: null, |
437 | search: "", | 437 | search: "", |
438 | dialog: false, | 438 | dialog: false, |
439 | dialog1: false, | 439 | dialog1: false, |
440 | valid: true, | 440 | valid: true, |
441 | validEdit: true, | 441 | validEdit: true, |
442 | isActive: true, | 442 | isActive: true, |
443 | newActive: false, | 443 | newActive: false, |
444 | showFeeType: false, | 444 | showFeeType: false, |
445 | addInvoiceDialog: false, | 445 | addInvoiceDialog: false, |
446 | disabled: true, | 446 | disabled: true, |
447 | details: [], | 447 | details: [], |
448 | feeTypes: [], | 448 | feeTypes: [], |
449 | menu1: false, | 449 | menu1: false, |
450 | paymentMethods: ["Cash", "Cheque"], | 450 | paymentMethods: ["Cash", "Cheque"], |
451 | feeType: { | 451 | feeType: { |
452 | amount: "0.00", | 452 | amount: "0.00", |
453 | discount: "0.00", | 453 | discount: "0.00", |
454 | paidAmount: 0.0, | 454 | paidAmount: 0.0, |
455 | subTotal: "0.00", | 455 | subTotal: "0.00", |
456 | feeTypeName: "" | 456 | feeTypeName: "" |
457 | }, | 457 | }, |
458 | feeTypeData: [], | 458 | feeTypeData: [], |
459 | pagination: { | 459 | pagination: { |
460 | rowsPerPage: 10 | 460 | rowsPerPage: 10 |
461 | }, | 461 | }, |
462 | classRules: [v => !!v || " Class Name is required"], | 462 | classRules: [v => !!v || " Class Name is required"], |
463 | inchargeRules: [v => !!v || "Student Name is required"], | 463 | inchargeRules: [v => !!v || "Student Name is required"], |
464 | dateRules: [v => !!v || " Date is required"], | 464 | dateRules: [v => !!v || " Date is required"], |
465 | paymentStatusRules: [v => !!v || "Payment Status is required"], | 465 | paymentStatusRules: [v => !!v || "Payment Status is required"], |
466 | paymentMethodsRules: [v => !!v || "payment Method is required"], | 466 | paymentMethodsRules: [v => !!v || "payment Method is required"], |
467 | headers: [ | 467 | headers: [ |
468 | { | 468 | { |
469 | text: "No", | 469 | text: "No", |
470 | align: "", | 470 | align: "", |
471 | sortable: false, | 471 | sortable: false, |
472 | value: "No" | 472 | value: "No" |
473 | }, | 473 | }, |
474 | { | 474 | { |
475 | text: "Student", | 475 | text: "Student", |
476 | value: "student", | 476 | value: "student", |
477 | sortable: false, | 477 | sortable: false, |
478 | align: "center" | 478 | align: "center" |
479 | }, | 479 | }, |
480 | { text: "Class", value: "class", sortable: false, align: "center" }, | 480 | { text: "Class", value: "class", sortable: false, align: "center" }, |
481 | { text: "Total", value: "subtotal", sortable: false, align: "center" }, | 481 | { text: "Total", value: "subtotal", sortable: false, align: "center" }, |
482 | { text: "Discount", value: "discount", sortable: false, align: "center" }, | 482 | { text: "Discount", value: "discount", sortable: false, align: "center" }, |
483 | { | 483 | { |
484 | text: "Paid Amount", | 484 | text: "Paid Amount", |
485 | value: "paidAmount", | 485 | value: "paidAmount", |
486 | sortable: false, | 486 | sortable: false, |
487 | align: "center" | 487 | align: "center" |
488 | }, | 488 | }, |
489 | { | 489 | { |
490 | text: "Balance", | 490 | text: "Balance", |
491 | value: "Balance", | 491 | value: "Balance", |
492 | sortable: false, | 492 | sortable: false, |
493 | align: "center" | 493 | align: "center" |
494 | }, | 494 | }, |
495 | { | 495 | { |
496 | text: "Status", | 496 | text: "Status", |
497 | value: "paymentStatus", | 497 | value: "paymentStatus", |
498 | sortable: false, | 498 | sortable: false, |
499 | align: "center" | 499 | align: "center" |
500 | }, | 500 | }, |
501 | { | 501 | { |
502 | text: "Date", | 502 | text: "Date", |
503 | value: "date", | 503 | value: "date", |
504 | sortable: false, | 504 | sortable: false, |
505 | align: "center" | 505 | align: "center" |
506 | }, | 506 | }, |
507 | { text: "Action", value: "", sortable: false, align: "center" } | 507 | { text: "Action", value: "", sortable: false, align: "center" } |
508 | ], | 508 | ], |
509 | invoiceList: [], | 509 | invoiceList: [], |
510 | token: "", | 510 | token: "", |
511 | editedItem: {}, | 511 | editedItem: {}, |
512 | invoiceData: { | 512 | invoiceData: { |
513 | paymentStatus: "", | 513 | paymentStatus: "", |
514 | students: [] | 514 | students: [] |
515 | }, | 515 | }, |
516 | addclass: [], | 516 | addclass: [], |
517 | studentList: [], | 517 | studentList: [], |
518 | paymentStatus: [ | 518 | paymentStatus: [ |
519 | { | 519 | { |
520 | name: "Not Paid", | 520 | name: "Not Paid", |
521 | value: "NOT_PAID" | 521 | value: "NOT_PAID" |
522 | }, | 522 | }, |
523 | { | 523 | { |
524 | name: "Partially Paid", | 524 | name: "Partially Paid", |
525 | value: "PARTIALLY_PAID" | 525 | value: "PARTIALLY_PAID" |
526 | }, | 526 | }, |
527 | { | 527 | { |
528 | name: "Fully Paid", | 528 | name: "Fully Paid", |
529 | value: "FULLY_PAID" | 529 | value: "FULLY_PAID" |
530 | } | 530 | } |
531 | ] | 531 | ] |
532 | }), | 532 | }), |
533 | methods: { | 533 | methods: { |
534 | save(date) { | 534 | save(date) { |
535 | this.$refs.menu1.save(date); | 535 | this.$refs.menu1.save(date); |
536 | }, | 536 | }, |
537 | dates: function(date) { | 537 | dates: function(date) { |
538 | return moment(date).format("MMMM DD, YYYY"); | 538 | return moment(date).format("MMMM DD, YYYY"); |
539 | }, | 539 | }, |
540 | // profile(item) { | 540 | // profile(item) { |
541 | // this.editedIndex = this.InvoiceList.indexOf(item); | 541 | // this.editedIndex = this.InvoiceList.indexOf(item); |
542 | // this.editedItem = Object.assign({}, item); | 542 | // this.editedItem = Object.assign({}, item); |
543 | // this.dialog1 = true; | 543 | // this.dialog1 = true; |
544 | // }, | 544 | // }, |
545 | deleteItem(item) { | 545 | deleteItem(item) { |
546 | let deleteInvoice = { | 546 | let deleteInvoice = { |
547 | invoiceId: item._id | 547 | invoiceId: item._id |
548 | }; | 548 | }; |
549 | http() | 549 | http() |
550 | .delete( | 550 | .delete( |
551 | "/deleteInvoice", | 551 | "/deleteInvoice", |
552 | confirm("Are you sure you want to delete this?") && { | 552 | confirm("Are you sure you want to delete this?") && { |
553 | params: deleteInvoice | 553 | params: deleteInvoice |
554 | } | 554 | } |
555 | ) | 555 | ) |
556 | .then(response => { | 556 | .then(response => { |
557 | this.snackbar = true; | 557 | this.snackbar = true; |
558 | this.text = "Successfully delete Existing Invoice"; | 558 | this.text = "Successfully delete Existing Invoice"; |
559 | this.color = "green"; | 559 | this.color = "green"; |
560 | this.getInvoiceList(); | 560 | this.getInvoiceList(); |
561 | }) | 561 | }) |
562 | .catch(error => { | 562 | .catch(error => { |
563 | // console.log(error); | 563 | // console.log(error); |
564 | }); | 564 | }); |
565 | }, | 565 | }, |
566 | close() { | 566 | close() { |
567 | this.dialog = false; | 567 | this.dialog = false; |
568 | }, | 568 | }, |
569 | // totalAmount() { | 569 | // totalAmount() { |
570 | // // console.log("this.feeType.paidAmount ", this.feeType.paidAmount); | 570 | // // console.log("this.feeType.paidAmount ", this.feeType.paidAmount); |
571 | // // console.log( | 571 | // // console.log( |
572 | // // "this.feeType.subTotalAAAAAAAAAAAAAAA ", | 572 | // // "this.feeType.subTotalAAAAAAAAAAAAAAA ", |
573 | // // this.feeType.subTotal | 573 | // // this.feeType.subTotal |
574 | // // ); | 574 | // // ); |
575 | 575 | ||
576 | // if (this.feeType.paidAmount < this.feeType.subTotal) { | 576 | // if (this.feeType.paidAmount < this.feeType.subTotal) { |
577 | // console.log("this.feeType.subTotalBBBBBBBBBBB ", this.feeType.subTotal); | 577 | // console.log("this.feeType.subTotalBBBBBBBBBBB ", this.feeType.subTotal); |
578 | 578 | ||
579 | // this.feeType.paidAmount = this.feeType.subTotal; | 579 | // this.feeType.paidAmount = this.feeType.subTotal; |
580 | // console.log( | 580 | // console.log( |
581 | // "this.feeType.paidAmount BBBBBBBBBBB", | 581 | // "this.feeType.paidAmount BBBBBBBBBBB", |
582 | // this.feeType.paidAmount | 582 | // this.feeType.paidAmount |
583 | // ); | 583 | // ); |
584 | // } | 584 | // } |
585 | // }, | 585 | // }, |
586 | submit() { | 586 | submit() { |
587 | let feeTypeId = ""; | 587 | let feeTypeId = ""; |
588 | for (let i = 0; i < this.feeTypes.length; i++) { | 588 | for (let i = 0; i < this.feeTypes.length; i++) { |
589 | if (this.feeTypes[i].feeType === this.feeType.feeTypeName) { | 589 | if (this.feeTypes[i].feeType === this.feeType.feeTypeName) { |
590 | feeTypeId = this.feeTypes[i]._id; | 590 | feeTypeId = this.feeTypes[i]._id; |
591 | } | 591 | } |
592 | } | 592 | } |
593 | if (this.$refs.form.validate()) { | 593 | // if (this.$refs.form.validate()) { |
594 | let invoiceData = { | 594 | let invoiceData = { |
595 | classId: this.invoiceData.classNum, | 595 | classId: this.invoiceData.classNum, |
596 | students: this.invoiceData.students, | 596 | students: this.invoiceData.students, |
597 | date: this.invoiceData.date, | 597 | date: this.invoiceData.date, |
598 | paymentStatus: this.invoiceData.paymentStatus, | 598 | paymentStatus: this.invoiceData.paymentStatus, |
599 | paymentMethod: this.invoiceData.paymentMethod, | 599 | paymentMethod: this.invoiceData.paymentMethod, |
600 | feeType: this.feeTypeData, | 600 | feeType: this.feeTypeData, |
601 | totalAmount: this.feeType.amount, | 601 | totalAmount: this.feeType.amount, |
602 | totalDiscount: this.feeType.discount, | 602 | totalDiscount: this.feeType.discount, |
603 | totalSubTotal: this.feeType.subTotal, | 603 | totalSubTotal: this.feeType.subTotal, |
604 | // totalPaidAmount: this.feeType.paidAmount | 604 | totalPaidAmount: this.feeType.paidAmount |
605 | }; | 605 | }; |
606 | if (invoiceData.paymentStatus == "NOT_PAID") { | 606 | console.log("invoiceData",invoiceData) |
607 | delete invoiceData.totalPaidAmount; | 607 | // if (invoiceData.paymentStatus == "NOT_PAID") { |
608 | } | 608 | // delete invoiceData.totalPaidAmount; |
609 | // } | ||
609 | http() | 610 | http() |
610 | .post("/createInvoice", invoiceData) | 611 | .post("/createInvoice", invoiceData) |
611 | .then(response => { | 612 | .then(response => { |
612 | this.getInvoiceList(); | 613 | this.getInvoiceList(); |
613 | this.snackbar = true; | 614 | this.snackbar = true; |
614 | this.text = "New Invoice added successfully"; | 615 | this.text = "New Invoice added successfully"; |
615 | this.color = "green"; | 616 | this.color = "green"; |
616 | this.clear(); | 617 | this.clear(); |
617 | this.feeTypeData = []; | 618 | this.feeTypeData = []; |
618 | if (this.feeTypeData.length == 0) { | 619 | if (this.feeTypeData.length == 0) { |
619 | this.feeType = { | 620 | this.feeType = { |
620 | amount: "0.00", | 621 | amount: "0.00", |
621 | discount: "0.00", | 622 | discount: "0.00", |
622 | paidAmount: "0.00", | 623 | paidAmount: "0.00", |
623 | subTotal: "0.00", | 624 | subTotal: "0.00", |
624 | feeTypeList: "" | 625 | feeTypeList: "" |
625 | }; | 626 | }; |
626 | } | 627 | } |
627 | this.loading = false; | 628 | this.loading = false; |
628 | this.addInvoiceDialog = false; | 629 | this.addInvoiceDialog = false; |
629 | }) | 630 | }) |
630 | .catch(error => { | 631 | .catch(error => { |
631 | this.snackbar = true; | 632 | this.snackbar = true; |
632 | this.text = error.response.data.errors[0].messages[0]; | 633 | this.text = error.response.data.errors[0].messages[0]; |
633 | this.color = "error"; | 634 | this.color = "error"; |
634 | this.loading = false; | 635 | this.loading = false; |
635 | }); | 636 | }); |
636 | } | 637 | // } |
637 | }, | 638 | }, |
638 | clear() { | 639 | clear() { |
639 | this.$refs.form.reset(); | 640 | this.$refs.form.reset(); |
640 | }, | 641 | }, |
641 | getInvoiceList() { | 642 | getInvoiceList() { |
642 | this.showLoader = true; | 643 | this.showLoader = true; |
643 | http() | 644 | http() |
644 | .get("/getInvoicesList", { | 645 | .get("/getInvoicesList", { |
645 | params: { schoolId: this.$store.state.schoolId }, | 646 | params: { schoolId: this.$store.state.schoolId }, |
646 | headers: { Authorization: "Bearer " + this.token } | 647 | headers: { Authorization: "Bearer " + this.token } |
647 | }) | 648 | }) |
648 | .then(response => { | 649 | .then(response => { |
649 | this.invoiceList = response.data.data; | 650 | this.invoiceList = response.data.data; |
650 | this.showLoader = false; | 651 | this.showLoader = false; |
651 | }) | 652 | }) |
652 | .catch(error => { | 653 | .catch(error => { |
653 | // console.log("err====>", err); | 654 | // console.log("err====>", err); |
654 | this.showLoader = false; | 655 | this.showLoader = false; |
655 | if (error.response.status === 401) { | 656 | if (error.response.status === 401) { |
656 | this.$router.replace({ path: "/" }); | 657 | this.$router.replace({ path: "/" }); |
657 | this.$store.dispatch("setToken", null); | 658 | this.$store.dispatch("setToken", null); |
658 | this.$store.dispatch("Id", null); | 659 | this.$store.dispatch("Id", null); |
659 | } | 660 | } |
660 | }); | 661 | }); |
661 | }, | 662 | }, |
662 | selectFeeType() { | 663 | selectFeeType() { |
663 | this.showFeeType = true; | 664 | this.showFeeType = true; |
664 | this.feeTypeData.push({ feeTypeName: this.feeType.feeTypeName }); | 665 | this.feeTypeData.push({ feeTypeName: this.feeType.feeTypeName }); |
665 | }, | 666 | }, |
666 | deleteSelectFee: function(index) { | 667 | deleteSelectFee: function(index) { |
667 | this.feeTypeData.splice(index, 1); | 668 | this.feeTypeData.splice(index, 1); |
668 | for (let i = 0; i < this.feeTypeData.length; i++) { | 669 | for (let i = 0; i < this.feeTypeData.length; i++) { |
669 | this.feeType = this.feeTypeData[i]; | 670 | this.feeType = this.feeTypeData[i]; |
670 | } | 671 | } |
671 | if (this.feeTypeData.length == 0) { | 672 | if (this.feeTypeData.length == 0) { |
672 | this.feeType = { | 673 | this.feeType = { |
673 | amount: "0.00", | 674 | amount: "0.00", |
674 | discount: "0.00", | 675 | discount: "0.00", |
675 | paidAmount: "0.00", | 676 | paidAmount: "0.00", |
676 | subTotal: "0.00", | 677 | subTotal: "0.00", |
677 | feeTypeName: "" | 678 | feeTypeName: "" |
678 | }; | 679 | }; |
679 | } | 680 | } |
680 | }, | 681 | }, |
681 | getAllClasses() { | 682 | getAllClasses() { |
682 | http() | 683 | http() |
683 | .get("/getClassesList", { | 684 | .get("/getClassesList", { |
684 | params: { schoolId: this.$store.state.schoolId }, | 685 | params: { schoolId: this.$store.state.schoolId }, |
685 | headers: { Authorization: "Bearer " + this.token } | 686 | headers: { Authorization: "Bearer " + this.token } |
686 | }) | 687 | }) |
687 | .then(response => { | 688 | .then(response => { |
688 | this.addclass = response.data.data; | 689 | this.addclass = response.data.data; |
689 | }) | 690 | }) |
690 | .catch(err => { | 691 | .catch(err => { |
691 | // console.log("err====>", err); | 692 | // console.log("err====>", err); |
692 | // this.$router.replace({ path: "/" }); | 693 | // this.$router.replace({ path: "/" }); |
693 | }); | 694 | }); |
694 | }, | 695 | }, |
695 | getAllStudents() { | 696 | getAllStudents() { |
696 | this.showLoader = true; | 697 | this.showLoader = true; |
697 | http() | 698 | http() |
698 | .get("/getStudentsList", { | 699 | .get("/getStudentsList", { |
699 | params: { | 700 | params: { |
700 | classId: this.invoiceData.classNum, | 701 | classId: this.invoiceData.classNum, |
701 | schoolId: this.$store.state.schoolId | 702 | schoolId: this.$store.state.schoolId |
702 | }, | 703 | }, |
703 | headers: { Authorization: "Bearer " + this.token } | 704 | headers: { Authorization: "Bearer " + this.token } |
704 | }) | 705 | }) |
705 | .then(response => { | 706 | .then(response => { |
706 | response.data.data.unshift({ | 707 | response.data.data.unshift({ |
707 | name: "Select All", | 708 | name: "Select All", |
708 | _id: "Select All" | 709 | _id: "Select All" |
709 | }); | 710 | }); |
710 | this.studentList = response.data.data; | 711 | this.studentList = response.data.data; |
711 | this.showLoader = false; | 712 | this.showLoader = false; |
712 | }) | 713 | }) |
713 | .catch(err => { | 714 | .catch(err => { |
714 | this.showLoader = false; | 715 | this.showLoader = false; |
715 | // console.log("err====>", err); | 716 | // console.log("err====>", err); |
716 | // this.$router.replace({ path: "/" }); | 717 | // this.$router.replace({ path: "/" }); |
717 | }); | 718 | }); |
718 | }, | 719 | }, |
719 | getfeeType() { | 720 | getfeeType() { |
720 | http() | 721 | http() |
721 | .get("/getFeesList", { | 722 | .get("/getFeesList", { |
722 | params: { | 723 | params: { |
723 | schoolId: this.$store.state.schoolId | 724 | schoolId: this.$store.state.schoolId |
724 | }, | 725 | }, |
725 | headers: { Authorization: "Bearer " + this.token } | 726 | headers: { Authorization: "Bearer " + this.token } |
726 | }) | 727 | }) |
727 | .then(response => { | 728 | .then(response => { |
728 | this.feeTypes = response.data.data; | 729 | this.feeTypes = response.data.data; |
729 | }) | 730 | }) |
730 | .catch(err => { | 731 | .catch(err => { |
731 | // console.log("err====>", err); | 732 | // console.log("err====>", err); |
732 | // this.$router.replace({ path: "/" }); | 733 | // this.$router.replace({ path: "/" }); |
733 | }); | 734 | }); |
734 | }, | 735 | }, |
735 | getAmmountDetails(feeTyp) { | 736 | getAmmountDetails(feeTyp) { |
736 | let feeType = { | 737 | let feeType = { |
737 | amount: "", | 738 | amount: "", |
738 | discount: "", | 739 | discount: "", |
739 | subTotal: "", | 740 | subTotal: "", |
740 | subParticularTotal: "", | 741 | subParticularTotal: "", |
741 | paidAmount: "" | 742 | paidAmount: "" |
742 | }; | 743 | }; |
743 | for (let i = 0; i < this.feeTypeData.length; i++) { | 744 | for (let i = 0; i < this.feeTypeData.length; i++) { |
744 | // *********** AMOUNT *********** | 745 | // *********** AMOUNT *********** |
745 | 746 | ||
746 | feeType.amount = | 747 | feeType.amount = |
747 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); | 748 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); |
748 | // console.log("feeType.amount ", feeType.amount); | 749 | // console.log("feeType.amount ", feeType.amount); |
749 | this.feeType.amount = feeType.amount; | 750 | this.feeType.amount = feeType.amount; |
750 | this.feeType.subTotal = feeType.amount; | 751 | this.feeType.subTotal = feeType.amount; |
751 | this.feeTypeData[i].subTotal = this.feeTypeData[i].amount; | 752 | this.feeTypeData[i].subTotal = this.feeTypeData[i].amount; |
752 | 753 | ||
753 | // *********** DISCOUNT *********** | 754 | // *********** DISCOUNT *********** |
754 | 755 | ||
755 | if (this.feeTypeData[i].discount) { | 756 | if (this.feeTypeData[i].discount) { |
756 | feeType.discount = | 757 | feeType.discount = |
757 | Number(feeType.discount) + Number(this.feeTypeData[i].discount); | 758 | Number(feeType.discount) + Number(this.feeTypeData[i].discount); |
758 | // console.log("feeType.discount", feeType.discount); | 759 | // console.log("feeType.discount", feeType.discount); |
759 | this.feeType.discount = feeType.discount; | 760 | this.feeType.discount = feeType.discount; |
760 | feeType.subParticularTotal = | 761 | feeType.subParticularTotal = |
761 | this.feeTypeData[i].amount - | 762 | this.feeTypeData[i].amount - |
762 | (this.feeTypeData[i].amount * this.feeTypeData[i].discount) / 100; | 763 | (this.feeTypeData[i].amount * this.feeTypeData[i].discount) / 100; |
763 | this.feeTypeData[i].subTotal = feeType.subParticularTotal.toFixed(2); | 764 | this.feeTypeData[i].subTotal = feeType.subParticularTotal.toFixed(2); |
764 | } | 765 | } |
765 | 766 | ||
766 | // *********** SUBTOTAL *********** | 767 | // *********** SUBTOTAL *********** |
767 | 768 | ||
768 | feeType.subTotal = | 769 | feeType.subTotal = |
769 | Number(feeType.subTotal) + Number(this.feeTypeData[i].subTotal); | 770 | Number(feeType.subTotal) + Number(this.feeTypeData[i].subTotal); |
770 | this.feeType.subTotal = feeType.subTotal.toFixed(2); | 771 | this.feeType.subTotal = feeType.subTotal.toFixed(2); |
771 | 772 | ||
772 | // *********** PAID-AMOUNT *********** | 773 | // *********** PAID-AMOUNT *********** |
773 | 774 | ||
774 | feeType.paidAmount = | 775 | feeType.paidAmount = |
775 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); | 776 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); |
776 | this.feeType.paidAmount = feeType.paidAmount.toFixed(2); | 777 | this.feeType.paidAmount = feeType.paidAmount.toFixed(2); |
777 | 778 | ||
778 | // if paid Amount fill large of subtotal value so this condition are fixed filled subtotal value. | 779 | // if paid Amount fill large of subtotal value so this condition are fixed filled subtotal value. |
779 | if (feeType.paidAmount > feeType.subTotal) { | 780 | if (feeType.paidAmount > feeType.subTotal) { |
780 | this.feeTypeData[i].paidAmount = this.feeTypeData[i].subTotal; | 781 | this.feeTypeData[i].paidAmount = this.feeTypeData[i].subTotal; |
781 | this.feeType.paidAmount = feeType.subTotal; | 782 | this.feeType.paidAmount = feeType.subTotal; |
782 | } | 783 | } |
783 | } | 784 | } |
784 | }, | 785 | }, |
785 | getPayMethodList() { | 786 | getPayMethodList() { |
786 | if (this.invoiceData.paymentStatus == "PARTIALLY_PAID") { | 787 | if (this.invoiceData.paymentStatus == "PARTIALLY_PAID") { |
787 | this.showPayMethods = true; | 788 | this.showPayMethods = true; |
788 | } else if (this.invoiceData.paymentStatus == "FULLY_PAID") { | 789 | } else if (this.invoiceData.paymentStatus == "FULLY_PAID") { |
789 | this.showPayMethods = true; | 790 | this.showPayMethods = true; |
790 | } else { | 791 | } else { |
791 | this.showPayMethods = false; | 792 | this.showPayMethods = false; |
792 | } | 793 | } |
793 | }, | 794 | }, |
794 | selectAllStudent() { | 795 | selectAllStudent() { |
795 | console.log("this.studentId", this.invoiceData.studentId); | 796 | console.log("this.studentId", this.invoiceData.studentId); |
796 | this.invoiceData.students = []; | 797 | this.invoiceData.students = []; |
797 | if (this.invoiceData.studentId === "Select All") { | 798 | if (this.invoiceData.studentId === "Select All") { |
798 | for (let i = 1; i < this.studentList.length; i++) { | 799 | for (let i = 1; i < this.studentList.length; i++) { |
799 | this.invoiceData.students.push(this.studentList[i]._id); | 800 | this.invoiceData.students.push(this.studentList[i]._id); |
800 | console.log("data", this.invoiceData.students); | 801 | console.log("data", this.invoiceData.students); |
801 | // data.push(this.studentList[i]._id); | 802 | // data.push(this.studentList[i]._id); |
802 | // console.log("data", data); | 803 | // console.log("data", data); |
803 | } | 804 | } |
804 | } else { | 805 | } else { |
805 | this.invoiceData.students.push(this.invoiceData.studentId); | 806 | this.invoiceData.students.push(this.invoiceData.studentId); |
806 | } | 807 | } |
807 | }, | 808 | }, |
808 | displaySearch() { | 809 | displaySearch() { |
809 | (this.show = false), (this.showSearch = true); | 810 | (this.show = false), (this.showSearch = true); |
810 | }, | 811 | }, |
811 | closeSearch() { | 812 | closeSearch() { |
812 | this.showSearch = false; | 813 | this.showSearch = false; |
813 | this.show = true; | 814 | this.show = true; |
814 | this.search = ""; | 815 | this.search = ""; |
815 | } | 816 | } |
816 | }, | 817 | }, |
817 | mounted() { | 818 | mounted() { |
818 | this.token = this.$store.state.token; | 819 | this.token = this.$store.state.token; |
819 | this.getInvoiceList(); | 820 | this.getInvoiceList(); |
820 | this.getAllClasses(); | 821 | this.getAllClasses(); |
821 | this.getfeeType(); | 822 | this.getfeeType(); |
822 | } | 823 | } |
823 | }; | 824 | }; |
824 | </script> | 825 | </script> |
825 | 826 | ||
826 | 827 | ||
827 | <style scoped> | 828 | <style scoped> |
828 | table { | 829 | table { |
829 | border-collapse: collapse; | 830 | border-collapse: collapse; |
830 | border: 1px solid #e2e7eb; | 831 | border: 1px solid #e2e7eb; |
831 | } | 832 | } |
832 | 833 | ||
833 | th, | 834 | th, |
834 | .tdFeeType { | 835 | .tdFeeType { |
835 | border: 1px solid #e2e7eb; | 836 | border: 1px solid #e2e7eb; |
836 | padding: 10px; | 837 | padding: 10px; |
837 | text-align: center; | 838 | text-align: center; |
838 | } | 839 | } |
839 | table.feeTypeTable { | 840 | table.feeTypeTable { |
840 | table-layout: auto !important; | 841 | table-layout: auto !important; |
841 | width: 100% !important; | 842 | width: 100% !important; |
842 | } | 843 | } |
843 | </style> | 844 | </style> |
src/pages/Account/viewInvoice.vue
1 | <template> | 1 | <template> |
2 | <v-app id="pages-dasboard"> | 2 | <v-app id="pages-dasboard"> |
3 | <!-- ****** Edit INVOICE ****** --> | 3 | <!-- ****** Edit INVOICE ****** --> |
4 | <v-container fluid grid-list-md> | 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 | |||
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 | <v-layout wrap> | 14 | <v-layout wrap> |
7 | <v-flex 12> | 15 | <!-- ****** TABLE DATA MARK ****** --> |
8 | <br /> | 16 | <v-flex xs12 sm12 md12> |
9 | <v-layout wrap> | 17 | <v-card> |
10 | <v-flex xs12 sm6> | 18 | <v-layout wrap> |
11 | <v-layout> | 19 | <v-flex 12> |
12 | <v-flex xs4 sm2> | 20 | <br /> |
13 | <h5 class="right my-1"> | 21 | <v-layout> |
14 | <b>invoice:</b> | 22 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
15 | </h5> | 23 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> |
16 | </v-flex> | 24 | <p class="title">{{ userData.name }}</p> |
17 | <v-flex sm11 xs8> | 25 | <p>{{ userData.address }}</p> |
18 | <h5 class="my-1">#{{ invoiceParticularData.invoiceNumber }}</h5> | 26 | </v-flex> |
19 | </v-flex> | 27 | |
20 | </v-layout> | 28 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
21 | <v-layout> | 29 | <v-layout> |
22 | <v-flex xs4 sm2> | 30 | <v-flex xs4 sm2> |
23 | <h5 class="right my-1"> | 31 | <h5 class="right my-1"> |
24 | <b>Name:</b> | 32 | <b>invoice:</b> |
25 | </h5> | 33 | </h5> |
26 | </v-flex> | 34 | </v-flex> |
27 | <v-flex sm11 xs8> | 35 | <v-flex sm11 xs8> |
28 | <h5 class="my-1">{{ invoiceParticularData.studentId.name }}</h5> | 36 | <h5 class="my-1">#{{ invoiceParticularData.invoiceNumber }}</h5> |
29 | </v-flex> | 37 | </v-flex> |
30 | </v-layout> | 38 | </v-layout> |
31 | <v-layout> | 39 | <v-layout> |
32 | <v-flex xs4 sm2> | 40 | <v-flex xs4 sm2> |
33 | <h5 class="right my-1"> | 41 | <h5 class="right my-1"> |
34 | <b>Class:</b> | 42 | <b>Name:</b> |
35 | </h5> | 43 | </h5> |
36 | </v-flex> | 44 | </v-flex> |
37 | <v-flex sm11 xs8> | 45 | <v-flex sm11 xs8> |
38 | <h5 class="my-1">{{ invoiceParticularData.classId.classNum }}</h5> | 46 | <h5 class="my-1">{{ invoiceParticularData.studentId.name }}</h5> |
39 | </v-flex> | 47 | </v-flex> |
40 | </v-layout> | 48 | </v-layout> |
41 | </v-flex> | 49 | <v-layout> |
42 | <v-flex xs12 sm6> | 50 | <v-flex xs4 sm2> |
43 | <v-layout> | 51 | <h5 class="right my-1"> |
44 | <v-flex xs4 sm2> | 52 | <b>Class:</b> |
45 | <h5 class="right my-1"> | 53 | </h5> |
46 | <b>Roll No:</b> | 54 | </v-flex> |
47 | </h5> | 55 | <v-flex sm11 xs8> |
48 | </v-flex> | 56 | <h5 class="my-1">{{ invoiceParticularData.classId.classNum }}</h5> |
49 | <v-flex sm6 xs8> | 57 | </v-flex> |
50 | <h5 class="my-1">{{ invoiceParticularData.studentId.rollNo }}</h5> | 58 | </v-layout> |
51 | </v-flex> | 59 | <!-- <v-flex xs12 sm6> --> |
52 | </v-layout> | 60 | <v-layout> |
53 | <v-layout> | 61 | <v-flex xs4 sm2> |
54 | <v-flex xs4 sm2> | 62 | <h5 class="right my-1"> |
55 | <h5 class="right my-1"> | 63 | <b>Roll No:</b> |
56 | <b>email:</b> | 64 | </h5> |
57 | </h5> | 65 | </v-flex> |
58 | </v-flex> | 66 | <v-flex sm6 xs8> |
59 | <v-flex sm6 xs8> | 67 | <h5 class="my-1">{{ invoiceParticularData.studentId.rollNo }}</h5> |
60 | <h5 class="my-1 linkCover">{{ invoiceParticularData.studentId.email }}</h5> | 68 | </v-flex> |
61 | </v-flex> | 69 | </v-layout> |
62 | </v-layout> | 70 | <v-layout> |
63 | <v-layout> | 71 | <v-flex xs4 sm2> |
64 | <v-flex xs4 sm2> | 72 | <h5 class="right my-1"> |
65 | <h5 class="right my-1"> | 73 | <b>email:</b> |
66 | <b>Status :</b> | 74 | </h5> |
67 | </h5> | 75 | </v-flex> |
68 | </v-flex> | 76 | <v-flex sm6 xs8> |
69 | <v-flex sm6 xs8> | 77 | <h5 class="my-1 linkCover">{{ invoiceParticularData.studentId.email }}</h5> |
70 | <h5 class="my-1">{{ invoiceParticularData.paymentStatus }}</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 | </v-flex> | 92 | </v-flex> |
72 | </v-layout> | 93 | </v-layout> |
73 | </v-flex> | 94 | <table class="feeTypeTable tableRsponsive"> |
74 | </v-layout> | 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 | </v-flex> | 135 | </v-flex> |
76 | </v-layout> | 136 | </v-layout> |
77 | </v-card> | 137 | </v-flex> |
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> --> | ||
123 | </v-container> | 138 | </v-container> |
124 | <div class="loader" v-if="showLoader"> | 139 | <div class="loader" v-if="showLoader"> |
125 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 140 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
126 | </div> | 141 | </div> |
127 | </v-app> | 142 | </v-app> |
128 | </template> | 143 | </template> |
129 | 144 | ||
130 | <script> | 145 | <script> |
131 | import http from "@/Services/http.js"; | 146 | import http from "@/Services/http.js"; |
132 | import moment from "moment"; | 147 | import moment from "moment"; |
133 | 148 | ||
134 | export default { | 149 | export default { |
135 | data: () => ({ | 150 | data: () => ({ |
136 | showLoader: false, | 151 | showLoader: false, |
137 | feeTypes: [], | 152 | feeTypes: [], |
153 | filterData: [], | ||
138 | invoiceData: {}, | 154 | invoiceData: {}, |
139 | feeType: { | 155 | feeType: { |
140 | amount: "", | 156 | amount: "", |
141 | discount: "", | 157 | discount: "", |
142 | totalPaidAmount: "", | 158 | totalPaidAmount: "", |
143 | subTotal: "", | 159 | subTotal: "", |
144 | feeTypeName: "" | 160 | feeTypeName: "" |
145 | }, | 161 | }, |
146 | feeTypeData: [], | 162 | feeTypeData: [], |
147 | token: "", | 163 | token: "", |
148 | invoiceParticularData: {} | 164 | invoiceParticularData: {}, |
165 | userData: {} | ||
149 | }), | 166 | }), |
150 | 167 | ||
151 | methods: { | 168 | methods: { |
152 | getInvoiceList() { | 169 | getInvoiceList() { |
153 | http() | 170 | http() |
154 | .get("/getParticularInvoice", { | 171 | .get("/getParticularInvoice", { |
155 | params: { | 172 | params: { |
156 | invoiceId: this.$route.params.viewInvoiceId, | 173 | invoiceId: this.$route.params.viewInvoiceId, |
157 | schoolId: this.$store.state.schoolId | 174 | schoolId: this.$store.state.schoolId |
158 | }, | 175 | }, |
159 | headers: { Authorization: "Bearer " + this.token } | 176 | headers: { Authorization: "Bearer " + this.token } |
160 | }) | 177 | }) |
161 | .then(response => { | 178 | .then(response => { |
162 | this.invoiceParticularData = response.data.data; | 179 | this.invoiceParticularData = response.data.data; |
163 | this.invoiceData = this.invoiceParticularData; | 180 | this.invoiceData = this.invoiceParticularData; |
164 | this.invoiceData.date = this.invoiceParticularData.date.slice(0, 10); | 181 | this.invoiceData.date = this.invoiceParticularData.date.slice(0, 10); |
165 | this.feeTypeData = this.invoiceParticularData.feeType; | 182 | this.feeTypeData = this.invoiceParticularData.feeType; |
166 | (this.feeType.amount = response.data.data.totalAmount), | 183 | (this.feeType.amount = response.data.data.totalAmount), |
167 | (this.feeType.discount = response.data.data.totalDiscount), | 184 | (this.feeType.discount = response.data.data.totalDiscount), |
168 | (this.feeType.subTotal = response.data.data.totalSubTotal), | 185 | (this.feeType.subTotal = response.data.data.totalSubTotal), |
169 | (this.feeType.totalPaidAmount = response.data.data.totalPaidAmount); | 186 | (this.feeType.totalPaidAmount = response.data.data.totalPaidAmount); |
170 | this.showLoader = false; | 187 | this.showLoader = false; |
171 | }) | 188 | }) |
172 | .catch(error => { | 189 | .catch(error => { |
173 | this.showLoader = false; | 190 | this.showLoader = false; |
174 | if (error.response.status === 401) { | 191 | if (error.response.status === 401) { |
175 | this.$router.replace({ path: "/" }); | 192 | this.$router.replace({ path: "/" }); |
176 | this.$store.dispatch("setToken", null); | 193 | this.$store.dispatch("setToken", null); |
177 | this.$store.dispatch("Id", null); | 194 | this.$store.dispatch("Id", null); |
178 | this.$store.dispatch("Role", null); | 195 | this.$store.dispatch("Role", null); |
179 | } | 196 | } |
180 | }); | 197 | }); |
181 | }, | 198 | }, |
182 | getfeeType() { | 199 | getfeeType() { |
183 | http() | 200 | http() |
184 | .get("/getFeesList", { | 201 | .get("/getFeesList", { |
185 | params: { schoolId: this.$store.state.schoolId }, | 202 | params: { schoolId: this.$store.state.schoolId }, |
186 | headers: { Authorization: "Bearer " + this.token } | 203 | headers: { Authorization: "Bearer " + this.token } |
187 | }) | 204 | }) |
188 | .then(response => { | 205 | .then(response => { |
189 | this.feeTypes = response.data.data; | 206 | this.feeTypes = response.data.data; |
190 | }) | 207 | }) |
191 | .catch(err => { | 208 | .catch(err => { |
192 | // console.log("err====>", err); | 209 | // console.log("err====>", err); |
193 | }); | 210 | }); |
194 | }, | 211 | }, |
195 | getAmmountDetails(feeTyp) { | 212 | getAmmountDetails(feeTyp) { |
196 | let feeType = { | 213 | let feeType = { |
197 | subTotal: "", | 214 | subTotal: "", |
198 | subParticularTotal: "", | 215 | subParticularTotal: "", |
199 | paidAmount: "" | 216 | paidAmount: "" |
200 | }; | 217 | }; |
201 | // *********** SUBTOTAL *********** | 218 | // *********** SUBTOTAL *********** |
202 | feeType.subTotal = | 219 | feeType.subTotal = |
203 | Number(feeType.subTotal) + Number(this.feeTypeData[i].subTotal); | 220 | Number(feeType.subTotal) + Number(this.feeTypeData[i].subTotal); |
204 | this.feeType.subTotal = feeType.subTotal.toFixed(2); | 221 | this.feeType.subTotal = feeType.subTotal.toFixed(2); |
205 | // *********** PAID-AMOUNT *********** | 222 | // *********** PAID-AMOUNT *********** |
206 | feeType.paidAmount = | 223 | feeType.paidAmount = |
207 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); | 224 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); |
208 | this.feeType.paidAmount = feeType.paidAmount.toFixed(2); | 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 | mounted() { | 246 | mounted() { |
212 | this.token = this.$store.state.token; | 247 | this.token = this.$store.state.token; |
213 | this.getInvoiceList(); | 248 | this.getInvoiceList(); |
214 | this.getfeeType(); | 249 | this.getfeeType(); |
250 | this.getUserData(); | ||
251 | |||
215 | }, | 252 | }, |
216 | created() { | 253 | created() { |
217 | this.$root.$on("app:search", search => { | 254 | this.$root.$on("app:search", search => { |
218 | this.search = search; | 255 | this.search = search; |
219 | }); | 256 | }); |
src/pages/Dashboard/dashboard.vue
1 | <template> | 1 | <template> |
2 | <v-app id="pages-dasboard"> | 2 | <v-app id="pages-dasboard"> |
3 | <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> | 3 | <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> |
4 | <!-- <v-dialog v-model="dialogNotice" max-width="940px" scrollable> | 4 | <!-- <v-dialog v-model="dialogNotice" max-width="940px" scrollable> |
5 | <v-card> | 5 | <v-card> |
6 | <v-toolbar color="grey lighten-2" flat> | 6 | <v-toolbar color="grey lighten-2" flat> |
7 | <v-spacer></v-spacer> | 7 | <v-spacer></v-spacer> |
8 | <v-toolbar-title> | 8 | <v-toolbar-title> |
9 | <h3>Notice Board</h3> | 9 | <h3>Notice Board</h3> |
10 | </v-toolbar-title> | 10 | </v-toolbar-title> |
11 | <v-spacer></v-spacer> | 11 | <v-spacer></v-spacer> |
12 | <v-icon @click="closeNotice">close</v-icon> | 12 | <v-icon @click="closeNotice">close</v-icon> |
13 | </v-toolbar> | 13 | </v-toolbar> |
14 | <v-card-text> | 14 | <v-card-text> |
15 | <v-layout> | 15 | <v-layout> |
16 | <v-flex align-center justify-center layout text-xs-center class="mt-2"> | 16 | <v-flex align-center justify-center layout text-xs-center class="mt-2"> |
17 | <img src="/static/icon/user.png" width="70px" v-if="!notice.eventImageUrl" /> | 17 | <img src="/static/icon/user.png" width="70px" v-if="!notice.eventImageUrl" /> |
18 | <img :src="notice.eventImageUrl" width="280px" v-else-if="notice.eventImageUrl" /> | 18 | <img :src="notice.eventImageUrl" width="280px" v-else-if="notice.eventImageUrl" /> |
19 | </v-flex> | 19 | </v-flex> |
20 | </v-layout> | 20 | </v-layout> |
21 | <v-container grid-list-md> | 21 | <v-container grid-list-md> |
22 | <v-layout wrap> | 22 | <v-layout wrap> |
23 | <v-flex> | 23 | <v-flex> |
24 | <v-layout> | 24 | <v-layout> |
25 | <v-flex xs5 sm6> | 25 | <v-flex xs5 sm6> |
26 | <h5 class="right my-1"> | 26 | <h5 class="right my-1"> |
27 | <b>Title:</b> | 27 | <b>Title:</b> |
28 | </h5> | 28 | </h5> |
29 | </v-flex> | 29 | </v-flex> |
30 | <v-flex sm6 xs8> | 30 | <v-flex sm6 xs8> |
31 | <h5 class="my-1">{{ notice.title }}</h5> | 31 | <h5 class="my-1">{{ notice.title }}</h5> |
32 | </v-flex> | 32 | </v-flex> |
33 | </v-layout> | 33 | </v-layout> |
34 | <v-layout> | 34 | <v-layout> |
35 | <v-flex xs5 sm6> | 35 | <v-flex xs5 sm6> |
36 | <h5 class="right my-1"> | 36 | <h5 class="right my-1"> |
37 | <b>Description:</b> | 37 | <b>Description:</b> |
38 | </h5> | 38 | </h5> |
39 | </v-flex> | 39 | </v-flex> |
40 | <v-flex sm6 xs8> | 40 | <v-flex sm6 xs8> |
41 | <h5 class="my-1">{{ notice.description }}</h5> | 41 | <h5 class="my-1">{{ notice.description }}</h5> |
42 | </v-flex> | 42 | </v-flex> |
43 | </v-layout> | 43 | </v-layout> |
44 | </v-flex> | 44 | </v-flex> |
45 | </v-layout> | 45 | </v-layout> |
46 | </v-container> | 46 | </v-container> |
47 | </v-card-text> | 47 | </v-card-text> |
48 | </v-card> | 48 | </v-card> |
49 | </v-dialog>--> | 49 | </v-dialog>--> |
50 | <!-- <v-container fluid grid-list-xl> --> | 50 | <!-- <v-container fluid grid-list-xl> --> |
51 | <v-layout wrap> | 51 | <v-layout wrap> |
52 | <v-flex xs12> | 52 | <v-flex xs12> |
53 | <v-layout wrap row> | 53 | <v-layout wrap row> |
54 | <!-- ***** Total Students ***** --> | 54 | <!-- ***** Total Students ***** --> |
55 | <v-flex xs12 sm12 md9> | 55 | <v-flex xs12 sm12 md9> |
56 | <v-container fluid grid-list-xl> | 56 | <v-container fluid grid-list-xl> |
57 | <v-flex xs12 sm12 md12> | 57 | <v-flex xs12 sm12 md12> |
58 | <v-layout wrap class> | 58 | <v-layout wrap class> |
59 | <v-flex xs12 sm12 md3> | 59 | <v-flex xs12 sm12 md3> |
60 | <router-link :to="{ name:'Students' }"> | 60 | <router-link :to="{ name:'Students' }"> |
61 | <v-card class="card pink-bgcolor"> | 61 | <v-card class="card pink-bgcolor"> |
62 | <v-card-title primary-title class="titleCard white--text py-3">Students</v-card-title> | 62 | <v-card-title primary-title class="titleCard white--text py-3">Students</v-card-title> |
63 | <img src="/static/icon/student.png" class="ml-2" width="40" alt="icons" /> | 63 | <img src="/static/icon/student.png" class="ml-2" width="40" alt="icons" /> |
64 | <v-card-title class="headline py-1 white--text">{{ students.length }}</v-card-title> | 64 | <v-card-title class="headline py-1 white--text">{{ students.length }}</v-card-title> |
65 | </v-card> | 65 | </v-card> |
66 | </router-link> | 66 | </router-link> |
67 | </v-flex> | 67 | </v-flex> |
68 | <!-- ***** Total Teachers***** --> | 68 | <!-- ***** Total Teachers***** --> |
69 | <v-flex xs12 sm12 md3> | 69 | <v-flex xs12 sm12 md3> |
70 | <router-link :to="{ name:'Teachers' }"> | 70 | <router-link :to="{ name:'Teachers' }"> |
71 | <v-card flat class="card elevation-2 firozi-bgcolor"> | 71 | <v-card flat class="card elevation-2 firozi-bgcolor"> |
72 | <v-card-title primary-title class="titleCard white--text py-3">Teachers</v-card-title> | 72 | <v-card-title primary-title class="titleCard white--text py-3">Teachers</v-card-title> |
73 | <img src="/static/icon/teacher.png" class="ml-2" width="40" alt="icons" /> | 73 | <img src="/static/icon/teacher.png" class="ml-2" width="40" alt="icons" /> |
74 | 74 | ||
75 | <v-card-title class="headline py-1 white--text">{{ teachers.length }}</v-card-title> | 75 | <v-card-title class="headline py-1 white--text">{{ teachers.length }}</v-card-title> |
76 | </v-card> | 76 | </v-card> |
77 | </router-link> | 77 | </router-link> |
78 | </v-flex> | 78 | </v-flex> |
79 | <!-- ***** Total Parents ***** --> | 79 | <!-- ***** Total Parents ***** --> |
80 | <v-flex xs12 sm12 md3> | 80 | <v-flex xs12 sm12 md3> |
81 | <router-link :to="{ name:'Parents' }"> | 81 | <router-link :to="{ name:'Parents' }"> |
82 | <v-card flat class="card yellow darken-3"> | 82 | <v-card flat class="card yellow darken-3"> |
83 | <v-card-title primary-title class="titleCard white--text py-3">Parents</v-card-title> | 83 | <v-card-title primary-title class="titleCard white--text py-3">Parents</v-card-title> |
84 | <img src="/static/icon/parents.png" class="ml-3" width="40px" alt="icons" /> | 84 | <img src="/static/icon/parents.png" class="ml-3" width="40px" alt="icons" /> |
85 | <v-card-title class="headline py-1 white--text">{{ parents.length }}</v-card-title> | 85 | <v-card-title class="headline py-1 white--text">{{ parents.length }}</v-card-title> |
86 | </v-card> | 86 | </v-card> |
87 | </router-link> | 87 | </router-link> |
88 | </v-flex> | 88 | </v-flex> |
89 | <!-- ***** Total Class***** --> | 89 | <!-- ***** Total Class***** --> |
90 | <v-flex xs12 sm12 md3> | 90 | <v-flex xs12 sm12 md3> |
91 | <router-link :to="{ name:'Class' }"> | 91 | <router-link :to="{ name:'Class' }"> |
92 | <v-card flat class="card darkBlue-bgcolor"> | 92 | <v-card flat class="card darkBlue-bgcolor"> |
93 | <v-card-title primary-title class="titleCard white--text py-3">Class</v-card-title> | 93 | <v-card-title primary-title class="titleCard white--text py-3">Class</v-card-title> |
94 | <img src="/static/icon/class.png" width="40" alt="icons" class="ml-2" /> | 94 | <img src="/static/icon/class.png" width="40" alt="icons" class="ml-2" /> |
95 | <v-card-title class="headline py-1 white--text">{{ classes.length }}</v-card-title> | 95 | <v-card-title class="headline py-1 white--text">{{ classes.length }}</v-card-title> |
96 | </v-card> | 96 | </v-card> |
97 | </router-link> | 97 | </router-link> |
98 | </v-flex> | 98 | </v-flex> |
99 | </v-layout> | 99 | </v-layout> |
100 | </v-flex> | 100 | </v-flex> |
101 | <v-layout> | 101 | <v-layout> |
102 | <v-flex xs12> | 102 | <v-flex xs12> |
103 | <v-card class="card mt-2 account-Card"> | 103 | <v-card class="card mt-2 account-Card"> |
104 | <h4> | 104 | <h4> |
105 | <b>Account</b> | 105 | <b>Account</b> |
106 | </h4> | 106 | </h4> |
107 | <v-layout wrap> | 107 | <v-layout wrap> |
108 | <v-flex xs12 sm12 md3> | 108 | <v-flex xs12 sm12 md3> |
109 | <v-list two-line> | 109 | <v-list two-line> |
110 | <template> | 110 | <template> |
111 | <v-list-tile> | 111 | <v-list-tile> |
112 | <v-list-tile-avatar> | 112 | <v-list-tile-avatar> |
113 | <v-icon class="account-circle darkBlue-color">panorama_fish_eye</v-icon> | 113 | <v-icon class="account-circle darkBlue-color">panorama_fish_eye</v-icon> |
114 | </v-list-tile-avatar> | 114 | </v-list-tile-avatar> |
115 | <v-list-tile-content> | 115 | <v-list-tile-content> |
116 | <v-list-tile-title class="mt-2"> | 116 | <v-list-tile-title class="mt-2"> |
117 | <p class="subheading font-color">Fees</p> | 117 | <p class="subheading font-color">Fees</p> |
118 | </v-list-tile-title> | 118 | </v-list-tile-title> |
119 | <v-list-tile-title>Rs 1000</v-list-tile-title> | 119 | <v-list-tile-title>Rs 1000</v-list-tile-title> |
120 | </v-list-tile-content> | 120 | </v-list-tile-content> |
121 | </v-list-tile> | 121 | </v-list-tile> |
122 | <v-list-tile> | 122 | <v-list-tile> |
123 | <v-list-tile-avatar> | 123 | <v-list-tile-avatar> |
124 | <v-icon class="account-circle yellowDark-color">panorama_fish_eye</v-icon> | 124 | <v-icon class="account-circle yellowDark-color">panorama_fish_eye</v-icon> |
125 | </v-list-tile-avatar> | 125 | </v-list-tile-avatar> |
126 | <v-list-tile-content> | 126 | <v-list-tile-content> |
127 | <v-list-tile-title class="mt-2"> | 127 | <v-list-tile-title class="mt-2"> |
128 | <p class="subheading font-color">Collection</p> | 128 | <p class="subheading font-color">Collection</p> |
129 | </v-list-tile-title> | 129 | </v-list-tile-title> |
130 | <v-list-tile-title>Rs 2000</v-list-tile-title> | 130 | <v-list-tile-title>Rs 2000</v-list-tile-title> |
131 | </v-list-tile-content> | 131 | </v-list-tile-content> |
132 | </v-list-tile> | 132 | </v-list-tile> |
133 | <v-list-tile> | 133 | <v-list-tile> |
134 | <v-list-tile-avatar> | 134 | <v-list-tile-avatar> |
135 | <v-icon class="account-circle pink-color">panorama_fish_eye</v-icon> | 135 | <v-icon class="account-circle pink-color">panorama_fish_eye</v-icon> |
136 | </v-list-tile-avatar> | 136 | </v-list-tile-avatar> |
137 | <v-list-tile-content> | 137 | <v-list-tile-content> |
138 | <v-list-tile-title class="mt-2"> | 138 | <v-list-tile-title class="mt-2"> |
139 | <p class="subheading font-color">Expences</p> | 139 | <p class="subheading font-color">Expences</p> |
140 | </v-list-tile-title> | 140 | </v-list-tile-title> |
141 | <v-list-tile-title>Rs 3000</v-list-tile-title> | 141 | <v-list-tile-title>Rs 3000</v-list-tile-title> |
142 | </v-list-tile-content> | 142 | </v-list-tile-content> |
143 | </v-list-tile> | 143 | </v-list-tile> |
144 | </template> | 144 | </template> |
145 | </v-list> | 145 | </v-list> |
146 | </v-flex> | 146 | </v-flex> |
147 | <v-flex xs12 sm12 md9> | 147 | <v-flex xs12 sm12 md9> |
148 | <div id="chart"> | 148 | <div id="chart"> |
149 | <apexchart | 149 | <apexchart |
150 | type="bar" | 150 | type="bar" |
151 | height="250" | 151 | height="250" |
152 | :options="chartOptions" | 152 | :options="chartOptions" |
153 | :series="series" | 153 | :series="series" |
154 | ></apexchart> | 154 | ></apexchart> |
155 | </div> | 155 | </div> |
156 | </v-flex> | 156 | </v-flex> |
157 | </v-layout> | 157 | </v-layout> |
158 | </v-card> | 158 | </v-card> |
159 | </v-flex> | 159 | </v-flex> |
160 | </v-layout> | 160 | </v-layout> |
161 | <v-card class="mt-2 card"> | 161 | <v-card class="mt-2 card"> |
162 | <!-- <full-calendar | 162 | <!-- <full-calendar |
163 | ref="calendar" | 163 | ref="calendar" |
164 | defaultView="month" | 164 | defaultView="month" |
165 | droppable="false" | 165 | droppable="false" |
166 | :events="events" | 166 | :events="events" |
167 | :config="config" | 167 | :config="config" |
168 | ></full-calendar>--> | 168 | ></full-calendar>--> |
169 | <h4 class="pa-3"> | 169 | <h4 class="pa-3"> |
170 | <b>Notice</b> | 170 | <b>Notice</b> |
171 | </h4> | 171 | </h4> |
172 | 172 | ||
173 | <v-data-table | 173 | <v-data-table |
174 | :items="noticeData" | 174 | :items="noticeData" |
175 | class="elevation-0" | 175 | class="elevation-0" |
176 | flat | 176 | flat |
177 | hide-actions | 177 | hide-actions |
178 | hide-headers | 178 | hide-headers |
179 | style="border-spacing: 0 !important;" | 179 | style="border-spacing: 0 !important;" |
180 | > | 180 | > |
181 | <template | 181 | <template |
182 | slot="items" | 182 | slot="items" |
183 | slot-scope="props" | 183 | slot-scope="props" |
184 | v-if="props.index < 5" | 184 | v-if="props.index < 5" |
185 | style="border-spacing: 0 !important;" | 185 | style="border-spacing: 0 !important;" |
186 | > | 186 | > |
187 | <tr class="td-notice"> | 187 | <tr class="td-notice"> |
188 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | 188 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> |
189 | <td> | 189 | <td> |
190 | <span class="grey--text caption">{{ date(props.item.created) }}</span> | 190 | <span class="grey--text caption">{{ date(props.item.created) }}</span> |
191 | <br /> | 191 | <br /> |
192 | <span class="body-2">{{ props.item.title}}</span> | 192 | <span class="body-2">{{ props.item.title}}</span> |
193 | </td> | 193 | </td> |
194 | <td class="noticeDecritpion grey--text mt-2">{{ props.item.description}}</td> | 194 | <td class="noticeDecritpion grey--text mt-2">{{ props.item.description}}</td> |
195 | 195 | ||
196 | <td class="text-xs-center"> | 196 | <td class="text-xs-center"> |
197 | <span> | 197 | <span> |
198 | <v-tooltip top> | 198 | <v-tooltip top> |
199 | <img | 199 | <img |
200 | slot="activator" | 200 | slot="activator" |
201 | style="cursor:pointer; width:25px; height:25px; " | 201 | style="cursor:pointer; width:25px; height:25px; " |
202 | @click="profile" | 202 | @click="profile" |
203 | src="/static/icon/view.png" | 203 | src="/static/icon/view.png" |
204 | /> | 204 | /> |
205 | <span>View</span> | 205 | <span>View</span> |
206 | </v-tooltip> | 206 | </v-tooltip> |
207 | </span> | 207 | </span> |
208 | </td> | 208 | </td> |
209 | </tr> | 209 | </tr> |
210 | </template> | 210 | </template> |
211 | </v-data-table> | 211 | </v-data-table> |
212 | </v-card> | 212 | </v-card> |
213 | </v-container> | 213 | </v-container> |
214 | </v-flex> | 214 | </v-flex> |
215 | <v-flex xs12 sm12 md3> | 215 | <v-flex xs12 sm12 md3> |
216 | <v-card height="100%" class="elevation-0 mt-3 profileDasboard"> | 216 | <v-card height="100%" class="elevation-0 mt-3 profileDasboard"> |
217 | <v-card-text> | 217 | <v-card-text> |
218 | <h4 class="text-xs-center py-3"> | 218 | <h4 class="text-xs-center py-3"> |
219 | <b>Profile</b> | 219 | <b>Profile</b> |
220 | </h4> | 220 | </h4> |
221 | <v-flex xs12 class="py-3"> | 221 | <v-flex xs12 class="py-3"> |
222 | <v-layout wrap> | 222 | <v-layout wrap> |
223 | <v-flex xs12 sm12 md4> | 223 | <v-flex xs12 sm12 md4> |
224 | <img src="/static/icon/user.png" v-if="!userData.schoolLogoUrl" width="80" /> | 224 | <img src="/static/icon/user.png" v-if="!userData.schoolLogoUrl" width="80" /> |
225 | <img | 225 | <img |
226 | :src="userData.schoolLogoUrl" | 226 | :src="userData.schoolLogoUrl" |
227 | v-else-if="userData.schoolLogoUrl" | 227 | v-else-if="userData.schoolLogoUrl" |
228 | width="80" | 228 | width="80" |
229 | /> | 229 | /> |
230 | </v-flex> | 230 | </v-flex> |
231 | <v-flex xs12 sm12 md6> | 231 | <v-flex xs12 sm12 md6> |
232 | <p class="mb-0 body-1"> | 232 | <p class="mb-0 body-1"> |
233 | <i>{{ userData.name }}</i> | 233 | <i>{{ userData.name }}</i> |
234 | </p> | 234 | </p> |
235 | <p class="mb-0 caption grey--text">{{ userData.email }}</p> | 235 | <p class="mb-0 caption grey--text">{{ userData.email }}</p> |
236 | <p class="mb-0 caption grey--text">{{ userData.mobile }}</p> | 236 | <p class="mb-0 caption grey--text">{{ userData.mobile }}</p> |
237 | <address class="caption grey--text mb-3">{{ userData.address }}</address> | 237 | <address class="caption grey--text mb-3">{{ userData.address }}</address> |
238 | </v-flex> | 238 | </v-flex> |
239 | </v-layout> | 239 | </v-layout> |
240 | </v-flex> | 240 | </v-flex> |
241 | <hr /> | 241 | <hr /> |
242 | <h4 class="text-xs-center py-3"> | 242 | <h4 class="text-xs-center py-3"> |
243 | <b>Calender</b> | 243 | <b>Calender</b> |
244 | </h4> | 244 | </h4> |
245 | <vue-event-calendar :events="demoEvents"></vue-event-calendar> | 245 | <vue-event-calendar :events="demoEvents"></vue-event-calendar> |
246 | </v-card-text> | 246 | </v-card-text> |
247 | </v-card> | 247 | </v-card> |
248 | </v-flex> | 248 | </v-flex> |
249 | </v-layout> | 249 | </v-layout> |
250 | </v-flex> | 250 | </v-flex> |
251 | </v-layout> | 251 | </v-layout> |
252 | <v-dialog v-model="dialog" max-width="500"> | 252 | <v-dialog v-model="dialog" max-width="500"> |
253 | <v-card color="grey lighten-4" flat> | 253 | <v-card color="grey lighten-4" flat> |
254 | <v-toolbar dark color="fixcolors"> | 254 | <v-toolbar dark color="fixcolors"> |
255 | <v-spacer></v-spacer> | 255 | <v-spacer></v-spacer> |
256 | <v-btn icon @click="dialog= false"> | 256 | <v-btn icon @click="dialog= false"> |
257 | <v-icon>close</v-icon> | 257 | <v-icon>close</v-icon> |
258 | </v-btn> | 258 | </v-btn> |
259 | </v-toolbar> | 259 | </v-toolbar> |
260 | <v-flex class="py-4"> | 260 | <v-flex class="py-4"> |
261 | <v-list-tile> | 261 | <v-list-tile> |
262 | <v-list-tile-action> | 262 | <v-list-tile-action> |
263 | <v-icon>edit</v-icon> | 263 | <v-icon>edit</v-icon> |
264 | </v-list-tile-action> | 264 | </v-list-tile-action> |
265 | <v-list-tile-content> | 265 | <v-list-tile-content> |
266 | <v-list-tile-title>{{ selected.title }}</v-list-tile-title> | 266 | <v-list-tile-title>{{ selected.title }}</v-list-tile-title> |
267 | </v-list-tile-content> | 267 | </v-list-tile-content> |
268 | </v-list-tile> | 268 | </v-list-tile> |
269 | <v-list-tile> | 269 | <v-list-tile> |
270 | <v-list-tile-action> | 270 | <v-list-tile-action> |
271 | <v-icon>access_time</v-icon> | 271 | <v-icon>access_time</v-icon> |
272 | </v-list-tile-action> | 272 | </v-list-tile-action> |
273 | <v-list-tile-content> | 273 | <v-list-tile-content> |
274 | <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title> | 274 | <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title> |
275 | </v-list-tile-content> | 275 | </v-list-tile-content> |
276 | </v-list-tile> | 276 | </v-list-tile> |
277 | </v-flex> | 277 | </v-flex> |
278 | </v-card> | 278 | </v-card> |
279 | </v-dialog> | 279 | </v-dialog> |
280 | <div class="loader" v-if="showLoader"> | 280 | <div class="loader" v-if="showLoader"> |
281 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 281 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
282 | </div> | 282 | </div> |
283 | </v-app> | 283 | </v-app> |
284 | </template> | 284 | </template> |
285 | 285 | ||
286 | <script> | 286 | <script> |
287 | import http from "@/Services/http.js"; | 287 | import http from "@/Services/http.js"; |
288 | import moment from "moment"; | 288 | import moment from "moment"; |
289 | // import { FunctionalCalendar } from "vue-functional-calendar"; | 289 | // import { FunctionalCalendar } from "vue-functional-calendar"; |
290 | 290 | ||
291 | export default { | 291 | export default { |
292 | components: { | 292 | components: { |
293 | // FunctionalCalendar | 293 | // FunctionalCalendar |
294 | }, | 294 | }, |
295 | data() { | 295 | data() { |
296 | return { | 296 | return { |
297 | // data: { | 297 | // data: { |
298 | // clieckedToday: false | 298 | // clieckedToday: false |
299 | // }, | 299 | // }, |
300 | // markedDates: ["16/4/2019", "18/4/2019", "20/4/2019", "21/4/2019"], | 300 | // markedDates: ["16/4/2019", "18/4/2019", "20/4/2019", "21/4/2019"], |
301 | // calendarData: {}, | 301 | // calendarData: {}, |
302 | // calendar: {}, | 302 | // calendar: {}, |
303 | demoEvents: [ | 303 | demoEvents: [ |
304 | { | 304 | { |
305 | date: "2020/01/10", // Required | 305 | date: "2020/01/10", // Required |
306 | title: "Foo" // Required | 306 | title: "Foo" // Required |
307 | }, | 307 | }, |
308 | { | 308 | { |
309 | date: "2020/01/12", | 309 | date: "2020/01/12", |
310 | title: "Bar", | 310 | title: "Bar", |
311 | desc: "description", | 311 | desc: "description", |
312 | customClass: "disabled highlight" // Custom classes to an calendar cell | 312 | customClass: "disabled highlight" // Custom classes to an calendar cell |
313 | } | 313 | } |
314 | ], | 314 | ], |
315 | 315 | ||
316 | showLoader: false, | 316 | showLoader: false, |
317 | calendarData: {}, | 317 | calendarData: {}, |
318 | dialog: false, | 318 | dialog: false, |
319 | dialogNotice: false, | 319 | dialogNotice: false, |
320 | HolidaysList: [], | 320 | HolidaysList: [], |
321 | EventsList: [], | 321 | EventsList: [], |
322 | events: [], | 322 | events: [], |
323 | config: { | 323 | config: { |
324 | eventClick: event => { | 324 | eventClick: event => { |
325 | this.selected = event; | 325 | this.selected = event; |
326 | this.dialog = true; | 326 | this.dialog = true; |
327 | } | 327 | } |
328 | }, | 328 | }, |
329 | selected: {}, | 329 | selected: {}, |
330 | // notice: {}, | 330 | // notice: {}, |
331 | userData: {}, | 331 | userData: {}, |
332 | dated: new Date(2018, 0, 9), | 332 | dated: new Date(2018, 0, 9), |
333 | userList: [], | 333 | userList: [], |
334 | sectionList: [], | 334 | sectionList: [], |
335 | students: "", | 335 | students: "", |
336 | parents: "", | 336 | parents: "", |
337 | teachers: "", | 337 | teachers: "", |
338 | classes: "", | 338 | classes: "", |
339 | noticeData: [], | 339 | noticeData: [], |
340 | attrs: [ | 340 | attrs: [ |
341 | { | 341 | { |
342 | key: "today", | 342 | key: "today", |
343 | highlight: true, | 343 | highlight: true, |
344 | dates: new Date() | 344 | dates: new Date() |
345 | } | 345 | } |
346 | ], | 346 | ], |
347 | drawer: true, | 347 | drawer: true, |
348 | items: [ | 348 | items: [ |
349 | { title: "Home", icon: "dashboard" }, | 349 | { title: "Home", icon: "dashboard" }, |
350 | { title: "About", icon: "question_answer" } | 350 | { title: "About", icon: "question_answer" } |
351 | ], | 351 | ], |
352 | right: null, | 352 | right: null, |
353 | 353 | ||
354 | series: [ | 354 | series: [ |
355 | { | 355 | { |
356 | name: "Total", | 356 | name: "Total", |
357 | data: [66, 44, 33] | 357 | data: [66, 44, 33] |
358 | } | 358 | } |
359 | ], | 359 | ], |
360 | chartOptions: { | 360 | chartOptions: { |
361 | chart: { | 361 | chart: { |
362 | type: "bar", | 362 | type: "bar", |
363 | height: 150, | 363 | height: 150, |
364 | animations: { | 364 | animations: { |
365 | enabled: true, | 365 | enabled: true, |
366 | easing: "easeinout", | 366 | easing: "easeinout", |
367 | speed: 1200, | 367 | speed: 1200, |
368 | animateGradually: { | 368 | animateGradually: { |
369 | enabled: true, | 369 | enabled: true, |
370 | delay: 450 | 370 | delay: 450 |
371 | }, | 371 | }, |
372 | dynamicAnimation: { | 372 | dynamicAnimation: { |
373 | enabled: true, | 373 | enabled: true, |
374 | speed: 450 | 374 | speed: 450 |
375 | } | 375 | } |
376 | } | 376 | } |
377 | }, | 377 | }, |
378 | plotOptions: { | 378 | plotOptions: { |
379 | bar: { | 379 | bar: { |
380 | horizontal: false, | 380 | horizontal: false, |
381 | columnWidth: "25%", | 381 | columnWidth: "25%", |
382 | // endingShape: "rounded", | 382 | // endingShape: "rounded", |
383 | distributed: true | 383 | distributed: true |
384 | } | 384 | } |
385 | }, | 385 | }, |
386 | legend: { | 386 | legend: { |
387 | show: false | 387 | show: false |
388 | }, | 388 | }, |
389 | colors: ["#7852cc", "#f9a825", "#ff8a89"], | 389 | colors: ["#7852cc", "#f9a825", "#ff8a89"], |
390 | dataLabels: { | 390 | dataLabels: { |
391 | enabled: false | 391 | enabled: false |
392 | }, | 392 | }, |
393 | stroke: { | 393 | stroke: { |
394 | show: true, | 394 | show: true, |
395 | width: 2, | 395 | width: 2, |
396 | colors: ["transparent"] | 396 | colors: ["transparent"] |
397 | }, | 397 | }, |
398 | xaxis: { | 398 | xaxis: { |
399 | categories: ["Fee", "Collections", "Expences"] | 399 | categories: ["Fee", "Collections", "Expences"] |
400 | }, | 400 | }, |
401 | yaxis: { | 401 | yaxis: { |
402 | title: { | 402 | title: { |
403 | text: "" | 403 | text: "" |
404 | } | 404 | } |
405 | }, | 405 | }, |
406 | fill: { | 406 | fill: { |
407 | opacity: 1 | 407 | opacity: 1 |
408 | }, | 408 | }, |
409 | tooltip: { | 409 | tooltip: { |
410 | y: { | 410 | y: { |
411 | formatter: function(val, opts) { | 411 | formatter: function(val, opts) { |
412 | // console.log("opts",opts.w.config.xaxis.categories) | 412 | // console.log("opts",opts.w.config.xaxis.categories) |
413 | return "" + val + " "; | 413 | return "" + val + " "; |
414 | } | 414 | } |
415 | } | 415 | } |
416 | } | 416 | } |
417 | } | 417 | } |
418 | }; | 418 | }; |
419 | }, | 419 | }, |
420 | mounted() { | 420 | mounted() { |
421 | this.token = this.$store.state.token; | 421 | this.token = this.$store.state.token; |
422 | // console.log("this.$store.state.role", this.$store.state.schoolRole); | 422 | // console.log("this.$store.state.role", this.$store.state.schoolRole); |
423 | // this.getData(); | 423 | // this.getData(); |
424 | this.getStudents(); | 424 | this.getStudents(); |
425 | this.getTeachers(); | 425 | this.getTeachers(); |
426 | this.getParents(); | 426 | this.getParents(); |
427 | this.getClasses(); | 427 | this.getClasses(); |
428 | this.getNoticeData(); | 428 | this.getNoticeData(); |
429 | this.getUserData(); | 429 | this.getUserData(); |
430 | // this.getUsersList(); | 430 | // this.getUsersList(); |
431 | }, | 431 | }, |
432 | methods: { | 432 | methods: { |
433 | closeNotice() { | 433 | closeNotice() { |
434 | this.dialogNotice = false; | 434 | this.dialogNotice = false; |
435 | }, | 435 | }, |
436 | profile() { | 436 | profile() { |
437 | // this.editedIndex = this.desserts.indexOf(item); | 437 | // this.editedIndex = this.desserts.indexOf(item); |
438 | // this.notice = Object.assign({}, item); | 438 | // this.notice = Object.assign({}, item); |
439 | // this.dialogNotice = true; | 439 | // this.dialogNotice = true; |
440 | this.$router.push({ name: "NoticeBoard" }); | 440 | this.$router.push({ name: "NoticeBoard" }); |
441 | }, | 441 | }, |
442 | date: function(date) { | 442 | date: function(date) { |
443 | return moment(date).format("MMMM DD, YYYY HH:mm"); | 443 | return moment(date).format("MMMM DD, YYYY HH:mm"); |
444 | }, | 444 | }, |
445 | refreshEvents() { | 445 | refreshEvents() { |
446 | this.$refs.calendar.$emit("refetch-events"); | 446 | this.$refs.calendar.$emit("refetch-events"); |
447 | }, | 447 | }, |
448 | removeEvent() { | 448 | removeEvent() { |
449 | this.$refs.calendar.$emit("remove-event", this.selected); | 449 | this.$refs.calendar.$emit("remove-event", this.selected); |
450 | this.selected = {}; | 450 | this.selected = {}; |
451 | }, | 451 | }, |
452 | eventSelected(event) { | 452 | eventSelected(event) { |
453 | this.selected = event; | 453 | this.selected = event; |
454 | console.log("this.selected", this.selected); | 454 | console.log("this.selected", this.selected); |
455 | }, | 455 | }, |
456 | // eventDropStart: function(event) { | 456 | // eventDropStart: function(event) { |
457 | // event.editable = false; | 457 | // event.editable = false; |
458 | // }, | 458 | // }, |
459 | eventCreated(...test) { | 459 | eventCreated(...test) { |
460 | console.log(test); | 460 | console.log(test); |
461 | }, | 461 | }, |
462 | getStudents() { | 462 | getStudents() { |
463 | http() | 463 | http() |
464 | .get("/getStudentsList", { | 464 | .get("/getStudentsList", { |
465 | headers: { Authorization: "Bearer " + token } | 465 | headers: { |
466 | 466 | Authorization: "Bearer " + this.$store.state.token | |
467 | } | ||
467 | }) | 468 | }) |
468 | .then(response => { | 469 | .then(response => { |
469 | this.students = response.data.data; | 470 | this.students = response.data.data; |
470 | this.showLoader = false; | 471 | this.showLoader = false; |
471 | }) | 472 | }) |
472 | .catch(error => { | 473 | .catch(error => { |
473 | // console.log("err====>", err); | 474 | // console.log("err====>", err); |
474 | this.showLoader = false; | 475 | this.showLoader = false; |
475 | if (error.response.status === 401) { | 476 | if (error.response.status === 401) { |
476 | this.$router.replace({ path: "/" }); | 477 | this.$router.replace({ path: "/" }); |
477 | this.$store.dispatch("setToken", null); | 478 | this.$store.dispatch("setToken", null); |
478 | this.$store.dispatch("Id", null); | 479 | this.$store.dispatch("Id", null); |
479 | } | 480 | } |
480 | }); | 481 | }); |
481 | }, | 482 | }, |
482 | getParents() { | 483 | getParents() { |
483 | http() | 484 | http() |
484 | .get("/getParentsList") | 485 | .get("/getParentsList", { |
486 | headers: { | ||
487 | Authorization: "Bearer " + this.$store.state.token | ||
488 | } | ||
489 | }) | ||
485 | .then(response => { | 490 | .then(response => { |
486 | this.parents = response.data.data; | 491 | this.parents = response.data.data; |
487 | this.showLoader = false; | 492 | this.showLoader = false; |
488 | }) | 493 | }) |
489 | .catch(error => { | 494 | .catch(error => { |
490 | // console.log("err====>", err); | 495 | // console.log("err====>", err); |
491 | this.showLoader = false; | 496 | this.showLoader = false; |
492 | if (error.response.status === 401) { | 497 | if (error.response.status === 401) { |
493 | this.$router.replace({ path: "/" }); | 498 | this.$router.replace({ path: "/" }); |
494 | this.$store.dispatch("setToken", null); | 499 | this.$store.dispatch("setToken", null); |
495 | this.$store.dispatch("Id", null); | 500 | this.$store.dispatch("Id", null); |
496 | } | 501 | } |
497 | }); | 502 | }); |
498 | }, | 503 | }, |
499 | getTeachers() { | 504 | getTeachers() { |
500 | http() | 505 | http() |
501 | .get("/getTeachersList", { | 506 | .get("/getTeachersList", { |
502 | headers: { Authorization: "Bearer " + token } | 507 | headers: { |
503 | 508 | Authorization: "Bearer " + this.$store.state.token | |
509 | } | ||
504 | }) | 510 | }) |
505 | .then(response => { | 511 | .then(response => { |
506 | this.teachers = response.data.data; | 512 | this.teachers = response.data.data; |
507 | this.showLoader = false; | 513 | this.showLoader = false; |
508 | }) | 514 | }) |
509 | .catch(error => { | 515 | .catch(error => { |
510 | // console.log("err====>", err); | 516 | // console.log("err====>", err); |
511 | this.showLoader = false; | 517 | this.showLoader = false; |
512 | if (error.response.status === 401) { | 518 | if (error.response.status === 401) { |
513 | this.$router.replace({ path: "/" }); | 519 | this.$router.replace({ path: "/" }); |
514 | this.$store.dispatch("setToken", null); | 520 | this.$store.dispatch("setToken", null); |
515 | this.$store.dispatch("Id", null); | 521 | this.$store.dispatch("Id", null); |
516 | } | 522 | } |
517 | }); | 523 | }); |
518 | }, | 524 | }, |
519 | getClasses() { | 525 | getClasses() { |
520 | http() | 526 | http() |
521 | .get("/getClassesList") | 527 | .get("/getClassesList", { |
528 | headers: { | ||
529 | Authorization: "Bearer " + this.$store.state.token | ||
530 | } | ||
531 | }) | ||
522 | .then(response => { | 532 | .then(response => { |
523 | this.classes = response.data.data; | 533 | this.classes = response.data.data; |
524 | this.showLoader = false; | 534 | this.showLoader = false; |
525 | }) | 535 | }) |
526 | .catch(error => { | 536 | .catch(error => { |
527 | this.showLoader = false; | 537 | this.showLoader = false; |
528 | if (error.response.status === 401) { | 538 | if (error.response.status === 401) { |
529 | this.$router.replace({ path: "/" }); | 539 | this.$router.replace({ path: "/" }); |
530 | this.$store.dispatch("setToken", null); | 540 | this.$store.dispatch("setToken", null); |
531 | this.$store.dispatch("Id", null); | 541 | this.$store.dispatch("Id", null); |
532 | this.$store.dispatch("Role", null); | 542 | this.$store.dispatch("Role", null); |
533 | } | 543 | } |
534 | }); | 544 | }); |
535 | }, | 545 | }, |
536 | getNoticeData() { | 546 | getNoticeData() { |
537 | this.showLoader = true; | 547 | this.showLoader = true; |
538 | http() | 548 | http() |
539 | .get("/getEventsList") | 549 | .get("/getEventsList", { |
550 | headers: { | ||
551 | Authorization: "Bearer " + this.$store.state.token | ||
552 | } | ||
553 | }) | ||
540 | .then(response => { | 554 | .then(response => { |
541 | this.noticeData = response.data.data; | 555 | this.noticeData = response.data.data; |
542 | this.showLoader = false; | 556 | this.showLoader = false; |
543 | }) | 557 | }) |
544 | .catch(error => { | 558 | .catch(error => { |
545 | this.showLoader = false; | 559 | this.showLoader = false; |
546 | if (error.response.status === 401) { | 560 | if (error.response.status === 401) { |
547 | this.$router.replace({ path: "/" }); | 561 | this.$router.replace({ path: "/" }); |
548 | this.$store.dispatch("setToken", null); | 562 | this.$store.dispatch("setToken", null); |
549 | this.$store.dispatch("Id", null); | 563 | this.$store.dispatch("Id", null); |
550 | } | 564 | } |
551 | }); | 565 | }); |
552 | }, | 566 | }, |
553 | getUserData() { | 567 | getUserData() { |
554 | // this.showLoader = true; | 568 | // this.showLoader = true; |
555 | http() | 569 | http() |
556 | .get("/getParticularUserDetail") | 570 | .get("/getParticularUserDetail", { |
571 | headers: { | ||
572 | Authorization: "Bearer " + this.$store.state.token | ||
573 | } | ||
574 | }) | ||
557 | .then(response => { | 575 | .then(response => { |
558 | this.userData = response.data.data; | 576 | this.userData = response.data.data; |
559 | this.showLoader = false; | 577 | this.showLoader = false; |
560 | }) | 578 | }) |
561 | .catch(error => { | 579 | .catch(error => { |
562 | this.showLoader = false; | 580 | this.showLoader = false; |
563 | // if (error.response.status === 401) { | 581 | // if (error.response.status === 401) { |
564 | // this.$router.replace({ path: "/" }); | 582 | // this.$router.replace({ path: "/" }); |
565 | // this.$store.dispatch("setToken", null); | 583 | // this.$store.dispatch("setToken", null); |
566 | // this.$store.dispatch("Id", null); | 584 | // this.$store.dispatch("Id", null); |
567 | // } | 585 | // } |
568 | }); | 586 | }); |
569 | } | 587 | } |
570 | } | 588 | } |
571 | }; | 589 | }; |
572 | </script> | 590 | </script> |
573 | 591 | ||
574 | <style scoped> | 592 | <style scoped> |
575 | @import "fullcalendar/dist/fullcalendar.css"; | 593 | @import "fullcalendar/dist/fullcalendar.css"; |
576 | </style> | 594 | </style> |
src/pages/Mark/viewMark.vue
1 | <template> | 1 | <template> |
2 | <v-app id="pages-dasboard"> | 2 | <v-app id="pages-dasboard"> |
3 | <!-- ****** PROFILE MARK ****** --> | 3 | <!-- ****** PROFILE MARK ****** --> |
4 | <v-container fluid grid-list-md> | 4 | <v-container fluid grid-list-md> |
5 | <v-layout> | 5 | <v-layout> |
6 | <v-flex xs12 sm8 md10> | 6 | <v-flex xs12 sm8 md10> |
7 | <v-btn class="open-dialog-button mt-3" round dark @click="print()"> | 7 | <v-btn class="open-dialog-button mt-3" round dark @click="print()"> |
8 | 8 | ||
9 | <v-icon size="18" right dark>print</v-icon> | 9 | <v-icon size="18" right dark>print</v-icon> |
10 | </v-btn> | 10 | </v-btn> |
11 | </v-flex> | 11 | </v-flex> |
12 | <v-flex xs12 sm4 md2 class="right"> | 12 | <v-flex xs12 sm4 md2 class="right"> |
13 | <v-select | 13 | <v-select |
14 | class | 14 | class |
15 | :items="selectMark" | 15 | :items="selectMark" |
16 | label="Select" | 16 | label="Select" |
17 | v-model="selectMarkList" | 17 | v-model="selectMarkList" |
18 | @change="selectMarkData(selectMarkList)" | 18 | @change="selectMarkData(selectMarkList)" |
19 | ></v-select> | 19 | ></v-select> |
20 | </v-flex> | 20 | </v-flex> |
21 | </v-layout> | 21 | </v-layout> |
22 | <v-flex xs12 sm12 id="printMe"> | 22 | <v-flex xs12 sm12 id="printMe"> |
23 | <v-layout wrap> | 23 | <v-layout wrap> |
24 | <!-- ****** TABLE DATA MARK ****** --> | 24 | <!-- ****** TABLE DATA MARK ****** --> |
25 | <v-flex xs12 sm12 md12> | 25 | <v-flex xs12 sm12 md12> |
26 | <v-card | 26 | <v-card |
27 | v-for="(value, id, index) in filterData" | 27 | v-for="(value, id, index) in filterData" |
28 | :key="index" | 28 | :key="index" |
29 | flat | 29 | flat |
30 | style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px" | 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 | |||
36 | <v-icon right dark>print</v-icon> | ||
37 | </v-btn> | ||
38 | </v-flex> | ||
39 | </v-layout> --> | ||
40 | <v-layout> | 32 | <v-layout> |
41 | <v-flex xs12 class="text-xs-center"> | 33 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
42 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> | 34 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> |
43 | <p class="title">{{ userData.name }}</p> | 35 | <p class="title">{{ userData.name }}</p> |
44 | <p>{{ userData.address }}</p> | 36 | <p>{{ userData.address }}</p> |
45 | </v-flex> | 37 | </v-flex> |
46 | </v-layout> | 38 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
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> | ||
63 | <v-avatar size="100"> | 39 | <v-avatar size="100"> |
64 | <img | 40 | <img |
65 | :src="value[0].studentId.profilePicUrl" | 41 | :src="value[0].studentId.profilePicUrl" |
66 | v-if="value[0].studentId.profilePicUrl" | 42 | v-if="value[0].studentId.profilePicUrl" |
67 | width="100px" | 43 | width="100px" |
68 | /> | 44 | /> |
69 | <img | 45 | <img |
70 | src="/static/icon/user.png" | 46 | src="/static/icon/user.png" |
71 | v-else-if="!value[0].studentId.profilePicUrl" | 47 | v-else-if="!value[0].studentId.profilePicUrl" |
72 | width="100px" | 48 | width="100px" |
73 | /> | 49 | /> |
74 | </v-avatar> | 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 | </v-flex> | 63 | </v-flex> |
76 | </v-layout> | 64 | </v-layout> |
77 | <v-card-title class="subheading">{{value[0].examId.examName}}</v-card-title> | 65 | <v-card-title class="subheading">{{value[0].examId.examName}}</v-card-title> |
78 | <table | 66 | <table |
79 | class="mb-5 tableRsponsive feeTypeTable" | 67 | class="mb-5 tableRsponsive feeTypeTable" |
80 | style="border: 1px solid lightgrey; | 68 | style="border: 1px solid lightgrey; |
81 | border-collapse: collapse;!important | 69 | border-collapse: collapse;!important |
82 | table-layout: auto !important; | 70 | table-layout: auto !important; |
83 | width: 100% !important; | 71 | width: 100% !important; |
84 | " | 72 | " |
85 | > | 73 | > |
86 | <thead style="border: 1px solid lightgrey !important;"> | 74 | <thead style="border: 1px solid lightgrey !important;"> |
87 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> | 75 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> |
88 | <td | 76 | <td |
89 | rowspan="2" | 77 | rowspan="2" |
90 | style="border: 1px solid lightgrey !important;padding: 10px;" | 78 | style="border: 1px solid lightgrey !important;padding: 10px;" |
91 | >Subject</td> | 79 | >Subject</td> |
92 | <template v-for="studentData in value"> | 80 | <template v-for="studentData in value"> |
93 | <td | 81 | <td |
94 | colspan="2" | 82 | colspan="2" |
95 | v-for="studentMark in studentData.studentsMarks" | 83 | v-for="studentMark in studentData.studentsMarks" |
96 | style="border: 1px solid lightgrey !important;padding: 10px;" | 84 | style="border: 1px solid lightgrey !important;padding: 10px;" |
97 | >{{studentMark.markDistributionId.distributionType}}</td> | 85 | >{{studentMark.markDistributionId.distributionType}}</td> |
98 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Total</td> | 86 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Total</td> |
99 | </template> | 87 | </template> |
100 | </tr> | 88 | </tr> |
101 | <tr | 89 | <tr |
102 | v-for="(subject, ind) in value" | 90 | v-for="(subject, ind) in value" |
103 | v-if="ind == 0" | 91 | v-if="ind == 0" |
104 | style="border: 1px solid lightgrey !important;" | 92 | style="border: 1px solid lightgrey !important;" |
105 | > | 93 | > |
106 | <template v-for="(exam, i) in subject.studentsMarks"> | 94 | <template v-for="(exam, i) in subject.studentsMarks"> |
107 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> | 95 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> |
108 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Highest Mark</td> | 96 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Highest Mark</td> |
109 | </template> | 97 | </template> |
110 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> | 98 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> |
111 | </tr> | 99 | </tr> |
112 | </thead> | 100 | </thead> |
113 | <tbody style="border: 1px solid lightgrey !important;"> | 101 | <tbody style="border: 1px solid lightgrey !important;"> |
114 | <tr v-for="subject in value" style="border: 1px solid lightgrey !important;"> | 102 | <tr v-for="subject in value" style="border: 1px solid lightgrey !important;"> |
115 | <td | 103 | <td |
116 | style="border: 1px solid lightgrey !important;padding: 10px;" | 104 | style="border: 1px solid lightgrey !important;padding: 10px;" |
117 | >{{subject.subjectName}}</td> | 105 | >{{subject.subjectName}}</td> |
118 | <template v-for="(exam, i) in subject.studentsMarks"> | 106 | <template v-for="(exam, i) in subject.studentsMarks"> |
119 | <td | 107 | <td |
120 | style="border: 1px solid lightgrey !important;padding: 10px;" | 108 | style="border: 1px solid lightgrey !important;padding: 10px;" |
121 | >{{exam.marksScored}}</td> | 109 | >{{exam.marksScored}}</td> |
122 | <td | 110 | <td |
123 | style="border: 1px solid lightgrey !important;padding: 10px;" | 111 | style="border: 1px solid lightgrey !important;padding: 10px;" |
124 | >{{exam.markDistributionId.markValue}}</td> | 112 | >{{exam.markDistributionId.markValue}}</td> |
125 | </template> | 113 | </template> |
126 | <td | 114 | <td |
127 | style="border: 1px solid lightgrey !important;padding: 10px;" | 115 | style="border: 1px solid lightgrey !important;padding: 10px;" |
128 | >{{subject.totalMarks}}</td> | 116 | >{{subject.totalMarks}}</td> |
129 | </tr> | 117 | </tr> |
130 | </tbody> | 118 | </tbody> |
131 | </table> | 119 | </table> |
132 | </v-card> | 120 | </v-card> |
133 | </v-flex> | 121 | </v-flex> |
134 | </v-layout> | 122 | </v-layout> |
135 | </v-flex> | 123 | </v-flex> |
136 | </v-container> | 124 | </v-container> |
137 | <div class="loader" v-if="showLoader"> | 125 | <div class="loader" v-if="showLoader"> |
138 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 126 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
139 | </div> | 127 | </div> |
140 | </v-app> | 128 | </v-app> |
141 | </template> | 129 | </template> |
142 | 130 | ||
143 | <script> | 131 | <script> |
144 | import http from "@/Services/http.js"; | 132 | import http from "@/Services/http.js"; |
145 | import moment from "moment"; | 133 | import moment from "moment"; |
146 | import _ from "underscore"; | 134 | import _ from "underscore"; |
147 | 135 | ||
148 | export default { | 136 | export default { |
149 | data: () => ({ | 137 | data: () => ({ |
150 | showLoader: true, | 138 | showLoader: true, |
151 | nameShow: false, | 139 | nameShow: false, |
152 | showMark: true, | 140 | showMark: true, |
153 | showGrade: false, | 141 | showGrade: false, |
154 | markData: [], | 142 | markData: [], |
155 | token: "", | 143 | token: "", |
156 | markDistributions: [], | 144 | markDistributions: [], |
157 | markParticularDistributionData: [], | 145 | markParticularDistributionData: [], |
158 | filterData: [], | 146 | filterData: [], |
159 | output: null, | 147 | output: null, |
160 | gradeAPlus: "A+", | 148 | gradeAPlus: "A+", |
161 | gradeA: "A", | 149 | gradeA: "A", |
162 | gradeBPlus: "B+", | 150 | gradeBPlus: "B+", |
163 | gradeB: "B", | 151 | gradeB: "B", |
164 | gradeCPlus: "C+", | 152 | gradeCPlus: "C+", |
165 | gradeC: "C", | 153 | gradeC: "C", |
166 | selectMarkList: "Mark", | 154 | selectMarkList: "Mark", |
167 | selectMark: ["Mark", "Grade"], | 155 | selectMark: ["Mark", "Grade"], |
168 | MarkData: "", | 156 | MarkData: "", |
169 | userData: {} | 157 | userData: {} |
170 | }), | 158 | }), |
171 | mounted() { | 159 | mounted() { |
172 | this.token = this.$store.state.token; | 160 | this.token = this.$store.state.token; |
173 | this.getMarkList(); | 161 | this.getMarkList(); |
174 | this.getUserData(); | 162 | this.getUserData(); |
175 | }, | 163 | }, |
176 | methods: { | 164 | methods: { |
177 | getMarkList() { | 165 | getMarkList() { |
178 | this.showLoader = true; | 166 | this.showLoader = true; |
179 | http() | 167 | http() |
180 | .get("/getParticularMark", { | 168 | .get("/getParticularMark", { |
181 | params: { studentId: this.$route.params.markId }, | 169 | params: { studentId: this.$route.params.markId }, |
182 | headers: { Authorization: "Bearer " + this.token } | 170 | headers: { Authorization: "Bearer " + this.token } |
183 | }) | 171 | }) |
184 | .then(response => { | 172 | .then(response => { |
185 | this.markData = response.data.data; | 173 | this.markData = response.data.data; |
186 | let newData = response.data.data; | 174 | let newData = response.data.data; |
187 | // console.log("newData", newData); | 175 | // console.log("newData", newData); |
188 | for (var i = 0; i < newData.length; i++) { | 176 | for (var i = 0; i < newData.length; i++) { |
189 | newData[i].examination = newData[i].examId._id; | 177 | newData[i].examination = newData[i].examId._id; |
190 | } | 178 | } |
191 | this.filterData = _.groupBy(newData, ["examination"]); | 179 | this.filterData = _.groupBy(newData, ["examination"]); |
192 | // console.log("this.filterData", this.filterData); | 180 | // console.log("this.filterData", this.filterData); |
193 | for (let data in this.filterData) { | 181 | for (let data in this.filterData) { |
194 | for (let item in this.filterData[data]) { | 182 | for (let item in this.filterData[data]) { |
195 | var totalMarks = 0; | 183 | var totalMarks = 0; |
196 | for ( | 184 | for ( |
197 | let i = 0; | 185 | let i = 0; |
198 | i < this.filterData[data][item].studentsMarks.length; | 186 | i < this.filterData[data][item].studentsMarks.length; |
199 | i++ | 187 | i++ |
200 | ) { | 188 | ) { |
201 | // console.log("this.filterData[data][item].studentsMarks[i]",this.filterData[data][item].studentsMarks[i] | 189 | // console.log("this.filterData[data][item].studentsMarks[i]",this.filterData[data][item].studentsMarks[i] |
202 | // .marksScored) | 190 | // .marksScored) |
203 | totalMarks += this.filterData[data][item].studentsMarks[i] | 191 | totalMarks += this.filterData[data][item].studentsMarks[i] |
204 | .marksScored; | 192 | .marksScored; |
205 | } | 193 | } |
206 | this.filterData[data][item].totalMarks = totalMarks; | 194 | this.filterData[data][item].totalMarks = totalMarks; |
207 | 195 | ||
208 | if (totalMarks > 90) { | 196 | if (totalMarks > 90) { |
209 | this.filterData[data][item].grade = this.gradeAPlus; | 197 | this.filterData[data][item].grade = this.gradeAPlus; |
210 | } else if (totalMarks > 80 && totalMarks < 90) { | 198 | } else if (totalMarks > 80 && totalMarks < 90) { |
211 | this.filterData[data][item].grade = this.gradeA; | 199 | this.filterData[data][item].grade = this.gradeA; |
212 | } else if (totalMarks > 70 && totalMarks < 80) { | 200 | } else if (totalMarks > 70 && totalMarks < 80) { |
213 | this.filterData[data][item].grade = this.gradeBPlus; | 201 | this.filterData[data][item].grade = this.gradeBPlus; |
214 | } else if (totalMarks > 60 && totalMarks < 70) { | 202 | } else if (totalMarks > 60 && totalMarks < 70) { |
215 | this.filterData[data][item].grade = this.gradeB; | 203 | this.filterData[data][item].grade = this.gradeB; |
216 | } else if (totalMarks > 50 && totalMarks < 60) { | 204 | } else if (totalMarks > 50 && totalMarks < 60) { |
217 | this.filterData[data][item].grade = this.gradeCPlus; | 205 | this.filterData[data][item].grade = this.gradeCPlus; |
218 | } else if (totalMarks > 40 && totalMarks < 50) { | 206 | } else if (totalMarks > 40 && totalMarks < 50) { |
219 | this.filterData[data][item].grade = this.gradeC; | 207 | this.filterData[data][item].grade = this.gradeC; |
220 | } | 208 | } |
221 | } | 209 | } |
222 | } | 210 | } |
223 | this.showLoader = false; | 211 | this.showLoader = false; |
224 | }) | 212 | }) |
225 | .catch(error => { | 213 | .catch(error => { |
226 | this.showLoader = false; | 214 | this.showLoader = false; |
227 | this.snackbar = true; | 215 | this.snackbar = true; |
228 | this.text = error.response.data.message; | 216 | this.text = error.response.data.message; |
229 | if (error.response.status === 401) { | 217 | if (error.response.status === 401) { |
230 | this.$router.replace({ path: "/" }); | 218 | this.$router.replace({ path: "/" }); |
231 | this.$store.dispatch("setToken", null); | 219 | this.$store.dispatch("setToken", null); |
232 | this.$store.dispatch("Id", null); | 220 | this.$store.dispatch("Id", null); |
233 | } | 221 | } |
234 | }); | 222 | }); |
235 | }, | 223 | }, |
236 | print() { | 224 | print() { |
237 | // Pass the element id here | 225 | // Pass the element id here |
238 | this.$htmlToPaper("printMe"); | 226 | this.$htmlToPaper("printMe"); |
239 | }, | 227 | }, |
240 | getUserData() { | 228 | getUserData() { |
241 | http() | 229 | http() |
242 | .get("/getParticularUserDetail") | 230 | .get("/getParticularUserDetail") |
243 | .then(response => { | 231 | .then(response => { |
244 | this.userData = response.data.data; | 232 | this.userData = response.data.data; |
245 | }) | 233 | }) |
246 | .catch(error => { | 234 | .catch(error => { |
247 | if (error.response.status === 401) { | 235 | // if (error.response.status === 401) { |
248 | this.$router.replace({ path: "/" }); | 236 | // this.$router.replace({ path: "/" }); |
249 | this.$store.dispatch("setToken", null); | 237 | // this.$store.dispatch("setToken", null); |
250 | this.$store.dispatch("Id", null); | 238 | // this.$store.dispatch("Id", null); |
251 | } | 239 | // } |
252 | }); | 240 | }); |
253 | }, | 241 | }, |
254 | selectMarkData(select) { | 242 | selectMarkData(select) { |
255 | if (select == "Mark") { | 243 | if (select == "Mark") { |
256 | this.showMark = true; | 244 | this.showMark = true; |
257 | this.showGrade = false; | 245 | this.showGrade = false; |
258 | } else if (select == "Grade") { | 246 | } else if (select == "Grade") { |
259 | this.showGrade = true; | 247 | this.showGrade = true; |
260 | this.showMark = false; | 248 | this.showMark = false; |
261 | } | 249 | } |
262 | } | 250 | } |
263 | } | 251 | } |
264 | }; | 252 | }; |
265 | </script> | 253 | </script> |
266 | 254 | ||
267 | <style scoped> | 255 | <style scoped> |
268 | .add-button { | 256 | .add-button { |
269 | background: #feb83c !important; | 257 | background: #feb83c !important; |
270 | border-color: #feb83c !important; | 258 | border-color: #feb83c !important; |
271 | text-transform: none !important; | 259 | text-transform: none !important; |
272 | -webkit-box-shadow: none !important; | 260 | -webkit-box-shadow: none !important; |
273 | box-shadow: none !important; | 261 | box-shadow: none !important; |
274 | } | 262 | } |
275 | .card-styles { | 263 | .card-styles { |
276 | background: #7f62f8 !important; | 264 | background: #7f62f8 !important; |
277 | border-color: #7f62f8 !important; | 265 | border-color: #7f62f8 !important; |
278 | } | 266 | } |
279 | .open-dialog-button { | 267 | .open-dialog-button { |
280 | background: #827bfa !important; | 268 | background: #827bfa !important; |
281 | border-color: #827bfa !important; | 269 | border-color: #827bfa !important; |
282 | text-transform: none !important; | 270 | text-transform: none !important; |
283 | } | 271 | } |
284 | table { | 272 | table { |
285 | border-collapse: collapse; | 273 | border-collapse: collapse; |
286 | border: 1px solid #e2e7eb; | 274 | border: 1px solid #e2e7eb; |
287 | } | 275 | } |
288 | th, | 276 | th, |
289 | td { | 277 | td { |
290 | border: 1px solid #e2e7eb; | 278 | border: 1px solid #e2e7eb; |
291 | text-align: center; | 279 | text-align: center; |
292 | } | 280 | } |
293 | table.feeTypeTable { | 281 | table.feeTypeTable { |
294 | table-layout: auto !important; | 282 | table-layout: auto !important; |
295 | width: 100% !important; | 283 | width: 100% !important; |
296 | } | 284 | } |
297 | .bg-sky { | 285 | .bg-sky { |
298 | background-color: #98b2cc !important; | 286 | background-color: #98b2cc !important; |
299 | } | 287 | } |
300 | .bg-sky-light { | 288 | .bg-sky-light { |
301 | background-color: #89a0b8; | 289 | background-color: #89a0b8; |
302 | } | 290 | } |
303 | .bg-purple { | 291 | .bg-purple { |
304 | background-color: #9583ac; | 292 | background-color: #9583ac; |
305 | } | 293 | } |
306 | .bg-skyDark { | 294 | .bg-skyDark { |
307 | background-color: #956785; | 295 | background-color: #956785; |
308 | } | 296 | } |
309 | .loader { | 297 | .loader { |
310 | width: 100%; | 298 | width: 100%; |
311 | height: 100%; | 299 | height: 100%; |
312 | position: fixed; | 300 | position: fixed; |
313 | top: 0; | 301 | top: 0; |
314 | left: 0; | 302 | left: 0; |
315 | text-align: center; | 303 | text-align: center; |
316 | background-color: rgba(0, 0, 0, 0.5); | 304 | background-color: rgba(0, 0, 0, 0.5); |
317 | z-index: 999; | 305 | z-index: 999; |
318 | } | 306 | } |
319 | 307 | ||
320 | .loader > div { | 308 | .loader > div { |
321 | position: relative; | 309 | position: relative; |
322 | top: calc(50% - 16px); | 310 | top: calc(50% - 16px); |
323 | } | 311 | } |
324 | @media screen and (max-width: 380px) { | 312 | @media screen and (max-width: 380px) { |
325 | .tableRsponsive { | 313 | .tableRsponsive { |
326 | /* display: block; */ | 314 | /* display: block; */ |
327 | position: relative; | 315 | position: relative; |
328 | overflow: scroll; | 316 | overflow: scroll; |
329 | } | 317 | } |
330 | } | 318 | } |
331 | </style> | 319 | </style> |
332 | 320 | ||
333 | 321 | ||
334 | 322 | ||
335 | 323 | ||
336 | 324 | ||
337 | 325 |
src/pages/Report/progressCardReport.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** Progress Card Report Table****** --> | 3 | <!-- ****** Progress Card Report Table****** --> |
4 | <v-card flat class="elevation-0 transparent"> | 4 | <v-card flat class="elevation-0 transparent"> |
5 | <v-form ref="form" v-model="valid" lazy-validation> | 5 | <v-form ref="form" v-model="valid" lazy-validation> |
6 | <v-flex xs12 sm12 lg12> | 6 | <v-flex xs12 sm12 lg12> |
7 | <v-layout wrap> | 7 | <v-layout wrap> |
8 | <v-flex xs12 sm12 lg3> | 8 | <v-flex xs12 sm12 lg3> |
9 | <v-layout> | 9 | <v-layout> |
10 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> | 10 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> |
11 | <label class="right">Class:</label> | 11 | <label class="right">Class:</label> |
12 | </v-flex> | 12 | </v-flex> |
13 | <v-flex xs9 sm6 lg8 class="ml-2"> | 13 | <v-flex xs9 sm6 lg8 class="ml-2"> |
14 | <v-select | 14 | <v-select |
15 | v-model="getReport.classId" | 15 | v-model="getReport.classId" |
16 | label="Select your class" | 16 | label="Select your class" |
17 | type="text" | 17 | type="text" |
18 | :items="classList" | 18 | :items="classList" |
19 | item-text="classNum" | 19 | item-text="classNum" |
20 | item-value="_id" | 20 | item-value="_id" |
21 | :rules="classRules" | 21 | :rules="classRules" |
22 | @change="getSections(getReport.classId)" | 22 | @change="getSections(getReport.classId)" |
23 | required | 23 | required |
24 | ></v-select> | 24 | ></v-select> |
25 | </v-flex> | 25 | </v-flex> |
26 | </v-layout> | 26 | </v-layout> |
27 | </v-flex> | 27 | </v-flex> |
28 | <v-flex xs12 sm12 lg3> | 28 | <v-flex xs12 sm12 lg3> |
29 | <v-layout> | 29 | <v-layout> |
30 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> | 30 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> |
31 | <label class="right">Section:</label> | 31 | <label class="right">Section:</label> |
32 | </v-flex> | 32 | </v-flex> |
33 | <v-flex xs9 sm6 lg8 class="ml-2"> | 33 | <v-flex xs9 sm6 lg8 class="ml-2"> |
34 | <v-select | 34 | <v-select |
35 | :items="addSection" | 35 | :items="addSection" |
36 | label="Select your Section" | 36 | label="Select your Section" |
37 | v-model="getReport.sectionId" | 37 | v-model="getReport.sectionId" |
38 | item-text="name" | 38 | item-text="name" |
39 | item-value="_id" | 39 | item-value="_id" |
40 | name="Select Section" | 40 | name="Select Section" |
41 | @change="getStudents" | 41 | @change="getStudents" |
42 | :rules="sectionRules" | 42 | :rules="sectionRules" |
43 | required | 43 | required |
44 | ></v-select> | 44 | ></v-select> |
45 | </v-flex> | 45 | </v-flex> |
46 | </v-layout> | 46 | </v-layout> |
47 | </v-flex> | 47 | </v-flex> |
48 | <v-flex xs12 sm12 lg3> | 48 | <v-flex xs12 sm12 lg3> |
49 | <v-layout> | 49 | <v-layout> |
50 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> | 50 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> |
51 | <label class="right">Student:</label> | 51 | <label class="right">Student:</label> |
52 | </v-flex> | 52 | </v-flex> |
53 | <v-flex xs9 sm6 lg8 class="ml-2"> | 53 | <v-flex xs9 sm6 lg8 class="ml-2"> |
54 | <v-select | 54 | <v-select |
55 | :items="getStudentsList" | 55 | :items="getStudentsList" |
56 | label="Select your student" | 56 | label="Select your student" |
57 | v-model="getReport.studentId" | 57 | v-model="getReport.studentId" |
58 | item-text="name" | 58 | item-text="name" |
59 | item-value="_id" | 59 | item-value="_id" |
60 | :rules="studentRules" | 60 | :rules="studentRules" |
61 | required | 61 | required |
62 | ></v-select> | 62 | ></v-select> |
63 | </v-flex> | 63 | </v-flex> |
64 | </v-layout> | 64 | </v-layout> |
65 | </v-flex> | 65 | </v-flex> |
66 | <v-flex xs12 sm12 lg3 class="hidden-xs-only hidden-sm-only pl-5"> | 66 | <v-flex xs12 sm12 lg3 class="hidden-xs-only hidden-sm-only pl-5"> |
67 | <v-btn | 67 | <v-btn |
68 | @click="getMarkReportList" | 68 | @click="getMarkReportList" |
69 | round | 69 | round |
70 | dark | 70 | dark |
71 | :loading="loading" | 71 | :loading="loading" |
72 | class="open-dialog-button mt-3 ml-5" | 72 | class="open-dialog-button mt-3 ml-5" |
73 | >Get Report</v-btn> | 73 | >Get Report</v-btn> |
74 | </v-flex> | 74 | </v-flex> |
75 | </v-layout> | 75 | </v-layout> |
76 | </v-flex> | 76 | </v-flex> |
77 | </v-form> | 77 | </v-form> |
78 | </v-card> | 78 | </v-card> |
79 | <v-layout v-show="showReport"> | 79 | <v-layout v-show="showReport"> |
80 | <v-flex xs12> | 80 | <v-flex xs12> |
81 | <v-card class="transparent elevation-0"> | 81 | <v-card class="transparent elevation-0"> |
82 | <v-layout> | 82 | <v-layout> |
83 | <v-flex xs12> | 83 | <v-flex xs12> |
84 | <v-btn class="open-dialog-button right" round dark @click="printProgressReport()"> | 84 | <v-btn class="open-dialog-button right" round dark @click="printProgressReport()"> |
85 | 85 | ||
86 | <v-icon right dark>print</v-icon> | 86 | <v-icon right dark>print</v-icon> |
87 | </v-btn> | 87 | </v-btn> |
88 | </v-flex> | 88 | </v-flex> |
89 | </v-layout> | 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 | <v-container grid-list-md v-show="showReport"> | 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 | |||
106 | <v-icon right dark>print</v-icon> | ||
107 | </v-btn> | ||
108 | </v-flex> | ||
109 | </v-layout>--> | ||
110 | <v-flex xs12 sm12 id="printMe"> | 91 | <v-flex xs12 sm12 id="printMe"> |
111 | <v-layout wrap> | 92 | <v-layout wrap> |
112 | <!-- ****** TABLE DATA MARK ****** --> | 93 | <!-- ****** TABLE DATA MARK ****** --> |
113 | <v-flex xs12 sm12 md12> | 94 | <v-flex xs12 sm12 md12> |
114 | <v-card | 95 | <v-card |
115 | v-for="(value, id, index) in filterData" | 96 | v-for="(value, id, index) in filterData" |
116 | :key="index" | 97 | :key="index" |
117 | flat | 98 | flat |
118 | style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px" | 99 | style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px" |
119 | > | 100 | > |
120 | <v-layout style="padding-top:10px" v-if="index === 0"> | 101 | <v-layout> |
121 | <v-flex xs5> | 102 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
122 | <p | 103 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> |
123 | style="font-size:20px;margin:0px;margin-bottom:4px;" | 104 | <p class="title">{{ userData.name }}</p> |
124 | >{{ value[0].studentId.name }}</p> | 105 | <p>{{ userData.address }}</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> | ||
134 | </v-flex> | 106 | </v-flex> |
135 | <v-flex xs2> | 107 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
136 | <v-avatar size="100"> | 108 | <v-avatar size="100"> |
137 | <img | 109 | <img :src="value[0].studentId.profilePicUrl" v-if="value[0].studentId.profilePicUrl" width="100px" /> |
138 | :src="value[0].studentId.profilePicUrl" | 110 | <img src="/static/icon/user.png" v-else-if="!value[0].studentId.profilePicUrl" width="100px" /> |
139 | v-if="value[0].studentId.profilePicUrl" | 111 | </v-avatar> |
140 | width="100px" | 112 | <p |
141 | /> | 113 | style="font-size:20px;margin:0px;margin-bottom:4px;" |
142 | <img | 114 | >{{ value[0].studentId.name }}</p> |
143 | src="/static/icon/user.png" | 115 | <p |
144 | v-else-if="!value[0].studentId.profilePicUrl" | 116 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" |
145 | width="100px" | 117 | >Class : {{ value[0].classId.classNum }}</p> |
146 | /> | 118 | <p |
147 | </v-avatar> | 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 | </v-flex> | 124 | </v-flex> |
149 | </v-layout> | 125 | </v-layout> |
150 | <v-card-title class="subheading">{{value[0].examId.examName}}</v-card-title> | 126 | <v-card-title class="subheading">{{value[0].examId.examName}}</v-card-title> |
151 | <table | 127 | <table |
152 | class="mb-5 tableRsponsive feeTypeTable" | 128 | class="mb-5 tableRsponsive feeTypeTable" |
153 | style="border: 1px solid lightgrey; | 129 | style="border: 1px solid lightgrey; |
154 | border-collapse: collapse;!important | 130 | border-collapse: collapse;!important |
155 | table-layout: auto !important; | 131 | table-layout: auto !important; |
156 | width: 100% !important; | 132 | width: 100% !important; |
157 | overflow: hidden; | 133 | overflow: hidden; |
158 | display: block;" | 134 | display: block;" |
159 | > | 135 | > |
160 | <thead style="border: 1px solid lightgrey !important;"> | 136 | <thead style="border: 1px solid lightgrey !important;"> |
161 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> | 137 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> |
162 | <td | 138 | <td |
163 | rowspan="2" | 139 | rowspan="2" |
164 | style="border: 1px solid lightgrey !important;padding: 10px;" | 140 | style="border: 1px solid lightgrey !important;padding: 10px;" |
165 | >Subject</td> | 141 | >Subject</td> |
166 | <td | 142 | <td |
167 | v-for="(exam,i) in value[index].studentsMarks" | 143 | v-for="(exam,i) in value[index].studentsMarks" |
168 | colspan="2" | 144 | colspan="2" |
169 | style="border: 1px solid lightgrey !important;padding: 10px;" | 145 | style="border: 1px solid lightgrey !important;padding: 10px;" |
170 | >{{ exam.markDistributionId.distributionType }}</td> | 146 | >{{ exam.markDistributionId.distributionType }}</td> |
171 | <template v-for="studentData in value"> | 147 | <template v-for="studentData in value"> |
172 | <td | 148 | <td |
173 | colspan="2" | 149 | colspan="2" |
174 | v-for="studentMark in studentData.studentsMarks" | 150 | v-for="studentMark in studentData.studentsMarks" |
175 | >{{ studentMark.markDistributionId.distributionType }}</td> | 151 | >{{ studentMark.markDistributionId.distributionType }}</td> |
176 | </template> | 152 | </template> |
177 | <td>{{value[0].studentsMarks[1].markDistributionId.distributionType}}</td> | 153 | <td>{{value[0].studentsMarks[1].markDistributionId.distributionType}}</td> |
178 | 154 | ||
179 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Total</td> | 155 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Total</td> |
180 | </tr> | 156 | </tr> |
181 | <tr | 157 | <tr |
182 | v-for="(subject, ind) in value" | 158 | v-for="(subject, ind) in value" |
183 | v-if="ind == 0" | 159 | v-if="ind == 0" |
184 | style="border: 1px solid lightgrey !important;" | 160 | style="border: 1px solid lightgrey !important;" |
185 | > | 161 | > |
186 | <template v-for="(exam, i) in subject.studentsMarks"> | 162 | <template v-for="(exam, i) in subject.studentsMarks"> |
187 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> | 163 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> |
188 | <td | 164 | <td |
189 | style="border: 1px solid lightgrey !important;padding: 10px;" | 165 | style="border: 1px solid lightgrey !important;padding: 10px;" |
190 | >Highest Mark</td> | 166 | >Highest Mark</td> |
191 | </template> | 167 | </template> |
192 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> | 168 | <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> |
193 | </tr> | 169 | </tr> |
194 | </thead> | 170 | </thead> |
195 | <tbody style="border: 1px solid lightgrey !important;"> | 171 | <tbody style="border: 1px solid lightgrey !important;"> |
196 | <tr | 172 | <tr |
197 | v-for="subject in value" | 173 | v-for="subject in value" |
198 | style="border: 1px solid lightgrey !important;" | 174 | style="border: 1px solid lightgrey !important;" |
199 | > | 175 | > |
200 | <td | 176 | <td |
201 | style="border: 1px solid lightgrey !important;padding: 10px;" | 177 | style="border: 1px solid lightgrey !important;padding: 10px;" |
202 | >{{subject.subjectName}}</td> | 178 | >{{subject.subjectName}}</td> |
203 | <template v-for="(exam, i) in subject.studentsMarks"> | 179 | <template v-for="(exam, i) in subject.studentsMarks"> |
204 | <td | 180 | <td |
205 | style="border: 1px solid lightgrey !important;padding: 10px;" | 181 | style="border: 1px solid lightgrey !important;padding: 10px;" |
206 | >{{exam.marksScored}}</td> | 182 | >{{exam.marksScored}}</td> |
207 | <td | 183 | <td |
208 | style="border: 1px solid lightgrey !important;padding: 10px;" | 184 | style="border: 1px solid lightgrey !important;padding: 10px;" |
209 | >{{exam.markDistributionId.markValue}}</td> | 185 | >{{exam.markDistributionId.markValue}}</td> |
210 | </template> | 186 | </template> |
211 | <td | 187 | <td |
212 | style="border: 1px solid lightgrey !important;padding: 10px;" | 188 | style="border: 1px solid lightgrey !important;padding: 10px;" |
213 | >{{subject.totalMarks}}</td> | 189 | >{{subject.totalMarks}}</td> |
214 | </tr> | 190 | </tr> |
215 | </tbody> | 191 | </tbody> |
216 | <!-- <tfoot> | 192 | <!-- <tfoot> |
217 | <tr> | 193 | <tr> |
218 | <td colspan="4"> | 194 | <td colspan="4"> |
219 | <span class="right subheding">Total Amount (RS) :</span> | 195 | <span class="right subheding">Total Amount (RS) :</span> |
220 | </td> | 196 | </td> |
221 | <td>{{ feeType.subTotal }}</td> | 197 | <td>{{ feeType.subTotal }}</td> |
222 | </tr> | 198 | </tr> |
223 | <tr> | 199 | <tr> |
224 | <td colspan="4"> | 200 | <td colspan="4"> |
225 | <span class="right subheding">Paid (RS) :</span> | 201 | <span class="right subheding">Paid (RS) :</span> |
226 | </td> | 202 | </td> |
227 | <td>{{ feeType.totalPaidAmount ? feeType.totalPaidAmount : 0 }}</td> | 203 | <td>{{ feeType.totalPaidAmount ? feeType.totalPaidAmount : 0 }}</td> |
228 | </tr> | 204 | </tr> |
229 | <tr> | 205 | <tr> |
230 | <td colspan="4"> | 206 | <td colspan="4"> |
231 | <span class="right subheding">Balance (RS) :</span> | 207 | <span class="right subheding">Balance (RS) :</span> |
232 | </td> | 208 | </td> |
233 | <td>{{ feeType.totalPaidAmount ? feeType.subTotal - feeType.totalPaidAmount : feeType.subTotal }}</td> | 209 | <td>{{ feeType.totalPaidAmount ? feeType.subTotal - feeType.totalPaidAmount : feeType.subTotal }}</td> |
234 | </tr> | 210 | </tr> |
235 | </tfoot>--> | 211 | </tfoot>--> |
236 | </table> | 212 | </table> |
237 | </v-card> | 213 | </v-card> |
238 | </v-flex> | 214 | </v-flex> |
239 | </v-layout> | 215 | </v-layout> |
240 | </v-flex> | 216 | </v-flex> |
241 | </v-container> | 217 | </v-container> |
242 | </v-card> | 218 | </v-card> |
243 | </v-flex> | 219 | </v-flex> |
244 | </v-layout> | 220 | </v-layout> |
245 | <div class="loader" v-if="showLoader"> | 221 | <div class="loader" v-if="showLoader"> |
246 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 222 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
247 | </div> | 223 | </div> |
248 | </v-container> | 224 | </v-container> |
249 | </template> | 225 | </template> |
250 | 226 | ||
251 | <script> | 227 | <script> |
252 | import http from "@/Services/http.js"; | 228 | import http from "@/Services/http.js"; |
253 | import moment from "moment"; | 229 | import moment from "moment"; |
254 | import _ from "underscore"; | 230 | import _ from "underscore"; |
255 | 231 | ||
256 | export default { | 232 | export default { |
257 | data: () => ({ | 233 | data: () => ({ |
258 | showLoader: false, | 234 | showLoader: false, |
259 | markData: [], | 235 | markData: [], |
260 | token: "", | 236 | token: "", |
261 | markDistributions: [], | 237 | markDistributions: [], |
262 | markParticularDistributionData: [], | 238 | markParticularDistributionData: [], |
263 | loading: false, | 239 | loading: false, |
264 | valid: true, | 240 | valid: true, |
265 | loading: false, | 241 | loading: false, |
266 | showReport: false, | 242 | showReport: false, |
267 | addSection: [], | 243 | addSection: [], |
268 | filterData: [], | 244 | filterData: [], |
269 | getStudentsList: [], | 245 | getStudentsList: [], |
270 | classRules: [v => !!v || "Class is required"], | 246 | classRules: [v => !!v || "Class is required"], |
271 | sectionRules: [v => !!v || "Class is required"], | 247 | sectionRules: [v => !!v || "Class is required"], |
272 | studentRules: [v => !!v || "Student is required"], | 248 | studentRules: [v => !!v || "Student is required"], |
273 | getReport: {}, | 249 | getReport: {}, |
274 | classList: [], | 250 | classList: [], |
275 | output: null, | 251 | output: null, |
276 | userData: {} | 252 | userData: {} |
277 | }), | 253 | }), |
278 | mounted() { | 254 | mounted() { |
279 | this.token = this.$store.state.token; | 255 | this.token = this.$store.state.token; |
280 | this.getClass(); | 256 | this.getClass(); |
281 | this.getUserData(); | 257 | this.getUserData(); |
282 | }, | 258 | }, |
283 | methods: { | 259 | methods: { |
284 | clear() { | 260 | clear() { |
285 | this.$refs.form.reset(); | 261 | this.$refs.form.reset(); |
286 | }, | 262 | }, |
287 | getClass() { | 263 | getClass() { |
288 | this.showLoader = true; | 264 | this.showLoader = true; |
289 | http() | 265 | http() |
290 | .get("/getClassesList", { | 266 | .get("/getClassesList", { |
291 | headers: { Authorization: "Bearer " + this.token } | 267 | headers: { Authorization: "Bearer " + this.token } |
292 | }) | 268 | }) |
293 | .then(response => { | 269 | .then(response => { |
294 | this.classList = response.data.data; | 270 | this.classList = response.data.data; |
295 | this.showLoader = false; | 271 | this.showLoader = false; |
296 | }) | 272 | }) |
297 | .catch(error => { | 273 | .catch(error => { |
298 | this.showLoader = false; | 274 | this.showLoader = false; |
299 | // console.log("err====>", err); | 275 | // console.log("err====>", err); |
300 | }); | 276 | }); |
301 | }, | 277 | }, |
302 | getSections(_id) { | 278 | getSections(_id) { |
303 | this.showLoader = true; | 279 | this.showLoader = true; |
304 | http() | 280 | http() |
305 | .get( | 281 | .get( |
306 | "/getSectionsList", | 282 | "/getSectionsList", |
307 | { params: { classId: _id } }, | 283 | { params: { classId: _id } }, |
308 | { | 284 | { |
309 | headers: { Authorization: "Bearer " + this.token } | 285 | headers: { Authorization: "Bearer " + this.token } |
310 | } | 286 | } |
311 | ) | 287 | ) |
312 | .then(response => { | 288 | .then(response => { |
313 | this.addSection = response.data.data; | 289 | this.addSection = response.data.data; |
314 | this.showLoader = false; | 290 | this.showLoader = false; |
315 | }) | 291 | }) |
316 | .catch(err => { | 292 | .catch(err => { |
317 | this.showLoader = false; | 293 | this.showLoader = false; |
318 | // console.log("err====>", err); | 294 | // console.log("err====>", err); |
319 | }); | 295 | }); |
320 | }, | 296 | }, |
321 | getStudents() { | 297 | getStudents() { |
322 | this.showLoader = true; | 298 | this.showLoader = true; |
323 | http() | 299 | http() |
324 | .get("/getStudentWithClass", { | 300 | .get("/getStudentWithClass", { |
325 | params: { | 301 | params: { |
326 | classId: this.getReport.classId, | 302 | classId: this.getReport.classId, |
327 | sectionId: this.getReport.sectionId | 303 | sectionId: this.getReport.sectionId |
328 | } | 304 | } |
329 | }) | 305 | }) |
330 | .then(response => { | 306 | .then(response => { |
331 | this.getStudentsList = response.data.data; | 307 | this.getStudentsList = response.data.data; |
332 | this.showLoader = false; | 308 | this.showLoader = false; |
333 | // console.log("getSectionsList=====>", response.data.data); | 309 | // console.log("getSectionsList=====>", response.data.data); |
334 | }) | 310 | }) |
335 | .catch(error => { | 311 | .catch(error => { |
336 | console.log("err====>", error); | 312 | console.log("err====>", error); |
337 | this.showLoader = false; | 313 | this.showLoader = false; |
338 | }); | 314 | }); |
339 | }, | 315 | }, |
340 | getMarkReportList() { | 316 | getMarkReportList() { |
341 | // this.showLoader = true; | 317 | // this.showLoader = true; |
342 | this.showReport = true; | 318 | this.showReport = true; |
343 | http() | 319 | http() |
344 | .get("/getParticularMark", { | 320 | .get("/getParticularMark", { |
345 | params: { studentId: this.getReport.studentId }, | 321 | params: { studentId: this.getReport.studentId }, |
346 | headers: { Authorization: "Bearer " + this.token } | 322 | headers: { Authorization: "Bearer " + this.token } |
347 | }) | 323 | }) |
348 | .then(response => { | 324 | .then(response => { |
349 | this.showLoader = false; | 325 | this.showLoader = false; |
350 | let newData = response.data.data; | 326 | let newData = response.data.data; |
351 | // console.log("response", newData); | 327 | // console.log("response", newData); |
352 | for (var i = 0; i < newData.length; i++) { | 328 | for (var i = 0; i < newData.length; i++) { |
353 | newData[i].examination = newData[i].examId._id; | 329 | newData[i].examination = newData[i].examId._id; |
354 | // console.log("newData[i].examination", newData[i].examination); | 330 | // console.log("newData[i].examination", newData[i].examination); |
355 | } | 331 | } |
356 | this.filterData = _.groupBy(newData, ["examination"]); | 332 | this.filterData = _.groupBy(newData, ["examination"]); |
357 | for (let data in this.filterData) { | 333 | for (let data in this.filterData) { |
358 | // console.log("data+++++++++++++++++++++++++++++++++++", data); | 334 | // console.log("data+++++++++++++++++++++++++++++++++++", data); |
359 | 335 | ||
360 | for (let item in this.filterData[data]) { | 336 | for (let item in this.filterData[data]) { |
361 | // console.log( | 337 | // console.log( |
362 | // "filterData[data]==========================>", | 338 | // "filterData[data]==========================>", |
363 | // this.filterData[data] | 339 | // this.filterData[data] |
364 | // ); | 340 | // ); |
365 | // console.log("filterData[item]==========================>", item); | 341 | // console.log("filterData[item]==========================>", item); |
366 | var totalMarks = 0; | 342 | var totalMarks = 0; |
367 | for ( | 343 | for ( |
368 | let i = 0; | 344 | let i = 0; |
369 | i < this.filterData[data][item].studentsMarks.length; | 345 | i < this.filterData[data][item].studentsMarks.length; |
370 | i++ | 346 | i++ |
371 | ) { | 347 | ) { |
372 | totalMarks += this.filterData[data][item].studentsMarks[i] | 348 | totalMarks += this.filterData[data][item].studentsMarks[i] |
373 | .marksScored; | 349 | .marksScored; |
374 | } | 350 | } |
375 | this.filterData[data][item].totalMarks = totalMarks; | 351 | this.filterData[data][item].totalMarks = totalMarks; |
376 | // var total = 0; | 352 | // var total = 0; |
377 | // total += this.filterData[data][item].totalMarks ; | 353 | // total += this.filterData[data][item].totalMarks ; |
378 | // console.log("total", total); | 354 | // console.log("total", total); |
379 | } | 355 | } |
380 | } | 356 | } |
381 | }) | 357 | }) |
382 | .catch(error => { | 358 | .catch(error => { |
383 | // console.log("err====>", err); | 359 | // console.log("err====>", err); |
384 | this.showLoader = false; | 360 | this.showLoader = false; |
385 | this.snackbar = true; | 361 | this.snackbar = true; |
386 | this.text = error.response.data.message; | 362 | this.text = error.response.data.message; |
387 | if (error.response.status === 401) { | 363 | if (error.response.status === 401) { |
388 | this.$router.replace({ path: "/" }); | 364 | this.$router.replace({ path: "/" }); |
389 | this.$store.dispatch("setToken", null); | 365 | this.$store.dispatch("setToken", null); |
390 | this.$store.dispatch("Id", null); | 366 | this.$store.dispatch("Id", null); |
391 | } | 367 | } |
392 | }); | 368 | }); |
393 | }, | 369 | }, |
394 | printProgressReport() { | 370 | printProgressReport() { |
395 | // Pass the element id here | 371 | // Pass the element id here |
396 | this.$htmlToPaper("printMe"); | 372 | this.$htmlToPaper("printMe"); |
397 | }, | 373 | }, |
398 | getUserData() { | 374 | getUserData() { |
399 | http() | 375 | http() |
400 | .get("/getParticularUserDetail") | 376 | .get("/getParticularUserDetail") |
401 | .then(response => { | 377 | .then(response => { |
402 | this.userData = response.data.data; | 378 | this.userData = response.data.data; |
403 | }) | 379 | }) |
404 | .catch(error => { | 380 | .catch(error => { |
405 | if (error.response.status === 401) { | 381 | // if (error.response.status === 401) { |
406 | this.$router.replace({ path: "/" }); | 382 | // this.$router.replace({ path: "/" }); |
407 | this.$store.dispatch("setToken", null); | 383 | // this.$store.dispatch("setToken", null); |
408 | this.$store.dispatch("Id", null); | 384 | // this.$store.dispatch("Id", null); |
409 | } | 385 | // } |
410 | }); | 386 | }); |
411 | } | 387 | } |
412 | } | 388 | } |
413 | }; | 389 | }; |
414 | </script> | 390 | </script> |
415 | 391 | ||
416 | <style scoped> | 392 | <style scoped> |
417 | table { | 393 | table { |
418 | border-collapse: collapse; | 394 | border-collapse: collapse; |
419 | border: 1px solid #e2e7eb; | 395 | border: 1px solid #e2e7eb; |
420 | } | 396 | } |
421 | 397 | ||
422 | th, | 398 | th, |
423 | td { | 399 | td { |
424 | border: 1px solid #e2e7eb; | 400 | border: 1px solid #e2e7eb; |
425 | padding: 10px; | 401 | padding: 10px; |
426 | text-align: center; | 402 | text-align: center; |
427 | } | 403 | } |
428 | table.feeTypeTable { | 404 | table.feeTypeTable { |
429 | table-layout: auto !important; | 405 | table-layout: auto !important; |
430 | width: 100% !important; | 406 | width: 100% !important; |
431 | } | 407 | } |
432 | .bg-sky { | 408 | .bg-sky { |
433 | background-color: #98b2cc !important; | 409 | background-color: #98b2cc !important; |
434 | } | 410 | } |
435 | .bg-sky-light { | 411 | .bg-sky-light { |
436 | background-color: #89a0b8; | 412 | background-color: #89a0b8; |
437 | } | 413 | } |
438 | .bg-purple { | 414 | .bg-purple { |
439 | background-color: #9583ac; | 415 | background-color: #9583ac; |
440 | } | 416 | } |
441 | .bg-skyDark { | 417 | .bg-skyDark { |
442 | background-color: #956785; | 418 | background-color: #956785; |
443 | } | 419 | } |
444 | @media screen and (max-width: 380px) { | 420 | @media screen and (max-width: 380px) { |
445 | .tableRsponsive { | 421 | .tableRsponsive { |
446 | /* display: block; */ | 422 | /* display: block; */ |
447 | position: relative; | 423 | position: relative; |
src/pages/Report/studentReport.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** Student Report TABLE****** --> | 3 | <!-- ****** Student Report TABLE****** --> |
4 | <v-card flat class="elevation-0 transparent"> | 4 | <v-card flat class="elevation-0 transparent"> |
5 | <v-form ref="form" v-model="valid" lazy-validation> | 5 | <v-form ref="form" v-model="valid" lazy-validation> |
6 | <v-flex xs12 sm12 lg12> | 6 | <v-flex xs12 sm12 lg12> |
7 | <v-layout wrap> | 7 | <v-layout wrap> |
8 | <v-flex xs12 sm12 lg4> | 8 | <v-flex xs12 sm12 lg4> |
9 | <v-layout> | 9 | <v-layout> |
10 | <v-flex xs4 sm4 lg3 class="subheading mt-4"> | 10 | <v-flex xs4 sm4 lg3 class="subheading mt-4"> |
11 | <label class="right">Report For :</label> | 11 | <label class="right">Report For :</label> |
12 | </v-flex> | 12 | </v-flex> |
13 | <v-flex xs7 sm6 lg8 class="ml-2"> | 13 | <v-flex xs7 sm6 lg8 class="ml-2"> |
14 | <v-autocomplete | 14 | <v-autocomplete |
15 | v-model="report.form" | 15 | v-model="report.form" |
16 | label="Select your report for" | 16 | label="Select your report for" |
17 | :items="formList" | 17 | :items="formList" |
18 | item-text="name" | 18 | item-text="name" |
19 | item-value="value" | 19 | item-value="value" |
20 | @change="getReport(report.form)" | 20 | @change="getReport(report.form)" |
21 | :rules="formRules" | 21 | :rules="formRules" |
22 | required | 22 | required |
23 | ></v-autocomplete> | 23 | ></v-autocomplete> |
24 | </v-flex> | 24 | </v-flex> |
25 | </v-layout> | 25 | </v-layout> |
26 | </v-flex> | 26 | </v-flex> |
27 | <v-flex xs12 sm12 lg4 v-if="bloodGroup"> | 27 | <v-flex xs12 sm12 lg4 v-if="bloodGroup"> |
28 | <v-layout> | 28 | <v-layout> |
29 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> | 29 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> |
30 | <label class="right">Blood Group :</label> | 30 | <label class="right">Blood Group :</label> |
31 | </v-flex> | 31 | </v-flex> |
32 | <v-flex xs7 sm6 lg8 class="ml-2"> | 32 | <v-flex xs7 sm6 lg8 class="ml-2"> |
33 | <v-autocomplete | 33 | <v-autocomplete |
34 | v-model="report.bloodGroup" | 34 | v-model="report.bloodGroup" |
35 | label="Select your Blood Group " | 35 | label="Select your Blood Group " |
36 | :items="bloodGroupList" | 36 | :items="bloodGroupList" |
37 | :rules="bloodGroupRules" | 37 | :rules="bloodGroupRules" |
38 | required | 38 | required |
39 | ></v-autocomplete> | 39 | ></v-autocomplete> |
40 | </v-flex> | 40 | </v-flex> |
41 | </v-layout> | 41 | </v-layout> |
42 | </v-flex> | 42 | </v-flex> |
43 | <v-flex xs12 sm12 lg4 v-if="genderShow"> | 43 | <v-flex xs12 sm12 lg4 v-if="genderShow"> |
44 | <v-layout> | 44 | <v-layout> |
45 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> | 45 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> |
46 | <label class="right">Gender:</label> | 46 | <label class="right">Gender:</label> |
47 | </v-flex> | 47 | </v-flex> |
48 | <v-flex xs7 sm6 lg8 class="ml-2"> | 48 | <v-flex xs7 sm6 lg8 class="ml-2"> |
49 | <v-autocomplete | 49 | <v-autocomplete |
50 | v-model="report.gender" | 50 | v-model="report.gender" |
51 | label="Select your gender " | 51 | label="Select your gender " |
52 | :items="gender" | 52 | :items="gender" |
53 | :rules="genderRules" | 53 | :rules="genderRules" |
54 | required | 54 | required |
55 | ></v-autocomplete> | 55 | ></v-autocomplete> |
56 | </v-flex> | 56 | </v-flex> |
57 | </v-layout> | 57 | </v-layout> |
58 | </v-flex> | 58 | </v-flex> |
59 | <v-flex xs12 sm12 lg4 v-if="TransportShow"> | 59 | <v-flex xs12 sm12 lg4 v-if="TransportShow"> |
60 | <v-layout> | 60 | <v-layout> |
61 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> | 61 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> |
62 | <label class="right">Route:</label> | 62 | <label class="right">Route:</label> |
63 | </v-flex> | 63 | </v-flex> |
64 | <v-flex xs7 sm6 lg8 class="ml-2"> | 64 | <v-flex xs7 sm6 lg8 class="ml-2"> |
65 | <v-autocomplete | 65 | <v-autocomplete |
66 | v-model="report.route" | 66 | v-model="report.route" |
67 | label="Select your gender " | 67 | label="Select your gender " |
68 | :items="route" | 68 | :items="route" |
69 | :rules="routeRules" | 69 | :rules="routeRules" |
70 | required | 70 | required |
71 | ></v-autocomplete> | 71 | ></v-autocomplete> |
72 | </v-flex> | 72 | </v-flex> |
73 | </v-layout> | 73 | </v-layout> |
74 | </v-flex> | 74 | </v-flex> |
75 | <v-flex xs12 sm12 lg4 v-if="HostelShow"> | 75 | <v-flex xs12 sm12 lg4 v-if="HostelShow"> |
76 | <v-layout> | 76 | <v-layout> |
77 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> | 77 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> |
78 | <label class="right">Hostel:</label> | 78 | <label class="right">Hostel:</label> |
79 | </v-flex> | 79 | </v-flex> |
80 | <v-flex xs7 sm6 lg8 class="ml-2"> | 80 | <v-flex xs7 sm6 lg8 class="ml-2"> |
81 | <v-autocomplete | 81 | <v-autocomplete |
82 | v-model="report.route" | 82 | v-model="report.route" |
83 | label="Select your hostel " | 83 | label="Select your hostel " |
84 | :items="hostelList" | 84 | :items="hostelList" |
85 | :rules="hostelRules" | 85 | :rules="hostelRules" |
86 | required | 86 | required |
87 | ></v-autocomplete> | 87 | ></v-autocomplete> |
88 | </v-flex> | 88 | </v-flex> |
89 | </v-layout> | 89 | </v-layout> |
90 | </v-flex> | 90 | </v-flex> |
91 | <v-flex xs12 sm12 lg4 v-if="countryShow"> | 91 | <v-flex xs12 sm12 lg4 v-if="countryShow"> |
92 | <v-layout> | 92 | <v-layout> |
93 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> | 93 | <v-flex xs4 sm4 lg4 class="subheading mt-4"> |
94 | <label class="right">Country :</label> | 94 | <label class="right">Country :</label> |
95 | </v-flex> | 95 | </v-flex> |
96 | <v-flex xs7 sm6 lg8 class="ml-2"> | 96 | <v-flex xs7 sm6 lg8 class="ml-2"> |
97 | <v-autocomplete | 97 | <v-autocomplete |
98 | v-model="report.country" | 98 | v-model="report.country" |
99 | label="Select your Country " | 99 | label="Select your Country " |
100 | :items="countryList" | 100 | :items="countryList" |
101 | :rules="countryRules" | 101 | :rules="countryRules" |
102 | required | 102 | required |
103 | ></v-autocomplete> | 103 | ></v-autocomplete> |
104 | </v-flex> | 104 | </v-flex> |
105 | </v-layout> | 105 | </v-layout> |
106 | </v-flex> | 106 | </v-flex> |
107 | <!-- <v-flex xs12 sm12 lg4 v-show="BirthdayShow"> | 107 | <!-- <v-flex xs12 sm12 lg4 v-show="BirthdayShow"> |
108 | <v-layout> | 108 | <v-layout> |
109 | <v-flex xs3 sm6 lg4 class="subheading mt-4"> | 109 | <v-flex xs3 sm6 lg4 class="subheading mt-4"> |
110 | <label class="right">Country :</label> | 110 | <label class="right">Country :</label> |
111 | </v-flex> | 111 | </v-flex> |
112 | <v-flex xs12 sm12 lg8 class="ml-2"> | 112 | <v-flex xs12 sm12 lg8 class="ml-2"> |
113 | <v-select | 113 | <v-select |
114 | v-model="report.country" | 114 | v-model="report.country" |
115 | label="Select your Country " | 115 | label="Select your Country " |
116 | :items="countryList" | 116 | :items="countryList" |
117 | required | 117 | required |
118 | ></v-select> | 118 | ></v-select> |
119 | </v-flex> | 119 | </v-flex> |
120 | </v-layout> | 120 | </v-layout> |
121 | </v-flex>--> | 121 | </v-flex>--> |
122 | <v-flex xs12 sm12 lg4 v-if="classShow"> | 122 | <v-flex xs12 sm12 lg4 v-if="classShow"> |
123 | <v-layout> | 123 | <v-layout> |
124 | <v-flex xs4 sm4 lg3 class="subheading mt-4"> | 124 | <v-flex xs4 sm4 lg3 class="subheading mt-4"> |
125 | <label class="right">Class:</label> | 125 | <label class="right">Class:</label> |
126 | </v-flex> | 126 | </v-flex> |
127 | <v-flex xs7 sm6 lg8 class="ml-2"> | 127 | <v-flex xs7 sm6 lg8 class="ml-2"> |
128 | <v-autocomplete | 128 | <v-autocomplete |
129 | v-model="report.classId" | 129 | v-model="report.classId" |
130 | label="Select your class" | 130 | label="Select your class" |
131 | type="text" | 131 | type="text" |
132 | :rules="classRules" | 132 | :rules="classRules" |
133 | :items="classList" | 133 | :items="classList" |
134 | item-text="classNum" | 134 | item-text="classNum" |
135 | item-value="_id" | 135 | item-value="_id" |
136 | @change="getSections(report.classId)" | 136 | @change="getSections(report.classId)" |
137 | required | 137 | required |
138 | ></v-autocomplete> | 138 | ></v-autocomplete> |
139 | </v-flex> | 139 | </v-flex> |
140 | </v-layout> | 140 | </v-layout> |
141 | </v-flex> | 141 | </v-flex> |
142 | <v-flex xs12 sm12 lg4 v-if="sectionShow"> | 142 | <v-flex xs12 sm12 lg4 v-if="sectionShow"> |
143 | <v-layout> | 143 | <v-layout> |
144 | <v-flex xs4 sm4 lg3 class="subheading mt-4"> | 144 | <v-flex xs4 sm4 lg3 class="subheading mt-4"> |
145 | <label class="right">Section:</label> | 145 | <label class="right">Section:</label> |
146 | </v-flex> | 146 | </v-flex> |
147 | <v-flex xs7 sm6 lg8 class="ml-2"> | 147 | <v-flex xs7 sm6 lg8 class="ml-2"> |
148 | <v-autocomplete | 148 | <v-autocomplete |
149 | :items="addSection" | 149 | :items="addSection" |
150 | label="Select your Section" | 150 | label="Select your Section" |
151 | v-model="report.sectionId" | 151 | v-model="report.sectionId" |
152 | :rules="sectionRules" | 152 | :rules="sectionRules" |
153 | item-text="name" | 153 | item-text="name" |
154 | item-value="_id" | 154 | item-value="_id" |
155 | name="Select Section" | 155 | name="Select Section" |
156 | required | 156 | required |
157 | ></v-autocomplete> | 157 | ></v-autocomplete> |
158 | </v-flex> | 158 | </v-flex> |
159 | </v-layout> | 159 | </v-layout> |
160 | </v-flex> | 160 | </v-flex> |
161 | <v-flex xs12 sm12 lg4 class="hidden-xs-only hidden-sm-only pl-5"> | 161 | <v-flex xs12 sm12 lg4 class="hidden-xs-only hidden-sm-only pl-5"> |
162 | <v-btn | 162 | <v-btn |
163 | @click="getStudents" | 163 | @click="getStudents" |
164 | round | 164 | round |
165 | dark | 165 | dark |
166 | :loading="loading" | 166 | :loading="loading" |
167 | class="open-dialog-button mt-3 ml-5" | 167 | class="open-dialog-button mt-3 ml-5" |
168 | >Get Report</v-btn> | 168 | >Get Report</v-btn> |
169 | </v-flex> | 169 | </v-flex> |
170 | <v-flex xs12 sm12 lg4 class="hidden-lg-only hidden-md-only hidden-xl-only"> | 170 | <v-flex xs12 sm12 lg4 class="hidden-lg-only hidden-md-only hidden-xl-only"> |
171 | <v-btn | 171 | <v-btn |
172 | @click="getStudents" | 172 | @click="getStudents" |
173 | round | 173 | round |
174 | dark | 174 | dark |
175 | :loading="loading" | 175 | :loading="loading" |
176 | class="mt-3 right" | 176 | class="mt-3 right" |
177 | >Get Report</v-btn> | 177 | >Get Report</v-btn> |
178 | </v-flex> | 178 | </v-flex> |
179 | </v-layout> | 179 | </v-layout> |
180 | </v-flex> | 180 | </v-flex> |
181 | </v-form> | 181 | </v-form> |
182 | </v-card> | 182 | </v-card> |
183 | <v-layout v-show="showTable"> | 183 | <v-layout v-show="showTable"> |
184 | <v-flex xs12> | 184 | <v-flex xs12> |
185 | <v-card class="transparent elevation-0"> | 185 | <v-card class="transparent elevation-0"> |
186 | <v-layout> | 186 | <v-layout> |
187 | <v-flex xs12> | 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 | ||
190 | <v-icon right dark>print</v-icon> | 190 | <v-icon right dark>print</v-icon> |
191 | </v-btn> | 191 | </v-btn> |
192 | </v-flex> | 192 | </v-flex> |
193 | </v-layout> | 193 | </v-layout> |
194 | <v-layout> | 194 | <v-layout> |
195 | <v-flex xs12 class="text-xs-center"> | 195 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
196 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> | 196 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> |
197 | <p class="title">{{ userData.name }}</p> | 197 | <p class="title">{{ userData.name }}</p> |
198 | <p>{{ userData.address }}</p> | 198 | <p>{{ userData.address }}</p> |
199 | </v-flex> | 199 | </v-flex> |
200 | <v-flex xs12 sm12 md12 class="text-xs-center"> | ||
201 | </v-flex> | ||
200 | </v-layout> | 202 | </v-layout> |
201 | <v-data-table | 203 | <v-data-table |
202 | :headers="headers" | 204 | :headers="headers" |
203 | :items="getStudentsReportList" | 205 | :items="getStudentsReportList" |
204 | :pagination.sync="pagination" | 206 | :pagination.sync="pagination" |
205 | :search="search" | 207 | :search="search" |
206 | > | 208 | > |
207 | <template slot="items" slot-scope="props"> | 209 | <template slot="items" slot-scope="props"> |
208 | <tr class="tr"> | 210 | <tr class="tr"> |
209 | <td class="td td-row">{{ props.index + 1}}</td> | 211 | <td class="td td-row">{{ props.index + 1}}</td> |
210 | <td id="td" class="text-xs-center"> | 212 | <td id="td" class="text-xs-center"> |
211 | <v-avatar> | 213 | <v-avatar> |
212 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> | 214 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> |
213 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> | 215 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> |
214 | </v-avatar> | 216 | </v-avatar> |
215 | </td> | 217 | </td> |
216 | <td class="td td-row text-xs-center">{{ props.item.name}}</td> | 218 | <td class="td td-row text-xs-center">{{ props.item.name}}</td> |
217 | <td class="td td-row text-xs-center">{{ props.item.rollNo }}</td> | 219 | <td class="td td-row text-xs-center">{{ props.item.rollNo }}</td> |
218 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> | 220 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> |
219 | <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> | 221 | <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> |
220 | <td class="td td-row text-xs-center">{{ props.item.sectionId.name }}</td> | 222 | <td class="td td-row text-xs-center">{{ props.item.sectionId.name }}</td> |
221 | </tr> | 223 | </tr> |
222 | </template> | 224 | </template> |
223 | <v-alert | 225 | <v-alert |
224 | slot="no-results" | 226 | slot="no-results" |
225 | :value="true" | 227 | :value="true" |
226 | color="error" | 228 | color="error" |
227 | icon="warning" | 229 | icon="warning" |
228 | >Your search for "{{ search }}" found no results.</v-alert> | 230 | >Your search for "{{ search }}" found no results.</v-alert> |
229 | </v-data-table> | 231 | </v-data-table> |
230 | </v-card> | 232 | </v-card> |
231 | <v-flex xs12 id="printMe" v-show="hidePrintStudentReport"> | 233 | <v-flex xs12 id="printMe" v-show="hidePrintStudentReport"> |
232 | <v-layout> | 234 | <v-layout> |
233 | <v-flex xs12 style="text-align:center;margin-bottom:10px"> | 235 | <v-flex xs12 style="text-align:center;margin-bottom:10px"> |
234 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> | 236 | <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> |
235 | <p class="title">{{ userData.name }}</p> | 237 | <p class="title">{{ userData.name }}</p> |
236 | <p>{{ userData.address }}</p> | 238 | <p>{{ userData.address }}</p> |
237 | </v-flex> | 239 | </v-flex> |
238 | </v-layout> | 240 | </v-layout> |
239 | <table | 241 | <table |
240 | class="mb-5 tableRsponsive feeTypeTable" | 242 | class="mb-5 tableRsponsive feeTypeTable" |
241 | style="border: 1px solid lightgrey; | 243 | style="border: 1px solid lightgrey; |
242 | border-collapse: collapse;!important | 244 | border-collapse: collapse;!important |
243 | table-layout: auto !important; | 245 | table-layout: auto !important; |
244 | width: 100% !important;" | 246 | width: 100% !important;" |
245 | > | 247 | > |
246 | <thead style="border: 1px solid lightgrey !important;"> | 248 | <thead style="border: 1px solid lightgrey !important;"> |
247 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> | 249 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> |
248 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Profile Pic</td> | 250 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Profile Pic</td> |
249 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Name</td> | 251 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Name</td> |
250 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Roll No</td> | 252 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Roll No</td> |
251 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Email</td> | 253 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Email</td> |
252 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Class</td> | 254 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Class</td> |
253 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Section</td> | 255 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Section</td> |
254 | </tr> | 256 | </tr> |
255 | </thead> | 257 | </thead> |
256 | <tbody style="border: 1px solid lightgrey !important;"> | 258 | <tbody style="border: 1px solid lightgrey !important;"> |
257 | <tr v-for="(studentReport,i) in getStudentsReportList" :key="i"> | 259 | <tr v-for="(studentReport,i) in getStudentsReportList" :key="i"> |
258 | <td style="border: 1px solid lightgrey !important;padding: 6px;"> | 260 | <td style="border: 1px solid lightgrey !important;padding: 6px;"> |
259 | <v-avatar> | 261 | <v-avatar> |
260 | <img :src="studentReport.profilePicUrl" v-if="studentReport.profilePicUrl" /> | 262 | <img :src="studentReport.profilePicUrl" v-if="studentReport.profilePicUrl" /> |
261 | <img src="/static/icon/user.png" v-else-if="!studentReport.profilePicUrl" /> | 263 | <img src="/static/icon/user.png" v-else-if="!studentReport.profilePicUrl" /> |
262 | </v-avatar> | 264 | </v-avatar> |
263 | </td> | 265 | </td> |
264 | <td | 266 | <td |
265 | style="border: 1px solid lightgrey !important;padding: 6px;" | 267 | style="border: 1px solid lightgrey !important;padding: 6px;" |
266 | >{{ studentReport.name }}</td> | 268 | >{{ studentReport.name }}</td> |
267 | <!-- <td | 269 | <!-- <td |
268 | style="border: 1px solid lightgrey !important;padding: 6px;" | 270 | style="border: 1px solid lightgrey !important;padding: 6px;" |
269 | >{{ studentReport.rollNo }}</td> --> | 271 | >{{ studentReport.rollNo }}</td>--> |
270 | <td | 272 | <td |
271 | style="border: 1px solid lightgrey !important;padding: 6px;" | 273 | style="border: 1px solid lightgrey !important;padding: 6px;" |
272 | >{{ studentReport.email }}</td> | 274 | >{{ studentReport.email }}</td> |
273 | <td | 275 | <td |
274 | style="border: 1px solid lightgrey !important;padding: 6px;" | 276 | style="border: 1px solid lightgrey !important;padding: 6px;" |
275 | >{{ studentReport.classId.classNum }}</td> | 277 | >{{ studentReport.classId.classNum }}</td> |
276 | <td | 278 | <td |
277 | style="border: 1px solid lightgrey !important;padding: 6px;" | 279 | style="border: 1px solid lightgrey !important;padding: 6px;" |
278 | >{{ studentReport.sectionId.name }}</td> | 280 | >{{ studentReport.sectionId.name }}</td> |
279 | </tr> | 281 | </tr> |
280 | </tbody> | 282 | </tbody> |
281 | </table> | 283 | </table> |
282 | </v-flex> | 284 | </v-flex> |
283 | </v-flex> | 285 | </v-flex> |
284 | </v-layout> | 286 | </v-layout> |
285 | <div class="loader" v-if="showLoader"> | 287 | <div class="loader" v-if="showLoader"> |
286 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 288 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
287 | </div> | 289 | </div> |
288 | </v-container> | 290 | </v-container> |
289 | </template> | 291 | </template> |
290 | 292 | ||
291 | <script> | 293 | <script> |
292 | import http from "@/Services/http.js"; | 294 | import http from "@/Services/http.js"; |
293 | import countryList from "@/script/country.js"; | 295 | import countryList from "@/script/country.js"; |
294 | 296 | ||
295 | import moment from "moment"; | 297 | import moment from "moment"; |
296 | 298 | ||
297 | export default { | 299 | export default { |
298 | data: () => ({ | 300 | data: () => ({ |
299 | snackbar: false, | 301 | snackbar: false, |
300 | color: "", | 302 | color: "", |
301 | y: "top", | 303 | y: "top", |
302 | x: "right", | 304 | x: "right", |
303 | mode: "", | 305 | mode: "", |
304 | timeout: 10000, | 306 | timeout: 10000, |
305 | text: "", | 307 | text: "", |
306 | loading: false, | 308 | loading: false, |
307 | valid: true, | 309 | valid: true, |
308 | search: "", | 310 | search: "", |
309 | showLoader: false, | 311 | showLoader: false, |
310 | bloodGroup: false, | 312 | bloodGroup: false, |
311 | genderShow: false, | 313 | genderShow: false, |
312 | countryShow: false, | 314 | countryShow: false, |
313 | TransportShow: false, | 315 | TransportShow: false, |
314 | HostelShow: false, | 316 | HostelShow: false, |
315 | BirthdayShow: false, | 317 | BirthdayShow: false, |
316 | sectionShow: false, | 318 | sectionShow: false, |
317 | showTable: false, | 319 | showTable: false, |
318 | classShow: true, | 320 | classShow: true, |
319 | hidePrintStudentReport: false, | 321 | hidePrintStudentReport: false, |
320 | addSection: [], | 322 | addSection: [], |
321 | pagination: { | 323 | pagination: { |
322 | rowsPerPage: 10 | 324 | rowsPerPage: 10 |
323 | }, | 325 | }, |
324 | formRules: [v => !!v || "Form For is required"], | 326 | formRules: [v => !!v || "Form For is required"], |
325 | bloodGroupRules: [v => !!v || "Blood group is required"], | 327 | bloodGroupRules: [v => !!v || "Blood group is required"], |
326 | classRules: [v => !!v || "Class is required"], | 328 | classRules: [v => !!v || "Class is required"], |
327 | sectionRules: [v => !!v || "Class is required"], | 329 | sectionRules: [v => !!v || "Class is required"], |
328 | genderRules: [v => !!v || "Gender is required"], | 330 | genderRules: [v => !!v || "Gender is required"], |
329 | routeRules: [v => !!v || "RouteI is required"], | 331 | routeRules: [v => !!v || "RouteI is required"], |
330 | hostelRules: [v => !!v || "Hostel is required"], | 332 | hostelRules: [v => !!v || "Hostel is required"], |
331 | countryRules: [v => !!v || "Country is required"], | 333 | countryRules: [v => !!v || "Country is required"], |
332 | headers: [ | 334 | headers: [ |
333 | { | 335 | { |
334 | align: "", | 336 | align: "", |
335 | text: "No", | 337 | text: "No", |
336 | sortable: false, | 338 | sortable: false, |
337 | value: "No" | 339 | value: "No" |
338 | }, | 340 | }, |
339 | { | 341 | { |
340 | text: "Profile Pic", | 342 | text: "Profile Pic", |
341 | vaue: "profilePicUrl", | 343 | vaue: "profilePicUrl", |
342 | sortable: false, | 344 | sortable: false, |
343 | align: "center" | 345 | align: "center" |
344 | }, | 346 | }, |
345 | { | 347 | { |
346 | text: "Name", | 348 | text: "Name", |
347 | vaue: "name", | 349 | vaue: "name", |
348 | sortable: false, | 350 | sortable: false, |
349 | align: "center" | 351 | align: "center" |
350 | }, | 352 | }, |
351 | { | 353 | { |
352 | text: "Roll No.", | 354 | text: "Roll No.", |
353 | value: "rollNo", | 355 | value: "rollNo", |
354 | sortable: false, | 356 | sortable: false, |
355 | align: "center" | 357 | align: "center" |
356 | }, | 358 | }, |
357 | { | 359 | { |
358 | text: "Email", | 360 | text: "Email", |
359 | value: "email", | 361 | value: "email", |
360 | sortable: false, | 362 | sortable: false, |
361 | align: "center" | 363 | align: "center" |
362 | }, | 364 | }, |
363 | { | 365 | { |
364 | text: "Class", | 366 | text: "Class", |
365 | value: "classId", | 367 | value: "classId", |
366 | sortable: false, | 368 | sortable: false, |
367 | align: "center" | 369 | align: "center" |
368 | }, | 370 | }, |
369 | { | 371 | { |
370 | text: "Section", | 372 | text: "Section", |
371 | value: "sectionId", | 373 | value: "sectionId", |
372 | sortable: false, | 374 | sortable: false, |
373 | align: "center" | 375 | align: "center" |
374 | } | 376 | } |
375 | ], | 377 | ], |
376 | classList: [], | 378 | classList: [], |
377 | report: {}, | 379 | report: {}, |
378 | userData: {}, | 380 | userData: {}, |
379 | markData: [], | 381 | markData: [], |
380 | formList: [ | 382 | formList: [ |
381 | { | 383 | { |
382 | name: "Blood Group", | 384 | name: "Blood Group", |
383 | value: "bloodGroup" | 385 | value: "bloodGroup" |
384 | }, | 386 | }, |
385 | "Country", | 387 | "Country", |
386 | "Gender", | 388 | "Gender", |
387 | "Transport", | 389 | "Transport", |
388 | "Hostel" | 390 | "Hostel" |
389 | // "Birthday" | 391 | // "Birthday" |
390 | ], | 392 | ], |
391 | bloodGroupList: ["A+", "A-", "B+", "B-", "O+", "O-", "AB+", "AB-"], | 393 | bloodGroupList: ["A+", "A-", "B+", "B-", "O+", "O-", "AB+", "AB-"], |
392 | gender: ["Male", "female"], | 394 | gender: ["Male", "female"], |
393 | getStudentsReportList: [], | 395 | getStudentsReportList: [], |
394 | studentReort: "", | 396 | studentReort: "", |
395 | countryList: [], | 397 | countryList: [], |
396 | route: [], | 398 | route: [], |
397 | Hostel: [], | 399 | Hostel: [], |
398 | hostelList: [], | 400 | hostelList: [], |
399 | token: "" | 401 | token: "" |
400 | }), | 402 | }), |
401 | methods: { | 403 | methods: { |
402 | clear() { | 404 | clear() { |
403 | this.$refs.form.reset(); | 405 | this.$refs.form.reset(); |
404 | }, | 406 | }, |
405 | getClass() { | 407 | getClass() { |
406 | this.showLoader = true; | 408 | this.showLoader = true; |
407 | http() | 409 | http() |
408 | .get("/getClassesList", { | 410 | .get("/getClassesList", { |
409 | headers: { Authorization: "Bearer " + this.token } | 411 | headers: { Authorization: "Bearer " + this.token } |
410 | }) | 412 | }) |
411 | .then(response => { | 413 | .then(response => { |
412 | this.classList = response.data.data; | 414 | this.classList = response.data.data; |
413 | this.showLoader = false; | 415 | this.showLoader = false; |
414 | }) | 416 | }) |
415 | .catch(err => { | 417 | .catch(err => { |
416 | this.showLoader = false; | 418 | this.showLoader = false; |
417 | if (error.response.status === 401) { | 419 | if (error.response.status === 401) { |
418 | this.$router.replace({ path: "/" }); | 420 | this.$router.replace({ path: "/" }); |
419 | this.$store.dispatch("setToken", null); | 421 | this.$store.dispatch("setToken", null); |
420 | this.$store.dispatch("Id", null); | 422 | this.$store.dispatch("Id", null); |
421 | this.$store.dispatch("Role", null); | 423 | this.$store.dispatch("Role", null); |
422 | } | 424 | } |
423 | }); | 425 | }); |
424 | }, | 426 | }, |
425 | getReport() { | 427 | getReport() { |
426 | if (this.report.form === "bloodGroup") { | 428 | if (this.report.form === "bloodGroup") { |
427 | this.bloodGroup = true; | 429 | this.bloodGroup = true; |
428 | this.genderShow = false; | 430 | this.genderShow = false; |
429 | this.TransportShow = false; | 431 | this.TransportShow = false; |
430 | this.countryShow = false; | 432 | this.countryShow = false; |
431 | this.BirthdayShow = false; | 433 | this.BirthdayShow = false; |
432 | this.HostelShow = false; | 434 | this.HostelShow = false; |
433 | this.classShow = false; | 435 | this.classShow = false; |
434 | this.sectionShow = false; | 436 | this.sectionShow = false; |
435 | } | 437 | } |
436 | if (this.report.form === "Gender") { | 438 | if (this.report.form === "Gender") { |
437 | this.genderShow = true; | 439 | this.genderShow = true; |
438 | this.bloodGroup = false; | 440 | this.bloodGroup = false; |
439 | this.TransportShow = false; | 441 | this.TransportShow = false; |
440 | this.BirthdayShow = false; | 442 | this.BirthdayShow = false; |
441 | this.countryShow = false; | 443 | this.countryShow = false; |
442 | this.HostelShow = false; | 444 | this.HostelShow = false; |
443 | this.classShow = true; | 445 | this.classShow = true; |
444 | } | 446 | } |
445 | if (this.report.form === "Transport") { | 447 | if (this.report.form === "Transport") { |
446 | this.TransportShow = true; | 448 | this.TransportShow = true; |
447 | this.genderShow = false; | 449 | this.genderShow = false; |
448 | this.bloodGroup = false; | 450 | this.bloodGroup = false; |
449 | this.BirthdayShow = false; | 451 | this.BirthdayShow = false; |
450 | this.countryShow = false; | 452 | this.countryShow = false; |
451 | this.HostelShow = false; | 453 | this.HostelShow = false; |
452 | this.classShow = true; | 454 | this.classShow = true; |
453 | } | 455 | } |
454 | if (this.report.form === "Country") { | 456 | if (this.report.form === "Country") { |
455 | this.countryShow = true; | 457 | this.countryShow = true; |
456 | this.TransportShow = false; | 458 | this.TransportShow = false; |
457 | this.genderShow = false; | 459 | this.genderShow = false; |
458 | this.bloodGroup = false; | 460 | this.bloodGroup = false; |
459 | this.BirthdayShow = false; | 461 | this.BirthdayShow = false; |
460 | this.HostelShow = false; | 462 | this.HostelShow = false; |
461 | this.classShow = true; | 463 | this.classShow = true; |
462 | } | 464 | } |
463 | if (this.report.form === "Hostel") { | 465 | if (this.report.form === "Hostel") { |
464 | this.HostelShow = true; | 466 | this.HostelShow = true; |
465 | this.TransportShow = false; | 467 | this.TransportShow = false; |
466 | this.genderShow = false; | 468 | this.genderShow = false; |
467 | this.bloodGroup = false; | 469 | this.bloodGroup = false; |
468 | this.countryShow = false; | 470 | this.countryShow = false; |
469 | this.BirthdayShow = false; | 471 | this.BirthdayShow = false; |
470 | this.classShow = true; | 472 | this.classShow = true; |
471 | } | 473 | } |
472 | if (this.report.form === "Birthday") { | 474 | if (this.report.form === "Birthday") { |
473 | this.BirthdayShow = true; | 475 | this.BirthdayShow = true; |
474 | this.TransportShow = false; | 476 | this.TransportShow = false; |
475 | this.genderShow = false; | 477 | this.genderShow = false; |
476 | this.HostelShow = false; | 478 | this.HostelShow = false; |
477 | this.bloodGroup = false; | 479 | this.bloodGroup = false; |
478 | this.countryShow = false; | 480 | this.countryShow = false; |
479 | this.classShow = true; | 481 | this.classShow = true; |
480 | } | 482 | } |
481 | }, | 483 | }, |
482 | getStudents() { | 484 | getStudents() { |
483 | if (this.$refs.form.validate()) { | 485 | if (this.$refs.form.validate()) { |
484 | this.showLoader = true; | 486 | this.showLoader = true; |
485 | http() | 487 | http() |
486 | .get("/getStudentReport", { | 488 | .get("/getStudentReport", { |
487 | params: { | 489 | params: { |
488 | bloodGroup: this.report.bloodGroup, | 490 | bloodGroup: this.report.bloodGroup, |
489 | country: this.report.country, | 491 | country: this.report.country, |
490 | gender: this.report.gender, | 492 | gender: this.report.gender, |
491 | classId: this.report.classId, | 493 | classId: this.report.classId, |
492 | sectionId: this.report.sectionId | 494 | sectionId: this.report.sectionId |
493 | }, | 495 | }, |
494 | headers: { Authorization: "Bearer " + this.token } | 496 | headers: { Authorization: "Bearer " + this.token } |
495 | }) | 497 | }) |
496 | .then(response => { | 498 | .then(response => { |
497 | this.getStudentsReportList = response.data.data; | 499 | this.getStudentsReportList = response.data.data; |
498 | this.showTable = true; | 500 | this.showTable = true; |
499 | this.showLoader = false; | 501 | this.showLoader = false; |
500 | this.clear(); | 502 | this.clear(); |
501 | // console.log("getSectionsList=====>", response.data.data); | 503 | // console.log("getSectionsList=====>", response.data.data); |
502 | }) | 504 | }) |
503 | .catch(error => { | 505 | .catch(error => { |
504 | console.log("err====>", error); | 506 | console.log("err====>", error); |
505 | this.showLoader = false; | 507 | this.showLoader = false; |
506 | }); | 508 | }); |
507 | } | 509 | } |
508 | }, | 510 | }, |
509 | getSections() { | 511 | getSections() { |
510 | this.sectionShow = true; | 512 | this.sectionShow = true; |
511 | this.showLoader = true; | 513 | this.showLoader = true; |
512 | http() | 514 | http() |
513 | .get( | 515 | .get( |
514 | "/getSectionsList", | 516 | "/getSectionsList", |
515 | { params: { classId: this.report.classId } }, | 517 | { params: { classId: this.report.classId } }, |
516 | { | 518 | { |
517 | headers: { Authorization: "Bearer " + this.token } | 519 | headers: { Authorization: "Bearer " + this.token } |
518 | } | 520 | } |
519 | ) | 521 | ) |
520 | .then(response => { | 522 | .then(response => { |
521 | this.addSection = response.data.data; | 523 | this.addSection = response.data.data; |
522 | this.showLoader = false; | 524 | this.showLoader = false; |
523 | }) | 525 | }) |
524 | .catch(error => { | 526 | .catch(error => { |
525 | console.log("err====>", error); | 527 | console.log("err====>", error); |
526 | this.showLoader = false; | 528 | this.showLoader = false; |
527 | }); | 529 | }); |
528 | }, | 530 | }, |
529 | // getFormList() { | 531 | // getFormList() { |
530 | // this.showLoader = true; | 532 | // this.showLoader = true; |
531 | // http() | 533 | // http() |
532 | // .get("/getExamsList", { | 534 | // .get("/getExamsList", { |
533 | // headers: { Authorization: "Bearer " + this.token } | 535 | // headers: { Authorization: "Bearer " + this.token } |
534 | // }) | 536 | // }) |
535 | // .then(response => { | 537 | // .then(response => { |
536 | // this.formList = response.data.data; | 538 | // this.formList = response.data.data; |
537 | // this.showLoader = false; | 539 | // this.showLoader = false; |
538 | // }) | 540 | // }) |
539 | // .catch(error => { | 541 | // .catch(error => { |
540 | // // console.log("err====>", err); | 542 | // // console.log("err====>", err); |
541 | // this.showLoader = false; | 543 | // this.showLoader = false; |
542 | // this.snackbar = true; | 544 | // this.snackbar = true; |
543 | // this.text = error.response.data.message; | 545 | // this.text = error.response.data.message; |
544 | // if (error.response.status === 401) { | 546 | // if (error.response.status === 401) { |
545 | // this.$router.replace({ path: "/" }); | 547 | // this.$router.replace({ path: "/" }); |
546 | // this.$store.dispatch("setToken", null); | 548 | // this.$store.dispatch("setToken", null); |
547 | // this.$store.dispatch("Id", null); | 549 | // this.$store.dispatch("Id", null); |
548 | // } | 550 | // } |
549 | // }); | 551 | // }); |
550 | // } | 552 | // } |
551 | printStudentReport() { | 553 | printStudentReport() { |
552 | this.$htmlToPaper("printMe"); | 554 | this.$htmlToPaper("printMe"); |
553 | }, | 555 | }, |
554 | getUserData() { | 556 | getUserData() { |
555 | http() | 557 | http() |
556 | .get("/getParticularUserDetail") | 558 | .get("/getParticularUserDetail") |
557 | .then(response => { | 559 | .then(response => { |
558 | this.userData = response.data.data; | 560 | this.userData = response.data.data; |
559 | }) | 561 | }) |
560 | .catch(error => { | 562 | .catch(error => { |
561 | if (error.response.status === 401) { | 563 | // if (error.response.status === 401) { |
562 | this.$router.replace({ path: "/" }); | 564 | // this.$router.replace({ path: "/" }); |
563 | this.$store.dispatch("setToken", null); | 565 | // this.$store.dispatch("setToken", null); |
564 | this.$store.dispatch("Id", null); | 566 | // this.$store.dispatch("Id", null); |
565 | } | 567 | // } |
566 | }); | 568 | }); |
567 | } | 569 | } |
568 | }, | 570 | }, |
569 | mounted() { | 571 | mounted() { |
570 | this.token = this.$store.state.token; | 572 | this.token = this.$store.state.token; |
571 | const getCountryList = countryList(); | 573 | const getCountryList = countryList(); |
572 | this.countryList = getCountryList; | 574 | this.countryList = getCountryList; |
573 | this.getUserData(); | 575 | this.getUserData(); |
574 | // console.log("getindustryList", this.countryList); | 576 | // console.log("getindustryList", this.countryList); |
575 | // this.getExamList(); | 577 | // this.getExamList(); |
576 | this.getClass(); | 578 | this.getClass(); |
577 | }, | 579 | }, |
578 | created() { | 580 | created() { |
579 | this.$root.$on("app:search", search => { | 581 | this.$root.$on("app:search", search => { |
580 | this.search = search; | 582 | this.search = search; |
581 | }); | 583 | }); |
582 | }, | 584 | }, |
583 | beforeDestroy() { | 585 | beforeDestroy() { |
584 | // dont forget to remove the listener | 586 | // dont forget to remove the listener |
585 | this.$root.$off("app:search"); | 587 | this.$root.$off("app:search"); |
586 | } | 588 | } |
587 | }; | 589 | }; |
588 | </script> | 590 | </script> |
589 | <style scoped> | 591 | <style scoped> |
590 | .active { | 592 | .active { |
591 | background-color: gray; | 593 | background-color: gray; |
592 | color: white !important; | 594 | color: white !important; |
593 | } | 595 | } |
594 | .activebtn { | 596 | .activebtn { |
595 | color: black !important; | 597 | color: black !important; |
596 | } | 598 | } |
597 | </style>s | 599 | </style>s |
src/pages/School/school.vue
1 | <template> | 1 | <template> |
2 | <div> | 2 | <div> |
3 | <v-tabs grow slider-color="gray"> | 3 | <v-tabs grow slider-color="gray"> |
4 | <v-tab | 4 | <v-tab |
5 | ripple | 5 | ripple |
6 | @click="activeTab('existing')" | 6 | @click="activeTab('existing')" |
7 | v-bind:class="{ active: isActive }" | 7 | v-bind:class="{ active: isActive }" |
8 | id="tab" | 8 | id="tab" |
9 | class="subheading" | 9 | class="subheading" |
10 | >Existing School</v-tab> | 10 | >Existing School</v-tab> |
11 | <v-tab | 11 | <v-tab |
12 | ripple | 12 | ripple |
13 | @click="activeTab('new')" | 13 | @click="activeTab('new')" |
14 | v-bind:class="{ active: newActive }" | 14 | v-bind:class="{ active: newActive }" |
15 | id="tab1" | 15 | id="tab1" |
16 | User | 16 | User |
17 | class="subheading" | 17 | class="subheading" |
18 | >Add New School</v-tab> | 18 | >Add New School</v-tab> |
19 | 19 | ||
20 | <!-- ****** EDITS STUDENTS DETAILS ****** --> | 20 | <!-- ****** EDITS STUDENTS DETAILS ****** --> |
21 | 21 | ||
22 | <v-tab-item> | 22 | <v-tab-item> |
23 | <v-snackbar | 23 | <v-snackbar |
24 | :timeout="timeout" | 24 | :timeout="timeout" |
25 | :top="y === 'top'" | 25 | :top="y === 'top'" |
26 | :right="x === 'right'" | 26 | :right="x === 'right'" |
27 | :vertical="mode === 'vertical'" | 27 | :vertical="mode === 'vertical'" |
28 | v-model="snackbar" | 28 | v-model="snackbar" |
29 | color="success" | 29 | color="success" |
30 | >{{ text }}</v-snackbar> | 30 | >{{ text }}</v-snackbar> |
31 | <v-dialog v-model="dialog" max-width="1500px" scrollable> | 31 | <v-dialog v-model="dialog" max-width="1500px" scrollable> |
32 | <v-card flat> | 32 | <v-card flat> |
33 | <v-toolbar color="grey lighten-2" flat> | 33 | <v-toolbar color="grey lighten-2" flat> |
34 | <v-spacer></v-spacer> | 34 | <v-spacer></v-spacer> |
35 | <v-toolbar-title> | 35 | <v-toolbar-title> |
36 | <h3>Edit School</h3> | 36 | <h3>Edit School</h3> |
37 | </v-toolbar-title> | 37 | </v-toolbar-title> |
38 | <v-spacer></v-spacer> | 38 | <v-spacer></v-spacer> |
39 | </v-toolbar> | 39 | </v-toolbar> |
40 | <v-card-text style="height: 686px;"> | 40 | <v-card-text style="height: 686px;"> |
41 | <v-form ref="form"> | 41 | <v-form ref="form"> |
42 | <v-container fluid> | 42 | <v-container fluid> |
43 | <v-layout> | 43 | <v-layout> |
44 | <v-flex | 44 | <v-flex |
45 | xs12 | 45 | xs12 |
46 | class="text-xs-center text-sm-center text-md-center text-lg-center" | 46 | class="text-xs-center text-sm-center text-md-center text-lg-center" |
47 | > | 47 | > |
48 | <v-avatar size="160px"> | 48 | <v-avatar size="160px"> |
49 | <img | 49 | <img |
50 | src="/static/icon/user.png" | 50 | src="/static/icon/user.png" |
51 | v-if="!editedItem.schoolLogoUrl && !imageUrl" | 51 | v-if="!editedItem.schoolLogoUrl && !imageUrl" |
52 | /> | 52 | /> |
53 | <img | 53 | <img |
54 | :src="editedItem.schoolLogoUrl" | 54 | :src="editedItem.schoolLogoUrl" |
55 | v-else-if="editedItem.schoolLogoUrl && !imageUrl" | 55 | v-else-if="editedItem.schoolLogoUrl && !imageUrl" |
56 | /> | 56 | /> |
57 | <img | 57 | <img |
58 | v-if="imageUrl" | 58 | v-if="imageUrl" |
59 | :src="imageUrl" | 59 | :src="imageUrl" |
60 | height="150" | 60 | height="150" |
61 | style="border-radius:50%; width:200px" | 61 | style="border-radius:50%; width:200px" |
62 | /> | 62 | /> |
63 | </v-avatar> | 63 | </v-avatar> |
64 | <input | 64 | <input |
65 | type="file" | 65 | type="file" |
66 | style="display: none" | 66 | style="display: none" |
67 | ref="image" | 67 | ref="image" |
68 | accept="image/*" | 68 | accept="image/*" |
69 | @change="onFilePicked" | 69 | @change="onFilePicked" |
70 | /> | 70 | /> |
71 | </v-flex> | 71 | </v-flex> |
72 | </v-layout> | 72 | </v-layout> |
73 | <v-layout> | 73 | <v-layout> |
74 | <v-flex xs12 sm4> | 74 | <v-flex xs12 sm4> |
75 | <v-layout> | 75 | <v-layout> |
76 | <v-flex xs4 class="pt-4 subheading"> | 76 | <v-flex xs4 class="pt-4 subheading"> |
77 | <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> | 77 | <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> |
78 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> | 78 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> |
79 | </v-flex> | 79 | </v-flex> |
80 | <v-flex xs8 class="ml-3"> | 80 | <v-flex xs8 class="ml-3"> |
81 | <v-text-field v-model="editedItem.name" placeholder="fill your full Name"></v-text-field> | 81 | <v-text-field v-model="editedItem.name" placeholder="fill your full Name"></v-text-field> |
82 | </v-flex> | 82 | </v-flex> |
83 | </v-layout> | 83 | </v-layout> |
84 | </v-flex> | 84 | </v-flex> |
85 | <v-flex xs12 sm4> | 85 | <v-flex xs12 sm4> |
86 | <v-layout> | 86 | <v-layout> |
87 | <v-flex xs4 class="pt-4 subheading"> | 87 | <v-flex xs4 class="pt-4 subheading"> |
88 | <label class="right hidden-xs-only hidden-sm-only">Email ID:</label> | 88 | <label class="right hidden-xs-only hidden-sm-only">Email ID:</label> |
89 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">EmailID:</label> | 89 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">EmailID:</label> |
90 | </v-flex> | 90 | </v-flex> |
91 | <v-flex xs8 class="ml-3"> | 91 | <v-flex xs8 class="ml-3"> |
92 | <v-text-field placeholder="fill your email" v-model="editedItem.email"></v-text-field> | 92 | <v-text-field placeholder="fill your email" v-model="editedItem.email"></v-text-field> |
93 | </v-flex> | 93 | </v-flex> |
94 | </v-layout> | 94 | </v-layout> |
95 | </v-flex> | 95 | </v-flex> |
96 | <v-flex xs12 sm4> | 96 | <v-flex xs12 sm4> |
97 | <v-layout> | 97 | <v-layout> |
98 | <v-flex xs4 class="pt-4 subheading"> | 98 | <v-flex xs4 class="pt-4 subheading"> |
99 | <label class="right">Society Name:</label> | 99 | <label class="right">Society Name:</label> |
100 | </v-flex> | 100 | </v-flex> |
101 | <v-flex xs8 class="ml-3"> | 101 | <v-flex xs8 class="ml-3"> |
102 | <v-text-field | 102 | <v-text-field |
103 | placeholder="fill your Society Name" | 103 | placeholder="fill your Society Name" |
104 | v-model="editedItem.societyName" | 104 | v-model="editedItem.societyName" |
105 | ></v-text-field> | 105 | ></v-text-field> |
106 | </v-flex> | 106 | </v-flex> |
107 | </v-layout> | 107 | </v-layout> |
108 | </v-flex> | 108 | </v-flex> |
109 | </v-layout> | 109 | </v-layout> |
110 | <v-layout> | 110 | <v-layout> |
111 | <v-flex xs12 sm4> | 111 | <v-flex xs12 sm4> |
112 | <v-layout> | 112 | <v-layout> |
113 | <v-flex xs4 class="pt-4 subheading"> | 113 | <v-flex xs4 class="pt-4 subheading"> |
114 | <label class="right">City:</label> | 114 | <label class="right">City:</label> |
115 | </v-flex> | 115 | </v-flex> |
116 | <v-flex xs8 class="ml-3"> | 116 | <v-flex xs8 class="ml-3"> |
117 | <v-text-field v-model="editedItem.city" placeholder="fill your City Name"></v-text-field> | 117 | <v-text-field v-model="editedItem.city" placeholder="fill your City Name"></v-text-field> |
118 | </v-flex> | 118 | </v-flex> |
119 | </v-layout> | 119 | </v-layout> |
120 | </v-flex> | 120 | </v-flex> |
121 | <v-flex xs12 sm4> | 121 | <v-flex xs12 sm4> |
122 | <v-layout> | 122 | <v-layout> |
123 | <v-flex xs4 class="pt-4 subheading"> | 123 | <v-flex xs4 class="pt-4 subheading"> |
124 | <label class="right">State:</label> | 124 | <label class="right">State:</label> |
125 | </v-flex> | 125 | </v-flex> |
126 | <v-flex xs8 class="ml-3"> | 126 | <v-flex xs8 class="ml-3"> |
127 | <v-text-field | 127 | <v-text-field |
128 | v-model="editedItem.state" | 128 | v-model="editedItem.state" |
129 | placeholder="fill your City Name" | 129 | placeholder="fill your City Name" |
130 | ></v-text-field> | 130 | ></v-text-field> |
131 | </v-flex> | 131 | </v-flex> |
132 | </v-layout> | 132 | </v-layout> |
133 | </v-flex> | 133 | </v-flex> |
134 | <v-flex xs12 sm4> | 134 | <v-flex xs12 sm4> |
135 | <v-layout> | 135 | <v-layout> |
136 | <v-flex xs4 class="pt-4 subheading"> | 136 | <v-flex xs4 class="pt-4 subheading"> |
137 | <label class="right">Pincode:</label> | 137 | <label class="right">Pincode:</label> |
138 | </v-flex> | 138 | </v-flex> |
139 | <v-flex xs8 class="ml-3"> | 139 | <v-flex xs8 class="ml-3"> |
140 | <v-text-field | 140 | <v-text-field |
141 | v-model="editedItem.pinCode" | 141 | v-model="editedItem.pinCode" |
142 | placeholder="fill your pincode" | 142 | placeholder="fill your pincode" |
143 | type="number" | 143 | type="number" |
144 | ></v-text-field> | 144 | ></v-text-field> |
145 | </v-flex> | 145 | </v-flex> |
146 | </v-layout> | 146 | </v-layout> |
147 | </v-flex> | 147 | </v-flex> |
148 | </v-layout> | 148 | </v-layout> |
149 | <v-layout> | 149 | <v-layout> |
150 | <v-flex xs12 sm4> | 150 | <v-flex xs12 sm4> |
151 | <v-layout> | 151 | <v-layout> |
152 | <v-flex xs4 class="pt-4 subheading"> | 152 | <v-flex xs4 class="pt-4 subheading"> |
153 | <label class="right">Fax No:</label> | 153 | <label class="right">Fax No:</label> |
154 | </v-flex> | 154 | </v-flex> |
155 | <v-flex xs8 class="ml-3"> | 155 | <v-flex xs8 class="ml-3"> |
156 | <v-text-field v-model="editedItem.faxNo" placeholder="fill your fax No"></v-text-field> | 156 | <v-text-field v-model="editedItem.faxNo" placeholder="fill your fax No"></v-text-field> |
157 | </v-flex> | 157 | </v-flex> |
158 | </v-layout> | 158 | </v-layout> |
159 | </v-flex> | 159 | </v-flex> |
160 | <v-flex xs12 sm4> | 160 | <v-flex xs12 sm4> |
161 | <v-layout> | 161 | <v-layout> |
162 | <v-flex xs4 class="pt-4 subheading"> | 162 | <v-flex xs4 class="pt-4 subheading"> |
163 | <label class="right">Country:</label> | 163 | <label class="right">Country:</label> |
164 | </v-flex> | 164 | </v-flex> |
165 | <v-flex xs8 class="ml-3"> | 165 | <v-flex xs8 class="ml-3"> |
166 | <v-text-field | 166 | <v-text-field |
167 | v-model="editedItem.country" | 167 | v-model="editedItem.country" |
168 | placeholder="fill your Country" | 168 | placeholder="fill your Country" |
169 | ></v-text-field> | 169 | ></v-text-field> |
170 | </v-flex> | 170 | </v-flex> |
171 | </v-layout> | 171 | </v-layout> |
172 | </v-flex> | 172 | </v-flex> |
173 | <v-flex xs12 sm4> | 173 | <v-flex xs12 sm4> |
174 | <v-layout> | 174 | <v-layout> |
175 | <v-flex xs4 class="pt-4 subheading"> | 175 | <v-flex xs4 class="pt-4 subheading"> |
176 | <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> | 176 | <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> |
177 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> | 177 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> |
178 | </v-flex> | 178 | </v-flex> |
179 | <v-flex xs8 class="ml-3"> | 179 | <v-flex xs8 class="ml-3"> |
180 | <v-text-field | 180 | <v-text-field |
181 | v-model="editedItem.mobile" | 181 | v-model="editedItem.mobile" |
182 | placeholder="fill your MobileNo" | 182 | placeholder="fill your MobileNo" |
183 | name="mobileNo" | 183 | name="mobileNo" |
184 | ></v-text-field> | 184 | ></v-text-field> |
185 | </v-flex> | 185 | </v-flex> |
186 | </v-layout> | 186 | </v-layout> |
187 | </v-flex> | 187 | </v-flex> |
188 | </v-layout> | 188 | </v-layout> |
189 | <v-layout> | 189 | <v-layout> |
190 | <v-flex xs12 sm4> | 190 | <v-flex xs12 sm4> |
191 | <v-layout> | 191 | <v-layout> |
192 | <v-flex xs4 class="pt-4 subheading"> | 192 | <v-flex xs4 class="pt-4 subheading"> |
193 | <label class="right hidden-xs-only hidden-sm-only">LandLine No:</label> | 193 | <label class="right hidden-xs-only hidden-sm-only">LandLine No:</label> |
194 | <label | 194 | <label |
195 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 195 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
196 | >LandLineNo:</label> | 196 | >LandLineNo:</label> |
197 | </v-flex> | 197 | </v-flex> |
198 | <v-flex xs8 class="ml-3"> | 198 | <v-flex xs8 class="ml-3"> |
199 | <v-text-field | 199 | <v-text-field |
200 | v-model="editedItem.landLineNo" | 200 | v-model="editedItem.landLineNo" |
201 | placeholder="fill your LandLine No" | 201 | placeholder="fill your LandLine No" |
202 | type="number" | 202 | type="number" |
203 | ></v-text-field> | 203 | ></v-text-field> |
204 | </v-flex> | 204 | </v-flex> |
205 | </v-layout> | 205 | </v-layout> |
206 | </v-flex> | 206 | </v-flex> |
207 | <v-flex xs12 sm4> | 207 | <v-flex xs12 sm4> |
208 | <v-layout> | 208 | <v-layout> |
209 | <v-flex xs4 class="pt-4 subheading"> | 209 | <v-flex xs4 class="pt-4 subheading"> |
210 | <label class="right hidden-xs-only hidden-sm-only">Registration No:</label> | 210 | <label class="right hidden-xs-only hidden-sm-only">Registration No:</label> |
211 | <label | 211 | <label |
212 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 212 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
213 | >Registration-No:</label> | 213 | >Registration-No:</label> |
214 | </v-flex> | 214 | </v-flex> |
215 | <v-flex xs8 class="ml-3"> | 215 | <v-flex xs8 class="ml-3"> |
216 | <v-text-field | 216 | <v-text-field |
217 | v-model="editedItem.registrationNo" | 217 | v-model="editedItem.registrationNo" |
218 | placeholder="fill your Registration No" | 218 | placeholder="fill your Registration No" |
219 | type="number" | 219 | type="number" |
220 | ></v-text-field> | 220 | ></v-text-field> |
221 | </v-flex> | 221 | </v-flex> |
222 | </v-layout> | 222 | </v-layout> |
223 | </v-flex> | 223 | </v-flex> |
224 | <v-flex xs12 sm4> | 224 | <v-flex xs12 sm4> |
225 | <v-layout> | 225 | <v-layout> |
226 | <v-flex xs4 class="pt-4 subheading"> | 226 | <v-flex xs4 class="pt-4 subheading"> |
227 | <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> | 227 | <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> |
228 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label> | 228 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label> |
229 | </v-flex> | 229 | </v-flex> |
230 | <v-flex xs8 class="ml-3"> | 230 | <v-flex xs8 class="ml-3"> |
231 | <v-text-field | 231 | <v-text-field |
232 | label="Select Image" | 232 | label="Select Image" |
233 | @click="pickFile" | 233 | @click="pickFile" |
234 | v-model="imageName" | 234 | v-model="imageName" |
235 | append-icon="attach_file" | 235 | append-icon="attach_file" |
236 | ></v-text-field> | 236 | ></v-text-field> |
237 | </v-flex> | 237 | </v-flex> |
238 | </v-layout> | 238 | </v-layout> |
239 | </v-flex> | 239 | </v-flex> |
240 | </v-layout> | 240 | </v-layout> |
241 | <v-layout> | 241 | <v-layout> |
242 | <v-flex xs12 sm4> | 242 | <v-flex xs12 sm4> |
243 | <v-layout> | 243 | <v-layout> |
244 | <v-flex xs4 class="pt-4 subheading"> | 244 | <v-flex xs4 class="pt-4 subheading"> |
245 | <label class="right hidden-xs-only hidden-sm-only">School Details:</label> | 245 | <label class="right hidden-xs-only hidden-sm-only">School Details:</label> |
246 | <label | 246 | <label |
247 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 247 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
248 | >SchoolDetail:</label> | 248 | >SchoolDetail:</label> |
249 | </v-flex> | 249 | </v-flex> |
250 | <v-flex xs8 class="ml-3"> | 250 | <v-flex xs8 class="ml-3"> |
251 | <v-text-field | 251 | <v-text-field |
252 | v-model="editedItem.schoolDetails" | 252 | v-model="editedItem.schoolDetails" |
253 | placeholder="fill your School Details" | 253 | placeholder="fill your School Details" |
254 | ></v-text-field> | 254 | ></v-text-field> |
255 | </v-flex> | 255 | </v-flex> |
256 | </v-layout> | 256 | </v-layout> |
257 | </v-flex> | 257 | </v-flex> |
258 | <v-flex xs12 sm4> | 258 | <v-flex xs12 sm4> |
259 | <v-layout> | 259 | <v-layout> |
260 | <v-flex xs4 class="pt-4 subheading"> | 260 | <v-flex xs4 class="pt-4 subheading"> |
261 | <label class="right hidden-xs-only hidden-sm-only">Academic Year:</label> | 261 | <label class="right hidden-xs-only hidden-sm-only">Academic Year:</label> |
262 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Year:</label> | 262 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Year:</label> |
263 | </v-flex> | 263 | </v-flex> |
264 | <v-flex xs8 class="ml-3"> | 264 | <v-flex xs8 class="ml-3"> |
265 | <v-text-field | 265 | <v-text-field |
266 | v-model="editedItem.establishmentYear" | 266 | v-model="editedItem.establishmentYear" |
267 | placeholder="fill your Academic Year" | 267 | placeholder="fill your Academic Year" |
268 | ></v-text-field> | 268 | ></v-text-field> |
269 | </v-flex> | 269 | </v-flex> |
270 | </v-layout> | 270 | </v-layout> |
271 | </v-flex> | 271 | </v-flex> |
272 | <v-flex xs12 sm4> | 272 | <v-flex xs12 sm4> |
273 | <v-layout> | 273 | <v-layout> |
274 | <v-flex xs4 class="pt-4 subheading"> | 274 | <v-flex xs4 class="pt-4 subheading"> |
275 | <label class="right hidden-xs-only hidden-sm-only">Web Site Url:</label> | 275 | <label class="right hidden-xs-only hidden-sm-only">Web Site Url:</label> |
276 | <label | 276 | <label |
277 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 277 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
278 | >WebSiteUrl:</label> | 278 | >WebSiteUrl:</label> |
279 | </v-flex> | 279 | </v-flex> |
280 | <v-flex xs8 class="ml-3"> | 280 | <v-flex xs8 class="ml-3"> |
281 | <v-text-field | 281 | <v-text-field |
282 | v-model="editedItem.websiteUrl" | 282 | v-model="editedItem.websiteUrl" |
283 | placeholder="fill your MobileNo" | 283 | placeholder="fill your MobileNo" |
284 | ></v-text-field> | 284 | ></v-text-field> |
285 | </v-flex> | 285 | </v-flex> |
286 | </v-layout> | 286 | </v-layout> |
287 | </v-flex> | 287 | </v-flex> |
288 | </v-layout> | 288 | </v-layout> |
289 | <v-layout> | 289 | <v-layout> |
290 | <v-flex xs12 sm4> | 290 | <v-flex xs12 sm4> |
291 | <v-layout> | 291 | <v-layout> |
292 | <v-flex xs4 class="pt-4 subheading"> | 292 | <v-flex xs4 class="pt-4 subheading"> |
293 | <label class="right">Address:</label> | 293 | <label class="right">Address:</label> |
294 | </v-flex> | 294 | </v-flex> |
295 | <v-flex xs8 class="ml-3"> | 295 | <v-flex xs8 class="ml-3"> |
296 | <v-text-field | 296 | <v-text-field |
297 | v-model="editedItem.address" | 297 | v-model="editedItem.address" |
298 | placeholder="Select your Address" | 298 | placeholder="Select your Address" |
299 | ></v-text-field> | 299 | ></v-text-field> |
300 | </v-flex> | 300 | </v-flex> |
301 | </v-layout> | 301 | </v-layout> |
302 | </v-flex> | 302 | </v-flex> |
303 | </v-layout> | 303 | </v-layout> |
304 | <v-layout> | 304 | <v-layout> |
305 | <v-flex xs12 sm12> | 305 | <v-flex xs12 sm12> |
306 | <v-layout> | 306 | <v-layout> |
307 | <v-flex xs6> | 307 | <v-flex xs6> |
308 | <v-btn round dark @click.native="close">Cancel</v-btn> | 308 | <v-btn round dark @click.native="close">Cancel</v-btn> |
309 | </v-flex> | 309 | </v-flex> |
310 | <v-flex xs6> | 310 | <v-flex xs6> |
311 | <v-btn @click="save" round dark :loading="loading" class="right">Save</v-btn> | 311 | <v-btn @click="save" round dark :loading="loading" class="right">Save</v-btn> |
312 | </v-flex> | 312 | </v-flex> |
313 | </v-layout> | 313 | </v-layout> |
314 | </v-flex> | 314 | </v-flex> |
315 | </v-layout> | 315 | </v-layout> |
316 | </v-container> | 316 | </v-container> |
317 | </v-form> | 317 | </v-form> |
318 | </v-card-text> | 318 | </v-card-text> |
319 | </v-card> | 319 | </v-card> |
320 | </v-dialog> | 320 | </v-dialog> |
321 | <v-snackbar | 321 | <v-snackbar |
322 | :timeout="timeout" | 322 | :timeout="timeout" |
323 | :top="y === 'top'" | 323 | :top="y === 'top'" |
324 | :right="x === 'right'" | 324 | :right="x === 'right'" |
325 | :vertical="mode === 'vertical'" | 325 | :vertical="mode === 'vertical'" |
326 | v-model="snackbar" | 326 | v-model="snackbar" |
327 | color="success" | 327 | color="success" |
328 | >{{ text }}</v-snackbar> | 328 | >{{ text }}</v-snackbar> |
329 | 329 | ||
330 | <!-- ****** EXISTING-USERS STUDENTS TABLE ****** --> | 330 | <!-- ****** EXISTING-USERS STUDENTS TABLE ****** --> |
331 | <v-data-table | 331 | <v-data-table |
332 | :headers="headers" | 332 | :headers="headers" |
333 | :items="schoolList" | 333 | :items="schoolList" |
334 | :pagination.sync="pagination" | 334 | :pagination.sync="pagination" |
335 | :search="search" | 335 | :search="search" |
336 | > | 336 | > |
337 | <template slot="items" slot-scope="props"> | 337 | <template slot="items" slot-scope="props"> |
338 | <tr class="tr"> | 338 | <tr class="tr"> |
339 | <td class="td td-row text-xs-center">{{ props.index + 1}}</td> | 339 | <td class="td td-row text-xs-center">{{ props.index + 1}}</td> |
340 | <td class="td td-row text-xs-center"> | 340 | <td class="td td-row text-xs-center"> |
341 | <v-avatar> | 341 | <v-avatar> |
342 | <img :src="props.item.schoolLogoUrl" v-if="props.item.schoolLogoUrl" /> | 342 | <img :src="props.item.schoolLogoUrl" v-if="props.item.schoolLogoUrl" /> |
343 | <img src="/static/icon/user.png" v-else-if="!props.item.schoolLogoUrl" /> | 343 | <img src="/static/icon/user.png" v-else-if="!props.item.schoolLogoUrl" /> |
344 | </v-avatar> | 344 | </v-avatar> |
345 | </td> | 345 | </td> |
346 | <td class="td td-row text-xs-center">{{ props.item.name}}</td> | 346 | <td class="td td-row text-xs-center">{{ props.item.name}}</td> |
347 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> | 347 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> |
348 | <td class="td td-row text-xs-center">{{ props.item.city }}</td> | 348 | <td class="td td-row text-xs-center">{{ props.item.city }}</td> |
349 | <td class="td td-row text-xs-center">{{ props.item.state }}</td> | 349 | <td class="td td-row text-xs-center">{{ props.item.state }}</td> |
350 | <td class="td td-row text-xs-center">{{ props.item.mobile}}</td> | 350 | <td class="td td-row text-xs-center">{{ props.item.mobile}}</td> |
351 | <td class="td td-row text-xs-center"> | 351 | <td class="td td-row text-xs-center"> |
352 | <v-switch | 352 | <v-switch |
353 | class="pl-3" | 353 | class="pl-3" |
354 | v-model="props.item.status" | 354 | v-model="props.item.status" |
355 | @change="suspendSchoolStatus(props.item.status,props.item._id)" | 355 | @change="suspendSchoolStatus(props.item.status,props.item._id)" |
356 | ></v-switch> | 356 | ></v-switch> |
357 | </td> | 357 | </td> |
358 | <td class="td td-row text-xs-center"> | 358 | <td class="td td-row text-xs-center"> |
359 | <span> | 359 | <span> |
360 | <!-- <router-link :to="{ name:'viewSchoolDashboard',params: { schoolId:props.item._id } }"> --> | 360 | <!-- <router-link :to="{ name:'viewSchoolDashboard',params: { schoolId:props.item._id } }"> --> |
361 | <v-tooltip top> | 361 | <v-tooltip top> |
362 | <img | 362 | <img |
363 | slot="activator" | 363 | slot="activator" |
364 | style="cursor:pointer; width:25px; height:18px; " | 364 | style="cursor:pointer; width:25px; height:18px; " |
365 | class="mr5" | 365 | class="mr5" |
366 | src="/static/icon/eye1.png" | 366 | src="/static/icon/eye1.png" |
367 | @click="adminAccess(props.item)" | 367 | @click="adminAccess(props.item)" |
368 | /> | 368 | /> |
369 | <span>View</span> | 369 | <span>View</span> |
370 | </v-tooltip> | 370 | </v-tooltip> |
371 | <!-- </router-link> --> | 371 | <!-- </router-link> --> |
372 | <v-tooltip top> | 372 | <v-tooltip top> |
373 | <img | 373 | <img |
374 | slot="activator" | 374 | slot="activator" |
375 | style="cursor:pointer; width:20px; height:18px; " | 375 | style="cursor:pointer; width:20px; height:18px; " |
376 | class="mr5" | 376 | class="mr5" |
377 | @click="editItem(props.item)" | 377 | @click="editItem(props.item)" |
378 | src="/static/icon/edit1.png" | 378 | src="/static/icon/edit1.png" |
379 | /> | 379 | /> |
380 | <span>Edit</span> | 380 | <span>Edit</span> |
381 | </v-tooltip> | 381 | </v-tooltip> |
382 | </span> | 382 | </span> |
383 | </td> | 383 | </td> |
384 | </tr> | 384 | </tr> |
385 | </template> | 385 | </template> |
386 | <v-alert | 386 | <v-alert |
387 | slot="no-results" | 387 | slot="no-results" |
388 | :value="true" | 388 | :value="true" |
389 | color="error" | 389 | color="error" |
390 | icon="warning" | 390 | icon="warning" |
391 | >Your search for "{{ search }}" found no results.</v-alert> | 391 | >Your search for "{{ search }}" found no results.</v-alert> |
392 | </v-data-table> | 392 | </v-data-table> |
393 | </v-tab-item> | 393 | </v-tab-item> |
394 | 394 | ||
395 | <!-- ****** ADD STUDENTS DETAILS****** --> | 395 | <!-- ****** ADD STUDENTS DETAILS****** --> |
396 | <v-tab-item> | 396 | <v-tab-item> |
397 | <v-container fluid> | 397 | <v-container fluid> |
398 | <v-layout align-center justify-center fill-height> | 398 | <v-layout align-center justify-center fill-height> |
399 | <v-flex xs12 sm12 md10 lg11> | 399 | <v-flex xs12 sm12 md10 lg11> |
400 | <!-- <v-container fluid> --> | 400 | <!-- <v-container fluid> --> |
401 | <v-snackbar | 401 | <v-snackbar |
402 | :timeout="timeout" | 402 | :timeout="timeout" |
403 | :top="y === 'top'" | 403 | :top="y === 'top'" |
404 | :right="x === 'right'" | 404 | :right="x === 'right'" |
405 | :vertical="mode === 'vertical'" | 405 | :vertical="mode === 'vertical'" |
406 | v-model="snackbar" | 406 | v-model="snackbar" |
407 | color="success" | 407 | color="success" |
408 | >{{ text }}</v-snackbar> | 408 | >{{ text }}</v-snackbar> |
409 | <v-flex xs12 sm12> | 409 | <v-flex xs12 sm12> |
410 | <v-form ref="form" v-model="valid" lazy-validation> | 410 | <v-form ref="form" v-model="valid" lazy-validation> |
411 | <v-layout> | 411 | <v-layout> |
412 | <v-flex | 412 | <v-flex |
413 | xs12 | 413 | xs12 |
414 | class="text-xs-center text-sm-center text-md-center text-lg-center" | 414 | class="text-xs-center text-sm-center text-md-center text-lg-center" |
415 | > | 415 | > |
416 | <v-avatar size="100px"> | 416 | <v-avatar size="100px"> |
417 | <img src="/static/icon/user.png" v-if="!imageUrl" /> | 417 | <img src="/static/icon/user.png" v-if="!imageUrl" /> |
418 | </v-avatar> | 418 | </v-avatar> |
419 | <input | 419 | <input |
420 | type="file" | 420 | type="file" |
421 | style="display: none" | 421 | style="display: none" |
422 | ref="image" | 422 | ref="image" |
423 | accept="image/*" | 423 | accept="image/*" |
424 | @change="onFilePicked" | 424 | @change="onFilePicked" |
425 | /> | 425 | /> |
426 | <img | 426 | <img |
427 | :src="imageData.imageUrl" | 427 | :src="imageData.imageUrl" |
428 | height="150" | 428 | height="150" |
429 | v-if="imageUrl" | 429 | v-if="imageUrl" |
430 | style="border-radius:50%; width:200px" | 430 | style="border-radius:50%; width:200px" |
431 | /> | 431 | /> |
432 | </v-flex> | 432 | </v-flex> |
433 | </v-layout> | 433 | </v-layout> |
434 | <v-layout wrap> | 434 | <v-layout wrap> |
435 | <v-flex xs12 sm6> | 435 | <v-flex xs12 sm6> |
436 | <v-layout> | 436 | <v-layout> |
437 | <v-flex xs4 sm4 class="pt-4 subheading"> | 437 | <v-flex xs4 sm4 class="pt-4 subheading"> |
438 | <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> | 438 | <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> |
439 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> | 439 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> |
440 | </v-flex> | 440 | </v-flex> |
441 | <v-flex xs8 sm8 class="ml-3"> | 441 | <v-flex xs8 sm8 class="ml-3"> |
442 | <v-text-field | 442 | <v-text-field |
443 | v-model="addSchool.name" | 443 | v-model="addSchool.name" |
444 | placeholder="fill your full Name" | 444 | placeholder="fill your full Name" |
445 | name="name" | 445 | name="name" |
446 | type="text" | 446 | type="text" |
447 | :rules="nameRules" | 447 | :rules="nameRules" |
448 | required | 448 | required |
449 | ></v-text-field> | 449 | ></v-text-field> |
450 | </v-flex> | 450 | </v-flex> |
451 | </v-layout> | 451 | </v-layout> |
452 | </v-flex> | 452 | </v-flex> |
453 | <v-flex xs12 sm6> | 453 | <v-flex xs12 sm6> |
454 | <v-layout> | 454 | <v-layout> |
455 | <v-flex xs4 sm4 class="pt-4 subheading"> | 455 | <v-flex xs4 sm4 class="pt-4 subheading"> |
456 | <label class="right">Email ID:</label> | 456 | <label class="right">Email ID:</label> |
457 | </v-flex> | 457 | </v-flex> |
458 | <v-flex xs8 sm8 class="ml-3"> | 458 | <v-flex xs8 sm8 class="ml-3"> |
459 | <v-text-field | 459 | <v-text-field |
460 | placeholder="fill your email" | 460 | placeholder="fill your email" |
461 | :rules="emailRules" | 461 | :rules="emailRules" |
462 | v-model="addSchool.email" | 462 | v-model="addSchool.email" |
463 | type="text" | 463 | type="text" |
464 | required | 464 | required |
465 | ></v-text-field> | 465 | ></v-text-field> |
466 | </v-flex> | 466 | </v-flex> |
467 | </v-layout> | 467 | </v-layout> |
468 | </v-flex> | 468 | </v-flex> |
469 | </v-layout> | 469 | </v-layout> |
470 | <v-layout wrap> | 470 | <v-layout wrap> |
471 | <v-flex xs12 sm6> | 471 | <v-flex xs12 sm6> |
472 | <v-layout> | 472 | <v-layout> |
473 | <v-flex xs4 sm4 class="pt-4 subheading"> | 473 | <v-flex xs4 sm4 class="pt-4 subheading"> |
474 | <label class="right hidden-sm-only hidden-xs-only">Society Name:</label> | 474 | <label class="right hidden-sm-only hidden-xs-only">Society Name:</label> |
475 | <label | 475 | <label |
476 | class="right hidden-lg-only hidden-xl-only hidden-md-only" | 476 | class="right hidden-lg-only hidden-xl-only hidden-md-only" |
477 | >SocietyName:</label> | 477 | >SocietyName:</label> |
478 | </v-flex> | 478 | </v-flex> |
479 | <v-flex xs8 sm8 class="ml-3"> | 479 | <v-flex xs8 sm8 class="ml-3"> |
480 | <v-text-field | 480 | <v-text-field |
481 | v-model="addSchool.societyName" | 481 | v-model="addSchool.societyName" |
482 | placeholder="fill your Society Name" | 482 | placeholder="fill your Society Name" |
483 | required | 483 | required |
484 | ></v-text-field> | 484 | ></v-text-field> |
485 | </v-flex> | 485 | </v-flex> |
486 | </v-layout> | 486 | </v-layout> |
487 | </v-flex> | 487 | </v-flex> |
488 | <v-flex xs12 sm6> | 488 | <v-flex xs12 sm6> |
489 | <v-layout> | 489 | <v-layout> |
490 | <v-flex xs4 class="pt-4 subheading"> | 490 | <v-flex xs4 class="pt-4 subheading"> |
491 | <label class="right">City:</label> | 491 | <label class="right">City:</label> |
492 | </v-flex> | 492 | </v-flex> |
493 | <v-flex xs8 class="ml-3"> | 493 | <v-flex xs8 class="ml-3"> |
494 | <v-text-field | 494 | <v-text-field |
495 | v-model="addSchool.city" | 495 | v-model="addSchool.city" |
496 | placeholder="fill your City Name" | 496 | placeholder="fill your City Name" |
497 | name="City" | 497 | name="City" |
498 | type="text" | 498 | type="text" |
499 | :rules="cityRules" | 499 | :rules="cityRules" |
500 | required | 500 | required |
501 | ></v-text-field> | 501 | ></v-text-field> |
502 | </v-flex> | 502 | </v-flex> |
503 | </v-layout> | 503 | </v-layout> |
504 | </v-flex> | 504 | </v-flex> |
505 | </v-layout> | 505 | </v-layout> |
506 | <v-layout wrap> | 506 | <v-layout wrap> |
507 | <v-flex xs12 sm6> | 507 | <v-flex xs12 sm6> |
508 | <v-layout> | 508 | <v-layout> |
509 | <v-flex xs4 class="pt-4 subheading"> | 509 | <v-flex xs4 class="pt-4 subheading"> |
510 | <label class="right">State:</label> | 510 | <label class="right">State:</label> |
511 | </v-flex> | 511 | </v-flex> |
512 | <v-flex xs8 class="ml-3"> | 512 | <v-flex xs8 class="ml-3"> |
513 | <v-text-field | 513 | <v-text-field |
514 | v-model="addSchool.state" | 514 | v-model="addSchool.state" |
515 | placeholder="fill your State Name" | 515 | placeholder="fill your State Name" |
516 | name="state" | 516 | name="state" |
517 | type="text" | 517 | type="text" |
518 | :rules="stateRules" | 518 | :rules="stateRules" |
519 | required | 519 | required |
520 | ></v-text-field> | 520 | ></v-text-field> |
521 | </v-flex> | 521 | </v-flex> |
522 | </v-layout> | 522 | </v-layout> |
523 | </v-flex> | 523 | </v-flex> |
524 | <v-flex xs12 sm6> | 524 | <v-flex xs12 sm6> |
525 | <v-layout> | 525 | <v-layout> |
526 | <v-flex xs4 class="pt-4 subheading"> | 526 | <v-flex xs4 class="pt-4 subheading"> |
527 | <label class="right">Pincode:</label> | 527 | <label class="right">Pincode:</label> |
528 | </v-flex> | 528 | </v-flex> |
529 | <v-flex xs8 class="ml-3"> | 529 | <v-flex xs8 class="ml-3"> |
530 | <v-text-field | 530 | <v-text-field |
531 | v-model="addSchool.pinCode" | 531 | v-model="addSchool.pinCode" |
532 | placeholder="fill your pincode" | 532 | placeholder="fill your pincode" |
533 | name="pincode" | 533 | name="pincode" |
534 | type="number" | 534 | type="number" |
535 | :rules="pincode" | 535 | :rules="pincode" |
536 | required | 536 | required |
537 | ></v-text-field> | 537 | ></v-text-field> |
538 | </v-flex> | 538 | </v-flex> |
539 | </v-layout> | 539 | </v-layout> |
540 | </v-flex> | 540 | </v-flex> |
541 | </v-layout> | 541 | </v-layout> |
542 | <v-layout wrap> | 542 | <v-layout wrap> |
543 | <v-flex xs12 sm6> | 543 | <v-flex xs12 sm6> |
544 | <v-layout> | 544 | <v-layout> |
545 | <v-flex xs4 class="pt-4 subheading"> | 545 | <v-flex xs4 class="pt-4 subheading"> |
546 | <label class="right">Fax No:</label> | 546 | <label class="right">Fax No:</label> |
547 | </v-flex> | 547 | </v-flex> |
548 | <v-flex xs8 class="ml-3"> | 548 | <v-flex xs8 class="ml-3"> |
549 | <v-text-field v-model="addSchool.faxNo" label="fill your Fax No" required></v-text-field> | 549 | <v-text-field v-model="addSchool.faxNo" label="fill your Fax No" required></v-text-field> |
550 | </v-flex> | 550 | </v-flex> |
551 | </v-layout> | 551 | </v-layout> |
552 | </v-flex> | 552 | </v-flex> |
553 | <v-flex xs12 sm6> | 553 | <v-flex xs12 sm6> |
554 | <v-layout> | 554 | <v-layout> |
555 | <v-flex xs4 class="pt-4 subheading"> | 555 | <v-flex xs4 class="pt-4 subheading"> |
556 | <label class="right hidden-xs-only hidden-sm-only">Country:</label> | 556 | <label class="right hidden-xs-only hidden-sm-only">Country:</label> |
557 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label> | 557 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label> |
558 | </v-flex> | 558 | </v-flex> |
559 | <v-flex xs8 class="ml-3"> | 559 | <v-flex xs8 class="ml-3"> |
560 | <v-autocomplete | 560 | <v-autocomplete |
561 | v-model="addSchool.country" | 561 | v-model="addSchool.country" |
562 | :items="countries" | 562 | :items="countries" |
563 | :rules="country" | 563 | :rules="country" |
564 | placeholder="Select Country Name" | 564 | placeholder="Select Country Name" |
565 | required | 565 | required |
566 | ></v-autocomplete> | 566 | ></v-autocomplete> |
567 | </v-flex> | 567 | </v-flex> |
568 | </v-layout> | 568 | </v-layout> |
569 | </v-flex> | 569 | </v-flex> |
570 | </v-layout> | 570 | </v-layout> |
571 | <v-layout wrap> | 571 | <v-layout wrap> |
572 | <v-flex xs12 sm6> | 572 | <v-flex xs12 sm6> |
573 | <v-layout> | 573 | <v-layout> |
574 | <v-flex xs4 class="pt-4 subheading"> | 574 | <v-flex xs4 class="pt-4 subheading"> |
575 | <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> | 575 | <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> |
576 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> | 576 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> |
577 | </v-flex> | 577 | </v-flex> |
578 | <v-flex xs8 class="ml-3"> | 578 | <v-flex xs8 class="ml-3"> |
579 | <v-text-field | 579 | <v-text-field |
580 | v-model="addSchool.mobile" | 580 | v-model="addSchool.mobile" |
581 | placeholder="fill your Mobile No" | 581 | placeholder="fill your Mobile No" |
582 | name="mobileNo" | 582 | name="mobileNo" |
583 | type="number" | 583 | type="number" |
584 | :rules="mobileNoRules" | 584 | :rules="mobileNoRules" |
585 | required | 585 | required |
586 | ></v-text-field> | 586 | ></v-text-field> |
587 | </v-flex> | 587 | </v-flex> |
588 | </v-layout> | 588 | </v-layout> |
589 | </v-flex> | 589 | </v-flex> |
590 | <v-flex xs12 sm6> | 590 | <v-flex xs12 sm6> |
591 | <v-layout> | 591 | <v-layout> |
592 | <v-flex xs4 class="pt-4 subheading"> | 592 | <v-flex xs4 class="pt-4 subheading"> |
593 | <label class="right hidden-xs-only hidden-sm-only">LandLine No:</label> | 593 | <label class="right hidden-xs-only hidden-sm-only">LandLine No:</label> |
594 | <label | 594 | <label |
595 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 595 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
596 | >LandLineNo:</label> | 596 | >LandLineNo:</label> |
597 | </v-flex> | 597 | </v-flex> |
598 | <v-flex xs8 class="ml-3"> | 598 | <v-flex xs8 class="ml-3"> |
599 | <v-text-field | 599 | <v-text-field |
600 | v-model="addSchool.landLineNo" | 600 | v-model="addSchool.landLineNo" |
601 | :items="countries" | 601 | :items="countries" |
602 | placeholder="fill your LandLine No" | 602 | placeholder="fill your LandLine No" |
603 | type="number" | 603 | type="number" |
604 | required | 604 | required |
605 | ></v-text-field> | 605 | ></v-text-field> |
606 | </v-flex> | 606 | </v-flex> |
607 | </v-layout> | 607 | </v-layout> |
608 | </v-flex> | 608 | </v-flex> |
609 | </v-layout> | 609 | </v-layout> |
610 | <v-layout wrap> | 610 | <v-layout wrap> |
611 | <v-flex xs12 sm6> | 611 | <v-flex xs12 sm6> |
612 | <v-layout> | 612 | <v-layout> |
613 | <v-flex xs4 class="pt-4 subheading"> | 613 | <v-flex xs4 class="pt-4 subheading"> |
614 | <label class="right hidden-xs-only hidden-sm-only">Registration No:</label> | 614 | <label class="right hidden-xs-only hidden-sm-only">Registration No:</label> |
615 | <label | 615 | <label |
616 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 616 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
617 | >Registration-No:</label> | 617 | >Registration-No:</label> |
618 | </v-flex> | 618 | </v-flex> |
619 | <v-flex xs8 class="ml-3"> | 619 | <v-flex xs8 class="ml-3"> |
620 | <v-text-field | 620 | <v-text-field |
621 | v-model="addSchool.registrationNo" | 621 | v-model="addSchool.registrationNo" |
622 | placeholder="Fill your Registration No" | 622 | placeholder="Fill your Registration No" |
623 | required | 623 | required |
624 | ></v-text-field> | 624 | ></v-text-field> |
625 | </v-flex> | 625 | </v-flex> |
626 | </v-layout> | 626 | </v-layout> |
627 | </v-flex> | 627 | </v-flex> |
628 | <v-flex xs12 sm6> | 628 | <v-flex xs12 sm6> |
629 | <v-layout> | 629 | <v-layout> |
630 | <v-flex xs4 class="pt-4 subheading"> | 630 | <v-flex xs4 class="pt-4 subheading"> |
631 | <label class="right hidden-xs-only hidden-sm-only">School Details:</label> | 631 | <label class="right hidden-xs-only hidden-sm-only">School Details:</label> |
632 | <label | 632 | <label |
633 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 633 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
634 | >SchoolDetails:</label> | 634 | >SchoolDetails:</label> |
635 | </v-flex> | 635 | </v-flex> |
636 | <v-flex xs8 class="ml-3"> | 636 | <v-flex xs8 class="ml-3"> |
637 | <v-text-field | 637 | <v-text-field |
638 | v-model="addSchool.schoolDetails" | 638 | v-model="addSchool.schoolDetails" |
639 | placeholder="Fill your School Details" | 639 | placeholder="Fill your School Details" |
640 | :rules="schoolDetailRule" | 640 | :rules="schoolDetailRule" |
641 | required | 641 | required |
642 | ></v-text-field> | 642 | ></v-text-field> |
643 | </v-flex> | 643 | </v-flex> |
644 | </v-layout> | 644 | </v-layout> |
645 | </v-flex> | 645 | </v-flex> |
646 | </v-layout> | 646 | </v-layout> |
647 | <v-layout wrap> | 647 | <v-layout wrap> |
648 | <v-flex xs12 sm6> | 648 | <v-flex xs12 sm6> |
649 | <v-layout> | 649 | <v-layout> |
650 | <v-flex xs4 class="pt-4 subheading"> | 650 | <v-flex xs4 class="pt-4 subheading"> |
651 | <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> | 651 | <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> |
652 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label> | 652 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label> |
653 | </v-flex> | 653 | </v-flex> |
654 | <v-flex xs8 class="ml-3"> | 654 | <v-flex xs8 class="ml-3"> |
655 | <v-text-field | 655 | <v-text-field |
656 | label="Select Image" | 656 | label="Select Image" |
657 | @click="pickFile" | 657 | @click="pickFile" |
658 | v-model="imageName" | 658 | v-model="imageName" |
659 | append-icon="attach_file" | 659 | append-icon="attach_file" |
660 | ></v-text-field> | 660 | ></v-text-field> |
661 | </v-flex> | 661 | </v-flex> |
662 | </v-layout> | 662 | </v-layout> |
663 | </v-flex> | 663 | </v-flex> |
664 | <v-flex xs12 sm6> | 664 | <v-flex xs12 sm6> |
665 | <v-layout> | 665 | <v-layout> |
666 | <v-flex xs4 class="pt-4 subheading"> | 666 | <v-flex xs4 class="pt-4 subheading"> |
667 | <label class="right hidden-xs-only hidden-sm-only">Academic Year:</label> | 667 | <label class="right hidden-xs-only hidden-sm-only">Academic Year:</label> |
668 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Year:</label> | 668 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Year:</label> |
669 | </v-flex> | 669 | </v-flex> |
670 | <v-flex xs8 class="ml-3"> | 670 | <v-flex xs8 class="ml-3"> |
671 | <v-text-field | 671 | <v-text-field |
672 | v-model="addSchool.establishmentYear" | 672 | v-model="addSchool.establishmentYear" |
673 | placeholder="fill your Academic Year" | 673 | placeholder="fill your Academic Year" |
674 | :rules="establishmentYearRules" | 674 | :rules="establishmentYearRules" |
675 | required | 675 | required |
676 | ></v-text-field> | 676 | ></v-text-field> |
677 | </v-flex> | 677 | </v-flex> |
678 | </v-layout> | 678 | </v-layout> |
679 | </v-flex> | 679 | </v-flex> |
680 | </v-layout> | 680 | </v-layout> |
681 | <v-layout wrap> | 681 | <v-layout wrap> |
682 | <v-flex xs12 sm6> | 682 | <v-flex xs12 sm6> |
683 | <v-layout> | 683 | <v-layout> |
684 | <v-flex xs4 sm4 class="pt-4 subheading"> | 684 | <v-flex xs4 sm4 class="pt-4 subheading"> |
685 | <label class="right hidden-xs-only hidden-sm-only">WebSite Url:</label> | 685 | <label class="right hidden-xs-only hidden-sm-only">WebSite Url:</label> |
686 | <label | 686 | <label |
687 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 687 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
688 | >WebSiteUrl:</label> | 688 | >WebSiteUrl:</label> |
689 | </v-flex> | 689 | </v-flex> |
690 | <v-flex xs8 sm8 class="ml-3"> | 690 | <v-flex xs8 sm8 class="ml-3"> |
691 | <v-text-field | 691 | <v-text-field |
692 | name="input-4-3" | 692 | name="input-4-3" |
693 | v-model="addSchool.websiteUrl" | 693 | v-model="addSchool.websiteUrl" |
694 | placeholder="fill Your WebSite Url" | 694 | placeholder="fill Your WebSite Url" |
695 | required | 695 | required |
696 | ></v-text-field> | 696 | ></v-text-field> |
697 | </v-flex> | 697 | </v-flex> |
698 | </v-layout> | 698 | </v-layout> |
699 | </v-flex> | 699 | </v-flex> |
700 | <v-flex xs12 sm6> | 700 | <v-flex xs12 sm6> |
701 | <v-layout> | 701 | <v-layout> |
702 | <v-flex xs4 sm4 class="pt-4 subheading"> | 702 | <v-flex xs4 sm4 class="pt-4 subheading"> |
703 | <label class="right">Address:</label> | 703 | <label class="right">Address:</label> |
704 | </v-flex> | 704 | </v-flex> |
705 | <v-flex xs8 sm8 class="ml-3"> | 705 | <v-flex xs8 sm8 class="ml-3"> |
706 | <v-text-field | 706 | <v-text-field |
707 | name="input-4-3" | 707 | name="input-4-3" |
708 | v-model="addSchool.address" | 708 | v-model="addSchool.address" |
709 | :rules="presentAddress" | 709 | :rules="presentAddress" |
710 | placeholder="fill Your Address" | 710 | placeholder="fill Your Address" |
711 | required | 711 | required |
712 | ></v-text-field> | 712 | ></v-text-field> |
713 | </v-flex> | 713 | </v-flex> |
714 | </v-layout> | 714 | </v-layout> |
715 | </v-flex> | 715 | </v-flex> |
716 | </v-layout> | 716 | </v-layout> |
717 | <v-layout> | 717 | <v-layout> |
718 | <v-flex xs12 sm11 offset-md1> | 718 | <v-flex xs12 sm11 offset-md1> |
719 | <v-layout> | 719 | <v-layout> |
720 | <v-flex xs6> | 720 | <v-flex xs6> |
721 | <v-btn round dark @click="clear()">Clear</v-btn> | 721 | <v-btn round dark @click="clear()">Clear</v-btn> |
722 | </v-flex> | 722 | </v-flex> |
723 | <v-flex xs6> | 723 | <v-flex xs6> |
724 | <v-btn @click="submit" round dark :loading="loading" class="right">Add</v-btn> | 724 | <v-btn @click="submit" round dark :loading="loading" class="right">Add</v-btn> |
725 | </v-flex> | 725 | </v-flex> |
726 | </v-layout> | 726 | </v-layout> |
727 | </v-flex> | 727 | </v-flex> |
728 | </v-layout> | 728 | </v-layout> |
729 | </v-form> | 729 | </v-form> |
730 | </v-flex> | 730 | </v-flex> |
731 | </v-flex> | 731 | </v-flex> |
732 | </v-layout> | 732 | </v-layout> |
733 | </v-container> | 733 | </v-container> |
734 | </v-tab-item> | 734 | </v-tab-item> |
735 | </v-tabs> | 735 | </v-tabs> |
736 | <div class="loader" v-if="showLoader"> | 736 | <div class="loader" v-if="showLoader"> |
737 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 737 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
738 | </div> | 738 | </div> |
739 | </div> | 739 | </div> |
740 | </template> | 740 | </template> |
741 | 741 | ||
742 | <script> | 742 | <script> |
743 | import http from "@/Services/http.js"; | 743 | import http from "@/Services/http.js"; |
744 | import moment from "moment"; | 744 | import moment from "moment"; |
745 | import countryList from "@/script/country.js"; | 745 | import countryList from "@/script/country.js"; |
746 | 746 | ||
747 | export default { | 747 | export default { |
748 | data: () => ({ | 748 | data: () => ({ |
749 | e2: 0, | 749 | e2: 0, |
750 | snackbar: false, | 750 | snackbar: false, |
751 | y: "top", | 751 | y: "top", |
752 | x: "right", | 752 | x: "right", |
753 | mode: "", | 753 | mode: "", |
754 | timeout: 3000, | 754 | timeout: 3000, |
755 | text: "", | 755 | text: "", |
756 | showLoader: false, | 756 | showLoader: false, |
757 | loading: false, | 757 | loading: false, |
758 | date: null, | 758 | date: null, |
759 | search: "", | 759 | search: "", |
760 | menu: false, | 760 | menu: false, |
761 | menu1: false, | 761 | menu1: false, |
762 | dialog: false, | 762 | dialog: false, |
763 | valid: true, | 763 | valid: true, |
764 | isActive: true, | 764 | isActive: true, |
765 | newActive: false, | 765 | newActive: false, |
766 | pagination: { | 766 | pagination: { |
767 | rowsPerPage: 15 | 767 | rowsPerPage: 15 |
768 | }, | 768 | }, |
769 | imageData: {}, | 769 | imageData: {}, |
770 | imageName: "", | 770 | imageName: "", |
771 | imageUrl: "", | 771 | imageUrl: "", |
772 | imageFile: "", | 772 | imageFile: "", |
773 | nameRules: [v => !!v || "Full Name is required"], | 773 | nameRules: [v => !!v || "Full Name is required"], |
774 | dateRules: [v => !!v || "DOB is required"], | 774 | dateRules: [v => !!v || "DOB is required"], |
775 | cityRules: [v => !!v || "City Name is required"], | 775 | cityRules: [v => !!v || "City Name is required"], |
776 | pincode: [v => !!v || " Pincode is required"], | 776 | pincode: [v => !!v || " Pincode is required"], |
777 | country: [v => !!v || " Country Name is required"], | 777 | country: [v => !!v || " Country Name is required"], |
778 | permanentAddress: [v => !!v || " Permanent Address is requiclearred"], | 778 | permanentAddress: [v => !!v || " Permanent Address is requiclearred"], |
779 | presentAddress: [v => !!v || " Present Address is required"], | 779 | presentAddress: [v => !!v || " Present Address is required"], |
780 | mobileNoRules: [v => !!v || "Mobile Number is required"], | 780 | mobileNoRules: [v => !!v || "Mobile Number is required"], |
781 | stateRules: [v => !!v || "State Name is required"], | 781 | stateRules: [v => !!v || "State Name is required"], |
782 | schoolDetailRule: [v => !!v || "school Detail is required"], | 782 | schoolDetailRule: [v => !!v || "school Detail is required"], |
783 | sectionRules: [v => !!v || " Section Name is required"], | 783 | sectionRules: [v => !!v || " Section Name is required"], |
784 | genderRules: [v => !!v || " Select Gender is required"], | 784 | genderRules: [v => !!v || " Select Gender is required"], |
785 | establishmentYearRules: [v => !!v || " Academic Year is required"], | 785 | establishmentYearRules: [v => !!v || " Academic Year is required"], |
786 | errorMessages: "", | 786 | errorMessages: "", |
787 | emailRules: [ | 787 | emailRules: [ |
788 | v => !!v || "E-mail is required", | 788 | v => !!v || "E-mail is required", |
789 | v => | 789 | v => |
790 | /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || | 790 | /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || |
791 | "E-mail must be valid" | 791 | "E-mail must be valid" |
792 | ], | 792 | ], |
793 | countries: [], | 793 | countries: [], |
794 | headers: [ | 794 | headers: [ |
795 | { | 795 | { |
796 | text: "No.", | 796 | text: "No.", |
797 | align: "center", | 797 | align: "center", |
798 | sortable: false, | 798 | sortable: false, |
799 | value: "rollNo" | 799 | value: "rollNo" |
800 | }, | 800 | }, |
801 | { | 801 | { |
802 | text: "school Logo", | 802 | text: "school Logo", |
803 | value: "schoolLogoUrl", | 803 | value: "schoolLogoUrl", |
804 | sortable: false, | 804 | sortable: false, |
805 | align: "center" | 805 | align: "center" |
806 | }, | 806 | }, |
807 | { text: "Name", value: "name", sortable: false, align: "center" }, | 807 | { text: "Name", value: "name", sortable: false, align: "center" }, |
808 | { text: "Email", value: "email", sortable: false, align: "center" }, | 808 | { text: "Email", value: "email", sortable: false, align: "center" }, |
809 | { text: "City", value: "city", sortable: false, align: "center" }, | 809 | { text: "City", value: "city", sortable: false, align: "center" }, |
810 | { | 810 | { |
811 | text: "State", | 811 | text: "State", |
812 | value: "state", | 812 | value: "state", |
813 | sortable: false, | 813 | sortable: false, |
814 | align: "center" | 814 | align: "center" |
815 | }, | 815 | }, |
816 | { | 816 | { |
817 | text: "Mobile", | 817 | text: "Mobile", |
818 | value: "mobile", | 818 | value: "mobile", |
819 | sortable: false, | 819 | sortable: false, |
820 | align: "center" | 820 | align: "center" |
821 | }, | 821 | }, |
822 | { text: "Action", value: "", sortable: false, align: "center" } | 822 | { text: "Action", value: "", sortable: false, align: "center" } |
823 | ], | 823 | ], |
824 | schoolList: [], | 824 | schoolList: [], |
825 | editedIndex: -1, | 825 | editedIndex: -1, |
826 | addSchool: { | 826 | addSchool: { |
827 | role: "ADMIN" | 827 | role: "ADMIN" |
828 | }, | 828 | }, |
829 | editedItem: {}, | 829 | editedItem: {}, |
830 | schoolToken: {} | 830 | schoolToken: {} |
831 | }), | 831 | }), |
832 | methods: { | 832 | methods: { |
833 | getSchool() { | 833 | getSchool() { |
834 | this.showLoader = true; | 834 | this.showLoader = true; |
835 | http() | 835 | http() |
836 | .get("/getSchoolList", { | 836 | .get("/getSchoolList", { |
837 | headers: { Authorization: "Bearer " + this.schoolToken } | 837 | headers: { Authorization: "Bearer " + this.$store.state.token } |
838 | }) | 838 | }) |
839 | .then(response => { | 839 | .then(response => { |
840 | this.schoolList = response.data.data; | 840 | this.schoolList = response.data.data; |
841 | this.showLoader = false; | 841 | this.showLoader = false; |
842 | }) | 842 | }) |
843 | .catch(error => { | 843 | .catch(error => { |
844 | this.showLoader = false; | 844 | this.showLoader = false; |
845 | // if (error.response.status === 401) { | 845 | // if (error.response.status === 401) { |
846 | // this.$router.replace({ path: "/" }); | 846 | // this.$router.replace({ path: "/" }); |
847 | // this.$store.dispatch("setToken", null); | 847 | // this.$store.dispatch("setToken", null); |
848 | // this.$store.dispatch("Id", null); | 848 | // this.$store.dispatch("Id", null); |
849 | // this.$store.dispatch("Role", null); | 849 | // this.$store.dispatch("Role", null); |
850 | // } | 850 | // } |
851 | }); | 851 | }); |
852 | }, | 852 | }, |
853 | pickFile() { | 853 | pickFile() { |
854 | this.$refs.image.click(); | 854 | this.$refs.image.click(); |
855 | }, | 855 | }, |
856 | dates: function(date) { | 856 | dates: function(date) { |
857 | return moment(date).format("MMMM DD, YYYY"); | 857 | return moment(date).format("MMMM DD, YYYY"); |
858 | }, | 858 | }, |
859 | onFilePicked(e) { | 859 | onFilePicked(e) { |
860 | // console.log(e) | 860 | // console.log(e) |
861 | const files = e.target.files; | 861 | const files = e.target.files; |
862 | this.imageData.upload = e.target.files[0]; | 862 | this.imageData.upload = e.target.files[0]; |
863 | if (files[0] !== undefined) { | 863 | if (files[0] !== undefined) { |
864 | this.imageName = files[0].name; | 864 | this.imageName = files[0].name; |
865 | if (this.imageName.lastIndexOf(".") <= 0) { | 865 | if (this.imageName.lastIndexOf(".") <= 0) { |
866 | return; | 866 | return; |
867 | } | 867 | } |
868 | const fr = new FileReader(); | 868 | const fr = new FileReader(); |
869 | fr.readAsDataURL(files[0]); | 869 | fr.readAsDataURL(files[0]); |
870 | fr.addEventListener("load", () => { | 870 | fr.addEventListener("load", () => { |
871 | this.imageUrl = fr.result; | 871 | this.imageUrl = fr.result; |
872 | this.imageFile = files[0]; // this is an image file that can be sent to server... | 872 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
873 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); | 873 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); |
874 | }); | 874 | }); |
875 | } else { | 875 | } else { |
876 | this.imageName = ""; | 876 | this.imageName = ""; |
877 | this.imageFile = ""; | 877 | this.imageFile = ""; |
878 | this.imageUrl = ""; | 878 | this.imageUrl = ""; |
879 | } | 879 | } |
880 | }, | 880 | }, |
881 | editItem(item) { | 881 | editItem(item) { |
882 | this.editedIndex = this.schoolList.indexOf(item); | 882 | this.editedIndex = this.schoolList.indexOf(item); |
883 | this.editedItem = Object.assign({}, item); | 883 | this.editedItem = Object.assign({}, item); |
884 | this.dialog = true; | 884 | this.dialog = true; |
885 | }, | 885 | }, |
886 | activeTab(type) { | 886 | activeTab(type) { |
887 | switch (type) { | 887 | switch (type) { |
888 | case "existing": | 888 | case "existing": |
889 | this.newActive = false; | 889 | this.newActive = false; |
890 | this.isActive = true; | 890 | this.isActive = true; |
891 | break; | 891 | break; |
892 | 892 | ||
893 | default: | 893 | default: |
894 | this.newActive = true; | 894 | this.newActive = true; |
895 | this.isActive = false; | 895 | this.isActive = false; |
896 | break; | 896 | break; |
897 | } | 897 | } |
898 | }, | 898 | }, |
899 | close() { | 899 | close() { |
900 | this.dialog = false; | 900 | this.dialog = false; |
901 | setTimeout(() => { | 901 | setTimeout(() => { |
902 | this.editedItem = Object.assign({}, this.defaultItem); | 902 | this.editedItem = Object.assign({}, this.defaultItem); |
903 | this.editedIndex = -1; | 903 | this.editedIndex = -1; |
904 | }, 300); | 904 | }, 300); |
905 | }, | 905 | }, |
906 | submit() { | 906 | submit() { |
907 | if (this.$refs.form.validate()) { | 907 | if (this.$refs.form.validate()) { |
908 | if (this.imageUrl) { | 908 | if (this.imageUrl) { |
909 | var str = this.imageUrl; | 909 | var str = this.imageUrl; |
910 | const [baseUrl, imageUrl] = str.split(/,/); | 910 | const [baseUrl, imageUrl] = str.split(/,/); |
911 | this.addSchool.upload = imageUrl; | 911 | this.addSchool.upload = imageUrl; |
912 | } | 912 | } |
913 | this.loading = true; | 913 | this.loading = true; |
914 | http() | 914 | http() |
915 | .post("/createSchool", this.addSchool, { | 915 | .post("/createSchool", this.addSchool, { |
916 | headers: { Authorization: "Bearer " + this.schoolToken } | 916 | headers: { Authorization: "Bearer " + this.schoolToken } |
917 | 917 | ||
918 | }) | 918 | }) |
919 | .then(response => { | 919 | .then(response => { |
920 | this.snackbar = true; | 920 | this.snackbar = true; |
921 | this.text = "New School added successfully"; | 921 | this.text = "New School added successfully"; |
922 | this.clear(); | 922 | this.clear(); |
923 | this.getSchool(); | 923 | this.getSchool(); |
924 | this.loading = false; | 924 | this.loading = false; |
925 | }) | 925 | }) |
926 | .catch(error => { | 926 | .catch(error => { |
927 | this.snackbar = true; | 927 | this.snackbar = true; |
928 | this.text = error.response.data.message; | 928 | this.text = error.response.data.message; |
929 | this.loading = false; | 929 | this.loading = false; |
930 | }); | 930 | }); |
931 | } | 931 | } |
932 | }, | 932 | }, |
933 | clear() { | 933 | clear() { |
934 | this.$refs.form.reset(); | 934 | this.$refs.form.reset(); |
935 | this.imageUrl = ""; | 935 | this.imageUrl = ""; |
936 | }, | 936 | }, |
937 | save() { | 937 | save() { |
938 | if (this.imageUrl) { | 938 | if (this.imageUrl) { |
939 | var str = this.imageUrl; | 939 | var str = this.imageUrl; |
940 | const [baseUrl, imageUrl] = str.split(/,/); | 940 | const [baseUrl, imageUrl] = str.split(/,/); |
941 | this.editedItem.upload = imageUrl; | 941 | this.editedItem.upload = imageUrl; |
942 | } | 942 | } |
943 | this.editedItem.schoolId = this.editedItem._id; | 943 | this.editedItem.schoolId = this.editedItem._id; |
944 | http() | 944 | http() |
945 | .put("/updateSchool", this.editedItem) | 945 | .put("/updateSchool", this.editedItem) |
946 | .then(response => { | 946 | .then(response => { |
947 | this.snackbar = true; | 947 | this.snackbar = true; |
948 | this.text = "Successfully School Existing User"; | 948 | this.text = "Successfully School Existing User"; |
949 | this.imageUrl = ""; | 949 | this.imageUrl = ""; |
950 | this.getSchool(); | 950 | this.getSchool(); |
951 | this.close(); | 951 | this.close(); |
952 | }) | 952 | }) |
953 | .catch(error => { | 953 | .catch(error => { |
954 | // console.log(error); | 954 | // console.log(error); |
955 | if ((this.snackbar = true)) { | 955 | if ((this.snackbar = true)) { |
956 | this.text = error.response.data.statusText; | 956 | this.text = error.response.data.statusText; |
957 | } | 957 | } |
958 | }); | 958 | }); |
959 | }, | 959 | }, |
960 | adminAccess(data) { | 960 | adminAccess(data) { |
961 | // console.log("dataaaaaaaaaaaaaa", data); | 961 | // console.log("dataaaaaaaaaaaaaa", data); |
962 | this.showLoader = true; | 962 | this.showLoader = true; |
963 | http() | 963 | http() |
964 | .get("/getAdminAccess", { | 964 | .get("/getAdminAccess", { |
965 | params: { schoolId: data._id }, | 965 | params: { schoolId: data._id }, |
966 | headers: { Authorization: "Bearer " + this.schoolToken } | 966 | headers: { Authorization: "Bearer " + this.schoolToken } |
967 | }) | 967 | }) |
968 | .then(response => { | 968 | .then(response => { |
969 | this.$store.dispatch("setToken", response.data.data.token); | 969 | this.$store.dispatch("setToken", response.data.data.token); |
970 | this.$store.dispatch("Id", response.data.data.id); | 970 | this.$store.dispatch("Id", response.data.data.id); |
971 | this.$store.dispatch("Role", response.data.data.role); | 971 | this.$store.dispatch("Role", response.data.data.role); |
972 | let routeData = this.$router.resolve({ | 972 | let routeData = this.$router.resolve({ |
973 | name: "dashboardAdmin" | 973 | name: "dashboardAdmin" |
974 | }); | 974 | }); |
975 | window.open(routeData.href, "_blank"); | 975 | window.open(routeData.href, "_blank"); |
976 | this.showLoader = false; | 976 | this.showLoader = false; |
977 | }) | 977 | }) |
978 | .catch(error => { | 978 | .catch(error => { |
979 | this.showLoader = false; | 979 | this.showLoader = false; |
980 | }); | 980 | }); |
981 | }, | 981 | }, |
982 | suspendSchoolStatus(suspendStatus, id) { | 982 | suspendSchoolStatus(suspendStatus, id) { |
983 | let suspendStatusData = { | 983 | let suspendStatusData = { |
984 | schoolId: id, | 984 | schoolId: id, |
985 | status: suspendStatus | 985 | status: suspendStatus |
986 | }; | 986 | }; |
987 | http() | 987 | http() |
988 | .put("/suspendSchoolAccount", suspendStatusData, { | 988 | .put("/suspendSchoolAccount", suspendStatusData, { |
989 | headers: { Authorization: "Bearer " + this.schoolToken } | 989 | headers: { Authorization: "Bearer " + this.schoolToken } |
990 | }) | 990 | }) |
991 | .then(response => { | 991 | .then(response => { |
992 | this.getSchool(); | 992 | this.getSchool(); |
993 | this.text = response.data.message; | 993 | this.text = response.data.message; |
994 | this.snackbar = true; | 994 | this.snackbar = true; |
995 | }) | 995 | }) |
996 | .catch(error => { | 996 | .catch(error => { |
997 | // console.log(error.response.data.data); | 997 | // console.log(error.response.data.data); |
998 | this.snackbar = true; | 998 | this.snackbar = true; |
999 | this.text = error.response.data.message; | 999 | this.text = error.response.data.message; |
1000 | }); | 1000 | }); |
1001 | } | 1001 | } |
1002 | }, | 1002 | }, |
1003 | mounted() { | 1003 | mounted() { |
1004 | const getCountryList = countryList(); | 1004 | const getCountryList = countryList(); |
1005 | this.countries = getCountryList; | 1005 | this.countries = getCountryList; |
1006 | this.token = this.$store.state.token; | 1006 | this.token = this.$store.state.token; |
1007 | this.schoolToken = this.$store.state.schoolToken; | 1007 | this.schoolToken = this.$store.state.schoolToken; |
1008 | this.getSchool(); | 1008 | this.getSchool(); |
1009 | }, | 1009 | }, |
1010 | created() { | 1010 | created() { |
1011 | this.$root.$on("app:search", search => { | 1011 | this.$root.$on("app:search", search => { |
1012 | this.search = search; | 1012 | this.search = search; |
1013 | }); | 1013 | }); |
1014 | }, | 1014 | }, |
1015 | beforeDestroy() { | 1015 | beforeDestroy() { |
1016 | // dont forget to remove the listener | 1016 | // dont forget to remove the listener |
1017 | this.$root.$off("app:search"); | 1017 | this.$root.$off("app:search"); |
1018 | } | 1018 | } |
1019 | }; | 1019 | }; |
1020 | </script> | 1020 | </script> |
1021 | <style scoped> | 1021 | <style scoped> |
1022 | .active { | 1022 | .active { |
1023 | background-color: gray; | 1023 | background-color: gray; |
1024 | color: white !important; | 1024 | color: white !important; |
1025 | } | 1025 | } |
1026 | .activebtn { | 1026 | .activebtn { |
1027 | color: black !important; | 1027 | color: black !important; |
1028 | } | 1028 | } |
1029 | </style> | 1029 | </style> |