cleanup , header & logo
This commit is contained in:
@@ -1,79 +0,0 @@
|
||||
/**
|
||||
* Applicant management
|
||||
*
|
||||
* @version 1.0
|
||||
* @author Michael Fallise
|
||||
*/
|
||||
class ApplicantController extends EICController {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
dispatch() {
|
||||
app.User.getBusinessPermissions([ '/organisations' ], 'Org_Member')
|
||||
.then(async payload => {
|
||||
if(payload['/organisations'].permissions.includes("list")) {
|
||||
let model = new ApplicantOrganisationsModel(payload['/organisations'].permissions)
|
||||
|
||||
model.list()
|
||||
.then( async payload => {
|
||||
if(payload.length > 0) {
|
||||
let first = payload[0];
|
||||
app.Router.route('/applicant/' + first.pic);
|
||||
} else {
|
||||
ui.growl.append("You don't belong to any organisation", 'danger')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
dashboard(options) {
|
||||
ui.lock();
|
||||
|
||||
let pic = options.params.pic;
|
||||
|
||||
app.User.getBusinessPermissions([
|
||||
'/organisations',
|
||||
'/organisations/' + pic,
|
||||
'/organisations/' + pic + '/members',
|
||||
'/organisations/' + pic + '/proposals'
|
||||
], 'Org_Member')
|
||||
.then(async payload => {
|
||||
|
||||
if(payload['/organisations/' + pic].permissions.includes('read')) {
|
||||
|
||||
// MFA: Coachings currently using proposals permissions as they are linked and BE not having coaching info locally on their side
|
||||
let models = {
|
||||
myOrganisations: new ApplicantOrganisationsModel(payload['/organisations'].permissions),
|
||||
applicant: new ApplicantOrganisationModel(payload['/organisations/' + pic].permissions),
|
||||
members: new ApplicantMembersModel(payload['/organisations/' + pic + '/members'].permissions),
|
||||
proposals: new ApplicantOrganisationProposalsModel(payload['/organisations/' + pic + '/proposals'].permissions),
|
||||
coachings: new ApplicantOrganisationCoachingsModel(payload['/organisations/' + pic + '/proposals'].permissions),
|
||||
}
|
||||
|
||||
ui.unlock();
|
||||
|
||||
this.loadWindow(
|
||||
'applicants/ApplicantDashboardView',
|
||||
{
|
||||
title: 'My EIC',
|
||||
static: true,
|
||||
expanded: true
|
||||
},
|
||||
{
|
||||
models: models,
|
||||
pic: pic,
|
||||
url: options.currentRoute.url
|
||||
}
|
||||
)
|
||||
} else {
|
||||
ui.unlock();
|
||||
ui.growl.append('You don\'t have access to this organisation', 'danger' );
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('ApplicantController', ApplicantController);
|
||||
@@ -1,35 +0,0 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"url": "/",
|
||||
"role": "Org_Member",
|
||||
"controller" : "applicants/ApplicantController",
|
||||
"method": "dispatch"
|
||||
},
|
||||
{
|
||||
"url": "/:pic",
|
||||
"role": "Org_Member",
|
||||
"controller" : "applicants/ApplicantController",
|
||||
"method": "dashboard"
|
||||
}
|
||||
],
|
||||
"models": [
|
||||
"organisations/ApplicantOrganisationModel",
|
||||
"organisations/ApplicantMembersModel",
|
||||
"organisations/ApplicantOrganisationsModel",
|
||||
"users/onboardingUserModel"
|
||||
],
|
||||
"views": [
|
||||
"applicants/ApplicantDashboardView",
|
||||
"applicants/dialogs/ApplicantMemberDialog",
|
||||
"applicants/dialogs/ApplicantProposalSearchDialog",
|
||||
"common/onboarding/dialogs/onboardingApplicantDialog"
|
||||
],
|
||||
"dependencies": { },
|
||||
"assets": {
|
||||
"json": [
|
||||
{"id":"organisation-genders", "name": "meta/organisation-genders.json"},
|
||||
{"id":"organisation-functions", "name": "meta/organisation-functions.json"}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
class CoachingAdminController extends EICController {
|
||||
|
||||
dashboard() {
|
||||
|
||||
let models = {
|
||||
coachings: new CoachingAdminModel()
|
||||
}
|
||||
|
||||
this.loadWindow(
|
||||
'coachings/admin/CoachingAdminDashboardView',
|
||||
{
|
||||
title: 'Coaching monitoring',
|
||||
static: true,
|
||||
expanded: true
|
||||
},
|
||||
{
|
||||
models: models
|
||||
});
|
||||
}
|
||||
|
||||
coaching(options) {
|
||||
|
||||
}
|
||||
|
||||
profile(options) {
|
||||
this.loadWindow('coachings/common/CoachProfileView', {
|
||||
title: 'Coach profile',
|
||||
static: true,
|
||||
expanded: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('CoachingAdminController', CoachingAdminController);
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"routes": [ ],
|
||||
"models": [ "coachings/CoachingAdminModel" ],
|
||||
"views": [
|
||||
"coachings/common/CoachProfileView",
|
||||
"coachings/admin/CoachingAdminDashboardView",
|
||||
"coachings/admin/dialogs/CoachingCreditsDialog"
|
||||
],
|
||||
"dependencies": { },
|
||||
"controllerDependencies": [
|
||||
"/thirdparty/eicui/plugins/SVG/SVG",
|
||||
"/thirdparty/eicui/plugins/NodeMap/NodeMap"
|
||||
],
|
||||
"assets": {
|
||||
"styles": [
|
||||
{"path": "/app/thirdparty/eicui/plugins/SVG", "name":"/SVG.css" },
|
||||
{"path": "/app/thirdparty/eicui/plugins/NodeMap", "name":"/NodeMap.css" }
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
class CoachingApplicantController extends EICController {
|
||||
|
||||
view(options) {
|
||||
this.loadWindow('coachings/applicant/CoachingApplicantView', {
|
||||
title: 'My coaching ' + options.params.id,
|
||||
static: true,
|
||||
expanded: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('CoachingApplicantController', CoachingApplicantController);
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"routes": [ ],
|
||||
"models": [ ],
|
||||
"views": [ "coachings/applicant/CoachingApplicantView" ],
|
||||
"dependencies": { },
|
||||
"assets": { }
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
class CoachingCoachController extends EICController {
|
||||
|
||||
dashboard() {
|
||||
let models = {
|
||||
coachings: new CoachingCoachModel()
|
||||
}
|
||||
|
||||
this.loadWindow('coachings/coach/CoachingCoachDashboardView', {
|
||||
title: 'Coach dashboard',
|
||||
static: true,
|
||||
expanded: true
|
||||
},
|
||||
{
|
||||
models: models
|
||||
});
|
||||
}
|
||||
|
||||
coaching(id) {
|
||||
|
||||
}
|
||||
|
||||
profile(options) {
|
||||
this.loadWindow('coachings/common/CoachProfileView', {
|
||||
title: 'My profile',
|
||||
static: true,
|
||||
expanded: true
|
||||
},
|
||||
{
|
||||
mode: 'edit'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('CoachingCoachController', CoachingCoachController);
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"routes": [ ],
|
||||
"models": [ "coachings/CoachingCoachModel" ],
|
||||
"views": [
|
||||
"coachings/coach/CoachingCoachView",
|
||||
"coachings/coach/CoachingCoachDashboardView"
|
||||
],
|
||||
"dependencies": { },
|
||||
"assets": { }
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
class aboutController extends EICController {
|
||||
|
||||
disclaimer(){
|
||||
this.loadWindow('common/disclaimerView', {
|
||||
title: 'Legal notice',
|
||||
static: true,
|
||||
expanded: true
|
||||
});
|
||||
}
|
||||
|
||||
support() {
|
||||
|
||||
|
||||
this.loadWindow('common/support/SupportView', {
|
||||
title: 'Technical support',
|
||||
static: true,
|
||||
expanded: true
|
||||
},
|
||||
{
|
||||
models: { tickets: new SupportModel(["list", "create"]) }
|
||||
});
|
||||
}
|
||||
|
||||
helpdesk(){
|
||||
this.loadWindow('common/HelpDeskView', {
|
||||
title: 'Help Desk',
|
||||
static: true,
|
||||
expanded: true
|
||||
});
|
||||
}
|
||||
|
||||
guides(){
|
||||
this.loadWindow('common/GuidesListView', {
|
||||
title: 'Welcome Guides',
|
||||
static: true,
|
||||
expanded: true
|
||||
},
|
||||
{});
|
||||
}
|
||||
|
||||
guide(params){
|
||||
let guideMeta = app.Assets.Store.json.videoGuides.guides.find((item)=>item.id==params.params.guideID)
|
||||
|
||||
this.loadWindow('common/GuideView', {
|
||||
title: guideMeta.title,
|
||||
static: true,
|
||||
expanded: true
|
||||
},
|
||||
{
|
||||
guideMeta: guideMeta,
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('aboutController', aboutController);
|
||||
@@ -1,48 +0,0 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"url": "/legalnotice",
|
||||
"role": "*",
|
||||
"controller" : "common/aboutController",
|
||||
"method": "disclaimer"
|
||||
},
|
||||
{
|
||||
"url": "/support",
|
||||
"role": "*",
|
||||
"controller" : "common/aboutController",
|
||||
"method": "support"
|
||||
},
|
||||
{
|
||||
"url": "/helpdesk",
|
||||
"role": "*",
|
||||
"controller" : "common/aboutController",
|
||||
"method": "helpdesk"
|
||||
},
|
||||
{
|
||||
"url": "/guides",
|
||||
"role": "*",
|
||||
"controller" : "common/aboutController",
|
||||
"method": "guides"
|
||||
},
|
||||
{
|
||||
"url": "/guide/:guideID",
|
||||
"role": "*",
|
||||
"controller" : "common/aboutController",
|
||||
"method": "guide"
|
||||
}
|
||||
],
|
||||
"models": [ "system/SupportModel" ],
|
||||
"views": [
|
||||
"common/disclaimerView",
|
||||
"common/support/SupportView",
|
||||
"common/support/dialogs/SupportIssueFormDialog",
|
||||
"common/HelpDeskView",
|
||||
"common/GuidesListView",
|
||||
"common/GuideView"
|
||||
],
|
||||
"controllerDependencies": [
|
||||
"/thirdparty/eicui/plugins/Select/BinaryFileContentSelector",
|
||||
"/helpers/basicDialogs"
|
||||
],
|
||||
"assets": { }
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
class myProfileController extends EICController {
|
||||
|
||||
index(routeInfo){
|
||||
this.loadWindow('common/profile/myProfileView', {
|
||||
title: 'My Profile',
|
||||
static: true,
|
||||
expanded: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('myProfileController', myProfileController);
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"routes": [ ],
|
||||
"models": [ ],
|
||||
"views": [
|
||||
"common/profile/myProfileView",
|
||||
"common/profile/dialogs/ProfilePreferencesResetDialog"
|
||||
],
|
||||
"dependencies": { },
|
||||
"assets": { }
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
class onboardingController extends EICController {
|
||||
|
||||
async index() {
|
||||
|
||||
let profile = await this.openDialog(
|
||||
await this.loadContent(
|
||||
'common/onboarding/dialogs/onboardingLandingDialog', { title: 'Welcome to the EIC platform!' }, {})
|
||||
);
|
||||
|
||||
if(profile) { this.onboardProfile(profile); }
|
||||
}
|
||||
|
||||
async onboardProfile(profile) {
|
||||
let options = { view: '', label: '' };
|
||||
|
||||
switch(profile) {
|
||||
case 'Applicant':
|
||||
options.view = 'common/onboarding/dialogs/onboardingApplicantDialog';
|
||||
options.label = 'Now tell us about your organisation';
|
||||
break;
|
||||
}
|
||||
|
||||
app.User.getBusinessPermissions(['/organisations'])
|
||||
.then(async payload => {
|
||||
let rc = await this.openDialog(
|
||||
await this.loadContent(
|
||||
options.view,
|
||||
{ title: options.label },
|
||||
{ models: {'user': new onboardingUserModel(payload['/organisations'].permissions) } }
|
||||
)
|
||||
);
|
||||
if(!rc) this.index();
|
||||
else {
|
||||
if(rc.request=='join') {
|
||||
await this.openDialog(
|
||||
await this.loadContent(
|
||||
'common/onboarding/dialogs/onboardingRequestSuccessDialog',
|
||||
{ title: 'Request successfull' },
|
||||
{ legalname: rc.legalname }
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
app.registerClass('onboardingController', onboardingController);
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"routes": [ ],
|
||||
"models": [
|
||||
"users/onboardingUserModel"
|
||||
],
|
||||
"views": [
|
||||
"common/onboarding/dialogs/onboardingLandingDialog",
|
||||
"common/onboarding/dialogs/onboardingApplicantDialog",
|
||||
"common/onboarding/dialogs/onboardingRequestSuccessDialog"
|
||||
],
|
||||
"dependencies": { },
|
||||
"assets": {
|
||||
"styles": []
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
class MailingsController extends EICController {
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
|
||||
app.meta.add('wf-mailings', app.Assets.Store.json['wf-mailings'])
|
||||
}
|
||||
|
||||
async dashboard(options) {
|
||||
|
||||
app.User.getBusinessPermissions(['/mailings'])
|
||||
.then(async payload => {
|
||||
if(payload['/mailings'].permissions.length > 0) {
|
||||
let models = {
|
||||
mailings: new MailingsModel(payload['/mailings'].permissions)
|
||||
}
|
||||
|
||||
await app.Assets.loadHtml({name:'mailing/tile.html'})
|
||||
this.loadWindow(
|
||||
'comms/mailings/dashboard/MailingDashboardView',
|
||||
{
|
||||
title: 'Mailings',
|
||||
static: true,
|
||||
expanded: true
|
||||
},
|
||||
{
|
||||
models: models
|
||||
}
|
||||
)
|
||||
} else {
|
||||
ui.growl.append('Sorry, you do not have access to this resource', 'danger')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
async mailing(options) {
|
||||
app.User.getBusinessPermissions(['/mailings', '/templates', '/contactMgr'])
|
||||
.then(async payload => {
|
||||
if(payload['/mailings'].permissions.length > 0) {
|
||||
let models = {
|
||||
mailings: new MailingsModel(payload['/mailings'].permissions),
|
||||
templates : new TemplatesModel(payload['/templates'].permissions),
|
||||
contactMgr: new ContactMgrModel(payload['/contactMgr'].permissions),
|
||||
}
|
||||
|
||||
this.loadWindow('comms/mailings/sheet/MailingSheetView', {
|
||||
title: 'Mailing sheet',
|
||||
static: true,
|
||||
expanded: true
|
||||
},{
|
||||
id: options.params.id,
|
||||
models: models
|
||||
})
|
||||
} else {
|
||||
ui.growl.append('Sorry, you do not have access to this resource', 'danger')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
app.registerClass('MailingsController', MailingsController)
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"url": "/:id",
|
||||
"role": [ "MAIL_Editor", "MAIL_Reviewer", "MAIL_Sender", "EIC_Dev", "EIC_Admin" ],
|
||||
"controller" : "comms/mailings/MailingsController",
|
||||
"method": "mailing"
|
||||
},
|
||||
{
|
||||
"url": "/",
|
||||
"role": [ "MAIL_Editor", "MAIL_Reviewer", "MAIL_Sender", "EIC_Dev", "EIC_Admin" ],
|
||||
"controller" : "comms/mailings/MailingsController",
|
||||
"method": "dashboard"
|
||||
}
|
||||
],
|
||||
"models": [ "comms/templates/TemplatesModel",
|
||||
"comms/mailings/MailingsModel",
|
||||
"comms/mailings/ContactMgrModel"
|
||||
],
|
||||
"views": [
|
||||
"/comms/mailings/dashboard/MailingDashboardView",
|
||||
"comms/mailings/sheet/MailingSheetView",
|
||||
"comms/mailings/sheet/dialogs/MailingImportDialog",
|
||||
"comms/mailings/sheet/dialogs/MailingExclusionDialog",
|
||||
"comms/mailings/sheet/dialogs/MailingFetchDialog",
|
||||
"comms/mailings/sheet/dialogs/MailingMappingDialog",
|
||||
"comms/mailings/sheet/dialogs/MailingTestDialog",
|
||||
"comms/mailings/sheet/dialogs/MailingTemplatePreviewDialog",
|
||||
"comms/mailings/sheet/dialogs/MailingDuplicatesDialog",
|
||||
"templates/Ffs/dialogs/FileBrowserDialog"
|
||||
],
|
||||
"controllerDependencies": [
|
||||
"https://cdn.sheetjs.com/xlsx-0.20.2/package/dist/xlsx.full.min.js",
|
||||
"/helpers/basicDialogs",
|
||||
"/helpers/translator",
|
||||
"/helpers/validators",
|
||||
"/helpers/activeAttributes",
|
||||
"/thirdparty/eicui/plugins/FileUpload/FileUpload",
|
||||
"/thirdparty/eicui/plugins/NodeMap/NodeMap",
|
||||
"/thirdparty/eicui/plugins/Charts/Charts",
|
||||
"/libs/Ffs/fakeFileSystem"
|
||||
],
|
||||
"assets": {
|
||||
"json": [
|
||||
{"id":"wf-mailings", "name": "workflows/wf-mailings.json"}
|
||||
],
|
||||
"styles": [
|
||||
{"name":"NodeMap.css", "path":"/app/thirdparty/eicui/plugins/NodeMap/" },
|
||||
{"name":"FileUpload.css", "path":"/app/thirdparty/eicui/plugins/FileUpload/"},
|
||||
{"name":"Charts.css", "path":"/app/thirdparty/eicui/plugins/Charts/" }
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
class TemplatesController extends EICController {
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
async search() {
|
||||
app.User.getBusinessPermissions(['/templates'])
|
||||
.then(async payload => {
|
||||
if(payload['/templates'].permissions.length > 0) {
|
||||
let models = {
|
||||
templates: new TemplatesModel(payload['/templates'].permissions)
|
||||
}
|
||||
this.loadWindow('comms/templates/manager/TemplatesManagerView', {
|
||||
title: 'Templates',
|
||||
static: true,
|
||||
expanded: true
|
||||
},
|
||||
{
|
||||
models: models
|
||||
}
|
||||
)
|
||||
} else {
|
||||
ui.growl.append('Sorry, you do not have access to this resource', 'danger')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
async tplAction(options) {
|
||||
app.User.getBusinessPermissions(['/templates'])
|
||||
.then(async payload => {
|
||||
if(payload['/templates'].permissions.length > 0) {
|
||||
const templateId = options.params.id;
|
||||
let models = {
|
||||
templates: new TemplatesModel(payload['/templates'].permissions)
|
||||
}
|
||||
// Edit template
|
||||
this.loadWindow(
|
||||
'comms/templates/editor/TemplatesEditorView',
|
||||
{
|
||||
title: 'Edit Template ' + templateId.substring(0, 6),
|
||||
static: true,
|
||||
expanded: true
|
||||
},
|
||||
{
|
||||
id: templateId,
|
||||
models: models
|
||||
})
|
||||
} else {
|
||||
ui.growl.append('Sorry, you do not have access to this resource', 'danger')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('TemplatesController', TemplatesController);
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"url": "/templates",
|
||||
"role": [ "EIC_Dev", "EIC_Admin" ],
|
||||
"controller" : "comms/templates/TemplatesController",
|
||||
"method": "search"
|
||||
},
|
||||
{
|
||||
"url": "/:id",
|
||||
"role": [ "EIC_Dev", "EIC_Admin" ],
|
||||
"controller" : "comms/templates/TemplatesController",
|
||||
"method": "tplAction"
|
||||
}
|
||||
],
|
||||
"models": [ "comms/templates/TemplatesModel" ],
|
||||
"views": [
|
||||
"comms/templates/manager/TemplatesManagerView",
|
||||
"comms/templates/editor/TemplatesEditorView",
|
||||
"comms/templates/dialogs/TemplatesMailTestDialog",
|
||||
"comms/templates/dialogs/TemplatesUplImgDialog",
|
||||
"comms/templates/dialogs/TemplatesDecisionDialog",
|
||||
"templates/Ffs/dialogs/FileBrowserDialog"
|
||||
],
|
||||
"controllerDependencies": [
|
||||
"/helpers/basicDialogs",
|
||||
"/helpers/translator",
|
||||
"/helpers/validators",
|
||||
"/helpers/activeAttributes",
|
||||
"/libs/Ffs/fakeFileSystem",
|
||||
"/thirdparty/eicui/plugins/HtmlEditor/HtmlEditor",
|
||||
"/thirdparty/eicui/plugins/FileUpload/FileUpload"
|
||||
],
|
||||
"assets": {
|
||||
"styles": [
|
||||
{"name":"FileUpload.css", "path":"/app/thirdparty/eicui/plugins/FileUpload/"}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
/**
|
||||
* FastTrack management
|
||||
*
|
||||
* @version 1.0
|
||||
* @author Michael Fallise
|
||||
*/
|
||||
class BypassController extends EICController {
|
||||
|
||||
guidelinesURL = "https://eic.ec.europa.eu/eic-funding-opportunities/eic-accelerator/fast-track-and-plug-schemes-eic-accelerator_en";
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
app.meta.add('accelerator-tracks', app.Assets.Store.json['accelerator-tracks']);
|
||||
app.meta.add('organisation-functions', app.Assets.Store.json['organisation-functions']);
|
||||
app.meta.add('organisation-genders', app.Assets.Store.json['organisation-genders']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Entrypoint for FastTrack Managers
|
||||
*/
|
||||
dashboardAdmin() {
|
||||
|
||||
app.User.getBusinessPermissions(['/organisations/tokens', '/organisations/tokens/users', '/organisations'])
|
||||
.then(payload => {
|
||||
let profile = Object.keys(payload).reduce((acc, perm)=>{ Object.assign(acc,payload[perm].profile); return(acc) }, {})
|
||||
|
||||
let models = {
|
||||
tokens: new BypassTokensModel(payload['/organisations/tokens'].permissions),
|
||||
company: new BypassCompanyModel([...payload['/organisations'].permissions, ...payload['/organisations/tokens'].permissions]),
|
||||
};
|
||||
|
||||
if(payload['/organisations/tokens/users'].permissions && (payload['/organisations/tokens/users'].permissions.length>0)) {
|
||||
models.users = new BypassUsersModel(payload['/organisations/tokens/users'].permissions)
|
||||
}
|
||||
|
||||
this.loadWindow(
|
||||
'projects/bypass/BypassAdminDashboard',
|
||||
{ title: 'Bypass', static: true, expanded: true },
|
||||
{ profile: profile, models: models }
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Entrypoint for FastTrack KIC Managers
|
||||
*/
|
||||
dashboardKIC() {
|
||||
app.User.getBusinessPermissions(['/organisations/tokens', '/organisations/tokens/users', '/organisations'])
|
||||
.then(payload => {
|
||||
let profile = Object.keys(payload).reduce((acc, perm)=>{ Object.assign(acc,payload[perm].profile); return(acc) }, {})
|
||||
|
||||
let models = {
|
||||
tokens: new BypassTokensModel(payload['/organisations/tokens'].permissions),
|
||||
company: new BypassCompanyModel([...payload['/organisations'].permissions, ...payload['/organisations/tokens'].permissions])
|
||||
};
|
||||
|
||||
if(payload['/organisations/tokens/users'].permissions && (payload['/organisations/tokens/users'].permissions.length>0)) {
|
||||
models.users = new BypassUsersModel(payload['/organisations/tokens/users'].permissions)
|
||||
}
|
||||
|
||||
this.loadWindow(
|
||||
'projects/bypass/BypassKICDashboard',
|
||||
{ title: 'Fast-Tracks', static: true, expanded: true },
|
||||
{ profile: profile, models: models }
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Entrypoint for FastTrack Plugin Managers
|
||||
*/
|
||||
dashboardPlugin() {
|
||||
app.User.getBusinessPermissions(['/organisations/tokens', '/organisations/tokens/users', '/organisations'])
|
||||
.then(payload => {
|
||||
let profile = Object.keys(payload).reduce((acc, perm)=>{ Object.assign(acc,payload[perm].profile); return(acc) }, {})
|
||||
|
||||
let models = {
|
||||
tokens: new BypassTokensModel(payload['/organisations/tokens'].permissions),
|
||||
company: new BypassCompanyModel([...payload['/organisations'].permissions, ...payload['/organisations/tokens'].permissions])
|
||||
};
|
||||
|
||||
if(payload['/organisations/tokens/users'].permissions) {
|
||||
models.users = new BypassUsersModel(payload['/organisations/tokens/users'].permissions)
|
||||
}
|
||||
|
||||
this.loadWindow(
|
||||
'projects/bypass/BypassPluginDashboard',
|
||||
{ title: 'Plugins', static: true, expanded: true },
|
||||
{ profile: profile, models: models } );
|
||||
});
|
||||
}
|
||||
|
||||
guidelines() { window.open(this.guidelinesURL, "_blank"); }
|
||||
}
|
||||
|
||||
app.registerClass('BypassController', BypassController);
|
||||
@@ -1,74 +0,0 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"url": "/",
|
||||
"role": ["BP_SPOC_Plugin"],
|
||||
"exturl":"/bypass/plugins"
|
||||
},
|
||||
{
|
||||
"url": "/",
|
||||
"role": ["BP_SPOC_FastTrack"],
|
||||
"exturl":"/bypass/fast-tracks"
|
||||
},
|
||||
{
|
||||
"url": "/",
|
||||
"role": ["BP_PO", "BP_HoU"],
|
||||
"controller" : "/projects/bypass/BypassController",
|
||||
"method": "dashboardAdmin"
|
||||
},
|
||||
{
|
||||
"url": "/fast-tracks",
|
||||
"role": ["BP_SPOC_FastTrack"],
|
||||
"controller" : "/projects/bypass/BypassController",
|
||||
"method": "dashboardKIC"
|
||||
},
|
||||
{
|
||||
"url": "/plugins",
|
||||
"role": ["BP_SPOC_Plugin"],
|
||||
"controller" : "/projects/bypass/BypassController",
|
||||
"method": "dashboardPlugin"
|
||||
},
|
||||
{
|
||||
"url": "/path-finder",
|
||||
"role": ["BP_SPOC_FastTrack"],
|
||||
"controller" : "/projects/bypass/BypassController",
|
||||
"method": "dashboardKIC"
|
||||
},
|
||||
{
|
||||
"url": "/guidelines",
|
||||
"role": ["BP_PO", "BP_HoU", "BP_SPOC_FastTrack", "BP_SPOC_Plugin"],
|
||||
"controller" : "/projects/bypass/BypassController",
|
||||
"method": "guidelines"
|
||||
}
|
||||
],
|
||||
"models": [
|
||||
"evaluations/BypassTokensModel",
|
||||
"organisations/BypassCompanyModel",
|
||||
"users/BypassUsersModel"
|
||||
],
|
||||
"views": [
|
||||
"projects/bypass/BypassAdminDashboard",
|
||||
"projects/bypass/BypassKICDashboard",
|
||||
"projects/bypass/BypassPluginDashboard",
|
||||
{"view":"projects/bypass/BypassPluginManagementContent", "dependencies": ["projects/bypass/BypassBaseManagementContent"]},
|
||||
{"view":"projects/bypass/BypassAdminManagementContent", "dependencies": ["projects/bypass/BypassBaseManagementContent"]},
|
||||
{"view":"projects/bypass/BypassKICManagementContent", "dependencies": ["projects/bypass/BypassBaseManagementContent"]},
|
||||
"projects/bypass/dialogs/BypassProgramAddDialog",
|
||||
"projects/bypass/dialogs/BypassTokenGrantDialog",
|
||||
"projects/bypass/dialogs/BypassTokenGrantProposalDialog",
|
||||
"projects/bypass/dialogs/BypassTokenRevokeDialog",
|
||||
"projects/bypass/dialogs/BypassTrackSetupDialog",
|
||||
"projects/bypass/dialogs/BypassUserProfileDialog"
|
||||
],
|
||||
"controllerDependencies": [ "/helpers/basicDialogs", "/helpers/translator" ],
|
||||
"assets": {
|
||||
"styles": [
|
||||
{ "name": "projects/bypass.css" }
|
||||
],
|
||||
"json": [
|
||||
{ "id": "accelerator-tracks", "name": "meta/accelerator-tracks.json" },
|
||||
{ "id":"organisation-genders", "name": "meta/organisation-genders.json"},
|
||||
{ "id":"organisation-functions", "name": "meta/organisation-functions.json"}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
class ICMPController extends EICController {
|
||||
|
||||
constructor(params) {
|
||||
super(params)
|
||||
app.meta.add('icmp-techdd-status', app.Assets.Store.json['icmp-techdd-status']);
|
||||
app.meta.add('icmp-fundings', app.Assets.Store.json['icmp-fundings']);
|
||||
app.meta.add('icmp-countries', app.Assets.Store.json['icmp-countries']);
|
||||
app.meta.add('icmp-instruments', app.Assets.Store.json['icmp-instruments']);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns
|
||||
*/
|
||||
Dashboard() {
|
||||
console.log('here')
|
||||
ui.lock();
|
||||
|
||||
app.User.getBusinessPermissions([ '/icmp/projects' ])
|
||||
.then(async payload => {
|
||||
|
||||
ui.unlock();
|
||||
|
||||
if(payload['/icmp/projects'].permissions.length > 0) {
|
||||
let models = {
|
||||
projects: new ICMPProjectsModel(payload['/icmp/projects'].permissions)
|
||||
};
|
||||
|
||||
if(app.User.hasRole('PROJECT_PO') || app.User.hasRole('PROJECT_FIO')) {
|
||||
this.loadWindow(
|
||||
'projects/icmp/ProjectFundingPODashboardView',
|
||||
{ title: 'ICMP', static: true, expanded: true },
|
||||
{ models: models } );
|
||||
return;
|
||||
}
|
||||
|
||||
if(app.User.hasRole('PROJECT_TechDDExpert')) {
|
||||
this.loadWindow(
|
||||
'projects/icmp/ProjectFundingExpertDashboardView',
|
||||
{ title: 'ICMP', static: true, expanded: true },
|
||||
{ models: models } );
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
ui.growl.append('You don\'t have access to this resource', 'danger' );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} options
|
||||
*/
|
||||
project(options) {
|
||||
|
||||
let number = options.params.number
|
||||
let node = options.params.node
|
||||
let nodeId = options.params.nodeId
|
||||
|
||||
ui.lock();
|
||||
|
||||
app.User.getBusinessPermissions([`/icmp/projects/${number}`])
|
||||
.then(async payload => {
|
||||
|
||||
if(payload[`/icmp/projects/${number}`].permissions.length > 0) {
|
||||
ui.unlock();
|
||||
|
||||
let models = {
|
||||
project: new ICMPProjectModel(payload[`/icmp/projects/${number}`].permissions)
|
||||
};
|
||||
|
||||
this.loadWindow(
|
||||
'projects/icmp/ProjectFundingProjectView',
|
||||
{ title: 'Project sheet', static: true, expanded: true },
|
||||
{
|
||||
models: models,
|
||||
projectNumber: number,
|
||||
node: node,
|
||||
nodeId: nodeId,
|
||||
});
|
||||
} else {
|
||||
ui.growl.append('You don\'t have access to this resource', 'danger' );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('ICMPController', ICMPController);
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
"routes": [],
|
||||
"models": [
|
||||
"projects/icmp/ProjectFundingModel",
|
||||
"projects/icmp/ICMPProjectsModel",
|
||||
"projects/icmp/ICMPProjectModel",
|
||||
"projects/icmp/ICMPProjectNodeModel"
|
||||
],
|
||||
"views": [
|
||||
"projects/icmp/ProjectFundingPODashboardView",
|
||||
"projects/icmp/ProjectFundingExpertDashboardView",
|
||||
"projects/icmp/ProjectFundingProjectView",
|
||||
"projects/icmp/project/ProjectFundingInfoView",
|
||||
"projects/icmp/project/ProjectFundingTechDDView",
|
||||
"projects/icmp/project/ProjectFundingTeamView",
|
||||
"projects/icmp/project/ProjectFundingHistoryView",
|
||||
"projects/icmp/project/ProjectFundingDocumentsView",
|
||||
"projects/icmp/project/dialogs/ICMPNodeActionConfirmDialog",
|
||||
{"view":"projects/icmp/project/forms/ICMPFormTechddV1FullView", "dependencies": ["projects/icmp/project/forms/ICMPFormTechddV1View"]},
|
||||
{"view":"projects/icmp/project/forms/ICMPFormTechddV1EnhancedView", "dependencies": ["projects/icmp/project/forms/ICMPFormTechddV1View"]}
|
||||
|
||||
],
|
||||
"controllerDependencies": [
|
||||
"/thirdparty/eicui/plugins/SVG/SVG",
|
||||
"/thirdparty/eicui/plugins/NodeMap/NodeMap"
|
||||
],
|
||||
"assets": {
|
||||
"styles": [
|
||||
{"path": "/app/thirdparty/eicui/plugins/SVG", "name":"/SVG.css" },
|
||||
{"path": "/app/thirdparty/eicui/plugins/NodeMap", "name":"/NodeMap.css" }
|
||||
],
|
||||
"json": [
|
||||
{ "id": "icmp-techdd-status", "name": "meta/icmp-techdd-statuses.json" },
|
||||
{ "id": "icmp-fundings", "name": "meta/project-funding-types.json" },
|
||||
{ "id": "icmp-countries", "name": "meta/coaching-countries.json" },
|
||||
{ "id": "icmp-instruments", "name": "meta/project-funding-instruments.json" }
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
|
||||
class SoeController extends EICController {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
app.meta.add('soe-fundings', app.Assets.Store.json['soe-fundings']);
|
||||
app.meta.add('soe-countries', app.Assets.Store.json['coaching-countries']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Entrypoint for FastTrack Managers
|
||||
*/
|
||||
dashboard() {
|
||||
|
||||
app.User.getBusinessPermissions(['/soe'])
|
||||
.then(payload => {
|
||||
|
||||
if(payload['/soe'].permissions.length > 0) {
|
||||
let models = {
|
||||
soe: new SoeModel(payload['/soe'].permissions)
|
||||
}
|
||||
|
||||
let scope = payload['/soe'].profile.country ? app.meta.getItem('soe-countries', payload['/soe'].profile.country).label: 'Monitoring';
|
||||
|
||||
this.loadWindow(
|
||||
'projects/soe/SoeDashboardView',
|
||||
{ title: 'SoE ' + scope, static: true, expanded: true },
|
||||
{
|
||||
models: models,
|
||||
scope : scope
|
||||
}
|
||||
);
|
||||
} else {
|
||||
ui.growl.append('Sorry, you do not have access to this resource!', 'danger')
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
feedbacks(options) {
|
||||
|
||||
let pic = options.params.pic
|
||||
let number = options.params.number
|
||||
|
||||
app.User.getBusinessPermissions([`/soe/organisations/${pic}/projects/${number}/fundings`])
|
||||
.then(payload => {
|
||||
let scope = payload[`/soe/organisations/${pic}/projects/${number}/fundings`]
|
||||
if(scope.permissions.length > 0) {
|
||||
|
||||
let models = { soe: new SoeModel(scope.permissions) }
|
||||
|
||||
this.loadWindow(
|
||||
'projects/soe/SoeFeedbacksView',
|
||||
{ title: `Project ${number} (SoE)`, static: true, expanded: true },
|
||||
{
|
||||
pic: pic,
|
||||
number: number,
|
||||
models: models
|
||||
}
|
||||
);
|
||||
} else {
|
||||
ui.growl.append('Sorry, you do not have access to this resource', 'danger')
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
app.registerClass('SoeController', SoeController);
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"routes": [ ],
|
||||
"models": [ "projects/SoeModel" ],
|
||||
"views": [
|
||||
"projects/soe/SoeDashboardView",
|
||||
"projects/soe/SoeFeedbacksView",
|
||||
"projects/soe/dialogs/SoeFeedbackFormDialog",
|
||||
"projects/soe/dialogs/SoeFeedbackHistoryDialog"
|
||||
],
|
||||
"dependencies": { },
|
||||
"assets": {
|
||||
"json": [
|
||||
{ "id":"coaching-countries", "name": "meta/coaching-countries.json" },
|
||||
{ "id":"soe-fundings", "name": "meta/soe-fundings.json" }
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
/**
|
||||
* Submission management
|
||||
*
|
||||
* @version 1.0
|
||||
*/
|
||||
class SubmissionsController extends EICController {
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} options
|
||||
*
|
||||
*/
|
||||
proposal(options) {
|
||||
let pic = options.params.pic;
|
||||
let number = options.params.pid;
|
||||
let mode = options.params.mode || 'read';
|
||||
|
||||
app.User.getBusinessPermissions([
|
||||
`/organisations/${pic}/proposals/${number}`,
|
||||
`/organisations/${pic}/proposals/${number}/members`
|
||||
], 'Org_Member')
|
||||
.then( async payload => {
|
||||
|
||||
if(mode == 'edit') {
|
||||
if(!payload[`/organisations/${pic}/proposals/${number}`].permissions.includes('update')) {
|
||||
mode = 'read';
|
||||
}
|
||||
}
|
||||
|
||||
if(payload[`/organisations/${pic}/proposals/${number}`].permissions.includes('read')) {
|
||||
|
||||
let models = {
|
||||
'submission' : new SubmissionModel( payload[`/organisations/${pic}/proposals/${number}`].permissions ),
|
||||
'team' : new SubmissionTeamModel( [ 'create', 'update', 'delete' ] ),
|
||||
'members' : new SubmissionMembersModel( payload[`/organisations/${pic}/proposals/${number}/members`].permissions )
|
||||
};
|
||||
|
||||
app.meta.add('organisation-functions', app.Assets.Store.json['organisation-functions']);
|
||||
app.meta.add('organisation-genders', app.Assets.Store.json['organisation-genders']);
|
||||
app.meta.add('eic-keywords', app.Assets.Store.json['eic-keywords']);
|
||||
|
||||
models.submission.getProposal(pic,number).then(
|
||||
async () => {
|
||||
let formVersions = {
|
||||
'legacy' : '2022',
|
||||
'1.0' : '2023',
|
||||
'1.1' : '2023'
|
||||
};
|
||||
|
||||
let formVersion = formVersions[models.submission.data.version || 'legacy'];
|
||||
|
||||
await Loader.loadViews(app.Router.ControllerConfigs.SubmissionsController.lazyViews[formVersion]);
|
||||
this.loadWindow(
|
||||
`projects/submissions/${formVersion}/SubmissionShortForm${formVersion}View`,
|
||||
{ title: 'Proposal ' + number, static: true, expanded: true },
|
||||
{
|
||||
profile: {
|
||||
mode: mode,
|
||||
pic: pic,
|
||||
number: number
|
||||
},
|
||||
models: models
|
||||
}
|
||||
);
|
||||
})
|
||||
|
||||
} else {
|
||||
ui.growl.append('You are not allowed to access this proposal', 'danger');
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('SubmissionsController', SubmissionsController);
|
||||
@@ -1,60 +0,0 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"url": "/:pid",
|
||||
"role": "Org_Member",
|
||||
"controller" : "/projects/submissions/SubmissionsController",
|
||||
"method": "proposal"
|
||||
}
|
||||
],
|
||||
"models": [
|
||||
"/submissions/SubmissionModel",
|
||||
"/organisations/ApplicantMembersModel"
|
||||
],
|
||||
"views": [
|
||||
"/projects/submissions/dialogs/SubmissionFormAccessDialog",
|
||||
"/projects/submissions/dialogs/SubmissionFormComplaintDialog"
|
||||
|
||||
],
|
||||
"controllerDependencies": [ "/thirdparty/AwsGoodies/AwsFileDownload", "/thirdparty/AwsGoodies/AwsFileUpload", "https://cdn.jsdelivr.net/npm/hls.js@latest" ],
|
||||
"assets": {
|
||||
"styles": [ { "name": "projects/submissions.css" } ],
|
||||
"json": [
|
||||
{"id":"organisation-genders", "name": "meta/organisation-genders.json"},
|
||||
{"id":"eic-keywords", "name": "meta/eic-keywords.json"},
|
||||
{"id":"organisation-functions", "name": "meta/organisation-functions.json"}
|
||||
]
|
||||
},
|
||||
"lazyViews": {
|
||||
"2022": [
|
||||
"/projects/submissions/2022/SubmissionShortForm2022View",
|
||||
{"view":"projects/submissions/2022/tabs/SubmissionShortForm2022WhatView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2022/tabs/SubmissionShortForm2022WhyView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2022/tabs/SubmissionShortForm2022WhoView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2022/tabs/SubmissionShortForm2022HowView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2022/tabs/SubmissionShortForm2022AmountView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2022/tabs/SubmissionShortForm2022WhomView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2022/tabs/SubmissionShortForm2022ImpactView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2022/tabs/SubmissionShortForm2022DocumentsView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2022/tabs/SubmissionShortForm2022StatusView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]}
|
||||
],
|
||||
"2023": [
|
||||
"/projects/submissions/2023/SubmissionShortForm2023View",
|
||||
"/projects/submissions/dialogs/SubmissionFormTeamMemberDialog",
|
||||
"/projects/submissions/dialogs/SubmissionFormUploadDialog",
|
||||
"/projects/submissions/dialogs/SubmissionFormConcurrencyDialog",
|
||||
{"view":"projects/submissions/2023/tabs/SubmissionShortForm2023CompanyView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2023/tabs/SubmissionShortForm2023CompetitionView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2023/tabs/SubmissionShortForm2023FundingView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2023/tabs/SubmissionShortForm2023GeneralView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2023/tabs/SubmissionShortForm2023ProblemView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2023/tabs/SubmissionShortForm2023SolutionView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2023/tabs/SubmissionShortForm2023TeamView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2023/tabs/SubmissionShortForm2023ImpactView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2023/tabs/SubmissionShortForm2023DocumentsView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2023/tabs/SubmissionShortForm2023DisclaimerView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2023/tabs/SubmissionShortForm2023StatusView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]},
|
||||
{"view":"projects/submissions/2023/tabs/SubmissionShortForm2023ConsentView", "dependencies": [ "projects/submissions/SubmissionShortFormTabView" ]}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
class systemController extends EICController {
|
||||
|
||||
/**
|
||||
* Platform access control
|
||||
*
|
||||
* @param {*} params
|
||||
*/
|
||||
control() {
|
||||
app.meta.add('user-roles', app.Assets.Store.json['user-roles']);
|
||||
app.meta.add('user-messages', app.Assets.Store.json['user-messages']);
|
||||
let models = {
|
||||
platform: new PlatformModel()
|
||||
}
|
||||
|
||||
this.loadWindow(
|
||||
'system/admin/platform-control/AdminAccessControlView',
|
||||
{ title: 'Platform Control', static: true, expanded: true },
|
||||
{ models: models }
|
||||
);
|
||||
}
|
||||
|
||||
explore() {
|
||||
|
||||
|
||||
app.User.getBusinessPermissions([ '/storage/entities' ], 'EIC_Admin')
|
||||
.then(payload => {
|
||||
|
||||
console.log(payload)
|
||||
|
||||
let models = {
|
||||
ml: new MarklogicModel(payload['/storage/entities'].permissions)
|
||||
}
|
||||
|
||||
this.loadWindow(
|
||||
'system/admin/explorer/DataExplorerView',
|
||||
{ title: 'Data explorer', static: true, expanded: true },
|
||||
{ models: models }
|
||||
);
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* System Health check content
|
||||
*
|
||||
* @param {*} params
|
||||
*/
|
||||
healthcheck() {
|
||||
|
||||
this.loadWindow('system/tools/statusView', {
|
||||
title: 'Health Check',
|
||||
static: true,
|
||||
expanded: true
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
async styleguide() {
|
||||
|
||||
await Loader.loadViews(["system/tools/styleguideView"]);
|
||||
|
||||
this.loadWindow('system/tools/styleguideView', {
|
||||
title: 'Style guide',
|
||||
static: true,
|
||||
expanded: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
async eicui() {
|
||||
|
||||
await Loader.loadViews(["system/tools/EICUIView"]);
|
||||
|
||||
this.loadWindow(
|
||||
'system/tools/EICUIView',
|
||||
{ title: 'EICUI', static: true, expanded: true}
|
||||
);
|
||||
}
|
||||
|
||||
sampler(params) {
|
||||
this.loadWindow(
|
||||
'system/lab/SamplerView',
|
||||
{ title: 'SAMPLER3000', static: true, expanded: true }
|
||||
);
|
||||
}
|
||||
|
||||
chalkboard(params) {
|
||||
this.loadWindow(
|
||||
'system/lab/ChalkboardView',
|
||||
{ title: 'Chalkboard', static: true, expanded: true }
|
||||
);
|
||||
}
|
||||
|
||||
components(params) {
|
||||
this.loadWindow('system/lab/ComponentLabView', {
|
||||
title: 'Component Lab',
|
||||
static: true,
|
||||
expanded: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('systemController', systemController);
|
||||
@@ -1,82 +0,0 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"url": "/control",
|
||||
"role": "*",
|
||||
"controller" : "/system/systemController",
|
||||
"method": "control"
|
||||
},
|
||||
{
|
||||
"url": "/healthcheck",
|
||||
"role": "*",
|
||||
"controller" : "/system/systemController",
|
||||
"method": "healthcheck"
|
||||
},
|
||||
{
|
||||
"url": "/styleguide",
|
||||
"role": "*",
|
||||
"controller" : "/system/systemController",
|
||||
"method": "styleguide"
|
||||
},
|
||||
{
|
||||
"url": "/eicui",
|
||||
"role": "*",
|
||||
"controller" : "/system/systemController",
|
||||
"method": "eicui"
|
||||
},
|
||||
{
|
||||
"url": "/sampler",
|
||||
"role": "*",
|
||||
"controller" : "/system/systemController",
|
||||
"method": "sampler"
|
||||
},
|
||||
{
|
||||
"url": "/chalkboard",
|
||||
"role": "*",
|
||||
"controller" : "/system/systemController",
|
||||
"method": "chalkboard"
|
||||
},
|
||||
{
|
||||
"url": "/explorer",
|
||||
"role": "*",
|
||||
"controller" : "/system/systemController",
|
||||
"method": "explore"
|
||||
}
|
||||
],
|
||||
"models": [
|
||||
"system/PlatformModel",
|
||||
"system/MarklogicModel"
|
||||
],
|
||||
"views": [
|
||||
"system/admin/platform-control/AdminAccessControlView",
|
||||
"system/lab/SamplerView",
|
||||
"system/lab/ChalkboardView",
|
||||
"system/lab/ComponentLabView",
|
||||
"system/tools/statusView",
|
||||
"system/admin/explorer/DataExplorerView",
|
||||
"system/admin/platform-control/dialogs/PlatformUserMessageDialog",
|
||||
"system/admin/platform-control/dialogs/PlatformDownDialog",
|
||||
"system/admin/platform-control/dialogs/PlatformConfigViewDialog",
|
||||
"system/tools/dialogs/codeTemplateDialog"
|
||||
],
|
||||
"controllerDependencies": [
|
||||
"/thirdparty/eicui/plugins/FileUpload/FileUpload",
|
||||
"/thirdparty/eicui/plugins/Charts/Charts",
|
||||
"/thirdparty/beautify/beautify.min",
|
||||
"/thirdparty/beautify/beautify.html.min",
|
||||
"/thirdparty/beautify/beautify.css.min",
|
||||
"/thirdparty/highlight/highlight.min",
|
||||
"/helpers/basicDialogs"
|
||||
],
|
||||
"assets": {
|
||||
"styles": [
|
||||
{ "name":"FileUpload.css", "path":"/app/thirdparty/eicui/plugins/FileUpload/" },
|
||||
{ "name":"Charts.css", "path":"/app/thirdparty/eicui/plugins/Charts/" },
|
||||
{ "name":"monokai.min.css", "path":"/app/thirdparty/highlight/styles/" }
|
||||
],
|
||||
"json": [
|
||||
{ "id": "user-roles", "name": "global/user-roles.json" },
|
||||
{ "id": "user-messages", "name": "system/user-messages.json" }
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user