www/app/components/movement/movementFactory.js
/**
     * @function _save
     * Save an movement by adding to an provisional plan
     * or just update an movement
     * @param {ProvisionalPlan} provisionalPlanToSave
     * @returns {Promise}
     */
@function _save
Save an movement by adding to an provisional plan
or just update an movement
@param {ProvisionalPlan} provisionalPlanToSave
@returns {Promise}
@function _save Save an movement by adding to an provisional plan or just update an movement @param { ProvisionalPlan } provisionalPlanToSave @returns { Promise }
function _save(movement, provisionalPlanId) {
      if (neogenz.utilities.isUndefinedOrNull(movement.id)) {
        return ProvisionalPlanService.addMovement(movement);
      } else {
        return _update({
          provisionalPlanId: provisionalPlanId,
          movement: movement
        });
      }
    }
function _save ( movement , provisionalPlanId ) { if ( neogenz . utilities . isUndefinedOrNull ( movement . id ) ) { return ProvisionalPlanService . addMovement ( movement ) ; } else { return _update ( { provisionalPlanId : provisionalPlanId , movement : movement } ) ; } }
@function _save
 Save an movement by adding to an provisional plan
 or just update an movement
 @param {ProvisionalPlan} provisionalPlanToSave
 @returns {Promise}
@function _save Save an movement by adding to an provisional plan or just update an movement @param { ProvisionalPlan } provisionalPlanToSave @returns { Promise }