|
@@ -32,6 +32,7 @@ export class ReviewTraineeAddComponent implements OnInit {
|
|
showEditField: boolean = false; //to show the field in edit mode
|
|
showEditField: boolean = false; //to show the field in edit mode
|
|
showRefusedCause: boolean = false; //to show the cause of refused when ststus is refused
|
|
showRefusedCause: boolean = false; //to show the cause of refused when ststus is refused
|
|
editMode: boolean = false; //true in edit mode
|
|
editMode: boolean = false; //true in edit mode
|
|
|
|
+ showPersonalData: boolean = false;
|
|
reportId: number;
|
|
reportId: number;
|
|
attachments_ids = []; //for edit mode;
|
|
attachments_ids = []; //for edit mode;
|
|
|
|
|
|
@@ -148,6 +149,7 @@ export class ReviewTraineeAddComponent implements OnInit {
|
|
this.spinner.show();
|
|
this.spinner.show();
|
|
this.editMode = true;
|
|
this.editMode = true;
|
|
this.typeMode = true;
|
|
this.typeMode = true;
|
|
|
|
+ this.showPersonalData = true;
|
|
this.files = [];
|
|
this.files = [];
|
|
|
|
|
|
this.dashBoardSer.getItemData(this.reportId,'traineeRequest').subscribe(
|
|
this.dashBoardSer.getItemData(this.reportId,'traineeRequest').subscribe(
|
|
@@ -276,7 +278,7 @@ export class ReviewTraineeAddComponent implements OnInit {
|
|
this.http.get(this.authSer.pathApi + '/get_user/' + event.target.value).subscribe(
|
|
this.http.get(this.authSer.pathApi + '/get_user/' + event.target.value).subscribe(
|
|
(responce) => {
|
|
(responce) => {
|
|
console.log('one trainee data ', responce);
|
|
console.log('one trainee data ', responce);
|
|
- this.typeMode = true;
|
|
|
|
|
|
+ this.showPersonalData = true;
|
|
this.disabledInput = true;
|
|
this.disabledInput = true;
|
|
this.userData.name = responce['user'].name;
|
|
this.userData.name = responce['user'].name;
|
|
this.userData.nationality_id = responce['user'].nationality_id;
|
|
this.userData.nationality_id = responce['user'].nationality_id;
|
|
@@ -386,8 +388,6 @@ export class ReviewTraineeAddComponent implements OnInit {
|
|
this.toastr.warning('من فضلك قم بإختيار متدرب !');
|
|
this.toastr.warning('من فضلك قم بإختيار متدرب !');
|
|
} else if(this.formData['choosen_department_id'] == '') {
|
|
} else if(this.formData['choosen_department_id'] == '') {
|
|
this.toastr.warning('يجب إختيار قسم واحد من الأقسام المحدده !');
|
|
this.toastr.warning('يجب إختيار قسم واحد من الأقسام المحدده !');
|
|
- } else if(this.formData.status == 'pending') {
|
|
|
|
- this.toastr.warning('من فضلك قم بإختيار حاله الطلب !');
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
//delete file & file type if not change it in old file
|
|
//delete file & file type if not change it in old file
|