unclean SPARC

This commit is contained in:
STEINNI
2025-08-27 07:03:09 +00:00
commit f308460931
430 changed files with 54426 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
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);
@@ -0,0 +1,48 @@
{
"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": { }
}
+31
View File
@@ -0,0 +1,31 @@
/**
*
*/
class errorController extends EICController {
/**
*
* @param {*} args
*/
_404(args) { ui.growl.append('Sorry, this resource is unavailable', 'danger'); }
async _401(args) {
let options = {
title: 'Session expired',
message: `Unfortuately, your action could not be completed,<br>
because your session has expired !<br>
Please retry after a succesfull login.
`,
cancelLabel: 'Login again...',
okLabel: '',
severity: 'danger',
muted: false,
okPromise:() => { },
}
let result = await this.openDialog(await this.loadContent('templates/dialogs/ConfirmDialog', options, options));
window.onbeforeunload = null // If user asks to relogin, not need to have him confirm he's leaving the app !
document.location.href = args.params.triggerUrl
}
}
app.registerClass('errorController', errorController);
+7
View File
@@ -0,0 +1,7 @@
{
"routes": [ ],
"models": [ ],
"views": [ ],
"dependencies": { },
"assets": { }
}
@@ -0,0 +1,12 @@
class myProfileController extends EICController {
index(routeInfo){
this.loadWindow('common/profile/myProfileView', {
title: 'My Profile',
static: true,
expanded: true
});
}
}
app.registerClass('myProfileController', myProfileController);
@@ -0,0 +1,10 @@
{
"routes": [ ],
"models": [ ],
"views": [
"common/profile/myProfileView",
"common/profile/dialogs/ProfilePreferencesResetDialog"
],
"dependencies": { },
"assets": { }
}
@@ -0,0 +1,50 @@
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);
@@ -0,0 +1,15 @@
{
"routes": [ ],
"models": [
"users/onboardingUserModel"
],
"views": [
"common/onboarding/dialogs/onboardingLandingDialog",
"common/onboarding/dialogs/onboardingApplicantDialog",
"common/onboarding/dialogs/onboardingRequestSuccessDialog"
],
"dependencies": { },
"assets": {
"styles": []
}
}