{
@@ -543,6 +546,7 @@ export default {
},
submit() {
this.BooksData.quantity = Number(this.BooksData.quantity);
+ this.BooksData.schoolId = this.$store.state.schoolId;
if (this.$refs.form.validate()) {
this.loading = true;
http()
diff --git a/src/pages/Library/eBook.vue b/src/pages/Library/eBook.vue
index 5c5676a..1b62e09 100644
--- a/src/pages/Library/eBook.vue
+++ b/src/pages/Library/eBook.vue
@@ -55,14 +55,14 @@
/>
-
+
@@ -537,6 +537,7 @@ export default {
this.showLoader = true;
http()
.get("/getEBooksList", {
+ params: { schoolId: this.$store.state.schoolId },
headers: { Authorization: "Bearer " + this.token }
})
.then(response => {
@@ -642,6 +643,7 @@ export default {
this.addEBooks.uploadFile = fileUrl;
// console.log("anyFile.split(/,/)", this.addEBooks.uploadFile);
}
+ this.addEBooks = this.$store.state.schoolId;
http()
.post("/createEBook", this.addEBooks)
.then(response => {
diff --git a/src/pages/Library/issue.vue b/src/pages/Library/issue.vue
index 4e578ee..2756868 100644
--- a/src/pages/Library/issue.vue
+++ b/src/pages/Library/issue.vue
@@ -306,7 +306,7 @@
>{{ props.item.bookId.status}}
-
+
{
@@ -747,6 +751,9 @@ export default {
this.showLoader = true;
http()
.get("/getBooksList", {
+ params: {
+ schoolId: this.$store.state.schoolId
+ },
headers: { Authorization: "Bearer " + this.token }
})
.then(response => {
@@ -765,10 +772,8 @@ export default {
});
},
getParticularBookData(books) {
- console.log("books", books);
for (let i = 0; i < this.books.length; i++) {
if (books == this.books[i]._id) {
- console.log("books", this.books[i].remaining);
if (this.books[i].remaining <= 0) {
this.snackbar = true;
this.text = "Book is unavailable";
diff --git a/src/pages/Library/member.vue b/src/pages/Library/member.vue
index a865cc0..211392d 100644
--- a/src/pages/Library/member.vue
+++ b/src/pages/Library/member.vue
@@ -626,7 +626,10 @@ export default {
this.showLoader = true;
http()
.get("/getStudentsList", {
- params: { classId: this.selectStudents },
+ params: {
+ classId: this.selectStudents,
+ schoolId: this.$store.state.schoolId
+ },
headers: { Authorization: "Bearer " + this.token }
})
.then(response => {
@@ -693,6 +696,7 @@ export default {
submit() {
if (this.$refs.form.validate()) {
this.loading = true;
+ this.addBook.schoolId = this.$store.state.schoolId;
http()
.put("/addLibrary", this.addBook)
.then(response => {
@@ -732,6 +736,9 @@ export default {
getAllClass() {
http()
.get("/getClassesList", {
+ params: {
+ schoolId: this.$store.state.schoolId
+ },
headers: { Authorization: "Bearer " + this.token }
})
.then(response => {
diff --git a/src/pages/Subjects/subjects.vue b/src/pages/Subjects/subjects.vue
index acdf332..c98f210 100644
--- a/src/pages/Subjects/subjects.vue
+++ b/src/pages/Subjects/subjects.vue
@@ -433,6 +433,10 @@ export default {
)
.then(response => {
this.subjectList = response.data.data;
+ this.getClassSubject();
+ this.snackbar = true;
+ this.color = "green";
+ this.text = response.data.message;
})
.catch(err => {
console.log("err====>", err);
diff --git a/src/pages/User/user.vue b/src/pages/User/user.vue
index 3710448..31a88df 100644
--- a/src/pages/User/user.vue
+++ b/src/pages/User/user.vue
@@ -708,23 +708,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -995,9 +978,8 @@ export default {
},
deleteItem(item) {
let deleteUser = {
- UserId: item._id
+ userId: item._id
};
- // console.log("deleteUers",deleteUser)
http()
.delete(
"/deleteUser",
@@ -1007,9 +989,8 @@ export default {
)
.then(response => {
// console.log("deleteUers",deleteUser)
- if ((this.snackbar = true)) {
- this.text = "Successfully delete Existing User";
- }
+ this.snackbar = true;
+ this.text = "Successfully delete Existing User";
this.getUsersList();
})
.catch(error => {
diff --git a/src/store/store.js b/src/store/store.js
index 63ae331..4cf32ac 100644
--- a/src/store/store.js
+++ b/src/store/store.js
@@ -14,7 +14,8 @@ export default new Vuex.Store({
data: null,
isUserLoggedIn: false,
id: null,
- role: null
+ role: null,
+ schoolId: null
},
// serve as the one and only way to change the state of the data in the state object
mutations: {
@@ -35,6 +36,9 @@ export default new Vuex.Store({
},
Role(state, role) {
state.role = role
+ },
+ SchoolId(state, schoolId) {
+ state.schoolId = schoolId
}
},
//Action methods are referred to as being "dispatched"
@@ -50,6 +54,9 @@ export default new Vuex.Store({
},
Role({ commit }, role) {
commit('Role', role)
+ },
+ SchoolId({ commit }, schoolId) {
+ commit('SchoolId', schoolId)
}
} |