|
@@ -32,7 +32,7 @@ export class ViewRequestsForTenantDetailsComponent implements OnInit {
|
|
|
isBuilding = false;
|
|
|
status = ''
|
|
|
notvailed: boolean = true
|
|
|
-
|
|
|
+ covenants= []
|
|
|
constructor(
|
|
|
private dashBoardSer: DashboardService,
|
|
|
private toastr: ToastrService,
|
|
@@ -56,7 +56,7 @@ export class ViewRequestsForTenantDetailsComponent implements OnInit {
|
|
|
}
|
|
|
onSending = {
|
|
|
request_id:'',
|
|
|
- status:'confirmed',
|
|
|
+ status:'',
|
|
|
}
|
|
|
userData = {
|
|
|
name:'',
|
|
@@ -100,13 +100,13 @@ export class ViewRequestsForTenantDetailsComponent implements OnInit {
|
|
|
this.dashBoardSer.getItemData(this.detailsId, 'viewRequestsForAdminstrationDetails' ).subscribe(
|
|
|
res => {
|
|
|
console.log('ssss', res);
|
|
|
+ // this.editFunction()
|
|
|
|
|
|
this.employeeId = res['request'].employee_id;
|
|
|
this.files = res['request'].files;
|
|
|
this.formData.request_id = res['request'].id;
|
|
|
this.formData.refused_reason = res['request'].refused_reason;
|
|
|
this.formData.waiting_reason = res['request'].waiting_reason;
|
|
|
- this.formData.unit_id = res['request'].unit_id;
|
|
|
this.formData.status = res['request'].status
|
|
|
if(this.formData.status == 'accepted' || this.formData.status == 'ended' ){
|
|
|
this.unitInformation.housing_complex_id = res['request'].unit_information.housing_complex_id;
|
|
@@ -115,12 +115,13 @@ export class ViewRequestsForTenantDetailsComponent implements OnInit {
|
|
|
this.unitInformation.building_type_id = res['request'].unit_information.building_type_id;
|
|
|
this.getBuilding(this.unitInformation.building_type_id);
|
|
|
this.unitInformation.building_id = res['request'].unit_information.building_id;
|
|
|
- this.unitInformation.unit_id = res['request'].unit_information.unit_id;
|
|
|
+ this.unitInformation.unit_id = res['request'].unit_id;
|
|
|
this.unitInformation.bedrooms_number = res['request'].unit_information.bedrooms_number;
|
|
|
this.unitInformation.bathrooms_number = res['request'].unit_information.bathrooms_number;
|
|
|
this.unitInformation.covenants = res['request'].unit_information.covenants;
|
|
|
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();
|
|
|
}else if(this.formData.status == 'waiting'){
|
|
|
this.waiting()
|
|
@@ -266,14 +267,15 @@ getUnit(event){
|
|
|
}
|
|
|
|
|
|
|
|
|
-onSubmitted() {
|
|
|
+onSubmitted(status) {
|
|
|
this.onSending.request_id = this.formData.request_id;
|
|
|
this.notvailed = true;
|
|
|
+ this.onSending.status = status;
|
|
|
console.log(this.onSending);
|
|
|
this.http.post(this.authSer.pathApi + '/employee_handle_housing_request' , this.onSending).subscribe(
|
|
|
res => {
|
|
|
console.log(res);
|
|
|
- this.toastr.success('تم التأكيد');
|
|
|
+ this.toastr.success();
|
|
|
this.location.back()
|
|
|
|
|
|
},
|