Disagg IML: Radio Button Group for Return Period and IML

Requires #120 (closed)

The disaggregation application will either use the return period or IML to make a service call.

Add Angular material radio button group for return period controls and IML controls:

  • Add MatRadioModule import to disagg.module.ts
  • Add new DisaggTarget enum in hazard-control-form.model.ts with contents: IML='IML' and RETURN_PERIOD='RETURN_PERIOD
  • Add new disaggTarget in DisaggControlForm with type DisaggTarget
  • Import DisaggTarget into control-panel.compnent.ts: DisaggTarget = DisaggTarget
  • Add radio button group to control-panel.component.ts that includes the return period and iml controls.
  • Add SCSS to make radio buttons centered on the controls
  • Add disable input for the return period component with default false
  • Add [disable]="disable" field to input and select of the return period component
  • If the return period radio button is selected the IML input form should be disabled. If the IML radio button is selected then the return period controls should be disabled

The radio button group should be something like:

    <!-- Disagg Targets -->
    <mat-radio-group
      color="primary"
      [ngrxFormControlState]="formState?.controls?.disaggTarget"
    >
      <!-- Return periods controls -->
      <mat-radio-button [value]="DisaggTarget.RETURN_PERIOD">
        <hazard-lib-return-period-form
          [returnPeriodControlState]="formState?.controls?.returnPeriod"
          [commonReturnPeriodControlState]="formState?.controls?.commonReturnPeriods"
          [disable]="formState?.value?.disaggTarget === DisaggTarget.IML"
        >
        </hazard-lib-return-period-form>
      </mat-radio-button>

      <!-- IML controls -->
      <mat-radio-button [value]="DisaggTarget.IML">
        <!-- IML controls goes here -->
      </mat-radio-button>
    </mat-radio-group>

Should look like: PXL_20220616_174905750

See main issue for bigger picture: #93 (closed)

Edited Jun 27, 2022 by Clayton, Brandon Scott
Assignee Loading
Time tracking Loading