Merge branch 'devCorrected' into 'beta'
Dev corrected See merge request fedeo/software!7
This commit is contained in:
@@ -1270,9 +1270,9 @@ const saveSerialInvoice = async () => {
|
|||||||
let data = null
|
let data = null
|
||||||
|
|
||||||
if (route.params.id) {
|
if (route.params.id) {
|
||||||
data = await dataStore.updateItem("createddocuments", {...createData, id: itemInfo.value.id})
|
data = await useEntities("createddocuments").update(route.params.id, createData)
|
||||||
} else {
|
} else {
|
||||||
data = await dataStore.createNewItem("createddocuments", createData)
|
data = await useEntities("createddocuments").create(createData)
|
||||||
}
|
}
|
||||||
|
|
||||||
await router.push(`/createDocument/edit/${data.id}`)
|
await router.push(`/createDocument/edit/${data.id}`)
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ const loading = ref(true)
|
|||||||
|
|
||||||
const setupPage = async () => {
|
const setupPage = async () => {
|
||||||
if((mode.value === "show") && route.params.id){
|
if((mode.value === "show") && route.params.id){
|
||||||
itemInfo.value = await useSupabaseSelectSingle("incominginvoices",route.params.id,"*, files(*), vendor(*)")
|
//itemInfo.value = await useSupabaseSelectSingle("incominginvoices",route.params.id,"*, files(*), vendor(*)")
|
||||||
|
itemInfo.value = await useEntities("incominginvoices").selectSingle(route.params.id,"*, files(*), vendor(*)")
|
||||||
if(process.dev) console.log(itemInfo.value)
|
if(process.dev) console.log(itemInfo.value)
|
||||||
currentDocument.value = await useFiles().selectDocument(itemInfo.value.files[0].id)
|
currentDocument.value = await useFiles().selectDocument(itemInfo.value.files[0].id)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user