Quintiq file version 2.0
#parent: ListUnitAvailability
Response OnClick () id:Response_ListUnitAvailability_MenuNewUnitAvailability_OnClick
{
  #keys: '[11766.2.979763185]'
  Body:
  [*
    // Create a new unit availability.
    
    dlg := construct( DialogCreateEditUnitAvailability );
    ua := dlg.NewUnitAvailability( this );
    
    ApplicationLibMacroPlanner.AutoExpandSelection( this, ua );
  *]
  CanBindMultiple: false
  DefinitionID => /ListUnitAvailability/Responsedef_ListUnitAvailability_Menu_OnClick
  Initiator: 'MenuNewUnitAvailability'
  Precondition:
  [*
    return MacroPlan::HasMacroPlan( MacroPlan, feedback )
           and UnitAvailability::CanCreate( MacroPlan, feedback )
           and PeriodSpecification_MP::HasPeriodSpecification( MacroPlan, feedback )
           and Period_MP::HasPeriod( feedback, MacroPlan )
           and UnitAvailability::CanCreate( feedback, DataHolderChildUnits.Data() );
  *]
  UserRequiresReadWrite: true
}
