-
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add missing data to public shared reports, add premium restrictions, …
…add pdf download
- Loading branch information
Showing
15 changed files
with
518 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
resources/js/Components/Common/Report/ReportSaveButton.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<script setup lang="ts"> | ||
import { SecondaryButton } from '@/packages/ui/src'; | ||
import ReportCreateModal from '@/Components/Common/Report/ReportCreateModal.vue'; | ||
import { h, ref } from 'vue'; | ||
import type { CreateReportBodyProperties } from '@/packages/api/src'; | ||
import { isAllowedToPerformPremiumAction } from '@/utils/billing'; | ||
import UpgradeModal from '@/Components/Common/UpgradeModal.vue'; | ||
defineProps<{ | ||
reportProperties: CreateReportBodyProperties; | ||
}>(); | ||
const showCreateReportModal = ref(false); | ||
const showPremiumModal = ref(false); | ||
const SaveIcon = h('div', { | ||
innerHTML: | ||
'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"/><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7M7 3v4a1 1 0 0 0 1 1h7"/></g></svg>', | ||
}); | ||
function onSaveReportClick() { | ||
if (isAllowedToPerformPremiumAction()) { | ||
showCreateReportModal.value = true; | ||
} else { | ||
showPremiumModal.value = true; | ||
} | ||
} | ||
</script> | ||
|
||
<template> | ||
<ReportCreateModal | ||
:properties="reportProperties" | ||
v-model:show="showCreateReportModal"></ReportCreateModal> | ||
<UpgradeModal v-model:show="showPremiumModal"> | ||
<strong>Sharable Reports</strong> is only available in solidtime | ||
Professional. | ||
</UpgradeModal> | ||
<SecondaryButton :icon="SaveIcon" @click="onSaveReportClick" | ||
>Save Report</SecondaryButton | ||
> | ||
</template> | ||
|
||
<style scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.