diff --git a/.circleci/config.yml b/.circleci/config.yml index a902a03b3..4f35873a2 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,12 @@ jobs: eb status --verbose eb deploy eb status + - jira/notify: + environment: Production (ImEX) - API + environment_type: production + job_type: deployment + pipeline_id: << pipeline.id >> + pipeline_number: << pipeline.number >> imex-hasura-migrate: docker: @@ -33,11 +40,16 @@ 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 >> - + - jira/notify: + environment: Production (ImEX) - Hasura + environment_type: production + pipeline_id: << pipeline.id >> + job_type: deployment + pipeline_number: << pipeline.number >> imex-app-build: docker: - image: cimg/node:18.18.2 @@ -62,6 +74,7 @@ jobs: to: "s3://imex-online-production/" arguments: "--exclude '*.map'" + imex-app-beta-build: docker: - image: cimg/node:18.18.2 @@ -86,6 +99,12 @@ 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 >> + job_type: deployment + pipeline_number: << pipeline.number >> rome-api-deploy: docker: @@ -99,7 +118,12 @@ jobs: eb status --verbose eb deploy eb status - + - jira/notify: + environment: Production (Rome) - API + environment_type: production + pipeline_id: << pipeline.id >> + job_type: deployment + pipeline_number: << pipeline.number >> rome-hasura-migrate: docker: - image: cimg/node:18.18.2 @@ -114,11 +138,16 @@ 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 >> - + - jira/notify: + environment: Production (Rome) - Hasura + environment_type: production + pipeline_id: << pipeline.id >> + job_type: deployment + pipeline_number: << pipeline.number >> rome-app-build: docker: - image: cimg/node:18.18.2 @@ -143,6 +172,12 @@ 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 >> + job_type: deployment + pipeline_number: << pipeline.number >> promanager-app-build: docker: @@ -168,6 +203,12 @@ jobs: from: dist to: "s3://promanager-production/" arguments: "--exclude '*.map'" + - jira/notify: + environment: Production (ProManager) - Front End + environment_type: production + pipeline_id: << pipeline.id >> + job_type: deployment + pipeline_number: << pipeline.number >> test-rome-hasura-migrate: docker: @@ -183,10 +224,16 @@ 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 >> + - jira/notify: + environment: Test (Rome) - Hasura + environment_type: testing + pipeline_id: << pipeline.id >> + job_type: deployment + pipeline_number: << pipeline.number >> test-rome-app-build: docker: @@ -212,6 +259,12 @@ 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 >> + job_type: deployment + pipeline_number: << pipeline.number >> test-promanager-app-build: docker: @@ -237,6 +290,12 @@ jobs: from: dist to: "s3://promanager-testing/" arguments: "--exclude '*.map'" + - jira/notify: + environment: Test (ProManager) - Front End + environment_type: testing + pipeline_id: << pipeline.id >> + job_type: deployment + pipeline_number: << pipeline.number >> test-hasura-migrate: docker: @@ -252,10 +311,16 @@ 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 >> + - jira/notify: + environment: Test (ImEX) - Hasura + environment_type: testing + pipeline_id: << pipeline.id >> + job_type: deployment + pipeline_number: << pipeline.number >> imex-test-app-build: docker: @@ -302,7 +367,12 @@ 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 >> + job_type: deployment + pipeline_number: << pipeline.number >> admin-app-build: docker: 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/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/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 && (