Hima 5 vuotta sitten
vanhempi
commit
6f8496c8c0

+ 50 - 56
src/app/External-Page/external-page-header/external-page-header.component.css

@@ -2,7 +2,7 @@ input,button {
     outline: none;
 }
 .dropdown-menu {
-    top: 50px !important;
+    top: -11px !important;
     right: -37px !important;
     border-radius: 2px !important;
     width: 245px;
@@ -11,23 +11,9 @@ input,button {
     border: 1px solid #cec8c8;
 }
 
-.dropdown-menu ul li {
-    text-align: right;
-    transition: all 0.5s;
-}
 
-.dropdown-menu ul li:hover {
-    background-color: #f5f5f5;
-}
 
 
-.pagesHeader-w .dropdown-menu {
-    right: 0 !important;
-    border-radius: 2px !important;
-    background: #fff;
-    box-shadow: 0px 3px 9px #00000030;
-    border: 1px solid #cec8c8;
-}
 
 .pagesHeader-w .dropdown-item {
     font-size: 14px !important;
@@ -38,14 +24,18 @@ input,button {
 }
 .dropdown-item{
 	border: 0px solid #00000008 !important;
+    width: 75px !important;
     padding: 4px 0px !important;
+    text-align: center !important;
     font-weight: bold !important;
-    /* clear: none !important;
-    float: right; */
+    clear: none !important;
+    float: right;
     margin: 3px 3px;
-    display: block;
 }
-
+/*.dropdown-item span{
+	color: #a08b70 !important;
+    font-size: 12px !important;
+}*/
 .dropdown-item i{
     color: #04756d !important;
     font-size: 18px !important;
@@ -379,30 +369,17 @@ input,button {
     text-decoration: none;
 }
 
-.ar,.en {
-    /* margin: 0 10px;
-    padding: 5px;
-    color: #03887f;
-    font-weight: bold;
-    width: 30px;
-    height: 30px;
-    border-radius: 5px;
-    background-color: #FAFAFA;
-    cursor: pointer;
-    transition: all 0.5s; */
+.pagesHeader-w .dropdown-menu {
+    top: 50px !important;
+    right: 0 !important;
+    border-radius: 2px !important;
+    background-color: #fff;
+    box-shadow: 0px 3px 9px #00000030;
+    border: 1px solid #cec8c8;
+}
 
-    /* margin: 2px 10px;
-    padding: 5px;
-    padding: 2px 5px;
-    color: #03887f;
-    font-weight: bold;
-    width: 30px;
-    border: 1px solid #bda380;
-    height: 30px;
-    background-color: #FAFAFA;
-    cursor: pointer;
-    transition: all 0.5s;
-    display: inline-block;  */
+.ar,.en {
+    
 
     margin: 4px 10px;
     padding: 5px;
@@ -549,20 +526,12 @@ input,button {
     transition: all 0.5s;
   }
 
-  /* .menuHeaderEn-w li:hover {
-    background-color: #02635c;
-    color: #fff !important;
-  } */
+
 
   .menuHeaderEn-w li:hover a {
       color: #00a99d !important;
   }
 
-  /* .menuHeader-w li:hover {
-    background-color: #02635c;
-    color: #fff !important;
-  } */
-
   .menuHeader-w li:hover a {
       color: #00a99d !important;
   }
@@ -687,7 +656,6 @@ input,button {
         left: 0;
         z-index: 99999999999999999;
         background-color: #aee5e1;
-        display: inline-block;
     }
 
     .menuHeader-w li {
@@ -747,9 +715,29 @@ a.dropdown-item.ng-star-inserted {
     width: 100% !important;
 }
 
-.pagesHeader-w[_ngcontent-c5] .dropdown-menu[_ngcontent-c5] {
-    top: 30px !important;
-  
+.pagesHeader-w .dropdown-menu {
+    top: 50px !important;
+    background: #fff !important;
+}
+
+.pagesHeader-w .dropdown-menu ul li {
+    display: block !important; 
+    direction: rtl;
+}
+
+.pagesHeader-w .dropdown-menu ul li .dropDownItem-w {
+    display: block !important; 
+    float: inherit;
+    clear: inherit;
+    padding: 5px !important;
+    width: 100% !important;
+    text-align: right !important;
+    transition: all 0.5s;
+    text-decoration: none !important;
+}
+
+.pagesHeader-w .dropdown-menu ul li .dropDownItem-w:hover{
+    background: #f5f5f5 !important;
 }
 
 @media(min-width: 992px) and (max-width: 1199px) {
@@ -782,4 +770,10 @@ a.dropdown-item.ng-star-inserted {
 
   .btn:focus {
       box-shadow: none;
-  }
+  }
+
+  .exernal-menu {
+      top: 50px !important;
+  }
+
+ 

+ 2 - 4
src/app/External-Page/external-page-header/external-page-header.component.html

@@ -89,7 +89,6 @@
             <div class="row">
                 <div class="navbar" style="padding:0">
                     <nav class="navbar navbar-expand-lg navbar-light bg-light">
-                        
                         <button class="navbar-toggler buttonMobileHeader-w" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                             <span class="navbar-toggler-icon"></span>
                         </button>
@@ -106,17 +105,16 @@
                                     <a class="nav-link" [ngClass]="{ 'dropdown-toggle' : menu['childs'].length > 0 }" href="{{menu.link}}" id="navbarDropdown" role="button" [attr.data-toggle]=" menu['childs'].length > 0 ? 'dropdown' : '' " aria-haspopup="true" aria-expanded="false">
                                         {{menu.name}} <img src="{{authSer.pathImg + menu.photo}}" />
                                     </a>
-                                    <div class="dropdown-menu" aria-labelledby="navbarDropdown" *ngIf="menu['childs'].length > 0">
+                                    <div class="dropdown-menu exernal-menu" aria-labelledby="navbarDropdown" *ngIf="menu['childs'].length > 0">
                                         <ul class="list-unstyled">
                                             <li *ngFor="let child of menu['childs']">
-                                                <a class="dropdown-item" href="{{child.link}}">{{child.name}}</a>
+                                                <a class="dropDownItem-w" href="{{child.link}}">{{child.name}}</a>
                                             </li>
                                         </ul>
                                     </div>
                                 </li>
                             </ul>
                         </div>
-
                     </nav>
                 </div>
             </div>

+ 0 - 2
src/app/External-Page/external-page-header/external-page-header.component.ts

@@ -26,8 +26,6 @@ export class ExternalPageHeaderComponent implements OnInit {
 
   ngOnInit() {
 
-    
-    
     this.authSer.arabicTemplate = true;
     this.authSer.showDashboardHeader = false;
     this.authSer.setLocalLang(); //set languages icons

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

@@ -55,7 +55,7 @@
                   <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}"/>
+                      <input type="phone" class="form-control" id="phone" [ngModel]="reportAuthor.phone" [disabled]="true" [ngModelOptions]="{standalone: true}"/>
                     </div>
                   </div>
                 </div>
@@ -83,7 +83,7 @@
                     <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"  required/>
+                        <input type="number" placeholNeedder=" " class="form-control" name="phoneNum" [ngModel]="dataForm.phoneNum" [disabled]="true"/>
                       </div>  
                   </div>
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4">
@@ -207,8 +207,7 @@
                       <thead class="headBackground-w">
                         <tr>
                           <th> إسم المرفق</th>
-                          <th>رفع الملف ( بصيغه pdf )</th>
-                          <!-- <th>عرض الملف</th> -->
+                          <th>رفع الملف</th>
                           <th>حذف</th>
                         </tr>
                       </thead>
@@ -221,7 +220,6 @@
                             <span class="fileName-w" *ngIf="file.nameFile" style="color:green"> <i class='fas fa-check'style=" float: left; padding-top: 4px; "></i>
                             </span>
                           </td>
-                          <!-- <td><a href="{{authSer.pathImg + file.nameFile}}" target="_blank"><i class="fas fa-download"></i></a></td> -->
                           <td><button type="button" class="btn btn-danger form-control deleteRow-w" (click)="onDeleteRow(i)">حذف</button></td>
                         </tr>
                       </tbody>

+ 28 - 19
src/app/dashboard/create-report/add-new-report/add-new-report.component.ts

@@ -174,12 +174,7 @@ export class AddNewReportComponent implements OnInit {
 
   }
 
-  //  //get value date from child component
-  //  public getDate(date: any):void {
-  //   console.log( date);
-  //   this.higriDateVal = date.year + '-' + date.month + '-' + date.day;
-  //   console.log('higrii date', this.higriDateVal);
-  // }
+  
   
   onChangemainLocation(event){
    const id = event.target.value
@@ -255,9 +250,15 @@ export class AddNewReportComponent implements OnInit {
     
     this.checkSaveClick = true;
 
+    let checkFilesExtensions: boolean = false;//check extension file
+
     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_type == 'word'){
+          checkFilesExtensions = true;
+        }
       }
       if(this.files[i].file != null && this.files[i].title == null){
        this.toastr.warning('ادخل عنوان الملف رقم ' + (i+1) );
@@ -271,6 +272,7 @@ export class AddNewReportComponent implements OnInit {
         this.dataForm.files.push(this.files[i]);
       }
     }
+
     if(!this.checked){
       delete this.dataForm.id_number;
       delete this.dataForm.name;
@@ -283,21 +285,28 @@ 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.checkSaveClick = false;
-           this.toastr.success('تم حفظ البلاغ ');
-           this.router.navigate(['/service/' + this.userId + '/' +  this.serviceId + '/followCommunicationList/58']);
+
+
+    if(checkFilesExtensions) {
+      this.toastr.warning("لا يجب أن تكون صيغه الملفات 'word'");
+    } else {
+      this.http.post(this.authService.pathApi + '/add_communication' , this.dataForm )
+        .subscribe(
+          res => {
+            console.log(res);
+            this.checked = false;
+            this.checkSaveClick = false;
+            this.toastr.success('تم حفظ البلاغ ');
+            this.router.navigate(['/service/' + this.userId + '/' +  this.serviceId + '/followCommunicationList/56']);
           },
-          err => {
-           console.log(err);
-           this.checkSaveClick = false;
-           this.toastr.error('حدث خطأ في الاتصال ');
+            err => {
+            console.log(err);
+            this.checkSaveClick = false;
+            this.toastr.error('حدث خطأ في الاتصال ');
           }
-       );
+        );
+    }
+  
     }else{
       console.log('i cant send the request');
     }

+ 1 - 0
src/app/dashboard/maintenance-communications/maintenance-communications-list/maintenance-communications-list.component.html

@@ -82,6 +82,7 @@
               </button>
               <div class="dropdown-menu" aria-labelledby="dropdownMenuButton" style="text-align:right;"> 
                 <a class="dropdown-item" *ngFor="let admin of dataList[i]['adminstrations']"> {{ admin.name ? admin.name : 'لا يوجد'}} </a>
+                <span *ngIf="dataList[i]['adminstrations'].length == 0" class="check-data-span">لاتوجد بيانات</span>
               </div>
             </div>
           </td>

+ 4 - 3
src/app/dashboard/users/form-user/form-user.component.html

@@ -15,7 +15,7 @@
         <form [formGroup]="signupForm" (ngSubmit)="onSubmittedForm()">
           <div class="row">
             
-            <div class="col-12 col-sm-12 col-md-6 col-lg-4">
+            <!-- <div class="col-12 col-sm-12 col-md-6 col-lg-4">
               <div class="form-group">
                 <label style="float: right; margin-right:5px;margin-top:10px">الحاله <span class="spanReqired-w">*</span></label>
                 <div class="custom-control custom-radio inlineBlock-w" style="padding: 2px 31px;background: #bd90592e;color: #a98559;border: 1px solid #b38553c2;">
@@ -29,7 +29,7 @@
                 </div>
 
               </div>
-            </div>
+            </div> -->
 
             <div class="col-12 col-sm-12 col-md-12 col-lg-12" style="margin-bottom:30px">
               <div class="form-group text-center imgContainer">
@@ -203,7 +203,8 @@
             <div class="col-12 col-sm-12 col-md-6 col-lg-4" *ngIf="signupForm.controls.type.value == '0' ">
               <div class="form-group">
                 <label style="float:right">الاداره <span class="spanReqired-w">*</span></label>
-                <select class="form-control" formControlName="adminstration_id" (change)="getDepartment()">
+                <select class="form-control" (change)="getDepartment()" formControlName="adminstration_id" [ngModel]="adminstrationsVal">
+                  <option>أختر إداره</option>
                   <option *ngFor="let admin of adminstration; let i = index" [value]="admin.id">{{admin.name}}</option>
                 </select>
               </div>

+ 16 - 0
src/styles.css

@@ -1108,6 +1108,22 @@ height: 7px !important;
 }
 
 
+.exernal-menu {
+  top: 50px !important;
+  right: 0 !important;
+  border-radius: 2px !important;
+  background-color: #fff !important;
+  box-shadow: 0px 3px 9px #00000030;
+  border: 1px solid #cec8c8;
+}
+
+.check-data-span {
+  text-align: center;
+  font-size: 14px;
+  color: #ccc;
+  display: block;
+}
+
 /* ------black-----*/
 @media screen and (min-width: 1200px) {
 	body{border-top: 1px solid black;}