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

@@ -1,7 +1,7 @@
<script lang="ts" setup>
import type { TAdminProject } from '~/server/api/admin/projects';
import { PREMIUM_PLAN, getPlanFromId } from '@data/PREMIUM'
import { PREMIUM_PLAN, getPlanFromId } from '@data/PLANS'
import { useSelectMenuStyle } from '~/composables/ui/useSelectMenuStyle';
import { sub, format, isSameDay, type Duration, startOfDay, endOfDay } from 'date-fns'

View File

@@ -1,7 +1,7 @@
<script lang="ts" setup>
import type { TAdminProject } from '~/server/api/admin/projects';
import { getPlanFromId } from '~/shared/data/PREMIUM';
import { getPlanFromId } from '~/shared/data/PLANS';
import { AdminDialogProjectDetails } from '#components';

View File

@@ -2,7 +2,7 @@
import type { TAdminProject } from '~/server/api/admin/projects';
import type { TAdminUser } from '~/server/api/admin/users';
import { getPlanFromId } from '~/shared/data/PREMIUM';
import { getPlanFromId } from '~/shared/data/PLANS';
import { AdminDialogProjectDetails } from '#components';

View File

@@ -196,7 +196,7 @@ function getPricingsData() {
<div class="flex justify-between items-center mt-10 flex-col xl:flex-row">
<div class="flex flex-col gap-2">
<div class="poppins text-[1.1rem] text-lyx-lightmode-text dark:text-yellow-400 mb-2">
*Plan upgrades are applicable exclusively to this project(workspace).
*Plan upgrades are applied to account level.
</div>
<div class="poppins text-[2rem] font-semibold">
Do you need help ?

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>

View File

@@ -1,7 +1,7 @@
<script lang="ts" setup>
import dayjs from 'dayjs';
import type { SettingsTemplateEntry } from './Template.vue';
import { getPlanFromId, PREMIUM_PLAN, type PLAN_TAG } from '@data/PREMIUM';
import { getPlanFromId, PREMIUM_PLAN, type PLAN_TAG } from '@data/PLANS';
const { projectId, isGuest } = useProject();