Sha256: 1630b560f0f1a1455b8867349d1b88ddef5acf87448997170d433ceeaf150f28

Contents?: true

Size: 1020 Bytes

Versions: 68

Compression:

Stored size: 1020 Bytes

Contents

import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import { FormGroup, TimePicker } from '@patternfly/react-core';
import { translate as __ } from 'foremanReact/common/I18n';

export const RepeatDaily = ({ repeatData, setRepeatData, setValid }) => {
  const { at } = repeatData;
  useEffect(() => {
    if (at) {
      setValid(true);
    } else {
      setValid(false);
    }
    return () => setValid(true);
  }, [setValid, at]);
  return (
    <FormGroup label={__('At')} isRequired>
      <TimePicker
        aria-label="repeat-at"
        className="time-picker"
        time={repeatData.at}
        placeholder="hh:mm"
        onChange={newTime => {
          setRepeatData({ ...repeatData, at: newTime });
        }}
        is24Hour
        invalidFormatErrorMessage={__('Invalid time format')}
      />
    </FormGroup>
  );
};

RepeatDaily.propTypes = {
  repeatData: PropTypes.object.isRequired,
  setRepeatData: PropTypes.func.isRequired,
  setValid: PropTypes.func.isRequired,
};

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
foreman_remote_execution-9.1.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-8.2.1 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-8.2.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-9.0.1 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-9.0.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-8.1.2 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-8.1.1 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-8.1.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-7.2.2 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-7.2.1 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-7.2.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-5.0.8 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-8.0.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-7.1.1 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-7.1.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-7.0.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-5.0.7 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-5.0.6 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-6.2.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-5.0.5 webpack/JobWizard/steps/Schedule/RepeatDaily.js