UNPKG

@adaptabletools/adaptable

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

55 lines (54 loc) 2.88 kB
import * as React from 'react'; import { Box } from 'rebass'; import FormLayout, { FormRow } from '../../../../components/FormLayout'; import { Select } from '../../../../components/Select'; import { Tabs } from '../../../../components/Tabs'; export const ScheduleSettingsReport = (props) => { const reportOptions = props.allReports.map((report) => ({ label: report.Name, value: report.Name, })); const formatOptions = props.allFormats.map((reportFormat) => ({ label: reportFormat, value: reportFormat, onClick: () => { props.onChange({ ...props.report, ReportFormat: reportFormat, }); }, })); const destinationOptions = props.allDestinations.map((destination) => ({ label: destination, value: destination, onClick: () => { props.onChange({ ...props.report, ExportDestination: destination, }); }, })); return (React.createElement(Box, { "data-name": "schedule-settings-report" }, React.createElement(Tabs, { autoFocus: false, mb: 3 }, React.createElement(Tabs.Tab, null, "Report Settings"), React.createElement(Tabs.Content, null, React.createElement(FormLayout, null, React.createElement(FormRow, { label: "Export" }, React.createElement(Box, { maxWidth: 300 }, React.createElement(Select, { "data-name": "select-report", options: reportOptions, value: props?.report?.ReportName, placeholder: "Select Export", onChange: (value) => props.onChange({ ...props.report, ReportName: value, }) }))), React.createElement(FormRow, { label: "Format" }, React.createElement(Box, { maxWidth: 300 }, React.createElement(Select, { "data-name": "select-format", options: formatOptions, value: props?.report?.ReportFormat, placeholder: "Select Format", onChange: (value) => props.onChange({ ...props.report, ReportFormat: value, }) }))), React.createElement(FormRow, { label: "Destination" }, React.createElement(Box, { maxWidth: 300 }, React.createElement(Select, { "data-name": "select-destination", options: destinationOptions, value: props?.report?.ExportDestination, placeholder: "Select Format", onChange: (value) => props.onChange({ ...props.report, ExportDestination: value, }) })))))))); };