diff --git a/.github/workflows/gradle-build-feature.yml b/.github/workflows/gradle-build-feature.yml index 127ca38dc9..bdcb909e9b 100644 --- a/.github/workflows/gradle-build-feature.yml +++ b/.github/workflows/gradle-build-feature.yml @@ -8,6 +8,8 @@ on: - 'doc-**/*' - 'hotfix-**/*' - 'dependabot/**/*' +env: + HUSKY: 0 jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/gradle-build-native-feature.yml b/.github/workflows/gradle-build-native-feature.yml index 8f074129cb..464acf6882 100644 --- a/.github/workflows/gradle-build-native-feature.yml +++ b/.github/workflows/gradle-build-native-feature.yml @@ -8,6 +8,8 @@ on: - 'doc-**/*' - 'hotfix-**/*' - 'dependabot/**/*' +env: + HUSKY: 0 jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/gradle-build-production.yml b/.github/workflows/gradle-build-production.yml index e69a0babcb..096478d4bc 100644 --- a/.github/workflows/gradle-build-production.yml +++ b/.github/workflows/gradle-build-production.yml @@ -4,6 +4,7 @@ on: branches: - "master" env: + HUSKY: 0 PROJECT_ID: ${{ secrets.RUN_PROJECT }} RUN_REGION: us-central1 SERVICE_NAME: checkins-master diff --git a/.github/workflows/gradle-build-publish.yml b/.github/workflows/gradle-build-publish.yml index 9e8fed23d5..0f7cec56ef 100644 --- a/.github/workflows/gradle-build-publish.yml +++ b/.github/workflows/gradle-build-publish.yml @@ -2,6 +2,8 @@ name: Gradle Publish to GitHub Packages on: release: types: [created] +env: + HUSKY: 0 jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/gradle-dependency-submission.yml b/.github/workflows/gradle-dependency-submission.yml index 3aa1f9b734..959013aeaf 100644 --- a/.github/workflows/gradle-dependency-submission.yml +++ b/.github/workflows/gradle-dependency-submission.yml @@ -3,7 +3,8 @@ name: Gradle Dependency Submission on: push: branches: [ 'develop', 'master', 'feature-2532/graal' ] - +env: + HUSKY: 0 permissions: contents: write diff --git a/.github/workflows/gradle-deploy-develop.yml b/.github/workflows/gradle-deploy-develop.yml index a30f87d573..2d8679e81b 100644 --- a/.github/workflows/gradle-deploy-develop.yml +++ b/.github/workflows/gradle-deploy-develop.yml @@ -4,6 +4,7 @@ on: branches: - 'develop' env: + HUSKY: 0 PROJECT_ID: ${{ secrets.RUN_PROJECT }} RUN_REGION: us-central1 SERVICE_NAME: checkins-develop diff --git a/.github/workflows/gradle-deploy-native-develop.yml b/.github/workflows/gradle-deploy-native-develop.yml index 98105aaa74..5ef9eee305 100644 --- a/.github/workflows/gradle-deploy-native-develop.yml +++ b/.github/workflows/gradle-deploy-native-develop.yml @@ -4,6 +4,7 @@ on: branches: - 'develop' env: + HUSKY: 0 PROJECT_ID: ${{ secrets.RUN_PROJECT }} RUN_REGION: us-central1 SERVICE_NAME: checkins-develop-native diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 300f52c479..a78e80609b 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -10,6 +10,8 @@ on: # Runs on pushes targeting the default branch push: branches: [develop] +env: + HUSKY: 0 # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/web-ui/.husky/pre-push b/web-ui/.husky/pre-push new file mode 100755 index 0000000000..a64ea70f31 --- /dev/null +++ b/web-ui/.husky/pre-push @@ -0,0 +1 @@ +./gradlew check diff --git a/web-ui/package.json b/web-ui/package.json index 559f2f6bab..f0d1fca48b 100644 --- a/web-ui/package.json +++ b/web-ui/package.json @@ -43,7 +43,6 @@ "react-jss": "^10.4.0", "react-modal": "^3.14.3", "react-router-dom": "^5.3.0", - "react-swipeable-views": "^0.14.0", "recharts": "^2.12.4", "reselect": "^4.0.0", "styled-components": "^6.1.8" @@ -58,7 +57,8 @@ "serve": "vite preview", "start": "vite", "test": "vitest", - "update-test": "vitest -u" + "update-test": "vitest -u", + "prepare": "cd .. && husky web-ui/.husky" }, "eslintConfig": { "extends": "react-app" @@ -76,31 +76,30 @@ ] }, "devDependencies": { - "@ladle/react": "^4.1.2", + "@ladle/react": "^5.0.1", + "@testing-library/dom": "^10.4.0", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", "@testing-library/user-event": "^14.6.1", - "@testing-library/dom": "^10.4.0", - "@types/react-router-dom": "^5.3.0", - "@vitejs/plugin-react-swc": "^3.6.0", - "@vitest/coverage-v8": "^1.4.0", - "eslint": "^9.1.1", - "eslint-plugin-react": "^7.34.1", - "eslint-plugin-react-hooks": "^4.6.0", + "@types/react-router-dom": "^5.3.3", + "@vitejs/plugin-react-swc": "^3.8.0", + "@vitest/coverage-v8": "^3.0.8", + "eslint": "^9.22.0", + "eslint-plugin-react": "^7.37.4", + "eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-vitest": "^0.5.4", - "globals": "^15.0.0", - "happy-dom": "^15.10.2", - "jest-fetch-mock": "^3.0.3", - "jsdom": "^24.0.0", - "msw": "^2.6.4", - "prettier": "3.2.5", + "globals": "^16.0.0", + "husky": "^9.1.7", + "jsdom": "^26.0.0", + "msw": "^2.7.3", + "prettier": "3.5.3", "prop-types": "^15.8.1", "react-test-renderer": "^18.3.1", - "typescript": "^5.4.5", - "typescript-eslint": "^7.7.1", - "vite": "^5.4.12", - "vite-tsconfig-paths": "^4.3.2", - "vitest": "^1.6.1", - "vitest-fetch-mock": "^0.2.2" + "typescript": "^5.8.2", + "typescript-eslint": "^8.26.1", + "vite": "^6.2.1", + "vite-tsconfig-paths": "^5.1.4", + "vitest": "^3.0.8", + "vitest-fetch-mock": "^0.4.5" } } diff --git a/web-ui/src/App.jsx b/web-ui/src/App.jsx index 870391c129..a22d3ed0cc 100644 --- a/web-ui/src/App.jsx +++ b/web-ui/src/App.jsx @@ -65,8 +65,9 @@ const theme = extendTheme({ components: { MuiButtonBase: { defaultProps: { - disableRipple: typeof process !== 'undefined' && !!process.env.VITEST_WORKER_ID, // No more ripple...only when testing. - }, + disableRipple: + typeof process !== 'undefined' && !!process.env.VITEST_WORKER_ID // No more ripple...only when testing. + } }, MuiCssBaseline: { styleOverrides: { diff --git a/web-ui/src/api/api.js b/web-ui/src/api/api.js index 8f5aabff06..63f9839f2e 100644 --- a/web-ui/src/api/api.js +++ b/web-ui/src/api/api.js @@ -61,7 +61,7 @@ export const getMyFetch = async () => { function windowLogin() { return new Promise((resolve, reject) => { const authUrl = `${BASE_API_URL}/login?close=true`; - const loginWindow = window.open(authUrl, "Login", "width=500,height=600"); + const loginWindow = window.open(authUrl, 'Login', 'width=500,height=600'); const interval = setInterval(() => { try { diff --git a/web-ui/src/api/certification.js b/web-ui/src/api/certification.js index e62905f10d..29376b726d 100644 --- a/web-ui/src/api/certification.js +++ b/web-ui/src/api/certification.js @@ -8,7 +8,7 @@ export const getCertifications = async cookie => { headers: { 'X-CSRF-Header': cookie, Accept: 'application/json', - 'Content-Type': 'application/json;charset=UTF-8', + 'Content-Type': 'application/json;charset=UTF-8' } }); }; @@ -29,9 +29,9 @@ export const createCertification = async (data, cookie) => { Accept: 'application/json', 'Content-Type': 'application/json;charset=UTF-8' }, - data: data, + data: data }); -} +}; export const updateCertification = async (id, data, cookie) => { return resolve({ @@ -42,9 +42,9 @@ export const updateCertification = async (id, data, cookie) => { Accept: 'application/json', 'Content-Type': 'application/json;charset=UTF-8' }, - data: data, + data: data }); -} +}; export const mergeCertification = async (sourceId, targetId, cookie) => { return resolve({ @@ -55,6 +55,6 @@ export const mergeCertification = async (sourceId, targetId, cookie) => { Accept: 'application/json', 'Content-Type': 'application/json;charset=UTF-8' }, - data: { sourceId, targetId }, + data: { sourceId, targetId } }); -} +}; diff --git a/web-ui/src/api/feedback.js b/web-ui/src/api/feedback.js index 856618502d..8815235557 100644 --- a/web-ui/src/api/feedback.js +++ b/web-ui/src/api/feedback.js @@ -22,14 +22,11 @@ export const findReviewRequestsByPeriodAndTeamMembers = async ( }); }; -export const findReviewRequestsByPeriod = async ( - period, - cookie -) => { +export const findReviewRequestsByPeriod = async (period, cookie) => { return resolve({ url: feedbackRequestURL, params: { - reviewPeriodId: period?.id, + reviewPeriodId: period?.id }, headers: { 'X-CSRF-Header': cookie, Accept: 'application/json' } }); diff --git a/web-ui/src/api/generic.js b/web-ui/src/api/generic.js index 23998c6403..4357d38312 100644 --- a/web-ui/src/api/generic.js +++ b/web-ui/src/api/generic.js @@ -18,7 +18,7 @@ export const downloadData = (url, cookie, params) => { params: params, headers: { 'X-CSRF-Header': cookie, - Accept: 'application/json', + Accept: 'application/json' }, url: url }); @@ -33,6 +33,6 @@ export const initiate = (url, cookie, params) => { 'Content-Type': 'application/json;charset=UTF-8' }, url: url, - data: params, + data: params }); }; diff --git a/web-ui/src/api/kudos.js b/web-ui/src/api/kudos.js index a9a9601232..5144450538 100644 --- a/web-ui/src/api/kudos.js +++ b/web-ui/src/api/kudos.js @@ -1,15 +1,15 @@ -import { resolve } from "./api.js"; +import { resolve } from './api.js'; -const kudosUrl = "/services/kudos"; +const kudosUrl = '/services/kudos'; export const createKudos = async (kudos, cookie) => { return resolve({ - method: "post", + method: 'post', url: kudosUrl, data: kudos, - responseType: "json", + responseType: 'json', headers: { - "X-CSRF-Header": cookie, + 'X-CSRF-Header': cookie, Accept: 'application/json', 'Content-Type': 'application/json;charset=UTF-8' } @@ -22,8 +22,8 @@ export const getReceivedKudos = async (memberId, cookie) => { params: { recipientId: memberId }, - responseType: "json", - headers: { "X-CSRF-Header": cookie, Accept: 'application/json' } + responseType: 'json', + headers: { 'X-CSRF-Header': cookie, Accept: 'application/json' } }); }; @@ -33,15 +33,15 @@ export const getSentKudos = async (memberId, cookie) => { params: { senderId: memberId }, - responseType: "json", - headers: { "X-CSRF-Header": cookie, Accept: 'application/json' } + responseType: 'json', + headers: { 'X-CSRF-Header': cookie, Accept: 'application/json' } }); }; -export const getRecentKudos = async (cookie) => { +export const getRecentKudos = async cookie => { return resolve({ url: `${kudosUrl}/recent`, - responseType: "json", + responseType: 'json', headers: { 'X-CSRF-Header': cookie, Accept: 'application/json' } }); }; @@ -52,42 +52,44 @@ export const getAllKudos = async (cookie, isPending) => { params: { isPending: isPending }, - responseType: "json", + responseType: 'json', headers: { 'X-CSRF-Header': cookie, Accept: 'application/json' } }); }; export const updateKudos = async (kudos, cookie) => { return resolve({ - method: "put", + method: 'put', url: kudosUrl, data: kudos, - responseType: "json", + responseType: 'json', headers: { - "X-CSRF-Header": cookie, + 'X-CSRF-Header': cookie, Accept: 'application/json', - 'Content-Type': 'application/json;charset=UTF-8'} + 'Content-Type': 'application/json;charset=UTF-8' + } }); }; export const approveKudos = async (kudos, cookie) => { return resolve({ - method: "put", + method: 'put', url: `${kudosUrl}/approve`, data: kudos, - responseType: "json", + responseType: 'json', headers: { - "X-CSRF-Header": cookie, + 'X-CSRF-Header': cookie, Accept: 'application/json', - 'Content-Type': 'application/json;charset=UTF-8'} + 'Content-Type': 'application/json;charset=UTF-8' + } }); }; export const deleteKudos = async (kudosId, cookie) => { return resolve({ - method: "delete", + method: 'delete', url: `${kudosUrl}/${kudosId}`, - responseType: "json", - headers: { "X-CSRF-Header": cookie, Accept: 'application/json' } + responseType: 'json', + headers: { 'X-CSRF-Header': cookie, Accept: 'application/json' } }); }; diff --git a/web-ui/src/api/settings.js b/web-ui/src/api/settings.js index ba46645b62..038a234130 100644 --- a/web-ui/src/api/settings.js +++ b/web-ui/src/api/settings.js @@ -23,7 +23,7 @@ export const putOption = async (option, cookie) => { Accept: 'application/json', 'Content-Type': 'application/json;charset=UTF-8' }, - data: option, + data: option }); }; @@ -36,6 +36,6 @@ export const postOption = async (option, cookie) => { Accept: 'application/json', 'Content-Type': 'application/json;charset=UTF-8' }, - data: option, + data: option }); }; diff --git a/web-ui/src/api/volunteer.js b/web-ui/src/api/volunteer.js index aedc924058..7b751fa225 100644 --- a/web-ui/src/api/volunteer.js +++ b/web-ui/src/api/volunteer.js @@ -4,18 +4,18 @@ const organizationBaseUrl = '/services/volunteer/organization'; // Create New Organization export const createNewOrganization = async (csrf, newOrganization) => { - const res = await resolve({ - method: 'POST', - url: organizationBaseUrl, - headers: { - 'X-CSRF-Header': csrf, - 'Content-Type': 'application/json', - }, - data: newOrganization, - }); - - return res; - }; + const res = await resolve({ + method: 'POST', + url: organizationBaseUrl, + headers: { + 'X-CSRF-Header': csrf, + 'Content-Type': 'application/json' + }, + data: newOrganization + }); + + return res; +}; // Save New Organization export const saveNewOrganization = async (csrf, newOrganization) => { @@ -46,4 +46,3 @@ export const saveNewEvent = async (csrf, newEvent) => { return res; }; - diff --git a/web-ui/src/components/admin/permissions/Permissions.jsx b/web-ui/src/components/admin/permissions/Permissions.jsx index f3af9e81a6..5f1f94a0b5 100644 --- a/web-ui/src/components/admin/permissions/Permissions.jsx +++ b/web-ui/src/components/admin/permissions/Permissions.jsx @@ -5,14 +5,16 @@ import MobileTable from './MobileTable'; import { AppContext } from '../../../context/AppContext'; import { selectHasPermissionAssignmentPermission, - noPermission, + noPermission } from '../../../context/selectors'; export default function Permissions() { const { state } = useContext(AppContext); const showDesktop = useMediaQuery('(min-width:650px)', { noSsr: true }); - return selectHasPermissionAssignmentPermission(state) ? - (
{description}
} - {values && values.length > 0 ? - : - } + {values && values.length > 0 ? ( + + ) : ( + + )}{description}
} - {values && values.length > 0 ? - : - } + {values && values.length > 0 ? ( + + ) : ( + + )}The administrator may edit organizations to ensure accuracy.
++ The administrator may edit organizations to ensure accuracy. +
{/* Dialog for creating/editing a relationship */}{label}
- {payload.slice().reverse().map(p => { - return- {titleWords(payload[0].name - .replace("internal", "") - .replace("external", ""))} : {payload[0].value}
+ {titleWords( + payload[0].name.replace('internal', '').replace('external', '') + )}{' '} + : {payload[0].value} +-