π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
feat: enable scripts & dashboards in free plan
DarkPhoenix27049f135bf8bb75
diff --git a/packages/nc-gui/composables/useEeConfig.ts b/packages/nc-gui/composables/useEeConfig.tsindex fd398a7442..036338f63b 100644--- a/packages/nc-gui/composables/useEeConfig.ts+++ b/packages/nc-gui/composables/useEeConfig.ts@@ -55,10 +55,12 @@ export const useEeConfig = createSharedComposable(() => {const blockTableAndFieldPermissions = computed(() => true)- const blockUseScripts = computed(() => false)-const blockPrivateBases = computed(() => true)+ const blockAddNewDashboard = computed(() => true)++ const blockAddNewScript = computed(() => true)+const showUserMayChargeAlert = computed(() => false)const maxAttachmentsAllowedInCell = computed(() => {@@ -116,12 +118,14 @@ export const useEeConfig = createSharedComposable(() => {const showUpgradeToUseTableAndFieldPermissions = (..._args: any[]) => {}- const showUpgradeToUseScripts = (..._args: any[]) => {}-const showUpgradeToUsePrivateBases = (..._args: any[]) => {}const showUpgradeToAddMoreAttachmentsInCell = (..._args: any[]) => {}+ const showDashboardPlanLimitExceededModal = (..._args: any[]) => {}++ const showScriptPlanLimitExceededModal = (..._args: any[]) => {}+return {calculatePrice,getLimit,@@ -170,12 +174,14 @@ export const useEeConfig = createSharedComposable(() => {showUpgradeToUseRowColoring,blockTableAndFieldPermissions,showUpgradeToUseTableAndFieldPermissions,- blockUseScripts,- showUpgradeToUseScripts,blockPrivateBases,showUpgradeToUsePrivateBases,showUserMayChargeAlert,maxAttachmentsAllowedInCell,showUpgradeToAddMoreAttachmentsInCell,+ showDashboardPlanLimitExceededModal,+ showScriptPlanLimitExceededModal,+ blockAddNewScript,+ blockAddNewDashboard,}})diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.jsonindex 9bad90061b..2d635948d7 100644--- a/packages/nc-gui/lang/en.json+++ b/packages/nc-gui/lang/en.json@@ -121,8 +121,10 @@"upgradeToAdd": "Upgrade to add","requestUpgradeToAdd": "Request upgrade to add","upgradeToAddMoreExtensions": "You're currently on the Free plan, which allows only one extension. Upgrade to unlock unlimited extensions.",- "upgradeToAddMoreScripts": "You're currently on the Free plan, which allows only one script. Upgrade to unlock unlimited scripts.",- "upgradeToAddMoreDashboards": "You're currently on the Free plan, which allows only one dashboard. Upgrade to unlock unlimited dashboards.",+ "upgradeToAddMoreScripts": "Upgrade to add more scripts",+ "upgradeToAddMoreDashboards": "Upgrade to add more dashboards",+ "upgradeToAddMoreScriptsSubtitle": "You're currently on the Free plan, which allows only one script. Upgrade to unlock unlimited scripts.",+ "upgradeToAddMoreDashboardsSubtitle": "You're currently on the Free plan, which allows only one dashboard. Upgrade to unlock unlimited dashboards.","upgradeToAccessWsAudit": "Upgrade to access workspace audit","upgradeToAccessWsAuditSubtitle": "Upgrade to the {plan} plan to enable workspace audit logs and efficiently monitor key activities.","upgradeToAddMoreAttachments": "Upgrade to add more attachments",diff --git a/packages/nocodb-sdk/src/lib/payment/index.ts b/packages/nocodb-sdk/src/lib/payment/index.tsindex 201d688d55..eb4fbefb3e 100644--- a/packages/nocodb-sdk/src/lib/payment/index.ts+++ b/packages/nocodb-sdk/src/lib/payment/index.ts@@ -24,6 +24,8 @@ export enum PlanLimitTypes {LIMIT_FILTER_PER_VIEW = 'limit_filter_per_view',LIMIT_SORT_PER_VIEW = 'limit_sort_per_view',LIMIT_ATTACHMENTS_IN_CELL = 'limit_attachments_in_cell',+ LIMIT_SCRIPT_PER_WORKSPACE = 'limit_script_per_workspace',+ LIMIT_DASHBOARD_PER_WORKSPACE = 'limit_dashboard_per_workspace',}export enum PlanFeatureTypes {@@ -46,8 +48,6 @@ export enum PlanFeatureTypes {FEATURE_LOOKUP_LIMIT_RECORDS_BY_FILTER = 'feature_lookup_limit_records_by_filter',FEATURE_ROLLUP_LIMIT_RECORDS_BY_FILTER = 'feature_rollup_limit_records_by_filter',FEATURE_PERSONAL_VIEWS = 'feature_personal_views',- FEATURE_SCRIPTS = 'feature_scripts',- FEATURE_DASHBOARD = 'feature_dashboard',FEATURE_SSO = 'feature_sso',FEATURE_WEBHOOK_CUSTOM_PAYLOAD = 'feature_webhook_custom_payload',FEATURE_WORKSPACE_CUSTOM_LOGO = 'feature_workspace_custom_logo',@@ -197,6 +197,10 @@ export const PlanLimitUpgradeMessages: Record<PlanLimitTypes, string> = {[PlanLimitTypes.LIMIT_SORT_PER_VIEW]: 'to add more sort rules in a view.',[PlanLimitTypes.LIMIT_ATTACHMENTS_IN_CELL]:'to add more attachments in a cell.',+ [PlanLimitTypes.LIMIT_SCRIPT_PER_WORKSPACE]:+ 'to add more scripts in a workspace.',+ [PlanLimitTypes.LIMIT_DASHBOARD_PER_WORKSPACE]:+ 'to add more dashboards in a workspace.',};export const PlanFeatureUpgradeMessages: Record<PlanFeatureTypes, string> = {@@ -226,8 +230,6 @@ export const PlanFeatureUpgradeMessages: Record<PlanFeatureTypes, string> = {[PlanFeatureTypes.FEATURE_ROLLUP_LIMIT_RECORDS_BY_FILTER]:'to limit rollup records by filters.',[PlanFeatureTypes.FEATURE_PERSONAL_VIEWS]: 'to use personal views.',- [PlanFeatureTypes.FEATURE_SCRIPTS]: 'to enable scripts.',- [PlanFeatureTypes.FEATURE_DASHBOARD]: 'to use dashboards.',[PlanFeatureTypes.FEATURE_SSO]: 'to enable SSO (Single Sign-On).',[PlanFeatureTypes.FEATURE_WEBHOOK_CUSTOM_PAYLOAD]:'to send custom webhook payloads.',