Skip to content

Commit

Permalink
Merge pull request #191 from jac-uk/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
warrensearle authored Jan 17, 2020
2 parents 1391d87 + 8f81a3d commit 63295ff
Show file tree
Hide file tree
Showing 17 changed files with 324 additions and 120 deletions.
17 changes: 9 additions & 8 deletions .env.staging
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
VUE_APP_FIREBASE_API_KEY=AIzaSyD-1ChTYmtrmSD0UuvzV6y5GURkW9eRFvA
VUE_APP_FIREBASE_AUTH_DOMAIN=digital-platform-staging.firebaseapp.com
VUE_APP_FIREBASE_DATABASE_URL=https://digital-platform-staging.firebaseio.com
VUE_APP_FIREBASE_PROJECT_ID=digital-platform-staging
VUE_APP_FIREBASE_STORAGE_BUCKET=digital-platform-staging.appspot.com
VUE_APP_FIREBASE_MESSAGING_SENDER_ID=67930184815
VUE_APP_FIREBASE_APP_ID=1:67930184815:web:be7f1d59bd49d156

# This is here to ensure `npm run build` builds production-ready, complied, code to deploy to staging.
NODE_ENV=production
VUE_APP_FIREBASE_API_KEY=$STAGING_FIREBASE_API_KEY
VUE_APP_FIREBASE_AUTH_DOMAIN=$STAGING_FIREBASE_AUTH_DOMAIN
VUE_APP_FIREBASE_DATABASE_URL=$STAGING_FIREBASE_DATABASE_URL
VUE_APP_FIREBASE_PROJECT_ID=$STAGING_FIREBASE_PROJECT_ID
VUE_APP_FIREBASE_STORAGE_BUCKET=$STAGING_FIREBASE_STORAGE_BUCKET
VUE_APP_FIREBASE_MESSAGING_SENDER_ID=$STAGING_FIREBASE_MESSAGING_SENDER_ID
VUE_APP_FIREBASE_APP_ID=$STAGING_FIREBASE_APP_ID
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_modules
# local env files
.env.local
.env.*.local
.env

# Log files
npm-debug.log*
Expand Down
159 changes: 78 additions & 81 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,82 +1,85 @@
<template>
<div class="govuk-width-container">
<div class="govuk-main-wrapper">
<div
style="padding-top: 0px"
class="govuk-main-wrapper"
>
<header class="header">
<!-- HEADER SECTION -->
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds organisation__margin-bottom">
<div class="gem-c-organisation-logo brand--ministry-of-justice">
<img
src="@/assets/jac-logo.svg"
alt="Judicial Appointments Commission"
width="197"
height="66"
style="text-align: center"
>
</div>
</div>

<div class="govuk-grid-column-one-third organisation__margin-bottom">
<nav
role="navigation"
class="gem-c-translation-nav gem-c-translation-nav gem-c-translation-nav--no-margin-top brand--ministry-of-justice"
aria-label="Translations"
>
<ul class="gem-c-translation-nav__list">
<li class="gem-c-translation-nav__list-item">
<span lang="en">English</span>
</li>
<li class="gem-c-translation-nav__list-item">
<a
hreflang="cy"
lang="cy"
rel="alternate"
class="gem-c-translation-nav__link brand__color"
href="https://www.judicialappointments.gov.uk/cymraeg"
>Cymraeg - </a>
</li>
</ul>
</nav>

<ol class="app-c-topic-list app-c-topic-list--small brand--ministry-of-justice ">
<li class="app-c-topic-list__item">
<a
class="govuk-link app-c-topic-list__link app-c-topic-list__link--no-underline brand__color"
href="https://www.judicialappointments.gov.uk/business-plan" target="_blank"
>How do I apply</a>
</li>
<li class="app-c-topic-list__item">
<a
class="govuk-link app-c-topic-list__link app-c-topic-list__link--no-underline brand__color"
href="https://www.judicialappointments.gov.uk/jac-official-statistics" target="_blank"
>How do I qualify</a>
</li>

<li class="app-c-topic-list__item">
<a
class="govuk-link app-c-topic-list__link app-c-topic-list__link--no-underline brand__color"
href="https://apply.judicialappointments.digital/vacancies" target="_blank"
>Judicial vacancies</a>
</li>
<li class="app-c-topic-list__item">
<button
v-if="$route.name !== 'sign-in'"
class="govuk-button govuk-!-margin-bottom-0"
@click="signOut"
>
Sign Out
</button>
</li>
<li
v-if="isSignedIn"
class="app-c-topic-list__item"
>
<b>You are now signed in as {{ userName }}</b>
</li>
</ol>
</div>
<!-- HEADER SECTION -->
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds organisation__margin-bottom">
<div class="gem-c-organisation-logo brand--ministry-of-justice">
<img
src="@/assets/jac-logo.svg"
alt="Judicial Appointments Commission"
width="197"
height="66"
style="text-align: center"
>
</div>
<!-- HEADER SECTION -->
</div>
<div class="govuk-grid-column-one-third organisation__margin-bottom">
<nav
role="navigation"
class="gem-c-translation-nav gem-c-translation-nav gem-c-translation-nav--no-margin-top brand--ministry-of-justice"
aria-label="Translations"
>
<ul class="gem-c-translation-nav__list">
<li class="gem-c-translation-nav__list-item">
<span lang="en">English</span>
</li>
<li class="gem-c-translation-nav__list-item">
<a
hreflang="cy"
lang="cy"
rel="alternate"
class="gem-c-translation-nav__link brand__color"
href="https://www.judicialappointments.gov.uk/cymraeg"
>Cymraeg</a>
</li>
</ul>
</nav>
<ol class="app-c-topic-list app-c-topic-list--small brand--ministry-of-justice ">
<li class="app-c-topic-list__item">
<a
class="govuk-link app-c-topic-list__link app-c-topic-list__link--no-underline brand__color"
href="https://www.judicialappointments.gov.uk/business-plan"
target="_blank"
>How do I apply</a>
</li>
<li class="app-c-topic-list__item">
<a
class="govuk-link app-c-topic-list__link app-c-topic-list__link--no-underline brand__color"
href="https://www.judicialappointments.gov.uk/jac-official-statistics"
target="_blank"
>How do I qualify</a>
</li>
<li class="app-c-topic-list__item">
<a
class="govuk-link app-c-topic-list__link app-c-topic-list__link--no-underline brand__color"
href="https://apply.judicialappointments.digital/vacancies"
target="_blank"
>Judicial vacancies</a>
</li>
<li class="app-c-topic-list__item">
<button
v-if="$route.name !== 'sign-in'"
class="govuk-button govuk-!-margin-bottom-0"
@click="signOut"
>
Sign Out
</button>
</li>
<li
v-if="isSignedIn"
class="app-c-topic-list__item"
>
<b>You are now signed in as {{ userName }}</b>
</li>
</ol>
</div>
</div>
<!-- HEADER SECTION -->
</header>
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
Expand All @@ -93,16 +96,13 @@
</div>
</div>
</div>

<main id="main-content">
<RouterView />
</main>
</div>
</template>

<script>
import { auth } from '@/firebase';
export default {
name: 'App',
computed: {
Expand All @@ -121,19 +121,16 @@ export default {
},
};
</script>

<style lang="scss">
// @import 'https://assets.publishing.service.gov.uk/static/govuk-template-c0b8ba8b1652aacad298d74f24752260187f538b50c40c2484f7f333cbc3cf2b.css';
@import 'https://assets.publishing.service.gov.uk/static/fonts-e9ec5a5f82e5c2a17927ce356e5a054cb28025ec1547ec5d00f5c98d2ec5e481.css';
@import 'https://assets.publishing.service.gov.uk/static/core-layout-535eb07d05bcae550061481a9cbefad8c4807bf8da32da77312cf8ef2ab616c0.css';
@import 'https://assets.publishing.service.gov.uk/collections/application-1da0069f0ad5c09cfd287444f877560d89793e621ff13c1ababf63cc4eaceb8e.css';
// Required to include global main.scss styles
.header {
background-color: #fafafa;
padding: 1.25em 0.625em 0 0.625em;
};
.govuk-main-wrapper {
padding-top: 0px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/DownloadLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
download(fileName) {
this.visited = true;
// Create a reference to the file we want to download
const fileSavePath = `exercise-${this.exerciseId}/${fileName}`;
const fileSavePath = `exercise/${this.exerciseId}/${fileName}`;
// Get a reference to the storage service, which is used to create references in your storage bucket
const storage = firebase.storage();
Expand Down
32 changes: 32 additions & 0 deletions src/components/RepeatableFields/LeadJudge.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<div>
<TextField
:id="`lead_judge_${index}`"
v-model="row.name"
type="email"
label="Lead judge"
required
/>
<slot name="removeButton" />
</div>
</template>

<script>
import TextField from '@/components/Form/TextField';
export default {
components: {
TextField,
},
props: {
row: {
required: true,
type: Object,
},
index: {
required: true,
type: Number,
},
},
};
</script>
50 changes: 50 additions & 0 deletions src/components/RepeatableFields/SelectionCriterion.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<template>
<div>
<TextField
:id="selectionCriterionTitle"
v-model="row.title"
label="Provide title to be displayed to the candidate."
required
/>

<TextareaInput
:id="selectionCriterionText"
v-model="row.text"
label="Provide text to be displayed to the candidate."
required
/>

<slot name="removeButton" />
</div>
</template>

<script>
import TextareaInput from '@/components/Form/TextareaInput';
import TextField from '@/components/Form/TextField';
export default {
name: 'SelectionCriterion',
components: {
TextareaInput,
TextField,
},
props: {
row: {
required: true,
type: Object,
},
index: {
required: true,
type: Number,
},
},
computed: {
selectionCriterionTitle() {
return `selection_criterion_title_${this.index}`;
},
selectionCriterionText() {
return `selection_criterion_text_${this.index}`;
},
},
};
</script>
3 changes: 3 additions & 0 deletions src/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ Vue.filter('lookup',
'statement-of-suitability-with-skills-and-abilities': 'Statement of Suitability with skills and abilities',
'statement-of-suitability-with-skills-and-abilities-and-cv': 'Statement of Suitability with skills and abilities and CV',
'statement-of-eligibility': 'Statement of eligibility',
'read': 'Read',
'write': 'Write',
'both': 'Both',
'none': 'None',
'lord-chancellor': 'Lord Chancellor',
'lord-chief-justice': 'Lord Chief Justice',
Expand Down
26 changes: 25 additions & 1 deletion src/helpers/Timeline/exerciseTimeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const exerciseTimeline = (data) => {
if (data.contactIndependentAssessors) {
timeline.push(
{
entry: 'Contact independent assessors',
entry: 'JAC Contacts IAs',
date: isDate(data.contactIndependentAssessors) ? formatDate(data.contactIndependentAssessors) : null,
},
);
Expand Down Expand Up @@ -219,6 +219,30 @@ const exerciseTimeline = (data) => {
);
}

if (data.equalMeritSecondStageStartDate) {
timeline.push(
createShortlistingMethod('Equal merit second stage', data.equalMeritSecondStageStartDate, data.equalMeritSecondStageEndDate)
);
}

if (data.eMPSCCDate) {
timeline.push(
{
entry: 'EMP SCC',
date: isDate(data.eMPSCCDate) ? formatDate(data.eMPSCCDate) : null,
}
);
}

if (data.eMPOutcomeDate) {
timeline.push(
{
entry: 'EMP Outcomes',
date: isDate(data.eMPOutcomeDate) ? formatDate(data.eMPOutcomeDate, 'month') : null,
}
);
}

return timeline;
};

Expand Down
Loading

0 comments on commit 63295ff

Please sign in to comment.