From e918ee9e80882fbb3091834d15f9417e76300d96 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 22 Sep 2021 14:11:33 -0400 Subject: [PATCH] Part of a user refactor - using a slightly different model where the user details are represented consistenly in an LdapModel --- package-lock.json | 28 +++++++++---------- package.json | 4 +-- src/app/navbar/navbar.component.ts | 4 +-- .../workflow-spec-list.component.ts | 15 +++++----- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 44f3479..f8bd546 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "camunda-bpmn-moddle": "^5.1.2", "camunda-dmn-moddle": "^1.1.0", "diagram-js": "^7.3.0", - "diagram-js-code-editor": "^1.1.8", + "diagram-js-code-editor": "^1.1.85", "diagram-js-minimap": "^2.0.4", "dmn-js": "^11.0.1", "dmn-js-properties-panel": "^0.6.1", @@ -43,7 +43,7 @@ "ngx-markdown": "^12.0.1", "protractor": "^7.0.0", "rxjs": "^6.5.3", - "sartography-workflow-lib": "^0.0.554", + "sartography-workflow-lib": "^0.0.561", "tslib": "^2.3.0", "uuid": "^8.3.2", "zone.js": "^0.11.4" @@ -6915,9 +6915,9 @@ } }, "node_modules/diagram-js-code-editor": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/diagram-js-code-editor/-/diagram-js-code-editor-1.1.8.tgz", - "integrity": "sha512-xaBd9B2Zq47SZ6Gr7xVp+aq/CmwnLLDb5aWuqP/KQ5LJD1TPYk1ch91bbgKavriFBi12LhRdMOtLfyx3QWPNGA==", + "version": "1.1.85", + "resolved": "https://registry.npmjs.org/diagram-js-code-editor/-/diagram-js-code-editor-1.1.85.tgz", + "integrity": "sha512-bc9/HYDr2boS7oL9+ikOtLLCrxn0Z/y6fWKjJwH8PGvjbNbSIqs+QdxFp/iO8w0OCzatA0lCpIx+/jh15qz0Zw==", "dependencies": { "@popperjs/core": "^2.9.2", "ace-builds": "^1.4.12", @@ -17413,9 +17413,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sartography-workflow-lib": { - "version": "0.0.554", - "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.554.tgz", - "integrity": "sha512-XuH7yFtLBm+1gxFjxiDl5po3A44yWVgrem38XPGbFQQ+fbAzqNBBoxQuXnDlkwckyU04Om1ZHktEVAsQGcCEqg==", + "version": "0.0.561", + "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.561.tgz", + "integrity": "sha512-j9/NQOCWl7jYzolmFNxDa7upA/0+5Z1QIIHxKOBTcMpUd64LfNOBcq4jdmJ6wMSiNs0p7dwY9QfWrO/dkoHBVQ==", "dependencies": { "tslib": "^2.2.0" } @@ -26378,9 +26378,9 @@ } }, "diagram-js-code-editor": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/diagram-js-code-editor/-/diagram-js-code-editor-1.1.8.tgz", - "integrity": "sha512-xaBd9B2Zq47SZ6Gr7xVp+aq/CmwnLLDb5aWuqP/KQ5LJD1TPYk1ch91bbgKavriFBi12LhRdMOtLfyx3QWPNGA==", + "version": "1.1.85", + "resolved": "https://registry.npmjs.org/diagram-js-code-editor/-/diagram-js-code-editor-1.1.85.tgz", + "integrity": "sha512-bc9/HYDr2boS7oL9+ikOtLLCrxn0Z/y6fWKjJwH8PGvjbNbSIqs+QdxFp/iO8w0OCzatA0lCpIx+/jh15qz0Zw==", "requires": { "@popperjs/core": "^2.9.2", "ace-builds": "^1.4.12", @@ -34401,9 +34401,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sartography-workflow-lib": { - "version": "0.0.554", - "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.554.tgz", - "integrity": "sha512-XuH7yFtLBm+1gxFjxiDl5po3A44yWVgrem38XPGbFQQ+fbAzqNBBoxQuXnDlkwckyU04Om1ZHktEVAsQGcCEqg==", + "version": "0.0.561", + "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.561.tgz", + "integrity": "sha512-j9/NQOCWl7jYzolmFNxDa7upA/0+5Z1QIIHxKOBTcMpUd64LfNOBcq4jdmJ6wMSiNs0p7dwY9QfWrO/dkoHBVQ==", "requires": { "tslib": "^2.2.0" } diff --git a/package.json b/package.json index 99d1a2e..6044865 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "camunda-bpmn-moddle": "^5.1.2", "camunda-dmn-moddle": "^1.1.0", "diagram-js": "^7.3.0", - "diagram-js-code-editor": "^1.1.8", + "diagram-js-code-editor": "^1.1.85", "diagram-js-minimap": "^2.0.4", "dmn-js": "^11.0.1", "dmn-js-properties-panel": "^0.6.1", @@ -63,7 +63,7 @@ "ngx-markdown": "^12.0.1", "protractor": "^7.0.0", "rxjs": "^6.5.3", - "sartography-workflow-lib": "^0.0.558", + "sartography-workflow-lib": "^0.0.561", "tslib": "^2.3.0", "uuid": "^8.3.2", "zone.js": "^0.11.4" diff --git a/src/app/navbar/navbar.component.ts b/src/app/navbar/navbar.component.ts index 374dffb..ca49e65 100644 --- a/src/app/navbar/navbar.component.ts +++ b/src/app/navbar/navbar.component.ts @@ -52,13 +52,13 @@ export class NavbarComponent { } private _loadNavLinks() { - const displayName = this.user.display_name || this.user.first_name || this.user.last_name; + const displayName = this.user.ldap_info.display_name; this.navLinks = [ {path: '/home', id: 'nav_home', label: 'Configurator'}, {path: '/reffiles', id: 'nav_reffiles', label: 'Reference Files'}, {path: '/settings', id: 'settings', label: 'Settings'}, { - id: 'nav_account', label: `${displayName} (${this.user.email_address})`, + id: 'nav_account', label: `${displayName} (${this.user.ldap_info.email_address})`, icon: 'account_circle' } ]; diff --git a/src/app/workflow-spec-list/workflow-spec-list.component.ts b/src/app/workflow-spec-list/workflow-spec-list.component.ts index 5d1acda..9e9c201 100644 --- a/src/app/workflow-spec-list/workflow-spec-list.component.ts +++ b/src/app/workflow-spec-list/workflow-spec-list.component.ts @@ -219,14 +219,15 @@ export class WorkflowSpecListComponent implements OnInit { } editCategoryDisplayOrder(catId: number, direction: string) { - console.log('new wfsbycat is: ', this.workflowSpecsByCategory); this.api.reorderWorkflowCategory(catId, direction).subscribe(cat_change => { - this.workflowSpecsByCategory = this.workflowSpecsByCategory.map(cat => { - let new_cat = cat_change.find(i2 => i2.id === cat.id); - cat.display_order = new_cat.display_order; - return cat; - }); - this.workflowSpecsByCategory.sort((x,y) => x.display_order - y.display_order); + if(cat_change) { + this.workflowSpecsByCategory = this.workflowSpecsByCategory.map(cat => { + let new_cat = cat_change.find(i2 => i2.id === cat.id); + cat.display_order = new_cat.display_order; + return cat; + }); + this.workflowSpecsByCategory.sort((x,y) => x.display_order - y.display_order); + } }); }