1 import {Component, Input} from '@angular/core';
2 import {IdlService} from '@eg/core/idl.service';
3 import {SimpleReporterService, SRTemplate} from './simple-reporter.service';
4 import * as moment from 'moment-timezone';
7 selector: 'eg-sr-output-options',
8 templateUrl: './sr-output-options.component.html'
11 export class SROutputOptionsComponent {
13 @Input() templ: SRTemplate;
14 @Input() readyToSchedule: () => boolean;
15 @Input() saveTemplate: (args: any) => void;
18 private idl: IdlService,
19 private srSvc: SimpleReporterService
23 // When changing to Later for the first time default minutes to the quarter hour
24 if (this.templ.runNow === 'later' && this.templ.runTime === null) {
26 const nextQ = now.add(15 - (now.minutes() % 15), 'minutes');
27 this.templ.runTime = nextQ;