Browse Source

misc: add spreadsheet category (#9226)

* misc: add spreadsheet category

* fix(nc-gui): maintain old tele even category

---------

Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/9230/head
Ramesh Mane 3 months ago committed by GitHub
parent
commit
62d502d53b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/nc-gui/components/workspace/integrations/IntegrationsTab.vue
  2. 4
      packages/nc-gui/lang/en.json
  3. 34
      packages/nc-gui/utils/syncDataUtils.ts
  4. 1
      packages/nocodb-sdk/src/lib/enums.ts

4
packages/nc-gui/components/workspace/integrations/IntegrationsTab.vue

@ -75,6 +75,7 @@ const integrationsMapByCategory = computed(() => {
title: curr.title,
list: getIntegrationsByCategory(curr.value, searchQuery.value),
isAvailable: curr.isAvailable,
teleEventName: curr.teleEventName,
}
return acc
@ -85,6 +86,7 @@ const integrationsMapByCategory = computed(() => {
title: string
list: IntegrationItemType[]
isAvailable?: boolean
teleEventName?: IntegrationCategoryType
}
>,
)
@ -114,7 +116,7 @@ const isAddNewIntegrationModalOpen = computed({
const handleUpvote = (category: IntegrationCategoryType, syncDataType: SyncDataType) => {
if (upvotesData.value.has(syncDataType)) return
$e(`a:integration-request:${category}:${syncDataType}`)
$e(`a:integration-request:${integrationsMapByCategory.value[category]?.teleEventName || category}:${syncDataType}`)
updateSyncDataUpvotes([...syncDataUpvotes.value, syncDataType])
}

4
packages/nc-gui/lang/en.json

@ -416,7 +416,9 @@
"storageSubtitle": "Integrate and organize your storage solutions seamlessly with NocoDB.",
"others": "Others",
"othersSubtitle": "Discover additional versatile integrations to enhance your NocoDB experience.",
"ai": "AI"
"ai": "AI",
"spreadSheet": "Spreadsheet",
"spreadSheetSubtitle": "Connect and manage your spreadsheets with NocoDB."
}
},
"datatype": {

34
packages/nc-gui/utils/syncDataUtils.ts

@ -18,6 +18,7 @@ export interface IntegrationCategoryItemType {
iconBgColor?: string
iconStyle?: CSSProperties
isAvailable?: boolean
teleEventName?: IntegrationCategoryType
}
export const integrationCategories: IntegrationCategoryItemType[] = [
@ -52,6 +53,17 @@ export const integrationCategories: IntegrationCategoryItemType[] = [
color: '#801044',
},
},
{
title: 'objects.integrationCategories.spreadSheet',
subtitle: 'objects.integrationCategories.spreadSheetSubtitle',
value: IntegrationCategoryType.SPREAD_SHEET,
teleEventName: IntegrationCategoryType.OTHERS,
icon: iconMap.viewGannt,
iconBgColor: '#FFF0D1',
iconStyle: {
color: '#977223',
},
},
{
title: 'objects.integrationCategories.projectManagement',
subtitle: 'objects.integrationCategories.projectManagementSubtitle',
@ -454,29 +466,31 @@ export const allIntegrations: IntegrationItemType[] = [
categories: [IntegrationCategoryType.STORAGE],
},
// Others
// Spreadsheet
{
title: 'objects.syncData.appleNumbers',
value: SyncDataType.APPLE_NUMBERS,
icon: iconMap.appleSolid,
categories: [IntegrationCategoryType.OTHERS],
},
{
title: 'objects.syncData.googleCalendar',
value: SyncDataType.GOOGLE_CALENDAR,
icon: iconMap.googleCalendar,
categories: [IntegrationCategoryType.OTHERS],
categories: [IntegrationCategoryType.SPREAD_SHEET],
},
{
title: 'objects.syncData.microsoftExcel',
value: SyncDataType.MICROSOFT_EXCEL,
icon: iconMap.microsoftExcel,
categories: [IntegrationCategoryType.OTHERS],
categories: [IntegrationCategoryType.SPREAD_SHEET],
},
{
title: 'objects.syncData.googleSheets',
value: SyncDataType.GOOGLE_SHEETS,
icon: iconMap.googleSheet,
categories: [IntegrationCategoryType.OTHERS],
categories: [IntegrationCategoryType.SPREAD_SHEET],
},
// Others
// {
// title: 'objects.syncData.googleCalendar',
// value: SyncDataType.GOOGLE_CALENDAR,
// icon: iconMap.googleCalendar,
// categories: [IntegrationCategoryType.OTHERS],
// },
]

1
packages/nocodb-sdk/src/lib/enums.ts

@ -417,6 +417,7 @@ export enum IntegrationCategoryType {
DATABASE = 'database',
AI = 'ai',
COMMUNICATION = 'communication',
SPREAD_SHEET = 'spread-sheet',
PROJECT_MANAGEMENT = 'project-management',
CRM = 'crm',
MARKETING = 'marketing',

Loading…
Cancel
Save