-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c44904
commit e4378fd
Showing
54 changed files
with
1,641 additions
and
281 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,36 @@ | ||
<script setup> | ||
import AdminRepository from './AdminRepository.vue'; | ||
import ReportUtilities from './ReportUtilities.vue'; | ||
async function downloadGspcReport() { | ||
let response = await AdminRepository.downloadGspcReport() | ||
let blob = await response.blob(); | ||
ReportUtilities.downloadBlobAsFile(blob, 'GspcCompletionReport.csv') | ||
} | ||
</script> | ||
<template> | ||
<li class="usa-card tablet:grid-col-12"> | ||
<div class="usa-card__container"> | ||
<div class="usa-card__header"> | ||
<h4 class="usa-card__heading"> | ||
Download GSPC Report | ||
</h4> | ||
</div> | ||
<div class="usa-card__body"> | ||
<p> | ||
We’ve created a report for you in CSV format. You can open it in the spreadsheet | ||
application of your choice (e.g. Microsoft Excel, Google Sheets, Apple Numbers). | ||
</p> | ||
</div> | ||
<div class="usa-card__footer"> | ||
<button | ||
class="usa-button" | ||
@click="downloadGspcReport" | ||
> | ||
Download Report | ||
</button> | ||
</div> | ||
</div> | ||
</li> | ||
</template> |
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 |
---|---|---|
@@ -1,9 +1,14 @@ | ||
<script setup> | ||
import { ref, onErrorCaptured } from "vue" | ||
import AdminReportDownload from "./AdminReportDownload.vue"; | ||
import { useStore } from '@nanostores/vue' | ||
import { profile} from '../stores/user' | ||
import { computed } from "vue" | ||
import AdminReportDownload from "./AdminReportGSPC.vue"; | ||
import USWDSAlert from './USWDSAlert.vue' | ||
const error = ref() | ||
const user = useStore(profile) | ||
const isAdminUser = computed(() => user.value.roles.includes('Admin')) | ||
function setError(event){ | ||
|
@@ -23,20 +28,65 @@ | |
</script> | ||
|
||
<template> | ||
<div class="padding-top-4 padding-bottom-4 grid-container"> | ||
<div class="grid-row"> | ||
<div class="tablet:grid-col-12"> | ||
<USWDSAlert | ||
v-if="error" | ||
class="tablet:grid-col-12 margin-bottom-4" | ||
status="error" | ||
:heading="error.name" | ||
> | ||
<!-- eslint-disable-next-line vue/no-v-html --> | ||
<span v-html="error.message" /> | ||
</USWDSAlert> | ||
<AdminReportDownload /> | ||
<section | ||
v-if="isAdminUser" | ||
class="usa-prose" | ||
> | ||
<div class="padding-top-4 padding-bottom-4 grid-container"> | ||
<div class="grid-row"> | ||
<div class="tablet:grid-col-12"> | ||
<USWDSAlert | ||
v-if="error" | ||
class="tablet:grid-col-12 margin-bottom-4" | ||
status="error" | ||
:heading="error.name" | ||
> | ||
<!-- eslint-disable-next-line vue/no-v-html --> | ||
<span v-html="error.message" /> | ||
</USWDSAlert> | ||
<ul class="usa-card-group"> | ||
<AdminReportDownload /> | ||
<li class="usa-card tablet:grid-col-12"> | ||
<div class="usa-card__container"> | ||
<div class="usa-card__header"> | ||
<h4 class="usa-card__heading"> | ||
GSA SmartPay® Training Report | ||
</h4> | ||
</div> | ||
<div class="usa-card__body"> | ||
<p> | ||
This report will enable users to customize a report for individuals who have finished GSA SmartPay training. | ||
The report will be in CSV format, which can be opened in spreadsheet applications like Microsoft Excel, Google Sheets, or Apple Numbers. | ||
</p> | ||
</div> | ||
<div class="usa-card__footer"> | ||
<a | ||
href="./training-report/" | ||
class="card_link usa-button" | ||
> | ||
Access Report | ||
</a> | ||
</div> | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
<section v-else> | ||
<USWDSAlert | ||
status="error" | ||
class="usa-alert" | ||
heading="You are not authorized to receive reports." | ||
> | ||
Your email account is not authorized to access admin reports. If you should be authorized, you can | ||
<a | ||
class="usa-link" | ||
href="mailto:[email protected]" | ||
> | ||
contact the GSA SmartPay team | ||
</a> to gain access. | ||
</USWDSAlert> | ||
</section> | ||
</template> |
Oops, something went wrong.