Editing of campaigns seems to work
This commit is contained in:
parent
b1c667d13d
commit
7b46c4b4b0
27 changed files with 335 additions and 130 deletions
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const knex = require('../lib/knex');
|
||||
const permissions = require('../lib/permissions');
|
||||
const entitySettings = require('./entity-settings');
|
||||
|
||||
async function ajaxListTx(tx, params, queryFun, columns, options) {
|
||||
options = options || {};
|
||||
|
@ -109,7 +109,7 @@ async function ajaxListWithPermissionsTx(tx, context, fetchSpecs, params, queryF
|
|||
|
||||
const permCols = [];
|
||||
for (const fetchSpec of fetchSpecs) {
|
||||
const entityType = permissions.getEntityType(fetchSpec.entityTypeId);
|
||||
const entityType = entitySettings.getEntityType(fetchSpec.entityTypeId);
|
||||
permCols.push({
|
||||
name: `permissions_${fetchSpec.entityTypeId}`,
|
||||
query: builder => builder
|
||||
|
@ -128,7 +128,7 @@ async function ajaxListWithPermissionsTx(tx, context, fetchSpecs, params, queryF
|
|||
let query = queryFun(builder);
|
||||
|
||||
for (const fetchSpec of fetchSpecs) {
|
||||
const entityType = permissions.getEntityType(fetchSpec.entityTypeId);
|
||||
const entityType = entitySettings.getEntityType(fetchSpec.entityTypeId);
|
||||
|
||||
if (fetchSpec.requiredOperations) {
|
||||
query = query.innerJoin(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue