From 480cdb9b28fdc02bde5a913a316312a95158d1ba Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Mon, 7 Nov 2022 15:58:30 -0800
Subject: [PATCH 1/2] updated GIT and circle CI messages.
---
.circleci/config.yml | 171 +++++++++++++++++++++++++++++++++++++++++++
.gitignore | 4 +-
2 files changed, 174 insertions(+), 1 deletion(-)
create mode 100644 .circleci/config.yml
diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 000000000..5e5391ce6
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,171 @@
+version: 2.1
+orbs:
+ #snyk: snyk/snyk@0.0.8
+ #cypress: cypress-io/cypress@1.23.0
+ aws-s3: circleci/aws-s3@2.0.0
+ eb: circleci/aws-elastic-beanstalk@1.0.2
+ jira: circleci/jira@1.3.1
+jobs:
+ api-deploy:
+ docker:
+ - image: "cimg/base:stable"
+ steps:
+ - checkout
+ - eb/setup
+ - run:
+ command: |
+ eb init imex-online-production-api -r ca-central-1 -p "Node.js 16 running on 64bit Amazon Linux 2"
+ eb status --verbose
+ eb deploy
+ eb status
+ - jira/notify
+
+ hasura-migrate:
+ docker:
+ - image: cimg/node:16.15.0
+
+ working_directory: ~/repo/hasura
+ steps:
+ - checkout:
+ path: ~/repo
+ - run:
+ name: Execute migration
+ command: |
+ npm install hasura-cli -g
+ hasura migrate apply --endpoint https://db.imex.online/ --admin-secret $HASURA_PROD_SECRET
+ hasura metadata apply --endpoint https://db.imex.online/ --admin-secret $HASURA_PROD_SECRET
+ hasura metadata reload --endpoint https://db.imex.online/ --admin-secret $HASURA_PROD_SECRET
+
+ app-build:
+ docker:
+ - image: cimg/node:16.15.0
+
+ working_directory: ~/repo/client
+
+ steps:
+ - checkout:
+ path: ~/repo
+
+ - restore_cache:
+ name: Restore Yarn Package Cache
+ keys:
+ - yarn-packages-{{ checksum "yarn.lock" }}
+ - run:
+ name: Install Dependencies
+ command: yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
+ - save_cache:
+ name: Save Yarn Package Cache
+ key: yarn-packages-{{ checksum "yarn.lock" }}
+ paths:
+ - ~/.cache/yarn
+
+ - run: yarn run build
+
+ - aws-s3/sync:
+ from: build
+ to: "s3://imex-online-production/"
+ - jira/notify
+
+ test-hasura-migrate:
+ docker:
+ - image: cimg/node:16.15.0
+
+ working_directory: ~/repo/hasura
+ steps:
+ - checkout:
+ path: ~/repo
+ - run:
+ name: Execute migration
+ command: |
+ npm install hasura-cli -g
+ hasura migrate apply --endpoint https://db.test.bodyshop.app/ --admin-secret $HASURA_TEST_SECRET
+ hasura metadata apply --endpoint https://db.test.bodyshop.app/ --admin-secret $HASURA_TEST_SECRET
+ hasura metadata reload --endpoint https://db.test.bodyshop.app/ --admin-secret $HASURA_TEST_SECRET
+
+ test-app-build:
+ docker:
+ - image: cimg/node:16.15.0
+
+ working_directory: ~/repo/client
+
+ steps:
+ - checkout:
+ path: ~/repo
+
+ - restore_cache:
+ name: Restore Yarn Package Cache
+ keys:
+ - yarn-packages-{{ checksum "yarn.lock" }}
+ - run:
+ name: Install Dependencies
+ command: yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
+ - save_cache:
+ name: Save Yarn Package Cache
+ key: yarn-packages-{{ checksum "yarn.lock" }}
+ paths:
+ - ~/.cache/yarn
+
+ - run: yarn run build:test
+
+ - aws-s3/sync:
+ from: build
+ to: "s3://imex-online-test/"
+ - jira/notify
+
+ admin-app-build:
+ docker:
+ - image: cimg/node:16.15.0
+
+ working_directory: ~/repo/admin
+
+ steps:
+ - checkout:
+ path: ~/repo
+
+ - restore_cache:
+ keys:
+ - v1-dependencies-{{ checksum "package.json" }}
+ # fallback to using the latest cache if no exact match is found
+ - v1-dependencies-
+ - run: npm i
+
+ - save_cache:
+ paths:
+ - node_modules
+ - ~/.npm
+ - ~/.cache
+ key: v1-dependencies-{{ checksum "package.json" }}
+
+ - run: npm run build
+
+ - aws-s3/sync:
+ from: build
+ to: "s3://adm.imex.online/"
+
+workflows:
+ deploy_and_build:
+ jobs:
+ - api-deploy:
+ filters:
+ branches:
+ only: master
+ - app-build:
+ filters:
+ branches:
+ only: master
+ - hasura-migrate:
+ filters:
+ branches:
+ only: master
+ - test-app-build:
+ filters:
+ branches:
+ only: test
+ - test-hasura-migrate:
+ filters:
+ branches:
+ only: test
+ #- admin-app-build:
+ #filters:
+ #branches:
+ #only: master
diff --git a/.gitignore b/.gitignore
index 3fbb87926..2175cc7a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -115,4 +115,6 @@ firebase/.env
logs/oAuthClient-log.log
-.node-persist/**
\ No newline at end of file
+.node-persist/**
+
+*.env.*
\ No newline at end of file
From 5a12738da5a8abac3a07a8e8dfe9a148b85a7e6a Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Tue, 8 Nov 2022 10:01:40 -0800
Subject: [PATCH 2/2] IO-2096 Add Cycle Time Analysis report
---
bodyshop_translations.babel | 21 +++++++++++++++++++++
client/src/translations/en_us/common.json | 1 +
client/src/translations/es/common.json | 1 +
client/src/translations/fr/common.json | 1 +
client/src/utils/TemplateConstants.js | 12 ++++++++++++
5 files changed, 36 insertions(+)
diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index 999c45344..f311d7e00 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -40455,6 +40455,27 @@
+
+ cycle_time_analysis
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
estimates_written_converted
false
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 6cc02bf35..430e8b3c4 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -2403,6 +2403,7 @@
"credits_not_received_date": "Credits not Received by Date",
"credits_not_received_date_vendorid": "Credits not Received by Vendor",
"csi": "CSI Responses",
+ "cycle_time_analysis": "Cycle Time Analysis",
"estimates_written_converted": "Estimates Written/Converted",
"estimator_detail": "Jobs by Estimator (Detail)",
"estimator_summary": "Jobs by Estimator (Summary)",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 992fd6c3b..6e7454cd0 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -2403,6 +2403,7 @@
"credits_not_received_date": "",
"credits_not_received_date_vendorid": "",
"csi": "",
+ "cycle_time_analysis": "",
"estimates_written_converted": "",
"estimator_detail": "",
"estimator_summary": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 9aea7d71f..683b09f2c 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -2403,6 +2403,7 @@
"credits_not_received_date": "",
"credits_not_received_date_vendorid": "",
"csi": "",
+ "cycle_time_analysis": "",
"estimates_written_converted": "",
"estimator_detail": "",
"estimator_summary": "",
diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js
index 78ee830cd..ed6ea6a6b 100644
--- a/client/src/utils/TemplateConstants.js
+++ b/client/src/utils/TemplateConstants.js
@@ -1682,6 +1682,18 @@ export const TemplateList = (type, context) => {
},
group: "sales",
},
+ cycle_time_analysis: {
+ title: i18n.t("reportcenter.templates.cycle_time_analysis"),
+ subject: i18n.t("reportcenter.templates.cycle_time_analysis"),
+ key: "cycle_time_analysis",
+ //idtype: "vendor",
+ disabled: false,
+ rangeFilter: {
+ object: i18n.t("reportcenter.labels.objects.jobs"),
+ field: i18n.t("jobs.fields.actual_completion"),
+ },
+ group: "job",
+ },
}
: {}),
...(!type || type === "courtesycarcontract"