Merge branch 'fix_all_customer_load'

This commit is contained in:
Mohit Panjwani
2022-02-15 10:51:54 +05:30
6 changed files with 215 additions and 136 deletions

View File

@ -83,8 +83,8 @@ async function searchCustomers(search) {
let res = await customerStore.fetchCustomers(data)
if(res.data.data.length>0 && customerStore.editCustomer) {
let checkCustomerExist = res.data.data.find((c) => c.id==customerStore.editCustomer.id)
if(!checkCustomerExist) {
let customerFound = res.data.data.find((c) => c.id==customerStore.editCustomer.id)
if(!customerFound) {
let edit_customer = Object.assign({}, customerStore.editCustomer)
res.data.data.unshift(edit_customer)
}