@mikezimm/fps-core-v7
Version:
Library of reusable core interfaces, types and constants migrated from fps-library-v2
33 lines • 1.21 kB
JavaScript
/**
* 2024-09-06: Migrated from same folder fps-library-v2\src\pnpjs\SourceItems
*/
/**
* Originally created for https://github.com/mikezimm/pivottiles7/issues/66
*/
export const SystemPages = [
//Added for compatibility with: https://www.crowcanyon.com/nitro-studio/
'CCSBrandingSettings', 'CCSDisplayForm', 'CCSEditForm', 'CCSMSTeamsUtils', 'CCSNewForm',
'Workflow-Errors-Dashboard', 'Workflow-Logs-Dashboard',
];
export const SystemPagesLowerCase = [
//These are Nitro Studio system pages
'ccsbrandingsettings', 'ccsdisplayform', 'ccseditform', 'ccsmsteamsutils', 'ccsnewform',
'workflow-errors-dashboard', 'workflow-logs-dashboard',
];
export function isPageSystemPage(url) {
let urlLC = url.toLowerCase();
let pageName = urlLC.replace('.aspx', '').split('/sitepages/');
let isSystemPage = false;
if (pageName.length > 1) {
if (SystemPagesLowerCase.indexOf(pageName[1]) > -1) {
isSystemPage = true;
}
}
else {
if (SystemPagesLowerCase.indexOf(pageName[0]) > -1) {
isSystemPage = true;
}
}
return isSystemPage;
}
//# sourceMappingURL=SystemPages.js.map