operations/bulk-operation-scheduler/operation-scheduler.component.ts
ControlValueAccessor
Validator
OnInit
OnDestroy
providers |
{
provide: NG_VALUE_ACCESSOR, multi: true, useExisting: forwardRef(() => OperationSchedulerComponent)
}
{
provide: NG_VALIDATORS, multi: true, useExisting: forwardRef(() => OperationSchedulerComponent)
}
|
selector | c8y-operation-scheduler |
templateUrl | operation-scheduler.component.html |
Properties |
Methods |
Inputs |
Accessors |
constructor(formBuilder: FormBuilder)
|
||||||
Parameters :
|
delayConfig |
Type : literal type
|
minutesAhead |
Type : number
|
convertDelayHandler | ||||||
convertDelayHandler(unit: string)
|
||||||
Parameters :
Returns :
void
|
emitData | ||||||
emitData(data: literal type)
|
||||||
Parameters :
Returns :
void
|
markAsTouched |
markAsTouched()
|
Returns :
void
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
registerOnChange | ||||||
registerOnChange(fn: any)
|
||||||
Parameters :
Returns :
void
|
registerOnTouched | ||||||
registerOnTouched(fn: any)
|
||||||
Parameters :
Returns :
void
|
registerOnValidatorChange | ||||||
registerOnValidatorChange(fn: any)
|
||||||
Parameters :
Returns :
void
|
Optional setDisabledState | ||||||
setDisabledState(isDisabled: boolean)
|
||||||
Parameters :
Returns :
void
|
validate |
validate()
|
Returns :
ValidationErrors
|
writeValue | ||||||
writeValue(value: OperationSchedule)
|
||||||
Parameters :
Returns :
void
|
delayErrors |
Type : ValidationErrors
|
Default value : null
|
fgOperationScheduler |
Type : FormGroup
|
minDate |
Type : Date
|
minDelay |
Type : number
|
pickerErrors |
Type : ValidationErrors
|
Default value : null
|
placeholder |
Type : string
|
Default value : gettext('Start date')
|
_minutesAhead | ||||||
set_minutesAhead(minutes: number)
|
||||||
Parameters :
Returns :
void
|
_delayConfig | ||||||
set_delayConfig(config: literal type)
|
||||||
Parameters :
Returns :
void
|
<div [formGroup]="fgOperationScheduler">
<div class="form-group m-0">
<label translate>Start date</label>
<div class="datetime-picker">
<c8y-form-group class="datepicker">
<input
formControlName="picker"
class="form-control"
placeholder="{{ placeholder | translate }}"
[bsConfig]="{ customTodayClass: 'today' }"
[minDate]="minDate"
bsDatepicker
required
(blur)="markAsTouched()"
/>
<c8y-messages *ngIf="pickerErrors">
<c8y-message *ngIf="pickerErrors.required" translate>
This field is required.
</c8y-message>
<c8y-message *ngIf="pickerErrors.dateValidation && !pickerErrors.required" translate>
Select time in the future.
</c8y-message>
</c8y-messages>
</c8y-form-group>
<timepicker
class="form-group"
[showSpinners]="false"
[showMeridian]="false"
formControlName="time"
(blur)="markAsTouched()"
></timepicker>
</div>
</div>
<div class="form-group m-0">
<c8y-form-group [hasError]="delayErrors">
<label translate>Delay</label>
<div class="input-group">
<input
formControlName="delay"
type="number"
class="form-control"
placeholder="{{ 'e.g.' | translate }} 15"
required
(blur)="markAsTouched()"
/>
<div class="input-group-btn">
<div class="c8y-select-wrapper">
<select formControlName="unit" class="form-control" (blur)="markAsTouched()">
<option value="seconds" translate>Seconds</option>
<option value="milliseconds" translate>Milliseconds</option>
</select>
<span></span>
</div>
</div>
</div>
<c8y-messages *ngIf="delayErrors">
<c8y-message *ngIf="delayErrors.required" translate>
This field is required.
</c8y-message>
<c8y-message
*ngIf="delayErrors.min && !delayErrors.required"
translate
ngNonBindable
[translateParams]="{ delay: minDelay }"
>
Minimum value is {{ delay }}.
</c8y-message>
</c8y-messages>
</c8y-form-group>
</div>
</div>