From c22e97e823786d9560fcafe5bd4755a9d9c5d6df Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 14 Nov 2018 15:37:53 +0530 Subject: [PATCH 01/45] personal details forms changes --- .../personal-info.component.html | 11 +++-- .../personal-info/personal-info.component.ts | 41 ++++++++++++++----- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html index 163347dd9..4975b3966 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html @@ -1,4 +1,4 @@ -
+ @@ -15,10 +15,13 @@ + + Enter Valid Age. + @@ -68,6 +71,8 @@ + Enter Valid Age. + @@ -117,7 +122,7 @@
Remarks - +
@@ -126,7 +131,7 @@
- +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts index 7f83ff4c8..08bb05415 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts @@ -38,7 +38,6 @@ export class PersonalInfoComponent implements OnInit { } ngOnInit() { - this.loadPDDetails(this.pdid,this.form_id); this.getRelationMaster(); this.mainApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 1); @@ -74,7 +73,7 @@ loadFormWithIDData(data) { let mainApplicantGroup = new FormArray(main_result.map((item,key) => new FormGroup({ name_ans:new FormControl(item.name_ans, Validators.required), - age_ans:new FormControl(item.age_ans, Validators.required), + age_ans:new FormControl(item.age_ans, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])), entity_ans:new FormControl(item.entity_ans, Validators.required), qualification_ans:new FormControl(item.qualification_ans, Validators.required), earning_ans:new FormControl(item.earning_ans, Validators.required), @@ -88,7 +87,7 @@ loadFormWithIDData(data) { coApplicantGroup = new FormArray(co_result.map((item,key) => new FormGroup({ name_ans:new FormControl(item.name_ans, Validators.required), - age_ans:new FormControl(item.age_ans, Validators.required), + age_ans:new FormControl(item.age_ans, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])), entity_ans:new FormControl(item.entity_ans, Validators.required), qualification_ans:new FormControl(item.qualification_ans, Validators.required), earning_ans:new FormControl(item.earning_ans, Validators.required), @@ -103,10 +102,10 @@ loadFormWithIDData(data) { name_id:new FormControl(0), age_ques:new FormControl(this.coApplicantQuestions[1]), age_id:new FormControl(1), - age_ans:new FormControl(null, Validators.required), + age_ans:new FormControl(null, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])), entity_ques: new FormControl(this.coApplicantQuestions[2]), entity_id: new FormControl(2), - entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr==='SP' ? 'Individual' : this.pd_all_details.pdmaster_details.customer_segment_abbr==='SNP' ? 'Individual' : '', Validators.required), + entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr.substring(0,3).toUpperCase()==='SAL' ? 'Individual' : '', Validators.required), qualification_ques: new FormControl(this.coApplicantQuestions[3]), qualification_id: new FormControl(3), qualification_ans:new FormControl(null, Validators.required), @@ -142,10 +141,10 @@ loadFormWithIDData(data) { name_id:new FormControl(0), age_ques:new FormControl(this.mainApplicantQuestions[1]), age_id:new FormControl(1), - age_ans:new FormControl(null, Validators.required), + age_ans:new FormControl(null, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])), entity_ques: new FormControl(this.mainApplicantQuestions[2]), entity_id: new FormControl(2), - entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr==='SP' ? 'Individual' : this.pd_all_details.pdmaster_details.customer_segment_abbr==='SNP' ? 'Individual' : '', Validators.required), + entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr.substring(0,3).toUpperCase()==='SAL' ? 'Individual' : '', Validators.required), qualification_ques: new FormControl(this.mainApplicantQuestions[3]), qualification_id: new FormControl(3), qualification_ans:new FormControl(null, Validators.required), @@ -161,10 +160,10 @@ loadFormWithIDData(data) { name_id:new FormControl(0), age_ques:new FormControl(this.coApplicantQuestions[1]), age_id:new FormControl(1), - age_ans:new FormControl(null, Validators.required), + age_ans:new FormControl(null, Validators.compose([Validators.required,Validators.minLength(1),Validators.maxLength(3),Validators.required,Validators.pattern('^[0-9]*$')])), entity_ques: new FormControl(this.coApplicantQuestions[2]), entity_id: new FormControl(2), - entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr==='SP' ? 'Individual' : this.pd_all_details.pdmaster_details.customer_segment_abbr==='SNP' ? 'Individual' : '', Validators.required), + entity_ans:new FormControl(this.pd_all_details.pdmaster_details.customer_segment_abbr.substring(0,3).toUpperCase()==='SAL' ? 'Individual' : '', Validators.required), qualification_ques: new FormControl(this.coApplicantQuestions[3]), qualification_id: new FormControl(3), qualification_ans:new FormControl(null, Validators.required), @@ -208,7 +207,14 @@ this.loadDataStatus = true; // submit forms details submitPersonalForm(formData:any) { - if(this._personalForm.valid){ + if (this._personalForm.invalid) { + this.validateAllFormFields(this._personalForm); + + // this.notifier.notify('warning', 'All Fields Are Required.!'); + + return; + } + else{ let main_applicantDetails:any=[]; let co_applicantDetails:any=[]; @@ -257,5 +263,20 @@ submitPersonalForm(formData:any) { } } +// validate all form group and form array fields +validateAllFormFields(formGroup: any) { + Object.keys(formGroup.controls).forEach(field => { + const control = formGroup.get(field); + + if (control instanceof FormControl) { + control.markAsTouched({ onlySelf: true }); + } else if (control instanceof FormGroup) { + this.validateAllFormFields(control); + } else if (control instanceof FormArray) { + this.validateAllFormFields(control); + } + }); +} + } From 7371772dd479664b5ebc7cce8935c3ad3cecb23e Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 14 Nov 2018 15:38:33 +0530 Subject: [PATCH 02/45] merge pd forms : kms --- .../app/dashboard/dashboard.component.html | 46 +- .../app/dashboard/dashboard.component.scss | 54 +- .../src/app/dashboard/dashboard.component.ts | 649 ++++++++++++------ .../src/app/dashboard/dashboard.service.ts | 5 +- 4 files changed, 541 insertions(+), 213 deletions(-) diff --git a/ng6-seed/src/app/dashboard/dashboard.component.html b/ng6-seed/src/app/dashboard/dashboard.component.html index 4f840d978..a0dbdb0f7 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.html +++ b/ng6-seed/src/app/dashboard/dashboard.component.html @@ -17,35 +17,51 @@ {{doughnutChartDataForTelePD.length}} -->
-
Full - {{total1}}
- - - -
+ + + +
{{total1}}
+
-
Smart - {{total2}}
+ +
{{total2}}
-
Tele - {{total3}}
+ +
{{total3}}
+
+
    +
  • Draft
  • +
  • Triggered
  • +
  • Allocated
  • +
  • Scheduled
  • +
  • InProgress
  • +
  • Completed
  • +
  • QC Completed
  • +
+
@@ -97,7 +113,7 @@ Alert warning - + @@ -122,7 +138,7 @@ - + @@ -148,7 +164,7 @@ - +

{{item.city_name}}

