Change Cron editor location to bot settings page
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormControl, PatternValidator, Validators } from '@angular/forms';
|
||||
import { FormControl, Validators } from '@angular/forms';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { CronOptions } from 'ngx-cron-editor';
|
||||
import { ProfileService } from 'src/app/Services/profile.service';
|
||||
import { ConfirmationDialogComponent } from './confirmation-dialog/confirmation-dialog.component';
|
||||
import { HelpDialogComponent } from './help-dialog/help-dialog.component';
|
||||
@@ -32,26 +31,6 @@ export class ProfileComponent implements OnInit {
|
||||
public dialog: MatDialog
|
||||
) {}
|
||||
|
||||
cronForm = new FormControl('0 0 1/1 * *');
|
||||
public cronOptions: CronOptions = {
|
||||
defaultTime: '00:00:00',
|
||||
|
||||
hideMinutesTab: true,
|
||||
hideHourlyTab: true,
|
||||
hideDailyTab: false,
|
||||
hideWeeklyTab: true,
|
||||
hideMonthlyTab: true,
|
||||
hideYearlyTab: true,
|
||||
hideAdvancedTab: true,
|
||||
hideSpecificWeekDayTab: true,
|
||||
hideSpecificMonthWeekTab: true,
|
||||
|
||||
use24HourTime: true,
|
||||
hideSeconds: true,
|
||||
|
||||
cronFlavor: 'quartz', //standard or quartz
|
||||
};
|
||||
|
||||
ngOnInit(): void {
|
||||
this.profileService.getUserData().subscribe((result) => {
|
||||
console.log(result);
|
||||
@@ -98,14 +77,6 @@ export class ProfileComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
setCronString() {
|
||||
this.profileService
|
||||
.addCronString(this.cronForm.value)
|
||||
.subscribe((result) => {
|
||||
console.log(result);
|
||||
});
|
||||
}
|
||||
|
||||
openHelp() {
|
||||
const dialogRef = this.dialog.open(HelpDialogComponent, {
|
||||
width: '50vw',
|
||||
|
||||
Reference in New Issue
Block a user