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
MatRadioModuleimport to disagg.module.ts - Add new
DisaggTargetenum in hazard-control-form.model.ts with contents:IML='IML'andRETURN_PERIOD='RETURN_PERIOD - Add new
disaggTargetinDisaggControlFormwith typeDisaggTarget - Import
DisaggTargetinto 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
disableinput 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>
See main issue for bigger picture: #93 (closed)
Edited by Clayton, Brandon Scott
