Tidying
This commit is contained in:
@@ -15,7 +15,6 @@ const route = useRoute()
|
|||||||
|
|
||||||
const auth = useAuthStore()
|
const auth = useAuthStore()
|
||||||
|
|
||||||
//profileStore.initializeData((await supabase.auth.getUser()).data.user.id)
|
|
||||||
|
|
||||||
const month = dayjs().format("MM")
|
const month = dayjs().format("MM")
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ const profileStore = useProfileStore()
|
|||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const mode = ref(route.params.mode || "show")
|
const mode = ref(route.params.mode || "show")
|
||||||
const supabase = useSupabaseClient()
|
|
||||||
|
|
||||||
const itemInfo = ref({statementallocations:[]})
|
const itemInfo = ref({statementallocations:[]})
|
||||||
const oldItemInfo = ref({})
|
const oldItemInfo = ref({})
|
||||||
@@ -202,15 +201,7 @@ const archiveStatement = async () => {
|
|||||||
let temp = itemInfo.value
|
let temp = itemInfo.value
|
||||||
delete temp.statementallocations
|
delete temp.statementallocations
|
||||||
|
|
||||||
await dataStore.updateItem("bankstatements", {...temp,archived:true})
|
await useEntities("bankstatements").archive(temp.id)
|
||||||
|
|
||||||
|
|
||||||
const {data,error} = await supabase.from("historyitems").insert({
|
|
||||||
createdBy: useProfileStore().activeProfile.id,
|
|
||||||
tenant: useProfileStore().currentTenant,
|
|
||||||
text: "Bankbuchung archiviert",
|
|
||||||
bankStatement: itemInfo.value.id
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ const dataStore = useDataStore()
|
|||||||
const profileStore = useProfileStore()
|
const profileStore = useProfileStore()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const supabase = useSupabaseClient()
|
|
||||||
const modal = useModal()
|
const modal = useModal()
|
||||||
const auth = useAuthStore()
|
const auth = useAuthStore()
|
||||||
|
|
||||||
@@ -134,7 +133,8 @@ const setupPage = async () => {
|
|||||||
console.log(route.query.loadMode)
|
console.log(route.query.loadMode)
|
||||||
|
|
||||||
if (route.query.loadMode === "deliveryNotes") {
|
if (route.query.loadMode === "deliveryNotes") {
|
||||||
let linkedDocuments = (await supabase.from("createddocuments").select().in("id", JSON.parse(route.query.linkedDocuments))).data
|
let linkedDocuments = (await useEntities("createddocuments").select()).filter(i => JSON.parse(route.query.linkedDocuments).includes(i.id))
|
||||||
|
//let linkedDocuments = (await supabase.from("createddocuments").select().in("id", JSON.parse(route.query.linkedDocuments))).data
|
||||||
|
|
||||||
//TODO: Implement Checking for Same Customer, Contact and Project
|
//TODO: Implement Checking for Same Customer, Contact and Project
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user