|
@@ -112,7 +112,8 @@ export class AddNewReportComponent implements OnInit {
|
|
|
this.currentDate = this.authService.writeHijri(new Date(this.currentDate), 'en', 'system');
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
const nowHigriDate = this.currentDate.split(' ');
|
|
@@ -127,13 +128,13 @@ export class AddNewReportComponent implements OnInit {
|
|
|
nowHigriDate[0] = i + 1;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.bindingDateSplitStart = {
|
|
|
year:parseInt(nowHigriDate[2]),
|
|
|
month: parseInt(nowHigriDate[0]),
|
|
|
day: parseInt(nowHigriDate[1]),
|
|
|
}
|
|
|
-
|
|
|
+ this.bindingDateSplitStart.day -= 1;
|
|
|
console.log('hhhhhhhhhhhhhhhhhhhh', this.bindingDateSplitStart);
|
|
|
|
|
|
|
|
@@ -275,19 +276,19 @@ export class AddNewReportComponent implements OnInit {
|
|
|
this.dataForm.user_id = this.reportAuthor.id
|
|
|
}
|
|
|
console.log(this.dataForm);
|
|
|
- this.http.post(this.authService.pathApi + '/add_communication' , this.dataForm )
|
|
|
- .subscribe(
|
|
|
- res => {
|
|
|
- console.log(res);
|
|
|
- this.checked = false;
|
|
|
- this.toastr.success('تم حفظ البلاغ ');
|
|
|
- this.router.navigate(['/service/' + this.userId + '/' + this.serviceId + '/followCommunicationList/58']);
|
|
|
- },
|
|
|
- err => {
|
|
|
- console.log(err)
|
|
|
- this.toastr.error('حدث خطأ في الاتصال ');
|
|
|
- }
|
|
|
- );
|
|
|
+ // this.http.post(this.authService.pathApi + '/add_communication' , this.dataForm )
|
|
|
+ // .subscribe(
|
|
|
+ // res => {
|
|
|
+ // console.log(res);
|
|
|
+ // this.checked = false;
|
|
|
+ // this.toastr.success('تم حفظ البلاغ ');
|
|
|
+ // this.router.navigate(['/service/' + this.userId + '/' + this.serviceId + '/followCommunicationList/58']);
|
|
|
+ // },
|
|
|
+ // err => {
|
|
|
+ // console.log(err)
|
|
|
+ // this.toastr.error('حدث خطأ في الاتصال ');
|
|
|
+ // }
|
|
|
+ // );
|
|
|
}else{
|
|
|
console.log('i cant send the request');
|
|
|
}
|