fix(editor): Fix Luxon date parsing of ExecutionsUsage component (#6333)

* fix(editor): Fix luxon date parsing of ExecutionsUsage component

* Fix wrong indent
This commit is contained in:
OlegIvaniv 2023-05-29 13:29:07 +02:00 committed by GitHub
parent 0e4c615d0d
commit 8f0ff460b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View file

@ -193,7 +193,7 @@ export default defineComponent({
},
async checkForCloudPlanData(): Promise<void> {
try {
await this.cloudPlanStore.getOwnerCurrentPLan();
await this.cloudPlanStore.getOwnerCurrentPlan();
if (!this.cloudPlanStore.userIsTrialing) return;
await this.cloudPlanStore.getInstanceCurrentUsage();
this.startPollingInstanceUsageData();

View file

@ -36,6 +36,7 @@ import { mapStores } from 'pinia';
import { useSettingsStore } from '@/stores/settings.store';
import { useUsersStore } from '@/stores/users.store';
import { useWorkflowsStore } from '@/stores/workflows.store';
import { useRootStore } from '@/stores';
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
import { useCredentialsStore } from '@/stores/credentials.store';
import { defineComponent } from 'vue';
@ -49,6 +50,7 @@ export const nodeHelpers = defineComponent({
useSettingsStore,
useWorkflowsStore,
useUsersStore,
useRootStore,
),
},
methods: {
@ -524,6 +526,9 @@ export const nodeHelpers = defineComponent({
data as INode,
nodeType.subtitle,
'internal',
this.rootStore.timezone,
{},
undefined,
PLACEHOLDER_FILLED_AT_EXECUTION_TIME,
) as string | undefined;
}

View file

@ -45,7 +45,7 @@ export const useCloudPlanStore = defineStore('cloudPlan', () => {
return state.usage?.executions >= state.data?.monthlyExecutionsLimit;
});
const getOwnerCurrentPLan = async () => {
const getOwnerCurrentPlan = async () => {
const cloudUserId = settingsStore.settings.n8nMetadata?.userId;
const hasCloudPlan =
usersStore.currentUser?.isOwner && settingsStore.isCloudDeployment && cloudUserId;
@ -72,7 +72,7 @@ export const useCloudPlanStore = defineStore('cloudPlan', () => {
return {
state,
getOwnerCurrentPLan,
getOwnerCurrentPlan,
getInstanceCurrentUsage,
userIsTrialing,
currentPlanData,