|
@@ -33,6 +33,7 @@ export class ViewRequestsForTenantDetailsComponent implements OnInit {
|
|
status = ''
|
|
status = ''
|
|
notvailed: boolean = true
|
|
notvailed: boolean = true
|
|
covenants= []
|
|
covenants= []
|
|
|
|
+ confirmedcheck: boolean;
|
|
constructor(
|
|
constructor(
|
|
private dashBoardSer: DashboardService,
|
|
private dashBoardSer: DashboardService,
|
|
private toastr: ToastrService,
|
|
private toastr: ToastrService,
|
|
@@ -108,7 +109,7 @@ export class ViewRequestsForTenantDetailsComponent implements OnInit {
|
|
this.formData.refused_reason = res['request'].refused_reason;
|
|
this.formData.refused_reason = res['request'].refused_reason;
|
|
this.formData.waiting_reason = res['request'].waiting_reason;
|
|
this.formData.waiting_reason = res['request'].waiting_reason;
|
|
this.formData.status = res['request'].status
|
|
this.formData.status = res['request'].status
|
|
- if(this.formData.status == 'accepted' || this.formData.status == 'ended' ){
|
|
|
|
|
|
+ if(this.formData.status == 'accepted' || this.formData.status == 'ended' || this.formData.status == 'confirmed'){
|
|
this.unitInformation.housing_complex_id = res['request'].unit_information.housing_complex_id;
|
|
this.unitInformation.housing_complex_id = res['request'].unit_information.housing_complex_id;
|
|
console.log(this.unitInformation.housing_complex_id );
|
|
console.log(this.unitInformation.housing_complex_id );
|
|
this.getBuildingType(this.unitInformation.housing_complex_id);
|
|
this.getBuildingType(this.unitInformation.housing_complex_id);
|
|
@@ -122,12 +123,16 @@ export class ViewRequestsForTenantDetailsComponent implements OnInit {
|
|
this.unitInformation.independent_kitchen = res['request'].unit_information.independent_kitchen;
|
|
this.unitInformation.independent_kitchen = res['request'].unit_information.independent_kitchen;
|
|
this.unitInformation.sittingrooms_number = res['request'].unit_information.sittingrooms_number;
|
|
this.unitInformation.sittingrooms_number = res['request'].unit_information.sittingrooms_number;
|
|
this.covenants = res['request'].unit_information.covenants;
|
|
this.covenants = res['request'].unit_information.covenants;
|
|
- this.accept();
|
|
|
|
|
|
+ if( this.formData.status == 'confirmed'){
|
|
|
|
+ this.confirmed()
|
|
|
|
+ }else{
|
|
|
|
+ this.accept()
|
|
|
|
+ }
|
|
}else if(this.formData.status == 'waiting'){
|
|
}else if(this.formData.status == 'waiting'){
|
|
this.waiting()
|
|
this.waiting()
|
|
}else if(this.formData.status == 'refused') {
|
|
}else if(this.formData.status == 'refused') {
|
|
this.refuse()
|
|
this.refuse()
|
|
- }
|
|
|
|
|
|
+ }else
|
|
this.http.get(this.authSer.pathApi + '/get_user/' + this.employeeId).subscribe(
|
|
this.http.get(this.authSer.pathApi + '/get_user/' + this.employeeId).subscribe(
|
|
res =>{
|
|
res =>{
|
|
console.log('=>',res);
|
|
console.log('=>',res);
|
|
@@ -155,7 +160,12 @@ export class ViewRequestsForTenantDetailsComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ confirmed(){
|
|
|
|
+ this.confirmedcheck = true;
|
|
|
|
+ this.refusedCheak = false;
|
|
|
|
+ this.waitingCheak = false;
|
|
|
|
+ }
|
|
|
|
+
|
|
accept(){
|
|
accept(){
|
|
this.formData.status = 'accepted'
|
|
this.formData.status = 'accepted'
|
|
this.acceptCheak = true;
|
|
this.acceptCheak = true;
|