Преглед изворни кода

Add person card and table views to Helpdesk Angular module.

Joseph White пре 7 година
родитељ
комит
ae3b0683ec
33 измењених фајлова са 827 додато и 64 уклоњено
  1. 1 1
      client/index.html
  2. 63 0
      client/src/helpdesk/helpdesk-search.component.html
  3. 89 0
      client/src/helpdesk/helpdesk-search.component.scss
  4. 197 0
      client/src/helpdesk/helpdesk-search.component.ts
  5. 42 1
      client/src/helpdesk/helpdesk.module.ts
  6. 0 0
      client/src/helpdesk/helpdesk.scss
  7. 48 0
      client/src/helpdesk/main.dev.ts
  8. 60 0
      client/src/helpdesk/main.ts
  9. 37 0
      client/src/helpdesk/routes.ts
  10. 6 1
      client/src/i18n/translations_en.json
  11. 1 1
      client/src/main.dev.ts
  12. 1 1
      client/src/main.ts
  13. 2 2
      client/src/peoplesearch/orgchart-search.component.ts
  14. 2 2
      client/src/peoplesearch/peoplesearch-base.component.ts
  15. 2 2
      client/src/peoplesearch/peoplesearch-cards.component.ts
  16. 2 2
      client/src/peoplesearch/peoplesearch-table.component.ts
  17. 2 2
      client/src/peoplesearch/person-details-dialog.component.ts
  18. 2 2
      client/src/routes.ts
  19. 40 0
      client/src/services/config-base.service.dev.ts
  20. 26 29
      client/src/services/config-base.service.ts
  21. 45 0
      client/src/services/config-helpdesk.service.dev.ts
  22. 41 0
      client/src/services/config-helpdesk.service.ts
  23. 10 11
      client/src/services/config-peoplesearch.service.dev.ts
  24. 53 0
      client/src/services/config-peoplesearch.service.ts
  25. 21 0
      client/src/services/people.data.json
  26. 1 1
      client/src/services/people.service.ts
  27. 4 0
      client/src/services/pwm.service.dev.ts
  28. 16 3
      client/src/services/pwm.service.ts
  29. 1 0
      client/tsconfig.json
  30. 1 1
      client/webpack.build.js
  31. 10 0
      client/webpack.common.js
  32. 1 1
      client/webpack.dev.js
  33. 0 1
      server/src/main/webapp/WEB-INF/jsp/helpdesk.jsp

+ 1 - 1
client/index.html

@@ -25,7 +25,7 @@
 <head>
 <head>
     <meta charset="UTF-8">
     <meta charset="UTF-8">
     <meta name="viewport" content="initial-scale=1, maximum-scale=1">
     <meta name="viewport" content="initial-scale=1, maximum-scale=1">
