diff --git a/src/app/resource/controllers/ResourceListController.php b/src/app/resource/controllers/ResourceListController.php index 7775743951950ae1b555c59b2b369fc69e2ad5e5..692662634e4816ed96b18963eaa79be8071d7833 100644 --- a/src/app/resource/controllers/ResourceListController.php +++ b/src/app/resource/controllers/ResourceListController.php @@ -223,6 +223,7 @@ class ResourceListController 'data' => $dataPriorities, 'groupBy' => ['priority'] ]); + foreach ($rawPriorities as $key => $value) { $priority = null; if (!empty($value['priority'])) { diff --git a/src/frontend/app/administration/priority/priorities-administration.component.ts b/src/frontend/app/administration/priority/priorities-administration.component.ts index 9591a8bbcb4bb48d90141379e2177aa59cfe438a..2097cf9118f6a649211dc66e368ec81062a6ea9a 100755 --- a/src/frontend/app/administration/priority/priorities-administration.component.ts +++ b/src/frontend/app/administration/priority/priorities-administration.component.ts @@ -52,7 +52,7 @@ export class PrioritiesAdministrationComponent implements OnInit { } ngOnInit(): void { - this.headerService.headerMessage = this.lang.administration + ' ' + this.lang.priorities; + this.headerService.setHeader(this.lang.administration + ' ' + this.lang.priorities); window['MainHeaderComponent'].setSnav(this.sidenavLeft); window['MainHeaderComponent'].setSnavRight(null); diff --git a/src/frontend/app/list/filters/filters-tool.component.ts b/src/frontend/app/list/filters/filters-tool.component.ts index 1d2c6104960a1681db004d028ed972bdf0c019a1..317c83b14c701e448c61cdad3f3c5b04b0164f6d 100644 --- a/src/frontend/app/list/filters/filters-tool.component.ts +++ b/src/frontend/app/list/filters/filters-tool.component.ts @@ -165,13 +165,14 @@ export class FiltersToolComponent implements OnInit { this.http.get('../../rest/resourcesList/users/' + this.currentBasketInfo.ownerId + '/groups/' + this.currentBasketInfo.groupId + '/baskets/' + this.currentBasketInfo.basketId + '/filters?init' + this.filtersListService.getUrlFilters()) .subscribe((data: any) => { + console.log(data); data.categories.forEach((element: any) => { if (this.listProperties.categories.map((category: any) => (category.id)).indexOf(element.id) === -1) { this.stateGroups[0].names.push( { id: 'categories', value: element.id, - label: (element.label !== null ? element.label : '_UNDEFINED'), + label: (element.id !== null ? element.label : this.lang.undefined) , count: element.count } ) @@ -183,7 +184,7 @@ export class FiltersToolComponent implements OnInit { { id: 'priorities', value: element.id, - label: (element.label !== null ? element.label : '_UNDEFINED'), + label: (element.id !== null ? element.label : this.lang.undefined) , count: element.count } ) @@ -195,7 +196,7 @@ export class FiltersToolComponent implements OnInit { { id: 'statuses', value: element.id, - label: (element.label !== null ? element.label : '_UNDEFINED') , + label: (element.id !== null ? element.label : this.lang.undefined) , count: element.count } ) @@ -204,12 +205,12 @@ export class FiltersToolComponent implements OnInit { }); data.entities.forEach((element: any) => { - if (this.listProperties.entities.map((entity: any) => (entity.id)).indexOf(element.entityId) === -1) { + if (this.listProperties.entities.map((entity: any) => (entity.id)).indexOf(element.entityId) === -1 && this.listProperties.subEntities == 0) { this.stateGroups[3].names.push( { id: 'entities', value: element.entityId, - label: (element.label !== null ? element.label : '_UNDEFINED') , + label: (element.id !== null ? element.label : this.lang.undefined) , count: element.count } ) @@ -217,18 +218,17 @@ export class FiltersToolComponent implements OnInit { }); - data.entities.forEach((element: any) => { - if (this.listProperties.subEntities.map((entity: any) => (entity.id)).indexOf(element.entityId) === -1) { + data.entitiesChildren.forEach((element: any) => { + if (this.listProperties.subEntities.map((entity: any) => (entity.id)).indexOf(element.entityId) === -1 && this.listProperties.entities == 0) { this.stateGroups[4].names.push( { id: 'subEntities', value: element.entityId, - label: (element.label !== null ? element.label : '_UNDEFINED') , + label: (element.id !== null ? element.label : this.lang.undefined) , count: element.count } ) } - }); this.isLoading = false; if (this.metaSearchInput.length > 0) { diff --git a/src/frontend/lang/lang-en.ts b/src/frontend/lang/lang-en.ts index 2f62351cd29aae7090efa5d1d80070e7633825c4..c5268850ee7e6fabb57716b52597fdf23d0c8e21 100755 --- a/src/frontend/lang/lang-en.ts +++ b/src/frontend/lang/lang-en.ts @@ -727,4 +727,5 @@ export const LANG_EN = { "mustReconnect" : "Please reconnect", "connectionFailed" : "Connection to server failed, please try later.", "searchMailInBasket" : "Search mails in basket", + "undefined" : "Undefined", }; diff --git a/src/frontend/lang/lang-fr.ts b/src/frontend/lang/lang-fr.ts index 15aa8dca04a411aa7baa1ce7934bdd7b5d1d9cf2..7683b2d6449b5c1a8771e21112bd9b19c0f13aac 100755 --- a/src/frontend/lang/lang-fr.ts +++ b/src/frontend/lang/lang-fr.ts @@ -755,4 +755,6 @@ export const LANG_FR = { "mustReconnect" : "Veuillez vous reconnecter", "connectionFailed" : "La connexion au serveur a échoué. Veuillez réessayer ultérieurement.", "searchMailInBasket" : "Rechercher des courriers dans la bannette", + "undefined" : "Non défini", + }; diff --git a/src/frontend/lang/lang-nl.ts b/src/frontend/lang/lang-nl.ts index ad18f409dc1b51d691eeccd5e2823990dc797860..0b227f85d104f2d36a6fdcfa8be1909ae824ff3f 100755 --- a/src/frontend/lang/lang-nl.ts +++ b/src/frontend/lang/lang-nl.ts @@ -756,4 +756,5 @@ export const LANG_NL = { "connectionFailed" : "_TO_TRANSLATE", "searchMailInBasket" : "_TO_TRANSLATE", "basketsAssignedShort" : "_TO_TRANSLATE", + "undefined" : "_TO_TRANSLATE", };