+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts
index 615ef3f81..5b08b9532 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts
@@ -90,6 +90,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
"COMPLETED": 'COMPLETED',
"ADD_ON_PENDING": 'ADD_ON_PENDING',
"QC_COMPLETED": 'QC_COMPLETED',
+ "ALLOCATED_TO_PARTNER":'ALLOCATED_TO_PARTNER'
};
mandatoryFieldsValidations: any = [];
@@ -163,7 +164,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
if (data.status == 200) {
let masterData: any = data.records.pd_master_details;
this.pdMasterData.push(masterData[0]);
- if(this.pdMasterData[0].pd_status == 'COMPLETED') {
+ if((this.pdMasterData[0].fk_pd_type == '3' || this.pdMasterData[0].fk_pd_type == '2') && (this.pdMasterData[0].pd_status == 'COMPLETED' || this.pdMasterData[0].pd_status == 'QC_COMPLETED')) {
this.getVideoUrl(this.viewID,this.masterRandomString)
this.videoplayback.enableBtn = true;
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts
index e82d22d87..32fda8e70 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts
@@ -133,6 +133,9 @@ import { ImageDocsComponent } from './list-pd/start-pd/forms/image-docs/image-do
import { environment } from 'environments/environment'
import { CustomTitleCaseDirective } from '../pd-directive/custom-title-case.directive';
import { SpeedDialFabComponent } from './list-pd/view-pd/speed-dial-fab/speed-dial-fab.component';
+import { DynamicFormComponent } from './list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component';
+import { DynamicQuestionTemplateComponent } from './list-pd/start-pd/forms/dynamic-form/dynamic-question-template/dynamic-question-template.component';
+import { QuesFormService } from './list-pd/start-pd/forms/dynamic-form/ques-form/ques-form.service';
/**
* Custom angular notifier options
@@ -179,7 +182,8 @@ const pdCustomNotifierOptions: NotifierOptions = {
};
@NgModule({
- declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent,VendorPdAllocationComponent, DuplicatePdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent,PdCollectedDocsComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent ,ManageDailyPurchaseComponent, DailyPurchaseDetailsComponent, ManageRentalVerificationComponent, FuturePlansAndBusinessEnvironmentComponent, ImageCropComponent,PurchaseCalculationComponent,QueriesDocsComponent, ImageDocsComponent,CustomTitleCaseDirective, SpeedDialFabComponent],
+ declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent,VendorPdAllocationComponent, DuplicatePdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent,PdCollectedDocsComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent ,ManageDailyPurchaseComponent, DailyPurchaseDetailsComponent, ManageRentalVerificationComponent, FuturePlansAndBusinessEnvironmentComponent, ImageCropComponent,PurchaseCalculationComponent,QueriesDocsComponent, ImageDocsComponent,CustomTitleCaseDirective, SpeedDialFabComponent,
+ DynamicFormComponent,DynamicQuestionTemplateComponent],
imports: [
CommonModule,
ManagePdRoutingModule,
@@ -218,10 +222,11 @@ const pdCustomNotifierOptions: NotifierOptions = {
exports: [DuplicatePdComponent,VendorPdAllocationComponent,PdLocatedMapViewDirective, PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, 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,PurchaseCalculationComponent],
providers: [PdTrigerService, 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],
+ {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective,QuesFormService],
entryComponents: [DuplicatePdComponent,VendorPdAllocationComponent,PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent,
- ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent,PdCollectedDocsComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent,FuturePlansAndBusinessEnvironmentComponent,ImageCropComponent,QueriesDocsComponent],
+ ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent,PdCollectedDocsComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent,FuturePlansAndBusinessEnvironmentComponent,ImageCropComponent,QueriesDocsComponent,
+ DynamicFormComponent,DynamicQuestionTemplateComponent],
})
export class ManagePdModule {
}
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
index 74a50890f..c77251b7e 100755
--- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
+++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
@@ -368,6 +368,7 @@ export class PdTrigerService {
catchError(this.handleError('operation', []))
)
}
+
// load PD question answers
getAnswersForPD(list: any): Observable
{
@@ -945,7 +946,8 @@ export class PdTrigerService {
getVendorDatas(form_name,pd_id?) {
let formsDet = [{form_name:"general",form_id:"18"},{form_name:"address",form_id:"5"},{form_name:"business_info",form_id:"13"},
{form_name:"business_assets",form_id:"22"},{form_name:"neighbourhood_details",form_id:"19"},
- {form_name:"final_remarks",form_id:"20"}
+ {form_name:"final_remarks",form_id:"20"},
+ {form_name:"queries_form",form_id:"24"}
]
// let records = {"records":data[form_name]}
@@ -957,4 +959,21 @@ export class PdTrigerService {
getVendorAnswers(params):Observable {
return this._http.post(this.apiUrl+'getVendorAnswers',params)
}
+
+
+ covid19Ques() {
+ return this._http.get('../../../assets/sample_covid19_ques.json')
+ }
+
+ loadCreditPDTemplate(params) {
+ return this._http.post(this.apiUrl+'loadCreditPDTemplate', params)
+
+ // dummy data
+ // return this._http.get('../../../assets/sample_covid19_ques.json').map(result=>{
+ // console.log(result)
+ // let apivalue ={dataStatus:true,records:{template:JSON.stringify(result)}}
+ // console.log(apivalue)
+ // return apivalue
+ // })
+ }
}
diff --git a/ng6-seed/src/assets/sample_covid19_ques.json b/ng6-seed/src/assets/sample_covid19_ques.json
new file mode 100644
index 000000000..b4d884221
--- /dev/null
+++ b/ng6-seed/src/assets/sample_covid19_ques.json
@@ -0,0 +1,319 @@
+{
+ "section_id":"1",
+ "section_name":"Covid 19 Questions",
+ "onsubmit":null,
+ "questions":[
+ {
+ "question":" Is your business adversely impacted by coronavirus outbreak ?",
+ "question_key":"business_impacted_by_covid19",
+ "type":"2",
+ "field_width":"100",
+ "answers":[
+ {
+ "answer_id":"Yes",
+ "answer":"Yes"
+ },
+ {
+ "answer_id":"No",
+ "answer":"No"
+ }
+ ],
+ "api_properties":null,
+ "onchange_properties":[
+ {
+ "purpose":"FORM_CTRL",
+ "form_controls":[
+ {
+ "insert_index":"business_impacted_by_covid19",
+ "expression":"(String('business_impacted_by_covid19') == String('Yes'))",
+ "value_keys":[
+ "business_impacted_by_covid19"
+ ],
+ "questions":[
+ {
+ "question":"Choose any",
+ "question_key":"business_impacted_by_covid19_Yes",
+ "place_holder":"",
+ "field_type":"string",
+ "type":"9",
+ "field_width":"100",
+ "api_properties":null,
+ "onchange_properties":null,
+ "is_repeatable":null,
+ "answers":[
+ {
+ "answer_id":"Employees/labour not available",
+ "answer":"Employees/labour not available"
+ },
+ {
+ "answer_id":"business closed during lockdown",
+ "answer":"business closed during lockdown"
+ },
+ {
+ "answer_id":"sales reduced due to lockdown",
+ "answer":"sales reduced due to lockdown"
+ },
+ {
+ "answer_id":"sales not picking up post lock down etc",
+ "answer":"sales not picking up post lock down etc"
+ }
+ ],
+ "validations":[
+ {
+ "name":"required",
+ "isactive":"1",
+ "validator":"Validators.required",
+ "message":"Field required",
+ "value":null
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "purpose":"FORM_CTRL",
+ "form_controls":[
+ {
+ "insert_index":"business_impacted_by_covid19",
+ "expression":"(String('business_impacted_by_covid19') == String('No'))",
+ "value_keys":[
+ "business_impacted_by_covid19"
+ ],
+ "questions":[
+ {
+ "question":"Choose any",
+ "question_key":"business_impacted_by_covid19_No",
+ "place_holder":"",
+ "field_type":"string",
+ "type":"9",
+ "field_width":"100",
+ "api_properties":null,
+ "onchange_properties":null,
+ "is_repeatable":null,
+ "answers":[
+ {
+ "answer_id":"Business falls under essential services like chemist",
+ "answer":"Business falls under essential services like chemist"
+ },
+ {
+ "answer_id":" grocery store etc",
+ "answer":"grocery store etc"
+ }
+ ],
+ "validations":[
+ {
+ "name":"required",
+ "isactive":"1",
+ "validator":"Validators.required",
+ "message":"Field required",
+ "value":null
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "is_repeatable":null,
+ "validations":[
+ {
+ "name":"required",
+ "isactive":"1",
+ "validator":"Validators.required",
+ "message":"Field Required",
+ "value":null
+ }
+ ]
+ },
+ {
+ "question":" Did you avail the loan moratorium facility on your existing loans which is extended by your bank or financial institution? ",
+ "question_key":"avail_loan_moratorium_facility",
+ "type":"2",
+ "field_width":"100",
+ "onchange_properties":[],
+ "api_properties":null,
+ "answers":[
+ {
+ "answer":"Yes",
+ "answer_id":"Yes"
+ },
+ {
+ "answer":"No",
+ "answer_id":"No"
+ }
+ ],
+ "is_repeatable":null,
+ "validations":[
+ {
+ "name":"required",
+ "isactive":"1",
+ "validator":"Validators.required",
+ "message":"Field Required",
+ "value":null
+ }
+ ]
+ },
+ {
+ "question":"Are you planning to avail/ or already availed any loan or any other term facility for your business or personal use?",
+ "question_key":"avail_any_loan",
+ "type":"2",
+ "field_width":"100",
+ "api_properties":null,
+ "answers":[
+ {
+ "answer":"Yes",
+ "answer_id":"Yes"
+ },
+ {
+ "answer":"No",
+ "answer_id":"No"
+ }
+ ],
+ "onchange_properties":[
+ {
+ "purpose":"FORM_CTRL",
+ "form_controls":[
+ {
+ "insert_index":"avail_any_loan",
+ "expression":"(String('avail_any_loan') == String('Yes'))",
+ "value_keys":[
+ "avail_any_loan"
+ ],
+ "questions":[
+ {
+ "question":"Please specify amount, lender etc.",
+ "question_key":"avail_any_loan_Yes",
+ "type":"7",
+ "field_width":"100",
+ "api_properties":null,
+ "onchange_properties":null,
+ "is_repeatable":null,
+ "answers":[],
+ "validations":[
+ {
+ "name":"required",
+ "isactive":"1",
+ "validator":"Validators.required",
+ "message":"Field Required",
+ "value":null
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }],
+ "is_repeatable":null,
+ "validations":[
+ {
+ "name":"required",
+ "isactive":"1",
+ "validator":"Validators.required",
+ "message":"Field Required",
+ "value":null
+ }
+ ]
+ },
+ {
+ "question":"How much is your sales/revenue from April till date?",
+ "question_key":"sales_or_revenue_amt",
+ "place_holder":"Enter amount",
+ "type":"1",
+ "field_width":"100",
+ "answers":null,
+ "api_properties":null,
+ "is_repeatable":null,
+ "field_type":"numtoword",
+ "validations":[
+ {
+ "name":"required",
+ "isactive":"1",
+ "validator":"Validators.required",
+ "message":"Field Required",
+ "value":null
+ }
+ ]
+ },
+ {
+ "question":"Is turnover mentioned above validated?",
+ "question_key":"mentioned_turover_validated",
+ "type":"2",
+ "field_width":"100",
+ "api_properties":null,
+ "answers":[
+ {
+ "answer":"Yes",
+ "answer_id":"Yes"
+ },
+ {
+ "answer":"No",
+ "answer_id":"No"
+ }
+ ],
+ "onchange_properties":[
+ {
+ "purpose":"FORM_CTRL",
+ "form_controls":[
+ {
+ "insert_index":"mentioned_turover_validated",
+ "expression":"(String('mentioned_turover_validated') == String('Yes'))",
+ "value_keys":[
+ "mentioned_turover_validated"
+ ],
+ "questions":[
+ {
+ "question":"Choose any",
+ "question_key":"mentioned_turover_validated_Yes",
+ "place_holder":"",
+ "field_type":"string",
+ "type":"9",
+ "field_width":"100",
+ "api_properties":null,
+ "onchange_properties":null,
+ "is_repeatable":null,
+ "answers":[
+ {
+ "answer_id":"Bills",
+ "answer":"Bills"
+ },
+ {
+ "answer_id":"Gst returns",
+ "answer":"Gst returns"
+ },
+ {
+ "answer_id":"records shown",
+ "answer":"records shown"
+ }
+ ],
+ "validations":[
+ {
+ "name":"required",
+ "isactive":"1",
+ "validator":"Validators.required",
+ "message":"Field required",
+ "value":null
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "is_repeatable":null,
+ "validations":[
+ {
+ "name":"required",
+ "isactive":"1",
+ "validator":"Validators.required",
+ "message":"Field Required",
+ "value":null
+ }
+ ]
+ }
+
+ ]
+ }
\ No newline at end of file