mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
updated customer and category added in first in dropdown list
This commit is contained in:
@ -419,7 +419,7 @@ async function searchCategory(search) {
|
|||||||
let checkCategoryExist = res.data.data.find((c) => c.id==categoryStore.editCategory.id)
|
let checkCategoryExist = res.data.data.find((c) => c.id==categoryStore.editCategory.id)
|
||||||
if(!checkCategoryExist) {
|
if(!checkCategoryExist) {
|
||||||
let edit_category = Object.assign({}, categoryStore.editCategory)
|
let edit_category = Object.assign({}, categoryStore.editCategory)
|
||||||
res.data.data.push(edit_category)
|
res.data.data.unshift(edit_category)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res.data.data
|
return res.data.data
|
||||||
@ -431,7 +431,7 @@ async function searchCustomer(search) {
|
|||||||
let checkCustomerExist = res.data.data.find((c) => c.id==customerStore.editCustomer.id)
|
let checkCustomerExist = res.data.data.find((c) => c.id==customerStore.editCustomer.id)
|
||||||
if(!checkCustomerExist) {
|
if(!checkCustomerExist) {
|
||||||
let edit_customer = Object.assign({}, customerStore.editCustomer)
|
let edit_customer = Object.assign({}, customerStore.editCustomer)
|
||||||
res.data.data.push(edit_customer)
|
res.data.data.unshift(edit_customer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res.data.data
|
return res.data.data
|
||||||
|
|||||||
@ -86,7 +86,7 @@ async function searchCustomers(search) {
|
|||||||
let checkCustomerExist = res.data.data.find((c) => c.id==customerStore.editCustomer.id)
|
let checkCustomerExist = res.data.data.find((c) => c.id==customerStore.editCustomer.id)
|
||||||
if(!checkCustomerExist) {
|
if(!checkCustomerExist) {
|
||||||
let edit_customer = Object.assign({}, customerStore.editCustomer)
|
let edit_customer = Object.assign({}, customerStore.editCustomer)
|
||||||
res.data.data.push(edit_customer)
|
res.data.data.unshift(edit_customer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user