-    <title>SSPR Development</title>
+    <title>PWM Development</title>
 
 
     <style>
     <style>
         html, body {
         html, body {

+ 63 - 0
client/src/helpdesk/helpdesk-search.component.html

@@ -0,0 +1,63 @@
+<!--
+  ~ Password Management Servlets (PWM)
+  ~ http://www.pwm-project.org
+  ~
+  ~ Copyright (c) 2006-2009 Novell, Inc.
+  ~ Copyright (c) 2009-2017 The PWM Project
+  ~
+  ~ This program is free software; you can redistribute it and/or modify
+  ~ it under the terms of the GNU General Public License as published by
+  ~ the Free Software Foundation; either version 2 of the License, or
+  ~ (at your option) any later version.
+  ~
+  ~ This program is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  ~ GNU General Public License for more details.
+  ~
+  ~ You should have received a copy of the GNU General Public License
+  ~ along with this program; if not, write to the Free Software
+  ~ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+  -->
+
+<mf-app-bar>
+    <div id="page-content-title" translate="Title_HelpDesk">Help Desk</div>
+    <mf-search-bar search-text="$ctrl.query"
+                   on-search-text-change="$ctrl.onSearchTextChange(value)"
+                   auto-focus></mf-search-bar>
+    <span flex></span>
+    <mf-icon-button
+        icon="view-tile_thin"
+        ng-attr-title="{{ 'Title_HelpDeskCard' | translate }}"
+        ng-class="{selected: $ctrl.view === 'cards'}"
+        ng-click="$ctrl.gotoCardsView()"
+        ng-disabled="$ctrl.view === 'cards'"
+        id="view-tile-icon"></mf-icon-button>
+    <mf-icon-button
+        icon="view-list_thin"
+        ng-attr-title="{{ 'Title_HelpDeskTable' | translate }}"
+        ng-class="{selected: $ctrl.view === 'table'}"
+        ng-click="$ctrl.gotoTableView()"
+        ng-disabled="$ctrl.view === 'table'"
+        id="view-list-icon"></mf-icon-button>
+</mf-app-bar>
+
+<div class="people-search-component-content">
+    <div class="person-card-list" ng-show="$ctrl.view === 'cards'">
+        <person-card person="person"
+                     show-image="$ctrl.photosEnabled"
+                     ng-repeat="person in $ctrl.searchResult.people | orderBy:'displayNames[0]'"
+                     ng-click="$ctrl.selectPerson(person)">
+        </person-card>
+    </div>
+
+    <mf-table data="person in $ctrl.searchResult.people"
+              ng-show="$ctrl.view === 'table' && $ctrl.searchResult.people.length"
+              search-highlight="$ctrl.query"
+              on-click-item="$ctrl.selectPerson(person)">
+        <mf-table-column ng-repeat="(key, value) in $ctrl.columnConfiguration"
+                         label="value"
+                         value="'person.' + key">
+        </mf-table-column>
+    </mf-table>
+</div>

+ 89 - 0
client/src/helpdesk/helpdesk-search.component.scss

@@ -0,0 +1,89 @@
+/*!
+ * Password Management Servlets (PWM)
+ * http://www.pwm-project.org
+ *
+ * Copyright (c) 2006-2009 Novell, Inc.
+ * Copyright (c) 2009-2017 The PWM Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+help-desk-search {
+  display: flex;
+  flex-flow: column nowrap;
+  height: 100%;
+
+  // At medium size, cards are centered and no longer take up 100% width
+  &.medium {
+    > .people-search-component-content {
+      > .person-card-list {
+        > person-card {
+          margin: 0 auto;
+          display: block;
+          width: 272px;
+        }
+      }
+    }
+  }
+
+  // At large size, cards fit next to each other
+  &.large {
+    > .people-search-component-content {
+      > .person-card-list {
+        text-align: left;
+        margin: 0;
+
+        > person-card {
+          display: inline-block;
+          margin-right: 5px;
+        }
+      }
+    }
+  }
+
+  > .people-search-component-content {
+    flex: 1 1;
+    overflow: auto;
+    text-align: center;
+
+    > .person-card-list {
+      > person-card {
+        display: inline-block;
+        width: 100%;
+
+        &:not(:last-child) {
+          margin-bottom: 5px;
+        }
+      }
+    }
+  }
+}
+
+[dir="rtl"] {
+  people-search-cards {
+    &.large {
+      > .people-search-component-content {
+        .person-card-list {
+          text-align: right;
+
+          > person-card {
+            margin-right: auto;
+            margin-left: 5px;
+          }
+        }
+      }
+    }
+  }
+}

+ 197 - 0
client/src/helpdesk/helpdesk-search.component.ts

@@ -0,0 +1,197 @@
+/*
+ * Password Management Servlets (PWM)
+ * http://www.pwm-project.org
+ *
+ * Copyright (c) 2006-2009 Novell, Inc.
+ * Copyright (c) 2009-2017 The PWM Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+import { Component } from '../component';
+import {IPeopleService} from '../services/people.service';
+import SearchResult from '../models/search-result.model';
+import {IPromise, IQService} from 'angular';
+import {IConfigService} from '../services/config-base.service';
+import {IPerson} from '../models/person.model';
+
+@Component({
+    stylesheetUrl: require('helpdesk/helpdesk-search.component.scss'),
+    templateUrl: require('helpdesk/helpdesk-search.component.html')
+})
+export default class HelpDeskSearchComponent {
+    columnConfiguration: any;
+    protected pendingRequests: IPromise<any>[] = [];
+    photosEnabled: boolean;
+    query: string;
+    searchResult: SearchResult;
+    view: string;
+
+    static $inject = [
+        '$q',
+        'ConfigService',
+        'PeopleService'
+    ];
+    constructor(private $q: IQService,
+                private configService: IConfigService,
+                private peopleService: IPeopleService) {
+    }
+
+    $onInit(): void {
+        this.view = 'cards';
+
+        this.configService.photosEnabled().then((photosEnabled: boolean) => {
+            this.photosEnabled = photosEnabled;
+        }); // TODO: only if in cards view (some other things are like that too)
+
+        this.fetchData();
+    }
+
+    private fetchData() {
+        let searchResultPromise = this.fetchSearchData();
+        if (searchResultPromise) {
+
+            searchResultPromise.then(this.onSearchResult.bind(this));
+        }
+    }
+
+    private fetchSearchData(): IPromise<SearchResult> {
+        // this.abortPendingRequests();
+        this.searchResult = null;
+
+        if (!this.query) {
+            // this.clearSearch();
+            return null;
+        }
+
+        const self = this;
+
+        let promise = this.peopleService.search(this.query);
+
+        this.pendingRequests.push(promise);
+
+        return promise
+            .then(
+                (searchResult: SearchResult) => {
+                    // self.clearErrorMessage();
+                    // self.clearSearchMessage();
+
+                    // Aborted request
+                    if (!searchResult) {
+                        return;
+                    }
+
+                    // Too many results returned
+                    // if (searchResult.sizeExceeded) {
+                    //     self.setSearchMessage('Display_SearchResultsExceeded');
+                    // }
+
+                    // No results returned. Not an else if statement so that the more important message is presented
+                    // if (!searchResult.people.length) {
+                    //     self.setSearchMessage('Display_SearchResultsNone');
+                    // }
+
+                    return this.$q.resolve(searchResult);
+                },
+                (error) => {
+                    /*self.setErrorMessage(error);
+                    self.clearSearchMessage();*/
+                })
+            .finally(() => {
+                // self.removePendingRequest(promise);
+            });
+    }
+
+    gotoCardsView(): void {
+        if (this.view !== 'cards') {
+            this.view = 'cards';
+        }
+    }
+
+    gotoTableView(): void {
+        if (this.view !== 'table') {
+            this.view = 'table';
+        }
+
+        let self = this;
+
+        // The table columns are dynamic and configured via a service
+        this.configService.getColumnConfig().then(
+            (columnConfiguration: any) => {
+                self.columnConfiguration = columnConfiguration;
+            },
+            (error) => {
+                // self.setErrorMessage(error);
+            }); // TODO: remove self
+    }
+
+    private onSearchResult(searchResult: SearchResult): void {
+        this.searchResult = searchResult;   // just for now - table view only
+        // Aborted request
+        if (!searchResult) {
+            return;
+        }
+
+        this.searchResult = new SearchResult({
+            sizeExceeded: searchResult.sizeExceeded,
+            searchResults: []
+        });
+
+        let self = this;
+
+        this.pendingRequests = searchResult.people.map(
+            (person: IPerson) => {
+                // Store this promise because it is abortable
+                let promise = this.peopleService.getPerson(person.userKey);
+
+                promise
+                    .then((person: IPerson) => {
+                            // Aborted request
+                            if (!person) {
+                                return;
+                            }
+
+                            // searchResult may be overwritten by ESC->[LETTER] typed in after a search
+                            // has started but before all calls to peopleService.getPerson have resolved
+                            if (self.searchResult) {
+                                self.searchResult.people.push(person);
+                            }
+                        },
+                        (error) => {
+                            // self.setErrorMessage(error);
+                        })
+                    .finally(() => {
+                        // self.removePendingRequest(promise);
+                    });
+
+                return promise;
+            }
+        );  // TODO: this arg
+    }
+
+    onSearchTextChange(value: string): void {
+        if (value === this.query) {
+            return;
+        }
+
+        this.query = value;
+
+        // this.storeSearchText();
+        // this.clearSearchMessage();
+        // this.clearErrorMessage();
+        this.fetchData();
+    }
+}

+ 42 - 1
client/src/helpdesk/helpdesk.module.ts

