regester.component.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <div class="row">
  2. <div class="col-12">
  3. <div class="path">
  4. <div class="container">
  5. <ul class="list-unstyled titileLi-w">
  6. <li class="headingText-w" (click)="authSer.perviousLocation()" style="cursor: pointer"> العوده > </li>
  7. <li class="headingText-w activeLi-w" (click)="authSer.perviousLocation()"> {{typeTitle}} </li>
  8. </ul>
  9. </div>
  10. </div>
  11. </div>
  12. </div>
  13. <div class="userForm-w" [style.min-height.px]="myInnerHeight">
  14. <div class="container">
  15. <form [formGroup]="regesterForm" (ngSubmit)="onSubmittedForm()" class="formStyle">
  16. <div class="row">
  17. <div class="col-12 col-sm-12 col-md-12 col-lg-12" style="margin-bottom:30px">
  18. <div class="form-group text-center imgContainer">
  19. <img [src]="urlImg" class="imgProfile" height="200">
  20. <input type="file" name="file" id="file" class="inputfile" alife-file-to-base64 (onFileChanged)="onFileChanges($event)" (change)="getUrl($event)" [(fileModel)]="files" />
  21. <label for="file" class="iconUpload-w"><i class="fas fa-upload"></i></label>
  22. </div>
  23. </div>
  24. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  25. <div class="form-group">
  26. <label for="name" style="float:right">الأسم <span class="spanReqired-w">*</span></label>
  27. <input type="text" id="name" placeholder="أدخل الأسم رباعي" class="form-control" formControlName="name" />
  28. </div>
  29. </div>
  30. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  31. <div class="form-group">
  32. <label style="float:right">الجنسيه <span class="spanReqired-w">*</span></label>
  33. <select class="form-control" formControlName="nationality_id">
  34. <option *ngFor="let country of countries; let i = index" [value]="country.id">{{country.name}}</option>
  35. </select>
  36. </div>
  37. </div>
  38. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  39. <div class="form-group">
  40. <label for="identity" style="float:right"> الهويه <span class="spanReqired-w">*</span></label>
  41. <select class="form-control select" id="identity" formControlName="identity_type_id" (change)="getSelectedOptionText($event)">
  42. <option *ngFor="let identity of identities" [value]="identity.id">{{identity.name}}</option>
  43. </select>
  44. </div>
  45. </div>
  46. <div class="col-12 col-sm-12 col-md-6 col-lg-4" *ngIf="identity_id != 4">
  47. <div class="form-group">
  48. <label for="identityNumber" style="float:right">رقم الهويه <span class="spanReqired-w">*</span></label>
  49. <input type="phone" class="form-control" placeholder="رقم الهويه" id="identityNumber" formControlName="identity_number" appOnlyNumber (input)="onIdentitiyChange($event.target.value)" />
  50. <span class="errorMessage-w" *ngIf="identity_id == 1">أدخل رقم هويه مكون من 10 أرقام يبدأ برقم 1</span>
  51. <span class="errorMessage-w" *ngIf="identity_id == 2">أدخل رقم هويه مكون من 10 أرقام </span>
  52. <span class="errorMessage-w" *ngIf="identity_id == 3">أدخل رقم الإقامه مكون من 10 أرقام يبدأ برقم 2 </span>
  53. </div>
  54. </div>
  55. <div class="col-12 col-sm-12 col-md-6 col-lg-4" *ngIf="identity_id == 4">
  56. <div class="form-group">
  57. <label for="identityNumber" style="float:right">رقم الهويه <span class="spanReqired-w">*</span></label>
  58. <input type="phone" class="form-control" placeholder="رقم الهويه" id="identityNumber" formControlName="identity_number" />
  59. <span class="errorMessage-w"> أدخل رقم جواز السفر </span>
  60. </div>
  61. </div>
  62. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  63. <div class="form-group">
  64. <label for="email" style="float:right">البريد الإلكتروني <span class="spanReqired-w">*</span></label>
  65. <input type="email" id="email" placeholder="البريد الإلكتروني" class="form-control" appEnglishCharacters formControlName="email" />
  66. <span class="help-block" *ngIf="!regesterForm.get('email').valid && regesterForm.get('email').touched" style="color:red">من فضلك أدخل بريد إلكتروني صحيح</span>
  67. </div>
  68. </div>
  69. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  70. <div class="form-group">
  71. <label for="phone" style="float:right">رقم الجوال <span class="spanReqired-w">*</span></label>
  72. <input type="text" id="phone" appNumberDerictive class="form-control" placeholder="رقم الجوال يبدأ ب 05 ومكون من 10 أرقام" formControlName="phone" />
  73. </div>
  74. </div>
  75. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  76. <div class="form-group">
  77. <label for="password" style="float:right">كلمه المرور <span *ngIf="checkShowSpanRequired" class="spanReqired-w">*</span></label>
  78. <input type="password" id="password" class="form-control" placeholder="كلمه المرور" formControlName="password" />
  79. <span class="help-block" *ngIf="password.errors?.minlength && regesterForm.get('password').touched" style="color:red;font-size:12px"> من فضلك , أدخل كلمه مرور لاتقل عن 6 ارقام</span>
  80. </div>
  81. </div>
  82. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  83. <div class="form-group">
  84. <label for="password_confirmation" style="float:right" >تأكيد كلمه المرور <span *ngIf="checkShowSpanRequired" class="spanReqired-w">*</span></label>
  85. <input type="password" id="password_confirmation" placeholder="تأكيد كلمه المرور" class="form-control" formControlName="password_confirmation" minlength="6"/>
  86. <span class="help-block" *ngIf="repeatPassword.errors?.minlength && regesterForm.get('password_confirmation').touched" style="color:red;font-size:12px">من فضلك , أدخل كلمه مرور لاتقل عن 6 ارقام</span>
  87. </div>
  88. </div>
  89. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  90. <div class="form-group">
  91. <label for="functional_number" style="float:right"> الرقم الوظيفي <span class="spanReqired-w">*</span></label>
  92. <input type="number" class="form-control" min="0" id="functional_number" placeholder="الرقم الوظيفي" formControlName="functional_number" />
  93. </div>
  94. </div>
  95. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  96. <div class="form-group">
  97. <label for="birthday" style="float:right">تاريخ الميلاد <span class="spanReqired-w">*</span></label>
  98. <input type="date" max="{{min}}" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" formControlName="birthday" />
  99. </div>
  100. </div>
  101. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  102. <div class="form-group">
  103. <label for="date_employment" style="float:right">تاريخ التوظيف الميلادي <span class="spanReqired-w">*</span></label>
  104. <input type="date" class="form-control" id="date_employment" formControlName="date_of_employment_gre" />
  105. </div>
  106. </div>
  107. <div class="col-12 col-sm-12 col-md-4 col-lg-4">
  108. <div class="form-group">
  109. <label for="date_employment_hij" style="float:right">تاريخ التوظيف الهجري <span class="spanReqired-w">*</span></label>
  110. <div *ngIf='bindingDateSplit && typeMode'>
  111. <app-higri-date (onDatePicked)="getDate($event)" [myDate]="bindingDateSplit"></app-higri-date>
  112. </div>
  113. <div *ngIf='!typeMode'>
  114. <app-higri-date (onDatePicked)="getDate($event)" ></app-higri-date>
  115. </div>
  116. </div>
  117. </div>
  118. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  119. <div class="form-group">
  120. <label style="float:right">اسم الوظيفه</label>
  121. <select class="form-control" formControlName="job_title_id">
  122. <option *ngFor="let job of jobTitils; let i = index" [value]="job.id">{{job.name}}</option>
  123. </select>
  124. </div>
  125. </div>
  126. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  127. <div class="form-group">
  128. <label style="float:right">التخصص</label>
  129. <select class="form-control" formControlName="specialization_id">
  130. <option *ngFor="let spec of specializations; let i = index" [value]="spec.id">{{spec.name}}</option>
  131. </select>
  132. </div>
  133. </div>
  134. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  135. <div class="form-group">
  136. <label for="position" style="float:right">المنصب <span class="spanReqired-w">*</span></label>
  137. <input type="text" id="position" class="form-control" placeholder="المنصب" formControlName="position" />
  138. </div>
  139. </div>
  140. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  141. <div class="form-group">
  142. <label style="float:right">الاداره <span class="spanReqired-w">*</span></label>
  143. <select class="form-control" formControlName="adminstration_id" (change)="getDepartment()">
  144. <option *ngFor="let admin of adminstration; let i = index" [value]="admin.id">{{admin.name}}</option>
  145. </select>
  146. </div>
  147. </div>
  148. <div class="col-12 col-sm-12 col-md-6 col-lg-4" *ngIf="showDepart">
  149. <div class="form-group">
  150. <label style="float:right">القسم <span class="spanReqired-w">*</span></label>
  151. <select class="form-control" formControlName="department_id">
  152. <option *ngFor="let department of departments; let i = index" [value]="department.id">{{department.name}}</option>
  153. </select>
  154. <span class="help-block" *ngIf="!regesterForm.get('department_id').valid && regesterForm.get('department_id').touched" style="color:red">أدخل القسم </span>
  155. </div>
  156. </div>
  157. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  158. <div class="form-group">
  159. <label style="float:right">الملاك الوظيفي</label>
  160. <select class="form-control" formControlName="staff_id">
  161. <option *ngFor="let staff of staffs; let i = index" [value]="staff.id">{{staff.name}}</option>
  162. </select>
  163. </div>
  164. </div>
  165. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  166. <div class="form-group">
  167. <label style="float:right">نوع العقد</label>
  168. <select class="form-control" formControlName="contract_type_id">
  169. <option *ngFor="let contract of contracts; let i = index" [value]="contract.id">{{contract.name}}</option>
  170. </select>
  171. </div>
  172. </div>
  173. <div class="col-12 col-sm-12 col-md-6 col-lg-4" *ngIf="showStatus">
  174. <div class="form-group">
  175. <label style="float: right; margin-right:5px">الحاله</label>
  176. <select class="form-control" formControlName="status">
  177. <option [value]='1'>فعال</option>
  178. <option [value]='0'>غير فعال</option>
  179. </select>
  180. <span class="help-block" *ngIf="!regesterForm.get('status').valid && regesterForm.get('status').touched" style="color:red">Please enter a status </span>
  181. </div>
  182. </div>
  183. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  184. <div class="form-group">
  185. <label style="float: right; margin-right:5px;margin-top:10px">النوع <span class="spanReqired-w">*</span></label>
  186. <div class="custom-control custom-radio inlineBlock-w">
  187. <input type="radio" class="custom-control-input" id="defaultUnchecked" value="male" formControlName="gender" name="gender">
  188. <label class="custom-control-label" for="defaultUnchecked" style="cursor: pointer;">ذكر</label>
  189. </div>
  190. <div class="custom-control custom-radio inlineBlock-w">
  191. <input type="radio" class="custom-control-input" id="defaultChecked" value="female" formControlName="gender" name="gender">
  192. <label class="custom-control-label" for="defaultChecked" style="cursor: pointer; margin-right:30px">انثي</label>
  193. </div>
  194. </div>
  195. </div>
  196. <div class="col-12">
  197. <button type="submit" [disabled]="!regesterForm.valid" class="btn btn-success regesterBtn-w">{{userProfileId ? 'حفظ' : 'سجل'}}</button>
  198. <button type="button" class="btn btn-warning regesterBtn-w" (click)="authSer.backFromEdit()">إلغاء</button>
  199. </div>
  200. </div>
  201. </form>
  202. </div>
  203. </div>