Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

style: apply eslint auto-fix formatting changes

Pranav C6e0a698063c7
diff --git a/packages/nc-gui/composables/useViewColumns.ts b/packages/nc-gui/composables/useViewColumns.ts
index fcc5041116..2ae5a24228 100644
--- a/packages/nc-gui/composables/useViewColumns.ts
+++ b/packages/nc-gui/composables/useViewColumns.ts
@@ -52,9 +52,7 @@ const [useProvideViewColumns, useViewColumns] = useInjectionState(
const { isUserViewOwner } = useViewsStore()
- const isPersonalViewOwner = computed(
- () => view.value?.lock_type === ViewLockType.Personal && isUserViewOwner(view.value),
- )
+ const isPersonalViewOwner = computed(() => view.value?.lock_type === ViewLockType.Personal && isUserViewOwner(view.value))
const canEditViewFields = computed(() => {
if (isUIAllowed('viewFieldEdit')) return true
diff --git a/packages/nc-gui/composables/useViewFilters.ts b/packages/nc-gui/composables/useViewFilters.ts
index a785ccb456..ce01718bd0 100644
--- a/packages/nc-gui/composables/useViewFilters.ts
+++ b/packages/nc-gui/composables/useViewFilters.ts
@@ -3,8 +3,8 @@ import {
type FilterType,
type LinkToAnotherRecordType,
type LookupType,
- type ViewType,
ViewLockType,
+ type ViewType,
getEquivalentUIType,
isDateType,
parseProp,
@@ -412,11 +412,7 @@ export function useViewFilters(
}
if (!view.value?.id || !meta.value) return
- if (
- (nestedMode.value && (isTemp.value || !canListFilterChildren.value)) ||
- (isForm.value && !isWebhook) ||
- isWorkflow
- ) {
+ if ((nestedMode.value && (isTemp.value || !canListFilterChildren.value)) || (isForm.value && !isWebhook) || isWorkflow) {
// ignore restoring if not root filter group
return
}
diff --git a/packages/nc-gui/lib/acl.ts b/packages/nc-gui/lib/acl.ts
index 47b15fd6a2..2c57897287 100644
--- a/packages/nc-gui/lib/acl.ts
+++ b/packages/nc-gui/lib/acl.ts
@@ -124,8 +124,8 @@ const rolePermissions = {
extensionUpdate: true,
// Sort/Filter sync for personal views (middleware handles non-personal view restrictions)
- // sortSync: true,
- // filterSync: true,
+ // sortSync: true,
+ // filterSync: true,
},
},
[ProjectRoles.COMMENTER]: {
diff --git a/packages/nocodb/src/constants/index.ts b/packages/nocodb/src/constants/index.ts
index 1d343b077e..ac78ab9bbc 100644
--- a/packages/nocodb/src/constants/index.ts
+++ b/packages/nocodb/src/constants/index.ts
@@ -16,8 +16,7 @@ if (!NC_REFRESH_TOKEN_EXP_IN_DAYS || NC_REFRESH_TOKEN_EXP_IN_DAYS <= 0) {
throw new Error('NC_REFRESH_TOKEN_EXP_IN_DAYS must be a positive number');
}
-export const NC_MAX_TEXT_LENGTH =
- +process.env['NC_MAX_TEXT_LENGTH'] || 100000;
+export const NC_MAX_TEXT_LENGTH = +process.env['NC_MAX_TEXT_LENGTH'] || 100000;
export const NC_EMAIL_ASSETS_BASE_URL = 'https://cdn.nocodb.com/emails/v2';
diff --git a/packages/nocodb/src/controllers/internal.controller.ts b/packages/nocodb/src/controllers/internal.controller.ts
index 68307accf2..f822fb7488 100644
--- a/packages/nocodb/src/controllers/internal.controller.ts
+++ b/packages/nocodb/src/controllers/internal.controller.ts
@@ -107,10 +107,7 @@ export class InternalController {
view = await View.get(bypassContext, filter.fk_view_id);
}
} else if (req.query.sortId) {
- const sort = await Sort.get(
- bypassContext,
- req.query.sortId as string,
- );
+ const sort = await Sort.get(bypassContext, req.query.sortId as string);
if (sort?.fk_view_id) {
view = await View.get(bypassContext, sort.fk_view_id);
}
diff --git a/packages/nocodb/src/meta/migrations/v0/nc_016_automation_error_notifications.ts b/packages/nocodb/src/meta/migrations/v0/nc_016_automation_error_notifications.ts
index d6f894bd61..fbd2979043 100644
--- a/packages/nocodb/src/meta/migrations/v0/nc_016_automation_error_notifications.ts
+++ b/packages/nocodb/src/meta/migrations/v0/nc_016_automation_error_notifications.ts
@@ -16,30 +16,24 @@ const up = async (knex: Knex) => {
.where('status', 'error')
.update({ error_notified_at: knex.fn.now() });
- await knex.schema.createTable(
- MetaTable.AUTOMATION_SUBSCRIBERS,
- (table) => {
- table.string('id', 20)
- table.string('fk_workspace_id', 20);
- table.string('base_id', 20)
- table.string('fk_automation_id', 20)
- table.string('fk_user_id', 20)
- table.boolean('notify_on_error').defaultTo(true);
- table.timestamps({ defaultToNow: true, useTimestamps: true})
-
- table.primary(['base_id', 'id']);
- },
- );
+ await knex.schema.createTable(MetaTable.AUTOMATION_SUBSCRIBERS, (table) => {
+ table.string('id', 20);
+ table.string('fk_workspace_id', 20);
+ table.string('base_id', 20);
+ table.string('fk_automation_id', 20);
+ table.string('fk_user_id', 20);
+ table.boolean('notify_on_error').defaultTo(true);
+ table.timestamps({ defaultToNow: true, useTimestamps: true });
+
+ table.primary(['base_id', 'id']);
+ });
await knex.schema.alterTable(MetaTable.AUTOMATION_SUBSCRIBERS, (table) => {
table.index(
['fk_automation_id'],
'nc_automation_subscribers_automation_idx',
);
- table.index(
- ['fk_user_id'],
- 'nc_automation_subscribers_user_idx',
- );
+ table.index(['fk_user_id'], 'nc_automation_subscribers_user_idx');
table.unique(['fk_automation_id', 'fk_user_id'], {
indexName: 'nc_automation_subscribers_unique_idx',
});
diff --git a/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts b/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts
index a152afa8b0..6a50195eda 100644
--- a/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts
+++ b/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts
@@ -205,7 +205,11 @@ export class ExtractIdsMiddleware implements NestMiddleware, CanActivate {
// if view API and view is personal view then check if user has access to view
// Check if it's a View (not a Model) by checking for lock_type property
- if (view && 'lock_type' in view && view.lock_type === ViewLockType.Personal) {
+ if (
+ view &&
+ 'lock_type' in view &&
+ view.lock_type === ViewLockType.Personal
+ ) {
req[VIEW_KEY] = view;
}
} else if (