From ece638bbf5406d2d780d6d60e943a4bc9cf0f9d1 Mon Sep 17 00:00:00 2001 From: Gasper Grom Date: Fri, 29 Sep 2023 16:01:56 +0200 Subject: [PATCH 01/22] Custom views creation --- frontend/src/i18n/en.js | 4 +- .../devto/components/devto-connect-drawer.vue | 10 +- .../github/components/github-connect.vue | 6 +- .../components/hackerNews-connect-drawer.vue | 6 +- .../linkedin/components/linkedin-connect.vue | 2 +- .../components/linkedin-settings-drawer.vue | 6 +- frontend/src/integrations/linkedin/config.js | 2 +- .../activity/components/activity-header.vue | 2 +- .../components/dashboard-organizations.vue | 4 +- .../dashboard-organization-item.vue | 6 +- .../components/integration-list-page.vue | 10 +- .../modules/integration/integration-store.js | 2 +- .../src/modules/layout/layout-page-content.js | 6 +- .../bulk/bulk-edit-attribute-popover.vue | 4 +- .../form/member-form-organizations-create.vue | 14 +- .../form/member-form-organizations-drawer.vue | 22 +- .../form/member-form-organizations.vue | 22 +- .../member/components/member-dropdown.vue | 4 +- .../components/member-organizations.vue | 8 +- .../modules/member/config/saved-views/main.ts | 8 +- .../settings/bot/MemberBotSetting.vue | 51 +++++ .../settings/{bot.ts => bot/config.ts} | 9 +- .../settings/common/includeFilterRenderer.ts | 2 +- .../{ => common}/types/IncludeEnum.ts | 0 .../config.ts} | 7 +- .../teamMember/MemberTeamMemberSetting.vue | 54 +++++ .../{teamMember.ts => teamMember/config.ts} | 9 +- .../modules/member/pages/member-list-page.vue | 1 + .../form/organization-form-attributes.vue | 2 +- .../form/organization-form-identities.vue | 2 +- .../list/organization-list-table.vue | 6 +- .../list/organization-list-toolbar.vue | 2 +- .../components/organization-badge.vue | 2 +- .../components/organization-dropdown.vue | 18 +- .../components/organization-merge-dialog.vue | 4 +- .../components/organization-name.vue | 2 +- .../organization-selection-dropdown.vue | 6 +- ...organization-merge-suggestions-details.vue | 24 +-- .../view/_aside/_aside-enriched.vue | 2 +- .../view/organization-view-aside.vue | 2 +- .../view/organization-view-header.vue | 18 +- .../view/organization-view-members.vue | 2 +- .../organization/config/enrichment/index.ts | 2 +- .../filters/enrichedOrganization/config.ts | 4 +- .../settings/common/includeFilterRenderer.ts | 2 +- .../organization/organization-field.js | 2 +- .../organization/organization-model.js | 2 +- .../pages/organization-form-page.vue | 16 +- .../pages/organization-list-page.vue | 2 +- .../pages/organization-view-page.vue | 4 +- .../settings/settings-pricing-plans.js | 4 +- .../cube/_query_builder/DimensionSelect.vue | 12 +- .../cube/_query_builder/FilterComponent.vue | 12 +- frontend/src/shared/form/form-item.vue | 2 +- .../saved-views/components/SavedViews.vue | 51 ++++- .../components/forms/SavedViewForm.vue | 202 ++++++++++++++++++ .../saved-views/types/SavedViewsConfig.ts | 3 +- 57 files changed, 523 insertions(+), 170 deletions(-) create mode 100644 frontend/src/modules/member/config/saved-views/settings/bot/MemberBotSetting.vue rename frontend/src/modules/member/config/saved-views/settings/{bot.ts => bot/config.ts} (69%) rename frontend/src/modules/member/config/saved-views/settings/{ => common}/types/IncludeEnum.ts (100%) rename frontend/src/modules/member/config/saved-views/settings/{organization.ts => organization/config.ts} (79%) create mode 100644 frontend/src/modules/member/config/saved-views/settings/teamMember/MemberTeamMemberSetting.vue rename frontend/src/modules/member/config/saved-views/settings/{teamMember.ts => teamMember/config.ts} (67%) create mode 100644 frontend/src/shared/modules/saved-views/components/forms/SavedViewForm.vue diff --git a/frontend/src/i18n/en.js b/frontend/src/i18n/en.js index 21fc3160dc..06125e9728 100644 --- a/frontend/src/i18n/en.js +++ b/frontend/src/i18n/en.js @@ -237,12 +237,12 @@ const en = { create: { success: 'Organization successfully saved', error: - 'There was an error creating the organization', + 'There was an error creating the config', }, update: { success: 'Organization successfully saved', error: - 'There was an error updating the organization', + 'There was an error updating the config', }, destroy: { success: 'Organization successfully deleted', diff --git a/frontend/src/integrations/devto/components/devto-connect-drawer.vue b/frontend/src/integrations/devto/components/devto-connect-drawer.vue index fd95563491..663531cf9e 100644 --- a/frontend/src/integrations/devto/components/devto-connect-drawer.vue +++ b/frontend/src/integrations/devto/components/devto-connect-drawer.vue @@ -17,11 +17,11 @@ diff --git a/frontend/src/shared/modules/saved-views/types/SavedViewsConfig.ts b/frontend/src/shared/modules/saved-views/types/SavedViewsConfig.ts index b094ff33a0..11b5b6a851 100644 --- a/frontend/src/shared/modules/saved-views/types/SavedViewsConfig.ts +++ b/frontend/src/shared/modules/saved-views/types/SavedViewsConfig.ts @@ -2,8 +2,10 @@ import { Filter } from '@/shared/modules/filters/types/FilterConfig'; export interface SavedView { id: string; - label: string; - filter: Filter & Record + name: string; + visibility: string; + placement: string; + config: Filter & Record } export interface SavedViewsSetting { @@ -24,6 +26,6 @@ export interface SavedViewsConfig { export interface SavedViewCreate { name: string; visibility: string; - placement: [string]; + placement: string; config: Filter & Record } From 0536bde789f9b794bb2230558228f16c9d653279 Mon Sep 17 00:00:00 2001 From: Gasper Grom Date: Fri, 13 Oct 2023 21:31:51 +0700 Subject: [PATCH 08/22] Deletion, editing & order management --- .../components/dashboard-members.vue | 2 +- .../modules/member/config/saved-views/main.ts | 4 +- .../views/{all-members.ts => all-contacts.ts} | 4 +- .../config/saved-views/views/team-members.ts | 0 .../src/modules/member/store/pinia/state.ts | 4 +- .../components/SavedViewManagement.vue | 44 ++++++++++- .../saved-views/components/SavedViews.vue | 16 ++-- .../components/forms/SavedViewForm.vue | 79 ++++++++++++------- .../services/saved-views.service.ts | 19 ++++- .../saved-views/types/SavedViewsConfig.ts | 3 +- 10 files changed, 130 insertions(+), 45 deletions(-) rename frontend/src/modules/member/config/saved-views/views/{all-members.ts => all-contacts.ts} (87%) delete mode 100644 frontend/src/modules/member/config/saved-views/views/team-members.ts diff --git a/frontend/src/modules/dashboard/components/dashboard-members.vue b/frontend/src/modules/dashboard/components/dashboard-members.vue index a16525496f..2b06a527c2 100644 --- a/frontend/src/modules/dashboard/components/dashboard-members.vue +++ b/frontend/src/modules/dashboard/components/dashboard-members.vue @@ -221,7 +221,7 @@ import { DAILY_GRANULARITY_FILTER } from '@/modules/widget/widget-constants'; import AppDashboardMemberItem from '@/modules/dashboard/components/member/dashboard-member-item.vue'; import AppDashboardCount from '@/modules/dashboard/components/dashboard-count.vue'; import { filterQueryService } from '@/shared/modules/filters/services/filter-query.service'; -import allMembers from '@/modules/member/config/saved-views/views/all-members'; +import allContacts from '@/modules/member/config/saved-views/views/all-contacts'; export default { name: 'AppDashboardMember', diff --git a/frontend/src/modules/member/config/saved-views/main.ts b/frontend/src/modules/member/config/saved-views/main.ts index 869487e748..f1ad3d19c1 100644 --- a/frontend/src/modules/member/config/saved-views/main.ts +++ b/frontend/src/modules/member/config/saved-views/main.ts @@ -1,12 +1,12 @@ import { SavedViewsConfig } from '@/shared/modules/saved-views/types/SavedViewsConfig'; -import allMembers from './views/all-members'; +import allContacts from './views/all-contacts'; import bot from './settings/bot/config'; import teamMember from './settings/teamMember/config'; import organization from './settings/organization/config'; export const memberSavedViews: SavedViewsConfig = { - defaultView: allMembers, + defaultView: allContacts, settings: { teamMember, bot, diff --git a/frontend/src/modules/member/config/saved-views/views/all-members.ts b/frontend/src/modules/member/config/saved-views/views/all-contacts.ts similarity index 87% rename from frontend/src/modules/member/config/saved-views/views/all-members.ts rename to frontend/src/modules/member/config/saved-views/views/all-contacts.ts index ed53838edf..3708e865ff 100644 --- a/frontend/src/modules/member/config/saved-views/views/all-members.ts +++ b/frontend/src/modules/member/config/saved-views/views/all-contacts.ts @@ -1,6 +1,6 @@ import { SavedView } from '@/shared/modules/saved-views/types/SavedViewsConfig'; -const allMembers: SavedView = { +const allContacts: SavedView = { id: 'all-contacts', name: 'All contacts', placement: 'member', @@ -20,4 +20,4 @@ const allMembers: SavedView = { }, }; -export default allMembers; +export default allContacts; diff --git a/frontend/src/modules/member/config/saved-views/views/team-members.ts b/frontend/src/modules/member/config/saved-views/views/team-members.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/frontend/src/modules/member/store/pinia/state.ts b/frontend/src/modules/member/store/pinia/state.ts index c626aa064f..d7c1ad2089 100644 --- a/frontend/src/modules/member/store/pinia/state.ts +++ b/frontend/src/modules/member/store/pinia/state.ts @@ -1,6 +1,6 @@ import { Filter, FilterConfig } from '@/shared/modules/filters/types/FilterConfig'; import { Member } from '@/modules/member/types/Member'; -import allMembers from '@/modules/member/config/saved-views/views/all-members'; +import allContacts from '@/modules/member/config/saved-views/views/all-contacts'; import { FilterCustomAttribute } from '@/shared/modules/filters/types/FilterCustomAttribute'; export interface MemberState { @@ -15,7 +15,7 @@ export interface MemberState { const state: MemberState = { filters: { - ...allMembers.filter, + ...allContacts.filter, }, savedFilterBody: {}, customAttributes: [], diff --git a/frontend/src/shared/modules/saved-views/components/SavedViewManagement.vue b/frontend/src/shared/modules/saved-views/components/SavedViewManagement.vue index 6c8b136f01..fb0ac1d897 100644 --- a/frontend/src/shared/modules/saved-views/components/SavedViewManagement.vue +++ b/frontend/src/shared/modules/saved-views/components/SavedViewManagement.vue @@ -12,7 +12,7 @@
- +
diff --git a/frontend/src/shared/modules/saved-views/components/SavedViews.vue b/frontend/src/shared/modules/saved-views/components/SavedViews.vue index 45b3db3151..94ae889eee 100644 --- a/frontend/src/shared/modules/saved-views/components/SavedViews.vue +++ b/frontend/src/shared/modules/saved-views/components/SavedViews.vue @@ -1,14 +1,14 @@