|
|
|
@ -49,14 +49,20 @@ class OneSelfOrderModal extends Component{
|
|
|
|
|
let arr = this.props.course_groups.map(item => item.id);
|
|
|
|
|
let newarr = [];
|
|
|
|
|
let course_groups = this.props.course_groups;
|
|
|
|
|
|
|
|
|
|
course_groups.map((item, key) => {
|
|
|
|
|
|
|
|
|
|
if (item.end_time === null) {
|
|
|
|
|
// if(this.props.starttimesend===undefined){
|
|
|
|
|
// item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
// }else{
|
|
|
|
|
// item.end_time = moment(handleDateString(this.props.starttimesend)).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
// }
|
|
|
|
|
item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
if(this.props.starttimesend){
|
|
|
|
|
item.end_time = moment(moment(handleDateString(this.props.starttimesend))).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
}else{
|
|
|
|
|
item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
}
|
|
|
|
|
newarr.push(item)
|
|
|
|
|
} else {
|
|
|
|
|
newarr.push(item)
|
|
|
|
@ -101,7 +107,12 @@ class OneSelfOrderModal extends Component{
|
|
|
|
|
let course_groups=this.props.course_groups;
|
|
|
|
|
course_groups.map((item,key)=>{
|
|
|
|
|
if(item.end_time===null){
|
|
|
|
|
item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
// item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
if(this.props.starttimesend){
|
|
|
|
|
item.end_time = moment(moment(handleDateString(this.props.starttimesend))).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
}else{
|
|
|
|
|
item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
}
|
|
|
|
|
newarr.push(item)
|
|
|
|
|
}else{
|
|
|
|
|
newarr.push(item)
|
|
|
|
|