- Verify webhook
+ Verify config
diff --git a/frontend/src/integrations/slack/components/slack-connect.vue b/frontend/src/integrations/slack/components/slack-connect.vue
index bc13d4fe2c..48bc712bdf 100644
--- a/frontend/src/integrations/slack/components/slack-connect.vue
+++ b/frontend/src/integrations/slack/components/slack-connect.vue
@@ -19,7 +19,7 @@ defineProps({
const connectUrl = computed(() => {
const redirectUrl = `${window.location.protocol}//${window.location.host}${window.location.pathname}?success=true`;
- return `${config.backendUrl}/slack/${
+ return `${config.backendUrl}/config/${
store.getters['auth/currentTenant'].id
}/connect?redirectUrl=${redirectUrl}&crowdToken=${AuthToken.get()}`;
});
diff --git a/frontend/src/modules/automation/components/automation-form.vue b/frontend/src/modules/automation/components/automation-form.vue
index 7e03d3ccaa..518ccf7b4d 100644
--- a/frontend/src/modules/automation/components/automation-form.vue
+++ b/frontend/src/modules/automation/components/automation-form.vue
@@ -1,27 +1,16 @@
-
-

-
- Webhook
-
-
-
-

-
- Slack notification
-
-
-
-

+
+
- HubSpot
+ {{ typeData.name }}
@@ -44,63 +33,25 @@
Trigger
-
- Define the event that triggers your webhook
-
-
- Define the event that triggers your Slack notification.
+
+ {{ typeData.triggerText }}
-
-
-
-
-
-
+
+
Action
-
- Define the endpoint where the webhook payload should be sent to
-
-
- Receive a notification in your Slack workspace every time the event is triggered.
+
+ {{ typeData.triggerText }}
@@ -133,8 +84,9 @@
@click="doSubmit"
>
Update
- Add webhook
- Add Slack notification
+
+ {{ typeData.createButtonText }}
+
Add automation
@@ -148,19 +100,15 @@ import {
computed, defineProps, defineEmits, reactive, ref, watch, onMounted,
} from 'vue';
import AppDrawer from '@/shared/drawer/drawer.vue';
-import { required } from '@vuelidate/validators';
+import { email, required } from "@vuelidate/validators";
import useVuelidate from '@vuelidate/core';
import AppFormItem from '@/shared/form/form-item.vue';
-import AppNewActivityFilterOptions
- from '@/modules/automation/components/filter-options/new-activity-filter-options.vue';
-import AppNewMemberFilterOptions from '@/modules/automation/components/filter-options/new-member-filter-options.vue';
-import AppAutomationWebhookAction from '@/modules/automation/components/action/webhook-action.vue';
-import AppAutomationSlackAction from '@/modules/automation/components/action/slack-action.vue';
import { useAutomationStore } from '@/modules/automation/store';
import Message from '@/shared/message/message';
import { i18n } from '@/i18n';
import formChangeDetector from '@/shared/form/form-change';
import { useStore } from 'vuex';
+import { automationTypes } from '../config/automation-types';
const props = defineProps({
modelValue: {
@@ -197,6 +145,8 @@ const isDrawerOpen = computed({
},
});
+const typeData = computed(() => props.type && automationTypes[props.type]);
+
const type = computed(() => props.automation?.type || props.type);
const isEdit = computed(() => props.automation !== null);
diff --git a/frontend/src/modules/automation/components/executions/automation-execution.vue b/frontend/src/modules/automation/components/executions/automation-execution.vue
index b201caa895..6edf10ab78 100644
--- a/frontend/src/modules/automation/components/executions/automation-execution.vue
+++ b/frontend/src/modules/automation/components/executions/automation-execution.vue
@@ -102,7 +102,7 @@ const slackConnectUrl = computed(() => {
return `${config.backendUrl}/tenant/${
currentTenant.value.id
- }/automation/slack?redirectUrl=${redirectUrl}&crowdToken=${AuthToken.get()}`;
+ }/automation/config?redirectUrl=${redirectUrl}&crowdToken=${AuthToken.get()}`;
});
const authenticateSlack = () => {
diff --git a/frontend/src/modules/automation/config/automation-types/hubspot.ts b/frontend/src/modules/automation/config/automation-types/hubspot.ts
deleted file mode 100644
index 4590cc2690..0000000000
--- a/frontend/src/modules/automation/config/automation-types/hubspot.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { AutomationTypeConfig } from '@/modules/automation/config/automation-types/index';
-import { CrowdIntegrations } from '@/integrations/integrations-config';
-
-export const hubspot: AutomationTypeConfig = {
- name: 'HubSpot',
- description: 'Send members or organizations to HubSpot',
- icon: '/images/integrations/hubspot.png',
- canCreate(store) {
- const hubspot = CrowdIntegrations.getMappedConfig('hubspot', store);
- return hubspot.status === 'done';
- },
- disabled(store) {
- const hubspot = CrowdIntegrations.getMappedConfig('hubspot', store);
- return hubspot.status !== 'done';
- },
-};
diff --git a/frontend/src/modules/automation/config/automation-types/hubspot/config.ts b/frontend/src/modules/automation/config/automation-types/hubspot/config.ts
new file mode 100644
index 0000000000..9f69d3c067
--- /dev/null
+++ b/frontend/src/modules/automation/config/automation-types/hubspot/config.ts
@@ -0,0 +1,24 @@
+import { AutomationTypeConfig } from '@/modules/automation/config/automation-types';
+// import { CrowdIntegrations } from '@/integrations/integrations-config';
+import AutomationsHubspotAction from './hubspot-action.vue';
+import AutomationsHubspotTrigger from './hubspot-trigger.vue'
+
+export const hubspot: AutomationTypeConfig = {
+ name: 'HubSpot',
+ description: 'Send members or organizations to HubSpot',
+ icon: '/images/integrations/hubspot.png',
+ triggerText: 'Define the conditions that will trigger your HubSpot action.',
+ actionText: 'Define which action will take place in HubSpot based on the defined conditions.',
+ canCreate(store) {
+ return true;
+ // const hubspot = CrowdIntegrations.getMappedConfig('hubspot', store);
+ // return hubspot.status === 'done';
+ },
+ disabled(store) {
+ return false;
+ // const hubspot = CrowdIntegrations.getMappedConfig('hubspot', store);
+ // return hubspot.status !== 'done';
+ },
+ actionComponent: AutomationsHubspotAction,
+ triggerComponent: AutomationsHubspotTrigger,
+};
diff --git a/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-action.vue b/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-action.vue
new file mode 100644
index 0000000000..6b22e9bb93
--- /dev/null
+++ b/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-action.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
diff --git a/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-trigger.vue b/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-trigger.vue
new file mode 100644
index 0000000000..32ee57d4e1
--- /dev/null
+++ b/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-trigger.vue
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
diff --git a/frontend/src/modules/automation/config/automation-types/index.ts b/frontend/src/modules/automation/config/automation-types/index.ts
index d34fa70e93..934996f47c 100644
--- a/frontend/src/modules/automation/config/automation-types/index.ts
+++ b/frontend/src/modules/automation/config/automation-types/index.ts
@@ -1,23 +1,29 @@
-import { webhook } from './webhook';
-import { slack } from './slack';
-import { hubspot } from './hubspot';
+import { webhook } from './webhook/config';
+import { slack } from './slack/config';
+import { hubspot } from './hubspot/config';
interface AutomationTypeAction {
- label: string;
- action: () => void;
+ label: string; // Text of the action button
+ action: () => void; // Action triggered on button click
+}
+interface AutomationTypeEmptyScreen {
+ title: string; // Title in empty screen
+ body: string; // Body text in empty screen
}
export interface AutomationTypeConfig {
- name: string;
- description: string;
- icon: string;
- canCreate: (store: any) => boolean;
- actionButton?: (store: any) => AutomationTypeAction | null;
- disabled?: (store: any) => boolean;
- emptyScreen?: {
- title: string;
- body: string;
- }
+ name: string; // Name of the automation
+ description: string; // Description shown under name in dropdown
+ icon: string; // Icon of the automation type
+ canCreate: (store: any) => boolean; // method if creation of that automation type is disabled
+ actionButton?: (store: any) => AutomationTypeAction | null; // Action button to show in dropdown
+ disabled?: (store: any) => boolean; // If dropdown option is disabled
+ emptyScreen?: AutomationTypeEmptyScreen, // Text for empty screen if there is no automations of that type
+ triggerText: string; // Description shown below Trigger in automation form
+ actionText: string; // Description shown below Action in automation form
+ createButtonText?: string;
+ actionComponent: any; // Component which handeles form for action
+ triggerComponent: any; // Component which handeles form for trigger
}
export const automationTypes: Record
= {
diff --git a/frontend/src/modules/automation/components/filter-options/new-activity-filter-options.vue b/frontend/src/modules/automation/config/automation-types/shared/filter-options/new-activity-filter-options.vue
similarity index 100%
rename from frontend/src/modules/automation/components/filter-options/new-activity-filter-options.vue
rename to frontend/src/modules/automation/config/automation-types/shared/filter-options/new-activity-filter-options.vue
diff --git a/frontend/src/modules/automation/components/filter-options/new-member-filter-options.vue b/frontend/src/modules/automation/config/automation-types/shared/filter-options/new-member-filter-options.vue
similarity index 100%
rename from frontend/src/modules/automation/components/filter-options/new-member-filter-options.vue
rename to frontend/src/modules/automation/config/automation-types/shared/filter-options/new-member-filter-options.vue
diff --git a/frontend/src/modules/automation/config/automation-types/shared/trigger-member-activity.vue b/frontend/src/modules/automation/config/automation-types/shared/trigger-member-activity.vue
new file mode 100644
index 0000000000..967bdb5f29
--- /dev/null
+++ b/frontend/src/modules/automation/config/automation-types/shared/trigger-member-activity.vue
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
diff --git a/frontend/src/modules/automation/config/automation-types/slack.ts b/frontend/src/modules/automation/config/automation-types/slack/config.ts
similarity index 72%
rename from frontend/src/modules/automation/config/automation-types/slack.ts
rename to frontend/src/modules/automation/config/automation-types/slack/config.ts
index bc48bb36b7..9da70b50e1 100644
--- a/frontend/src/modules/automation/config/automation-types/slack.ts
+++ b/frontend/src/modules/automation/config/automation-types/slack/config.ts
@@ -1,6 +1,8 @@
-import { AutomationTypeConfig } from '@/modules/automation/config/automation-types/index';
+import { AutomationTypeConfig } from '@/modules/automation/config/automation-types';
import config from '@/config';
import { AuthToken } from '@/modules/auth/auth-token';
+import AutomationsSlackAction from './slack-action.vue';
+import AutomationsTriggerMemberActivity from '../shared/trigger-member-activity.vue';
export const slack: AutomationTypeConfig = {
name: 'Slack notification',
@@ -10,6 +12,9 @@ export const slack: AutomationTypeConfig = {
title: 'No Slack notifications yet',
body: 'Send Slack notifications when a new activity happens, or a new member joins your community',
},
+ triggerText: 'Define the event that triggers your Slack notification.',
+ actionText: 'Receive a notification in your Slack workspace every time the event is triggered.',
+ createButtonText: 'Add Slack notification',
canCreate(store) {
const tenant = store.getters['auth/currentTenant'];
return !!tenant.settings[0].slackWebHook;
@@ -32,4 +37,6 @@ export const slack: AutomationTypeConfig = {
},
};
},
+ actionComponent: AutomationsSlackAction,
+ triggerComponent: AutomationsTriggerMemberActivity,
};
diff --git a/frontend/src/modules/automation/components/action/slack-action.vue b/frontend/src/modules/automation/config/automation-types/slack/slack-action.vue
similarity index 100%
rename from frontend/src/modules/automation/components/action/slack-action.vue
rename to frontend/src/modules/automation/config/automation-types/slack/slack-action.vue
diff --git a/frontend/src/modules/automation/config/automation-types/webhook.ts b/frontend/src/modules/automation/config/automation-types/webhook.ts
deleted file mode 100644
index 1078b3e87f..0000000000
--- a/frontend/src/modules/automation/config/automation-types/webhook.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { AutomationTypeConfig } from '@/modules/automation/config/automation-types/index';
-
-export const webhook: AutomationTypeConfig = {
- name: 'Webhook',
- description: 'Send webhook payloads to automate workflows',
- icon: '/images/automation/webhook.png',
- emptyScreen: {
- title: 'No Webhooks yet',
- body: 'Create webhook actions when a new activity happens, or a new member joins your community',
- },
- canCreate: () => true,
-};
diff --git a/frontend/src/modules/automation/config/automation-types/webhook/config.ts b/frontend/src/modules/automation/config/automation-types/webhook/config.ts
new file mode 100644
index 0000000000..d1eeb3dbfe
--- /dev/null
+++ b/frontend/src/modules/automation/config/automation-types/webhook/config.ts
@@ -0,0 +1,19 @@
+import { AutomationTypeConfig } from '@/modules/automation/config/automation-types';
+import AutomationsWebhookAction from './webhook-action.vue';
+import AutomationsTriggerMemberActivity from '../shared/trigger-member-activity.vue';
+
+export const webhook: AutomationTypeConfig = {
+ name: 'Webhook',
+ description: 'Send webhook payloads to automate workflows',
+ icon: '/images/automation/webhook.png',
+ emptyScreen: {
+ title: 'No Webhooks yet',
+ body: 'Create webhook actions when a new activity happens, or a new member joins your community',
+ },
+ triggerText: 'Define the event that triggers your webhook',
+ actionText: 'Define the endpoint where the webhook payload should be sent to',
+ createButtonText: 'Add webhook',
+ canCreate: () => true,
+ actionComponent: AutomationsWebhookAction,
+ triggerComponent: AutomationsTriggerMemberActivity,
+};
diff --git a/frontend/src/modules/automation/components/action/webhook-action.vue b/frontend/src/modules/automation/config/automation-types/webhook/webhook-action.vue
similarity index 100%
rename from frontend/src/modules/automation/components/action/webhook-action.vue
rename to frontend/src/modules/automation/config/automation-types/webhook/webhook-action.vue
diff --git a/frontend/src/modules/automation/pages/automation-list-page.vue b/frontend/src/modules/automation/pages/automation-list-page.vue
index ab207ae838..56da68c7d9 100644
--- a/frontend/src/modules/automation/pages/automation-list-page.vue
+++ b/frontend/src/modules/automation/pages/automation-list-page.vue
@@ -89,7 +89,7 @@
v-else
icon="ri-flow-chart"
title="Start to automate manual tasks"
- description="Create webhook actions or send Slack notifications when a new activity happens, or a new member joins your community "
+ description="Create config actions or send Slack notifications when a new activity happens, or a new member joins your community "
/>
@@ -196,7 +196,7 @@ const slackConnectUrl = computed(() => {
return `${config.backendUrl}/tenant/${
currentTenant.value.id
- }/automation/slack?redirectUrl=${redirectUrl}&crowdToken=${AuthToken.get()}`;
+ }/automation/config?redirectUrl=${redirectUrl}&crowdToken=${AuthToken.get()}`;
});
const authenticateSlack = () => {
From b7540360b2b66e61ec899c10b2fc0b2040a2c9a5 Mon Sep 17 00:00:00 2001
From: Gasper Grom
Date: Mon, 24 Jul 2023 17:16:07 +0200
Subject: [PATCH 03/42] Add common trigger component
---
.../automation/components/automation-form.vue | 13 ----
.../shared/trigger-member-activity.vue | 62 +++++++++++++++++--
.../webhook/webhook-action.vue | 4 +-
3 files changed, 61 insertions(+), 18 deletions(-)
diff --git a/frontend/src/modules/automation/components/automation-form.vue b/frontend/src/modules/automation/components/automation-form.vue
index 518ccf7b4d..6e4b3a4a13 100644
--- a/frontend/src/modules/automation/components/automation-form.vue
+++ b/frontend/src/modules/automation/components/automation-form.vue
@@ -151,19 +151,6 @@ const type = computed(() => props.automation?.type || props.type);
const isEdit = computed(() => props.automation !== null);
-const triggerOptions = ref([
- {
- label: 'New activity happened in your community',
- value: 'new_activity',
- },
- {
- label: 'New member joined your community',
- value: 'new_member',
- },
-]);
-
-const collapseOpen = ref('filterOptions');
-
// Setup and validation
const form = reactive({
name: '',
diff --git a/frontend/src/modules/automation/config/automation-types/shared/trigger-member-activity.vue b/frontend/src/modules/automation/config/automation-types/shared/trigger-member-activity.vue
index 967bdb5f29..2a8b110ead 100644
--- a/frontend/src/modules/automation/config/automation-types/shared/trigger-member-activity.vue
+++ b/frontend/src/modules/automation/config/automation-types/shared/trigger-member-activity.vue
@@ -10,7 +10,7 @@
}"
>
@@ -44,6 +44,60 @@ import AppNewActivityFilterOptions
from '@/modules/automation/config/automation-types/shared/filter-options/new-activity-filter-options.vue';
import AppNewMemberFilterOptions
from '@/modules/automation/config/automation-types/shared/filter-options/new-member-filter-options.vue';
+import { computed, defineEmits, ref } from 'vue';
+import { required } from '@vuelidate/validators';
+import useVuelidate from '@vuelidate/core';
+
+interface AutomationTriggerForm {
+ trigger: string;
+ settings: any;
+}
+
+const props = defineProps();
+
+const emit = defineEmits<{(e: 'update:trigger', value: string), (e: 'update:settings', value: any),}>();
+
+const collapseOpen = ref('filterOptions');
+
+const triggerOptions = ref([
+ {
+ label: 'New activity happened in your community',
+ value: 'new_activity',
+ },
+ {
+ label: 'New member joined your community',
+ value: 'new_member',
+ },
+]);
+
+const trigger = computed({
+ get() {
+ return props.trigger;
+ },
+ set(value: string) {
+ emit('update:trigger', value);
+ },
+});
+
+const settings = computed({
+ get() {
+ return props.settings;
+ },
+ set(value: any) {
+ emit('update:settings', value);
+ },
+});
+
+const rules = {
+ trigger: {
+ required,
+ },
+};
+
+const $v = useVuelidate(rules, {
+ trigger,
+ settings,
+});
+
+
diff --git a/frontend/src/modules/automation/config/automation-types/hubspot/actions/hubspot-action-contact-list.vue b/frontend/src/modules/automation/config/automation-types/hubspot/actions/hubspot-action-contact-list.vue
new file mode 100644
index 0000000000..db9973b579
--- /dev/null
+++ b/frontend/src/modules/automation/config/automation-types/hubspot/actions/hubspot-action-contact-list.vue
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
diff --git a/frontend/src/modules/automation/config/automation-types/hubspot/config.ts b/frontend/src/modules/automation/config/automation-types/hubspot/config.ts
index 9f69d3c067..ad895f0510 100644
--- a/frontend/src/modules/automation/config/automation-types/hubspot/config.ts
+++ b/frontend/src/modules/automation/config/automation-types/hubspot/config.ts
@@ -1,23 +1,55 @@
import { AutomationTypeConfig } from '@/modules/automation/config/automation-types';
-// import { CrowdIntegrations } from '@/integrations/integrations-config';
+import { FeatureFlag } from '@/featureFlag';
import AutomationsHubspotAction from './hubspot-action.vue';
-import AutomationsHubspotTrigger from './hubspot-trigger.vue'
+import AutomationsHubspotTrigger from './hubspot-trigger.vue';
+import AutomationsHubspotPaywall from './hubspot-paywall.vue';
export const hubspot: AutomationTypeConfig = {
name: 'HubSpot',
description: 'Send members or organizations to HubSpot',
icon: '/images/integrations/hubspot.png',
+ emptyScreen: {
+ title: 'No HubSpot automations yet',
+ body: 'Send members or organizations to HubSpot based on certain conditions.',
+ },
triggerText: 'Define the conditions that will trigger your HubSpot action.',
actionText: 'Define which action will take place in HubSpot based on the defined conditions.',
canCreate(store) {
- return true;
// const hubspot = CrowdIntegrations.getMappedConfig('hubspot', store);
- // return hubspot.status === 'done';
+ // return hubspot.status === 'done' && FeatureFlag.isFlagEnabled('hubspot');
+ return true;
},
disabled(store) {
+ // const hubspot = CrowdIntegrations.getMappedConfig('hubspot', store);
+ // return FeatureFlag.isFlagEnabled('hubspot') && hubspot.status !== 'done';
return false;
+ },
+ tooltip(store) {
// const hubspot = CrowdIntegrations.getMappedConfig('hubspot', store);
- // return hubspot.status !== 'done';
+ // if (FeatureFlag.isFlagEnabled('hubspot') && hubspot.status !== 'done') {
+ // return 'Connect with HubSpot via Integrations to enable this automation';
+ // }
+ // return null;
+ return null;
+ },
+ actionButton() {
+ const hubspotEnabeled = FeatureFlag.isFlagEnabled('hubspot');
+ if (hubspotEnabeled) {
+ return null;
+ }
+ return {
+ label: 'Upgrade plan',
+ action: () => {
+ window.open('https://cal.com/team/crowddotdev/custom-plan', '_blank');
+ },
+ };
+ },
+ paywallComponent() {
+ const hubspotEnabeled = FeatureFlag.isFlagEnabled('hubspot');
+ if (hubspotEnabeled) {
+ return null;
+ }
+ return AutomationsHubspotPaywall;
},
actionComponent: AutomationsHubspotAction,
triggerComponent: AutomationsHubspotTrigger,
diff --git a/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-action.vue b/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-action.vue
index 6b22e9bb93..7b91d49a48 100644
--- a/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-action.vue
+++ b/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-action.vue
@@ -1,63 +1,135 @@
-
+
+
+
+
+ {{ actionOption.label }}
+
+
+ {{ actionOption.description }}
+
+
+
+
+
-
-
diff --git a/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-trigger.vue b/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-trigger.vue
index 32ee57d4e1..f69bda05e0 100644
--- a/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-trigger.vue
+++ b/frontend/src/modules/automation/config/automation-types/hubspot/hubspot-trigger.vue
@@ -1,7 +1,7 @@
+
+
+
+
+ Condition(s) *
+
+
+
+ Matching {{ settings.operator === 'and' ? 'all' : 'any' }}
+
+
+
+ Matching all
+
+
+
+ Matching any
+
+
+
+
+
+
+
+
+
+
+
+ + Add condition
+
+
+
+ {{ config.label }}
+
+
+
+
+
diff --git a/frontend/src/modules/automation/config/automation-types/index.ts b/frontend/src/modules/automation/config/automation-types/index.ts
index 4a86360cc2..8af97c0b7f 100644
--- a/frontend/src/modules/automation/config/automation-types/index.ts
+++ b/frontend/src/modules/automation/config/automation-types/index.ts
@@ -26,7 +26,8 @@ export interface AutomationTypeConfig {
actionComponent: any; // Component which handeles form for action
triggerComponent: any; // Component which handeles form for trigger
paywallComponent?: (store: any) => any | null;
- settingsMap?: (settings: any, trigger: string) => any;
+ settingsMap?: (settings: any, trigger: string) => any; // Mapping automation settings before they are sent to backend
+ enableGuard?: (automation: any, store: any) => boolean; // Guard protecting automation from enabling
}
export const automationTypes: Record = {
diff --git a/frontend/src/modules/organization/config/filters/annualRevenue/config.ts b/frontend/src/modules/organization/config/filters/annualRevenue/config.ts
index 2504f422b6..8e7c91ec23 100644
--- a/frontend/src/modules/organization/config/filters/annualRevenue/config.ts
+++ b/frontend/src/modules/organization/config/filters/annualRevenue/config.ts
@@ -17,7 +17,7 @@ const annualRevenue: NumberFilterConfig = {
return itemLabelRendererByType[FilterConfigType.NUMBER]('Annual revenue', value, options);
},
apiFilterRenderer(value: NumberFilterValue): any[] {
- return apiFilterRendererByType[FilterConfigType.NUMBER]('annualRevenue', value);
+ return apiFilterRendererByType[FilterConfigType.NUMBER]('revenueRange.max', value);
},
};
diff --git a/frontend/src/modules/organization/config/filters/main.ts b/frontend/src/modules/organization/config/filters/main.ts
index e12ebfbc65..34e66bee49 100644
--- a/frontend/src/modules/organization/config/filters/main.ts
+++ b/frontend/src/modules/organization/config/filters/main.ts
@@ -1,6 +1,5 @@
import { FilterConfig } from '@/shared/modules/filters/types/FilterConfig';
import { SearchFilterConfig } from '@/shared/modules/filters/types/filterTypes/SearchFilterConfig';
-import annualRevenue from '@/modules/organization/config/filters/annualRevenue/config';
import noOfMembers from './noOfMembers/config';
import noOfActivities from './noOfActivities/config';
import activeOn from './activeOn/config';
@@ -27,7 +26,6 @@ export const organizationFilters: Record = {
lastActivityDate,
location,
type,
- annualRevenue,
};
export const organizationSearchFilter: SearchFilterConfig = {
From b5d07eac5566702718a1df620d1d99d504eea521 Mon Sep 17 00:00:00 2001
From: Gasper Grom
Date: Wed, 26 Jul 2023 14:20:45 +0200
Subject: [PATCH 11/42] Fetch integrations
---
.../automation/components/automation-form.vue | 1 -
.../components/automation-toggle.vue | 1 -
.../automation/pages/automation-list-page.vue | 27 +++----------------
3 files changed, 3 insertions(+), 26 deletions(-)
diff --git a/frontend/src/modules/automation/components/automation-form.vue b/frontend/src/modules/automation/components/automation-form.vue
index 0a2ab23048..8eb3f5c624 100644
--- a/frontend/src/modules/automation/components/automation-form.vue
+++ b/frontend/src/modules/automation/components/automation-form.vue
@@ -133,7 +133,6 @@ const emit = defineEmits(['update:modelValue', 'update:automation']);
const { createAutomation, updateAutomation, getAutomations } = useAutomationStore();
const store = useStore();
-const fetchIntegrations = () => store.dispatch('integration/doFetch');
const isDrawerOpen = computed({
get() {
diff --git a/frontend/src/modules/automation/components/automation-toggle.vue b/frontend/src/modules/automation/components/automation-toggle.vue
index 8386e1f979..9b5f845e04 100644
--- a/frontend/src/modules/automation/components/automation-toggle.vue
+++ b/frontend/src/modules/automation/components/automation-toggle.vue
@@ -32,7 +32,6 @@ const { changePublishState } = useAutomationStore();
const canEnable = computed(() => {
const { type } = props.automation;
if (automationTypes[type]?.enableGuard) {
- console.log(automationTypes[type]?.enableGuard(props.automation, store));
return props.automation.state === 'active' || automationTypes[type]?.enableGuard(props.automation, store);
}
return true;
diff --git a/frontend/src/modules/automation/pages/automation-list-page.vue b/frontend/src/modules/automation/pages/automation-list-page.vue
index 5e9018cd50..e7158b3aba 100644
--- a/frontend/src/modules/automation/pages/automation-list-page.vue
+++ b/frontend/src/modules/automation/pages/automation-list-page.vue
@@ -118,15 +118,13 @@
+
+
diff --git a/frontend/src/integrations/hubspot/components/hubspot-settings-drawer.vue b/frontend/src/integrations/hubspot/components/hubspot-settings-drawer.vue
index f366e031b4..0465f50cc7 100644
--- a/frontend/src/integrations/hubspot/components/hubspot-settings-drawer.vue
+++ b/frontend/src/integrations/hubspot/components/hubspot-settings-drawer.vue
@@ -125,12 +125,13 @@