Merge branch '4748-API-call-set-planned_downtimes_created' into 'develop'
Added control for same-day and different hours planned downtimes See merge request artica/pandorafms!2788
This commit is contained in:
commit
bc2e40d0a3
|
@ -748,7 +748,9 @@ function planned_downtimes_created($values)
|
||||||
'return' => false,
|
'return' => false,
|
||||||
'message' => __('Not created. Error inserting data').'. '.__('The end date must be higher than the current time'),
|
'message' => __('Not created. Error inserting data').'. '.__('The end date must be higher than the current time'),
|
||||||
];
|
];
|
||||||
} else if ($values['type_execution'] == 'once' && $values['date_from'] >= $values['date_to']) {
|
} else if ($values['type_execution'] == 'once' && ($values['date_from'] > $values['date_to'])
|
||||||
|
|| (($values['date_from'] == $values['date_to']) && ($values['periodically_time_from'] >= $values['periodically_time_to']))
|
||||||
|
) {
|
||||||
return [
|
return [
|
||||||
'return' => false,
|
'return' => false,
|
||||||
'message' => __('Not created. Error inserting data').'. '.__('The end date must be higher than the start date'),
|
'message' => __('Not created. Error inserting data').'. '.__('The end date must be higher than the start date'),
|
||||||
|
|
Loading…
Reference in New Issue