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