Skip to content

Commit 216b3e7

Browse files
Merge pull request #1734 from OneCommunityGlobal/development
Frontend Release to Main [3.09]
2 parents e6e7652 + e892b70 commit 216b3e7

62 files changed

Lines changed: 2219 additions & 289 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,32 @@ jobs:
1818

1919
build_development:
2020
docker:
21-
- image: ubuntu:20.04
21+
# Change from Ubnutu to cimg/node:14.21.3.
22+
# cimg convient image comes with node, yarn, and other pre-installed software.
23+
# This will remove the steps of install node, yarn, and other software.
24+
- image: cimg/node:14.21.3
2225
resource_class: large
2326
steps:
2427
- checkout
25-
- run:
26-
name: Install ubuntu updates
27-
command: apt-get update && apt-get upgrade -y
28-
- run:
29-
name: Install curl and zip
30-
command: apt-get install curl zip -y
31-
- run:
32-
name: Download and execute Node.js 14.x install script from node source
33-
command: curl -sL https://deb.nodesource.com/setup_14.x | bash -
34-
- run:
35-
name: Install Node.js and NPM
36-
command: apt-get install nodejs -y
37-
- run:
38-
name: Download and execute Yarn istallation script
39-
command: curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null
40-
- run:
41-
name: Add yarn to sources.list
42-
command: echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list
43-
- run:
44-
name: Install yarn
45-
command: apt-get install yarn -y
28+
- restore_cache:
29+
keys:
30+
# Update the key to v1.1-dependencies-{{ checksum "package-lock.json" }} since the base image switched.
31+
# Otherwise, we would have persmission issues while retriving the cache saved from the preivous image
32+
- v1.1-dependencies-{{ checksum "package-lock.json" }}
4633
- run:
4734
name: Install HighestGoodNetworkApp's NodeJS dependencies
4835
command: npm install
4936
- run:
5037
name: Build the React client
5138
command: export REACT_APP_APIENDPOINT=$APIENDPOINT_DEV REACT_APP_DEF_PWD=$REACT_APP_DEF_PWD REACT_APP_SENTRY_URL=$SENTRY_URL_DEV SKIP_PREFLIGHT_CHECK=true NODE_OPTIONS=$NODE_OPTIONS && npm run build
39+
- run:
40+
name: Export error log if 'Build the React client' failed
41+
command: |
42+
mkdir -p /tmp/err_logs
43+
cp -r /home/circleci/.npm/_logs/* /tmp/err_logs
44+
when: on_fail
45+
- store_artifacts:
46+
path: /tmp/err_logs
5247
- run:
5348
name: Create ZIP archive of build directory
5449
command: zip -r build.zip build
@@ -61,6 +56,10 @@ jobs:
6156
- run:
6257
name: Deploy compiled app to surge.sh on $SURGE_DOMAIN_DEV
6358
command: ./node_modules/.bin/surge --domain $SURGE_DOMAIN_DEV --project ./build
59+
- save_cache:
60+
key: v1.1-dependencies-{{ checksum "package-lock.json" }}
61+
paths:
62+
- ./node_modules
6463

6564
build_beta:
6665
docker:

.eslintignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ src/components/Badge/**
2020
src/components/common/**
2121
src/components/Header/**
2222
src/components/BMDashboard/BMHeader/**
23-
src/components/Inventory/**
24-
src/components/Memberships/**
2523
src/components/MonthlyEffort/**
26-
src/components/NewProfileLink/**
2724

2825
src/components/PermissionsManagement/**
2926
# src/components/PopUpBar/**

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
"eslint.alwaysShowStatus": true,
1313
"editor.tabSize": 2,
1414
"editor.codeActionsOnSave": {
15-
"source.fixAll.eslint": true
15+
"source.fixAll.eslint": "explicit"
1616
},
1717
"files.exclude": {
1818
"**/.classpath": true,
1919
"**/.project": true,
2020
"**/.settings": true,
2121
"**/.factorypath": true
2222
}
23-
}
23+
}

images/screenshot.png

-3 Bytes
Loading

package-lock.json

Lines changed: 24 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@
103103
"eslint-plugin-react": "^7.29.4",
104104
"eslint-plugin-react-hooks": "^4.3.0",
105105
"eslint-plugin-testing-library": "^3.6.0",
106-
"jest-environment-jsdom-sixteen": "^1.0.3",
107106
"msw": "^0.19.5",
108107
"node-sass": "^8.0.0",
109108
"prettier": "^1.19.1",
110109
"redux-mock-store": "^1.5.4",
111110
"husky": "^8.0.0",
112111
"sinon": "^7.3.2",
113112
"surge": "^0.21.6",
113+
"jest-environment-jsdom-sixteen": "^1.0.3",
114114
"node-fetch": "^3.1.1"
115115
}
116116
}

src/actions/timeEntries.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ export const postTimeEntry = timeEntry => {
7676
return async dispatch => {
7777
try {
7878
const res = await axios.post(url, timeEntry);
79-
dispatch(updateTimeEntries(timeEntry));
79+
if(timeEntry.entryType == 'default'){
80+
dispatch(updateTimeEntries(timeEntry));
81+
}
8082
return res.status;
8183
} catch (e) {
8284
return e.response.status;
@@ -89,7 +91,9 @@ export const editTimeEntry = (timeEntryId, timeEntry, oldDateOfWork) => {
8991
return async dispatch => {
9092
try {
9193
const res = await axios.put(url, timeEntry);
92-
dispatch(updateTimeEntries(timeEntry, oldDateOfWork));
94+
if (timeEntry.entryType == 'default') {
95+
dispatch(updateTimeEntries(timeEntry, oldDateOfWork));
96+
}
9397
return res.status;
9498
} catch (e) {
9599
return e.response.status;
@@ -102,7 +106,9 @@ export const deleteTimeEntry = timeEntry => {
102106
return async dispatch => {
103107
try {
104108
const res = await axios.delete(url);
105-
dispatch(updateTimeEntries(timeEntry));
109+
if (timeEntry.entryType == 'default') {
110+
dispatch(updateTimeEntries(timeEntry));
111+
}
106112
return res.status;
107113
} catch (e) {
108114
return e.response.status;
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import React, { useState } from 'react';
2-
import { Modal, ModalHeader, ModalBody } from 'reactstrap';
3-
4-
const Inventory = props => {
5-
return <React.Fragment></React.Fragment>;
6-
};
1+
function Inventory() {
2+
return null;
3+
}
74

85
export default Inventory;

src/components/Inventory/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
export { default } from './Inventory';
1+
// Assuming Inventory is the default export from './Inventory'
2+
import Inventory from './Inventory';
3+
4+
// Export it as a named export
5+
export default Inventory;

src/components/Memberships/Memberships.jsx

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)