|
@@ -34,7 +34,7 @@ class LeaveService extends CrudService {
|
|
|
|
|
|
async update({ id }, data) {
|
|
|
const leave = await this.model.findById(id);
|
|
|
- const { studentid, starttime, endtime, reason, status, refcause, batchid, termid, classid, planid } = data;
|
|
|
+ const { studentid, starttime, endtime, reason, status, refcause, batchid, termid, classid, planid, stuname } = data;
|
|
|
if (studentid) {
|
|
|
leave.studentid = studentid;
|
|
|
}
|
|
@@ -59,6 +59,9 @@ class LeaveService extends CrudService {
|
|
|
if (planid) {
|
|
|
leave.planid = planid;
|
|
|
}
|
|
|
+ if (stuname) {
|
|
|
+ leave.stuname = stuname;
|
|
|
+ }
|
|
|
if (status) {
|
|
|
leave.status = status;
|
|
|
const student = await this.smodel.findById(leave.studentid);
|