From 69cc149b875e6345c187c3e6b82ab89355e28303 Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Wed, 14 Nov 2018 18:41:51 +0530 Subject: [PATCH 1/4] 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 780cfd2fa57fc5d01a2a09534f1e5216f627ed9e Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Wed, 14 Nov 2018 18:45:48 +0530 Subject: [PATCH 2/4] Question Maters add and Edit UI --- .../src/app/template/questions/add/add.component.html | 2 +- .../src/app/template/questions/edit/edit.component.html | 8 ++++---- 2 files changed, 5 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 24b8e339a..ea9bda418 100644 --- a/ng6-seed/src/app/template/questions/add/add.component.html +++ b/ng6-seed/src/app/template/questions/add/add.component.html @@ -66,7 +66,7 @@ {{ gp.group_name }} -
--> + -->
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 b68978cdff55846133fc4c5e97de059631186bfa Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Wed, 14 Nov 2018 19:06:12 +0530 Subject: [PATCH 3/4] 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 4/4] 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(); });