Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ export class FoundTableRowsDs {
@ApiProperty()
allow_csv_import: boolean;

@ApiProperty()
can_delete: boolean;

@ApiProperty()
can_update: boolean;

@ApiProperty()
can_add: boolean;

@ApiProperty({ type: CreatedTableFilterRO, isArray: true })
saved_filters: Array<CreatedTableFilterRO>;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ export class GetTableRowsUseCase extends AbstractUseCase<GetTableRowsDs, FoundTa
allow_csv_export: allowCsvExport,
allow_csv_import: allowCsvImport,
saved_filters: savedTableFilters.map((el) => buildCreatedTableFilterRO(el)),
can_delete: tableSettings ? tableSettings.can_delete : true,
can_update: tableSettings ? tableSettings.can_update : true,
can_add: tableSettings ? tableSettings.can_add : true,
};

const identitiesMap = new Map<string, any[]>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,7 @@ test.serial(`${currentTest} should add row in table and return result`, async (t
t.is(getLogsRO.logs[addRowLogIndex].hasOwnProperty('affected_primary_key'), true);
t.is(typeof getLogsRO.logs[addRowLogIndex].affected_primary_key, 'object');
t.is(getLogsRO.logs[addRowLogIndex].affected_primary_key.hasOwnProperty('id'), true);
t.is(getLogsRO.logs[addRowLogIndex].affected_primary_key.id, 43);
t.is(getLogsRO.logs[addRowLogIndex].affected_primary_key.id, String(43));
});

test.serial(`${currentTest} should throw an exception when connection id is not passed in request`, async (t) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,7 @@ test.serial(`${currentTest} should add row in table and return result`, async (t
t.is(getLogsRO.logs[addRowLogIndex].hasOwnProperty('affected_primary_key'), true);
t.is(typeof getLogsRO.logs[addRowLogIndex].affected_primary_key, 'object');
t.is(getLogsRO.logs[addRowLogIndex].affected_primary_key.hasOwnProperty('id'), true);
t.is(getLogsRO.logs[addRowLogIndex].affected_primary_key.id, 43);
t.is(getLogsRO.logs[addRowLogIndex].affected_primary_key.id, String(43));
});

test.serial(`${currentTest} should throw an exception when connection id is not passed in request`, async (t) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,7 @@ test.serial(`${currentTest} should add row in table and return result`, async (t
t.is(getLogsRO.logs[addRowLogIndex].hasOwnProperty('affected_primary_key'), true);
t.is(typeof getLogsRO.logs[addRowLogIndex].affected_primary_key, 'object');
t.is(getLogsRO.logs[addRowLogIndex].affected_primary_key.hasOwnProperty('id'), true);
t.is(getLogsRO.logs[addRowLogIndex].affected_primary_key.id, 43);
t.is(getLogsRO.logs[addRowLogIndex].affected_primary_key.id, String(43));
});

test.serial(`${currentTest} should throw an exception when connection id is not passed in request`, async (t) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ test.serial(`${currentTest} should add row in table and return result`, async (t
t.is(getLogsRO.logs[addRowLogIndex].hasOwnProperty('affected_primary_key'), true);
t.is(typeof getLogsRO.logs[addRowLogIndex].affected_primary_key, 'object');
t.is(getLogsRO.logs[addRowLogIndex].affected_primary_key.hasOwnProperty('id'), true);
t.is(getLogsRO.logs[addRowLogIndex].affected_primary_key.id, 43);
t.is(getLogsRO.logs[addRowLogIndex].affected_primary_key.id, String(43));
});

test.serial(`${currentTest} should throw an exception when connection id is not passed in request`, async (t) => {
Expand Down
Loading