소스 검색

add-new-report

amr 5 년 전
부모
커밋
39046635af

+ 1 - 1
src/app/app-routing.module.ts

@@ -12,7 +12,7 @@ import { TrainningServicesComponent } from './trainning-service/trainning-servic
 
 
 const routes: Routes = [
-  {path: '', redirectTo: '/InternalPage', pathMatch: 'full'},
+  {path: '', redirectTo: '/ExternalPage', pathMatch: 'full'},
   {path: 'auth', loadChildren:'./auth-services/auth-services.module#AuthServicesModule'},
   {path: 'InternalPage' , loadChildren: './Internal-Page/internal-page.module#InternalPageModule', canLoad: [AuthGuard]},
   {path: 'ExternalPage', loadChildren: './External-Page/external-page.module#ExternalPageModule', canLoad: [AuthGuard]},

+ 5 - 5
src/app/dashboard/create-report/add-new-report/add-new-report.component.html

@@ -54,8 +54,8 @@
                   </div>
                   <div class="col-12 col-md-4">
                     <div class="form-group">
-                      <label for="phone" style="float:right">الهاتف<span class="spanReqired-w">*</span></label>
-                      <input type="phone" class="form-control" id="phone" [ngModel]="reportAuthor.phone" [ngModelOptions]="{standalone: true}" [disabled]="true"/>
+                      <label for="phone" style="float:right">رقم الجوال<span class="spanReqired-w">*</span></label>
+                      <input type="phone" class="form-control" id="phone" [ngModel]="reportAuthor.phone" [ngModelOptions]="{standalone: true}"/>
                     </div>
                   </div>
                 </div>
@@ -82,8 +82,8 @@
                     </div>
                     <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                       <div class="form-group">
-                        <label for="phoneNum"  style="float: right;margin-right: 5px"> الهاتف </label>
-                        <input type="number" placeholNeedder=" الهاتف" class="form-control" name="phoneNum" [ngModel]="dataForm.phoneNum" [disabled]="true" required/>
+                        <label for="phoneNum"  style="float: right;margin-right: 5px"> رقم الجوال </label>
+                        <input type="number" placeholNeedder=" " class="form-control" name="phoneNum" [ngModel]="dataForm.phoneNum"  required/>
                       </div>  
                   </div>
                     <div class="col-12 col-sm-12 col-md-4 col-lg-4">
@@ -195,7 +195,7 @@
                       <thead class="headBackground-w">
                         <tr>
                           <th> إسم المرفق</th>
-                          <th>رفع املف ( بصيغه pdf )</th>
+                          <th>رفع الملف ( بصيغه pdf )</th>
                           <!-- <th>عرض الملف</th> -->
                           <th>حذف</th>
                         </tr>

+ 17 - 16
src/app/dashboard/create-report/add-new-report/add-new-report.component.ts

@@ -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');
     }