|
|
@@ -56,7 +56,20 @@ export class EquipmentManagementComponent implements OnInit {
|
|
|
graphicArborescence: any[];
|
|
|
priorities: PriorityInterface[];
|
|
|
|
|
|
- familiesSubfamiliesEnabled: boolean;
|
|
|
+ equipmentsMenuEnabled: boolean;
|
|
|
+ equipmentDetailsEnabled: boolean;
|
|
|
+ equipmentImagesGalleryEnabled: boolean;
|
|
|
+ relatedDocumentsTableEnabled: boolean;
|
|
|
+ equivalentEquipmentsTableEnabled: boolean;
|
|
|
+ lastMeasuresTableEnabled: boolean;
|
|
|
+ movementsHistoryEnabled: boolean;
|
|
|
+ equipmentRecordsTableEnabled: boolean;
|
|
|
+ moveEquipmentEnabled: boolean;
|
|
|
+ copyEquipmentEnabled: boolean;
|
|
|
+ addEquipmentEnabled: boolean;
|
|
|
+ equipmentTypeManagementEnabled: boolean;
|
|
|
+ equipmentLocationEnabled: boolean;
|
|
|
+ viewArborescenceInData: boolean;
|
|
|
|
|
|
constructor(
|
|
|
@Inject(DOCUMENT) private _document: Document,
|
|
|
@@ -101,7 +114,20 @@ export class EquipmentManagementComponent implements OnInit {
|
|
|
|
|
|
this.priorities = [];
|
|
|
|
|
|
- this.familiesSubfamiliesEnabled = true;
|
|
|
+ this.equipmentsMenuEnabled = true;
|
|
|
+ this.equipmentDetailsEnabled = true;
|
|
|
+ this.equipmentImagesGalleryEnabled = true;
|
|
|
+ this.relatedDocumentsTableEnabled = true;
|
|
|
+ this.equivalentEquipmentsTableEnabled = true;
|
|
|
+ this.lastMeasuresTableEnabled = true;
|
|
|
+ this.movementsHistoryEnabled = true;
|
|
|
+ this.equipmentRecordsTableEnabled = true;
|
|
|
+ this.moveEquipmentEnabled = true;
|
|
|
+ this.copyEquipmentEnabled = true;
|
|
|
+ this.addEquipmentEnabled = true;
|
|
|
+ this.equipmentTypeManagementEnabled = true;
|
|
|
+ this.equipmentLocationEnabled = true;
|
|
|
+ this.viewArborescenceInData = true;
|
|
|
}
|
|
|
|
|
|
ngOnInit(): void {
|
|
|
@@ -138,10 +164,7 @@ export class EquipmentManagementComponent implements OnInit {
|
|
|
let permArr = await this._functionsService.processPermissions(profInfo.response.PERMISOS.permissions);
|
|
|
let modPerm = permArr.filter(item => item.id == 'S002V01M07GEEQ');
|
|
|
if(modPerm.length > 0){
|
|
|
- let familiesSubfamiliesEnabled = modPerm[0].children.filter(item => item.id == 'S002V01F02DFSU');
|
|
|
- if(familiesSubfamiliesEnabled.length > 0){
|
|
|
- this.familiesSubfamiliesEnabled = familiesSubfamiliesEnabled[0].access > 0;
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -171,11 +194,28 @@ export class EquipmentManagementComponent implements OnInit {
|
|
|
if(permissionsArr.permissions != undefined){
|
|
|
let modPerm = permissionsArr.permissions.filter(item => item.id == 'S002V01M07GEEQ');
|
|
|
if(modPerm.length > 0){
|
|
|
- let familiesSubfamiliesEnabled = modPerm[0].children.filter(item => item.id == 'S002V01F02DFSU');
|
|
|
- if(familiesSubfamiliesEnabled.length > 0){
|
|
|
- this.familiesSubfamiliesEnabled = familiesSubfamiliesEnabled[0].access > 0;
|
|
|
+ let funPerm = modPerm[0].children.filter(item => item.id == 'S002V01F01ADEQ');
|
|
|
+ if(funPerm.length > 0){
|
|
|
+ let equipmentsMenuEnabled = funPerm[0].children.filter(item => item.id == 'S002V01P01MEEQ');
|
|
|
+ if(equipmentsMenuEnabled.length > 0){
|
|
|
+ this.equipmentsMenuEnabled = equipmentsMenuEnabled[0].access > 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ let equipmentDetailsEnabled = funPerm[0].children.filter(item => item.id == 'S002V01P02DEEQ');
|
|
|
+ if(equipmentDetailsEnabled.length > 0){
|
|
|
+ this.equipmentDetailsEnabled = equipmentDetailsEnabled[0].access > 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ let equipmentImagesGalleryEnabled = funPerm[0].children.filter(item => item.id == 'S002V01P03GIEQ');
|
|
|
+ if(equipmentImagesGalleryEnabled.length > 0){
|
|
|
+ this.equipmentImagesGalleryEnabled = equipmentImagesGalleryEnabled[0].access > 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ let relatedDocumentsTableEnabled = funPerm[0].children.filter(item => item.id == 'S002V01P04TDRE');
|
|
|
+ if(relatedDocumentsTableEnabled.length > 0){
|
|
|
+ console.log(relatedDocumentsTableEnabled[0]);
|
|
|
+ }
|
|
|
}
|
|
|
- //console.log(familiesSubfamiliesEnabled);
|
|
|
}
|
|
|
}
|
|
|
|