promotion.vue
7.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<template>
<v-app id="login">
<v-container fluid>
<v-card class="px-3 grey lighten-2" flat>
<v-flex xs12>
<v-layout wrap>
<v-flex xs12 sm12 md3>
<v-flex md12 class="mt-4 body-1">
<label>Academic Year :</label>
</v-flex>
<v-flex md10>
<v-select
:items="acedemicYear"
v-model="promotion.year"
item-value="year"
item-text="year"
label="promotion.year"
></v-select>
</v-flex>
</v-flex>
<v-flex xs12 sm12 md3>
<v-flex md12 class="mt-4 body-1">
<label class>Class :</label>
</v-flex>
<v-flex md10 class="ml-2">
<v-select
v-model="promotion.classId"
label="Select your class"
type="text"
:items="classList"
item-text="classNum"
item-value="_id"
required
></v-select>
</v-flex>
</v-flex>
<v-flex xs12 sm12 md3>
<v-flex md12 class="mt-4 body-1">
<label>Promotion Academic Year :</label>
</v-flex>
<v-flex md10>
<v-select
:items="acedemicYear"
v-model="promotion.year"
item-text="year"
label="Select Promotion Academic Year"
></v-select>
</v-flex>
</v-flex>
<v-flex xs12 sm12 md3>
<v-flex md12 class="mt-4 body-1">
<label class>Promotion Class :</label>
</v-flex>
<v-flex md10 class="ml-2">
<v-select :items="acedemicYear" label="Select Promotion Class"></v-select>
</v-flex>
</v-flex>
</v-layout>
</v-flex>
</v-card>
<!-- <v-container class="pb-0">
<v-card class="px-3 grey lighten-2" flat>
<v-flex xs12>
<v-layout>
<v-flex xs12 sm12 md12>
<v-layout>
<v-radio-group v-model="radios" :mandatory="false">
<v-layout>
<v-flex xs12 sm12 md6>
<v-layout>
<v-radio label="Normal" value="radio-1" class="mx-auto"></v-radio>
</v-layout>
</v-flex>
<v-flex xs12 sm12 md6>
<v-layout>
<v-radio label="Advance" value="radio-2" class="mx-auto"></v-radio>
</v-layout>
</v-flex>
</v-layout>
</v-radio-group>
</v-layout>
</v-flex>
</v-layout>
</v-flex>
</v-card>
</v-container>
<v-container fluid>
<v-layout wrap>
<v-flex xs12 sm12 md6>
<v-layout>
<v-flex xs12 sm12 md11>
<v-card class="px-3 grey lighten-2" flat>
<v-layout wrap>
<v-flex xs12 sm12 md5 class="mt-4 body-1">
<label>Exam</label>
</v-flex>
<v-flex sm12 xs12 md7>
<v-checkbox v-model="selected" label="FIRST TERMINAL" value="John"></v-checkbox>
<v-checkbox
v-model="selected"
label="SECOND TERMINAL"
value="Jacob"
class="mt-0"
></v-checkbox>
<v-checkbox v-model="selected" label="Test07" value="Jacobs" class="mt-0"></v-checkbox>
</v-flex>
</v-layout>
</v-card>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs12 sm12 md6>
<v-layout wrap>
<v-flex xs12 sm12 md12>
<v-card class="px-3 grey lighten-2" flat height="160">
<v-layout wrap>
<v-flex xs12 sm12 md5 class="mt-4 body-1">
<label>Mark Percentage</label>
</v-flex>
<v-flex xs12 sm12 md7>
<v-checkbox v-model="selected" label="Exam " value="John"></v-checkbox>
<v-checkbox v-model="selected" label="ASSIGNMENT" value="Jacob" class="mt-0"></v-checkbox>
</v-flex>
</v-layout>
</v-card>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-container>
<v-card class="px-3 grey lighten-2" flat>
<v-flex xs12>
<v-layout wrap>
<v-flex xs12 sm12 md3>
<v-flex md12 class="mt-4 body-1">
<label>HINDI Pass Mark :</label>
</v-flex>
<v-flex md10>
<v-text-field v-model="passmark.hindi" placeholder="fill Hindi Pass Mark"></v-text-field>
</v-flex>
</v-flex>
<v-flex xs12 sm12 md3>
<v-flex md12 class="mt-4 body-1">
<label class>ENGLISH Pass Mark :</label>
</v-flex>
<v-flex md10 class="ml-2">
<v-text-field v-model="passmark.english" placeholder="fill English Pass Mark"></v-text-field>
</v-flex>
</v-flex>
<v-flex xs12 sm12 md3>
<v-flex md12 class="mt-4 body-1">
<label>MATHEMATICS Pass Mark :</label>
</v-flex>
<v-flex md10>
<v-text-field
v-model="passmark.mathematics"
placeholder="fill Mathematics Pass Mark"
></v-text-field>
</v-flex>
</v-flex>
</v-layout>
</v-flex>
</v-card>-->
<v-layout>
<v-flex xs10 sm10 md4 class="mx-auto mt-4">
<v-btn class="black" dark block round>Promotion Mark Setting</v-btn>
</v-flex>
</v-layout>
</v-container>
</v-app>
</template>
<script>
import http from "@/Services/http.js";
export default {
data() {
return {
radios: "radio-1",
acedemicYear: [],
classList: [],
promotion: {
// academicYear: ""
},
passmark: {
hindi: "40",
english: "40",
mathematics: "40"
},
selected: ["John", "Jacob", "Jacobs"],
token: ""
};
},
mounted() {
var year = new Date().getFullYear() + 1;
// this.promotion.acedemicYear = new Date().getFullYear() + "-" + year;
this.acedemicYear.push({ year: new Date().getFullYear() + "-" + year });
console.log(" this.promotion.acedemicYear ", this.acedemicYear);
this.token = this.$store.state.token;
this.getClass();
},
methods: {
getClass() {
http()
.get("/getClassesList", {
headers: { Authorization: "Bearer " + this.token }
})
.then(response => {
this.classList = response.data.data;
})
.catch(error => {
this.showLoader = false;
if (error.response.status === 401) {
this.$router.replace({ path: "/" });
this.$store.dispatch("setToken", null);
this.$store.dispatch("Id", null);
this.$store.dispatch("Role", null);
}
});
}
}
};
</script>