diff --git a/ng6-seed/src/app/AwsService/aws.service.ts b/ng6-seed/src/app/AwsService/aws.service.ts index b0b47f371..86c7d6afb 100755 --- a/ng6-seed/src/app/AwsService/aws.service.ts +++ b/ng6-seed/src/app/AwsService/aws.service.ts @@ -770,14 +770,29 @@ adminlistgroup(enitiy){ } -adminSetpassword(awsuser){ +adminSetpassword(awsuser,lenname){ + // console.log(awsuser,lenname); this.getconfig(); - var params = { - Password: 'temp1234', /* required */ - UserPoolId: se_poolData.UserPoolId, /* required */ - Username: awsuser, /* required */ - Permanent: false - }; + if(lenname == 'SINEEDGE'){ + var params = { + Password: 'temp1234', /* required */ + UserPoolId: se_poolData.UserPoolId, /* required */ + Username: awsuser, /* required */ + Permanent: false + }; + } + else{ + if(lenname == 'LENDER'){ + var params = { + Password: 'temp1234', /* required */ + UserPoolId: lender_poolData.UserPoolId, /* required */ + Username: awsuser, /* required */ + Permanent: false + }; + } + + } + return Observable.create(observe=>{ let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider(); cognitoidentityserviceprovider.adminSetUserPassword(params, function(err, data) { diff --git a/ng6-seed/src/app/app.module.ts b/ng6-seed/src/app/app.module.ts index 0036bc60e..e9e4bbaa0 100755 --- a/ng6-seed/src/app/app.module.ts +++ b/ng6-seed/src/app/app.module.ts @@ -54,6 +54,8 @@ import { AngularFireModule } from '@angular/fire'; import { MessagingService } from './shared/messaging.service'; import { environment } from '../environments/environment'; import { AsyncPipe } from '../../node_modules/@angular/common'; +import { SalesPdComponent } from './sales-pd/sales-pd.component'; +import { PdTrigerService } from './personal-discussion/pd-service/pd-triger.service'; export function HttpLoaderFactory(http: HttpClient) { @@ -73,7 +75,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { AppComponent, AdminLayoutComponent, AuthLayoutComponent, - NewPasswordDialog,ForgotPass,ChangePasswordDialog, RoleMenuItemsPipe, + NewPasswordDialog,ForgotPass,ChangePasswordDialog, RoleMenuItemsPipe, SalesPdComponent, ], imports: [ BrowserModule, @@ -118,6 +120,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { }, AwsService,AuthGuard, TranslateService, + PdTrigerService, // { // provide: PERFECT_SCROLLBAR_CONFIG, // useValue: DEFAULT_PERFECT_SCROLLBAR_CONFIG diff --git a/ng6-seed/src/app/app.routing.ts b/ng6-seed/src/app/app.routing.ts index 6d249f73c..50264b3fc 100755 --- a/ng6-seed/src/app/app.routing.ts +++ b/ng6-seed/src/app/app.routing.ts @@ -4,6 +4,7 @@ import { AdminLayoutComponent } from './layouts/admin/admin-layout.component'; import { AuthLayoutComponent } from './layouts/auth/auth-layout.component'; import { CognitoService} from './AwsService/cognito.service'; import { AuthGuard } from './_guard/auth.guard'; +import { SalesPdComponent } from './sales-pd/sales-pd.component'; export const AppRoutes: Routes = [{ path: '', redirectTo: 'home', @@ -30,6 +31,10 @@ export const AppRoutes: Routes = [{ path:'quality_check_discussion', loadChildren:'./quality-check/quality-check.module#QualityCheckModule' }, + { + path:'sales-pd-list', + component:SalesPdComponent + }, { path:'reports', loadChildren:'./reports/reports.module#ReportsModule' 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 4c3ca6724..be1ea2291 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts @@ -155,21 +155,23 @@ export class AddPdComponent implements OnInit, OnDestroy { this.lenderShortName = lender['short_name']; // console.log(this.lenderShortName); this._PDtriggerForm.controls.pd_branch_id.setValue(null); - - if(this.lenderShortName == 'CLIX'){ - let getProductAbbr = this.productAllList.map(dval => dval.product_abbr); - let ClixProductAbbr = ['BL','LAEP']; - let FilteredAbbr: any = []; - FilteredAbbr = ClixProductAbbr.map(x => { - let findIndex = getProductAbbr.indexOf(x); - return this.productAllList[findIndex]; - }); - this.productList = FilteredAbbr.length > 0 ? FilteredAbbr : this.productAllList; - } - else{ this.productList = this.productAllList; - } + + // if(this.lenderShortName == 'CLIX'){ + + // let getProductAbbr = this.productAllList.map(dval => dval.product_abbr); + // let ClixProductAbbr = ['BL','LAEP']; + // let FilteredAbbr: any = []; + // FilteredAbbr = ClixProductAbbr.map(x => { + // let findIndex = getProductAbbr.indexOf(x); + // return this.productAllList[findIndex]; + // }); + // this.productList = FilteredAbbr.length > 0 ? FilteredAbbr : this.productAllList; + // } + // else{ + // this.productList = this.productAllList; + // } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts index f5bbb5300..d74ee369b 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts @@ -170,21 +170,22 @@ export class EditPdMasterComponent implements OnInit { if(!option){ this._EditPDtriggerForm.controls.pd_branch_id.setValue(null); } - - if(this.lenderShortName == 'CLIX'){ - - let getProductAbbr = this.productAllList.map(dval => dval.product_abbr); - let ClixProductAbbr = ['BL','LAEP']; - let FilteredAbbr: any = []; - FilteredAbbr = ClixProductAbbr.map(x => { - let findIndex = getProductAbbr.indexOf(x); - return this.productAllList[findIndex]; - }); - this.productList = FilteredAbbr.length > 0 ? FilteredAbbr : this.productAllList; - } - else{ this.productList = this.productAllList; - } + + // if(this.lenderShortName == 'CLIX'){ + + // let getProductAbbr = this.productAllList.map(dval => dval.product_abbr); + // let ClixProductAbbr = ['BL','LAEP']; + // let FilteredAbbr: any = []; + // FilteredAbbr = ClixProductAbbr.map(x => { + // let findIndex = getProductAbbr.indexOf(x); + // return this.productAllList[findIndex]; + // }); + // this.productList = FilteredAbbr.length > 0 ? FilteredAbbr : this.productAllList; + // } + // else{ + // this.productList = this.productAllList; + // } @@ -399,7 +400,7 @@ if(!option){ // console.log(1); this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self')); if(this.lenderShortName == 'CLIX' && flag==2 ){ this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('5'); } - this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(this.subProductList[0].subproduct_id); + // this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(this.subProductList[0].subproduct_id); this.subProductList=[]; this.isSubproductShown = false; break; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts index 69b67fdf9..c4b6b05c5 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts @@ -71,6 +71,7 @@ export class AddressComponent implements OnInit { stateDataList: any = []; cityDataList: any = []; pincodeDataList: any = []; + product_abbr: any; /**Constructor of the class */ constructor(private el: ElementRef, notifier: NotifierService, @@ -92,6 +93,8 @@ export class AddressComponent implements OnInit { this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id; this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr; + this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr; + console.log(this.product_abbr); this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr; let CSAbbrSearch = this.pd_all_details.pdmaster_details.customer_segment_abbr.search("-"); @@ -179,7 +182,7 @@ export class AddressComponent implements OnInit { } } - if(this.lender_short_name != 'CLIX') { + if(this.lender_short_name != 'CLIX' && this.product_abbr != 'BL') { this.addressForm.controls.estimated_area.setValue(datas.estimated_area ? datas.estimated_area : '') this.addressForm.controls.uom.setValue(datas.uom); @@ -222,7 +225,7 @@ export class AddressComponent implements OnInit { // was_the_company_name_board_sighted:['', Validators.compose([Validators.required])], address_form_remark: [''] }); - if(this.lender_short_name == 'CLIX'){ + if(this.lender_short_name == 'CLIX' || this.product_abbr == 'BL'){ this.addressForm.removeControl('estimated_area'); this.addressForm.removeControl('uom'); } @@ -532,7 +535,7 @@ export class AddressComponent implements OnInit { records.addresses[0].locality_mixuse = this.addressForm.controls.locality_mixuse.value; records.addresses[0].pd_location = this.addressForm.controls.pd_location.value; records.addresses[0].comment_locality = this.addressForm.controls.comment_locality.value; - if(this.lender_short_name != 'CLIX') { + if(this.lender_short_name != 'CLIX' && this.product_abbr != 'BL') { records.addresses[0].estimated_area = this.addressForm.controls.estimated_area.value records.addresses[0].uom = this.addressForm.controls.uom.value; if (this.addressForm.controls.uom.value == 1) { @@ -557,7 +560,7 @@ export class AddressComponent implements OnInit { records.alternative_addresses[0].locality_mixuse = this.addressForm.controls.locality_mixuse.value; records.alternative_addresses[0].pd_location = this.addressForm.controls.pd_location.value; records.alternative_addresses[0].comment_locality = this.addressForm.controls.comment_locality.value; - if(this.lender_short_name != 'CLIX') { + if(this.lender_short_name != 'CLIX' && this.product_abbr != 'BL') { records.alternative_addresses[0].estimated_area = this.addressForm.controls.estimated_area.value records.alternative_addresses[0].uom = this.addressForm.controls.uom.value; if (this.addressForm.controls.uom.value == 1) { @@ -735,7 +738,7 @@ export class AddressComponent implements OnInit { this.addressForm.controls.locality_others.setValue(datas.locality_others); } - if(this.lender_short_name != 'CLIX'){ + if(this.lender_short_name != 'CLIX' && this.product_abbr != 'BL'){ this.addressForm.controls.estimated_area.setValue(datas.estimated_area ? datas.estimated_area : '') this.addressForm.controls.uom.setValue(datas.uom) this.setOthers(datas.uom, '', 5); @@ -806,7 +809,7 @@ export class AddressComponent implements OnInit { this.addressForm.controls.locality_others.setValue(datas.locality_others); } - if(this.lender_short_name != 'CLIX'){ + if(this.lender_short_name != 'CLIX' && this.product_abbr != 'BL'){ this.addressForm.controls.estimated_area.setValue(datas.estimated_area); this.addressForm.controls.uom.setValue(datas.uom); this.setOthers(datas.uom, '', 5); 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 74ea7bdb0..d8333e6fc 100755 --- 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 @@ -74,13 +74,13 @@ - + -
+
@@ -358,7 +358,7 @@ -->
- + @@ -386,7 +386,7 @@ -
+
Asset Owned by Required - - +
+ Age of Asset in Years Invalid year format -->
+
- +
@@ -415,8 +416,8 @@ *ngIf="sup.controls['business_name_of_the_other_owner'].hasError('required')">Asset Owned by is Required - - +
+ Age of Asset in Years Invalid year format -->
+
+ *ngIf="(sup.get('business_assets_mode').value != '') && sup.get('business_ownership_type').value == 'owned' && (lender_short_name != 'CLIX' && lender_short_name != 'SMC' || product_abbr === 'LFMP')">
appt.applicant_type != 2) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts index a8f8836d3..20ae9b662 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts @@ -47,7 +47,9 @@ export class BusinessInfoGroupComponent implements OnInit { this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr; this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr; this.lender_short_name = this.pd_all_details.pdmaster_details.lender_short_name; + console.log(this.lender_short_name); this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr; + console.log(this.product_abbr); } @@ -197,7 +199,7 @@ export class BusinessInfoGroupComponent implements OnInit { this.getCompanyListForBusiness(); }); }else - if((this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP') && details.form_id==23){ + if((this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP' || (this.product_abbr == 'LFMP' && this.lender_short_name == 'SMC')) && details.form_id==23){ const dialogRef = this.dialog.open(FuturePlansAndBusinessEnvironmentComponent, { data: this.pd_all_details, maxWidth: '100vw', 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 2e13ad345..7aa7b55cb 100755 --- 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 @@ -1577,7 +1577,7 @@ type="number" formControlName="employees_permanent" required> Permanent Required - + Temporary Required 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 cd4fbb770..bb5f646fd 100755 --- 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 @@ -130,7 +130,9 @@ export class BusinessInfoComponent implements OnInit { this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr; this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr; this.lender_short_name = this.pd_all_details.pdmaster_details.lender_short_name; + console.log(this.lender_short_name); this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr; + console.log(this.product_abbr); console.log("com",this.company_id) this.image_doc_params={pdid:this.pdid,form_id:this.form_id,company_id:this.company_id} } @@ -394,12 +396,16 @@ export class BusinessInfoComponent implements OnInit { }); if (selectedRetail.length > 0) { selectedRetail.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert'); - if(this.lender_short_name != 'CLIX'){ + if( !(this.lender_short_name == 'CLIX' && this.product_abbr == 'BL') && !(this.lender_short_name == 'SMC' && this.product_abbr == 'BL')){ + console.log('###PAY');console.log(this.lender_short_name,this.product_abbr) selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets'); selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines'); selectedRetail.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines'); selectedRetail.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('pos_machines_details', this.fb.array([])) : this.businessForm.removeControl('pos_machines_details'); } + else{ + console.log('###ELSE');console.log(this.lender_short_name,this.product_abbr) + } selectedRetail.forEach((element, index) => { this.CheckExport(element.area_of_sale, 'RActivity', index); @@ -461,7 +467,7 @@ export class BusinessInfoComponent implements OnInit { }); if (selectedWholesale.length > 0) { selectedWholesale.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert'); - if(this.lender_short_name != 'CLIX'){ + if(!(this.lender_short_name == 'CLIX' && this.product_abbr == 'BL') && !(this.lender_short_name == 'SMC' && this.product_abbr == 'BL')){ selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets'); selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines'); selectedWholesale.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines'); @@ -530,7 +536,7 @@ export class BusinessInfoComponent implements OnInit { }); if (selectedService.length > 0) { selectedService.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('practice_cert'); - if(this.lender_short_name != 'CLIX'){ + if(!(this.lender_short_name == 'CLIX' && this.product_abbr == 'BL') && !(this.lender_short_name == 'SMC' && this.product_abbr == 'BL')){ selectedService.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets'); selectedService.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines'); selectedService.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines'); @@ -800,7 +806,7 @@ export class BusinessInfoComponent implements OnInit { this.businessForm.value.service_provider_activity_details.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl(this.businessForm.value.practice_cert, Validators.required)) : this.businessForm.removeControl('practice_cert'); // check activity for extra question make dynamic - if(this.lender_short_name != 'CLIX'){ + if(!(this.lender_short_name == 'CLIX' && this.product_abbr == 'BL') && !(this.lender_short_name == 'SMC' && this.product_abbr == 'BL')){ this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl(this.businessForm.value.applicant_use_mobile_wallets)) : this.businessForm.removeControl('applicant_use_mobile_wallets'); this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl(this.businessForm.value.applicant_use_pos_machines)) : this.businessForm.removeControl('applicant_use_pos_machines'); if (this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0) { 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 12fd1c5a6..d0fbd22c1 100755 --- 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 @@ -56,7 +56,7 @@
-
+
Select @@ -140,6 +140,13 @@ type="number">
+
+ + + +
@@ -196,7 +203,7 @@
-
+
Select @@ -280,6 +287,13 @@ type="number">
+
+ + + +
@@ -333,7 +347,7 @@
-
+
@@ -419,6 +433,13 @@ type="number">
+
+ + + +
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 25ffe1f02..dd749cda3 100755 --- 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 @@ -436,7 +436,8 @@ export class ClientInfoComponent implements OnInit { person_landline: ['', Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])], other_person_designation: [''], manufacturing_credit_days_from: [''], - manufacturing_credit_days_to: [''] + manufacturing_credit_days_to: [''], + manufacturing_contribution_total_turnover :[''] }) } else { return this._formBuilder.group({ @@ -453,7 +454,8 @@ export class ClientInfoComponent implements OnInit { person_landline: [records.person_landline || null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])], other_person_designation: [records.other_person_designation || null], manufacturing_credit_days_from: [records.manufacturing_credit_days_from || null], - manufacturing_credit_days_to: [records.manufacturing_credit_days_to || null] + manufacturing_credit_days_to: [records.manufacturing_credit_days_to || null], + manufacturing_contribution_total_turnover: [records.manufacturing_contribution_total_turnover || null] }) } } @@ -485,6 +487,7 @@ export class ClientInfoComponent implements OnInit { trade_product_frequency_of_purchase: [''], trade_product_credit_days_from: [''], trade_product_credit_days_to: [''], + trade_product_contribution_total_turnover: [''], person_title_name: [''], person_designation: [''], person_stdcode: ['', Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])], @@ -502,6 +505,7 @@ export class ClientInfoComponent implements OnInit { trade_product_frequency_of_purchase: [records.trade_product_frequency_of_purchase], trade_product_credit_days_from: [records.trade_product_credit_days_from], trade_product_credit_days_to: [records.trade_product_credit_days_to], + trade_product_contribution_total_turnover: [records.trade_product_contribution_total_turnover || null], person_title_name: [records.person_title_name || null], person_designation: [records.person_designation || null], person_stdcode: [records.person_stdcode || null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])], @@ -538,6 +542,7 @@ export class ClientInfoComponent implements OnInit { service_provider_product_frequency_of_purchase: [''], service_provider_product_credit_days_from: [''], service_provider_product_credit_days_to: [''], + service_provider_contribution_total_turnover: [''], person_title_name: [''], person_designation: [''], person_stdcode: ['', Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])], @@ -555,6 +560,7 @@ export class ClientInfoComponent implements OnInit { service_provider_product_frequency_of_purchase: [records.service_provider_product_frequency_of_purchase], service_provider_product_credit_days_from: [records.service_provider_product_credit_days_from], service_provider_product_credit_days_to: [records.service_provider_product_credit_days_to], + service_provider_contribution_total_turnover: [records.service_provider_contribution_total_turnover || null], person_title_name: [records.person_title_name || null], person_designation: [records.person_designation || null], person_stdcode: [records.person_stdcode || null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])], @@ -825,4 +831,29 @@ retriveFile(){ } }); }*/ + +onBlurMethod(v,items,option) { + + if(v >= 101){ + // alert('Only 100% is limit'); + this.notifier.notify('warning', 'Only 100% is limit'); + if(option == 1){ + items.controls['manufacturing_contribution_total_turnover'].setValue(''); + } + if(option == 2){ + items.controls['trade_product_contribution_total_turnover'].setValue(''); + } + if(option == 3){ + items.controls['service_provider_contribution_total_turnover'].setValue(''); + } + } + // const charCode = (event.which) ? event.which : event.keyCode; + // console.log(charCode); + // if (charCode > 31 && (charCode < 48 || charCode > 57)) { + // return false; + // } + // return true; + +} + } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.html index 98c09f699..69a88e926 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.html @@ -70,7 +70,7 @@ add --> \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts index eb3c1c646..8cac3dc77 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component.ts @@ -15,6 +15,7 @@ export class OtherApplicantDetailsComponent implements OnInit { applicantInfo: any = { 'pd_co_applicant_id': "", 'applicant_name': '', 'is_applicant': false, 'is_person_met': false, applicant_title_name: '', age: '', qualification: '', course_name: '' }; titleList: any = []; qualificationList: any = []; + individuals_order_id: any; //EditGeneralFormData: any=[]; //EditFlag: boolean = false; @@ -77,10 +78,11 @@ export class OtherApplicantDetailsComponent implements OnInit { // create applicant form array createApplicant(elementValue: any) { + console.log('00000',elementValue); return this._fb.group({ pd_co_applicant_id: [elementValue.pd_co_applicant_id], - applicant_title_name: [elementValue.applicant_title_name, Validators.required], - applicant_name: [elementValue.applicant_name || '', Validators.required], + applicant_title_name: [elementValue.applicant_title_name, Validators.required], + applicant_name: [{value:elementValue.applicant_name, disabled : elementValue.individuals_order_id == 1 ? true : false} || '', Validators.required], is_applicant: [elementValue.is_applicant || false], is_person_met: [elementValue.is_person_met || false], age: [elementValue.age || ''], 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 d305eddca..84076b4db 100755 --- 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 @@ -134,7 +134,7 @@
--> -
+
@@ -273,7 +273,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 387b106b1..cd1f58984 100755 --- 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 @@ -67,6 +67,7 @@ export class FamilyDetailsComponent implements OnInit { stateDataList: any = []; cityDataList: any = []; pincodeDataList: any = []; + product_abbr: any; /** constructor Of the class */ constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, @@ -81,6 +82,7 @@ export class FamilyDetailsComponent implements OnInit { this.selectPerson = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type != '2'); this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id; this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name; + this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr; this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant; this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html index e54872b00..95a6a785f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html @@ -147,9 +147,10 @@ Specify the Mode of Transport Used to Visit the PD address Required - + CLIX + SMC diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts index bd8fcf686..40b4c62dd 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts @@ -100,7 +100,7 @@ export class FinalRemarksComponent implements OnInit { final_form_remarks: [''] }); - if(this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP'){ + if(this.lender_short_name == 'CLIX' || this.lender_short_name == 'SMC' || this.product_abbr == 'LAEP'){ this.product_abbr == 'LAEP' ? this._finalRemarkForm.addControl('outlet_location', new FormControl('', Validators.required)) : this._finalRemarkForm.removeControl('outlet_location'); this._finalRemarkForm.addControl('is_competition', new FormControl('')); this._finalRemarkForm.addControl('sealing_activity', new FormControl('')); @@ -239,7 +239,7 @@ export class FinalRemarksComponent implements OnInit { this._finalRemarkForm.controls.market_intelligence.setValue(data.records.market_intelligence || ''); - if(this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP'){ + if(this.lender_short_name == 'CLIX' || this.lender_short_name == 'SMC' || this.product_abbr == 'LAEP'){ if(this.product_abbr == 'LAEP') {this._finalRemarkForm.controls.outlet_location.setValue(this.product_abbr == 'LAEP' ? data.records.outlet_location : ''); } this._finalRemarkForm.controls.is_competition.setValue(data.records.is_competition); 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 e1038369f..a2e1960e7 100755 --- 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 @@ -397,7 +397,7 @@ {{AV_netProfitAmtInwords[i]}} Only --> - + {{"₹"}} @@ -486,7 +486,7 @@
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html index b40791c31..d4dbdd2b3 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html @@ -97,7 +97,7 @@ - @@ -168,7 +168,7 @@ KYC Required - diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts index d197f31eb..3e05a54e4 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts @@ -574,6 +574,7 @@ export class GeneralInfoComponent implements OnInit { width: '40%', disableClose: true }); + console.log(value); dialogRef.afterClosed() .subscribe(dataRes=>{ // console.log("close",dataRes) 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 de7c0f7a2..ece26c11d 100755 --- 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 @@ -58,7 +58,7 @@ End Use Required - + Select @@ -76,7 +76,7 @@ -
+
@@ -119,7 +119,7 @@ - + Select @@ -166,7 +166,7 @@ - + {{"₹"}} {{ loanDetailsForm.controls['emi_level'].value | numberToWords }} Only @@ -246,7 +246,7 @@ {{"₹"}} {{ loanDetailsForm.controls['emv_per_customer'].value | numberToWords }} Only - + 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 0ace46d78..7056adae4 100755 --- 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 @@ -335,7 +335,7 @@ export class LoanDetailsComponent implements OnInit { if (this.pd_all_details.pdmaster_details.fk_subproduct_id) { this.loanDetailsForm.controls['sub_product'].setValue(this.pd_all_details.pdmaster_details.fk_subproduct_id); } - if(this.lenderShortName == 'CLIX'){ + if(this.lenderShortName == 'CLIX' || this.lenderShortName == 'SMC'){ // console.log(this.lenderShortName); this.loanDetailsForm.controls['is_transfer'].setValue("no"); this.selectedBalancesTransferChanges("no") @@ -838,7 +838,7 @@ export class LoanDetailsComponent implements OnInit { } } } - if(this.lenderShortName == 'CLIX'){ + if(this.lenderShortName == 'CLIX' || this.lenderShortName == 'SMC'){ this.loanDetailsForm.controls['own_contribution'].setValue(''); this.loanDetailsForm.controls['own_contribution'].clearValidators(); this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity(); @@ -892,7 +892,7 @@ export class LoanDetailsComponent implements OnInit { records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value; } else if (this.loanDetailsForm.controls['is_transfer'].value == 'no') { - if (this.isContribution || this.lenderShortName == 'CLIX') { + if (this.isContribution || this.lenderShortName == 'CLIX' || this.lenderShortName == 'SMC') { records.own_contribution = ''; records.source_group = ''; records.other_source = ''; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts index 588212606..69fd6a9f0 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts @@ -127,23 +127,22 @@ export class QueriesDocsComponent implements OnInit { // else{ // geoCoords=retrieved_data.link // } - if(retrieved_data.docs_to_be_sighted != null){ - - - retrieved_data.docs_to_be_sighted.forEach((doc_value,index)=>{ - if(doc_value.hasOwnProperty('img')){ - this.docs_change_fun(index,'yes') - } - else if(doc_value.hasOwnProperty('reason')){ - this.docs_change_fun(index,'no'); - } - // let data=doc_value.control_name - // data=parseInt(data) - // console.log("data",data); - // data=doc_value.data - // this.docs_change_fun(index,data) - }) - } + + if(retrieved_data.docs_to_be_sighted != null){ + retrieved_data.docs_to_be_sighted.forEach((doc_value,index)=>{ + if(doc_value.hasOwnProperty('img')){ + this.docs_change_fun(index,'yes') + } + else if(doc_value.hasOwnProperty('reason')){ + this.docs_change_fun(index,'no'); + } + // let data=doc_value.control_name + // data=parseInt(data) + // console.log("data",data); + // data=doc_value.data + // this.docs_change_fun(index,data) + }) + } // console.log("form123",this.docsCollectedForm.value); this.docsCollectedForm.patchValue(retrieved_data) 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 4682378f2..45da5fed6 100755 --- 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 @@ -12,7 +12,7 @@
-
+ @@ -46,7 +46,7 @@ Stock Required -
+
@@ -141,7 +141,7 @@ -
+
-
+
-
+
- +

@@ -430,7 +430,7 @@ -
+
+
+ + + +

diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts index 084d44818..6792ae083 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts @@ -59,6 +59,7 @@ export class StockComponent implements OnInit { public SPsufficientList: any = [{value:"yes",isdisplayvalue:"Yes",isdisabled:false},{value:"no",isdisplayvalue:"No",isdisabled:false},{value:"not applicable",isdisplayvalue:"Stock not required to be maintained",isdisabled:false}]; lender_short_name: any; image_doc_params: { pdid: number; form_id: number; company_id: string; }; + product_abbr: any; /** Constructor */ constructor(notifier: NotifierService, @@ -73,6 +74,7 @@ export class StockComponent implements OnInit { this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name + this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr; this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.form_id = 11; this.company_id = this.pd_all_details.company_id; @@ -176,6 +178,7 @@ export class StockComponent implements OnInit { trade_details: this.fb.array([this.tradingFormCreation(type4length)]), servicing_details: this.fb.array([this.servicingFormCreation(type5length)]), is_sufficiant_finished_and_traded_goods: [dataForm.is_sufficiant_finished_and_traded_goods], + stock_validated: [dataForm.stock_validated || null], finished_and_traded_goods_remarks: [dataForm.finished_and_traded_goods_remarks], is_sufficiant_service_goods: [dataForm.hasOwnProperty('is_sufficiant_service_goods') ? dataForm.is_sufficiant_service_goods : ''], service_goods_remarks: [dataForm.hasOwnProperty('service_goods_remarks') ? dataForm.service_goods_remarks : '' ] @@ -204,8 +207,11 @@ export class StockComponent implements OnInit { if (val.type_of_activity_id == 4) { if (val.products) { let trading_temparr = []; - trading_temparr['trading_traded_goods'] = dataForm.trade_details[0].trading_traded_goods; - this.initTradingDetails(trading_temparr); + if(dataForm.trade_details[0]) + { + trading_temparr['trading_traded_goods'] = dataForm.trade_details[0].trading_traded_goods ; + this.initTradingDetails(trading_temparr); + } } } if (val.type_of_activity_id == 5) { @@ -240,6 +246,7 @@ export class StockComponent implements OnInit { trade_details: this.fb.array([this.tradingFormCreation(type4length)]), servicing_details: this.fb.array([this.servicingFormCreation(type5length)]), is_sufficiant_finished_and_traded_goods: [''], + stock_validated: [''], finished_and_traded_goods_remarks: [''], is_sufficiant_service_goods: [''], service_goods_remarks: [''] @@ -294,6 +301,7 @@ export class StockComponent implements OnInit { trade_details: this.fb.array([this.tradingFormCreation(type4length)]), servicing_details: this.fb.array([this.servicingFormCreation(type5length)]), is_sufficiant_finished_and_traded_goods: [''], + stock_validated: [''], finished_and_traded_goods_remarks: [''], is_sufficiant_service_goods: [''], service_goods_remarks: [''] 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 522c2ed2a..2927ed36f 100755 --- 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 @@ -50,7 +50,7 @@ formControlName="manufacturing_supplier_name">
-
+
@@ -157,6 +157,13 @@ type="number">
+
+ + + +
@@ -221,7 +228,7 @@ formControlName="trade_supplier_name">
-
+
@@ -330,6 +337,13 @@ type="number">
+
+ + + +
@@ -399,7 +413,7 @@ formControlName="service_provider_supplier_name">
-
+
@@ -506,6 +520,13 @@ type="number">
+
+ + + +
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 b3165e6f1..9167b2b00 100755 --- 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 @@ -53,6 +53,7 @@ export class SupplierInfoComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef) { this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name + console.log(this.lender_short_name); this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.form_id = 1; this.company_id = this.pd_all_details.company_id @@ -382,6 +383,7 @@ export class SupplierInfoComponent implements OnInit { manufacturing_payment_mode: [''], manufacturing_credit_days_from: [''], manufacturing_credit_days_to: [''], + manufacturing_contribution_total_purchase: [''], manufacturing_frequency_of_purchase: [''], person_stdcode: ['', Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])], person_landline: ['', Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])], @@ -400,6 +402,7 @@ export class SupplierInfoComponent implements OnInit { manufacturing_payment_mode: [records.manufacturing_payment_mode], manufacturing_credit_days_from: [records.manufacturing_credit_days_from || null], manufacturing_credit_days_to: [records.manufacturing_credit_days_to || null], + manufacturing_contribution_total_purchase: [records.manufacturing_contribution_total_purchase || null], manufacturing_frequency_of_purchase: [records.manufacturing_frequency_of_purchase || null], person_stdcode: [records.person_stdcode || null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])], person_landline: [records.person_landline || null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])], @@ -437,6 +440,7 @@ export class SupplierInfoComponent implements OnInit { trade_product_frequency_of_purchase: [''], trade_product_credit_days_from: [''], trade_product_credit_days_to: [''], + trade_product_contribution_total_purchase: [''], }) } else { return this._formBuilder.group({ @@ -454,6 +458,7 @@ export class SupplierInfoComponent implements OnInit { trade_product_frequency_of_purchase: [records.trade_product_frequency_of_purchase], trade_product_credit_days_from: [records.trade_product_credit_days_from], trade_product_credit_days_to: [records.trade_product_credit_days_to], + trade_product_contribution_total_purchase: [records.trade_product_contribution_total_purchase || null], }) } } @@ -489,6 +494,7 @@ export class SupplierInfoComponent implements OnInit { service_provider_frequency_of_purchase: [''], service_provider_credit_days_from: [''], service_provider_credit_days_to: [''], + service_provider_contribution_total_purchase: [''], }) } else { return this._formBuilder.group({ @@ -506,6 +512,7 @@ export class SupplierInfoComponent implements OnInit { service_provider_frequency_of_purchase: [records.service_provider_frequency_of_purchase], service_provider_credit_days_from: [records.service_provider_credit_days_from], service_provider_credit_days_to: [records.service_provider_credit_days_to], + service_provider_contribution_total_purchase: [records.service_provider_contribution_total_purchase || null], }) } } @@ -738,6 +745,32 @@ export class SupplierInfoComponent implements OnInit { items.controls['manufacturing_credit_days_from'].updateValueAndValidity(); items.controls['manufacturing_credit_days_to'].updateValueAndValidity(); } + + + } + + onBlurMethod(v,items,option) { + + if(v >= 101){ + // alert('Only 100% is limit'); + this.notifier.notify('warning', 'Only 100% is limit'); + if(option == 1){ + items.controls['manufacturing_contribution_total_purchase'].setValue(''); + } + if(option == 2){ + items.controls['trade_product_contribution_total_purchase'].setValue(''); + } + if(option == 3){ + items.controls['service_provider_contribution_total_purchase'].setValue(''); + } + } + // const charCode = (event.which) ? event.which : event.keyCode; + // console.log(charCode); + // if (charCode > 31 && (charCode < 48 || charCode > 57)) { + // return false; + // } + // return true; + } // { 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 0e8699499..d0e4b2835 100755 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -184,6 +184,19 @@ export class PdTrigerService { ) } + getSalesPd(): Observable { + return this._http.get(this.apiUrl + "listSalesPD/any") + .pipe( + catchError(this.handleError('operation', [])) + ) + } + getSalesPdpdf(pdfdetail): Observable { + return this._http.get(this.apiUrl + "downloadSalesPDReport/" + pdfdetail) + .pipe( + catchError(this.handleError('operation', [])) + ) + } + // get edit row pd details // This function also called in Final Remarks Form // Make sure FinalRemarksForm does not effect. whenever you done any changes onit means diff --git a/ng6-seed/src/app/sales-pd/sales-pd.component.html b/ng6-seed/src/app/sales-pd/sales-pd.component.html new file mode 100644 index 000000000..592875d90 --- /dev/null +++ b/ng6-seed/src/app/sales-pd/sales-pd.component.html @@ -0,0 +1,143 @@ + +
+
+ + + +
+
+ + + Sales PD + + + + + + + filter_list + + Advance Filter + + + + + + + +
+ + + + + {{details.sales_pd_id}} + + + + + + -- +
+ + {{details.applicant_name}} +
+ {{details.applicant_id}} +
+
+ + + {{details.short_name}} + + + + + {{details.abbr}} + + + + + + -- +
+ + {{details.officer_name}} + +
+
+ + + {{details.createdon | date: 'dd/MM/yyyy'}} + + + + + + + + + +
+ +
+ + + + +
+
+
\ No newline at end of file diff --git a/ng6-seed/src/app/sales-pd/sales-pd.component.scss b/ng6-seed/src/app/sales-pd/sales-pd.component.scss new file mode 100644 index 000000000..51db57442 --- /dev/null +++ b/ng6-seed/src/app/sales-pd/sales-pd.component.scss @@ -0,0 +1,20 @@ +.ic-change:hover { + transform: scale(1.1); + color: green; +} +.cell{ + display:inline !important; + text-align: center !important; +} +.cellhide{ + display: none !important; +} +.center{ + text-align:center; +} +.fontsize{ + font-size:14px; +} +.toolbar-space { + flex: 0.01 0 auto; +} diff --git a/ng6-seed/src/app/sales-pd/sales-pd.component.spec.ts b/ng6-seed/src/app/sales-pd/sales-pd.component.spec.ts new file mode 100644 index 000000000..60fd919b6 --- /dev/null +++ b/ng6-seed/src/app/sales-pd/sales-pd.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SalesPdComponent } from './sales-pd.component'; + +describe('SalesPdComponent', () => { + let component: SalesPdComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ SalesPdComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SalesPdComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/sales-pd/sales-pd.component.ts b/ng6-seed/src/app/sales-pd/sales-pd.component.ts new file mode 100644 index 000000000..f216cf6fc --- /dev/null +++ b/ng6-seed/src/app/sales-pd/sales-pd.component.ts @@ -0,0 +1,98 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material'; +import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service'; + +@Component({ + selector: 'app-sales-pd', + templateUrl: './sales-pd.component.html', + styleUrls: ['./sales-pd.component.scss'] +}) +export class SalesPdComponent implements OnInit { + + public dataLengthTab4: number; + public dataSourceTab4 = new MatTableDataSource(); + + displayedColumns = ['SalesPdId','Applicant Name','Short Name','Abbr','Officer Name','Create On','Action']; + + @ViewChild(MatPaginator) paginator: MatPaginator; + @ViewChild(MatSort) sort: MatSort; + + // data source variable details + salesPdData:any[] = []; + salesPdpdf:any[] = []; + + errorMessage:any[]=[]; + recordStatus: boolean; + + xpandStatus: boolean = false; + + // pagination variable details + length = 5; + pageIndex = 0; + pageSize = 10; + pageEvent: PageEvent; + todaydate:Date = new Date(); + + constructor(private _pdSales: PdTrigerService) { } + + ngOnInit() { + this.loadSalesPDDetails(); + // this.salesPDpdf(); + } + + + + loadSalesPDDetails() { + this._pdSales.getSalesPd() + .subscribe( + data => { + if (data.status == 200) { + this.salesPdData = data.records; + this.dataLengthTab4 = data.records.length; + this.dataSourceTab4.data = this.salesPdData; + } + else{ + this.salesPdData=[]; + this.dataLengthTab4= null; + this.recordStatus=true; + } + } + // , error => this.errorMessage = error); + ,error => { + this.errorMessage.push(error); + // this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!'); + alert(error.html_format); + }); + } + + salesPDpdf(pdfdetail){ + this._pdSales.getSalesPdpdf(pdfdetail) + .subscribe( + data => { + if (data.status == 200) { + // window.location.href=data.records; + window.open(data.records, '_blank'); + } + + } + // , error => this.errorMessage = error); + ,error => { + this.errorMessage.push(error); + // this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!'); + alert(error.html_format); + }); + + } + pageChange(e) { + console.log(e); + } + ngAfterViewInit() { + this.dataSourceTab4.paginator = this.paginator; + this.dataSourceTab4.sort = this.sort; + } + + applyFilter(filterValue: string) { + this.dataSourceTab4.filter = filterValue.trim().toLowerCase(); + } + +} diff --git a/ng6-seed/src/app/settings/users/register/register.component.ts b/ng6-seed/src/app/settings/users/register/register.component.ts index 7e504706f..96d0ce804 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.ts +++ b/ng6-seed/src/app/settings/users/register/register.component.ts @@ -482,8 +482,8 @@ callrole(flag,type,usersData){ resetAdminPassword(){ - - this.AWS.adminSetpassword(this.users.localUserId.aws_name).subscribe(res=>{ + // console.log(this.types); + this.AWS.adminSetpassword(this.users.localUserId.aws_name,this.types[0].name).subscribe(res=>{ if(res == 'success'){ // this.notifier.notify('success','Please Fill all the Fields') diff --git a/ng6-seed/src/app/shared/menu-items/horizontal-menu-items.ts b/ng6-seed/src/app/shared/menu-items/horizontal-menu-items.ts index 3838f8a2d..4dbb1f212 100755 --- a/ng6-seed/src/app/shared/menu-items/horizontal-menu-items.ts +++ b/ng6-seed/src/app/shared/menu-items/horizontal-menu-items.ts @@ -59,6 +59,12 @@ const HORIZONTALMENUITEMS = [ type:'link', icon:'done_all', }, + { + state:'sales-pd-list', + name:'Sales PD', + type:'link', + icon:'work', + }, { state:'reports', name:'Reports', diff --git a/ng6-seed/src/app/shared/menu-items/menu-items.ts b/ng6-seed/src/app/shared/menu-items/menu-items.ts index 1aabe360c..72843ff5c 100755 --- a/ng6-seed/src/app/shared/menu-items/menu-items.ts +++ b/ng6-seed/src/app/shared/menu-items/menu-items.ts @@ -100,6 +100,12 @@ const MENUITEMS : Menu[] = [ type:'link', icon:'done_all', }, + { + state:'sales-pd-list', + name:'Sales PD', + type:'link', + icon:'work', + }, { state:'reports', name:'Reports',