change reports + chage pricing

This commit is contained in:
Emily
2025-04-25 18:36:00 +02:00
parent 407c84f59c
commit 82b0f6aac4
18 changed files with 123 additions and 73 deletions

View File

@@ -73,25 +73,6 @@ async function deleteSnapshot(close: () => any) {
close();
}
async function generatePDF() {
try {
const res = await $fetch<Blob>('/api/project/generate_pdf', {
headers: useComputedHeaders({ useSnapshotDates: false, custom: { 'x-snapshot-name': snapshot.value.name } }).value,
responseType: 'blob'
});
const url = URL.createObjectURL(res);
const a = document.createElement('a');
a.href = url;
a.download = `Report.pdf`;
a.click();
URL.revokeObjectURL(url);
} catch (ex: any) {
alert(ex.message);
}
}
const { actions } = useProject();
const { showDrawer } = useDrawer();
@@ -256,12 +237,6 @@ function openPendingInvites() {
</div>
</div>
<div class="w-full flex mt-4">
<LyxUiButton @click="generatePDF()" type="outline" class="w-full text-center text-[.8rem]">
Export report
</LyxUiButton>
</div>
</div>
<div class="bg-lyx-lightmode-widget dark:bg-[#202020] h-[1px] w-full"></div>