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,109 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const entityTypes = {
|
||||
namespace: {
|
||||
entitiesTable: 'namespaces',
|
||||
sharesTable: 'shares_namespace',
|
||||
permissionsTable: 'permissions_namespace'
|
||||
},
|
||||
list: {
|
||||
entitiesTable: 'lists',
|
||||
sharesTable: 'shares_list',
|
||||
permissionsTable: 'permissions_list'
|
||||
},
|
||||
customForm: {
|
||||
entitiesTable: 'custom_forms',
|
||||
sharesTable: 'shares_custom_form',
|
||||
permissionsTable: 'permissions_custom_form'
|
||||
},
|
||||
campaign: {
|
||||
entitiesTable: 'campaigns',
|
||||
sharesTable: 'shares_campaign',
|
||||
permissionsTable: 'permissions_campaign',
|
||||
files: {
|
||||
file: {
|
||||
table: 'files_campaign_file',
|
||||
permissions: {
|
||||
view: 'viewFiles',
|
||||
manage: 'manageFiles'
|
||||
}
|
||||
},
|
||||
attachment: {
|
||||
table: 'files_campaign_attachment',
|
||||
permissions: {
|
||||
view: 'viewAttachments',
|
||||
manage: 'manageAttachments'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
template: {
|
||||
entitiesTable: 'templates',
|
||||
sharesTable: 'shares_template',
|
||||
permissionsTable: 'permissions_template',
|
||||
files: {
|
||||
file: {
|
||||
table: 'files_template_file',
|
||||
permissions: {
|
||||
view: 'viewFiles',
|
||||
manage: 'manageFiles'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
sendConfiguration: {
|
||||
entitiesTable: 'send_configurations',
|
||||
sharesTable: 'shares_send_configuration',
|
||||
permissionsTable: 'permissions_send_configuration'
|
||||
},
|
||||
report: {
|
||||
entitiesTable: 'reports',
|
||||
sharesTable: 'shares_report',
|
||||
permissionsTable: 'permissions_report'
|
||||
},
|
||||
reportTemplate: {
|
||||
entitiesTable: 'report_templates',
|
||||
sharesTable: 'shares_report_template',
|
||||
permissionsTable: 'permissions_report_template'
|
||||
},
|
||||
mosaicoTemplate: {
|
||||
entitiesTable: 'mosaico_templates',
|
||||
sharesTable: 'shares_mosaico_template',
|
||||
permissionsTable: 'permissions_mosaico_template',
|
||||
files: {
|
||||
file: {
|
||||
table: 'files_mosaico_template_file',
|
||||
permissions: {
|
||||
view: 'viewFiles',
|
||||
manage: 'manageFiles'
|
||||
}
|
||||
},
|
||||
block: {
|
||||
table: 'files_mosaico_template_block',
|
||||
permissions: {
|
||||
view: 'viewFiles',
|
||||
manage: 'manageFiles'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function getEntityTypes() {
|
||||
return entityTypes;
|
||||
}
|
||||
|
||||
function getEntityType(entityTypeId) {
|
||||
const entityType = entityTypes[entityTypeId];
|
||||
|
||||
if (!entityType) {
|
||||
throw new Error(`Unknown entity type ${entityTypeId}`);
|
||||
}
|
||||
|
||||
return entityType
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getEntityTypes,
|
||||
getEntityType
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue