diff --git a/src/app/pages/order/order-form/order-form.component.ts b/src/app/pages/order/order-form/order-form.component.ts index aa3f36f..8b6ba5b 100644 --- a/src/app/pages/order/order-form/order-form.component.ts +++ b/src/app/pages/order/order-form/order-form.component.ts @@ -375,7 +375,14 @@ this.invoice.products =[]; // }); // } // } - +// let mixedProductGas = this.inputFieldGroups.filter((arr:any)=>{return arr.name == 'Mixed Gas'}) +// console.log(mixedProductGas) + +const filteredItems = this.inputFieldGroups.filter(item => item.name === 'Mixed Gas' && item.productSpec === ''); + if (filteredItems.length > 0) { + this.showToast('warning', 'Please Fill Mixed Gas Fields...!', ''); + return; + } else{ const buttonsConfig: NbWindowControlButtonsConfig = { minimize: this.minimize, @@ -420,6 +427,10 @@ this.invoice.products =[]; }else{ this.showToast('warning', 'Please Fill Request Fields...!', ''); } + + } + + } private showToast(type: NbComponentStatus, title: string, body: string) { const config = { @@ -910,4 +921,19 @@ onCreateConfirm() { } +// getProduct(param){ +// console.log(param) +// if(param == 'Others'){ +// this.mixedBTN = true +// }else{ +// this.mixedBTN = false +// } +// } + +// isProductSpecValid(): boolean { +// console.log(this.inputFieldGroups ) +// return !!this.inputFieldGroups.find((fieldGroup) => fieldGroup.productSpec); +// } + + } diff --git a/src/app/pages/order/order-summary-form/order-summary-form.component.ts b/src/app/pages/order/order-summary-form/order-summary-form.component.ts index bcfd60d..a693004 100644 --- a/src/app/pages/order/order-summary-form/order-summary-form.component.ts +++ b/src/app/pages/order/order-summary-form/order-summary-form.component.ts @@ -45,6 +45,8 @@ export class OrderSummaryFormComponent implements OnInit { element.productName = element.name if(element.hasOwnProperty('primaryId')){ + element.productId = element.id + element.id = element.primaryId }else{ element.pid = element.id diff --git a/src/environments/environment.ts b/src/environments/environment.ts index d7864eb..e3e12b1 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -9,8 +9,8 @@ // The list of which env maps to which file can be found in `.angular-cli.json`. export const environment = { - // apiEndpoint:'https://dev.venbait.in/vnms/api/', - apiEndpoint:'http://localhost:8081/api/', + apiEndpoint:'https://dev.venbait.in/vnms/api/', + // apiEndpoint:'http://localhost:8081/api/', mailUrl:'', production: false, };