Fairoj : SAL FORM FETCH

This commit is contained in:
venbatechnologies@gmail.com 2020-09-29 15:32:22 +05:30
parent a7559c0ca7
commit 49bc10f2f4
14 changed files with 292 additions and 22 deletions

View File

@ -127,7 +127,7 @@
<span class="fontsize" *ngIf="details.pd_status!='SCHEDULED' && details.pd_status!='QC_COMPLETED'" [matTooltip]="details.pd_status | titlecase"
matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
</span><br>
<span *ngIf="details.fk_pd_type == '2'&& details.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;">( {{details.vendor_status}} )</span>
<span *ngIf="details.fk_pd_type == '2'&& details.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;color:rgb(2, 124, 181) !important">( {{details.vendor_status}} )</span>
<span class="fontsize" *ngIf="details.pd_status=='QC_COMPLETED'" matTooltip="QC Completed" matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
</span>
<span class="fontsize" *ngIf="details.pd_status=='SCHEDULED'" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above">{{details.scheduled_on}}

View File

@ -114,7 +114,7 @@
<span matTooltip="PD Status" matTooltipPosition="above"> {{details.pd_status}}</span><br>
<span class="fontsize" [matTooltip]="details.pd_status | titlecase" >{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
</span> <br>
<span *ngIf="details.fk_pd_type == '2' && details.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;">( {{details.vendor_status}} )</span>
<span *ngIf="details.fk_pd_type == '2' && details.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;color:rgb(2, 124, 181) !important">( {{details.vendor_status}} )</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="Action">

View File

@ -111,7 +111,7 @@
<span matTooltip="PD Status" matTooltipPosition="above"> {{details.pd_status}}</span><br>
<span class="fontsize" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
</span> <br>
<span *ngIf="details.fk_pd_type == '2' && details.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;">( {{details.vendor_status}} )</span>
<span *ngIf="details.fk_pd_type == '2' && details.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;color:rgb(2, 124, 181) !important">( {{details.vendor_status}} )</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="Action">

View File

@ -113,7 +113,7 @@
<span matTooltip="PD Status" matTooltipPosition="above"> QC COMPLETED</span><br>
<span class="fontsize" matTooltip="QC Completed" matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
</span> <br>
<span *ngIf="details.fk_pd_type == '2' && details.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;">( {{details.vendor_status}} )</span>
<span *ngIf="details.fk_pd_type == '2' && details.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;color:rgb(2, 124, 181) !important">( {{details.vendor_status}} )</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="Action">

View File

@ -113,7 +113,7 @@
</span> -->
<span class="fontsize">{{details.scheduled_on}}
</span><br>
<span *ngIf="details.fk_pd_type == '2' && details.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;">( {{details.vendor_status}} )</span>
<span *ngIf="details.fk_pd_type == '2' && details.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;color:rgb(2, 124, 181) !important">( {{details.vendor_status}} )</span>
</mat-cell>
</ng-container>

View File

@ -275,7 +275,7 @@ export class AddressComponent implements OnInit {
this.addressForm.controls['uom'].clearValidators();
this.addressForm.controls['uom'].updateValueAndValidity();
}
if(this.lender_short_name == 'CLIX' || this.prod_catagory == 'BL'){
if(this.lender_short_name == 'CLIX' || this.prod_catagory == 'BL' || this.CustSegAbbr == 'SAL'){
this.addressForm.removeControl('estimated_area');
this.addressForm.removeControl('uom');
}

View File

@ -246,7 +246,8 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_is_pd_visited_yes_value = business_is_pd_visited_yes_value.replace('Others (Please specify)',result.records.specify_pd_visited)
console.log(business_is_pd_visited_yes_value)
}
this._businessAssetsQuesFrom.controls.business_assets_form_remark.setValue(business_is_pd_visited_yes_value);
// this._businessAssetsQuesFrom.controls.business_assets_form_remark.setValue(business_is_pd_visited_yes_value);
result.records.business_pd_visited_remark = business_is_pd_visited_yes_value
}
}
let assetCtrl: any = <FormArray>ParCtrls.controls[0];

View File

