review-trainee-add.component.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <div class="addHospital-w">
  2. <div class="container">
  3. <div class="row" style="margin-bottom: 30px;">
  4. <div class="col-12">
  5. <ul class="list-unstyled titileLi-w">
  6. <li class="headingText-w">خدمه التدريب</li>
  7. <li class="headingText-w" style="cursor:pointer" (click)="authSer.perviousLocation()"> إستعراض بيانات المتدربين</li>
  8. <li class="headingText-w activeLi-w" style="margin-right:5px"> {{typeLink}} </li>
  9. </ul>
  10. </div>
  11. </div>
  12. <div class="containerContent-w">
  13. <form (ngSubmit)="onSubmittedForm()" #f="ngForm">
  14. <div class="row">
  15. <div class="col-6" *ngIf="!typeMode">
  16. <div class="form-group">
  17. <label for="trainee" style="float:right">المتدرب</label>
  18. <select id="trainee" class="form-control" (input)="getTraineeData($event)" ngModel name="trainee" [(ngModel)]="formData.trainee" >
  19. <option *ngFor="let trainee of trainees" [value]="trainee.id">{{trainee.name}}</option>
  20. </select>
  21. </div>
  22. </div>
  23. <div class="col-12" *ngIf="typeMode">
  24. <h2 class="title">المعلومات الشخصيه</h2>
  25. <div class="row">
  26. <div class="wrapper">
  27. <div class="col-12 col-md-4">
  28. <div class="form-group">
  29. <label for="name" style="float:right">الإسم</label>
  30. <input id="name" type="text" class="form-control" placeholder="الإسم" ngModel name="name" [(ngModel)]="userData.name" [disabled]="disabledInput" required/>
  31. </div>
  32. </div>
  33. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  34. <div class="form-group">
  35. <label style="float:right">الجنسية <span class="spanReqired-w">*</span></label>
  36. <select class="form-control" style="padding:0 5px" ngModel name="nationality_id" [(ngModel)]="userData.nationality_id" [disabled]="disabledInput" required>
  37. <option *ngFor="let country of countries; let i = index" [value]="country.id">{{country.country_arName}}</option>
  38. </select>
  39. </div>
  40. </div>
  41. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  42. <div class="form-group">
  43. <label for="identity" style="float:right"> الهويه <span class="spanReqired-w">*</span></label>
  44. <select class="form-control select" id="identity" (change)="getSelectedOptionText($event)" ngModel name="identity_type_id" [(ngModel)]="userData.identity_type_id" [disabled]="disabledInput" required>
  45. <option *ngFor="let identity of identities" [value]="identity.id">{{identity.name}}</option>
  46. </select>
  47. </div>
  48. </div>
  49. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  50. <div class="form-group">
  51. <label for="identityNumber" style="float:right">رقم الهويه <span class="spanReqired-w">*</span></label>
  52. <input type="number" class="form-control" placeholder="رقم الهويه" id="identityNumber" (input)="onIdentitiyChange($event.target.value)" ngModel name="identity_number" [(ngModel)]="userData.identity_number" [disabled]="disabledInput" required/>
  53. <span class="errorMessage-w" *ngIf="identity_id == 1">أدخل رقم هويه مكون من 10 أرقام يبدأ برقم 1</span>
  54. <span class="errorMessage-w" *ngIf="identity_id == 2">أدخل رقم هويه مكون من 10 أرقام </span>
  55. <span class="errorMessage-w" *ngIf="identity_id == 3">أدخل رقم الإقامه مكون من 10 أرقام يبدأ برقم 2 </span>
  56. </div>
  57. </div>
  58. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  59. <div class="form-group">
  60. <label for="birthday" style="float:right">تاريخ الميلاد <span class="spanReqired-w">*</span></label>
  61. <input type="date" max="{{min}}" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" ngModel name="birthday" [(ngModel)]="userData.birthday" [disabled]="disabledInput" required/>
  62. </div>
  63. </div>
  64. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  65. <div class="form-group">
  66. <label style="float: right; margin-right:5px;margin-top:10px">النوع <span class="spanReqired-w">*</span></label>
  67. <div class="custom-control custom-radio inlineBlock-w" style="padding: 2px 31px;background: #bd90592e;color: #a98559;border: 1px solid #b38553c2;">
  68. <input type="radio" class="custom-control-input customStyleInput" id="defaultUnchecked" value="male" name="gender" ngModel [(ngModel)]="userData.gender" [disabled]="disabledInput">
  69. <label class="custom-control-label" for="defaultUnchecked" style="cursor: pointer;">ذكر</label>
  70. </div>
  71. <div class="custom-control custom-radio inlineBlock-w" style="padding: 2px 31px;background: #bd90592e;color: #a98559;border: 1px solid #b38553c2;">
  72. <input type="radio" class="custom-control-input customStyleInput" id="defaultChecked" value="female" name="gender" ngModel [(ngModel)]="userData.gender" [disabled]="disabledInput">
  73. <label class="custom-control-label" for="defaultChecked" style="cursor: pointer;">انثي</label>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="col-12" *ngIf="typeMode">
  81. <h2 class="title">معلومات الإتصال</h2>
  82. <div class="row">
  83. <div class="wrapper">
  84. <div class="col-12 col-sm-12 col-md-6 col-lg-4">
  85. <div class="form-group">
  86. <label for="phone" style="float:right">رقم الجوال <span class="spanReqired-w">*</span></label>
  87. <input type="text" id="phone" appNumberDerictive class="form-control" placeholder="رقم الجوال يبدأ ب 05 ومكون من 10 أرقام" ngModel name="phone" [(ngModel)]="userData.phone" [disabled]="disabledInput" required/>
  88. </div>
  89. </div>
  90. <div class="col-12 col-md-4">
  91. <div class="form-group">
  92. <label for="email" style="float:right">البريد الإلكتروني <span class="spanReqired-w">*</span></label>
  93. <input id="email" type="email" class="form-control" placeholder="الإيميل" ngModel name="email" [(ngModel)]="userData.email" [disabled]="disabledInput" required/>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <div class="col-12">
  100. <h2 class="title">معلومات التدريب</h2>
  101. <div class="row">
  102. <div class="wrapper">
  103. <div class="col-12 col-sm-12 col-md-4 col-lg-4">
  104. <div class="form-group">
  105. <label style="float:right">نوع الطلب <span class="spanReqired-w">*</span></label>
  106. <select class="form-control selectStyle-w" ngModel name="type" [(ngModel)]="formData.type" (input)="changeType($event)" required>
  107. <option value="trainees">المتدربين</option>
  108. <option value="fellowship"> زماله(البورد السعودي) </option>
  109. <option value="university_administrators">مشرفي الجامعات</option>
  110. </select>
  111. </div>
  112. </div>
  113. <div class="col-12 col-sm-12 col-md-4 col-lg-4">
  114. <div class="form-group">
  115. <label for="order" style="float:right">اسم التخصص <span class="spanReqired-w">*</span></label>
  116. <input type="text" id="order" placeholder=" إسم التخصص" ngModel name="specialization_name" [(ngModel)]="formData.specialization_name" class="form-control" required/>
  117. </div>
  118. </div>
  119. <div class="col-12 col-sm-12 col-md-4 col-lg-4">
  120. <div class="form-group">
  121. <label for="spec" style="float:right">التخصص الدقيق <span class="spanReqired-w">*</span></label>
  122. <input type="text" id="spec" class="form-control" placeholder="التخصص الدقيق" name="specific_specialization" [(ngModel)]="formData.specific_specialization" ngModel required/>
  123. </div>
  124. </div>
  125. <div class="col-12 col-sm-12 col-md-4 col-lg-4 ">
  126. <div class="form-group">
  127. <label for="universty" style="float:right">الجامعه <span class="spanReqired-w">*</span></label>
  128. <input type="text" id="universty" placeholder="الجامعه" class="form-control" name="univeristy" ngModel [(ngModel)]="formData.university" required/>
  129. </div>
  130. </div>
  131. <div class="col-12 col-sm-12 col-md-4 col-lg-4">
  132. <div class="form-group">
  133. <label for="level" style="float:right">المستوي <span class="spanReqired-w">*</span></label>
  134. <input type="text" id="level" placeholder="المستوي" class="form-control" name="level" ngModel [(ngModel)]="formData.level" required/>
  135. </div>
  136. </div>
  137. <div class="col-12 col-sm-12 col-md-4 col-lg-4">
  138. <div class="form-group">
  139. <label for="trainning" style="float:right">الفتره التدريبيه <span class="spanReqired-w">*</span></label>
  140. <input type="text" id="trainning" placeholder="الفتره التدريبيه" class="form-control" name="training_period" ngModel [(ngModel)]="formData.training_period" required />
  141. </div>
  142. </div>
  143. <div class="col-12 col-sm-12 col-md-4 col-lg-4" *ngIf="formData.type == 'fellowship'">
  144. <div class="form-group">
  145. <label for="regester" style="float:right">رقم التسجيل <span class="spanReqired-w">*</span></label>
  146. <input type="number" id="regester" placeholder="رقم التسجيل" class="form-control" name="training_period" ngModel [(ngModel)]="formData.registration_number" required/>
  147. </div>
  148. </div>
  149. <div class="col-12 col-sm-12 col-md-4 col-lg-4" *ngIf="formData.type == 'fellowship'">
  150. <div class="form-group">
  151. <label for="card" style="float:right">رقم البطاقه الهينه <span class="spanReqired-w">*</span></label>
  152. <input id="card" type="number" placeholder="رقم البطاقه الهينه" class="form-control" name="authority_card_number" ngModel [(ngModel)]="formData.authority_card_number" required/>
  153. </div>
  154. </div>
  155. <div class="col-12 col-sm-12 col-md-4 col-lg-4" *ngIf="formData.type == 'fellowship'">
  156. <div class="form-group">
  157. <label for="job" style="float:right"> البطاقه الوظيفي <span class="spanReqired-w">*</span></label>
  158. <input type="number" id="job" placeholder="البطاقه الوظيفي" class="form-control" name="functional_number" ngModel [(ngModel)]="formData.functional_number" required/>
  159. </div>
  160. </div>
  161. <div class="col-12 col-sm-12 col-md-4 col-lg-4" *ngIf="formData.type == 'fellowship'">
  162. <div class="form-group">
  163. <label for="contract" style="float:right">نوع التعاقد <span class="spanReqired-w">*</span></label>
  164. <input type="text" id="contract" placeholder="نوع التعاقد" class="form-control" name="contract_type" ngModel [(ngModel)]="formData.contract_type" required/>
  165. </div>
  166. </div>
  167. <div class="col-12 col-sm-12 col-md-4 col-lg-4" *ngIf="formData.type == 'fellowship'">
  168. <div class="form-group">
  169. <label for="field" style="float:right">الجهه التابع لها المتدرب <span class="spanReqired-w">*</span></label>
  170. <input type="text" id="field" placeholder="الجهه التابع لها المتدرب" class="form-control" name="organization_affiliated_with" ngModel [(ngModel)]="formData.organization_affiliated_with" required/>
  171. </div>
  172. </div>
  173. <!-- <h2 class="departmentHeading-w">أختر الأقسام <span>(قم بإختيار قسم كحد أدني)</span></h2> -->
  174. <div class="col-12 col-sm-12 col-md-4 col-lg-4" *ngIf="!editMode">
  175. <div class="form-group">
  176. <label for="department1" style="float:right;">القسم الأول</label>
  177. <select class="form-control selectStyle-w" id="department1" name="department1" (input)="changeDepartment($event , 1)" [(ngModel)]="formData.department1">
  178. <option *ngFor="let department of departments" [value]="department.id">{{department.name}}</option>
  179. </select>
  180. </div>
  181. </div>
  182. <div class="col-12 col-sm-12 col-md-4 col-lg-4" *ngIf="!editMode">
  183. <div class="form-group">
  184. <label for="department2" style="float:right;">القسم الثاني</label>
  185. <select class="form-control selectStyle-w" id="department2" name="department2" (input)="changeDepartment($event , 2)" [(ngModel)]="formData.department2">
  186. <option *ngFor="let department of departments" [value]="department.id">{{department.name}}</option>
  187. </select>
  188. </div>
  189. </div>
  190. <div class="col-12 col-sm-12 col-md-4 col-lg-4" *ngIf="!editMode">
  191. <div class="form-group">
  192. <label for="department3" style="float:right;">القسم الثالث</label>
  193. <select class="form-control selectStyle-w" id="department3" name="department3" (input)="changeDepartment($event , 3)" [(ngModel)]="formData.department3">
  194. <option *ngFor="let department of departments" [value]="department.id">{{department.name}}</option>
  195. </select>
  196. </div>
  197. </div>
  198. <div class="col-12 col-sm-12 col-md-4 col-lg-4" *ngIf="editMode">
  199. <div class="form-group">
  200. <label for="department4" style="float:right;">القسم</label>
  201. <select class="form-control selectStyle-w" id="department4" name="department4" [(ngModel)]="formData.department4">
  202. <option *ngFor="let department of departments" [value]="department.department_id">{{department.department_name}}</option>
  203. </select>
  204. </div>
  205. </div>
  206. <div class="col-12 col-sm-12 col-md-12 col-lg-12" *ngIf="editMode">
  207. <div class="form-group">
  208. <label for="status" style="float:right; display:block"> الحاله <span class="spanReqired-w">*</span></label>
  209. <button type="button" class="btn btn-success statusBtn-w" (click)="statusShow('accepted')">قبول</button>
  210. <button type="button" class="btn btn-danger statusBtn-w" (click)="statusShow('refuced')">رفض</button>
  211. <button type="button" class="btn btn-default statusBtn-w" (click)="statusShow('asked_for_opinion')">طلب رأي</button>
  212. <input type="text" placeholder="سبب الرفض" class="form-control" name="status_description" ngModel [(ngModel)]="formData.status_description" *ngIf="showRefusedCause" required>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. <div class="col-12">
  219. <h2 class="title">المرفقات</h2>
  220. <div class="row">
  221. <div class="wrapper">
  222. <div class="col-12">
  223. <button type="button" class="btn btn-default" (click)="plusImage()" style="margin:20px 0; float:right;">إضافه مرفق</button>
  224. </div>
  225. <table class="table table-bordered">
  226. <thead class="headBackground-w">
  227. <tr>
  228. <th> إسم المرفق</th>
  229. <th>رفع املف ( بصيغه pdf )</th>
  230. <th>حذف</th>
  231. </tr>
  232. </thead>
  233. <tbody>
  234. <tr style="text-align:center;" *ngFor="let file of files; let i = index">
  235. <td><input type="text" class="form-control" placeholder="إسم الملف" [(ngModel)]="file.title" [ngModelOptions]="{standalone: true}"/></td>
  236. <td style="position: relative;">
  237. <input type="file" name="file{{i}}" id="file{{i}}" class="inputfile" alife-file-to-base64 (onFileChanged)="onFileChanges($event,i)" />
  238. <label for="file{{i}}" class="iconUpload-w"><i class="fas fa-upload"></i></label>
  239. <span class="fileName-w">{{file.nameFile}}</span>
  240. </td>
  241. <td><button type="button" class="btn btn-danger form-control deleteRow-w" (click)="onDeleteRow(i)">حذف</button></td>
  242. </tr>
  243. </tbody>
  244. </table>
  245. </div>
  246. </div>
  247. </div>
  248. <div class="col-12">
  249. <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid || checkSaveClick">حفظ</button>
  250. <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()" style="margin:20px 10px;">إلغاء</button>
  251. </div>
  252. </div>
  253. </form>
  254. </div>
  255. </div>
  256. </div>