diff --git a/ng6-seed/package-lock.json b/ng6-seed/package-lock.json index f257d6a85..12a45c745 100755 --- a/ng6-seed/package-lock.json +++ b/ng6-seed/package-lock.json @@ -429,9 +429,9 @@ } }, "@angular/material-moment-adapter": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-7.1.1.tgz", - "integrity": "sha512-Ql0yFCuaWnRSSUqkCbeD8kRJ3oPVvl8GgsV20AvOKEpZ2eKvR+kapNbUqW8PTZb/Ovp5xDIaBaFjx5R89U4uxg==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-6.4.7.tgz", + "integrity": "sha512-OGdDtpu/yRioOQXhJFCNuiOF2OgiL9VUj8ewFPi1lDtFGUFfVwU2h3hWkKLn+yuPW+DBVYla11tCNsn5dLElmA==", "requires": { "tslib": "^1.7.1" } 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 f6f98c3c0..9931ba2db 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 @@ -61,7 +61,7 @@
- + {{errorMessage[i]}} @@ -70,7 +70,7 @@ - Total Experience is Lower than Experience's Year + Total Experience is Lower Than The Current Company
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 b3deae4a6..118d9dffa 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 @@ -1091,38 +1091,16 @@ export class BusinessInfoComponent implements OnInit { this.businessEntityTypeList.section_label = filterList[0].business_entity_type_id!=1 ? filterList[0].section_label : this.generalExistEntityType_other; // console.log(this.businessEntityTypeList.business_entity_type_id+' , '+this.businessEntityTypeList.business_entity_type_name+' , '+this.businessEntityTypeList.section_label); - - // if(this.businessEntityTypeList.business_entity_type_name == 'OPC (One Person Company)' || this.businessEntityTypeList.business_entity_type_name == 'Sole proprietorship'){ - // console.log('condition'); - // this.EntityTypeFlag = true; - - // const Partnr: any = this.businessForm.controls['partners']; - - // Partnr.partner_other_name.updateValueAndValidity(); - // Partnr.partner_other_name.clearValidators(); - // // Partnr.partner_other_name.setValue(''); - - // Partnr.shareholding.setValue(''); - - // Partnr.started_business.setValue(''); - - // Partnr.current_business_experiance_year.clearValidators(); - // Partnr.current_business_experiance_year.updateValueAndValidity(); - // Partnr.current_business_experiance_year.setValue(''); - - // Partnr.current_business_experiance_month.setValue(''); - - // Partnr.total_business_experiance.clearValidators(); - // Partnr.total_business_experiance.updateValueAndValidity(); - // Partnr.total_business_experiance.setValue(''); - - // Partnr.total_business_previous_experience.clearValidators(); - // Partnr.total_business_previous_experience.updateValueAndValidity(); - // Partnr.total_business_previous_experience.setValue(''); - - // Partnr.total_business_previous_experience.setValue(''); - + // console.log(this.businessForm.controls.partners['controls']); + // console.log(this.businessForm.controls.partners['controls'].length); + // if(this.businessForm.controls.partners['controls'].length > 1) + // { + // console.log('asd'); // } + + if(this.businessEntityTypeList.business_entity_type_name == 'OPC (One Person Company)' || this.businessEntityTypeList.business_entity_type_name == 'Sole proprietorship'){ + this.EntityTypeFlag = true; + } // data.records.forEach(val => { // this.businessEntityTypeList.push(val); // this.sourceNames[val.business_entity_type_id] = val.section_label @@ -1331,6 +1309,42 @@ export class BusinessInfoComponent implements OnInit { // let family: any = []; // console.log(this.businessForm.value); + + + if(this.EntityTypeFlag == true){ + let control: any = this.businessForm.controls['partners']; + let control2:any = control.controls[0]; + + control2.controls['shareholding'].clearValidators(); + control2.controls['shareholding'].updateValueAndValidity(); + control2.controls['shareholding'].setValue('100'); + + + // control.controls[0].removeControl('shareholding'); + // control.controls[0].removeControl('started_business'); + // control.controls[0].removeControl('current_business_experiance_year'); + // control.controls[0].removeControl('current_business_experiance_month'); + // control.controls[0].removeControl('total_business_experiance'); + + control2.controls['started_business'].setValue(''); + + control2.controls['current_business_experiance_year'].clearValidators(); + control2.controls['current_business_experiance_year'].updateValueAndValidity(); + control2.controls['current_business_experiance_year'].setValue(''); + + control2.controls['current_business_experiance_month'].setValue(''); + + control2.controls['total_business_experiance'].clearValidators(); + control2.controls['total_business_experiance'].updateValueAndValidity(); + control2.controls['total_business_experiance'].setValue(''); + + control2.controls['total_business_previous_experience'].clearValidators(); + control2.controls['total_business_previous_experience'].updateValueAndValidity(); + control2.controls['total_business_previous_experience'].setValue('0'); + + + + } if (!this.businessForm.valid) { this.notifier.notify('warning',"Please Check All Manatory Fields.."); @@ -1357,7 +1371,7 @@ export class BusinessInfoComponent implements OnInit { let validationFlag : number = 0; // let shareHoldValidationFlag : number = 0; // console.log(records.partners.length); - // console.log(records.partners); + console.log(records.partners); if(records.partners.length > 0){ let total = records.partners.map(shares => shares.shareholding).reduce((a, b) => a + +b, 0); @@ -1366,6 +1380,10 @@ export class BusinessInfoComponent implements OnInit { return; } } + + // console.log('as'); +// return; + // if(if(parseInt(datas.total_business_experiance) > parseInt(datas.current_business_experiance_year)) {) // return; //type 1: Checking manufacturing_activity_details @@ -1555,9 +1573,11 @@ export class BusinessInfoComponent implements OnInit { checkTotalEmployee(FormData){ this.businessForm.controls['employees_total'].setValue((+FormData.value.employees_permanent ||0)+(+FormData.value.employees_temporary||0)); } - checkWithExistBusinessYear(e,i){ + checkWithExistBusinessYear(e,i,members){ + if(e > this.generalExistBusinessYear){ this.errorMessage[i] = "Higher than Business Vintage"; + members.controls.current_business_experiance_year.setValue(''); } else{ this.errorMessage[i] = ''; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.scss index a2381ffbc..3bb315cf9 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.scss @@ -18,6 +18,12 @@ margin: 0 2%; width:26%; } + +// ::ng-deep .mat-option{ +// word-wrap: break-word !important; +// white-space: pre-wrap !important; +// } + .address .button { float: right; width: 10px; 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 36677f353..57b72e300 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 @@ -42,32 +42,45 @@ {{comrelShip.name}} - Not Applicable + + + +
- + Enter Valid Mobile Number. + Enter Valid STD Code Number.   -   + Enter Valid LandLine Number.
- + + {{ pm.name }} - - +
+ +
+ No.of days of Credit Provided by Supplier + + -
+ + + +
@@ -126,20 +139,26 @@ {{comrelShip.name}} - Not Applicable + + + +
+ Enter Valid Mobile Number. + Enter Valid STD Code Number.   -   + Enter Valid LandLine Number.
@@ -148,10 +167,20 @@ {{ pm.name }} - +
+ +
+ No.of days of Credit Provided by Supplier + + + + + + +
+
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 ac5fc0a88..1b19f75b9 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 @@ -267,10 +267,12 @@ export class SupplierInfoComponent implements OnInit { manufacturing_supplier_name: [''], person_title_name:[''], person_designation:[''], + other_person_designation:[''], manufacturing_contact_person_name: [''], manufacturing_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], manufacturing_payment_type: [''], - manufacturing_credit_days: [''], + manufacturing_credit_days_from: [''], + manufacturing_credit_days_to:[''], 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]*$')])], @@ -282,10 +284,12 @@ export class SupplierInfoComponent implements OnInit { manufacturing_supplier_name: [records.manufacturing_supplier_name || null], person_title_name:[records.person_title_name || null], person_designation:[records.person_title_name || null], + other_person_designation:[records.other_person_designation || null], manufacturing_contact_person_name: [records.manufacturing_contact_person_name || null], manufacturing_contact_person_mobile_number: [records.manufacturing_contact_person_mobile_number || null,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], manufacturing_payment_type: [records.manufacturing_payment_type || null], - manufacturing_credit_days: [records.manufacturing_credit_days || null], + manufacturing_credit_days_from: [records.manufacturing_credit_days_from || null], + manufacturing_credit_days_to:[records.manufacturing_credit_days_to || 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]*$')])], @@ -310,20 +314,23 @@ export class SupplierInfoComponent implements OnInit { trade_product_name: [''], trade_supplier_name: [''], person_title_name:[''], - person_designation:[], + person_designation:[''], + other_person_designation:[''], trade_product_contact_person_name: [''], trade_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], person_stdcode:[null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])], person_landline:[null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])], trade_product_payment_type: [''], trade_product_frequency_of_purchase: [''], - trade_product_credit_days: [''], + trade_product_credit_days_from: [''], + trade_product_credit_days_to: [''], }) } else { return this._formBuilder.group({ trade_product_name: [records.trade_product_name], person_title_name:[records.person_title_name], person_designation:[records.person_designation], + other_person_designation:[records.other_person_designation], trade_supplier_name: [records.trade_supplier_name], trade_product_contact_person_name: [records.trade_product_contact_person_name], trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number, Validators.compose([Validators.minLength(10),Validators.maxLength(10)])], @@ -331,7 +338,8 @@ export class SupplierInfoComponent implements OnInit { person_landline:[records.person_landline, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])], trade_product_payment_type: [records.trade_product_payment_type], trade_product_frequency_of_purchase: [records.trade_product_frequency_of_purchase], - trade_product_credit_days: [records.trade_product_credit_days], + trade_product_credit_days_from: [records.trade_product_credit_days_from], + trade_product_credit_days_to: [records.trade_product_credit_days_to], }) } } @@ -366,7 +374,8 @@ export class SupplierInfoComponent implements OnInit { data => { if (data.dataStatus) { if(type==1){ - this.companyRelationShipList=data.records.filter(item => item.name != 'Others'); + this.companyRelationShipList=data.records; + // .filter(item => item.name != 'Others'); } if(type==2){