diff --git a/.circleci/config.yml b/.circleci/config.yml index 4ef6426fdb..6d77a324bb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -133,7 +133,7 @@ parameters: default: "main" type: string sandbox_git_branch: # change to feature branch to test deployment - default: "grantee-import-bugfix" + default: "js-283-frontend-updates" type: string jobs: build_and_lint: @@ -314,10 +314,10 @@ jobs: hses_data_username: HSES_DATA_USERNAME hses_data_password: HSES_DATA_PASSWORD - run: - name: Return database to neutral, then migrate and seed + name: Migrate database command: | cf run-task tta-smarthub-sandbox \ - --command "yarn db:migrate:undo:prod && yarn db:migrate:prod && yarn db:seed:prod" \ + --command "yarn db:migrate:prod" \ --name "Reset DB" - when: # dev condition: @@ -339,10 +339,10 @@ jobs: hses_data_username: HSES_DATA_USERNAME hses_data_password: HSES_DATA_PASSWORD - run: - name: Undo database seeding, then migrate and seed + name: Migrate database command: | cf run-task tta-smarthub-dev \ - --command "yarn db:migrate:prod && yarn db:seed:undo:prod && yarn db:seed:prod" \ + --command "yarn db:migrate:prod" \ --name "Reset DB" - when: # staging condition: diff --git a/Staticfile b/Staticfile new file mode 100644 index 0000000000..e23addaccd --- /dev/null +++ b/Staticfile @@ -0,0 +1 @@ +root: maintenance_page \ No newline at end of file diff --git a/docs/openapi/index.yaml b/docs/openapi/index.yaml index 4f60ad4636..a6d91bddfb 100644 --- a/docs/openapi/index.yaml +++ b/docs/openapi/index.yaml @@ -179,9 +179,6 @@ components: fileUpload: type: object properties: - attachmentType: - type: string - description: "Type of attachment. Acceptable values are ATTACHMENT or RESOURCE" reportId: type: number description: "id of the Activity report the file is associated with" diff --git a/frontend/package.json b/frontend/package.json index 14bb72fea0..04e203fed5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -6,6 +6,7 @@ "@babel/runtime": "^7.12.1", "@fortawesome/fontawesome-free": "^5.15.1", "@fortawesome/fontawesome-svg-core": "^1.2.32", + "@fortawesome/free-regular-svg-icons": "^5.15.2", "@fortawesome/free-solid-svg-icons": "^5.15.1", "@fortawesome/react-fontawesome": "^0.1.11", "@hookform/error-message": "^0.0.5", diff --git a/frontend/src/App.css b/frontend/src/App.css index 2ffa03179d..29123b2c96 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -30,6 +30,10 @@ body { background-color: #f8f8f8; } +.text-ink { + color: #21272D +} + .smart-hub-bg-blue-primary { background-color: #0166ab; } diff --git a/frontend/src/components/FileUploader.js b/frontend/src/components/FileUploader.js index 0ce8a61435..228a651f9a 100644 --- a/frontend/src/components/FileUploader.js +++ b/frontend/src/components/FileUploader.js @@ -17,12 +17,11 @@ import { uploadFile, deleteFile } from '../fetchers/File'; import './FileUploader.css'; -export const upload = async (file, reportId, attachmentType, setErrorMessage) => { +export const upload = async (file, reportId, setErrorMessage) => { let res; try { const data = new FormData(); data.append('reportId', reportId); - data.append('attachmentType', attachmentType); data.append('file', file); res = await uploadFile(data); } catch (error) { @@ -42,13 +41,7 @@ export const handleDrop = async (e, reportId, id, onChange, setErrorMessage) => setErrorMessage('Cannot save attachments without a Grantee or Non-Grantee selected'); return; } - let attachmentType; - if (id === 'attachments') { - attachmentType = 'ATTACHMENT'; - } else if (id === 'otherResources') { - attachmentType = 'RESOURCE'; - } - const newFiles = e.map((file) => upload(file, reportId, attachmentType, setErrorMessage)); + const newFiles = e.map((file) => upload(file, reportId, setErrorMessage)); Promise.all(newFiles).then((values) => { onChange(values); }); @@ -66,8 +59,8 @@ function Dropzone(props) { {...getRootProps()} > - {errorMessage && ( diff --git a/frontend/src/components/FormItem.css b/frontend/src/components/FormItem.css index f2ddc3bd1e..73f211d96d 100644 --- a/frontend/src/components/FormItem.css +++ b/frontend/src/components/FormItem.css @@ -1,5 +1,3 @@ .smart-hub--form-required { - font-family: SourceSansPro; - font-size: 16px; color: #d42240; } diff --git a/frontend/src/components/FormItem.js b/frontend/src/components/FormItem.js index 7060e5b02b..70d6635de4 100644 --- a/frontend/src/components/FormItem.js +++ b/frontend/src/components/FormItem.js @@ -44,7 +44,7 @@ function FormItem({ const labelWithRequiredTag = ( <> {label} - {required && ( (Required))} + {required && ( (Required))} ); diff --git a/frontend/src/components/__tests__/FileUploader.js b/frontend/src/components/__tests__/FileUploader.js index 961714bb06..b47d4c9d16 100644 --- a/frontend/src/components/__tests__/FileUploader.js +++ b/frontend/src/components/__tests__/FileUploader.js @@ -33,7 +33,7 @@ describe('upload tests', () => { const mockSetErrorMessage = jest.fn(); it('can upload a file and return the correct information', async () => { const mockFileUpload = jest.spyOn(fileFetcher, 'uploadFile').mockImplementation(async () => ({ id: 1, url: 'url' })); - const got = await upload(mockFile, 1, 'fakeAttachment', mockSetErrorMessage); + const got = await upload(mockFile, 1, mockSetErrorMessage); expect(got).toStrictEqual({ id: 1, originalFileName: mockFile.name, fileSize: mockFile.size, status: 'UPLOADED', url: 'url', }); diff --git a/frontend/src/pages/ActivityReport/Pages/Review/Approver/Review.js b/frontend/src/pages/ActivityReport/Pages/Review/Approver/Review.js index 3ed908fc00..b741cd770a 100644 --- a/frontend/src/pages/ActivityReport/Pages/Review/Approver/Review.js +++ b/frontend/src/pages/ActivityReport/Pages/Review/Approver/Review.js @@ -38,7 +38,7 @@ const Review = ({

-
+