-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #1212 Enable leadership judge assessment * #1212 Amend timeline and downloads * Include preview urls * Include helpersTMP for local working copy helpers * Include npm scope for jac-uk * Use jac-kit@0.0.25
- Loading branch information
1 parent
dd9dcbb
commit 10188af
Showing
17 changed files
with
819 additions
and
92 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,49 @@ | ||
# This file was auto-generated by the Firebase CLI | ||
# https://github.com/firebase/firebase-tools | ||
# Builds and deploys to firebase hosting preview channel. | ||
|
||
name: Deploy to Firebase Hosting on PR | ||
name: Preview pull request | ||
'on': pull_request | ||
jobs: | ||
build_and_preview: | ||
preview: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: potiuk/cancel-workflow-runs@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- uses: actions/setup-node@master | ||
- name: Installing project dependencies | ||
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc && npm ci | ||
- name: Create env file | ||
run: | | ||
touch .env.develop | ||
echo "NODE_ENV=production" > .env.develop | ||
echo "VUE_APP_FIREBASE_API_KEY=${{ secrets.DEVELOP_FIREBASE_API_KEY }}" >> .env.develop | ||
echo "VUE_APP_FIREBASE_AUTH_DOMAIN=${{ secrets.DEVELOP_FIREBASE_AUTH_DOMAIN }}" >> .env.develop | ||
echo "VUE_APP_FIREBASE_DATABASE_URL=${{ secrets.DEVELOP_FIREBASE_DATABASE_URL }}" >> .env.develop | ||
echo "VUE_APP_FIREBASE_PROJECT_ID=${{ secrets.DEVELOP_FIREBASE_PROJECT_ID }}" >> .env.develop | ||
echo "VUE_APP_FIREBASE_STORAGE_BUCKET=${{ secrets.DEVELOP_FIREBASE_STORAGE_BUCKET }}" >> .env.develop | ||
echo "VUE_APP_FIREBASE_MESSAGING_SENDER_ID=${{ secrets.DEVELOP_FIREBASE_MESSAGING_SENDER_ID }}" >> .env.develop | ||
echo "VUE_APP_FIREBASE_APP_ID=${{ secrets.DEVELOP_FIREBASE_APP_ID }}" >> .env.develop | ||
cat .env.develop | ||
- name: Building the project | ||
run: npm run build-develop | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_DIGITAL_PLATFORM_DEVELOP }}' | ||
firebaseServiceAccount: '${{ secrets.DEVELOP_FIREBASE_SERVICE_ACCOUNT }}' | ||
projectId: digital-platform-develop | ||
target: develop-admin-app | ||
env: | ||
FIREBASE_CLI_PREVIEWS: hostingchannels |
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 +1 @@ | ||
registry=https://npm.pkg.github.com/jac-uk | ||
@jac-uk:registry=https://npm.pkg.github.com |
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 |
---|---|---|
|
@@ -123,4 +123,7 @@ export default { | |
padding: 0; | ||
margin: 0; | ||
} | ||
.modal__title { | ||
color: white; | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<template> | ||
<div> | ||
<div class="modal__title govuk-!-padding-2 govuk-heading-m"> | ||
Leadership Judge Details | ||
</div> | ||
<div class="modal__content govuk-!-margin-6"> | ||
<div class="govuk-grid-row"> | ||
<form | ||
ref="formRef" | ||
@submit.prevent="save" | ||
> | ||
<fieldset> | ||
<TextField | ||
id="full-name" | ||
v-model="fullName" | ||
label="Full name" | ||
required | ||
/> | ||
<TextField | ||
id="title" | ||
v-model="title" | ||
label="Title or position" | ||
required | ||
/> | ||
<TextField | ||
id="email" | ||
v-model="email" | ||
label="Email" | ||
type="email" | ||
required | ||
/> | ||
<TextField | ||
id="phone" | ||
v-model="phone" | ||
label="Phone" | ||
type="tel" | ||
required | ||
/> | ||
</fieldset> | ||
<button | ||
class="govuk-button govuk-!-margin-right-3" | ||
@click="save" | ||
> | ||
Save | ||
</button> | ||
<button | ||
class="govuk-button govuk-button--secondary govuk-!-margin-right-3" | ||
@click="closeModal" | ||
> | ||
Cancel | ||
</button> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import TextField from '@jac-uk/jac-kit/draftComponents/Form/TextField'; | ||
export default { | ||
name: 'LeadershipJudgeDetails', | ||
components: { | ||
TextField, | ||
}, | ||
data() { | ||
return { | ||
email: null, | ||
fullName: null, | ||
phone: null, | ||
title: null, | ||
}; | ||
}, | ||
computed: { | ||
applicationId() { | ||
return this.$attrs['application-id']; | ||
}, | ||
}, | ||
created() { | ||
this.email = this.$attrs.email; | ||
this.fullName = this.$attrs.fullName; | ||
this.phone = this.$attrs.phone; | ||
this.title = this.$attrs.title; | ||
}, | ||
methods: { | ||
closeModal() { | ||
this.$emit('close'); | ||
}, | ||
confirmModal() { | ||
this.modalOpen = false; | ||
this.$emit('confirmed'); | ||
document.body.style.overflow = ''; | ||
}, | ||
async save() { | ||
const data = { | ||
leadershipJudgeDetails: { | ||
email: this.email, | ||
fullName: this.fullName, | ||
phone: this.phone, | ||
title: this.title, | ||
}, | ||
}; | ||
await this.$store.dispatch('application/update', { data: data, id: this.applicationId }); | ||
this.closeModal(); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
fieldset { | ||
border: none; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
.modal__title { | ||
color: white; | ||
} | ||
</style> |
Oops, something went wrong.