Quintiq file version 2.0
#parent: GanttChartUnitCalendar
Response OnClick (
  Unit row
) id:Response_GanttChartUnitCalendar_MenuEditCapacity_OnClick
{
  #keys: '[131962.0.9558911]'
  Body:
  [*
    // Edit unit capacity
    if( row.HasCapacityTypeQuantityBase() )
    {
      dlg := construct( DialogCreateEditUnitCapacity );
      dlg.NewUnitCapacity( this, row );
    }
    else if( row.HasCapacityTypeTimeBase() )
    {
      dlg := construct( DialogCreateEditUnitAvailability );
      dlg.NewUnitAvailability( this, row );
    }
    else if( row.HasCapacityTypeTransportQuantity() )
    {
      dlg := construct( DialogCreateEditTransportCapacity );
      dlg.NewTransportCapacity( this, row );
    }
    else if( row.HasCapacityTypeTransportTime() )
    {
      dlg := construct( DialogCreateEditTransportAvailability );
      dlg.NewTransportAvailability( this, row );
    }
  *]
  CanBindMultiple: false
  DefinitionID => /GanttChartUnitCalendar/Responsedef_GanttChartUnitCalendar_Menu_OnClick
  Initiator: 'MenuEditCapacity'
  Precondition:
  [*
    return row.CanEditCapacity( feedback );
  *]
  UserRequiresReadWrite: true
}
