Quintiq file version 2.0
#parent: #root
Method EnabledBatchEdit () id:Method_DialogCreateEditUnitAvailability_EnabledBatchEdit
{
  #keys: '[136682.1.1068361929]'
  Body:
  [*
    //Enable batch edit checkbox
    isbatchEdit := DataHolderUnitPeriodTime.Data().Size() >1;
    
    Form.CheckBoxBatchEditShiftPattern().Visible( isbatchEdit );
    DropDownListShiftPattern.Enabled( not isbatchEdit or Form.CheckBoxBatchEditShiftPattern().Checked(), "" );
    
    Form.CheckBoxBatchEditEfficiency().Visible( isbatchEdit );
    EditFieldEfficiency.Enabled( not isbatchEdit or Form.CheckBoxBatchEditEfficiency().Checked(), "" );
    
    Form.CheckBoxBatchEditMinimumLoadThreshold().Visible( isbatchEdit );
    EditFieldMinLoadPercentage.Enabled( not isbatchEdit or Form.CheckBoxBatchEditMinimumLoadThreshold().Checked(), "" );
    
    Form.CheckBoxBatchEditMaxLoadPercentage().Visible( isbatchEdit );
    EditFieldMaxLoadPercentage.Enabled( not isbatchEdit or Form.CheckBoxBatchEditMaxLoadPercentage().Checked(),"" );
    
    Form.CheckBoxBatchEditNrOfUnitsOpen().Visible( isbatchEdit );
    EditFieldNumberOfUnits.Enabled( not isbatchEdit or Form.CheckBoxBatchEditNrOfUnitsOpen().Checked(),"" );
    
    Form.CheckBoxBatchEditMaintenance().Visible( isbatchEdit );
    DropDownStringListTimeUnit.Enabled( not isbatchEdit or Form.CheckBoxBatchEditMaintenance().Checked(),"" );
    DurationSelectorPerDay.Enabled( not isbatchEdit or Form.CheckBoxBatchEditMaintenance().Checked(),"" );
  *]
}
