|
@@ -250,8 +250,9 @@ export class ViewRequestsForAdminstrationDetailsComponent implements OnInit {
|
|
|
if(this.buildings.length > 0){
|
|
|
this.isBuildingType = true;
|
|
|
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);
|
|
|
}
|
|
|
}else{
|
|
@@ -269,6 +270,11 @@ export class ViewRequestsForAdminstrationDetailsComponent implements OnInit {
|
|
|
}
|
|
|
|
|
|
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(
|
|
|
res => {
|
|
|
console.log(res);
|
|
@@ -310,7 +316,7 @@ onSubmitted(){
|
|
|
err => {
|
|
|
console.log(err);
|
|
|
this.toastr.error('هناك خطأ يرجى المحاولة لاحقا')
|
|
|
- this.confirmed = false
|
|
|
+ // this.confirmed = false
|
|
|
|
|
|
}
|
|
|
|