Commit 8deade1932c671bb48fc3cfe1750135df5040267
1 parent
de2bd4eb9e
Exists in
master
and in
3 other branches
token issue solved
Showing
5 changed files
with
67 additions
and
58 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 | var token = "" | 7 | // var token = "" |
8 | if (store.state.role === "ADMIN") { | 8 | // if (store.state.role === "ADMIN") { |
9 | token = `${store.state.token}` | 9 | // token = `${store.state.token}` |
10 | } else if (store.state.schoolRole === "SUPERADMIN") { | 10 | // } else if (store.state.schoolRole === "SUPERADMIN") { |
11 | token = `${store.state.schoolToken}` | 11 | // token = `${store.state.schoolToken}` |
12 | } | 12 | // } |
13 | |||
14 | // console.log("role",`${store.state.schoolRole}`); | ||
15 | // console.log("token",`${store.state.schoolToken}`); | ||
13 | export default () => { | 16 | export default () => { |
14 | return axios.create({ | 17 | return axios.create({ |
15 | // baseURL: 'http://192.168.0.127:3002/v1', | 18 | // baseURL: 'http://192.168.0.127:3002/v1', |
16 | baseURL, | 19 | baseURL, |
17 | headers: { | 20 | headers: { |
18 | Authorization: `Bearer ${token}` | 21 | Authorization: `Bearer ${store.state.token}` |
19 | } | 22 | } |
20 | }) | 23 | }) |
21 | } | 24 | } |
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: { | 110 | // headers: { |
111 | // Authorization: "Bearer " + this.$store.state.token | 111 | // Authorization: "Bearer " + this.$store.state.token |
112 | // } | 112 | // } |
113 | }) | 113 | }) |
114 | .then(response => { | 114 | .then(response => { |
115 | this.userData = response.data.data; | 115 | this.userData = response.data.data; |
116 | }) | 116 | }) |
117 | .catch(error => { | 117 | .catch(error => { |
118 | // if (error.response.status === 401) { | 118 | // if (error.response.status === 401) { |
119 | // this.$router.replace({ path: "/" }); | 119 | // this.$router.replace({ path: "/" }); |
120 | // this.$store.dispatch("setToken", null); | 120 | // this.$store.dispatch("setToken", null); |
121 | // this.$store.dispatch("Id", null); | 121 | // this.$store.dispatch("Id", null); |
122 | // } | 122 | // } |
123 | }); | 123 | }); |
124 | } | 124 | } |
125 | } | 125 | } |
126 | }; | 126 | }; |
127 | </script> | 127 | </script> |
128 | <style> | 128 | <style> |
129 | .v-icon { | 129 | .v-icon { |
130 | font-size: 30px; | 130 | font-size: 30px; |
131 | } | 131 | } |
132 | .fixcolors { | 132 | .fixcolors { |
133 | background: #444b54 !important; | 133 | background: #444b54 !important; |
134 | } | 134 | } |
135 | 135 | ||
136 | @media screen and (min-width: 1270px) { | 136 | @media screen and (min-width: 1270px) { |
137 | .hide { | 137 | .hide { |
138 | display: none; | 138 | display: none; |
139 | } | 139 | } |
140 | /* } | 140 | /* } |
141 | @media screen and (max-width: 962px) { | 141 | @media screen and (max-width: 962px) { |
142 | .imglogo{ | 142 | .imglogo{ |
143 | position: absolute; | 143 | position: absolute; |
144 | top: 13px; | 144 | top: 13px; |
145 | left: 13px !important; | 145 | left: 13px !important; |
146 | width: 70px; | 146 | width: 70px; |
147 | height: 24px; | 147 | height: 24px; |
148 | } */ | 148 | } */ |
149 | } | 149 | } |
150 | @media screen and (max-width: 420px) { | 150 | @media screen and (max-width: 420px) { |
151 | .v-list__tile { | 151 | .v-list__tile { |
152 | font-size: 14px; | 152 | font-size: 14px; |
153 | padding: 0 10px; | 153 | padding: 0 10px; |
154 | } | 154 | } |
155 | .name { | 155 | .name { |
156 | font-size: 15px; | 156 | font-size: 15px; |
157 | } | 157 | } |
158 | } | 158 | } |
159 | </style> | 159 | </style> |
160 | 160 |
src/pages/Authentication/Login.vue
1 | <template> | 1 | <template> |
2 | <v-app id="login"> | 2 | <v-app id="login"> |
3 | <v-content> | 3 | <v-content> |
4 | <v-container fluid fill-height> | 4 | <v-container fluid fill-height> |
5 | <v-snackbar | 5 | <v-snackbar |
6 | :timeout="timeout" | 6 | :timeout="timeout" |
7 | :top="y === 'top'" | 7 | :top="y === 'top'" |
8 | :right="x === 'right'" | 8 | :right="x === 'right'" |
9 | :vertical="mode === 'vertical'" | 9 | :vertical="mode === 'vertical'" |
10 | v-model="snackbar" | 10 | v-model="snackbar" |
11 | :color="color" | 11 | :color="color" |
12 | >{{ text }}</v-snackbar> | 12 | >{{ text }}</v-snackbar> |
13 | <v-layout align-center justify-center> | 13 | <v-layout align-center justify-center> |
14 | <v-flex xs12 sm10 md6 lg4> | 14 | <v-flex xs12 sm10 md6 lg4> |
15 | <v-toolbar dense flat class="transparent mb-4"> | 15 | <v-toolbar dense flat class="transparent mb-4"> |
16 | <v-toolbar-items class="mx-auto"> | 16 | <v-toolbar-items class="mx-auto"> |
17 | <img src="/static/icon.png" height="40" width="140" alt="logo" class="logo"/> | 17 | <img src="/static/icon.png" height="40" width="140" alt="logo" class="logo"/> |
18 | <!-- <h3 class="white--text my-3 ml-5 logoSchool">School-Management</h3> --> | 18 | <!-- <h3 class="white--text my-3 ml-5 logoSchool">School-Management</h3> --> |
19 | </v-toolbar-items> | 19 | </v-toolbar-items> |
20 | </v-toolbar> | 20 | </v-toolbar> |
21 | 21 | ||
22 | <v-card class="elevation-1 pa-1 card" style="background-color: #7852cc" dark> | 22 | <v-card class="elevation-1 pa-1 card" style="background-color: #7852cc" dark> |
23 | <img | 23 | <img |
24 | src="/static/intrackIllustration.png" | 24 | src="/static/intrackIllustration.png" |
25 | class="mx-auto logoSchool" | 25 | class="mx-auto logoSchool" |
26 | style="display:block" | 26 | style="display:block" |
27 | width="400" | 27 | width="400" |
28 | /> | 28 | /> |
29 | <v-card-text align-center justify-center> | 29 | <v-card-text align-center justify-center> |
30 | <v-toolbar-title class="text-xs-center my-4 subheadline">SCHOOL LOGIN</v-toolbar-title> | 30 | <v-toolbar-title class="text-xs-center my-4 subheadline">SCHOOL LOGIN</v-toolbar-title> |
31 | <v-flex xs12 sm12 md12 lg12> | 31 | <v-flex xs12 sm12 md12 lg12> |
32 | <v-form ref="form" v-model="valid" lazy-validation> | 32 | <v-form ref="form" v-model="valid" lazy-validation> |
33 | <label class="title">Email</label> | 33 | <label class="title">Email</label> |
34 | <v-text-field | 34 | <v-text-field |
35 | v-model.trim="userLogincredentials.email" | 35 | v-model.trim="userLogincredentials.email" |
36 | :rules="nameRules" | 36 | :rules="nameRules" |
37 | placeholder="Enter your email" | 37 | placeholder="Enter your email" |
38 | required | 38 | required |
39 | ></v-text-field> | 39 | ></v-text-field> |
40 | <label class="title">Password</label> | 40 | <label class="title">Password</label> |
41 | <v-text-field | 41 | <v-text-field |
42 | :rules="[rules.required]" | 42 | :rules="[rules.required]" |
43 | v-model.trim="userLogincredentials.password" | 43 | v-model.trim="userLogincredentials.password" |
44 | :append-icon="e1 ? 'visibility_off' : 'visibility'" | 44 | :append-icon="e1 ? 'visibility_off' : 'visibility'" |
45 | :append-icon-cb="() => (e1 = !e1)" | 45 | :append-icon-cb="() => (e1 = !e1)" |
46 | :type="e1 ? 'password' : 'text'" | 46 | :type="e1 ? 'password' : 'text'" |
47 | name="input-10-1" | 47 | name="input-10-1" |
48 | placeholder="Enter Your password" | 48 | placeholder="Enter Your password" |
49 | @keyup.enter="login" | 49 | @keyup.enter="login" |
50 | counter | 50 | counter |
51 | ></v-text-field> | 51 | ></v-text-field> |
52 | </v-form> | 52 | </v-form> |
53 | <v-layout row wrap> | 53 | <v-layout row wrap> |
54 | <v-flex xs6> | 54 | <v-flex xs6> |
55 | <!-- <v-checkbox :label="`Remember me`" v-model="remember"></v-checkbox> --> | 55 | <!-- <v-checkbox :label="`Remember me`" v-model="remember"></v-checkbox> --> |
56 | </v-flex> | 56 | </v-flex> |
57 | <v-flex xs6> | 57 | <v-flex xs6> |
58 | <h5 class="right mt-4"> | 58 | <h5 class="right mt-4"> |
59 | <router-link class="link" to="/forgetpassword">Forgot password</router-link> | 59 | <router-link class="link" to="/forgetpassword">Forgot password</router-link> |
60 | </h5> | 60 | </h5> |
61 | </v-flex> | 61 | </v-flex> |
62 | </v-layout> | 62 | </v-layout> |
63 | </v-flex> | 63 | </v-flex> |
64 | </v-card-text> | 64 | </v-card-text> |
65 | <v-layout> | 65 | <v-layout> |
66 | <v-flex sm12 class="my-3"> | 66 | <v-flex sm12 class="my-3"> |
67 | <v-btn | 67 | <v-btn |
68 | style="margin: auto;display: block;background-color: #71d9ea; color: #0c0754;" | 68 | style="margin: auto;display: block;background-color: #71d9ea; color: #0c0754;" |
69 | dark | 69 | dark |
70 | flat | 70 | flat |
71 | @click="login" | 71 | @click="login" |
72 | :loading="loading" | 72 | :loading="loading" |
73 | >Login</v-btn> | 73 | >Login</v-btn> |
74 | </v-flex> | 74 | </v-flex> |
75 | </v-layout> | 75 | </v-layout> |
76 | <v-layout></v-layout> | 76 | <v-layout></v-layout> |
77 | </v-card> | 77 | </v-card> |
78 | </v-flex> | 78 | </v-flex> |
79 | </v-layout> | 79 | </v-layout> |
80 | </v-container> | 80 | </v-container> |
81 | </v-content> | 81 | </v-content> |
82 | </v-app> | 82 | </v-app> |
83 | </template> | 83 | </template> |
84 | 84 | ||
85 | <script> | 85 | <script> |
86 | import http from "@/Services/http.js"; | 86 | import http from "@/Services/http.js"; |
87 | export default { | 87 | export default { |
88 | data() { | 88 | data() { |
89 | return { | 89 | return { |
90 | snackbar: false, | 90 | snackbar: false, |
91 | y: "top", | 91 | y: "top", |
92 | x: "right", | 92 | x: "right", |
93 | mode: "", | 93 | mode: "", |
94 | timeout: 3000, | 94 | timeout: 3000, |
95 | text: "", | 95 | text: "", |
96 | e1: true, | 96 | e1: true, |
97 | loading: false, | 97 | loading: false, |
98 | remember: false, | 98 | remember: false, |
99 | valid: false, | 99 | valid: false, |
100 | userLogincredentials: {}, | 100 | userLogincredentials: {}, |
101 | nameRules: [v => !!v || "Username is required"], | 101 | nameRules: [v => !!v || "Username is required"], |
102 | password: "", | 102 | password: "", |
103 | email: "", | 103 | email: "", |
104 | rules: { | 104 | rules: { |
105 | required: value => !!value || "password is Required." | 105 | required: value => !!value || "password is Required." |
106 | } | 106 | } |
107 | }; | 107 | }; |
108 | }, | 108 | }, |
109 | methods: { | 109 | methods: { |
110 | login() { | 110 | login() { |
111 | this.loading = true; | 111 | this.loading = true; |
112 | var userdata = { | 112 | var userdata = { |
113 | email: this.userLogincredentials.email, | 113 | email: this.userLogincredentials.email, |
114 | password: this.userLogincredentials.password | 114 | password: this.userLogincredentials.password |
115 | }; | 115 | }; |
116 | http() | 116 | http() |
117 | .post("/schoolLogin", userdata) | 117 | .post("/schoolLogin", userdata) |
118 | .then(response => { | 118 | .then(response => { |
119 | this.loading = false; | 119 | this.loading = false; |
120 | if (response.data.data.role === "ADMIN") { | 120 | if (response.data.data.role === "ADMIN") { |
121 | this.$store.dispatch("setToken", response.data.data.token); | 121 | this.$store.dispatch("setToken", response.data.data.token); |
122 | this.$store.dispatch("Id", response.data.data.id); | 122 | this.$store.dispatch("Id", response.data.data.id); |
123 | this.$store.dispatch("Role", response.data.data.role); | 123 | this.$store.dispatch("Role", response.data.data.role); |
124 | this.$router.push("/dashboard"); | 124 | this.$router.push("/dashboard"); |
125 | } else if (response.data.data.role === "SUPERADMIN") { | 125 | } else if (response.data.data.role === "SUPERADMIN") { |
126 | this.$store.dispatch("setSchoolRole", response.data.data.role); | 126 | this.$store.dispatch("setSchoolRole", response.data.data.role); |
127 | this.$store.dispatch("setSchoolToken", response.data.data.token); | 127 | this.$store.dispatch("setSchoolToken", response.data.data.token); |
128 | this.$router.push("/dashboard"); | 128 | this.$router.push("/dashboard"); |
129 | } else if (response.data.data.role === "LIBRARIAN") { | 129 | } else if (response.data.data.role === "LIBRARIAN") { |
130 | this.$store.dispatch("setToken", response.data.data.token); | 130 | this.$store.dispatch("setToken", response.data.data.token); |
131 | this.$store.dispatch("Id", response.data.data.id); | 131 | this.$store.dispatch("Id", response.data.data.id); |
132 | this.$store.dispatch("Role", response.data.data.role); | 132 | this.$store.dispatch("Role", response.data.data.role); |
133 | this.$router.push("/dashboard"); | 133 | this.$router.push("/dashboard"); |
134 | } else if (response.data.data.role === "ACCOUNTANT") { | 134 | } else if (response.data.data.role === "ACCOUNTANT") { |
135 | this.$store.dispatch("setToken", response.data.data.token); | 135 | this.$store.dispatch("setToken", response.data.data.token); |
136 | this.$store.dispatch("Id", response.data.data.id); | 136 | this.$store.dispatch("Id", response.data.data.id); |
137 | this.$store.dispatch("Role", response.data.data.role); | 137 | this.$store.dispatch("Role", response.data.data.role); |
138 | this.$router.push("/dashboard"); | 138 | this.$router.push("/dashboard"); |
139 | } | 139 | } |
140 | }) | 140 | }) |
141 | .catch(error => { | 141 | .catch(error => { |
142 | if (error) { | 142 | if (error) { |
143 | this.text = "Server appears to be offline"; | 143 | this.text = "Server appears to be offline"; |
144 | this.snackbar = true; | 144 | this.snackbar = true; |
145 | this.loading = false; | 145 | this.loading = false; |
146 | } | 146 | } |
147 | if (error.response.data.message) { | 147 | if (error.response.data.message) { |
148 | this.text = error.response.data.message; | 148 | this.text = error.response.data.message; |
149 | this.snackbar = true; | 149 | this.snackbar = true; |
150 | } | 150 | } |
151 | this.loading = false; | 151 | this.loading = false; |
152 | }); | 152 | }); |
153 | } | 153 | } |
154 | }, | 154 | }, |
155 | mounted() { | 155 | mounted() { |
156 | if (this.$store.state.isUserLoggedIn == true) { | 156 | if (this.$store.state.isUserLoggedIn == true) { |
157 | this.$router.push("/dashboard"); | 157 | this.$router.push("/dashboard"); |
158 | } | 158 | } |
159 | // else if (this.$store.state.isSchoolLoggedIn == true) { | 159 | else if (this.$store.state.isSchoolLoggedIn == true) { |
160 | // this.$router.push("/school"); | 160 | this.$router.push("/dashboard"); |
161 | // } | 161 | } |
162 | }, | 162 | }, |
163 | computed: { | 163 | computed: { |
164 | color() { | 164 | color() { |
165 | return this.loading ? "success" : "error"; | 165 | return this.loading ? "success" : "error"; |
166 | } | 166 | } |
167 | } | 167 | } |
168 | }; | 168 | }; |
169 | </script> | 169 | </script> |
170 | 170 | ||
171 | <style scoped lang="css"> | 171 | <style scoped lang="css"> |
172 | #login { | 172 | #login { |
173 | width: 100%; | 173 | width: 100%; |
174 | position: absolute; | 174 | position: absolute; |
175 | top: 0; | 175 | top: 0; |
176 | left: 0; | 176 | left: 0; |
177 | content: ""; | 177 | content: ""; |
178 | z-index: 0; | 178 | z-index: 0; |
179 | } | 179 | } |
180 | </style> | 180 | </style> |
181 | <style scoped> | 181 | <style scoped> |
182 | .schoolLogo { | 182 | .schoolLogo { |
183 | height: 60%; | 183 | height: 60%; |
184 | padding-left: 31%; | 184 | padding-left: 31%; |
185 | } | 185 | } |
186 | /* img { | 186 | /* img { |
187 | position: absolute; | 187 | position: absolute; |
188 | top: 13px; | 188 | top: 13px; |
189 | left: 8px; | 189 | left: 8px; |
190 | } */ | 190 | } */ |
191 | .v-btn--large { | 191 | .v-btn--large { |
192 | padding: 0px 84px; | 192 | padding: 0px 84px; |
193 | } | 193 | } |
194 | .link { | 194 | .link { |
195 | text-decoration: none; | 195 | text-decoration: none; |
196 | } | 196 | } |
197 | a { | 197 | a { |
198 | color: #fff; | 198 | color: #fff; |
199 | } | 199 | } |
200 | .mt-4 { | 200 | .mt-4 { |
201 | margin-top: 21px !important; | 201 | margin-top: 21px !important; |
202 | } | 202 | } |
203 | @media screen and (max-width: 600px) { | 203 | @media screen and (max-width: 600px) { |
204 | img { | 204 | img { |
205 | left: 10px; | 205 | left: 10px; |
206 | height: 34px; | 206 | height: 34px; |
207 | width: 120px; | 207 | width: 120px; |
208 | } | 208 | } |
209 | .logo { | 209 | .logo { |
210 | height: 56px; | 210 | height: 56px; |
211 | left: 10px; | 211 | left: 10px; |
212 | width: 120px; | 212 | width: 120px; |
213 | } | 213 | } |
214 | .logoSchool { | 214 | .logoSchool { |
215 | height: 87px; | 215 | height: 87px; |
216 | left: 10px; | 216 | left: 10px; |
217 | width: 120px; | 217 | width: 120px; |
218 | } | 218 | } |
219 | } | 219 | } |
220 | </style> | 220 | </style> |
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.$store.state.schoolToken; |
422 | // console.log("this.$store.state.role", this.$store.state.schoolRole); | 422 | // console.log("this.$store.state.role", this.token); |
423 | if (this.$store.state.role === "ADMIN") { | ||
424 | this.token = this.$store.state.token; | ||
425 | } else if (this.$store.state.schoolRole === "SUPERADMIN") { | ||
426 | this.token = this.$store.state.schoolToken; | ||
427 | } | ||
428 | // console.log("role", this.$store.state.schoolRole,"tt",this.$store.state.schoolToken); | ||
423 | // this.getData(); | 429 | // this.getData(); |
424 | this.getStudents(); | 430 | this.getStudents(); |
425 | this.getTeachers(); | 431 | this.getTeachers(); |
426 | this.getParents(); | 432 | this.getParents(); |
427 | this.getClasses(); | 433 | this.getClasses(); |
428 | this.getNoticeData(); | 434 | this.getNoticeData(); |
429 | this.getUserData(); | 435 | this.getUserData(); |
430 | // this.getUsersList(); | 436 | // this.getUsersList(); |
431 | }, | 437 | }, |
432 | methods: { | 438 | methods: { |
433 | closeNotice() { | 439 | closeNotice() { |
434 | this.dialogNotice = false; | 440 | this.dialogNotice = false; |
435 | }, | 441 | }, |
436 | profile() { | 442 | profile() { |
437 | // this.editedIndex = this.desserts.indexOf(item); | 443 | // this.editedIndex = this.desserts.indexOf(item); |
438 | // this.notice = Object.assign({}, item); | 444 | // this.notice = Object.assign({}, item); |
439 | // this.dialogNotice = true; | 445 | // this.dialogNotice = true; |
440 | this.$router.push({ name: "NoticeBoard" }); | 446 | this.$router.push({ name: "NoticeBoard" }); |
441 | }, | 447 | }, |
442 | date: function(date) { | 448 | date: function(date) { |
443 | return moment(date).format("MMMM DD, YYYY HH:mm"); | 449 | return moment(date).format("MMMM DD, YYYY HH:mm"); |
444 | }, | 450 | }, |
445 | refreshEvents() { | 451 | refreshEvents() { |
446 | this.$refs.calendar.$emit("refetch-events"); | 452 | this.$refs.calendar.$emit("refetch-events"); |
447 | }, | 453 | }, |
448 | removeEvent() { | 454 | removeEvent() { |
449 | this.$refs.calendar.$emit("remove-event", this.selected); | 455 | this.$refs.calendar.$emit("remove-event", this.selected); |
450 | this.selected = {}; | 456 | this.selected = {}; |
451 | }, | 457 | }, |
452 | eventSelected(event) { | 458 | eventSelected(event) { |
453 | this.selected = event; | 459 | this.selected = event; |
454 | console.log("this.selected", this.selected); | 460 | console.log("this.selected", this.selected); |
455 | }, | 461 | }, |
456 | // eventDropStart: function(event) { | 462 | // eventDropStart: function(event) { |
457 | // event.editable = false; | 463 | // event.editable = false; |
458 | // }, | 464 | // }, |
459 | eventCreated(...test) { | 465 | eventCreated(...test) { |
460 | console.log(test); | 466 | console.log(test); |
461 | }, | 467 | }, |
462 | getStudents() { | 468 | getStudents() { |
463 | http() | 469 | http() |
464 | .get("/getStudentsList", { | 470 | .get("/getStudentsList", { |
465 | // headers: { | 471 | headers: { |
466 | // Authorization: "Bearer " + this.$store.state.token | 472 | Authorization: "Bearer " + this.token |
467 | // } | 473 | } |
468 | }) | 474 | }) |
469 | .then(response => { | 475 | .then(response => { |
470 | this.students = response.data.data; | 476 | this.students = response.data.data; |
471 | this.showLoader = false; | 477 | this.showLoader = false; |
472 | }) | 478 | }) |
473 | .catch(error => { | 479 | .catch(error => { |
474 | // console.log("err====>", err); | 480 | // console.log("err====>", err); |
475 | this.showLoader = false; | 481 | this.showLoader = false; |
476 | if (error.response.status === 401) { | 482 | // if (error.response.status === 401) { |
477 | this.$router.replace({ path: "/" }); | 483 | // this.$router.replace({ path: "/" }); |
478 | this.$store.dispatch("setToken", null); | 484 | // this.$store.dispatch("setToken", null); |
479 | this.$store.dispatch("Id", null); | 485 | // this.$store.dispatch("Id", null); |
480 | } | 486 | // } |
481 | }); | 487 | }); |
482 | }, | 488 | }, |
483 | getParents() { | 489 | getParents() { |
484 | http() | 490 | http() |
485 | .get("/getParentsList", { | 491 | .get("/getParentsList", { |
486 | // headers: { | 492 | headers: { |
487 | // Authorization: "Bearer " + this.$store.state.token | 493 | Authorization: "Bearer " + this.token |
488 | // } | 494 | } |
489 | }) | 495 | }) |
490 | .then(response => { | 496 | .then(response => { |
491 | this.parents = response.data.data; | 497 | this.parents = response.data.data; |
492 | this.showLoader = false; | 498 | this.showLoader = false; |
493 | }) | 499 | }) |
494 | .catch(error => { | 500 | .catch(error => { |
495 | // console.log("err====>", err); | 501 | // console.log("err====>", err); |
496 | this.showLoader = false; | 502 | this.showLoader = false; |
497 | if (error.response.status === 401) { | 503 | // if (error.response.status === 401) { |
498 | this.$router.replace({ path: "/" }); | 504 | // this.$router.replace({ path: "/" }); |
499 | this.$store.dispatch("setToken", null); | 505 | // this.$store.dispatch("setToken", null); |
500 | this.$store.dispatch("Id", null); | 506 | // this.$store.dispatch("Id", null); |
501 | } | 507 | // } |
502 | }); | 508 | }); |
503 | }, | 509 | }, |
504 | getTeachers() { | 510 | getTeachers() { |
505 | http() | 511 | http() |
506 | .get("/getTeachersList", { | 512 | .get("/getTeachersList", { |
507 | // headers: { | 513 | headers: { |
508 | // Authorization: "Bearer " + this.$store.state.token | 514 | Authorization: "Bearer " + this.token |
509 | // } | 515 | } |
510 | }) | 516 | }) |
511 | .then(response => { | 517 | .then(response => { |
512 | this.teachers = response.data.data; | 518 | this.teachers = response.data.data; |
513 | this.showLoader = false; | 519 | this.showLoader = false; |
514 | }) | 520 | }) |
515 | .catch(error => { | 521 | .catch(error => { |
516 | // console.log("err====>", err); | 522 | // console.log("err====>", err); |
517 | this.showLoader = false; | 523 | this.showLoader = false; |
518 | if (error.response.status === 401) { | 524 | // if (error.response.status === 401) { |
519 | this.$router.replace({ path: "/" }); | 525 | // this.$router.replace({ path: "/" }); |
520 | this.$store.dispatch("setToken", null); | 526 | // this.$store.dispatch("setToken", null); |
521 | this.$store.dispatch("Id", null); | 527 | // this.$store.dispatch("Id", null); |
522 | } | 528 | // } |
523 | }); | 529 | }); |
524 | }, | 530 | }, |
525 | getClasses() { | 531 | getClasses() { |
526 | http() | 532 | http() |
527 | .get("/getClassesList", { | 533 | .get("/getClassesList", { |
528 | // headers: { | 534 | headers: { |
529 | // Authorization: "Bearer " + this.$store.state.token | 535 | Authorization: "Bearer " + this.token |
530 | // } | 536 | } |
531 | }) | 537 | }) |
532 | .then(response => { | 538 | .then(response => { |
533 | this.classes = response.data.data; | 539 | this.classes = response.data.data; |
534 | this.showLoader = false; | 540 | this.showLoader = false; |
535 | }) | 541 | }) |
536 | .catch(error => { | 542 | .catch(error => { |
537 | this.showLoader = false; | 543 | this.showLoader = false; |
538 | if (error.response.status === 401) { | 544 | // if (error.response.status === 401) { |
539 | this.$router.replace({ path: "/" }); | 545 | // this.$router.replace({ path: "/" }); |
540 | this.$store.dispatch("setToken", null); | 546 | // this.$store.dispatch("setToken", null); |
541 | this.$store.dispatch("Id", null); | 547 | // this.$store.dispatch("Id", null); |
542 | this.$store.dispatch("Role", null); | 548 | // this.$store.dispatch("Role", null); |
543 | } | 549 | // } |
544 | }); | 550 | }); |
545 | }, | 551 | }, |
546 | getNoticeData() { | 552 | getNoticeData() { |
547 | this.showLoader = true; | 553 | this.showLoader = true; |
548 | http() | 554 | http() |
549 | .get("/getEventsList", { | 555 | .get("/getEventsList", { |
550 | // headers: { | 556 | headers: { |
551 | // Authorization: "Bearer " + this.$store.state.token | 557 | Authorization: "Bearer " + this.token |
552 | // } | 558 | } |
553 | }) | 559 | }) |
554 | .then(response => { | 560 | .then(response => { |
555 | this.noticeData = response.data.data; | 561 | this.noticeData = response.data.data; |
556 | this.showLoader = false; | 562 | this.showLoader = false; |
557 | }) | 563 | }) |
558 | .catch(error => { | 564 | .catch(error => { |
559 | this.showLoader = false; | 565 | this.showLoader = false; |
560 | if (error.response.status === 401) { | 566 | // if (error.response.status === 401) { |
561 | this.$router.replace({ path: "/" }); | 567 | // this.$router.replace({ path: "/" }); |
562 | this.$store.dispatch("setToken", null); | 568 | // this.$store.dispatch("setToken", null); |
563 | this.$store.dispatch("Id", null); | 569 | // this.$store.dispatch("Id", null); |
564 | } | 570 | // } |
565 | }); | 571 | }); |
566 | }, | 572 | }, |
567 | getUserData() { | 573 | getUserData() { |
568 | // this.showLoader = true; | 574 | // this.showLoader = true; |
569 | http() | 575 | http() |
570 | .get("/getParticularUserDetail", { | 576 | .get("/getParticularUserDetail", { |
571 | // headers: { | 577 | headers: { |
572 | // Authorization: "Bearer " + this.$store.state.token | 578 | Authorization: "Bearer " + this.token |
573 | // } | 579 | } |
574 | }) | 580 | }) |
575 | .then(response => { | 581 | .then(response => { |
576 | this.userData = response.data.data; | 582 | this.userData = response.data.data; |
577 | this.showLoader = false; | 583 | this.showLoader = false; |
578 | }) | 584 | }) |
579 | .catch(error => { | 585 | .catch(error => { |
580 | this.showLoader = false; | 586 | this.showLoader = false; |
581 | // if (error.response.status === 401) { | 587 | // if (error.response.status === 401) { |
582 | // this.$router.replace({ path: "/" }); | 588 | // this.$router.replace({ path: "/" }); |
583 | // this.$store.dispatch("setToken", null); | 589 | // this.$store.dispatch("setToken", null); |
584 | // this.$store.dispatch("Id", null); | 590 | // this.$store.dispatch("Id", null); |
585 | // } | 591 | // } |
586 | }); | 592 | }); |
587 | } | 593 | } |
588 | } | 594 | } |
589 | }; | 595 | }; |
590 | </script> | 596 | </script> |
591 | 597 | ||
592 | <style scoped> | 598 | <style scoped> |
593 | @import "fullcalendar/dist/fullcalendar.css"; | 599 | @import "fullcalendar/dist/fullcalendar.css"; |
594 | </style> | 600 | </style> |
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.$store.state.token } | 837 | headers: { Authorization: "Bearer " + this.$store.state.schoolToken } |
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> |