Compare commits
46 Commits
feature/IO
...
feature/IO
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9aa1279144 | ||
|
|
fd9a51209f | ||
|
|
4dfb020089 | ||
|
|
bc6f05acbc | ||
|
|
2701bbd501 | ||
|
|
1f2040d97c | ||
|
|
43963a3e91 | ||
|
|
4287311adb | ||
|
|
d0e8589a76 | ||
|
|
c4bab72947 | ||
|
|
aa4b4998fa | ||
|
|
ed4566e00f | ||
|
|
5c2cdfe16c | ||
|
|
12c75357b5 | ||
|
|
d40f3ee45a | ||
|
|
96a0def846 | ||
|
|
1fd595d0de | ||
|
|
52cf4f3d1f | ||
|
|
4d9be1d232 | ||
|
|
fb2bc20b4f | ||
|
|
744593e96a | ||
|
|
1e9308be9b | ||
|
|
411605e121 | ||
|
|
1da8d6abb3 | ||
|
|
cdcef798df | ||
|
|
f7207a9f3f | ||
|
|
7a54b55bd4 | ||
|
|
991dfc2ad5 | ||
|
|
718c8291a8 | ||
|
|
f1e84c348b | ||
|
|
5f513a8bef | ||
|
|
4b96d5a707 | ||
|
|
220f3d4410 | ||
|
|
841f62bd84 | ||
|
|
91e2e7931b | ||
|
|
3c6faf8473 | ||
|
|
c994eaaa8e | ||
|
|
517d8f4163 | ||
|
|
9deb2964a5 | ||
|
|
9cf9f8b844 | ||
|
|
ad46ea74c0 | ||
|
|
2a28855e4b | ||
|
|
8d25f60097 | ||
|
|
982a51f16e | ||
|
|
68d02648d7 | ||
|
|
89d5b1cfe4 |
@@ -5,6 +5,7 @@ orbs:
|
|||||||
aws-s3: circleci/aws-s3@4.0.0
|
aws-s3: circleci/aws-s3@4.0.0
|
||||||
aws-cli: circleci/aws-cli@4.0
|
aws-cli: circleci/aws-cli@4.0
|
||||||
eb: circleci/aws-elastic-beanstalk@2.0.1
|
eb: circleci/aws-elastic-beanstalk@2.0.1
|
||||||
|
jira: circleci/jira@2.1.0
|
||||||
jobs:
|
jobs:
|
||||||
imex-api-deploy:
|
imex-api-deploy:
|
||||||
docker:
|
docker:
|
||||||
@@ -18,6 +19,12 @@ jobs:
|
|||||||
eb status --verbose
|
eb status --verbose
|
||||||
eb deploy
|
eb deploy
|
||||||
eb status
|
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:
|
imex-hasura-migrate:
|
||||||
docker:
|
docker:
|
||||||
@@ -33,11 +40,16 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Execute migration
|
name: Execute migration
|
||||||
command: |
|
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 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 apply --endpoint https://db.imex.online/ --admin-secret << parameters.secret >>
|
||||||
hasura metadata reload --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:
|
imex-app-build:
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/node:18.18.2
|
- image: cimg/node:18.18.2
|
||||||
@@ -62,6 +74,7 @@ jobs:
|
|||||||
to: "s3://imex-online-production/"
|
to: "s3://imex-online-production/"
|
||||||
arguments: "--exclude '*.map'"
|
arguments: "--exclude '*.map'"
|
||||||
|
|
||||||
|
|
||||||
imex-app-beta-build:
|
imex-app-beta-build:
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/node:18.18.2
|
- image: cimg/node:18.18.2
|
||||||
@@ -86,6 +99,12 @@ jobs:
|
|||||||
from: dist
|
from: dist
|
||||||
to: "s3://imex-online-beta/"
|
to: "s3://imex-online-beta/"
|
||||||
arguments: "--exclude '*.map'"
|
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:
|
rome-api-deploy:
|
||||||
docker:
|
docker:
|
||||||
@@ -99,7 +118,12 @@ jobs:
|
|||||||
eb status --verbose
|
eb status --verbose
|
||||||
eb deploy
|
eb deploy
|
||||||
eb status
|
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:
|
rome-hasura-migrate:
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/node:18.18.2
|
- image: cimg/node:18.18.2
|
||||||
@@ -114,11 +138,16 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Execute migration
|
name: Execute migration
|
||||||
command: |
|
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 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 apply --endpoint https://db.romeonline.io/ --admin-secret << parameters.secret >>
|
||||||
hasura metadata reload --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:
|
rome-app-build:
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/node:18.18.2
|
- image: cimg/node:18.18.2
|
||||||
@@ -143,6 +172,12 @@ jobs:
|
|||||||
from: dist
|
from: dist
|
||||||
to: "s3://rome-online-production/"
|
to: "s3://rome-online-production/"
|
||||||
arguments: "--exclude '*.map'"
|
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:
|
promanager-app-build:
|
||||||
docker:
|
docker:
|
||||||
@@ -168,6 +203,12 @@ jobs:
|
|||||||
from: dist
|
from: dist
|
||||||
to: "s3://promanager-production/"
|
to: "s3://promanager-production/"
|
||||||
arguments: "--exclude '*.map'"
|
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:
|
test-rome-hasura-migrate:
|
||||||
docker:
|
docker:
|
||||||
@@ -183,10 +224,16 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Execute migration
|
name: Execute migration
|
||||||
command: |
|
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 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 apply --endpoint https://db.test.romeonline.io/ --admin-secret << parameters.secret >>
|
||||||
hasura metadata reload --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:
|
test-rome-app-build:
|
||||||
docker:
|
docker:
|
||||||
@@ -212,6 +259,12 @@ jobs:
|
|||||||
from: dist
|
from: dist
|
||||||
to: "s3://rome-online-test/"
|
to: "s3://rome-online-test/"
|
||||||
arguments: "--exclude '*.map'"
|
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:
|
test-promanager-app-build:
|
||||||
docker:
|
docker:
|
||||||
@@ -237,6 +290,12 @@ jobs:
|
|||||||
from: dist
|
from: dist
|
||||||
to: "s3://promanager-testing/"
|
to: "s3://promanager-testing/"
|
||||||
arguments: "--exclude '*.map'"
|
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:
|
test-hasura-migrate:
|
||||||
docker:
|
docker:
|
||||||
@@ -252,10 +311,16 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Execute migration
|
name: Execute migration
|
||||||
command: |
|
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 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 apply --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >>
|
||||||
hasura metadata reload --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:
|
imex-test-app-build:
|
||||||
docker:
|
docker:
|
||||||
@@ -302,7 +367,12 @@ jobs:
|
|||||||
from: dist
|
from: dist
|
||||||
to: "s3://imex-online-test-beta/"
|
to: "s3://imex-online-test-beta/"
|
||||||
arguments: "--exclude '*.map'"
|
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:
|
admin-app-build:
|
||||||
docker:
|
docker:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
VITE_APP_GRAPHQL_ENDPOINT=https://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.bodyshop.app/v1/graphql
|
VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.dev.imex.online/v1/graphql
|
||||||
VITE_APP_GA_CODE=231099835
|
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_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_API=https://api.cloudinary.com/v1_1/io-test
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
VITE_APP_GRAPHQL_ENDPOINT=https://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.bodyshop.app/v1/graphql
|
VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.dev.imex.online/v1/graphql
|
||||||
VITE_APP_GA_CODE=231099835
|
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_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_API=https://api.cloudinary.com/v1_1/io-test
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
VITE_APP_GRAPHQL_ENDPOINT=https://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.bodyshop.app/v1/graphql
|
VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.dev.imex.online/v1/graphql
|
||||||
VITE_APP_GA_CODE=231099835
|
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_API=https://api.cloudinary.com/v1_1/io-test
|
||||||
VITE_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/io-test
|
VITE_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/io-test
|
||||||
VITE_APP_CLOUDINARY_API_KEY=957865933348715
|
VITE_APP_CLOUDINARY_API_KEY=957865933348715
|
||||||
|
|||||||
4
client/package-lock.json
generated
4
client/package-lock.json
generated
@@ -109,7 +109,8 @@
|
|||||||
"vite-plugin-legacy": "^2.1.0",
|
"vite-plugin-legacy": "^2.1.0",
|
||||||
"vite-plugin-node-polyfills": "^0.22.0",
|
"vite-plugin-node-polyfills": "^0.22.0",
|
||||||
"vite-plugin-pwa": "^0.20.1",
|
"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": {
|
"engines": {
|
||||||
"node": ">=18.18.2"
|
"node": ">=18.18.2"
|
||||||
@@ -18429,6 +18430,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-7.1.0.tgz",
|
||||||
"integrity": "sha512-ZHeROyqR+AS5UPzholQRDttLFqGMwP0Np8MKWAdyxsDETxq3qOAyXvqessc3GniohG6e0mAqSQyKOHmT8zPF7g==",
|
"integrity": "sha512-ZHeROyqR+AS5UPzholQRDttLFqGMwP0Np8MKWAdyxsDETxq3qOAyXvqessc3GniohG6e0mAqSQyKOHmT8zPF7g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/trusted-types": "^2.0.2",
|
"@types/trusted-types": "^2.0.2",
|
||||||
"workbox-core": "7.1.0"
|
"workbox-core": "7.1.0"
|
||||||
|
|||||||
@@ -153,6 +153,7 @@
|
|||||||
"vite-plugin-legacy": "^2.1.0",
|
"vite-plugin-legacy": "^2.1.0",
|
||||||
"vite-plugin-node-polyfills": "^0.22.0",
|
"vite-plugin-node-polyfills": "^0.22.0",
|
||||||
"vite-plugin-pwa": "^0.20.1",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ import {
|
|||||||
PauseCircleOutlined
|
PauseCircleOutlined
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { Card, Col, Row, Space, Tooltip } from "antd";
|
import { Card, Col, Row, Space, Tooltip } from "antd";
|
||||||
|
import Dinero from "dinero.js";
|
||||||
import React, { useMemo } from "react";
|
import React, { useMemo } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||||
import Dinero from "dinero.js";
|
|
||||||
|
|
||||||
import ProductionAlert from "../production-list-columns/production-list-columns.alert.component";
|
import ProductionAlert from "../production-list-columns/production-list-columns.alert.component";
|
||||||
import ProductionListColumnProductionNote from "../production-list-columns/production-list-columns.productionnote.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 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 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 cardColor = (ssbuckets, totalHrs) => {
|
||||||
const bucket = ssbuckets.find((bucket) => bucket.gte <= totalHrs && (!bucket.lt || bucket.lt > 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 SubtotalTooltip = ({ metadata, cardSettings, t }) => {
|
||||||
const amount = metadata?.job_totals?.totals?.subtotal?.amount;
|
const dineroAmount = Dinero(metadata?.job_totals?.totals?.subtotal ?? Dinero()).toFormat();
|
||||||
const dineroAmount = amount ? Dinero({ amount: parseInt(amount * 100) }).toFormat("0,0.00") : null;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
cardSettings?.subtotal && (
|
cardSettings?.subtotal && (
|
||||||
<Col span={cardSettings.compact ? 24 : 12}>
|
<Col span={cardSettings.compact ? 24 : 12}>
|
||||||
<EllipsesToolTip
|
<EllipsesToolTip title={`${dineroAmount}`} kiosk={cardSettings.kiosk}>
|
||||||
title={!!amount ? `${t("production.statistics.currency_symbol")}${dineroAmount}` : null}
|
{dineroAmount}
|
||||||
kiosk={cardSettings.kiosk}
|
|
||||||
>
|
|
||||||
{!!amount ? (
|
|
||||||
<span>{`${t("production.statistics.currency_symbol")}${dineroAmount}`}</span>
|
|
||||||
) : (
|
|
||||||
<span> </span>
|
|
||||||
)}
|
|
||||||
</EllipsesToolTip>
|
</EllipsesToolTip>
|
||||||
</Col>
|
</Col>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { Card, Statistic } from "antd";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { defaultKanbanSettings, statisticsItems } from "./settings/defaultKanbanSettings.js";
|
import { defaultKanbanSettings, statisticsItems } from "./settings/defaultKanbanSettings.js";
|
||||||
|
import Dinero from "dinero.js";
|
||||||
|
|
||||||
export const StatisticType = {
|
export const StatisticType = {
|
||||||
HOURS: "hours",
|
HOURS: "hours",
|
||||||
@@ -32,7 +33,21 @@ const ProductionStatistics = ({ data, cardSettings, reducerData }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const calculateTotalAmount = (items, key) => {
|
const calculateTotalAmount = (items, key) => {
|
||||||
return items.reduce((acc, item) => acc + (item[key]?.totals?.subtotal?.amount || 0), 0);
|
return items.reduce((acc, item) => acc.add(Dinero(item[key]?.totals?.subtotal ?? Dinero())), Dinero({ amount: 0 }));
|
||||||
|
};
|
||||||
|
|
||||||
|
const calculateReducerTotalAmount = (lanes, key) => {
|
||||||
|
return lanes.reduce(
|
||||||
|
(acc, lane) => {
|
||||||
|
return acc.add(
|
||||||
|
lane.cards.reduce(
|
||||||
|
(laneAcc, card) => laneAcc.add(Dinero(card.metadata[key]?.totals?.subtotal ?? Dinero())),
|
||||||
|
Dinero({ amount: 0 })
|
||||||
|
)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
Dinero({ amount: 0 })
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const calculateReducerTotal = (lanes, key, subKey) => {
|
const calculateReducerTotal = (lanes, key, subKey) => {
|
||||||
@@ -43,14 +58,6 @@ const ProductionStatistics = ({ data, cardSettings, reducerData }) => {
|
|||||||
}, 0);
|
}, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const calculateReducerTotalAmount = (lanes, key) => {
|
|
||||||
return lanes.reduce((acc, lane) => {
|
|
||||||
return (
|
|
||||||
acc + lane.cards.reduce((laneAcc, card) => laneAcc + (card.metadata[key]?.totals?.subtotal?.amount || 0), 0)
|
|
||||||
);
|
|
||||||
}, 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
const formatValue = (value, type) => {
|
const formatValue = (value, type) => {
|
||||||
if (type === StatisticType.JOBS) {
|
if (type === StatisticType.JOBS) {
|
||||||
return value.toFixed(0);
|
return value.toFixed(0);
|
||||||
@@ -87,9 +94,15 @@ const ProductionStatistics = ({ data, cardSettings, reducerData }) => {
|
|||||||
const totalAmountInProduction = useMemo(() => {
|
const totalAmountInProduction = useMemo(() => {
|
||||||
if (!cardSettings.totalAmountInProduction) return null;
|
if (!cardSettings.totalAmountInProduction) return null;
|
||||||
const total = calculateTotalAmount(data, "job_totals");
|
const total = calculateTotalAmount(data, "job_totals");
|
||||||
return parseFloat(total.toFixed(2));
|
return total.toFormat("$0,0.00");
|
||||||
}, [data, cardSettings.totalAmountInProduction]);
|
}, [data, cardSettings.totalAmountInProduction]);
|
||||||
|
|
||||||
|
const totalAmountOnBoard = useMemo(() => {
|
||||||
|
if (!reducerData || !cardSettings.totalAmountOnBoard) return null;
|
||||||
|
const total = calculateReducerTotalAmount(reducerData.lanes, "job_totals");
|
||||||
|
return total.toFormat("$0,0.00");
|
||||||
|
}, [reducerData, cardSettings.totalAmountOnBoard]);
|
||||||
|
|
||||||
const totalHrsOnBoard = useMemo(() => {
|
const totalHrsOnBoard = useMemo(() => {
|
||||||
if (!reducerData || !cardSettings.totalHrsOnBoard) return null;
|
if (!reducerData || !cardSettings.totalHrsOnBoard) return null;
|
||||||
const total =
|
const total =
|
||||||
@@ -118,12 +131,6 @@ const ProductionStatistics = ({ data, cardSettings, reducerData }) => {
|
|||||||
[reducerData, cardSettings.jobsOnBoard]
|
[reducerData, cardSettings.jobsOnBoard]
|
||||||
);
|
);
|
||||||
|
|
||||||
const totalAmountOnBoard = useMemo(() => {
|
|
||||||
if (!reducerData || !cardSettings.totalAmountOnBoard) return null;
|
|
||||||
const total = calculateReducerTotalAmount(reducerData.lanes, "job_totals");
|
|
||||||
return parseFloat(total.toFixed(2));
|
|
||||||
}, [reducerData, cardSettings.totalAmountOnBoard]);
|
|
||||||
|
|
||||||
const tasksInProduction = useMemo(() => {
|
const tasksInProduction = useMemo(() => {
|
||||||
if (!data || !cardSettings.tasksInProduction) return null;
|
if (!data || !cardSettings.tasksInProduction) return null;
|
||||||
return data.reduce((acc, item) => acc + (item.tasks_aggregate?.aggregate?.count || 0), 0);
|
return data.reduce((acc, item) => acc + (item.tasks_aggregate?.aggregate?.count || 0), 0);
|
||||||
@@ -191,7 +198,6 @@ const ProductionStatistics = ({ data, cardSettings, reducerData }) => {
|
|||||||
<Statistic
|
<Statistic
|
||||||
title={t(`production.statistics.${stat.label}`)}
|
title={t(`production.statistics.${stat.label}`)}
|
||||||
value={formatValue(stat.value, stat.type)}
|
value={formatValue(stat.value, stat.type)}
|
||||||
prefix={stat.type === StatisticType.AMOUNT ? t("production.statistics.currency_symbol") : undefined}
|
|
||||||
suffix={
|
suffix={
|
||||||
stat.type === StatisticType.HOURS
|
stat.type === StatisticType.HOURS
|
||||||
? t("production.statistics.hours")
|
? t("production.statistics.hours")
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
import React, { useEffect, useMemo, useRef, useState } from "react";
|
import { SyncOutlined } from "@ant-design/icons";
|
||||||
import { Button, Dropdown, Input, Space, Statistic, Table } from "antd";
|
|
||||||
import { PageHeader } from "@ant-design/pro-layout";
|
import { PageHeader } from "@ant-design/pro-layout";
|
||||||
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
|
import { Button, Dropdown, Input, Space, Statistic, Table } from "antd";
|
||||||
|
import _ from "lodash";
|
||||||
|
import React, { useEffect, useMemo, useRef, useState } from "react";
|
||||||
import ReactDragListView from "react-drag-listview";
|
import ReactDragListView from "react-drag-listview";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
||||||
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
|
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
|
||||||
|
import Prompt from "../../utils/prompt.js";
|
||||||
|
import AlertComponent from "../alert/alert.component.jsx";
|
||||||
import ProductionListColumnsAdd from "../production-list-columns/production-list-columns.add.component";
|
import ProductionListColumnsAdd from "../production-list-columns/production-list-columns.add.component";
|
||||||
import ProductionListColumns from "../production-list-columns/production-list-columns.data";
|
import ProductionListColumns from "../production-list-columns/production-list-columns.data";
|
||||||
import ProductionListDetail from "../production-list-detail/production-list-detail.component";
|
import ProductionListDetail from "../production-list-detail/production-list-detail.component";
|
||||||
|
import { ProductionListConfigManager } from "./production-list-config-manager.component.jsx";
|
||||||
import ProductionListPrint from "./production-list-print.component";
|
import ProductionListPrint from "./production-list-print.component";
|
||||||
import ResizeableTitle from "./production-list-table.resizeable.component";
|
import ResizeableTitle from "./production-list-table.resizeable.component";
|
||||||
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
|
||||||
import { SyncOutlined } from "@ant-design/icons";
|
|
||||||
import Prompt from "../../utils/prompt.js";
|
|
||||||
import _ from "lodash";
|
|
||||||
import AlertComponent from "../alert/alert.component.jsx";
|
|
||||||
import { ProductionListConfigManager } from "./production-list-config-manager.component.jsx";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -43,7 +43,7 @@ export function ProductionListTable({ loading, data, refetch, bodyshop, technici
|
|||||||
const initialStateRef = useRef(
|
const initialStateRef = useRef(
|
||||||
(bodyshop.production_config &&
|
(bodyshop.production_config &&
|
||||||
bodyshop.production_config.find((p) => p.name === defaultView)?.columns.tableState) ||
|
bodyshop.production_config.find((p) => p.name === defaultView)?.columns.tableState) ||
|
||||||
bodyshop.production_config[0]?.columns.tableState || {
|
(bodyshop.production_config && bodyshop.production_config[0]?.columns.tableState) || {
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
filteredInfo: { text: "" }
|
filteredInfo: { text: "" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,28 +34,34 @@ export function ReportCenterModalComponent({ reportCenterModal, bodyshop }) {
|
|||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
const {
|
const {
|
||||||
treatments: { Enhanced_Payroll }
|
treatments: { Enhanced_Payroll, ADPPayroll }
|
||||||
} = useSplitTreatments({
|
} = useSplitTreatments({
|
||||||
attributes: {},
|
attributes: {},
|
||||||
names: ["Enhanced_Payroll"],
|
names: ["Enhanced_Payroll", "ADPPayroll"],
|
||||||
splitKey: bodyshop.imexshopid
|
splitKey: bodyshop.imexshopid
|
||||||
});
|
});
|
||||||
|
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const Templates = TemplateList("report_center");
|
const Templates = TemplateList("report_center");
|
||||||
const ReportsList =
|
const ReportsList = Object.keys(Templates)
|
||||||
Enhanced_Payroll.treatment === "on"
|
.map((key) => Templates[key])
|
||||||
? Object.keys(Templates)
|
.filter((temp) => {
|
||||||
.map((key) => {
|
const enhancedPayrollOn = Enhanced_Payroll.treatment === "on";
|
||||||
return Templates[key];
|
const adpPayrollOn = ADPPayroll.treatment === "on";
|
||||||
})
|
|
||||||
.filter((temp) => temp.enhanced_payroll === undefined || temp.enhanced_payroll === true)
|
if (enhancedPayrollOn && adpPayrollOn) {
|
||||||
: Object.keys(Templates)
|
return temp.enhanced_payroll !== false || temp.adp_payroll !== false;
|
||||||
.map((key) => {
|
}
|
||||||
return Templates[key];
|
if (enhancedPayrollOn) {
|
||||||
})
|
return temp.enhanced_payroll !== false && temp.adp_payroll !== true;
|
||||||
.filter((temp) => temp.enhanced_payroll === undefined || temp.enhanced_payroll === false);
|
}
|
||||||
|
if (adpPayrollOn) {
|
||||||
|
return temp.adp_payroll !== false && temp.enhanced_payroll !== true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return temp.enhanced_payroll !== true && temp.adp_payroll !== true;
|
||||||
|
});
|
||||||
|
|
||||||
const { open } = reportCenterModal;
|
const { open } = reportCenterModal;
|
||||||
|
|
||||||
@@ -104,7 +110,7 @@ export function ReportCenterModalComponent({ reportCenterModal, bodyshop }) {
|
|||||||
to: values.to,
|
to: values.to,
|
||||||
subject: Templates[values.key]?.subject
|
subject: Templates[values.key]?.subject
|
||||||
},
|
},
|
||||||
values.sendbyexcel === "excel" ? "x" : values.sendby === "email" ? "e" : "p",
|
values.sendbytext === "text" ? values.sendbytext : values.sendbyexcel === "excel" ? "x" : values.sendby === "email" ? "e" : "p",
|
||||||
id
|
id
|
||||||
);
|
);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
@@ -291,7 +297,15 @@ export function ReportCenterModalComponent({ reportCenterModal, bodyshop }) {
|
|||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
if (reporttype !== "excel")
|
if (reporttype === "text")
|
||||||
|
return (
|
||||||
|
<Form.Item label={t("general.labels.sendby")} name="sendbytext" initialValue="text">
|
||||||
|
<Radio.Group>
|
||||||
|
<Radio value="text">{t("general.labels.text")}</Radio>
|
||||||
|
</Radio.Group>
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
if (reporttype !== "excel" || reporttype !== "text")
|
||||||
return (
|
return (
|
||||||
<Form.Item label={t("general.labels.sendby")} name="sendby" initialValue="print">
|
<Form.Item label={t("general.labels.sendby")} name="sendby" initialValue="print">
|
||||||
<Radio.Group>
|
<Radio.Group>
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ import { connect } from "react-redux";
|
|||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import DatePickerRanges from "../../utils/DatePickerRanges";
|
import DatePickerRanges from "../../utils/DatePickerRanges";
|
||||||
|
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||||
|
import FeatureWrapper, { HasFeatureAccess } from "../feature-wrapper/feature-wrapper.component";
|
||||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||||
import FormItemEmail from "../form-items-formatted/email-form-item.component";
|
import FormItemEmail from "../form-items-formatted/email-form-item.component";
|
||||||
import PhoneFormItem, { PhoneItemFormatterValidation } from "../form-items-formatted/phone-form-item.component";
|
import PhoneFormItem, { PhoneItemFormatterValidation } from "../form-items-formatted/phone-form-item.component";
|
||||||
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
|
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
|
||||||
import FeatureWrapper, { HasFeatureAccess } from "../feature-wrapper/feature-wrapper.component";
|
|
||||||
// TODO: Client Update, this might break
|
// TODO: Client Update, this might break
|
||||||
const timeZonesList = Intl.supportedValuesOf("timeZone");
|
const timeZonesList = Intl.supportedValuesOf("timeZone");
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
@@ -28,10 +28,10 @@ export function ShopInfoGeneral({ form, bodyshop }) {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
treatments: { ClosingPeriod }
|
treatments: { ClosingPeriod, ADPPayroll }
|
||||||
} = useSplitTreatments({
|
} = useSplitTreatments({
|
||||||
attributes: {},
|
attributes: {},
|
||||||
names: ["ClosingPeriod"],
|
names: ["ClosingPeriod", "ADPPayroll"],
|
||||||
splitKey: bodyshop && bodyshop.imexshopid
|
splitKey: bodyshop && bodyshop.imexshopid
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -98,7 +98,6 @@ export function ShopInfoGeneral({ form, bodyshop }) {
|
|||||||
<Form.Item label={t("bodyshop.fields.email")} name="email">
|
<Form.Item label={t("bodyshop.fields.email")} name="email">
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.phone")}
|
label={t("bodyshop.fields.phone")}
|
||||||
name="phone"
|
name="phone"
|
||||||
@@ -356,14 +355,22 @@ export function ShopInfoGeneral({ form, bodyshop }) {
|
|||||||
<Select mode="tags" />
|
<Select mode="tags" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{ClosingPeriod.treatment === "on" && (
|
{ClosingPeriod.treatment === "on" && (
|
||||||
<>
|
<Form.Item
|
||||||
<Form.Item
|
name={["accountingconfig", "ClosingPeriod"]}
|
||||||
name={["accountingconfig", "ClosingPeriod"]}
|
label={t("bodyshop.fields.closingperiod")} //{t("reportcenter.labels.dates")}
|
||||||
label={t("bodyshop.fields.closingperiod")} //{t("reportcenter.labels.dates")}
|
>
|
||||||
>
|
<DatePicker.RangePicker format="MM/DD/YYYY" presets={DatePickerRanges} />
|
||||||
<DatePicker.RangePicker format="MM/DD/YYYY" presets={DatePickerRanges} />
|
</Form.Item>
|
||||||
</Form.Item>
|
)}
|
||||||
</>
|
{ADPPayroll.treatment === "on" && (
|
||||||
|
<Form.Item name={["accountingconfig", "companyCode"]} label={t("bodyshop.fields.companycode")}>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
)}
|
||||||
|
{ADPPayroll.treatment === "on" && (
|
||||||
|
<Form.Item name={["accountingconfig", "batchID"]} label={t("bodyshop.fields.batchid")}>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
</FeatureWrapper>
|
</FeatureWrapper>
|
||||||
|
|||||||
@@ -30,219 +30,226 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
return (
|
return (
|
||||||
<RbacWrapper action="shop:rbac">
|
<RbacWrapper action="shop:rbac">
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
{...HasFeatureAccess({ featureName: "export", bodyshop }) ? [
|
{...HasFeatureAccess({ featureName: "export", bodyshop })
|
||||||
<Form.Item
|
? [
|
||||||
label={t("bodyshop.fields.rbac.accounting.exportlog")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.accounting.exportlog")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "accounting:exportlog"]}
|
]}
|
||||||
>
|
name={["md_rbac", "accounting:exportlog"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>,
|
<InputNumber />
|
||||||
<Form.Item
|
</Form.Item>,
|
||||||
label={t("bodyshop.fields.rbac.accounting.payables")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.accounting.payables")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "accounting:payables"]}
|
]}
|
||||||
>
|
name={["md_rbac", "accounting:payables"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>,
|
<InputNumber />
|
||||||
<Form.Item
|
</Form.Item>,
|
||||||
label={t("bodyshop.fields.rbac.accounting.payments")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.accounting.payments")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "accounting:payments"]}
|
]}
|
||||||
>
|
name={["md_rbac", "accounting:payments"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>,
|
<InputNumber />
|
||||||
<Form.Item
|
</Form.Item>,
|
||||||
label={t("bodyshop.fields.rbac.accounting.receivables")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.accounting.receivables")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "accounting:receivables"]}
|
]}
|
||||||
>
|
name={["md_rbac", "accounting:receivables"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>
|
<InputNumber />
|
||||||
]:[]}
|
</Form.Item>
|
||||||
{...HasFeatureAccess({ featureName: "bills", bodyshop }) ? [
|
]
|
||||||
<Form.Item
|
: []}
|
||||||
label={t("bodyshop.fields.rbac.bills.delete")}
|
{...HasFeatureAccess({ featureName: "bills", bodyshop })
|
||||||
rules={[
|
? [
|
||||||
{
|
<Form.Item
|
||||||
required: true
|
label={t("bodyshop.fields.rbac.bills.delete")}
|
||||||
//message: t("general.validation.required"),
|
rules={[
|
||||||
}
|
{
|
||||||
]}
|
required: true
|
||||||
name={["md_rbac", "bills:delete"]}
|
//message: t("general.validation.required"),
|
||||||
>
|
}
|
||||||
<InputNumber />
|
]}
|
||||||
</Form.Item>,
|
name={["md_rbac", "bills:delete"]}
|
||||||
<Form.Item
|
>
|
||||||
label={t("bodyshop.fields.rbac.bills.enter")}
|
<InputNumber />
|
||||||
rules={[
|
</Form.Item>,
|
||||||
{
|
<Form.Item
|
||||||
required: true
|
label={t("bodyshop.fields.rbac.bills.enter")}
|
||||||
//message: t("general.validation.required"),
|
rules={[
|
||||||
}
|
{
|
||||||
]}
|
required: true
|
||||||
name={["md_rbac", "bills:enter"]}
|
//message: t("general.validation.required"),
|
||||||
>
|
}
|
||||||
<InputNumber />
|
]}
|
||||||
</Form.Item>,
|
name={["md_rbac", "bills:enter"]}
|
||||||
<Form.Item
|
>
|
||||||
label={t("bodyshop.fields.rbac.bills.list")}
|
<InputNumber />
|
||||||
rules={[
|
</Form.Item>,
|
||||||
{
|
<Form.Item
|
||||||
required: true
|
label={t("bodyshop.fields.rbac.bills.list")}
|
||||||
//message: t("general.validation.required"),
|
rules={[
|
||||||
}
|
{
|
||||||
]}
|
required: true
|
||||||
name={["md_rbac", "bills:list"]}
|
//message: t("general.validation.required"),
|
||||||
>
|
}
|
||||||
<InputNumber />
|
]}
|
||||||
</Form.Item>,
|
name={["md_rbac", "bills:list"]}
|
||||||
<Form.Item
|
>
|
||||||
label={t("bodyshop.fields.rbac.bills.reexport")}
|
<InputNumber />
|
||||||
rules={[
|
</Form.Item>,
|
||||||
{
|
<Form.Item
|
||||||
required: true
|
label={t("bodyshop.fields.rbac.bills.reexport")}
|
||||||
//message: t("general.validation.required"),
|
rules={[
|
||||||
}
|
{
|
||||||
]}
|
required: true
|
||||||
name={["md_rbac", "bills:reexport"]}
|
//message: t("general.validation.required"),
|
||||||
>
|
}
|
||||||
<InputNumber />
|
]}
|
||||||
</Form.Item>,
|
name={["md_rbac", "bills:reexport"]}
|
||||||
<Form.Item
|
>
|
||||||
label={t("bodyshop.fields.rbac.bills.view")}
|
<InputNumber />
|
||||||
rules={[
|
</Form.Item>,
|
||||||
{
|
<Form.Item
|
||||||
required: true
|
label={t("bodyshop.fields.rbac.bills.view")}
|
||||||
//message: t("general.validation.required"),
|
rules={[
|
||||||
}
|
{
|
||||||
]}
|
required: true
|
||||||
name={["md_rbac", "bills:view"]}
|
//message: t("general.validation.required"),
|
||||||
>
|
}
|
||||||
<InputNumber />
|
]}
|
||||||
</Form.Item>
|
name={["md_rbac", "bills:view"]}
|
||||||
]:[]}
|
>
|
||||||
|
<InputNumber />
|
||||||
{...HasFeatureAccess({ featureName: "courtesycars", bodyshop }) ? [
|
</Form.Item>
|
||||||
<Form.Item
|
]
|
||||||
label={t("bodyshop.fields.rbac.contracts.create")}
|
: []}
|
||||||
rules={[
|
{...HasFeatureAccess({ featureName: "courtesycars", bodyshop })
|
||||||
{
|
? [
|
||||||
required: true
|
<Form.Item
|
||||||
//message: t("general.validation.required"),
|
label={t("bodyshop.fields.rbac.contracts.create")}
|
||||||
}
|
rules={[
|
||||||
]}
|
{
|
||||||
name={["md_rbac", "contracts:create"]}
|
required: true
|
||||||
>
|
//message: t("general.validation.required"),
|
||||||
<InputNumber />
|
}
|
||||||
</Form.Item>,
|
]}
|
||||||
<Form.Item
|
name={["md_rbac", "contracts:create"]}
|
||||||
label={t("bodyshop.fields.rbac.contracts.detail")}
|
>
|
||||||
rules={[
|
<InputNumber />
|
||||||
{
|
</Form.Item>,
|
||||||
required: true
|
<Form.Item
|
||||||
//message: t("general.validation.required"),
|
label={t("bodyshop.fields.rbac.contracts.detail")}
|
||||||
}
|
rules={[
|
||||||
]}
|
{
|
||||||
name={["md_rbac", "contracts:detail"]}
|
required: true
|
||||||
>
|
//message: t("general.validation.required"),
|
||||||
<InputNumber />
|
}
|
||||||
</Form.Item>,
|
]}
|
||||||
<Form.Item
|
name={["md_rbac", "contracts:detail"]}
|
||||||
label={t("bodyshop.fields.rbac.contracts.list")}
|
>
|
||||||
rules={[
|
<InputNumber />
|
||||||
{
|
</Form.Item>,
|
||||||
required: true
|
<Form.Item
|
||||||
//message: t("general.validation.required"),
|
label={t("bodyshop.fields.rbac.contracts.list")}
|
||||||
}
|
rules={[
|
||||||
]}
|
{
|
||||||
name={["md_rbac", "contracts:list"]}
|
required: true
|
||||||
>
|
//message: t("general.validation.required"),
|
||||||
<InputNumber />
|
}
|
||||||
</Form.Item>,
|
]}
|
||||||
<Form.Item
|
name={["md_rbac", "contracts:list"]}
|
||||||
label={t("bodyshop.fields.rbac.courtesycar.create")}
|
>
|
||||||
rules={[
|
<InputNumber />
|
||||||
{
|
</Form.Item>,
|
||||||
required: true
|
<Form.Item
|
||||||
//message: t("general.validation.required"),
|
label={t("bodyshop.fields.rbac.courtesycar.create")}
|
||||||
}
|
rules={[
|
||||||
]}
|
{
|
||||||
name={["md_rbac", "courtesycar:create"]}
|
required: true
|
||||||
>
|
//message: t("general.validation.required"),
|
||||||
<InputNumber />
|
}
|
||||||
</Form.Item>,
|
]}
|
||||||
<Form.Item
|
name={["md_rbac", "courtesycar:create"]}
|
||||||
label={t("bodyshop.fields.rbac.courtesycar.detail")}
|
>
|
||||||
rules={[
|
<InputNumber />
|
||||||
{
|
</Form.Item>,
|
||||||
required: true
|
<Form.Item
|
||||||
//message: t("general.validation.required"),
|
label={t("bodyshop.fields.rbac.courtesycar.detail")}
|
||||||
}
|
rules={[
|
||||||
]}
|
{
|
||||||
name={["md_rbac", "courtesycar:detail"]}
|
required: true
|
||||||
>
|
//message: t("general.validation.required"),
|
||||||
<InputNumber />
|
}
|
||||||
</Form.Item>,
|
]}
|
||||||
<Form.Item
|
name={["md_rbac", "courtesycar:detail"]}
|
||||||
label={t("bodyshop.fields.rbac.courtesycar.list")}
|
>
|
||||||
rules={[
|
<InputNumber />
|
||||||
{
|
</Form.Item>,
|
||||||
required: true
|
<Form.Item
|
||||||
//message: t("general.validation.required"),
|
label={t("bodyshop.fields.rbac.courtesycar.list")}
|
||||||
}
|
rules={[
|
||||||
]}
|
{
|
||||||
name={["md_rbac", "courtesycar:list"]}
|
required: true
|
||||||
>
|
//message: t("general.validation.required"),
|
||||||
<InputNumber />
|
}
|
||||||
</Form.Item>
|
]}
|
||||||
]:[]}
|
name={["md_rbac", "courtesycar:list"]}
|
||||||
{...HasFeatureAccess({ featureName: "csi", bodyshop }) ? [
|
>
|
||||||
<Form.Item
|
<InputNumber />
|
||||||
label={t("bodyshop.fields.rbac.csi.export")}
|
</Form.Item>
|
||||||
rules={[
|
]
|
||||||
{
|
: []}
|
||||||
required: true
|
{...HasFeatureAccess({ featureName: "csi", bodyshop })
|
||||||
//message: t("general.validation.required"),
|
? [
|
||||||
}
|
<Form.Item
|
||||||
]}
|
label={t("bodyshop.fields.rbac.csi.export")}
|
||||||
name={["md_rbac", "csi:export"]}
|
rules={[
|
||||||
>
|
{
|
||||||
<InputNumber />
|
required: true
|
||||||
</Form.Item>,
|
//message: t("general.validation.required"),
|
||||||
<Form.Item
|
}
|
||||||
label={t("bodyshop.fields.rbac.csi.page")}
|
]}
|
||||||
rules={[
|
name={["md_rbac", "csi:export"]}
|
||||||
{
|
>
|
||||||
required: true
|
<InputNumber />
|
||||||
//message: t("general.validation.required"),
|
</Form.Item>,
|
||||||
}
|
<Form.Item
|
||||||
]}
|
label={t("bodyshop.fields.rbac.csi.page")}
|
||||||
name={["md_rbac", "csi:page"]}
|
rules={[
|
||||||
>
|
{
|
||||||
<InputNumber />
|
required: true
|
||||||
</Form.Item>
|
//message: t("general.validation.required"),
|
||||||
]:[]}
|
}
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "csi:page"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
]
|
||||||
|
: []}
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.employees.page")}
|
label={t("bodyshop.fields.rbac.employees.page")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -255,6 +262,18 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.employee_teams.page")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "employee_teams:page"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.admin")}
|
label={t("bodyshop.fields.rbac.jobs.admin")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -435,31 +454,6 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.employees.page")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "employees:page"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.employee_teams.page")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "employee_teams:page"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.payments.enter")}
|
label={t("bodyshop.fields.rbac.payments.enter")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -522,7 +516,6 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.production.list")}
|
label={t("bodyshop.fields.rbac.production.list")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -561,128 +554,118 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
{...HasFeatureAccess({ featureName: "timetickets", bodyshop }) ? [
|
{...HasFeatureAccess({ featureName: "timetickets", bodyshop })
|
||||||
<Form.Item
|
? [
|
||||||
label={t("bodyshop.fields.rbac.shiftclock.view")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.shiftclock.view")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "shiftclock:view"]}
|
]}
|
||||||
>
|
name={["md_rbac", "shiftclock:view"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>,
|
<InputNumber />
|
||||||
<Form.Item
|
</Form.Item>,
|
||||||
label={t("bodyshop.fields.rbac.shop.config")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.shop.config")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "shop:config"]}
|
]}
|
||||||
>
|
name={["md_rbac", "shop:config"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>,
|
<InputNumber />
|
||||||
<Form.Item
|
</Form.Item>,
|
||||||
label={t("bodyshop.fields.rbac.timetickets.edit")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.timetickets.edit")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "timetickets:edit"]}
|
]}
|
||||||
>
|
name={["md_rbac", "timetickets:edit"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>,
|
<InputNumber />
|
||||||
<Form.Item
|
</Form.Item>,
|
||||||
label={t("bodyshop.fields.rbac.timetickets.shiftedit")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.timetickets.shiftedit")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "timetickets:shiftedit"]}
|
]}
|
||||||
>
|
name={["md_rbac", "timetickets:shiftedit"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>,
|
<InputNumber />
|
||||||
<Form.Item
|
</Form.Item>,
|
||||||
label={t("bodyshop.fields.rbac.timetickets.editcommitted")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.timetickets.editcommitted")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "timetickets:editcommitted"]}
|
]}
|
||||||
>
|
name={["md_rbac", "timetickets:editcommitted"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>,
|
<InputNumber />
|
||||||
<Form.Item
|
</Form.Item>,
|
||||||
label={t("bodyshop.fields.rbac.ttapprovals.view")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.ttapprovals.view")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "ttapprovals:view"]}
|
]}
|
||||||
>
|
name={["md_rbac", "ttapprovals:view"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>,
|
<InputNumber />
|
||||||
<Form.Item
|
</Form.Item>,
|
||||||
label={t("bodyshop.fields.rbac.ttapprovals.approve")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.ttapprovals.approve")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "ttapprovals:approve"]}
|
]}
|
||||||
>
|
name={["md_rbac", "ttapprovals:approve"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>,
|
<InputNumber />
|
||||||
<Form.Item
|
</Form.Item>,
|
||||||
label={t("bodyshop.fields.rbac.timetickets.enter")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.timetickets.enter")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "timetickets:enter"]}
|
]}
|
||||||
>
|
name={["md_rbac", "timetickets:enter"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>,
|
<InputNumber />
|
||||||
<Form.Item
|
</Form.Item>,
|
||||||
label={t("bodyshop.fields.rbac.timetickets.list")}
|
<Form.Item
|
||||||
rules={[
|
label={t("bodyshop.fields.rbac.timetickets.list")}
|
||||||
{
|
rules={[
|
||||||
required: true
|
{
|
||||||
//message: t("general.validation.required"),
|
required: true
|
||||||
}
|
//message: t("general.validation.required"),
|
||||||
]}
|
}
|
||||||
name={["md_rbac", "timetickets:list"]}
|
]}
|
||||||
>
|
name={["md_rbac", "timetickets:list"]}
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>,
|
<InputNumber />
|
||||||
<Form.Item
|
</Form.Item>
|
||||||
label={t("bodyshop.fields.rbac.timetickets.shiftedit")}
|
]
|
||||||
rules={[
|
: []}
|
||||||
{
|
|
||||||
required: true
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "timetickets:shiftedit"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
]:[]}
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.shop.vendors")}
|
label={t("bodyshop.fields.rbac.shop.vendors")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -757,7 +740,6 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.users.editaccess")}
|
label={t("bodyshop.fields.rbac.users.editaccess")}
|
||||||
rules={[
|
rules={[
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { DateFormatter, DateTimeFormatter } from "../../utils/DateFormatter";
|
|||||||
import { onlyUnique } from "../../utils/arrayHelper";
|
import { onlyUnique } from "../../utils/arrayHelper";
|
||||||
import dayjs from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import { alphaSort, dateSort } from "../../utils/sorters";
|
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";
|
import TimeTicketEnterButton from "../time-ticket-enter-button/time-ticket-enter-button.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
@@ -52,6 +52,10 @@ export function TimeTicketList({
|
|||||||
splitKey: bodyshop.imexshopid
|
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(() => {
|
const totals = useMemo(() => {
|
||||||
if (timetickets)
|
if (timetickets)
|
||||||
return timetickets.reduce(
|
return timetickets.reduce(
|
||||||
@@ -65,6 +69,18 @@ export function TimeTicketList({
|
|||||||
return { productivehrs: 0, actualhrs: 0 };
|
return { productivehrs: 0, actualhrs: 0 };
|
||||||
}, [timetickets]);
|
}, [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 = [
|
const columns = [
|
||||||
...(Enhanced_Payroll.treatment === "on"
|
...(Enhanced_Payroll.treatment === "on"
|
||||||
? [
|
? [
|
||||||
@@ -206,76 +222,55 @@ export function TimeTicketList({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
|
||||||
]),
|
]),
|
||||||
{
|
{
|
||||||
title: t("timetickets.fields.created_by"),
|
title: t("timetickets.fields.created_by"),
|
||||||
dataIndex: "created_by",
|
dataIndex: "created_by",
|
||||||
key: "created_by",
|
key: "created_by",
|
||||||
sorter: (a, b) => alphaSort(a.created_by, b.created_by),
|
sorter: (a, b) => alphaSort(a.created_by, b.created_by),
|
||||||
sortOrder: state.sortedInfo.columnKey === "created_by" && state.sortedInfo.order,
|
sortOrder: state.sortedInfo.columnKey === "created_by" && state.sortedInfo.order,
|
||||||
render: (text, record) => record.created_by
|
render: (text, record) => record.created_by
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: "Pay",
|
// title: "Pay",
|
||||||
// dataIndex: "pay",
|
// dataIndex: "pay",
|
||||||
// key: "pay",
|
// key: "pay",
|
||||||
// render: (text, record) =>
|
// render: (text, record) =>
|
||||||
// Dinero({ amount: Math.round(record.rate * 100) })
|
// Dinero({ amount: Math.round(record.rate * 100) })
|
||||||
// .multiply(record.flat_rate ? record.productivehrs : record.actualhrs)
|
// .multiply(record.flat_rate ? record.productivehrs : record.actualhrs)
|
||||||
// .toFormat("$0.00"),
|
// .toFormat("$0.00"),
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
title: t("general.labels.actions"),
|
title: t("general.labels.actions"),
|
||||||
dataIndex: "actions",
|
dataIndex: "actions",
|
||||||
key: "actions",
|
key: "actions",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
{techConsole && (
|
{techConsole && (
|
||||||
<TimeTicketEnterButton
|
<TimeTicketEnterButton
|
||||||
actions={{ refetch }}
|
actions={{ refetch }}
|
||||||
context={{ id: record.id, timeticket: record }}
|
context={{ id: record.id, timeticket: record }}
|
||||||
disabled={!record.job || disabled}
|
disabled={!record.job || disabled}
|
||||||
>
|
>
|
||||||
<EditFilled />
|
<EditFilled />
|
||||||
</TimeTicketEnterButton>
|
</TimeTicketEnterButton>
|
||||||
)}
|
)}
|
||||||
{!techConsole && (
|
{!techConsole && (
|
||||||
<RbacWrapper
|
<TimeTicketEnterButton
|
||||||
action="timetickets:edit"
|
actions={{ refetch }}
|
||||||
noauth={() => {
|
context={{
|
||||||
return <div />;
|
id: record.id,
|
||||||
}}
|
timeticket: record
|
||||||
>
|
}}
|
||||||
<TimeTicketEnterButton
|
disabled={isDisabled(record)}
|
||||||
actions={{ refetch }}
|
>
|
||||||
context={{
|
<EditFilled />
|
||||||
id: record.id,
|
</TimeTicketEnterButton>
|
||||||
timeticket: record
|
)}
|
||||||
}}
|
</Space>
|
||||||
disabled={
|
)
|
||||||
HasRbacAccess({
|
}
|
||||||
bodyshop,
|
|
||||||
authLevel: authLevel,
|
|
||||||
action: "timetickets:editcommitted"
|
|
||||||
}) &&
|
|
||||||
HasRbacAccess({
|
|
||||||
bodyshop,
|
|
||||||
authLevel: authLevel,
|
|
||||||
action: "timetickets:shiftedit"
|
|
||||||
})
|
|
||||||
? disabled
|
|
||||||
: !record.jobid
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<EditFilled />
|
|
||||||
</TimeTicketEnterButton>
|
|
||||||
</RbacWrapper>
|
|
||||||
)}
|
|
||||||
</Space>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const handleTableChange = (pagination, filters, sorter) => {
|
const handleTableChange = (pagination, filters, sorter) => {
|
||||||
|
|||||||
@@ -329,7 +329,9 @@ export function LaborAllocationContainer({ jobid, loading, lineTicketData, hideT
|
|||||||
timetickets={lineTicketData.timetickets}
|
timetickets={lineTicketData.timetickets}
|
||||||
adjustments={lineTicketData.jobs_by_pk.lbr_adjustments}
|
adjustments={lineTicketData.jobs_by_pk.lbr_adjustments}
|
||||||
/>
|
/>
|
||||||
{!hideTimeTickets && <TimeTicketList loading={loading} timetickets={lineTicketData.timetickets} techConsole />}
|
{!hideTimeTickets && (
|
||||||
|
<TimeTicketList loading={loading} timetickets={jobid ? lineTicketData.timetickets : []} techConsole />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export function UpdateAlert({ updateAvailable }) {
|
|||||||
() => {
|
() => {
|
||||||
r.update();
|
r.update();
|
||||||
},
|
},
|
||||||
10 * 60 * 1000
|
30 * 60 * 1000
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import RbacWrapperComponent from "../../components/rbac-wrapper/rbac-wrapper.component";
|
import RbacWrapperComponent from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||||
import TechLookupJobsList from "../../components/tech-lookup-jobs-list/tech-lookup-jobs-list.component";
|
import TechLookupJobsList from "../../components/tech-lookup-jobs-list/tech-lookup-jobs-list.component";
|
||||||
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||||
|
import TechLookupJobsDrawer from "../../components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component";
|
||||||
|
|
||||||
export default function TechLookupContainer() {
|
export default function TechLookupContainer() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -20,6 +21,7 @@ export default function TechLookupContainer() {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<RbacWrapperComponent action="jobs:list-active">
|
<RbacWrapperComponent action="jobs:list-active">
|
||||||
|
<TechLookupJobsDrawer />
|
||||||
<TechLookupJobsList />
|
<TechLookupJobsList />
|
||||||
</RbacWrapperComponent>
|
</RbacWrapperComponent>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import ErrorBoundary from "../../components/error-boundary/error-boundary.compon
|
|||||||
import FeatureWrapper from "../../components/feature-wrapper/feature-wrapper.component";
|
import FeatureWrapper from "../../components/feature-wrapper/feature-wrapper.component";
|
||||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||||
import TechHeader from "../../components/tech-header/tech-header.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 TechSider from "../../components/tech-sider/tech-sider.component";
|
||||||
import UpdateAlert from "../../components/update-alert/update-alert.component";
|
import UpdateAlert from "../../components/update-alert/update-alert.component";
|
||||||
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
||||||
@@ -68,7 +67,7 @@ export function TechPage({ technician }) {
|
|||||||
<Layout>
|
<Layout>
|
||||||
<UpdateAlert />
|
<UpdateAlert />
|
||||||
<TechHeader />
|
<TechHeader />
|
||||||
<TechLookupJobsDrawer />
|
|
||||||
<TaskUpsertModalContainer />
|
<TaskUpsertModalContainer />
|
||||||
<Content className="tech-content-container">
|
<Content className="tech-content-container">
|
||||||
<ErrorBoundary>
|
<ErrorBoundary>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
signInWithEmailAndPassword,
|
signInWithEmailAndPassword,
|
||||||
signOut
|
signOut
|
||||||
} from "firebase/auth";
|
} 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 { getToken } from "firebase/messaging";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import LogRocket from "logrocket";
|
import LogRocket from "logrocket";
|
||||||
@@ -48,6 +48,7 @@ import {
|
|||||||
validatePasswordResetSuccess
|
validatePasswordResetSuccess
|
||||||
} from "./user.actions";
|
} from "./user.actions";
|
||||||
import UserActionTypes from "./user.types";
|
import UserActionTypes from "./user.types";
|
||||||
|
import cleanAxios from "../../utils/CleanAxios";
|
||||||
|
|
||||||
const fpPromise = FingerprintJS.load();
|
const fpPromise = FingerprintJS.load();
|
||||||
|
|
||||||
@@ -177,10 +178,24 @@ export function* setInstanceIdSaga({ payload: uid }) {
|
|||||||
// Get the visitor identifier when you need it.
|
// Get the visitor identifier when you need it.
|
||||||
const fp = yield fpPromise;
|
const fp = yield fpPromise;
|
||||||
const result = yield fp.get();
|
const result = yield fp.get();
|
||||||
yield setDoc(userInstanceRef, {
|
const res = yield cleanAxios.get("https://api.ipify.org/?format=json");
|
||||||
timestamp: new Date(),
|
const udoc = yield getDoc(userInstanceRef);
|
||||||
fingerprint: result.visitorId
|
|
||||||
});
|
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 put(setLocalFingerprint(result.visitorId));
|
||||||
yield delay(5 * 60 * 1000);
|
yield delay(5 * 60 * 1000);
|
||||||
|
|||||||
@@ -285,12 +285,14 @@
|
|||||||
},
|
},
|
||||||
"appt_length": "Default Appointment Length",
|
"appt_length": "Default Appointment Length",
|
||||||
"attach_pdf_to_email": "Attach PDF copy to sent emails?",
|
"attach_pdf_to_email": "Attach PDF copy to sent emails?",
|
||||||
|
"batchid": "ADP Batch ID",
|
||||||
"bill_allow_post_to_closed": "Allow Bills to be posted to Closed Jobs",
|
"bill_allow_post_to_closed": "Allow Bills to be posted to Closed Jobs",
|
||||||
"bill_federal_tax_rate": "Bills - Federal Tax Rate %",
|
"bill_federal_tax_rate": "Bills - Federal Tax Rate %",
|
||||||
"bill_local_tax_rate": "Bill - Local Tax Rate %",
|
"bill_local_tax_rate": "Bill - Local Tax Rate %",
|
||||||
"bill_state_tax_rate": "Bill - Provincial/State Tax Rate %",
|
"bill_state_tax_rate": "Bill - Provincial/State Tax Rate %",
|
||||||
"city": "City",
|
"city": "City",
|
||||||
"closingperiod": "Closing Period",
|
"closingperiod": "Closing Period",
|
||||||
|
"companycode": "ADP Company Code",
|
||||||
"country": "Country",
|
"country": "Country",
|
||||||
"dailybodytarget": "Scoreboard - Daily Body Target",
|
"dailybodytarget": "Scoreboard - Daily Body Target",
|
||||||
"dailypainttarget": "Scoreboard - Daily Paint Target",
|
"dailypainttarget": "Scoreboard - Daily Paint Target",
|
||||||
@@ -2927,6 +2929,8 @@
|
|||||||
"vendor": "Vendor"
|
"vendor": "Vendor"
|
||||||
},
|
},
|
||||||
"templates": {
|
"templates": {
|
||||||
|
"adp_payroll_flat": "ADP Payroll - Flat Rate",
|
||||||
|
"adp_payroll_straight": "ADP Payroll - Straight Time",
|
||||||
"anticipated_revenue": "Anticipated Revenue",
|
"anticipated_revenue": "Anticipated Revenue",
|
||||||
"ar_aging": "AR Aging",
|
"ar_aging": "AR Aging",
|
||||||
"attendance_detail": "Attendance (All Employees)",
|
"attendance_detail": "Attendance (All Employees)",
|
||||||
|
|||||||
@@ -285,12 +285,14 @@
|
|||||||
},
|
},
|
||||||
"appt_length": "",
|
"appt_length": "",
|
||||||
"attach_pdf_to_email": "",
|
"attach_pdf_to_email": "",
|
||||||
|
"batchid": "",
|
||||||
"bill_allow_post_to_closed": "",
|
"bill_allow_post_to_closed": "",
|
||||||
"bill_federal_tax_rate": "",
|
"bill_federal_tax_rate": "",
|
||||||
"bill_local_tax_rate": "",
|
"bill_local_tax_rate": "",
|
||||||
"bill_state_tax_rate": "",
|
"bill_state_tax_rate": "",
|
||||||
"city": "",
|
"city": "",
|
||||||
"closingperiod": "",
|
"closingperiod": "",
|
||||||
|
"companycode": "",
|
||||||
"country": "",
|
"country": "",
|
||||||
"dailybodytarget": "",
|
"dailybodytarget": "",
|
||||||
"dailypainttarget": "",
|
"dailypainttarget": "",
|
||||||
@@ -2927,6 +2929,8 @@
|
|||||||
"vendor": ""
|
"vendor": ""
|
||||||
},
|
},
|
||||||
"templates": {
|
"templates": {
|
||||||
|
"adp_payroll_flat": "",
|
||||||
|
"adp_payroll_straight": "",
|
||||||
"anticipated_revenue": "",
|
"anticipated_revenue": "",
|
||||||
"ar_aging": "",
|
"ar_aging": "",
|
||||||
"attendance_detail": "",
|
"attendance_detail": "",
|
||||||
|
|||||||
@@ -285,12 +285,14 @@
|
|||||||
},
|
},
|
||||||
"appt_length": "",
|
"appt_length": "",
|
||||||
"attach_pdf_to_email": "",
|
"attach_pdf_to_email": "",
|
||||||
|
"batchid": "",
|
||||||
"bill_allow_post_to_closed": "",
|
"bill_allow_post_to_closed": "",
|
||||||
"bill_federal_tax_rate": "",
|
"bill_federal_tax_rate": "",
|
||||||
"bill_local_tax_rate": "",
|
"bill_local_tax_rate": "",
|
||||||
"bill_state_tax_rate": "",
|
"bill_state_tax_rate": "",
|
||||||
"city": "",
|
"city": "",
|
||||||
"closingperiod": "",
|
"closingperiod": "",
|
||||||
|
"companycode": "",
|
||||||
"country": "",
|
"country": "",
|
||||||
"dailybodytarget": "",
|
"dailybodytarget": "",
|
||||||
"dailypainttarget": "",
|
"dailypainttarget": "",
|
||||||
@@ -2927,6 +2929,8 @@
|
|||||||
"vendor": ""
|
"vendor": ""
|
||||||
},
|
},
|
||||||
"templates": {
|
"templates": {
|
||||||
|
"adp_payroll_flat": "",
|
||||||
|
"adp_payroll_straight": "",
|
||||||
"anticipated_revenue": "",
|
"anticipated_revenue": "",
|
||||||
"ar_aging": "",
|
"ar_aging": "",
|
||||||
"attendance_detail": "",
|
"attendance_detail": "",
|
||||||
|
|||||||
@@ -2158,6 +2158,32 @@ export const TemplateList = (type, context) => {
|
|||||||
field: i18n.t("tasks.fields.created_at")
|
field: i18n.t("tasks.fields.created_at")
|
||||||
},
|
},
|
||||||
group: "jobs"
|
group: "jobs"
|
||||||
|
},
|
||||||
|
adp_payroll_flat: {
|
||||||
|
title: i18n.t("reportcenter.templates.adp_payroll_flat"),
|
||||||
|
subject: i18n.t("reportcenter.templates.adp_payroll_flat"),
|
||||||
|
key: "adp_payroll_flat",
|
||||||
|
reporttype: "text",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.timetickets"),
|
||||||
|
field: i18n.t("timetickets.fields.committed_at")
|
||||||
|
},
|
||||||
|
group: "payroll",
|
||||||
|
adp_payroll: true
|
||||||
|
},
|
||||||
|
adp_payroll_straight: {
|
||||||
|
title: i18n.t("reportcenter.templates.adp_payroll_straight"),
|
||||||
|
subject: i18n.t("reportcenter.templates.adp_payroll_straight"),
|
||||||
|
key: "adp_payroll_straight",
|
||||||
|
reporttype: "text",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.timetickets"),
|
||||||
|
field: i18n.t("timetickets.fields.date")
|
||||||
|
},
|
||||||
|
group: "payroll",
|
||||||
|
adp_payroll: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
version: 2
|
version: 2
|
||||||
endpoint: https://db.dev.bodyshop.app
|
endpoint: https://db.dev.imex.online
|
||||||
admin_secret: Dev-BodyShopApp!
|
admin_secret: Dev-BodyShopApp!
|
||||||
metadata_directory: metadata
|
metadata_directory: metadata
|
||||||
actions:
|
actions:
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
- name: AutoHouse Data Pump
|
||||||
|
webhook: '{{HASURA_API_URL}}/data/ah'
|
||||||
|
schedule: 0 6 * * *
|
||||||
|
include_in_metadata: true
|
||||||
|
payload: {}
|
||||||
|
headers:
|
||||||
|
- name: x-imex-auth
|
||||||
|
value_from_env: DATAPUMP_AUTH
|
||||||
|
- name: Claimscorp Data Pump
|
||||||
|
webhook: '{{HASURA_API_URL}}/data/cc'
|
||||||
|
schedule: 30 6 * * *
|
||||||
|
include_in_metadata: true
|
||||||
|
payload: {}
|
||||||
|
headers:
|
||||||
|
- name: x-imex-auth
|
||||||
|
value_from_env: DATAPUMP_AUTH
|
||||||
- name: Kaizen Data Pump
|
- name: Kaizen Data Pump
|
||||||
webhook: '{{HASURA_API_URL}}/data/kaizen'
|
webhook: '{{HASURA_API_URL}}/data/kaizen'
|
||||||
schedule: 30 5 * * *
|
schedule: 30 5 * * *
|
||||||
|
|||||||
@@ -31,6 +31,12 @@ const ftpSetup = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.default = async (req, res) => {
|
exports.default = async (req, res) => {
|
||||||
|
// Only process if in production environment.
|
||||||
|
if (process.env.NODE_ENV !== "production") {
|
||||||
|
res.sendStatus(403);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//Query for the List of Bodyshop Clients.
|
//Query for the List of Bodyshop Clients.
|
||||||
logger.log("autohouse-start", "DEBUG", "api", null, null);
|
logger.log("autohouse-start", "DEBUG", "api", null, null);
|
||||||
const { bodyshops } = await client.request(queries.GET_AUTOHOUSE_SHOPS);
|
const { bodyshops } = await client.request(queries.GET_AUTOHOUSE_SHOPS);
|
||||||
|
|||||||
@@ -31,6 +31,12 @@ const ftpSetup = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.default = async (req, res) => {
|
exports.default = async (req, res) => {
|
||||||
|
// Only process if in production environment.
|
||||||
|
if (process.env.NODE_ENV !== "production") {
|
||||||
|
res.sendStatus(403);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//Query for the List of Bodyshop Clients.
|
//Query for the List of Bodyshop Clients.
|
||||||
logger.log("claimscorp-start", "DEBUG", "api", null, null);
|
logger.log("claimscorp-start", "DEBUG", "api", null, null);
|
||||||
const { bodyshops } = await client.request(queries.GET_CLAIMSCORP_SHOPS);
|
const { bodyshops } = await client.request(queries.GET_CLAIMSCORP_SHOPS);
|
||||||
|
|||||||
@@ -31,6 +31,12 @@ const ftpSetup = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.default = async (req, res) => {
|
exports.default = async (req, res) => {
|
||||||
|
// Only process if in production environment.
|
||||||
|
if (process.env.NODE_ENV !== "production") {
|
||||||
|
res.sendStatus(403);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//Query for the List of Bodyshop Clients.
|
//Query for the List of Bodyshop Clients.
|
||||||
logger.log("kaizen-start", "DEBUG", "api", null, null);
|
logger.log("kaizen-start", "DEBUG", "api", null, null);
|
||||||
const kaizenShopsIDs = ["SUMMIT", "STRATHMORE", "SUNRIDGE", "SHAW"];
|
const kaizenShopsIDs = ["SUMMIT", "STRATHMORE", "SUNRIDGE", "SHAW"];
|
||||||
|
|||||||
Reference in New Issue
Block a user