diff --git a/src/pages/Students/students.vue b/src/pages/Students/students.vue
index 67b3b4b..4a49b31 100644
--- a/src/pages/Students/students.vue
+++ b/src/pages/Students/students.vue
@@ -940,7 +940,13 @@
{{ props.item.parentId.motherName }} |
{{ props.item.establishmentYear }} |
{{ props.item.mobile}} |
-
+
+
+ |
@@ -1931,6 +1937,12 @@ export default {
align: "center"
},
{ text: "Mobile No", value: "mobile", sortable: false, align: "center" },
+ {
+ text: "Status",
+ value: "status",
+ sortable: false,
+ align: "center"
+ },
{ text: "Action", value: "", sortable: false, align: "center" }
],
desserts: [],
@@ -2353,6 +2365,23 @@ export default {
this.showLoader = false;
});
}
+ },
+ suspendStudentStatus(status, id) {
+ let suspendStudentData = {
+ studentId: id,
+ status: status
+ };
+ http()
+ .put("/suspendStudentAccount", suspendStudentData)
+ .then(response => {
+ this.findStudents()();
+ this.text = response.data.message;
+ this.snackbar = true;
+ })
+ .catch(error => {
+ // console.log(error.response.data.data);
+ this.text = error.response.data.message;
+ });
}
},
mounted() {
diff --git a/src/pages/Teachers/teachers.vue b/src/pages/Teachers/teachers.vue
index 42edeff..5142543 100644
--- a/src/pages/Teachers/teachers.vue
+++ b/src/pages/Teachers/teachers.vue
@@ -514,6 +514,13 @@
{{ dates(props.item.dob) }} |
{{ dates(props.item.joinDate)}} |
{{ props.item.mobileNo }} |
+
+
+ |
@@ -971,6 +978,7 @@ export default {
stateRules: [v => !!v || "State Name is required"],
joinDateRules: [v => !!v || " Join Date is required"],
errorMessages: "",
+ switch1: true,
countries: [],
headers: [
{
@@ -1000,6 +1008,12 @@ export default {
sortable: false,
align: "center"
},
+ {
+ text: "Status",
+ value: "status",
+ sortable: false,
+ align: "center"
+ },
{ text: "Action", value: "", sortable: false, align: "center" }
],
desserts: [],
@@ -1037,7 +1051,8 @@ export default {
role: "TEACHER",
name: "",
email: ""
- }
+ },
+ status: ""
}),
watch: {
menu(val) {
@@ -1245,7 +1260,7 @@ export default {
editTeacher.upload = imageUrl;
}
http()
- .put("/updateTeacher", editTeacher)
+ .put("/suspendAccount", editTeacher)
.then(response => {
console.log("editTeacher", editTeacher);
this.snackbar = true;
@@ -1258,6 +1273,28 @@ export default {
console.log(error);
this.loading = false;
});
+ },
+ suspendStatus(suspendStatus, id) {
+ if (suspendStatus == true) {
+ this.status = "ON";
+ } else if (suspendStatus == false) {
+ this.status = "OFF";
+ }
+ let suspendStatusData = {
+ teacherId: id,
+ status: suspendStatus
+ };
+ http()
+ .put("/suspendAccount", suspendStatusData)
+ .then(response => {
+ this.getTeacherList();
+ this.text = response.data.message;
+ this.snackbar = true;
+ })
+ .catch(error => {
+ // console.log(error.response.data.data);
+ this.text = error.response.data.message;
+ });
}
},
mounted() { | |