@@ -1 +1,42 @@
-console.log('Script is running!');
+/*
+ * Password Management Servlets (PWM)
+ * http://www.pwm-project.org
+ *
+ * Copyright (c) 2006-2009 Novell, Inc.
+ * Copyright (c) 2009-2017 The PWM Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+import { module } from 'angular';
+import HelpDeskSearchComponent from './helpdesk-search.component';
+import uxModule from '../ux/ux.module';
+import PersonCardComponent from '../peoplesearch/person-card.component';
+import PromiseService from '../services/promise.service';
+
+require('../peoplesearch/peoplesearch.scss');
+
+const moduleName = 'help-desk';
+
+module(moduleName, [
+    uxModule
+])
+
+    .component('helpDeskSearch', HelpDeskSearchComponent)
+    .component('personCard', PersonCardComponent)
+    .service('PromiseService', PromiseService);
+
+export default moduleName;

+ 0 - 0
client/src/helpdesk/helpdesk.scss


+ 48 - 0
client/src/helpdesk/main.dev.ts

@@ -0,0 +1,48 @@
+/*
+ * Password Management Servlets (PWM)
+ * http://www.pwm-project.org
+ *
+ * Copyright (c) 2006-2009 Novell, Inc.
+ * Copyright (c) 2009-2017 The PWM Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+import { bootstrap, module } from 'angular';
+import helpDeskModule from './helpdesk.module';
+import routes from './routes';
+import uiRouter from '@uirouter/angularjs';
+import PeopleService from '../services/people.service.dev';
+import HelpDeskConfigService from '../services/config-helpdesk.service.dev';
+
+// fontgen-loader needs this :(
+require('../icons.json');
+
+module('app', [
+    uiRouter,
+    helpDeskModule,
+    'pascalprecht.translate'
+])
+    .config(['$translateProvider', ($translateProvider: angular.translate.ITranslateProvider) => {
+        $translateProvider.translations('en', require('i18n/translations_en.json'));
+        $translateProvider.useSanitizeValueStrategy('escapeParameters');
+        $translateProvider.preferredLanguage('en');
+    }])
+    .config(routes)
+    .service('PeopleService', PeopleService)
+    .service('ConfigService', HelpDeskConfigService);
+
+// Attach to the page document
+bootstrap(document, ['app']);

+ 60 - 0
client/src/helpdesk/main.ts

@@ -0,0 +1,60 @@
+/*
+ * Password Management Servlets (PWM)
+ * http://www.pwm-project.org
+ *
+ * Copyright (c) 2006-2009 Novell, Inc.
+ * Copyright (c) 2009-2017 The PWM Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+import { bootstrap, module } from 'angular';
+import helpDeskModule from './helpdesk.module';
+import PeopleService from '../services/people.service';
+import PwmService from '../services/pwm.service';
+import routes from './routes';
+import TranslationsLoaderFactory from '../services/translations-loader.factory';
+import uiRouter from '@uirouter/angularjs';
+import HelpDeskConfigService from '../services/config-helpdesk.service';
+
+// fontgen-loader needs this :(
+require('../icons.json');
+
+module('app', [
+    uiRouter,
+    helpDeskModule,
+    'pascalprecht.translate'
+])
+    .config(routes)
+    .config([
+        '$translateProvider',
+        ($translateProvider: angular.translate.ITranslateProvider) => {
+            $translateProvider
+                .translations('fallback', require('i18n/translations_en.json'))
+                .useLoader('translationsLoader')
+                .useSanitizeValueStrategy('escapeParameters')
+                .preferredLanguage('en')
+                .fallbackLanguage('fallback')
+                .forceAsyncReload(true);
+        }])
+    .service('PeopleService', PeopleService)
+    .service('PwmService', PwmService)
+    .service('ConfigService', HelpDeskConfigService)
+    .factory('translationsLoader', TranslationsLoaderFactory);
+
+// Attach to the page document, wait for PWM to load first
+window['PWM_GLOBAL'].startupFunctions.push(() => {
+    bootstrap(document, ['app'], { strictDi: true });
+});

+ 37 - 0
client/src/helpdesk/routes.ts

@@ -0,0 +1,37 @@
+/*
+ * Password Management Servlets (PWM)
+ * http://www.pwm-project.org
+ *
+ * Copyright (c) 2006-2009 Novell, Inc.
+ * Copyright (c) 2009-2017 The PWM Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+export default [
+    '$stateProvider',
+    '$urlRouterProvider',
+    (
+        $stateProvider: angular.ui.IStateProvider,
+        $urlRouterProvider: angular.ui.IUrlRouterProvider
+    ) => {
+        $urlRouterProvider.otherwise(
+            ($injector: angular.auto.IInjectorService, $location: angular.ILocationService) => {
+                $location.url('search');
+            });
+
+        $stateProvider.state('search', { url: '/search?query', component: 'helpDeskSearch' });
+    }];

+ 6 - 1
client/src/i18n/translations_en.json

@@ -1,9 +1,14 @@
 {
 {
-  "Title_PeopleSearch": "People Search",
   "Title_Management": "Management",
   "Title_Management": "Management",
   "Title_DirectReports": "Direct Report(s)",
   "Title_DirectReports": "Direct Report(s)",
+  "Title_HelpDesk": "Help Desk",
+  "Title_HelpDeskCard": "Help Desk Cards",
+  "Title_HelpDeskTable": "Help Desk Table",
   "Title_Organization": "Organization",
   "Title_Organization": "Organization",
   "Title_OrgChart": "Organizational Chart",
   "Title_OrgChart": "Organizational Chart",
+  "Title_PeopleSearch": "People Search",
+  "Title_PeopleSearchCard": "People Search Cards",
+  "Title_PeopleSearchTable": "People Search Table",
   "Title_Details": "Details",
   "Title_Details": "Details",
 
 
   "Display_PleaseWait": "Loading...",
   "Display_PleaseWait": "Loading...",

+ 1 - 1
client/src/main.dev.ts

@@ -22,7 +22,7 @@
 
 
 
 
 import { bootstrap, module } from 'angular';
 import { bootstrap, module } from 'angular';
-import ConfigService from './services/config.service.dev';
+import ConfigService from './services/config-peoplesearch.service.dev';
 import peopleSearchModule from './peoplesearch/peoplesearch.module';
 import peopleSearchModule from './peoplesearch/peoplesearch.module';
 import PeopleService from './services/people.service.dev';
 import PeopleService from './services/people.service.dev';
 import PwmService from './services/pwm.service.dev';
 import PwmService from './services/pwm.service.dev';

+ 1 - 1
client/src/main.ts

@@ -22,7 +22,7 @@
 
 
 
 
 import { bootstrap, module } from 'angular';
 import { bootstrap, module } from 'angular';
-import ConfigService from './services/config.service';
+import ConfigService from './services/config-peoplesearch.service';
 import peopleSearchModule from './peoplesearch/peoplesearch.module';
 import peopleSearchModule from './peoplesearch/peoplesearch.module';
 import PeopleService from './services/people.service';
 import PeopleService from './services/people.service';
 import PwmService from './services/pwm.service';
 import PwmService from './services/pwm.service';

+ 2 - 2
client/src/peoplesearch/orgchart-search.component.ts

@@ -22,7 +22,7 @@
 
 
 
 
 import { Component } from '../component';
 import { Component } from '../component';
-import { IConfigService } from '../services/config.service';
+import { IPeopleSearchConfigService } from '../services/config-peoplesearch.service';
 import { IPeopleService } from '../services/people.service';
 import { IPeopleService } from '../services/people.service';
 import IPwmService from '../services/pwm.service';
 import IPwmService from '../services/pwm.service';
 import { isArray, isString, IPromise, IQService, IScope } from 'angular';
 import { isArray, isString, IPromise, IQService, IScope } from 'angular';
@@ -57,7 +57,7 @@ export default class OrgChartSearchComponent {
                 private $scope: IScope,
                 private $scope: IScope,
                 private $state: angular.ui.IStateService,
                 private $state: angular.ui.IStateService,
                 private $stateParams: angular.ui.IStateParamsService,
                 private $stateParams: angular.ui.IStateParamsService,
-                private configService: IConfigService,
+                private configService: IPeopleSearchConfigService,
                 private localStorageService: LocalStorageService,
                 private localStorageService: LocalStorageService,
                 private peopleService: IPeopleService,
                 private peopleService: IPeopleService,
                 private pwmService: IPwmService) {
                 private pwmService: IPwmService) {

+ 2 - 2
client/src/peoplesearch/peoplesearch-base.component.ts

@@ -22,7 +22,7 @@
 
 
 
 
 import { isArray, isString, IPromise, IQService, IScope } from 'angular';
 import { isArray, isString, IPromise, IQService, IScope } from 'angular';
-import { IConfigService } from '../services/config.service';
+import { IPeopleSearchConfigService } from '../services/config-peoplesearch.service';
 import { IPeopleService } from '../services/people.service';
 import { IPeopleService } from '../services/people.service';
 import IPwmService from '../services/pwm.service';
 import IPwmService from '../services/pwm.service';
 import LocalStorageService from '../services/local-storage.service';
 import LocalStorageService from '../services/local-storage.service';
@@ -48,7 +48,7 @@ abstract class PeopleSearchBaseComponent {
                 protected $state: angular.ui.IStateService,
                 protected $state: angular.ui.IStateService,
                 protected $stateParams: angular.ui.IStateParamsService,
                 protected $stateParams: angular.ui.IStateParamsService,
                 protected $translate: angular.translate.ITranslateService,
                 protected $translate: angular.translate.ITranslateService,
-                protected configService: IConfigService,
+                protected configService: IPeopleSearchConfigService,
                 protected localStorageService: LocalStorageService,
                 protected localStorageService: LocalStorageService,
                 protected peopleService: IPeopleService,
                 protected peopleService: IPeopleService,
                 protected promiseService: PromiseService,
                 protected promiseService: PromiseService,

+ 2 - 2
client/src/peoplesearch/peoplesearch-cards.component.ts

@@ -23,7 +23,7 @@
 
 
 import { Component } from '../component';
 import { Component } from '../component';
 import ElementSizeService from '../ux/element-size.service';
 import ElementSizeService from '../ux/element-size.service';
-import IConfigService from '../services/config.service';
+import IPeopleSearchConfigService from '../services/config-peoplesearch.service';
 import IPeopleService from '../services/people.service';
 import IPeopleService from '../services/people.service';
 import IPwmService from '../services/pwm.service';
 import IPwmService from '../services/pwm.service';
 import { isString, IAugmentedJQuery, IQService, IScope } from 'angular';
 import { isString, IAugmentedJQuery, IQService, IScope } from 'angular';
@@ -66,7 +66,7 @@ export default class PeopleSearchCardsComponent extends PeopleSearchBaseComponen
                 $state: angular.ui.IStateService,
                 $state: angular.ui.IStateService,
                 $stateParams: angular.ui.IStateParamsService,
                 $stateParams: angular.ui.IStateParamsService,
                 $translate: angular.translate.ITranslateService,
                 $translate: angular.translate.ITranslateService,
-                configService: IConfigService,
+                configService: IPeopleSearchConfigService,
                 localStorageService: LocalStorageService,
                 localStorageService: LocalStorageService,
                 private elementSizeService: ElementSizeService,
                 private elementSizeService: ElementSizeService,
                 peopleService: IPeopleService,
                 peopleService: IPeopleService,

+ 2 - 2
client/src/peoplesearch/peoplesearch-table.component.ts

@@ -22,7 +22,7 @@
 
 
 
 
 import { Component } from '../component';
 import { Component } from '../component';
-import { IConfigService } from '../services/config.service';
+import { IPeopleSearchConfigService } from '../services/config-peoplesearch.service';
 import IPeopleService from '../services/people.service';
 import IPeopleService from '../services/people.service';
 import IPwmService from '../services/pwm.service';
 import IPwmService from '../services/pwm.service';
 import { IQService, IScope } from 'angular';
 import { IQService, IScope } from 'angular';
@@ -55,7 +55,7 @@ export default class PeopleSearchTableComponent extends PeopleSearchBaseComponen
                 $state: angular.ui.IStateService,
                 $state: angular.ui.IStateService,
                 $stateParams: angular.ui.IStateParamsService,
                 $stateParams: angular.ui.IStateParamsService,
                 $translate: angular.translate.ITranslateService,
                 $translate: angular.translate.ITranslateService,
-                configService: IConfigService,
+                configService: IPeopleSearchConfigService,
                 localStorageService: LocalStorageService,
                 localStorageService: LocalStorageService,
                 peopleService: IPeopleService,
                 peopleService: IPeopleService,
                 promiseService: PromiseService,
                 promiseService: PromiseService,

+ 2 - 2
client/src/peoplesearch/person-details-dialog.component.ts

@@ -22,7 +22,7 @@
 
 
 
 
 import { Component } from '../component';
 import { Component } from '../component';
-import { IConfigService } from '../services/config.service';
+import { IPeopleSearchConfigService } from '../services/config-peoplesearch.service';
 import { IPeopleService } from '../services/people.service';
 import { IPeopleService } from '../services/people.service';
 import { IAugmentedJQuery, ITimeoutService } from 'angular';
 import { IAugmentedJQuery, ITimeoutService } from 'angular';
 import { IPerson } from '../models/person.model';
 import { IPerson } from '../models/person.model';
@@ -42,7 +42,7 @@ export default class PersonDetailsDialogComponent {
                 private $state: angular.ui.IStateService,
                 private $state: angular.ui.IStateService,
                 private $stateParams: angular.ui.IStateParamsService,
                 private $stateParams: angular.ui.IStateParamsService,
                 private $timeout: ITimeoutService,
                 private $timeout: ITimeoutService,
-                private configService: IConfigService,
+                private configService: IPeopleSearchConfigService,
                 private peopleService: IPeopleService) {
                 private peopleService: IPeopleService) {
     }
     }
 
 

+ 2 - 2
client/src/routes.ts

@@ -21,7 +21,7 @@
  */
  */
 
 
 
 
