|
|
|
@ -58,11 +58,7 @@ class OneSelfOrderModal extends Component{
|
|
|
|
|
// }else{
|
|
|
|
|
// item.end_time = moment(handleDateString(this.props.starttimesend)).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");
|
|
|
|
|
}
|
|
|
|
|
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)
|
|
|
|
@ -78,7 +74,7 @@ class OneSelfOrderModal extends Component{
|
|
|
|
|
if(this.props.starttimes===undefined||this.props.starttimes===""||this.props.starttimes===null){
|
|
|
|
|
if(this.props.starttimesend===undefined){
|
|
|
|
|
this.setState({
|
|
|
|
|
endtime:moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
@ -89,7 +85,7 @@ class OneSelfOrderModal extends Component{
|
|
|
|
|
}else{
|
|
|
|
|
if(this.props.starttimesend===undefined){
|
|
|
|
|
this.setState({
|
|
|
|
|
endtime:moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
@ -108,11 +104,7 @@ class OneSelfOrderModal extends Component{
|
|
|
|
|
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");
|
|
|
|
|
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");
|
|
|
|
|
}
|
|
|
|
|
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)
|
|
|
|
@ -131,7 +123,7 @@ class OneSelfOrderModal extends Component{
|
|
|
|
|
if(this.props.starttimes===undefined||this.props.starttimes===""||this.props.starttimes===null){
|
|
|
|
|
if(this.props.starttimesend===undefined){
|
|
|
|
|
this.setState({
|
|
|
|
|
endtime:moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
@ -142,7 +134,7 @@ class OneSelfOrderModal extends Component{
|
|
|
|
|
}else{
|
|
|
|
|
if(this.props.starttimesend===undefined){
|
|
|
|
|
this.setState({
|
|
|
|
|
endtime:moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|