diff --git a/ng6-seed/src/app/dashboard/dashboard.component.scss b/ng6-seed/src/app/dashboard/dashboard.component.scss index fc7f8f15d..82b9bed74 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.scss +++ b/ng6-seed/src/app/dashboard/dashboard.component.scss @@ -8,10 +8,58 @@ mat-card-title{ padding-bottom: 1rem; margin-bottom: 0px; } +.oval { + height: 13px; + width: 25px; + border-radius: 50%; +} +.clas { + list-style-type: none; + margin: 0; + padding: 0; + overflow: hidden; +} +.cla { + font-size: 1rem; +} +.cla a { + display: block; + color: white; + text-align: center; + padding: 16px; + text-decoration: none; +} +.cla a:hover { + background-color: #111111; +} +.donut-inner{ +//c - with chart lender +//c margin-bottom: 154px; +//c margin-top: -187px; +//c margin-left: 145px; + margin-bottom: 154px; + margin-top: -152px; + margin-left: 142px; + //margin-bottom: 154px; + //margin-top: -221px; + //margin-left: 145px; + + //margin-bottom: 197px; + //margin-top: -251px; + //margin-left: 188px; +} .donut-inner h5 { margin-bottom: 5px; margin-top: 0; + } +.donut-inner span{ + font-size:1rems; +} +.chart{ + padding: 0rem !important; +} + // .profile { // position: relative; // width: 100%; @@ -549,6 +597,6 @@ mat-card-title{ // } -.chart{ - padding: 2rem; -} \ No newline at end of file +//.chart{ + // padding: 2rem; +//} \ No newline at end of file diff --git a/ng6-seed/src/app/dashboard/dashboard.component.ts b/ng6-seed/src/app/dashboard/dashboard.component.ts index cd1d19cb3..d60b96ba4 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.ts +++ b/ng6-seed/src/app/dashboard/dashboard.component.ts @@ -11,26 +11,48 @@ import { BaseChartDirective } from 'ng2-charts/ng2-charts'; templateUrl: './dashboard.component.html', styleUrls: ['./dashboard.component.scss'] }) - export class DashboardComponent { + dashboardTitle = 'Monthly Status'; @ViewChild('mycanvas') + myChart: BaseChartDirective; + canvas:ElementRef; + + doughnutChartType = 'doughnut'; + doughnutChartLabels: string[] = ['Draft','Triggered','Allocated','Scheduled','InProgress','Completed','QC Completed']; + doughnutChartDataForFullPD:any[]=[]; doughnutChartDataForSmartPD:any[]=[]; doughnutChartDataForTelePD:any[]=[]; - TempDataFullPD :number[]=[]; - TempDataSmartPD :number[]=[]; - TempDataTelePD :number[]=[]; + + tempDataFullPD :number[]=[]; + tempDataSmartPD :number[]=[]; + tempDataTelePD :number[]=[]; + total1: number = 0; total2: number = 0; total3: number = 0; - doughnutChartName:any; - citywisepd : any[]; - lenderpd :any[]; - message : any[]; - Status = false; + + cityWisePD : any[]; + lenderWisePD :any[]; + alertMessage : any[]; + legendArr : any[] = []; + + legendData: any; + + + // doughnutChartColors: any[] = [{ + // backgroundColor: ['#f44336', '#3f51b5', '#ffeb3b', '#4caf50', '#2196f3','#673ab7'] + // }]; + + doughnutChartColors: any[] = [{ + + //backgroundColor: ['#c1c1c1','#f44336','#3f51b5','#ffeb3b','#4caf50','#2196f3','#673ab7'] + backgroundColor: ['#c1c1c1','#f44336','#ffa500','#ffeb3b','#3f51b5','#00ff00','#4caf50'] + + }]; // globalChartOptionsFullPD: any = { // responsive: false, @@ -46,17 +68,47 @@ export class DashboardComponent { // position: 'bottom' // } // }; - globalChartOptions: any = { - responsive: false, - legend: { - display: true, - position: 'bottom' - } - }; - - TodayFullPD:any = []; - MonthlyFullPD:any = []; - + +// title: { +// display: true, +// position: "bottom", +// text: 'Upcoming Meetings' +// }, +// legend: { +// display: false +// }, +// centertext: "123" +globalChartOptions: any = { + responsive: false, + //legendCallback: this.getLegendCallback + //legendCallback: function (chart) { + // console.log(chart); + // return 'a'; + // } + legend: { + display: true, + position: 'bottom' + } +}; +//getColor(color) { + //switch (country) { + //case "#c1c1c1": + //return '#c1c1c1'; + //case "#f44336": + //return "#f44336"; + //case "#ffa500": + //return "#ffa500"; + //case "#ffeb3b": + //return "#ffeb3b"; + //case "#3f51b5": + //return "#3f51b5"; + //case "#00ff00": + //return "#00ff00"; + //case "#4caf50": + //return "#4caf50"; + //} + //} + constructor(private _dashboardService: DashboardService) { } @@ -65,126 +117,174 @@ export class DashboardComponent { //name: "DoughnutTextInside" ngOnInit(){ - - this.GetData(); - this.getDoNUT(); - - } + this.getPDSubCardData(); + this.getDoughnutChartData(); + let arr1 = this.doughnutChartLabels; + let arr2 = this.doughnutChartColors["0"].backgroundColor; +//console.log(arr1.length); +//console.log(arr2.length); +if(arr1.length == arr2.length){ + for(let i=0;i { - //console.log('Lender');console.log(data); - this.TodayFullPD = data.records; - - // console.log(this.TodayFullPD); - // console.log(this.TodayFullPD.current_day); - // console.log(this.TodayFullPD.current_week); - // console.log(this.TodayFullPD.current_month); - if(this.TodayFullPD.current_day.length != '0'){ - //console.log('If Condition day'); - } - else{ - //console.log('Else Condition day'); - } - - if(this.TodayFullPD.current_week.length != '0'){ - //console.log('If Condition week'); - } - else{ - //console.log('Else Condition week'); - } - - if(this.TodayFullPD.current_month.length != '0'){ - this.lenderpd = this.TodayFullPD.current_month; - console.log('******************** lender'); - console.log(this.lenderpd); - - // for(let contact of this.TodayFullPD.current_month) { - // let message = contact; - // } - - } - else{ - //console.log('Else Condition month'); - } -}); - this._dashboardService.getAlertDetail().subscribe(data => { - console.log('Alert*********************************');console.log(data); - this.message = data.records; - console.log(this.message); - }); - this._dashboardService.getCityDetail().subscribe(data => {console.log('City');console.log(data); - this.TodayFullPD = data.records; - - // console.log(this.TodayFullPD); - // console.log(this.TodayFullPD.current_day); - // console.log(this.TodayFullPD.current_week); - // console.log(this.TodayFullPD.current_month); - console.log('Whole',this.TodayFullPD); - console.log('Today only',this.TodayFullPD.current_day); - console.log('This week',this.TodayFullPD.current_week); - console.log('This month',this.TodayFullPD.current_month); - if(this.TodayFullPD.current_day.length != '0'){ + + console.log(' ***** Lender Wise *****'); + console.log('Lender Wise Whole Data',data); + + /** Daily Lender Datas */ + if(data.records.current_day.length != '0'){ //console.log('If Condition day'); } else{ //console.log('Else Condition day'); } - if(this.TodayFullPD.current_week.length != '0'){ + + + /** Weekly Lender Datas */ + if(data.records.current_week.length != '0'){ //console.log('If Condition week'); } else{ //console.log('Else Condition week'); } - if(this.TodayFullPD.current_month.length != '0'){ - this.citywisepd = this.TodayFullPD.current_month; - //console.log('citywisepd'); - //console.log(this.citywisepd); - //for(let contact of this.TodayFullPD.current_month) { - // let message = contact; - //} + + + /** Monthly Lender Datas */ + if(data.records.current_month.length != '0'){ + this.lenderWisePD = Object.keys(data.records.current_month).map(function(key) { + return data.records.current_month[key]; + }); + console.log('Monthly Status Lenderwise PD',this.lenderWisePD); + } else{ //console.log('Else Condition month'); } -}); + }); + + /** 2) Getting Citywise PD Details - Daily , Weekly and Monthly Data **/ + this._dashboardService.getCityDetail().subscribe(data => { + console.log(' ***** City Wise *****'); + console.log('City Wise Whole Data',data); + + /** Daily City Datas */ + if(data.records.current_day.length != '0'){ + //console.log('If Condition day'); + } + else{ + //console.log('Else Condition day'); + } + + /** Weekly City Datas */ + if(data.records.current_week.length != '0'){ + //console.log('If Condition week'); + } + else{ + //console.log('Else Condition week'); + } + + /** Monthly City Datas */ + if(data.records.current_month.length != '0'){ + + //this.cityWisePD = this.TodayFullPD.current_month; + + this.cityWisePD = Object.keys(data.records.current_month).map(function(key) { + return data.records.current_month[key]; + }); + + console.log('Monthly Status Citywise PD',this.cityWisePD); + + } + else{ + //console.log('Else Condition month'); + } + }); + + /** 3) Getting Alert Message of PD Details */ + this._dashboardService.getAlertDetail().subscribe(data => { + + console.log(' ***** Alert Message *****'); + console.log('Alert Message Whole Data',data); + this.alertMessage = data.records; + console.log('Alert Message',this.alertMessage); + }); + } -getDoNUT(){ + + +/** + * To Get and Display Doughnut Chart Data Based on PDType + **/ +getDoughnutChartData(){ + this._dashboardService.getPDDetailForDoughnut().subscribe(data => { - this.MonthlyFullPD = data.records; - - console.log('whole',this.MonthlyFullPD); - console.log('Today',this.MonthlyFullPD.current_day); - console.log('week',this.MonthlyFullPD.current_week); - console.log('month',this.MonthlyFullPD.current_month); - if(this.MonthlyFullPD.current_day.length != '0'){ + + console.log(' ***** Doughnut Chart Data *****'); + console.log('Whole Data',data); + + let DraftIndexvalue = this.doughnutChartLabels.indexOf('Draft'); + let TriggedIndexvalue = this.doughnutChartLabels.indexOf('Triggered'); + let AllocatedIndexvalue = this.doughnutChartLabels.indexOf('Allocated'); + let ScheduledIndexvalue = this.doughnutChartLabels.indexOf('Scheduled'); + let InProgressIndexvalue = this.doughnutChartLabels.indexOf('InProgress'); + let CompletedIndexvalue = this.doughnutChartLabels.indexOf('Completed'); + let QCCompletedIndexvalue = this.doughnutChartLabels.indexOf('QC Completed'); + + if(data.records.current_day.length != '0'){ //console.log('If Condition day'); + console.log('Today Status ',data.records.current_day); } else{ //console.log('Else Condition day'); } - if(this.MonthlyFullPD.current_week.length != '0'){ + + if(data.records.current_week.length != '0'){ //console.log('If Condition week'); + console.log('Weekly Status',data.records.current_week); } else{ //console.log('Else Condition week'); } - if(this.MonthlyFullPD.current_month.length != '0'){ + + if(data.records.current_month.length != '0'){ //console.log('If Condition monthLY'); - //this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); - let Monthly = this.MonthlyFullPD.current_month; - let MonthlyFullPDArr = Monthly.filter(arr=>arr.PDTYPE == 'FULL' ); - let MonthlySmartPDArr = Monthly.filter(arr=>arr.PDTYPE == 'SMART' ); - let MonthlyTelePDArr = Monthly.filter(arr=>arr.PDTYPE == 'TELE' ); + console.log('Monthly Status',data.records.current_month); + let MonthlyFullPDArr = data.records.current_month.filter(arr=>arr.PDTYPE == 'FULL' ); + let MonthlySmartPDArr = data.records.current_month.filter(arr=>arr.PDTYPE == 'SMART' ); + let MonthlyTelePDArr = data.records.current_month.filter(arr=>arr.PDTYPE == 'TELE' ); - let TriggedIndexvalue = this.doughnutChartLabels.indexOf('Triggered'); - let AllocatedIndexvalue = this.doughnutChartLabels.indexOf('Allocated'); - let ScheduledIndexvalue = this.doughnutChartLabels.indexOf('Scheduled'); - let InProgressIndexvalue = this.doughnutChartLabels.indexOf('InProgress'); - let CompletedIndexvalue = this.doughnutChartLabels.indexOf('Completed'); - let QCCompletedIndexvalue = this.doughnutChartLabels.indexOf('QC Completed'); + let DraftFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'DRAFT'); + if(DraftFullPDvalue.length != '0'){ + //console.log('console triggered value',TriggerFullPDvalue); + for(let FPD of DraftFullPDvalue){ + let y = +FPD.count; + this.total1 = this.total1+y; + this.tempDataFullPD[DraftIndexvalue] = y; + } + } + else{ + this.tempDataFullPD[DraftIndexvalue] = 0; + } let TriggerFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'TRIGGERED'); if(TriggerFullPDvalue.length != '0'){ @@ -192,11 +292,11 @@ getDoNUT(){ for(let FPD of TriggerFullPDvalue){ let y = +FPD.count; this.total1 = this.total1+y; - this.TempDataFullPD[TriggedIndexvalue] = y; + this.tempDataFullPD[TriggedIndexvalue] = y; } } else{ - this.TempDataFullPD[TriggedIndexvalue] = 0; + this.tempDataFullPD[TriggedIndexvalue] = 0; } let AllocatedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'ALLOCATED'); @@ -204,11 +304,11 @@ getDoNUT(){ for(let FPD of AllocatedFullPDvalue){ let y = +FPD.count; this.total1 = this.total1+y; - this.TempDataFullPD[AllocatedIndexvalue] = y; + this.tempDataFullPD[AllocatedIndexvalue] = y; } } else{ - this.TempDataFullPD[AllocatedIndexvalue] = 0; + this.tempDataFullPD[AllocatedIndexvalue] = 0; } let ScheduledFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'SCHEDULED'); @@ -216,13 +316,13 @@ getDoNUT(){ for(let FPD of ScheduledFullPDvalue){ let y = +FPD.count; this.total1 = this.total1+y; - this.TempDataFullPD[ScheduledIndexvalue] = y; + this.tempDataFullPD[ScheduledIndexvalue] = y; } //let y = +ScheduledFullPDvalue.count; } else{ - this.TempDataFullPD[ScheduledIndexvalue] = 0; + this.tempDataFullPD[ScheduledIndexvalue] = 0; } let InProgressFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'INPROGRESS'); @@ -230,13 +330,13 @@ getDoNUT(){ for(let FPD of InProgressFullPDvalue){ let y = +FPD.count; this.total1 = this.total1+y; - this.TempDataFullPD[InProgressIndexvalue] = y; + this.tempDataFullPD[InProgressIndexvalue] = y; } //let y = +InProgressFullPDvalue.count; } else{ - this.TempDataFullPD[InProgressIndexvalue] = 0; + this.tempDataFullPD[InProgressIndexvalue] = 0; } let CompletedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'COMPLETED'); @@ -244,13 +344,13 @@ getDoNUT(){ for(let FPD of CompletedFullPDvalue){ let y = +FPD.count; this.total1 = this.total1+y; - this.TempDataFullPD[CompletedIndexvalue] = y; + this.tempDataFullPD[CompletedIndexvalue] = y; } //let y = +CompletedFullPDvalue.count; } else{ - this.TempDataFullPD[CompletedIndexvalue] = 0; + this.tempDataFullPD[CompletedIndexvalue] = 0; } let QCCompletedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == "QC_COMPLETED"); @@ -258,13 +358,26 @@ getDoNUT(){ for(let FPD of QCCompletedFullPDvalue){ let y = +FPD.count; this.total1 = this.total1+y; - this.TempDataFullPD[QCCompletedIndexvalue] = y; + this.tempDataFullPD[QCCompletedIndexvalue] = y; } //let y = +QCCompletedFullPDvalue.count; } else{ - this.TempDataFullPD[QCCompletedIndexvalue] = 0; + this.tempDataFullPD[QCCompletedIndexvalue] = 0; + } + + let DraftSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'DRAFT'); + if(DraftSmartPDvalue.length != '0'){ + //console.log('console triggered value',TriggerFullPDvalue); + for(let FPD of DraftSmartPDvalue){ + let y = +FPD.count; + this.total2 = this.total2+y; + this.tempDataSmartPD[DraftIndexvalue] = y; + } + } + else{ + this.tempDataSmartPD[DraftIndexvalue] = 0; } let TriggerSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'TRIGGERED'); @@ -273,11 +386,11 @@ getDoNUT(){ for(let FPD of TriggerSmartPDvalue){ let y = +FPD.count; this.total2 = this.total2+y; - this.TempDataSmartPD[TriggedIndexvalue] = y; + this.tempDataSmartPD[TriggedIndexvalue] = y; } } else{ - this.TempDataSmartPD[TriggedIndexvalue] = 0; + this.tempDataSmartPD[TriggedIndexvalue] = 0; } let AllocatedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'ALLOCATED'); @@ -285,11 +398,11 @@ getDoNUT(){ for(let FPD of AllocatedSmartPDvalue){ let y = +FPD.count; this.total2 = this.total2+y; - this.TempDataSmartPD[AllocatedIndexvalue] = y; + this.tempDataSmartPD[AllocatedIndexvalue] = y; } } else{ - this.TempDataSmartPD[AllocatedIndexvalue] = 0; + this.tempDataSmartPD[AllocatedIndexvalue] = 0; } let ScheduledSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'SCHEDULED'); @@ -297,13 +410,13 @@ getDoNUT(){ for(let FPD of ScheduledSmartPDvalue){ let y = +FPD.count; this.total2 = this.total2+y; - this.TempDataSmartPD[ScheduledIndexvalue] = y; + this.tempDataSmartPD[ScheduledIndexvalue] = y; } //let y = +ScheduledFullPDvalue.count; } else{ - this.TempDataSmartPD[ScheduledIndexvalue] = 0; + this.tempDataSmartPD[ScheduledIndexvalue] = 0; } let InProgressSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'INPROGRESS'); @@ -311,13 +424,13 @@ getDoNUT(){ for(let FPD of InProgressSmartPDvalue){ let y = +FPD.count; this.total2 = this.total2+y; - this.TempDataSmartPD[InProgressIndexvalue] = y; + this.tempDataSmartPD[InProgressIndexvalue] = y; } //let y = +InProgressFullPDvalue.count; } else{ - this.TempDataSmartPD[InProgressIndexvalue] = 0; + this.tempDataSmartPD[InProgressIndexvalue] = 0; } let CompletedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'COMPLETED'); @@ -325,13 +438,13 @@ getDoNUT(){ for(let FPD of CompletedSmartPDvalue){ let y = +FPD.count; this.total2 = this.total2+y; - this.TempDataSmartPD[CompletedIndexvalue] = y; + this.tempDataSmartPD[CompletedIndexvalue] = y; } //let y = +CompletedFullPDvalue.count; } else{ - this.TempDataSmartPD[CompletedIndexvalue] = 0; + this.tempDataSmartPD[CompletedIndexvalue] = 0; } let QCCompletedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == "QC_COMPLETED"); @@ -339,26 +452,40 @@ getDoNUT(){ for(let FPD of QCCompletedSmartPDvalue){ let y = +FPD.count; this.total2 = this.total2+y; - this.TempDataSmartPD[QCCompletedIndexvalue] = y; + this.tempDataSmartPD[QCCompletedIndexvalue] = y; } //let y = +QCCompletedFullPDvalue.count; } else{ - this.TempDataSmartPD[QCCompletedIndexvalue] = 0; + this.tempDataSmartPD[QCCompletedIndexvalue] = 0; } + + let DraftTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'DRAFT'); + if(DraftTelePDvalue.length != '0'){ + + for(let FPD of DraftTelePDvalue){ + let y = +FPD.count; + this.total1 = this.total3+y; + this.tempDataTelePD[DraftIndexvalue] = y; + } + } + else{ + this.tempDataTelePD[DraftIndexvalue] = 0; + } + let TriggerTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'TRIGGERED'); if(TriggerTelePDvalue.length != '0'){ //console.log('console triggered value',TriggerTelePDvalue); for(let FPD of TriggerTelePDvalue){ let y = +FPD.count; this.total3 = this.total3+y; - this.TempDataTelePD[TriggedIndexvalue] = y; + this.tempDataTelePD[TriggedIndexvalue] = y; } } else{ - this.TempDataTelePD[TriggedIndexvalue] = 0; + this.tempDataTelePD[TriggedIndexvalue] = 0; } let AllocatedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'ALLOCATED'); @@ -366,11 +493,11 @@ getDoNUT(){ for(let FPD of AllocatedTelePDvalue){ let y = +FPD.count; this.total3 = this.total3+y; - this.TempDataTelePD[AllocatedIndexvalue] = y; + this.tempDataTelePD[AllocatedIndexvalue] = y; } } else{ - this.TempDataTelePD[AllocatedIndexvalue] = 0; + this.tempDataTelePD[AllocatedIndexvalue] = 0; } let ScheduledTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'SCHEDULED'); @@ -378,13 +505,13 @@ getDoNUT(){ for(let FPD of ScheduledTelePDvalue){ let y = +FPD.count; this.total3 = this.total3+y; - this.TempDataTelePD[ScheduledIndexvalue] = y; + this.tempDataTelePD[ScheduledIndexvalue] = y; } //let y = +ScheduledFullPDvalue.count; } else{ - this.TempDataTelePD[ScheduledIndexvalue] = 0; + this.tempDataTelePD[ScheduledIndexvalue] = 0; } let InProgressTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'INPROGRESS'); @@ -392,13 +519,13 @@ getDoNUT(){ for(let FPD of InProgressTelePDvalue){ let y = +FPD.count; this.total3 = this.total3+y; - this.TempDataTelePD[InProgressIndexvalue] = y; + this.tempDataTelePD[InProgressIndexvalue] = y; } //let y = +InProgressFullPDvalue.count; } else{ - this.TempDataTelePD[InProgressIndexvalue] = 0; + this.tempDataTelePD[InProgressIndexvalue] = 0; } let CompletedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'COMPLETED'); @@ -406,13 +533,13 @@ getDoNUT(){ for(let FPD of CompletedTelePDvalue){ let y = +FPD.count; this.total3 = this.total3+y; - this.TempDataTelePD[CompletedIndexvalue] = y; + this.tempDataTelePD[CompletedIndexvalue] = y; } //let y = +CompletedFullPDvalue.count; } else{ - this.TempDataTelePD[CompletedIndexvalue] = 0; + this.tempDataTelePD[CompletedIndexvalue] = 0; } let QCCompletedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == "QC_COMPLETED"); @@ -420,101 +547,101 @@ getDoNUT(){ for(let FPD of QCCompletedTelePDvalue){ let y = +FPD.count; this.total3 = this.total3+y; - this.TempDataTelePD[QCCompletedIndexvalue] = y; + this.tempDataTelePD[QCCompletedIndexvalue] = y; } //let y = +QCCompletedFullPDvalue.count; } else{ - this.TempDataTelePD[QCCompletedIndexvalue] = 0; + this.tempDataTelePD[QCCompletedIndexvalue] = 0; } // y: number - //console.log(MonthlyFullPDArr.pd_status); - // for(let FPD of MonthlyFullPDArr){ + //console.log(monthlyFullPDArr.pd_status); + // for(let FPD of monthlyFullPDArr){ // if(FPD.pd_status == 'TRIGGERED'){ // console.log('PD Status'); // let Indexvalue = this.doughnutChartLabels.indexOf('Triggered'); // let y = +FPD.count; // y: number - // console.log('Initial',this.TempDataFullPD); - // this.TempDataFullPD[Indexvalue] = y; - // console.log(this.TempDataFullPD); + // console.log('Initial',this.tempDataFullPD); + // this.tempDataFullPD[Indexvalue] = y; + // console.log(this.tempDataFullPD); // } // else{ // let Indexvalue = this.doughnutChartLabels.indexOf('Triggered'); - // this.TempDataFullPD[Indexvalue] = 0; + // this.tempDataFullPD[Indexvalue] = 0; // } // // if(contact.pd_status == 'TRIGGERED' && contact.PDTYPE == 'FULL'){ // // let Indexvalue = this.doughnutChartLabels.indexOf('Triggered'); // // var y = +contact.count; // y: number - // // console.log('Initial',this.TempDataFullPD); - // // this.TempDataFullPD[Indexvalue] = y; - // // console.log(this.TempDataFullPD); + // // console.log('Initial',this.tempDataFullPD); + // // this.tempDataFullPD[Indexvalue] = y; + // // console.log(this.tempDataFullPD); // // } // // else{ // // let Indexvalue = this.doughnutChartLabels.indexOf('Triggered'); - // // this.TempDataFullPD[Indexvalue] = 0; + // // this.tempDataFullPD[Indexvalue] = 0; // // } // if(FPD.pd_status == 'ALLOCATED'){ // let Indexvalue = this.doughnutChartLabels.indexOf('Allocated'); // var y = +FPD.count; // y: number - // // console.log(this.TempDataFullPD); - // this.TempDataFullPD[Indexvalue] = y; - // //console.log('allocated b4',TempDataFullPD); + // // console.log(this.tempDataFullPD); + // this.tempDataFullPD[Indexvalue] = y; + // //console.log('allocated b4',tempDataFullPD); // } // else{ // let Indexvalue = this.doughnutChartLabels.indexOf('Allocated'); - // this.TempDataFullPD[Indexvalue] = 0; + // this.tempDataFullPD[Indexvalue] = 0; // } // if(FPD.pd_status == 'INPROGRESS'){ // let Indexvalue = this.doughnutChartLabels.indexOf('InProgress'); // var y = +FPD.count; // y: number - // this.TempDataFullPD[Indexvalue] = y; - // //console.log('b4',TempDataFullPD); + // this.tempDataFullPD[Indexvalue] = y; + // //console.log('b4',tempDataFullPD); // } // else{ // let Indexvalue = this.doughnutChartLabels.indexOf('InProgress'); - // this.TempDataFullPD[Indexvalue] = 0; + // this.tempDataFullPD[Indexvalue] = 0; // } // if(FPD.pd_status == 'SCHEDULED'){ // let Indexvalue = this.doughnutChartLabels.indexOf('Scheduled'); // var y = +FPD.count; // y: number - // this.TempDataFullPD[Indexvalue] = y; - // //console.log('b4',TempDataFullPD); + // this.tempDataFullPD[Indexvalue] = y; + // //console.log('b4',tempDataFullPD); // } // else{ // let Indexvalue = this.doughnutChartLabels.indexOf('Scheduled'); - // this.TempDataFullPD[Indexvalue] = 0; - // //console.log('d',TempDataFullPD); + // this.tempDataFullPD[Indexvalue] = 0; + // //console.log('d',tempDataFullPD); // } // if(FPD.pd_status == 'COMPLETED'){ // let Indexvalue = this.doughnutChartLabels.indexOf('Completed'); // var y = +FPD.count; // y: number - // this.TempDataFullPD[Indexvalue] = y; - // //console.log('allocated',TempDataFullPD); + // this.tempDataFullPD[Indexvalue] = y; + // //console.log('allocated',tempDataFullPD); // } // else{ // let Indexvalue = this.doughnutChartLabels.indexOf('Completed'); - // this.TempDataFullPD[Indexvalue] = 0; + // this.tempDataFullPD[Indexvalue] = 0; // } - // //return TempDataFullPD; + // //return tempDataFullPD; // if(FPD.pd_status == 'QC COMPLETED'){ // let Indexvalue = this.doughnutChartLabels.indexOf('QC Completed'); // var y = +FPD.count; // y: number - // this.TempDataFullPD[Indexvalue] = y; - // //console.log('allocated',TempDataFullPD); + // this.tempDataFullPD[Indexvalue] = y; + // //console.log('allocated',tempDataFullPD); // } // else{ // let Indexvalue = this.doughnutChartLabels.indexOf('QC Completed'); - // this.TempDataFullPD[Indexvalue] = 0; - // //console.log('Final Data',TempDataFullPD); + // this.tempDataFullPD[Indexvalue] = 0; + // //console.log('Final Data',tempDataFullPD); // } - // //console.log('inside',this.TempDataFullPD); + // //console.log('inside',this.tempDataFullPD); // } //this.doughnutChartDataForFullPD = [3,4,5,6,7,8]; } @@ -522,16 +649,62 @@ getDoNUT(){ else{ //console.log('Else Condition month'); } - this.doughnutChartDataForFullPD = this.TempDataFullPD; - this.doughnutChartDataForSmartPD = this.TempDataSmartPD; - this.doughnutChartDataForTelePD = this.TempDataTelePD; + this.doughnutChartDataForFullPD = this.tempDataFullPD; + this.doughnutChartDataForSmartPD = this.tempDataSmartPD; + this.doughnutChartDataForTelePD = this.tempDataTelePD; console.log('Final full Data Completed',this.doughnutChartDataForFullPD); - console.log('Temp full Data',this.TempDataFullPD); + console.log('temp full Data',this.tempDataFullPD); console.log('Final Smart Data Completed',this.doughnutChartDataForSmartPD); - console.log('Temp Smart Data',this.TempDataSmartPD); + console.log('temp Smart Data',this.tempDataSmartPD); console.log('Final Tele Data Completed',this.doughnutChartDataForTelePD); - console.log('Temp Tele Data',this.TempDataTelePD); + console.log('temp Tele Data',this.tempDataTelePD); +//console.log(this.tempDataTelePD.__proto__); +//console.log(this.tempDataTelePD._chartjs); + +//console.log(this.doughnutChartDataForTelePD['event'].listeners["0"].chart.boxes["0"].legendItems); + +//chart.chart.ctx; + + /*beforeDraw: function (this.doughnutChartDataForTelePD.chart) { + if (chart.config.options.elements.center) { + //Get ctx from string + var ctx = chart.chart.ctx; + + //Get options from the center object in options + var centerConfig = chart.config.options.elements.center; + var fontStyle = centerConfig.fontStyle || 'Arial'; + var txt = centerConfig.text; + var color = centerConfig.color || '#000'; + var sidePadding = centerConfig.sidePadding || 20; + var sidePaddingCalculated = (sidePadding/100) * (chart.innerRadius * 2) + //Start with a base font of 30px + ctx.font = "30px " + fontStyle; + + //Get the width of the string and also the width of the element minus 10 to give it 5px side padding + var stringWidth = ctx.measureText(txt).width; + var elementWidth = (chart.innerRadius * 2) - sidePaddingCalculated; + + // Find out how much the font can grow in width. + var widthRatio = elementWidth / stringWidth; + var newFontSize = Math.floor(30 * widthRatio); + var elementHeight = (chart.innerRadius * 2); + + // Pick a new font size so it will not be larger than the height of label. + var fontSizeToUse = Math.min(newFontSize, elementHeight); + + //Set font settings to draw it correctly. + ctx.textAlign = 'center'; + ctx.textBaseline = 'middle'; + var centerX = ((chart.chartArea.left + chart.chartArea.right) / 2); + var centerY = ((chart.chartArea.top + chart.chartArea.bottom) / 2); + ctx.font = fontSizeToUse+"px " + fontStyle; + ctx.fillStyle = color; + + //Draw text in center + ctx.fillText(txt, centerX, centerY); + } + }*/ }) } @@ -542,36 +715,124 @@ getDoNUT(){ // }]; // }, 100); -doughnutChartColors: any[] = [{ - backgroundColor: ['#f44336', '#3f51b5', '#ffeb3b', '#4caf50', '#2196f3','#673ab7'] -}]; - -doughnutChartType = 'doughnut'; -doughnutChartLabels: string[] = ['Triggered', 'Allocated','Scheduled','InProgress','Completed','QC Completed']; doughnutOptionsFullPD: any = Object.assign({ elements: { arc: { borderWidth: 0.2 } - } -}, this.globalChartOptions); + }, + title: { + display: true, + position: "top", + text: 'Full', + fontSize: 15, + }, + centertext:'One' +},this.globalChartOptions); doughnutOptionsSmartPD: any = Object.assign({ elements: { arc: { borderWidth: 0.2 } - } -}, this.globalChartOptions); + }, + title: { + display: true, + position: "top", + text: 'Smart', + fontSize: 15 + }, + centertext:'Two' +}, +this.globalChartOptions); doughnutOptionsTelePD: any = Object.assign({ elements: { arc: { borderWidth: 0.2 } - } + }, + title: { + display: true, + position: "top", + text: 'Tele', + fontSize: 15 + }, + centertext:'Three' }, this.globalChartOptions); - -chartfunction(){ this.Status = true; } -} \ No newline at end of file + +// Chart.pluginService.register({ +// beforeDraw: function(chart) { +// var width = chart.chart.width, +// height = chart.chart.height, +// ctx = chart.chart.ctx; + +// ctx.restore(); +// var fontSize = (height / 114).toFixed(2); +// ctx.font = fontSize + "em sans-serif"; +// ctx.textBaseline = "middle"; + +// var text = "75%", +// textX = Math.round((width - ctx.measureText(text).width) / 2), +// textY = height / 2; + +// ctx.fillText(text, textX, textY); +// ctx.save(); +// } +// }); + +} + +// import {Component, NgModule, ElementRef, Inject, ViewChild} from '@angular/core' +// import {BrowserModule} from '@angular/platform-browser' +// import {ChartsModule, Color} from 'ng2-charts'; + +// @Component({ +// selector: 'app-dashboard', +// templateUrl: './dashboard.component.html', +// styleUrls: ['./dashboard.component.scss'] +// }) + + +// export class DashboardComponent { + +// @ViewChild('mycanvas') +// canvas:ElementRef; +// doughnutChartDataForTelePD:number[]=[1,2,3,4,5,6]; +// options: { circumference: number; rotation: number; animation: { onComplete: () => void; }; }; + +// ngOnInit(){ +// var ctx = this.canvas.nativeElement.getContext("2d"); + +// let me = this; +// this.options = { + +// circumference: Math.PI, +// rotation : Math.PI, +// animation:{ onComplete: function() { +// me.doit(ctx); +// }} +// } + +// } + +// doit(ctx) { +// // Chart.types.Doughnut.prototype.draw.apply(this, arguments); + +// var width = this.canvas.nativeElement.clientWidth, +// height = this.canvas.nativeElement.clientHeight; + +// var fontSize = (height / 250).toFixed(2); +// ctx.font = fontSize + "em Verdana"; +// ctx.textBaseline = "middle"; +// ctx.fillStyle = "blue"; + +// var text = "Pass Rate 82%", +// textX = Math.round((width - ctx.measureText(text).width) / 2), +// textY = height -10; + +// ctx.fillText(text, textX, textY); +// ctx.restore(); +// } +// } \ No newline at end of file diff --git a/ng6-seed/src/app/dashboard/dashboard.service.ts b/ng6-seed/src/app/dashboard/dashboard.service.ts index e87616fad..56514a881 100644 --- a/ng6-seed/src/app/dashboard/dashboard.service.ts +++ b/ng6-seed/src/app/dashboard/dashboard.service.ts @@ -14,7 +14,10 @@ import { environment } from 'environments/environment'; /** Consant Value For Created Date And Updated Date */ const currentdate = new Date().toJSON().slice(0,19).replace('T',' '); -@Injectable() + +@Injectable({ + providedIn: 'root' +}) export class DashboardService { From 2b039e28d54028224e167cc5c5fc87a82ed35dee Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Wed, 14 Nov 2018 17:03:48 +0530 Subject: [PATCH 03/45] build issues changes , entity , masters - kdk --- .../src/app/dashboard/dashboard.service.ts | 4 +- .../app/settings/entity/entity.component.ts | 14 +- .../src/app/settings/entity/entity.module.ts | 10 +- .../src/app/settings/entity/entity.routing.ts | 2 +- ...ry_classification-dialog.component.spec.ts | 10 +- .../pd-notification-list.component.spec.ts | 10 +- .../pd-team-list/pd-team-list.component.html | 136 ++++++++---------- .../app/settings/pd-team/pd-team.module.ts | 4 +- .../service/masters/masters.service.ts | 4 +- .../service/masters/pd-team.service.ts | 4 +- ng6-seed/src/app/settings/settings.module.ts | 4 +- .../src/app/settings/users/users.module.ts | 3 +- 12 files changed, 100 insertions(+), 105 deletions(-) diff --git a/ng6-seed/src/app/dashboard/dashboard.service.ts b/ng6-seed/src/app/dashboard/dashboard.service.ts index e87616fad..0e4384116 100644 --- a/ng6-seed/src/app/dashboard/dashboard.service.ts +++ b/ng6-seed/src/app/dashboard/dashboard.service.ts @@ -14,7 +14,9 @@ import { environment } from 'environments/environment'; /** Consant Value For Created Date And Updated Date */ const currentdate = new Date().toJSON().slice(0,19).replace('T',' '); -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class DashboardService { diff --git a/ng6-seed/src/app/settings/entity/entity.component.ts b/ng6-seed/src/app/settings/entity/entity.component.ts index 81b196f17..eed9accb7 100644 --- a/ng6-seed/src/app/settings/entity/entity.component.ts +++ b/ng6-seed/src/app/settings/entity/entity.component.ts @@ -1,7 +1,7 @@ -import { Component } from '@angular/core'; -@Component({ - template: `

Entity Master Details List

- ` -}) -export class EntityComponent { -} \ No newline at end of file +// import { Component } from '@angular/core'; +// @Component({ +// template: `

Entity Master Details List

+// ` +// }) +// export class EntityComponent { +// } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/entity/entity.module.ts b/ng6-seed/src/app/settings/entity/entity.module.ts index 44148d555..a6a5d04e7 100644 --- a/ng6-seed/src/app/settings/entity/entity.module.ts +++ b/ng6-seed/src/app/settings/entity/entity.module.ts @@ -22,7 +22,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; import { EntityRouting } from './entity.routing'; -import { EntityComponent } from './entity.component'; +// import { EntityComponent } from './entity.component'; import { EntityListComponent } from './entity-list/entity.list.component'; import { EntityAddComponent } from './entity-add/entity.add.component'; import { EntityEditComponent } from './entity-edit/entity.edit.component'; @@ -38,7 +38,7 @@ import { EntityEditBillingInfoComponent } from './entity-edit/entity-edit-billin import { DialogAddEditBillingInfo } from './entity-edit/entity-edit-billing-info/entity-edit-billing-info.component'; import { EntityEditVendorCityInfoComponent } from './entity-edit/entity-edit-vendor-city-info/entity-edit-vendor-city-info.component'; -import { MatTooltipModule } from '@angular/material/tooltip'; +// import { MatTooltipModule } from '@angular/material/tooltip'; /** * Custom angular notifier options */ @@ -96,7 +96,7 @@ const customNotifierOptions: NotifierOptions = { MatProgressBarModule,MatDialogModule, MatSortModule, MatToolbarModule,MatSelectModule,MatListModule, MatMenuModule, MatCheckboxModule, - MatTooltipModule, + // MatTooltipModule, MatTabsModule, MatChipsModule, MatExpansionModule, @@ -105,7 +105,7 @@ const customNotifierOptions: NotifierOptions = { ReactiveFormsModule ], declarations: [ - EntityComponent, + // EntityComponent, EntityListComponent, EntityEditComponent, EntityAddComponent, @@ -118,7 +118,7 @@ const customNotifierOptions: NotifierOptions = { EntityEditVendorCityInfoComponent ], entryComponents: [ - // EntityEditComponent + EntityEditComponent, DialogAddEditBillingInfo, DialogEntityAddTatComponent, EntityAddComponent diff --git a/ng6-seed/src/app/settings/entity/entity.routing.ts b/ng6-seed/src/app/settings/entity/entity.routing.ts index dd088e903..da8366b0e 100644 --- a/ng6-seed/src/app/settings/entity/entity.routing.ts +++ b/ng6-seed/src/app/settings/entity/entity.routing.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; // Entity Component -import { EntityComponent } from './entity.component'; +// import { EntityComponent } from './entity.component'; import { EntityListComponent } from './entity-list/entity.list.component'; import { EntityAddComponent } from './entity-add/entity.add.component'; import { EntityEditComponent } from './entity-edit/entity.edit.component'; diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts index 1a9feee41..045a2017c 100644 --- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts +++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IndustryMasterDialogComponent } from './industry-master-dialog.component'; +import { IndustryClassificationDialogComponent } from './industry_classification-dialog.component'; describe('IndustryMasterDialogComponent ', () => { - let component: IndustryMasterDialogComponent ; - let fixture: ComponentFixture; + let component: IndustryClassificationDialogComponent ; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ IndustryMasterDialogComponent ] + declarations: [ IndustryClassificationDialogComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(IndustryMasterDialogComponent ); + fixture = TestBed.createComponent(IndustryClassificationDialogComponent ); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.spec.ts index 22d79c3df..2a4fc995a 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.spec.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { PdAllocationTypeListComponent } from './pd-allocation-type-list.component'; +import { PdNotificationListComponent } from './pd-notification-list.component'; describe('PdAllocationTypeListComponent', () => { - let component: PdAllocationTypeListComponent; - let fixture: ComponentFixture; + let component: PdNotificationListComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ PdAllocationTypeListComponent ] + declarations: [ PdNotificationListComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(PdAllocationTypeListComponent); + fixture = TestBed.createComponent(PdNotificationListComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html index e20d2a1f1..c81881908 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html @@ -1,90 +1,78 @@
-
- PD Team -
-
- - +
+ PD Team +
+
+ -
-
-
+
+
+
+
+ +
+ + + + +
+
- -
- - - -
+ - -
- - - - - Sl - {{row.serialno}} - - - - Team - {{row.team_name}} - + + Sl + {{row.serialno}} + - - Lender - {{row.lender_name}} - - - - Active - - - - - - - - Action - - - - - - - - - - - - - -
+ + Team + {{row.team_name}} + + + Lender + {{row.lender_name}} + - + + Active + + + + + + - - + + Action + + + + + + + + + + + + + +
+ +
- -
+ + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/pd-team/pd-team.module.ts b/ng6-seed/src/app/settings/pd-team/pd-team.module.ts index dac9173f9..5dd92d6e3 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team.module.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team.module.ts @@ -94,14 +94,14 @@ const customNotifierOptions: NotifierOptions = { MatProgressBarModule, MatDialogModule, MatSortModule, - MatToolbarModule, MatSelectModule, FlexLayoutModule, NgxMatSelectSearchModule, NgxDatatableModule, MatSortModule, MatSlideToggleModule, - MatTooltipModule,MatListModule,DragulaModule, + MatTooltipModule, + MatListModule,DragulaModule, NotifierModule.withConfig(customNotifierOptions), ], declarations: [ diff --git a/ng6-seed/src/app/settings/service/masters/masters.service.ts b/ng6-seed/src/app/settings/service/masters/masters.service.ts index eb8d45625..67a22174f 100644 --- a/ng6-seed/src/app/settings/service/masters/masters.service.ts +++ b/ng6-seed/src/app/settings/service/masters/masters.service.ts @@ -21,7 +21,9 @@ export interface Master { constant_name:string; } -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class MastersService { diff --git a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts index 1a837032a..544aa2401 100644 --- a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts +++ b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts @@ -14,7 +14,9 @@ const currentdate = new Date().toJSON().slice(0,19).replace('T',' '); /** Environment */ import { environment } from 'environments/environment'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PdTeamService { diff --git a/ng6-seed/src/app/settings/settings.module.ts b/ng6-seed/src/app/settings/settings.module.ts index 1278c61a9..102385a5b 100644 --- a/ng6-seed/src/app/settings/settings.module.ts +++ b/ng6-seed/src/app/settings/settings.module.ts @@ -25,7 +25,7 @@ import { UserListComponent } from './users/user-list/user-list.component'; import { RouterModule } from '@angular/router'; import { SettingsRoutes } from './settings.routing'; import { RegisterComponent } from '../session/register/register.component'; -import { UserService } from './service/user.service'; +// import { UserService } from './service/user.service'; import { MastersModule } from './masters/masters.module'; import { PdTeamModule } from './pd-team/pd-team.module'; @@ -50,7 +50,7 @@ import { EntityModule } from './entity/entity.module'; ], providers:[ - UserService + // UserService ], // declarations: [AddEntityComponent, EditEntityComponent, EntityListComponent] diff --git a/ng6-seed/src/app/settings/users/users.module.ts b/ng6-seed/src/app/settings/users/users.module.ts index 0f8c5e310..debf4f1a2 100644 --- a/ng6-seed/src/app/settings/users/users.module.ts +++ b/ng6-seed/src/app/settings/users/users.module.ts @@ -23,6 +23,7 @@ import { RegisterComponent } from './register/register.component'; import { UserListComponent} from './user-list/user-list.component'; import { UserProfileComponent, ChangePasswordDialog } from './user-profile/user-profile.component'; +import { UserService } from './../service/user.service'; import { NewPasswordDialog, ForgotPass } from '../../session/login/login.component'; // import { HttpClientModule } from '@angular/common/http'; @NgModule({ @@ -41,7 +42,7 @@ import { NewPasswordDialog, ForgotPass } from '../../session/login/login.compone // HttpClientModule, ], declarations: [UserListComponent, RegisterComponent,UserProfileComponent], - + providers: [ UserService ] }) export class UsersModule { } From 884112a623020620937982aecd7ee5325a36c7b3 Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Wed, 14 Nov 2018 17:32:52 +0530 Subject: [PATCH 04/45] start pd dynamic from list load : kdk --- .../list-pd/start-pd/start-pd.component.ts | 119 +++++++++--------- 1 file changed, 60 insertions(+), 59 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts index 026e6a552..627291c50 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts @@ -46,69 +46,69 @@ export class StartPdComponent implements OnInit, OnDestroy { // category static form buttons - categoryFormButtons: any = [ - { - "form_id": 1, - "form_name": "Supplier Details" - }, - { - "form_id": 2, - "form_name": "Client Details", - }, - { - "form_id": 3, - "form_name": "Personal Details", - }, - { - "form_id":4, - "form_name":"Asset Details", - }, - { - "form_id": 5, - "form_name": "Address" - }, - { - "form_id": 6, - "form_name": "Family", - }, - { - "form_id": 7, - "form_name": "Banking", - }, - { - "form_id": 8, - "form_name": "Current Loan", - }, - { - "form_id": 9, - "form_name": "Other Income", - }, - { - "form_id": 10, - "form_name": "Loan Details", - }, - { - "form_id": 11, - "form_name": "Stock", - }, - { - "form_id": 12, - "form_name": "Employmet Info", - }, - { - "form_id": 13, - "form_name": "Business Info", - }, - { - "form_id": 14, - "form_name": "Financial Info", - }, - ]; + // categoryFormButtons: any = [ + // { + // "form_id": 1, + // "form_name": "Supplier Details" + // }, + // { + // "form_id": 2, + // "form_name": "Client Details", + // }, + // { + // "form_id": 3, + // "form_name": "Personal Details", + // }, + // { + // "form_id":4, + // "form_name":"Asset Details", + // }, + // { + // "form_id": 5, + // "form_name": "Address" + // }, + // { + // "form_id": 6, + // "form_name": "Family", + // }, + // { + // "form_id": 7, + // "form_name": "Banking", + // }, + // { + // "form_id": 8, + // "form_name": "Current Loan", + // }, + // { + // "form_id": 9, + // "form_name": "Other Income", + // }, + // { + // "form_id": 10, + // "form_name": "Loan Details", + // }, + // { + // "form_id": 11, + // "form_name": "Stock", + // }, + // { + // "form_id": 12, + // "form_name": "Employmet Info", + // }, + // { + // "form_id": 13, + // "form_name": "Business Info", + // }, + // { + // "form_id": 14, + // "form_name": "Financial Info", + // }, + // ]; pdFullDetails:any=[]; // category static form buttons -// categoryFormButtons: any; + categoryFormButtons: any; // = [ // { // "form_id": 1, @@ -293,6 +293,7 @@ pdFullDetails:any=[]; if (data.status == 200) { this.pdMasterList=data.records.pdmaster_details; this.categoryList=data.records.question_answers; + this.categoryFormButtons = data.records.template_forms; let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1); this.mainApplicantName = filterApplicantName[0].applicant_name; this.currentPDStatus = data.records.pdmaster_details.pd_status; From b9952b5d4c59dcdf6284fb083f32fe83c317a287 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 14 Nov 2018 17:52:00 +0530 Subject: [PATCH 05/45] personal details master changes --- .../personal-info.component.html | 16 +++++----- .../personal-info/personal-info.component.ts | 29 ++++++++++++++----- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html index 4975b3966..9871211b6 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html @@ -30,16 +30,16 @@ - - {{education}} + + {{education.qualification_name}} - - {{earning}} + + {{earning.earning_member_status}} @@ -83,8 +83,8 @@ - - {{education}} + + {{education.qualification_name}} @@ -92,8 +92,8 @@ - - {{earning}} + + {{earning.earning_member_status}} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts index 08bb05415..b4f00e5c2 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts @@ -11,9 +11,12 @@ import { Key } from 'protractor'; }) export class PersonalInfoComponent implements OnInit { - qualifications:any=["Graduate","Under Graduate","Post Graduate","Professional"]; - earningStatus:any=["Earning Member","House Wife","Student","Retired","Pensioner","Other Non earning member"]; + //qualifications:any=["Graduate","Under Graduate","Post Graduate","Professional"]; + //earningStatus:any=["Earning Member","House Wife","Student","Retired","Pensioner","Other Non earning member"]; + earningStatus:any=[]; + qualifications:any=[]; relationShipList:any=[]; + @Input() pdid : string; @Input() pd_all_details:any; form_id:number; @@ -39,7 +42,9 @@ export class PersonalInfoComponent implements OnInit { ngOnInit() { this.loadPDDetails(this.pdid,this.form_id); - this.getRelationMaster(); + this.getMasterDetails('RELATIONSHIPS',1); + this.getMasterDetails('EARNINGMEMBERSSTATUS',2); + this.getMasterDetails('EDUQUALIFICATION',3); this.mainApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 1); // console.log(this.mainApplicantDetails) this.coApplicantDetails = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type == 0); @@ -194,16 +199,26 @@ this.loadDataStatus = true; get pdCoapplicant() {return this._personalForm.get('coItem') as FormArray;} // get relation master details - getRelationMaster(){ - let relation ="RELATIONSHIPS"; - this._pd.getAllMasterDatas(relation).subscribe( + getMasterDetails(table:string,type:number){ + //let relation ="RELATIONSHIPS"; + this._pd.getAllMasterDatas(table).subscribe( data => { if (data.status == 200) { - this.relationShipList=data.records; + if(type==1){ + this.relationShipList=data.records; + } + else if(type==2){ + this.earningStatus=data.records; + } + else if(type==3){ + this.qualifications=data.records; + } + } }, error => this.errorMessage = error); } +// get earning master details // submit forms details submitPersonalForm(formData:any) { From b492f2b42d71322808d69982e98776a4d6c7570c Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 14 Nov 2018 17:52:48 +0530 Subject: [PATCH 06/45] merge pd form master : kms --- .../src/app/dashboard/dashboard.service.ts | 1 - .../list-pd/start-pd/start-pd.component.ts | 119 +++++++-------- .../app/settings/entity/entity.component.ts | 14 +- .../src/app/settings/entity/entity.module.ts | 10 +- .../src/app/settings/entity/entity.routing.ts | 2 +- ...ry_classification-dialog.component.spec.ts | 10 +- .../pd-notification-list.component.spec.ts | 10 +- .../pd-team-list/pd-team-list.component.html | 136 ++++++++---------- .../app/settings/pd-team/pd-team.module.ts | 4 +- .../service/masters/masters.service.ts | 4 +- .../service/masters/pd-team.service.ts | 4 +- ng6-seed/src/app/settings/settings.module.ts | 4 +- .../src/app/settings/users/users.module.ts | 3 +- 13 files changed, 157 insertions(+), 164 deletions(-) diff --git a/ng6-seed/src/app/dashboard/dashboard.service.ts b/ng6-seed/src/app/dashboard/dashboard.service.ts index 56514a881..0e4384116 100644 --- a/ng6-seed/src/app/dashboard/dashboard.service.ts +++ b/ng6-seed/src/app/dashboard/dashboard.service.ts @@ -14,7 +14,6 @@ import { environment } from 'environments/environment'; /** Consant Value For Created Date And Updated Date */ const currentdate = new Date().toJSON().slice(0,19).replace('T',' '); - @Injectable({ providedIn: 'root' }) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts index 026e6a552..627291c50 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts @@ -46,69 +46,69 @@ export class StartPdComponent implements OnInit, OnDestroy { // category static form buttons - categoryFormButtons: any = [ - { - "form_id": 1, - "form_name": "Supplier Details" - }, - { - "form_id": 2, - "form_name": "Client Details", - }, - { - "form_id": 3, - "form_name": "Personal Details", - }, - { - "form_id":4, - "form_name":"Asset Details", - }, - { - "form_id": 5, - "form_name": "Address" - }, - { - "form_id": 6, - "form_name": "Family", - }, - { - "form_id": 7, - "form_name": "Banking", - }, - { - "form_id": 8, - "form_name": "Current Loan", - }, - { - "form_id": 9, - "form_name": "Other Income", - }, - { - "form_id": 10, - "form_name": "Loan Details", - }, - { - "form_id": 11, - "form_name": "Stock", - }, - { - "form_id": 12, - "form_name": "Employmet Info", - }, - { - "form_id": 13, - "form_name": "Business Info", - }, - { - "form_id": 14, - "form_name": "Financial Info", - }, - ]; + // categoryFormButtons: any = [ + // { + // "form_id": 1, + // "form_name": "Supplier Details" + // }, + // { + // "form_id": 2, + // "form_name": "Client Details", + // }, + // { + // "form_id": 3, + // "form_name": "Personal Details", + // }, + // { + // "form_id":4, + // "form_name":"Asset Details", + // }, + // { + // "form_id": 5, + // "form_name": "Address" + // }, + // { + // "form_id": 6, + // "form_name": "Family", + // }, + // { + // "form_id": 7, + // "form_name": "Banking", + // }, + // { + // "form_id": 8, + // "form_name": "Current Loan", + // }, + // { + // "form_id": 9, + // "form_name": "Other Income", + // }, + // { + // "form_id": 10, + // "form_name": "Loan Details", + // }, + // { + // "form_id": 11, + // "form_name": "Stock", + // }, + // { + // "form_id": 12, + // "form_name": "Employmet Info", + // }, + // { + // "form_id": 13, + // "form_name": "Business Info", + // }, + // { + // "form_id": 14, + // "form_name": "Financial Info", + // }, + // ]; pdFullDetails:any=[]; // category static form buttons -// categoryFormButtons: any; + categoryFormButtons: any; // = [ // { // "form_id": 1, @@ -293,6 +293,7 @@ pdFullDetails:any=[]; if (data.status == 200) { this.pdMasterList=data.records.pdmaster_details; this.categoryList=data.records.question_answers; + this.categoryFormButtons = data.records.template_forms; let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1); this.mainApplicantName = filterApplicantName[0].applicant_name; this.currentPDStatus = data.records.pdmaster_details.pd_status; diff --git a/ng6-seed/src/app/settings/entity/entity.component.ts b/ng6-seed/src/app/settings/entity/entity.component.ts index 81b196f17..eed9accb7 100644 --- a/ng6-seed/src/app/settings/entity/entity.component.ts +++ b/ng6-seed/src/app/settings/entity/entity.component.ts @@ -1,7 +1,7 @@ -import { Component } from '@angular/core'; -@Component({ - template: `

Entity Master Details List

- ` -}) -export class EntityComponent { -} \ No newline at end of file +// import { Component } from '@angular/core'; +// @Component({ +// template: `

Entity Master Details List

+// ` +// }) +// export class EntityComponent { +// } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/entity/entity.module.ts b/ng6-seed/src/app/settings/entity/entity.module.ts index 44148d555..a6a5d04e7 100644 --- a/ng6-seed/src/app/settings/entity/entity.module.ts +++ b/ng6-seed/src/app/settings/entity/entity.module.ts @@ -22,7 +22,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; import { EntityRouting } from './entity.routing'; -import { EntityComponent } from './entity.component'; +// import { EntityComponent } from './entity.component'; import { EntityListComponent } from './entity-list/entity.list.component'; import { EntityAddComponent } from './entity-add/entity.add.component'; import { EntityEditComponent } from './entity-edit/entity.edit.component'; @@ -38,7 +38,7 @@ import { EntityEditBillingInfoComponent } from './entity-edit/entity-edit-billin import { DialogAddEditBillingInfo } from './entity-edit/entity-edit-billing-info/entity-edit-billing-info.component'; import { EntityEditVendorCityInfoComponent } from './entity-edit/entity-edit-vendor-city-info/entity-edit-vendor-city-info.component'; -import { MatTooltipModule } from '@angular/material/tooltip'; +// import { MatTooltipModule } from '@angular/material/tooltip'; /** * Custom angular notifier options */ @@ -96,7 +96,7 @@ const customNotifierOptions: NotifierOptions = { MatProgressBarModule,MatDialogModule, MatSortModule, MatToolbarModule,MatSelectModule,MatListModule, MatMenuModule, MatCheckboxModule, - MatTooltipModule, + // MatTooltipModule, MatTabsModule, MatChipsModule, MatExpansionModule, @@ -105,7 +105,7 @@ const customNotifierOptions: NotifierOptions = { ReactiveFormsModule ], declarations: [ - EntityComponent, + // EntityComponent, EntityListComponent, EntityEditComponent, EntityAddComponent, @@ -118,7 +118,7 @@ const customNotifierOptions: NotifierOptions = { EntityEditVendorCityInfoComponent ], entryComponents: [ - // EntityEditComponent + EntityEditComponent, DialogAddEditBillingInfo, DialogEntityAddTatComponent, EntityAddComponent diff --git a/ng6-seed/src/app/settings/entity/entity.routing.ts b/ng6-seed/src/app/settings/entity/entity.routing.ts index dd088e903..da8366b0e 100644 --- a/ng6-seed/src/app/settings/entity/entity.routing.ts +++ b/ng6-seed/src/app/settings/entity/entity.routing.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; // Entity Component -import { EntityComponent } from './entity.component'; +// import { EntityComponent } from './entity.component'; import { EntityListComponent } from './entity-list/entity.list.component'; import { EntityAddComponent } from './entity-add/entity.add.component'; import { EntityEditComponent } from './entity-edit/entity.edit.component'; diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts index 1a9feee41..045a2017c 100644 --- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts +++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IndustryMasterDialogComponent } from './industry-master-dialog.component'; +import { IndustryClassificationDialogComponent } from './industry_classification-dialog.component'; describe('IndustryMasterDialogComponent ', () => { - let component: IndustryMasterDialogComponent ; - let fixture: ComponentFixture; + let component: IndustryClassificationDialogComponent ; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ IndustryMasterDialogComponent ] + declarations: [ IndustryClassificationDialogComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(IndustryMasterDialogComponent ); + fixture = TestBed.createComponent(IndustryClassificationDialogComponent ); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.spec.ts index 22d79c3df..2a4fc995a 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.spec.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { PdAllocationTypeListComponent } from './pd-allocation-type-list.component'; +import { PdNotificationListComponent } from './pd-notification-list.component'; describe('PdAllocationTypeListComponent', () => { - let component: PdAllocationTypeListComponent; - let fixture: ComponentFixture; + let component: PdNotificationListComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ PdAllocationTypeListComponent ] + declarations: [ PdNotificationListComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(PdAllocationTypeListComponent); + fixture = TestBed.createComponent(PdNotificationListComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html index e20d2a1f1..c81881908 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html @@ -1,90 +1,78 @@
-
- PD Team -
-
- - +
+ PD Team +
+
+ -
-
-
+
+
+
+
+ +
+ + + + +
+
- -
- - - -
+ - -
- - - - - Sl - {{row.serialno}} - - - - Team - {{row.team_name}} - + + Sl + {{row.serialno}} + - - Lender - {{row.lender_name}} - - - - Active - - - - - - - - Action - - - - - - - - - - - - - -
+ + Team + {{row.team_name}} + + + Lender + {{row.lender_name}} + - + + Active + + + + + + - - + + Action + + + + + + + + + + + + + +
+ +
- -
+ + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/pd-team/pd-team.module.ts b/ng6-seed/src/app/settings/pd-team/pd-team.module.ts index dac9173f9..5dd92d6e3 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team.module.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team.module.ts @@ -94,14 +94,14 @@ const customNotifierOptions: NotifierOptions = { MatProgressBarModule, MatDialogModule, MatSortModule, - MatToolbarModule, MatSelectModule, FlexLayoutModule, NgxMatSelectSearchModule, NgxDatatableModule, MatSortModule, MatSlideToggleModule, - MatTooltipModule,MatListModule,DragulaModule, + MatTooltipModule, + MatListModule,DragulaModule, NotifierModule.withConfig(customNotifierOptions), ], declarations: [ diff --git a/ng6-seed/src/app/settings/service/masters/masters.service.ts b/ng6-seed/src/app/settings/service/masters/masters.service.ts index eb8d45625..67a22174f 100644 --- a/ng6-seed/src/app/settings/service/masters/masters.service.ts +++ b/ng6-seed/src/app/settings/service/masters/masters.service.ts @@ -21,7 +21,9 @@ export interface Master { constant_name:string; } -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class MastersService { diff --git a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts index 1a837032a..544aa2401 100644 --- a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts +++ b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts @@ -14,7 +14,9 @@ const currentdate = new Date().toJSON().slice(0,19).replace('T',' '); /** Environment */ import { environment } from 'environments/environment'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PdTeamService { diff --git a/ng6-seed/src/app/settings/settings.module.ts b/ng6-seed/src/app/settings/settings.module.ts index 1278c61a9..102385a5b 100644 --- a/ng6-seed/src/app/settings/settings.module.ts +++ b/ng6-seed/src/app/settings/settings.module.ts @@ -25,7 +25,7 @@ import { UserListComponent } from './users/user-list/user-list.component'; import { RouterModule } from '@angular/router'; import { SettingsRoutes } from './settings.routing'; import { RegisterComponent } from '../session/register/register.component'; -import { UserService } from './service/user.service'; +// import { UserService } from './service/user.service'; import { MastersModule } from './masters/masters.module'; import { PdTeamModule } from './pd-team/pd-team.module'; @@ -50,7 +50,7 @@ import { EntityModule } from './entity/entity.module'; ], providers:[ - UserService + // UserService ], // declarations: [AddEntityComponent, EditEntityComponent, EntityListComponent] diff --git a/ng6-seed/src/app/settings/users/users.module.ts b/ng6-seed/src/app/settings/users/users.module.ts index 0f8c5e310..debf4f1a2 100644 --- a/ng6-seed/src/app/settings/users/users.module.ts +++ b/ng6-seed/src/app/settings/users/users.module.ts @@ -23,6 +23,7 @@ import { RegisterComponent } from './register/register.component'; import { UserListComponent} from './user-list/user-list.component'; import { UserProfileComponent, ChangePasswordDialog } from './user-profile/user-profile.component'; +import { UserService } from './../service/user.service'; import { NewPasswordDialog, ForgotPass } from '../../session/login/login.component'; // import { HttpClientModule } from '@angular/common/http'; @NgModule({ @@ -41,7 +42,7 @@ import { NewPasswordDialog, ForgotPass } from '../../session/login/login.compone // HttpClientModule, ], declarations: [UserListComponent, RegisterComponent,UserProfileComponent], - + providers: [ UserService ] }) export class UsersModule { } From 69cc149b875e6345c187c3e6b82ab89355e28303 Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Wed, 14 Nov 2018 18:41:51 +0530 Subject: [PATCH 07/45] Question master UI --- .../template/questions/add/add.component.html | 35 ++++++++-------- .../questions/edit/edit.component.html | 40 +++++++++---------- 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/ng6-seed/src/app/template/questions/add/add.component.html b/ng6-seed/src/app/template/questions/add/add.component.html index 433d85fc7..24b8e339a 100644 --- a/ng6-seed/src/app/template/questions/add/add.component.html +++ b/ng6-seed/src/app/template/questions/add/add.component.html @@ -1,13 +1,17 @@ -

{{pageTitle}}

+
+
{{pageTitle}}
+
+
+
-
- - +
+ + {{ ct.category_name }} You must Select Category. @@ -39,14 +43,12 @@
-
- - + + {{ ans.answer_type_name }} You must Select Answer Type. - -
+
@@ -65,25 +67,26 @@
--> -
+
- +
- -
+
+ +
- + \ No newline at end of file diff --git a/ng6-seed/src/app/template/questions/edit/edit.component.html b/ng6-seed/src/app/template/questions/edit/edit.component.html index f39261d1d..0c746a26b 100644 --- a/ng6-seed/src/app/template/questions/edit/edit.component.html +++ b/ng6-seed/src/app/template/questions/edit/edit.component.html @@ -1,12 +1,15 @@ -

{{pageTitle}}

+
+
{{pageTitle}}
+
+
-
- - +
+ + {{ ct.category_name }} You must Select Category. @@ -37,15 +40,13 @@
-
-
- - +
+ + {{ ans.answer_type_name }} You must Select Answer Type. - -
+
@@ -65,24 +66,22 @@
- - + + {{ gp.group_name }}
-
+
- +
- @@ -94,6 +93,9 @@ -->
+ + @@ -102,7 +104,5 @@ - - - + \ No newline at end of file From bd92cb8f43bf9833369e7025246811c9223769fe Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 14 Nov 2018 18:42:40 +0530 Subject: [PATCH 08/45] address form master details changes --- .../forms/address/address.component.html | 33 ++++++------- .../forms/address/address.component.ts | 48 ++++++++----------- .../personal-info/personal-info.component.ts | 6 +-- 3 files changed, 38 insertions(+), 49 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html index a932c765d..8b0fbbf6c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html @@ -9,27 +9,18 @@ - Office - Clinic - Factory - Warehouse - Shop - Residence cum Office - Residence - Other (PD officer to fill) + {{m_addressType.address_type}} + + - Commercial (Office type) Area - - Commercial (shop type) Area - Industrial Area - Residential Area - Mix use (Comment mandatory) - Rural (Village) area - Others (Please specify) + {{m_locality.locality_name}} + @@ -74,6 +65,9 @@ formControlName="do_you_know"> Yes No + {{m_neighbourStatus}} + @@ -83,9 +77,10 @@ - Yes - No - Dont Know + + {{m_applicantOwner}} +
--> + -->
diff --git a/ng6-seed/src/app/template/questions/edit/edit.component.html b/ng6-seed/src/app/template/questions/edit/edit.component.html index 0c746a26b..f85e5aa7b 100644 --- a/ng6-seed/src/app/template/questions/edit/edit.component.html +++ b/ng6-seed/src/app/template/questions/edit/edit.component.html @@ -58,21 +58,21 @@
-
+
-
+ +
From d56fdf07123f82876eb652e6b909356a981b6c69 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 14 Nov 2018 18:45:57 +0530 Subject: [PATCH 10/45] adders form changes --- .../list-pd/start-pd/forms/address/address.component.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html index 8b0fbbf6c..dddcbbc31 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html @@ -63,8 +63,6 @@ - Yes - No {{m_neighbourStatus}} From b68978cdff55846133fc4c5e97de059631186bfa Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Wed, 14 Nov 2018 19:06:12 +0530 Subject: [PATCH 11/45] Ques Master UI --- ng6-seed/src/app/template/questions/add/add.component.html | 6 +++--- .../src/app/template/questions/edit/edit.component.html | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ng6-seed/src/app/template/questions/add/add.component.html b/ng6-seed/src/app/template/questions/add/add.component.html index ea9bda418..6e401d019 100644 --- a/ng6-seed/src/app/template/questions/add/add.component.html +++ b/ng6-seed/src/app/template/questions/add/add.component.html @@ -87,6 +87,6 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/ng6-seed/src/app/template/questions/edit/edit.component.html b/ng6-seed/src/app/template/questions/edit/edit.component.html index f85e5aa7b..fead08903 100644 --- a/ng6-seed/src/app/template/questions/edit/edit.component.html +++ b/ng6-seed/src/app/template/questions/edit/edit.component.html @@ -104,5 +104,7 @@ - - \ No newline at end of file + + + + \ No newline at end of file From 63a4aada1f8de364c4f49ed79dfed113af927369 Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Wed, 14 Nov 2018 19:14:03 +0530 Subject: [PATCH 12/45] assets, banking , supplier forms master details added : kdk --- .../assets-info/assets-info.component.ts | 303 +++++++++++------- .../banking-details.component.html | 7 +- .../banking-details.component.ts | 16 + .../supplier-info.component.html | 2 +- .../supplier-info/supplier-info.component.ts | 146 +++++---- 5 files changed, 305 insertions(+), 169 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts index 03138ffeb..1593a37d6 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts @@ -33,123 +33,131 @@ export class AssetsInfoComponent implements OnInit { public _assetsQuesFrom: FormGroup; public submitted = false; + public m_assets_type = []; + // public m_assets_type = [ + // { + // 'id': "1", + // 'name': "Property" + // }, + // { + // 'id': "2", + // 'name': "Four Wheeler" + // }, + // { + // 'id': "3", + // 'name': "Two Wheeler" + // }, + // { + // 'id': "4", + // 'name': "Jewellery" + // }, + // { + // 'id': "5", + // 'name': "Consumer Durable" + // }, + // { + // 'id': "6", + // 'name': "Insurance" + // }, + // { + // 'id': "7", + // 'name': "Investments" + // }, + // { + // 'id': "8", + // 'name': "Others" + // } + // ] - public m_assets_type = [ - { - 'id': "1", - 'name': "Property" - }, - { - 'id': "2", - 'name': "Four Wheeler" - }, - { - 'id': "3", - 'name': "Two Wheeler" - }, - { - 'id': "4", - 'name': "Jewellery" - }, - { - 'id': "5", - 'name': "Consumer Durable" - }, - { - 'id': "6", - 'name': "Insurance" - }, - { - 'id': "7", - 'name': "Investments" - }, - { - 'id': "8", - 'name': "Others" - } - ] +public m_propertyType = []; - public m_propertyType = [ - { - 'id': "1", - 'name': 'Residential' - }, - { - 'id': "2", - 'name': 'Commercial' - }, - { - 'id': "3", - 'name': 'Industrial' - }, - { - 'id': "4", - 'name': 'Land' - } - ]; + // public m_propertyType = [ + // { + // 'id': "1", + // 'name': 'Residential' + // }, + // { + // 'id': "2", + // 'name': 'Commercial' + // }, + // { + // 'id': "3", + // 'name': 'Industrial' + // }, + // { + // 'id': "4", + // 'name': 'Land' + // } + // ]; - public m_insuranceType = [{ - 'id': "1", - 'name': 'Life' - }, { - 'id': "2", - 'name': 'Health' - }] +public m_insuranceType = []; - public m_investmentType = [{ - 'id': "1", - 'name': 'FD' - }, { - 'id': "2", - 'name': 'RD' - }, { - 'id': "3", - 'name': 'Mutual Funds' - }, { - 'id': "4", - 'name': 'PPF' - }, { - 'id': "5", - 'name': 'Shares' - }, { - 'id': "6", - 'name': 'Others' - }] + // public m_insuranceType = [{ + // 'id': "1", + // 'name': 'Life' + // }, { + // 'id': "2", + // 'name': 'Health' + // }] - public m_freqOfPurchase = [ - { - 'id': "1", - 'name': 'Daily' - }, - { - 'id': "2", - 'name': 'Weekly' - }, - { - 'id': "3", - 'name': 'Monthly' - }, - { - 'id': "4", - 'name': 'Every 3 months' - }, - { - 'id': "5", - 'name': 'Half yearly' - }, - { - 'id': "6", - 'name': 'Yearly' - }, - { - 'id': "7", - 'name': 'As and when required' - }, - { - 'id': "8", - 'name': 'Others' - } - ] +public m_investmentType = []; + + // public m_investmentType = [{ + // 'id': "1", + // 'name': 'FD' + // }, { + // 'id': "2", + // 'name': 'RD' + // }, { + // 'id': "3", + // 'name': 'Mutual Funds' + // }, { + // 'id': "4", + // 'name': 'PPF' + // }, { + // 'id': "5", + // 'name': 'Shares' + // }, { + // 'id': "6", + // 'name': 'Others' + // }] + + public m_freqOfPurchase = []; + + // public m_freqOfPurchase = [ + // { + // 'id': "1", + // 'name': 'Daily' + // }, + // { + // 'id': "2", + // 'name': 'Weekly' + // }, + // { + // 'id': "3", + // 'name': 'Monthly' + // }, + // { + // 'id': "4", + // 'name': 'Every 3 months' + // }, + // { + // 'id': "5", + // 'name': 'Half yearly' + // }, + // { + // 'id': "6", + // 'name': 'Yearly' + // }, + // { + // 'id': "7", + // 'name': 'As and when required' + // }, + // { + // 'id': "8", + // 'name': 'Others' + // } + // ] private notifier: NotifierService; constructor( @@ -162,7 +170,78 @@ export class AssetsInfoComponent implements OnInit { ngOnInit() { this.getPdSupplierFormDetails(); + + this.getM_Assets_Type(); + this.getM_PropertyType(); + this.getM_InvestmentType(); + this.getM_FreqOfPurchase(); + this.getM_InsuranceType(); } + +// ====================== + + getM_Assets_Type() { + this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe( + data => { + this.m_assets_type = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_PropertyType() { + this.pdTrigerService.getAllMasterDatas('PROPERTIES').subscribe( + data => { + this.m_propertyType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_InvestmentType() { + this.pdTrigerService.getAllMasterDatas('INVESTMENTTYPE').subscribe( + data => { + this.m_investmentType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_FreqOfPurchase() { + this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe( + data => { + this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_InsuranceType() { + this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe( + data => { + this.m_insuranceType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + +// ============================= + apiLoadFinish: boolean = false; getPdSupplierFormDetails() { this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '4').subscribe( diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html index 622f281b1..b5d90be4a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html @@ -92,14 +92,17 @@ - + {{ prop.name }} + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts index f832d64f4..08279586e 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts @@ -32,6 +32,7 @@ export class BankingDetailsComponent implements OnInit { public bankingForm: FormGroup; step: number; private notifier: NotifierService; + m_accountType= []; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, @@ -43,6 +44,7 @@ export class BankingDetailsComponent implements OnInit { ngOnInit() { this.step = 0; this.initBankingForm(); + this.getM_AccountType(); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = '7'; @@ -68,6 +70,20 @@ export class BankingDetailsComponent implements OnInit { }); } + // ====================== + + getM_AccountType() { + this._pd.getAllMasterDatas('ACCOUNTTYPE').subscribe( + data => { + this.m_accountType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + public initBankingForm(): void { this.bankingForm = this.fb.group({ banking_form_remark: [''], diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html index b244be4e3..d7ffad568 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html @@ -62,7 +62,7 @@
- {{ feq.name }} + {{ feq.name }}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts index 674a1dd52..e359094f9 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts @@ -33,64 +33,102 @@ export class SupplierInfoComponent implements OnInit { public _supplierQuesFrom: FormGroup; public submitted = false; - public m_paymentModeType= [ - { - 'id': "1", - 'name': 'Immediate Or Advanced Payment' - }, - { - 'id': "2", - 'name': 'Credit' - }, - { - 'id': "3", - 'name': 'Combination of Both' - }, - ]; - public m_freqOfPurchase= [ - { - 'id': "1", - 'name': 'Daily' - }, - { - 'id': "2", - 'name': 'Weekly' - }, - { - 'id': "3", - 'name': 'Monthly' - }, - { - 'id': "4", - 'name': 'Every 3 months' - }, - { - 'id': "5", - 'name': 'Half yearly' - }, - { - 'id': "6", - 'name': 'Yearly' - }, - { - 'id': "7", - 'name': 'As and when required' - }, - { - 'id': "8", - 'name': 'Others' - } - ] +public m_paymentModeType= []; + // public m_paymentModeType= [ + // { + // 'id': "1", + // 'name': 'Immediate Or Advanced Payment' + // }, + // { + // 'id': "2", + // 'name': 'Credit' + // }, + // { + // 'id': "3", + // 'name': 'Combination of Both' + // }, + // ]; +public m_freqOfPurchase= []; + // public m_freqOfPurchase= [ + // { + // 'id': "1", + // 'name': 'Daily' + // }, + // { + // 'id': "2", + // 'name': 'Weekly' + // }, + // { + // 'id': "3", + // 'name': 'Monthly' + // }, + // { + // 'id': "4", + // 'name': 'Every 3 months' + // }, + // { + // 'id': "5", + // 'name': 'Half yearly' + // }, + // { + // 'id': "6", + // 'name': 'Yearly' + // }, + // { + // 'id': "7", + // 'name': 'As and when required' + // }, + // { + // 'id': "8", + // 'name': 'Others' + // } + // ] + + private notifier: NotifierService; constructor( + notifier: NotifierService, private _formBuilder: FormBuilder, - private pdTrigerService: PdTrigerService) { } + private pdTrigerService: PdTrigerService) { + this.notifier = notifier; + } ngOnInit() { - + this.getM_FreqOfPurchase(); + this.getM_PaymentModeType(); this.getPdSupplierFormDetails(); } + +// ================== + + getM_FreqOfPurchase() { + this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe( + data => { + this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_PaymentModeType() { + this.pdTrigerService.getAllMasterDatas('PAYMENTMODE').subscribe( + data => { + this.m_paymentModeType = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + +// ================== + apiLoadFinish: boolean = false; getPdSupplierFormDetails() { this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '1').subscribe( @@ -217,22 +255,22 @@ apiLoadFinish: boolean = false; //To Remove The "Null" With Key also Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]); - alert(JSON.stringify(answerFormValues)); + // alert(JSON.stringify(answerFormValues)); //Add BRANCH data with help Service File this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe( dataresult => { if (dataresult.status == 200) { // console.log(dataresult); - // this.notifier.notify('success', 'Record Saved Successfully.!'); + this.notifier.notify('success', 'Record Saved Successfully.!'); // this.dialogRef.close(); // alert("sample alert for Saving"); } else { - // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); // this.errorMessage = "Some Thing Wents Wrong Try Again !"; } }, error => { - // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); // this.errorMessage = "Something Wents Wrong Try Again !"; // this.dialogRef.close(); }); From 96ec621aebab760c3d5ff2f83bdb8032927af69e Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 14 Nov 2018 19:20:16 +0530 Subject: [PATCH 13/45] famil form changes --- .../family-details.component.html | 25 +++---- .../family-details.component.ts | 65 +++++++++---------- .../personal-info/personal-info.component.ts | 5 +- 3 files changed, 45 insertions(+), 50 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html index f62fc181e..b002c681c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html @@ -5,12 +5,12 @@
- - {{state}} + + {{personMet.person_met_name}} - + @@ -35,9 +35,10 @@ - Salaried - SENP - SEP + + {{cusSeg.name}} + @@ -117,16 +118,16 @@ - Self Owned - Family Owned - Rented - Others + + {{ownerShip.name}} + - + - + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts index 5d7148a1c..6b53a6e5c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts @@ -43,32 +43,28 @@ export class FamilyDetailsComponent implements OnInit { public ownership: AbstractControl; public ownershipOther: AbstractControl; public rent: AbstractControl; - filteredStates: any = [ - 'Main Applicant', - 'Co-Applicant ', - 'Accountant', - 'Manager', - 'Relative of the applicant', - 'Friend of the Applicant', - 'DSA', - 'Other' - ]; + relationData: any = []; occupationData: any = []; + personMetData: any = []; + ownerShipData: any = []; + customerSegData: any = []; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, private _pd: PdTrigerService) { this.notifier = notifier; } ngOnInit() { - this.getRelation(); - this.getOccupation(); + this.getMasterDetails('RELATIONSHIPS',1); + this.getMasterDetails('OCCUPATIONMEMBERS',2); + this.getMasterDetails('PERSONSMET',3); + this.getMasterDetails('RESIDENCEOWNERSHIP',4); + this.getMasterDetails('CUSTOMERSEGMENT',5) this.initFamilyForm(); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = '6'; this._pd.retriveForm(params).subscribe(data => { - console.log('data', data); const control = this.familyForm.controls['nonEarningMembers']; const value = this.familyForm.controls['earningMembers']; if (data.status == 200) { @@ -169,30 +165,31 @@ export class FamilyDetailsComponent implements OnInit { const control = this.familyForm.controls['nonEarningMembers']; control.removeAt(index); } - - - getRelation() { - let master_name = 'RELATIONSHIPS'; - this._pd.getAllMasterDatas(master_name).subscribe(data => { - console.log('data', data); - data.records.forEach(val => { - if (val.isactive == 1) { - this.relationData.push(val); + // get all master details + getMasterDetails(table:string,type:number){ + this._pd.getAllMasterDatas(table).subscribe( + data => { + if (data.status == 200) { + if(type==1){ + this.relationData=data.records.filter(item => item.isactive == 1); } - }) - }); - } - getOccupation() { - let master_name = 'OCCUPATIONMEMBERS'; - this._pd.getAllMasterDatas(master_name).subscribe(data => { - console.log('data', data); - data.records.forEach(val => { - if (val.isactive == 1) { - this.occupationData.push(val); + else if(type==2){ + this.occupationData=data.records.filter(item => item.isactive == 1); + } + else if(type==3){ + this.personMetData=data.records.filter(item => item.isactive == 1); + } + else if(type==4){ + this.ownerShipData=data.records.filter(item => item.isactive == 1); + } + else if(type==5){ + this.customerSegData=data.records.filter(item => item.isactive == 1); + } + } - }) }); - } + } + submitFamily() { if (!this.familyForm.valid) { return; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts index 785fec0d7..ec43db4e9 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts @@ -198,9 +198,8 @@ this.loadDataStatus = true; // get pd co applicant array values get pdCoapplicant() {return this._personalForm.get('coItem') as FormArray;} - // get relation master details + // get all master details getMasterDetails(table:string,type:number){ - //let relation ="RELATIONSHIPS"; this._pd.getAllMasterDatas(table).subscribe( data => { if (data.status == 200) { @@ -218,8 +217,6 @@ this.loadDataStatus = true; } }, error => this.errorMessage = error); } -// get earning master details - // submit forms details submitPersonalForm(formData:any) { if (this._personalForm.invalid) { From 84cdcab02656439d1ceb7ec9a4df185574057f45 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 14 Nov 2018 19:20:48 +0530 Subject: [PATCH 14/45] merge : kms --- .../assets-info/assets-info.component.ts | 303 +++++++++++------- .../banking-details.component.html | 7 +- .../banking-details.component.ts | 16 + .../supplier-info.component.html | 2 +- .../supplier-info/supplier-info.component.ts | 146 +++++---- .../template/questions/add/add.component.html | 35 +- .../questions/edit/edit.component.html | 44 +-- 7 files changed, 347 insertions(+), 206 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts index 03138ffeb..1593a37d6 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts @@ -33,123 +33,131 @@ export class AssetsInfoComponent implements OnInit { public _assetsQuesFrom: FormGroup; public submitted = false; + public m_assets_type = []; + // public m_assets_type = [ + // { + // 'id': "1", + // 'name': "Property" + // }, + // { + // 'id': "2", + // 'name': "Four Wheeler" + // }, + // { + // 'id': "3", + // 'name': "Two Wheeler" + // }, + // { + // 'id': "4", + // 'name': "Jewellery" + // }, + // { + // 'id': "5", + // 'name': "Consumer Durable" + // }, + // { + // 'id': "6", + // 'name': "Insurance" + // }, + // { + // 'id': "7", + // 'name': "Investments" + // }, + // { + // 'id': "8", + // 'name': "Others" + // } + // ] - public m_assets_type = [ - { - 'id': "1", - 'name': "Property" - }, - { - 'id': "2", - 'name': "Four Wheeler" - }, - { - 'id': "3", - 'name': "Two Wheeler" - }, - { - 'id': "4", - 'name': "Jewellery" - }, - { - 'id': "5", - 'name': "Consumer Durable" - }, - { - 'id': "6", - 'name': "Insurance" - }, - { - 'id': "7", - 'name': "Investments" - }, - { - 'id': "8", - 'name': "Others" - } - ] +public m_propertyType = []; - public m_propertyType = [ - { - 'id': "1", - 'name': 'Residential' - }, - { - 'id': "2", - 'name': 'Commercial' - }, - { - 'id': "3", - 'name': 'Industrial' - }, - { - 'id': "4", - 'name': 'Land' - } - ]; + // public m_propertyType = [ + // { + // 'id': "1", + // 'name': 'Residential' + // }, + // { + // 'id': "2", + // 'name': 'Commercial' + // }, + // { + // 'id': "3", + // 'name': 'Industrial' + // }, + // { + // 'id': "4", + // 'name': 'Land' + // } + // ]; - public m_insuranceType = [{ - 'id': "1", - 'name': 'Life' - }, { - 'id': "2", - 'name': 'Health' - }] +public m_insuranceType = []; - public m_investmentType = [{ - 'id': "1", - 'name': 'FD' - }, { - 'id': "2", - 'name': 'RD' - }, { - 'id': "3", - 'name': 'Mutual Funds' - }, { - 'id': "4", - 'name': 'PPF' - }, { - 'id': "5", - 'name': 'Shares' - }, { - 'id': "6", - 'name': 'Others' - }] + // public m_insuranceType = [{ + // 'id': "1", + // 'name': 'Life' + // }, { + // 'id': "2", + // 'name': 'Health' + // }] - public m_freqOfPurchase = [ - { - 'id': "1", - 'name': 'Daily' - }, - { - 'id': "2", - 'name': 'Weekly' - }, - { - 'id': "3", - 'name': 'Monthly' - }, - { - 'id': "4", - 'name': 'Every 3 months' - }, - { - 'id': "5", - 'name': 'Half yearly' - }, - { - 'id': "6", - 'name': 'Yearly' - }, - { - 'id': "7", - 'name': 'As and when required' - }, - { - 'id': "8", - 'name': 'Others' - } - ] +public m_investmentType = []; + + // public m_investmentType = [{ + // 'id': "1", + // 'name': 'FD' + // }, { + // 'id': "2", + // 'name': 'RD' + // }, { + // 'id': "3", + // 'name': 'Mutual Funds' + // }, { + // 'id': "4", + // 'name': 'PPF' + // }, { + // 'id': "5", + // 'name': 'Shares' + // }, { + // 'id': "6", + // 'name': 'Others' + // }] + + public m_freqOfPurchase = []; + + // public m_freqOfPurchase = [ + // { + // 'id': "1", + // 'name': 'Daily' + // }, + // { + // 'id': "2", + // 'name': 'Weekly' + // }, + // { + // 'id': "3", + // 'name': 'Monthly' + // }, + // { + // 'id': "4", + // 'name': 'Every 3 months' + // }, + // { + // 'id': "5", + // 'name': 'Half yearly' + // }, + // { + // 'id': "6", + // 'name': 'Yearly' + // }, + // { + // 'id': "7", + // 'name': 'As and when required' + // }, + // { + // 'id': "8", + // 'name': 'Others' + // } + // ] private notifier: NotifierService; constructor( @@ -162,7 +170,78 @@ export class AssetsInfoComponent implements OnInit { ngOnInit() { this.getPdSupplierFormDetails(); + + this.getM_Assets_Type(); + this.getM_PropertyType(); + this.getM_InvestmentType(); + this.getM_FreqOfPurchase(); + this.getM_InsuranceType(); } + +// ====================== + + getM_Assets_Type() { + this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe( + data => { + this.m_assets_type = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_PropertyType() { + this.pdTrigerService.getAllMasterDatas('PROPERTIES').subscribe( + data => { + this.m_propertyType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_InvestmentType() { + this.pdTrigerService.getAllMasterDatas('INVESTMENTTYPE').subscribe( + data => { + this.m_investmentType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_FreqOfPurchase() { + this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe( + data => { + this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_InsuranceType() { + this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe( + data => { + this.m_insuranceType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + +// ============================= + apiLoadFinish: boolean = false; getPdSupplierFormDetails() { this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '4').subscribe( diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html index 622f281b1..b5d90be4a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html @@ -92,14 +92,17 @@ - + {{ prop.name }} + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts index f832d64f4..08279586e 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts @@ -32,6 +32,7 @@ export class BankingDetailsComponent implements OnInit { public bankingForm: FormGroup; step: number; private notifier: NotifierService; + m_accountType= []; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, @@ -43,6 +44,7 @@ export class BankingDetailsComponent implements OnInit { ngOnInit() { this.step = 0; this.initBankingForm(); + this.getM_AccountType(); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = '7'; @@ -68,6 +70,20 @@ export class BankingDetailsComponent implements OnInit { }); } + // ====================== + + getM_AccountType() { + this._pd.getAllMasterDatas('ACCOUNTTYPE').subscribe( + data => { + this.m_accountType = data.records.filter(data => data.isactive == 1); + }, + error => { + this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + public initBankingForm(): void { this.bankingForm = this.fb.group({ banking_form_remark: [''], diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html index b244be4e3..d7ffad568 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html @@ -62,7 +62,7 @@
- {{ feq.name }} + {{ feq.name }}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts index 674a1dd52..e359094f9 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts @@ -33,64 +33,102 @@ export class SupplierInfoComponent implements OnInit { public _supplierQuesFrom: FormGroup; public submitted = false; - public m_paymentModeType= [ - { - 'id': "1", - 'name': 'Immediate Or Advanced Payment' - }, - { - 'id': "2", - 'name': 'Credit' - }, - { - 'id': "3", - 'name': 'Combination of Both' - }, - ]; - public m_freqOfPurchase= [ - { - 'id': "1", - 'name': 'Daily' - }, - { - 'id': "2", - 'name': 'Weekly' - }, - { - 'id': "3", - 'name': 'Monthly' - }, - { - 'id': "4", - 'name': 'Every 3 months' - }, - { - 'id': "5", - 'name': 'Half yearly' - }, - { - 'id': "6", - 'name': 'Yearly' - }, - { - 'id': "7", - 'name': 'As and when required' - }, - { - 'id': "8", - 'name': 'Others' - } - ] +public m_paymentModeType= []; + // public m_paymentModeType= [ + // { + // 'id': "1", + // 'name': 'Immediate Or Advanced Payment' + // }, + // { + // 'id': "2", + // 'name': 'Credit' + // }, + // { + // 'id': "3", + // 'name': 'Combination of Both' + // }, + // ]; +public m_freqOfPurchase= []; + // public m_freqOfPurchase= [ + // { + // 'id': "1", + // 'name': 'Daily' + // }, + // { + // 'id': "2", + // 'name': 'Weekly' + // }, + // { + // 'id': "3", + // 'name': 'Monthly' + // }, + // { + // 'id': "4", + // 'name': 'Every 3 months' + // }, + // { + // 'id': "5", + // 'name': 'Half yearly' + // }, + // { + // 'id': "6", + // 'name': 'Yearly' + // }, + // { + // 'id': "7", + // 'name': 'As and when required' + // }, + // { + // 'id': "8", + // 'name': 'Others' + // } + // ] + + private notifier: NotifierService; constructor( + notifier: NotifierService, private _formBuilder: FormBuilder, - private pdTrigerService: PdTrigerService) { } + private pdTrigerService: PdTrigerService) { + this.notifier = notifier; + } ngOnInit() { - + this.getM_FreqOfPurchase(); + this.getM_PaymentModeType(); this.getPdSupplierFormDetails(); } + +// ================== + + getM_FreqOfPurchase() { + this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe( + data => { + this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_PaymentModeType() { + this.pdTrigerService.getAllMasterDatas('PAYMENTMODE').subscribe( + data => { + this.m_paymentModeType = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + +// ================== + apiLoadFinish: boolean = false; getPdSupplierFormDetails() { this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '1').subscribe( @@ -217,22 +255,22 @@ apiLoadFinish: boolean = false; //To Remove The "Null" With Key also Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]); - alert(JSON.stringify(answerFormValues)); + // alert(JSON.stringify(answerFormValues)); //Add BRANCH data with help Service File this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe( dataresult => { if (dataresult.status == 200) { // console.log(dataresult); - // this.notifier.notify('success', 'Record Saved Successfully.!'); + this.notifier.notify('success', 'Record Saved Successfully.!'); // this.dialogRef.close(); // alert("sample alert for Saving"); } else { - // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); // this.errorMessage = "Some Thing Wents Wrong Try Again !"; } }, error => { - // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); // this.errorMessage = "Something Wents Wrong Try Again !"; // this.dialogRef.close(); }); diff --git a/ng6-seed/src/app/template/questions/add/add.component.html b/ng6-seed/src/app/template/questions/add/add.component.html index 433d85fc7..6e401d019 100644 --- a/ng6-seed/src/app/template/questions/add/add.component.html +++ b/ng6-seed/src/app/template/questions/add/add.component.html @@ -1,13 +1,17 @@ -

{{pageTitle}}

+
+
{{pageTitle}}
+
+
+
-
- - +
+ + {{ ct.category_name }} You must Select Category. @@ -39,14 +43,12 @@
-
- - + + {{ ans.answer_type_name }} You must Select Answer Type. - -
+
@@ -64,20 +66,21 @@ {{ gp.group_name }} -
--> -
+
--> +
- +
- -
+
+ +
@@ -85,5 +88,5 @@ - + \ No newline at end of file diff --git a/ng6-seed/src/app/template/questions/edit/edit.component.html b/ng6-seed/src/app/template/questions/edit/edit.component.html index f39261d1d..fead08903 100644 --- a/ng6-seed/src/app/template/questions/edit/edit.component.html +++ b/ng6-seed/src/app/template/questions/edit/edit.component.html @@ -1,12 +1,15 @@ -

{{pageTitle}}

+
+
{{pageTitle}}
+
+
-
- - +
+ + {{ ct.category_name }} You must Select Category. @@ -37,15 +40,13 @@
-
-
- - +
+ + {{ ans.answer_type_name }} You must Select Answer Type. - -
+
-
- - + +
- +
-
@@ -94,6 +93,9 @@ -->
+ + @@ -103,6 +105,6 @@ - - - \ No newline at end of file + + + \ No newline at end of file From 5e29656fca9951036f36cba55d308c751d2ec2bd Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Thu, 15 Nov 2018 10:50:09 +0530 Subject: [PATCH 15/45] Forms UI --- .../start-pd/forms/address/address.component.html | 8 ++++---- .../forms/current-loan/current-loan.component.html | 2 +- .../forms/other-income/other-income.component.html | 2 +- .../personal-info/personal-info.component.html | 5 ++++- .../supplier-info/supplier-info.component.html | 14 +++++++------- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html index dddcbbc31..16b43a9d6 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html @@ -28,14 +28,14 @@ formControlName="locality_others"> - + {{data.description}} - + {{data.rating}} @@ -57,7 +57,7 @@
- @@ -83,7 +83,7 @@ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html index fc82feab0..1e9386116 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html @@ -80,7 +80,7 @@ {{frq.name}} - diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html index 9871211b6..1623f9e05 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html @@ -1,4 +1,6 @@ - + +

Personal Details

+ @@ -136,3 +138,4 @@ +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html index d7ffad568..d70281fbc 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html @@ -5,7 +5,7 @@
- + You must Include Raw Material Details.
@@ -40,7 +40,7 @@
- + {{ pm.name }} @@ -61,7 +61,7 @@
- + {{ feq.name }} @@ -75,7 +75,7 @@
- +
@@ -84,11 +84,11 @@
- -
+
+
From f5ca6b768313af0064bcca15892cfbdf865ec71a Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Thu, 15 Nov 2018 11:17:10 +0530 Subject: [PATCH 16/45] Forms UI --- .../forms/address/address.component.html | 6 ++--- .../assets-info/assets-info.component.html | 24 +++++++++---------- .../banking-details.component.html | 6 ++--- .../current-loan/current-loan.component.html | 6 ++--- .../other-income/other-income.component.html | 6 ++--- 5 files changed, 23 insertions(+), 25 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html index 16b43a9d6..78cda05de 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html @@ -81,12 +81,12 @@ - -
- +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html index e5baf4036..03dbbc63b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html @@ -10,16 +10,13 @@
-
-
- +
+ {{ asset.name }} - -
-
+
@@ -28,8 +25,8 @@
- - + + {{ prop.name }} @@ -199,7 +196,7 @@
- +
@@ -231,7 +228,7 @@
- +
@@ -241,9 +238,7 @@
- -
+
+ +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html index b5d90be4a..910aa3602 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html @@ -132,8 +132,8 @@ delete -
-
@@ -150,7 +150,7 @@ -
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html index bf3ef1f82..4e2407234 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html @@ -35,11 +35,11 @@ - - @@ -56,7 +56,7 @@
-
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html index 1e9386116..1e7bf2973 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html @@ -80,11 +80,11 @@ {{frq.name}}
- - @@ -101,7 +101,7 @@
-
From cf788e47c4650f08f5dc622b8ceee3d11f8087c9 Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Thu, 15 Nov 2018 11:33:21 +0530 Subject: [PATCH 17/45] loan form details master added : kdk --- .../loan-details/loan-details.component.html | 30 ++++++--- .../loan-details/loan-details.component.ts | 62 +++++++++++++++++++ 2 files changed, 85 insertions(+), 7 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html index dd8ad6799..c696112c5 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html @@ -4,7 +4,10 @@ - + {{ enduse.name }} + + @@ -47,12 +50,16 @@ - + {{ sour.name }} + + + @@ -68,6 +75,10 @@ + {{ typeprop.name }} + + + @@ -94,12 +105,17 @@ - + {{ status.name }} + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts index 01648a36d..30dff2db8 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts @@ -39,6 +39,10 @@ export class LoanDetailsComponent implements OnInit { isSource: boolean = false; endUserList: any = []; ownerNames: any = []; + m_endUseofLoad = []; + m_sourceofamount = []; + m_mortageTypeProperty = []; + m_statusofCunstruction = []; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, private _pd: PdTrigerService) { @@ -48,6 +52,10 @@ export class LoanDetailsComponent implements OnInit { ngOnInit() { this.applicants = this.applicant_details.pdapplicants_detials; this.initloanDetailsForm(); + this.getM_EndUseofLoad(); + this.getM_sourceofamount(); + this.getM_MortageTypeProperty(); + this.getM_StatusofCunstruction(); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = this.form_id; @@ -102,6 +110,60 @@ export class LoanDetailsComponent implements OnInit { } }) } + +// ============= + + getM_EndUseofLoad() { + this._pd.getAllMasterDatas('ENDUSEOFLOAN').subscribe( + data => { + this.m_endUseofLoad = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + +getM_sourceofamount() { + this._pd.getAllMasterDatas('SOURCEOFBALANCETRANSFER').subscribe( + data => { + this.m_sourceofamount = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_MortageTypeProperty() { + this._pd.getAllMasterDatas('MORTAGEPROPERTYTYPE').subscribe( + data => { + this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_StatusofCunstruction() { + this._pd.getAllMasterDatas('STATUSOFCONSTRUCTION').subscribe( + data => { + this.m_statusofCunstruction = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + + +// ================== public initloanDetailsForm(): void { this.loanDetailsForm = this.fb.group({ loan_amount: ['', Validators.compose([Validators.required])], From 22cdfdf27a66f09c358ec0abfd3869ac3708e69e Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Thu, 15 Nov 2018 12:58:14 +0530 Subject: [PATCH 18/45] Forms UI --- .../business-info.component.html | 83 ++++++++++--------- .../business-info.component.scss | 8 +- .../employment-info.component.html | 18 ++-- .../financial-info.component.html | 24 +++--- .../financial-info.component.scss | 1 + .../start-pd/forms/stock/stock.component.html | 35 ++++---- 6 files changed, 96 insertions(+), 73 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html index a508f499c..1563deb3d 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html @@ -5,7 +5,7 @@ - +

Designation -

+

- -
@@ -65,7 +65,7 @@ - @@ -85,7 +85,7 @@

Partners / Directors / Shareholders -

+

- - -
@@ -122,7 +122,7 @@

Employees As per applicant -

+

@@ -142,7 +142,7 @@

As per PD Officer -

+

@@ -162,15 +162,15 @@

Investments -

+

- - @@ -178,9 +178,9 @@

Location -

+

- +

Business Setup -

+

- + - self owned Rented @@ -208,11 +208,11 @@ - - @@ -220,7 +220,7 @@

Is the below documents seen and photo captured ? -

+

@@ -231,28 +231,28 @@
- Yes No - Yes No - Yes No - Yes No @@ -273,7 +273,7 @@ - Yes No @@ -282,17 +282,17 @@
- + - -
@@ -306,6 +306,9 @@
- +
+ +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss index 3be75d28c..96152853a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss @@ -8,13 +8,19 @@ width: 100%; } .matcard > * { - width: 80%; + width: 45%; } .card mat-form-field { margin: 0 2%; + width: 40%; } .matcard mat-form-field { margin: 0 2%; + width: 40%; +} +.matcards mat-form-field { + margin: 0 2%; + width: 98%; } .address .button { float: right; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html index 0f16f392e..66bd26b06 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html @@ -1,7 +1,8 @@ +

Employement Information

- + @@ -14,7 +15,7 @@ - + - Yes No @@ -50,15 +51,15 @@ - - - @@ -71,6 +72,9 @@ - +
+ +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html index 720f89fc3..d8f448ac2 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html @@ -1,8 +1,9 @@ +

Financial Information

-

Data as per Financial statements

+

Data as Per Financial Statements

- +
@@ -63,15 +64,15 @@ - +
@@ -85,6 +86,9 @@ - +
+ +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss index efbc1400d..833488467 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss @@ -9,6 +9,7 @@ } .matcard mat-form-field { margin: 0 2%; + width:26% } .address .button { float: right; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html index 3a55530a2..d293f4b58 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html @@ -1,4 +1,5 @@ +

Stock Details

@@ -18,20 +19,20 @@ - - + + - - + + @@ -54,20 +55,20 @@ - - + + - - + + @@ -81,6 +82,10 @@ - +
+ +
+
\ No newline at end of file From 1a8d49560f2fc1c70ff25d48926e286ed213b55f Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 15 Nov 2018 13:05:41 +0530 Subject: [PATCH 19/45] famil form changes --- .../family-details.component.html | 2 +- .../family-details.component.ts | 23 ++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html index b002c681c..d1cfcc450 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html @@ -88,7 +88,7 @@
- + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts index 6b53a6e5c..f5c65ad57 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts @@ -145,7 +145,7 @@ export class FamilyDetailsComponent implements OnInit { return this.fb.group({ relationship: ['', Validators.compose([Validators.required])], occupation: ['', Validators.compose([Validators.required])], - retired: ['', Validators.compose([Validators.required])], + retired: [''], }); } @@ -194,31 +194,38 @@ export class FamilyDetailsComponent implements OnInit { if (!this.familyForm.valid) { return; } - console.log('data', this.familyForm.value); let records: any = {}; records.no_of_years = this.years.value; - if (this.ownership.value == 'Others') { + if (this.ownership.value == 4) { records.ownership_others = this.ownershipOther.value; } records.ownership = this.ownership.value; records.residence = this.residence.value; - if (this.ownership.value == 'Rented') { + if (this.ownership.value == 3) { records.what_rent = this.rent.value; } - if (this.person.value == 'Other') { + if (this.person.value == 8) { records.person_met_other = this.personOther.value; } records.person_met = this.person.value; records.family_members = this.members.value; records.earning_members = this.familyForm.controls['earningMembers'].value; - records.non_earning_members = this.familyForm.controls['nonEarningMembers'].value; + // filter retired conditions + let non_earning_members_filter = this.familyForm.controls['nonEarningMembers'].value.map(function(obj) { + if(obj.occupation==3){ + return obj; + } + else{ + obj.retired=''; + return obj; + } + }); + records.non_earning_members = non_earning_members_filter; records.family_details_form_remark = this.familyForm.controls['family_details_form_remark'].value; records.pdid = this.pdid; records.formid = '6'; // records.fk_createdby = '251'; - console.log('params', records); this._pd.saveForm(records).subscribe(data => { - console.log('data', data); this.notifier.notify('success', 'Saved Successfully.'); }, error => { this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); From 20427dfbe9f98581e4731193401e0f7e985b8392 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 15 Nov 2018 13:06:07 +0530 Subject: [PATCH 20/45] merge : kms --- .../forms/address/address.component.html | 14 ++-- .../assets-info/assets-info.component.html | 24 +++--- .../banking-details.component.html | 6 +- .../business-info.component.html | 83 ++++++++++--------- .../business-info.component.scss | 8 +- .../current-loan/current-loan.component.html | 6 +- .../employment-info.component.html | 18 ++-- .../financial-info.component.html | 24 +++--- .../financial-info.component.scss | 1 + .../loan-details/loan-details.component.html | 30 +++++-- .../loan-details/loan-details.component.ts | 62 ++++++++++++++ .../other-income/other-income.component.html | 6 +- .../personal-info.component.html | 5 +- .../start-pd/forms/stock/stock.component.html | 35 ++++---- .../supplier-info.component.html | 14 ++-- 15 files changed, 219 insertions(+), 117 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html index dddcbbc31..78cda05de 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.html @@ -28,14 +28,14 @@ formControlName="locality_others"> - + {{data.description}} - + {{data.rating}} @@ -57,7 +57,7 @@
- @@ -81,12 +81,12 @@ - -
- +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html index e5baf4036..03dbbc63b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html @@ -10,16 +10,13 @@
-
-
- +
+ {{ asset.name }} - -
-
+
@@ -28,8 +25,8 @@
- - + + {{ prop.name }} @@ -199,7 +196,7 @@
- +
@@ -231,7 +228,7 @@
- +
@@ -241,9 +238,7 @@
- -
+
+ +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html index b5d90be4a..910aa3602 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html @@ -132,8 +132,8 @@ delete -
-
@@ -150,7 +150,7 @@ - diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html index a508f499c..1563deb3d 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html @@ -5,7 +5,7 @@
- +

Designation -

+

- -
@@ -65,7 +65,7 @@ - @@ -85,7 +85,7 @@

Partners / Directors / Shareholders -

+

- - -
@@ -122,7 +122,7 @@

Employees As per applicant -

+

@@ -142,7 +142,7 @@

As per PD Officer -

+

@@ -162,15 +162,15 @@

Investments -

+

- - @@ -178,9 +178,9 @@

Location -

+

- +

Business Setup -

+

- + - self owned Rented @@ -208,11 +208,11 @@ - - @@ -220,7 +220,7 @@

Is the below documents seen and photo captured ? -

+

@@ -231,28 +231,28 @@
- Yes No - Yes No - Yes No - Yes No @@ -273,7 +273,7 @@ - Yes No @@ -282,17 +282,17 @@
- + - -
@@ -306,6 +306,9 @@
- +
+ +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss index 3be75d28c..96152853a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss @@ -8,13 +8,19 @@ width: 100%; } .matcard > * { - width: 80%; + width: 45%; } .card mat-form-field { margin: 0 2%; + width: 40%; } .matcard mat-form-field { margin: 0 2%; + width: 40%; +} +.matcards mat-form-field { + margin: 0 2%; + width: 98%; } .address .button { float: right; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html index ca8fb72ff..4e2407234 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html @@ -35,11 +35,11 @@ - - @@ -56,7 +56,7 @@
-
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html index 0f16f392e..66bd26b06 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html @@ -1,7 +1,8 @@ +

Employement Information

- + @@ -14,7 +15,7 @@ - + - Yes No @@ -50,15 +51,15 @@ - - - @@ -71,6 +72,9 @@ - +
+ +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html index 720f89fc3..d8f448ac2 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html @@ -1,8 +1,9 @@ +

Financial Information

-

Data as per Financial statements

+

Data as Per Financial Statements

- +
@@ -63,15 +64,15 @@ - +
@@ -85,6 +86,9 @@ - +
+ +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss index efbc1400d..833488467 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss @@ -9,6 +9,7 @@ } .matcard mat-form-field { margin: 0 2%; + width:26% } .address .button { float: right; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html index dd8ad6799..c696112c5 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html @@ -4,7 +4,10 @@
- + {{ enduse.name }} + + @@ -47,12 +50,16 @@ - + {{ sour.name }} + + + @@ -68,6 +75,10 @@ + {{ typeprop.name }} + + + @@ -94,12 +105,17 @@ - + {{ status.name }} + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts index 01648a36d..30dff2db8 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts @@ -39,6 +39,10 @@ export class LoanDetailsComponent implements OnInit { isSource: boolean = false; endUserList: any = []; ownerNames: any = []; + m_endUseofLoad = []; + m_sourceofamount = []; + m_mortageTypeProperty = []; + m_statusofCunstruction = []; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, private _pd: PdTrigerService) { @@ -48,6 +52,10 @@ export class LoanDetailsComponent implements OnInit { ngOnInit() { this.applicants = this.applicant_details.pdapplicants_detials; this.initloanDetailsForm(); + this.getM_EndUseofLoad(); + this.getM_sourceofamount(); + this.getM_MortageTypeProperty(); + this.getM_StatusofCunstruction(); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = this.form_id; @@ -102,6 +110,60 @@ export class LoanDetailsComponent implements OnInit { } }) } + +// ============= + + getM_EndUseofLoad() { + this._pd.getAllMasterDatas('ENDUSEOFLOAN').subscribe( + data => { + this.m_endUseofLoad = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + +getM_sourceofamount() { + this._pd.getAllMasterDatas('SOURCEOFBALANCETRANSFER').subscribe( + data => { + this.m_sourceofamount = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_MortageTypeProperty() { + this._pd.getAllMasterDatas('MORTAGEPROPERTYTYPE').subscribe( + data => { + this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_StatusofCunstruction() { + this._pd.getAllMasterDatas('STATUSOFCONSTRUCTION').subscribe( + data => { + this.m_statusofCunstruction = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + + +// ================== public initloanDetailsForm(): void { this.loanDetailsForm = this.fb.group({ loan_amount: ['', Validators.compose([Validators.required])], diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html index fc82feab0..1e7bf2973 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.html @@ -80,11 +80,11 @@ {{frq.name}} - - @@ -101,7 +101,7 @@
-
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html index 9871211b6..1623f9e05 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.html @@ -1,4 +1,6 @@ -
+ +

Personal Details

+ @@ -136,3 +138,4 @@ +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html index 3a55530a2..d293f4b58 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html @@ -1,4 +1,5 @@ +

Stock Details

@@ -18,20 +19,20 @@ - - + + - - + + @@ -54,20 +55,20 @@ - - + + - - + + @@ -81,6 +82,10 @@ - +
+ +
+
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html index d7ffad568..d70281fbc 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html @@ -5,7 +5,7 @@
- + You must Include Raw Material Details.
@@ -40,7 +40,7 @@
- + {{ pm.name }} @@ -61,7 +61,7 @@
- + {{ feq.name }} @@ -75,7 +75,7 @@
- +
@@ -84,11 +84,11 @@
- -
+
+
From a7f370fccad9601b572aca2d3b038aec04465f2c Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Thu, 15 Nov 2018 14:52:50 +0530 Subject: [PATCH 21/45] Forms UI --- .../assets-info/assets-info.component.html | 2 +- .../loan-details/loan-details.component.html | 47 ++++++++++--------- .../supplier-info.component.html | 2 +- 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html index 03dbbc63b..b15a8e0c8 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html @@ -253,7 +253,7 @@ - + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html index c696112c5..db7dbacfa 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html @@ -1,7 +1,8 @@ +

Loan Details

- + @@ -20,33 +21,34 @@ --> - + - Yes No - - + + + + Yes No - - - - + - - + + - + @@ -62,10 +64,10 @@ --> - + - + @@ -74,7 +76,7 @@ - + {{ typeprop.name }} @@ -96,17 +98,17 @@ --> - + - {{owner.applicant_name}} - + {{ status.name }} @@ -119,11 +121,11 @@ - - @@ -136,6 +138,9 @@ - +
+ +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html index d70281fbc..aebcd79b4 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html @@ -89,7 +89,7 @@
- +
From e5f11136c0a92c1101ac0cc5cfc0688e82d4b7c4 Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Thu, 15 Nov 2018 15:40:14 +0530 Subject: [PATCH 22/45] employment form field name changes : kdk --- .../employment-info.component.html | 32 ++++++++++++----- .../employment-info.component.ts | 34 ++++++++++++------- 2 files changed, 44 insertions(+), 22 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html index 0f16f392e..3bc4dd36a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html @@ -3,9 +3,18 @@ - - - +
+ +
+
+ + + + + + +
+
@@ -13,9 +22,14 @@ No - - - +
+ + + + + + +
@@ -46,12 +60,12 @@ - + - + Date: Thu, 15 Nov 2018 15:45:27 +0530 Subject: [PATCH 23/45] merge chnages : kdk --- .../forms/employment-info/employment-info.component.html | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html index b2affd34d..182110f24 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html @@ -23,7 +23,6 @@ No -<<<<<<< HEAD
@@ -32,11 +31,6 @@
-======= - - - ->>>>>>> 5c030410fe6ccc3b23a783988e739a66e93bf0ea @@ -71,13 +65,10 @@ -<<<<<<< HEAD -======= ->>>>>>> 5c030410fe6ccc3b23a783988e739a66e93bf0ea Date: Thu, 15 Nov 2018 17:47:16 +0530 Subject: [PATCH 24/45] assets form drop down changes : kdk --- .../assets-info/assets-info.component.html | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html index b15a8e0c8..bb44aef7f 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html @@ -205,19 +205,26 @@
- Is there a loan? + + + Yes + No + + +
-
+
-
+
-
+
@@ -253,7 +260,7 @@ - +
From 09a8abebfe422fb8ed87c23afcd88006c83f6253 Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Thu, 15 Nov 2018 18:03:26 +0530 Subject: [PATCH 25/45] UI changes --- .../edit-pd-applicant.component.html | 16 +++------------- .../list-pd/view-pd/view-pd.component.html | 2 +- .../qc-list/qc-view/qc-view.component.html | 2 +- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html index 6b83b14eb..3ae92fc5a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html @@ -62,19 +62,9 @@
-
- -
- - - - - -
-
- - -
+
+ + 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 234582cf1..3674c3165 100644 --- 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 @@ -77,7 +77,7 @@  {{applicant.applicant_name}}     -  {{applicant.mobile_no}}
Main Applicant +  {{applicant.mobile_no}}
Main Applicant
   {{applicant.relation_name}}

diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html index 6d24d5113..900b3663f 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html @@ -69,7 +69,7 @@  {{applicant.applicant_name}}     -  {{applicant.mobile_no}}
Main Applicant +  {{applicant.mobile_no}}
Main Applicant
   {{applicant.relation_name}}

From a7c6c24e6636a406326f894886096071244aa198 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 15 Nov 2018 18:14:58 +0530 Subject: [PATCH 26/45] assets form frequency key name changes --- .../start-pd/forms/assets-info/assets-info.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html index bb44aef7f..fd8954030 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html @@ -112,7 +112,7 @@
- {{ freqn.name }} + {{ freqn.name }}
From a45e3b640c3e2d637f1da659f38f0bb71f145eb2 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 15 Nov 2018 18:15:36 +0530 Subject: [PATCH 27/45] merge : kms --- .../edit-pd-applicant.component.html | 16 +++------------- .../list-pd/view-pd/view-pd.component.html | 2 +- .../qc-list/qc-view/qc-view.component.html | 2 +- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html index 6b83b14eb..3ae92fc5a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html @@ -62,19 +62,9 @@
-
- -
- - - - - -
-
- - -
+
+ + 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 234582cf1..3674c3165 100644 --- 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 @@ -77,7 +77,7 @@  {{applicant.applicant_name}}     -  {{applicant.mobile_no}}
Main Applicant +  {{applicant.mobile_no}}
Main Applicant
   {{applicant.relation_name}}

diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html index 6d24d5113..900b3663f 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html @@ -69,7 +69,7 @@  {{applicant.applicant_name}}     -  {{applicant.mobile_no}}
Main Applicant +  {{applicant.mobile_no}}
Main Applicant
   {{applicant.relation_name}}

From 2e837324b9b78f39fd9e37776b6de0ca356823ce Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Thu, 15 Nov 2018 19:03:23 +0530 Subject: [PATCH 28/45] employement form changes --- .../employment-info.component.html | 12 ++++++------ .../employment-info/employment-info.component.ts | 15 +++++++++------ .../list-pd/start-pd/start-pd.component.html | 2 +- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html index 182110f24..6ace32f28 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html @@ -16,7 +16,7 @@
- + Yes @@ -31,7 +31,7 @@
- + Yes @@ -41,14 +41,14 @@ - + Yes No - + Yes @@ -67,8 +67,8 @@ - + { - console.log('value', value); if (value.status == 200) { this.employmentForm.controls['employer_name'].setValue(value.records.employer_name); this.employmentForm.controls['how_long_year'].setValue(value.records.how_long_year); @@ -76,13 +79,13 @@ export class EmploymentInfoComponent implements OnInit { employer_name: ['', Validators.compose([Validators.required])], how_long_year: ['', Validators.compose([Validators.required])], how_long_month: ['', Validators.compose([Validators.required])], - was_met: ['', Validators.compose([Validators.required])], + was_met: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], name_person_met: [''], designation_person_met: [''], - confirm_salary: ['', Validators.compose([Validators.required])], + confirm_salary: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], confirm_salary_amount: [''], - attendance_seen: ['', Validators.compose([Validators.required])], - sal_reg_seen: ['', Validators.compose([Validators.required])], + attendance_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], + sal_reg_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], gross_monthly_salary: ['', Validators.compose([Validators.required])], net_monthly_salary: ['', Validators.compose([Validators.required])], bonus_incentive: ['', Validators.compose([Validators.required])], diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index ab40fa472..830380285 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -422,7 +422,7 @@ - + From 8d0cd26c4e4fa3c6396b2e00226a9895a1ffcb97 Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Fri, 16 Nov 2018 10:56:42 +0530 Subject: [PATCH 29/45] Family form UI --- .../family-details.component.html | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html index d1cfcc450..526514332 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html @@ -14,12 +14,12 @@ - +

Earning Members -

+

- @@ -65,7 +65,7 @@

Non Earning Members -

+

- @@ -106,7 +106,7 @@ -

Residence

+

Residence

From e2f537a40dde6825ee54b85f692872540814bc30 Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Fri, 16 Nov 2018 12:18:16 +0530 Subject: [PATCH 30/45] Address label UI --- .../manage-pd/list-pd/add-pd/add-pd.component.html | 2 +- .../list-pd/edit-pd-master/edit-pd-master.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html index b993c2532..f1d058fb4 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html @@ -93,7 +93,7 @@ - + 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 5a84f3f3b..294808f73 100644 --- 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 @@ -86,7 +86,7 @@ - + From f54bd33b3acc3b106e90e87db034b01602313630 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 16 Nov 2018 12:45:06 +0530 Subject: [PATCH 31/45] forms changes in qc --- .../list-pd/add-pd/add-pd.component.html | 2 +- .../personal-info/personal-info.component.ts | 2 + .../manage-pd/manage-pd.module.ts | 2 +- .../qc-list/qc-start/qc-start.component.html | 74 +++++- .../qc-list/qc-start/qc-start.component.scss | 248 ++++++++++-------- .../qc-list/qc-start/qc-start.component.ts | 17 +- .../qc-list/qc-view/qc-view.component.ts | 15 +- 7 files changed, 238 insertions(+), 122 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html index b993c2532..4b05fa227 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html @@ -280,7 +280,7 @@ (click)="onReset()">settings_backup_restore - + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts index ec43db4e9..4faf03284 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component.ts @@ -135,6 +135,7 @@ loadFormWithIDData(data) { }); //console.log(this._personalForm); this.loadDataStatus = true; + } loadFormData(){ @@ -190,6 +191,7 @@ loadFormWithIDData(data) { }); //console.log(this._personalForm); this.loadDataStatus = true; + } //get pd main applicant array values 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 4ccb8e100..24c4e74dd 100644 --- 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 @@ -165,7 +165,7 @@ const pdCustomNotifierOptions: NotifierOptions = { OwlNativeDateTimeModule, ], // declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent], - exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent], + exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent], providers: [PdTrigerService, GetGeometricLocationService], entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent] }) diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html index db51c2644..a931c74f1 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html @@ -24,6 +24,13 @@ + + + {{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }} + + + + @@ -37,7 +44,7 @@
-

{{mainApplicantName}}

@@ -52,10 +59,12 @@

- +
+

No Records Found..

+
@@ -362,7 +371,66 @@ - + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss index fc7ac8814..9db46e8db 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.scss @@ -1,118 +1,136 @@ @import "./../../../../assets/styles/scss/components/messages"; :host { - margin-left: -5px; - margin-right: -5px; - margin-top: -5px; - display: block; -} -:host /deep/ { - mat-sidenav { - width: 250px; - } - .mat-sidenav-content { - padding: 0; - - } - @media (min-width: 959px) { - .mat-sidenav-side { - background-color: transparent; - box-shadow: none!important; - } - - } -} - -.mat-expansion-panel-header-description { - color: rgba(0, 0, 0, 87); -} -.mat-card-content { - background-color: white; -} -.mat-card-actions { - background-color: white; -} - -.text-ellipsis { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.custm-list-item { - cursor: pointer; -} - - -$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important; -$product-bg-color-hover: rgba(103, 58, 183, 0.7); -.p-list-main { - background: white; - margin: auto; - position: relative; - overflow: hidden !important; - border-radius: 10px 10px 10px 10px; - box-shadow: $base-card-box-shadow; - transform: scale(0.95); - transition: box-shadow 0.5s, transform 0.5s; - &:hover { - transform: scale(1); - box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2); - } - .p-list { - position: relative; - .top { - height: 100%; - width: 100%; - // background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center; - -webkit-background-size: 100%; - -moz-background-size: 100%; - -o-background-size: 100%; - background-size: 100%; - } - .bottom { - width: 200%; - height: 15%; - transition: transform 0.5s; - h1 { - margin: 0; - padding: 0; - } - p { - margin: 0; - padding: 0; - } - .left { - height: 100%; - width: 50%; - background: #f4f4f4; - position: relative; - float: left; - .details { - padding: 5px; - float: left; - // width: calc(70% - 40px); - } + margin-left: -5px; + margin-right: -5px; + margin-top: -5px; + display: block; + } + :host /deep/ { + mat-sidenav { + width: 250px; + } + .mat-sidenav-content { + padding: 0; + + } + @media (min-width: 959px) { + .mat-sidenav-side { + background-color: transparent; + box-shadow: none!important; + } + + } + } + + .mat-expansion-panel-header-description { + color: rgba(0, 0, 0, 87); + } + .mat-card-content { + background-color: white; + } + .mat-card-actions { + background-color: white; + } + + .text-ellipsis { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .custm-list-item { + cursor: pointer; + } + + + $base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important; + $product-bg-color-hover: rgba(103, 58, 183, 0.7); + .p-list-main { + background: white; + margin: auto; + position: relative; + overflow: hidden !important; + border-radius: 10px 10px 10px 10px; + box-shadow: $base-card-box-shadow; + transform: scale(0.95); + transition: box-shadow 0.5s, transform 0.5s; + &:hover { + transform: scale(1); + box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2); + } + .p-list { + position: relative; + .top { + height: 100%; + width: 100%; + // background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center; + -webkit-background-size: 100%; + -moz-background-size: 100%; + -o-background-size: 100%; + background-size: 100%; + } + .bottom { + width: 200%; + height: 15%; + transition: transform 0.5s; + h1 { + margin: 0; + padding: 0; + } + p { + margin: 0; + padding: 0; + } + .left { + height: 100%; + width: 50%; + background: #f4f4f4; + position: relative; + float: left; + .details { + padding: 5px; + float: left; + // width: calc(70% - 40px); + } + + } + .right { + width: 50%; + background: #A6CDDE; + color: white; + float: right; + height: 200%; + overflow: hidden; + .details { + padding: 20px; + float: right; + width: calc(70% - 40px); + } + - } - .right { - width: 50%; - background: #A6CDDE; - color: white; - float: right; - height: 200%; - overflow: hidden; - .details { - padding: 20px; - float: right; - width: calc(70% - 40px); - } - - - } - } - } - -} -mat-icon{ - color: #ff3636; -} + } + } + } + + } + mat-icon{ + color: #ff3636; + } + .address { + display: flex; + padding: 0 2%; + flex-direction: column; + } + + .address > * { + width: 100%; + } + .matcard mat-form-field { + margin: 0 2%; + } + .address .button { + float: right; + width: 10px; + background: #62B013; + color: white; + } diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts index 3111050c5..296a97fe3 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts @@ -30,6 +30,12 @@ selectedQuestionIndex:number; getQuestionsLength:number; answerList:any=[]; ansPDList:any=[]; + +// forms details +pdFullDetails:any=[]; +categoryFormButtons: any; +formsCategoryEnable: boolean = false; +selectedFormsCategory: any; // create values for status check pdStatusCheck :any={ "DRAFT" :'DRAFT', @@ -83,9 +89,10 @@ loadTemplates(startID:string){ let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1); this.mainApplicantName = filterApplicantName[0].applicant_name; this.currentPDStatus = data.records.pdmaster_details.pd_status; - this.actualQuestions = data.records.counts.overall_question_count; this.answeredQuestions = data.records.counts.overall_answered_count; + this.categoryFormButtons = data.records.template_forms; + this.pdFullDetails = data.records } else{ this.pdMasterList=""; @@ -106,6 +113,7 @@ loadTemplates(startID:string){ } OnSelectDirectQuestions(selectedQuestions: any, categoryIndex:number,questionsIndex:number){ + this.formsCategoryEnable = false; this.selectedCategory=selectedQuestions; this.selectedCategoryIndex=categoryIndex; this.selectedQuestionIndex=questionsIndex; @@ -427,6 +435,13 @@ optionsMapItems(items) { }); } + // direct form based questions + OnSelectDirectForms(details: any) { + this.formsCategoryEnable = true; + this.selectedFormsCategory = details; + +} + // load pd view component loadPdViewCompoent(){ this.router.navigate([ '../../viewpd',this.startPD], { relativeTo: this.route }); diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts index ef3bad0c4..67819b0e6 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts @@ -7,6 +7,7 @@ import { QcService } from './../../qc-service/qc.service'; import { QcListComponent } from './../qc-list.component'; import { PdAllocationComponent } from './../../../personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component'; import { SmartPdAllocationComponent } from './../../../personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component'; +import { TelePdAllocationComponent } from './../../../personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component'; import { SchedulePdComponent } from './../../../personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component'; import { EditPdApplicantComponent } from './../../../personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component'; import { EditPdMasterComponent } from './../../../personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component'; @@ -108,7 +109,7 @@ export class QcViewComponent implements OnInit, OnDestroy { } // pd allocation to pdAllocationTo(pdData:any) { - if(pdData.fk_pd_type != 2){ + if(pdData.fk_pd_type == 1){ const dialogRef = this.dialog.open(PdAllocationComponent, { data: pdData, disableClose: true @@ -131,6 +132,18 @@ export class QcViewComponent implements OnInit, OnDestroy { this.viewPdDetails(this.viewID) }); } + else if(pdData.fk_pd_type == 3){ + const dialogRef = this.dialog.open(TelePdAllocationComponent, { + data: pdData, + disableClose: true, + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + + this.viewPdDetails(this.viewID) + }); + } } From 13f13fc9ff3ff01be1cc56c4a23532e88bdf37a2 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 16 Nov 2018 12:46:47 +0530 Subject: [PATCH 32/45] merge : kms --- .../list-pd/add-pd/add-pd.component.html | 2 +- .../edit-pd-master.component.html | 2 +- .../family-details.component.html | 20 +++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html index 4b05fa227..6e2e4dda6 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html @@ -93,7 +93,7 @@ - + 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 5a84f3f3b..294808f73 100644 --- 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 @@ -86,7 +86,7 @@ - + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html index d1cfcc450..526514332 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html @@ -14,12 +14,12 @@ - +

Earning Members -

+

- @@ -65,7 +65,7 @@

Non Earning Members -

+

- @@ -106,7 +106,7 @@ -

Residence

+

Residence

From 2218072ed77331780efcd746c5388af715197ee0 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 16 Nov 2018 15:07:25 +0530 Subject: [PATCH 33/45] pd service cretaed on / updated on date changes --- .../manage-pd/list-pd/add-pd/add-pd.component.ts | 2 +- .../personal-discussion/pd-service/pd-triger.service.ts | 8 ++++---- ng6-seed/src/app/quality-check/qc-service/qc.service.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) 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 5c90edc5b..4badcdf6d 100644 --- 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 @@ -309,7 +309,7 @@ export class AddPdComponent implements OnInit, OnDestroy { "pd_status": status, //"fk_pd_allocation_type":this.allocationTypeModel , "fk_createdby" : this._aws.getlocale(), - "createdon": new Date().toJSON().slice(0,19).replace('T',' ') + // "createdon": new Date().toJSON().slice(0,19).replace('T',' ') }; let pd_applicant_details : any=[{ "applicant_name":formValue.applicant_name, 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 212ab19e0..547f93f6e 100644 --- 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 @@ -150,7 +150,7 @@ export class PdTrigerService { editPdMasterDetails(editData: any, status: string): Observable { editData.pd_status = status; editData.fk_updatedby = this._aws.getlocale(); - editData.updatedon = currentdate; + // editData.updatedon = currentdate; return this._http.post(this.apiUrl + "updatePDMaster", {records: editData}) .pipe( @@ -180,7 +180,7 @@ export class PdTrigerService { // update pd officer updatePdOfficer(updateData: any): Observable { updateData.fk_updatedby = this._aws.getlocale(); - updateData.updatedon = currentdate; + // updateData.updatedon = currentdate; return this._http.post(this.apiUrl + "allocatePD", {"records": updateData}) .pipe( catchError(this.handleError('operation', [])) @@ -190,7 +190,7 @@ export class PdTrigerService { // update pd schedule updateSchedule(updateData: any): Observable { updateData.fk_scheduled_by = this._aws.getlocale(); - updateData.createdon = currentdate; + // updateData.createdon = currentdate; return this._http.post(this.apiUrl + "schdulePD", {"records": updateData}) .pipe( catchError(this.handleError('operation', [])) @@ -262,7 +262,7 @@ getPDFormDetailsWithID(pdID, formID ):Observable { // save pd answers savePDQuestions(saveData: any): Observable { saveData.createdby = this._aws.getlocale(); - saveData.fk_createdon = currentdate; + //saveData.fk_createdon = currentdate; // saveData[0].fk_updatedby = this._aws.getlocale(); // saveData[0].updatedon = currentdate; diff --git a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts index 101e6da51..8103d42fe 100644 --- a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts +++ b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts @@ -52,7 +52,7 @@ export class QcService { editPdMasterDetails(editData:any,status:string):Observable{ editData.pd_status = status; editData.fk_updatedby = this._aws.getlocale(); - editData.updatedon = currentdate; + // editData.updatedon = currentdate; return this._http.post(this.apiUrl+"updatePDMaster",{records:editData}) .pipe( @@ -86,7 +86,7 @@ export class QcService { // save pd answers savePDQuestions(saveData: any): Observable { saveData.createdby = this._aws.getlocale(); - saveData.fk_createdon = currentdate; + // saveData.fk_createdon = currentdate; // saveData[0].fk_updatedby = this._aws.getlocale(); // saveData[0].updatedon = currentdate; From 807ca7f69181399478bac7206d293585f62ca499 Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Fri, 16 Nov 2018 15:17:05 +0530 Subject: [PATCH 34/45] Mmaster card UI --- .../entity-list/entity.list.component.html | 15 +- .../questions/list/list.component.html | 227 +++++++++--------- .../templates.list.component.html | 65 +++-- 3 files changed, 158 insertions(+), 149 deletions(-) diff --git a/ng6-seed/src/app/settings/entity/entity-list/entity.list.component.html b/ng6-seed/src/app/settings/entity/entity-list/entity.list.component.html index d1e73369d..30604576f 100644 --- a/ng6-seed/src/app/settings/entity/entity-list/entity.list.component.html +++ b/ng6-seed/src/app/settings/entity/entity-list/entity.list.component.html @@ -1,10 +1,15 @@
+ + +
+
+ Entity Master +
+
-
- Entity Master -
-
+ +
@@ -52,6 +57,8 @@ + +
diff --git a/ng6-seed/src/app/template/questions/list/list.component.html b/ng6-seed/src/app/template/questions/list/list.component.html index ac0ed4c45..afaf902e9 100644 --- a/ng6-seed/src/app/template/questions/list/list.component.html +++ b/ng6-seed/src/app/template/questions/list/list.component.html @@ -1,123 +1,126 @@ - - - -
-
- Questions Master -
-
-
- -
-
- - - - - {{cat.category_name}} - - -
+ + +
+
+ Questions Master
-
- -
-
- - - - - - - - {{ product.category_name }} - - - - - {{ product.question }} - - - - - - - - - - - - - - - - - + + {{cat.category_name}} + + +
-
-
{{ product.question }} +
+ +
+
+ + + + + + {{ product.category_name }} + + + + + {{ product.question }} + + + + + + + + + + + + + + + + + + + +
No Record Found ...
+
+
+ + + - - -
No Record Found ...
-
-
- + --> + + + + + - - - -
+ + +
+
+ Template Master + +
+
+ + - -
-
- Template Master - -
-
- - -
-
- - + +
+
+ + +
+
+ @@ -58,15 +61,11 @@
-
- - - -
- -
+ + + +
+
- - - \ No newline at end of file + \ No newline at end of file From b8ccef18ecc9e037336c8f8e0d1c7e9a26d36d96 Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Fri, 16 Nov 2018 15:29:50 +0530 Subject: [PATCH 35/45] forms UI --- .../start-pd/forms/assets-info/assets-info.component.html | 4 ++-- .../start-pd/forms/business-info/business-info.component.html | 2 +- .../start-pd/forms/business-info/business-info.component.scss | 2 +- .../start-pd/forms/current-loan/current-loan.component.html | 4 ++-- .../start-pd/forms/other-income/other-income.component.html | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html index fd8954030..a912fafb3 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html @@ -221,12 +221,12 @@
- +
- +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html index 1563deb3d..bec5fb1b7 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html @@ -282,7 +282,7 @@
- + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss index 96152853a..c1a248bc2 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss @@ -8,7 +8,7 @@ width: 100%; } .matcard > * { - width: 45%; + width: 98%; } .card mat-form-field { margin: 0 2%; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html index 4e2407234..38d3c5061 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html @@ -30,10 +30,10 @@ - + - +
-
+ +
+
+ +
+ + + + + + +
@@ -260,7 +281,7 @@ - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts index 1593a37d6..a45cf8f6c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts @@ -299,7 +299,8 @@ public m_investmentType = []; details: this._formBuilder.array([]), approximate_market_value: ['', Validators.compose([Validators.required])], name_of_the_owner: ['', Validators.compose([Validators.required])], - year_of_purchase: ['', Validators.compose([Validators.required])], + purchase_year: ['', Validators.compose([Validators.required])], + purchase_month: ['', Validators.compose([Validators.required])], emi: [''], emi_paid: [''], elapsed_tenure: [''], @@ -467,7 +468,8 @@ public m_investmentType = []; details: this._formBuilder.array([]), approximate_market_value: [data.approximate_market_value, Validators.compose([Validators.required])], name_of_the_owner: [data.name_of_the_owner, Validators.compose([Validators.required])], - year_of_purchase: [data.year_of_purchase, Validators.compose([Validators.required])], + purchase_year: [data.purchase_year, Validators.compose([Validators.required])], + purchase_month: [data.purchase_month, Validators.compose([Validators.required])], emi: [data.emi || 0], emi_paid: [data.emi_paid || ''], elapsed_tenure: [data.elapsed_tenure || ''], @@ -485,7 +487,8 @@ public m_investmentType = []; assets_mode: val.assets_mode, approximate_market_value: val.approximate_market_value, name_of_the_owner: val.name_of_the_owner, - year_of_purchase: val.year_of_purchase, + purchase_year: val.purchase_year, + purchase_month: val.purchase_month, emi: val.emi, emi_paid: val.emi_paid, elapsed_tenure: val.elapsed_tenure, diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html index 2582904d1..8a7c5933b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html @@ -1,14 +1,14 @@ -
+
-
-
+
+
- +
@@ -62,7 +62,7 @@
- +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts index cc1911240..209045b4b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts @@ -31,7 +31,7 @@ export class ClientInfoComponent implements OnInit { @Input() pdid: number; - public _supplierQuesFrom: FormGroup; + public _clientQuesFrom: FormGroup; public submitted = false; public m_paymentModeType= [ { @@ -88,12 +88,11 @@ export class ClientInfoComponent implements OnInit { private pdTrigerService: PdTrigerService) { } ngOnInit() { - - this.getPdSupplierFormDetails(); + this.getClientFormDetails(); } apiLoadFinish: boolean = false; - getPdSupplierFormDetails() { - this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '1').subscribe( + getClientFormDetails() { + this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '2').subscribe( data => { if (data) { if(data.dataStatus){ @@ -112,21 +111,19 @@ apiLoadFinish: boolean = false; formLoadData(val) { if(val !== null) { let value = val; - this._supplierQuesFrom = this._formBuilder.group({ + this._clientQuesFrom = this._formBuilder.group({ pdid: [this.pdid], - formid: ['1'], - main_raw_materials: [value.main_raw_materials, Validators.compose([Validators.required])], - supplier_details: this._formBuilder.array([ + formid: ['2'], + client_details: this._formBuilder.array([ // this.initDetails(), ]) }); - this.addSupplierDetailsWithData(value.supplier_details); + this.addClientDetailsWithData(value.client_details); } else { - this._supplierQuesFrom = this._formBuilder.group({ + this._clientQuesFrom = this._formBuilder.group({ pdid: [this.pdid], - formid: ['1'], - main_raw_materials: [null, Validators.compose([Validators.required])], - supplier_details: this._formBuilder.array([ + formid: ['2'], + client_details: this._formBuilder.array([ this.initDetails(), ]) }); @@ -134,12 +131,12 @@ apiLoadFinish: boolean = false; } // convenience getter for easy access to form fields - get f() { return this._supplierQuesFrom.controls; } + get f() { return this._clientQuesFrom.controls; } // Dynamic Form field creation Functionality : START ===> initDetails() { return this._formBuilder.group({ - supplier_name: ['', Validators.compose([Validators.required])], + client_name: ['', Validators.compose([Validators.required])], contact_person: ['', Validators.compose([Validators.required])], mobile_number: ['', Validators.compose([Validators.required])], payment_mode: ['', Validators.compose([Validators.required])], @@ -152,7 +149,7 @@ apiLoadFinish: boolean = false; initDetailsWithdata(data) { return this._formBuilder.group({ - supplier_name: [data.supplier_name, Validators.compose([Validators.required])], + client_name: [data.client_name, Validators.compose([Validators.required])], contact_person: [data.contact_person, Validators.compose([Validators.required])], mobile_number: [data.mobile_number, Validators.compose([Validators.required])], payment_mode: [data.payment_mode, Validators.compose([Validators.required])], @@ -163,7 +160,7 @@ apiLoadFinish: boolean = false; }); } - addSupplierDetailsWithData(supp_data) { + addClientDetailsWithData(supp_data) { var result = Object.keys(supp_data).map(function(key) { return supp_data[key]; @@ -171,7 +168,7 @@ var result = Object.keys(supp_data).map(function(key) { if (result.length > 0) { for (let val of result) { let vals = { - supplier_name: val.supplier_name, + client_name: val.client_name, contact_person: val.contact_person, mobile_number: val.mobile_number, payment_mode: val.payment_mode, @@ -180,18 +177,18 @@ var result = Object.keys(supp_data).map(function(key) { frequency_of_purchase: val.frequency_of_purchase, freq_purchase_others_text_value: val.freq_purchase_others_text_value }; - const control = this._supplierQuesFrom.controls['supplier_details']; + const control = this._clientQuesFrom.controls['client_details']; control.push(this.initDetailsWithdata(vals)); } } } addSupplierDetails(e) { - const control = this._supplierQuesFrom.controls['supplier_details']; + const control = this._clientQuesFrom.controls['client_details']; control.push(this.initDetails()); } removeLanguage(i: number) { - const control = this._supplierQuesFrom.controls['supplier_details']; + const control = this._clientQuesFrom.controls['client_details']; control.removeAt(i); } @@ -209,14 +206,14 @@ var result = Object.keys(supp_data).map(function(key) { onSubmit() { this.submitted = true; // stop here if form is invalid - if (this._supplierQuesFrom.invalid) { + if (this._clientQuesFrom.invalid) { return; } else { - var answerFormValues = this._supplierQuesFrom.value; + var answerFormValues = this._clientQuesFrom.value; // To Remove The "Null" With Key also Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]); - alert(JSON.stringify(answerFormValues)); + // Add BRANCH data with help Service File this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe( dataresult => { From 6b693aadecaa052ede2c58c39c62b1c5d52ac46b Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 16 Nov 2018 16:38:50 +0530 Subject: [PATCH 37/45] business form changes --- .../forms/business-info/business-info.component.html | 2 +- .../forms/business-info/business-info.component.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html index 1563deb3d..40bf20632 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html @@ -70,7 +70,7 @@ + formControlName="family_members_involved" (selectionChange)="relationChanged($event)"> {{member.name}} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts index 624cb0caf..732af4e74 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts @@ -75,13 +75,19 @@ export class BusinessInfoComponent implements OnInit { return data.records.family_members_involved[key]; }); let enduse: any = []; + let existRelative: any =[]; selectedMembers.forEach(val => { enduse.push(val.member); + existRelative.push(val); }); + this.relativeNames = existRelative; if (DesgnArray.length == 0) { Desgn.push(this.createDesignation()); } else { + DesgnArray.forEach(datas => { Desgn.push(this.createDesignation()); + }); + } if (PartnrArray.length == 0) { Partnr.push(this.createPartners()); @@ -90,7 +96,7 @@ export class BusinessInfoComponent implements OnInit { Partnr.push(this.createPartners()); }); } - if (data.other_documents == 'yes') { + if (data.records.other_documents == 'yes') { DocArray = Object.keys(data.records.documents).map(function (key) { return data.records.documents[key]; }); @@ -114,7 +120,6 @@ export class BusinessInfoComponent implements OnInit { businessVal.designation = DesgnArray; businessVal.partners = PartnrArray; businessVal.documents = DocArray; - console.log('businessVal', businessVal); this.businessForm.setValue(businessVal); } else { From ee8a7d7cf09b51575e26a8f4f1a88379dc63990d Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 16 Nov 2018 16:39:40 +0530 Subject: [PATCH 38/45] merge : kms --- .../assets-info/assets-info.component.html | 37 +++++++++++---- .../assets-info/assets-info.component.ts | 9 ++-- .../business-info.component.html | 2 +- .../business-info.component.scss | 2 +- .../client-info/client-info.component.html | 10 ++-- .../client-info/client-info.component.ts | 47 +++++++++---------- .../current-loan/current-loan.component.html | 4 +- .../other-income/other-income.component.html | 4 +- 8 files changed, 68 insertions(+), 47 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html index fd8954030..de33ba465 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html @@ -193,13 +193,34 @@
-
+ +
+
+ +
+ + + + + + +
@@ -221,12 +242,12 @@
- +
- +
@@ -260,7 +281,7 @@ - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts index 1593a37d6..a45cf8f6c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts @@ -299,7 +299,8 @@ public m_investmentType = []; details: this._formBuilder.array([]), approximate_market_value: ['', Validators.compose([Validators.required])], name_of_the_owner: ['', Validators.compose([Validators.required])], - year_of_purchase: ['', Validators.compose([Validators.required])], + purchase_year: ['', Validators.compose([Validators.required])], + purchase_month: ['', Validators.compose([Validators.required])], emi: [''], emi_paid: [''], elapsed_tenure: [''], @@ -467,7 +468,8 @@ public m_investmentType = []; details: this._formBuilder.array([]), approximate_market_value: [data.approximate_market_value, Validators.compose([Validators.required])], name_of_the_owner: [data.name_of_the_owner, Validators.compose([Validators.required])], - year_of_purchase: [data.year_of_purchase, Validators.compose([Validators.required])], + purchase_year: [data.purchase_year, Validators.compose([Validators.required])], + purchase_month: [data.purchase_month, Validators.compose([Validators.required])], emi: [data.emi || 0], emi_paid: [data.emi_paid || ''], elapsed_tenure: [data.elapsed_tenure || ''], @@ -485,7 +487,8 @@ public m_investmentType = []; assets_mode: val.assets_mode, approximate_market_value: val.approximate_market_value, name_of_the_owner: val.name_of_the_owner, - year_of_purchase: val.year_of_purchase, + purchase_year: val.purchase_year, + purchase_month: val.purchase_month, emi: val.emi, emi_paid: val.emi_paid, elapsed_tenure: val.elapsed_tenure, diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html index 40bf20632..2e77dd01a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html @@ -282,7 +282,7 @@
- + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss index 96152853a..c1a248bc2 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss @@ -8,7 +8,7 @@ width: 100%; } .matcard > * { - width: 45%; + width: 98%; } .card mat-form-field { margin: 0 2%; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html index 2582904d1..8a7c5933b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html @@ -1,14 +1,14 @@ -
+
-
-
+
+
- +
@@ -62,7 +62,7 @@
- +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts index cc1911240..209045b4b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts @@ -31,7 +31,7 @@ export class ClientInfoComponent implements OnInit { @Input() pdid: number; - public _supplierQuesFrom: FormGroup; + public _clientQuesFrom: FormGroup; public submitted = false; public m_paymentModeType= [ { @@ -88,12 +88,11 @@ export class ClientInfoComponent implements OnInit { private pdTrigerService: PdTrigerService) { } ngOnInit() { - - this.getPdSupplierFormDetails(); + this.getClientFormDetails(); } apiLoadFinish: boolean = false; - getPdSupplierFormDetails() { - this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '1').subscribe( + getClientFormDetails() { + this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '2').subscribe( data => { if (data) { if(data.dataStatus){ @@ -112,21 +111,19 @@ apiLoadFinish: boolean = false; formLoadData(val) { if(val !== null) { let value = val; - this._supplierQuesFrom = this._formBuilder.group({ + this._clientQuesFrom = this._formBuilder.group({ pdid: [this.pdid], - formid: ['1'], - main_raw_materials: [value.main_raw_materials, Validators.compose([Validators.required])], - supplier_details: this._formBuilder.array([ + formid: ['2'], + client_details: this._formBuilder.array([ // this.initDetails(), ]) }); - this.addSupplierDetailsWithData(value.supplier_details); + this.addClientDetailsWithData(value.client_details); } else { - this._supplierQuesFrom = this._formBuilder.group({ + this._clientQuesFrom = this._formBuilder.group({ pdid: [this.pdid], - formid: ['1'], - main_raw_materials: [null, Validators.compose([Validators.required])], - supplier_details: this._formBuilder.array([ + formid: ['2'], + client_details: this._formBuilder.array([ this.initDetails(), ]) }); @@ -134,12 +131,12 @@ apiLoadFinish: boolean = false; } // convenience getter for easy access to form fields - get f() { return this._supplierQuesFrom.controls; } + get f() { return this._clientQuesFrom.controls; } // Dynamic Form field creation Functionality : START ===> initDetails() { return this._formBuilder.group({ - supplier_name: ['', Validators.compose([Validators.required])], + client_name: ['', Validators.compose([Validators.required])], contact_person: ['', Validators.compose([Validators.required])], mobile_number: ['', Validators.compose([Validators.required])], payment_mode: ['', Validators.compose([Validators.required])], @@ -152,7 +149,7 @@ apiLoadFinish: boolean = false; initDetailsWithdata(data) { return this._formBuilder.group({ - supplier_name: [data.supplier_name, Validators.compose([Validators.required])], + client_name: [data.client_name, Validators.compose([Validators.required])], contact_person: [data.contact_person, Validators.compose([Validators.required])], mobile_number: [data.mobile_number, Validators.compose([Validators.required])], payment_mode: [data.payment_mode, Validators.compose([Validators.required])], @@ -163,7 +160,7 @@ apiLoadFinish: boolean = false; }); } - addSupplierDetailsWithData(supp_data) { + addClientDetailsWithData(supp_data) { var result = Object.keys(supp_data).map(function(key) { return supp_data[key]; @@ -171,7 +168,7 @@ var result = Object.keys(supp_data).map(function(key) { if (result.length > 0) { for (let val of result) { let vals = { - supplier_name: val.supplier_name, + client_name: val.client_name, contact_person: val.contact_person, mobile_number: val.mobile_number, payment_mode: val.payment_mode, @@ -180,18 +177,18 @@ var result = Object.keys(supp_data).map(function(key) { frequency_of_purchase: val.frequency_of_purchase, freq_purchase_others_text_value: val.freq_purchase_others_text_value }; - const control = this._supplierQuesFrom.controls['supplier_details']; + const control = this._clientQuesFrom.controls['client_details']; control.push(this.initDetailsWithdata(vals)); } } } addSupplierDetails(e) { - const control = this._supplierQuesFrom.controls['supplier_details']; + const control = this._clientQuesFrom.controls['client_details']; control.push(this.initDetails()); } removeLanguage(i: number) { - const control = this._supplierQuesFrom.controls['supplier_details']; + const control = this._clientQuesFrom.controls['client_details']; control.removeAt(i); } @@ -209,14 +206,14 @@ var result = Object.keys(supp_data).map(function(key) { onSubmit() { this.submitted = true; // stop here if form is invalid - if (this._supplierQuesFrom.invalid) { + if (this._clientQuesFrom.invalid) { return; } else { - var answerFormValues = this._supplierQuesFrom.value; + var answerFormValues = this._clientQuesFrom.value; // To Remove The "Null" With Key also Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]); - alert(JSON.stringify(answerFormValues)); + // Add BRANCH data with help Service File this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe( dataresult => { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html index 4e2407234..38d3c5061 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html @@ -30,10 +30,10 @@ - + - + +
+
+
+ +
PD Details
+ +
+ + + + + {{LL.full_name}} + + + + + - -
- -
-
-
- -
PD Details
- -
- - - - - {{LL.full_name}} + + + Applicant ID Required + + + + + {{billL.billing_name}} - - - - - - - Applicant ID Required + + + + + Contact Person Required - - - {{billL.billing_name}} - - - - - - - Contact Person Required + + Contact Number Required + Enter Valid Mobile Number. + - - Contact Number Required - Enter Valid Mobile Number. - - - - - - {{PL.product_name}} - - - - - - - - - - {{SPL.subproduct_name}} - - - - - - - - - - {{CSL.customer_segment}} + + + {{PL.product_name}} - - - - - - {{PDL.type_name}} - - - - - + + - - - Enter valid amount. - - - - - - - - - - - - - - - - - - {{SL.state_name}} - - - - - - - - -` - {{CL.city_name}} + + + + {{SPL.subproduct_name}} - - - - - - - - - - Enter Valid Pincode. - - - - - - - -
-
-
-
-
-
- -
Main Applicant
- - + + + + + - - Name is Required. - - - - - - Enter Valid Mobile Number. - - - - - - - - - - -
-
-
-
- -
- - -
{{coDetails.controls.label.value}} {{i+1}}
- -
- - - - - - Enter Valid Mobile Number. - - - - - - - - - {{rel.name}} - + + + {{CSL.customer_segment}} + + + + + + + + {{PDL.type_name}} + + + + + + + + + + Enter valid amount. + + + + + + + + + + + + + + + + + + {{SL.state_name}} + + + + + + + + ` + {{CL.city_name}} + + + + + + + + + + + Enter Valid Pincode. + + + + - -
- - - -
-
-
-
-
-
- -
- -
Co-Applicant
- - - - - -
-
-
-
+ + +
+ +
+
+
+
+ +
Main Applicant
+ + + + + Name is Required. + + + + + + Enter Valid Mobile Number. + + + + + + + + + + +
+
+
+
+ +
+ + +
{{coDetails.controls.label.value}} {{i+1}}
+ +
+ + + + + + Enter Valid Mobile Number. + + + + + + + + + {{rel.name}} + + + + +
+ + + +
+
+
+
+
+
+ +
+ +
Co-Applicant
+ + + + + +
+
+
+
+ +
-
- - -
Document
- - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
-
-
-
+ +
Document
+ + + + + +
+
+ + + + + + + + +
+ - - - - - + + + +
+
+
+
+
+
+ + + + + + + + + + + + + + + - - - - - - - - - - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html b/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html index 4b0fc9fb6..d65d984fd 100755 --- a/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html +++ b/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html @@ -12,29 +12,32 @@
-
-
+
+
-
+

{{userDetails.user_first_name}} {{userDetails.user_last_name}}

-

{{userDetails.role_name}}

-

{{userDetails.email}}

-

{{userDetails.mobile_no}}

+

{{userDetails.role_name}}

{{userDetails.city_name}} ,{{userDetails.state_name}}

-
- - +
- +
From 9db05f7dcc0845abae3cd10b26d900fceaeb3ce5 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 17 Nov 2018 10:32:42 +0530 Subject: [PATCH 41/45] fimamce changes --- .../start-pd/forms/financial-info/financial-info.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts index 41e4e8014..6d12f4675 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts @@ -46,7 +46,6 @@ export class FinancialInfoComponent implements OnInit { params.pd_id = this.pdid; params.pd_form_id = this.form_id; this._pd.retriveForm(params).subscribe(value => { - console.log('value', value); const financial_date = this.financialForm.controls['date_per_financial']; const estimated_val = this.financialForm.controls['estimated_value']; if (value.status == 200) { From f290e27b2210845f25dc17526c398fc6c8536025 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 17 Nov 2018 10:33:23 +0530 Subject: [PATCH 42/45] merge : kms --- .../list-pd/add-pd/add-pd.component.html | 545 +++++++++--------- .../user-profile/user-profile-component.html | 27 +- 2 files changed, 286 insertions(+), 286 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html index 6e2e4dda6..58a8e09a6 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html @@ -1,293 +1,290 @@ - -
+ + + + +
+ +
+
+
+ +
PD Details
+ +
+ + + + + {{LL.full_name}} + + + + + - -
- -
-
-
- -
PD Details
- -
- - - - - {{LL.full_name}} + + + Applicant ID Required + + + + + {{billL.billing_name}} - - - - - - - Applicant ID Required + + + + + Contact Person Required - - - {{billL.billing_name}} - - - - - - - Contact Person Required + + Contact Number Required + Enter Valid Mobile Number. + - - Contact Number Required - Enter Valid Mobile Number. - - - - - - {{PL.product_name}} - - - - - - - - - - {{SPL.subproduct_name}} - - - - - - - - - - {{CSL.customer_segment}} + + + {{PL.product_name}} - - - - - - {{PDL.type_name}} - - - - - + + - - - Enter valid amount. - - - - - - - - - - - - - - - - - - {{SL.state_name}} - - - - - - - - -` - {{CL.city_name}} + + + + {{SPL.subproduct_name}} - - - - - - - - - - Enter Valid Pincode. - - - - - - - -
-
-
-
-
-
- -
Main Applicant
- - + + + + + - - Name is Required. - - - - - - Enter Valid Mobile Number. - - - - - - - - - - -
-
-
-
- -
- - -
{{coDetails.controls.label.value}} {{i+1}}
- -
- - - - - - Enter Valid Mobile Number. - - - - - - - - - {{rel.name}} - + + + {{CSL.customer_segment}} + + + + + + + + {{PDL.type_name}} + + + + + + + + + + Enter valid amount. + + + + + + + + + + + + + + + + + + {{SL.state_name}} + + + + + + + + ` + {{CL.city_name}} + + + + + + + + + + + Enter Valid Pincode. + + + + - -
- - - -
-
-
-
-
-
- -
- -
Co-Applicant
- - - - - -
-
-
-
+ + +
+ +
+
+
+
+ +
Main Applicant
+ + + + + Name is Required. + + + + + + Enter Valid Mobile Number. + + + + + + + + + + +
+
+
+
+ +
+ + +
{{coDetails.controls.label.value}} {{i+1}}
+ +
+ + + + + + Enter Valid Mobile Number. + + + + + + + + + {{rel.name}} + + + + +
+ + + +
+
+
+
+
+
+ +
+ +
Co-Applicant
+ + + + + +
+
+
+
+ +
-
- - -
Document
- - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
-
-
-
+ +
Document
+ + + + + +
+
+ + + + + + + + +
+ - - - - - + + + +
+
+
+
+
+
+ +
+ + + + + + + + + + + +
+
- - - - - - - - - - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html b/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html index 4b0fc9fb6..d65d984fd 100755 --- a/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html +++ b/ng6-seed/src/app/settings/users/user-profile/user-profile-component.html @@ -12,29 +12,32 @@
-
-
+
+
-
+

{{userDetails.user_first_name}} {{userDetails.user_last_name}}

-

{{userDetails.role_name}}

-

{{userDetails.email}}

-

{{userDetails.mobile_no}}

+

{{userDetails.role_name}}

{{userDetails.city_name}} ,{{userDetails.state_name}}

-
- - +
- +
From ec5044bb9f8b812296d118882afd05a89eaac5bb Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Sat, 17 Nov 2018 10:33:52 +0530 Subject: [PATCH 43/45] assets , current loan details changes : kdk --- .../assets-info/assets-info.component.html | 402 ++++++++---------- .../assets-info/assets-info.component.ts | 47 +- .../client-info/client-info.component.ts | 131 +++--- .../current-loan/current-loan.component.html | 2 +- .../current-loan/current-loan.component.ts | 47 +- 5 files changed, 335 insertions(+), 294 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html index de33ba465..bd79a2d1b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html @@ -1,70 +1,70 @@ - - - -

Assets Details

-
-
-
-
- - -
-
- - - {{ asset.name }} - - -
- -
- -
-
-
-
-
- - - {{ prop.name }} - - -
+ + + +

Assets Details

+ +
+
+
+ + +
+
+ + + {{ asset.name }} + + +
+ +
+ +
+
+
+
+
+ + + {{ prop.name }} + +
- -
-
-
-
-
- - - -
+
+ +
+
+
+
+
+ + +
- -
-
-
-
-
- - - -
+
+ +
+
+
+
+
+ + +
- + - -
-
-
-
-
+ +
+
+
+
+
+ + + +
+
+
+
+
+ +
+
+
+
+
+
+ + + {{ ins_type.name }} + + +
+
- + + +
+
+ + + {{ freqn.name }} +
-
-
-
- -
-
-
-
-
-
- - - {{ ins_type.name }} - - -
-
- - - -
-
- - - {{ freqn.name }} - - -
-
-
-
- - - -
-
- - - -
-
-
-
-
-
- -
-
-
-
-
-
- - - {{ ins_type.name }} - - -
-
- - - -
-
- - - -
-
-
-
-
-
- -
-
-
-
-
+
+
- + + +
+
+ +
@@ -176,100 +133,119 @@
- -
-
-
- - + +
+
+
+
+
+
+ + + {{ ins_type.name }} +
+
+ + + +
+
+ + + +
+
-
- +
+
+
+ +
+
+
+
+
+ + + +
+
+
+
+
+
+ +
+
+
+ + + +
+
+
+
-
-
-
+
+
-
- - - - - - -
+
+ + + + + +
-
- +
+
- - - Yes - No + + + Yes + No - - -
+ +
-
+
-
+
-
-
-
- - +
+
+
+ -
- - - - -
-
- +
+ +
- -
- - - - -
- +
+ + + + +
+ - - - + + + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts index a45cf8f6c..f111a2091 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts @@ -297,10 +297,10 @@ public m_investmentType = []; return this._formBuilder.group({ assets_mode: ['', Validators.compose([Validators.required])], details: this._formBuilder.array([]), - approximate_market_value: ['', Validators.compose([Validators.required])], - name_of_the_owner: ['', Validators.compose([Validators.required])], - purchase_year: ['', Validators.compose([Validators.required])], - purchase_month: ['', Validators.compose([Validators.required])], + approximate_market_value: ['', Validators.compose([])], + name_of_the_owner: ['', Validators.compose([])], + purchase_year: ['', Validators.compose([])], + purchase_month: ['', Validators.compose([])], emi: [''], emi_paid: [''], elapsed_tenure: [''], @@ -323,12 +323,12 @@ public m_investmentType = []; } case '2': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.load_Two_Four_Weeler()); + control.push(this.load_Four_Weeler()); break; } case '3': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.load_Two_Four_Weeler()); + control.push(this.load_Two_Weeler()); break; } case '4': { @@ -371,7 +371,7 @@ public m_investmentType = []; loadJwellDescription() { return this._formBuilder.group({ - jwell_description: ['', Validators.compose([Validators.required])] + jwell_description: ['', Validators.compose([])] }); } @@ -405,9 +405,15 @@ public m_investmentType = []; }); } - load_Two_Four_Weeler() { + load_Four_Weeler() { return this._formBuilder.group({ - manufacturer_model: ['', Validators.compose([Validators.required])] + manufacturer_model_four_weeler: ['', Validators.compose([Validators.required])] + }); + } + + load_Two_Weeler() { + return this._formBuilder.group({ + manufacturer_model_two_weeler: ['', Validators.compose([Validators.required])] }); } @@ -455,21 +461,28 @@ public m_investmentType = []; }); } - load_Two_Four_WeelerWithData(data) { + load_Four_WeelerWithData(data) { return this._formBuilder.group({ - manufacturer_model: [data.manufacturer_model, Validators.compose([Validators.required])] + manufacturer_model_four_weeler: [data.manufacturer_model_four_weeler, Validators.compose([Validators.required])] }); } + load_Two_WeelerWithData(data) { + return this._formBuilder.group({ + manufacturer_model_two_weeler: [data.manufacturer_model_two_weeler, Validators.compose([Validators.required])] + }); + } + + initDetailsWithdata(data) { return this._formBuilder.group({ assets_mode: [data.assets_mode, Validators.compose([Validators.required])], details: this._formBuilder.array([]), - approximate_market_value: [data.approximate_market_value, Validators.compose([Validators.required])], - name_of_the_owner: [data.name_of_the_owner, Validators.compose([Validators.required])], - purchase_year: [data.purchase_year, Validators.compose([Validators.required])], - purchase_month: [data.purchase_month, Validators.compose([Validators.required])], + approximate_market_value: [data.approximate_market_value, Validators.compose([])], + name_of_the_owner: [data.name_of_the_owner, Validators.compose([])], + purchase_year: [data.purchase_year, Validators.compose([])], + purchase_month: [data.purchase_month, Validators.compose([])], emi: [data.emi || 0], emi_paid: [data.emi_paid || ''], elapsed_tenure: [data.elapsed_tenure || ''], @@ -519,12 +532,12 @@ public m_investmentType = []; } case '2': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.load_Two_Four_WeelerWithData(data)); + control.push(this.load_Four_WeelerWithData(data)); break; } case '3': { const control = (this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray; - control.push(this.load_Two_Four_WeelerWithData(data)); + control.push(this.load_Two_WeelerWithData(data)); break; } case '4': { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts index 209045b4b..7d03785e4 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts @@ -33,63 +33,98 @@ export class ClientInfoComponent implements OnInit { public _clientQuesFrom: FormGroup; public submitted = false; - public m_paymentModeType= [ - { - 'id': "1", - 'name': 'Immediate Or Advanced Payment' - }, - { - 'id': "2", - 'name': 'Credit' - }, - { - 'id': "3", - 'name': 'Combination of Both' - }, - ]; - public m_freqOfPurchase= [ - { - 'id': "1", - 'name': 'Daily' - }, - { - 'id': "2", - 'name': 'Weekly' - }, - { - 'id': "3", - 'name': 'Monthly' - }, - { - 'id': "4", - 'name': 'Every 3 months' - }, - { - 'id': "5", - 'name': 'Half yearly' - }, - { - 'id': "6", - 'name': 'Yearly' - }, - { - 'id': "7", - 'name': 'As and when required' - }, - { - 'id': "8", - 'name': 'Others' - } - ] + public m_paymentModeType= []; + // public m_paymentModeType= [ + // { + // 'id': "1", + // 'name': 'Immediate Or Advanced Payment' + // }, + // { + // 'id': "2", + // 'name': 'Credit' + // }, + // { + // 'id': "3", + // 'name': 'Combination of Both' + // }, + // ]; + public m_freqOfPurchase= []; + // public m_freqOfPurchase= [ + // { + // 'id': "1", + // 'name': 'Daily' + // }, + // { + // 'id': "2", + // 'name': 'Weekly' + // }, + // { + // 'id': "3", + // 'name': 'Monthly' + // }, + // { + // 'id': "4", + // 'name': 'Every 3 months' + // }, + // { + // 'id': "5", + // 'name': 'Half yearly' + // }, + // { + // 'id': "6", + // 'name': 'Yearly' + // }, + // { + // 'id': "7", + // 'name': 'As and when required' + // }, + // { + // 'id': "8", + // 'name': 'Others' + // } + // ] constructor( private _formBuilder: FormBuilder, private pdTrigerService: PdTrigerService) { } ngOnInit() { + this.getM_FreqOfPurchase(); + this.getM_PaymentModeType(); this.getClientFormDetails(); } + + +// ================== + + getM_FreqOfPurchase() { + this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe( + data => { + this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + getM_PaymentModeType() { + this.pdTrigerService.getAllMasterDatas('PAYMENTMODE').subscribe( + data => { + this.m_paymentModeType = data.records.filter(data => data.isactive == 1); + }, + error => { + // this.notifier.notify('warning', 'No Category Records Found.!'); + // this.m_assets_type = "No Category Records Found."; + } + ) + } + + +// ================== + apiLoadFinish: boolean = false; getClientFormDetails() { this.pdTrigerService.getPDFormDetailsWithID(this.pdid, '2').subscribe( diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html index 38d3c5061..ec2f92b62 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html @@ -3,7 +3,7 @@

Current Loan Details

- Yes No diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts index a1a4b369b..0ba8ef7fe 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts @@ -21,7 +21,7 @@ import { } from '@angular/material'; /** Service */ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; -import {ActivatedRoute, Router} from "@angular/router"; +import { ActivatedRoute, Router } from "@angular/router"; @Component({ selector: 'app-current-loan', @@ -35,8 +35,8 @@ export class CurrentLoanComponent implements OnInit { @Input() form_id: number; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, - private router: Router, - private _pd: PdTrigerService) { + private router: Router, + private _pd: PdTrigerService) { this.notifier = notifier; } @@ -49,18 +49,22 @@ export class CurrentLoanComponent implements OnInit { console.log('value', value); const control = this.currentLoanForm.controls['loan_details']; if (value.status == 200) { - var result = Object.keys(value.records.loan_details).map(function(key) { - return value.records.loan_details[key]; - }); + this.currentLoanForm.controls['existing_loan'].setValue(value.records.existing_loan); this.currentLoanForm.controls['currentloan_remarks'].setValue(value.records.currentloan_remarks); - if (result.length > 0) { - result.forEach(val => { - control.push(this.createLoanDetail()); + + if (value.records.existing_loan == 'Yes') { + var result = Object.keys(value.records.loan_details).map(function (key) { + return value.records.loan_details[key]; }); - this.currentLoanForm.controls['loan_details'].setValue(result); - } else { - control.push(this.createLoanDetail()); + if (result.length > 0) { + result.forEach(val => { + control.push(this.createLoanDetail()); + }); + this.currentLoanForm.controls['loan_details'].setValue(result); + } else { + control.push(this.createLoanDetail()); + } } } else { control.push(this.createLoanDetail()); @@ -74,6 +78,16 @@ export class CurrentLoanComponent implements OnInit { loan_details: this.fb.array([]), }); } + + selectedLoanChanges(e): void { + if (e.value == 'Yes') { + const control = this.currentLoanForm.controls['loan_details']; + control.push(this.createLoanDetail()); + } else if (e.value == 'No') { + const arr = this.currentLoanForm.controls.loan_details; + arr.removeAt(0); + } + } createLoanDetail() { return this.fb.group({ loan_amount: ['', Validators.compose([Validators.required])], @@ -94,7 +108,8 @@ export class CurrentLoanComponent implements OnInit { } submitCurrentloan() { if (!this.currentLoanForm.valid) { - return; + console.log("data invalid") + return; } let records: any = {}; records.pdid = this.pdid; @@ -102,7 +117,9 @@ export class CurrentLoanComponent implements OnInit { records.fk_createdby = this.pdid; records.existing_loan = this.currentLoanForm.controls['existing_loan'].value; records.currentloan_remarks = this.currentLoanForm.controls['currentloan_remarks'].value; - records.loan_details = this.currentLoanForm.controls['loan_details'].value; + if (records.existing_loan == 'Yes') { + records.loan_details = this.currentLoanForm.controls['loan_details'].value; + } console.log('data', records); this._pd.saveForm(records).subscribe(data => { console.log('data', data); @@ -115,7 +132,7 @@ export class CurrentLoanComponent implements OnInit { Object.keys(formGroup.controls).forEach(field => { const control = formGroup.get(field); if (control instanceof FormControl) { - control.markAsTouched({onlySelf: true}); + control.markAsTouched({ onlySelf: true }); } else if (control instanceof FormGroup) { this.validateAllFormFields(control); } From daef289d0d5b4361d3d9cc59f0133d17658ffd07 Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Sat, 17 Nov 2018 11:13:51 +0530 Subject: [PATCH 44/45] View PD UI --- .../list-pd/view-pd/view-pd.component.html | 8 ++-- .../qc-list/qc-view/qc-view.component.html | 37 +++++++------------ 2 files changed, 17 insertions(+), 28 deletions(-) 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 3674c3165..8cf0f6c50 100644 --- 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 @@ -5,7 +5,7 @@

{{master.lender_full_name}} - {{master.lender_applicant_id}}

{{master.pd_date_of_initiation}} -
+
@@ -15,7 +15,7 @@
- + person{{master.pd_allocated_to | titlecase}} person{{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}} person{{master.centralofficer | titlecase}} @@ -72,12 +72,12 @@ - +

 {{applicant.applicant_name}}     -  {{applicant.mobile_no}}
Main Applicant
+  {{applicant.mobile_no}}
Main Applicant    {{applicant.relation_name}}

diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html index 900b3663f..8c6e7f629 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html @@ -61,34 +61,23 @@ Applicants - - -

- -  {{applicant.applicant_name}}     - -  {{applicant.mobile_no}}
Main Applicant
-    {{applicant.relation_name}} -

- - -
- -
- -
- + +

+ +  {{applicant.applicant_name}}     + +  {{applicant.mobile_no}}
Main Applicant +    {{applicant.relation_name}} +

+
+
+

No Applicant

- - - - +
- - -
+
From d5324e464a20f8eeb356970156202550c7195e51 Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Sat, 17 Nov 2018 11:48:39 +0530 Subject: [PATCH 45/45] PD UI --- .../manage-pd/list-pd/view-pd/view-pd.component.html | 2 +- .../app/quality-check/qc-list/qc-view/qc-view.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 8cf0f6c50..60a7d8168 100644 --- 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 @@ -78,7 +78,7 @@  {{applicant.applicant_name}}      {{applicant.mobile_no}}
Main Applicant -    {{applicant.relation_name}} + {{applicant.relation_name}}

diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html index 8c6e7f629..f31e1a45f 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html @@ -69,7 +69,7 @@  {{applicant.applicant_name}}      {{applicant.mobile_no}}
Main Applicant -    {{applicant.relation_name}} + {{applicant.relation_name}}