issues fixes - 030519 : ps
This commit is contained in:
parent
628dc61800
commit
21355637d0
BIN
ng6-seed/SE_PROD_020519FN.zip
Normal file
BIN
ng6-seed/SE_PROD_020519FN.zip
Normal file
Binary file not shown.
@ -195,8 +195,7 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
this.addressesDeactivited[index] = true;
|
this.addressesDeactivited[index] = true;
|
||||||
let obj = {
|
let obj = {
|
||||||
pd_address_id:val.pd_address_id,
|
pd_address_id:val.pd_address_id,
|
||||||
// addressline1: val.addressline1.toUpperCase(),
|
addressline1: !val.addressline1 ? null : val.addressline1.toUpperCase(),
|
||||||
addressline1: val.addressline1 != null ? val.addressline1.toUpperCase() : val.addressline1,
|
|
||||||
fk_city: val.fk_city,
|
fk_city: val.fk_city,
|
||||||
fk_state: val.fk_state,
|
fk_state: val.fk_state,
|
||||||
pincode: val.pincode_id,
|
pincode: val.pincode_id,
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:38%" appearance="outline">
|
<mat-form-field style="width:38%" appearance="outline">
|
||||||
<mat-label>Applicant</mat-label>
|
<mat-label>Applicant</mat-label>
|
||||||
<mat-select placeholder="" formControlName="pd_co_applicant_id" required>
|
<mat-select placeholder="" formControlName="pd_co_applicant_id" required (selectionChange)="getMobileNo($event.target.value)">
|
||||||
<mat-option *ngFor="let appt of applicantList" [value]="appt.pd_co_applicant_id">
|
<mat-option *ngFor="let appt of applicantList" [value]="appt.pd_co_applicant_id">
|
||||||
{{appt.applicant_name | titlecase}}
|
{{appt.applicant_name | titlecase}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|||||||
@ -32,14 +32,12 @@ export class InitiateAdditionalPdComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
this.data.type===false ? this.additionalPDForm.controls['fk_customer_segment'].disable():this.additionalPDForm.controls['fk_customer_segment'].enable();
|
this.data.type===false ? this.additionalPDForm.controls['fk_customer_segment'].disable():this.additionalPDForm.controls['fk_customer_segment'].enable();
|
||||||
|
|
||||||
if(this.data.applicant_id){ this.additionalPDForm.controls['pd_co_applicant_id'].setValue(this.data.applicant_id);
|
if(this.data.applicant_id){
|
||||||
|
this.additionalPDForm.controls['pd_co_applicant_id'].setValue(this.data.applicant_id);
|
||||||
|
this.getMobileNo(this.data.applicant_id);
|
||||||
// this.additionalPDForm.controls['pd_co_applicant_id'].disable();
|
// this.additionalPDForm.controls['pd_co_applicant_id'].disable();
|
||||||
}
|
}
|
||||||
// else { this.additionalPDForm.controls['pd_co_applicant_id'].enable(); }
|
// else { this.additionalPDForm.controls['pd_co_applicant_id'].enable(); }
|
||||||
|
|
||||||
let mobile = this.applicantList.filter(val=>val.pd_co_applicant_id == this.data.applicant_id).map(val=>val.mobile_no)[0]
|
|
||||||
if(mobile != '' && mobile != null){ this.additionalPDForm.controls['mobile_no'].setValue(mobile); }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
initForm(){
|
initForm(){
|
||||||
return this.additionalPDForm = this._fb.group({
|
return this.additionalPDForm = this._fb.group({
|
||||||
@ -52,6 +50,19 @@ export class InitiateAdditionalPdComponent implements OnInit {
|
|||||||
pd_status:[this.data.pd_status,Validators.required],
|
pd_status:[this.data.pd_status,Validators.required],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** To Get City And Pincode Data For Address Form
|
||||||
|
* Param 'stateID' -> selected StateId
|
||||||
|
*/
|
||||||
|
getMobileNo(applicantID: string) {
|
||||||
|
let mobile = this.applicantList.filter(val=>val.pd_co_applicant_id == this.data.applicant_id).map(val=>val.mobile_no)[0]
|
||||||
|
if(mobile != '' && mobile != null){
|
||||||
|
this.additionalPDForm.controls['mobile_no'].setValue(mobile);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.additionalPDForm.controls['mobile_no'].setValue('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// save details
|
// save details
|
||||||
submitDetails(values: any) {
|
submitDetails(values: any) {
|
||||||
if (this.additionalPDForm.invalid) {
|
if (this.additionalPDForm.invalid) {
|
||||||
@ -61,10 +72,20 @@ submitDetails(values: any) {
|
|||||||
}
|
}
|
||||||
let update_details: any;
|
let update_details: any;
|
||||||
if(this.data.type){
|
if(this.data.type){
|
||||||
update_details= {"pd_id":values.pd_id,"parent_pd_id":values.parent_pd_id,"fk_customer_segment":values.fk_customer_segment , "fk_address_id":values.fk_address_id,"pd_status":"TRIGGERED","pd_co_applicant_id":values.pd_co_applicant_id,"mobile_no":values.mobile_no};
|
update_details= {"pd_id":values.pd_id,
|
||||||
|
"parent_pd_id":values.parent_pd_id,
|
||||||
|
"fk_customer_segment":values.fk_customer_segment ,
|
||||||
|
"fk_address_id":values.fk_address_id,
|
||||||
|
"pd_status":"TRIGGERED",
|
||||||
|
"pd_co_applicant_id":values.pd_co_applicant_id,
|
||||||
|
"mobile_no":values.mobile_no};
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
update_details={"pd_id":values.pd_id,"parent_pd_id":values.parent_pd_id,"fk_customer_segment":values.fk_customer_segment , "fk_primary_address_id":values.fk_address_id,"pd_co_applicant_id":values.pd_co_applicant_id,"mobile_no":values.mobile_no};
|
update_details={"pd_id":values.pd_id,
|
||||||
|
"pd_status":"TRIGGERED",
|
||||||
|
"parent_pd_id":values.parent_pd_id,
|
||||||
|
"fk_customer_segment":values.fk_customer_segment ,
|
||||||
|
"fk_primary_address_id":values.fk_address_id};
|
||||||
}
|
}
|
||||||
|
|
||||||
this._pd.initiateAddressPdProcess(update_details).subscribe(data => {
|
this._pd.initiateAddressPdProcess(update_details).subscribe(data => {
|
||||||
|
|||||||
@ -20,7 +20,7 @@ export class ManageBusinesExpenseComponent implements OnInit {
|
|||||||
constructor(notifier: NotifierService,private _fb: FormBuilder, private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<ManageBusinesExpenseComponent>) {
|
constructor(notifier: NotifierService,private _fb: FormBuilder, private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<ManageBusinesExpenseComponent>) {
|
||||||
this.frequencyData=this.data.masterData.frequencyList;
|
this.frequencyData=this.data.masterData.frequencyList;
|
||||||
this.businessExpenseData = this.data.masterData.businessExpenseList;
|
this.businessExpenseData = this.data.masterData.businessExpenseList;
|
||||||
this.pageTitle = this.data.manage_status==1 ? 'Add Business Expense Item' : 'Update Business Expense Item';
|
this.pageTitle = this.data.manage_status==1 ? 'Add Business Expenses' : 'Update Business Expenses';
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@ export class ManageHouseHoldComponent implements OnInit {
|
|||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
constructor(notifier: NotifierService,private _fb: FormBuilder, private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<ManageHouseHoldComponent>) {
|
constructor(notifier: NotifierService,private _fb: FormBuilder, private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<ManageHouseHoldComponent>) {
|
||||||
this.frequencyData=this.data.masterData.frequencyList;
|
this.frequencyData=this.data.masterData.frequencyList;
|
||||||
this.pageTitle = this.data.manage_status==1 ? 'Add House Hold Item' : 'Update House Hold Item';
|
this.pageTitle = this.data.manage_status==1 ? 'Add Household Expenses' : 'Update Household Expenses';
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -94,12 +94,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="Business Expense">
|
<mat-tab label="Business Expenses">
|
||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<app-business-expense-details [masterData]="getCustomValues" [parentData]="businessExpenses" (loadAssessedForms)="loadAIDetails()"></app-business-expense-details>
|
<app-business-expense-details [masterData]="getCustomValues" [parentData]="businessExpenses" (loadAssessedForms)="loadAIDetails()"></app-business-expense-details>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="House Hold">
|
<mat-tab label="Household Expenses">
|
||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<app-house-hold-details [masterData]="getCustomValues" [parentData]="houseHoldExpenses" (loadAssessedForms)="loadAIDetails()"></app-house-hold-details>
|
<app-house-hold-details [masterData]="getCustomValues" [parentData]="houseHoldExpenses" (loadAssessedForms)="loadAIDetails()"></app-house-hold-details>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div fxLayout="row nowrap">
|
<div fxLayout="row nowrap">
|
||||||
<div fxFlex="60" align="left">
|
<div fxFlex="60" align="left">
|
||||||
<span>Business Expense Items</span>
|
<span>Business Expenses </span>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="40" align="right">
|
<div fxFlex="40" align="right">
|
||||||
<button type="button" mat-flat-button (click)="addMoreItem()"
|
<button type="button" mat-flat-button (click)="addMoreItem()"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div fxLayout="row nowrap">
|
<div fxLayout="row nowrap">
|
||||||
<div fxFlex="60" align="left">
|
<div fxFlex="60" align="left">
|
||||||
<span>House Hold Items</span>
|
<span>Household Expenses</span>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="40" align="right">
|
<div fxFlex="40" align="right">
|
||||||
<button type="button" mat-flat-button (click)="addMoreItem()"
|
<button type="button" mat-flat-button (click)="addMoreItem()"
|
||||||
|
|||||||
@ -94,7 +94,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width:45%" *ngIf="(itemrow.get('business_ownership_type').value == 'rented')">
|
<mat-form-field style="width:45%" *ngIf="(itemrow.get('business_ownership_type').value == 'rented')">
|
||||||
<input matInput autocomplete="off" placeholder="Monthly Rent Amount" formControlName="business_monthly_rented_amt" OnlyNumber type="text">
|
<input matInput autocomplete="off" [placeholder]= "'Monthly ' + address_type + ' Rent Amount'" formControlName="business_monthly_rented_amt" OnlyNumber type="text">
|
||||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_monthly_rented_amt').value != ''">{{"₹"}} {{itemrow.get('business_monthly_rented_amt').value | numberToWords}} Only</mat-hint>
|
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('business_monthly_rented_amt').value != ''">{{"₹"}} {{itemrow.get('business_monthly_rented_amt').value | numberToWords}} Only</mat-hint>
|
||||||
<mat-error>Monthly Rent Amount Required</mat-error>
|
<mat-error>Monthly Rent Amount Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -110,7 +110,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width:45%">
|
<mat-form-field style="width:45%">
|
||||||
<mat-select multiple placeholder="Asset Owned by" formControlName="business_name_of_the_owner"
|
<mat-select multiple [placeholder]="address_type + ' Owned by'" formControlName="business_name_of_the_owner"
|
||||||
[compareWith]="compareObjects" (selectionChange)="setOtherOwnerOfAddress($event.value,i)">
|
[compareWith]="compareObjects" (selectionChange)="setOtherOwnerOfAddress($event.value,i)">
|
||||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||||
|
|||||||
@ -63,7 +63,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
existCompanyList: any = [];
|
existCompanyList: any = [];
|
||||||
mergeCompanyApplicant: any = [];
|
mergeCompanyApplicant: any = [];
|
||||||
endUserList = [];
|
endUserList = [];
|
||||||
|
address_type : any ;
|
||||||
/**Constructor of the class */
|
/**Constructor of the class */
|
||||||
constructor(
|
constructor(
|
||||||
notifier: NotifierService,
|
notifier: NotifierService,
|
||||||
@ -247,6 +247,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
let selectedPincode = this.pinArr.filter(element => element.pincode_id == dataValue.pincode)[0];
|
let selectedPincode = this.pinArr.filter(element => element.pincode_id == dataValue.pincode)[0];
|
||||||
|
|
||||||
let addressType = dataValue.address_type != 1 ? selectedAddressType.address_type : dataValue.address_type_others;
|
let addressType = dataValue.address_type != 1 ? selectedAddressType.address_type : dataValue.address_type_others;
|
||||||
|
this.address_type = addressType;
|
||||||
let address = dataValue.address + ' , ' + selectedCity.city_name + ','+selectedState.name +'-' + (dataValue.pincode == 1 ? dataValue.pincode_others : selectedPincode.pincode);
|
let address = dataValue.address + ' , ' + selectedCity.city_name + ','+selectedState.name +'-' + (dataValue.pincode == 1 ? dataValue.pincode_others : selectedPincode.pincode);
|
||||||
|
|
||||||
this.placeholderName[inx] = 'Was any business activity seen at the ' + addressType + ' during PD visit?';
|
this.placeholderName[inx] = 'Was any business activity seen at the ' + addressType + ' during PD visit?';
|
||||||
@ -616,6 +617,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
var splitted_label = val.address_label.split("/", 2);
|
var splitted_label = val.address_label.split("/", 2);
|
||||||
let addressType = splitted_label[1] != '' ? splitted_label[1] : 'Address Type';
|
let addressType = splitted_label[1] != '' ? splitted_label[1] : 'Address Type';
|
||||||
this.placeholderName[index] = 'Was any business activity seen at the ' + addressType + ' during PD visit?';
|
this.placeholderName[index] = 'Was any business activity seen at the ' + addressType + ' during PD visit?';
|
||||||
|
this.address_type = addressType;
|
||||||
let vals = {
|
let vals = {
|
||||||
address_label: val.address_label,
|
address_label: val.address_label,
|
||||||
business_years: val.business_years,
|
business_years: val.business_years,
|
||||||
|
|||||||
@ -64,9 +64,15 @@
|
|||||||
<div fxFlex="50" align="right" *ngIf="master.loan_amount">
|
<div fxFlex="50" align="right" *ngIf="master.loan_amount">
|
||||||
<i class="fa-1x fa fa-rupee"></i><small style="margin-left: 2%; font-size: inherit">{{master.loan_amount}}</small>
|
<i class="fa-1x fa fa-rupee"></i><small style="margin-left: 2%; font-size: inherit">{{master.loan_amount}}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div fxFlex="row" *ngIf="master.loan_amount">
|
||||||
|
<div fxFlex="100">
|
||||||
|
<div fxFlex="100" align="right">
|
||||||
|
<span *ngIf="master.loan_amount" style="font-size:0.9rem !important;">{{master.loan_amount | numberToWords}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
|
||||||
</mat-list>
|
</mat-list>
|
||||||
|
|||||||
@ -67,7 +67,9 @@
|
|||||||
.error-text{
|
.error-text{
|
||||||
font-size: 6rem !important;
|
font-size: 6rem !important;
|
||||||
}
|
}
|
||||||
|
.error-wrapper{
|
||||||
|
padding-top: 2rem !important;//default is 5 rem
|
||||||
|
}
|
||||||
.error-icon{
|
.error-icon{
|
||||||
width: 100px;
|
width: 100px;
|
||||||
font-size: 79px !important;
|
font-size: 79px !important;
|
||||||
|
|||||||
@ -44,6 +44,7 @@ export class EntityAddComponent implements OnInit {
|
|||||||
public submitted = false;
|
public submitted = false;
|
||||||
public entityOptions: any = [];
|
public entityOptions: any = [];
|
||||||
errorMessage: string;
|
errorMessage: string;
|
||||||
|
error : any = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifier service
|
* Notifier service
|
||||||
@ -84,6 +85,8 @@ export class EntityAddComponent implements OnInit {
|
|||||||
this.entityOptions = data.records.filter(data => data.entity_type_id != 1);
|
this.entityOptions = data.records.filter(data => data.entity_type_id != 1);
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
this.error.push(error);
|
||||||
|
console.log('this.error',this.error);
|
||||||
this.notifier.notify('warning', 'No Answer Type Records Found.!');
|
this.notifier.notify('warning', 'No Answer Type Records Found.!');
|
||||||
this.errorMessage = "No Answer Type Record Found.";
|
this.errorMessage = "No Answer Type Record Found.";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,11 +90,13 @@ export class DialogAddEditBillingInfo implements OnInit {
|
|||||||
// this.entity_id = this.route.snapshot.params['entity-id'];
|
// this.entity_id = this.route.snapshot.params['entity-id'];
|
||||||
// this.entity_id = this.parent.entityId;
|
// this.entity_id = this.parent.entityId;
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
|
console.log(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.loadFormData();
|
this.loadFormData();
|
||||||
this.loadContactsDetails(this.data.details.contacts);
|
this.loadContactsDetails(this.data.details == null || this.data.details == undefined ? null : this.data.details.contacts);
|
||||||
|
// this.loadContactsDetails(this.data.details.contacts);
|
||||||
}
|
}
|
||||||
|
|
||||||
onNoClick(): void {
|
onNoClick(): void {
|
||||||
|
|||||||
@ -14,62 +14,97 @@
|
|||||||
<div style="margin: 12px;" *ngIf="!listShow">
|
<div style="margin: 12px;" *ngIf="!listShow">
|
||||||
<form [formGroup]="tatForm" (submit)="onSubmit()">
|
<form [formGroup]="tatForm" (submit)="onSubmit()">
|
||||||
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="6px" fxLayoutAlign="start">
|
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="6px" fxLayoutAlign="start">
|
||||||
<mat-form-field>
|
<div style=" width: 100%;">
|
||||||
<input placeholder="TAT Value 1" matInput formControlName="toppings4">
|
<mat-form-field style=" width: 30%;">
|
||||||
<mat-error *ngIf="submitted && f.toppings4.hasError('required')" class="mat-text-warn">TAT 1 Value Required.!</mat-error>
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field>
|
|
||||||
<input placeholder="TAT Value 2" matInput formControlName="toppings5">
|
|
||||||
<mat-error *ngIf="submitted && f.toppings5.hasError('required')" class="mat-text-warn">TAT 2 Value Required.!</mat-error>
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="6px" fxLayoutAlign="start">
|
|
||||||
<div>
|
|
||||||
<mat-form-field>
|
|
||||||
<mat-select (selectionChange)="selectedPD($event)" placeholder="PD Type" formControlName="toppings1" multiple>
|
<mat-select (selectionChange)="selectedPD($event)" placeholder="PD Type" formControlName="toppings1" multiple>
|
||||||
<mat-option *ngFor="let pd of m_pdType" [value]="pd.pd_type_id">{{pd.type_name}}</mat-option>
|
<mat-option *ngFor="let pd of m_pdType" [value]="pd.pd_type_id">{{pd.type_name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="submitted && f.toppings1.hasError('required')" class="mat-text-warn">PD Type Required.!</mat-error>
|
<!-- <mat-error *ngIf="submitted && f.toppings1.hasError('required')" class="mat-text-warn">PD Type Required.!</mat-error> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<div style="height: 160px; overflow: auto;">
|
<mat-chip-list style="width: 70%;">
|
||||||
<ul style="list-style: none; margin: 0px;padding: 0px;">
|
<span *ngFor="let pdName of selectedItem">
|
||||||
<li *ngFor="let pdName of selectedItem">
|
<mat-chip>{{pdName.type_name}}</mat-chip>
|
||||||
<mat-chip>{{pdName.type_name}}</mat-chip>
|
</span>
|
||||||
</li>
|
</mat-chip-list>
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<mat-form-field>
|
<div style=" width: 100%;">
|
||||||
|
<mat-form-field style="width: 30%;">
|
||||||
<mat-select (selectionChange)="selectedProduct($event)" placeholder="Product" formControlName="toppings2" multiple>
|
<mat-select (selectionChange)="selectedProduct($event)" placeholder="Product" formControlName="toppings2" multiple>
|
||||||
<mat-option *ngFor="let prdct of m_product" [value]="prdct.product_id">{{prdct.name}}</mat-option>
|
<mat-option *ngFor="let prdct of m_product" [value]="prdct.product_id">{{prdct.name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="submitted && f.toppings2.hasError('required')" class="mat-text-warn">Product Required.!</mat-error>
|
<!-- <mat-error *ngIf="submitted && f.toppings2.hasError('required')" class="mat-text-warn">Product Required.!</mat-error> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<div style="height: 160px; overflow: auto;">
|
<mat-chip-list style="width: 70%;">
|
||||||
<ul style="list-style: none; margin: 0px;padding: 0px;">
|
<span *ngFor="let prdcName of selectedProductItem">
|
||||||
<li *ngFor="let prdcName of selectedProductItem" style="padding: 2px;">
|
<mat-chip>{{prdcName.name}}</mat-chip>
|
||||||
<mat-chip>{{prdcName.name}}</mat-chip>
|
</span>
|
||||||
</li>
|
</mat-chip-list>
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<mat-form-field>
|
|
||||||
<mat-select (selectionChange)="selectedCity($event)" placeholder="City" formControlName="toppings3" multiple>
|
|
||||||
<mat-option *ngFor="let city of m_city" [value]="city.city_id">{{city.name}}</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
<mat-error *ngIf="submitted && f.toppings3.hasError('required')" class="mat-text-warn">City Required.!</mat-error>
|
|
||||||
</mat-form-field>
|
|
||||||
<div style="height: 160px; overflow: auto;">
|
|
||||||
<ul style="list-style: none; margin: 0px;padding: 0px;">
|
|
||||||
<li *ngFor="let cityName of selectedCityItem" style="padding: 2px;">
|
|
||||||
<mat-chip>{{cityName.name}}</mat-chip>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br/>
|
||||||
|
<div fxLayout="column wrap" fxLayout.xs="column" fxLayoutGap="6px" fxLayoutAlign="start">
|
||||||
|
<label style="width: 25%;">TAT 1 - Triggered to Allocated </label>
|
||||||
|
<mat-form-field style="width: 75%;">
|
||||||
|
<input placeholder="TAT Value 1" matInput formControlName="toppings4" minlength="1" maxlength="2" OnlyNumber type="text" required >
|
||||||
|
<span matSuffix>hrs</span>
|
||||||
|
<!-- <mat-error *ngIf="submitted && f.toppings4.hasError('required')" class="mat-text-warn">TAT 1 Value Required.!</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxLayout="column wrap" fxLayout.xs="column" fxLayoutGap="6px" fxLayoutAlign="start">
|
||||||
|
<label style="width: 25%;">TAT 2 - Allocated to Scheduled</label>
|
||||||
|
<mat-form-field style=" width: 75%;">
|
||||||
|
<input placeholder="TAT Value 2" matInput formControlName="toppings5" minlength="1" maxlength="2" OnlyNumber type="text" required>
|
||||||
|
<span matSuffix>hrs</span>
|
||||||
|
<!-- <mat-error *ngIf="submitted && f.toppings5.hasError('required')" class="mat-text-warn">TAT 2 Value Required.!</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxLayout="column wrap" fxLayout.xs="column" fxLayoutGap="6px" fxLayoutAlign="start">
|
||||||
|
<label style="width: 25%;">TAT 3 - Scheduled to Start of PD</label>
|
||||||
|
<mat-form-field style=" width: 75%;">
|
||||||
|
<input placeholder="TAT Value 3" matInput formControlName="toppings6" minlength="1" maxlength="2" OnlyNumber type="text" required>
|
||||||
|
<span matSuffix>hrs</span>
|
||||||
|
<!-- <mat-error *ngIf="submitted && f.toppings6.hasError('required')" class="mat-text-warn">TAT 1 Value Required.!</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxLayout="column wrap" fxLayout.xs="column" fxLayoutGap="6px" fxLayoutAlign="start">
|
||||||
|
<label style="width: 25%;">TAT 4 - Initiate PD to Start of PD </label>
|
||||||
|
<mat-form-field style=" width: 75%;">
|
||||||
|
<input placeholder="TAT Value 4" matInput formControlName="toppings7" minlength="1" maxlength="2" OnlyNumber type="text" required>
|
||||||
|
<span matSuffix>hrs</span>
|
||||||
|
<!-- <mat-error *ngIf="submitted && f.toppings7.hasError('required')" class="mat-text-warn">TAT 1 Value Required.!</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxLayout="column wrap" fxLayout.xs="column" fxLayoutGap="6px" fxLayoutAlign="start">
|
||||||
|
<label style="width: 25%;">TAT 5 - Start of PD to Completion of PD.</label>
|
||||||
|
<mat-form-field style=" width: 75%;">
|
||||||
|
<input placeholder="TAT Value 5" matInput formControlName="toppings8" minlength="1" maxlength="2" OnlyNumber type="text" required>
|
||||||
|
<span matSuffix>hrs</span>
|
||||||
|
<!-- <mat-error *ngIf="submitted && f.toppings48.hasError('required')" class="mat-text-warn">TAT 1 Value Required.!</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxLayout="column wrap" fxLayout.xs="column" fxLayoutGap="6px" fxLayoutAlign="start">
|
||||||
|
<label style="width: 25%;">TAT 6 - Completion of PD to QC Complete Stage.</label>
|
||||||
|
<mat-form-field style=" width: 75%;">
|
||||||
|
<input placeholder="TAT Value 6" matInput formControlName="toppings9" minlength="1" maxlength="2" OnlyNumber type="text" required>
|
||||||
|
<span matSuffix>hrs</span>
|
||||||
|
<!-- <mat-error *ngIf="submitted && f.toppings9.hasError('required')" class="mat-text-warn">TAT 1 Value Required.!</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxLayout="column wrap" fxLayout.xs="column" fxLayoutGap="6px" fxLayoutAlign="start">
|
||||||
|
<label style="width: 25%;">TAT 7 - Triggered to QC complete stage.</label>
|
||||||
|
<mat-form-field style=" width: 75%;">
|
||||||
|
<input placeholder="TAT Value 7" matInput formControlName="toppings0" minlength="1" maxlength="2" OnlyNumber type="text" required>
|
||||||
|
<span matSuffix>hrs</span>
|
||||||
|
<!-- <mat-error *ngIf="submitted && f.toppings0.hasError('required')" class="mat-text-warn">TAT 1 Value Required.!</mat-error> -->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="end">
|
<div fxLayout="row" fxLayoutAlign="end">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
|
|||||||
@ -132,6 +132,11 @@ export class DialogEntityEditListTatComponent implements OnInit {
|
|||||||
this.tatListEditForm = this._formBuilder.group({
|
this.tatListEditForm = this._formBuilder.group({
|
||||||
tat1: [this.data.tat_details.tat1, Validators.compose([Validators.required])],
|
tat1: [this.data.tat_details.tat1, Validators.compose([Validators.required])],
|
||||||
tat2: [this.data.tat_details.tat2, Validators.compose([Validators.required])],
|
tat2: [this.data.tat_details.tat2, Validators.compose([Validators.required])],
|
||||||
|
tat3: [this.data.tat_details.tat3, Validators.compose([Validators.required])],
|
||||||
|
tat4: [this.data.tat_details.tat4, Validators.compose([Validators.required])],
|
||||||
|
tat5: [this.data.tat_details.tat5, Validators.compose([Validators.required])],
|
||||||
|
tat6: [this.data.tat_details.tat6, Validators.compose([Validators.required])],
|
||||||
|
tat7: [this.data.tat_details.tat7, Validators.compose([Validators.required])]
|
||||||
});
|
});
|
||||||
|
|
||||||
this.tatEditAddForm = this._formBuilder.group({
|
this.tatEditAddForm = this._formBuilder.group({
|
||||||
@ -203,13 +208,13 @@ export class DialogEntityEditListTatComponent implements OnInit {
|
|||||||
get f() { return this.tatListEditForm.controls };
|
get f() { return this.tatListEditForm.controls };
|
||||||
get f1() { return this.tatEditAddForm.controls };
|
get f1() { return this.tatEditAddForm.controls };
|
||||||
|
|
||||||
onSubmit() {
|
// onSubmit() {
|
||||||
this.submitted = true;
|
// this.submitted = true;
|
||||||
if (this.tatListEditForm.invalid) {
|
// if (this.tatListEditForm.invalid) {
|
||||||
return;
|
// return;
|
||||||
} else {
|
// } else {
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
onSubmitEditAddForm() {
|
onSubmitEditAddForm() {
|
||||||
@ -370,7 +375,12 @@ export class DialogEntityAddTatComponent implements OnInit {
|
|||||||
toppings2: ['', Validators.compose([Validators.required])],
|
toppings2: ['', Validators.compose([Validators.required])],
|
||||||
toppings3: ['', Validators.compose([Validators.required])],
|
toppings3: ['', Validators.compose([Validators.required])],
|
||||||
toppings4: ['', Validators.compose([Validators.required])],
|
toppings4: ['', Validators.compose([Validators.required])],
|
||||||
toppings5: ['', Validators.compose([Validators.required])]
|
toppings5: ['', Validators.compose([Validators.required])],
|
||||||
|
toppings6: ['', Validators.compose([Validators.required])],
|
||||||
|
toppings7: ['', Validators.compose([Validators.required])],
|
||||||
|
toppings8: ['', Validators.compose([Validators.required])],
|
||||||
|
toppings9: ['', Validators.compose([Validators.required])],
|
||||||
|
toppings0: ['', Validators.compose([Validators.required])]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -495,7 +505,14 @@ export class DialogEntityAddTatComponent implements OnInit {
|
|||||||
transactions: Transaction[] = [];
|
transactions: Transaction[] = [];
|
||||||
tatValue1 = '';
|
tatValue1 = '';
|
||||||
tatValue2 = '';
|
tatValue2 = '';
|
||||||
|
tatValue3 = '';
|
||||||
|
tatValue4 = '';
|
||||||
|
tatValue5 = '';
|
||||||
|
tatValue6 = '';
|
||||||
|
tatValue7 = '';
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
console.log('ads')
|
||||||
this.submitted = true;
|
this.submitted = true;
|
||||||
if (this.tatForm.invalid) {
|
if (this.tatForm.invalid) {
|
||||||
return
|
return
|
||||||
@ -503,18 +520,22 @@ export class DialogEntityAddTatComponent implements OnInit {
|
|||||||
this.listShow = true;
|
this.listShow = true;
|
||||||
let arr1 = this.tatForm.controls['toppings1'].value;
|
let arr1 = this.tatForm.controls['toppings1'].value;
|
||||||
let arr2 = this.tatForm.controls['toppings2'].value;
|
let arr2 = this.tatForm.controls['toppings2'].value;
|
||||||
let arr3 = this.tatForm.controls['toppings3'].value;
|
// let arr3 = this.tatForm.controls['toppings3'].value;
|
||||||
|
|
||||||
this.tatValue1 = this.tatForm.controls['toppings4'].value;
|
this.tatValue1 = this.tatForm.controls['toppings4'].value;
|
||||||
this.tatValue2 = this.tatForm.controls['toppings5'].value;
|
this.tatValue2 = this.tatForm.controls['toppings5'].value;
|
||||||
|
this.tatValue3 = this.tatForm.controls['toppings6'].value;
|
||||||
|
this.tatValue4 = this.tatForm.controls['toppings7'].value;
|
||||||
|
this.tatValue5 = this.tatForm.controls['toppings8'].value;
|
||||||
|
this.tatValue6 = this.tatForm.controls['toppings9'].value;
|
||||||
|
this.tatValue7 = this.tatForm.controls['toppings0'].value;
|
||||||
|
|
||||||
|
|
||||||
let array1 = [...arr1];
|
let array1 = [...arr1];
|
||||||
let array2 = [...arr2];
|
let array2 = [...arr2];
|
||||||
let array3 = [...arr3];
|
// let array3 = [...arr3];
|
||||||
let result1 = array1.reduce((a1, v1, i1) =>
|
let result1 = array1.reduce((a1, v1, i1) =>
|
||||||
a1.concat(array2.map(w => v1 + "" + w)), []).reduce((a2, v2, i3) =>
|
a1.concat(array2.map(w => v1 + "" + w)), []);
|
||||||
a2.concat(array3.map(u => v2 + "" + u)), []);
|
|
||||||
|
|
||||||
|
|
||||||
let exist = this.resultApi.filter(a => result1.indexOf(a) > -1);
|
let exist = this.resultApi.filter(a => result1.indexOf(a) > -1);
|
||||||
if (exist) {
|
if (exist) {
|
||||||
@ -522,11 +543,11 @@ export class DialogEntityAddTatComponent implements OnInit {
|
|||||||
result1.forEach(a => {
|
result1.forEach(a => {
|
||||||
let pdName = this.getIdPdName(a[0]);
|
let pdName = this.getIdPdName(a[0]);
|
||||||
let productName = this.getIdProductName(a[1]);
|
let productName = this.getIdProductName(a[1]);
|
||||||
let cityName = this.getIdCityName(a[2]);
|
// let cityName = this.getIdCityName(a[2]);
|
||||||
let data = {
|
let data = {
|
||||||
pd_type: pdName,
|
pd_type: pdName,
|
||||||
product: productName,
|
product: productName,
|
||||||
city: cityName
|
// city: cityName
|
||||||
}
|
}
|
||||||
this.existValArray.push(data);
|
this.existValArray.push(data);
|
||||||
});
|
});
|
||||||
@ -553,6 +574,11 @@ export class DialogEntityAddTatComponent implements OnInit {
|
|||||||
record.fk_entity_id = this.data.entity_id;
|
record.fk_entity_id = this.data.entity_id;
|
||||||
record.tat1 = this.tatForm.controls['toppings4'].value;
|
record.tat1 = this.tatForm.controls['toppings4'].value;
|
||||||
record.tat2 = this.tatForm.controls['toppings5'].value;
|
record.tat2 = this.tatForm.controls['toppings5'].value;
|
||||||
|
record.tat3 = this.tatForm.controls['toppings6'].value;
|
||||||
|
record.tat4 = this.tatForm.controls['toppings7'].value;
|
||||||
|
record.tat5 = this.tatForm.controls['toppings8'].value;
|
||||||
|
record.tat6 = this.tatForm.controls['toppings9'].value;
|
||||||
|
record.tat7 = this.tatForm.controls['toppings0'].value;
|
||||||
record.child = this.transactions.map(data => {
|
record.child = this.transactions.map(data => {
|
||||||
return `${data.pd_type.id}${data.product.id}${data.city.id}`
|
return `${data.pd_type.id}${data.product.id}${data.city.id}`
|
||||||
});
|
});
|
||||||
|
|||||||
@ -190,17 +190,17 @@ this.loader = true;
|
|||||||
this.AWS.register(userData).subscribe(res => {
|
this.AWS.register(userData).subscribe(res => {
|
||||||
if (res.User.UserStatus != '' && res.User.UserStatus !== undefined && res.User.UserStatus != null) {
|
if (res.User.UserStatus != '' && res.User.UserStatus !== undefined && res.User.UserStatus != null) {
|
||||||
if(userData.role.role_id == 10){
|
if(userData.role.role_id == 10){
|
||||||
this.AWS.UserGroup(res,userData).subscribe(res=>{
|
this.AWS.UserGroup(res,userData).subscribe(res=>{});}
|
||||||
});}
|
|
||||||
this.users.saveRecords(res, userData).subscribe(res => {
|
this.users.saveRecords(res, userData).subscribe(res => {
|
||||||
data = res;
|
data = res;
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.AWS.adminUpdateuser(userData, data.record).subscribe(res => {
|
this.AWS.adminUpdateuser(userData, data.record).subscribe(res => {});
|
||||||
|
|
||||||
this.loader =false;
|
this.loader =false;
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
Swal('User Created');
|
Swal('User Created');
|
||||||
this.router.navigate(['setting/users/userlist']);
|
this.router.navigate(['setting/users/userlist']);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
//})
|
//})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user