-import { IConfigService } from './services/config.service';
+import { IPeopleSearchConfigService } from './services/config-peoplesearch.service';
 import { IQService } from 'angular';
 import { IQService } from 'angular';
 import LocalStorageService from './services/local-storage.service';
 import LocalStorageService from './services/local-storage.service';
 
 
@@ -70,7 +70,7 @@ export default [
                 enabled: [
                 enabled: [
                     '$q',
                     '$q',
                     'ConfigService',
                     'ConfigService',
-                    ($q: IQService, configService: IConfigService) => {
+                    ($q: IQService, configService: IPeopleSearchConfigService) => {
                         let deferred = $q.defer();
                         let deferred = $q.defer();
 
 
                         configService
                         configService

+ 40 - 0
client/src/services/config-base.service.dev.ts

@@ -0,0 +1,40 @@
+/*
+ * Password Management Servlets (PWM)
+ * http://www.pwm-project.org
+ *
+ * Copyright (c) 2006-2009 Novell, Inc.
+ * Copyright (c) 2009-2017 The PWM Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+import {IConfigService} from './config-base.service';
+import {IPromise, IQService} from 'angular';
+
+export abstract class ConfigBaseService implements IConfigService {
+    abstract getColumnConfig(): IPromise<any>;
+
+    constructor(protected $q: IQService) {
+    }
+
+    getValue(key: string): IPromise<any> {
+        return null;
+    }
+
+    photosEnabled(): IPromise<boolean> {
+        return this.$q.resolve(true);
+    }
+}

+ 26 - 29
client/src/services/config.service.ts → client/src/services/config-base.service.ts

@@ -20,48 +20,30 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+import {IHttpService, ILogService, IPromise, IQService} from 'angular';
+import {IPwmService} from './pwm.service';
 
 
-import { IHttpService, ILogService, IPromise, IQService } from 'angular';
-import IPwmService from './pwm.service';
-import PwmService from './pwm.service';
-
-const COLUMN_CONFIG = 'peoplesearch_search_columns';
 const PHOTO_ENABLED = 'peoplesearch_enablePhoto';
 const PHOTO_ENABLED = 'peoplesearch_enablePhoto';
-const ORGCHART_ENABLED = 'peoplesearch_orgChartEnabled';
 
 
 export interface IConfigService {
 export interface IConfigService {
     getColumnConfig(): IPromise<any>;
     getColumnConfig(): IPromise<any>;
-    photosEnabled(): IPromise<boolean>;
-    orgChartEnabled(): IPromise<boolean>;
     getValue(key: string): IPromise<any>;
     getValue(key: string): IPromise<any>;
+    photosEnabled(): IPromise<boolean>;
 }
 }
 
 
-export default class ConfigService implements IConfigService {
+export abstract class ConfigBaseService implements IConfigService {
 
 
-    static $inject = ['$http', '$log', '$q', 'PwmService' ];
-    constructor(private $http: IHttpService,
-                private $log: ILogService,
-                private $q: IQService,
-                private pwmService: IPwmService) {
+    constructor(protected $http: IHttpService,
+                protected $log: ILogService,
+                protected $q: IQService,
+                protected pwmService: IPwmService) {
     }
     }
 
 
-    getColumnConfig(): IPromise<any> {
-        return this.getValue(COLUMN_CONFIG);
-    }
-
-    photosEnabled(): IPromise<boolean> {
-        return this.getValue(PHOTO_ENABLED)
-            .then(null, () => { return this.$q.resolve(true); }); // On error use default
-    }
-
-    orgChartEnabled(): IPromise<boolean> {
-        return this.getValue(ORGCHART_ENABLED)
-            .then(null, () => { return this.$q.resolve(true); }); // On error use default
-    }
+    abstract getColumnConfig(): IPromise<any>;
 
 
-    getValue(key: string): IPromise<any> {
+    private getEndpointValue(endpoint: string, key: string): IPromise<any> {
         return this.$http
         return this.$http
-            .get(this.pwmService.getServerUrl('clientData'), { cache: true })
+            .get(endpoint, { cache: true })
             .then((response) => {
             .then((response) => {
                 if (response.data['error']) {
                 if (response.data['error']) {
                     return this.handlePwmError(response);
                     return this.handlePwmError(response);
@@ -71,6 +53,16 @@ export default class ConfigService implements IConfigService {
             }, this.handleHttpError);
             }, this.handleHttpError);
     }
     }
 
 
+    private getPeopleSearchValue(key: string): IPromise<any> {
+        let endpoint: string = this.pwmService.getPeopleSearchServerUrl('clientData');
+        return this.getEndpointValue(endpoint, key);
+    }
+
+    getValue(key: string): IPromise<any> {
+        let endpoint: string = this.pwmService.getServerUrl('clientData');
+        return this.getEndpointValue(endpoint, key);
+    }
+
     private handleHttpError(error): void {
     private handleHttpError(error): void {
         this.$log.error(error);
         this.$log.error(error);
     }
     }
@@ -81,4 +73,9 @@ export default class ConfigService implements IConfigService {
 
 
         return this.$q.reject(response.data['errorMessage']);
         return this.$q.reject(response.data['errorMessage']);
     }
     }
+
+    photosEnabled(): IPromise<boolean> {
+        return this.getPeopleSearchValue(PHOTO_ENABLED)
+            .then(null, () => { return this.$q.resolve(true); }); // On error use default
+    }
 }
 }

+ 45 - 0
client/src/services/config-helpdesk.service.dev.ts

@@ -0,0 +1,45 @@
+/*
+ * Password Management Servlets (PWM)
+ * http://www.pwm-project.org
+ *
+ * Copyright (c) 2006-2009 Novell, Inc.
+ * Copyright (c) 2009-2017 The PWM Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+import { IPromise, IQService } from 'angular';
+import {ConfigBaseService} from './config-base.service.dev';
+import {IConfigService} from './config-base.service';
+
+
+export default class HelpDeskConfigService extends ConfigBaseService implements IConfigService {
+    static $inject = [ '$q' ];
+    constructor($q: IQService) {
+        super($q);
+    }
+
+    getColumnConfig(): IPromise<any> {
+        return this.$q.resolve({
+            givenName: 'First Name',
+            sn: 'Last Name',
+            title: 'Title',
+            mail: 'Email',
+            telephoneNumber: 'Telephone',
+            workforceId: 'Workforce ID'
+        });
+    }
+}

+ 41 - 0
client/src/services/config-helpdesk.service.ts

@@ -0,0 +1,41 @@
+/*
+ * Password Management Servlets (PWM)
+ * http://www.pwm-project.org
+ *
+ * Copyright (c) 2006-2009 Novell, Inc.
+ * Copyright (c) 2009-2017 The PWM Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+import { IHttpService, ILogService, IPromise, IQService } from 'angular';
+import IPwmService from './pwm.service';
+import PwmService from './pwm.service';
+import {ConfigBaseService, IConfigService} from './config-base.service';
+
+const COLUMN_CONFIG = 'helpdesk_search_columns';
+
+export default class HelpDeskConfigService extends ConfigBaseService implements IConfigService {
+
+    static $inject = ['$http', '$log', '$q', 'PwmService' ];
+    constructor($http: IHttpService, $log: ILogService, $q: IQService, pwmService: IPwmService) {
+        super($http, $log, $q, pwmService);
+    }
+
+    getColumnConfig(): IPromise<any> {
+        return this.getValue(COLUMN_CONFIG);
+    }
+}

+ 10 - 11
client/src/services/config.service.dev.ts → client/src/services/config-peoplesearch.service.dev.ts

@@ -21,12 +21,19 @@
  */
  */
 
 
 
 
-import { IConfigService } from './config.service';
 import { IPromise, IQService } from 'angular';
 import { IPromise, IQService } from 'angular';
+import {ConfigBaseService} from './config-base.service.dev';
+import {IConfigService} from './config-base.service';
+import {IPeopleSearchConfigService} from './config-peoplesearch.service';
 
 
-export default class ConfigService implements IConfigService {
+
+export default class ConfigService
+                     extends ConfigBaseService
+                     implements IConfigService, IPeopleSearchConfigService {
     static $inject = [ '$q' ];
     static $inject = [ '$q' ];
-    constructor(private $q: IQService) {}
+    constructor($q: IQService) {
+        super($q);
+    }
 
 
     getColumnConfig(): IPromise<any> {
     getColumnConfig(): IPromise<any> {
         return this.$q.resolve({
         return this.$q.resolve({
@@ -38,15 +45,7 @@ export default class ConfigService implements IConfigService {
         });
         });
     }
     }
 
 
-    photosEnabled(): IPromise<boolean> {
-        return this.$q.resolve(true);
-    }
-
     orgChartEnabled(): IPromise<boolean> {
     orgChartEnabled(): IPromise<boolean> {
         return this.$q.resolve(true);
         return this.$q.resolve(true);
     };
     };
-
-    getValue(key: string): IPromise<any> {
-        return null;
-    }
 }
 }

+ 53 - 0
client/src/services/config-peoplesearch.service.ts

@@ -0,0 +1,53 @@
+/*
+ * Password Management Servlets (PWM)
+ * http://www.pwm-project.org
+ *
+ * Copyright (c) 2006-2009 Novell, Inc.
+ * Copyright (c) 2009-2017 The PWM Project
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+import { IHttpService, ILogService, IPromise, IQService } from 'angular';
+import IPwmService from './pwm.service';
+import PwmService from './pwm.service';
+import {ConfigBaseService, IConfigService} from './config-base.service';
+
+const COLUMN_CONFIG = 'peoplesearch_search_columns';
+const ORGCHART_ENABLED = 'peoplesearch_orgChartEnabled';
+
+export interface IPeopleSearchConfigService extends IConfigService {
+    orgChartEnabled(): IPromise<boolean>;
+}
+
+export default class PeopleSearchConfigService
+                     extends ConfigBaseService
+                     implements IConfigService, IPeopleSearchConfigService {
+
+    static $inject = ['$http', '$log', '$q', 'PwmService' ];
+    constructor($http: IHttpService, $log: ILogService, $q: IQService, pwmService: IPwmService) {
+        super($http, $log, $q, pwmService);
+    }
+
+    getColumnConfig(): IPromise<any> {
+        return this.getValue(COLUMN_CONFIG);
+    }
+
+    orgChartEnabled(): IPromise<boolean> {
+        return this.getValue(ORGCHART_ENABLED)
+            .then(null, () => { return this.$q.resolve(true); }); // On error use default
+    }
+}

+ 21 - 0
client/src/services/people.data.json

@@ -7,6 +7,7 @@
     "mail": "jryan0@csmonitor.com",
     "mail": "jryan0@csmonitor.com",
     "telephoneNumber": "(564) 683-6597",
     "telephoneNumber": "(564) 683-6597",
     "title": "Senior Sales Associate",
     "title": "Senior Sales Associate",
+    "workforceId": "E84-001",
     "managerId": null,
     "managerId": null,
     "photoURL": "/images/avatars/1.jpg",
     "photoURL": "/images/avatars/1.jpg",
     "_displayName": "Jean Ryan - Senior Sales Associate",
     "_displayName": "Jean Ryan - Senior Sales Associate",
@@ -87,6 +88,7 @@
     "mail": "rbowman1@pinterest.com",
     "mail": "rbowman1@pinterest.com",
     "telephoneNumber": "(567) 798-6155",
     "telephoneNumber": "(567) 798-6155",
     "title": "Quality Engineer",
     "title": "Quality Engineer",
+    "workforceId": "E84-002",
     "managerId": 1,
     "managerId": 1,
     "photoURL": "/images/avatars/2.jpg",
     "photoURL": "/images/avatars/2.jpg",
     "_displayName": "Ruby Bowman - Quality Engineer",
     "_displayName": "Ruby Bowman - Quality Engineer",
@@ -167,6 +169,7 @@
     "mail": "wcarter2@delicious.com",
     "mail": "wcarter2@delicious.com",
     "telephoneNumber": "(523) 622-4293",
     "telephoneNumber": "(523) 622-4293",
     "title": "Community Outreach Specialist",
     "title": "Community Outreach Specialist",
+    "workforceId": "E84-003",
     "managerId": 1,
     "managerId": 1,
     "photoURL": "/images/avatars/3.jpg",
     "photoURL": "/images/avatars/3.jpg",
     "_displayName": "William Carter - Community Outreach Specialist",
     "_displayName": "William Carter - Community Outreach Specialist",
@@ -247,6 +250,7 @@
     "mail": "asnyder3@blinklist.com",
     "mail": "asnyder3@blinklist.com",
     "telephoneNumber": "(345) 682-1430",
     "telephoneNumber": "(345) 682-1430",
     "title": "Research Nurse",
     "title": "Research Nurse",
+    "workforceId": "E84-004",
     "managerId": 1,
     "managerId": 1,
     "photoURL": "/images/avatars/4.jpg",
     "photoURL": "/images/avatars/4.jpg",
     "_displayName": "Alan Snyder - Research Nurse",
     "_displayName": "Alan Snyder - Research Nurse",
@@ -327,6 +331,7 @@
     "mail": "aalvarez4@ezinearticles.com",
     "mail": "aalvarez4@ezinearticles.com",
     "telephoneNumber": "(457) 877-1797",
     "telephoneNumber": "(457) 877-1797",
     "title": "Financial Analyst",
     "title": "Financial Analyst",
+    "workforceId": "E84-005",
     "managerId": 2,
     "managerId": 2,
     "photoURL": "/images/avatars/5.jpg",
     "photoURL": "/images/avatars/5.jpg",
     "_displayName": "Aaron Alvarez - Financial Analyst",
     "_displayName": "Aaron Alvarez - Financial Analyst",
@@ -407,6 +412,7 @@
     "mail": "dmorrison5@nytimes.com",
     "mail": "dmorrison5@nytimes.com",
     "telephoneNumber": "(268) 336-2705",
     "telephoneNumber": "(268) 336-2705",
     "title": "Accountant II",
     "title": "Accountant II",
+    "workforceId": "E84-006",
     "managerId": 2,
     "managerId": 2,
     "photoURL": "",
     "photoURL": "",
     "_displayName": "Deborah Morrison - Accountant II",
     "_displayName": "Deborah Morrison - Accountant II",
@@ -487,6 +493,7 @@
     "mail": "mhayes6@house.gov",
     "mail": "mhayes6@house.gov",
     "telephoneNumber": "(638) 951-3305",
     "telephoneNumber": "(638) 951-3305",
     "title": "Design Engineer",
     "title": "Design Engineer",
+    "workforceId": "E84-007",
     "managerId": 2,
     "managerId": 2,
     "photoURL": "/images/avatars/7.jpg",
     "photoURL": "/images/avatars/7.jpg",
     "_displayName": "Mildred Hayes - Design Engineer",
     "_displayName": "Mildred Hayes - Design Engineer",
@@ -567,6 +574,7 @@
     "mail": "mholmes7@nbcnews.com",
     "mail": "mholmes7@nbcnews.com",
     "telephoneNumber": "(564) 818-6794",
     "telephoneNumber": "(564) 818-6794",
     "title": "Structural Engineer",
     "title": "Structural Engineer",
+    "workforceId": "E84-008",
     "managerId": 3,
     "managerId": 3,
     "photoURL": "/images/avatars/8.jpg",
     "photoURL": "/images/avatars/8.jpg",
     "_displayName": "Margaret Holmes - Structural Engineer",
     "_displayName": "Margaret Holmes - Structural Engineer",
@@ -647,6 +655,7 @@
     "mail": "jjackson8@thetimes.co.uk",
     "mail": "jjackson8@thetimes.co.uk",
     "telephoneNumber": "(206) 987-9763",
     "telephoneNumber": "(206) 987-9763",
     "title": "Junior Executive",
     "title": "Junior Executive",
+    "workforceId": "E84-009",
     "managerId": 3,
     "managerId": 3,
     "photoURL": "/images/avatars/9.jpg",
     "photoURL": "/images/avatars/9.jpg",
     "_displayName": "Jack Jackson - Junior Executive",
     "_displayName": "Jack Jackson - Junior Executive",
@@ -738,6 +747,7 @@
     "mail": "jbutler9@reference.com",
     "mail": "jbutler9@reference.com",
     "telephoneNumber": "(751) 250-5973",
     "telephoneNumber": "(751) 250-5973",
     "title": "Chief Design Engineer",
     "title": "Chief Design Engineer",
+    "workforceId": "E84-010",
     "managerId": 3,
     "managerId": 3,
     "photoURL": "/images/avatars/10.jpg",
     "photoURL": "/images/avatars/10.jpg",
     "_displayName": "Judy Butler - Chief Design Engineer",
     "_displayName": "Judy Butler - Chief Design Engineer",
@@ -818,6 +828,7 @@
     "mail": "tgutierreza@godaddy.com",
     "mail": "tgutierreza@godaddy.com",
     "telephoneNumber": "(205) 653-6795",
     "telephoneNumber": "(205) 653-6795",
     "title": "Engineer IV",
     "title": "Engineer IV",
+    "workforceId": "E84-011",
     "managerId": 9,
     "managerId": 9,
     "photoURL": "/images/avatars/11.jpg",
     "photoURL": "/images/avatars/11.jpg",
     "_displayName": "Tina Gutierrez - Engineer IV",
     "_displayName": "Tina Gutierrez - Engineer IV",
@@ -898,6 +909,7 @@
     "mail": "jcoxb@stumbleupon.com",
     "mail": "jcoxb@stumbleupon.com",
     "telephoneNumber": "(816) 816-8474",
     "telephoneNumber": "(816) 816-8474",
     "title": "Human Resources Manager",
     "title": "Human Resources Manager",
+    "workforceId": "E84-012",
     "managerId": 9,
     "managerId": 9,
     "photoURL": "/images/avatars/12.jpg",
     "photoURL": "/images/avatars/12.jpg",
     "_displayName": "Jose Cox - Human Resources Manager",
     "_displayName": "Jose Cox - Human Resources Manager",
@@ -978,6 +990,7 @@
     "mail": "pbarnesc@mediafire.com",
     "mail": "pbarnesc@mediafire.com",
     "telephoneNumber": "(207) 691-7625",
     "telephoneNumber": "(207) 691-7625",
     "title": "Internal Auditor",
     "title": "Internal Auditor",
+    "workforceId": "E84-013",
     "managerId": 4,
     "managerId": 4,
     "photoURL": "",
     "photoURL": "",
     "_displayName": "Paul Barnes - Internal Auditor",
     "_displayName": "Paul Barnes - Internal Auditor",
@@ -1058,6 +1071,7 @@
     "mail": "jstevensd@ocn.ne.jp",
     "mail": "jstevensd@ocn.ne.jp",
     "telephoneNumber": "(133) 596-4078",
     "telephoneNumber": "(133) 596-4078",
     "title": "Automation Specialist I",
     "title": "Automation Specialist I",
+    "workforceId": "E84-014",
     "managerId": 9,
     "managerId": 9,
     "photoURL": "/images/avatars/14.jpg",
     "photoURL": "/images/avatars/14.jpg",
     "_displayName": "Joe Stevens - Automation Specialist I",
     "_displayName": "Joe Stevens - Automation Specialist I",
@@ -1138,6 +1152,7 @@
     "mail": "rgrante@europa.eu",
     "mail": "rgrante@europa.eu",
     "telephoneNumber": "(343) 776-3486",
     "telephoneNumber": "(343) 776-3486",
     "title": "Safety Technician I",
     "title": "Safety Technician I",
+    "workforceId": "E84-015",
     "managerId": 20,
     "managerId": 20,
     "photoURL": "/images/avatars/15.jpg",
     "photoURL": "/images/avatars/15.jpg",
     "_displayName": "Randy Grant - Safety Technician I",
     "_displayName": "Randy Grant - Safety Technician I",
@@ -1218,6 +1233,7 @@
     "mail": "mmasonf@who.int",
     "mail": "mmasonf@who.int",
     "telephoneNumber": "(285) 576-0850",
     "telephoneNumber": "(285) 576-0850",
     "title": "Compensation Analyst",
     "title": "Compensation Analyst",
+    "workforceId": "E84-016",
     "managerId": 9,
     "managerId": 9,
     "photoURL": "/images/avatars/16.jpg",
     "photoURL": "/images/avatars/16.jpg",
     "_displayName": "Martin Mason - Compensation Analyst",
     "_displayName": "Martin Mason - Compensation Analyst",
@@ -1298,6 +1314,7 @@
     "mail": "cporterg@a8.net",
     "mail": "cporterg@a8.net",
     "telephoneNumber": "(594) 905-7773",
     "telephoneNumber": "(594) 905-7773",
     "title": "Data Coordiator",
     "title": "Data Coordiator",
+    "workforceId": "E84-017",
     "managerId": 16,
     "managerId": 16,
     "photoURL": "/images/avatars/17.jpg",
     "photoURL": "/images/avatars/17.jpg",
     "_displayName": "Cynthia Porter - Data Coordiator",
     "_displayName": "Cynthia Porter - Data Coordiator",
@@ -1378,6 +1395,7 @@
     "mail": "nburnsh@wordpress.org",
     "mail": "nburnsh@wordpress.org",
     "telephoneNumber": "(444) 231-5492",
     "telephoneNumber": "(444) 231-5492",
     "title": "Business Systems Development Analyst",
     "title": "Business Systems Development Analyst",
+    "workforceId": "E84-018",
     "managerId": 17,
     "managerId": 17,
     "photoURL": "/images/avatars/18.jpg",
     "photoURL": "/images/avatars/18.jpg",
     "_displayName": "Nancy Burns - Business Systems Development Analyst",
     "_displayName": "Nancy Burns - Business Systems Development Analyst",
@@ -1458,6 +1476,7 @@
     "mail": "jmontgomeryi@addtoany.com",
     "mail": "jmontgomeryi@addtoany.com",
     "telephoneNumber": "(675) 799-8793",
     "telephoneNumber": "(675) 799-8793",
     "title": "Structural Engineer",
     "title": "Structural Engineer",
+    "workforceId": "E84-019",
     "managerId": 18,
     "managerId": 18,
     "photoURL": "/images/avatars/19.jpg",
     "photoURL": "/images/avatars/19.jpg",
     "_displayName": "Jimmy Montgomery - Structural Engineer",
     "_displayName": "Jimmy Montgomery - Structural Engineer",
@@ -1538,6 +1557,7 @@
     "mail": "bcarrollj@paypal.com",
     "mail": "bcarrollj@paypal.com",
     "telephoneNumber": "(658) 289-4550",
     "telephoneNumber": "(658) 289-4550",
     "title": "Desktop Support Technician",
     "title": "Desktop Support Technician",
+    "workforceId": "E84-020",
     "managerId": 19,
     "managerId": 19,
     "photoURL": "/images/avatars/20.jpg",
     "photoURL": "/images/avatars/20.jpg",
     "_displayName": "Bruce Carroll - Desktop Support Technician",
     "_displayName": "Bruce Carroll - Desktop Support Technician",
@@ -1618,6 +1638,7 @@
     "mail": "orphan.user@gmail.com",
     "mail": "orphan.user@gmail.com",
     "telephoneNumber": "(454) 249-4440",
     "telephoneNumber": "(454) 249-4440",
     "title": "No Real Position",
     "title": "No Real Position",
+    "workforceId": "E84-021",
     "managerId": null,
     "managerId": null,
     "photoURL": "/images/avatars/21.jpg",
     "photoURL": "/images/avatars/21.jpg",
     "_displayName": "Orphan User - No Real Position",
     "_displayName": "Orphan User - No Real Position",

+ 1 - 1
client/src/services/people.service.ts

@@ -149,7 +149,7 @@ export default class PeopleService implements IPeopleService {
         let httpTimeout = this.$q.defer();
         let httpTimeout = this.$q.defer();
 
 
         let request = this.$http
         let request = this.$http
-            .get(this.pwmService.getServerUrl('detail'), {
+            .get(this.pwmService.getPeopleSearchServerUrl('detail'), {
                 cache: true,
                 cache: true,
                 params: { userKey: id },
                 params: { userKey: id },
                 timeout: httpTimeout.promise
                 timeout: httpTimeout.promise

+ 4 - 0
client/src/services/pwm.service.dev.ts

@@ -24,6 +24,10 @@
 import { IPwmService } from './pwm.service';
 import { IPwmService } from './pwm.service';
 
 
 export default class PwmService implements IPwmService {
 export default class PwmService implements IPwmService {
+    getPeopleSearchServerUrl(processAction: string, additionalParameters?: any): string {
+        return null;
+    }
+
     getServerUrl(processAction: string, additionalParameters?: any): string {
     getServerUrl(processAction: string, additionalParameters?: any): string {
         return null;
         return null;
     }
     }

+ 16 - 3
client/src/services/pwm.service.ts

@@ -24,6 +24,7 @@
 import { ILogService, IWindowService } from 'angular';
 import { ILogService, IWindowService } from 'angular';
 
 
 export interface IPwmService {
 export interface IPwmService {
+    getPeopleSearchServerUrl(processAction: string, additionalParameters?: any): string;
     getServerUrl(processAction: string, additionalParameters?: any): string;
     getServerUrl(processAction: string, additionalParameters?: any): string;
     ajaxTypingWait: number;
     ajaxTypingWait: number;
     localeStrings: any;
     localeStrings: any;
@@ -59,13 +60,26 @@ export default class PwmService implements IPwmService {
         }
         }
     }
     }
 
 
-    getServerUrl(processAction: string, additionalParameters?: any): string {
-        let url: string = window.location.pathname + '?processAction=' + processAction;
+    private getApiPathname(route: string) {
+        return this.urlContext + route;
+    }
+
+    private getEndpointServerUrl(pathname: string, processAction: string, additionalParameters?: any): string {
+        let url: string = pathname + '?processAction=' + processAction;
         url = this.addParameters(url, additionalParameters);
         url = this.addParameters(url, additionalParameters);
 
 
         return url;
         return url;
     }
     }
 
 
+    getPeopleSearchServerUrl(processAction: string, additionalParameters?: any): string {
+        let pathname: string = this.getApiPathname('/private/peoplesearch');
+        return this.getEndpointServerUrl(pathname, processAction, additionalParameters);
+    }
+
+    getServerUrl(processAction: string, additionalParameters?: any): string {
+        return this.getEndpointServerUrl(window.location.pathname, processAction, additionalParameters);
+    }
+
     get ajaxTypingWait(): number {
     get ajaxTypingWait(): number {
         if (this.PWM_GLOBAL) {
         if (this.PWM_GLOBAL) {
             return this.PWM_GLOBAL['client.ajaxTypingWait'] || DEFAULT_AJAX_TYPING_WAIT;
             return this.PWM_GLOBAL['client.ajaxTypingWait'] || DEFAULT_AJAX_TYPING_WAIT;
@@ -90,7 +104,6 @@ export default class PwmService implements IPwmService {
         return [];
         return [];
     }
     }
 
 
-
     private addParameters(url: string, params: any): string {
     private addParameters(url: string, params: any): string {
         if (!this.PWM_MAIN) {
         if (!this.PWM_MAIN) {
             return url;
             return url;

+ 1 - 0
client/tsconfig.json

@@ -2,6 +2,7 @@
   "compilerOptions": {
   "compilerOptions": {
     "baseUrl": "./",
     "baseUrl": "./",
     "experimentalDecorators": true,
     "experimentalDecorators": true,
+    "lib": ["es2015", "es2015.iterable", "dom"],
     "module": "commonjs",
     "module": "commonjs",
     "removeComments": true,
     "removeComments": true,
     "sourceMap": true,
     "sourceMap": true,

+ 1 - 1
client/webpack.build.js

@@ -30,7 +30,7 @@ module.exports = webpackMerge(commonConfig, {
     entry: {
     entry: {
         'peoplesearch.ng': './src/main',
         'peoplesearch.ng': './src/main',
         'changepassword.ng': './src/pages/changepassword/changepassword.module',
         'changepassword.ng': './src/pages/changepassword/changepassword.module',
-        'helpdesk.ng': './src/helpdesk/helpdesk.module'
+        'helpdesk.ng': './src/helpdesk/main'
     },
     },
     module: {
     module: {
         loaders: [
         loaders: [

+ 10 - 0
client/webpack.common.js

@@ -87,7 +87,17 @@ module.exports = {
     },
     },
     plugins: [
     plugins: [
         new HtmlWebpackPlugin({
         new HtmlWebpackPlugin({
+            chunks: ['peoplesearch.ng'],
+            filename: 'peoplesearch.html',
             template: 'index.html',
             template: 'index.html',
+            // title: 'PeopleSearch Development',
+            inject: 'body'
+        }),
+        new HtmlWebpackPlugin({
+            chunks: ['helpdesk.ng'],
+            filename: 'helpdesk.html',
+            template: 'index.html',
+            // title: 'PeopleSearch Development',
             inject: 'body'
             inject: 'body'
         })
         })
     ],
     ],

+ 1 - 1
client/webpack.dev.js

@@ -30,7 +30,7 @@ module.exports = webpackMerge(commonConfig, {
     entry: {
     entry: {
         'peoplesearch.ng': './src/main.dev',
         'peoplesearch.ng': './src/main.dev',
         'changepassword.ng': './src/pages/changepassword/changepassword.module',
         'changepassword.ng': './src/pages/changepassword/changepassword.module',
-        'helpdesk.ng': './src/helpdesk/helpdesk.module'
+        'helpdesk.ng': './src/helpdesk/main.dev'
     },
     },
     module: {
     module: {
         loaders: [
         loaders: [

+ 0 - 1
server/src/main/webapp/WEB-INF/jsp/helpdesk.jsp

@@ -48,7 +48,6 @@
 <pwm:script-ref url="/public/resources/webjars/angular-translate/dist/angular-translate.min.js" />
 <pwm:script-ref url="/public/resources/webjars/angular-translate/dist/angular-translate.min.js" />
 
 
 <jsp:include page="/WEB-INF/jsp/fragment/footer.jsp"/>
 <jsp:include page="/WEB-INF/jsp/fragment/footer.jsp"/>
-<pwm:script-ref url="/public/resources/js/helpdesk.js"/>
 <link rel="stylesheet" type="text/css" href="<pwm:url url='/public/resources/webjars/pwm-client/fonts.css' addContext="true"/>"/>
 <link rel="stylesheet" type="text/css" href="<pwm:url url='/public/resources/webjars/pwm-client/fonts.css' addContext="true"/>"/>
 <pwm:script-ref url="/public/resources/webjars/pwm-client/helpdesk.ng.js" />
 <pwm:script-ref url="/public/resources/webjars/pwm-client/helpdesk.ng.js" />