@ -104,8 +104,29 @@
<input matInput placeholder="Specify Person Met" formControlName="others_person_met"
autocomplete="off" required>
<mat-error *ngIf="employmentForm.controls['designation_person_met'].hasError('required')">
Specify Person Met Required</mat-error>
Required</mat-error>
</mat-form-field>
<div *ngIf="fk_pd_type == '2' || fk_pd_type == '3'" fxLayout="row wrap" fxFlex="100%">
<mat-form-field style="width: 45%">
<mat-label>Photograph of “Photo ID card of the Employer/Manager"</mat-label>
<mat-select formControlName="photo_id_card">
<mat-option *ngFor="let item of photoIdCardList" [value]="item"> {{item}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="employmentForm.value.photo_id_card == 'Others'" style="width: 45%">
<mat-label>Specify Photo ID card of the Employer/Manager</mat-label>
<input matInput type="text" formControlName="photo_id_others" />
</mat-form-field>
<mat-form-field style="width: 45%">
<mat-label>Employers/Managers Company ID card / Visiting Card provided”?</mat-label>
<mat-select formControlName="visiting_card">
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
<mat-error align="end" style="font-size:12px"
*ngIf="employmentForm['controls']['visiting_card'].errors?.required ">Required</mat-error>
</mat-form-field>
</div>
</div>
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'" style="width: 45%">
<mat-select placeholder="Salary amount confirmed ?" formControlName="confirm_salary"
@ -152,6 +173,65 @@
</mat-select>
<mat-error *ngIf="employmentForm.controls['sal_reg_seen'].hasError('required')">Salary register seen Required</mat-error>
</mat-form-field>
<div *ngIf="fk_pd_type == '2' || fk_pd_type == '3'">
<mat-form-field style="width: 45%">
<mat-select placeholder="Cash voucher" formControlName="cash_voucher"
required>
<mat-option>Select</mat-option>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
<mat-error *ngIf="employmentForm.controls['cash_voucher'].hasError('required')"> Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 45%">
<mat-select placeholder="Salary Certificate" formControlName="sal_certificate"
required>
<mat-option>Select</mat-option>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
<mat-error *ngIf="employmentForm.controls['sal_certificate'].hasError('required')"> Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 45%">
<mat-select placeholder="Salary Slip" formControlName="sal_slip"
required>
<mat-option>Select</mat-option>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
<mat-error *ngIf="employmentForm.controls['sal_slip'].hasError('required')"> Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 45%">
<mat-label>Others please specify</mat-label>
<mat-select placeholder="Others please specify" formControlName="other_doc"
>
<mat-option>Select</mat-option>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
<mat-error *ngIf="employmentForm['controls']['other_doc'].hasError('required')">Other Document Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 45%" *ngIf="employmentForm['value']['other_doc'] == 'yes'">
<mat-label>Specify the Document</mat-label>
<input matInput type="text" formControlName="other_doc_name">
<mat-error *ngIf="employmentForm['controls']['other_doc_name'].hasError('required')">Required</mat-error>
</mat-form-field>
<div *ngIf="checkPartEnable()">
<mat-form-field style="width: 45%">
<mat-select placeholder="Why Documents are not available ?" formControlName="doc_not_available"
multiple>
<mat-option *ngFor="let item of docNotAvailList" [value]="item">{{item}}</mat-option>
</mat-select>
<mat-error *ngIf="employmentForm.controls['doc_not_available'].hasError('required')"> Required</mat-error>
</mat-form-field>
<mat-form-field *ngIf="checkSpecifyField(employmentForm.value['doc_not_available'])" style="width: 45%">
<mat-label>Specify the reason</mat-label>
<input matInput type="text" formControlName="doc_not_available_specify"/>
</mat-form-field>
</div>
</div>
<mat-form-field style="width: 45%">
<mat-select placeholder="Mode of getting salary" formControlName="mode_of_getting_salary"
@ -212,6 +292,27 @@
</mat-option>
</mat-select>
</mat-form-field> -->
<div *ngIf="fk_pd_type == '2'">
<mat-form-field style="width: 45%">
<mat-select placeholder="Has salary been paid regularly in last 3 months? " formControlName="sal_paid_regularly"
required>
<mat-option>Select</mat-option>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
<mat-error *ngIf="employmentForm.controls['sal_paid_regularly'].hasError('required')"> Required</mat-error>
</mat-form-field>
<div *ngIf="employmentForm.value.sal_paid_regularly == 'no'">
<mat-form-field style="width: 45%">
<mat-label>Enter the reason for not paying regular salary</mat-label>
<input matInput type="text" formControlName="reason_not_sal_pay"/>
</mat-form-field>
<mat-form-field style="width: 45%">
<mat-label>Enter the amount paid / percentage paid</mat-label>
<input matInput type="text" formControlName="paid_amount"/>
</mat-form-field>
</div>
</div>
<mat-form-field style="width: 80%">
<input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary"
OnlyNumber type="text" autocomplete="off" required (change)="setValidationForNetSal($event.target.value)">
@ -242,6 +343,7 @@
<mat-error *ngIf="employmentForm.controls.amount_paid_in_cash.hasError('max')">Given Value is More than Net Salary</mat-error>
<mat-error *ngIf="employmentForm.controls.amount_paid_in_cash.hasError('min')">Given Value is Less than Net Salary</mat-error>
</mat-form-field>
<span *ngIf="fk_pd_type != '2'">
<mat-form-field style="width: 38%">
<mat-select placeholder="Is the Amount Validated or Not" formControlName="check_validated">
<mat-option>Select</mat-option>
@ -266,6 +368,7 @@
<!-- <input matInput placeholder="Any Delays"
formControlName="any_delays"> -->
</mat-form-field>
</span>
<mat-form-field style="width: 80%">
<input matInput placeholder="Bonus or Incentive" formControlName="bonus_incentive"

View File

@ -59,6 +59,13 @@ export class EmploymentInfoComponent implements OnInit {
image_doc_params: { pdid: number; form_id: number; company_id: string; };
split_customer_abbr: any;
designationdatalist: any [];
fk_pd_type: any;
docNotAvailList:any=[
"Documents were not shared by Employer", "Documents are not issued by Employer", "Documents were not available", "Employer was not available", "Others (please specify)"
]
photoIdCardList:any=[
"Aadhaar card", "Electoral Photo Identity Card (EPIC) card", "PAN card", "Driving license" , "Others"
]
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
@ -75,6 +82,7 @@ export class EmploymentInfoComponent implements OnInit {
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
this.fk_pd_type = this.pd_all_details.pdmaster_details.fk_pd_type;
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];
@ -157,6 +165,7 @@ export class EmploymentInfoComponent implements OnInit {
}
this.employmentForm.controls['attendance_seen'].setValue(value.records.attendance_seen);
this.employmentForm.controls['sal_reg_seen'].setValue(value.records.sal_reg_seen);
this.employmentForm.controls['from_date_the_salary_is_rcv'].setValue(value.records.from_date_the_salary_is_rcv);
if(value.records.from_date_the_salary_is_rcv){
this.formDate(value.records.from_date_the_salary_is_rcv);
@ -191,12 +200,46 @@ export class EmploymentInfoComponent implements OnInit {
}
this.employmentForm.controls['employment_remarks'].setValue(value.records.employment_remarks);
if (this.fk_pd_type == '2' || this.fk_pd_type == '3') {
let additional_value :any = {cash_voucher:value.records.cash_voucher,sal_certificate:value.records.sal_certificate,sal_slip:value.records.sal_slip,
doc_not_available:value.records.doc_not_available,doc_not_available_specify:value.records.doc_not_available_specify,other_doc:value.records.other_doc,
other_doc_name:value.records.other_doc_name,photo_id_card:value.records.photo_id_card,photo_id_others:value.records.photo_id_others,visiting_card:value.records.visiting_card}
if(this.fk_pd_type == '2') {
additional_value.sal_paid_regularly =value.records.sal_paid_regularly
additional_value.reason_not_sal_pay = value.records.reason_not_sal_pay
additional_value.paid_amount = value.records.paid_amount
}
// this.employmentForm.controls.cash_voucher.setValue(value.records.cash_voucher)
// records.sal_certificate = this.employmentForm.controls['sal_certificate'].value;
// records.sal_slip = this.employmentForm.controls['sal_slip'].value;
// records.doc_not_available = this.employmentForm.controls['doc_not_available'].value;
// records.doc_not_available_specify = this.employmentForm.controls['doc_not_available_specify'].value;
// records.other_doc = this.employmentForm.controls['other_doc'].value;
// records.other_doc_name = this.employmentForm.controls['other_doc_name'].value;
// records.photo_id_card = this.employmentForm.controls['photo_id_card'].value;
// records.photo_id_others = this.employmentForm.controls['photo_id_others'].value;
// records.visiting_card = this.employmentForm.controls['visiting_card'].value;
// if (this.fk_pd_type == '2') {
// records.sal_paid_regularly = this.employmentForm.controls['sal_paid_regularly'].value;
// records.reason_not_sal_pay = this.employmentForm.controls['reason_not_sal_pay'].value;
// records.paid_amount = this.employmentForm.controls['paid_amount'].value;
// }
this.employmentForm.patchValue(additional_value)
}
if(value.records.total_business_experience != ''){
this.checkWorkingExperiences();
// this.workExperienceFlag = (+value.records.total_business_previous_experience) < (+value.records.how_long_year) ? true : false;
}
}
console.log(this.employmentForm.value)
// && this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status == '0'
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED' && this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status == '0') {
console.log(this.pd_all_details.pdmaster_details.vendor_status);
this.getDataFromVendor()
}
})
/** For Bonus Frequency Dropdown */
this._pd.getAllMasterDatas('FREQUENCY').subscribe(
@ -262,7 +305,7 @@ export class EmploymentInfoComponent implements OnInit {
check_validated:[''],
how_was_it_validated: [''],
why_was_it_not_validated: [''],
any_delays: ['', Validators.compose([Validators.required])],
any_delays: [''],
bonus_incentive: ['', Validators.compose([Validators.required])],
bonus_frequency: [''],
bonus_type: [''],
@ -272,8 +315,61 @@ export class EmploymentInfoComponent implements OnInit {
// employment_details: this.fb.array([]),
employment_remarks: [''],
});
if(this.fk_pd_type == '2' || this.fk_pd_type == '3') {
this.employmentForm = this.fb.group({
...this.employmentForm.controls,
photo_id_card:[''],
photo_id_others:[''],
visiting_card:[''],
cash_voucher:[''],
sal_certificate:[''],
sal_slip:[''],
doc_not_available:[''],
doc_not_available_specify:[''],
other_doc:[''],
other_doc_name:['']
})
}
if(this.fk_pd_type == '2') {
this.employmentForm = this.fb.group({
...this.employmentForm.controls,
sal_paid_regularly:[''],
reason_not_sal_pay:[''],
paid_amount:['']
})
}
}
/************************* START OF VENDOR FORM DATAS *********************************/
getDataFromVendor() {
this._pd.getVendorDatas('employer',this.pdid).subscribe(result=>{
if(result) {
if(result['records']){
let records=result['records']
if(!records.hasOwnProperty('docs_sighted')) {
records.docs_sighted = {}
}
if(!records.hasOwnProperty('employer_details')) {
records.employer_details = {}
}
else{
this.employmentForm.controls['was_met'].setValue('yes')
}
let all_fetch = {...records.docs_sighted, ...records.employer_details}
console.log(records,all_fetch);
this.employmentForm.patchValue(all_fetch);
}
}
})
}
/************************* END OF VENDOR FORM DATAS *********************************/
filtercompanyrelationship(companyid, applicantid) {
var array = companyid.split("-");
let data = this.company_related_applicants_list.filter(cmpy => cmpy.relation_to_company == array[0] && cmpy.applicant_name == applicantid);
@ -487,6 +583,7 @@ export class EmploymentInfoComponent implements OnInit {
if (!this.employmentForm.valid) {
this.validateAllFormFields(this.employmentForm);
console.log("Invalid fields",this.findInvalidControls())
this.notifier.notify('warning', 'Please Fill/Correct All Mandatory Fields.!');
return;
}
@ -526,6 +623,27 @@ export class EmploymentInfoComponent implements OnInit {
records.total_business_previous_experience = this.employmentForm.controls['total_business_previous_experience'].value;
records.attendance_seen = this.employmentForm.controls['attendance_seen'].value;
records.sal_reg_seen = this.employmentForm.controls['sal_reg_seen'].value;
if (this.fk_pd_type == '2' || this.fk_pd_type == '3') {
records.cash_voucher = this.employmentForm.controls['cash_voucher'].value;
records.sal_certificate = this.employmentForm.controls['sal_certificate'].value;
records.sal_slip = this.employmentForm.controls['sal_slip'].value;
records.doc_not_available = this.employmentForm.controls['doc_not_available'].value;
records.doc_not_available_specify = this.employmentForm.controls['doc_not_available_specify'].value;
records.other_doc = this.employmentForm.controls['other_doc'].value;
records.other_doc_name = this.employmentForm.controls['other_doc_name'].value;
records.photo_id_card = this.employmentForm.controls['photo_id_card'].value;
records.photo_id_others = this.employmentForm.controls['photo_id_others'].value;
records.visiting_card = this.employmentForm.controls['visiting_card'].value;
if (this.fk_pd_type == '2') {
records.sal_paid_regularly = this.employmentForm.controls['sal_paid_regularly'].value;
records.reason_not_sal_pay = this.employmentForm.controls['reason_not_sal_pay'].value;
records.paid_amount = this.employmentForm.controls['paid_amount'].value;
}
}
records.from_date_the_salary_is_rcv = this.employmentForm.controls['from_date_the_salary_is_rcv'].value;
records.to_date_the_salary_is_rcv = this.employmentForm.controls['to_date_the_salary_is_rcv'].value;
records.gross_monthly_salary = this.employmentForm.controls['gross_monthly_salary'].value;
@ -560,7 +678,7 @@ export class EmploymentInfoComponent implements OnInit {
records.employment_remarks = this.employmentForm.controls['employment_remarks'].value;
this._pd.saveForm(records).subscribe(data => {
this._pd.saveForm(records,this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status).subscribe(data => {
// this.notifier.notify('success', 'Saved Successfully.');
if (data.status == 200) {
@ -591,7 +709,16 @@ export class EmploymentInfoComponent implements OnInit {
// this.workExperienceErrorFlag = false;
// }
// }
public findInvalidControls() {
const invalid = [];
const controls = this.employmentForm.controls;
for (const name in controls) {
if (controls[name].invalid) {
invalid.push(name);
}
}
return invalid;
}
validateAllFormFields(formGroup: any) {
// console.log('validateAllFormFields');
Object.keys(formGroup.controls).forEach(field => {
@ -699,4 +826,25 @@ export class EmploymentInfoComponent implements OnInit {
this.employmentForm.controls['net_monthly_salary'].setValidators([Validators.max(value),Validators.min(0)]);
this.employmentForm.controls['net_monthly_salary'].updateValueAndValidity();
}
checkSpecifyField(value) {
// let field=this.getBusinessInfoControls().at(1)['controls']['business_is_pd_visited_yes'].value
// console.log(field);
if(value && value.filter(vv=>vv.includes('Others')).length > 0) {
return true
}
return false
}
checkPartEnable() {
// if(!this.getDocsSightedGroup) { return false}
let ctrl_values=this.employmentForm['value']
if(ctrl_values.sal_reg_seen == 'no' && ctrl_values.attendance_seen == 'no' && ctrl_values.cash_voucher == 'no' && ctrl_values.sal_certificate == 'no' && ctrl_values.sal_slip == 'no' && ctrl_values.other_doc == 'no') {
this.employmentForm['controls'].doc_not_available.setValidators(Validators.required);
return true;
}
else {
this.employmentForm['controls'].doc_not_available.setValue('')
this.employmentForm['controls'].doc_not_available.clearValidators();
return false
}
}
}

View File

@ -334,6 +334,16 @@ export class FinalRemarksComponent implements OnInit {
let comments:String ='';
comments = result.records.hasOwnProperty('final_visit_status') && result.records.final_visit_status != '' ? "Final Status of visit : "+result.records.final_visit_status+'\n' : ''
comments += result.records.final_comments
if(this.customer_segment_abbr == 'SAL' && result.records.hasOwnProperty('company_existence_neighbour_confirmed')) {
if(result.records.company_existence_neighbour_confirmed == 'yes') {
result.records.company_existence_months = result.records.company_existence_months ? result.records.company_existence_months : 0
result.records.company_existence_years = result.records.company_existence_years ? result.records.company_existence_years : 0
comments+= "\n Existence of organization/office confirmed by neighbour and is in existence for " +result.records.company_existence_years+ " years"+ result.records.company_existence_months + " months"
}
else {
comments+= '\n Existence of organization/office was not confirmed by neighbour.'
}
}
this._finalRemarkForm.controls.final_form_remarks.patchValue(comments);
}
})

View File

@ -438,6 +438,7 @@ export class GeneralInfoComponent implements OnInit {
// }
let newPersonMet:any = result.records
if(this.customer_segment_abbr == 'SAL') {
// newPersonMet.person_met_entered = 'name'
if(newPersonMet.person_met_entered) {
let commonRemarks = "Met "+newPersonMet.person_met_entered +", at the time of FI visit."
this._generalForm.controls.general_remark.patchValue(commonRemarks)
@ -799,7 +800,7 @@ export class GeneralInfoComponent implements OnInit {
});
if (this.temp == formData.individuals.length && this.split_customer_abbr != 'SAL') {
if (this.temp == formData.individuals.length && this.split_customer_abbr != 'SAL' && this.fk_pd_type != '2') {
this.notifier.notify('warning', 'Please Choose Name of Person Met.!');
this.temp = 0;
return;

View File

@ -140,13 +140,19 @@ export class StartPdComponent implements OnInit, OnDestroy {
this.answeredQuestions = getAnsweredFormsCount.length;
this.pdFullDetails = data.records;
// VENDOR FORM ANSWER FETCH STATUS START(SMART PD ONLY)
// if(this.pdMasterList.fk_pd_type == '2') {
// if(data.records.vendor_form_status && data.records.vendor_form_status.length > 0) {
// this.vendor_form_status_arr = JSON.stringify(data.records.vendor_form_status)
// localStorage.setItem("vendorFormStatus_arr",this.vendor_form_status_arr)
// }
// }
if(this.pdMasterList.fk_pd_type == '2') {
let temp_vendor_status = localStorage.getItem("vendorFormStatus_arr")
if(temp_vendor_status) {
temp_vendor_status = JSON.parse(temp_vendor_status)
if(temp_vendor_status && temp_vendor_status.length > 0 ) {
this.vendor_status_arr = temp_vendor_status
}
// let temp_vendor_status = localStorage.getItem("vendorFormStatus_arr")
if(data.records.hasOwnProperty('vendor_form_status') && data.records.vendor_form_status && data.records.vendor_form_status.length > 0) {
// temp_vendor_status = JSON.parse(temp_vendor_status)
// if(temp_vendor_status && temp_vendor_status.length > 0 ) {
this.vendor_status_arr = data.records.vendor_form_status
// }
}
}
// END OF VENDOR FORM ANSWER FETCH

View File

@ -173,7 +173,7 @@
<mat-icon>videocam</mat-icon>&nbsp;
<strong>Call</strong>
</button>
<button *ngIf="master.fk_pd_type == '2' && master.vendor_status != null" mat-raised-button class="mr-1 mb-1" color="primary" matTooltip="Vendor Status" matTooltipPosition="above" style="cursor: not-allowed !important;background-color: #f44336ba !important;">
<button *ngIf="master.fk_pd_type == '2' && master.vendor_status != null" mat-raised-button class="mr-1 mb-1" color="primary" matTooltip="Vendor Status" matTooltipPosition="above" style="cursor: not-allowed !important;background-color: #2699ce !important;">
<strong> {{master.vendor_status}}</strong>
</button>
<button mat-raised-button class="mr-1 mb-1" color="primary" matTooltip="PD Status" matTooltipPosition="above" style="cursor: not-allowed !important;">
@ -206,7 +206,7 @@
<div fxFlex="100">
<div fxFlex="40" align="left" style="color: #e00201">
<span matTooltip="PD Status" matTooltipPosition="above">{{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.pd_status | titlecase}}</span> <br>
<span *ngIf="master.fk_pd_type == '2' && master.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;">( {{master.vendor_status}} )</span>
<span *ngIf="master.fk_pd_type == '2' && master.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;color:rgb(2, 124, 181) !important;">( {{master.vendor_status}} )</span>
</div>
<div fxFlex="60" align="right">
<span><button *ngIf="roleAccessDetails.trigger && addresses.assigned_pd==null || addresses.assigned_pd==''" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button></span>
@ -249,7 +249,7 @@
<div fxLayout="row nowrap">
<div fxFlex="40" align="left" style="color: #e00201">
<span matTooltip="PD Status" matTooltipPosition="above">{{addresses.addtional_pd_data[0].pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : addresses.addtional_pd_data[0].pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : addresses.addtional_pd_data[0].pd_status | titlecase}}</span> <br>
<span *ngIf="master.fk_pd_type == '2' && master.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;">( {{master.vendor_status}} )</span>
<span *ngIf="master.fk_pd_type == '2' && master.vendor_status != null" matTooltip="Vendor Status" matTooltipPosition="above" style="font-size:14px !important;color:rgb(2, 124, 181) !important">( {{master.vendor_status}} )</span>
</div>
<div fxFlex="60" align="right">
<span *ngIf="userRoleID == 10 || userRoleID == 3"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button></span>

View File

@ -968,7 +968,8 @@ export class PdTrigerService {
{form_name:"neighbourhood_details",form_id:"19"},
{form_name:"final_remarks",form_id:"20"},
{form_name:"queries_form",form_id:"24"},
{form_name:"COMMENTS",form_id:"COMMENTS"}
{form_name:"COMMENTS",form_id:"COMMENTS"},
{form_name:"employer",form_id:'12'}
]
// let records = {"records":data[form_name]}