diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts index 0b2e76ff2..28da9fe0a 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts @@ -6,6 +6,8 @@ import { NotifierService } from 'angular-notifier'; import { PdTrigerService } from '../../../pd-service/pd-triger.service'; import { ListPdComponent } from '../list-pd.component'; import { AwsService } from '../../../../AwsService/aws.service'; +/**sweet alert */ +import Swal from 'sweetalert2'; @Component({ selector: 'app-add-pd', templateUrl: './add-pd.component.html', @@ -486,11 +488,14 @@ export class AddPdComponent implements OnInit, OnDestroy { } } loadPdListCompoent(from:boolean) { + //alert(from); if(from){ + // alert('if'+from); this.router.navigate([ '../../' ], { relativeTo: this.route }); this.ListPdComponent.pdListLoad(true); } else{ + // alert(from); this.router.navigate([ '../../' ], { relativeTo: this.route }); this.ListPdComponent.showListView(true); } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html index ff8062495..1a890ce6e 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html @@ -17,30 +17,30 @@ PD Details --> - - - - Select - - - {{LL.full_name}} - - - - - + + + + Select + + + {{LL.full_name}} + + + - - - + + + + + - - + + Enter Valid Mobile Number. - + Enter Valid STD Code. @@ -49,7 +49,7 @@ Enter Valid Landline Number. - + Select @@ -61,7 +61,7 @@ - + Select @@ -74,7 +74,7 @@ - + Select @@ -83,7 +83,7 @@ - + Select @@ -94,7 +94,7 @@ - + {{"₹"}} {{loanAmtInWords}} Only @@ -106,7 +106,7 @@ - + Select @@ -118,7 +118,7 @@ - + Select diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index d28b5bf94..579ec64a2 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -1,275 +1,289 @@ - - -
-
- - -
-

{{master.lender_short_name}}

- {{master.branch_name}} -
- {{master.lender_applicant_id}}
- {{master.pd_date_of_initiation}}
+ + +
+
+ + +
+

{{master.lender_short_name}}

+ {{master.branch_name}} +
+ {{master.lender_applicant_id}}
+ {{master.pd_date_of_initiation}}
+
+    +
-    - -
- {{master.pd_allocated_to | titlecase}} - {{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}} - {{master.centralofficer | titlecase}}
- - {{master.scheduled_on}} + {{master.pd_allocated_to | titlecase}} + {{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}} + {{master.centralofficer | titlecase}}
-
-
-
- -
-
-
- - -
-
- - - - - - - -
-
-
-
- -
-
-
-
-
-
- -
-
- {{master.product_name}} / {{master.subproduct_name}} -
-
-
-
-
-
- -
-
- {{master.loan_amount}} -
-
-
-
-
-
- -
-
- {{master.pd_type_name}} -
-
-
-
-
-
- -
-
- {{master.addressline1}},
{{master.city_name}},
{{master.state_name}}-{{master.pincode}}
-
-
-
- -
-
-
-

Lender Contact Details

- -
-
-   {{master.pd_contact_person}} -
-
-
-
-   {{master.pd_contact_mobileno}} -
-
-
-
-
-
-

Remarks

- - {{master.remarks}} -
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -

PD Details

- - - Applicants -
- -
- - Applicants - - - - - -

- -  {{applicant.applicant_name}} -     - - -  {{applicant.mobile_no}} -     - - -  {{applicant.landline}} - - ( Main Applicant ) - {{applicant.relation_name}} -

-
-
-
- - -

No Applicant

-
-
-
- - Additional Requirements -
- -
- - Additional Requirements - - - - -

{{requirement.add_requirement}}

-
-
-
- - -

No Additional Requirements

-
-
-
- - Documents -
- - - - {{documents.pd_document_title}} - - - + {{master.scheduled_on}} +
- - -

No Document

-
-
-
- - QC Notes -
-
QC Notes
-
-

- {{ pdMasterData[0]?.qc_remarks}}

- -
- - QC Remarks -
-
-
QC Remarks
-
-
-
-
- {{ pdMasterData[0]?.qc_rating}} -
-
- -
-
-
-
-
- {{ pdMasterData[0]?.qc_feedback}} -
-
-
- - PD History -
- - - {{master.time}}  - {{master.user}}
{{master.log}}
- -
- -
+
+
+ +
+
+
+ + +
+
+ + + + + + + +
+
+
+
+ +
+
+
+
+
+
+ +
+
+ {{master.product_name}} / {{master.subproduct_name}} +
+
+
+
+
+
+ +
+
+ {{master.loan_amount}} +
+
+
+
+
+
+ +
+
+ {{master.pd_type_name}} +
+
+
+
+
+
+ +
+
+ {{master.addressline1}},
{{master.city_name}},
{{master.state_name}}-{{master.pincode}}
+
+
+
+
- - -

No History

-
-
- - - - - +
+
+

Lender Contact Details

+ +
+
+   {{master.pd_contact_person}} +
+
+
+
+   {{master.pd_contact_mobileno}} +
+
+
+
+
+
+

Remarks

+ + {{master.remarks}} +
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +

PD Details

+ + + Applicants + + +
+ Applicants +
+
+ +
+
+ + + +

+ +  {{applicant.applicant_name}} +     + + +  {{applicant.mobile_no}} +     + + +  {{applicant.landline}} + + ( Main Applicant ) + {{applicant.relation_name}} +

+
+
+
+ + +

No Applicant

+
+
+
+ + Additional Requirements + + + +
+ Additional Requirements +
+
+ +
+
+ + + +

{{requirement.add_requirement}}

+
+
+
+ + +

No Additional Requirements

+
+
+
+ + Documents + + + +

No Document

+
+
+
+ + QC Notes +
+
QC Notes
+
+

+ {{ pdMasterData[0]?.qc_remarks}}

+ +
+ + QC Remarks +
+
+
QC Remarks
+
+
+
+
+ {{ pdMasterData[0]?.qc_rating}} +
+
+ +
+
+
+
+
+ {{ pdMasterData[0]?.qc_feedback}} +
+
+
+ + PD History +
+ + + {{master.time}}  + {{master.user}}
{{master.log}}
+
+ +
+
+ + +

No History

+
+
+
+
+
+ + \ No newline at end of file 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 a5182125c..ce1e56fd8 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 @@ -30,6 +30,59 @@ export class ViewPdComponent implements OnInit, OnDestroy { masterPdLogsData: any=[]; applicantPDLogsData: any=[]; pdAdditionalReqData: any=[]; + FilteredFieldNames : any=[]; + localcount :any; + localstring : any; + localMandatoryFields: any= + [ {'backEnd_FieldName':"fk_lender_id",'frontEnd_FieldName':"Lender Name"}, + {'backEnd_FieldName':"lender_applicant_id",'frontEnd_FieldName':"Loan Applicant ID"}, + {'backEnd_FieldName':"fk_product_id",'frontEnd_FieldName':"Product Name"}, + {'backEnd_FieldName':"fk_subproduct_id",'frontEnd_FieldName':"Sub Product Name"}, + {'backEnd_FieldName':"fk_pd_type",'frontEnd_FieldName':"PD Type"}, + {'backEnd_FieldName':"fk_customer_segment",'frontEnd_FieldName':"Customer Segment"}, + {'backEnd_FieldName':"loan_amount",'frontEnd_FieldName':"Loan Amount"}, + {'backEnd_FieldName':"addressline1",'frontEnd_FieldName':"Address at which PD is to be done"}, + {'backEnd_FieldName':"fk_city",'frontEnd_FieldName':"City"}, + {'backEnd_FieldName':"fk_state",'frontEnd_FieldName':"State"}, + {'backEnd_FieldName':"pincode",'frontEnd_FieldName':"Pincode"}, + {'backEnd_FieldName':"pd_contact_person",'frontEnd_FieldName':"Lender Contact Person"}, + {'backEnd_FieldName':"pd_contact_mobileno",'frontEnd_FieldName':"Lender's Mobile Number"}, + {'backEnd_FieldName':"pd_branch_id",'frontEnd_FieldName':"Branch"}, + {'backEnd_FieldName':"pd_contact_landline",'frontEnd_FieldName':"Lender's Landline Number"}]; + // localMandatoryFields: any= + // ['fk_lender_id', + // 'lender_applicant_id', + // 'fk_product_id', + // 'fk_subproduct_id', + // 'fk_pd_type', + // 'fk_customer_segment', + // 'loan_amount', + // 'addressline1', + // 'fk_city', + // 'fk_state', + // 'pincode', + // 'pd_contact_person', + // 'pd_contact_mobileno', + // 'pd_branch_id', + // 'pd_contact_landline']; + + // localMandatoryFields2: any= + // [ "Lender Name", + // "Loan Applicant ID", + // "Product Name", + // "Sub Product Name", + // "PD Type", + // "Customer Segment", + // "Loan Amount", + // "Address at which PD is to be done", + // "City", + // "State", + // "Pincode", + // "Lender Contact Person", + // "Lender's Mobile Number", + // "Branch", + // "Lender's Landline Number"]; + viewID:string; viewParams:any; destroyType:number=1; @@ -119,9 +172,18 @@ export class ViewPdComponent implements OnInit, OnDestroy { width: '80%', disableClose: true }); - dialogPDMaster.afterClosed() - .subscribe(dataresult => { - // this.notifier.notify('success', 'Successfully allocated.!'); + dialogPDMaster.afterOpen() + .subscribe(dataresult => { + if(this.localcount == 1){ + let ffd : any = []; + this.FilteredFieldNames.forEach(field => { + ffd.push(field.frontEnd_FieldName); + }); + this.notifier.notify('info', 'Please Fill ' + ffd.join(',') + ' are Fields.!'); + } + }); + dialogPDMaster.afterClosed().subscribe(dataresult => { + this.viewPdDetails(this.viewID) }); } @@ -233,9 +295,26 @@ export class ViewPdComponent implements OnInit, OnDestroy { } // direct trigger the pd - directTriggerPD(data: any,pdid:string){ + directTriggerPD(data: any,masterdetail : any){ +/** */ +let pdid = masterdetail.pd_id; +let getValues = data.filter(val =>val).map(Val => Val); +this.FilteredFieldNames = getValues.map(x => { + let findIndex = this.localMandatoryFields.map(val => val.backEnd_FieldName).indexOf(x); + return this.localMandatoryFields[findIndex]; +}); + + + if(data.length>0){ - this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!'); + + // FilteredFieldNames.forEach(field => { + + // }); + this.localcount = 1; + this.editPdMaster(masterdetail); + + // alert(this.localMandatoryFields); } else { let lenderMasterArray = { @@ -276,4 +355,4 @@ export class ViewPdComponent implements OnInit, OnDestroy { } -} +} \ No newline at end of file