editing med feeds works, working on adding

This commit is contained in:
Paul Wilde 2023-03-23 21:18:01 +00:00
parent 64fcfff373
commit 7b61ccf99b
2 changed files with 5 additions and 4 deletions

View file

@ -133,11 +133,11 @@ export default {
this.errors = []
this.saving = true
let url = this.$api_url + "/customers/medicated-feeds/" + this.mf.id + "/save"
if (this.contract.isNew) {
if (this.mf.isNew) {
url = this.$api_url + "/customers/medicated-feeds/add"
}
console.log("Saving Med Feed...")
axios.put(url,{
axios.post(url,{
medfeed: medfeed
})
.then(resp => {

View file

@ -117,7 +117,8 @@ export default {
}
let clist = this.list.filter(q =>
q.customer.name.toLowerCase().includes(query) ||
q.customer.acc_no.includes(query)
q.customer.acc_no.includes(query) ||
q.id == query
)
return clist
}