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-14.1.2 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-14.1.1 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-14.1.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-14.0.2 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-14.0.1 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-13.2.6 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-14.0.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-13.2.5 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-13.2.4 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-13.2.3 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-13.2.2 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-12.0.7 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-13.2.1 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-13.2.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-10.1.3 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-13.0.0 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-12.0.5 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-12.0.4 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-12.0.1 webpack/JobWizard/steps/Schedule/RepeatDaily.js
foreman_remote_execution-12.0.2 webpack/JobWizard/steps/Schedule/RepeatDaily.js