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 b0e7668..ec7faff 100644 --- a/src/app/pages/order/order-form/order-form.component.ts +++ b/src/app/pages/order/order-form/order-form.component.ts @@ -393,7 +393,7 @@ fieldTitle:any ='New Order' this.inputFieldGroups.forEach((element:any) => { - delete element.isNew; + // delete element.isNew; this.product.forEach(e => { @@ -908,12 +908,12 @@ this.onCreateConfirm() } checkProductArray() { - console.log(this.inputFieldGroups) + // console.log(this.inputFieldGroups) const hasNullId = this.inputFieldGroups.some((group) => group.id === null); -console.log(hasNullId) +// console.log(hasNullId) if (!hasNullId) { // There's an object with id = null in the inputFieldGroups array - console.log('There is an object with id = null'); + // console.log('There is an object with id = null'); return this.product; } else { // There is no object with id = null in the inputFieldGroups array @@ -940,6 +940,7 @@ addInputFieldGroup() { // Add a new input field group to the array const newGroup = { id: null, qty: 1, productSpec: '', isNew: true }; this.inputFieldGroups.push(newGroup); + console.log(this.inputFieldGroups) //this.childButtonEvent.emit( this.inputFieldGroups); } 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 932d26d..711ace7 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 @@ -15,6 +15,7 @@ export class OrderSummaryFormComponent implements OnInit { constructor(@Inject(NB_WINDOW_CONTEXT) public data: any,public _api:PageapiService,private windowService: NbWindowService, private windowRef: NbWindowRef) { console.log(this.data) + this.customer = this.data.name this.product = this.data.product @@ -44,6 +45,8 @@ export class OrderSummaryFormComponent implements OnInit { let cus = this.data.customerData['CusDetails.id'] let role = localStorage.getItem('user_role') this.data.product.forEach(element => { + delete element.isNew; + console.log(element) element.productName = element.name if(element.hasOwnProperty('primaryId')){ @@ -57,6 +60,7 @@ export class OrderSummaryFormComponent implements OnInit { } }); +console.log(this.data.product) let param; if(this.setData != undefined){ if(this.setData.hasOwnProperty('id')){ diff --git a/src/app/pages/order/order.component.ts b/src/app/pages/order/order.component.ts index cdb3c89..66f7321 100644 --- a/src/app/pages/order/order.component.ts +++ b/src/app/pages/order/order.component.ts @@ -530,16 +530,23 @@ onSubmit2(){ this.notify(this.selectDriver , element.orderId , element.customer ) }); } - console.log(res) - this.showToast('success', 'Updated Successfully', ''); - this.getorderlistApi(); - this.selectStatus =[]; + console.log(res) + this.showToast('success', 'Updated Successfully', ''); +console.log(this.selectStatus) + this.selectStatus = null; + this.selectDriver = [] + this.selectedRows = [] + console.log(this.selectStatus) + this.getorderlistApi(); }else{ this.showToast('warning', 'Somthing is Wrong...!', ''); } }) }else{ this.showToast('warning', 'Somthing is Wrong...!', 'Please Select Orders..!'); + this.selectStatus = null; + this.selectDriver = [] + this.selectedRows = [] } }