Fi changes

This commit is contained in:
bitbucket 2022-11-02 17:27:48 +05:30
parent fc5fb90eb6
commit 4eeaca9d5d
19 changed files with 320 additions and 807 deletions

View File

@ -186,7 +186,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
provide: LocationStrategy,
useClass: HashLocationStrategy,
},
AwsService,AuthGuard,
AwsService,AuthGuard,
TranslateService,
PdTrigerService,
PushNotifyService,

View File

@ -97,7 +97,9 @@
<br>
<span class="fontsize" *ngIf="!details.lender_applicant_id"> Not Provided</span>
<span class="fontsize" *ngIf="details.lender_applicant_id"> {{details.lender_applicant_id}}</span>
<span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span><br>
<span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span> <br>
<span class="fontsize" *ngIf="details.fk_pd_type =='4'">( {{details.fi_type}} )</span>
<br>
<small mat-line *ngIf="details.fin_institute_name != null">{{details.fin_institute_name}}</small>
</mat-cell>
</ng-container>

View File

@ -87,4 +87,11 @@ mat-radio-button,mat-checkbox{
span {
white-space: normal;
}
}
}
::ng-deep .mat-select-disabled .mat-select-value {
color:black;
}
::ng-deep .mat-form-field-type-mat-native-select.mat-form-field-disabled .mat-form-field-infix::after, .mat-input-element:disabled {
color: black;
}

View File

