Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
1244dd14b8
6
ng6-seed/package-lock.json
generated
6
ng6-seed/package-lock.json
generated
@ -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"
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
<div fxLayout="row nowrap" class="state-margin" *ngIf='!EntityTypeFlag'>
|
||||
|
||||
<mat-form-field style="width: 20%;">
|
||||
<input matInput placeholder="Year" formControlName="current_business_experiance_year" (keyup)="getWorkExperience(members.value,i)" required autocomplete="off" (keypress)="keyPress($event)" (change)="checkWithExistBusinessYear($event.target.value,i)" >
|
||||
<input matInput placeholder="Year" formControlName="current_business_experiance_year" (keyup)="getWorkExperience(members.value,i)" required autocomplete="off" (keypress)="keyPress($event)" (change)="checkWithExistBusinessYear($event.target.value,i,members)" >
|
||||
<mat-hint style="color: red;">{{errorMessage[i]}}</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 21%;">
|
||||
@ -70,7 +70,7 @@
|
||||
<mat-form-field style="width: 35%;">
|
||||
<input matInput placeholder="Total Work Experience"
|
||||
formControlName="total_business_experiance" (keypress)="keyPress($event)" (keyup)="getWorkExperience(members.value,i)" autocomplete="off" required>
|
||||
<mat-hint style="color: red;" *ngIf="members.value.current_business_experiance_year > members.value.total_business_experiance"> Total Experience is Lower than Experience's Year </mat-hint>
|
||||
<mat-hint style="color: red;" *ngIf="members.value.total_business_experiance != '' && members.value.current_business_experiance_year > members.value.total_business_experiance"> Total Experience is Lower Than The Current Company </mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" *ngIf="members.value.total_business_previous_experience!=undefined && !EntityTypeFlag">
|
||||
|
||||
@ -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 = <FormArray>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 = <FormArray>this.businessForm.controls['partners'];
|
||||
let control2:any = <FormArray>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] = '';
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -42,32 +42,45 @@
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
</mat-option>
|
||||
<mat-option value="1" > Not Applicable </mat-option>
|
||||
<!-- <mat-option value="1" > Not Applicable </mat-option> -->
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%" *ngIf="items.get('person_designation').value == 1">
|
||||
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Contact Person Mobile Number" autocomplete="off" formControlName="manufacturing_contact_person_mobile_number" (keypress)="keyPress($event)" maxlength="10">
|
||||
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 45%">
|
||||
<mat-select (selectionChange)="selectedPM($event)" placeholder="Payment Type" formControlName="manufacturing_payment_type">
|
||||
<!-- //(selectionChange)="selectedPM($event)" -->
|
||||
<mat-select placeholder="Payment Type" formControlName="manufacturing_payment_type">
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" *ngIf="items.get('manufacturing_payment_type').value == 3">
|
||||
<input matInput placeholder="No.of days of Credit Provided by Supplier" formControlName="manufacturing_credit_days">
|
||||
</div>
|
||||
|
||||
<div fxLayout="row nowrap" *ngIf="items.get('manufacturing_payment_type').value == 3">
|
||||
<mat-label>No.of days of Credit Provided by Supplier </mat-label>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days From" formControlName="manufacturing_credit_days_from" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days To" formControlName="manufacturing_credit_days_to" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div align="end">
|
||||
<span *ngIf="item.controls.main_raw_materials.controls.length > 1" (click)="removeRawMaterials(l)">
|
||||
@ -126,20 +139,26 @@
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
</mat-option>
|
||||
<mat-option value="1" > Not Applicable </mat-option>
|
||||
<!-- <mat-option value="1" > Not Applicable </mat-option> -->
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%" *ngIf="items.get('person_designation').value == 1">
|
||||
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Contact Person Mobile Number" autocomplete="off" formControlName="trade_product_contact_person_mobile_number" (keypress)="keyPress($event)" maxlength="10">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -148,10 +167,20 @@
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
</div>
|
||||
<!-- <mat-form-field style="width: 45%" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
<input matInput placeholder="No.of Days of Credit Provided by Supplier" autocomplete="off" formControlName="trade_product_credit_days" (keypress)="keyPress($event)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</mat-form-field> -->
|
||||
<div fxLayout="row nowrap" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
<mat-label>No.of days of Credit Provided by Supplier </mat-label>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days From" formControlName="trade_product_credit_days_from" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days To" formControlName="trade_product_credit_days_to" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div align="end">
|
||||
<span *ngIf="item.controls.trading_products.controls.length > 1" (click)="removeTradingProduct(l)">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" color="primary" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
|
||||
@ -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){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user