import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { HttpClient } from './../common/HttpClient'; import { environment } from '../environments/environment'; import 'rxjs/Rx'; import { Subject } from 'rxjs/Subject'; @Injectable() export class MainPageService { // public mysubject: Subject = new Subject(); public deleteUniversalConnectorSubject: Subject = new Subject(); public deleteChannelSubject: Subject = new Subject(); public deleteCrossSectionSubject: Subject = new Subject(); public deleteInteractionEquationSubject: Subject = new Subject(); public deleteSystemSubject: Subject = new Subject(); public deletePiperingGroupSubject: Subject = new Subject(); public deletePiperingSubject: Subject = new Subject(); public deleteDesignBaseSubject: Subject = new Subject(); public deleteCorosionProtectionSubject: Subject = new Subject(); public deleteSubcomponentForVerificationSubject: Subject = new Subject(); public deleteReleaseSubject: Subject = new Subject(); public deleteVariantVerificationSubject: Subject = new Subject(); public deleteMaterialSubject: Subject = new Subject(); public deletePipeFunctionSubject: Subject = new Subject(); public deletePipeMaterialTypeSubject: Subject = new Subject(); public deletePipeGroupSubject: Subject = new Subject(); public deletePipeFasteningGroupSubject: Subject = new Subject(); public deletePipeMaterialSubject: Subject = new Subject(); public deletePipeMaterialConditionSubject: Subject = new Subject(); public deleteInsulationMaterialSubject: Subject = new Subject(); public deleteInsulationMaterialSizeSubject: Subject = new Subject(); public deletePipeSubject: Subject = new Subject(); public deletePipeSizeSubject: Subject = new Subject(); public sidemenuSubject: Subject = new Subject(); public deletePiperingBossSubject: Subject = new Subject(); public deletePiperingBossThreadedRodSubject: Subject = new Subject(); public deletePipeToPiperingSubject: Subject = new Subject(); public deleteWorkingPiperingSubject: Subject = new Subject(); public deletePiperingFamilySubject: Subject = new Subject(); constructor(private _http: HttpClient) { } public sentSTPFileForConnectors(stpFile, id): Observable { return this._http.post(`${environment.serviceUrl}stpConnectors`, { stpFile, id }) .map(res => res.json()); } public sentSTPFileForCrossSections(stpFile, id): Observable { return this._http.post(`${environment.serviceUrl}stpCrossSections`, { stpFile, id }) .map(res => res.json()); } public sentSTPFileForChannels(stpFile, id): Observable { return this._http.post(`${environment.serviceUrl}stpChannels`, { stpFile, id }) .map(res => res.json()); } public sentSTPFileForPipeRings(stpFile, id): Observable { return this._http.post(`${environment.serviceUrl}stpPipeRings`, { stpFile, id }) .map(res => res.json()); } public sendPicture(picture, id): Observable { return this._http.post(`${environment.serviceUrl}picture`, { picture, id }) .map(res => res.json()); } public getPicture(pictureId): Observable { return this._http.get(`${environment.serviceUrl}getPicture`, '?id=' + pictureId) .map(res => res.json()); } public deleteFile(fileId): Observable { return this._http.get(`${environment.serviceUrl}deleteFile`, '?id=' + fileId) .map(res => res.json()); } public checkTaskStatus(taskId): Observable { return this._http.get(`${environment.serviceUrl}taskProgress`, '?id=' + taskId) .map(res => res.json()); } public loadAllConnectors(): Observable { return this._http.get(`${environment.serviceUrl}loadAllConnectors`, '') .map(res => res.json()); } public loadSpecificConnectors(connectorType): Observable { return this._http.get(`${environment.serviceUrl}LoadSpecificConnectors`, '?connectorType=' + connectorType) .map(res => res.json()); } public updateUniversalConnectorInDb(universalConnector): Observable { return this._http.post(`${environment.serviceUrl}UpdateUniversalConnector`, { universalConnector }) .map(res => console.log(res)); } public addNewUniversalConnectorIntoDb(universalConnector): Observable { return this._http.post(`${environment.serviceUrl}AddNewUniversalConnector`, { universalConnector }) .map(res => res.json()); } public removeUniversalConnector(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveUniversalConnector`, '?id=' + id) .map(res => console.log(res)); } public loadAllCrossSections(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllCrossSections`, '') .map(res => res.json()); } public loadAllThreadedRods(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllThreadedRods`, '') .map(res => res.json()); } public updateCrossSectionInDb(crossSection): Observable { return this._http.post(`${environment.serviceUrl}UpdateCrossSection`, { crossSection }) .map(res => console.log(res)); } public addNewCrossSectionIntoDb(crossSection): Observable { return this._http.post(`${environment.serviceUrl}AddNewCrossSection`, { crossSection }) .map(res => res.json()); } public removeCrossSection(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveCrossSection`, '?id=' + id) .map(res => console.log(res)); } public loadAllChannels(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllChannels`, '') .map(res => res.json()); } public updateChannelInDb(channel): Observable { return this._http.post(`${environment.serviceUrl}UpdateChannel`, { channel }) .map(res => console.log(res)); } public addNewChannelIntoDb(channel): Observable { return this._http.post(`${environment.serviceUrl}AddNewChannel`, { channel }) .map(res => res.json()); } public removeChannel(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveChannel`, '?id=' + id) .map(res => console.log(res)); } public loadAllSystems(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllSystems`, '') .map(res => res.json()); } public updateSystemInDb(system): Observable { return this._http.post(`${environment.serviceUrl}UpdateSystem`, { system }) .map(res => console.log(res)); } public addNewSystemIntoDb(system): Observable { return this._http.post(`${environment.serviceUrl}AddNewSystem`, { system }) .map(res => res.json()); } public removeSystem(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveSystem`, '?id=' + id) .map(res => console.log(res)); } public loadAllCorosionProtections(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllCorosionProtections`, '') .map(res => res.json()); } public updateCorosionProtectionInDb(corosionProtection): Observable { return this._http.post(`${environment.serviceUrl}UpdateCorosionProtection`, { corosionProtection }) .map(res => console.log(res)); } public addNewCorosionProtectionIntoDb(corosionProtection): Observable { return this._http.post(`${environment.serviceUrl}AddNewCorosionProtection`, { corosionProtection }) .map(res => res.json()); } public removeCorosionProtection(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveCorosionProtection`, '?id=' + id) .map(res => console.log(res)); } public loadAllDesignBases(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllDesignBases`, '') .map(res => res.json()); } public updateDesignBaseInDb(designBase): Observable { return this._http.post(`${environment.serviceUrl}UpdateDesignBase`, { designBase }) .map(res => console.log(res)); } public addNewDesignBaseIntoDb(designBase): Observable { return this._http.post(`${environment.serviceUrl}AddNewDesignBase`, { designBase }) .map(res => res.json()); } public removeDesignBase(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveDesignBase`, '?id=' + id) .map(res => console.log(res)); } public loadAllSubcomponentsForVerification(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllSubcomponentsForVerification`, '') .map(res => res.json()); } public updateSubcomponentForVerificationInDb(subcomponentForVerification): Observable { return this._http.post(`${environment.serviceUrl}UpdateSubcomponentForVerification`, { subcomponentForVerification }) .map(res => console.log(res)); } public addNewSubcomponentForVerificationIntoDb(subcomponentForVerification): Observable { return this._http.post(`${environment.serviceUrl}AddNewSubcomponentForVerification`, { subcomponentForVerification }) .map(res => res.json()); } public removeSubcomponentForVerification(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveSubcomponentForVerification`, '?id=' + id) .map(res => console.log(res)); } public loadAllInteracionEquations(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllInteractionEquations`, '') .map(res => res.json()); } public updateInteractionEquationInDb(interactionEquation): Observable { return this._http.post(`${environment.serviceUrl}UpdateInteractionEquation`, { interactionEquation }) .map(res => console.log(res)); } public addNewInteracionEquationIntoDb(interactionEquation): Observable { return this._http.post(`${environment.serviceUrl}AddNewInteractionEquation`, { interactionEquation }) .map(res => res.json()); } public removeInteracionEquation(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveInteractionEquation`, '?id=' + id) .map(res => console.log(res)); } public loadAllReleases(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllReleases`, '') .map(res => res.json()); } public updateReleaseInDb(release): Observable { return this._http.post(`${environment.serviceUrl}UpdateRelease`, { release }) .map(res => console.log(res)); } public addNewReleaseIntoDb(release): Observable { return this._http.post(`${environment.serviceUrl}AddNewRelease`, { release }) .map(res => res.json()); } public removeRelease(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveRelease`, '?id=' + id) .map(res => console.log(res)); } public addNewConnectorVariantIntoDb(variant): Observable { return this._http.post(`${environment.serviceUrl}AddNewConnectorVariant`, { variant }) .map(res => res.json()); } public loadAllConnectorVariants(id): Observable { return this._http.get(`${environment.serviceUrl}LoadAllConnectorVariants`, '?id=' + id) .map(res => res.json()); } public removeVariant(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveVariant`, '?id=' + id) .map(res => res); } public updateVariantInDb(variant): Observable { return this._http.post(`${environment.serviceUrl}UpdateVariant`, { variant }) .map(res => res); } public addNewVariantVerificationIntoDb(variantVerification): Observable { return this._http.post(`${environment.serviceUrl}AddNewVariantVerification`, { variantVerification }) .map(res => res.json()); } public loadVariantVerifications(variantId, designBaseId): Observable { return this._http.get(`${environment.serviceUrl}LoadVariantVerifications`, '?variantId=' + variantId + '&designBaseId=' + designBaseId) .map(res => res.json()); } public removeVariantVerification(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveVariantVerification`, '?id=' + id) .map(res => res); } public updateVariantVerificationInDb(variantVerification): Observable { return this._http.post(`${environment.serviceUrl}UpdateVariantVerification`, { variantVerification }) .map(res => res); } public duplicateVariantData(oldVariantId, newVariantId): Observable { return this._http.get(`${environment.serviceUrl}DuplicateVariantData`, '?oldVariantId=' + oldVariantId + '&newVariantId=' + newVariantId) .map(res => res.json()); } public addNewMaterialIntoDb(material): Observable { return this._http.post(`${environment.serviceUrl}AddNewMaterial`, { material }) .map(res => res.json()); } public loadAllMaterials(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllMaterials`, '') .map(res => res.json()); } public removeMaterial(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveMaterial`, '?id=' + id) .map(res => res); } public updateMaterialInDb(material): Observable { return this._http.post(`${environment.serviceUrl}UpdateMaterial`, { material }) .map(res => res); } public addNewPiperingGroupIntoDb(piperingGroup): Observable { return this._http.post(`${environment.serviceUrl}AddNewPiperingGroup`, { piperingGroup }) .map(res => res.json()); } public loadAllPiperingGroups(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllPiperingGroups`, '') .map(res => res.json()); } public removePiperingGroup(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePiperingGroup`, '?id=' + id) .map(res => res); } public updatePiperingGroupInDb(piperingGroup): Observable { return this._http.post(`${environment.serviceUrl}UpdatePiperingGroup`, { piperingGroup }) .map(res => res); } public addNewPiperingIntoDb(pipering): Observable { return this._http.post(`${environment.serviceUrl}AddNewPipering`, { pipering }) .map(res => res.json()); } public loadAllPiperings(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllPiperings`, '') .map(res => res.json()); } public getSpecificPipering(id): Observable { return this._http.get(`${environment.serviceUrl}GetSpecificPipering`, '?id=' + id) .map(res => res.json()); } public removePipering(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePipering`, '?id=' + id) .map(res => res); } public updatePiperingInDb(pipering): Observable { return this._http.post(`${environment.serviceUrl}UpdatePipering`, { pipering }) .map(res => res); } public addNewPiperingVariantIntoDb(piperingVariant): Observable { return this._http.post(`${environment.serviceUrl}AddNewPiperingVariant`, { piperingVariant }) .map(res => res.json()); } public loadAllPiperingVariants(id): Observable { return this._http.get(`${environment.serviceUrl}LoadAllPiperingVariants`, '?id=' + id) .map(res => res.json()); } public removePiperingVariant(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePiperingVariant`, '?id=' + id) .map(res => res); } public updatePiperingVariantInDb(piperingVariant): Observable { return this._http.post(`${environment.serviceUrl}UpdatePiperingVariant`, { piperingVariant }) .map(res => res); } public postPiperingVariantConfiguration(variantConfig): Observable { return this._http.post(`${environment.serviceUrl}PostPiperingVariantConfigurationData`, {variantConfig}) .map(res => res); } public getPiperingVariantConfigurationData(id): Observable { return this._http.get(`${environment.serviceUrl}GetPiperingVariantConfigurationData`, '?id=' + id) .map(res => res.json()); } public addNewPipeFunctionIntoDb(pipeFunction): Observable { return this._http.post(`${environment.serviceUrl}AddNewPipeFunction`, { pipeFunction }) .map(res => res.json()); } public loadAllPipeFunctions(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllPipeFunctions`, '') .map(res => res.json()); } public removePipeFunction(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePipeFunction`, '?id=' + id) .map(res => res); } public updatePipeFunctionInDb(pipeFunction): Observable { return this._http.post(`${environment.serviceUrl}UpdatePipeFunction`, { pipeFunction }) .map(res => res); } public addNewPipeMaterialTypeIntoDb(pipeMaterialType): Observable { return this._http.post(`${environment.serviceUrl}AddNewPipeMaterialType`, { pipeMaterialType }) .map(res => res.json()); } public loadAllPipeMaterialTypes(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllPipeMaterialTypes`, '') .map(res => res.json()); } public removePipeMaterialType(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePipeMaterialType`, '?id=' + id) .map(res => res); } public updatePipeMaterialTypeInDb(pipeMaterialType): Observable { return this._http.post(`${environment.serviceUrl}UpdatePipeMaterialType`, { pipeMaterialType }) .map(res => res); } public addNewPipeGroupIntoDb(pipeGroup): Observable { return this._http.post(`${environment.serviceUrl}AddNewPipeGroup`, { pipeGroup }) .map(res => res.json()); } public loadAllPipeGroups(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllPipeGroups`, '') .map(res => res.json()); } public removePipeGroup(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePipeGroup`, '?id=' + id) .map(res => res); } public updatePipeGroupInDb(pipeGroup): Observable { return this._http.post(`${environment.serviceUrl}UpdatePipeGroup`, { pipeGroup }) .map(res => res); } public addNewPipeFasteningGroupIntoDb(pipeFasteningGroup): Observable { return this._http.post(`${environment.serviceUrl}AddNewPipeFasteningGroup`, { pipeFasteningGroup }) .map(res => res.json()); } public loadAllPipeFasteningGroups(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllPipeFasteningGroups`, '') .map(res => res.json()); } public removePipeFasteningGroup(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePipeFasteningGroup`, '?id=' + id) .map(res => res); } public updatePipeFasteningGroupInDb(pipeFasteningGroup): Observable { return this._http.post(`${environment.serviceUrl}UpdatePipeFasteningGroup`, { pipeFasteningGroup }) .map(res => res); } public addNewPipeMaterialIntoDb(pipeMaterial): Observable { return this._http.post(`${environment.serviceUrl}AddNewPipeMaterial`, { pipeMaterial }) .map(res => res.json()); } public loadAllPipeMaterials(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllPipeMaterials`, '') .map(res => res.json()); } public removePipeMaterial(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePipeMaterial`, '?id=' + id) .map(res => res); } public updatePipeMaterialInDb(pipeMaterial): Observable { return this._http.post(`${environment.serviceUrl}UpdatePipeMaterial`, { pipeMaterial }) .map(res => res); } public addNewPipeMaterialConditionIntoDb(pipeMaterialCondition): Observable { return this._http.post(`${environment.serviceUrl}AddNewPipeMaterialCondition`, { pipeMaterialCondition }) .map(res => res.json()); } public loadPipeMaterialConditions(pipeMaterialId): Observable { return this._http.get(`${environment.serviceUrl}LoadPipeMaterialConditions`, '?pipeMaterialId=' + pipeMaterialId) .map(res => res.json()); } public removePipeMaterialCondition(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePipeMaterialCondition`, '?id=' + id) .map(res => res); } public updatePipeMaterialConditionInDb(pipeMaterialCondition): Observable { return this._http.post(`${environment.serviceUrl}UpdatePipeMaterialCondition`, { pipeMaterialCondition }) .map(res => res); } public addNewInsulationMaterialIntoDb(insulationMaterial): Observable { return this._http.post(`${environment.serviceUrl}AddNewInsulationMaterial`, { insulationMaterial }) .map(res => res.json()); } public loadAllInsulationMaterials(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllInsulationMaterials`, '') .map(res => res.json()); } public removeInsulationMaterial(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveInsulationMaterial`, '?id=' + id) .map(res => res); } public updateInsulationMaterialInDb(insulationMaterial): Observable { return this._http.post(`${environment.serviceUrl}UpdateInsulationMaterial`, { insulationMaterial }) .map(res => res); } public addNewInsulationMaterialSizeIntoDb(insulationMaterialSize): Observable { return this._http.post(`${environment.serviceUrl}AddNewInsulationMaterialSize`, { insulationMaterialSize }) .map(res => res.json()); } public loadInsulationMaterialSizes(insulationMaterialId): Observable { return this._http.get(`${environment.serviceUrl}LoadInsulationMaterialSizes`, '?insulationMaterialId=' + insulationMaterialId) .map(res => res.json()); } public removeInsulationMaterialSize(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveInsulationMaterialSize`, '?id=' + id) .map(res => console.log(res)); } public updateInsulationMaterialSizeInDb(insulationMaterialSize): Observable { return this._http.post(`${environment.serviceUrl}UpdateInsulationMaterialSize`, { insulationMaterialSize }) .map(res => res); } public addNewPipeIntoDb(pipe): Observable { return this._http.post(`${environment.serviceUrl}AddNewPipe`, { pipe }) .map(res => res.json()); } public loadAllPipes(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllPipes`, '') .map(res => res.json()); } public removePipe(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePipe`, '?id=' + id) .map(res => console.log(res)); } public updatePipeInDb(pipe): Observable { return this._http.post(`${environment.serviceUrl}UpdatePipe`, { pipe }) .map(res => res); } public addNewPipeSizeIntoDb(pipeSize): Observable { return this._http.post(`${environment.serviceUrl}AddNewPipeSize`, { pipeSize }) .map(res => res.json()); } public loadPipeSizes(pipeId): Observable { return this._http.get(`${environment.serviceUrl}LoadPipeSizeByPipeId`, '?pipeId=' + pipeId) .map(res => res.json()); } public removePipeSize(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePipeSize`, '?id=' + id) .map(res => console.log(res)); } public updatePipeSizeInDb(pipeSize): Observable { return this._http.post(`${environment.serviceUrl}UpdatePipeSize`, { pipeSize }) .map(res => res); } public addNewPiperingBossIntoDb(piperingBoss): Observable { return this._http.post(`${environment.serviceUrl}AddNewPiperingBoss`, { piperingBoss }) .map(res => res.json()); } public loadAllPiperingBosses(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllPiperingBosses`, '') .map(res => res.json()); } public removePiperingBoss(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePiperingBoss`, '?id=' + id) .map(res => console.log(res)); } public updatePiperingBossInDb(piperingBoss): Observable { return this._http.post(`${environment.serviceUrl}UpdatePiperingBoss`, { piperingBoss }) .map(res => res); } public addNewPiperingBossThreadedRodIntoDb(piperingBossThreadedRod): Observable { return this._http.post(`${environment.serviceUrl}AddNewPiperingBossThreadedRod`, { piperingBossThreadedRod }) .map(res => res.json()); } public loadPiperingBossThreadedRods(id): Observable { return this._http.get(`${environment.serviceUrl}LoadPiperingBossThreadedRods`, '?id=' + id) .map(res => res.json()); } public removePiperingBossThreadedRod(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePiperingBossThreadedRod`, '?id=' + id) .map(res => console.log(res)); } public updatePiperingBossThreadedRodInDb(piperingBossThreadedRod): Observable { return this._http.post(`${environment.serviceUrl}UpdatePiperingBossThreadedRod`, { piperingBossThreadedRod }) .map(res => res); } public addNewPipeToPiperingIntoDb(pipeToPipering): Observable { return this._http.post(`${environment.serviceUrl}AddNewPipeToPipering`, { pipeToPipering }) .map(res => res.json()); } public loadAllPipeToPiperings(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllPipeToPiperings`, '') .map(res => res.json()); } public removePipeToPipering(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePipeToPipering`, '?id=' + id) .map(res => console.log(res)); } public updatePipeToPiperingInDb(pipeToPipering): Observable { return this._http.post(`${environment.serviceUrl}UpdatePipeToPipering`, { pipeToPipering }) .map(res => res); } public addNewWorkingPiperingIntoDb(workingPipering): Observable { return this._http.post(`${environment.serviceUrl}AddNewWorkingPipering`, { workingPipering }) .map(res => res.json()); } public loadWorkingPiperings(id): Observable { return this._http.get(`${environment.serviceUrl}LoadWorkingPiperings`, '?id=' + id) .map(res => res.json()); } public removeWorkingPipering(id): Observable { return this._http.get(`${environment.serviceUrl}RemoveWorkingPipering`, '?id=' + id) .map(res => console.log(res)); } public updateWorkingPiperingInDb(workingPipering): Observable { return this._http.post(`${environment.serviceUrl}UpdateWorkingPipering`, { workingPipering }) .map(res => res); } public addNewPiperingFamilyIntoDb(piperingFamily): Observable { return this._http.post(`${environment.serviceUrl}AddNewPiperingFamily`, { piperingFamily }) .map(res => res.json()); } public loadAllPiperingFamilies(): Observable { return this._http.get(`${environment.serviceUrl}LoadAllPiperingFamilies`, '') .map(res => res.json()); } public removePiperingFamily(id): Observable { return this._http.get(`${environment.serviceUrl}RemovePiperingFamily`, '?id=' + id) .map(res => console.log(res)); } public updatePiperingFamilyInDb(piperingFamily): Observable { return this._http.post(`${environment.serviceUrl}UpdatePiperingFamily`, { piperingFamily }) .map(res => res); } public getConnectorTypeArray(): any[] { return [ { code : 'CHANNEL_CONNECTOR_TYPE', value: 'Channel' }, { code : 'THREADED_ROD_CONNECTOR_TYPE', value: 'Threaded rod' } ]; } public getPipeRingGraphicalRepresentationsArray(): any[] { return [ { code : 'HINGE_SCREW', value: 'Hinge/Screw' }, { code : 'QUICK_CATCH_SCREW', value: 'Quick catch/Screw' }, { code : 'SCREW_SCREW', value: 'Screw/Screw' }, { code : 'INTEGRATED_SCREWS', value: 'Integrated screws' }, ]; } }