feat: Convert all app files to JS
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { DateTime } from 'luxon';
|
||||
import { IGlobalVariable } from '@automatisch/types';
|
||||
import defineTrigger from '../../../../helpers/define-trigger';
|
||||
import cronTimes from '../../common/cron-times';
|
||||
import getNextCronDateTime from '../../common/get-next-cron-date-time';
|
||||
import getDateTimeObjectRepresentation from '../../common/get-date-time-object';
|
||||
|
||||
import defineTrigger from '../../../../helpers/define-trigger.js';
|
||||
import cronTimes from '../../common/cron-times.js';
|
||||
import getNextCronDateTime from '../../common/get-next-cron-date-time.js';
|
||||
import getDateTimeObjectRepresentation from '../../common/get-date-time-object.js';
|
||||
|
||||
export default defineTrigger({
|
||||
name: 'Every month',
|
||||
@@ -13,7 +13,7 @@ export default defineTrigger({
|
||||
{
|
||||
label: 'Day of the month',
|
||||
key: 'day',
|
||||
type: 'dropdown' as const,
|
||||
type: 'dropdown',
|
||||
required: true,
|
||||
value: null,
|
||||
variables: false,
|
||||
@@ -147,7 +147,7 @@ export default defineTrigger({
|
||||
{
|
||||
label: 'Time of day',
|
||||
key: 'hour',
|
||||
type: 'dropdown' as const,
|
||||
type: 'dropdown',
|
||||
required: true,
|
||||
value: null,
|
||||
variables: false,
|
||||
@@ -252,10 +252,10 @@ export default defineTrigger({
|
||||
},
|
||||
],
|
||||
|
||||
getInterval(parameters: IGlobalVariable['step']['parameters']) {
|
||||
getInterval(parameters) {
|
||||
const interval = cronTimes.everyMonthOnAndAt(
|
||||
parameters.day as number,
|
||||
parameters.hour as number
|
||||
parameters.day,
|
||||
parameters.hour
|
||||
);
|
||||
|
||||
return interval;
|
||||
Reference in New Issue
Block a user