Skip to content
Snippets Groups Projects
Commit 04a25570 authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Fix SchedulePicker text size and 'Sent' text issues

parent 89da48cb
Branches
Tags
No related merge requests found
......@@ -105,6 +105,7 @@ export default class DatabaseSchedulingForm extends Component {
}
scheduleOptions={["hourly", "daily"]}
onScheduleChange={this.updateSchemaSyncSchedule}
textBeforeInterval="Scan"
/>
</div>
......@@ -138,6 +139,7 @@ export default class DatabaseSchedulingForm extends Component {
}
scheduleOptions={["daily", "weekly", "monthly"]}
onScheduleChange={this.updateFieldScanSchedule}
textBeforeInterval="Scan"
/>
</div>
</SyncOption>
......
......@@ -48,6 +48,8 @@ export default class SchedulePicker extends Component {
// TODO: hourly option?
// available schedules, e.g. [ "daily", "weekly", "monthly"]
scheduleOptions: PropTypes.object.isRequired,
// text before Daily/Weekly/Monthly... option
textBeforeInterval: PropTypes.string,
// text prepended to "12:00 PM PST, your Metabase timezone"
textBeforeSendTime: PropTypes.string,
onScheduleChange: PropTypes.func.isRequired,
......@@ -108,7 +110,7 @@ export default class SchedulePicker extends Component {
value={_.find(MONTH_DAY_OPTIONS, (o) => o.value === schedule.schedule_frame)}
options={MONTH_DAY_OPTIONS}
optionNameFn={o => o.name}
className="bg-white"
className="h4 text-bold bg-white"
optionValueFn={o => o.value}
onChange={(o) => this.onPropertyChange("schedule_frame", o) }
/>
......@@ -119,7 +121,7 @@ export default class SchedulePicker extends Component {
options={DAY_OPTIONS}
optionNameFn={o => o.name}
optionValueFn={o => o.value}
className="bg-white"
className="h4 text-bold bg-white"
onChange={(o) => this.onPropertyChange("schedule_day", o) }
/>
</span>
......@@ -139,7 +141,7 @@ export default class SchedulePicker extends Component {
options={DAY_OF_WEEK_OPTIONS}
optionNameFn={o => o.name}
optionValueFn={o => o.value}
className="bg-white"
className="h4 text-bold bg-white"
onChange={(o) => this.onPropertyChange("schedule_day", o) }
/>
</span>
......@@ -157,7 +159,7 @@ export default class SchedulePicker extends Component {
<div className="mt1">
<span className="h4 text-bold mr1">at</span>
<Select
className="mr1 bg-white"
className="mr1 h4 text-bold bg-white"
value={_.find(HOUR_OPTIONS, (o) => o.value === hour)}
options={HOUR_OPTIONS}
optionNameFn={o => o.name}
......@@ -170,7 +172,7 @@ export default class SchedulePicker extends Component {
optionNameFn={o => o.name}
optionValueFn={o => o.value}
onChange={(o) => this.onPropertyChange("schedule_hour", hour + o * 12) }
className="bg-white"
className="h4 text-bold bg-white"
/>
{ textBeforeSendTime &&
<div className="mt2 h4 text-bold text-grey-3 border-top pt2">
......@@ -182,13 +184,13 @@ export default class SchedulePicker extends Component {
}
render() {
let { schedule, scheduleOptions } = this.props;
let { schedule, scheduleOptions, textBeforeInterval } = this.props;
const scheduleType = schedule.schedule_type;
return (
<div className="mt1">
<span className="h4 text-bold mr1">Sent</span>
<span className="h4 text-bold mr1">{ textBeforeInterval }</span>
<Select
className="h4 text-bold bg-white"
value={scheduleType}
......
......@@ -194,6 +194,7 @@ export default class PulseEditChannels extends Component {
<SchedulePicker
schedule={_.pick(channel, "schedule_day", "schedule_frame", "schedule_hour", "schedule_type") }
scheduleOptions={channelSpec.schedules}
textBeforeInterval="Sent"
textBeforeSendTime={`${CHANNEL_NOUN_PLURAL[channelSpec && channelSpec.type] || "Messages"} will be sent at `}
onScheduleChange={this.onChannelScheduleChange.bind(this, index)}
/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment