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