Fairoj : Salaried Changes
This commit is contained in:
parent
4108535341
commit
549bfe9088
@ -1 +1 @@
|
||||
{"version":3,"sources":["../../@angular/common/http (ignored)"],"names":[],"mappings":";;;;;AAAA,e","file":"0.js","sourcesContent":["/* (ignored) */\n\n\n//////////////////\n// WEBPACK FOOTER\n// @angular/common/http (ignored)\n// module id = 726\n// module chunks = 0"],"sourceRoot":""}
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -682,6 +682,7 @@ else{
|
||||
}
|
||||
getNewpdupdate()
|
||||
{
|
||||
this.loading.pdloader('Please Wait')
|
||||
|
||||
this.acceptedAccess = false;
|
||||
this.initiatedAccess = false;
|
||||
@ -764,7 +765,7 @@ else{
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.loading.dismissLoader()
|
||||
})
|
||||
|
||||
|
||||
|
||||
@ -75,13 +75,20 @@ searchitem:any;
|
||||
pageTitle:string;
|
||||
complete_btn:boolean=true;
|
||||
complete_status : boolean = false;
|
||||
customer_segment_abbr: any;
|
||||
split_customer_abbr: any;
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public templateget:QuestionCategoryProvider,private viewCtrl:ViewController,
|
||||
public aws:AwsServiceProvider, public shared:CognitoServiceProvider,public toast:ToastProvider,
|
||||
public pdstatusprovide:PdtriggerProvider, private modalCtrl:ModalController,private constantProvider:ConstantsProvider,private storage:StorageProvider) {
|
||||
this.pddetails = this.navParams.get('pdDetails');
|
||||
this.pageTitle=this.pddetails.is_child != '1' ? this.pddetails.applicat_details[0].applicant_name : 'Add On for'+' '+this.pddetails.parent_pd_id
|
||||
|
||||
this.customer_segment_abbr = this.pddetails.customer_segment_abbr;
|
||||
this.split_customer_abbr = this.customer_segment_abbr.split('-')
|
||||
if(this.split_customer_abbr.length > 0){
|
||||
this.split_customer_abbr = this.split_customer_abbr[0];
|
||||
console.log(this.split_customer_abbr)
|
||||
}
|
||||
let params: any={};
|
||||
params.pd_id = this.pddetails.pd_id;
|
||||
this.pdstatusprovide.getPDCompleteDetails(params).subscribe(result => {
|
||||
@ -101,6 +108,7 @@ searchitem:any;
|
||||
|
||||
ionViewCanEnter()
|
||||
{
|
||||
this.templateget.salaried_primary_key=''
|
||||
this.getcategoryList();
|
||||
// this.viewCtrl.dismiss();
|
||||
}
|
||||
@ -183,6 +191,14 @@ searchitem:any;
|
||||
this.templateAccess = true;
|
||||
this.questionCate = this.questionCate
|
||||
this.dis_forms=this.questionCate.template_forms.filter(val=>val.isAnswerable==true );
|
||||
if(this.questionCate.hasOwnProperty('salary_check') && this.questionCate.salary_check.hasOwnProperty('flag')){
|
||||
this.templateget.salaried_primary_key=this.questionCate.salary_check.id
|
||||
console.log("temp",this.templateget.salaried_primary_key,this.split_customer_abbr)
|
||||
// if(this.split_customer_abbr == 'SAL' && this.questionCate.salary_check.flag == '1'){
|
||||
// let template=['18','5','12']
|
||||
// this.dis_forms=this.dis_forms.filter(val=>template.filter(sal_form=>sal_form == val.form_id).length >0)
|
||||
// }
|
||||
}
|
||||
console.log("temp",this.questionCate);
|
||||
|
||||
this.searchTempForm = this.questionCate.template_forms
|
||||
|
||||
@ -97,13 +97,15 @@
|
||||
<mat-label>Since how long working with this employer?</mat-label>
|
||||
<div fxLayout="column" fxLayoutAlign="start stretch">
|
||||
<mat-form-field style="width: 45%">
|
||||
<input matInput type="number" formControlName="how_long_year" autocomplete="off" placeholder="Year"
|
||||
<mat-label>Year</mat-label>
|
||||
<input matInput type="number" formControlName="how_long_year" autocomplete="off" placeholder="No of years (Eg. 10)"
|
||||
min='0' #yearFocus>
|
||||
<mat-error *ngIf="employmentForm.controls.how_long_year.hasError('max')">Higher than business vintage</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 45%">
|
||||
<input matInput type="number" placeholder="Month" formControlName="how_long_month" min='0' (change)="ConvertMonthintoYear($event.target.value)">
|
||||
<mat-label>Month</mat-label>
|
||||
<input matInput type="number" placeholder="No of months (Eg. 6)" formControlName="how_long_month" min='0' (change)="ConvertMonthintoYear($event.target.value)">
|
||||
<mat-error *ngIf="employmentForm.controls.how_long_month.hasError('max')">Higher than business vintage</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -155,8 +157,8 @@
|
||||
required> -->
|
||||
<mat-select placeholder="Designation of Person Met" formControlName="designation_person_met" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let deslist of designationdatalist" [value]="deslist.designation_id">
|
||||
{{deslist.designation}}
|
||||
<mat-option *ngFor="let deslist of company_relationship_list" [value]="deslist.company_relationship_id">
|
||||
{{deslist.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="employmentForm.controls['designation_person_met'].hasError('required')">Designation of Person Met Required</mat-error>
|
||||
|
||||
@ -194,8 +194,15 @@ this.pd_value_params={pd_id:this.pdDetails.pd_id,form_id:this.FormId.form_id,com
|
||||
data => {
|
||||
if(data['dataStatus']==true){
|
||||
this.company_relationship_list = data['records'].filter(item => item.isactive == 1);
|
||||
this.company_relationship_list = data['records'].filter(item => item.name != 'Others');
|
||||
this.company_relationship_list.push({ 'company_relationship_id': 0, 'name': 'Not Applicable' });
|
||||
this.company_relationship_list.forEach(val=>{
|
||||
console.log(val.name)
|
||||
if((val.name).includes('of')){
|
||||
val.name=(val.name).slice(0,-2);
|
||||
}
|
||||
})
|
||||
this.company_relationship_list = data['records'].filter(item => item.name != 'Others' && item.name != 'Not Applicable');
|
||||
this.company_relationship_list.push({ 'company_relationship_id': 1, 'name': 'Others' });
|
||||
console.log("company relation",this.company_relationship_list)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -173,6 +173,10 @@ export class PdQuestionGeneralInfoPage {
|
||||
this.fulldata=control.value;
|
||||
//control.controls.length
|
||||
//control.push()
|
||||
// FOR SALARIED CASE DECISION
|
||||
if(this.split_customer_abbr == 'SAL'){
|
||||
this.salariedcheck();
|
||||
}
|
||||
});
|
||||
this.generalForm.controls['company_value'].valueChanges.subscribe(val=>{
|
||||
let control=<FormArray>this.generalForm.controls['company_value'];
|
||||
@ -193,7 +197,9 @@ export class PdQuestionGeneralInfoPage {
|
||||
console.info("%cionViewDidLoad, PdQuestionGeneralInfoPage","font-size:100%;color:purple;font-weight:bold;font-family:Mongoose;");
|
||||
this.getdropdown();
|
||||
this.getPDImages();
|
||||
|
||||
// (this.generalForm.get('list_value') as FormArray).valueChanges.subscribe(value_changes=>{
|
||||
// this.salariedcheck()
|
||||
// })
|
||||
}
|
||||
ionViewLoaded() {
|
||||
|
||||
@ -1179,10 +1185,8 @@ console.log('1)',this.temp);
|
||||
//TO CHANGE THE FORM STATE
|
||||
this.generalForm.reset(this.generalForm.value);
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(()=>{
|
||||
this.spinner_access=false;
|
||||
this.navCtrl.pop();
|
||||
},2000);
|
||||
this.goBack()
|
||||
|
||||
}
|
||||
else{
|
||||
this.spinner_access=false
|
||||
@ -1237,6 +1241,26 @@ console.log('1)',this.temp);
|
||||
})
|
||||
}*/
|
||||
}
|
||||
goBack(){
|
||||
if(this.split_customer_abbr == 'SAL'){
|
||||
//checkSalaried 0 or false --> Normal Flow more than or atleast one person is person met and applicant
|
||||
|
||||
//checksalaried 1 or true ---> new Flow None of them are person met and applicant
|
||||
let params={fk_pd_id:this.pdDetails.pd_id,flag:this.checksalaried == true ? '1' : '0'}
|
||||
this.qustCat.putSalCheck(params).subscribe(res=>{
|
||||
setTimeout(()=>{
|
||||
this.spinner_access=false;
|
||||
this.navCtrl.pop();
|
||||
},2000);
|
||||
})
|
||||
}
|
||||
else{
|
||||
setTimeout(()=>{
|
||||
this.spinner_access=false;
|
||||
this.navCtrl.pop();
|
||||
},2000);
|
||||
}
|
||||
}
|
||||
|
||||
getGeneralForm()
|
||||
{
|
||||
@ -1614,11 +1638,11 @@ console.log('1)',this.temp);
|
||||
|
||||
// console.log('check box status',this.checksalaried);
|
||||
// })
|
||||
let control_value=this.generalForm.value.list_value
|
||||
control_value=control_value.filter(val=>val.is_applicant == false || val.is_person_met == false)
|
||||
console.log(control_value.length >0)
|
||||
let control_value=this.generalForm.getRawValue().list_value
|
||||
control_value=control_value.filter(val=>val.is_applicant == true && val.is_person_met == true)
|
||||
console.log(control_value,control_value.length == 0)
|
||||
|
||||
this.checksalaried = control_value.length > 0
|
||||
this.checksalaried = control_value.length == 0
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ const ttl = 60 * 60 * 24 * 7;
|
||||
|
||||
export class QuestionCategoryProvider {
|
||||
apiurl:any;
|
||||
public salaried_primary_key:string=''
|
||||
constructor(private _aws: AwsServiceProvider,public http: HttpClient,public constant:ConstantsProvider,private cache:CacheService,private ionicStrorageService:StorageProvider) {
|
||||
console.log('Hello QuestionCategoryProvider Provider');
|
||||
this.apiurl = constant.environment();
|
||||
@ -29,7 +30,7 @@ apiurl:any;
|
||||
|
||||
getLoadTemplate(pdid,random_string)
|
||||
{
|
||||
return this.http.get(this.apiurl+'loadFullTemplate?pd_id='+pdid+'&random_string='+random_string);
|
||||
return this.http.get(this.apiurl+'loadFullTemplate?pd_id='+pdid+'&random_string='+random_string+'&api=MOB');
|
||||
}
|
||||
saveQusetion(saveData)
|
||||
{
|
||||
@ -254,5 +255,11 @@ getCustomersDetails(): Observable<any> {
|
||||
saveApplicantFromGeneralForm(datas){
|
||||
return this.http.post(this.apiurl+'saveApplicantFromGeneralForm',datas)
|
||||
}
|
||||
|
||||
//FOR SALRIED CHECK FLAG TO CHANGE THE QUES TEMPLATE
|
||||
putSalCheck(params){
|
||||
params.id=this.salaried_primary_key //FOR UPDATING THE DATA
|
||||
return this.http.post(this.apiurl+'putSalCheck',{records:params})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user