-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '_staging' into 1676-cache-prior-periods
- Loading branch information
Showing
38 changed files
with
2,327 additions
and
1,254 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"include": "src/**", | ||
"extension": [".js", ".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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,16 +3,13 @@ | |
<div class="row"> | ||
<AlertBox v-if="alert" :text="alert.text" :level="alert.level" v-on:dismiss="clearAlert" /> | ||
</div> | ||
<div class="row" v-if="isAdmin"> | ||
<AlertBox text="Service Interruption - Please reach out to [email protected] for treasury report generation." level="err" /> | ||
</div> | ||
<div class="row mt-5 mb-5" v-if="viewingOpenPeriod"> | ||
<div class="col" v-if="this.$route.query.sync_treasury_download && isAdmin"> | ||
<DownloadButton :href="downloadTreasuryReportURL()" class="btn btn-primary btn-block">Download Treasury Report</DownloadButton> | ||
</div> | ||
|
||
<div class="col" v-if="isAdmin"> | ||
<button disabled title="Please reach out to [email protected] for the treasury report." class="btn btn-primary btn-block" @click="sendTreasuryReport"> | ||
<button class="btn btn-primary btn-block" @click="sendTreasuryReport" :disabled="sending" id="sendTreasuryReportButton"> | ||
<span v-if="sending">Sending...</span> | ||
<span v-else>Send Treasury Report by Email</span> | ||
</button> | ||
|
@@ -23,14 +20,14 @@ | |
</div> | ||
|
||
<div class="col" v-if="isAdmin"> | ||
<button class="btn btn-info btn-block" @click="sendAuditReport" :disabled="sending"> | ||
<button class="btn btn-info btn-block" @click="sendAuditReport" :disabled="sending" id="sendAuditReportButton"> | ||
<span v-if="sending">Sending...</span> | ||
<span v-else>Send Audit Report by Email</span> | ||
</button> | ||
</div> | ||
|
||
<div class="col"> | ||
<button @click.prevent="startUpload" class="btn btn-primary btn-block">Submit Workbook</button> | ||
<button @click.prevent="startUpload" class="btn btn-primary btn-block" id="submitWorkbookButton">Submit Workbook</button> | ||
</div> | ||
|
||
<div class="col"> | ||
|
@@ -39,12 +36,12 @@ | |
</div> | ||
|
||
<div class="row border border-danger rounded m-3 mb-3 p-3" v-else> | ||
<div class="col"> | ||
<div class="col" id="closedReportingPeriodMessage"> | ||
This reporting period is closed. | ||
</div> | ||
</div> | ||
|
||
<p> | ||
<p id="welcomeToArpaReporter"> | ||
Welcome to the ARPA reporter. | ||
To get started, click the "Download Empty Template" button, above, to get a copy of an empty template for reporting. | ||
</p> | ||
|
@@ -81,9 +78,6 @@ export default { | |
viewingOpenPeriod() { | ||
return this.$store.getters.viewPeriodIsCurrent; | ||
}, | ||
isClosed() { | ||
return !(this.$store.getters.viewPeriodIsCurrent); | ||
}, | ||
}, | ||
data() { | ||
let alert; | ||
|
@@ -143,7 +137,7 @@ export default { | |
this.sending = true; | ||
try { | ||
const result = await getJson('/api/exports?async=true'); | ||
const result = await getJson('/api/exports?queue=true'); | ||
if (result.error) { | ||
this.alert = { | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<template> | ||
<b-modal | ||
id="edit-user-modal" | ||
title="Edit your profile" | ||
header-class="heading" | ||
footer-class="footer" | ||
ok-title="Save" | ||
@show="resetModal" | ||
@hidden="resetModal" | ||
@ok="handleOk" | ||
:ok-disabled="$v.formData.$invalid" | ||
> | ||
<b-form> | ||
<b-form-group | ||
:state="!$v.formData.name.$invalid" | ||
label="Name" | ||
label-for="name-input" | ||
invalid-feedback="Please enter your preferred first and last name" | ||
> | ||
<b-form-input | ||
type="text" | ||
id="name-input" | ||
v-model="formData.name" | ||
@keydown.enter.native="handleSubmit" | ||
required | ||
trim | ||
autofocus | ||
></b-form-input> | ||
</b-form-group> | ||
</b-form> | ||
</b-modal> | ||
</template> | ||
|
||
<script> | ||
import { mapGetters, mapActions } from 'vuex'; | ||
import { required, minLength } from 'vuelidate/lib/validators'; | ||
export default { | ||
data() { | ||
return { | ||
formData: { | ||
name: null, | ||
}, | ||
}; | ||
}, | ||
validations: { | ||
formData: { | ||
name: { | ||
required, | ||
minLength: minLength(4), | ||
}, | ||
}, | ||
}, | ||
computed: { | ||
...mapGetters({ | ||
loggedInUser: 'users/loggedInUser', | ||
}), | ||
}, | ||
methods: { | ||
...mapActions({ | ||
updateUser: 'users/updateUser', | ||
}), | ||
resetModal() { | ||
this.formData.name = this.loggedInUser.name; | ||
}, | ||
handleOk(bvModalEvt) { | ||
// Prevent modal from closing | ||
bvModalEvt.preventDefault(); | ||
this.handleSubmit(); | ||
}, | ||
async handleSubmit() { | ||
this.formData.id = this.loggedInUser.id; | ||
// Exit when the form isn't valid | ||
if (this.$v.formData.$invalid) { | ||
return; | ||
} | ||
try { | ||
await this.updateUser(this.formData); | ||
} catch (error) { | ||
this.$store.commit('alerts/addAlert', { | ||
text: `Error updating user: ${error.message}`, | ||
level: 'err', | ||
}); | ||
} | ||
// // Hide the modal manually | ||
this.$nextTick(() => { | ||
this.$bvModal.hide('edit-user-modal'); | ||
}); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style> | ||
.heading > h5 { | ||
font-family: Inter, Helvetica, Arial, sans-serif; | ||
font-size: 20px; | ||
font-weight: 700; | ||
} | ||
.footer { | ||
border: none; | ||
} | ||
</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
Oops, something went wrong.