From 991dfc2ad5e3c6b7d7e21e18dbd0a40fba07cd81 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 5 Sep 2024 08:17:45 -0700 Subject: [PATCH 01/14] IO-2707 resolve time ticket modal rerender issue. --- .../time-ticket-modal/time-ticket-modal.component.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx index 1b286f24b..7f2a1df72 100644 --- a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx +++ b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx @@ -329,7 +329,9 @@ export function LaborAllocationContainer({ jobid, loading, lineTicketData, hideT timetickets={lineTicketData.timetickets} adjustments={lineTicketData.jobs_by_pk.lbr_adjustments} /> - {!hideTimeTickets && } + {!hideTimeTickets && ( + + )} ); } From 7a54b55bd46bde5a9f1ba996b62379904167a3ad Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 5 Sep 2024 08:26:49 -0700 Subject: [PATCH 02/14] IO-2724 Resolve tech console showing 2 drawers on production board. --- client/src/pages/tech-lookup/tech-lookup.container.jsx | 2 ++ client/src/pages/tech/tech.page.component.jsx | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/pages/tech-lookup/tech-lookup.container.jsx b/client/src/pages/tech-lookup/tech-lookup.container.jsx index b92a11d3f..a209777ba 100644 --- a/client/src/pages/tech-lookup/tech-lookup.container.jsx +++ b/client/src/pages/tech-lookup/tech-lookup.container.jsx @@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next"; import RbacWrapperComponent from "../../components/rbac-wrapper/rbac-wrapper.component"; import TechLookupJobsList from "../../components/tech-lookup-jobs-list/tech-lookup-jobs-list.component"; import InstanceRenderManager from "../../utils/instanceRenderMgr"; +import TechLookupJobsDrawer from "../../components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component"; export default function TechLookupContainer() { const { t } = useTranslation(); @@ -20,6 +21,7 @@ export default function TechLookupContainer() { return (
+
diff --git a/client/src/pages/tech/tech.page.component.jsx b/client/src/pages/tech/tech.page.component.jsx index 2733bae68..2be9f0a2a 100644 --- a/client/src/pages/tech/tech.page.component.jsx +++ b/client/src/pages/tech/tech.page.component.jsx @@ -9,7 +9,6 @@ import ErrorBoundary from "../../components/error-boundary/error-boundary.compon import FeatureWrapper from "../../components/feature-wrapper/feature-wrapper.component"; import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component"; import TechHeader from "../../components/tech-header/tech-header.component"; -import TechLookupJobsDrawer from "../../components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component"; import TechSider from "../../components/tech-sider/tech-sider.component"; import UpdateAlert from "../../components/update-alert/update-alert.component"; import { selectTechnician } from "../../redux/tech/tech.selectors"; @@ -68,7 +67,7 @@ export function TechPage({ technician }) { - + From f7207a9f3faf637a1edf898a8efe7848fd845174 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 5 Sep 2024 09:17:42 -0700 Subject: [PATCH 03/14] Add missing PWA dependency for Vite. --- client/package-lock.json | 4 +++- client/package.json | 3 ++- client/src/components/update-alert/update-alert.component.jsx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index bf0a5afcd..f794877d6 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -109,7 +109,8 @@ "vite-plugin-legacy": "^2.1.0", "vite-plugin-node-polyfills": "^0.22.0", "vite-plugin-pwa": "^0.20.1", - "vite-plugin-style-import": "^2.0.0" + "vite-plugin-style-import": "^2.0.0", + "workbox-window": "^7.1.0" }, "engines": { "node": ">=18.18.2" @@ -18429,6 +18430,7 @@ "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-7.1.0.tgz", "integrity": "sha512-ZHeROyqR+AS5UPzholQRDttLFqGMwP0Np8MKWAdyxsDETxq3qOAyXvqessc3GniohG6e0mAqSQyKOHmT8zPF7g==", "dev": true, + "license": "MIT", "dependencies": { "@types/trusted-types": "^2.0.2", "workbox-core": "7.1.0" diff --git a/client/package.json b/client/package.json index 42f26736d..e89aabfb0 100644 --- a/client/package.json +++ b/client/package.json @@ -153,6 +153,7 @@ "vite-plugin-legacy": "^2.1.0", "vite-plugin-node-polyfills": "^0.22.0", "vite-plugin-pwa": "^0.20.1", - "vite-plugin-style-import": "^2.0.0" + "vite-plugin-style-import": "^2.0.0", + "workbox-window": "^7.1.0" } } diff --git a/client/src/components/update-alert/update-alert.component.jsx b/client/src/components/update-alert/update-alert.component.jsx index 70159adda..b4a867052 100644 --- a/client/src/components/update-alert/update-alert.component.jsx +++ b/client/src/components/update-alert/update-alert.component.jsx @@ -31,7 +31,7 @@ export function UpdateAlert({ updateAvailable }) { () => { r.update(); }, - 10 * 60 * 1000 + 30 * 60 * 1000 ); } }, From fb2bc20b4fe0a0eda86cf5b765f61649d73427fa Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Thu, 5 Sep 2024 13:59:03 -0400 Subject: [PATCH 04/14] - removed unused function Signed-off-by: Dave Richer --- .../production-board-kanban.statistics.jsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/client/src/components/production-board-kanban/production-board-kanban.statistics.jsx b/client/src/components/production-board-kanban/production-board-kanban.statistics.jsx index f96b63903..301ff17f0 100644 --- a/client/src/components/production-board-kanban/production-board-kanban.statistics.jsx +++ b/client/src/components/production-board-kanban/production-board-kanban.statistics.jsx @@ -32,17 +32,6 @@ const ProductionStatistics = ({ data, cardSettings, reducerData }) => { return items.reduce((acc, item) => acc + (item[key]?.aggregate?.sum?.[subKey] || 0), 0); }; - const sumDineroAmounts = (items, key, getAmountFn) => { - return items.reduce( - (acc, item) => { - const amount = getAmountFn(item, key); - const dineroAmount = Dinero(amount ?? 0); - return acc.add(dineroAmount); - }, - Dinero({ amount: 0 }) - ); - }; - const calculateTotalAmount = (items, key) => { return items.reduce((acc, item) => acc.add(Dinero(item[key]?.totals?.subtotal ?? Dinero())), Dinero({ amount: 0 })); }; From 52cf4f3d1f5827fc04a960a09f710ba4cdd04178 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 5 Sep 2024 11:27:51 -0700 Subject: [PATCH 05/14] IO-2893 Enhance disable of editing of tickets Signed-off-by: Allan Carr --- .../time-ticket-list.component.jsx | 77 ++++++------------- 1 file changed, 25 insertions(+), 52 deletions(-) diff --git a/client/src/components/time-ticket-list/time-ticket-list.component.jsx b/client/src/components/time-ticket-list/time-ticket-list.component.jsx index 11ec514fe..b7265ca2b 100644 --- a/client/src/components/time-ticket-list/time-ticket-list.component.jsx +++ b/client/src/components/time-ticket-list/time-ticket-list.component.jsx @@ -12,7 +12,7 @@ import { DateFormatter, DateTimeFormatter } from "../../utils/DateFormatter"; import { onlyUnique } from "../../utils/arrayHelper"; import dayjs from "../../utils/day"; import { alphaSort, dateSort } from "../../utils/sorters"; -import RbacWrapper, { HasRbacAccess } from "../rbac-wrapper/rbac-wrapper.component"; +import { HasRbacAccess } from "../rbac-wrapper/rbac-wrapper.component"; import TimeTicketEnterButton from "../time-ticket-enter-button/time-ticket-enter-button.component"; const mapStateToProps = createStructuredSelector({ @@ -52,6 +52,10 @@ export function TimeTicketList({ splitKey: bodyshop.imexshopid }); + const canEditCommittedTimeTickets = HasRbacAccess({ bodyshop, authLevel, action: "timetickets:editcommitted" }); + const canEditTimeTickets = HasRbacAccess({ bodyshop, authLevel, action: "timetickets:edit" }); + const canEditShiftTickets = HasRbacAccess({ bodyshop, authLevel, action: "timetickets:shiftedit" }); + const totals = useMemo(() => { if (timetickets) return timetickets.reduce( @@ -65,6 +69,18 @@ export function TimeTicketList({ return { productivehrs: 0, actualhrs: 0 }; }, [timetickets]); + const isDisabled = (record) => { + if (disabled === true || !record.id) return true; + + const isShiftTicket = !record.ciecacode; + const isCommitted = record.committed_at; + if (isShiftTicket) { + return !(canEditShiftTickets && (!isCommitted || canEditCommittedTimeTickets)); + } + + return !(canEditTimeTickets && (!isCommitted || canEditCommittedTimeTickets)); + }; + const columns = [ ...(Enhanced_Payroll.treatment === "on" ? [ @@ -241,59 +257,16 @@ export function TimeTicketList({ )} {!techConsole && ( - { - return
; + - - - - + + )} ) From 1fd595d0dec5a97cbebc20de02266a009c065929 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 5 Sep 2024 11:42:11 -0700 Subject: [PATCH 06/14] IO-2902 Duplicate RBAC Items Signed-off-by: Allan Carr --- .../shop-info/shop-info.rbac.component.jsx | 50 +++++-------------- 1 file changed, 12 insertions(+), 38 deletions(-) diff --git a/client/src/components/shop-info/shop-info.rbac.component.jsx b/client/src/components/shop-info/shop-info.rbac.component.jsx index 8291c9c4f..5bd59d346 100644 --- a/client/src/components/shop-info/shop-info.rbac.component.jsx +++ b/client/src/components/shop-info/shop-info.rbac.component.jsx @@ -255,6 +255,18 @@ export function ShopInfoRbacComponent({ form, bodyshop }) { > + + + - - - - - - - )} - - , - - ]:[]} Date: Thu, 5 Sep 2024 11:44:26 -0700 Subject: [PATCH 07/14] IO-2902 Fix prettier formatting Signed-off-by: Allan Carr --- .../shop-info/shop-info.rbac.component.jsx | 656 +++++++++--------- 1 file changed, 332 insertions(+), 324 deletions(-) diff --git a/client/src/components/shop-info/shop-info.rbac.component.jsx b/client/src/components/shop-info/shop-info.rbac.component.jsx index 5bd59d346..a058e5f61 100644 --- a/client/src/components/shop-info/shop-info.rbac.component.jsx +++ b/client/src/components/shop-info/shop-info.rbac.component.jsx @@ -30,219 +30,226 @@ export function ShopInfoRbacComponent({ form, bodyshop }) { return ( - {...HasFeatureAccess({ featureName: "export", bodyshop }) ? [ - - - , - - - , - - - , - - - - ]:[]} - {...HasFeatureAccess({ featureName: "bills", bodyshop }) ? [ - - - , - - - , - - - , - - - , - - - - ]:[]} - - {...HasFeatureAccess({ featureName: "courtesycars", bodyshop }) ? [ - - - , - - - , - - - , - - - , - - - , - - - - ]:[]} - {...HasFeatureAccess({ featureName: "csi", bodyshop }) ? [ - - - , - - - - ]:[]} + {...HasFeatureAccess({ featureName: "export", bodyshop }) + ? [ + + + , + + + , + + + , + + + + ] + : []} + {...HasFeatureAccess({ featureName: "bills", bodyshop }) + ? [ + + + , + + + , + + + , + + + , + + + + ] + : []} + {...HasFeatureAccess({ featureName: "courtesycars", bodyshop }) + ? [ + + + , + + + , + + + , + + + , + + + , + + + + ] + : []} + {...HasFeatureAccess({ featureName: "csi", bodyshop }) + ? [ + + + , + + + + ] + : []} )} - {...HasFeatureAccess({ featureName: "timetickets", bodyshop }) ? [ - - - , - - - , - - - , - - - , - - - , - - - , - - - , - - - , - - - - ]:[]} + {...HasFeatureAccess({ featureName: "timetickets", bodyshop }) + ? [ + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + + ] + : []} )} - Date: Thu, 5 Sep 2024 11:52:06 -0700 Subject: [PATCH 08/14] Add in IP tracking for SingleDeviceOnly checks. --- client/src/redux/user/user.sagas.js | 47 +++++++++++++++++++---------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/client/src/redux/user/user.sagas.js b/client/src/redux/user/user.sagas.js index 99ba30225..52aaff580 100644 --- a/client/src/redux/user/user.sagas.js +++ b/client/src/redux/user/user.sagas.js @@ -10,7 +10,7 @@ import { signInWithEmailAndPassword, signOut } from "firebase/auth"; -import { doc, getDoc, setDoc } from "firebase/firestore"; +import { arrayUnion, doc, getDoc, setDoc, updateDoc } from "firebase/firestore"; import { getToken } from "firebase/messaging"; import i18next from "i18next"; import LogRocket from "logrocket"; @@ -48,6 +48,7 @@ import { validatePasswordResetSuccess } from "./user.actions"; import UserActionTypes from "./user.types"; +import cleanAxios from "../../utils/CleanAxios"; const fpPromise = FingerprintJS.load(); @@ -177,10 +178,24 @@ export function* setInstanceIdSaga({ payload: uid }) { // Get the visitor identifier when you need it. const fp = yield fpPromise; const result = yield fp.get(); - yield setDoc(userInstanceRef, { - timestamp: new Date(), - fingerprint: result.visitorId - }); + const res = yield cleanAxios.get("https://api.ipify.org/?format=json"); + const udoc = yield getDoc(userInstanceRef); + + if (!udoc.data()) { + yield setDoc(userInstanceRef, { + timestamp: new Date(), + fingerprint: result.visitorId, + //totalFingerprint: result, + ip: [res.data.ip] + }); + } else { + yield updateDoc(userInstanceRef, { + timestamp: new Date(), + fingerprint: result.visitorId, + //totalFingerprint: result, + ip: arrayUnion(res.data.ip) + }); + } yield put(setLocalFingerprint(result.visitorId)); yield delay(5 * 60 * 1000); @@ -311,17 +326,17 @@ export function* SetAuthLevelFromShopDetails({ payload }) { ); const user = yield select((state) => state.user.currentUser); - if (payload.features.singleDeviceOnly) { - if ( - !( - user.email.includes("@imex.") || - user.email.includes("@rome.") || - user.email.includes("@rometech.") || - user.email.includes("@promanager.") - ) - ) - yield put(setInstanceId(user.uid)); - } + // if (payload.features.singleDeviceOnly) { + // if ( + // !( + // user.email.includes("@imex.") || + // user.email.includes("@rome.") || + // user.email.includes("@rometech.") || + // user.email.includes("@promanager.") + // ) + // ) + yield put(setInstanceId(user.uid)); + //} //For Rome, check to make sure it's not a PM shop. try { From 12c75357b5b10040124266ed41dc5b8c9ff8f2ee Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 5 Sep 2024 11:53:48 -0700 Subject: [PATCH 09/14] Revert IP tracking to only single device users. --- client/src/redux/user/user.sagas.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/client/src/redux/user/user.sagas.js b/client/src/redux/user/user.sagas.js index 52aaff580..da6b93d65 100644 --- a/client/src/redux/user/user.sagas.js +++ b/client/src/redux/user/user.sagas.js @@ -326,17 +326,17 @@ export function* SetAuthLevelFromShopDetails({ payload }) { ); const user = yield select((state) => state.user.currentUser); - // if (payload.features.singleDeviceOnly) { - // if ( - // !( - // user.email.includes("@imex.") || - // user.email.includes("@rome.") || - // user.email.includes("@rometech.") || - // user.email.includes("@promanager.") - // ) - // ) - yield put(setInstanceId(user.uid)); - //} + if (payload.features.singleDeviceOnly) { + if ( + !( + user.email.includes("@imex.") || + user.email.includes("@rome.") || + user.email.includes("@rometech.") || + user.email.includes("@promanager.") + ) + ) + yield put(setInstanceId(user.uid)); + } //For Rome, check to make sure it's not a PM shop. try { From aa4b4998fa3ffe7c4526eb3edbfed63f7d7242a9 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 5 Sep 2024 16:18:49 -0700 Subject: [PATCH 10/14] IO-2904 Production Board Visual Subtotal Signed-off-by: Allan Carr --- .../production-board-kanban-card.component.jsx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/client/src/components/production-board-kanban/production-board-kanban-card.component.jsx b/client/src/components/production-board-kanban/production-board-kanban-card.component.jsx index 798f7f7ec..77e7f3c0d 100644 --- a/client/src/components/production-board-kanban/production-board-kanban-card.component.jsx +++ b/client/src/components/production-board-kanban/production-board-kanban-card.component.jsx @@ -6,11 +6,11 @@ import { PauseCircleOutlined } from "@ant-design/icons"; import { Card, Col, Row, Space, Tooltip } from "antd"; +import Dinero from "dinero.js"; import React, { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; import { DateTimeFormatter } from "../../utils/DateFormatter"; -import Dinero from "dinero.js"; import ProductionAlert from "../production-list-columns/production-list-columns.alert.component"; import ProductionListColumnProductionNote from "../production-list-columns/production-list-columns.productionnote.component"; @@ -18,8 +18,8 @@ import ProductionSubletsManageComponent from "../production-sublets-manage/produ import dayjs from "../../utils/day"; -import OwnerNameDisplay from "../owner-name-display/owner-name-display.component"; import JobPartsQueueCount from "../job-parts-queue-count/job-parts-queue-count.component"; +import OwnerNameDisplay from "../owner-name-display/owner-name-display.component"; const cardColor = (ssbuckets, totalHrs) => { const bucket = ssbuckets.find((bucket) => bucket.gte <= totalHrs && (!bucket.lt || bucket.lt > totalHrs)); @@ -213,21 +213,13 @@ const EstimatorToolTip = ({ metadata, cardSettings }) => { }; const SubtotalTooltip = ({ metadata, cardSettings, t }) => { - const amount = metadata?.job_totals?.totals?.subtotal?.amount; - const dineroAmount = amount ? Dinero({ amount: parseInt(amount * 100) }).toFormat("0,0.00") : null; + const dineroAmount = Dinero(metadata?.job_totals?.totals?.subtotal ?? Dinero()).toFormat(); return ( cardSettings?.subtotal && ( - - {!!amount ? ( - {`${t("production.statistics.currency_symbol")}${dineroAmount}`} - ) : ( -   - )} + + {dineroAmount} ) From c4bab7294757d6d1be340de729cab38489e4b58b Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 5 Sep 2024 16:36:59 -0700 Subject: [PATCH 11/14] DB change to .env Signed-off-by: Allan Carr --- client/.env.development.imex | 4 ++-- client/.env.development.promanager | 4 ++-- client/.env.development.rome | 7 ++++--- hasura/config.yaml | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/client/.env.development.imex b/client/.env.development.imex index b5e6e8f53..2f2d96aaf 100644 --- a/client/.env.development.imex +++ b/client/.env.development.imex @@ -1,5 +1,5 @@ -VITE_APP_GRAPHQL_ENDPOINT=https://db.dev.bodyshop.app/v1/graphql -VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.dev.bodyshop.app/v1/graphql +VITE_APP_GRAPHQL_ENDPOINT=https://db.dev.imex.online/v1/graphql +VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.dev.imex.online/v1/graphql VITE_APP_GA_CODE=231099835 VITE_APP_FIREBASE_CONFIG={"apiKey":"AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc","authDomain":"imex-dev.firebaseapp.com","databaseURL":"https://imex-dev.firebaseio.com","projectId":"imex-dev","storageBucket":"imex-dev.appspot.com","messagingSenderId":"759548147434","appId":"1:759548147434:web:e8239868a48ceb36700993","measurementId":"G-K5XRBVVB4S"} VITE_APP_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/io-test diff --git a/client/.env.development.promanager b/client/.env.development.promanager index 15fa08bce..d870802cc 100644 --- a/client/.env.development.promanager +++ b/client/.env.development.promanager @@ -1,5 +1,5 @@ -VITE_APP_GRAPHQL_ENDPOINT=https://db.dev.bodyshop.app/v1/graphql -VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.dev.bodyshop.app/v1/graphql +VITE_APP_GRAPHQL_ENDPOINT=https://db.dev.imex.online/v1/graphql +VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.dev.imex.online/v1/graphql VITE_APP_GA_CODE=231099835 VITE_APP_FIREBASE_CONFIG={"apiKey":"AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc","authDomain":"imex-dev.firebaseapp.com","databaseURL":"https://imex-dev.firebaseio.com","projectId":"imex-dev","storageBucket":"imex-dev.appspot.com","messagingSenderId":"759548147434","appId":"1:759548147434:web:e8239868a48ceb36700993","measurementId":"G-K5XRBVVB4S"} VITE_APP_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/io-test diff --git a/client/.env.development.rome b/client/.env.development.rome index fce6ec37b..c68088a98 100644 --- a/client/.env.development.rome +++ b/client/.env.development.rome @@ -1,7 +1,8 @@ -VITE_APP_GRAPHQL_ENDPOINT=https://db.dev.bodyshop.app/v1/graphql -VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.dev.bodyshop.app/v1/graphql +VITE_APP_GRAPHQL_ENDPOINT=https://db.dev.imex.online/v1/graphql +VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.dev.imex.online/v1/graphql VITE_APP_GA_CODE=231099835 -VITE_APP_FIREBASE_CONFIG={ "apiKey": "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE", "authDomain": "rome-prod-1.firebaseapp.com", "projectId": "rome-prod-1", "storageBucket": "rome-prod-1.appspot.com", "messagingSenderId": "147786367145", "appId": "1:147786367145:web:9d4cba68071c3f29a8a9b8", "measurementId": "G-G8Z9DRHTZS"} +# VITE_APP_FIREBASE_CONFIG={ "apiKey": "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE", "authDomain": "rome-prod-1.firebaseapp.com", "projectId": "rome-prod-1", "storageBucket": "rome-prod-1.appspot.com", "messagingSenderId": "147786367145", "appId": "1:147786367145:web:9d4cba68071c3f29a8a9b8", "measurementId": "G-G8Z9DRHTZS"} +VITE_APP_FIREBASE_CONFIG={"apiKey":"AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc","authDomain":"imex-dev.firebaseapp.com","databaseURL":"https://imex-dev.firebaseio.com","projectId":"imex-dev","storageBucket":"imex-dev.appspot.com","messagingSenderId":"759548147434","appId":"1:759548147434:web:e8239868a48ceb36700993","measurementId":"G-K5XRBVVB4S"} VITE_APP_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/io-test VITE_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/io-test VITE_APP_CLOUDINARY_API_KEY=957865933348715 diff --git a/hasura/config.yaml b/hasura/config.yaml index fe93f9198..0a62aa7a2 100644 --- a/hasura/config.yaml +++ b/hasura/config.yaml @@ -1,5 +1,5 @@ version: 2 -endpoint: https://db.dev.bodyshop.app +endpoint: https://db.dev.imex.online admin_secret: Dev-BodyShopApp! metadata_directory: metadata actions: From 1f2040d97ceee73714ad2da60a3a0f2ea3e8ecbe Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 6 Sep 2024 13:32:48 -0700 Subject: [PATCH 12/14] IO-2907 Updated CI to update Jira #1. --- .circleci/config.yml | 66 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a902a03b3..cd54e727e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,6 +5,7 @@ orbs: aws-s3: circleci/aws-s3@4.0.0 aws-cli: circleci/aws-cli@4.0 eb: circleci/aws-elastic-beanstalk@2.0.1 + jira: circleci/jira@2.1.0 jobs: imex-api-deploy: docker: @@ -18,6 +19,11 @@ jobs: eb status --verbose eb deploy eb status + - jira/notify: + environment: Production (ImEX) - API + environment_type: production + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> imex-hasura-migrate: docker: @@ -37,7 +43,11 @@ jobs: hasura migrate apply --endpoint https://db.imex.online/ --admin-secret << parameters.secret >> hasura metadata apply --endpoint https://db.imex.online/ --admin-secret << parameters.secret >> hasura metadata reload --endpoint https://db.imex.online/ --admin-secret << parameters.secret >> - + - jira/notify: + environment: Production (ImEX) - Hasura + environment_type: production + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> imex-app-build: docker: - image: cimg/node:18.18.2 @@ -62,6 +72,7 @@ jobs: to: "s3://imex-online-production/" arguments: "--exclude '*.map'" + imex-app-beta-build: docker: - image: cimg/node:18.18.2 @@ -86,6 +97,11 @@ jobs: from: dist to: "s3://imex-online-beta/" arguments: "--exclude '*.map'" + - jira/notify: + environment: Production (ImEX) - Front End + environment_type: production + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> rome-api-deploy: docker: @@ -99,7 +115,11 @@ jobs: eb status --verbose eb deploy eb status - + - jira/notify: + environment: Production (Rome) - API + environment_type: production + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> rome-hasura-migrate: docker: - image: cimg/node:18.18.2 @@ -118,7 +138,11 @@ jobs: hasura migrate apply --endpoint https://db.romeonline.io/ --admin-secret << parameters.secret >> hasura metadata apply --endpoint https://db.romeonline.io/ --admin-secret << parameters.secret >> hasura metadata reload --endpoint https://db.romeonline.io/ --admin-secret << parameters.secret >> - + - jira/notify: + environment: Production (Rome) - Hasura + environment_type: production + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> rome-app-build: docker: - image: cimg/node:18.18.2 @@ -143,6 +167,11 @@ jobs: from: dist to: "s3://rome-online-production/" arguments: "--exclude '*.map'" + - jira/notify: + environment: Production (Rome) - Front End + environment_type: production + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> promanager-app-build: docker: @@ -168,6 +197,11 @@ jobs: from: dist to: "s3://promanager-production/" arguments: "--exclude '*.map'" + - jira/notify: + environment: Production (ProManager) - Front End + environment_type: production + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> test-rome-hasura-migrate: docker: @@ -187,6 +221,11 @@ jobs: hasura migrate apply --endpoint https://db.test.romeonline.io/ --admin-secret << parameters.secret >> hasura metadata apply --endpoint https://db.test.romeonline.io/ --admin-secret << parameters.secret >> hasura metadata reload --endpoint https://db.test.romeonline.io/ --admin-secret << parameters.secret >> + - jira/notify: + environment: Test (Rome) - Hasura + environment_type: testing + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> test-rome-app-build: docker: @@ -212,6 +251,11 @@ jobs: from: dist to: "s3://rome-online-test/" arguments: "--exclude '*.map'" + - jira/notify: + environment: Test (Rome) - Front End + environment_type: testing + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> test-promanager-app-build: docker: @@ -237,6 +281,11 @@ jobs: from: dist to: "s3://promanager-testing/" arguments: "--exclude '*.map'" + - jira/notify: + environment: Test (ProManager) - Front End + environment_type: testing + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> test-hasura-migrate: docker: @@ -256,6 +305,11 @@ jobs: hasura migrate apply --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >> hasura metadata apply --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >> hasura metadata reload --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >> + - jira/notify: + environment: Test (ImEX) - Hasura + environment_type: testing + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> imex-test-app-build: docker: @@ -302,7 +356,11 @@ jobs: from: dist to: "s3://imex-online-test-beta/" arguments: "--exclude '*.map'" - + - jira/notify: + environment: Test (ImEX) - Front End + environment_type: testing + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> admin-app-build: docker: From 2701bbd501682dd3bc6d74ce1a4a1b91c582cc82 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 6 Sep 2024 13:43:58 -0700 Subject: [PATCH 13/14] IO-2907 Resolve Hasura on CI and improve Jira notify. --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cd54e727e..49be77599 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,7 +39,7 @@ jobs: - run: name: Execute migration command: | - npm install hasura-cli -g + curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash hasura migrate apply --endpoint https://db.imex.online/ --admin-secret << parameters.secret >> hasura metadata apply --endpoint https://db.imex.online/ --admin-secret << parameters.secret >> hasura metadata reload --endpoint https://db.imex.online/ --admin-secret << parameters.secret >> @@ -134,7 +134,7 @@ jobs: - run: name: Execute migration command: | - npm install hasura-cli -g + curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash hasura migrate apply --endpoint https://db.romeonline.io/ --admin-secret << parameters.secret >> hasura metadata apply --endpoint https://db.romeonline.io/ --admin-secret << parameters.secret >> hasura metadata reload --endpoint https://db.romeonline.io/ --admin-secret << parameters.secret >> @@ -217,7 +217,7 @@ jobs: - run: name: Execute migration command: | - npm install hasura-cli -g + curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash hasura migrate apply --endpoint https://db.test.romeonline.io/ --admin-secret << parameters.secret >> hasura metadata apply --endpoint https://db.test.romeonline.io/ --admin-secret << parameters.secret >> hasura metadata reload --endpoint https://db.test.romeonline.io/ --admin-secret << parameters.secret >> @@ -301,7 +301,7 @@ jobs: - run: name: Execute migration command: | - npm install hasura-cli -g + curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash hasura migrate apply --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >> hasura metadata apply --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >> hasura metadata reload --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >> From bc6f05acbc0467487477d9da7650fa1f5d677a38 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 6 Sep 2024 13:55:53 -0700 Subject: [PATCH 14/14] IO-2907 change CI step to deploy instead of build --- .circleci/config.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 49be77599..4f35873a2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,6 +22,7 @@ jobs: - jira/notify: environment: Production (ImEX) - API environment_type: production + job_type: deployment pipeline_id: << pipeline.id >> pipeline_number: << pipeline.number >> @@ -47,6 +48,7 @@ jobs: environment: Production (ImEX) - Hasura environment_type: production pipeline_id: << pipeline.id >> + job_type: deployment pipeline_number: << pipeline.number >> imex-app-build: docker: @@ -101,6 +103,7 @@ jobs: environment: Production (ImEX) - Front End environment_type: production pipeline_id: << pipeline.id >> + job_type: deployment pipeline_number: << pipeline.number >> rome-api-deploy: @@ -119,6 +122,7 @@ jobs: environment: Production (Rome) - API environment_type: production pipeline_id: << pipeline.id >> + job_type: deployment pipeline_number: << pipeline.number >> rome-hasura-migrate: docker: @@ -142,6 +146,7 @@ jobs: environment: Production (Rome) - Hasura environment_type: production pipeline_id: << pipeline.id >> + job_type: deployment pipeline_number: << pipeline.number >> rome-app-build: docker: @@ -171,6 +176,7 @@ jobs: environment: Production (Rome) - Front End environment_type: production pipeline_id: << pipeline.id >> + job_type: deployment pipeline_number: << pipeline.number >> promanager-app-build: @@ -201,6 +207,7 @@ jobs: environment: Production (ProManager) - Front End environment_type: production pipeline_id: << pipeline.id >> + job_type: deployment pipeline_number: << pipeline.number >> test-rome-hasura-migrate: @@ -225,6 +232,7 @@ jobs: environment: Test (Rome) - Hasura environment_type: testing pipeline_id: << pipeline.id >> + job_type: deployment pipeline_number: << pipeline.number >> test-rome-app-build: @@ -255,6 +263,7 @@ jobs: environment: Test (Rome) - Front End environment_type: testing pipeline_id: << pipeline.id >> + job_type: deployment pipeline_number: << pipeline.number >> test-promanager-app-build: @@ -285,6 +294,7 @@ jobs: environment: Test (ProManager) - Front End environment_type: testing pipeline_id: << pipeline.id >> + job_type: deployment pipeline_number: << pipeline.number >> test-hasura-migrate: @@ -309,6 +319,7 @@ jobs: environment: Test (ImEX) - Hasura environment_type: testing pipeline_id: << pipeline.id >> + job_type: deployment pipeline_number: << pipeline.number >> imex-test-app-build: @@ -360,6 +371,7 @@ jobs: environment: Test (ImEX) - Front End environment_type: testing pipeline_id: << pipeline.id >> + job_type: deployment pipeline_number: << pipeline.number >> admin-app-build: