From ddb2db159f4e2a733aeb926512bba02f2e1d0c42 Mon Sep 17 00:00:00 2001 From: "Lisias (Lee) Loback" Date: Fri, 27 Nov 2020 01:01:03 +0000 Subject: [PATCH 1/5] #1063 Extend Application - Added .npmrc file in order to use JAC-KIT - Added the jac-kit to the ADMIN app - Changed the EditableField component to allow Objects as values (for date) - EditableField: Fixed Bug where the Link was not showing orrectly - Removed the Modal COmponent from the admin repo - Changed NOTES to allow application level notes - removed the CSS from the admin repo - Created the DATE EXTENSION in the application - Added the modal from the jac-kit to Indepedenten Assessment --- .npmrc | 1 + package-lock.json | 7 +- package.json | 1 + src/components/EditableField.vue | 4 +- src/components/Modal/Modal.README.md | 51 ---------- src/components/Modal/Modal.vue | 70 ------------- .../IndependentAssessorChange.vue | 0 .../ModalViews/SubmissionExtension.vue | 98 +++++++++++++++++++ .../views => ModalViews}/UploadAssessment.vue | 0 src/components/Notes/Notes.vue | 8 ++ src/store/notes.js | 9 +- src/styles/main.scss | 97 +----------------- .../Exercises/Applications/Application.vue | 71 ++++++++++++-- .../Tasks/IndependentAssessments.vue | 4 +- 14 files changed, 186 insertions(+), 235 deletions(-) create mode 100644 .npmrc delete mode 100644 src/components/Modal/Modal.README.md delete mode 100644 src/components/Modal/Modal.vue rename src/components/{Modal/views => ModalViews}/IndependentAssessorChange.vue (100%) create mode 100644 src/components/ModalViews/SubmissionExtension.vue rename src/components/{Modal/views => ModalViews}/UploadAssessment.vue (100%) diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..5477abf66 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +registry=https://npm.pkg.github.com/jac-uk diff --git a/package-lock.json b/package-lock.json index 3b9b0af87..19d380655 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "apply-admin", - "version": "0.43.1", + "version": "0.45.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2474,6 +2474,11 @@ "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", "dev": true }, + "@jac-uk/jackit": { + "version": "0.0.6", + "resolved": "https://npm.pkg.github.com/download/@jac-uk/jackit/0.0.6/fd0fd95fb8cfd5a6a87e13e2860dff93caf454e43cf827e149ac6e549929c9e2", + "integrity": "sha512-uxRvNW4zJYalqLecIixqkUWnmdg2ouVRVizCvRhlH6feMxSOrtt6P8aGUiWbLkbGHFzbSSQoc813oAMVKQ0jvw==" + }, "@jest/console": { "version": "24.9.0", "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", diff --git a/package.json b/package.json index a4f94b580..8c73860b6 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "dependencies": { "@ckeditor/ckeditor5-build-classic": "^16.0.0", "@ckeditor/ckeditor5-vue": "^1.0.1", + "@jac-uk/jackit": "0.0.6", "@ministryofjustice/frontend": "0.0.17-alpha", "@sentry/browser": "^5.20.1", "@sentry/integrations": "^5.20.1", diff --git a/src/components/EditableField.vue b/src/components/EditableField.vue index 221485b6f..2d373ed52 100644 --- a/src/components/EditableField.vue +++ b/src/components/EditableField.vue @@ -51,7 +51,7 @@ class="edit-field" > @@ -94,7 +94,7 @@ export default { default: 'value', }, value: { - type: [String, Date, Number], + type: [String, Date, Number, Object], default: '', }, type: { diff --git a/src/components/Modal/Modal.README.md b/src/components/Modal/Modal.README.md deleted file mode 100644 index d55006422..000000000 --- a/src/components/Modal/Modal.README.md +++ /dev/null @@ -1,51 +0,0 @@ -example usage: - - - -#Props - - #methods - openModal: - To trigger the modal. - Component is self contained so the suggested use is as in example at top of page. - Also adds an overflow block to the document body, which stops scrolling, and shows the modalMask layer which prevents clicking page objects. - closeModal: - To close or cancel the modal, removes above blocking elements and styling, emits a 'closed' event which can be listen in parent to trigger behaviour following a modal being dismissed/declined. - Linked to the _optional_ secondary button togglable with the _cancelable_ prop. - diff --git a/src/components/Modal/Modal.vue b/src/components/Modal/Modal.vue deleted file mode 100644 index 2ec39f8ee..000000000 --- a/src/components/Modal/Modal.vue +++ /dev/null @@ -1,70 +0,0 @@ - - - - - diff --git a/src/components/Modal/views/IndependentAssessorChange.vue b/src/components/ModalViews/IndependentAssessorChange.vue similarity index 100% rename from src/components/Modal/views/IndependentAssessorChange.vue rename to src/components/ModalViews/IndependentAssessorChange.vue diff --git a/src/components/ModalViews/SubmissionExtension.vue b/src/components/ModalViews/SubmissionExtension.vue new file mode 100644 index 000000000..f3bb1e230 --- /dev/null +++ b/src/components/ModalViews/SubmissionExtension.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/src/components/Modal/views/UploadAssessment.vue b/src/components/ModalViews/UploadAssessment.vue similarity index 100% rename from src/components/Modal/views/UploadAssessment.vue rename to src/components/ModalViews/UploadAssessment.vue diff --git a/src/components/Notes/Notes.vue b/src/components/Notes/Notes.vue index 34647ba83..0e8f3d798 100644 --- a/src/components/Notes/Notes.vue +++ b/src/components/Notes/Notes.vue @@ -65,6 +65,10 @@ export default { type: String, default: '', }, + applicationId: { + type: String, + default: '', + }, title: { type: String, default: 'Notes', @@ -97,6 +101,7 @@ export default { created() { const data = {}; data.candidateId = this.candidateId || null; + data.applicationId = this.applicationId || null; this.$store.dispatch('notes/bind', data ); }, methods: { @@ -107,6 +112,9 @@ export default { id: this.candidateId || null, }; } + if (this.applicationId) { + data.applicationId = this.applicationId; + } this.noteSelectedObj = data; this.notesAction = STEPS.new; }, diff --git a/src/store/notes.js b/src/store/notes.js index fca2e9450..15d3bb911 100644 --- a/src/store/notes.js +++ b/src/store/notes.js @@ -7,13 +7,16 @@ const collection = firestore.collection('notes'); export default { namespaced: true, actions: { - bind: firestoreAction(async ({ bindFirestoreRef }, { candidateId }) => { - let firestoreRef; + bind: firestoreAction(async ({ bindFirestoreRef }, { candidateId, applicationId }) => { + let firestoreRef = collection; if (candidateId) { - firestoreRef = collection + firestoreRef = firestoreRef .where('candidate.id', '==', candidateId) .orderBy('created', 'desc'); } + if (applicationId) { + firestoreRef = firestoreRef.where('applicationId', '==', applicationId); + } if (firestoreRef) { await bindFirestoreRef('records', firestoreRef, { serialize: vuexfireSerialize }); } diff --git a/src/styles/main.scss b/src/styles/main.scss index 6bb7f7fb3..df90df4eb 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -9,99 +9,4 @@ $moj-assets-path: "~@ministryofjustice/frontend/moj/assets/"; @import "print"; -$max-width: 1200px; - -.float-right { - float: right; -} - -.text-center { - text-align: center; -} - -.text-right { - text-align: right; -} - -.float-right { - float: right; -} - -.display-block { - display: block; -} - -.hidden { - display: none; -} - -// background utility classes -.background-light-grey { - background: govuk-colour("light-grey"); -} - -.background-blue { - background: govuk-colour("blue"); -} - -.background-blue * { - color: #fff; -} - -// JAC bespoke css can go here -body { - margin: 0; - padding: 0; - font-family: $govuk-font-family; -} - -/*#944 removed the overrides*/ - -.govuk-width-container { - max-width: $max-width; -} - -// disabled inputs -.govuk-input:disabled { - background-color: #ccc; -} - -// Spinner -@-webkit-keyframes spinner-border { - to { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes spinner-border { - to { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -.spinner-border { - display: inline-block; - width: 2rem; - height: 2rem; - vertical-align: middle; - border: 0.25em solid currentColor; - border-right-color: transparent; - border-radius: 50%; - -webkit-animation: spinner-border .75s linear infinite; - animation: spinner-border .75s linear infinite; -} -.spinner-border-sm { - width: .6rem; - height: .6rem; - border-width: 0.2em; -} - -.panel { - background: govuk-colour("light-grey"); - padding: 20px; -} - -.todo { - border: 2px solid red; - background-color: pink; -} +@import "@jac-uk/jackit/helpers/css/global.scss"; diff --git a/src/views/Exercises/Applications/Application.vue b/src/views/Exercises/Applications/Application.vue index 5fc3908c9..0ca68596e 100644 --- a/src/views/Exercises/Applications/Application.vue +++ b/src/views/Exercises/Applications/Application.vue @@ -94,7 +94,7 @@
-
+
Created on

@@ -103,7 +103,7 @@

-
+
Submitted on

+ +
+
+
+ Extension + +
+

+ {{ application.dateExtension | formatDate | showAlternative("Unknown") }} +

+ +
+
+ + +
@@ -1834,6 +1869,14 @@
+ +
+ +
@@ -1850,8 +1893,10 @@ import FileUpload from '@/components/Form/FileUpload'; import jsPDF from 'jspdf'; import htmlDocx from 'html-docx-js/dist/html-docx'; //has to be imported from dist folder import { saveAs } from 'file-saver'; -import Modal from '@/components/Modal/Modal'; -import IndependentAssessorChange from '@/components/Modal/views/IndependentAssessorChange'; +import Modal from '@jac-uk/jackit/components/Modal/Modal'; +import IndependentAssessorChange from '@/components/ModalViews/IndependentAssessorChange'; +import SubmissionExtension from '@/components/ModalViews/SubmissionExtension'; +import Notes from '@/components/Notes/Notes'; export default { components: { @@ -1863,6 +1908,8 @@ export default { FileUpload, Modal, IndependentAssessorChange, + SubmissionExtension, + Notes, }, data() { return { @@ -1871,6 +1918,10 @@ export default { ref: 'full', title: 'Full information', }, + { + ref: 'notes', + title: 'Notes', + }, { ref: 'panel', title: 'Panel pack', @@ -2198,13 +2249,13 @@ export default { title: this.application.secondAssessorTitle, }; } - this.openModal(); + this.openModal('modalRef'); }, - openModal(){ - this.$refs.modalRef.openModal(); + openModal(modalRef){ + this.$refs[modalRef].openModal(); }, - closeModal() { - this.$refs.modalRef.closeModal(); + closeModal(modalRef) { + this.$refs[modalRef].closeModal(); }, }, }; diff --git a/src/views/Exercises/Tasks/IndependentAssessments.vue b/src/views/Exercises/Tasks/IndependentAssessments.vue index b42d370b3..9e1e1f0c5 100644 --- a/src/views/Exercises/Tasks/IndependentAssessments.vue +++ b/src/views/Exercises/Tasks/IndependentAssessments.vue @@ -280,8 +280,8 @@ import TableCell from '@/components/Page/Table/TableCell'; import ActionButton from '@/components/ActionButton'; import DownloadLink from '@/components/DownloadLink'; import Banner from '@/components/Page/Banner'; -import Modal from '@/components/Modal/Modal'; -import UploadAssessment from '@/components/Modal/views/UploadAssessment'; +import Modal from '@jac-uk/jackit/components/Modal/Modal'; +import UploadAssessment from '@/components/ModalViews/UploadAssessment'; export default { components: { From a15f1b49d285ce8f66d377d07d6e1e871c8a0c6c Mon Sep 17 00:00:00 2001 From: warrensearle Date: Fri, 27 Nov 2020 15:24:25 +0000 Subject: [PATCH 2/5] #1093 Update CircleCI config to access Github Packages registry (#1095) --- .circleci/config.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 324b2bdbc..76e9f1d24 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,9 @@ jobs: - checkout - run: name: 'Setup' - command: npm ci + command: | + echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_TOKEN}" > ~/.npmrc + npm ci - persist_to_workspace: root: . paths: @@ -54,7 +56,7 @@ jobs: name: 'Deploy to production' command: | npm run build-production - node_modules/.bin/firebase target:apply hosting production-admin-app jac-apply-admin-production --project production + node_modules/.bin/firebase target:apply hosting production-admin-app jac-apply-admin-production --project production node_modules/.bin/firebase deploy --force --token=$FIREBASE_DEPLOY_TOKEN --only hosting:production-admin-app --project production build-and-deploy-staging: @@ -117,6 +119,6 @@ workflows: - test filters: branches: - only: + only: - master - /hotfix/.*/ From 7698e7435b67e0285dbd065cc79bf302f3a34a2c Mon Sep 17 00:00:00 2001 From: "Lisias (Lee) Loback" Date: Fri, 27 Nov 2020 01:01:03 +0000 Subject: [PATCH 3/5] #1063 Extend Application - Added .npmrc file in order to use JAC-KIT - Added the jac-kit to the ADMIN app - Changed the EditableField component to allow Objects as values (for date) - EditableField: Fixed Bug where the Link was not showing orrectly - Removed the Modal COmponent from the admin repo - Changed NOTES to allow application level notes - removed the CSS from the admin repo - Created the DATE EXTENSION in the application - Added the modal from the jac-kit to Indepedenten Assessment --- .npmrc | 1 + package-lock.json | 7 +- package.json | 1 + src/components/EditableField.vue | 4 +- src/components/Modal/Modal.README.md | 51 ---------- src/components/Modal/Modal.vue | 70 ------------- .../IndependentAssessorChange.vue | 0 .../ModalViews/SubmissionExtension.vue | 98 +++++++++++++++++++ .../views => ModalViews}/UploadAssessment.vue | 0 src/components/Notes/Notes.vue | 8 ++ src/store/notes.js | 9 +- src/styles/main.scss | 97 +----------------- .../Exercises/Applications/Application.vue | 71 ++++++++++++-- .../Tasks/IndependentAssessments.vue | 4 +- 14 files changed, 186 insertions(+), 235 deletions(-) create mode 100644 .npmrc delete mode 100644 src/components/Modal/Modal.README.md delete mode 100644 src/components/Modal/Modal.vue rename src/components/{Modal/views => ModalViews}/IndependentAssessorChange.vue (100%) create mode 100644 src/components/ModalViews/SubmissionExtension.vue rename src/components/{Modal/views => ModalViews}/UploadAssessment.vue (100%) diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..5477abf66 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +registry=https://npm.pkg.github.com/jac-uk diff --git a/package-lock.json b/package-lock.json index 3b9b0af87..19d380655 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "apply-admin", - "version": "0.43.1", + "version": "0.45.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2474,6 +2474,11 @@ "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", "dev": true }, + "@jac-uk/jackit": { + "version": "0.0.6", + "resolved": "https://npm.pkg.github.com/download/@jac-uk/jackit/0.0.6/fd0fd95fb8cfd5a6a87e13e2860dff93caf454e43cf827e149ac6e549929c9e2", + "integrity": "sha512-uxRvNW4zJYalqLecIixqkUWnmdg2ouVRVizCvRhlH6feMxSOrtt6P8aGUiWbLkbGHFzbSSQoc813oAMVKQ0jvw==" + }, "@jest/console": { "version": "24.9.0", "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", diff --git a/package.json b/package.json index 93cf13b72..e19f4be5b 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "dependencies": { "@ckeditor/ckeditor5-build-classic": "^16.0.0", "@ckeditor/ckeditor5-vue": "^1.0.1", + "@jac-uk/jackit": "0.0.6", "@ministryofjustice/frontend": "0.0.17-alpha", "@sentry/browser": "^5.20.1", "@sentry/integrations": "^5.20.1", diff --git a/src/components/EditableField.vue b/src/components/EditableField.vue index 221485b6f..2d373ed52 100644 --- a/src/components/EditableField.vue +++ b/src/components/EditableField.vue @@ -51,7 +51,7 @@ class="edit-field" > @@ -94,7 +94,7 @@ export default { default: 'value', }, value: { - type: [String, Date, Number], + type: [String, Date, Number, Object], default: '', }, type: { diff --git a/src/components/Modal/Modal.README.md b/src/components/Modal/Modal.README.md deleted file mode 100644 index d55006422..000000000 --- a/src/components/Modal/Modal.README.md +++ /dev/null @@ -1,51 +0,0 @@ -example usage: - - - -#Props - - #methods - openModal: - To trigger the modal. - Component is self contained so the suggested use is as in example at top of page. - Also adds an overflow block to the document body, which stops scrolling, and shows the modalMask layer which prevents clicking page objects. - closeModal: - To close or cancel the modal, removes above blocking elements and styling, emits a 'closed' event which can be listen in parent to trigger behaviour following a modal being dismissed/declined. - Linked to the _optional_ secondary button togglable with the _cancelable_ prop. - diff --git a/src/components/Modal/Modal.vue b/src/components/Modal/Modal.vue deleted file mode 100644 index 2ec39f8ee..000000000 --- a/src/components/Modal/Modal.vue +++ /dev/null @@ -1,70 +0,0 @@ - - - - - diff --git a/src/components/Modal/views/IndependentAssessorChange.vue b/src/components/ModalViews/IndependentAssessorChange.vue similarity index 100% rename from src/components/Modal/views/IndependentAssessorChange.vue rename to src/components/ModalViews/IndependentAssessorChange.vue diff --git a/src/components/ModalViews/SubmissionExtension.vue b/src/components/ModalViews/SubmissionExtension.vue new file mode 100644 index 000000000..f3bb1e230 --- /dev/null +++ b/src/components/ModalViews/SubmissionExtension.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/src/components/Modal/views/UploadAssessment.vue b/src/components/ModalViews/UploadAssessment.vue similarity index 100% rename from src/components/Modal/views/UploadAssessment.vue rename to src/components/ModalViews/UploadAssessment.vue diff --git a/src/components/Notes/Notes.vue b/src/components/Notes/Notes.vue index 34647ba83..0e8f3d798 100644 --- a/src/components/Notes/Notes.vue +++ b/src/components/Notes/Notes.vue @@ -65,6 +65,10 @@ export default { type: String, default: '', }, + applicationId: { + type: String, + default: '', + }, title: { type: String, default: 'Notes', @@ -97,6 +101,7 @@ export default { created() { const data = {}; data.candidateId = this.candidateId || null; + data.applicationId = this.applicationId || null; this.$store.dispatch('notes/bind', data ); }, methods: { @@ -107,6 +112,9 @@ export default { id: this.candidateId || null, }; } + if (this.applicationId) { + data.applicationId = this.applicationId; + } this.noteSelectedObj = data; this.notesAction = STEPS.new; }, diff --git a/src/store/notes.js b/src/store/notes.js index fca2e9450..15d3bb911 100644 --- a/src/store/notes.js +++ b/src/store/notes.js @@ -7,13 +7,16 @@ const collection = firestore.collection('notes'); export default { namespaced: true, actions: { - bind: firestoreAction(async ({ bindFirestoreRef }, { candidateId }) => { - let firestoreRef; + bind: firestoreAction(async ({ bindFirestoreRef }, { candidateId, applicationId }) => { + let firestoreRef = collection; if (candidateId) { - firestoreRef = collection + firestoreRef = firestoreRef .where('candidate.id', '==', candidateId) .orderBy('created', 'desc'); } + if (applicationId) { + firestoreRef = firestoreRef.where('applicationId', '==', applicationId); + } if (firestoreRef) { await bindFirestoreRef('records', firestoreRef, { serialize: vuexfireSerialize }); } diff --git a/src/styles/main.scss b/src/styles/main.scss index 6bb7f7fb3..df90df4eb 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -9,99 +9,4 @@ $moj-assets-path: "~@ministryofjustice/frontend/moj/assets/"; @import "print"; -$max-width: 1200px; - -.float-right { - float: right; -} - -.text-center { - text-align: center; -} - -.text-right { - text-align: right; -} - -.float-right { - float: right; -} - -.display-block { - display: block; -} - -.hidden { - display: none; -} - -// background utility classes -.background-light-grey { - background: govuk-colour("light-grey"); -} - -.background-blue { - background: govuk-colour("blue"); -} - -.background-blue * { - color: #fff; -} - -// JAC bespoke css can go here -body { - margin: 0; - padding: 0; - font-family: $govuk-font-family; -} - -/*#944 removed the overrides*/ - -.govuk-width-container { - max-width: $max-width; -} - -// disabled inputs -.govuk-input:disabled { - background-color: #ccc; -} - -// Spinner -@-webkit-keyframes spinner-border { - to { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes spinner-border { - to { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -.spinner-border { - display: inline-block; - width: 2rem; - height: 2rem; - vertical-align: middle; - border: 0.25em solid currentColor; - border-right-color: transparent; - border-radius: 50%; - -webkit-animation: spinner-border .75s linear infinite; - animation: spinner-border .75s linear infinite; -} -.spinner-border-sm { - width: .6rem; - height: .6rem; - border-width: 0.2em; -} - -.panel { - background: govuk-colour("light-grey"); - padding: 20px; -} - -.todo { - border: 2px solid red; - background-color: pink; -} +@import "@jac-uk/jackit/helpers/css/global.scss"; diff --git a/src/views/Exercises/Applications/Application.vue b/src/views/Exercises/Applications/Application.vue index 3908cc106..67b23d512 100644 --- a/src/views/Exercises/Applications/Application.vue +++ b/src/views/Exercises/Applications/Application.vue @@ -94,7 +94,7 @@
-
+
Created on

@@ -103,7 +103,7 @@

-
+
Submitted on

+ +
+
+
+ Extension + +
+

+ {{ application.dateExtension | formatDate | showAlternative("Unknown") }} +

+ +
+
+ + +
@@ -1844,6 +1879,14 @@
+ +
+ +
@@ -1860,8 +1903,10 @@ import FileUpload from '@/components/Form/FileUpload'; import jsPDF from 'jspdf'; import htmlDocx from 'html-docx-js/dist/html-docx'; //has to be imported from dist folder import { saveAs } from 'file-saver'; -import Modal from '@/components/Modal/Modal'; -import IndependentAssessorChange from '@/components/Modal/views/IndependentAssessorChange'; +import Modal from '@jac-uk/jackit/components/Modal/Modal'; +import IndependentAssessorChange from '@/components/ModalViews/IndependentAssessorChange'; +import SubmissionExtension from '@/components/ModalViews/SubmissionExtension'; +import Notes from '@/components/Notes/Notes'; export default { components: { @@ -1873,6 +1918,8 @@ export default { FileUpload, Modal, IndependentAssessorChange, + SubmissionExtension, + Notes, }, data() { return { @@ -1881,6 +1928,10 @@ export default { ref: 'full', title: 'Full information', }, + { + ref: 'notes', + title: 'Notes', + }, { ref: 'panel', title: 'Panel pack', @@ -2208,13 +2259,13 @@ export default { title: this.application.secondAssessorTitle, }; } - this.openModal(); + this.openModal('modalRef'); }, - openModal(){ - this.$refs.modalRef.openModal(); + openModal(modalRef){ + this.$refs[modalRef].openModal(); }, - closeModal() { - this.$refs.modalRef.closeModal(); + closeModal(modalRef) { + this.$refs[modalRef].closeModal(); }, }, }; diff --git a/src/views/Exercises/Tasks/IndependentAssessments.vue b/src/views/Exercises/Tasks/IndependentAssessments.vue index b42d370b3..9e1e1f0c5 100644 --- a/src/views/Exercises/Tasks/IndependentAssessments.vue +++ b/src/views/Exercises/Tasks/IndependentAssessments.vue @@ -280,8 +280,8 @@ import TableCell from '@/components/Page/Table/TableCell'; import ActionButton from '@/components/ActionButton'; import DownloadLink from '@/components/DownloadLink'; import Banner from '@/components/Page/Banner'; -import Modal from '@/components/Modal/Modal'; -import UploadAssessment from '@/components/Modal/views/UploadAssessment'; +import Modal from '@jac-uk/jackit/components/Modal/Modal'; +import UploadAssessment from '@/components/ModalViews/UploadAssessment'; export default { components: { From e3233f900d16d2f0b5829af4c9dcb5c95ede2a75 Mon Sep 17 00:00:00 2001 From: warrensearle Date: Fri, 27 Nov 2020 15:24:25 +0000 Subject: [PATCH 4/5] #1093 Update CircleCI config to access Github Packages registry (#1095) --- .circleci/config.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 324b2bdbc..76e9f1d24 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,9 @@ jobs: - checkout - run: name: 'Setup' - command: npm ci + command: | + echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_TOKEN}" > ~/.npmrc + npm ci - persist_to_workspace: root: . paths: @@ -54,7 +56,7 @@ jobs: name: 'Deploy to production' command: | npm run build-production - node_modules/.bin/firebase target:apply hosting production-admin-app jac-apply-admin-production --project production + node_modules/.bin/firebase target:apply hosting production-admin-app jac-apply-admin-production --project production node_modules/.bin/firebase deploy --force --token=$FIREBASE_DEPLOY_TOKEN --only hosting:production-admin-app --project production build-and-deploy-staging: @@ -117,6 +119,6 @@ workflows: - test filters: branches: - only: + only: - master - /hotfix/.*/ From 1d16efa9d5ed31a80e8c8e1020be0230f63248fb Mon Sep 17 00:00:00 2001 From: "Lisias (Lee) Loback" Date: Fri, 27 Nov 2020 17:04:05 +0000 Subject: [PATCH 5/5] #1063 Extend Application - Added the possibility os pattern transforamtion for files on the node_modules - to fix test failures --- jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index cbdbcf143..373d53976 100644 --- a/jest.config.js +++ b/jest.config.js @@ -11,7 +11,7 @@ module.exports = { '^.+\\.jsx?$': 'babel-jest', }, transformIgnorePatterns: [ - '/node_modules/', + '/node_modules/(?!@jac-uk)', ], moduleNameMapper: { '^@/(.*)$': '/src/$1',