@ -162,7 +162,51 @@ export class DynamicQuestionTemplateComponent implements OnInit {
]
if(this.json_answers==null ){
//this.formGroupN.get('avail_loan_moratorium_facility').patchValue(('No' || ''))
let ansData = localStorage.getItem('pd_all_details')
let res = JSON.parse(ansData)
console.log(res.pdMasterList)
// this.formGroupN.get('avail_loan_moratorium_facility').patchValue(('No' || ''))
if(res != null){
if(this.parent_ques.question_key == 'initiated_address'){
this.formGroupN.get('initiated_address').patchValue((res.pdMasterList.addressline1 || ''))
}else if(this.parent_ques.question_key == 'state'){
this.formGroupN.get('state').patchValue((res.pdMasterList.fk_state || ''))
this.onChangeProperty({value:res.pdMasterList.fk_state},this.parent_ques,'','','','TS')
}else if(this.parent_ques.question_key == 'city'){
this.formGroupN.get('city').patchValue((res.pdMasterList.fk_city
|| ''))
}else if(this.parent_ques.question_key == 'pincode'){
this.formGroupN.get('pincode').patchValue((res.pdMasterList.pincode_id
|| ''))
} else if(this.parent_ques.question_key == 'Name_of_the_Person_met'){
this.formGroupN.get('Name_of_the_Person_met').patchValue((res.pdMasterList.applicat_details[0].applicant_name
|| ''))
}
}
if(this.parent_ques.question_key == 'avail_loan_moratorium_facility'){
this.formGroupN.get('avail_loan_moratorium_facility').patchValue(('No' || ''))
}
setTimeout(()=>{
if( this.parent_ques.answers && this.parent_ques.answers instanceof Array){
// console.log(this.parent_ques.answers.length)
// console.log( this.formGroupN.get(this.parent_ques.question_key))
if(this.parent_ques.type == '3' && this.parent_ques.answers.length == 1){
// console.log(this.parent_ques.answers.answer_id)
this.formGroupN.get(this.parent_ques.question_key).patchValue(this.parent_ques.answers[0].answer_id || '')
}else if(this.parent_ques.type == '3' && this.parent_ques.answers.length == 0){
// console.log(this.parent_ques.answers.answer_id)
this.formGroupN.get(this.parent_ques.question_key).patchValue(this.parent_ques.answers[0].answer_id || '')
}
}
}, 500);
}
if(this.json_answers!=null && this.json_answers != undefined && this.json_answers) {
@ -452,6 +496,9 @@ export class DynamicQuestionTemplateComponent implements OnInit {
this.local_city=this.quesService.convertArrayNames(['city_id','city_name'],this.local_city)
console.log( this.local_city)
val.answers = (this.local_city)
let ansData = localStorage.getItem('pd_all_details')
let res = JSON.parse(ansData)
}
else if(val.api_properties == 'local_pincode'){
this.local_pincode=this.quesService.convertArrayNames(['pincode_id','pincode'],this.local_pincode)
@ -550,7 +597,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
// }
}
if(onChangeProperty.purpose == 'FORM_CTRL'){
console.log(onChangeProperty)
console.log(onChangeProperty,this.formGroupN,sec_control,sec_index)
// if(options == 2){
// debugger;
@ -722,7 +769,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
expression_value=expression_value.split(res).join(control_value_obj)
}
})
console.log(expression_value)
let calc_exp=eval(expression_value)
if(calc_exp != false){

View File

@ -189,7 +189,7 @@ else
if(!environment.production){
console.log( result.dataStatus)
//result.dataStatus = false
// result.dataStatus = false
}
console.log( result.dataStatus)

View File

@ -18,7 +18,7 @@ pipe = new DatePipe('en-US')
},2000)
}
addWatermarks(base64Img,geoCords?) {
console.log(base64Img,geoCords)
return new Promise((resolve, reject) => {
// this.constant.getGeoTag().then(geoCoordinates => {

View File

@ -173,10 +173,10 @@ export class QuesTemplateComponent {
this.checkGroupandPatchValues()
this.loaderService.closeMatSpinnerDialog()
}
else if(key_value != null){
console.log('key value',key_value,this.sales_pd_id);
this.getSalesPDSectionFromApi(key_value)
}
// else if(key_value != null){
// console.log('key value',key_value,this.sales_pd_id);
// this.getSalesPDSectionFromApi(key_value)
// }
else{
this.loaderService.closeMatSpinnerDialog()
}
@ -570,7 +570,8 @@ this.proceedonChangeProperty(modified)
console.log(geoCords);
console.log(this.imageData);
console.log(this.current_index);
this.cameraService.addWatermarks(reader.result, geoCoordinates).then(watermarked_img => {
console.log(reader.result, geoCoordinates);
this.pdTriggerService.addWatermarks(reader.result, geoCoordinates).then(watermarked_img => {
if (this.current_index != 'last') {
if (this.imageData[this.current_index].is_multiple == 1) {
console.log('multi');
@ -655,7 +656,7 @@ this.proceedonChangeProperty(modified)
// "pd_document_name":single_ques.value.question
// }
let ind = parseInt(this.current_index)+1
let index_pdid = this.pd_index( single_ques.value.question_key)
//let index_pdid = this.pd_index( single_ques.value.question_key)
let param ={
"pd_id": this.pd_all_details_data.pdMasterList.pd_id,
@ -779,7 +780,7 @@ this.parent_control.push( parent_control)
console.log(this.current_index);
this.current_index = parent_index;
console.log(this.current_index);
this.cameraService.addWatermarks(reader.result, geoCoordinates).then(watermarked_img => {
this.pdTriggerService.addWatermarks(reader.result, geoCoordinates).then(watermarked_img => {
if (this.current_index != 'last') {
if (this.imageData[this.current_index].is_multiple == 1) {
console.log('multi');
@ -862,8 +863,8 @@ this.parent_control.push( parent_control)
// "pd_document_id":null,
// "pd_document_name":parent_control.value.question
// }
let index_pdid = this.pd_index( parent_control.value.question_key)
console.log(index_pdid)
// let index_pdid = this.pd_index( parent_control.value.question_key)
// console.log(index_pdid)
let param ={
"pd_id": this.pd_all_details_data.pdMasterList.pd_id,

View File

@ -105,7 +105,7 @@
</mat-card-content>
</mat-card>
</div>
<mat-card *ngIf="questions_JSON.questions.length > 0">
<mat-card *ngIf="questions_JSON.questions.length > 0 && this.pd_all_details.pdmaster_details.fk_pd_type !='4'">
<mat-card-header>
<mat-card-title>
<h5>{{questions_JSON.section_name}}</h5>

View File

@ -64,7 +64,7 @@ export class QueriesDocsComponent implements OnInit {
private pdTriggerService:PdTrigerService,
private awsService:AwsService) {
console.log(this.pd_all_details)
if(this.pd_all_details.pdmaster_details.fk_pd_type == '4'){
if(this.pd_all_details.pdmaster_details.fk_pd_type == "4"){
this.form_id = 31 ;
}else{
this.form_id = 24;
@ -80,7 +80,7 @@ export class QueriesDocsComponent implements OnInit {
this.lenderShortName = this.pd_all_details.pdmaster_details.lender_short_name;
this.fk_pd_type = this.pd_all_details.pdmaster_details.fk_pd_type;
this.image_doc_params={pdid:this.pdid,form_id:this.form_id,company_id:''}
console.log('image_doc_params',this.image_doc_params)
console.log('image_doc_params',this.image_doc_params,this.form_id)
}
@ -89,7 +89,7 @@ export class QueriesDocsComponent implements OnInit {
ngOnInit() {
this.docsCollectedForm=this.fb.group({
parent_pdid:[this.parent_pdid],
formid:["24"],
formid:[this.form_id],
pdid:[this.pdid],
fk_createdby:[this.awsService.getlocale()],
link:[''],
@ -134,7 +134,7 @@ export class QueriesDocsComponent implements OnInit {
//let record_for_pic = {'pd_id':this.pdid,'form_id':this.form_id,'company_id':null}
this._pd.retriveFile(this.pdid,"24",null).subscribe(val=>{
this._pd.retriveFile(this.pdid,this.form_id,null).subscribe(val=>{
if(!val['msg']){
if(val['records'].length>0){
val['records'].forEach(result=>{
@ -192,11 +192,12 @@ export class QueriesDocsComponent implements OnInit {
})
}
getFormData(){
let records = { 'parent_pdid': this.parent_pdid, 'pd_id': this.pdid, 'pd_form_id': "24" };
let records = { 'parent_pdid': this.parent_pdid, 'pd_id': this.pdid, 'pd_form_id':this.form_id };
this.pdTriggerService.retriveForm(records).subscribe(result=>{
if(result['dataStatus']){
let retrieved_data=result['records'];
console.log(retrieved_data)
retrieved_data.parent_pdid=this.parent_pdid
retrieved_data.pdid=this.pdid
retrieved_data.formid="24"
@ -416,10 +417,17 @@ export class QueriesDocsComponent implements OnInit {
return;
}
}
if(this.pd_all_details.pdmaster_details.fk_pd_type == "4"){
this.form_id = 31 ;
}else{
this.form_id = 24;
}
console.log( this.pd_all_details.pdmaster_details.fk_pd_type, this.form_id )
let formParams:any ={ parent_pdid:this.parent_pdid,
formid:this.form_id,
pdid:this.pdid,
fk_createdby:this.awsService.getlocale(),};
console.log(formParams)
this.disableAfterSubmit=true
if((this.queries_docs.length > 0 || this.docs_array_value.length > 0)) {
formParams = this.docsCollectedForm.value
@ -459,6 +467,11 @@ export class QueriesDocsComponent implements OnInit {
formParams.covid_section = covidFormAnswers
}
console.log(formParams);
if(this.pd_all_details.pdmaster_details.fk_pd_type == "4"){
formParams.formid = 31 ;
}else{
formParams.formid = 24;
}
this.pdTriggerService.saveForm(formParams,this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status).subscribe(res=>{
if(res['dataStatus']){

View File

@ -173,6 +173,7 @@ import { ImgMaxSizeService } from 'ng2-img-max/dist/src/img-max-size.service';
import { ImgExifService } from 'ng2-img-max/dist/src/img-exif.service';
import { ImgMaxPXSizeService } from 'ng2-img-max/dist/src/img-maxpx-size.service';
import { Ng2ImgMaxModule } from 'ng2-img-max';
import { CameraService } from './list-pd/start-pd/forms-dynamic/ques-template/providers/camera/camera.service';
/**
* Custom angular notifier options
*/
@ -271,7 +272,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
],
exports: [FacialRecognitionModalComponent,DuplicatePdComponent,VendorPdAllocationComponent,PdLocatedMapViewDirective, PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent,StartPd2Component, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent,PdCollectedDocsComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, DailyPurchaseDetailsComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent,ImageCropComponent,CropToolsComponent,PurchaseCalculationComponent,CaptureBtnComponent, SingleCaptureBtnComponent,],
providers: [PdTrigerService, GetGeometricLocationService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'},
providers: [PdTrigerService,CameraService, GetGeometricLocationService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'},
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective,QuesFormService],

View File

@ -14,7 +14,8 @@ import { ResponseContentType } from "@angular/http";
import { ResponseOptions } from "@angular/http";
import { HttpResponse } from "@angular/common/http";
import { tap } from "rxjs/internal/operators/tap";
import { DatePipe } from '@angular/common';
import * as watermark from 'watermarkjs';
const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' ');
/** Master Interface */
@ -28,7 +29,7 @@ export interface Master {
export class PdTrigerService {
pipe = new DatePipe('en-US')
// private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
// private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/";
MAP_API_KEY: string;
@ -1251,6 +1252,82 @@ export class PdTrigerService {
reader.readAsDataURL(blob);
})
}
addWatermarks(base64Img,geoCords?) {
console.log(base64Img,geoCords)
return new Promise((resolve, reject) => {
// this.constant.getGeoTag().then(geoCoordinates => {
// this.getPosition().then(geoCords=>{
// console.log(geoCords);
// this.geoCords = geoCoordinates
// });
// this.geoCords=localStorage.getItem('current_coordinates')
// console.log("corrds",this.geoCords)
let raw_img = base64Img
var today = new Date();
// let today_loc = today.toLocaleString('en-US', { timeZone: "Asia/Kolkata" })
let today_loc=this.pipe.transform(today, 'yyyy-MM-dd, h:mm a')
var date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate();
// var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
var dateTime = 'Date : ' + today_loc;
console.log(date)
// fetch(raw_img)
// .then(res => res.blob())
// .then(blob => {
watermark([raw_img, 'assets/images/PD_watermark.png'])
.image(watermark.image.upperRight())
.then(img => {
raw_img = img.src;
let text = watermark.text
watermark([raw_img])
.image(text.upperLeft(dateTime, '19px sans-serif', '#ff0000', 1.0))
// .image(text.upperLeft(dateTime, '20px sans-serif', '#ff0000', 1.0))
.then(img => {
raw_img = img.src;
console.log("2d", raw_img)
// resolve(img.src)
console.log(geoCords)
// let geoCoordinates = geoCords ? geoCords : '-'
if(geoCords) {
let Location = `Location : ` + geoCords
watermark([raw_img])
.image(text.upperLeft(Location, '19px sans-serif', '#ff0000', 1.0, 40 ))
.then(img => {
raw_img = img.src
console.log("3rd", raw_img)
resolve(img.src)
// localStorage.removeItem('current_coordinates')
});
}
else {
resolve(img.src)
}
});
});
// },err=>{
// console.log("Error in geo",err);
// switch(err.code) {
// case 1:
// alert("Geolocation permission is denied. Please allow the permission to capture");
// break;
// case 2:
// alert("Do not get the geolocation of your place");
// break;
// case 2:
// alert("Something went wrong");
// break;
// }
// reject(err);
// })
})
// });
}
}

View File

@ -6,7 +6,8 @@
<small>{{pdMasterList.customer_segment_name}}</small>
</div>
<div fxFlex="66" align="end">
<h4 class="mt-0">{{pdMasterList.product_name}}/{{pdMasterList.subproduct_name}}
<!-- <h4 class="mt-0">{{pdMasterList.product_name}}/{{pdMasterList.subproduct_name}} -->
<h4 class="mt-0"> {{pdMasterList.fk_pd_type !='4' ?pdMasterList.product_name : pdMasterList.fi_type}} <span *ngIf="pdMasterList.subproduct_name">/{{pdMasterList.subproduct_name}}</span>&nbsp;
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
</h4>

View File

@ -32,6 +32,7 @@ import {RentalVerificationComponent} from './../../../personal-discussion/manage
import {FuturePlansAndBusinessEnvironmentComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component';
import { QueriesDocsComponent } from 'app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component';
import { ImagesAllComponent } from 'app/personal-discussion/manage-pd/list-pd/start-pd/forms/images-all/images-all.component';
import { FormComponent } from 'app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/form/form.component';
@Component({
selector: 'app-qc-start',
@ -72,6 +73,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
prod_catagory: any;
vendor_status_arr: any = [];
photographButtons: any[];
full_data: any;
constructor(notifier: NotifierService, private dialog: MatDialog, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
@ -80,6 +82,8 @@ export class QcStartComponent implements OnInit, OnDestroy {
this.randomString = this.route.snapshot.params['rdmstr'];
this.notifier = notifier;
this.currentPDStatus = false;
let data = localStorage.getItem('qcchildData')
this.full_data = JSON.parse(data)
}
ngOnInit() {
@ -112,7 +116,9 @@ export class QcStartComponent implements OnInit, OnDestroy {
// load templates details
loadTemplates(startID:string,type:number,randomString:string){
this._pd.loadPDTemplates(startID,randomString).subscribe(
this._pd.loadPDTemplates(startID,randomString,this.full_data.fk_pd_type).subscribe(
data => {
if (data.status == 200) {
this.pdMasterList=data.records.pdmaster_details;
@ -532,6 +538,31 @@ export class QcStartComponent implements OnInit, OnDestroy {
// this.notifier.notify('success', 'Successfully allocated.!');
this.loadTemplates(this.startPD,2,this.randomString);
});
}else{
let data:any;
data = {pd_FullDetails:this.pdFullDetails,pdMasterList:this.pdMasterList,FormData:details,Formname:details.form_name,pdmaster_details:this.pdMasterList};
let componen_name:any = FormComponent
const dialogRef = this.dialog.open(componen_name, {
data: data,
position: { right: '0'},
maxWidth: '100vw',
maxHeight: '100vh',
height: '100%',
width: '100%',
disableClose: true,
closeOnNavigation:true,
panelClass:'no-padding'
});
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
// if(dataresult == 'refresh') {
this.loadTemplates(this.startPD,2,this.randomString);
// }
});
}

View File

@ -215,7 +215,7 @@
<span><button *ngIf="currentPDStatus!=pdStatusCheck.QC_COMPLETED && currentPDStatus==pdStatusCheck.COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Visit Time" matTooltipPosition="above" (click)="pdVisitTime(master,addresses)"><mat-icon>watch</mat-icon></button></span>
<span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10"><button *ngIf="addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=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>
<span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10"><button *ngIf="addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span>
<span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 6 || userRoleID == 7 || userRoleID == 10"><button *ngIf="addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(master.pd_id)"><mat-icon>question_answer</mat-icon></button></span>
<span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 6 || userRoleID == 7 || userRoleID == 10"><button *ngIf="addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(master.pd_id,master)"><mat-icon>question_answer</mat-icon></button></span>
</div>
</div>
</div>

View File

@ -358,9 +358,11 @@ export class QcViewComponent implements OnInit, OnDestroy {
// start pd
getPDStart(pdID:any,childData: any){
// console.log('pdData',pdID);
// console.log('childData',childData);
console.log('childData',childData);
localStorage.setItem('qcchildData',JSON.stringify(childData))
// return;
this.destroyType=3;
//this.router.navigate([ '../../../startpd',pdID,this.masterRandomString], { relativeTo: this.route });
this.router.navigate([ '../../../startpd',pdID,this.masterRandomString], { relativeTo: this.route });
}
// pd report

View File

@ -216,16 +216,26 @@ export class QcService {
}
//load pd template details
loadPDTemplates(pdId: string,randomString :string): Observable<any> {
loadPDTemplates(pdId: string,randomString :string,pd_type:any): Observable<any> {
let httpParams = new HttpParams().set('pd_id', pdId);
httpParams = httpParams.append('random_string',randomString);
const options = pdId ?
{ params: httpParams } : {};
if(pd_type != 4){
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate", options)
.pipe(
catchError(this.handleError('operation', []))
)
}
}else{
return this._http.get<any[]>(this.apiUrl + "loadFullTemplateV2", options)
.pipe(
catchError(this.handleError('operation', []))
)
} }
// load PD question answers
getAnswersForPD(list: any): Observable<any> {

View File

@ -6,6 +6,7 @@ import { QcViewComponent } from './qc-list/qc-view/qc-view.component';
import { QcStartComponent } from './qc-list/qc-start/qc-start.component';
import { QcPdReportComponent } from './qc-list/qc-pd-report/qc-pd-report.component';
import { QcNewComponent } from './qc-list/qc-pd-report/qc-new/qc-new.component';
import { StartPd2Component } from 'app/personal-discussion/manage-pd/list-pd/start-pd/start-pd2/start-pd2.component';
const routes: Routes =[
{
@ -32,6 +33,10 @@ const routes: Routes =[
path: 'pd_report/:pdid/:string',
component: QcPdReportComponent,
},
{
path: 'startpd2/:pdid/:rdmstr',
component: StartPd2Component,
}
// {
// path:'qc_new/:pdid/:string',
// component:QcNewComponent

View File

@ -160,6 +160,7 @@ const customNotifierOptions: NotifierOptions = {
@NgModule({
imports: [
CommonModule,
QualityCheckRoutingModule,
OwlDateTimeModule, OwlNativeDateTimeModule,
NotifierModule.withConfig(customNotifierOptions),

View File

@ -1,787 +1,102 @@
{
"section_id":"3",
"section_name":"Office Visit Information",
"section_id":"1",
"section_name":"General Information",
"onsubmit":[
],
"questions":[
"questions":[
{
"question":"Name of the Person met",
"question_key":"Name_of_the_Person_met",
"place_holder":"",
"field_type":"text",
"type":"3",
"field_width":"45",
"api_properties":
{
"purpose":"answer_options_local",
"master_name":"pd_applicants",
"fields":["pd_co_applicant_id","applicant_name"]
},
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"is_disabled":"1",
"answers":null,
"validations":[
]
},
{
"question": "Employer Brief",
"question_key": "employer_brief",
"type": "1",
"disable":false,
"field_width": "45",
"answers": null,
"api_properties": null,
"onchange_properties": null,
"is_repeatable": null,
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Field Required",
"value": null
}
]
} , {
"question": "Salary confirmed by Person met ?",
"question_key": "salary_confirmed_by_person_met",
"type": "3",
"disable":false,
"field_width": "45",
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"api_properties": null,
"onchange_properties": [{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"salary_confirmed_by_person_met",
"expression":"(String('salary_confirmed_by_person_met') == String('Yes'))",
"value_keys":[
"salary_confirmed_by_person_met"
],
"questions":[
{
"question":"Gross Monthly Salary",
"question_key":"gross_monthly_salary",
"place_holder":"Gross Monthly Salary",
"field_type":"numtoword",
"type":"1",
"field_width":"45",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"salary_confirmed_by_person_met",
"answers":null,
"validations":[
]
}, {
"question":"Net Monthly Salary",
"question_key":"net_monthly_salary",
"place_holder":"Net Monthly Salary",
"field_type":"numtoword",
"type":"1",
"field_width":"45",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"salary_confirmed_by_person_met",
"answers":null,
"validations":[
]
}]
}]
}, {
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"salary_confirmed_by_person_met",
"expression":"(String('salary_confirmed_by_person_met') == String('No'))",
"value_keys":[
"salary_confirmed_by_person_met"
],
"questions":[
{
"question":"why salary amount was not confirmed?",
"question_key":"why_salary_amount_was_not_confirmed",
"place_holder":"why salary amount was not confirmed?",
"field_type":"text",
"type":"1",
"field_width":"45",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"salary_confirmed_by_person_met",
"answers":null,
"validations":[
]
} ]
}]
}],
"is_repeatable": null,
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Field Required",
"value": null
}
]
}, {
"question": "Since how long working with this employer?",
"question_key": "since_how_long_working_with_this_employer?",
"field_type":"null",
"sub_title":"Since how long working with this employer?",
"disable":false,
"field_width": "100",
"answers": null,
"api_properties": null,
"onchange_properties": null,
"is_repeatable": null,
"validations": []
},
{
"question": "Year*",
"question_key": "year",
"type": "1",
"field_type":"num",
"disable":false,
"field_width": "25",
"answers": null,
"api_properties": null,
"onchange_properties": null,
"is_repeatable": null,
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Field Required",
"value": null
}
]
},
{
"question": "Month",
"question_key": "month",
"type": "1",
"disable":false,
"field_type":"num",
"field_width": "25",
"answers": null,
"api_properties": null,
"onchange_properties": null,
"is_repeatable": null,
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Field Required",
"value": null
}
]
}, {
"question":"Mode of Getting Salary?",
"question_key":"mode_of_getting_salary",
"question":"Is Person Met",
"question_key":"is_person_met",
"type":"3",
"field_width":"45",
"answers":[{
"answer":"Yes",
"answer_id":"yes"
},
{
"answer":"No",
"answer_id":"no"
}],
"api_properties":null,
"answers":[
{
"answer_id":"Bank Transfer",
"answer":"Bank Transfer"
},
{
"answer_id":"Paid in Cash ",
"answer":"Paid in Cash "
}, {
"answer_id":"Both Bank Transfer & Cash ",
"answer":"Both Bank Transfer & Cash "
}
],
"onchange_properties": [],
"is_repeatable":null,
"validations":[
]
}, {
"question":"Salary Register was seen ?",
"question_key":"salary_register_was_seen",
"sub_title":"Documents Sighted",
"type":"2",
"field_width":"100",
"api_properties":null,
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"onchange_properties": [ {
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"salary_register_was_seen",
"expression":"(String('salary_register_was_seen') == String('No'))",
"value_keys":[
"salary_register_was_seen"
],
"questions":[
{
"question":"Why documents are not available?",
"question_key":"Why_documents_are_not_available",
"place_holder":"Why documents are not available",
"field_type":"text",
"type":"4",
"field_width":"100",
"api_properties":null,
"onchange_properties":[{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"Why_documents_are_not_available",
"expression":"(String('Why_documents_are_not_available').includes('Others_please_specify'))",
"value_keys":[
"Why_documents_are_not_available"
],
"questions":[
{
"question":"Others ",
"question_key":"Others_please_specify_Why_documents_are_not_available",
"place_holder":"Why documents are not available",
"field_type":"text",
"type":"1",
"field_width":"100",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"cash_voucher_was_seen",
"answers":null,
"validations":[
]
} ]
}]
}],
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"salary_register_was_seen",
"answers":[ {
"answer_id":"Documents_were_not_shared_by_Employer",
"answer":"Documents were not shared by Employer"
},
{
"answer_id":"Documents_are_not_issued_by_Employer_to_Employee",
"answer":"Documents are not issued by Employer to Employee"
} , {
"answer_id":"Documents_were_not_available",
"answer":"Documents were not available"
} , {
"answer_id":"Employer_was_not_available",
"answer":"Employer was not available"
} , {
"answer_id":"Others_please_specify",
"answer":"Others please specify"
} ],
"validations":[
]
} ]
}]
}],
"is_repeatable":null,
"validations":[
]
}, {
"question":"Cash voucher was seen ?",
"question_key":"cash_voucher_was_seen",
"type":"2",
"field_width":"100",
"api_properties":null,
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"onchange_properties": [ {
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"cash_voucher_was_seen",
"expression":"(String('cash_voucher_was_seen') == String('No'))",
"value_keys":[
"cash_voucher_was_seen"
],
"questions":[
{
"question":"Why documents are not available?",
"question_key":"Why_documents_are_not_available_cash_voucher",
"place_holder":"Why documents are not available",
"field_type":"text",
"type":"4",
"field_width":"100",
"api_properties":null,
"onchange_properties":[{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"Why_documents_are_not_available_cash_voucher",
"expression":"(String('Why_documents_are_not_available_cash_voucher').includes('Others_please_specify'))",
"value_keys":[
"Why_documents_are_not_available_cash_voucher"
],
"questions":[
{
"question":"Others ",
"question_key":"Others_please_specify_Why_documents_are_not_available_cash_voucher",
"place_holder":"Why documents are not available",
"field_type":"text",
"type":"1",
"field_width":"100",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"cash_voucher_was_seen",
"answers":null,
"validations":[
]
} ]
}]
}],
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"cash_voucher_was_seen",
"answers":[ {
"answer_id":"Documents_were_not_shared_by_Employer",
"answer":"Documents were not shared by Employer"
},
{
"answer_id":"Documents_are_not_issued_by_Employer_to_Employee",
"answer":"Documents are not issued by Employer to Employee"
} , {
"answer_id":"Documents_were_not_available",
"answer":"Documents were not available"
} , {
"answer_id":"Employer_was_not_available",
"answer":"Employer was not available"
} , {
"answer_id":"Others_please_specify",
"answer":"Others please specify"
} ],
"validations":[
]
} ]
}]
}],
"is_repeatable":null,
"validations":[
]
}, {
"question":"Salary Slip was seen ?",
"question_key":"salary_slip_was_seen",
"type":"2",
"field_width":"100",
"api_properties":null,
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"onchange_properties": [ {
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"salary_slip_was_seen",
"expression":"(String('salary_slip_was_seen') == String('No'))",
"value_keys":[
"salary_slip_was_seen"
],
"questions":[
{
"question":"Why documents are not available?",
"question_key":"Why_documents_are_not_available_salary_slip",
"place_holder":"Why documents are not available",
"field_type":"text",
"type":"4",
"field_width":"100",
"api_properties":null,
"onchange_properties":[{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"Why_documents_are_not_available_salary_slip",
"expression":"(String('Why_documents_are_not_available_salary_slip').includes('Others_please_specify'))",
"value_keys":[
"Why_documents_are_not_available_salary_slip"
],
"questions":[
{
"question":"Others ",
"question_key":"Others_please_specify_Why_documents_are_not_available_salary_slip",
"place_holder":"Why documents are not available",
"field_type":"text",
"type":"1",
"field_width":"100",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"salary_slip_was_seen",
"answers":null,
"validations":[
]
} ]
}]
}],
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"salary_slip_was_seen",
"answers":[ {
"answer_id":"Documents_were_not_shared_by_Employer",
"answer":"Documents were not shared by Employer"
},
{
"answer_id":"Documents_are_not_issued_by_Employer_to_Employee",
"answer":"Documents are not issued by Employer to Employee"
} , {
"answer_id":"Documents_were_not_available",
"answer":"Documents were not available"
} , {
"answer_id":"Employer_was_not_available",
"answer":"Employer was not available"
} , {
"answer_id":"Others_please_specify",
"answer":"Others please specify"
} ],
"validations":[
]
} ]
}]
}],
"is_repeatable":null,
"validations":[
]
}, {
"question":"Offer Letter was seen ?",
"question_key":"offer_letter_was_seen",
"type":"2",
"field_width":"100",
"api_properties":null,
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"onchange_properties": [ {
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"offer_letter_was_seen",
"expression":"(String('offer_letter_was_seen') == String('No'))",
"value_keys":[
"offer_letter_was_seen"
],
"questions":[
{
"question":"Why documents are not available?",
"question_key":"Why_documents_are_not_available_offer_letter",
"place_holder":"Why documents are not available",
"field_type":"text",
"type":"4",
"field_width":"100",
"api_properties":null,
"onchange_properties":[{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"Why_documents_are_not_available_offer_letter",
"expression":"(String('Why_documents_are_not_available_offer_letter').includes('Others_please_specify'))",
"value_keys":[
"Why_documents_are_not_available_offer_letter"
],
"questions":[
{
"question":"Others ",
"question_key":"Others_please_specify_Why_documents_are_not_available_offer_letter",
"place_holder":"Why documents are not available",
"field_type":"text",
"type":"1",
"field_width":"100",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"offer_letter_was_seen",
"answers":null,
"validations":[
]
} ]
}]
}],
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"offer_letter_was_seen",
"answers":[ {
"answer_id":"Documents_were_not_shared_by_Employer",
"answer":"Documents were not shared by Employer"
},
{
"answer_id":"Documents_are_not_issued_by_Employer_to_Employee",
"answer":"Documents are not issued by Employer to Employee"
} , {
"answer_id":"Documents_were_not_available",
"answer":"Documents were not available"
} , {
"answer_id":"Employer_was_not_available",
"answer":"Employer was not available"
} , {
"answer_id":"Others_please_specify",
"answer":"Others please specify"
} ],
"validations":[
]
} ]
}]
}],
"is_repeatable":null,
"validations":[
]
}, {
"question":"Others",
"question_key":"others_Please_specifys",
"type":"2",
"field_width":"100",
"api_properties":null,
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"onchange_properties": [ {
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"others_Please_specifys",
"expression":"(String('others_Please_specifys') == String('Yes'))",
"value_keys":[
"others_Please_specifys"
],
"questions":[
{
"question":"Others please specify",
"question_key":"Others_specify",
"place_holder":"Others please specify",
"field_type":"text",
"type":"1",
"field_width":"100",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"others_Please_specifys",
"answers":null,
"validations":[
]
} ]
}]
}],
"is_repeatable":null,
"validations":[
]
}, {
"question":"No. of employees sighted by PD officer during visit",
"question_key":"no_of_employees_sighted_by_PD_officer_during_visit",
"type":"1",
"field_type":"num",
"field_width":"45",
"api_properties":null,
"answers":[
],
"onchange_properties":null,
"is_repeatable":null,
"validations":[
]
}, {
"question": "Was the company name board sighted? ",
"question_key": "was_the_company_name_board_sighted",
"type": "3",
"disable":false,
"field_width": "45",
"answers":[
"onchange_properties":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"api_properties": null,
"onchange_properties": null,
"is_repeatable": null,
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Field Required",
"value": null
}
]
}, {
"question": "Was any business activities observed during visit?",
"question_key": "Was_any_business_activities_observed_during_visit",
"type": "3",
"disable":false,
"field_width": "45",
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"api_properties": null,
"onchange_properties": [{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"Was_any_business_activities_observed_during_visit",
"expression":"(String('Was_any_business_activities_observed_during_visit') == String('Yes'))",
"value_keys":[
"Was_any_business_activities_observed_during_visit"
],
"questions":[
"purpose":"FORM_CTRL",
"form_controls":[
{
"question":"If Yes ,Please Choose ",
"question_key":"If_yes_choose_one",
"place_holder":"why salary amount was not confirmed?",
"field_type":"text",
"type":"4",
"field_width":"45",
"api_properties":null,
"onchange_properties":[{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"If_yes_choose_one",
"expression":"(String('If_yes_choose_one').includes('others'))",
"value_keys":[
"If_yes_choose_one"
],
"questions":[
{
"question":"Others (Please specify)",
"question_key":"Others_Please_specify",
"place_holder":"Others (Please specify)",
"field_type":"text",
"type":"1",
"field_width":"45",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"salary_confirmed_by_person_met",
"answers":null,
"validations":[
]
} ]
}]
}],
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"salary_confirmed_by_person_met",
"answers":[
{
"answer_id":"employees_were_seen_at_the_visited_premises",
"answer":"Employees were seen at the visited premises"
},
{
"answer_id":"customers_Clients_were_seen_at_the_visited_premises",
"answer":"Customers/Clients were seen at the visited premises"
} , {
"answer_id":"manufacturing_activities_were_seen_at_the_visited_premises",
"answer":"Manufacturing activities were seen at the visited premises"
},
{
"answer_id":"others",
"answer":"Others (Please specify)"
}
],
"validations":[
]
} ]
}]
}],
"is_repeatable": null,
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Field Required",
"value": null
}
"insert_index":"is_person_met",
"expression":"(String('is_person_met') == String('no'))",
"value_keys":[
"is_person_met"
],
"questions":[
{
"question":"Designation of Person met",
"question_key":"Designation_of_Person_met",
"place_holder":"",
"field_type":"text",
"type":"8",
"field_width":"45",
"api_properties":{
"api":"getListOfMaster",
"api_method":"POST",
"params":{
"master_name":"COMPANYRELATIONSHIPS"
},
"fields":[
"company_relationship_id",
"name"
]
},
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"is_person_met",
"answers":null,
"validations":[
]
} ,{
"question":"Name of the Person met",
"question_key":"Name_of_the_Person",
"place_holder":"",
"field_type":"text",
"type":"1",
"field_width":"45",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"Was_the_employee_met",
"answers":null,
"validations":[
]
}]
}]
}],
"is_repeatable":null,
"validations":[
]
}