|
@@ -217,8 +217,8 @@ export class ViewMyFemaleRequestsAddComponent implements OnInit {
|
|
|
console.log(this.unitInformation.housing_complex_id );
|
|
|
this.getBuildingType(this.unitInformation.housing_complex_id);
|
|
|
this.unitInformation.building_type_id = unitInfo.building_type_id;
|
|
|
- this.getBuilding(this.unitInformation.building_type_id);
|
|
|
this.unitInformation.building_id = unitInfo.building_id;
|
|
|
+ this.getBuilding(this.unitInformation.building_type_id);
|
|
|
this.unitInformation.unit_id = unitInfo.unit_id;
|
|
|
|
|
|
},
|
|
@@ -404,7 +404,23 @@ getUnit(event){
|
|
|
|
|
|
|
|
|
this.disable = true;
|
|
|
-
|
|
|
+ if(this.addNew){
|
|
|
+ for (let i = 0; i < this.files.length; i++) {
|
|
|
+ if(this.files[i].file_type){
|
|
|
+ this.files[i].file_type = this.files[i].file_type.toLowerCase();
|
|
|
+ }
|
|
|
+ if(!this.files[i].file){
|
|
|
+ this.files.splice(i , 1);
|
|
|
+ }
|
|
|
+ else if(!this.files[i].title){
|
|
|
+ this.toastr.warning('ادخل عنوان الملف رقم ' + (i+1) );
|
|
|
+ return 0;
|
|
|
+ } else {
|
|
|
+ delete this.files[i].nameFile;
|
|
|
+ this.formData.files.push(this.files[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if(this.isAdmin){
|
|
|
|
|
|
console.log(this.adminForm);
|