bug issue fix
This commit is contained in:
parent
7235eb597d
commit
da7a6959b8
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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')){
|
||||
|
||||
@ -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 = []
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user