|
@@ -250,8 +250,9 @@ export class ViewRequestsForAdminstrationDetailsComponent implements OnInit {
|
|
if(this.buildings.length > 0){
|
|
if(this.buildings.length > 0){
|
|
this.isBuildingType = true;
|
|
this.isBuildingType = true;
|
|
console.log(this.buildings);
|
|
console.log(this.buildings);
|
|
- if(this.formData.status == 'accepted' || this.formData.status == 'ended' || this.formData.status == 'confirmed'){
|
|
|
|
-
|
|
|
|
|
|
+ if(this.formData.status != 'new' && this.formData.status != 'waiting' && this.formData.status != 'refused'){
|
|
|
|
+ console.log('a7a');
|
|
|
|
+
|
|
this.getUnit(this.unitInformation.building_id , 1);
|
|
this.getUnit(this.unitInformation.building_id , 1);
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
@@ -269,6 +270,11 @@ export class ViewRequestsForAdminstrationDetailsComponent implements OnInit {
|
|
}
|
|
}
|
|
|
|
|
|
getUnit(event , s){
|
|
getUnit(event , s){
|
|
|
|
+
|
|
|
|
+ console.log('event' , event);
|
|
|
|
+
|
|
|
|
+ console.log(this.authSer.pathApi + '/units_list_by_building_id/' + event + '/' + s);
|
|
|
|
+
|
|
this.http.get(this.authSer.pathApi + '/units_list_by_building_id/' + event + '/' + s).subscribe(
|
|
this.http.get(this.authSer.pathApi + '/units_list_by_building_id/' + event + '/' + s).subscribe(
|
|
res => {
|
|
res => {
|
|
console.log(res);
|
|
console.log(res);
|
|
@@ -310,7 +316,7 @@ onSubmitted(){
|
|
err => {
|
|
err => {
|
|
console.log(err);
|
|
console.log(err);
|
|
this.toastr.error('هناك خطأ يرجى المحاولة لاحقا')
|
|
this.toastr.error('هناك خطأ يرجى المحاولة لاحقا')
|
|
- this.confirmed = false
|
|
|
|
|
|
+ // this.confirmed = false
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|