|
@@ -18,10 +18,13 @@ export class EditPlantComponent implements OnInit {
|
|
|
assetID:any;
|
|
assetID:any;
|
|
|
role_number: any;
|
|
role_number: any;
|
|
|
assetExists:boolean;
|
|
assetExists:boolean;
|
|
|
- distributor = ['CAESS', 'DEL SUR', 'AES-CLESA', 'EEO', 'DEUSEM'];
|
|
|
|
|
|
|
+ distributor = ["EEO","CAESS","DELSUR","CLESA","DEUSEM","ABRUZZO","EDESAL","B&D","DEL SUR"];
|
|
|
|
|
+ categoria_tarifaria = ["PD", "MD", "GD"];
|
|
|
|
|
+ codigo_tarifa = ["R","G","AP","MD CMP - BT","MD CMP - MT","MD CMH - BT","MD CMH - MT","GD CMH - BT", "GD CMH - MT"];
|
|
|
|
|
|
|
|
- constructor(private plantsService: PlantsService, private formBuilder: FormBuilder, private route: ActivatedRoute) {
|
|
|
|
|
|
|
|
|
|
|
|
+ constructor(private plantsService: PlantsService, private formBuilder: FormBuilder, private route: ActivatedRoute) {
|
|
|
|
|
+
|
|
|
this.route.params.subscribe(params => {
|
|
this.route.params.subscribe(params => {
|
|
|
this.assetID = params['id'];
|
|
this.assetID = params['id'];
|
|
|
});
|
|
});
|
|
@@ -29,7 +32,6 @@ export class EditPlantComponent implements OnInit {
|
|
|
this.plantsService.getAssetById(this.assetID).subscribe(res => {
|
|
this.plantsService.getAssetById(this.assetID).subscribe(res => {
|
|
|
this.listPlant = res["data"]["asset"];
|
|
this.listPlant = res["data"]["asset"];
|
|
|
this.organizationExists = true;
|
|
this.organizationExists = true;
|
|
|
-
|
|
|
|
|
this.assetForm = this.formBuilder.group({
|
|
this.assetForm = this.formBuilder.group({
|
|
|
name: [this.listPlant.name],
|
|
name: [this.listPlant.name],
|
|
|
country: [this.listPlant.country],
|
|
country: [this.listPlant.country],
|
|
@@ -66,6 +68,7 @@ export class EditPlantComponent implements OnInit {
|
|
|
distribuidora: this.f.distribuidora.value,
|
|
distribuidora: this.f.distribuidora.value,
|
|
|
categoria_tarifaria: this.f.categoria_tarifaria.value,
|
|
categoria_tarifaria: this.f.categoria_tarifaria.value,
|
|
|
cod_tarifa: this.f.cod_tarifa.value,
|
|
cod_tarifa: this.f.cod_tarifa.value,
|
|
|
|
|
+ meters_installed: this.listPlant.meters_installed
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
.subscribe(success => {
|
|
.subscribe(success => {
|