Compare commits
39 Commits
rrScratch3
...
feature/IO
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
692f5c0167 | ||
|
|
7fc9bd5b35 | ||
|
|
86fdcdd397 | ||
|
|
623b27dbab | ||
|
|
c4a961fc03 | ||
|
|
eb075d732a | ||
|
|
e7887ea822 | ||
|
|
e74ba0942e | ||
|
|
e89145e85f | ||
|
|
807dbf0248 | ||
|
|
5104b27611 | ||
|
|
619e7ca469 | ||
|
|
8bddfdc104 | ||
|
|
413af6eb7c | ||
|
|
7b8691935d | ||
|
|
73baad21e2 | ||
|
|
ffbd98eb4f | ||
|
|
2cf4853960 | ||
|
|
6db0947454 | ||
|
|
59d9087ca7 | ||
|
|
e4671b9bd6 | ||
|
|
353d6d010c | ||
|
|
b7366d7fc6 | ||
|
|
d12ff11deb | ||
|
|
8b4ce18409 | ||
|
|
e4890c5fb8 | ||
|
|
72c9b5a11e | ||
|
|
835b90bc4b | ||
|
|
6562fd57df | ||
|
|
0a8c2bf385 | ||
|
|
fc09871a47 | ||
|
|
39f7a3c870 | ||
|
|
12d07f8318 | ||
|
|
7ae48db212 | ||
|
|
aa064cc573 | ||
|
|
63f86e4627 | ||
|
|
76b17cd249 | ||
|
|
8f8fdf7548 | ||
|
|
058edca573 |
@@ -2,33 +2,27 @@ version: 2.1
|
||||
orbs:
|
||||
#snyk: snyk/snyk@0.0.8
|
||||
#cypress: cypress-io/cypress@1.23.0
|
||||
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
|
||||
aws-s3: circleci/aws-s3@2.0.0
|
||||
eb: circleci/aws-elastic-beanstalk@1.0.2
|
||||
jira: circleci/jira@1.3.1
|
||||
jobs:
|
||||
imex-api-deploy:
|
||||
api-deploy:
|
||||
docker:
|
||||
- image: cimg/node:22.13.1
|
||||
- image: "cimg/base:stable"
|
||||
steps:
|
||||
- checkout
|
||||
- eb/setup
|
||||
- run:
|
||||
command: |
|
||||
eb init imex-online-production-api -r ca-central-1 -p "Node.js 22 running on 64bit Amazon Linux 2023"
|
||||
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:
|
||||
environment: Production (ImEX) - API
|
||||
environment_type: production
|
||||
job_type: deployment
|
||||
pipeline_id: << pipeline.id >>
|
||||
pipeline_number: << pipeline.number >>
|
||||
- jira/notify
|
||||
|
||||
imex-hasura-migrate:
|
||||
hasura-migrate:
|
||||
docker:
|
||||
- image: cimg/node:22.13.1
|
||||
- image: cimg/node:16.15.0
|
||||
parameters:
|
||||
secret:
|
||||
type: string
|
||||
@@ -40,206 +34,44 @@ jobs:
|
||||
- run:
|
||||
name: Execute migration
|
||||
command: |
|
||||
curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash
|
||||
npm install hasura-cli -g
|
||||
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:
|
||||
|
||||
app-build:
|
||||
docker:
|
||||
- image: cimg/node:22.13.1
|
||||
resource_class: large
|
||||
- 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: npm i
|
||||
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: npm run build:imex
|
||||
|
||||
- aws-cli/setup:
|
||||
aws_access_key_id: AWS_ACCESS_KEY_ID
|
||||
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
|
||||
region: AWS_REGION
|
||||
- run: yarn run build
|
||||
|
||||
- aws-s3/sync:
|
||||
from: build
|
||||
to: "s3://imex-online-production/"
|
||||
arguments: "--exclude '*.map'"
|
||||
|
||||
|
||||
imex-app-beta-build:
|
||||
docker:
|
||||
- image: cimg/node:22.13.1
|
||||
resource_class: large
|
||||
working_directory: ~/repo/client
|
||||
|
||||
steps:
|
||||
- checkout:
|
||||
path: ~/repo
|
||||
- run:
|
||||
name: Install Dependencies
|
||||
command: npm i
|
||||
|
||||
- run: NODE_OPTIONS=--max-old-space-size=8192 npm run build:production:imex
|
||||
|
||||
- aws-cli/setup:
|
||||
aws_access_key_id: AWS_ACCESS_KEY_ID
|
||||
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
|
||||
region: AWS_REGION
|
||||
|
||||
- aws-s3/sync:
|
||||
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:
|
||||
- image: "cimg/base:stable"
|
||||
steps:
|
||||
- checkout
|
||||
- eb/setup
|
||||
- run:
|
||||
command: |
|
||||
eb init romeonline-productionapi -r us-east-2 -p "Node.js 22 running on 64bit Amazon Linux 2023"
|
||||
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:22.13.1
|
||||
parameters:
|
||||
secret:
|
||||
type: string
|
||||
default: $HASURA_ROME_PROD_SECRET
|
||||
working_directory: ~/repo/hasura
|
||||
steps:
|
||||
- checkout:
|
||||
path: ~/repo
|
||||
- run:
|
||||
name: Execute migration
|
||||
command: |
|
||||
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:22.13.1
|
||||
resource_class: large
|
||||
working_directory: ~/repo/client
|
||||
|
||||
steps:
|
||||
- checkout:
|
||||
path: ~/repo
|
||||
- run:
|
||||
name: Install Dependencies
|
||||
command: npm i
|
||||
|
||||
- run: NODE_OPTIONS=--max-old-space-size=8192 npm run build:production:rome
|
||||
|
||||
- aws-cli/setup:
|
||||
aws_access_key_id: AWS_ACCESS_KEY_ID
|
||||
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
|
||||
region: AWS_REGION
|
||||
|
||||
- aws-s3/sync:
|
||||
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 >>
|
||||
|
||||
test-rome-hasura-migrate:
|
||||
docker:
|
||||
- image: cimg/node:22.13.1
|
||||
parameters:
|
||||
secret:
|
||||
type: string
|
||||
default: $HASURA_ROME_TEST_SECRET
|
||||
working_directory: ~/repo/hasura
|
||||
steps:
|
||||
- checkout:
|
||||
path: ~/repo
|
||||
- run:
|
||||
name: Execute migration
|
||||
command: |
|
||||
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 >>
|
||||
sleep 5
|
||||
hasura metadata apply --endpoint https://db.test.romeonline.io/ --admin-secret << parameters.secret >>
|
||||
sleep 10
|
||||
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:
|
||||
- image: cimg/node:22.13.1
|
||||
resource_class: large
|
||||
working_directory: ~/repo/client
|
||||
|
||||
steps:
|
||||
- checkout:
|
||||
path: ~/repo
|
||||
- run:
|
||||
name: Install Dependencies
|
||||
command: npm i
|
||||
|
||||
- run: NODE_OPTIONS=--max-old-space-size=8192 npm run build:test:rome
|
||||
|
||||
- aws-cli/setup:
|
||||
aws_access_key_id: AWS_ACCESS_KEY_ID
|
||||
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
|
||||
region: AWS_REGION
|
||||
|
||||
- aws-s3/sync:
|
||||
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 >>
|
||||
- jira/notify
|
||||
|
||||
test-hasura-migrate:
|
||||
docker:
|
||||
- image: cimg/node:22.13.1
|
||||
- image: cimg/node:16.15.0
|
||||
parameters:
|
||||
secret:
|
||||
type: string
|
||||
@@ -251,70 +83,41 @@ jobs:
|
||||
- run:
|
||||
name: Execute migration
|
||||
command: |
|
||||
curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash
|
||||
npm install hasura-cli -g
|
||||
echo ${HASURA_TEST_SECRET}
|
||||
hasura migrate apply --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >>
|
||||
sleep 15
|
||||
hasura metadata apply --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >>
|
||||
sleep 30
|
||||
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:
|
||||
test-app-build:
|
||||
docker:
|
||||
- image: cimg/node:22.13.1
|
||||
resource_class: large
|
||||
- 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: npm i
|
||||
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: NODE_OPTIONS=--max-old-space-size=8192 npm run build:test:imex
|
||||
- run: yarn run build:test
|
||||
|
||||
- aws-s3/sync:
|
||||
from: build
|
||||
to: "s3://imex-online-test/"
|
||||
arguments: "--exclude '*.map'"
|
||||
|
||||
imex-test-app-beta-build:
|
||||
docker:
|
||||
- image: cimg/node:22.13.1
|
||||
resource_class: large
|
||||
working_directory: ~/repo/client
|
||||
|
||||
steps:
|
||||
- checkout:
|
||||
path: ~/repo
|
||||
|
||||
- run:
|
||||
name: Install Dependencies
|
||||
command: npm i
|
||||
|
||||
- run: NODE_OPTIONS=--max-old-space-size=8192 npm run build:test:imex
|
||||
|
||||
- aws-cli/setup:
|
||||
aws_access_key_id: AWS_ACCESS_KEY_ID
|
||||
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
|
||||
region: AWS_REGION
|
||||
|
||||
- aws-s3/sync:
|
||||
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 >>
|
||||
- jira/notify
|
||||
|
||||
admin-app-build:
|
||||
docker:
|
||||
@@ -349,59 +152,29 @@ jobs:
|
||||
workflows:
|
||||
deploy_and_build:
|
||||
jobs:
|
||||
- imex-api-deploy:
|
||||
filters:
|
||||
branches:
|
||||
only: master-AIO
|
||||
- imex-app-build:
|
||||
- api-deploy:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
- imex-app-beta-build:
|
||||
- app-build:
|
||||
filters:
|
||||
branches:
|
||||
only: master-AIO
|
||||
- imex-hasura-migrate:
|
||||
only: master
|
||||
- hasura-migrate:
|
||||
secret: ${HASURA_PROD_SECRET}
|
||||
filters:
|
||||
branches:
|
||||
only: master-AIO
|
||||
- rome-api-deploy:
|
||||
filters:
|
||||
branches:
|
||||
only: master-AIO
|
||||
- rome-app-build:
|
||||
filters:
|
||||
branches:
|
||||
only: master-AIO
|
||||
- rome-hasura-migrate:
|
||||
secret: ${HASURA_ROME_PROD_SECRET}
|
||||
filters:
|
||||
branches:
|
||||
only: master-AIO
|
||||
- imex-test-app-build:
|
||||
only: master
|
||||
- test-app-build:
|
||||
filters:
|
||||
branches:
|
||||
only: test
|
||||
- imex-test-app-beta-build:
|
||||
filters:
|
||||
branches:
|
||||
only: test-AIO
|
||||
- test-hasura-migrate:
|
||||
secret: ${HASURA_TEST_SECRET}
|
||||
filters:
|
||||
branches:
|
||||
only: test-AIO
|
||||
- test-rome-app-build:
|
||||
filters:
|
||||
branches:
|
||||
only: test-AIO
|
||||
- test-rome-hasura-migrate:
|
||||
secret: ${HASURA_ROME_TEST_SECRET}
|
||||
filters:
|
||||
branches:
|
||||
only: test-AIO
|
||||
only: test
|
||||
#- admin-app-build:
|
||||
#filters:
|
||||
#branches:
|
||||
#only: master
|
||||
#only: master
|
||||
@@ -1,23 +0,0 @@
|
||||
# Directories to exclude
|
||||
.circleci
|
||||
.idea
|
||||
.platform
|
||||
.vscode
|
||||
_reference
|
||||
client
|
||||
redis/dockerdata
|
||||
hasura
|
||||
node_modules
|
||||
# Files to exclude
|
||||
.ebignore
|
||||
.editorconfig
|
||||
.gitignore
|
||||
.prettierrc.js
|
||||
Dockerfile
|
||||
README.MD
|
||||
bodyshop_translations.babel
|
||||
docker-compose.yml
|
||||
ecosystem.config.js
|
||||
eslint.config.mjs
|
||||
# Optional: Exclude logs and temporary files
|
||||
*.log
|
||||
@@ -1,21 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = false
|
||||
quote_type = single
|
||||
max_line_length = 100
|
||||
bracketSpacing = false
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
|
||||
[*.json]
|
||||
indent_size = 2
|
||||
20
.eslintrc.json
Normal file
20
.eslintrc.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"no-console": "off"
|
||||
},
|
||||
"settings": {}
|
||||
}
|
||||
80
.gitattributes
vendored
80
.gitattributes
vendored
@@ -1,80 +0,0 @@
|
||||
# Ensure all text files use LF for line endings
|
||||
* text eol=lf
|
||||
|
||||
# Binary files should not be modified by Git
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.gif binary
|
||||
*.ico binary
|
||||
*.webp binary
|
||||
*.svg binary
|
||||
|
||||
# Fonts
|
||||
*.woff binary
|
||||
*.woff2 binary
|
||||
*.ttf binary
|
||||
*.otf binary
|
||||
*.eot binary
|
||||
|
||||
# Videos
|
||||
*.mp4 binary
|
||||
*.mov binary
|
||||
*.avi binary
|
||||
*.mkv binary
|
||||
*.webm binary
|
||||
|
||||
# Audio
|
||||
*.mp3 binary
|
||||
*.wav binary
|
||||
*.ogg binary
|
||||
*.flac binary
|
||||
|
||||
# Archives and compressed files
|
||||
*.zip binary
|
||||
*.gz binary
|
||||
*.tar binary
|
||||
*.7z binary
|
||||
*.rar binary
|
||||
|
||||
# PDF and documents
|
||||
*.pdf binary
|
||||
*.doc binary
|
||||
*.docx binary
|
||||
*.xls binary
|
||||
*.xlsx binary
|
||||
*.ppt binary
|
||||
*.pptx binary
|
||||
|
||||
# Exclude JSON and other data files from text processing, if necessary
|
||||
*.json text
|
||||
*.xml text
|
||||
*.csv text
|
||||
|
||||
# Scripts and code files should maintain LF endings
|
||||
*.js text eol=lf
|
||||
*.jsx text eol=lf
|
||||
*.ts text eol=lf
|
||||
*.tsx text eol=lf
|
||||
*.css text eol=lf
|
||||
*.scss text eol=lf
|
||||
*.html text eol=lf
|
||||
*.yml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
*.md text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.py text eol=lf
|
||||
*.rb text eol=lf
|
||||
*.java text eol=lf
|
||||
*.php text eol=lf
|
||||
|
||||
# Git configuration files
|
||||
.gitattributes text eol=lf
|
||||
.gitignore text eol=lf
|
||||
*.gitattributes text eol=lf
|
||||
|
||||
# Exclude some other potential binary files
|
||||
*.db binary
|
||||
*.sqlite binary
|
||||
*.exe binary
|
||||
*.dll binary
|
||||
14
.gitignore
vendored
14
.gitignore
vendored
@@ -21,7 +21,6 @@ admin/coverage
|
||||
/build
|
||||
client/build
|
||||
admin/build
|
||||
client/dist
|
||||
# misc
|
||||
.DS_Store
|
||||
.env
|
||||
@@ -119,16 +118,5 @@ logs/oAuthClient-log.log
|
||||
.node-persist/**
|
||||
|
||||
/*.env.*
|
||||
.idea/*
|
||||
.idea
|
||||
|
||||
# Vitest
|
||||
vitest-report*/
|
||||
vitest-coverage/
|
||||
*.vitest.log
|
||||
test-output.txt
|
||||
server/job/test/fixtures
|
||||
|
||||
.github
|
||||
_reference/ragmate/.ragmate.env
|
||||
docker_data
|
||||
client/cypress/e2e/[1,2]-*
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
DD_API_KEY=58d91898a70c6fd659f6eea768a57976 DD_SITE="us3.datadoghq.com" bash -c "$(curl -L https://install.datadoghq.com/scripts/install_script_agent7.sh)"
|
||||
|
||||
echo "Datadog agent installed."
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install required packages
|
||||
dnf install -y fontconfig freetype
|
||||
|
||||
# Move to the /tmp directory for temporary download and extraction
|
||||
cd /tmp
|
||||
|
||||
# Download the Montserrat font zip file
|
||||
wget https://images.imex.online/fonts/montserrat.zip -O montserrat.zip
|
||||
|
||||
# Unzip the downloaded font file
|
||||
unzip montserrat.zip -d montserrat
|
||||
|
||||
# Move the font files to the system fonts directory
|
||||
mv montserrat/montserrat/*.ttf /usr/share/fonts
|
||||
|
||||
# Rebuild the font cache
|
||||
fc-cache -fv
|
||||
|
||||
# Clean up
|
||||
rm -rf /tmp/montserrat /tmp/montserrat.zip
|
||||
|
||||
echo "Montserrat fonts installed and cached successfully."
|
||||
@@ -1,2 +1 @@
|
||||
client_max_body_size 50M;
|
||||
client_body_buffer_size 5M;
|
||||
client_max_body_size 50M;
|
||||
@@ -1,18 +0,0 @@
|
||||
const config = {
|
||||
printWidth: 120,
|
||||
useTabs: false,
|
||||
tabWidth: 2,
|
||||
trailingComma: "none",
|
||||
semi: true,
|
||||
singleQuote: false,
|
||||
bracketSpacing: true,
|
||||
arrowParens: "always",
|
||||
jsxSingleQuote: false,
|
||||
bracketSameLine: false,
|
||||
endOfLine: "lf"
|
||||
// importOrder: ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
|
||||
// importOrderSeparation: true,
|
||||
// importOrderSortSpecifiers: true
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
16
.vscode/launch.json
vendored
16
.vscode/launch.json
vendored
@@ -8,27 +8,13 @@
|
||||
"type": "pwa-chrome",
|
||||
"webRoot": "${workspaceFolder}/client/src"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Chrome",
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"url": "http://localhost:3000",
|
||||
"webRoot": "${workspaceRoot}/client/src"
|
||||
},
|
||||
{
|
||||
"name": "Attach to Node.js in Docker",
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"address": "localhost",
|
||||
"port": 9229,
|
||||
"localRoot": "${workspaceFolder}",
|
||||
"remoteRoot": "/app",
|
||||
"protocol": "inspector",
|
||||
"restart": true,
|
||||
"sourceMaps": true,
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
33
.vscode/settings.json
vendored
33
.vscode/settings.json
vendored
@@ -8,36 +8,5 @@
|
||||
"pattern": "**/IMEX.xml",
|
||||
"systemId": "logs/IMEX.xsd"
|
||||
}
|
||||
],
|
||||
"cSpell.words": [
|
||||
"antd",
|
||||
"appointmentconfirmation",
|
||||
"appt",
|
||||
"autohouse",
|
||||
"autohouseid",
|
||||
"billlines",
|
||||
"bodyshop",
|
||||
"bodyshopid",
|
||||
"bodyshops",
|
||||
"CIECA",
|
||||
"claimscorp",
|
||||
"claimscorpid",
|
||||
"Dinero",
|
||||
"driveable",
|
||||
"IMEX",
|
||||
"imexshopid",
|
||||
"jobid",
|
||||
"joblines",
|
||||
"Kaizen",
|
||||
"labhrs",
|
||||
"larhrs",
|
||||
"mixdata",
|
||||
"ownr",
|
||||
"promanager",
|
||||
"shopname",
|
||||
"smartscheduling",
|
||||
"timetickets",
|
||||
"touchtime"
|
||||
],
|
||||
"eslint.workingDirectories": ["./", "./client"]
|
||||
]
|
||||
}
|
||||
|
||||
60
Dockerfile
60
Dockerfile
@@ -1,60 +0,0 @@
|
||||
# Use Amazon Linux 2023 as the base image
|
||||
FROM amazonlinux:2023
|
||||
|
||||
# Install Git and Node.js (Amazon Linux 2023 uses the DNF package manager)
|
||||
RUN dnf install -y git \
|
||||
&& curl -sL https://rpm.nodesource.com/setup_22.x | bash - \
|
||||
&& dnf install -y nodejs \
|
||||
&& dnf clean all
|
||||
|
||||
# Install dependencies required by node-canvas
|
||||
RUN dnf install -y \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
cairo-devel \
|
||||
pango-devel \
|
||||
libjpeg-turbo-devel \
|
||||
giflib-devel \
|
||||
libpng-devel \
|
||||
make \
|
||||
python3 \
|
||||
fontconfig \
|
||||
freetype \
|
||||
python3-pip \
|
||||
wget \
|
||||
unzip \
|
||||
&& dnf clean all
|
||||
|
||||
# Install Montserrat fonts
|
||||
RUN cd /tmp \
|
||||
&& wget https://images.imex.online/fonts/montserrat.zip -O montserrat.zip \
|
||||
&& unzip montserrat.zip -d montserrat \
|
||||
&& mv montserrat/montserrat/*.ttf /usr/share/fonts \
|
||||
&& fc-cache -fv \
|
||||
&& rm -rf /tmp/montserrat /tmp/montserrat.zip \
|
||||
&& echo "Montserrat fonts installed and cached successfully."
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# This is because our test route uses a git commit hash
|
||||
RUN git config --global --add safe.directory /app
|
||||
|
||||
# Copy package.json and package-lock.json
|
||||
COPY package.json ./
|
||||
|
||||
# Install Nodemon
|
||||
RUN npm install -g nodemon
|
||||
|
||||
# Install dependencies
|
||||
RUN npm i --no-package-lock
|
||||
|
||||
# Copy the rest of your application code
|
||||
COPY . .
|
||||
|
||||
# Expose the port your app runs on (adjust if necessary)
|
||||
EXPOSE 4000 9229
|
||||
|
||||
# Start the application
|
||||
RUN echo "Starting the application..."
|
||||
CMD ["nodemon", "--ignore", "./server/job/test/fixtures", "--legacy-watch", "--inspect=0.0.0.0:9229", "server.js"]
|
||||
@@ -1,346 +0,0 @@
|
||||
Fortellis Notes
|
||||
|
||||
Subscription ID
|
||||
|
||||
- Appears to give us a list of all dealerships we have access to, and `apiDmsInfo` contains the integrations that are enabled for that dealership.
|
||||
- Will likely need to filter based on the DMS ID or something?
|
||||
- Should store the whole subscription object. Contains department information needed in subsequent calls.
|
||||
|
||||
Department ID
|
||||
|
||||
- May have multiple departments. Appears that financial stuff goes to Accounting, History will go to Service.
|
||||
- TODO: How do we handle the multiple departments that may come up.
|
||||
|
||||
###Internal Questions
|
||||
|
||||
* Overview of the redis storing mechanism to cache this data.
|
||||
*
|
||||
|
||||
# GL Wip Posting
|
||||
|
||||
## Org Helper Return Data
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"acctgLgnID": "DEVWB-A",
|
||||
"applCode": "V",
|
||||
"coID": "77",
|
||||
"companyName": "TEST SYS C187092 DEVWB",
|
||||
"lgnDesc": "DEV WRITE BACK VMS",
|
||||
"logon": "DEVWB-V"
|
||||
},
|
||||
{
|
||||
"acctgLgnID": "DEVWB-A",
|
||||
"applCode": "F",
|
||||
"coID": "77",
|
||||
"companyName": "TEST SYS C187092 DEVWB",
|
||||
"lgnDesc": "DEV WRITE BACK F&I SALES",
|
||||
"logon": "DEVWB-FI"
|
||||
},
|
||||
{
|
||||
"acctgLgnID": "DEVWB-A",
|
||||
"applCode": "CS",
|
||||
"coID": "77",
|
||||
"companyName": "TEST SYS C187092 DEVWB",
|
||||
"lgnDesc": "DEV WRITE BACK SERVICE",
|
||||
"logon": "DEVWB-S"
|
||||
},
|
||||
{
|
||||
"acctgLgnID": "DEVWB-A",
|
||||
"applCode": "A",
|
||||
"coID": "77",
|
||||
"companyName": "TEST SYS C187092 DEVWB",
|
||||
"lgnDesc": "DEV WRITE BACK ACCTG",
|
||||
"logon": "DEVWB-A"
|
||||
},
|
||||
{
|
||||
"acctgLgnID": "DEVWB-A",
|
||||
"applCode": "SL",
|
||||
"coID": "77",
|
||||
"companyName": "TEST SYS C187092 DEVWB",
|
||||
"lgnDesc": "DEV WRTIE BACK SLS MGMT",
|
||||
"logon": "DEVWB-SL"
|
||||
},
|
||||
{
|
||||
"acctgLgnID": "DEVWB-A",
|
||||
"applCode": "O",
|
||||
"coID": "77",
|
||||
"companyName": "TEST SYS C187092 DEVWB",
|
||||
"lgnDesc": "DEV WRITE BACK PARTS",
|
||||
"logon": "DEVWB-I"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Journal Helper Return Data
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "32",
|
||||
"jrnlName": "PARTS SALES",
|
||||
"jrnlType": "S",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "4",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "92",
|
||||
"jrnlName": "YTD ADJUSTMENTS",
|
||||
"jrnlType": "Y",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "3",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "12",
|
||||
"jrnlName": "FLEET SALES",
|
||||
"jrnlType": "S",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "9",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "57",
|
||||
"jrnlName": "CASH RECEIPTS (OPEN-ITEM)",
|
||||
"jrnlType": "R",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "1",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "93",
|
||||
"jrnlName": "SET UP HISTORY",
|
||||
"jrnlType": "H",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "10",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "88",
|
||||
"jrnlName": "F/S STATISCAL DATA",
|
||||
"jrnlType": "F",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "10",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "58",
|
||||
"jrnlName": "WARRANTY CREDITS",
|
||||
"jrnlType": "G",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "3",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "FC",
|
||||
"jrnlName": "FINANCE CHARGE",
|
||||
"jrnlType": "A",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "12",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "94",
|
||||
"jrnlName": "SET UP SCHEDULES",
|
||||
"jrnlType": "C",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "3",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "95",
|
||||
"jrnlName": "SET UP GENERAL LEDGER",
|
||||
"jrnlType": "B",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "3",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "20",
|
||||
"jrnlName": "USED VEHICLE SALES",
|
||||
"jrnlType": "S",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "9",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "60",
|
||||
"jrnlName": "CASH DISBURSEMENTS",
|
||||
"jrnlType": "G",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "2",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "30",
|
||||
"jrnlName": "SERVICE SALES",
|
||||
"jrnlType": "S",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "7",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "40",
|
||||
"jrnlName": "PAYROLL",
|
||||
"jrnlType": "G",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "11",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "15",
|
||||
"jrnlName": "DEALER TRADES",
|
||||
"jrnlType": "S",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "9",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "70",
|
||||
"jrnlName": "NEW VEHICLE PURCHASES",
|
||||
"jrnlType": "G",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "8",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "25",
|
||||
"jrnlName": "USED WHOLESALE",
|
||||
"jrnlType": "S",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "9",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "75",
|
||||
"jrnlName": "GENERAL PURCHASES",
|
||||
"jrnlType": "G",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "5",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "10",
|
||||
"jrnlName": "NEW VEHICLE SALES",
|
||||
"jrnlType": "S",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "9",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "80",
|
||||
"jrnlName": "GENERAL JOURNAL",
|
||||
"jrnlType": "G",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "3",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "11",
|
||||
"jrnlName": "WORK IN PROGRESS",
|
||||
"jrnlType": "G",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "10",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "56",
|
||||
"jrnlName": "CASH RECEIPTS (BALANCE FWD)",
|
||||
"jrnlType": "G",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "1",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "81",
|
||||
"jrnlName": "STANDARD ENTRIES",
|
||||
"jrnlType": "G",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "6",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "51",
|
||||
"jrnlName": "CASH RECEIPTS JOURNAL - EFT",
|
||||
"jrnlType": "G",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "10",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "61",
|
||||
"jrnlName": "CASH DISBURSMENTS -EFT",
|
||||
"jrnlType": "G",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "10",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
},
|
||||
{
|
||||
"companyNo": "77",
|
||||
"jrnlID": "71",
|
||||
"jrnlName": "USED VEHICLE PURCHASES",
|
||||
"jrnlType": "G",
|
||||
"intercoFlag": "0",
|
||||
"defaultDocType": "8",
|
||||
"errCode": "",
|
||||
"errMsg": ""
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
# Feedback
|
||||
|
||||
- Receiving bad request errors, with no details. API errors page doesn't indicate what's wrong for certain types of error codes.
|
||||
- API Error page works on a several minute delay.
|
||||
@@ -2,13 +2,12 @@ NGROK TEsting:
|
||||
./ngrok.exe http http://localhost:4000 -host-header="localhost:4000"
|
||||
|
||||
Finding deadfiles - run from client directory
|
||||
npx deadfile ./src/index.jsx --exclude build templates
|
||||
npx deadfile ./src/index.js --exclude build templates
|
||||
|
||||
#Crushing all hasura migrations by creating a new initialization from the server.
|
||||
hasura migrate create "Init" --from-server --endpoint https://db.imex.online/ --admin-secret 'Production-ImEXOnline!@#'
|
||||
hasura migrate apply --version "1620771761757" --skip-execution --endpoint https://db.imex.online/ --admin-secret '
|
||||
Production-ImEXOnline!@#'
|
||||
hasura migrate apply --version "1620771761757" --skip-execution --endpoint https://db.imex.online/ --admin-secret 'Production-ImEXOnline!@#'
|
||||
hasura migrate status --endpoint https://db.imex.online/ --admin-secret 'Production-ImEXOnline!@#'
|
||||
|
||||
Generate the license file:
|
||||
$ generate-license-file --input package.json --output third-party-licenses.txt --overwrite
|
||||
Generate the license file:
|
||||
$ generate-license-file --input package.json --output third-party-licenses.txt --overwrite
|
||||
@@ -1,4 +1,5 @@
|
||||
Ensure following environment variables are set:
|
||||
|
||||
Ensure following environment variables are set:
|
||||
|
||||
__S3 Related__
|
||||
AWSAccessKeyId=
|
||||
@@ -1,46 +0,0 @@
|
||||
Glass Setup
|
||||
|
||||
{"ap":{"name":"Accounts Payable","accountdesc":"Accounts Payable","accountitem":"Accounts Payable","accountname":"
|
||||
Accounts Payable","accountnumber":"20000"},"ar":{"name":"Accounts Receivable","accountdesc":"Accounts Receivable","
|
||||
accountitem":"Accounts Receivable","accountname":"Accounts Receivable","accountnumber":"12000"},"
|
||||
costs":[{"name":"Auto Glass Parts","accountdesc":"Glass","accountitem":"Auto Glass Parts","accountname":"Cost of Goods:Auto Glass Parts","accountnumber":"Glass"},{"name":"Auto Glass Labour","accountdesc":"Auto Glass Labour","accountitem":"Auto Glass Labour","accountname":"Cost of Goods:Auto Glass Labour","accountnumber":"Auto Glass Labour"},{"name":"Flat Glass Parts","accountdesc":"Flat Glass ","accountitem":"Flat Glass Parts","accountname":"Cost of Goods:Flat Glass Parts","accountnumber":"Flat Glass Parts"},{"name":"Flat Glass Labour","accountdesc":"Flat Glass ","accountitem":"Flat Glass Labour","accountname":"Cost of Goods:Flat Glass Labour","accountnumber":"Flat Glass Labour"},{"name":"Home Glass Parts","accountdesc":"Home Glass Parts","accountitem":"Home Glass Parts","accountname":"Cost of Goods:Home Glass Parts","accountnumber":"Home Glass Parts"},{"name":"Home Glass Labour","accountdesc":"Home Glass Labour","accountitem":"Home Glass Labour","accountname":"Cost of Goods:Home Glass Labour","accountnumber":"Home Glass Labour"},{"name":"Misc Parts","accountdesc":"Misc Parts","accountitem":"Misc Parts","accountname":"Cost of Goods:Misc Parts","accountnumber":"Misc Parts"}],"
|
||||
taxes":{"local":{"name":"n","rate":0,"accountdesc":"n","accountitem":"n","accountname":"n","accountnumber":"n"},"
|
||||
state":{"name":"PST","rate":7,"accountdesc":"Ministry of Finance (BC)","accountitem":"PST (BC)","accountname":"PST
|
||||
PAYABLE","accountnumber":"PST PAYABLE"},"federal":{"name":"GST","rate":5,"accountdesc":"Receiver General - GST","
|
||||
accountitem":"GST","accountname":"HST/GST PAYABLE","accountnumber":"HST/GST PAYABLE"}},"refund":{"name":"Refund","
|
||||
accountdesc":"ACCOUNTS RECEIVABLE","accountitem":"BODY SHOP_CUSTPAY","accountname":"ACCOUNTS RECEIVABLE","
|
||||
accountnumber":"ACCOUNTS RECEIVABLE"},"
|
||||
profits":[{"name":"Auto Glass Parts","accountdesc":"Auto Glass","accountitem":"Auto Glass Parts","accountname":"Sales:Auto Glass Parts","accountnumber":"APG"},{"name":"Auto Glass Labour","accountdesc":"Auto Glass Labour","accountitem":"Auto Glass Labour","accountname":"Sales:Auto Glass Labour","accountnumber":"APL"},{"name":"Flat Glass Parts","accountdesc":"Flat Glass","accountitem":"Flat Glass Parts","accountname":"Sales:Flat Glass Parts","accountnumber":"FGP"},{"name":"Flat Glass Labour","accountdesc":"Flat Glass Labour","accountitem":"Flat Glass Labour","accountname":"Sales:Flat Glass Labour","accountnumber":"FGL"},{"name":"Home Glass Parts","accountdesc":"Home Glass Parts","accountitem":"Home Glass Parts","accountname":"Sales:Home Glass Parts","accountnumber":"HGP"},{"name":"Home Glass Labour","accountdesc":"Home Glass Labour","accountitem":"Home Glass Labour","accountname":"Sales:Home Glass Labour","accountnumber":"HGL"},{"name":"Misc Parts","accountdesc":"Misc Parts","accountitem":"Misc Parts","accountname":"Sales:Misc Parts","accountnumber":"MP"}],"
|
||||
defaults":{"costs":{"ATS":"Auto Glass Labour","LAB":"Auto Glass Labour","LAD":"Auto Glass Labour","LAE":"Auto Glass
|
||||
Labour","LAF":"Auto Glass Labour","LAG":"Auto Glass Labour","LAM":"Auto Glass Labour","LAR":"Auto Glass Labour","LAS":"
|
||||
Auto Glass Labour","LAU":"Auto Glass Labour","PAA":"Auto Glass Parts","PAC":"Auto Glass Parts","PAL":"Auto Glass
|
||||
Parts","PAM":"Auto Glass Parts","PAN":"Auto Glass Parts","PAO":"Auto Glass Parts","PAP":"Auto Glass Parts","PAR":"Auto
|
||||
Glass Parts","PAS":"Auto Glass Parts","TOW":"Auto Glass Parts","MAPA":"Auto Glass Labour","MASH":"Auto Glass Labour"},"
|
||||
profits":{"ATS":"Auto Glass Labour","LAB":"Auto Glass Labour","LAD":"Auto Glass Labour","LAE":"Auto Glass Labour","
|
||||
LAF":"Auto Glass Labour","LAG":"Auto Glass Labour","LAM":"Auto Glass Labour","LAR":"Auto Glass Labour","LAS":"Auto Glass
|
||||
Labour","LAU":"Auto Glass Labour","PAA":"Auto Glass Parts","PAC":"Auto Glass Parts","PAL":"Auto Glass Parts","PAM":"Auto
|
||||
Glass Parts","PAN":"Auto Glass Parts","PAO":"Auto Glass Parts","PAP":"Auto Glass Parts","PAR":"Auto Glass Parts","PAS":"
|
||||
Auto Glass Parts","TOW":"Auto Glass Parts","MAPA":"Auto Glass Parts","MASH":"Auto Glass Parts"}},"
|
||||
sales_tax_codes":[{"code":"G","local":false,"state":false,"federal":true,"description":"GST Only"},{"code":"S","state":true,"federal":true,"description":"Standard"},{"code":"E","local":false,"state":false,"federal":false,"description":"Exempt"}]}
|
||||
|
||||
Regular Dev Setup
|
||||
{"ap": {"name": "AP", "accountdesc": "Pay to Others", "accountitem": "A/P", "accountname": "AP Acc#", "accountnumber": "
|
||||
Accounts Payable"}, "ar": {"name": "AR", "accountdesc": "1100", "accountitem": "A/R", "accountname": "ACCOUNTS
|
||||
RECEIVABLE", "accountnumber": "1100"}, "
|
||||
costs": [{"name": "Aftermarket", "accountdesc": "Aftermarket", "accountitem": "Aftermarketi", "accountname": "BODY SHOP COST:PARTS:AFTERMARKET", "accountnumber": "Aftermarket"}, {"name": "ATP", "accountdesc": "ATP", "accountitem": "BODY SHOP_ATP", "accountname": "BODY SHOP COST:ATP", "accountnumber": "ATP"}, {"name": "Body", "accountdesc": "BODY SHOP COST:LABOR", "accountitem": "BODY SHOP_LAB", "accountname": "BODY SHOP COST:LABOR:BODY", "accountnumber": "5001"}, {"name": "Detail", "accountdesc": "Detailing", "accountitem": "Detaili", "accountname": "BODY SHOP COST:LABOR:DETAIL", "accountnumber": "Detail"}, {"name": "Daignostic", "accountdesc": "Daignostic", "accountitem": "Daignostici", "accountname": "Daignostic", "accountnumber": "Daignostic"}, {"name": "Electrical", "accountdesc": "Electrical", "accountitem": "Electricali", "accountname": "Electrical", "accountnumber": "Electrical"}, {"name": "Chrome", "accountdesc": "Chrome", "accountitem": "Chromei", "accountname": "Chrome", "accountnumber": "Chrome"}, {"name": "Frame", "accountdesc": "Frame", "accountitem": "Framei", "accountname": "BODY SHOP COST:LABOR:Frame", "accountnumber": "Frame"}, {"name": "Mechanical", "accountdesc": "Mechanical", "accountitem": "Mechanicali", "accountname": "BODY SHOP COST:LABOR:MECHANICAL", "accountnumber": "Mechanical"}, {"name": "Refinish", "accountdesc": "Refinish", "accountitem": "BODY SHOP_LAR", "accountname": "BODY SHOP COST:LABOR:REFINISH", "accountnumber": "5003"}, {"name": "Structural", "accountdesc": "Structural", "accountitem": "Structurali", "accountname": "Structural", "accountnumber": "Structural"}, {"name": "Existing", "accountdesc": "Existing", "accountitem": "Existingi", "accountname": "Existing", "accountnumber": "Existing"}, {"name": "Glass", "accountdesc": "Glass", "accountitem": "Glassi", "accountname": "BODY SHOP COST:PARTS:Glass", "accountnumber": "Glass"}, {"name": "LKQ", "accountdesc": "LKQ", "accountitem": "LKQi", "accountname": "BODY SHOP COST:PARTS:LKQ", "accountnumber": "LKQ"}, {"name": "OEM", "accountdesc": "OEM", "accountitem": "OEMi", "accountname": "BODY SHOP COST:PARTS:OEM", "accountnumber": "OEM"}, {"name": "OEM Partial", "accountdesc": "Partial", "accountitem": "Partial", "accountname": "BODY SHOP COST:PARTS:OEM Partial", "accountnumber": "OEM Partial"}, {"name": "Re-cored", "accountdesc": "cored", "accountitem": "coredi", "accountname": "Re-cored", "accountnumber": "Re-cored"}, {"name": "Remanufactured", "accountdesc": "Remanufactured", "accountitem": "Remanufacturedi", "accountname": "BODY SHOP COST:PARTS:LKQ", "accountnumber": "Remanufactured"}, {"name": "Other", "accountdesc": "Other", "accountitem": "Otheri", "accountname": "Other", "accountnumber": "Other"}, {"name": "Sublet", "accountdesc": "Sublet to Other", "accountitem": "Subleti", "accountname": "BODY SHOP COST:SUBLET", "accountnumber": "Sublet"}, {"name": "Towing", "accountdesc": "Towingd", "accountitem": "Towingi", "accountname": "BODY SHOP COST:TOWING", "accountnumber": "Towing"}, {"name": "Paint Cost", "accountdesc": "Paint Material by Labor", "accountitem": "BODY SHOP_MAPA", "accountname": "BODY SHOP COST:PARTS:Materials", "accountnumber": "paint mat"}, {"name": "Shop Cost", "accountdesc": "Shop Materials by Labor", "accountitem": "BODY SHOP_MASH", "accountname": "BODY SHOP COST:PARTS:Materials", "accountnumber": "shop"}], "
|
||||
taxes": {"local": {"name": "n", "rate": 0, "accountdesc": "n", "accountitem": "n", "accountname": "n", "
|
||||
accountnumber": "n"}, "state": {"name": "PST", "rate": 7, "accountdesc": "Ministry of Finance (BC)", "accountitem": "PST
|
||||
On Sales", "accountname": "PST Payable", "accountnumber": "2220"}, "federal": {"name": "GST", "rate": 5, "
|
||||
accountdesc": "Receiver General - GST", "accountitem": "GST On Sales", "accountname": "GST DUE-NET:GST Collected", "
|
||||
accountnumber": "2200a"}}, "refund": {"name": "Refund", "accountdesc": "1100", "accountitem": "BODY SHOP_CUSTPAY", "
|
||||
accountname": "ACCOUNTS RECEIVABLE", "accountnumber": "1100"}, "
|
||||
profits": [{"name": "Aftermarket", "accountdesc": "Aftermarket", "accountitem": "BODY SHOP_PAA", "accountname": "Aftermarket", "accountnumber": "Aftermarket"}, {"name": "ATP", "accountdesc": "ATP", "accountitem": "BODY SHOP_ATP", "accountname": "ATP", "accountnumber": "ATP"}, {"name": "Body", "accountdesc": "BODY SHOP SALESLABOR:BODY", "accountitem": "BODY SHOP_LAB", "accountname": "BODY SHOP SALES:LABOR:BODY", "accountnumber": "5002"}, {"name": "Detail", "accountdesc": "Detail", "accountitem": "BODY SHOP_DET", "accountname": "Detail", "accountnumber": "Detail"}, {"name": "Daignostic", "accountdesc": "Daignostic", "accountitem": "BODY SHOP_LAD", "accountname": "Daignostic", "accountnumber": "Daignostic"}, {"name": "Electrical", "accountdesc": "Electrical", "accountitem": "BODY SHOP_LAE", "accountname": "Electrical", "accountnumber": "Electrical"}, {"name": "Chrome", "accountdesc": "Chrome", "accountitem": "BODY SHOP_PAC", "accountname": "Chrome", "accountnumber": "Chrome"}, {"name": "Frame", "accountdesc": "Frame", "accountitem": "BODY SHOP_LAF", "accountname": "Frame", "accountnumber": "Frame"}, {"name": "Mechanical", "accountdesc": "Mechanical", "accountitem": "BODY SHOP_LAM", "accountname": "Mechanical", "accountnumber": "Mechanical"}, {"name": "Refinish", "accountdesc": "BODY SHOP SALES:LABOR:REFINISH", "accountitem": "BODY SHOP_LAR", "accountname": "BODY SHOP SALES:LABOR:REFINISH", "accountnumber": "5003"}, {"name": "Structural", "accountdesc": "Structural", "accountitem": "BODY SHOP_LAS", "accountname": "Structural", "accountnumber": "Structural"}, {"name": "Existing", "accountdesc": "Existing", "accountitem": "BODY SHOP_PAE", "accountname": "Existing", "accountnumber": "Existing"}, {"name": "Glass", "accountdesc": "Glass", "accountitem": "BODY SHOP_PAG", "accountname": "Glass", "accountnumber": "Glass"}, {"name": "LKQ", "accountdesc": "LKQ", "accountitem": "BODY SHOP_PAL", "accountname": "BODY SHOP SALES:PARTS:LKQ", "accountnumber": "LKQ"}, {"name": "OEM", "accountdesc": "BODY SHOP SALES:PARTS:OEM", "accountitem": "BODY SHOP_PAN", "accountname": "BODY SHOP SALES:PARTS:OEM", "accountnumber": "OEM"}, {"name": "OEM Partial", "accountdesc": "Partial", "accountitem": "BODY SHOP_PAP", "accountname": "OEM Partial", "accountnumber": "OEM Partial"}, {"name": "Re-cored", "accountdesc": "cored", "accountitem": "BODY SHOP_PAO", "accountname": "Re-cored", "accountnumber": "Re-cored"}, {"name": "Remanufactured", "accountdesc": "Remanufactured", "accountitem": "BODY SHOP_PAO", "accountname": "Remanufactured", "accountnumber": "Remanufactured"}, {"name": "Other", "accountdesc": "Other", "accountitem": "BODY SHOP_PAO", "accountname": "Other", "accountnumber": "Other"}, {"name": "Sublet", "accountdesc": "Sublet", "accountitem": "BODY SHOP_PAS", "accountname": "Sublet", "accountnumber": "Sublet"}, {"name": "Towing", "accountdesc": "Towing", "accountitem": "BODY SHOP_TOW", "accountname": "Towing", "accountnumber": "Towing"}, {"name": "Paint Profit", "accountdesc": "Paint Material Costs by Labor", "accountitem": "BODY SHOP_MAPA", "accountname": "paint", "accountnumber": "paint"}, {"name": "Shop Profit", "accountdesc": "Shop Material Costs by Labor", "accountitem": "BODY SHOP_MASH", "accountname": "shop", "accountnumber": "shop"}], "
|
||||
defaults": {"costs": {"ATS": "ATP", "LAB": "Body", "LAD": "Daignostic", "LAE": "Electrical", "LAF": "Frame", "LAG": "
|
||||
Glass", "LAM": "Mechanical", "LAR": "Refinish", "LAS": "Structural", "LAU": "Detail", "PAA": "Aftermarket", "PAC": "
|
||||
Chrome", "PAL": "LKQ", "PAM": "Remanufactured", "PAN": "OEM", "PAO": "Other", "PAP": "OEM Partial", "PAR": "Re-cored", "
|
||||
PAS": "Sublet", "TOW": "Towing", "MAPA": "Paint Cost", "MASH": "Shop Cost"}, "profits": {"ATS": "ATP", "LAB": "Body", "
|
||||
LAD": "Daignostic", "LAE": "Electrical", "LAF": "Frame", "LAG": "Glass", "LAM": "Mechanical", "LAR": "Refinish", "
|
||||
LAS": "Structural", "LAU": "Detail", "PAA": "Aftermarket", "PAC": "Chrome", "PAL": "LKQ", "PAM": "Remanufactured", "
|
||||
PAN": "OEM", "PAO": "Other", "PAP": "OEM Partial", "PAR": "Re-cored", "PAS": "Sublet", "TOW": "Towing", "MAPA": "Paint
|
||||
Profit", "MASH": "Shop Profit"}}, "
|
||||
sales_tax_codes": [{"code": "G", "local": false, "state": false, "federal": true, "description": "GST Only"}, {"code": "S", "state": true, "federal": true, "description": "Both"}, {"code": "E", "local": false, "state": false, "federal": false, "description": "Exempt"}]}
|
||||
@@ -1,52 +0,0 @@
|
||||
csiqueestions:
|
||||
[{"name": "mailing", "type": "checkbox", "label": "Opt into our mailing list?", "required": false}, {"max": 5, "min": 0, "name": "slider", "type": "slider", "label": "Slide me.", "required": false}, {"name": "feedback", "type": "textarea", "label": "Do you have any general feedback you would like to share?", "required": false}, {"name": "overall", "type": "rate", "label": "How would you rate your overall experience with us?", "required": true}]
|
||||
|
||||
md_ro_statuses
|
||||
{"
|
||||
statuses": ["Open", "Scheduled", "Arrived", "Repair Plan", "Parts", "Body", "Prep", "Paint", "Reassembly", "Sublet", "Detail", "Completed", "Delivered", "Invoiced", "Exported"], "
|
||||
open_statuses": ["Open", "Scheduled", "Arrived", "Repair Plan", "Parts", "Body", "Prep", "Paint", "Reassembly", "Sublet", "Detail"], "
|
||||
default_arrived": "Arrived", "default_exported": "Exported", "default_imported": "Open", "default_invoiced": "
|
||||
Invoiced", "default_completed": "Completed", "default_delivered": "Delivered", "default_scheduled": "Scheduled", "
|
||||
production_statuses": ["Repair Plan", "Parts", "Body", "Prep", "Paint", "Reassembly", "Sublet", "Detail", "Completed"]}
|
||||
|
||||
md_order_status
|
||||
{"statuses": ["Ordered", "Received", "Canceled", "Backordered", "Returned"], "default_bo": "Backordered", "
|
||||
default_ordered": "Ordered", "default_canceled": "Canceled", "default_received": "Received", "default_returned": "
|
||||
Returned"}
|
||||
|
||||
responsibilitycenters
|
||||
{"ap": {"name": "AP", "accountdesc": "Pay to Others", "accountitem": "A/P", "accountname": "AP Acc#", "accountnumber": "
|
||||
Accounts Payable"}, "ar": {"name": "AR", "accountdesc": "1100", "accountitem": "A/R", "accountname": "ACCOUNTS
|
||||
RECEIVABLE", "accountnumber": "1100"}, "
|
||||
costs": [{"name": "Aftermarket", "accountdesc": "Aftermarketd", "accountitem": "Aftermarketi", "accountname": "BODY SHOP COST:PARTS:AFTERMARKET", "accountnumber": "Aftermarket"}, {"name": "ATP", "accountdesc": "ATPd", "accountitem": "BODY SHOP_ATP", "accountname": "BODY SHOP COST:ATP", "accountnumber": "ATP"}, {"name": "Body", "accountdesc": "BODY SHOP COST:LABOR", "accountitem": "BODY SHOP_LAB", "accountname": "BODY SHOP COST:LABOR:BODY", "accountnumber": "5001"}, {"name": "Detail", "accountdesc": "Detaild", "accountitem": "Detaili", "accountname": "BODY SHOP COST:LABOR:DETAIL", "accountnumber": "Detail"}, {"name": "Daignostic", "accountdesc": "Daignosticd", "accountitem": "Daignostici", "accountname": "Daignostic", "accountnumber": "Daignostic"}, {"name": "Electrical", "accountdesc": "Electricald", "accountitem": "Electricali", "accountname": "Electrical", "accountnumber": "Electrical"}, {"name": "Chrome", "accountdesc": "Chromed", "accountitem": "Chromei", "accountname": "Chrome", "accountnumber": "Chrome"}, {"name": "Frame", "accountdesc": "Framed", "accountitem": "Framei", "accountname": "BODY SHOP COST:LABOR:Frame", "accountnumber": "Frame"}, {"name": "Mechanical", "accountdesc": "Mechanicald", "accountitem": "Mechanicali", "accountname": "BODY SHOP COST:LABOR:MECHANICAL", "accountnumber": "Mechanical"}, {"name": "Refinish", "accountdesc": "Refinishd", "accountitem": "BODY SHOP_LAR", "accountname": "BODY SHOP COST:LABOR:REFINISH", "accountnumber": "5003"}, {"name": "Structural", "accountdesc": "Structurald", "accountitem": "Structurali", "accountname": "Structural", "accountnumber": "Structural"}, {"name": "Existing", "accountdesc": "Existingd", "accountitem": "Existingi", "accountname": "Existing", "accountnumber": "Existing"}, {"name": "Glass", "accountdesc": "Glassd", "accountitem": "Glassi", "accountname": "BODY SHOP COST:PARTS:Glass", "accountnumber": "Glass"}, {"name": "LKQ", "accountdesc": "LKQd", "accountitem": "LKQi", "accountname": "BODY SHOP COST:PARTS:LKQ", "accountnumber": "LKQ"}, {"name": "OEM", "accountdesc": "OEMd", "accountitem": "OEMi", "accountname": "BODY SHOP COST:PARTS:OEM", "accountnumber": "OEM"}, {"name": "OEM Partial", "accountdesc": "Partiald", "accountitem": "Partial", "accountname": "BODY SHOP COST:PARTS:OEM Partial", "accountnumber": "OEM Partial"}, {"name": "Re-cored", "accountdesc": "coredd", "accountitem": "coredi", "accountname": "Re-cored", "accountnumber": "Re-cored"}, {"name": "Remanufactured", "accountdesc": "Remanufacturedd", "accountitem": "Remanufacturedi", "accountname": "Remanufactured", "accountnumber": "Remanufactured"}, {"name": "Other", "accountdesc": "Otherd", "accountitem": "Otheri", "accountname": "Other", "accountnumber": "Other"}, {"name": "Sublet", "accountdesc": "Subletd", "accountitem": "Subleti", "accountname": "BODY SHOP COST:SUBLET", "accountnumber": "Sublet"}, {"name": "Towing", "accountdesc": "Towingd", "accountitem": "Towingi", "accountname": "BODY SHOP COST:TOWING", "accountnumber": "Towing"}, {"name": "Paint Mat", "accountdesc": "matd", "accountitem": "mati", "accountname": "BODY SHOP COST:PARTS:Materials", "accountnumber": "paint mat"}, {"name": "shop mat", "accountdesc": "shopd", "accountitem": "shopi", "accountname": "BODY SHOP COST:PARTS:Materials", "accountnumber": "shop"}], "
|
||||
taxes": {"local": {"name": "n", "rate": 0, "accountdesc": "n", "accountitem": "n", "accountname": "n", "
|
||||
accountnumber": "n"}, "state": {"name": "PST", "rate": 7, "accountdesc": "Ministry of Finance (BC)", "accountitem": "PST
|
||||
On Sales", "accountname": "PST Payable", "accountnumber": "2220"}, "federal": {"name": "GST", "rate": 5, "
|
||||
accountdesc": "Receiver General - GST", "accountitem": "GST On Sales", "accountname": "GST DUE-NET:GST Collected", "
|
||||
accountnumber": "2200a"}}, "
|
||||
profits": [{"name": "Aftermarket", "accountdesc": "Aftermarketd", "accountitem": "BODY SHOP_PAA", "accountname": "Aftermarket", "accountnumber": "Aftermarket"}, {"name": "ATP", "accountdesc": "ATPd", "accountitem": "BODY SHOP_ATP", "accountname": "ATP", "accountnumber": "ATP"}, {"name": "Body", "accountdesc": "BODY SHOP SALESLABOR:BODY", "accountitem": "BODY SHOP_LAB", "accountname": "BODY SHOP SALES:LABOR:BODY", "accountnumber": "5002"}, {"name": "Detail", "accountdesc": "Detaild", "accountitem": "BODY SHOP_DET", "accountname": "Detail", "accountnumber": "Detail"}, {"name": "Daignostic", "accountdesc": "Daignosticd", "accountitem": "BODY SHOP_LAD", "accountname": "Daignostic", "accountnumber": "Daignostic"}, {"name": "Electrical", "accountdesc": "Electricald", "accountitem": "BODY SHOP_LAE", "accountname": "Electrical", "accountnumber": "Electrical"}, {"name": "Chrome", "accountdesc": "Chromed", "accountitem": "BODY SHOP_PAC", "accountname": "Chrome", "accountnumber": "Chrome"}, {"name": "Frame", "accountdesc": "Framed", "accountitem": "BODY SHOP_LAF", "accountname": "Frame", "accountnumber": "Frame"}, {"name": "Mechanical", "accountdesc": "Mechanicald", "accountitem": "BODY SHOP_LAM", "accountname": "Mechanical", "accountnumber": "Mechanical"}, {"name": "Refinish", "accountdesc": "BODY SHOP SALES:LABOR:REFINISH", "accountitem": "BODY SHOP_LAR", "accountname": "BODY SHOP SALES:LABOR:REFINISH", "accountnumber": "5003"}, {"name": "Structural", "accountdesc": "Structurald", "accountitem": "BODY SHOP_LAS", "accountname": "Structural", "accountnumber": "Structural"}, {"name": "Existing", "accountdesc": "Existingd", "accountitem": "BODY SHOP_PAE", "accountname": "Existing", "accountnumber": "Existing"}, {"name": "Glass", "accountdesc": "Glassd", "accountitem": "BODY SHOP_PAG", "accountname": "Glass", "accountnumber": "Glass"}, {"name": "LKQ", "accountdesc": "LKQd", "accountitem": "BODY SHOP_PAL", "accountname": "LKQ", "accountnumber": "LKQ"}, {"name": "OEM", "accountdesc": "BODY SHOP SALES:PARTS:OEM", "accountitem": "BODY SHOP_PAN", "accountname": "BODY SHOP SALES:PARTS:OEM", "accountnumber": "OEM"}, {"name": "OEM Partial", "accountdesc": "Partiald", "accountitem": "BODY SHOP_PAP", "accountname": "OEM Partial", "accountnumber": "OEM Partial"}, {"name": "Re-cored", "accountdesc": "coredd", "accountitem": "BODY SHOP_PAO", "accountname": "Re-cored", "accountnumber": "Re-cored"}, {"name": "Remanufactured", "accountdesc": "Remanufacturedd", "accountitem": "BODY SHOP_PAO", "accountname": "Remanufactured", "accountnumber": "Remanufactured"}, {"name": "Other", "accountdesc": "Otherd", "accountitem": "BODY SHOP_PAO", "accountname": "Other", "accountnumber": "Other"}, {"name": "Sublet", "accountdesc": "Subletd", "accountitem": "BODY SHOP_PAS", "accountname": "Sublet", "accountnumber": "Sublet"}, {"name": "Towing", "accountdesc": "Towingd", "accountitem": "BODY SHOP_TOW", "accountname": "Towing", "accountnumber": "Towing"}, {"name": "paint", "accountdesc": "paintd", "accountitem": "BODY SHOP_MAPA", "accountname": "paint", "accountnumber": "paint"}, {"name": "shop", "accountdesc": "shopd", "accountitem": "BODY SHOP_MASH", "accountname": "shop", "accountnumber": "shop"}], "
|
||||
defaults": {"costs": {"ATP": "ATP", "LAB": "Body", "LAD": "Daignostic", "LAE": "Electrical", "LAF": "Frame", "LAG": "
|
||||
Glass", "LAM": "Mechanical", "LAR": "Refinish", "LAS": "Structural", "LAU": "Detail", "PAA": "Aftermarket", "PAC": "
|
||||
Chrome", "PAL": "LKQ", "PAM": "Remanufactured", "PAN": "OEM", "PAO": "Other", "PAP": "OEM Partial", "PAR": "Re-cored", "
|
||||
PAS": "Sublet", "TOW": "Towing", "MAPA": "Paint Mat", "MASH": "shop mat"}, "profits": {"ATP": "ATP", "LAB": "Body", "
|
||||
LAD": "Daignostic", "LAE": "Electrical", "LAF": "Frame", "LAG": "Glass", "LAM": "Mechanical", "LAR": "Refinish", "
|
||||
LAS": "Structural", "LAU": "Detail", "PAA": "Aftermarket", "PAC": "Chrome", "PAL": "LKQ", "PAM": "Remanufactured", "
|
||||
PAN": "OEM", "PAO": "Other", "PAP": "OEM Partial", "PAR": "Re-cored", "PAS": "Sublet", "TOW": "Towing", "MAPA": "
|
||||
paint", "MASH": "shop"}}}
|
||||
|
||||
shoprates: {"rate_atp": 8.68}
|
||||
|
||||
productionconfig: {"
|
||||
columnKeys": [{"key": "alert", "width": 57}, {"key": "ro_number", "width": 65}, {"key": "vehicle", "width": 264.1333465576172}, {"key": "clm_no", "width": 127.39999389648438}, {"key": "ownr", "width": 143}, {"key": "labhrs", "width": 48}, {"key": "larhrs", "width": 53.35003662109375}, {"key": "scheduled_completion", "width": 176}, {"key": "status", "width": 101}, {"key": "note", "width": 179}, {"key": "ct", "width": 74}, {"key": "clm_total"}], "
|
||||
tableState": {"sortedInfo": {"order": "descend", "columnKey": "larhrs"}, "filteredInfo": {}}}
|
||||
|
||||
invoicetaxrates
|
||||
{"local_tax_rate": 0, "state_tax_rate": 7, "federal_tax_rate": 5}
|
||||
|
||||
intakechecklist
|
||||
{"
|
||||
form": [{"name": "item1", "type": "checkbox", "label": "Checklist Item 1", "required": true}, {"name": "item2", "type": "checkbox", "label": "Checklist Item 2", "required": true}, {"name": "item3", "type": "checkbox", "label": "Checklist Item 3", "required": true}, {"name": "item4", "type": "checkbox", "label": "Checklist Item 4", "required": true}], "
|
||||
templates": ["estimate_detail", "estimate_detail2"]}
|
||||
|
||||
ssbucekts
|
||||
[{"id": "express", "lt": 10, "gte": 0, "label": "express", "target": 1}, {"id": "small", "lt": 20, "gte": 10, "label": "small", "target": 2}, {"id": "medium", "lt": 30, "gte": 20, "label": "medium", "target": 3}, {"id": "large", "lt": 40, "gte": 30, "label": "large", "target": 4}, {"id": "heavy", "lt": 60, "gte": 40, "label": "heavy", "target": 5}, {"id": "Insane", "gte": 60, "label": "Insane", "target": 1}]
|
||||
@@ -1,316 +0,0 @@
|
||||
## Microsoft Teams
|
||||
|
||||
Integrating Microsoft Teams into your Node.js backend and React frontend application can enhance communication and workflow efficiency,
|
||||
especially in a body shop management context for the automotive industry. Microsoft Teams provides several ways to integrate its functionalities into your application,
|
||||
including bots, tabs, messaging extensions, webhooks, and connectors. Here's an overview of the options and how to implement them:
|
||||
|
||||
### 0.5 - Share to Teams (TM)
|
||||
|
||||
- https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/share-to-teams-from-web-apps
|
||||
- https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/share-to-teams-from-personal-app-or-tab
|
||||
- https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/device-capabilities/people-picker-capability
|
||||
- (Example of some Teams code Integrations) https://github.com/microsoft/teams-powerapps-app-templates/
|
||||
|
||||
### 1. Microsoft Graph API
|
||||
The Microsoft Graph API is the gateway to data and intelligence in Microsoft 365, including Teams. It allows you to work with Teams data like channels, messages, and more. You can use it to post status changes back to Teams or read data from Teams to affect your site.
|
||||
|
||||
Backend (Node.js): Use the @microsoft/microsoft-graph-client package to make API calls to Teams. You will need to handle authentication with Azure AD, which can be done using the @azure/identity package to get tokens for Graph API requests.
|
||||
|
||||
*Implementation Steps*:
|
||||
|
||||
Register your application in Azure AD to get the client_id and client_secret.
|
||||
|
||||
(Is client_id and client_secret going to be something required for every customer or is it going to be a singleton)
|
||||
Implement OAuth 2.0 authorization flow to obtain access tokens.
|
||||
(This will need to be tracked by association to a bodyshop)
|
||||
|
||||
bodyshop->Channels | People ->Messages
|
||||
|
||||
Use the access token to make requests to the Microsoft Graph API to interact with Teams.
|
||||
|
||||
### 2. Webhooks and Connectors
|
||||
Webhooks allow your application to send notifications to a Teams channel, which is useful for posting status changes. Connectors are a set of predefined webhooks that offer a more integrated experience.
|
||||
|
||||
Setup:
|
||||
In Microsoft Teams, configure an incoming webhook for the channel you want to post messages to.
|
||||
Use the webhook URL to send JSON payloads from your Node.js backend, which can then be displayed in Teams.
|
||||
|
||||
|
||||
### 3. Bots
|
||||
Bots in Teams can interact with users to take commands or post information. You can use the Bot Framework along with the Teams activity handler to create bots that can communicate with your React frontend and Node.js backend.
|
||||
|
||||
Backend (Node.js): Use the botbuilder package to create and manage your bot's interactions with Teams.
|
||||
|
||||
*Implementation Steps*:
|
||||
|
||||
Create a bot registration in Azure Bot Services.
|
||||
Implement the bot logic in your Node.js application using the Bot Framework SDK.
|
||||
Use the Microsoft Bot Framework's TeamsActivityHandler to respond to Teams-specific activities.
|
||||
|
||||
### 4. Tabs
|
||||
Tabs in Teams allow you to integrate web-based content as part of Teams, which can be your React application or specific parts of it. This is particularly useful for creating a seamless experience within Teams.
|
||||
|
||||
*Implementation Steps*:
|
||||
- Create a Teams app manifest that defines your tab and its configuration.
|
||||
- Host your React application or the specific parts you want to embed as a tab.
|
||||
- Use the Teams SDK in your React application to interact with Teams context and APIs.
|
||||
|
||||
*Getting Started*:
|
||||
Microsoft Teams Toolkit for Visual Studio Code: This toolkit simplifies the process of setting up your Teams application, including authentication, configuration, and deployment.
|
||||
Documentation and Samples: Microsoft provides extensive documentation and sample code for developing Teams applications, which can be invaluable for getting started and solving specific challenges.
|
||||
Implementing these features requires a good understanding of both the Microsoft Teams platform and your application's architecture.
|
||||
Start small, perhaps by implementing notifications via webhooks, and gradually add more complex integrations like bots or tabs based on your needs and user feedback.
|
||||
|
||||
### Examples:
|
||||
|
||||
##### Posting Messages to a Teams Channel Using Incoming Webhooks
|
||||
|
||||
1 - Set up an Incoming Webhook in Microsoft Teams:
|
||||
- Go to the Teams channel where you want to post messages.
|
||||
- Click on the three dots (...) next to the channel name and select Connectors.
|
||||
- Search for Incoming Webhook, click Add, and then Configure.
|
||||
- Name your webhook, upload an image if desired, and click Create.
|
||||
- Copy the webhook URL provided.
|
||||
|
||||
(Patrick Note: The clients might have issues with setting up webhooks, it requires a lot of user configuration and our users are not technical).
|
||||
|
||||
2 - Node.js Code to Post a Message:
|
||||
|
||||
Ensure you have axios or any HTTP client library installed in your Node.js project. If not, you can install axios via npm: npm install axios.
|
||||
Use the following code snippet to post a message to the Teams channel:
|
||||
|
||||
```javascript
|
||||
const axios = require('axios');
|
||||
|
||||
// Replace 'YOUR_WEBHOOK_URL' with your actual webhook URL
|
||||
const webhookUrl = 'YOUR_WEBHOOK_URL';
|
||||
|
||||
const message = {
|
||||
"@type": "MessageCard",
|
||||
"@context": "http://schema.org/extensions",
|
||||
"summary": "Issue 176715375",
|
||||
"themeColor": "0078D7",
|
||||
"title": "Issue opened: \"Push notifications not working\"",
|
||||
"sections": [{
|
||||
"activityTitle": "A new issue was created",
|
||||
"activitySubtitle": "Today, 2:36 PM",
|
||||
"activityImage": "https://example.com/issues/image.png",
|
||||
"facts": [{
|
||||
"name": "Repository:",
|
||||
"value": "Repo name"
|
||||
},
|
||||
{
|
||||
"name": "Issue #:",
|
||||
"value": "176715375"
|
||||
}
|
||||
],
|
||||
"markdown": true
|
||||
}]
|
||||
};
|
||||
|
||||
axios.post(webhookUrl, message)
|
||||
.then(response => console.log('Successfully sent message to Teams channel'))
|
||||
.catch(error => console.error('Error sending message to Teams channel', error));
|
||||
```
|
||||
|
||||
#### Creating a Simple Bot for Teams
|
||||
1 Prerequisites:
|
||||
- Register your bot with the Microsoft Bot Framework and get your bot's App ID and App Password.
|
||||
- Use the Bot Framework SDK for JavaScript.
|
||||
2 Install Dependencies:
|
||||
- You need to install the botbuilder package. Run npm install botbuilder.
|
||||
|
||||
The following example demonstrates a simple bot that echoes back received messages.
|
||||
|
||||
```javascript
|
||||
const { BotFrameworkAdapter, MemoryStorage, ConversationState, TurnContext } = require('botbuilder');
|
||||
|
||||
// Create adapter.
|
||||
// See https://aka.ms/about-bot-adapter to learn more about adapters.
|
||||
const adapter = new BotFrameworkAdapter({
|
||||
appId: process.env.MicrosoftAppId,
|
||||
appPassword: process.env.MicrosoftAppPassword
|
||||
});
|
||||
|
||||
// Create conversation state with in-memory storage provider.
|
||||
const conversationState = new ConversationState(new MemoryStorage());
|
||||
adapter.use(conversationState);
|
||||
|
||||
// Listen for incoming requests.
|
||||
server.post('/api/messages', (req, res) => {
|
||||
adapter.processActivity(req, res, async (context) => {
|
||||
// Echo back what the user said
|
||||
if (context.activity.type === 'message') {
|
||||
await context.sendActivity(`You said '${context.activity.text}'`);
|
||||
}
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
Running Your Bot:
|
||||
- Make sure to expose your bot endpoint (/api/messages in this case) to the internet using a service like ngrok.
|
||||
- Update your bot's messaging endpoint in the Microsoft Bot Framework portal to point to the ngrok URL.
|
||||
|
||||
### Slash Commands (Bot)
|
||||
1 - Create a Microsoft Teams App: You need to develop a Teams app that can interact with users through commands. This involves using the Microsoft Teams Developer Platform and possibly the Bot Framework.
|
||||
2 - Use Bots for Custom Commands: The primary way to introduce custom slash commands in Teams is through bots. Bots can respond to specific commands (or messages) that are input by users. When you create a bot for Teams, you can define custom commands that the bot will recognize and respond to.
|
||||
3 - Developing the Bot: You can develop a bot using the Microsoft Bot Framework. This allows your bot to receive and send messages to a Teams channel or chat. Within your bot's code, you can define what actions to take when it receives specific commands.
|
||||
4 - Register Your Bot with Microsoft Bot Framework: Register your bot with the Microsoft Bot Framework and configure it to work with Microsoft Teams. This step involves getting a Microsoft App ID and password that are necessary for your bot to communicate with the Teams platform.
|
||||
5 - Add Your Bot to Microsoft Teams: Once your bot is developed and registered, you can package your Teams app (which includes the bot) and upload it to Microsoft Teams. This will make your bot available to users within Teams, where they can interact with it using the custom commands you've defined.
|
||||
6 - Handling Slash Commands: In the context of your bot's code, you will need to interpret messages that start with a slash (/) as commands. You can then parse the command text and perform the appropriate actions or respond accordingly.
|
||||
7 - Publish Your App: For broader distribution, you can publish your Teams app to the Teams app store or distribute it within your organization through the Teams admin center.
|
||||
/ <command> <arb> ....
|
||||
(Unrelated to teams but then used in teams for functionality)
|
||||
- A Job has a todo list
|
||||
- a todo item may have an employee
|
||||
- a todo item may have a due date
|
||||
- a todo item may have a priority
|
||||
|
||||
--- Call notes ----
|
||||
- Tasks (TODO List)
|
||||
- EMail reminders
|
||||
|
||||
## Slack
|
||||
|
||||
Integrating Slack into your Node.js backend and React frontend application can significantly streamline communication and operations for your automotive industry body shop management software. Slack offers various integration points including bots, apps, webhooks, and its rich API to facilitate interactions between your application and Slack workspace. Here's how you can leverage these integration points:
|
||||
|
||||
### 1. **Slack Web API**
|
||||
|
||||
The Slack Web API allows you to interact with Slack, enabling functionalities like sending messages, managing channels, and more directly from your application.
|
||||
|
||||
- **Backend (Node.js)**: Utilize the `@slack/web-api` package to make API calls from your Node.js backend. This will be the backbone for actions such as posting status updates to Slack channels or handling commands from Slack that can affect your site.
|
||||
|
||||
- **Implementation Steps**:
|
||||
1. Create a Slack app in your Slack workspace and obtain the API tokens.
|
||||
2. Use the `@slack/web-api` package to authenticate and interact with Slack API endpoints.
|
||||
3. Implement features such as sending messages or processing events from Slack.
|
||||
|
||||
### 2. **Incoming Webhooks**
|
||||
|
||||
For simpler integrations focused on sending notifications to Slack channels, incoming webhooks are straightforward and effective. They allow you to send messages to a specific channel without a full-blown app.
|
||||
|
||||
- **Setup**:
|
||||
1. Create an incoming webhook from the Slack app configuration page.
|
||||
2. Use the webhook URL to send messages from your Node.js backend by making simple HTTP POST requests with your message payload.
|
||||
|
||||
### 3. **Bots**
|
||||
|
||||
Slack bots can facilitate interactive experiences within your Slack workspace, responding to commands, posting notifications, or even pulling data from your site on demand.
|
||||
|
||||
- **Backend (Node.js)**: Leverage the `@slack/bolt` framework, which simplifies creating Slack bots with event handling, messaging, and built-in OAuth support.
|
||||
|
||||
- **Implementation Steps**:
|
||||
1. Create a Slack app and enable bot features.
|
||||
2. Use the `@slack/bolt` package to develop your bot, handling events like messages or commands.
|
||||
3. Deploy your bot and set it to listen to incoming events from Slack.
|
||||
|
||||
### 4. **Slack Block Kit**
|
||||
|
||||
For more engaging and interactive messages, Slack's Block Kit provides a UI framework that allows you to create richly formatted messages, modals, and more.
|
||||
|
||||
- **Frontend (React)** and **Backend (Node.js)**: Utilize Slack's Block Kit to design complex messages with buttons, sections, and interactive components. You can send these payloads through the Web API or from bots to enhance your app's interaction with users.
|
||||
|
||||
### Getting Started
|
||||
|
||||
- **Slack API Documentation and Tools**: Slack's API documentation is comprehensive and includes tutorials, tooling (like Block Kit Builder), and SDK documentation to help you get started.
|
||||
|
||||
- **Testing and Development**: Slack provides a sandbox environment for you to test your app's integrations and interactions without affecting your live workspace.
|
||||
|
||||
To integrate Slack into your application effectively, start by planning out the interactions you need (e.g., notifications, commands, information retrieval) and map these to the appropriate Slack features. Then, incrementally build and test each integration, utilizing Slack's development tools and your existing Node.js and React knowledge to create a seamless experience for your users.
|
||||
|
||||
#### Examples
|
||||
|
||||
1. Incoming Webhooks
|
||||
Incoming Webhooks are a simple way to post messages from your Node.js application into Slack channels. They're perfect for notifying team members about status changes or updates.
|
||||
|
||||
Setup:
|
||||
|
||||
1 - Create a new Slack app in your workspace and enable incoming webhooks.
|
||||
2 - Add a new webhook to your app and choose the channel it will post to.
|
||||
3 - Use the webhook URL to send messages from your backend.
|
||||
|
||||
Node.js Example:
|
||||
|
||||
```javascript
|
||||
|
||||
const axios = require('axios');
|
||||
const webhookUrl = 'YOUR_SLACK_WEBHOOK_URL';
|
||||
|
||||
async function postMessageToSlack(message) {
|
||||
await axios.post(webhookUrl, {
|
||||
text: message, // Your message here
|
||||
});
|
||||
}
|
||||
|
||||
postMessageToSlack('New status update on the automotive project!').catch(console.error);
|
||||
```
|
||||
2. Bots
|
||||
Slack bots can interact with users via messages, respond to commands, and even post updates. They're great for building interactive features.
|
||||
|
||||
Setup:
|
||||
|
||||
1 - Create a Slack app and add the Bot Token Scopes (like chat:write).
|
||||
2 - Install the app to your workspace to get your bot token.
|
||||
3 - Use the @slack/bolt framework for easy bot development in Node.js.
|
||||
|
||||
Node.js Example:
|
||||
|
||||
```javascript
|
||||
const { App } = require('@slack/bolt');
|
||||
|
||||
const app = new App({
|
||||
token: process.env.SLACK_BOT_TOKEN, // Set your bot's access token here
|
||||
signingSecret: process.env.SLACK_SIGNING_SECRET // Set your app's signing secret here
|
||||
});
|
||||
|
||||
app.message('hello', async ({ message, say }) => {
|
||||
await say(`Hey there <@${message.user}>!`);
|
||||
});
|
||||
|
||||
(async () => {
|
||||
await app.start(process.env.PORT || 3000);
|
||||
console.log('Slack bot is running!');
|
||||
})();
|
||||
```
|
||||
|
||||
3. Slash Commands
|
||||
Slash Commands allow users to interact with your application directly from Slack by typing commands that start with /.
|
||||
|
||||
Setup:
|
||||
|
||||
1 - Create a Slack app and configure a new Slash Command (e.g., /statusupdate).
|
||||
2 - Point the command request URL to your Node.js backend endpoint.
|
||||
3 - Implement the endpoint to handle the command and respond accordingly.
|
||||
|
||||
Node.js Example:
|
||||
|
||||
```javascript
|
||||
const express = require('express');
|
||||
const bodyParser = require('body-parser');
|
||||
|
||||
const app = express();
|
||||
app.use(bodyParser.urlencoded({ extended: false }));
|
||||
|
||||
app.post('/slack/commands/statusupdate', (req, res) => {
|
||||
const { text, user_name } = req.body; // Command input and user info
|
||||
// Logic to handle the command goes here. For example, update a status or fetch information.
|
||||
res.send(`Status update received: ${text} - from ${user_name}`);
|
||||
});
|
||||
|
||||
app.listen(process.env.PORT || 3000, () => console.log('Server is running'));
|
||||
```
|
||||
|
||||
4. Interactive Components
|
||||
Interactive components like buttons or menus can make your Slack messages more engaging and interactive.
|
||||
|
||||
Setup:
|
||||
1 - Enable Interactivity in your Slack app settings.
|
||||
2 - Implement an endpoint in your Node.js backend to handle interactions.
|
||||
3 - Send messages with interactive components from your backend.
|
||||
|
||||
Implementing these features into your Node.js and React application will enable a more dynamic and integrated experience for users of your body shop management software. Start with the simpler integrations like webhooks and progressively incorporate bots and interactive components as needed.
|
||||
|
||||
ACTION ITEMS:
|
||||
- Slot in tasks, this will be a dependency for things we want to do in the future.
|
||||
- This would involve GUI components
|
||||
- This would involve a backend component
|
||||
@@ -1,64 +0,0 @@
|
||||
# Setting up External Networking and Static IP for WSL2 using Hyper-V
|
||||
|
||||
This guide will walk you through the steps to configure your WSL2 (Windows Subsystem for Linux) instance to use an external Hyper-V virtual switch, enabling it to connect directly to your local network. Additionally, you'll learn how to assign a static IP address to your WSL2 instance.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. **Windows 11**
|
||||
2. **Docker Desktop For Windows (Latest Version)
|
||||
|
||||
# Docker Setup
|
||||
Inside the root of the project exists the `docker-compose.yaml` file, you can simply run
|
||||
`docker-compose up` to launch the backend.
|
||||
|
||||
Things to note:
|
||||
- When installing NPM packages, you will need to rebuild the `node-app` container
|
||||
- Making changes to the server files will restart the `node-app`
|
||||
|
||||
# Local Stack
|
||||
- LocalStack Front end (Optional) - https://apps.microsoft.com/detail/9ntrnft9zws2?hl=en-us&gl=US
|
||||
- http://localhost:4566/_aws/ses will allow you to see emails sent
|
||||
|
||||
# Docker Commands
|
||||
|
||||
## General `docker-compose` Commands:
|
||||
1. Bring up the services, force a rebuild of all services, and do not use the cache: `docker-compose up --build --no-cache`
|
||||
2. Start Containers in Detached Mode: This will run the containers in the background (detached mode): `docker-compose up -d`
|
||||
3. Stop and Remove Containers: Stops and removes the containers gracefully: `docker-compose down`
|
||||
4. Stop containers without removing them: `docker-compose stop`
|
||||
5. Remove Containers, Volumes, and Networks: `docker-compose down --volumes`
|
||||
6. Force rebuild of containers: `docker-compose build --no-cache`
|
||||
7. View running Containers: `docker-compose ps`
|
||||
8. View a specific containers logs: `docker-compose logs <container-name>`
|
||||
9. Scale services (multiple instances of a service): `docker-compose up --scale <container-name>=<instances number> -d`
|
||||
10. Watch a specific containers logs in realtime with timestamps: `docker-compose logs -f --timestamps <container-name>`
|
||||
|
||||
## Volume Management Commands
|
||||
1. List Docker volumes: `docker volume ls`
|
||||
2. Remove Unused volumes `docker volume prune`
|
||||
3. Remove specific volumes `docker volume rm <volume-name>`
|
||||
4. Inspect a volume: `docker volume inspect <volume-name>`
|
||||
|
||||
## Container Image Management Commands:
|
||||
1. List running containers: `docker ps`
|
||||
2. List all containers: `docker os -a`
|
||||
3. Remove Stopped containers: `docker container prune`
|
||||
4. Remove a specific container: `docker container rm <container-name>`
|
||||
5. Remove a specific image: `docker rmi <image-name>:<version>`
|
||||
6. Remove all unused images: `docker image prune -a`
|
||||
|
||||
## Network Management Commands:
|
||||
1. List networks: `docker network ls`
|
||||
2. Inspect a specific network: `docker network inspect <network-name>`
|
||||
3. Remove a specific network: `docker network rm <network-name>`
|
||||
4. Remove unused networks: `docker network prune`
|
||||
|
||||
## Debugging and maintenance:
|
||||
1. Enter a Running container: `docker exec -it <container name> /bin/bash` (could also be `/bin/sh` or for example `redis-cli` on a redis node)
|
||||
2. View container resource usage: `docker stats`
|
||||
3. Check Disk space used by Docker: `docker system df`
|
||||
4. Remove all unused Data (Nuclear option): `docker system prune`
|
||||
|
||||
## Specific examples
|
||||
1. To simulate a Clean state, one should run `docker system prune` followed by `docker volume prune -a`
|
||||
2. You can run `docker-compose up` without the `-d` option, and you will get what is identical to the experience you were used to, this includes being able to control-c and bring the entire stack down
|
||||
@@ -1,79 +0,0 @@
|
||||
**Create an SSH key for local computer**
|
||||
|
||||
ssh-keygen -t rsa -C "your_email@example.com"
|
||||
|
||||
Copy the new key to clipboard:
|
||||
|
||||
- Windows: clip < id_rsa.pub
|
||||
- Linux: sudo apt-get install xclip
|
||||
xclip -sel clip < ~/.ssh/id_rsa.pub
|
||||
- Mac: pbcopy < ~/.ssh/id_rsa.pub
|
||||
- Manual Copy: cat ~/.ssh/id_rsa.pub
|
||||
|
||||
Add the SSH key to the drop creation screen.
|
||||
|
||||
1. Create a new user to replace root user
|
||||
1. # adduser imex
|
||||
2. # usermod -aG sudo imex
|
||||
3. # su - imex
|
||||
4. $ mkdir ~/.ssh
|
||||
5. $ chmod 700 ~/.ssh
|
||||
6. $ nano ~/.ssh/authorized_keys
|
||||
7. Add the copied SSH key and save.
|
||||
8. $ chmod 600 ~/.ssh/authorized_keys #Restrict access to authorized keys.
|
||||
2. Setup the Firewall
|
||||
1. $ sudo ufw allow OpenSSH.
|
||||
2. $ sudo ufw enable
|
||||
3. Add Nginx & Configure
|
||||
1. $ sudo apt-get update
|
||||
2. $ sudo apt-get install nginx
|
||||
3. $ sudo ufw allow 'Nginx Full'
|
||||
4. $ sudo ufw app list
|
||||
1. Nginx Full: Opens both port 80 (normal, unencrypted web traffic) and port 443 (TLS/SSL encrypted traffic)
|
||||
2. Nginx Http: Opens only port 80 (normal, unencrypted web traffic)
|
||||
3. Nginx Https: Opens only port 443 (TLS/SSL encrypted traffic)
|
||||
5. Should now be able to go to IP and see nginx responding with a blank page.
|
||||
4. Install NodeJs
|
||||
1. $ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
|
||||
2. $ sudo apt install nodejs
|
||||
3. $ node --version
|
||||
5. Clone Source Code
|
||||
1. $ git clone git@bitbucket.org:snaptsoft/bodyshop.git //Requires SSH setup.
|
||||
2. $ cd bodyshop && npm install //Install all server dependencies.
|
||||
6. Setup PM2
|
||||
1. $ npm install pm2 -g //Had to be run as root.
|
||||
2. $ pm2 start ecosystem.config.js
|
||||
3. $ pm2 startup ubuntu //Ensure it starts when server does.
|
||||
7. Alter Nginx config
|
||||
1. sudo nano /etc/nginx/sites-available/default
|
||||
2. //Add Appropriate server names to the file. www. and non-www.
|
||||
3. Add the following inside the location of the server block: (Remove the 404 bit.)
|
||||
proxy_pass http://localhost:5000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
8. Install Certbot
|
||||
9. $ sudo add-apt-repository ppa:certbot/certbot //Potential issue on ubuntu 20.04
|
||||
10. $ sudo apt-get update
|
||||
11. $ sudo apt install python-certbot-nginx
|
||||
12. $ sudo nano /etc/nginx/sites-available/default
|
||||
13. Find the existing server_name line and replace the underscore with your domain name:
|
||||
...
|
||||
server_name example.com www.example.com;
|
||||
...
|
||||
14. $ sudo nginx -t //Verify syntax.
|
||||
15. $ sudo systemctl reload nginx
|
||||
##AWS INSTRUCTIONS
|
||||
$ sudo snap install core; sudo snap refresh core
|
||||
$ sudo snap install --classic certbot
|
||||
$ sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
||||
16. Generate Certificate
|
||||
17. $ sudo certbot --nginx -d example.com -d www.example.com //Follow prompts.
|
||||
18. $ sudo certbot renew --dry-run //Dry run to test auto renewal.
|
||||
|
||||
ADding Yarn
|
||||
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
||||
sudo apt-get update && sudo apt-get install yarn
|
||||
@@ -1,16 +0,0 @@
|
||||
1. Create a new project
|
||||
2. Setup sign in methods to be user and email only.
|
||||
3. Update .env to include config.
|
||||
4. Setup the Firebase CLI
|
||||
1. cd to client firebase at server directory.
|
||||
2. ensure all dependencies installed
|
||||
1. $ npm install firebase-functions@latest firebase-admin@latest --save
|
||||
2. $ npm install -g firebase-tools
|
||||
3. $ firebase login //Login as needed.
|
||||
5. Set the current projct
|
||||
1. firebase use <projectname>
|
||||
6. Deploy the function
|
||||
1. $ firebase deploy --only functions
|
||||
7. Add the allowed domains.
|
||||
8. Update server variables including FIREBASE_ADMINSDK_JSON, FIREBASE_DATABASE_URL
|
||||
9. Create the firestore and copy the rules from dev for userinstances.
|
||||
@@ -1,41 +0,0 @@
|
||||
# Production Board Notes:
|
||||
|
||||
## General Notes
|
||||
|
||||
- You can single click the lane footer to collapse/un-collapse the lane
|
||||
- You can double click the lane header to collapse/un-collapse the lane
|
||||
- If you need to scroll horizontally, you can hold shift and use the mouse scroll wheel, or press the mouse scroll wheel while scrolling
|
||||
|
||||
## Board Settings
|
||||
|
||||
#### Layout
|
||||
|
||||
- Board Orientation (Vertical or Horizontal)
|
||||
- This determines the orientation of the card layout on the board.
|
||||
- Horizontal is the default setting, and how the prior board was set up.
|
||||
- Vertical is the new setting and allows lanes to be displayed vertically, with a grid of cards
|
||||
- Card Size (Small, Medium, Large)
|
||||
- This determines the size of the cards on the board.
|
||||
- Small is the default setting, and how the prior board was set up.
|
||||
- Medium and Large are new settings and allow for larger cards to be displayed on the board.
|
||||
- Compact Cards (Tall or Wide)
|
||||
- Formally called 'Compact'
|
||||
- When on, data is displayed on the card vertically
|
||||
- when turned off, some fields may share horizontal space, tightening the card layout
|
||||
- Colored Cards (On or Off)
|
||||
- When on, cards are colored based on the Status color
|
||||
- Kiosk Mode (On or Off)
|
||||
- This should be turned on if the shop is using it on a tablet (Ipad)
|
||||
|
||||
#### Information
|
||||
|
||||
These allow users to turn fields on or off, turning them all off will show the card in the most minimal form
|
||||
|
||||
|
||||
### Statistics
|
||||
|
||||
- The statistics section allows users to see accumulations of both jobs on the board, and jobs in production.
|
||||
- you can click a statistic to turn it on and off, and drag and drop the statistics to rearrange them
|
||||
|
||||
### Filters
|
||||
- Allows you to set, and persist filters for estimators and insurance companies
|
||||
@@ -1,189 +0,0 @@
|
||||
# Filters and Sorters
|
||||
|
||||
This documentation details the schema required for `.filters` files on the report server. It is used to dynamically
|
||||
modify the graphQL query and provide the user more power over their reports.
|
||||
|
||||
For filters and sorters, valid types include (`type` key in the schema):
|
||||
- string (default)
|
||||
- number
|
||||
- bool or boolean
|
||||
- date
|
||||
|
||||
## Special Notes
|
||||
- When passing the data to the template server, the property filters and sorters is added to the data object and will reflect the filters and sorters the user has selected
|
||||
|
||||
## High level Schema Overview
|
||||
|
||||
```javascript
|
||||
const schema = {
|
||||
"filters": [
|
||||
{
|
||||
"name": "jobs.joblines.mod_lb_hrs", // Name and path of the field in the graphQL query
|
||||
"translation": "jobs.joblines.mod_lb_hrs_1", // Translation key for the label used in the GUI
|
||||
"label": "mod_lb_hrs_1", // Label used in the case the GUI does not contain a translation
|
||||
"type": "number" // Type of field, can be number or string currently
|
||||
},
|
||||
// ... more filters
|
||||
],
|
||||
"sorters": [
|
||||
{
|
||||
"name": "jobs.joblines.mod_lb_hrs", // Name and path of the field in the graphQL query
|
||||
"translation": "jobs.joblines.mod_lb_hrs_1", // Translation key for the label used in the GUI
|
||||
"label": "mod_lb_hrs_1", // Label used in the case the GUI does not contain a translation
|
||||
"type": "number" // Type of field, can be number or string currently
|
||||
},
|
||||
// ... more sorters
|
||||
],
|
||||
"dates": {
|
||||
// This is not yet implemented and will be added in a future release
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Filters
|
||||
|
||||
Filters effect the where clause of the graphQL query. They are used to filter the data returned from the server.
|
||||
A note on special notation used in the `name` field.
|
||||
|
||||
## Reflection
|
||||
|
||||
Filters can make use of reflection to pre-fill select boxes, the following is an example of that in the filters file.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "jobs.status",
|
||||
"translation": "jobs.fields.status",
|
||||
"label": "Status",
|
||||
"type": "string",
|
||||
"reflector": {
|
||||
"type": "internal",
|
||||
"name": "special.job_statuses"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
in this example, a reflector with the type 'internal' (all types at the moment require this, and it is used for future functionality), with a name of `special.job_statuses`
|
||||
|
||||
The following cases are available
|
||||
|
||||
- `special.job_statuses` - This will reflect the statuses of the jobs table `bodyshop.md_ro_statuses.statuses'`
|
||||
- `special.cost_centers` - This will reflect the cost centers `bodyshop.md_responsibility_centers.costs`
|
||||
- `special.categories` - This will reflect the categories `bodyshop.md_categories`
|
||||
- `special.insurance_companies` - This will reflect the insurance companies `bodyshop.md_ins_cos`'
|
||||
- `special.employee_teams` - This will reflect the employee teams `bodyshop.employee_teams`
|
||||
- `special.employees` - This will reflect the employees `bodyshop.employees`
|
||||
- `special.first_names` - This will reflect the first names `bodyshop.employees`
|
||||
- `special.last_names` - This will reflect the last names `bodyshop.employees`
|
||||
- `special.referral_sources` - This will reflect the referral sources `bodyshop.md_referral_sources`
|
||||
- `special.class`- This will reflect the class `bodyshop.md_classes`
|
||||
- `special.lost_sale_reasons` - This will reflect the lost sale reasons `bodyshop.md_lost_sale_reasons`
|
||||
- `special.alt_transports` - This will reflect the alternative transports `bodyshop.appt_alt_transport`
|
||||
- `special.payment_types` - This will reflect the payment types `bodyshop.md_payment_types`
|
||||
- `special.payment_payers` - This is a special case with a key value set of [Customer, Insurance]
|
||||
|
||||
### Path without brackets, multi level
|
||||
|
||||
`"name": "jobs.joblines.mod_lb_hrs",`
|
||||
This will produce a where clause at the `joblines` level of the graphQL query,
|
||||
|
||||
```graphql
|
||||
query gendoc_hours_sold_detail_open($starttz: timestamptz!, $endtz: timestamptz!) {
|
||||
jobs(
|
||||
where: {date_invoiced: {_is_null: true}, date_open: {_gte: $starttz, _lte: $endtz}, ro_number: {_is_null: false}, voided: {_eq: false}}
|
||||
) {
|
||||
joblines(
|
||||
order_by: {line_no: asc}
|
||||
where: {removed: {_eq: false}, mod_lb_hrs: {_lt: 3}}
|
||||
) {
|
||||
line_no
|
||||
mod_lbr_ty
|
||||
mod_lb_hrs
|
||||
convertedtolbr
|
||||
convertedtolbr_data
|
||||
}
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
plate_no
|
||||
ro_number
|
||||
status
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
v_vin
|
||||
v_color
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Path with brackets,top level
|
||||
|
||||
`"name": "[jobs].joblines.mod_lb_hrs",`
|
||||
This will produce a where clause at the `jobs` level of the graphQL query.
|
||||
|
||||
```graphql
|
||||
query gendoc_hours_sold_detail_open($starttz: timestamptz!, $endtz: timestamptz!) {
|
||||
jobs(
|
||||
where: {date_invoiced: {_is_null: true}, date_open: {_gte: $starttz, _lte: $endtz}, ro_number: {_is_null: false}, voided: {_eq: false}, joblines: {mod_lb_hrs: {_gt: 4}}}
|
||||
) {
|
||||
joblines(
|
||||
order_by: {line_no: asc}
|
||||
where: {removed: {_eq: false}}
|
||||
) {
|
||||
line_no
|
||||
mod_lbr_ty
|
||||
mod_lb_hrs
|
||||
convertedtolbr
|
||||
convertedtolbr_data
|
||||
}
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
plate_no
|
||||
ro_number
|
||||
status
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
v_vin
|
||||
v_color
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Known Caveats
|
||||
|
||||
- Will only support two level of nesting in the graphQL query `jobs.joblines.mod_lb_hrs` vs `[jobs].joblines.mod_lb_hrs`
|
||||
is fine, but `jobs.[joblines.].some_table.mod_lb_hrs` is not.
|
||||
- The type object must be 'string' or 'number' or 'bool' or 'boolean' or 'date' and is case-sensitive.
|
||||
- The `translation` key is used to look up the label in the GUI, if it is not found, the `label` key is used.
|
||||
- Do not add the ability to filter things that are already filtered as part of the original query, this would be
|
||||
redundant and could cause issues.
|
||||
- Do not add the ability to filter on things like FK constraints, must like the above example.
|
||||
- *INHERITANCE CAVEAT* If you have a filters file on a parent report that has a child that you do not want the filters inherited from, you must place a blank filters file (valid json so {}) on the child report level. This will than fetch the child filters, which are empty and move along, versus inheriting the parent filters.
|
||||
|
||||
## Sorters
|
||||
|
||||
- Sorters follow the same schema as filters, however, they do not do square bracket wrapping to indicate level hoisting,
|
||||
a filter added on `job.md_status` would be added at the top level, and a filter added on `jobs.joblines.mod_lb_hrs`
|
||||
would be added at the `joblines` level.
|
||||
- Most of the reports currently do sorting on a template level, this will need to change to actually see the results
|
||||
using the sorters.
|
||||
|
||||
### Default Sorters
|
||||
|
||||
- A sorter can be given a default object containing a `order` and `direction` key value. This will be used to sort the report if the user does not select any of the sorters themselves.
|
||||
- The `order` key is the order in which the sorters are applied, and the `direction` key is the direction of the sort, either `asc` or `desc`.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "jobs.joblines.mod_lb_hrs",
|
||||
"translation": "jobs.joblines.mod_lb_hrs_1",
|
||||
"label": "mod_lb_hrs_1",
|
||||
"type": "number",
|
||||
"default": {
|
||||
"order": 1,
|
||||
"direction": "asc"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"mobile": "date",
|
||||
"allAccess": "bool",
|
||||
"timetickets": "date",
|
||||
"payments": "date",
|
||||
"partsorders": "date",
|
||||
"bills": "Date",
|
||||
"export": "date",
|
||||
"csi": "Date",
|
||||
"courtesycars": "date",
|
||||
"media": "date",
|
||||
"visualboard": "date",
|
||||
"scoreboard": "date",
|
||||
"checklist": "date",
|
||||
"smartscheduling" :"date",
|
||||
"roguard": "date"
|
||||
}
|
||||
@@ -1,570 +0,0 @@
|
||||
{
|
||||
"ar": {
|
||||
"accountname": "ACCOUNTS RECEIVABLE"
|
||||
},
|
||||
"costs": [
|
||||
{
|
||||
"name": "Sublet",
|
||||
"accountdesc": "C/S SUBLET REPAIRS/BODY SHOP",
|
||||
"accountitem": "Aftermarketi",
|
||||
"accountname": "C/S SUBLET REPAIRS/BODY SHOP",
|
||||
"accountnumber": "Aftermarket",
|
||||
"dms_acctnumber": "676",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Shop Materials",
|
||||
"accountdesc": "C/S PAINT & BODY SHOP MATERI",
|
||||
"accountname": "C/S PAINT & BODY SHOP MATERI",
|
||||
"dms_acctnumber": "679",
|
||||
"dms_wip_acctnumber": "245"
|
||||
},
|
||||
{
|
||||
"name": "Paint Materials",
|
||||
"accountdesc": "C/S PAINT & BODY SHOP MATERI",
|
||||
"accountname": "C/S PAINT & BODY SHOP MATERI",
|
||||
"dms_acctnumber": "679",
|
||||
"dms_wip_acctnumber": "245"
|
||||
},
|
||||
{
|
||||
"name": "Glass",
|
||||
"accountdesc": "C/S BS BODY LABOR C&T",
|
||||
"accountname": "C/S BS BODY LABOR C&T",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Aftermarket",
|
||||
"accountdesc": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"accountname": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"dms_acctnumber": "677",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Body",
|
||||
"accountdesc": "BS BODY (LAB)",
|
||||
"accountname": "BS BODY (LAB)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Refinish",
|
||||
"accountdesc": "BS BODY (REF)",
|
||||
"accountname": "BS BODY (REF)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "OEM",
|
||||
"accountdesc": "OEM",
|
||||
"accountname": "OEM",
|
||||
"dms_acctnumber": "677",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Mechanical",
|
||||
"accountdesc": "BS BODY (LAM)",
|
||||
"accountname": "BS BODY (LAM)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "LA1",
|
||||
"accountdesc": "BS BODY (LAM)",
|
||||
"accountname": "BS BODY (LAM)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "LA2",
|
||||
"accountdesc": "BS BODY (LAM)",
|
||||
"accountname": "BS BODY (LAM)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "LA3",
|
||||
"accountdesc": "BS BODY (LAM)",
|
||||
"accountname": "BS BODY (LAM)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "LA4",
|
||||
"accountdesc": "BS BODY (LAM)",
|
||||
"accountname": "BS BODY (LAM)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Aluminum",
|
||||
"accountdesc": "BS BODY (LAA)",
|
||||
"accountname": "BS BODY (LAA)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Diagnostic",
|
||||
"accountdesc": "BS BODY (LAB)",
|
||||
"accountname": "BS BODY (LAB)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Electrical",
|
||||
"accountdesc": "BS BODY (LAB)",
|
||||
"accountname": "BS BODY (LAB)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Frame",
|
||||
"accountdesc": "BS BODY (LAB)",
|
||||
"accountname": "BS BODY (LAB)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Structural",
|
||||
"accountdesc": "BS BODY (LAB)",
|
||||
"accountname": "BS BODY (LAB)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Detail",
|
||||
"accountdesc": "BS BODY (LAB)",
|
||||
"accountname": "BS BODY (LAB)",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "ATS",
|
||||
"accountdesc": "C/S INTERNAL LABOR-BODY SHOP",
|
||||
"accountname": "C/S INTERNAL LABOR-BODY SHOP",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Towing",
|
||||
"accountdesc": "C/S SUBLET REPAIRS/BODY SHOP",
|
||||
"accountname": "C/S SUBLET REPAIRS/BODY SHOP",
|
||||
"dms_acctnumber": "671",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Sublet (L)",
|
||||
"accountdesc": "C/S SUBLET REPAIRS/BODY SHOP",
|
||||
"accountname": "C/S SUBLET REPAIRS/BODY SHOP",
|
||||
"dms_acctnumber": "676",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Chrome",
|
||||
"accountdesc": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"accountname": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"dms_acctnumber": "677",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "LKQ",
|
||||
"accountdesc": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"accountname": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"dms_acctnumber": "677",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Remanufactured",
|
||||
"accountdesc": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"accountname": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"dms_acctnumber": "677",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "OEM Partial",
|
||||
"accountdesc": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"accountname": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"dms_acctnumber": "677",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Recored",
|
||||
"accountdesc": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"accountname": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"dms_acctnumber": "677",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
},
|
||||
{
|
||||
"name": "Other",
|
||||
"accountdesc": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"accountname": "C/S P&A-CUST C&T REPAIRS-B/S",
|
||||
"dms_acctnumber": "677",
|
||||
"dms_wip_acctnumber": "247B"
|
||||
}
|
||||
],
|
||||
"taxes": {
|
||||
"local": {
|
||||
"name": "n",
|
||||
"rate": 0,
|
||||
"accountdesc": "n",
|
||||
"accountitem": "n",
|
||||
"dms_acctnumber": "aa"
|
||||
},
|
||||
"state": {
|
||||
"name": "PST PAYABLE",
|
||||
"rate": 7,
|
||||
"accountdesc": "Ministry of Finance (BC)",
|
||||
"accountitem": "PST On Sales",
|
||||
"dms_acctnumber": "324"
|
||||
},
|
||||
"federal": {
|
||||
"name": "GST/HST PAYABLE",
|
||||
"rate": 5,
|
||||
"accountdesc": "Receiver General - GST",
|
||||
"accountitem": "GST On Sales",
|
||||
"dms_acctnumber": "324"
|
||||
}
|
||||
},
|
||||
"refund": {
|
||||
"accountitem": "BODY SHOP_CUSTPAY"
|
||||
},
|
||||
"profits": [
|
||||
{
|
||||
"name": "Paint Materials",
|
||||
"accountdesc": "PAINT & BODY SHOP MATERIALS",
|
||||
"accountitem": "PAINT & BODY SHOP MATERIALS",
|
||||
"accountname": "Aftermarket",
|
||||
"accountnumber": "Aftermarket",
|
||||
"dms_acctnumber": "479"
|
||||
},
|
||||
{
|
||||
"name": "INTERNAL LABOR/BODY SHOP",
|
||||
"accountdesc": "INTERNAL LABOR/BODY SHOP",
|
||||
"accountitem": "INTERNAL LABOR/BODY SHOP",
|
||||
"dms_acctnumber": "473"
|
||||
},
|
||||
{
|
||||
"name": "SUBLET REPAIRS/BODY SHOP",
|
||||
"accountdesc": "SUBLET REPAIRS/BODY SHOP",
|
||||
"accountitem": "SUBLET REPAIRS/BODY SHOP",
|
||||
"dms_acctnumber": "476"
|
||||
},
|
||||
{
|
||||
"name": "PARTS-CUST C&T R O-BODY SHOP",
|
||||
"accountdesc": "PARTS-CUST C&T R O-BODY SHOP",
|
||||
"accountitem": "PARTS-CUST C&T R O-BODY SHOP",
|
||||
"dms_acctnumber": "477"
|
||||
},
|
||||
{
|
||||
"name": "ATS",
|
||||
"accountdesc": "ATS",
|
||||
"accountitem": "ATS",
|
||||
"dms_acctnumber": "477"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LAB)",
|
||||
"accountdesc": "LAB",
|
||||
"accountitem": "LAB",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LAD)",
|
||||
"accountdesc": "LAD",
|
||||
"accountitem": "LAD",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LAE)",
|
||||
"accountdesc": "LAE",
|
||||
"accountitem": "LAE",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LAF)",
|
||||
"accountdesc": "LAF",
|
||||
"accountitem": "LAF",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LAG)",
|
||||
"accountdesc": "LAG",
|
||||
"accountitem": "LAG",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LAM)",
|
||||
"accountdesc": "LAM",
|
||||
"accountitem": "LAM",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LAR)",
|
||||
"accountdesc": "LAR",
|
||||
"accountitem": "LAR",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LAS)",
|
||||
"accountdesc": "LAS",
|
||||
"accountitem": "LAS",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LAU)",
|
||||
"accountdesc": "LAU",
|
||||
"accountitem": "LAU",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LA1)",
|
||||
"accountdesc": "LA1",
|
||||
"accountitem": "LA1",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LA2)",
|
||||
"accountdesc": "LA2",
|
||||
"accountitem": "LA2",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LA3)",
|
||||
"accountdesc": "LA3",
|
||||
"accountitem": "LA4",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "BS LABOR (LA4)",
|
||||
"accountdesc": "LA4",
|
||||
"accountitem": "LA4",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "OEM",
|
||||
"accountdesc": "OEM",
|
||||
"accountitem": "OEM",
|
||||
"dms_acctnumber": "477"
|
||||
},
|
||||
{
|
||||
"name": "AFTERMARKET",
|
||||
"accountdesc": "AFTERMARKET",
|
||||
"accountitem": "AFTERMARKET",
|
||||
"dms_acctnumber": "477"
|
||||
},
|
||||
{
|
||||
"name": "CHROME",
|
||||
"accountdesc": "CHROME",
|
||||
"accountitem": "CHROME",
|
||||
"dms_acctnumber": "477"
|
||||
},
|
||||
{
|
||||
"name": "LKQ",
|
||||
"accountdesc": "LKQ",
|
||||
"accountitem": "LKQ",
|
||||
"dms_acctnumber": "477"
|
||||
},
|
||||
{
|
||||
"name": "REMAN",
|
||||
"accountdesc": "REMAN",
|
||||
"accountitem": "REMAN",
|
||||
"dms_acctnumber": "477"
|
||||
},
|
||||
{
|
||||
"name": "OTHER",
|
||||
"accountdesc": "OTHER",
|
||||
"accountitem": "OTHER",
|
||||
"dms_acctnumber": "477"
|
||||
},
|
||||
{
|
||||
"name": "OE PARTIAL",
|
||||
"accountdesc": "OE",
|
||||
"accountitem": "OE",
|
||||
"dms_acctnumber": "477"
|
||||
},
|
||||
{
|
||||
"name": "RECORED",
|
||||
"accountdesc": "RECORED",
|
||||
"accountitem": "RECORED",
|
||||
"dms_acctnumber": "477"
|
||||
},
|
||||
{
|
||||
"name": "SUBLET",
|
||||
"accountdesc": "SUBLET",
|
||||
"accountitem": "SUBLET",
|
||||
"dms_acctnumber": "476"
|
||||
},
|
||||
{
|
||||
"name": "SUBLET L",
|
||||
"accountdesc": "SUBLET L",
|
||||
"accountitem": "SUBLET L",
|
||||
"dms_acctnumber": "476"
|
||||
},
|
||||
{
|
||||
"name": "TOWING",
|
||||
"accountdesc": "TOWING",
|
||||
"accountitem": "TOWING",
|
||||
"dms_acctnumber": "476"
|
||||
},
|
||||
{
|
||||
"name": "Aluminum",
|
||||
"accountdesc": "LAA",
|
||||
"accountitem": "LAA",
|
||||
"dms_acctnumber": "470"
|
||||
},
|
||||
{
|
||||
"name": "Shop Materials",
|
||||
"accountdesc": "PAINT & BODY SHOP MATERIALS",
|
||||
"accountitem": "PAINT & BODY SHOP MATERIALS",
|
||||
"dms_acctnumber": "479"
|
||||
}
|
||||
],
|
||||
"defaults": {
|
||||
"costs": {
|
||||
"ATS": "ATS",
|
||||
"LA1": "LA1",
|
||||
"LA2": "LA2",
|
||||
"LA3": "LA3",
|
||||
"LA4": "LA4",
|
||||
"LAA": "Aluminum",
|
||||
"LAB": "Body",
|
||||
"LAD": "Diagnostic",
|
||||
"LAE": "Electrical",
|
||||
"LAF": "Frame",
|
||||
"LAG": "Glass",
|
||||
"LAM": "Mechanical",
|
||||
"LAR": "Refinish",
|
||||
"LAS": "Structural",
|
||||
"LAU": "Detail",
|
||||
"PAA": "Aftermarket",
|
||||
"PAC": "Chrome",
|
||||
"PAL": "LKQ",
|
||||
"PAM": "Remanufactured",
|
||||
"PAN": "OEM",
|
||||
"PAO": "Other",
|
||||
"PAP": "OEM Partial",
|
||||
"PAR": "Recored",
|
||||
"PAS": "Sublet",
|
||||
"TOW": "Towing",
|
||||
"MAPA": "Paint Materials",
|
||||
"MASH": "Shop Materials",
|
||||
"PASL": "Sublet (L)"
|
||||
},
|
||||
"profits": {
|
||||
"ATS": "ATS",
|
||||
"LA1": "BS LABOR (LA1)",
|
||||
"LA2": "BS LABOR (LA2)",
|
||||
"LA3": "BS LABOR (LA3)",
|
||||
"LA4": "BS LABOR (LA4)",
|
||||
"LAA": "Aluminum",
|
||||
"LAB": "BS LABOR (LAB)",
|
||||
"LAD": "BS LABOR (LAD)",
|
||||
"LAE": "BS LABOR (LAE)",
|
||||
"LAF": "BS LABOR (LAF)",
|
||||
"LAG": "BS LABOR (LAG)",
|
||||
"LAM": "BS LABOR (LAM)",
|
||||
"LAR": "BS LABOR (LAR)",
|
||||
"LAS": "BS LABOR (LAS)",
|
||||
"LAU": "BS LABOR (LAU)",
|
||||
"PAA": "AFTERMARKET",
|
||||
"PAC": "CHROME",
|
||||
"PAL": "LKQ",
|
||||
"PAM": "REMAN",
|
||||
"PAN": "OEM",
|
||||
"PAO": "OTHER",
|
||||
"PAP": "OE PARTIAL",
|
||||
"PAR": "RECORED",
|
||||
"PAS": "SUBLET",
|
||||
"TOW": "TOWING",
|
||||
"MAPA": "Paint Materials",
|
||||
"MASH": "Shop Materials",
|
||||
"PASL": "SUBLET L"
|
||||
}
|
||||
},
|
||||
"dms_defaults": [
|
||||
{
|
||||
"name": "BS WORK",
|
||||
"costs": {
|
||||
"ATS": "ATS",
|
||||
"LA1": "LA1",
|
||||
"LA2": "LA2",
|
||||
"LA3": "LA3",
|
||||
"LA4": "LA4",
|
||||
"LAA": "Aluminum",
|
||||
"LAB": "Body",
|
||||
"LAD": "Diagnostic",
|
||||
"LAE": "Electrical",
|
||||
"LAF": "Frame",
|
||||
"LAG": "Glass",
|
||||
"LAM": "Mechanical",
|
||||
"LAR": "Refinish",
|
||||
"LAS": "Structural",
|
||||
"LAU": "Detail",
|
||||
"PAA": "Aftermarket",
|
||||
"PAC": "Chrome",
|
||||
"PAL": "LKQ",
|
||||
"PAM": "Remanufactured",
|
||||
"PAN": "OEM",
|
||||
"PAO": "Other",
|
||||
"PAP": "OEM Partial",
|
||||
"PAR": "Recored",
|
||||
"PAS": "Sublet",
|
||||
"TOW": "Towing",
|
||||
"MAPA": "Paint Materials",
|
||||
"MASH": "Shop Materials",
|
||||
"PASL": "Sublet (L)"
|
||||
},
|
||||
"profits": {
|
||||
"ATS": "ATS",
|
||||
"LA1": "BS LABOR (LA1)",
|
||||
"LA2": "BS LABOR (LA2)",
|
||||
"LA3": "BS LABOR (LA3)",
|
||||
"LA4": "BS LABOR (LA4)",
|
||||
"LAA": "Aluminum",
|
||||
"LAB": "BS LABOR (LAB)",
|
||||
"LAD": "BS LABOR (LAD)",
|
||||
"LAE": "BS LABOR (LAE)",
|
||||
"LAF": "BS LABOR (LAF)",
|
||||
"LAG": "BS LABOR (LAG)",
|
||||
"LAM": "BS LABOR (LAM)",
|
||||
"LAR": "BS LABOR (LAR)",
|
||||
"LAS": "BS LABOR (LAS)",
|
||||
"LAU": "BS LABOR (LAU)",
|
||||
"PAA": "AFTERMARKET",
|
||||
"PAC": "CHROME",
|
||||
"PAL": "LKQ",
|
||||
"PAM": "REMAN",
|
||||
"PAN": "OEM",
|
||||
"PAO": "OTHER",
|
||||
"PAP": "OE PARTIAL",
|
||||
"PAR": "RECORED",
|
||||
"PAS": "SUBLET",
|
||||
"TOW": "TOWING",
|
||||
"MAPA": "Paint Materials",
|
||||
"MASH": "Shop Materials",
|
||||
"PASL": "SUBLET L"
|
||||
}
|
||||
}
|
||||
],
|
||||
"sales_tax_codes": [
|
||||
{
|
||||
"code": "G",
|
||||
"local": false,
|
||||
"state": false,
|
||||
"federal": true,
|
||||
"description": "GST Only"
|
||||
},
|
||||
{
|
||||
"code": "S",
|
||||
"state": true,
|
||||
"federal": true,
|
||||
"description": "Both"
|
||||
},
|
||||
{
|
||||
"code": "E",
|
||||
"local": false,
|
||||
"state": false,
|
||||
"federal": false,
|
||||
"description": "Exempt"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -16,11 +16,9 @@ jsreport configure
|
||||
|
||||
sudo apt-get install -y libgconf-2-4
|
||||
sudo wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
|
||||
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >>
|
||||
/etc/apt/sources.list.d/google.list'
|
||||
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst
|
||||
--no-install-recommends
|
||||
sudo apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst --no-install-recommends
|
||||
|
||||
# on ubuntu 20 run also
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
_I recommend [Mrm](https://github.com/sapegin/mrm-tasks/tree/master/packages/mrm-task-jest)
|
||||
and [jest-codemods](https://github.com/skovhus/jest-codemods) for single-command Jest installation and easy migration
|
||||
from other frameworks._
|
||||
_I recommend [Mrm](https://github.com/sapegin/mrm-tasks/tree/master/packages/mrm-task-jest) and [jest-codemods](https://github.com/skovhus/jest-codemods) for single-command Jest installation and easy migration from other frameworks._
|
||||
|
||||
<!-- To reformat run: npx prettier --print-width 100 --single-quote --no-semi --prose-wrap never --write Readme.md -->
|
||||
|
||||
@@ -18,31 +16,31 @@ from other frameworks._
|
||||
|
||||
- [Test structure](#test-structure)
|
||||
- [Matchers](#matchers)
|
||||
- [Basic matchers](#basic-matchers)
|
||||
- [Truthiness](#truthiness)
|
||||
- [Numbers](#numbers)
|
||||
- [Strings](#strings)
|
||||
- [Arrays](#arrays)
|
||||
- [Objects](#objects)
|
||||
- [Exceptions](#exceptions)
|
||||
- [Snapshots](#snapshots)
|
||||
- [Mock functions](#mock-functions)
|
||||
- [Misc](#misc)
|
||||
- [Promise matchers (Jest 20+)](#promise-matchers-jest-20)
|
||||
- [Basic matchers](#basic-matchers)
|
||||
- [Truthiness](#truthiness)
|
||||
- [Numbers](#numbers)
|
||||
- [Strings](#strings)
|
||||
- [Arrays](#arrays)
|
||||
- [Objects](#objects)
|
||||
- [Exceptions](#exceptions)
|
||||
- [Snapshots](#snapshots)
|
||||
- [Mock functions](#mock-functions)
|
||||
- [Misc](#misc)
|
||||
- [Promise matchers (Jest 20+)](#promise-matchers-jest-20)
|
||||
- [Async tests](#async-tests)
|
||||
- [async/await](#asyncawait)
|
||||
- [Promises](#promises)
|
||||
- [done() callback](#done-callback)
|
||||
- [async/await](#asyncawait)
|
||||
- [Promises](#promises)
|
||||
- [done() callback](#done-callback)
|
||||
- [Mocks](#mocks)
|
||||
- [Mock functions](#mock-functions-1)
|
||||
- [Mock modules using jest.mock method](#mock-modules-using-jestmock-method)
|
||||
- [Mock modules using a mock file](#mock-modules-using-a-mock-file)
|
||||
- [Mock object methods](#mock-object-methods)
|
||||
- [Mock getters and setters (Jest 22.1.0+)](#mock-getters-and-setters-jest-2210)
|
||||
- [Mock getters and setters](#mock-getters-and-setters)
|
||||
- [Clearing and restoring mocks](#clearing-and-restoring-mocks)
|
||||
- [Accessing the original module when using mocks](#accessing-the-original-module-when-using-mocks)
|
||||
- [Timer mocks](#timer-mocks)
|
||||
- [Mock functions](#mock-functions-1)
|
||||
- [Mock modules using jest.mock method](#mock-modules-using-jestmock-method)
|
||||
- [Mock modules using a mock file](#mock-modules-using-a-mock-file)
|
||||
- [Mock object methods](#mock-object-methods)
|
||||
- [Mock getters and setters (Jest 22.1.0+)](#mock-getters-and-setters-jest-2210)
|
||||
- [Mock getters and setters](#mock-getters-and-setters)
|
||||
- [Clearing and restoring mocks](#clearing-and-restoring-mocks)
|
||||
- [Accessing the original module when using mocks](#accessing-the-original-module-when-using-mocks)
|
||||
- [Timer mocks](#timer-mocks)
|
||||
- [Data-driven tests (Jest 23+)](#data-driven-tests-jest-23)
|
||||
- [Skipping tests](#skipping-tests)
|
||||
- [Testing modules with side effects](#testing-modules-with-side-effects)
|
||||
@@ -207,8 +205,8 @@ expect(fn.mock.calls[0][0]).toBe(2) // fn.mock.calls[0][0] — the first argumen
|
||||
- `nthCalledWith` → `toHaveBeenNthCalledWith`
|
||||
- `toReturnTimes` → `toHaveReturnedTimes`
|
||||
- `toReturnWith` → `toHaveReturnedWith`
|
||||
- `lastReturnedWith`→ `toHaveLastReturnedWith`
|
||||
- `nthReturnedWith` →`toHaveNthReturnedWith`
|
||||
- `lastReturnedWith` → `toHaveLastReturnedWith`
|
||||
- `nthReturnedWith` → `toHaveNthReturnedWith`
|
||||
</details>
|
||||
|
||||
### Misc
|
||||
@@ -246,8 +244,7 @@ test('resolve to lemon', async () => {
|
||||
|
||||
See [more examples](https://facebook.github.io/jest/docs/en/tutorial-async.html) in Jest docs.
|
||||
|
||||
It’s a good practice to specify a number of expected assertions in async tests, so the test will fail if your assertions
|
||||
weren’t called at all.
|
||||
It’s a good practice to specify a number of expected assertions in async tests, so the test will fail if your assertions weren’t called at all.
|
||||
|
||||
```js
|
||||
test('async test', () => {
|
||||
@@ -346,25 +343,23 @@ jest.mock('lodash/memoize', () => a => a, { virtual: true }) // The original lod
|
||||
|
||||
[jest.mock docs](https://facebook.github.io/jest/docs/jest-object.html#jestmockmodulename-factory-options)
|
||||
|
||||
> Note: When using `babel-jest`, calls to `jest.mock` will automatically be hoisted to the top of the code block.
|
||||
> Use `jest.doMock` if you want to explicitly avoid this behavior.
|
||||
> Note: When using `babel-jest`, calls to `jest.mock` will automatically be hoisted to the top of the code block. Use `jest.doMock` if you want to explicitly avoid this behavior.
|
||||
|
||||
### Mock modules using a mock file
|
||||
|
||||
1. Create a file like `__mocks__/lodash/memoize.js`:
|
||||
1. Create a file like `__mocks__/lodash/memoize.js`:
|
||||
|
||||
```js
|
||||
module.exports = a => a
|
||||
```
|
||||
```js
|
||||
module.exports = a => a
|
||||
```
|
||||
|
||||
2. Add to your test:
|
||||
2. Add to your test:
|
||||
|
||||
```js
|
||||
jest.mock('lodash/memoize')
|
||||
```
|
||||
```js
|
||||
jest.mock('lodash/memoize')
|
||||
```
|
||||
|
||||
> Note: When using `babel-jest`, calls to `jest.mock` will automatically be hoisted to the top of the code block.
|
||||
> Use `jest.doMock` if you want to explicitly avoid this behavior.
|
||||
> Note: When using `babel-jest`, calls to `jest.mock` will automatically be hoisted to the top of the code block. Use `jest.doMock` if you want to explicitly avoid this behavior.
|
||||
|
||||
[Manual mocks docs](https://facebook.github.io/jest/docs/manual-mocks.html)
|
||||
|
||||
@@ -412,7 +407,7 @@ fn.mockReset() // Clears and removes any mocked return values or implementations
|
||||
fn.mockRestore() // Resets and restores the initial implementation
|
||||
```
|
||||
|
||||
> Note: `mockRestore`works only with mocks created by `jest.spyOn`.
|
||||
> Note: `mockRestore` works only with mocks created by `jest.spyOn`.
|
||||
|
||||
For all mocks:
|
||||
|
||||
@@ -432,8 +427,7 @@ const fs = require.requireActual('fs') // Original module
|
||||
|
||||
### Timer mocks
|
||||
|
||||
Write synchronous test for code that uses native timer
|
||||
functions (`setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`).
|
||||
Write synchronous test for code that uses native timer functions (`setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`).
|
||||
|
||||
```js
|
||||
// Enable fake timers
|
||||
@@ -477,7 +471,7 @@ test.each`
|
||||
})
|
||||
```
|
||||
|
||||
Or on `describe` level:
|
||||
Or on `describe` level:
|
||||
|
||||
```js
|
||||
describe.each([['mobile'], ['tablet'], ['desktop']])('checkout flow on %s', (viewport) => {
|
||||
@@ -487,7 +481,7 @@ describe.each([['mobile'], ['tablet'], ['desktop']])('checkout flow on %s', (vie
|
||||
})
|
||||
```
|
||||
|
||||
[describe.each() docs](https://jestjs.io/docs/en/api.html#describeeachtablename-fn-timeout), [test.each() docs](https://jestjs.io/docs/en/api.html#testeachtablename-fn-timeout),
|
||||
[describe.each() docs](https://jestjs.io/docs/en/api.html#describeeachtablename-fn-timeout), [test.each() docs](https://jestjs.io/docs/en/api.html#testeachtablename-fn-timeout),
|
||||
|
||||
## Skipping tests
|
||||
|
||||
@@ -507,8 +501,7 @@ tests.only('make each pony pink'...
|
||||
|
||||
## Testing modules with side effects
|
||||
|
||||
Node.js and Jest will cache modules you `require`. To test modules with side effects you’ll need to reset the module
|
||||
registry between tests:
|
||||
Node.js and Jest will cache modules you `require`. To test modules with side effects you’ll need to reset the module registry between tests:
|
||||
|
||||
```js
|
||||
const modulePath = '../module-to-test'
|
||||
@@ -532,8 +525,7 @@ test('second text', () => {
|
||||
|
||||
## Usage with Babel and TypeScript
|
||||
|
||||
Add [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest)
|
||||
or [ts-jest](https://github.com/kulshekhar/ts-jest). Check their docs for installation instructions.
|
||||
Add [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest) or [ts-jest](https://github.com/kulshekhar/ts-jest). Check their docs for installation instructions.
|
||||
|
||||
## Resources
|
||||
|
||||
@@ -544,14 +536,10 @@ or [ts-jest](https://github.com/kulshekhar/ts-jest). Check their docs for instal
|
||||
- [Effective Snapshot Testing](https://blog.kentcdodds.com/effective-snapshot-testing-e0d1a2c28eca) by Kent C. Dodds
|
||||
- [Migrating to Jest](https://medium.com/@kentcdodds/migrating-to-jest-881f75366e7e#.pc4s5ut6z) by Kent C. Dodds
|
||||
- [Migrating AVA to Jest](http://browniefed.com/blog/migrating-ava-to-jest/) by Jason Brown
|
||||
- [How to Test React and MobX with Jest](https://semaphoreci.com/community/tutorials/how-to-test-react-and-mobx-with-jest)
|
||||
by Will Stern
|
||||
- [Testing React Intl components with Jest and Enzyme](https://medium.com/@sapegin/testing-react-intl-components-with-jest-and-enzyme-f9d43d9c923e)
|
||||
by Artem Sapegin
|
||||
- [Testing with Jest: 15 Awesome Tips and Tricks](https://medium.com/@stipsan/testing-with-jest-15-awesome-tips-and-tricks-42150ec4c262)
|
||||
by Stian Didriksen
|
||||
- Taking Advantage of Jest Matchers by Ben
|
||||
McCormick: [Part 1](https://benmccormick.org/2017/08/15/jest-matchers-1/), [Part 2](https://benmccormick.org/2017/09/04/jest-matchers-2/)
|
||||
- [How to Test React and MobX with Jest](https://semaphoreci.com/community/tutorials/how-to-test-react-and-mobx-with-jest) by Will Stern
|
||||
- [Testing React Intl components with Jest and Enzyme](https://medium.com/@sapegin/testing-react-intl-components-with-jest-and-enzyme-f9d43d9c923e) by Artem Sapegin
|
||||
- [Testing with Jest: 15 Awesome Tips and Tricks](https://medium.com/@stipsan/testing-with-jest-15-awesome-tips-and-tricks-42150ec4c262) by Stian Didriksen
|
||||
- Taking Advantage of Jest Matchers by Ben McCormick: [Part 1](https://benmccormick.org/2017/08/15/jest-matchers-1/), [Part 2](https://benmccormick.org/2017/09/04/jest-matchers-2/)
|
||||
|
||||
---
|
||||
|
||||
@@ -571,8 +559,6 @@ This software has been developed with lots of coffee, buy me one more cup to kee
|
||||
|
||||
## Author and license
|
||||
|
||||
[Artem Sapegin](http://sapegin.me/), a frontend engineer at [Omio](https://omio.com/) and the creator
|
||||
of [React Styleguidist](https://react-styleguidist.js.org/). I also write about frontend
|
||||
at [my blog](https://blog.sapegin.me/).
|
||||
[Artem Sapegin](http://sapegin.me/), a frontend engineer at [Omio](https://omio.com/) and the creator of [React Styleguidist](https://react-styleguidist.js.org/). I also write about frontend at [my blog](https://blog.sapegin.me/).
|
||||
|
||||
CC0 1.0 Universal license, see the included [License.md](/License.md) file.
|
||||
@@ -46,8 +46,7 @@ $ hasura migrate create "init" --from-server
|
||||
## mark the migration as applied on this server
|
||||
|
||||
$ hasura migrate apply --version "<version>" --skip-execution
|
||||
If you are using schemas other than public, use --schema "schema_name" flag to indicate each one of them in the create
|
||||
command. This flag can be used multiple times. See more details about the usage in the docs.
|
||||
If you are using schemas other than public, use --schema "schema_name" flag to indicate each one of them in the create command. This flag can be used multiple times. See more details about the usage in the docs.
|
||||
|
||||
Step 4: Verify the status
|
||||
Execute the following command to verify status of migration:
|
||||
@@ -55,5 +54,4 @@ Execute the following command to verify status of migration:
|
||||
$ hasura migrate status
|
||||
You have brand new migrations now!
|
||||
|
||||
This can also be used to combine (kind of squash) all of your migration files into a single one. You're snapshotting the
|
||||
state of a server and adding it as a new migration.
|
||||
This can also be used to combine (kind of squash) all of your migration files into a single one. You're snapshotting the state of a server and adding it as a new migration.
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" ?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//TranslatedData">
|
||||
<xsl:element name="TranslatedData">
|
||||
@@ -8,23 +8,23 @@
|
||||
</xsl:attribute>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Details/@PrgID">
|
||||
<xsl:copy-of select="Details"/>
|
||||
<xsl:copy-of select="Details" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="Details">
|
||||
<xsl:attribute name="PrgID">OECTrans.ImportTrans</xsl:attribute>
|
||||
<xsl:for-each select="Details/@*">
|
||||
<xsl:copy-of select="."/>
|
||||
<xsl:copy-of select="." />
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="Details/*">
|
||||
<xsl:copy-of select="."/>
|
||||
<xsl:copy-of select="." />
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:element name="Header">
|
||||
<xsl:attribute name="RONum">
|
||||
<xsl:value-of select="//Envelope/@RONum"/>
|
||||
<xsl:value-of select="//Envelope/@RONum" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="OwnerFName">
|
||||
<xsl:value-of select="//Admin/@OwnerF"/>
|
||||
@@ -33,49 +33,49 @@
|
||||
<xsl:value-of select="//Admin/@OwnerL"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="VIN">
|
||||
<xsl:value-of select="//Vehicle/@TransVIN"/>
|
||||
<xsl:value-of select="//Vehicle/@TransVIN" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Mileage">
|
||||
<xsl:value-of select="//Vehicle/@TransMileage"/>
|
||||
<xsl:value-of select="//Vehicle/@TransMileage" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Year">
|
||||
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||
<xsl:value-of select="//Vehicle/@TransYear" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Make">
|
||||
<xsl:if test="//Vehicle/@ManufName[. != '']">
|
||||
<xsl:if test="//Vehicle/@ManufName[. != '']" >
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Vehicle/@ManufName[. = 'Geo']">CHEV</xsl:when>
|
||||
<xsl:when test="//Vehicle/@ManufName[. = 'Chev-GMC Truck']">CHEV</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Vehicle/@ManufName"/>
|
||||
<xsl:value-of select="//Vehicle/@ManufName" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
<xsl:if test="//Vehicle/@ManufName[. = '']">
|
||||
<xsl:value-of select="//Vehicle/@ManufCode"/>
|
||||
<xsl:if test="//Vehicle/@ManufName[. = '']" >
|
||||
<xsl:value-of select="//Vehicle/@ManufCode" />
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Model">
|
||||
<xsl:value-of select="//Vehicle/@TransModel"/>
|
||||
<xsl:value-of select="//Vehicle/@TransModel" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Description">
|
||||
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||
<xsl:text></xsl:text>
|
||||
<xsl:value-of select="//Vehicle/@ManufName"/>
|
||||
<xsl:text></xsl:text>
|
||||
<xsl:value-of select="//Vehicle/@TransModel"/>
|
||||
<xsl:value-of select="//Vehicle/@TransYear" />
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="//Vehicle/@ManufName" />
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="//Vehicle/@TransModel" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LastSupplLevel">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Envelope/@TransactionType = 'E'">0</xsl:when>
|
||||
<xsl:when test="substring(//Envelope/@SupplementNum, 1, 1) = 'S'">
|
||||
<xsl:value-of select="substring(//Envelope/@SupplementNum, 2)"/>
|
||||
<xsl:value-of select="substring(//Envelope/@SupplementNum, 2)" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:apply-templates select="PartsList"/>
|
||||
<xsl:apply-templates select="PartsList" />
|
||||
<xsl:element name="Envelope">
|
||||
<xsl:element name="Software">
|
||||
<xsl:attribute name="Manifest">Audatex.xml</xsl:attribute>
|
||||
@@ -96,13 +96,10 @@
|
||||
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateID">
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of
|
||||
select="//Envelope/@SoftwareVersion"/>-
|
||||
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@SoftwareVersion"/>-<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateIDv2">
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-
|
||||
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateFormatVersion">
|
||||
<xsl:value-of select="//Envelope/@EMSVersion"/>
|
||||
@@ -110,9 +107,9 @@
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
<xsl:element name="Totals">
|
||||
<xsl:attribute name="GrandTotalAmount">
|
||||
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="GrandTotalAmount">
|
||||
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Administrative">
|
||||
<xsl:element name="Owner">
|
||||
@@ -223,8 +220,7 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-before(//Admin/@InsuranceZip, '-'))=5">
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
|
||||
<xsl:when test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
|
||||
<xsl:value-of select="//Admin/@InsuranceZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -235,8 +231,7 @@
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin/@InsuranceZip)=9">
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin/@InsuranceZip)>4">
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
||||
@@ -249,8 +244,7 @@
|
||||
<xsl:attribute name="Phone">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin/@InsurancePhone1Ext[. != '']">
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1"/> x
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1"/> x<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1"/>
|
||||
@@ -260,8 +254,7 @@
|
||||
<xsl:attribute name="Phone2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin/@InsurancePhone2Ext[. != '']">
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2"/> x
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2"/> x<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2"/>
|
||||
@@ -271,8 +264,7 @@
|
||||
<xsl:attribute name="Fax">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin/@InsuranceFaxExt[. != '']">
|
||||
<xsl:value-of select="//Admin/@InsuranceFax"/> x
|
||||
<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
|
||||
<xsl:value-of select="//Admin/@InsuranceFax"/> x<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsuranceFax"/>
|
||||
@@ -285,7 +277,7 @@
|
||||
</xsl:element>
|
||||
<xsl:element name="Insured">
|
||||
<xsl:attribute name="LastName">
|
||||
<xsl:value-of select="//Admin/@InsuranceLName"/>
|
||||
<xsl:value-of select="//Admin/@InsuranceLName" />
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Claim">
|
||||
@@ -327,8 +319,7 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-before(//Admin2/@EstimatorZip, '-'))=5">
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
|
||||
<xsl:when test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
|
||||
<xsl:value-of select="//Admin2/@EstimatorZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -339,8 +330,7 @@
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)=9">
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)>4">
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
||||
@@ -353,8 +343,7 @@
|
||||
<xsl:attribute name="Phone">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin2/@EstimatorPhone1Ext[. != '']">
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/> x
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/> x<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
|
||||
@@ -364,8 +353,7 @@
|
||||
<xsl:attribute name="Phone2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin2/@EstimatorPhone2Ext[. != '']">
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/> x
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/> x<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
|
||||
@@ -375,8 +363,7 @@
|
||||
<xsl:attribute name="Fax">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin2/@EstimatorFaxExt[. != '']">
|
||||
<xsl:value-of select="//Admin2/@EstimatorFax"/> x
|
||||
<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
|
||||
<xsl:value-of select="//Admin2/@EstimatorFax"/> x<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorFax"/>
|
||||
@@ -392,8 +379,7 @@
|
||||
<xsl:if test="string-length(//Admin2/@VehicleInDate)>6">
|
||||
<xsl:value-of select="substring-before(//Admin2/@VehicleInDate, ' ')"/>
|
||||
<xsl:if test="string-length(//Admin2/@VehicleInTime)=4">
|
||||
 <xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:
|
||||
<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
|
||||
 <xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
@@ -401,8 +387,7 @@
|
||||
<xsl:if test="string-length(//Admin2/@TargetVehicleOutDate)>6">
|
||||
<xsl:value-of select="substring-before(//Admin2/@TargetVehicleOutDate,' ')"/>
|
||||
<xsl:if test="string-length(//Admin2/@TargetVehicleOutTime)=4">
|
||||
 <xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:
|
||||
<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
|
||||
 <xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
@@ -410,8 +395,7 @@
|
||||
<xsl:if test="string-length(//Admin2/@VehicleOutDate)>6">
|
||||
<xsl:value-of select="substring-before(//Admin2/@VehicleOutDate, ' ')"/>
|
||||
<xsl:if test="string-length(//Admin2/@VehicleOutTime)=4">
|
||||
 <xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:
|
||||
<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
|
||||
 <xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
@@ -421,16 +405,16 @@
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
<xsl:template match="PartsList">
|
||||
<xsl:element name="PartsList">
|
||||
<xsl:element name="PartsList" >
|
||||
<xsl:for-each select="Part">
|
||||
<xsl:element name="Part">
|
||||
<xsl:element name="Part" >
|
||||
<!-- Part number translation rules -->
|
||||
<xsl:variable name="OEMPartNumber">
|
||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) != ' GM PART'">
|
||||
<xsl:value-of select="@TDPartNum"/>
|
||||
<xsl:value-of select="@TDPartNum" />
|
||||
</xsl:if>
|
||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
|
||||
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')"/>
|
||||
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')" />
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="AltPartNumber">
|
||||
@@ -473,22 +457,20 @@
|
||||
<xsl:value-of select="$PrimaryPartNumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="AltPartNum">
|
||||
<xsl:value-of select="$SecondaryPartNumber"/>
|
||||
<xsl:value-of select="$SecondaryPartNumber" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="ExternalPartType">
|
||||
<xsl:value-of select="$PrimaryPartType"/>
|
||||
<xsl:value-of select="$PrimaryPartType" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="ExternalAltPartType">
|
||||
<xsl:value-of select="$SecondaryPartType"/>
|
||||
<xsl:value-of select="$SecondaryPartType" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$PrimaryPartType='PAN' or $PrimaryPartType='PAP'">1</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAA' or $PrimaryPartType='PATR'">2</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAL'">3</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAM' or $PrimaryPartType='PAC' or $PrimaryPartType='PAR'">
|
||||
4
|
||||
</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAM' or $PrimaryPartType='PAC' or $PrimaryPartType='PAR'">4</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
@@ -497,67 +479,64 @@
|
||||
<xsl:when test="$SecondaryPartType='PAN'">1</xsl:when>
|
||||
<xsl:when test="$SecondaryPartType='PAA' or $SecondaryPartType='PATR'">2</xsl:when>
|
||||
<xsl:when test="$SecondaryPartType='PAL'">3</xsl:when>
|
||||
<xsl:when
|
||||
test="$SecondaryPartType='PAM' or $SecondaryPartType='PAC' or $SecondaryPartType='PAR'">
|
||||
4
|
||||
</xsl:when>
|
||||
<xsl:when test="$SecondaryPartType='PAM' or $SecondaryPartType='PAC' or $SecondaryPartType='PAR'">4</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartDesc">
|
||||
<xsl:value-of select="@TDPartDesc"/>
|
||||
<xsl:value-of select="@TDPartDesc" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDEstimate">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType='PAN'">
|
||||
<xsl:value-of select="@TDEstimate"/>
|
||||
<xsl:value-of select="@TDEstimate" />
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAM'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
<xsl:value-of select="@ActPrice" />
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAA'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
<xsl:value-of select="@ActPrice" />
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAL'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
<xsl:value-of select="@ActPrice" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
<xsl:value-of select="@ActPrice" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartQty">
|
||||
<xsl:value-of select="@TDPartQty"/>
|
||||
<xsl:value-of select="@TDPartQty" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LineNumber">
|
||||
<xsl:value-of select="@LineNumber"/>
|
||||
<xsl:value-of select="@LineNumber" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="SequenceNumber">
|
||||
<xsl:value-of select="@SequenceNumber"/>
|
||||
<xsl:value-of select="@SequenceNumber" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="SupplLevel">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@SupplementLevel = 'E'">0</xsl:when>
|
||||
<xsl:when test="substring(@SupplementLevel, 1, 1) = 'S'">
|
||||
<xsl:value-of select="substring(@SupplementLevel, 2)"/>
|
||||
<xsl:value-of select="substring(@SupplementLevel, 2)" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LaborType">
|
||||
<xsl:value-of select="@LaborType"/>
|
||||
<xsl:value-of select="@LaborType" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LaborHours">
|
||||
<xsl:value-of select="@LaborHours"/>
|
||||
<xsl:value-of select="@LaborHours" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="OperationCode">
|
||||
<xsl:value-of select="@LaborOp"/>
|
||||
<xsl:value-of select="@LaborOp" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="PriceIncluded">
|
||||
<xsl:value-of select="@PriceIncluded"/>
|
||||
<xsl:value-of select="@PriceIncluded" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="MarkUp">
|
||||
<xsl:value-of select="@MarkUp"/>
|
||||
<xsl:value-of select="@MarkUp" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="CLPart">
|
||||
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
|
||||
@@ -567,16 +546,11 @@
|
||||
<!-- If LaborOp is OP1, then allow the part to import CP 12/28/08 for Shop Client Release 4.1.4 -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="@TransactionCode='3'">False</xsl:when>
|
||||
<xsl:when
|
||||
test="@TransactionCode='1' or @TransactionCode=' ' or @TransactionCode='' or @TransactionCode='2'">
|
||||
<xsl:when test="@TransactionCode='1' or @TransactionCode=' ' or @TransactionCode='' or @TransactionCode='2'">
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAC' or @PartType='PATR'">
|
||||
<xsl:when test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAC' or @PartType='PATR'">
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">
|
||||
False
|
||||
</xsl:when>
|
||||
<xsl:when test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">False</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<!--xsl:when test="@LaborOp='OP0'">False</xsl:when -->
|
||||
|
||||
@@ -1,223 +1,128 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TranslationDescriptor>
|
||||
<FileTranslations FormatName="ADP EMS" ElementName="Estimate"
|
||||
Description="Translation Descriptor for a ADP ShopLink Estimate, Version EMS 2.0">
|
||||
<FileTranslations FormatName="ADP EMS" ElementName="Estimate" Description="Translation Descriptor for a ADP ShopLink Estimate, Version EMS 2.0">
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.env">
|
||||
<DBFFileTranslation ID="ID1" ElementName="Envelope" Description="Envelope Table">
|
||||
<DBFFieldSpec FieldName="RO_ID" Form="attribute" Name="RONum" FieldType="" Description="RO Number"/>
|
||||
<DBFFieldSpec FieldName="UNQFILE_ID" Form="attribute" Name="UniqueFileID" FieldType=""
|
||||
Description="Unique File Identifier"/>
|
||||
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType=""
|
||||
Description="Estimate File Identifier"/>
|
||||
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean"
|
||||
Description="Includes Admin Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean"
|
||||
Description="Includes Vehicle Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean"
|
||||
Description="Includes Estimate Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean"
|
||||
Description="Includes Profile Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_TOTAL" Form="attribute" Name="IncludesTotalsInfo" FieldType="Boolean"
|
||||
Description="Includes Totals Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_VENDR" Form="attribute" Name="IncludesVendorInfo" FieldType="Boolean"
|
||||
Description="Includes Vendor Info Flag"/>
|
||||
<DBFFieldSpec FieldName="EMS_VER" Form="attribute" Name="EMSVersion" FieldType=""
|
||||
Description="EMS Version Number"/>
|
||||
<DBFFieldSpec FieldName="SUPP_NO" Form="attribute" Name="SupplementNum" FieldType=""
|
||||
Description="Supplement Number"/>
|
||||
<DBFFieldSpec FieldName="TRANS_TYPE" Form="attribute" Name="TransactionType" FieldType=""
|
||||
Description="Transaction Type"/>
|
||||
<DBFFieldSpec FieldName="EST_SYSTEM" Form="attribute" Name="EstimatingSystem" FieldType=""
|
||||
Description="Estimating System Software"/>
|
||||
<DBFFieldSpec FieldName="SW_VERSION" Form="attribute" Name="SoftwareVersion" FieldType=""
|
||||
Description="Software Version Identifier"/>
|
||||
<DBFFieldSpec FieldName="UNQFILE_ID" Form="attribute" Name="UniqueFileID" FieldType="" Description="Unique File Identifier"/>
|
||||
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType="" Description="Estimate File Identifier"/>
|
||||
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean" Description="Includes Admin Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean" Description="Includes Vehicle Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean" Description="Includes Estimate Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean" Description="Includes Profile Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_TOTAL" Form="attribute" Name="IncludesTotalsInfo" FieldType="Boolean" Description="Includes Totals Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_VENDR" Form="attribute" Name="IncludesVendorInfo" FieldType="Boolean" Description="Includes Vendor Info Flag"/>
|
||||
<DBFFieldSpec FieldName="EMS_VER" Form="attribute" Name="EMSVersion" FieldType="" Description="EMS Version Number"/>
|
||||
<DBFFieldSpec FieldName="SUPP_NO" Form="attribute" Name="SupplementNum" FieldType="" Description="Supplement Number"/>
|
||||
<DBFFieldSpec FieldName="TRANS_TYPE" Form="attribute" Name="TransactionType" FieldType="" Description="Transaction Type"/>
|
||||
<DBFFieldSpec FieldName="EST_SYSTEM" Form="attribute" Name="EstimatingSystem" FieldType="" Description="Estimating System Software"/>
|
||||
<DBFFieldSpec FieldName="SW_VERSION" Form="attribute" Name="SoftwareVersion" FieldType="" Description="Software Version Identifier"/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.LIN">
|
||||
<DBFFileTranslation ID="ID2" ElementSetName="PartsList" ElementName="Part" Description="Parts List Table">
|
||||
<DBFFieldSpec FieldName="OEM_PARTNO" Form="attribute" Name="TDPartNum" FieldType=""
|
||||
Description="Part Number"/>
|
||||
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType=""
|
||||
Description="Alternate Part Number"/>
|
||||
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType=""
|
||||
Description="Actual Part Price"/>
|
||||
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType=""
|
||||
Description="Part Description"/>
|
||||
<DBFFieldSpec FieldName="DB_PRICE" Form="attribute" Name="TDEstimate" FieldType=""
|
||||
Description="DB_Price"/>
|
||||
<DBFFieldSpec FieldName="PART_QTY" Form="attribute" Name="TDPartQty" FieldType=""
|
||||
Description="Part Quantity"/>
|
||||
<DBFFieldSpec FieldName="PART_TYPE" Form="attribute" Name="PartType" FieldType=""
|
||||
Description="Part Type"/>
|
||||
<DBFFieldSpec FieldName="MOD_LBR_TY" Form="attribute" Name="LaborType" FieldType=""
|
||||
Description="Labor Type"/>
|
||||
<DBFFieldSpec FieldName="MOD_LB_HRS" Form="attribute" Name="LaborHours" FieldType=""
|
||||
Description="Labor Hours"/>
|
||||
<DBFFieldSpec FieldName="OEM_PARTNO" Form="attribute" Name="TDPartNum" FieldType="" Description="Part Number"/>
|
||||
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType="" Description="Alternate Part Number"/>
|
||||
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType="" Description="Actual Part Price"/>
|
||||
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType="" Description="Part Description"/>
|
||||
<DBFFieldSpec FieldName="DB_PRICE" Form="attribute" Name="TDEstimate" FieldType="" Description="DB_Price"/>
|
||||
<DBFFieldSpec FieldName="PART_QTY" Form="attribute" Name="TDPartQty" FieldType="" Description="Part Quantity"/>
|
||||
<DBFFieldSpec FieldName="PART_TYPE" Form="attribute" Name="PartType" FieldType="" Description="Part Type"/>
|
||||
<DBFFieldSpec FieldName="MOD_LBR_TY" Form="attribute" Name="LaborType" FieldType="" Description="Labor Type"/>
|
||||
<DBFFieldSpec FieldName="MOD_LB_HRS" Form="attribute" Name="LaborHours" FieldType="" Description="Labor Hours"/>
|
||||
<DBFFieldSpec FieldName="LBR_OP" Form="attribute" Name="LaborOp" FieldType="" Description="Labor Op"/>
|
||||
<DBFFieldSpec FieldName="LINE_NO" Form="attribute" Name="LineNumber" FieldType=""
|
||||
Description="Line number"/>
|
||||
<DBFFieldSpec FieldName="LINE_NO" Form="attribute" Name="LineNumber" FieldType="" Description="Line number"/>
|
||||
<DBFFieldSpec FieldName="UNQ_SEQ" Form="attribute" Name="SequenceNumber" FieldType="" Description=""/>
|
||||
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType=""
|
||||
Description="Supplement Level"/>
|
||||
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType=""
|
||||
Description="Transaction Code"/>
|
||||
<DBFFieldSpec FieldName="PRICE_INC" Form="attribute" Name="PriceIncluded" FieldType=""
|
||||
Description="Price Included"/>
|
||||
<DBFFieldSpec FieldName="PRT_DSMK_P" Form="attribute" Name="MarkUp" FieldType=""
|
||||
Description="Price Mark up for non OEM parts"/>
|
||||
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType="" Description="Supplement Level"/>
|
||||
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType="" Description="Transaction Code"/>
|
||||
<DBFFieldSpec FieldName="PRICE_INC" Form="attribute" Name="PriceIncluded" FieldType="" Description="Price Included"/>
|
||||
<DBFFieldSpec FieldName="PRT_DSMK_P" Form="attribute" Name="MarkUp" FieldType="" Description="Price Mark up for non OEM parts"/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.VEH">
|
||||
<DBFFileTranslation ID="ID3" ElementName="Vehicle" Description="Vehicle Table">
|
||||
<DBFFieldSpec FieldName="V_VIN" Form="attribute" Name="TransVIN" FieldType="" Description=""/>
|
||||
<DBFFieldSpec FieldName="V_MODEL_YR" Form="attribute" Name="TransYear" FieldType=""
|
||||
Description="V_MODEL_YR"/>
|
||||
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType=""
|
||||
Description="V_MAKEDESC"/>
|
||||
<DBFFieldSpec FieldName="V_MAKECODE" Form="attribute" Name="ManufCode" FieldType=""
|
||||
Description="V_MAKECODE"/>
|
||||
<DBFFieldSpec FieldName="V_MODEL" Form="attribute" Name="TransModel" FieldType=""
|
||||
Description="V_MODEL"/>
|
||||
<DBFFieldSpec FieldName="V_MILEAGE" Form="attribute" Name="TransMileage" FieldType=""
|
||||
Description="V_MILEAGE"/>
|
||||
<DBFFieldSpec FieldName="V_MODEL_YR" Form="attribute" Name="TransYear" FieldType="" Description="V_MODEL_YR"/>
|
||||
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType="" Description="V_MAKEDESC"/>
|
||||
<DBFFieldSpec FieldName="V_MAKECODE" Form="attribute" Name="ManufCode" FieldType="" Description="V_MAKECODE"/>
|
||||
<DBFFieldSpec FieldName="V_MODEL" Form="attribute" Name="TransModel" FieldType="" Description="V_MODEL"/>
|
||||
<DBFFieldSpec FieldName="V_MILEAGE" Form="attribute" Name="TransMileage" FieldType="" Description="V_MILEAGE"/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD1">
|
||||
<DBFFileTranslation ID="ID4" ElementName="Admin" Description="Administrative information">
|
||||
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType=""
|
||||
Description="Owner Lastname"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType=""
|
||||
Description="Owner Firstname"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType=""
|
||||
Description="Owner Company Name"/>
|
||||
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType=""
|
||||
Description="Owner Title"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType=""
|
||||
Description="Owner Address Line 1"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType=""
|
||||
Description="Owner Address Line 2"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType=""
|
||||
Description="Owner City"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType=""
|
||||
Description="Owner State"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType=""
|
||||
Description="Owner Zip"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType=""
|
||||
Description="Owner Country"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType=""
|
||||
Description="Owner Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType=""
|
||||
Description="Owner Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType=""
|
||||
Description="Owner Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType=""
|
||||
Description="Owner Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType=""
|
||||
Description="Owner Fax"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType=""
|
||||
Description="Owner Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType=""
|
||||
Description="Owner Email Address"/>
|
||||
<DBFFieldSpec FieldName="INS_CO_NM" Form="attribute" Name="InsuranceCompanyName" FieldType=""
|
||||
Description="Insurance Company Name"/>
|
||||
<DBFFieldSpec FieldName="INS_CO_ID" Form="attribute" Name="InsuranceCompanyID" FieldType=""
|
||||
Description="Insurance Company Identifier"/>
|
||||
<DBFFieldSpec FieldName="INS_ADDR1" Form="attribute" Name="InsuranceAddr1" FieldType=""
|
||||
Description="Insurance Address Line 1"/>
|
||||
<DBFFieldSpec FieldName="INS_ADDR2" Form="attribute" Name="InsuranceAddr2" FieldType=""
|
||||
Description="Insurance Address Line 2"/>
|
||||
<DBFFieldSpec FieldName="INS_CITY" Form="attribute" Name="InsuranceCity" FieldType=""
|
||||
Description="Insurance City"/>
|
||||
<DBFFieldSpec FieldName="INS_ST" Form="attribute" Name="InsuranceState" FieldType=""
|
||||
Description="Insurance State"/>
|
||||
<DBFFieldSpec FieldName="INS_ZIP" Form="attribute" Name="InsuranceZip" FieldType=""
|
||||
Description="Insurance Zip"/>
|
||||
<DBFFieldSpec FieldName="INS_CTRY" Form="attribute" Name="InsuranceCountry" FieldType=""
|
||||
Description="Insurance Country"/>
|
||||
<DBFFieldSpec FieldName="INS_PH1" Form="attribute" Name="InsurancePhone1" FieldType=""
|
||||
Description="Insurance Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="INS_PH1X" Form="attribute" Name="InsurancePhone1Ext" FieldType=""
|
||||
Description="Insurance Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_PH2" Form="attribute" Name="InsurancePhone2" FieldType=""
|
||||
Description="Insurance Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="INS_PH2X" Form="attribute" Name="InsurancePhone2Ext" FieldType=""
|
||||
Description="Insurance Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_FAX" Form="attribute" Name="InsuranceFax" FieldType=""
|
||||
Description="Insurance Fax"/>
|
||||
<DBFFieldSpec FieldName="INS_FAXX" Form="attribute" Name="InsuranceFaxExt" FieldType=""
|
||||
Description="Insurance Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_EA" Form="attribute" Name="InsuranceEmail" FieldType=""
|
||||
Description="Insurance Email Address"/>
|
||||
<DBFFieldSpec FieldName="INSD_LN" Form="attribute" Name="InsuranceLName" FieldType=""
|
||||
Description="Insurance Last Name"/>
|
||||
<DBFFieldSpec FieldName="CLM_NO" Form="attribute" Name="ClaimNumber" FieldType=""
|
||||
Description="Claim Number"/>
|
||||
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType="" Description="Owner Lastname"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType="" Description="Owner Firstname"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType="" Description="Owner Company Name"/>
|
||||
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType="" Description="Owner Title"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType="" Description="Owner Address Line 1"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType="" Description="Owner Address Line 2"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType="" Description="Owner City"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType="" Description="Owner State"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType="" Description="Owner Zip"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType="" Description="Owner Country"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType="" Description="Owner Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType="" Description="Owner Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType="" Description="Owner Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType="" Description="Owner Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType="" Description="Owner Fax"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType="" Description="Owner Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType="" Description="Owner Email Address"/>
|
||||
<DBFFieldSpec FieldName="INS_CO_NM" Form="attribute" Name="InsuranceCompanyName" FieldType="" Description="Insurance Company Name"/>
|
||||
<DBFFieldSpec FieldName="INS_CO_ID" Form="attribute" Name="InsuranceCompanyID" FieldType="" Description="Insurance Company Identifier"/>
|
||||
<DBFFieldSpec FieldName="INS_ADDR1" Form="attribute" Name="InsuranceAddr1" FieldType="" Description="Insurance Address Line 1"/>
|
||||
<DBFFieldSpec FieldName="INS_ADDR2" Form="attribute" Name="InsuranceAddr2" FieldType="" Description="Insurance Address Line 2"/>
|
||||
<DBFFieldSpec FieldName="INS_CITY" Form="attribute" Name="InsuranceCity" FieldType="" Description="Insurance City"/>
|
||||
<DBFFieldSpec FieldName="INS_ST" Form="attribute" Name="InsuranceState" FieldType="" Description="Insurance State"/>
|
||||
<DBFFieldSpec FieldName="INS_ZIP" Form="attribute" Name="InsuranceZip" FieldType="" Description="Insurance Zip"/>
|
||||
<DBFFieldSpec FieldName="INS_CTRY" Form="attribute" Name="InsuranceCountry" FieldType="" Description="Insurance Country"/>
|
||||
<DBFFieldSpec FieldName="INS_PH1" Form="attribute" Name="InsurancePhone1" FieldType="" Description="Insurance Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="INS_PH1X" Form="attribute" Name="InsurancePhone1Ext" FieldType="" Description="Insurance Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_PH2" Form="attribute" Name="InsurancePhone2" FieldType="" Description="Insurance Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="INS_PH2X" Form="attribute" Name="InsurancePhone2Ext" FieldType="" Description="Insurance Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_FAX" Form="attribute" Name="InsuranceFax" FieldType="" Description="Insurance Fax"/>
|
||||
<DBFFieldSpec FieldName="INS_FAXX" Form="attribute" Name="InsuranceFaxExt" FieldType="" Description="Insurance Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_EA" Form="attribute" Name="InsuranceEmail" FieldType="" Description="Insurance Email Address"/>
|
||||
<DBFFieldSpec FieldName="INSD_LN" Form="attribute" Name="InsuranceLName" FieldType="" Description="Insurance Last Name"/>
|
||||
<DBFFieldSpec FieldName="CLM_NO" Form="attribute" Name="ClaimNumber" FieldType="" Description="Claim Number"/>
|
||||
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD2">
|
||||
<DBFFileTranslation ID="ID5" ElementName="Admin2" Description="Administrative information2">
|
||||
<DBFFieldSpec FieldName="EST_CT_LN" Form="attribute" Name="EstimatorL" FieldType=""
|
||||
Description="Estimator Lastname"/>
|
||||
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType=""
|
||||
Description="Estimator Firstname"/>
|
||||
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType=""
|
||||
Description="Estimator Company Name"/>
|
||||
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType=""
|
||||
Description="Estimator Company Identifier"/>
|
||||
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType=""
|
||||
Description="Estimator Address1"/>
|
||||
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType=""
|
||||
Description="Estimator Address2"/>
|
||||
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType=""
|
||||
Description="Estimator City"/>
|
||||
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType=""
|
||||
Description="Estimator State"/>
|
||||
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType=""
|
||||
Description="Estimator Zip"/>
|
||||
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType=""
|
||||
Description="Estimator Country"/>
|
||||
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType=""
|
||||
Description="Estimator Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType=""
|
||||
Description="Estimator Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType=""
|
||||
Description="Estimator Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="EST_PH2X" Form="attribute" Name="EstimatorPhone2Ext" FieldType=""
|
||||
Description="Estimator Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_FAX" Form="attribute" Name="EstimatorFax" FieldType=""
|
||||
Description="Estimator Fax"/>
|
||||
<DBFFieldSpec FieldName="EST_FAXX" Form="attribute" Name="EstimatorFaxExt" FieldType=""
|
||||
Description="Estimator Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_EA" Form="attribute" Name="EstimatorEmail" FieldType=""
|
||||
Description="Estimator Email Address"/>
|
||||
<DBFFieldSpec FieldName="EST_LIC_NO" Form="attribute" Name="EstimatorLicenseNumber" FieldType=""
|
||||
Description="Estimator License Number"/>
|
||||
<DBFFieldSpec FieldName="EST_FILENO" Form="attribute" Name="EstimatorFileNumber" FieldType=""
|
||||
Description="Estimator File Number"/>
|
||||
<DBFFieldSpec FieldName="RO_IN_DATE" Form="attribute" Name="VehicleInDate" FieldType=""
|
||||
Description="Date arrived in shop"/>
|
||||
<DBFFieldSpec FieldName="RO_IN_TIME" Form="attribute" Name="VehicleInTime" FieldType=""
|
||||
Description="Time arrived in shop"/>
|
||||
<DBFFieldSpec FieldName="TAR_DATE" Form="attribute" Name="TargetVehicleOutDate" FieldType=""
|
||||
Description="Target date to be completed"/>
|
||||
<DBFFieldSpec FieldName="TAR_TIME" Form="attribute" Name="TargetVehicleOutTime" FieldType=""
|
||||
Description="Target time to be completed"/>
|
||||
<DBFFieldSpec FieldName="RO_CMPDATE" Form="attribute" Name="VehicleOutDate" FieldType=""
|
||||
Description="Date completed"/>
|
||||
<DBFFieldSpec FieldName="RO_CMPTIME" Form="attribute" Name="VehicleOutTime" FieldType=""
|
||||
Description="Time completed"/>
|
||||
<DBFFieldSpec FieldName="RF_CITY" Form="attribute" Name="BodyShopCity" FieldType=""
|
||||
Description="Body Shop City"/>
|
||||
<DBFFieldSpec FieldName="RF_CO_NM" Form="attribute" Name="BodyShopName" FieldType=""
|
||||
Description="Body Shop Name"/>
|
||||
<DBFFieldSpec FieldName="EST_CT_LN" Form="attribute" Name="EstimatorL" FieldType="" Description="Estimator Lastname"/>
|
||||
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType="" Description="Estimator Firstname"/>
|
||||
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType="" Description="Estimator Company Name"/>
|
||||
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType="" Description="Estimator Company Identifier"/>
|
||||
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType="" Description="Estimator Address1"/>
|
||||
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType="" Description="Estimator Address2"/>
|
||||
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType="" Description="Estimator City"/>
|
||||
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType="" Description="Estimator State"/>
|
||||
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType="" Description="Estimator Zip"/>
|
||||
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType="" Description="Estimator Country"/>
|
||||
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType="" Description="Estimator Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType="" Description="Estimator Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType="" Description="Estimator Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="EST_PH2X" Form="attribute" Name="EstimatorPhone2Ext" FieldType="" Description="Estimator Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_FAX" Form="attribute" Name="EstimatorFax" FieldType="" Description="Estimator Fax"/>
|
||||
<DBFFieldSpec FieldName="EST_FAXX" Form="attribute" Name="EstimatorFaxExt" FieldType="" Description="Estimator Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_EA" Form="attribute" Name="EstimatorEmail" FieldType="" Description="Estimator Email Address"/>
|
||||
<DBFFieldSpec FieldName="EST_LIC_NO" Form="attribute" Name="EstimatorLicenseNumber" FieldType="" Description="Estimator License Number"/>
|
||||
<DBFFieldSpec FieldName="EST_FILENO" Form="attribute" Name="EstimatorFileNumber" FieldType="" Description="Estimator File Number"/>
|
||||
<DBFFieldSpec FieldName="RO_IN_DATE" Form="attribute" Name="VehicleInDate" FieldType="" Description="Date arrived in shop"/>
|
||||
<DBFFieldSpec FieldName="RO_IN_TIME" Form="attribute" Name="VehicleInTime" FieldType="" Description="Time arrived in shop"/>
|
||||
<DBFFieldSpec FieldName="TAR_DATE" Form="attribute" Name="TargetVehicleOutDate" FieldType="" Description="Target date to be completed"/>
|
||||
<DBFFieldSpec FieldName="TAR_TIME" Form="attribute" Name="TargetVehicleOutTime" FieldType="" Description="Target time to be completed"/>
|
||||
<DBFFieldSpec FieldName="RO_CMPDATE" Form="attribute" Name="VehicleOutDate" FieldType="" Description="Date completed"/>
|
||||
<DBFFieldSpec FieldName="RO_CMPTIME" Form="attribute" Name="VehicleOutTime" FieldType="" Description="Time completed"/>
|
||||
<DBFFieldSpec FieldName="RF_CITY" Form="attribute" Name="BodyShopCity" FieldType="" Description="Body Shop City"/>
|
||||
<DBFFieldSpec FieldName="RF_CO_NM" Form="attribute" Name="BodyShopName" FieldType="" Description="Body Shop Name"/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.TTL">
|
||||
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
|
||||
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType=""
|
||||
Description=""/>
|
||||
</DBFFileTranslation>
|
||||
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
|
||||
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType="" Description=""/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
</FileTranslations>
|
||||
<StyleSheetTranslation>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
<?xml version="1.0" ?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//TranslatedData">
|
||||
<xsl:element name="TranslatedData">
|
||||
@@ -8,23 +9,23 @@
|
||||
</xsl:attribute>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Details/@PrgID">
|
||||
<xsl:copy-of select="Details"/>
|
||||
<xsl:copy-of select="Details" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="Details">
|
||||
<xsl:attribute name="PrgID">OECTrans.ImportTrans</xsl:attribute>
|
||||
<xsl:for-each select="Details/@*">
|
||||
<xsl:copy-of select="."/>
|
||||
<xsl:copy-of select="." />
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="Details/*">
|
||||
<xsl:copy-of select="."/>
|
||||
<xsl:copy-of select="." />
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:element name="Header">
|
||||
<xsl:attribute name="RONum">
|
||||
<xsl:value-of select="//Envelope/@RONum"/>
|
||||
<xsl:value-of select="//Envelope/@RONum" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="OwnerFName">
|
||||
<xsl:value-of select="//Admin/@OwnerF"/>
|
||||
@@ -33,43 +34,43 @@
|
||||
<xsl:value-of select="//Admin/@OwnerL"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="VIN">
|
||||
<xsl:value-of select="//Vehicle/@TransVIN"/>
|
||||
<xsl:value-of select="//Vehicle/@TransVIN" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Mileage">
|
||||
<xsl:value-of select="//Vehicle/@TransMileage"/>
|
||||
<xsl:value-of select="//Vehicle/@TransMileage" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Year">
|
||||
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||
<xsl:value-of select="//Vehicle/@TransYear" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Make">
|
||||
<xsl:if test="//Vehicle/@ManufName[. != '']">
|
||||
<xsl:value-of select="//Vehicle/@ManufName"/>
|
||||
<xsl:if test="//Vehicle/@ManufName[. != '']" >
|
||||
<xsl:value-of select="//Vehicle/@ManufName" />
|
||||
</xsl:if>
|
||||
<xsl:if test="//Vehicle/@ManufName[. = '']">
|
||||
<xsl:value-of select="//Vehicle/@ManufCode"/>
|
||||
<xsl:if test="//Vehicle/@ManufName[. = '']" >
|
||||
<xsl:value-of select="//Vehicle/@ManufCode" />
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Model">
|
||||
<xsl:value-of select="//Vehicle/@TransModel"/>
|
||||
<xsl:value-of select="//Vehicle/@TransModel" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Description">
|
||||
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||
<xsl:text></xsl:text>
|
||||
<xsl:value-of select="//Vehicle/@ManufName"/>
|
||||
<xsl:text></xsl:text>
|
||||
<xsl:value-of select="//Vehicle/@TransModel"/>
|
||||
<xsl:value-of select="//Vehicle/@TransYear" />
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="//Vehicle/@ManufName" />
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="//Vehicle/@TransModel" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LastSupplLevel">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Envelope/@TransactionType = 'E'">0</xsl:when>
|
||||
<xsl:when test="//Envelope/@TransactionType = 'S'">
|
||||
<xsl:value-of select="substring(//Envelope/@SupplementNum, 2)"/>
|
||||
<xsl:value-of select="substring(//Envelope/@SupplementNum, 2)" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:apply-templates select="PartsList"/>
|
||||
<xsl:apply-templates select="PartsList" />
|
||||
<xsl:element name="Envelope">
|
||||
<xsl:element name="Software">
|
||||
<xsl:attribute name="Manifest">CCC.xml</xsl:attribute>
|
||||
@@ -90,13 +91,10 @@
|
||||
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateID">
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of
|
||||
select="//Envelope/@SoftwareVersion"/>-
|
||||
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@SoftwareVersion"/>-<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateIDv2">
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-
|
||||
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateFormatVersion">
|
||||
<xsl:value-of select="//Envelope/@EMSVersion"/>
|
||||
@@ -104,9 +102,9 @@
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
<xsl:element name="Totals">
|
||||
<xsl:attribute name="GrandTotalAmount">
|
||||
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="GrandTotalAmount">
|
||||
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Administrative">
|
||||
<xsl:element name="Owner">
|
||||
@@ -217,8 +215,7 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-before(//Admin/@InsuranceZip, '-'))=5">
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
|
||||
<xsl:when test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
|
||||
<xsl:value-of select="//Admin/@InsuranceZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -229,8 +226,7 @@
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin/@InsuranceZip)=9">
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin/@InsuranceZip)>4">
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
||||
@@ -243,8 +239,7 @@
|
||||
<xsl:attribute name="Phone">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin/@InsurancePhone1Ext[. != '']">
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1"/> x
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1"/> x<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1"/>
|
||||
@@ -254,8 +249,7 @@
|
||||
<xsl:attribute name="Phone2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin/@InsurancePhone2Ext[. != '']">
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2"/> x
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2"/> x<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2"/>
|
||||
@@ -265,8 +259,7 @@
|
||||
<xsl:attribute name="Fax">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin/@InsuranceFaxExt[. != '']">
|
||||
<xsl:value-of select="//Admin/@InsuranceFax"/> x
|
||||
<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
|
||||
<xsl:value-of select="//Admin/@InsuranceFax"/> x<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsuranceFax"/>
|
||||
@@ -279,7 +272,7 @@
|
||||
</xsl:element>
|
||||
<xsl:element name="Insured">
|
||||
<xsl:attribute name="LastName">
|
||||
<xsl:value-of select="//Admin/@InsuranceLName"/>
|
||||
<xsl:value-of select="//Admin/@InsuranceLName" />
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Claim">
|
||||
@@ -315,8 +308,7 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-before(//Admin2/@EstimatorZip, '-'))=5">
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
|
||||
<xsl:when test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
|
||||
<xsl:value-of select="//Admin2/@EstimatorZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -327,8 +319,7 @@
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)=9">
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)>4">
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
||||
@@ -341,8 +332,7 @@
|
||||
<xsl:attribute name="Phone">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin2/@EstimatorPhone1Ext[. != '']">
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/> x
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/> x<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
|
||||
@@ -352,8 +342,7 @@
|
||||
<xsl:attribute name="Phone2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin2/@EstimatorPhone2Ext[. != '']">
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/> x
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/> x<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
|
||||
@@ -363,8 +352,7 @@
|
||||
<xsl:attribute name="Fax">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin2/@EstimatorFaxExt[. != '']">
|
||||
<xsl:value-of select="//Admin2/@EstimatorFax"/> x
|
||||
<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
|
||||
<xsl:value-of select="//Admin2/@EstimatorFax"/> x<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorFax"/>
|
||||
@@ -380,8 +368,7 @@
|
||||
<xsl:if test="string-length(//Admin2/@VehicleInDate)>6">
|
||||
<xsl:value-of select="substring-before(//Admin2/@VehicleInDate, ' ')"/>
|
||||
<xsl:if test="string-length(//Admin2/@VehicleInTime)=4">
|
||||
 <xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:
|
||||
<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
|
||||
 <xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
@@ -389,8 +376,7 @@
|
||||
<xsl:if test="string-length(//Admin2/@TargetVehicleOutDate)>6">
|
||||
<xsl:value-of select="substring-before(//Admin2/@TargetVehicleOutDate,' ')"/>
|
||||
<xsl:if test="string-length(//Admin2/@TargetVehicleOutTime)=4">
|
||||
 <xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:
|
||||
<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
|
||||
 <xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
@@ -398,8 +384,7 @@
|
||||
<xsl:if test="string-length(//Admin2/@VehicleOutDate)>6">
|
||||
<xsl:value-of select="substring-before(//Admin2/@VehicleOutDate, ' ')"/>
|
||||
<xsl:if test="string-length(//Admin2/@VehicleOutTime)=4">
|
||||
 <xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:
|
||||
<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
|
||||
 <xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
@@ -409,16 +394,16 @@
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
<xsl:template match="PartsList">
|
||||
<xsl:element name="PartsList">
|
||||
<xsl:element name="PartsList" >
|
||||
<xsl:for-each select="Part">
|
||||
<xsl:element name="Part">
|
||||
<xsl:element name="Part" >
|
||||
<!-- Part number translation rules -->
|
||||
<xsl:variable name="OEMPartNumber">
|
||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) != ' GM PART'">
|
||||
<xsl:value-of select="@TDPartNum"/>
|
||||
<xsl:value-of select="@TDPartNum" />
|
||||
</xsl:if>
|
||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
|
||||
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')"/>
|
||||
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')" />
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="AltPartNumber">
|
||||
@@ -491,13 +476,13 @@
|
||||
<xsl:value-of select="$PrimaryPartNumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="AltPartNum">
|
||||
<xsl:value-of select="$SecondaryPartNumber"/>
|
||||
<xsl:value-of select="$SecondaryPartNumber" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="ExternalPartType">
|
||||
<xsl:value-of select="$PrimaryPartType"/>
|
||||
<xsl:value-of select="$PrimaryPartType" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="ExternalAltPartType">
|
||||
<xsl:value-of select="$SecondaryPartType"/>
|
||||
<xsl:value-of select="$SecondaryPartType" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartType">
|
||||
<xsl:choose>
|
||||
@@ -520,56 +505,56 @@
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartDesc">
|
||||
<xsl:value-of select="@TDPartDesc"/>
|
||||
<xsl:value-of select="@TDPartDesc" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDLineRef">
|
||||
<xsl:value-of select="@TDLineRef"/>
|
||||
<xsl:value-of select="@TDLineRef" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDEstimate">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType='PAN'">
|
||||
<xsl:value-of select="@TDEstimate"/>
|
||||
<xsl:value-of select="@TDEstimate" />
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAM'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
<xsl:value-of select="@ActPrice" />
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAA'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
<xsl:value-of select="@ActPrice" />
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAL'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
<xsl:value-of select="@ActPrice" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
<xsl:value-of select="@ActPrice" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartQty">
|
||||
<xsl:value-of select="@TDPartQty"/>
|
||||
<xsl:value-of select="@TDPartQty" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LineNumber">
|
||||
<xsl:value-of select="@LineNumber"/>
|
||||
<xsl:value-of select="@LineNumber" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="SequenceNumber">
|
||||
<xsl:value-of select="@SequenceNumber"/>
|
||||
<xsl:value-of select="@SequenceNumber" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="SupplLevel">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@SupplementLevel = 'E01'">0</xsl:when>
|
||||
<xsl:when test="substring(@SupplementLevel, 1, 1) = 'S'">
|
||||
<xsl:value-of select="substring(@SupplementLevel, 2)"/>
|
||||
<xsl:value-of select="substring(@SupplementLevel, 2)" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LaborType">
|
||||
<xsl:value-of select="@LaborType"/>
|
||||
<xsl:value-of select="@LaborType" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LaborHours">
|
||||
<xsl:value-of select="@LaborHours"/>
|
||||
<xsl:value-of select="@LaborHours" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="OperationCode">
|
||||
<xsl:value-of select="@LaborOp"/>
|
||||
<xsl:value-of select="@LaborOp" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="CLPart">
|
||||
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
|
||||
@@ -580,14 +565,10 @@
|
||||
<xsl:when test="@TransactionCode='3'">False</xsl:when>
|
||||
<xsl:when test="@TransactionCode='1' or @TransactionCode ='2'">
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAO' or @PartType='PAR' or @PartType=''">
|
||||
<xsl:when test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAO' or @PartType='PAR' or @PartType=''" >
|
||||
<!-- we now handle blank part types-->
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">
|
||||
False
|
||||
</xsl:when>
|
||||
<xsl:when test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">False</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@LaborOp=''">False</xsl:when>
|
||||
|
||||
@@ -1,217 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TranslationDescriptor>
|
||||
<FileTranslations FormatName="CCC" ElementName="Estimate"
|
||||
Description="Translation Descriptor for a CCC Estimate, Version 2.0">
|
||||
<FileTranslations FormatName="CCC" ElementName="Estimate" Description="Translation Descriptor for a CCC Estimate, Version 2.0">
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.env">
|
||||
<DBFFileTranslation ID="ID1" ElementName="Envelope" Description="Envelope Table">
|
||||
<DBFFieldSpec FieldName="RO_ID" Form="attribute" Name="RONum" FieldType="" Description="RO Number"/>
|
||||
<DBFFieldSpec FieldName="UNQFILE_ID" Form="attribute" Name="UniqueFileID" FieldType=""
|
||||
Description="Unique File Identifier"/>
|
||||
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType=""
|
||||
Description="Estimate File Identifier"/>
|
||||
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean"
|
||||
Description="Includes Admin Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean"
|
||||
Description="Includes Vehicle Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean"
|
||||
Description="Includes Estimate Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean"
|
||||
Description="Includes Profile Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_TOTAL" Form="attribute" Name="IncludesTotalsInfo" FieldType="Boolean"
|
||||
Description="Includes Totals Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_VENDR" Form="attribute" Name="IncludesVendorInfo" FieldType="Boolean"
|
||||
Description="Includes Vendor Info Flag"/>
|
||||
<DBFFieldSpec FieldName="EMS_VER" Form="attribute" Name="EMSVersion" FieldType=""
|
||||
Description="EMS Version Number"/>
|
||||
<DBFFieldSpec FieldName="SUPP_NO" Form="attribute" Name="SupplementNum" FieldType=""
|
||||
Description="Supplement Number"/>
|
||||
<DBFFieldSpec FieldName="TRANS_TYPE" Form="attribute" Name="TransactionType" FieldType=""
|
||||
Description="Transaction Type"/>
|
||||
<DBFFieldSpec FieldName="EST_SYSTEM" Form="attribute" Name="EstimatingSystem" FieldType=""
|
||||
Description="Estimating System Software"/>
|
||||
<DBFFieldSpec FieldName="SW_VERSION" Form="attribute" Name="SoftwareVersion" FieldType=""
|
||||
Description="Software Version Identifier"/>
|
||||
<DBFFieldSpec FieldName="UNQFILE_ID" Form="attribute" Name="UniqueFileID" FieldType="" Description="Unique File Identifier"/>
|
||||
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType="" Description="Estimate File Identifier"/>
|
||||
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean" Description="Includes Admin Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean" Description="Includes Vehicle Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean" Description="Includes Estimate Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean" Description="Includes Profile Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_TOTAL" Form="attribute" Name="IncludesTotalsInfo" FieldType="Boolean" Description="Includes Totals Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_VENDR" Form="attribute" Name="IncludesVendorInfo" FieldType="Boolean" Description="Includes Vendor Info Flag"/>
|
||||
<DBFFieldSpec FieldName="EMS_VER" Form="attribute" Name="EMSVersion" FieldType="" Description="EMS Version Number"/>
|
||||
<DBFFieldSpec FieldName="SUPP_NO" Form="attribute" Name="SupplementNum" FieldType="" Description="Supplement Number"/>
|
||||
<DBFFieldSpec FieldName="TRANS_TYPE" Form="attribute" Name="TransactionType" FieldType="" Description="Transaction Type"/>
|
||||
<DBFFieldSpec FieldName="EST_SYSTEM" Form="attribute" Name="EstimatingSystem" FieldType="" Description="Estimating System Software"/>
|
||||
<DBFFieldSpec FieldName="SW_VERSION" Form="attribute" Name="SoftwareVersion" FieldType="" Description="Software Version Identifier"/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.LIN">
|
||||
<DBFFileTranslation ID="ID2" ElementSetName="PartsList" ElementName="Part" Description="Parts List Table">
|
||||
<DBFFieldSpec FieldName="OEM_PARTNO" Form="attribute" Name="TDPartNum" FieldType=""
|
||||
Description="Part Number"/>
|
||||
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType=""
|
||||
Description="Alternate Part Number"/>
|
||||
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType=""
|
||||
Description="Actual Part Price"/>
|
||||
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType=""
|
||||
Description="Part Description"/>
|
||||
<DBFFieldSpec FieldName="DB_PRICE" Form="attribute" Name="TDEstimate" FieldType=""
|
||||
Description="DB_Price"/>
|
||||
<DBFFieldSpec FieldName="PART_QTY" Form="attribute" Name="TDPartQty" FieldType=""
|
||||
Description="PART_QTY"/>
|
||||
<DBFFieldSpec FieldName="OEM_PARTNO" Form="attribute" Name="TDPartNum" FieldType="" Description="Part Number"/>
|
||||
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType="" Description="Alternate Part Number"/>
|
||||
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType="" Description="Actual Part Price"/>
|
||||
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType="" Description="Part Description"/>
|
||||
<DBFFieldSpec FieldName="DB_PRICE" Form="attribute" Name="TDEstimate" FieldType="" Description="DB_Price"/>
|
||||
<DBFFieldSpec FieldName="PART_QTY" Form="attribute" Name="TDPartQty" FieldType="" Description="PART_QTY"/>
|
||||
<DBFFieldSpec FieldName="LINE_NO" Form="attribute" Name="LineNumber" FieldType="" Description=""/>
|
||||
<DBFFieldSpec FieldName="UNQ_SEQ" Form="attribute" Name="SequenceNumber" FieldType="" Description=""/>
|
||||
<DBFFieldSpec FieldName="PART_TYPE" Form="attribute" Name="PartType" FieldType=""
|
||||
Description="Part Type"/>
|
||||
<DBFFieldSpec FieldName="MOD_LBR_TY" Form="attribute" Name="LaborType" FieldType=""
|
||||
Description="Labor Type"/>
|
||||
<DBFFieldSpec FieldName="MOD_LB_HRS" Form="attribute" Name="LaborHours" FieldType=""
|
||||
Description="Labor Hours"/>
|
||||
<DBFFieldSpec FieldName="PART_TYPE" Form="attribute" Name="PartType" FieldType="" Description="Part Type"/>
|
||||
<DBFFieldSpec FieldName="MOD_LBR_TY" Form="attribute" Name="LaborType" FieldType="" Description="Labor Type"/>
|
||||
<DBFFieldSpec FieldName="MOD_LB_HRS" Form="attribute" Name="LaborHours" FieldType="" Description="Labor Hours"/>
|
||||
<DBFFieldSpec FieldName="LBR_OP" Form="attribute" Name="LaborOp" FieldType="" Description="Labor Op"/>
|
||||
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType=""
|
||||
Description="Supplement Level"/>
|
||||
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType=""
|
||||
Description="Transaction Code"/>
|
||||
<DBFFieldSpec FieldName="LINE_REF" Form="attribute" Name="TDLineRef" FieldType=""
|
||||
Description="Line Reference Number"/>
|
||||
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType="" Description="Supplement Level"/>
|
||||
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType="" Description="Transaction Code"/>
|
||||
<DBFFieldSpec FieldName="LINE_REF" Form="attribute" Name="TDLineRef" FieldType="" Description="Line Reference Number"/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.VEH">
|
||||
<DBFFileTranslation ID="ID3" ElementName="Vehicle" Description="Vehicle Table">
|
||||
<DBFFieldSpec FieldName="V_VIN" Form="attribute" Name="TransVIN" FieldType="" Description="V_VIN"/>
|
||||
<DBFFieldSpec FieldName="V_MODEL_YR" Form="attribute" Name="TransYear" FieldType=""
|
||||
Description="V_MODEL_YR"/>
|
||||
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType=""
|
||||
Description="V_MAKEDESC"/>
|
||||
<DBFFieldSpec FieldName="V_MAKECODE" Form="attribute" Name="ManufCode" FieldType=""
|
||||
Description="V_MAKECODE"/>
|
||||
<DBFFieldSpec FieldName="V_MODEL" Form="attribute" Name="TransModel" FieldType=""
|
||||
Description="V_MODEL"/>
|
||||
<DBFFieldSpec FieldName="V_MILEAGE" Form="attribute" Name="TransMileage" FieldType=""
|
||||
Description="V_MILEAGE"/>
|
||||
<DBFFieldSpec FieldName="V_MODEL_YR" Form="attribute" Name="TransYear" FieldType="" Description="V_MODEL_YR"/>
|
||||
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType="" Description="V_MAKEDESC"/>
|
||||
<DBFFieldSpec FieldName="V_MAKECODE" Form="attribute" Name="ManufCode" FieldType="" Description="V_MAKECODE"/>
|
||||
<DBFFieldSpec FieldName="V_MODEL" Form="attribute" Name="TransModel" FieldType="" Description="V_MODEL"/>
|
||||
<DBFFieldSpec FieldName="V_MILEAGE" Form="attribute" Name="TransMileage" FieldType="" Description="V_MILEAGE"/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD1">
|
||||
<DBFFileTranslation ID="ID4" ElementName="Admin" Description="Administrative information">
|
||||
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType=""
|
||||
Description="Owner Lastname"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType=""
|
||||
Description="Owner Firstname"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType=""
|
||||
Description="Owner Company Name"/>
|
||||
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType=""
|
||||
Description="Owner Title"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType=""
|
||||
Description="Owner Address Line 1"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType=""
|
||||
Description="Owner Address Line 2"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType=""
|
||||
Description="Owner City"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType=""
|
||||
Description="Owner State"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType=""
|
||||
Description="Owner Zip"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType=""
|
||||
Description="Owner Country"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType=""
|
||||
Description="Owner Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType=""
|
||||
Description="Owner Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType=""
|
||||
Description="Owner Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType=""
|
||||
Description="Owner Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType=""
|
||||
Description="Owner Fax"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType=""
|
||||
Description="Owner Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType=""
|
||||
Description="Owner Email Address"/>
|
||||
<DBFFieldSpec FieldName="INS_CO_NM" Form="attribute" Name="InsuranceCompanyName" FieldType=""
|
||||
Description="Insurance Company Name"/>
|
||||
<DBFFieldSpec FieldName="INS_CO_ID" Form="attribute" Name="InsuranceCompanyID" FieldType=""
|
||||
Description="Insurance Company Identifier"/>
|
||||
<DBFFieldSpec FieldName="INS_ADDR1" Form="attribute" Name="InsuranceAddr1" FieldType=""
|
||||
Description="Insurance Address Line 1"/>
|
||||
<DBFFieldSpec FieldName="INS_ADDR2" Form="attribute" Name="InsuranceAddr2" FieldType=""
|
||||
Description="Insurance Address Line 2"/>
|
||||
<DBFFieldSpec FieldName="INS_CITY" Form="attribute" Name="InsuranceCity" FieldType=""
|
||||
Description="Insurance City"/>
|
||||
<DBFFieldSpec FieldName="INS_ST" Form="attribute" Name="InsuranceState" FieldType=""
|
||||
Description="Insurance State"/>
|
||||
<DBFFieldSpec FieldName="INS_ZIP" Form="attribute" Name="InsuranceZip" FieldType=""
|
||||
Description="Insurance Zip"/>
|
||||
<DBFFieldSpec FieldName="INS_CTRY" Form="attribute" Name="InsuranceCountry" FieldType=""
|
||||
Description="Insurance Country"/>
|
||||
<DBFFieldSpec FieldName="INS_PH1" Form="attribute" Name="InsurancePhone1" FieldType=""
|
||||
Description="Insurance Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="INS_PH1X" Form="attribute" Name="InsurancePhone1Ext" FieldType=""
|
||||
Description="Insurance Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_PH2" Form="attribute" Name="InsurancePhone2" FieldType=""
|
||||
Description="Insurance Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="INS_PH2X" Form="attribute" Name="InsurancePhone2Ext" FieldType=""
|
||||
Description="Insurance Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_FAX" Form="attribute" Name="InsuranceFax" FieldType=""
|
||||
Description="Insurance Fax"/>
|
||||
<DBFFieldSpec FieldName="INS_FAXX" Form="attribute" Name="InsuranceFaxExt" FieldType=""
|
||||
Description="Insurance Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_EA" Form="attribute" Name="InsuranceEmail" FieldType=""
|
||||
Description="Insurance Email Address"/>
|
||||
<DBFFieldSpec FieldName="INSD_LN" Form="attribute" Name="InsuranceLName" FieldType=""
|
||||
Description="Insurance Last Name"/>
|
||||
<DBFFieldSpec FieldName="CLM_NO" Form="attribute" Name="ClaimNumber" FieldType=""
|
||||
Description="Claim Number"/>
|
||||
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType="" Description="Owner Lastname"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType="" Description="Owner Firstname"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType="" Description="Owner Company Name"/>
|
||||
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType="" Description="Owner Title"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType="" Description="Owner Address Line 1"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType="" Description="Owner Address Line 2"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType="" Description="Owner City"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType="" Description="Owner State"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType="" Description="Owner Zip"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType="" Description="Owner Country"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType="" Description="Owner Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType="" Description="Owner Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType="" Description="Owner Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType="" Description="Owner Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType="" Description="Owner Fax"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType="" Description="Owner Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType="" Description="Owner Email Address"/>
|
||||
<DBFFieldSpec FieldName="INS_CO_NM" Form="attribute" Name="InsuranceCompanyName" FieldType="" Description="Insurance Company Name"/>
|
||||
<DBFFieldSpec FieldName="INS_CO_ID" Form="attribute" Name="InsuranceCompanyID" FieldType="" Description="Insurance Company Identifier"/>
|
||||
<DBFFieldSpec FieldName="INS_ADDR1" Form="attribute" Name="InsuranceAddr1" FieldType="" Description="Insurance Address Line 1"/>
|
||||
<DBFFieldSpec FieldName="INS_ADDR2" Form="attribute" Name="InsuranceAddr2" FieldType="" Description="Insurance Address Line 2"/>
|
||||
<DBFFieldSpec FieldName="INS_CITY" Form="attribute" Name="InsuranceCity" FieldType="" Description="Insurance City"/>
|
||||
<DBFFieldSpec FieldName="INS_ST" Form="attribute" Name="InsuranceState" FieldType="" Description="Insurance State"/>
|
||||
<DBFFieldSpec FieldName="INS_ZIP" Form="attribute" Name="InsuranceZip" FieldType="" Description="Insurance Zip"/>
|
||||
<DBFFieldSpec FieldName="INS_CTRY" Form="attribute" Name="InsuranceCountry" FieldType="" Description="Insurance Country"/>
|
||||
<DBFFieldSpec FieldName="INS_PH1" Form="attribute" Name="InsurancePhone1" FieldType="" Description="Insurance Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="INS_PH1X" Form="attribute" Name="InsurancePhone1Ext" FieldType="" Description="Insurance Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_PH2" Form="attribute" Name="InsurancePhone2" FieldType="" Description="Insurance Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="INS_PH2X" Form="attribute" Name="InsurancePhone2Ext" FieldType="" Description="Insurance Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_FAX" Form="attribute" Name="InsuranceFax" FieldType="" Description="Insurance Fax"/>
|
||||
<DBFFieldSpec FieldName="INS_FAXX" Form="attribute" Name="InsuranceFaxExt" FieldType="" Description="Insurance Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_EA" Form="attribute" Name="InsuranceEmail" FieldType="" Description="Insurance Email Address"/>
|
||||
<DBFFieldSpec FieldName="INSD_LN" Form="attribute" Name="InsuranceLName" FieldType="" Description="Insurance Last Name"/>
|
||||
<DBFFieldSpec FieldName="CLM_NO" Form="attribute" Name="ClaimNumber" FieldType="" Description="Claim Number"/>
|
||||
|
||||
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD2">
|
||||
<DBFFileTranslation ID="ID5" ElementName="Admin2" Description="Administrative information2">
|
||||
<DBFFieldSpec FieldName="EST_CT_LN" Form="attribute" Name="EstimatorL" FieldType=""
|
||||
Description="Estimator Lastname"/>
|
||||
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType=""
|
||||
Description="Estimator Firstname"/>
|
||||
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType=""
|
||||
Description="Estimator Company Name"/>
|
||||
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType=""
|
||||
Description="Estimator Company Identifier"/>
|
||||
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType=""
|
||||
Description="Estimator Address1"/>
|
||||
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType=""
|
||||
Description="Estimator Address2"/>
|
||||
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType=""
|
||||
Description="Estimator City"/>
|
||||
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType=""
|
||||
Description="Estimator State"/>
|
||||
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType=""
|
||||
Description="Estimator Zip"/>
|
||||
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType=""
|
||||
Description="Estimator Country"/>
|
||||
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType=""
|
||||
Description="Estimator Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType=""
|
||||
Description="Estimator Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType=""
|
||||
Description="Estimator Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="EST_PH2X" Form="attribute" Name="EstimatorPhone2Ext" FieldType=""
|
||||
Description="Estimator Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_FAX" Form="attribute" Name="EstimatorFax" FieldType=""
|
||||
Description="Estimator Fax"/>
|
||||
<DBFFieldSpec FieldName="EST_FAXX" Form="attribute" Name="EstimatorFaxExt" FieldType=""
|
||||
Description="Estimator Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_EA" Form="attribute" Name="EstimatorEmail" FieldType=""
|
||||
Description="Estimator Email Address"/>
|
||||
<DBFFieldSpec FieldName="EST_LIC_NO" Form="attribute" Name="EstimatorLicenseNumber" FieldType=""
|
||||
Description="Estimator License Number"/>
|
||||
<DBFFieldSpec FieldName="EST_FILENO" Form="attribute" Name="EstimatorFileNumber" FieldType=""
|
||||
Description="Estimator File Number"/>
|
||||
<DBFFieldSpec FieldName="RO_IN_DATE" Form="attribute" Name="VehicleInDate" FieldType=""
|
||||
Description="Date arrived in shop"/>
|
||||
<DBFFieldSpec FieldName="RO_IN_TIME" Form="attribute" Name="VehicleInTime" FieldType=""
|
||||
Description="Time arrived in shop"/>
|
||||
<DBFFieldSpec FieldName="TAR_DATE" Form="attribute" Name="TargetVehicleOutDate" FieldType=""
|
||||
Description="Target date to be completed"/>
|
||||
<DBFFieldSpec FieldName="TAR_TIME" Form="attribute" Name="TargetVehicleOutTime" FieldType=""
|
||||
Description="Target time to be completed"/>
|
||||
<DBFFieldSpec FieldName="RO_CMPDATE" Form="attribute" Name="VehicleOutDate" FieldType=""
|
||||
Description="Date completed"/>
|
||||
<DBFFieldSpec FieldName="RO_CMPTIME" Form="attribute" Name="VehicleOutTime" FieldType=""
|
||||
Description="Time completed"/>
|
||||
<DBFFieldSpec FieldName="EST_CT_LN" Form="attribute" Name="EstimatorL" FieldType="" Description="Estimator Lastname"/>
|
||||
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType="" Description="Estimator Firstname"/>
|
||||
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType="" Description="Estimator Company Name"/>
|
||||
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType="" Description="Estimator Company Identifier"/>
|
||||
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType="" Description="Estimator Address1"/>
|
||||
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType="" Description="Estimator Address2"/>
|
||||
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType="" Description="Estimator City"/>
|
||||
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType="" Description="Estimator State"/>
|
||||
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType="" Description="Estimator Zip"/>
|
||||
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType="" Description="Estimator Country"/>
|
||||
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType="" Description="Estimator Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType="" Description="Estimator Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType="" Description="Estimator Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="EST_PH2X" Form="attribute" Name="EstimatorPhone2Ext" FieldType="" Description="Estimator Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_FAX" Form="attribute" Name="EstimatorFax" FieldType="" Description="Estimator Fax"/>
|
||||
<DBFFieldSpec FieldName="EST_FAXX" Form="attribute" Name="EstimatorFaxExt" FieldType="" Description="Estimator Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_EA" Form="attribute" Name="EstimatorEmail" FieldType="" Description="Estimator Email Address"/>
|
||||
<DBFFieldSpec FieldName="EST_LIC_NO" Form="attribute" Name="EstimatorLicenseNumber" FieldType="" Description="Estimator License Number"/>
|
||||
<DBFFieldSpec FieldName="EST_FILENO" Form="attribute" Name="EstimatorFileNumber" FieldType="" Description="Estimator File Number"/>
|
||||
<DBFFieldSpec FieldName="RO_IN_DATE" Form="attribute" Name="VehicleInDate" FieldType="" Description="Date arrived in shop"/>
|
||||
<DBFFieldSpec FieldName="RO_IN_TIME" Form="attribute" Name="VehicleInTime" FieldType="" Description="Time arrived in shop"/>
|
||||
<DBFFieldSpec FieldName="TAR_DATE" Form="attribute" Name="TargetVehicleOutDate" FieldType="" Description="Target date to be completed"/>
|
||||
<DBFFieldSpec FieldName="TAR_TIME" Form="attribute" Name="TargetVehicleOutTime" FieldType="" Description="Target time to be completed"/>
|
||||
<DBFFieldSpec FieldName="RO_CMPDATE" Form="attribute" Name="VehicleOutDate" FieldType="" Description="Date completed"/>
|
||||
<DBFFieldSpec FieldName="RO_CMPTIME" Form="attribute" Name="VehicleOutTime" FieldType="" Description="Time completed"/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.TTL">
|
||||
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
|
||||
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType=""
|
||||
Description=""/>
|
||||
</DBFFileTranslation>
|
||||
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
|
||||
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType="" Description=""/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
</FileTranslations>
|
||||
<StyleSheetTranslation>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" ?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//TranslatedData">
|
||||
@@ -9,23 +9,23 @@
|
||||
</xsl:attribute>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Details/@PrgID">
|
||||
<xsl:copy-of select="Details"/>
|
||||
<xsl:copy-of select="Details" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="Details">
|
||||
<xsl:attribute name="PrgID">OECTrans.ImportTrans</xsl:attribute>
|
||||
<xsl:for-each select="Details/@*">
|
||||
<xsl:copy-of select="."/>
|
||||
<xsl:copy-of select="." />
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="Details/*">
|
||||
<xsl:copy-of select="."/>
|
||||
<xsl:copy-of select="." />
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:element name="Header">
|
||||
<xsl:attribute name="RONum">
|
||||
<xsl:value-of select="//Envelope/@RONum"/>
|
||||
<xsl:value-of select="//Envelope/@RONum" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="OwnerFName">
|
||||
<xsl:value-of select="//Admin/@OwnerF"/>
|
||||
@@ -34,42 +34,42 @@
|
||||
<xsl:value-of select="//Admin/@OwnerL"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="VIN">
|
||||
<xsl:value-of select="//Vehicle/@TransVIN"/>
|
||||
<xsl:value-of select="//Vehicle/@TransVIN" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Mileage">
|
||||
<xsl:value-of select="//Vehicle/@TransMileage"/>
|
||||
<xsl:value-of select="//Vehicle/@TransMileage" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Year">
|
||||
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||
<xsl:value-of select="//Vehicle/@TransYear" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Make">
|
||||
<xsl:if test="//Vehicle/@ManufName[. != '']">
|
||||
<xsl:value-of select="//Vehicle/@ManufName"/>
|
||||
<xsl:if test="//Vehicle/@ManufName[. != '']" >
|
||||
<xsl:value-of select="//Vehicle/@ManufName" />
|
||||
</xsl:if>
|
||||
<xsl:if test="//Vehicle/@ManufName[. = '']">
|
||||
<xsl:value-of select="//Vehicle/@ManufCode"/>
|
||||
<xsl:if test="//Vehicle/@ManufName[. = '']" >
|
||||
<xsl:value-of select="//Vehicle/@ManufCode" />
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Model">
|
||||
<xsl:value-of select="//Vehicle/@TransModel"/>
|
||||
<xsl:value-of select="//Vehicle/@TransModel" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Description">
|
||||
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||
<xsl:text></xsl:text>
|
||||
<xsl:value-of select="//Vehicle/@ManufName"/>
|
||||
<xsl:text></xsl:text>
|
||||
<xsl:value-of select="//Vehicle/@TransModel"/>
|
||||
<xsl:value-of select="//Vehicle/@TransYear" />
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="//Vehicle/@ManufName" />
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="//Vehicle/@TransModel" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LastSupplLevel">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(//Envelope/@SupplementNum) > 0">
|
||||
<xsl:value-of select="//Envelope/@SupplementNum"/>
|
||||
<xsl:value-of select="//Envelope/@SupplementNum" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:apply-templates select="PartsList"/>
|
||||
<xsl:apply-templates select="PartsList" />
|
||||
<xsl:element name="Envelope">
|
||||
<xsl:element name="Software">
|
||||
<xsl:attribute name="Manifest">Mitchell.xml</xsl:attribute>
|
||||
@@ -90,13 +90,10 @@
|
||||
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateID">
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of
|
||||
select="//Envelope/@SoftwareVersion"/>-
|
||||
<xsl:value-of select="//Envelope/@EstimateFileID"/>
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@SoftwareVersion"/>-<xsl:value-of select="//Envelope/@EstimateFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateIDv2">
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-
|
||||
<xsl:value-of select="//Envelope/@EstimateFileID"/>
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@EstimateFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateFormatVersion">
|
||||
<xsl:value-of select="//Envelope/@EMSVersion"/>
|
||||
@@ -105,7 +102,7 @@
|
||||
</xsl:element>
|
||||
<xsl:element name="Totals">
|
||||
<xsl:attribute name="GrandTotalAmount">
|
||||
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
||||
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Administrative">
|
||||
@@ -217,8 +214,7 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-before(//Admin/@InsuranceZip, '-'))=5">
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
|
||||
<xsl:when test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
|
||||
<xsl:value-of select="//Admin/@InsuranceZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -229,8 +225,7 @@
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin/@InsuranceZip)=9">
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin/@InsuranceZip)>4">
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
||||
@@ -243,8 +238,7 @@
|
||||
<xsl:attribute name="Phone">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin/@InsurancePhone1Ext[. != '']">
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1"/> x
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1"/> x<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1"/>
|
||||
@@ -254,8 +248,7 @@
|
||||
<xsl:attribute name="Phone2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin/@InsurancePhone2Ext[. != '']">
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2"/> x
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2"/> x<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2"/>
|
||||
@@ -265,8 +258,7 @@
|
||||
<xsl:attribute name="Fax">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin/@InsuranceFaxExt[. != '']">
|
||||
<xsl:value-of select="//Admin/@InsuranceFax"/> x
|
||||
<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
|
||||
<xsl:value-of select="//Admin/@InsuranceFax"/> x<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsuranceFax"/>
|
||||
@@ -318,8 +310,7 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-before(//Admin2/@EstimatorZip, '-'))=5">
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
|
||||
<xsl:when test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
|
||||
<xsl:value-of select="//Admin2/@EstimatorZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -330,8 +321,7 @@
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)=9">
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)>4">
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
||||
@@ -344,8 +334,7 @@
|
||||
<xsl:attribute name="Phone">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin2/@EstimatorPhone1Ext[. != '']">
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/> x
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/> x<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
|
||||
@@ -355,8 +344,7 @@
|
||||
<xsl:attribute name="Phone2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin2/@EstimatorPhone2Ext[. != '']">
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/> x
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/> x<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
|
||||
@@ -366,8 +354,7 @@
|
||||
<xsl:attribute name="Fax">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//Admin2/@EstimatorFaxExt[. != '']">
|
||||
<xsl:value-of select="//Admin2/@EstimatorFax"/> x
|
||||
<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
|
||||
<xsl:value-of select="//Admin2/@EstimatorFax"/> x<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorFax"/>
|
||||
@@ -383,8 +370,7 @@
|
||||
<xsl:if test="string-length(//Admin2/@VehicleInDate)>6">
|
||||
<xsl:value-of select="substring-before(//Admin2/@VehicleInDate, ' ')"/>
|
||||
<xsl:if test="string-length(//Admin2/@VehicleInTime)=4">
|
||||
 <xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:
|
||||
<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
|
||||
 <xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
@@ -392,8 +378,7 @@
|
||||
<xsl:if test="string-length(//Admin2/@TargetVehicleOutDate)>6">
|
||||
<xsl:value-of select="substring-before(//Admin2/@TargetVehicleOutDate,' ')"/>
|
||||
<xsl:if test="string-length(//Admin2/@TargetVehicleOutTime)=4">
|
||||
 <xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:
|
||||
<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
|
||||
 <xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
@@ -401,8 +386,7 @@
|
||||
<xsl:if test="string-length(//Admin2/@VehicleOutDate)>6">
|
||||
<xsl:value-of select="substring-before(//Admin2/@VehicleOutDate, ' ')"/>
|
||||
<xsl:if test="string-length(//Admin2/@VehicleOutTime)=4">
|
||||
 <xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:
|
||||
<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
|
||||
 <xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
@@ -412,16 +396,16 @@
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
<xsl:template match="PartsList">
|
||||
<xsl:element name="PartsList">
|
||||
<xsl:element name="PartsList" >
|
||||
<xsl:for-each select="Part">
|
||||
<xsl:element name="Part">
|
||||
<xsl:element name="Part" >
|
||||
<!-- Part number translation rules -->
|
||||
<xsl:variable name="OEMPartNumber">
|
||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) != ' GM PART'">
|
||||
<xsl:value-of select="@TDPartNum"/>
|
||||
<xsl:value-of select="@TDPartNum" />
|
||||
</xsl:if>
|
||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
|
||||
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')"/>
|
||||
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')" />
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="AltPartNumber">
|
||||
@@ -464,13 +448,13 @@
|
||||
<xsl:value-of select="$PrimaryPartNumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="AltPartNum">
|
||||
<xsl:value-of select="$SecondaryPartNumber"/>
|
||||
<xsl:value-of select="$SecondaryPartNumber" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="ExternalPartType">
|
||||
<xsl:value-of select="$PrimaryPartType"/>
|
||||
<xsl:value-of select="$PrimaryPartType" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="ExternalAltPartType">
|
||||
<xsl:value-of select="$SecondaryPartType"/>
|
||||
<xsl:value-of select="$SecondaryPartType" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartType">
|
||||
<xsl:choose>
|
||||
@@ -495,59 +479,59 @@
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartDesc">
|
||||
<xsl:value-of select="@TDPartDesc"/>
|
||||
<xsl:value-of select="@TDPartDesc" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDEstimate">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType='PAN'">
|
||||
<xsl:value-of select="@TDEstimate"/>
|
||||
<xsl:value-of select="@TDEstimate" />
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAM'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
<xsl:value-of select="@ActPrice" />
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAA'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
<xsl:value-of select="@ActPrice" />
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAL'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
<xsl:value-of select="@ActPrice" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
<xsl:value-of select="@ActPrice" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartQty">
|
||||
<xsl:value-of select="@TDPartQty"/>
|
||||
<xsl:value-of select="@TDPartQty" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LineNumber">
|
||||
<xsl:value-of select="@LineNumber"/>
|
||||
<xsl:value-of select="@LineNumber" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="SequenceNumber">
|
||||
<xsl:value-of select="@SequenceNumber"/>
|
||||
<xsl:value-of select="@SequenceNumber" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="SupplLevel">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@SupplementLevel = 'E'">0</xsl:when>
|
||||
<xsl:when test="substring(@SupplementLevel, 1, 1) = 'S'">
|
||||
<xsl:value-of select="substring(@SupplementLevel, 2)"/>
|
||||
<xsl:value-of select="substring(@SupplementLevel, 2)" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LaborType">
|
||||
<xsl:value-of select="@LaborType"/>
|
||||
<xsl:value-of select="@LaborType" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LaborHours">
|
||||
<xsl:value-of select="@LaborHours"/>
|
||||
<xsl:value-of select="@LaborHours" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="OperationCode">
|
||||
<xsl:value-of select="@LaborOp"/>
|
||||
<xsl:value-of select="@LaborOp" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="GlassFlag">
|
||||
<xsl:value-of select="@GlassFlag"/>
|
||||
<xsl:value-of select="@GlassFlag" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="MarkUp">
|
||||
<xsl:value-of select="@MarkUp"/>
|
||||
<xsl:value-of select="@MarkUp" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="CLPart">
|
||||
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
|
||||
@@ -558,13 +542,9 @@
|
||||
<xsl:when test="@TransactionCode='3'">False</xsl:when>
|
||||
<xsl:when test="@TransactionCode='1' or @TransactionCode='2'">
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAR' or @PartType='PAC'">
|
||||
<xsl:when test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAR' or @PartType='PAC'">
|
||||
<xsl:choose>
|
||||
<xsl:when
|
||||
test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">
|
||||
False
|
||||
</xsl:when>
|
||||
<xsl:when test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">False</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@LaborOp='OP0'">False</xsl:when>
|
||||
|
||||
@@ -1,222 +1,129 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TranslationDescriptor>
|
||||
<FileTranslations FormatName="Mitchell" ElementName="Estimate"
|
||||
Description="Translation Descriptor for a Mitchell Estimate, Version EMS 2.0">
|
||||
<FileTranslations FormatName="Mitchell" ElementName="Estimate" Description="Translation Descriptor for a Mitchell Estimate, Version EMS 2.0">
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.env">
|
||||
<DBFFileTranslation ID="ID1" ElementName="Envelope" Description="Envelope Table">
|
||||
<DBFFieldSpec FieldName="RO_ID" Form="attribute" Name="RONum" FieldType="" Description="RO Number"/>
|
||||
<DBFFieldSpec FieldName="UNQFILE_ID" Form="attribute" Name="UniqueFileID" FieldType=""
|
||||
Description="Unique File Identifier"/>
|
||||
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType=""
|
||||
Description="Estimate File Identifier"/>
|
||||
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean"
|
||||
Description="Includes Admin Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean"
|
||||
Description="Includes Vehicle Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean"
|
||||
Description="Includes Estimate Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean"
|
||||
Description="Includes Profile Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_TOTAL" Form="attribute" Name="IncludesTotalsInfo" FieldType="Boolean"
|
||||
Description="Includes Totals Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_VENDR" Form="attribute" Name="IncludesVendorInfo" FieldType="Boolean"
|
||||
Description="Includes Vendor Info Flag"/>
|
||||
<DBFFieldSpec FieldName="EMS_VER" Form="attribute" Name="EMSVersion" FieldType=""
|
||||
Description="EMS Version Number"/>
|
||||
<DBFFieldSpec FieldName="SUPP_NO" Form="attribute" Name="SupplementNum" FieldType=""
|
||||
Description="Supplement Number"/>
|
||||
<DBFFieldSpec FieldName="TRANS_TYPE" Form="attribute" Name="TransactionType" FieldType=""
|
||||
Description="Transaction Type"/>
|
||||
<DBFFieldSpec FieldName="EST_SYSTEM" Form="attribute" Name="EstimatingSystem" FieldType=""
|
||||
Description="Estimating System Software"/>
|
||||
<DBFFieldSpec FieldName="SW_VERSION" Form="attribute" Name="SoftwareVersion" FieldType=""
|
||||
Description="Software Version Identifier"/>
|
||||
<DBFFieldSpec FieldName="UNQFILE_ID" Form="attribute" Name="UniqueFileID" FieldType="" Description="Unique File Identifier"/>
|
||||
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType="" Description="Estimate File Identifier"/>
|
||||
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean" Description="Includes Admin Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean" Description="Includes Vehicle Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean" Description="Includes Estimate Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean" Description="Includes Profile Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_TOTAL" Form="attribute" Name="IncludesTotalsInfo" FieldType="Boolean" Description="Includes Totals Info Flag"/>
|
||||
<DBFFieldSpec FieldName="INCL_VENDR" Form="attribute" Name="IncludesVendorInfo" FieldType="Boolean" Description="Includes Vendor Info Flag"/>
|
||||
<DBFFieldSpec FieldName="EMS_VER" Form="attribute" Name="EMSVersion" FieldType="" Description="EMS Version Number"/>
|
||||
<DBFFieldSpec FieldName="SUPP_NO" Form="attribute" Name="SupplementNum" FieldType="" Description="Supplement Number"/>
|
||||
<DBFFieldSpec FieldName="TRANS_TYPE" Form="attribute" Name="TransactionType" FieldType="" Description="Transaction Type"/>
|
||||
<DBFFieldSpec FieldName="EST_SYSTEM" Form="attribute" Name="EstimatingSystem" FieldType="" Description="Estimating System Software"/>
|
||||
<DBFFieldSpec FieldName="SW_VERSION" Form="attribute" Name="SoftwareVersion" FieldType="" Description="Software Version Identifier"/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.LIN">
|
||||
<DBFFileTranslation ID="ID2" ElementSetName="PartsList" ElementName="Part" Description="Parts List Table">
|
||||
<DBFFieldSpec FieldName="OEM_PARTNO" Form="attribute" Name="TDPartNum" FieldType=""
|
||||
Description="Part Number"/>
|
||||
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType=""
|
||||
Description="Alternate Part Number"/>
|
||||
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType=""
|
||||
Description="Actual Part Price"/>
|
||||
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType=""
|
||||
Description="Part Description"/>
|
||||
<DBFFieldSpec FieldName="DB_PRICE" Form="attribute" Name="TDEstimate" FieldType=""
|
||||
Description="DB_Price"/>
|
||||
<DBFFieldSpec FieldName="PART_QTY" Form="attribute" Name="TDPartQty" FieldType=""
|
||||
Description="Part Quantity"/>
|
||||
<DBFFieldSpec FieldName="OEM_PARTNO" Form="attribute" Name="TDPartNum" FieldType="" Description="Part Number"/>
|
||||
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType="" Description="Alternate Part Number"/>
|
||||
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType="" Description="Actual Part Price"/>
|
||||
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType="" Description="Part Description"/>
|
||||
<DBFFieldSpec FieldName="DB_PRICE" Form="attribute" Name="TDEstimate" FieldType="" Description="DB_Price"/>
|
||||
<DBFFieldSpec FieldName="PART_QTY" Form="attribute" Name="TDPartQty" FieldType="" Description="Part Quantity"/>
|
||||
<DBFFieldSpec FieldName="LINE_NO" Form="attribute" Name="LineNumber" FieldType="" Description=""/>
|
||||
<DBFFieldSpec FieldName="UNQ_SEQ" Form="attribute" Name="SequenceNumber" FieldType="" Description=""/>
|
||||
<DBFFieldSpec FieldName="PART_TYPE" Form="attribute" Name="PartType" FieldType=""
|
||||
Description="Part Type"/>
|
||||
<DBFFieldSpec FieldName="MOD_LBR_TY" Form="attribute" Name="LaborType" FieldType=""
|
||||
Description="Labor Type"/>
|
||||
<DBFFieldSpec FieldName="MOD_LB_HRS" Form="attribute" Name="LaborHours" FieldType=""
|
||||
Description="Labor Hours"/>
|
||||
<DBFFieldSpec FieldName="PART_TYPE" Form="attribute" Name="PartType" FieldType="" Description="Part Type"/>
|
||||
<DBFFieldSpec FieldName="MOD_LBR_TY" Form="attribute" Name="LaborType" FieldType="" Description="Labor Type"/>
|
||||
<DBFFieldSpec FieldName="MOD_LB_HRS" Form="attribute" Name="LaborHours" FieldType="" Description="Labor Hours"/>
|
||||
<DBFFieldSpec FieldName="LBR_OP" Form="attribute" Name="LaborOp" FieldType="" Description="Labor Op"/>
|
||||
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType=""
|
||||
Description="Supplement Level"/>
|
||||
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType=""
|
||||
Description="Transaction Code"/>
|
||||
<DBFFieldSpec FieldName="GLASS_FLAG" Form="attribute" Name="GlassFlag" FieldType=""
|
||||
Description="Glass Flag"/>
|
||||
<DBFFieldSpec FieldName="PRT_DSMK_M" Form="attribute" Name="MarkUp" FieldType=""
|
||||
Description="Price Mark up for non OEM parts"/>
|
||||
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType="" Description="Supplement Level"/>
|
||||
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType="" Description="Transaction Code"/>
|
||||
<DBFFieldSpec FieldName="GLASS_FLAG" Form="attribute" Name="GlassFlag" FieldType="" Description="Glass Flag"/>
|
||||
<DBFFieldSpec FieldName="PRT_DSMK_M" Form="attribute" Name="MarkUp" FieldType="" Description="Price Mark up for non OEM parts"/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.VEH">
|
||||
<DBFFileTranslation ID="ID3" ElementName="Vehicle" Description="Vehicle Table">
|
||||
<DBFFieldSpec FieldName="V_VIN" Form="attribute" Name="TransVIN" FieldType="" Description=""/>
|
||||
<DBFFieldSpec FieldName="V_MODEL_YR" Form="attribute" Name="TransYear" FieldType=""
|
||||
Description="V_MODEL_YR"/>
|
||||
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType=""
|
||||
Description="V_MAKEDESC"/>
|
||||
<DBFFieldSpec FieldName="V_MAKECODE" Form="attribute" Name="ManufCode" FieldType=""
|
||||
Description="V_MAKECODE"/>
|
||||
<DBFFieldSpec FieldName="V_MODEL" Form="attribute" Name="TransModel" FieldType=""
|
||||
Description="V_MODEL"/>
|
||||
<DBFFieldSpec FieldName="V_MILEAGE" Form="attribute" Name="TransMileage" FieldType=""
|
||||
Description="V_MILEAGE"/>
|
||||
<DBFFieldSpec FieldName="V_MODEL_YR" Form="attribute" Name="TransYear" FieldType="" Description="V_MODEL_YR"/>
|
||||
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType="" Description="V_MAKEDESC"/>
|
||||
<DBFFieldSpec FieldName="V_MAKECODE" Form="attribute" Name="ManufCode" FieldType="" Description="V_MAKECODE"/>
|
||||
<DBFFieldSpec FieldName="V_MODEL" Form="attribute" Name="TransModel" FieldType="" Description="V_MODEL"/>
|
||||
<DBFFieldSpec FieldName="V_MILEAGE" Form="attribute" Name="TransMileage" FieldType="" Description="V_MILEAGE"/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD1">
|
||||
<DBFFileTranslation ID="ID4" ElementName="Admin" Description="Administrative information">
|
||||
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType=""
|
||||
Description="Owner Lastname"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType=""
|
||||
Description="Owner Firstname"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType=""
|
||||
Description="Owner Company Name"/>
|
||||
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType=""
|
||||
Description="Owner Title"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType=""
|
||||
Description="Owner Address Line 1"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType=""
|
||||
Description="Owner Address Line 2"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType=""
|
||||
Description="Owner City"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType=""
|
||||
Description="Owner State"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType=""
|
||||
Description="Owner Zip"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType=""
|
||||
Description="Owner Country"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType=""
|
||||
Description="Owner Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType=""
|
||||
Description="Owner Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType=""
|
||||
Description="Owner Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType=""
|
||||
Description="Owner Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType=""
|
||||
Description="Owner Fax"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType=""
|
||||
Description="Owner Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType=""
|
||||
Description="Owner Email Address"/>
|
||||
<DBFFieldSpec FieldName="INS_CO_NM" Form="attribute" Name="InsuranceCompanyName" FieldType=""
|
||||
Description="Insurance Company Name"/>
|
||||
<DBFFieldSpec FieldName="INS_CO_ID" Form="attribute" Name="InsuranceCompanyID" FieldType=""
|
||||
Description="Insurance Company Identifier"/>
|
||||
<DBFFieldSpec FieldName="INS_ADDR1" Form="attribute" Name="InsuranceAddr1" FieldType=""
|
||||
Description="Insurance Address Line 1"/>
|
||||
<DBFFieldSpec FieldName="INS_ADDR2" Form="attribute" Name="InsuranceAddr2" FieldType=""
|
||||
Description="Insurance Address Line 2"/>
|
||||
<DBFFieldSpec FieldName="INS_CITY" Form="attribute" Name="InsuranceCity" FieldType=""
|
||||
Description="Insurance City"/>
|
||||
<DBFFieldSpec FieldName="INS_ST" Form="attribute" Name="InsuranceState" FieldType=""
|
||||
Description="Insurance State"/>
|
||||
<DBFFieldSpec FieldName="INS_ZIP" Form="attribute" Name="InsuranceZip" FieldType=""
|
||||
Description="Insurance Zip"/>
|
||||
<DBFFieldSpec FieldName="INS_CTRY" Form="attribute" Name="InsuranceCountry" FieldType=""
|
||||
Description="Insurance Country"/>
|
||||
<DBFFieldSpec FieldName="INS_PH1" Form="attribute" Name="InsurancePhone1" FieldType=""
|
||||
Description="Insurance Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="INS_PH1X" Form="attribute" Name="InsurancePhone1Ext" FieldType=""
|
||||
Description="Insurance Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_PH2" Form="attribute" Name="InsurancePhone2" FieldType=""
|
||||
Description="Insurance Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="INS_PH2X" Form="attribute" Name="InsurancePhone2Ext" FieldType=""
|
||||
Description="Insurance Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_FAX" Form="attribute" Name="InsuranceFax" FieldType=""
|
||||
Description="Insurance Fax"/>
|
||||
<DBFFieldSpec FieldName="INS_FAXX" Form="attribute" Name="InsuranceFaxExt" FieldType=""
|
||||
Description="Insurance Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_EA" Form="attribute" Name="InsuranceEmail" FieldType=""
|
||||
Description="Insurance Email Address"/>
|
||||
<DBFFieldSpec FieldName="INSD_LN" Form="attribute" Name="InsuranceLName" FieldType=""
|
||||
Description="Insurance Last Name"/>
|
||||
<DBFFieldSpec FieldName="CLM_NO" Form="attribute" Name="ClaimNumber" FieldType=""
|
||||
Description="Claim Number"/>
|
||||
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType="" Description="Owner Lastname"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType="" Description="Owner Firstname"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType="" Description="Owner Company Name"/>
|
||||
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType="" Description="Owner Title"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType="" Description="Owner Address Line 1"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType="" Description="Owner Address Line 2"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType="" Description="Owner City"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType="" Description="Owner State"/>
|
||||
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType="" Description="Owner Zip"/>
|
||||
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType="" Description="Owner Country"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType="" Description="Owner Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType="" Description="Owner Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType="" Description="Owner Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType="" Description="Owner Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType="" Description="Owner Fax"/>
|
||||
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType="" Description="Owner Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType="" Description="Owner Email Address"/>
|
||||
<DBFFieldSpec FieldName="INS_CO_NM" Form="attribute" Name="InsuranceCompanyName" FieldType="" Description="Insurance Company Name"/>
|
||||
<DBFFieldSpec FieldName="INS_CO_ID" Form="attribute" Name="InsuranceCompanyID" FieldType="" Description="Insurance Company Identifier"/>
|
||||
<DBFFieldSpec FieldName="INS_ADDR1" Form="attribute" Name="InsuranceAddr1" FieldType="" Description="Insurance Address Line 1"/>
|
||||
<DBFFieldSpec FieldName="INS_ADDR2" Form="attribute" Name="InsuranceAddr2" FieldType="" Description="Insurance Address Line 2"/>
|
||||
<DBFFieldSpec FieldName="INS_CITY" Form="attribute" Name="InsuranceCity" FieldType="" Description="Insurance City"/>
|
||||
<DBFFieldSpec FieldName="INS_ST" Form="attribute" Name="InsuranceState" FieldType="" Description="Insurance State"/>
|
||||
<DBFFieldSpec FieldName="INS_ZIP" Form="attribute" Name="InsuranceZip" FieldType="" Description="Insurance Zip"/>
|
||||
<DBFFieldSpec FieldName="INS_CTRY" Form="attribute" Name="InsuranceCountry" FieldType="" Description="Insurance Country"/>
|
||||
<DBFFieldSpec FieldName="INS_PH1" Form="attribute" Name="InsurancePhone1" FieldType="" Description="Insurance Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="INS_PH1X" Form="attribute" Name="InsurancePhone1Ext" FieldType="" Description="Insurance Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_PH2" Form="attribute" Name="InsurancePhone2" FieldType="" Description="Insurance Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="INS_PH2X" Form="attribute" Name="InsurancePhone2Ext" FieldType="" Description="Insurance Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_FAX" Form="attribute" Name="InsuranceFax" FieldType="" Description="Insurance Fax"/>
|
||||
<DBFFieldSpec FieldName="INS_FAXX" Form="attribute" Name="InsuranceFaxExt" FieldType="" Description="Insurance Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="INS_EA" Form="attribute" Name="InsuranceEmail" FieldType="" Description="Insurance Email Address"/>
|
||||
<DBFFieldSpec FieldName="INSD_LN" Form="attribute" Name="InsuranceLName" FieldType="" Description="Insurance Last Name"/>
|
||||
<DBFFieldSpec FieldName="CLM_NO" Form="attribute" Name="ClaimNumber" FieldType="" Description="Claim Number"/>
|
||||
|
||||
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD2">
|
||||
<DBFFileTranslation ID="ID5" ElementName="Admin2" Description="Administrative information2">
|
||||
<DBFFieldSpec FieldName="EST_CT_LN" Form="attribute" Name="EstimatorL" FieldType=""
|
||||
Description="Estimator Lastname"/>
|
||||
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType=""
|
||||
Description="Estimator Firstname"/>
|
||||
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType=""
|
||||
Description="Estimator Company Name"/>
|
||||
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType=""
|
||||
Description="Estimator Company Identifier"/>
|
||||
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType=""
|
||||
Description="Estimator Address1"/>
|
||||
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType=""
|
||||
Description="Estimator Address2"/>
|
||||
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType=""
|
||||
Description="Estimator City"/>
|
||||
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType=""
|
||||
Description="Estimator State"/>
|
||||
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType=""
|
||||
Description="Estimator Zip"/>
|
||||
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType=""
|
||||
Description="Estimator Country"/>
|
||||
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType=""
|
||||
Description="Estimator Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType=""
|
||||
Description="Estimator Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType=""
|
||||
Description="Estimator Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="EST_PH2X" Form="attribute" Name="EstimatorPhone2Ext" FieldType=""
|
||||
Description="Estimator Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_FAX" Form="attribute" Name="EstimatorFax" FieldType=""
|
||||
Description="Estimator Fax"/>
|
||||
<DBFFieldSpec FieldName="EST_FAXX" Form="attribute" Name="EstimatorFaxExt" FieldType=""
|
||||
Description="Estimator Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_EA" Form="attribute" Name="EstimatorEmail" FieldType=""
|
||||
Description="Estimator Email Address"/>
|
||||
<DBFFieldSpec FieldName="EST_LIC_NO" Form="attribute" Name="EstimatorLicenseNumber" FieldType=""
|
||||
Description="Estimator License Number"/>
|
||||
<DBFFieldSpec FieldName="EST_FILENO" Form="attribute" Name="EstimatorFileNumber" FieldType=""
|
||||
Description="Estimator File Number"/>
|
||||
<DBFFieldSpec FieldName="RO_IN_DATE" Form="attribute" Name="VehicleInDate" FieldType=""
|
||||
Description="Date arrived in shop"/>
|
||||
<DBFFieldSpec FieldName="RO_IN_TIME" Form="attribute" Name="VehicleInTime" FieldType=""
|
||||
Description="Time arrived in shop"/>
|
||||
<DBFFieldSpec FieldName="TAR_DATE" Form="attribute" Name="TargetVehicleOutDate" FieldType=""
|
||||
Description="Target date to be completed"/>
|
||||
<DBFFieldSpec FieldName="TAR_TIME" Form="attribute" Name="TargetVehicleOutTime" FieldType=""
|
||||
Description="Target time to be completed"/>
|
||||
<DBFFieldSpec FieldName="RO_CMPDATE" Form="attribute" Name="VehicleOutDate" FieldType=""
|
||||
Description="Date completed"/>
|
||||
<DBFFieldSpec FieldName="RO_CMPTIME" Form="attribute" Name="VehicleOutTime" FieldType=""
|
||||
Description="Time completed"/>
|
||||
<DBFFieldSpec FieldName="RF_CO_NM" Form="attribute" Name="BodyShopName" FieldType=""
|
||||
Description="Body Shop Name"/>
|
||||
<DBFFieldSpec FieldName="EST_CT_LN" Form="attribute" Name="EstimatorL" FieldType="" Description="Estimator Lastname"/>
|
||||
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType="" Description="Estimator Firstname"/>
|
||||
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType="" Description="Estimator Company Name"/>
|
||||
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType="" Description="Estimator Company Identifier"/>
|
||||
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType="" Description="Estimator Address1"/>
|
||||
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType="" Description="Estimator Address2"/>
|
||||
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType="" Description="Estimator City"/>
|
||||
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType="" Description="Estimator State"/>
|
||||
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType="" Description="Estimator Zip"/>
|
||||
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType="" Description="Estimator Country"/>
|
||||
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType="" Description="Estimator Primary Phone"/>
|
||||
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType="" Description="Estimator Primary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType="" Description="Estimator Secondary Phone"/>
|
||||
<DBFFieldSpec FieldName="EST_PH2X" Form="attribute" Name="EstimatorPhone2Ext" FieldType="" Description="Estimator Secondary Phone Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_FAX" Form="attribute" Name="EstimatorFax" FieldType="" Description="Estimator Fax"/>
|
||||
<DBFFieldSpec FieldName="EST_FAXX" Form="attribute" Name="EstimatorFaxExt" FieldType="" Description="Estimator Fax Extension"/>
|
||||
<DBFFieldSpec FieldName="EST_EA" Form="attribute" Name="EstimatorEmail" FieldType="" Description="Estimator Email Address"/>
|
||||
<DBFFieldSpec FieldName="EST_LIC_NO" Form="attribute" Name="EstimatorLicenseNumber" FieldType="" Description="Estimator License Number"/>
|
||||
<DBFFieldSpec FieldName="EST_FILENO" Form="attribute" Name="EstimatorFileNumber" FieldType="" Description="Estimator File Number"/>
|
||||
<DBFFieldSpec FieldName="RO_IN_DATE" Form="attribute" Name="VehicleInDate" FieldType="" Description="Date arrived in shop"/>
|
||||
<DBFFieldSpec FieldName="RO_IN_TIME" Form="attribute" Name="VehicleInTime" FieldType="" Description="Time arrived in shop"/>
|
||||
<DBFFieldSpec FieldName="TAR_DATE" Form="attribute" Name="TargetVehicleOutDate" FieldType="" Description="Target date to be completed"/>
|
||||
<DBFFieldSpec FieldName="TAR_TIME" Form="attribute" Name="TargetVehicleOutTime" FieldType="" Description="Target time to be completed"/>
|
||||
<DBFFieldSpec FieldName="RO_CMPDATE" Form="attribute" Name="VehicleOutDate" FieldType="" Description="Date completed"/>
|
||||
<DBFFieldSpec FieldName="RO_CMPTIME" Form="attribute" Name="VehicleOutTime" FieldType="" Description="Time completed"/>
|
||||
<DBFFieldSpec FieldName="RF_CO_NM" Form="attribute" Name="BodyShopName" FieldType="" Description="Body Shop Name"/>
|
||||
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.TTL">
|
||||
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
|
||||
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType=""
|
||||
Description=""/>
|
||||
</DBFFileTranslation>
|
||||
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
|
||||
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType="" Description=""/>
|
||||
</DBFFileTranslation>
|
||||
</FileTranslation>
|
||||
</FileTranslations>
|
||||
<StyleSheetTranslation>
|
||||
|
||||
6
_reference/Responsibility Center Setup.md
Normal file
6
_reference/Responsibility Center Setup.md
Normal file
File diff suppressed because one or more lines are too long
24
_reference/SampleMetadata.md
Normal file
24
_reference/SampleMetadata.md
Normal file
File diff suppressed because one or more lines are too long
1
_reference/Test_CDK_Acct Config.json
Normal file
1
_reference/Test_CDK_Acct Config.json
Normal file
File diff suppressed because one or more lines are too long
79
_reference/dropletSetup.md
Normal file
79
_reference/dropletSetup.md
Normal file
@@ -0,0 +1,79 @@
|
||||
**Create an SSH key for local computer**
|
||||
|
||||
ssh-keygen -t rsa -C "your_email@example.com"
|
||||
|
||||
Copy the new key to clipboard:
|
||||
|
||||
- Windows: clip < id_rsa.pub
|
||||
- Linux: sudo apt-get install xclip
|
||||
xclip -sel clip < ~/.ssh/id_rsa.pub
|
||||
- Mac: pbcopy < ~/.ssh/id_rsa.pub
|
||||
- Manual Copy: cat ~/.ssh/id_rsa.pub
|
||||
|
||||
Add the SSH key to the drop creation screen.
|
||||
|
||||
1. Create a new user to replace root user
|
||||
1. # adduser imex
|
||||
2. # usermod -aG sudo imex
|
||||
3. # su - imex
|
||||
4. $ mkdir ~/.ssh
|
||||
5. $ chmod 700 ~/.ssh
|
||||
6. $ nano ~/.ssh/authorized_keys
|
||||
7. Add the copied SSH key and save.
|
||||
8. $ chmod 600 ~/.ssh/authorized_keys #Restrict access to authorized keys.
|
||||
2. Setup the Firewall
|
||||
1. $ sudo ufw allow OpenSSH.
|
||||
2. $ sudo ufw enable
|
||||
3. Add Nginx & Configure
|
||||
1. $ sudo apt-get update
|
||||
2. $ sudo apt-get install nginx
|
||||
3. $ sudo ufw allow 'Nginx Full'
|
||||
4. $ sudo ufw app list
|
||||
1. Nginx Full: Opens both port 80 (normal, unencrypted web traffic) and port 443 (TLS/SSL encrypted traffic)
|
||||
2. Nginx Http: Opens only port 80 (normal, unencrypted web traffic)
|
||||
3. Nginx Https: Opens only port 443 (TLS/SSL encrypted traffic)
|
||||
5. Should now be able to go to IP and see nginx responding with a blank page.
|
||||
4. Install NodeJs
|
||||
1. $ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
|
||||
2. $ sudo apt install nodejs
|
||||
3. $ node --version
|
||||
5. Clone Source Code
|
||||
1. $ git clone git@bitbucket.org:snaptsoft/bodyshop.git //Requires SSH setup.
|
||||
2. $ cd bodyshop && npm install //Install all server dependencies.
|
||||
6. Setup PM2
|
||||
1. $ npm install pm2 -g //Had to be run as root.
|
||||
2. $ pm2 start ecosystem.config.js
|
||||
3. $ pm2 startup ubuntu //Ensure it starts when server does.
|
||||
7. Alter Nginx config
|
||||
1. sudo nano /etc/nginx/sites-available/default
|
||||
2. //Add Appropriate server names to the file. www. and non-www.
|
||||
3. Add the following inside the location of the server block: (Remove the 404 bit.)
|
||||
proxy_pass http://localhost:5000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
8. Install Certbot
|
||||
9. $ sudo add-apt-repository ppa:certbot/certbot //Potential issue on ubuntu 20.04
|
||||
10. $ sudo apt-get update
|
||||
11. $ sudo apt install python-certbot-nginx
|
||||
12. $ sudo nano /etc/nginx/sites-available/default
|
||||
13. Find the existing server_name line and replace the underscore with your domain name:
|
||||
...
|
||||
server_name example.com www.example.com;
|
||||
...
|
||||
14. $ sudo nginx -t //Verify syntax.
|
||||
15. $ sudo systemctl reload nginx
|
||||
##AWS INSTRUCTIONS
|
||||
$ sudo snap install core; sudo snap refresh core
|
||||
$ sudo snap install --classic certbot
|
||||
$ sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
||||
16. Generate Certificate
|
||||
17. $ sudo certbot --nginx -d example.com -d www.example.com //Follow prompts.
|
||||
18. $ sudo certbot renew --dry-run //Dry run to test auto renewal.
|
||||
|
||||
ADding Yarn
|
||||
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
||||
sudo apt-get update && sudo apt-get install yarn
|
||||
16
_reference/firebase.md
Normal file
16
_reference/firebase.md
Normal file
@@ -0,0 +1,16 @@
|
||||
1. Create a new project
|
||||
2. Setup sign in methods to be user and email only.
|
||||
3. Update .env to include config.
|
||||
4. Setup the Firebase CLI
|
||||
1. cd to client firebase at server directory.
|
||||
2. ensure all dependencies installed
|
||||
1. $ npm install firebase-functions@latest firebase-admin@latest --save
|
||||
2. $ npm install -g firebase-tools
|
||||
3. $ firebase login //Login as needed.
|
||||
5. Set the current projct
|
||||
1. firebase use <projectname>
|
||||
6. Deploy the function
|
||||
1. $ firebase deploy --only functions
|
||||
7. Add the allowed domains.
|
||||
8. Update server variables including FIREBASE_ADMINSDK_JSON, FIREBASE_DATABASE_URL
|
||||
9. Create the firestore and copy the rules from dev for userinstances.
|
||||
1
_reference/localEmailViewer/.gitignore
vendored
1
_reference/localEmailViewer/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
node_modules
|
||||
@@ -1,7 +0,0 @@
|
||||
This will connect to your dockers local stack session and render the email in HTML.
|
||||
|
||||
```shell
|
||||
node index.js
|
||||
```
|
||||
|
||||
http://localhost:3334
|
||||
@@ -1,96 +0,0 @@
|
||||
// index.js
|
||||
|
||||
import express from "express";
|
||||
import fetch from "node-fetch";
|
||||
import { simpleParser } from "mailparser";
|
||||
|
||||
const app = express();
|
||||
const PORT = 3334;
|
||||
|
||||
app.get("/", async (req, res) => {
|
||||
try {
|
||||
const response = await fetch("http://localhost:4566/_aws/ses");
|
||||
if (!response.ok) {
|
||||
throw new Error("Network response was not ok");
|
||||
}
|
||||
const data = await response.json();
|
||||
const messagesHtml = await parseMessages(data.messages);
|
||||
res.send(renderHtml(messagesHtml));
|
||||
} catch (error) {
|
||||
console.error("Error fetching messages:", error);
|
||||
res.status(500).send("Error fetching messages");
|
||||
}
|
||||
});
|
||||
|
||||
async function parseMessages(messages) {
|
||||
const parsedMessages = await Promise.all(
|
||||
messages.map(async (message, index) => {
|
||||
try {
|
||||
const parsed = await simpleParser(message.RawData);
|
||||
return `
|
||||
<div class="shadow-md rounded-lg p-4 mb-6" style="background-color: lightgray">
|
||||
<div class="shadow-md rounded-lg p-4 mb-6" style="background-color: white">
|
||||
<div class="mb-2"><span class="font-bold text-lg">Message ${index + 1}</span></div>
|
||||
<div class="mb-2"><span class="font-semibold">From:</span> ${message.Source}</div>
|
||||
<div class="mb-2"><span class="font-semibold">To:</span> ${parsed.to.text || "No To Address"}</div>
|
||||
<div class="mb-2"><span class="font-semibold">Subject:</span> ${parsed.subject || "No Subject"}</div>
|
||||
<div class="mb-2"><span class="font-semibold">Region:</span> ${message.Region}</div>
|
||||
<div class="mb-2"><span class="font-semibold">Timestamp:</span> ${message.Timestamp}</div>
|
||||
</div>
|
||||
<div class="prose">${parsed.html || parsed.textAsHtml || "No HTML content available"}</div>
|
||||
</div>
|
||||
`;
|
||||
} catch (error) {
|
||||
console.error("Error parsing email:", error);
|
||||
return `
|
||||
<div class="bg-white shadow-md rounded-lg p-4 mb-6">
|
||||
<div class="mb-2"><span class="font-bold text-lg">Message ${index + 1}</span></div>
|
||||
<div class="mb-2"><span class="font-semibold">From:</span> ${message.Source}</div>
|
||||
<div class="mb-2"><span class="font-semibold">Region:</span> ${message.Region}</div>
|
||||
<div class="mb-2"><span class="font-semibold">Timestamp:</span> ${message.Timestamp}</div>
|
||||
<div class="text-red-500">Error parsing email content</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
})
|
||||
);
|
||||
return parsedMessages.join("");
|
||||
}
|
||||
|
||||
function renderHtml(messagesHtml) {
|
||||
return `
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Email Messages Viewer</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<style>
|
||||
body {
|
||||
background-color: #f3f4f6;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin: 50px auto;
|
||||
padding: 20px;
|
||||
}
|
||||
.prose {
|
||||
line-height: 1.6;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container bg-white shadow-lg rounded-lg p-6">
|
||||
<h1 class="text-2xl font-bold text-center mb-6">Email Messages Viewer</h1>
|
||||
<div id="messages-container">${messagesHtml}</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
}
|
||||
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Server is running on http://localhost:${PORT}`);
|
||||
});
|
||||
1188
_reference/localEmailViewer/package-lock.json
generated
1188
_reference/localEmailViewer/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "localemailviewer",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"description": "",
|
||||
"dependencies": {
|
||||
"express": "^5.1.0",
|
||||
"mailparser": "^3.7.4",
|
||||
"node-fetch": "^3.3.2"
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
# PATCH /integrations/parts-management/job/:id/status
|
||||
|
||||
Update (patch) the status of a job created under parts management. This endpoint is only available
|
||||
for jobs whose parent bodyshop has an `external_shop_id` (i.e., is provisioned for parts
|
||||
management).
|
||||
|
||||
## Endpoint
|
||||
|
||||
```
|
||||
PATCH /integrations/parts-management/job/:id/status
|
||||
```
|
||||
|
||||
- `:id` is the UUID of the job to update.
|
||||
|
||||
## Request Headers
|
||||
|
||||
- `Authorization`: (if required by your integration middleware)
|
||||
- `Content-Type: application/json`
|
||||
|
||||
## Request Body
|
||||
|
||||
Send a JSON object with the following field:
|
||||
|
||||
- `status` (string, required): The new status for the job.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
PATCH /integrations/parts-management/job/123e4567-e89b-12d3-a456-426614174000/status
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"status": "IN_PROGRESS"
|
||||
}
|
||||
```
|
||||
|
||||
## Success Response
|
||||
|
||||
- **200 OK**
|
||||
- Returns the updated job object with the new status.
|
||||
|
||||
```
|
||||
{
|
||||
"id": "123e4567-e89b-12d3-a456-426614174000",
|
||||
"status": "IN_PROGRESS",
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
## Error Responses
|
||||
|
||||
- **400 Bad Request**: Missing status field, or parent bodyshop does not have an `external_shop_id`.
|
||||
- **404 Not Found**: No job found with the given ID.
|
||||
- **500 Internal Server Error**: Unexpected error.
|
||||
|
||||
## Notes
|
||||
|
||||
- Only jobs whose parent bodyshop has an `external_shop_id` can be patched via this route.
|
||||
- Fields other than `status` will be ignored if included in the request body.
|
||||
- The route is protected by the same middleware as other parts management endpoints.
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
# PATCH /integrations/parts-management/provision/:id
|
||||
|
||||
Update (patch) select fields for a parts management bodyshop. Only available for shops that have an
|
||||
`external_shop_id` (i.e., are provisioned for parts management).
|
||||
|
||||
## Endpoint
|
||||
|
||||
```
|
||||
PATCH /integrations/parts-management/provision/:id
|
||||
```
|
||||
|
||||
- `:id` is the UUID of the bodyshop to update.
|
||||
|
||||
## Request Headers
|
||||
|
||||
- `Authorization`: (if required by your integration middleware)
|
||||
- `Content-Type: application/json`
|
||||
|
||||
## Request Body
|
||||
|
||||
Send a JSON object with one or more of the following fields to update:
|
||||
|
||||
- `shopname` (string)
|
||||
- `address1` (string)
|
||||
- `address2` (string, optional)
|
||||
- `city` (string)
|
||||
- `state` (string)
|
||||
- `zip_post` (string)
|
||||
- `country` (string)
|
||||
- `email` (string, shop's email, not user email)
|
||||
- `timezone` (string)
|
||||
- `phone` (string)
|
||||
- `logo_img_path` (string)
|
||||
|
||||
Any fields not included in the request body will remain unchanged.
|
||||
|
||||
## Example Request
|
||||
|
||||
```
|
||||
PATCH /integrations/parts-management/provision/123e4567-e89b-12d3-a456-426614174000
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"shopname": "New Shop Name",
|
||||
"address1": "123 Main St",
|
||||
"city": "Springfield",
|
||||
"state": "IL",
|
||||
"zip_post": "62704",
|
||||
"country": "USA",
|
||||
"email": "shop@example.com",
|
||||
"timezone": "America/Chicago",
|
||||
"phone": "555-123-4567",
|
||||
"logo_img_path": "https://example.com/logo.png"
|
||||
}
|
||||
```
|
||||
|
||||
## Success Response
|
||||
|
||||
- **200 OK**
|
||||
- Returns the updated shop object with the patched fields.
|
||||
|
||||
```
|
||||
{
|
||||
"id": "123e4567-e89b-12d3-a456-426614174000",
|
||||
"shopname": "New Shop Name",
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
## Error Responses
|
||||
|
||||
- **400 Bad Request**: No valid fields provided, or shop does not have an `external_shop_id`.
|
||||
- **404 Not Found**: No shop found with the given ID.
|
||||
- **500 Internal Server Error**: Unexpected error.
|
||||
|
||||
## Notes
|
||||
|
||||
- Only shops with an `external_shop_id` can be patched via this route.
|
||||
- Fields not listed above will be ignored if included in the request body.
|
||||
- The route is protected by the same middleware as other parts management endpoints.
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: Parts Management Provisioning API
|
||||
description: API endpoint to provision a new shop and user in the Parts Management system.
|
||||
version: 1.0.0
|
||||
|
||||
paths:
|
||||
/parts-management/provision:
|
||||
post:
|
||||
summary: Provision a new parts management shop and user
|
||||
operationId: partsManagementProvisioning
|
||||
tags:
|
||||
- Parts Management
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- external_shop_id
|
||||
- shopname
|
||||
- address1
|
||||
- city
|
||||
- state
|
||||
- zip_post
|
||||
- country
|
||||
- email
|
||||
- phone
|
||||
- userEmail
|
||||
properties:
|
||||
external_shop_id:
|
||||
type: string
|
||||
description: External shop ID (must be unique)
|
||||
shopname:
|
||||
type: string
|
||||
address1:
|
||||
type: string
|
||||
address2:
|
||||
type: string
|
||||
nullable: true
|
||||
city:
|
||||
type: string
|
||||
state:
|
||||
type: string
|
||||
zip_post:
|
||||
type: string
|
||||
country:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
phone:
|
||||
type: string
|
||||
userEmail:
|
||||
type: string
|
||||
format: email
|
||||
userPassword:
|
||||
type: string
|
||||
description: Optional password for the new user. If provided, the password is set directly, and no password reset link is sent. Must be at least 6 characters.
|
||||
nullable: true
|
||||
logoUrl:
|
||||
type: string
|
||||
format: uri
|
||||
nullable: true
|
||||
timezone:
|
||||
type: string
|
||||
nullable: true
|
||||
vendors:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
street1:
|
||||
type: string
|
||||
nullable: true
|
||||
street2:
|
||||
type: string
|
||||
nullable: true
|
||||
city:
|
||||
type: string
|
||||
nullable: true
|
||||
state:
|
||||
type: string
|
||||
nullable: true
|
||||
zip:
|
||||
type: string
|
||||
nullable: true
|
||||
country:
|
||||
type: string
|
||||
nullable: true
|
||||
email:
|
||||
type: string
|
||||
format: email
|
||||
nullable: true
|
||||
discount:
|
||||
type: number
|
||||
nullable: true
|
||||
due_date:
|
||||
type: string
|
||||
format: date
|
||||
nullable: true
|
||||
cost_center:
|
||||
type: string
|
||||
nullable: true
|
||||
favorite:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
nullable: true
|
||||
phone:
|
||||
type: string
|
||||
nullable: true
|
||||
active:
|
||||
type: boolean
|
||||
nullable: true
|
||||
dmsid:
|
||||
type: string
|
||||
nullable: true
|
||||
responses:
|
||||
'200':
|
||||
description: Shop and user successfully created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
shop:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
shopname:
|
||||
type: string
|
||||
user:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
resetLink:
|
||||
type: string
|
||||
format: uri
|
||||
nullable: true
|
||||
description: Password reset link for the user. Only included if userPassword is not provided in the request.
|
||||
'400':
|
||||
description: Bad request (missing or invalid fields)
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
'500':
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
@@ -1,59 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>IMEX IO Extractor</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
padding: 20px;
|
||||
}
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
.output-box {
|
||||
margin-top: 20px;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #f9f9f9;
|
||||
min-height: 40px;
|
||||
}
|
||||
.copy-button {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>IMEX IO Extractor</h1>
|
||||
<textarea id="inputText" placeholder="Paste your text here..."></textarea>
|
||||
<br>
|
||||
<button onclick="extractIO()">Extract</button>
|
||||
|
||||
<div class="output-box" id="outputBox" contenteditable="true"></div>
|
||||
<button class="copy-button" onclick="copyToClipboard()">Copy to Clipboard</button>
|
||||
|
||||
<script>
|
||||
function extractIO() {
|
||||
const inputText = document.getElementById('inputText').value;
|
||||
const ioNumbers = [...new Set(inputText.match(/IO-\d{4}/g))] // Extract unique IO-#### matches
|
||||
.map(io => ({ io, num: parseInt(io.split('-')[1]) })) // Extract number part for sorting
|
||||
.sort((a, b) => a.num - b.num) // Sort by the number
|
||||
.map(item => item.io); // Extract sorted IO-####
|
||||
|
||||
document.getElementById('outputBox').innerText = ioNumbers.join(', '); // Display horizontally
|
||||
}
|
||||
|
||||
function copyToClipboard() {
|
||||
const outputBox = document.getElementById('outputBox');
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(outputBox);
|
||||
const selection = window.getSelection();
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
document.execCommand('copy');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,10 +0,0 @@
|
||||
services:
|
||||
ragmate:
|
||||
image: ghcr.io/ragmate/ragmate:latest
|
||||
ports:
|
||||
- "11434:11434"
|
||||
env_file:
|
||||
- .ragmate.env
|
||||
volumes:
|
||||
- .:/project
|
||||
- ./docker_data/ragmate:/apps/cache
|
||||
@@ -4,7 +4,7 @@ Clone Repository for:
|
||||
{
|
||||
"name": "node-webhook-scripts",
|
||||
"version": "1.0.0",
|
||||
"main": "index.jsx",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"express": "^4.16.4"
|
||||
},
|
||||
@@ -5,16 +5,16 @@ module.exports = {
|
||||
cwd: "./io",
|
||||
script: "./server.js",
|
||||
env: {
|
||||
NODE_ENV: "test"
|
||||
}
|
||||
NODE_ENV: "test",
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: "Bitbucket Webhook",
|
||||
script: "./webhook/index.jsx",
|
||||
script: "./webhook/index.js",
|
||||
env: {
|
||||
NODE_ENV: "production"
|
||||
}
|
||||
}
|
||||
]
|
||||
NODE_ENV: "production",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,20 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDWzCCAkOgAwIBAgIUD/QBSAXy/AlJ/cS4DaPWJLpChxgwDQYJKoZIhvcNAQEL
|
||||
BQAwPTELMAkGA1UEBhMCQ0ExCzAJBgNVBAgMAk9OMSEwHwYDVQQKDBhJbnRlcm5l
|
||||
dCBXaWRnaXRzIFB0eSBMdGQwHhcNMjQwOTA5MTU0MjA1WhcNMjUwOTA5MTU0MjA1
|
||||
WjA9MQswCQYDVQQGEwJDQTELMAkGA1UECAwCT04xITAfBgNVBAoMGEludGVybmV0
|
||||
IFdpZGdpdHMgUHR5IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
|
||||
AKSd0l7NJCNBwvtPU+dVPQkteg0AfC3sGqRnZMQteCRVa2oIgC4NoF3A9BK/yHbF
|
||||
ZF25OnXTck5vzc8yb3v73ndfTD9ASKNoiaZE84/GFBsxqlKR8cs0qVwzuAsdijMv
|
||||
vlMPNlMRyE1Rb7nR6HXGkPXNyxgMko03NXPkvIje9zRudm0Lf8L4q/hPyPkS7Mrm
|
||||
/uQfAAJe+xFcupkEX2XY7r0x1C+z6E8lA1UcuhK3SHdW7CWYqp1vU5/dnnUiXwCa
|
||||
GiC6Y1bCJB0pDAVISzy3JUDdINZdiqGR+y8ho3pstChf2mp/76s3N9eG9KA/qaFK
|
||||
BrGk2PvCoZ8/Aj1aMsRYFHECAwEAAaNTMFEwHQYDVR0OBBYEFDLJ2fbWP4VUJgOp
|
||||
PSs+NGHcVgRmMB8GA1UdIwQYMBaAFDLJ2fbWP4VUJgOpPSs+NGHcVgRmMA8GA1Ud
|
||||
EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBABfv5ut/y03atq0NMB0jeDY4
|
||||
AvW4ukk0k1svyqxFZCw9o7m2lHb/IjmVrZG1Sj4JWrrSv0s02ccb26/t6vazNa5L
|
||||
Powe3eyfHgfjTZJmgs8hyeMwKS0wWk/SPuu9JDhIJakiquqD+UVBGkHpP+XYvhDv
|
||||
vhS2XRlW+aEjpUmr1oCyyrc6WbzrYRNadqEsn/AxwcMyUbht3Ugjkg+OpidcTIQp
|
||||
5lv63waKo6I1vQofzBQ3L7JYsKo8kC0vAP7wkLxvzBii335uZJzzpFYFVOyVNezi
|
||||
dJdazPbRYbXz4LjltdEn/SNfRuKX8ZRiN2OSo7OfSrZaMTS87SfCSFJGgQM8Yrk=
|
||||
-----END CERTIFICATE-----
|
||||
@@ -1,27 +0,0 @@
|
||||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn
|
||||
NhAAAAAwEAAQAAAQEAvNl5fuVmLNv72BZNxnTqX5CHf5Xi8UxjYaYxHITSCx7blnhpVYLd
|
||||
qXvcOWXzbsfjch/den73QiW4n2FYz75oGMhUGlOYzdWKA9I9Sj09Qy1R06RhwDiZGd5qaM
|
||||
swEeXpkNmi2u4Qd2kJeDfUQUigjC09V81O/vrniGtQAJScfiG/itdm+Ufn09Z4MYk0HWjq
|
||||
iDokNEskoEPsibYIrb+Q6vdtuPkZO+wU/smXhPtgw5ST6oQdmm/gVNsRg5XNzxrire+z1G
|
||||
WatnnVL3hPnnfpnf8W589dyms7GGJwhPerSGTN1bn0T4+9C69Cd7LBJtxiuFdRmdlGLLLP
|
||||
RR48Rur71wAAA9AEfVsdBH1bHQAAAAdzc2gtcnNhAAABAQC82Xl+5WYs2/vYFk3GdOpfkI
|
||||
d/leLxTGNhpjEchNILHtuWeGlVgt2pe9w5ZfNux+NyH916fvdCJbifYVjPvmgYyFQaU5jN
|
||||
1YoD0j1KPT1DLVHTpGHAOJkZ3mpoyzAR5emQ2aLa7hB3aQl4N9RBSKCMLT1XzU7++ueIa1
|
||||
AAlJx+Ib+K12b5R+fT1ngxiTQdaOqIOiQ0SySgQ+yJtgitv5Dq9224+Rk77BT+yZeE+2DD
|
||||
lJPqhB2ab+BU2xGDlc3PGuKt77PUZZq2edUveE+ed+md/xbnz13KazsYYnCE96tIZM3Vuf
|
||||
RPj70Lr0J3ssEm3GK4V1GZ2UYsss9FHjxG6vvXAAAAAwEAAQAAAQAQTosSLQbMmtY9S3e9
|
||||
yjyusdExcCTfhyQRu4MEHmfws+JsNMuLqbgwOVTD1AzYJQR7x0qdmDcLjCxL/uDnV16vvS
|
||||
Sd/Vf1dhnryIyoS29tzI0DRG94ZKq7tBvmHp1w/jRT4KcSVnovhW9e5Rs74+SRFhr06PKI
|
||||
S+wQOIv48Nwue9+QUMsMCpWgKXHx7SHNTHvnAfqdhi9O29SWlMA+v+mELZ5Cl+HU0UTt2I
|
||||
A1BxOe1N8FjN7KE2viJexsl3is1PuqMkpLl/wyHBJTVzUadl6DRALJQIm7/YO5goE72YOV
|
||||
Lpo27do3zjhC87dlKdATvZUzfKV0LuUVdxq/PNDZMUbBAAAAgQDShAqDZiDrdTUaGXfUVm
|
||||
QzcnVNbh2/KgZh4uux9QNHST562W6cnN7qxoRwVrM4BCOk1Kl73QQZW4nDvXX3PVC5j038
|
||||
8AXkcBHS9j9f4h72ue7D2jqlbHFa7aGU9zYgk9mbBF+GX3tDntkAIQjLtwOLfj1iiJ/clX
|
||||
mHFUAY1V4L8AAAAIEA3E4t/v0yU5D9AOI0r17UNYqfeyDoKAEDR4QbbFjO1l0kLnEJy7Zx
|
||||
Mhj18GilYg2y0P0v8dSM/oWXS8Hua2t5i9Exlv6gHhGlQ80mwYcVGIxewZ/pPeCPw0U+kt
|
||||
EKUjt09m9Oe7+6xHQsTBj9hY8/vqPmQwRalZFcLdhHiDiVKTcAAACBANtykaPXdVzEFx7D
|
||||
UOlsjVL7zM0EVOFXf9JJQ6BhazhmsEI2PYt3IpgGMo8cXkoUofAOIYjf421AabN1BqSO5J
|
||||
XTMxM0ZV3JmLLi804Mu9h1iFrVTBdLYOMJdc2VCo1EwHWpo9SXOyjxce/znvcIOU04aZhu
|
||||
TaPg816X+E+gw5JhAAAAFGRhdmVARGF2ZVJpY2hlci1JTUVYAQIDBAUG
|
||||
-----END OPENSSH PRIVATE KEY-----
|
||||
@@ -1 +0,0 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC82Xl+5WYs2/vYFk3GdOpfkId/leLxTGNhpjEchNILHtuWeGlVgt2pe9w5ZfNux+NyH916fvdCJbifYVjPvmgYyFQaU5jN1YoD0j1KPT1DLVHTpGHAOJkZ3mpoyzAR5emQ2aLa7hB3aQl4N9RBSKCMLT1XzU7++ueIa1AAlJx+Ib+K12b5R+fT1ngxiTQdaOqIOiQ0SySgQ+yJtgitv5Dq9224+Rk77BT+yZeE+2DDlJPqhB2ab+BU2xGDlc3PGuKt77PUZZq2edUveE+ed+md/xbnz13KazsYYnCE96tIZM3VufRPj70Lr0J3ssEm3GK4V1GZ2UYsss9FHjxG6vvX dave@DaveRicher-IMEX
|
||||
@@ -1,12 +0,0 @@
|
||||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAArAAAABNlY2RzYS
|
||||
1zaGEyLW5pc3RwNTIxAAAACG5pc3RwNTIxAAAAhQQBYJnAujo17diR0fM2Ze1d1Ft6XHm5
|
||||
U31pXdFEN+rGC4SoYTdZE8q3relxMS5GwwBOvgvVUuayfid2XS8ls/CMDiMBJAYqEK4CRY
|
||||
PbbPB7lLnMWsF7muFhvs+SIpPQC+vtDwM2TKlxF0Y8p+iVRpvCADoggsSze7skmJWKmMTt
|
||||
8jEdEOcAAAEQIyXsOSMl7DkAAAATZWNkc2Etc2hhMi1uaXN0cDUyMQAAAAhuaXN0cDUyMQ
|
||||
AAAIUEAWCZwLo6Ne3YkdHzNmXtXdRbelx5uVN9aV3RRDfqxguEqGE3WRPKt63pcTEuRsMA
|
||||
Tr4L1VLmsn4ndl0vJbPwjA4jASQGKhCuAkWD22zwe5S5zFrBe5rhYb7PkiKT0Avr7Q8DNk
|
||||
ypcRdGPKfolUabwgA6IILEs3u7JJiVipjE7fIxHRDnAAAAQUO5dO9G7i0bxGTP0zV3eIwv
|
||||
5g0NhrQJfW/bMHS6XWwaxdpr+QZ+DbBJVzZPwYC0wLMW4bJAf+kjqUnj4wGocoTeAAAAD2
|
||||
lvLWZ0cC10ZXN0LWtleQECAwQ=
|
||||
-----END OPENSSH PRIVATE KEY-----
|
||||
@@ -1 +0,0 @@
|
||||
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAFgmcC6OjXt2JHR8zZl7V3UW3pceblTfWld0UQ36sYLhKhhN1kTyret6XExLkbDAE6+C9VS5rJ+J3ZdLyWz8IwOIwEkBioQrgJFg9ts8HuUucxawXua4WG+z5Iik9AL6+0PAzZMqXEXRjyn6JVGm8IAOiCCxLN7uySYlYqYxO3yMR0Q5w== io-ftp-test-key
|
||||
@@ -1,12 +0,0 @@
|
||||
PuTTY-User-Key-File-3: ecdsa-sha2-nistp521
|
||||
Encryption: none
|
||||
Comment: io-ftp-test-key
|
||||
Public-Lines: 4
|
||||
AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAFgmcC6OjXt
|
||||
2JHR8zZl7V3UW3pceblTfWld0UQ36sYLhKhhN1kTyret6XExLkbDAE6+C9VS5rJ+
|
||||
J3ZdLyWz8IwOIwEkBioQrgJFg9ts8HuUucxawXua4WG+z5Iik9AL6+0PAzZMqXEX
|
||||
Rjyn6JVGm8IAOiCCxLN7uySYlYqYxO3yMR0Q5w==
|
||||
Private-Lines: 2
|
||||
AAAAQUO5dO9G7i0bxGTP0zV3eIwv5g0NhrQJfW/bMHS6XWwaxdpr+QZ+DbBJVzZP
|
||||
wYC0wLMW4bJAf+kjqUnj4wGocoTe
|
||||
Private-MAC: d67001d47e13c43dc8bdb9c68a25356a96c1c4a6714f3c5a1836fca646b78b54
|
||||
@@ -1,28 +0,0 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCkndJezSQjQcL7
|
||||
T1PnVT0JLXoNAHwt7BqkZ2TELXgkVWtqCIAuDaBdwPQSv8h2xWRduTp103JOb83P
|
||||
Mm97+953X0w/QEijaImmRPOPxhQbMapSkfHLNKlcM7gLHYozL75TDzZTEchNUW+5
|
||||
0eh1xpD1zcsYDJKNNzVz5LyI3vc0bnZtC3/C+Kv4T8j5EuzK5v7kHwACXvsRXLqZ
|
||||
BF9l2O69MdQvs+hPJQNVHLoSt0h3VuwlmKqdb1Of3Z51Il8AmhogumNWwiQdKQwF
|
||||
SEs8tyVA3SDWXYqhkfsvIaN6bLQoX9pqf++rNzfXhvSgP6mhSgaxpNj7wqGfPwI9
|
||||
WjLEWBRxAgMBAAECggEAUNpHYlLFxh9dokujPUMreF+Cy/IKDBAkQc2au5RNpyLh
|
||||
YDIOqw/8TTAhcTgLQPLQygvZP9f8E7RsVLFD+pSJ/v2qmIJ9au1Edor1Sg+S/oxV
|
||||
SLrwFMunx2aLpcH7iAqSI3+cQg7A3+D4zD7iOz6tIl3Su9wo+v073tFhHKTOrEwv
|
||||
Qgr9Jf3viIiKV1ym+uQEVQndocfsj46FnFpXTQ2qs7kAF6FgAOLDGfQQwzkiqEBD
|
||||
NsqsDmbYIx6foZL+DEz1ZVO2M5B+xxpbNK82KwuQilVpimW8ui4LZHCe+RIFzt9+
|
||||
BK6KGlLpSEwTFliivI3nahy18JzskZsfyah0CPZlQQKBgQDVv+A0qIPGvOP3Sx+9
|
||||
HyeQCV23SkvvSvw8p8pMB0gvwv63YdJ7N/rJzBGS6YUHFWWZZgEeTgkJ6VJvoe0r
|
||||
8JL1el9uSUa7f0eayjmFBOGuzpktNVdIn2Tg7A9MWA4JqPNNC69RMOh86ewGD4J3
|
||||
a8Hz2a1bHxAmy/AZt2ukypY6eQKBgQDFJ7kqeOPkRBz9WbALRgVIXo8YWf5di0sQ
|
||||
r0HC03GAISHQ725A2IFBPHJWeqj0jaMiIZD0y+Obgp7KAskrJaLfsd7Ug775kFfw
|
||||
oUI9UAl6kRuPKvm3BaVAm46SQm+56VsgxTi73YN0NUp75THHZgAJjepF9zSpVJxq
|
||||
VY9DjEGruQKBgQCQCpGIatcCol/tUg69X7VFd0pULhkl1J5OMbQ9r9qRdRI5eg5h
|
||||
QsQaIQ7mtb8TmvOwf/DY/zVQHI+U8sXlCmW+TwzoQTENQSR7xzMj1LpRFqBaustr
|
||||
AR72A537kItFLzll/i3SxOam5uxK2UDOQSuerF4KPdCglGXkrpo3nt3F4QKBgQCa
|
||||
RArPAOjQo7tLQfJN3+wiRFsTYtd1uphx5bA/EdOtvj8HjVFnzADXWsTchf3N3UXY
|
||||
XwtdgGwIMpys1KEz8a8P+c2x26SDAj7NOmDqOMYx8Xju/WGHpBM6Cn30U6e4gK+d
|
||||
ZLSPyzQgqdIuP5hDvbwpvbGiLVw3Ys1BJtGCuSxpgQJ/eHnRiuSi5Zq5jGg+GpA+
|
||||
FEEc9NCy772rR+4uzEOqyIwqewffqzSuVWuIsY/8MP3fh+NDxl/mU6cB5QVeD54Z
|
||||
JZUKwmpM26muiM6WvVnM4ExPdSGA2+l4pZjby/KKd6F/w0tgZ1jb9Pb2/0vN3qVA
|
||||
Y4U4XNTMt2fxUACqiL4SHA==
|
||||
-----END PRIVATE KEY-----
|
||||
13
client/.env.development
Normal file
13
client/.env.development
Normal file
@@ -0,0 +1,13 @@
|
||||
REACT_APP_GRAPHQL_ENDPOINT=https://db.dev.bodyshop.app/v1/graphql
|
||||
REACT_APP_GRAPHQL_ENDPOINT_WS=wss://db.dev.bodyshop.app/v1/graphql
|
||||
REACT_APP_GA_CODE=231099835
|
||||
REACT_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"}
|
||||
REACT_APP_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/io-test
|
||||
REACT_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/io-test
|
||||
REACT_APP_CLOUDINARY_API_KEY=957865933348715
|
||||
REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
||||
REACT_APP_FIREBASE_PUBLIC_VAPID_KEY='BG3tzU7L2BXlGZ_3VLK4PNaRceoEXEnmHfxcVbRMF5o5g05ejslhVPki9kBM9cBBT-08Ad9kN3HSpS6JmrWD6h4'
|
||||
REACT_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
||||
REACT_APP_AXIOS_BASE_API_URL=http://localhost:4000
|
||||
REACT_APP_REPORTS_SERVER_URL=https://reports3.test.imex.online
|
||||
REACT_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||
@@ -1,20 +0,0 @@
|
||||
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
|
||||
VITE_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/io-test
|
||||
VITE_APP_CLOUDINARY_API_KEY=957865933348715
|
||||
VITE_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
||||
VITE_APP_FIREBASE_PUBLIC_VAPID_KEY='BG3tzU7L2BXlGZ_3VLK4PNaRceoEXEnmHfxcVbRMF5o5g05ejslhVPki9kBM9cBBT-08Ad9kN3HSpS6JmrWD6h4'
|
||||
VITE_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
||||
VITE_APP_AXIOS_BASE_API_URL=/api/
|
||||
VITE_APP_REPORTS_SERVER_URL=https://reports.test.imex.online
|
||||
VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||
VITE_APP_INSTANCE=IMEX
|
||||
TEST_USERNAME="test@imex.dev"
|
||||
TEST_PASSWORD="test123"
|
||||
VITE_PUBLIC_POSTHOG_KEY=phc_xtLmBIu0rjWwExY73Oj5DTH1bGbwq1G1Y8jnlTceien
|
||||
VITE_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
|
||||
VITE_APP_AMP_URL=https://vp8k908qy2.execute-api.ca-central-1.amazonaws.com
|
||||
VITE_APP_AMP_KEY=6228a598e57cd66875cfd41604f1f891
|
||||
@@ -1,22 +0,0 @@
|
||||
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":"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
|
||||
VITE_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
||||
VITE_APP_FIREBASE_PUBLIC_VAPID_KEY='BP1B7ZTYpn-KMt6nOxlld6aS8Skt3Q7ZLEqP0hAvGHxG4UojPYiXZ6kPlzZkUC5jH-EcWXomTLtmadAIxurfcHo'
|
||||
VITE_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
||||
VITE_APP_AXIOS_BASE_API_URL=/api/
|
||||
VITE_APP_REPORTS_SERVER_URL=https://reports.test.romeonline.io
|
||||
VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||
VITE_APP_COUNTRY=USA
|
||||
VITE_APP_INSTANCE=ROME
|
||||
TEST_USERNAME="test@imex.dev"
|
||||
TEST_PASSWORD="test123"
|
||||
VITE_PUBLIC_POSTHOG_KEY=phc_xtLmBIu0rjWwExY73Oj5DTH1bGbwq1G1Y8jnlTceien
|
||||
VITE_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
|
||||
VITE_APP_AMP_URL=https://vp8k908qy2.execute-api.ca-central-1.amazonaws.com
|
||||
VITE_APP_AMP_KEY=46b1193a867d4e3131ae4c3a64a3fc78
|
||||
14
client/.env.production
Normal file
14
client/.env.production
Normal file
@@ -0,0 +1,14 @@
|
||||
GENERATE_SOURCEMAP=false
|
||||
REACT_APP_GRAPHQL_ENDPOINT=https://db.imex.online/v1/graphql
|
||||
REACT_APP_GRAPHQL_ENDPOINT_WS=wss://db.imex.online/v1/graphql
|
||||
REACT_APP_GA_CODE=231103507
|
||||
REACT_APP_FIREBASE_CONFIG={"apiKey":"AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU","authDomain":"imex-prod.firebaseapp.com","databaseURL":"https://imex-prod.firebaseio.com","projectId":"imex-prod","storageBucket":"imex-prod.appspot.com","messagingSenderId":"253497221485","appId":"1:253497221485:web:3c81c483b94db84b227a64","measurementId":"G-NTWBKG2L0M"}
|
||||
REACT_APP_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/bodyshop
|
||||
REACT_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/bodyshop
|
||||
REACT_APP_CLOUDINARY_API_KEY=473322739956866
|
||||
REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
||||
REACT_APP_FIREBASE_PUBLIC_VAPID_KEY='BMgZT1NZztW2DsJl8Mg2L04hgY9FzAg6b8fbzgNAfww2VDzH3VE63Ot9EaP_U7KWS2JT-7HPHaw0T_Tw_5vkZc8'
|
||||
REACT_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
||||
REACT_APP_AXIOS_BASE_API_URL=https://api.imex.online/
|
||||
REACT_APP_REPORTS_SERVER_URL=https://reports.imex.online
|
||||
REACT_APP_SPLIT_API=et9pjkik6bn67he5evpmpr1agoo7gactphgk
|
||||
@@ -1,19 +0,0 @@
|
||||
GENERATE_SOURCEMAP=true
|
||||
VITE_APP_GRAPHQL_ENDPOINT=https://db.imex.online/v1/graphql
|
||||
VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.imex.online/v1/graphql
|
||||
VITE_APP_GA_CODE=231103507
|
||||
VITE_APP_FIREBASE_CONFIG={"apiKey":"AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU","authDomain":"imex-prod.firebaseapp.com","databaseURL":"https://imex-prod.firebaseio.com","projectId":"imex-prod","storageBucket":"imex-prod.appspot.com","messagingSenderId":"253497221485","appId":"1:253497221485:web:3c81c483b94db84b227a64","measurementId":"G-NTWBKG2L0M"}
|
||||
VITE_APP_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/bodyshop
|
||||
VITE_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/bodyshop
|
||||
VITE_APP_CLOUDINARY_API_KEY=473322739956866
|
||||
VITE_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
||||
VITE_APP_FIREBASE_PUBLIC_VAPID_KEY='BMgZT1NZztW2DsJl8Mg2L04hgY9FzAg6b8fbzgNAfww2VDzH3VE63Ot9EaP_U7KWS2JT-7HPHaw0T_Tw_5vkZc8'
|
||||
VITE_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
||||
VITE_APP_AXIOS_BASE_API_URL=https://api.imex.online/
|
||||
VITE_APP_REPORTS_SERVER_URL=https://reports.imex.online
|
||||
VITE_APP_SPLIT_API=et9pjkik6bn67he5evpmpr1agoo7gactphgk
|
||||
VITE_APP_INSTANCE=IMEX
|
||||
VITE_PUBLIC_POSTHOG_KEY=phc_xtLmBIu0rjWwExY73Oj5DTH1bGbwq1G1Y8jnlTceien
|
||||
VITE_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
|
||||
VITE_APP_AMP_URL=https://vp8k908qy2.execute-api.ca-central-1.amazonaws.com
|
||||
VITE_APP_AMP_KEY=6228a598e57cd66875cfd41604f1f891
|
||||
@@ -1,19 +0,0 @@
|
||||
GENERATE_SOURCEMAP=true
|
||||
VITE_APP_GRAPHQL_ENDPOINT=https://db.romeonline.io/v1/graphql
|
||||
VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.romeonline.io/v1/graphql
|
||||
VITE_APP_GA_CODE=231103507
|
||||
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_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/bodyshop
|
||||
VITE_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/bodyshop
|
||||
VITE_APP_CLOUDINARY_API_KEY=473322739956866
|
||||
VITE_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
||||
VITE_APP_FIREBASE_PUBLIC_VAPID_KEY='BP1B7ZTYpn-KMt6nOxlld6aS8Skt3Q7ZLEqP0hAvGHxG4UojPYiXZ6kPlzZkUC5jH-EcWXomTLtmadAIxurfcHo'
|
||||
VITE_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
||||
VITE_APP_AXIOS_BASE_API_URL=https://api.romeonline.io/
|
||||
VITE_APP_REPORTS_SERVER_URL=https://reports.romeonline.io
|
||||
VITE_APP_SPLIT_API=et9pjkik6bn67he5evpmpr1agoo7gactphgk
|
||||
VITE_APP_INSTANCE=ROME
|
||||
VITE_PUBLIC_POSTHOG_KEY=phc_xtLmBIu0rjWwExY73Oj5DTH1bGbwq1G1Y8jnlTceien
|
||||
VITE_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
|
||||
VITE_APP_AMP_URL=https://vp8k908qy2.execute-api.ca-central-1.amazonaws.com
|
||||
VITE_APP_AMP_KEY=46b1193a867d4e3131ae4c3a64a3fc78
|
||||
14
client/.env.test
Normal file
14
client/.env.test
Normal file
@@ -0,0 +1,14 @@
|
||||
REACT_APP_GRAPHQL_ENDPOINT=https://db.test.bodyshop.app/v1/graphql
|
||||
REACT_APP_GRAPHQL_ENDPOINT_WS=wss://db.test.bodyshop.app/v1/graphql
|
||||
REACT_APP_GA_CODE=231099835
|
||||
REACT_APP_FIREBASE_CONFIG={ "apiKey":"AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c", "authDomain":"imex-test.firebaseapp.com", "projectId":"imex-test", "storageBucket":"imex-test.appspot.com", "messagingSenderId":"991923618608", "appId":"1:991923618608:web:633437569cdad78299bef5", "measurementId":"G-TW0XLZEH18"}
|
||||
REACT_APP_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/bodyshop
|
||||
REACT_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/bodyshop
|
||||
REACT_APP_CLOUDINARY_API_KEY=473322739956866
|
||||
REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
||||
REACT_APP_FIREBASE_PUBLIC_VAPID_KEY='BN2GcDPjipR5MTEosO5dT4CfQ3cmrdBIsI4juoOQrRijn_5aRiHlwj1mlq0W145mOusx6xynEKl_tvYJhpCc9lo'
|
||||
REACT_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
||||
REACT_APP_AXIOS_BASE_API_URL=https://api.test.imex.online/
|
||||
REACT_APP_REPORTS_SERVER_URL=https://reports3.test.imex.online
|
||||
REACT_APP_IS_TEST=true
|
||||
REACT_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||
@@ -1,19 +0,0 @@
|
||||
VITE_APP_GRAPHQL_ENDPOINT=https://db.test.bodyshop.app/v1/graphql
|
||||
VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.test.bodyshop.app/v1/graphql
|
||||
VITE_APP_GA_CODE=231099835
|
||||
VITE_APP_FIREBASE_CONFIG={ "apiKey":"AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c", "authDomain":"imex-test.firebaseapp.com", "projectId":"imex-test", "storageBucket":"imex-test.appspot.com", "messagingSenderId":"991923618608", "appId":"1:991923618608:web:633437569cdad78299bef5", "measurementId":"G-TW0XLZEH18"}
|
||||
VITE_APP_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/bodyshop
|
||||
VITE_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/bodyshop
|
||||
VITE_APP_CLOUDINARY_API_KEY=473322739956866
|
||||
VITE_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
||||
VITE_APP_FIREBASE_PUBLIC_VAPID_KEY='BN2GcDPjipR5MTEosO5dT4CfQ3cmrdBIsI4juoOQrRijn_5aRiHlwj1mlq0W145mOusx6xynEKl_tvYJhpCc9lo'
|
||||
VITE_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
||||
VITE_APP_AXIOS_BASE_API_URL=https://api.test.imex.online/
|
||||
VITE_APP_REPORTS_SERVER_URL=https://reports.test.imex.online
|
||||
VITE_APP_IS_TEST=true
|
||||
VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||
VITE_APP_INSTANCE=IMEX
|
||||
VITE_PUBLIC_POSTHOG_KEY=phc_xtLmBIu0rjWwExY73Oj5DTH1bGbwq1G1Y8jnlTceien
|
||||
VITE_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
|
||||
VITE_APP_AMP_URL=https://vp8k908qy2.execute-api.ca-central-1.amazonaws.com
|
||||
VITE_APP_AMP_KEY=6228a598e57cd66875cfd41604f1f891
|
||||
@@ -1,19 +0,0 @@
|
||||
VITE_APP_GRAPHQL_ENDPOINT=https://db.test.romeonline.io/v1/graphql
|
||||
VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.test.romeonline.io/v1/graphql
|
||||
VITE_APP_GA_CODE=231103507
|
||||
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_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/bodyshop
|
||||
VITE_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/bodyshop
|
||||
VITE_APP_CLOUDINARY_API_KEY=473322739956866
|
||||
VITE_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
||||
VITE_APP_FIREBASE_PUBLIC_VAPID_KEY='BP1B7ZTYpn-KMt6nOxlld6aS8Skt3Q7ZLEqP0hAvGHxG4UojPYiXZ6kPlzZkUC5jH-EcWXomTLtmadAIxurfcHo'
|
||||
VITE_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
||||
VITE_APP_AXIOS_BASE_API_URL=https://api.test.romeonline.io/
|
||||
VITE_APP_REPORTS_SERVER_URL=https://reports.test.romeonline.io
|
||||
VITE_APP_IS_TEST=true
|
||||
VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||
VITE_APP_INSTANCE=ROME
|
||||
VITE_PUBLIC_POSTHOG_KEY=phc_xtLmBIu0rjWwExY73Oj5DTH1bGbwq1G1Y8jnlTceien
|
||||
VITE_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
|
||||
VITE_APP_AMP_URL=https://vp8k908qy2.execute-api.ca-central-1.amazonaws.com
|
||||
VITE_APP_AMP_KEY=46b1193a867d4e3131ae4c3a64a3fc78
|
||||
15
client/.gitignore
vendored
15
client/.gitignore
vendored
@@ -1,15 +0,0 @@
|
||||
# Vitest
|
||||
vitest-report*/
|
||||
vitest-coverage/
|
||||
*.vitest.log
|
||||
test-output.txt
|
||||
|
||||
# Playwright
|
||||
playwright-report/
|
||||
test-results/
|
||||
playwright/.cache/
|
||||
*.playwright.log
|
||||
|
||||
# Sentry Config File
|
||||
.sentryclirc
|
||||
/dev-dist
|
||||
@@ -1 +0,0 @@
|
||||
legacy-peer-deps=true
|
||||
@@ -15,8 +15,7 @@ You will also see any lint errors in the console.
|
||||
### `yarn test`
|
||||
|
||||
Launches the test runner in the interactive watch mode.<br />
|
||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more
|
||||
information.
|
||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||
|
||||
### `yarn build`
|
||||
|
||||
@@ -32,21 +31,15 @@ See the section about [deployment](https://facebook.github.io/create-react-app/d
|
||||
|
||||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
||||
|
||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will
|
||||
remove the single build dependency from your project.
|
||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right
|
||||
into your project so you have full control over them. All of the commands except `eject` will still work, but they will
|
||||
point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you
|
||||
shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t
|
||||
customize it when you are ready for it.
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||
|
||||
## Learn More
|
||||
|
||||
You can learn more in
|
||||
the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||
|
||||
To learn React, check out the [React documentation](https://reactjs.org/).
|
||||
|
||||
@@ -72,5 +65,4 @@ This section has moved here: https://facebook.github.io/create-react-app/docs/de
|
||||
|
||||
### `yarn build` fails to minify
|
||||
|
||||
This section has moved
|
||||
here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
|
||||
|
||||
73
client/craco.config.js
Normal file
73
client/craco.config.js
Normal file
@@ -0,0 +1,73 @@
|
||||
// craco.config.js
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const CracoLessPlugin = require("craco-less");
|
||||
const SentryWebpackPlugin = require("@sentry/webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
{
|
||||
plugin: SentryWebpackPlugin,
|
||||
options: {
|
||||
// sentry-cli configuration
|
||||
authToken:
|
||||
"6b45b028a02342db97a9a2f92c0959058665443d379d4a3a876430009e744260",
|
||||
org: "snapt-software",
|
||||
project: "imexonline",
|
||||
release: process.env.REACT_APP_GIT_SHA,
|
||||
|
||||
// webpack-specific configuration
|
||||
include: ".",
|
||||
ignore: ["node_modules", "webpack.config.js"],
|
||||
},
|
||||
},
|
||||
{
|
||||
plugin: CracoLessPlugin,
|
||||
options: {
|
||||
lessLoaderOptions: {
|
||||
lessOptions: {
|
||||
modifyVars: {
|
||||
...(process.env.NODE_ENV === "development"
|
||||
? { "@primary-color": "#a51d1d" }
|
||||
: {
|
||||
//"@primary-color": "#1DA57A"
|
||||
}),
|
||||
// "@primary-color": " #1890ff", // primary color for all components
|
||||
// "@link-color": "#1890ff", // link color
|
||||
// "@success-color": "#52c41a", // success state color
|
||||
// "@warning-color": "#faad14", // warning state color
|
||||
// "@error-color": "#f5222d", // error state color
|
||||
// "@font-size-base": "14px", // major text font size
|
||||
// " @heading-color": "rgba(0, 0, 0, 0.85)", // heading text color
|
||||
// "@text-color": "rgba(0, 0, 0, 0.65)", // major text color
|
||||
// "@text-color-secondary": "rgba(0, 0, 0, 0.45)", // secondary text color
|
||||
// "@disabled-color": "rgba(0, 0, 0, 0.25)", // disable state color
|
||||
// "@border-radius-base": "2px", // major border radius
|
||||
// "@border-color-base": "#d9d9d9", // major border color
|
||||
// "@box-shadow-base":
|
||||
// "0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),0 9px 28px 8px rgba(0, 0, 0, 0.05); // major shadow for layers }",
|
||||
},
|
||||
javascriptEnabled: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
webpack: {
|
||||
configure: (webpackConfig) => ({
|
||||
...webpackConfig,
|
||||
optimization: {
|
||||
...webpackConfig.optimization,
|
||||
// Workaround for CircleCI bug caused by the number of CPUs shown
|
||||
// https://github.com/facebook/create-react-app/issues/8320
|
||||
minimizer: webpackConfig.optimization.minimizer.map((item) => {
|
||||
if (item instanceof TerserPlugin) {
|
||||
item.options.parallel = 2;
|
||||
}
|
||||
|
||||
return item;
|
||||
}),
|
||||
},
|
||||
}),
|
||||
},
|
||||
devtool: "source-map",
|
||||
};
|
||||
17
client/cypress.config.js
Normal file
17
client/cypress.config.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const { defineConfig } = require("cypress");
|
||||
|
||||
module.exports = defineConfig({
|
||||
experimentalStudio: true,
|
||||
|
||||
env: {
|
||||
FIREBASE_USERNAME: "cypress@imex.test",
|
||||
FIREBASE_PASSWORD: "cypress",
|
||||
},
|
||||
|
||||
e2e: {
|
||||
setupNodeEvents(on, config) {
|
||||
// implement node event listeners here
|
||||
},
|
||||
baseUrl: "http://localhost:3000",
|
||||
},
|
||||
});
|
||||
4
client/cypress.env.json
Normal file
4
client/cypress.env.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"graphql_dev_endpoint": "https://db.dev.bodyshop.app/v1/graphql",
|
||||
"uploaded_by_email": "john@imex.dev"
|
||||
}
|
||||
232
client/cypress/e2e/intake/intake-checklist.cy.js
Normal file
232
client/cypress/e2e/intake/intake-checklist.cy.js
Normal file
@@ -0,0 +1,232 @@
|
||||
import moment from "moment";
|
||||
import job from "../../fixtures/jobs/job-3.json";
|
||||
|
||||
describe(
|
||||
"Adding job to checklist",
|
||||
{
|
||||
defaultCommandTimeout: 10000,
|
||||
},
|
||||
() => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/manage/jobs");
|
||||
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "QUERY_BODYSHOP") {
|
||||
req.alias = "bodyshop";
|
||||
}
|
||||
});
|
||||
|
||||
cy.get('[data-cy="active-jobs-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("active-jobs-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@active-jobs-table")
|
||||
.contains(job.clm_no)
|
||||
.first()
|
||||
.parent()
|
||||
.find('[data-cy="active-job-link"]')
|
||||
.click();
|
||||
});
|
||||
|
||||
it("adds checklists to the job and set the job to production", () => {
|
||||
const tomorrow = moment(new Date()).format("YYYY-MM-DD");
|
||||
|
||||
cy.get('[data-cy="job-actions-button"]').click();
|
||||
// Go to intake
|
||||
cy.get('[data-cy="job-intake-button"]').should("not.be.disabled").click();
|
||||
cy.url().should("include", "/intake");
|
||||
// Fill out the form
|
||||
cy.get('[data-cy="checklist-form"]').should("be.visible");
|
||||
|
||||
cy.wait("@bodyshop").then(({ response }) => {
|
||||
const bodyshop = response.body.data.bodyshops[0];
|
||||
|
||||
// intakechecklist
|
||||
const checklists = bodyshop.intakechecklist.form;
|
||||
|
||||
checklists.forEach((item, index) => {
|
||||
if (item.type === "text") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find("input:text")
|
||||
.type("Random Word");
|
||||
} else if (item.type === "textarea") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find("textarea")
|
||||
.type("Random Word");
|
||||
} else if (item.type === "checkbox") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find("input:checkbox")
|
||||
.check();
|
||||
} else if (item.type === "slider") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find(".ant-slider-dot:eq(1)")
|
||||
.click({ force: true });
|
||||
} else if (item.type === "rate") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find(".ant-rate > li")
|
||||
.eq(3)
|
||||
.find("div[role='radio']")
|
||||
.click({ force: true });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Check if `Add Job to Production` is switched to on
|
||||
cy.get('[data-cy="add-to-production-switch"]').should(
|
||||
"have.attr",
|
||||
"aria-checked",
|
||||
"true"
|
||||
);
|
||||
// Select dates for completion and delivery
|
||||
cy.get("#scheduled_completion").find(".ant-picker-input").first().click();
|
||||
cy.get(`[title="${tomorrow}"]`).should("be.visible").click();
|
||||
// Add time selection
|
||||
cy.get("#scheduled_delivery").find(".ant-picker-input").first().click();
|
||||
cy.get(`[title="${tomorrow}"]`)
|
||||
.should("be.visible")
|
||||
.click({ multiple: true, force: true });
|
||||
// Add time selection
|
||||
// Add note
|
||||
cy.get('[data-cy="checklist-production-note"]').type("automated testing");
|
||||
// Submit the form
|
||||
cy.get('[data-cy="checklist-submit-button"]').click();
|
||||
|
||||
cy.url().should("include", "/manage/jobs");
|
||||
cy.contains("In Production");
|
||||
});
|
||||
|
||||
it("adds checklists to the job and remove the job to production", () => {
|
||||
const tomorrow = moment(new Date()).format("YYYY-MM-DD");
|
||||
|
||||
cy.get('[data-cy="job-actions-button"]').click();
|
||||
// Go to deliver
|
||||
cy.get('[data-cy="job-deliver"]').should("not.be.disabled").click();
|
||||
cy.url().should("include", "/deliver");
|
||||
// Fill out the form
|
||||
cy.get('[data-cy="checklist-form"]').should("be.visible");
|
||||
|
||||
cy.wait("@bodyshop").then(({ response }) => {
|
||||
const bodyshop = response.body.data.bodyshops[0];
|
||||
|
||||
// deliverchecklist
|
||||
const checklists = bodyshop.deliverchecklist.form;
|
||||
|
||||
checklists.forEach((item, index) => {
|
||||
if (item.type === "text") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find("input:text")
|
||||
.type("Random Word");
|
||||
} else if (item.type === "textarea") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find("textarea")
|
||||
.type("Random Word");
|
||||
} else if (item.type === "checkbox") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find("input:checkbox")
|
||||
.check();
|
||||
} else if (item.type === "slider") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find(".ant-slider-dot:eq(1)")
|
||||
.click({ force: true });
|
||||
} else if (item.type === "rate") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find(".ant-rate > li")
|
||||
.eq(3)
|
||||
.find("div[role='radio']")
|
||||
.click({ force: true });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Select dates for completion and delivery
|
||||
cy.get("#actual_completion").find(".ant-picker-input").first().click();
|
||||
cy.get(`[title="${tomorrow}"]`).should("be.visible").click();
|
||||
cy.get("#actual_delivery").find(".ant-picker-input").first().click();
|
||||
cy.get(`[title="${tomorrow}"]`)
|
||||
.should("be.visible")
|
||||
.click({ multiple: true, force: true });
|
||||
|
||||
cy.get('[data-cy="remove-from-production"]').should(
|
||||
"have.attr",
|
||||
"aria-checked",
|
||||
"true"
|
||||
);
|
||||
|
||||
// Submit the form
|
||||
cy.get('[data-cy="checklist-submit-button"]').click();
|
||||
|
||||
// Job checklist completed.
|
||||
cy.url().should("include", "/manage/jobs");
|
||||
cy.contains("Delivered");
|
||||
});
|
||||
|
||||
it("renders and check the checklists correctly", () => {
|
||||
// Click the actions button
|
||||
cy.get('[data-cy="job-actions-button"]').click();
|
||||
// Go to checklists
|
||||
cy.get('[data-cy="job-checklist"]').should("not.be.disabled").click();
|
||||
|
||||
cy.wait("@bodyshop").then(({ response }) => {
|
||||
const bodyshop = response.body.data.bodyshops[0];
|
||||
|
||||
// intakechecklist
|
||||
const intakechecklist = bodyshop.intakechecklist.form;
|
||||
// deliverchecklist
|
||||
const deliverchecklist = bodyshop.deliverchecklist.form;
|
||||
|
||||
const checklists = [...intakechecklist, ...deliverchecklist];
|
||||
|
||||
cy.get('[data-cy="intake-checklist"]')
|
||||
.should("be.visible")
|
||||
.find("input")
|
||||
.should("be.disabled");
|
||||
|
||||
cy.get('[data-cy="deliver-checklist"]')
|
||||
.should("be.visible")
|
||||
.find("input")
|
||||
.should("be.disabled");
|
||||
|
||||
checklists.forEach((item, index) => {
|
||||
if (item.type === "text") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find("input:text")
|
||||
.should("have.value", "Random Word");
|
||||
} else if (item.type === "textarea") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find("textarea")
|
||||
.should("have.value", "Random Word");
|
||||
} else if (item.type === "checkbox") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find("input:checkbox")
|
||||
.should("be.checked");
|
||||
} else if (item.type === "slider") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find(".ant-slider-handle")
|
||||
.should("have.attr", "aria-valuenow", item.max / 2);
|
||||
} else if (item.type === "rate") {
|
||||
cy.get('[data-cy="config-form-components"] > div')
|
||||
.eq(index)
|
||||
.find(".ant-rate > .ant-rate-star-full")
|
||||
.should("have.length", 3);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
149
client/cypress/e2e/job-import/converting.cy.js
Normal file
149
client/cypress/e2e/job-import/converting.cy.js
Normal file
@@ -0,0 +1,149 @@
|
||||
import job from "../../fixtures/jobs/job-3.json";
|
||||
|
||||
const errorMessages = {
|
||||
class: "Class is required. ",
|
||||
referral_source: "Referral Source is required. ",
|
||||
employee_csr: "Customer Service Rep. is required. ",
|
||||
category: "Category is required. ",
|
||||
};
|
||||
|
||||
describe(
|
||||
"Converting a job with ",
|
||||
{
|
||||
defaultCommandTimeout: 10000,
|
||||
},
|
||||
() => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/manage/jobs");
|
||||
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "QUERY_BODYSHOP") {
|
||||
req.alias = "bodyshop";
|
||||
}
|
||||
});
|
||||
|
||||
cy.get('[data-cy="active-jobs-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("active-jobs-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@active-jobs-table")
|
||||
.contains(job.clm_no)
|
||||
.first()
|
||||
.parent()
|
||||
.find('[data-cy="active-job-link"]')
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="job-convert-button"]').click();
|
||||
});
|
||||
|
||||
it("shows the error messages of required fields", () => {
|
||||
cy.wait("@bodyshop").then(({ response }) => {
|
||||
const bodyshop = response.body.data.bodyshops[0];
|
||||
|
||||
const data = {
|
||||
ins_cos: bodyshop.md_ins_cos,
|
||||
config: {
|
||||
class: bodyshop.enforce_class,
|
||||
referral_source: bodyshop.enforce_referral,
|
||||
employee_csr: bodyshop.enforce_conversion_csr,
|
||||
category: bodyshop.enforce_conversion_category,
|
||||
},
|
||||
};
|
||||
|
||||
cy.get('[data-cy="convert-button"]').click();
|
||||
|
||||
cy.get("#ins_co_nm_help")
|
||||
.find(".ant-form-item-explain-error")
|
||||
.should("have.text", "Insurance Company Name is required. ");
|
||||
|
||||
for (const id in data.config) {
|
||||
if (data.config[id]) {
|
||||
cy.get(`#${id}_help`)
|
||||
.find(".ant-form-item-explain-error")
|
||||
.should("have.text", errorMessages[id]);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("shows error of required fields when insurance company is selected", () => {
|
||||
cy.wait("@bodyshop").then(({ response }) => {
|
||||
const bodyshop = response.body.data.bodyshops[0];
|
||||
|
||||
const data = {
|
||||
ins_cos: bodyshop.md_ins_cos,
|
||||
config: {
|
||||
class: bodyshop.enforce_class,
|
||||
referral_source: bodyshop.enforce_referral,
|
||||
employee_csr: bodyshop.enforce_conversion_csr,
|
||||
category: bodyshop.enforce_conversion_category,
|
||||
},
|
||||
};
|
||||
|
||||
cy.get(".ant-select-selection-search").find("#ins_co_nm").click();
|
||||
cy.get("#ins_co_nm_list")
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
cy.get("#ca_gst_registrant").should("have.class", "ant-switch").click();
|
||||
cy.get("#driveable").should("have.class", "ant-switch").click();
|
||||
cy.get("#towin").should("have.class", "ant-switch").click();
|
||||
|
||||
cy.get('[data-cy="convert-button"]').click();
|
||||
|
||||
for (const id in data.config) {
|
||||
if (data.config[id]) {
|
||||
cy.get(`#${id}_help`)
|
||||
.find(".ant-form-item-explain-error")
|
||||
.should("have.text", errorMessages[id]);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("checks for the job to convert", () => {
|
||||
cy.wait("@bodyshop").then(({ response }) => {
|
||||
const bodyshop = response.body.data.bodyshops[0];
|
||||
|
||||
const data = {
|
||||
ins_cos: bodyshop.md_ins_cos,
|
||||
config: {
|
||||
class: bodyshop.enforce_class,
|
||||
referral_source: bodyshop.enforce_referral,
|
||||
employee_csr: bodyshop.enforce_conversion_csr,
|
||||
category: bodyshop.enforce_conversion_category,
|
||||
},
|
||||
};
|
||||
|
||||
cy.get(".ant-select-selection-search").find("#ins_co_nm").click();
|
||||
cy.get("#ins_co_nm_list")
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
for (const id in data.config) {
|
||||
if (data.config[id]) {
|
||||
cy.get(".ant-select-selection-search").find(`#${id}`).click();
|
||||
cy.get(`#${id}_list`)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click();
|
||||
}
|
||||
}
|
||||
|
||||
cy.get("#ca_gst_registrant").should("have.class", "ant-switch").click();
|
||||
cy.get("#driveable").should("have.class", "ant-switch").click();
|
||||
cy.get("#towin").should("have.class", "ant-switch").click();
|
||||
|
||||
// cy.get('[data-cy="convert-button"]').click();
|
||||
// cy.get(".ant-notification-notice-message").contains("successfully");
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
500
client/cypress/e2e/job-import/job-import.cy.js
Normal file
500
client/cypress/e2e/job-import/job-import.cy.js
Normal file
@@ -0,0 +1,500 @@
|
||||
import job from "../../fixtures/jobs/job-3.json";
|
||||
import job2 from "../../fixtures/jobs/job-4.json";
|
||||
import jobSupplement from "../../fixtures/jobs/job-3-supplement.json";
|
||||
import jobMetadata from "../../fixtures/jobs/job-3-jobmetadata.json";
|
||||
import jobSupplementMetadata from "../../fixtures/jobs/job-3-supplment-jobmetadata.json";
|
||||
import Dinero from "dinero.js";
|
||||
|
||||
const createJobEstimate = (job, bodyshopid) => {
|
||||
return {
|
||||
owner: {
|
||||
data: {
|
||||
shopid: bodyshopid,
|
||||
...job.owner.data,
|
||||
},
|
||||
},
|
||||
vehicle: {
|
||||
data: {
|
||||
shopid: bodyshopid,
|
||||
...job.vehicle.data,
|
||||
},
|
||||
},
|
||||
shopid: bodyshopid,
|
||||
...job,
|
||||
};
|
||||
};
|
||||
|
||||
describe(
|
||||
"Importing an available job",
|
||||
{
|
||||
defaultCommandTimeout: 10000,
|
||||
requestTimeout: 10000,
|
||||
},
|
||||
() => {
|
||||
// assuming that user is logged in
|
||||
beforeEach(() => {
|
||||
cy.visit("/manage/available");
|
||||
// intercept bodyshop query for id
|
||||
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "QUERY_BODYSHOP") {
|
||||
req.alias = "bodyshop";
|
||||
}
|
||||
});
|
||||
|
||||
cy.wait("@bodyshop").then(({ response }) => {
|
||||
const id = response.body.data.bodyshops[0].id;
|
||||
|
||||
cy.wrap(id).as("bodyshopid");
|
||||
});
|
||||
});
|
||||
|
||||
it("Enters a job programatically", () => {
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "QUERY_AVAILABLE_JOBS") {
|
||||
req.alias = "availableJobs";
|
||||
}
|
||||
});
|
||||
|
||||
cy.wait("@availableJobs").then(({ request }) => {
|
||||
const token = request.headers.authorization;
|
||||
|
||||
cy.get("@bodyshopid").then((bodyshopid) => {
|
||||
const job_est_data = createJobEstimate(job, bodyshopid);
|
||||
|
||||
cy.insertAvailableJob({
|
||||
bodyshopid,
|
||||
job,
|
||||
token,
|
||||
job_est_data,
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("creates a new owner record for the job", () => {
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "QUERY_AVAILABLE_JOBS") {
|
||||
req.alias = "availableJobs";
|
||||
}
|
||||
});
|
||||
|
||||
cy.wait("@availableJobs");
|
||||
|
||||
cy.get('[data-cy="available-jobs-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.contains(job.clm_no)
|
||||
.parent()
|
||||
.as("row");
|
||||
|
||||
cy.get("@row")
|
||||
.find('[data-cy="add-job-as-new-button"]')
|
||||
.should("be.enabled")
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="new_owner_checkbox"]').should("be.checked");
|
||||
cy.get('[data-cy="existing-owners-ok-button"]')
|
||||
.should("be.enabled")
|
||||
.click();
|
||||
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "INSERT_JOB") {
|
||||
req.alias = "insertJob";
|
||||
}
|
||||
});
|
||||
|
||||
cy.wait("@insertJob").then(({ response }) => {
|
||||
const id = response.body.data.insert_jobs.returning[0].id;
|
||||
|
||||
cy.get(".ant-notification-notice-message")
|
||||
.contains("Job created successfully. Click to view.")
|
||||
.click();
|
||||
|
||||
cy.url().should("include", `/manage/jobs/${id}`);
|
||||
});
|
||||
|
||||
cy.get('[data-cy="tab-totals"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="job-totals-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("totals-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@totals-table")
|
||||
.eq(0)
|
||||
.find("td:not(.ant-table-selection-column)")
|
||||
.eq(1)
|
||||
.invoke("text")
|
||||
.should(
|
||||
"be.equal",
|
||||
Dinero({
|
||||
amount: jobMetadata.totals.subtotal.amount,
|
||||
}).toFormat()
|
||||
);
|
||||
});
|
||||
|
||||
it("imports a supplement for an existing job", () => {
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "QUERY_AVAILABLE_JOBS") {
|
||||
req.alias = "availableJobs";
|
||||
}
|
||||
});
|
||||
|
||||
cy.wait("@availableJobs").then(({ request }) => {
|
||||
const token = request.headers.authorization;
|
||||
|
||||
cy.get("@bodyshopid").then((bodyshopid) => {
|
||||
const job_est_data = createJobEstimate(jobSupplement, bodyshopid);
|
||||
|
||||
cy.insertAvailableJob({
|
||||
bodyshopid,
|
||||
job: jobSupplement,
|
||||
token,
|
||||
job_est_data,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
cy.get('[data-cy="refetch-available-jobs-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="available-jobs-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.contains(jobSupplement.clm_no)
|
||||
.parent()
|
||||
.as("row");
|
||||
|
||||
cy.get('[data-cy="add-job-as-supplement"]').should("be.enabled").click();
|
||||
|
||||
cy.get('[data-cy="existing-jobs-table"]')
|
||||
.find(".ant-table-tbody tr")
|
||||
.should("not.have.class", "ant-table-placeholder")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="existing-jobs-ok-button"]')
|
||||
.should("not.be", "disabled")
|
||||
.click();
|
||||
|
||||
cy.get(".ant-notification-notice-message")
|
||||
.contains("Job supplemented successfully.")
|
||||
.click();
|
||||
|
||||
cy.url().should("include", "/manage/jobs");
|
||||
|
||||
cy.get('[data-cy="tab-totals"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="job-totals-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("totals-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@totals-table")
|
||||
.eq(0)
|
||||
.find("td:not(.ant-table-selection-column)")
|
||||
.eq(1)
|
||||
.invoke("text")
|
||||
.should(
|
||||
"be.equal",
|
||||
Dinero({
|
||||
amount: jobSupplementMetadata.totals.subtotal.amount,
|
||||
}).toFormat()
|
||||
);
|
||||
});
|
||||
|
||||
it("imports a supplement and override estimate header", () => {
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "QUERY_AVAILABLE_JOBS") {
|
||||
req.alias = "availableJobs";
|
||||
}
|
||||
});
|
||||
|
||||
cy.wait("@availableJobs").then(({ request }) => {
|
||||
const token = request.headers.authorization;
|
||||
|
||||
cy.get("@bodyshopid").then((bodyshopid) => {
|
||||
const job_est_data = createJobEstimate(jobSupplement, bodyshopid);
|
||||
|
||||
cy.insertAvailableJob({
|
||||
bodyshopid,
|
||||
job: jobSupplement,
|
||||
token,
|
||||
job_est_data,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
cy.get('[data-cy="refetch-available-jobs-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="available-jobs-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.contains(jobSupplement.clm_no)
|
||||
.parent()
|
||||
.as("row");
|
||||
|
||||
cy.get('[data-cy="add-job-as-supplement"]').should("be.enabled").click();
|
||||
|
||||
cy.get('[data-cy="existing-jobs-table"]')
|
||||
.find(".ant-table-tbody tr")
|
||||
.should("not.have.class", "ant-table-placeholder")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
// click override
|
||||
cy.get('[data-cy="override-header-checkbox"]').check();
|
||||
|
||||
cy.get('[data-cy="existing-jobs-ok-button"]')
|
||||
.should("not.be", "disabled")
|
||||
.click();
|
||||
|
||||
cy.get(".ant-notification-notice-message")
|
||||
.contains("Job supplemented successfully.")
|
||||
.click();
|
||||
|
||||
cy.url().should("include", "/manage/jobs");
|
||||
|
||||
cy.get('[data-cy="tab-totals"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="job-totals-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("totals-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@totals-table")
|
||||
.eq(0)
|
||||
.find("td:not(.ant-table-selection-column)")
|
||||
.eq(1)
|
||||
.invoke("text")
|
||||
.should(
|
||||
"be.equal",
|
||||
Dinero({
|
||||
amount: jobSupplementMetadata.totals.subtotal.amount,
|
||||
}).toFormat()
|
||||
);
|
||||
});
|
||||
|
||||
it("imports a job with an existing owner", () => {
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "QUERY_AVAILABLE_JOBS") {
|
||||
req.alias = "availableJobs";
|
||||
}
|
||||
});
|
||||
|
||||
cy.wait("@availableJobs").then(({ request }) => {
|
||||
const token = request.headers.authorization;
|
||||
|
||||
cy.get("@bodyshopid").then((bodyshopid) => {
|
||||
const job_est_data = createJobEstimate(job2, bodyshopid);
|
||||
|
||||
cy.insertAvailableJob({
|
||||
bodyshopid,
|
||||
job: job2,
|
||||
token,
|
||||
job_est_data,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
cy.get('[data-cy="refetch-available-jobs-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="add-job-as-new-button"]').should("be.enabled").click();
|
||||
|
||||
cy.get('[data-cy="existing-owner-table"]', { timeout: 20000 })
|
||||
.find(".ant-table-tbody tr")
|
||||
.should("not.have.class", "ant-table-placeholder")
|
||||
.then(($table) => {
|
||||
cy.wrap($table).first().click();
|
||||
|
||||
cy.get('[data-cy="new_owner_checkbox"]').should("not.be", "checked");
|
||||
});
|
||||
|
||||
cy.get('[data-cy="existing-owners-ok-button"]').click();
|
||||
|
||||
cy.get(".ant-notification-notice-message").contains(
|
||||
"Job created successfully. Click to view."
|
||||
);
|
||||
|
||||
cy.visit("/manage/owners");
|
||||
// Navigate to owner records
|
||||
cy.get('[data-cy="owners-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("owners-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
// Get owner name
|
||||
cy.get("@owners-table")
|
||||
.contains(`${job2.owner.data.ownr_fn} ${job2.owner.data.ownr_ln}`)
|
||||
.click();
|
||||
|
||||
// check list if claim number is there
|
||||
cy.get('[data-cy="owner-jobs-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("owner-jobs-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
// Get owner name
|
||||
cy.get("@owner-jobs-table").contains(job2.clm_no).should("exist");
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
const errorMessages = {
|
||||
class: "Class is required. ",
|
||||
referral_source: "Referral Source is required. ",
|
||||
employee_csr: "Customer Service Rep. is required. ",
|
||||
category: "Category is required. ",
|
||||
};
|
||||
|
||||
describe(
|
||||
"Converting an active job",
|
||||
{
|
||||
defaultCommandTimeout: 10000,
|
||||
},
|
||||
() => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/manage/jobs");
|
||||
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "QUERY_BODYSHOP") {
|
||||
req.alias = "bodyshop";
|
||||
}
|
||||
});
|
||||
|
||||
cy.get('[data-cy="active-jobs-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("active-jobs-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@active-jobs-table")
|
||||
.contains(job.clm_no)
|
||||
.first()
|
||||
.parent()
|
||||
.find('[data-cy="active-job-link"]')
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="job-convert-button"]').click();
|
||||
});
|
||||
|
||||
it("shows the error messages of required fields", () => {
|
||||
cy.wait("@bodyshop").then(({ response }) => {
|
||||
const bodyshop = response.body.data.bodyshops[0];
|
||||
|
||||
const data = {
|
||||
ins_cos: bodyshop.md_ins_cos,
|
||||
config: {
|
||||
class: bodyshop.enforce_class,
|
||||
referral_source: bodyshop.enforce_referral,
|
||||
employee_csr: bodyshop.enforce_conversion_csr,
|
||||
category: bodyshop.enforce_conversion_category,
|
||||
},
|
||||
};
|
||||
|
||||
cy.get('[data-cy="convert-button"]').click();
|
||||
|
||||
cy.get("#ins_co_nm_help")
|
||||
.find(".ant-form-item-explain-error")
|
||||
.should("have.text", "Insurance Company Name is required. ");
|
||||
|
||||
for (const id in data.config) {
|
||||
if (data.config[id]) {
|
||||
cy.get(`#${id}_help`)
|
||||
.find(".ant-form-item-explain-error")
|
||||
.should("have.text", errorMessages[id]);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("shows error of required fields when insurance company is selected", () => {
|
||||
cy.wait("@bodyshop").then(({ response }) => {
|
||||
const bodyshop = response.body.data.bodyshops[0];
|
||||
|
||||
const data = {
|
||||
ins_cos: bodyshop.md_ins_cos,
|
||||
config: {
|
||||
class: bodyshop.enforce_class,
|
||||
referral_source: bodyshop.enforce_referral,
|
||||
employee_csr: bodyshop.enforce_conversion_csr,
|
||||
category: bodyshop.enforce_conversion_category,
|
||||
},
|
||||
};
|
||||
|
||||
cy.get(".ant-select-selection-search").find("#ins_co_nm").click();
|
||||
cy.get("#ins_co_nm_list")
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
cy.get("#ca_gst_registrant").should("have.class", "ant-switch").click();
|
||||
cy.get("#driveable").should("have.class", "ant-switch").click();
|
||||
cy.get("#towin").should("have.class", "ant-switch").click();
|
||||
|
||||
cy.get('[data-cy="convert-button"]').click();
|
||||
|
||||
for (const id in data.config) {
|
||||
if (data.config[id]) {
|
||||
cy.get(`#${id}_help`)
|
||||
.find(".ant-form-item-explain-error")
|
||||
.should("have.text", errorMessages[id]);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("checks for the job to convert", () => {
|
||||
cy.wait("@bodyshop").then(({ response }) => {
|
||||
const bodyshop = response.body.data.bodyshops[0];
|
||||
|
||||
const data = {
|
||||
ins_cos: bodyshop.md_ins_cos,
|
||||
config: {
|
||||
class: bodyshop.enforce_class,
|
||||
referral_source: bodyshop.enforce_referral,
|
||||
employee_csr: bodyshop.enforce_conversion_csr,
|
||||
category: bodyshop.enforce_conversion_category,
|
||||
},
|
||||
};
|
||||
|
||||
cy.get(".ant-select-selection-search").find("#ins_co_nm").click();
|
||||
cy.get("#ins_co_nm_list")
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
for (const id in data.config) {
|
||||
if (data.config[id]) {
|
||||
cy.get(".ant-select-selection-search").find(`#${id}`).click();
|
||||
cy.get(`#${id}_list`)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click();
|
||||
}
|
||||
}
|
||||
|
||||
cy.get("#ca_gst_registrant").should("have.class", "ant-switch").click();
|
||||
cy.get("#driveable").should("have.class", "ant-switch").click();
|
||||
cy.get("#towin").should("have.class", "ant-switch").click();
|
||||
|
||||
cy.get('[data-cy="convert-button"]').click();
|
||||
cy.get(".ant-notification-notice-message").contains(
|
||||
"Job converted successfully."
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
32
client/cypress/e2e/login-and-navigation/login.cy.js
Normal file
32
client/cypress/e2e/login-and-navigation/login.cy.js
Normal file
@@ -0,0 +1,32 @@
|
||||
describe("logging in to the application", () => {
|
||||
// FIXME error message
|
||||
it("logs in the using wrong credentials", () => {
|
||||
cy.login("fakeusername", "veryverylongpassword_123@#");
|
||||
cy.contains("invalid-email");
|
||||
});
|
||||
|
||||
it("logs in the using wrong password", () => {
|
||||
cy.login("john@imex.dev", "veryverylongpassword_123@#");
|
||||
cy.contains(
|
||||
"The email and password combination you provided is incorrect."
|
||||
);
|
||||
});
|
||||
|
||||
it("logs in a non-existent credentials", () => {
|
||||
cy.login("franz@imex.dev", "veryverylongpassword_123@#");
|
||||
cy.contains("A user with this email does not exist.");
|
||||
});
|
||||
|
||||
// TODO create disabled account
|
||||
// it("logs in with a disabled account", () => {
|
||||
// cy.login("disabled_account@imex.dev", "john123");
|
||||
// cy.contains("User account disabled.");
|
||||
// });
|
||||
|
||||
// TODO log in to the application
|
||||
// it("logs in the using the right credentials", () => {
|
||||
// cy.login("john@imex.dev", "john123");
|
||||
|
||||
// cy.url().should('include', '/manage')
|
||||
// });
|
||||
});
|
||||
17
client/cypress/e2e/login-and-navigation/reset-password.cy.js
Normal file
17
client/cypress/e2e/login-and-navigation/reset-password.cy.js
Normal file
@@ -0,0 +1,17 @@
|
||||
describe("resetting user password", () => {
|
||||
it("resets forgotten password with an invalid email", () => {
|
||||
cy.passwordReset("franz");
|
||||
cy.contains("Email is not a valid email");
|
||||
});
|
||||
|
||||
// FIXME error message
|
||||
it("resets forgotten password with a user that does not exist", () => {
|
||||
cy.passwordReset("franz@imex.dev");
|
||||
cy.contains("user-not-found");
|
||||
});
|
||||
|
||||
it("resets forgotten password using the right credentials", () => {
|
||||
cy.passwordReset("john@imex.dev");
|
||||
cy.contains("A password reset link has been sent to you.");
|
||||
});
|
||||
});
|
||||
131
client/cypress/e2e/parts-ordering/parts-ordering.cy.js
Normal file
131
client/cypress/e2e/parts-ordering/parts-ordering.cy.js
Normal file
@@ -0,0 +1,131 @@
|
||||
import job from "../../fixtures/jobs/job-3.json";
|
||||
import job2 from "../../fixtures/jobs/job-4.json";
|
||||
import moment from "moment";
|
||||
|
||||
describe(
|
||||
"Ordering parts for the job",
|
||||
{
|
||||
defaultCommandTimeout: 10000,
|
||||
},
|
||||
() => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/manage/jobs");
|
||||
|
||||
cy.get('[data-cy="active-jobs-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("active-jobs-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
});
|
||||
|
||||
it("order parts for the job", () => {
|
||||
const today = moment(new Date()).format("YYYY-MM-DD");
|
||||
|
||||
cy.get("@active-jobs-table")
|
||||
.contains(job.clm_no)
|
||||
.first()
|
||||
.parent()
|
||||
.find('[data-cy="active-job-link"]')
|
||||
.click();
|
||||
|
||||
// Go to repair data tab
|
||||
cy.get('[data-cy="tab-repairdata"]').should("be.visible").click();
|
||||
// Click on filter parts only
|
||||
cy.get('[data-cy="filter-parts-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
// Select multiple rows
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find(".ant-checkbox-input")
|
||||
.click();
|
||||
// Click Order Parts
|
||||
cy.get('[data-cy="order-parts-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
// Modal should be visible
|
||||
cy.get('[data-cy="parts-order-modal"]').should("be.visible");
|
||||
// Fill required fields
|
||||
cy.get(".ant-select-selection-search").find(`#vendorid`).click();
|
||||
cy.get(`#vendorid_list`)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get("#deliver_by").click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click({ force: true });
|
||||
|
||||
cy.get('[data-cy="part-order-select-none"]').check();
|
||||
cy.get('[data-cy="order-part-submit"]').should("not.be.disabled").click();
|
||||
|
||||
cy.get(".ant-notification-notice-message").contains(
|
||||
"Parts order created successfully."
|
||||
);
|
||||
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find(".ant-table-cell")
|
||||
.eq(15)
|
||||
.contains("Ordered");
|
||||
});
|
||||
|
||||
it.only("order multiple parts for the job", () => {
|
||||
const today = moment(new Date()).format("YYYY-MM-DD");
|
||||
|
||||
cy.get("@active-jobs-table")
|
||||
.contains(job2.clm_no)
|
||||
.first()
|
||||
.parent()
|
||||
.find('[data-cy="active-job-link"]')
|
||||
.click();
|
||||
|
||||
// Go to repair data tab
|
||||
cy.get('[data-cy="tab-repairdata"]').should("be.visible").click();
|
||||
// Click on filter parts only
|
||||
cy.get('[data-cy="filter-parts-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
// Select multiple rows
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find("input:checkbox")
|
||||
.first()
|
||||
.click();
|
||||
// Click Order Parts
|
||||
cy.get('[data-cy="order-parts-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
// Modal should be visible
|
||||
cy.get('[data-cy="parts-order-modal"]').should("be.visible");
|
||||
// Fill required fields
|
||||
cy.get(".ant-select-selection-search").find(`#vendorid`).click();
|
||||
cy.get(`#vendorid_list`)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get("#deliver_by").click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click({ force: true });
|
||||
|
||||
cy.get('[data-cy="part-order-comments"]').type("testing from cypress");
|
||||
|
||||
cy.get('[data-cy="part-order-select-none"]').check();
|
||||
cy.get('[data-cy="order-part-submit"]').should("not.be.disabled").click();
|
||||
|
||||
cy.get(".ant-notification-notice-message").contains(
|
||||
"Parts order created successfully."
|
||||
);
|
||||
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find(".ant-table-cell")
|
||||
.eq(15)
|
||||
.contains("Ordered");
|
||||
});
|
||||
}
|
||||
);
|
||||
89
client/cypress/e2e/payments/entering-payments.cy.js
Normal file
89
client/cypress/e2e/payments/entering-payments.cy.js
Normal file
@@ -0,0 +1,89 @@
|
||||
describe(
|
||||
"Entering payment for the job",
|
||||
{
|
||||
defaultCommandTimeout: 5000,
|
||||
},
|
||||
() => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/manage");
|
||||
|
||||
cy.get("body").then(($body) => {
|
||||
if ($body.text().includes("Login")) {
|
||||
// Log in
|
||||
cy.get('[data-cy="username"]').type("john@imex.dev");
|
||||
cy.get('[data-cy="password"]').type("john123");
|
||||
cy.get('[data-cy="sign-in-button"]').click();
|
||||
}
|
||||
|
||||
cy.get(".ant-table-tbody")
|
||||
.should("be.visible")
|
||||
.find("tr")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get(".ant-table-row")
|
||||
.not(':contains("Open")')
|
||||
.first()
|
||||
.find("a")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
cy.url().should("include", "/manage/jobs");
|
||||
|
||||
// Go to totals data tab
|
||||
cy.get('[data-cy="tab-totals"]').should("be.visible").click();
|
||||
});
|
||||
});
|
||||
|
||||
it("enters a payment manually", () => {
|
||||
cy.get('[data-cy="job-payment-button"]').should("be.visible").click();
|
||||
|
||||
// fill out form
|
||||
cy.get('[data-cy="payment-amount"]').type(100);
|
||||
cy.get('[data-cy="payment-transactionid"]').type("QBD-P-03");
|
||||
cy.get('[data-cy="payment-memo"]').type("e2e testing");
|
||||
cy.get('[data-cy="payment-date"]').click();
|
||||
cy.get('[title="2023-07-03"]').should("be.visible").click();
|
||||
|
||||
cy.antdSelect("payer");
|
||||
cy.antdSelect("type");
|
||||
|
||||
cy.get('[data-cy="payment-form-save"]').click();
|
||||
});
|
||||
|
||||
// TODO Add payment using intellipay
|
||||
|
||||
it("marks payment as exported", () => {
|
||||
cy.get('[data-cy="payments-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("payments-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@payments-table")
|
||||
.first()
|
||||
.find('[data-cy="edit-payment-button"]')
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="payment-markexported"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
});
|
||||
|
||||
it("marks payment for re-export", () => {
|
||||
cy.get('[data-cy="payments-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("payments-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@payments-table")
|
||||
.last()
|
||||
.find('[data-cy="edit-payment-button"]')
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="payment-markforreexport"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
});
|
||||
}
|
||||
);
|
||||
431
client/cypress/e2e/posting-bills/part-ordering.cy.js
Normal file
431
client/cypress/e2e/posting-bills/part-ordering.cy.js
Normal file
@@ -0,0 +1,431 @@
|
||||
import job from "../../fixtures/jobs/job-3.json";
|
||||
import moment from "moment";
|
||||
|
||||
const uuid = () => Cypress._.random(0, 1e6);
|
||||
|
||||
describe(
|
||||
"Billing job parts orders",
|
||||
{
|
||||
defaultCommandTimeout: 10000,
|
||||
},
|
||||
() => {
|
||||
const today = moment(new Date()).format("YYYY-MM-DD");
|
||||
|
||||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.visit("/manage/jobs");
|
||||
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "SEARCH_VENDOR_AUTOCOMPLETE") {
|
||||
req.alias = "vendors";
|
||||
}
|
||||
});
|
||||
|
||||
cy.get('[data-cy="active-jobs-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("active-jobs-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@active-jobs-table")
|
||||
.contains(job.clm_no)
|
||||
.first()
|
||||
.parent()
|
||||
.find('[data-cy="active-job-link"]')
|
||||
.click();
|
||||
});
|
||||
|
||||
it("receives a part bill", () => {
|
||||
// Order a part
|
||||
// Go to repair data tab
|
||||
cy.get('[data-cy="tab-repairdata"]').should("be.visible").click();
|
||||
// Click on filter parts only
|
||||
cy.get('[data-cy="filter-parts-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
// Select multiple rows
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find(".ant-checkbox-input")
|
||||
.click();
|
||||
// Click Order Parts
|
||||
cy.get('[data-cy="order-parts-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
// Modal should be visible
|
||||
cy.get('[data-cy="parts-order-modal"]').should("be.visible");
|
||||
// Fill required fields
|
||||
cy.get(".ant-select-selection-search").find(`#vendorid`).click();
|
||||
cy.get(`#vendorid_list`)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get("#deliver_by").click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click({ force: true });
|
||||
|
||||
cy.get('[data-cy="part-order-comments"]').type("testing from cypress");
|
||||
|
||||
cy.get('[data-cy="part-order-select-none"]').check();
|
||||
cy.get('[data-cy="order-part-submit"]').should("not.be.disabled").click();
|
||||
|
||||
cy.get(".ant-notification-notice-message").contains(
|
||||
"Parts order created successfully."
|
||||
);
|
||||
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find(".ant-table-cell")
|
||||
.eq(15)
|
||||
.contains("Ordered");
|
||||
|
||||
cy.get('[data-cy="tab-partssublet"]').should("be.visible").click();
|
||||
// Find the first row in the parts order
|
||||
cy.get('[data-cy="part-orders-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("orders-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@orders-table")
|
||||
.first()
|
||||
.should("be.visible")
|
||||
.find('[data-cy="receive-bill-button"]')
|
||||
.click();
|
||||
|
||||
// fill out form
|
||||
cy.get('[data-cy="bill-form-invoice"]').type(uuid());
|
||||
|
||||
cy.get("#bill-form-date").click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click({ force: true });
|
||||
|
||||
cy.get('[data-cy="bill-form-parts-bin"]').find("input").click();
|
||||
cy.get("#location_list")
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="bill-line-table"]').each(($row) => {
|
||||
// get retail amount
|
||||
cy.wrap($row)
|
||||
.find('[data-cy="bill-line-actual-price"]')
|
||||
.click({ force: true, multiple: true });
|
||||
cy.wrap($row)
|
||||
.find('[data-cy="bill-line-actual-cost"]')
|
||||
.click({ multiple: true });
|
||||
});
|
||||
|
||||
cy.get('[data-cy="bill-line-actual-cost"]').then((cells) => {
|
||||
const totals = cells.toArray().map((el) => Number(el.value));
|
||||
const sum = Cypress._.sum(totals);
|
||||
|
||||
cy.get('[data-cy="bill-form-bill-total"]').type(sum);
|
||||
});
|
||||
// Click save
|
||||
cy.get('[data-cy="bill-form-save-button"]').click();
|
||||
|
||||
cy.get(".ant-notification-notice-message").contains(
|
||||
"Invoice added successfully."
|
||||
);
|
||||
|
||||
cy.get('[data-cy="tab-repairdata"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="filter-parts-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find(".ant-table-cell")
|
||||
.eq(15)
|
||||
.contains("Received");
|
||||
});
|
||||
|
||||
it("backorders part from order", () => {
|
||||
cy.get('[data-cy="tab-partssublet"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="part-orders-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("orders-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@orders-table")
|
||||
.first()
|
||||
.should("be.visible")
|
||||
.find('[data-cy="view-part-order-button"]')
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="mark-backorder-button"]').click();
|
||||
cy.get(".backorder-date").click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click({ force: true });
|
||||
|
||||
cy.get('[data-cy="mark-for-backorder-button"]').click();
|
||||
|
||||
cy.get(".ant-drawer-close").click();
|
||||
|
||||
cy.get('[data-cy="tab-repairdata"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="filter-parts-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find(".ant-table-cell")
|
||||
.eq(15)
|
||||
.contains("Backordered");
|
||||
});
|
||||
|
||||
it("order parts inhouse", () => {
|
||||
cy.get('[data-cy="tab-repairdata"]').should("be.visible").click();
|
||||
// Click on filter parts only
|
||||
cy.get('[data-cy="filter-parts-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
// Select multiple rows
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find(".ant-checkbox-input")
|
||||
.click();
|
||||
// Click Order Parts
|
||||
cy.get('[data-cy="order-parts-inhouse-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
|
||||
cy.antdSelect("bill-vendor");
|
||||
|
||||
cy.antdSelect("bill-cost-center");
|
||||
|
||||
cy.get('[data-cy="bill-form-save-button"]').click({ force: true });
|
||||
|
||||
cy.get(".ant-notification-notice-message").contains(
|
||||
"Invoice added successfully."
|
||||
);
|
||||
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find(".ant-table-cell")
|
||||
.eq(15)
|
||||
.contains("Received");
|
||||
});
|
||||
|
||||
it("check inhouse bill to have extra actions", () => {
|
||||
cy.get('[data-cy="tab-partssublet"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="bills-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("bills-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@bills-table")
|
||||
.contains("$0.00")
|
||||
.parent()
|
||||
.parent()
|
||||
.first()
|
||||
.find('[data-cy="print-wrapper"]')
|
||||
.should("exist");
|
||||
});
|
||||
|
||||
it("posts bill directly", () => {
|
||||
cy.get('[data-cy="tab-partssublet"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="bills-post-button"]').should("be.visible").click();
|
||||
|
||||
// Add New Line
|
||||
cy.get('[data-cy="bill-line-add-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
// Select Vendor
|
||||
cy.antdSelect("bill-vendor");
|
||||
// Select Line
|
||||
cy.antdSelect("bill-line");
|
||||
|
||||
cy.get('[data-cy="bill-line-line-desc"]').type("Line Description");
|
||||
// Fill the Form
|
||||
cy.get('[data-cy="bill-form-invoice"]').type(uuid());
|
||||
|
||||
cy.get("#bill-form-date").click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click({ force: true });
|
||||
|
||||
cy.get('[data-cy="bill-form-parts-bin"]').find("input").click();
|
||||
cy.get("#location_list")
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="bill-line-table"]').each(($row) => {
|
||||
// get retail amount
|
||||
cy.wrap($row)
|
||||
.find('[data-cy="bill-line-actual-price"]')
|
||||
.click({ force: true, multiple: true });
|
||||
cy.wrap($row)
|
||||
.find('[data-cy="bill-line-actual-cost"]')
|
||||
.click({ multiple: true });
|
||||
});
|
||||
|
||||
cy.get('[data-cy="bill-line-actual-cost"]').then((cells) => {
|
||||
const totals = cells.toArray().map((el) => Number(el.value));
|
||||
const sum = Cypress._.sum(totals);
|
||||
|
||||
cy.get('[data-cy="bill-form-bill-total"]').type(sum);
|
||||
});
|
||||
|
||||
cy.antdSelect("bill-cost-center");
|
||||
|
||||
// Click save
|
||||
cy.get('[data-cy="bill-form-save-button"]').click();
|
||||
|
||||
cy.get(".ant-notification-notice-message").contains(
|
||||
"Invoice added successfully."
|
||||
);
|
||||
});
|
||||
|
||||
it("posts a bill with save and new", () => {
|
||||
cy.get('[data-cy="tab-partssublet"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="bills-post-button"]').should("be.visible").click();
|
||||
|
||||
// Add New Line
|
||||
cy.get('[data-cy="bill-line-add-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
// Select Vendor
|
||||
cy.antdSelect("bill-vendor");
|
||||
// Select Line
|
||||
cy.antdSelect("bill-line", "-- Not On Estimate --");
|
||||
// Fill the Form
|
||||
cy.get('[data-cy="bill-form-invoice"]').type(uuid());
|
||||
|
||||
cy.get("#bill-form-date").click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click({ force: true });
|
||||
|
||||
cy.get('[data-cy="bill-form-parts-bin"]').find("input").click();
|
||||
cy.get("#location_list")
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="bill-line-table"]').each(($row) => {
|
||||
// get retail amount
|
||||
cy.wrap($row)
|
||||
.find('[data-cy="bill-line-actual-price"]')
|
||||
.click({ force: true, multiple: true });
|
||||
cy.wrap($row)
|
||||
.find('[data-cy="bill-line-actual-cost"]')
|
||||
.click({ multiple: true });
|
||||
});
|
||||
|
||||
cy.get('[data-cy="bill-line-actual-cost"]').then((cells) => {
|
||||
const totals = cells.toArray().map((el) => Number(el.value));
|
||||
const sum = Cypress._.sum(totals);
|
||||
|
||||
cy.get('[data-cy="bill-form-bill-total"]').type(sum);
|
||||
});
|
||||
|
||||
cy.antdSelect("bill-cost-center");
|
||||
|
||||
// Click save
|
||||
cy.get('[data-cy="bill-form-savenew-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
|
||||
cy.get(".ant-notification-notice-message").contains(
|
||||
"Invoice added successfully."
|
||||
);
|
||||
});
|
||||
|
||||
it("uploads a document to a bill", () => {
|
||||
cy.get('[data-cy="tab-partssublet"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="bills-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("bills-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@bills-table")
|
||||
.first()
|
||||
.should("be.visible")
|
||||
.find('[data-cy="edit-bill-button"]')
|
||||
.click();
|
||||
|
||||
cy.location("search").should("include", "billid");
|
||||
cy.get('[data-cy="bill-edit-form"]')
|
||||
.find(".ant-upload #bill-document-upload")
|
||||
.selectFile("job.json", { force: true });
|
||||
});
|
||||
|
||||
it("marks bill as exported", () => {
|
||||
cy.get('[data-cy="tab-partssublet"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="bills-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("bills-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@bills-table")
|
||||
.find('[data-cy="bill-exported-checkbox"]')
|
||||
.not(":checked")
|
||||
.first()
|
||||
.as("export-status")
|
||||
.parent()
|
||||
.parent()
|
||||
.parent()
|
||||
.parent()
|
||||
.find('[data-cy="edit-bill-button"]')
|
||||
.click();
|
||||
|
||||
cy.location("search").should("include", "billid");
|
||||
cy.get('[data-cy="bill-mark-export-button"]')
|
||||
.as("mark-for-export")
|
||||
.click();
|
||||
cy.get("@mark-for-export").should("be.disabled");
|
||||
});
|
||||
|
||||
it("marks bill for re-export", () => {
|
||||
cy.get('[data-cy="tab-partssublet"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="bills-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("bills-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@bills-table")
|
||||
.find('[data-cy="bill-exported-checkbox"]')
|
||||
.filter(":checked")
|
||||
.first()
|
||||
.as("export-status")
|
||||
.parent()
|
||||
.parent()
|
||||
.parent()
|
||||
.parent()
|
||||
.find('[data-cy="edit-bill-button"]')
|
||||
.click();
|
||||
|
||||
cy.location("search").should("include", "billid");
|
||||
cy.get('[data-cy="bill-mark-reexport-button"]')
|
||||
.as("mark-for-reexport")
|
||||
.click();
|
||||
cy.get("@mark-for-reexport").should("be.disabled");
|
||||
});
|
||||
}
|
||||
);
|
||||
487
client/cypress/e2e/posting-bills/posting-bills.cy.js
Normal file
487
client/cypress/e2e/posting-bills/posting-bills.cy.js
Normal file
@@ -0,0 +1,487 @@
|
||||
import job2 from "../../fixtures/jobs/job-4.json";
|
||||
import moment from "moment";
|
||||
import Dinero from "dinero.js";
|
||||
|
||||
const uuid = () => Cypress._.random(0, 1e6);
|
||||
|
||||
describe(
|
||||
"Validating and calculating bills",
|
||||
{
|
||||
defaultCommandTimeout: 10000,
|
||||
},
|
||||
() => {
|
||||
const today = moment(new Date()).format("YYYY-MM-DD");
|
||||
const jobLines = job2.joblines.data.filter(
|
||||
(line) => line.part_type === "PAS" || line.part_type === "PAE"
|
||||
);
|
||||
const linesTotal = jobLines.reduce(
|
||||
(prev, line) => prev + line.act_price,
|
||||
0
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.visit("/manage/jobs");
|
||||
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "SEARCH_VENDOR_AUTOCOMPLETE") {
|
||||
req.alias = "vendors";
|
||||
}
|
||||
});
|
||||
|
||||
cy.get('[data-cy="active-jobs-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("active-jobs-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@active-jobs-table")
|
||||
.contains(job2.clm_no)
|
||||
.first()
|
||||
.parent()
|
||||
.find('[data-cy="active-job-link"]')
|
||||
.click();
|
||||
|
||||
// Go to repair data tab
|
||||
cy.get('[data-cy="tab-partssublet"]').should("be.visible").click();
|
||||
});
|
||||
|
||||
it("validates auto reconciliation through posting bill", () => {
|
||||
cy.get('[data-cy="tab-repairdata"]').should("be.visible").click();
|
||||
// Click on filter parts only
|
||||
cy.get('[data-cy="filter-parts-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
// Select multiple rows
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-checkbox-input")
|
||||
.first()
|
||||
.click();
|
||||
// Click Order Parts
|
||||
cy.get('[data-cy="order-parts-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
// Modal should be visible
|
||||
cy.get('[data-cy="parts-order-modal"]').should("be.visible");
|
||||
// Fill required fields
|
||||
cy.get(".ant-select-selection-search").find(`#vendorid`).click();
|
||||
cy.get(`#vendorid_list`)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click({ force: true });
|
||||
cy.get("#deliver_by").click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click({ force: true });
|
||||
|
||||
cy.get('[data-cy="part-order-comments"]').type("testing from cypress");
|
||||
|
||||
cy.get('[data-cy="part-order-select-none"]').check();
|
||||
cy.get('[data-cy="order-part-submit"]').should("not.be.disabled").click();
|
||||
|
||||
cy.get(".ant-notification-notice-message").contains(
|
||||
"Parts order created successfully."
|
||||
);
|
||||
|
||||
cy.get('[data-cy="tab-partssublet"]').should("be.visible").click();
|
||||
|
||||
// Find the first row in the parts order
|
||||
cy.get('[data-cy="part-orders-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("orders-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@orders-table")
|
||||
.first()
|
||||
.should("be.visible")
|
||||
.find('[data-cy="receive-bill-button"]')
|
||||
.click();
|
||||
|
||||
// fill out form
|
||||
cy.get('[data-cy="bill-form-invoice"]').type(uuid());
|
||||
|
||||
cy.get("#bill-form-date").click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click({ force: true });
|
||||
|
||||
cy.get('[data-cy="bill-form-parts-bin"]').find("input").click();
|
||||
cy.get("#location_list")
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="bill-line-table"]').each(($row) => {
|
||||
// get retail amount
|
||||
cy.wrap($row)
|
||||
.find('[data-cy="bill-line-actual-price"]')
|
||||
.as("retailPrice")
|
||||
.click({ force: true, multiple: true });
|
||||
cy.wrap($row)
|
||||
.find('[data-cy="bill-line-actual-cost"]')
|
||||
.click({ multiple: true });
|
||||
});
|
||||
|
||||
cy.get('[data-cy="bill-line-actual-cost"]').then((cells) => {
|
||||
const totals = cells.toArray().map((el) => Number(el.value));
|
||||
const sum = Cypress._.sum(totals);
|
||||
|
||||
cy.get('[data-cy="bill-form-bill-total"]').type(sum);
|
||||
|
||||
// Get taxes add it to the sum
|
||||
cy.get('[data-cy="bill-form-tax"]').then((taxes) => {
|
||||
const subtotals = taxes
|
||||
.toArray()
|
||||
.map((el) => Number(el.innerText.substring(1)));
|
||||
const totalTax = Cypress._.sum(subtotals);
|
||||
|
||||
const billAmount = sum + totalTax;
|
||||
|
||||
cy.get('[data-cy="bill-form-bill-total"]')
|
||||
.find("input")
|
||||
.clear()
|
||||
.type(billAmount);
|
||||
});
|
||||
});
|
||||
|
||||
cy.get("#bill-form-discrepancy").should("have.text", "$0.00");
|
||||
|
||||
// Click save
|
||||
cy.get('[data-cy="bill-form-save-button"]').click();
|
||||
|
||||
cy.get("@retailPrice")
|
||||
.invoke("val")
|
||||
.then((val) => {
|
||||
const discrepancy = linesTotal - Number(val);
|
||||
|
||||
cy.get("#retailtotal").should("have.text", `$${val}`);
|
||||
|
||||
cy.get(".discrepancy").each(($statistic) => {
|
||||
cy.wrap($statistic).should(
|
||||
"have.text",
|
||||
Dinero({
|
||||
amount: discrepancy,
|
||||
precision: 0,
|
||||
}).toFormat()
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("returning item and validating statistics", () => {
|
||||
cy.get('[data-cy="bills-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("bills-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@bills-table")
|
||||
.find('[data-cy="credit-memo-checkbox"]')
|
||||
.filter(":not(:checked)")
|
||||
.first()
|
||||
.should("not.be.disabled")
|
||||
.parent()
|
||||
.parent()
|
||||
.parent()
|
||||
.parent()
|
||||
.find('[data-cy="return-items-button"]')
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="billline-checkbox"]').check();
|
||||
cy.get('[data-cy="billline-return-items-ok-button"]').click();
|
||||
cy.get('[data-cy="billline-actual-price"]')
|
||||
.find(".ant-form-item-control-input-content")
|
||||
.then((prices) => {
|
||||
const totals = prices
|
||||
.toArray()
|
||||
.map((el) => Number(el.innerText.substring(1)));
|
||||
const sum = Cypress._.sum(totals);
|
||||
|
||||
const price = Dinero({
|
||||
amount: sum * 100,
|
||||
}).toFormat();
|
||||
|
||||
cy.get('[data-cy="order-quantity"]').each((input) => {
|
||||
cy.wrap(input).type("1");
|
||||
});
|
||||
cy.get('[data-cy="part-order-select-none"]').click();
|
||||
|
||||
cy.get('[data-cy="order-part-submit"]').click();
|
||||
|
||||
cy.get("#totalReturns").should("have.text", price);
|
||||
cy.get("#calculatedcreditsnotreceived").should("have.text", price);
|
||||
cy.get("#creditsnotreceived").should("have.text", price);
|
||||
});
|
||||
});
|
||||
|
||||
it("receives credit memo without return part", () => {
|
||||
// Find the first row in the parts order
|
||||
cy.get('[data-cy="part-orders-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("orders-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@orders-table")
|
||||
.find('[data-cy="part-order-return-checkbox"]')
|
||||
.filter(":checked")
|
||||
.first()
|
||||
.parent()
|
||||
.parent()
|
||||
.parent()
|
||||
.parent()
|
||||
.find('[data-cy="receive-bill-button"]')
|
||||
.click();
|
||||
|
||||
// fill out form
|
||||
cy.get('[data-cy="bill-form-invoice"]').type(uuid());
|
||||
|
||||
cy.get("#bill-form-date").click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click({ force: true });
|
||||
|
||||
cy.get('[data-cy="bill-line-table"]').each(($row) => {
|
||||
// get retail amount
|
||||
cy.wrap($row)
|
||||
.find('[data-cy="bill-line-actual-price"]')
|
||||
.click({ force: true, multiple: true });
|
||||
cy.wrap($row)
|
||||
.find('[data-cy="bill-line-actual-cost"]')
|
||||
.click({ multiple: true });
|
||||
});
|
||||
|
||||
cy.get('[data-cy="is-credit-memo-switch"]').click();
|
||||
|
||||
cy.get('[data-cy="is-credit-memo-switch"]').should(
|
||||
"have.attr",
|
||||
"aria-checked",
|
||||
"false"
|
||||
);
|
||||
|
||||
cy.get('[data-cy="bill-line-actual-cost"]').then((cells) => {
|
||||
cy.get('[data-cy="bill-line-actual-price"]').then((priceCells) => {
|
||||
const totals = cells.toArray().map((el) => Number(el.value));
|
||||
const priceTotals = priceCells
|
||||
.toArray()
|
||||
.map((el) => Number(el.value));
|
||||
const sum = Cypress._.sum(totals);
|
||||
const priceSum = Cypress._.sum(priceTotals);
|
||||
|
||||
cy.get('[data-cy="bill-form-bill-total"]').type(sum);
|
||||
|
||||
// Get taxes add it to the sum
|
||||
cy.get('[data-cy="bill-form-tax"]').then((taxes) => {
|
||||
const subtotals = taxes
|
||||
.toArray()
|
||||
.map((el) => Number(el.innerText.substring(1)));
|
||||
const totalTax = Cypress._.sum(subtotals);
|
||||
|
||||
const billAmount = sum + totalTax;
|
||||
|
||||
cy.get('[data-cy="bill-form-bill-total"]')
|
||||
.find("input")
|
||||
.clear()
|
||||
.type(billAmount);
|
||||
});
|
||||
|
||||
cy.get("#bill-form-discrepancy").should("have.text", "$0.00");
|
||||
|
||||
cy.get(`.ant-select-bill-cost-center > .ant-select-selector`).each(
|
||||
(select) => {
|
||||
cy.wrap(select).click();
|
||||
|
||||
cy.wrap(select)
|
||||
.find("input")
|
||||
.invoke("attr", "id")
|
||||
.then((id) => {
|
||||
cy.get(`#${id}_list`)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click({ force: true });
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
cy.get('[data-cy="bill-form-save-button"]').click();
|
||||
|
||||
cy.get("#totalReturns")
|
||||
.invoke("text")
|
||||
.then((value) => {
|
||||
const totalReturns =
|
||||
Number(value.substring(1)) - priceSum < 0
|
||||
? 0
|
||||
: Number(value.substring(1)) - priceSum;
|
||||
|
||||
cy.get("#calculatedcreditsnotreceived").should(
|
||||
"have.text",
|
||||
Dinero({
|
||||
amount: totalReturns,
|
||||
precision: 0,
|
||||
}).toFormat()
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("receives credit memo with return part", () => {
|
||||
// Find the first row in the parts order
|
||||
cy.get('[data-cy="part-orders-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("orders-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@orders-table")
|
||||
.find('[data-cy="part-order-return-checkbox"]')
|
||||
.filter(":checked")
|
||||
.first()
|
||||
.parent()
|
||||
.parent()
|
||||
.parent()
|
||||
.parent()
|
||||
.find('[data-cy="receive-bill-button"]')
|
||||
.click();
|
||||
|
||||
// fill out form
|
||||
cy.get('[data-cy="bill-form-invoice"]').type(uuid());
|
||||
|
||||
cy.get("#bill-form-date").click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click({ force: true });
|
||||
|
||||
cy.get('[data-cy="bill-line-table"]').each(($row) => {
|
||||
// get retail amount
|
||||
cy.wrap($row)
|
||||
.find('[data-cy="bill-line-actual-price"]')
|
||||
.click({ force: true, multiple: true });
|
||||
cy.wrap($row)
|
||||
.find('[data-cy="bill-line-actual-cost"]')
|
||||
.click({ multiple: true });
|
||||
});
|
||||
|
||||
cy.get('[data-cy="is-credit-memo-switch"]').should(
|
||||
"have.attr",
|
||||
"aria-checked",
|
||||
"true"
|
||||
);
|
||||
|
||||
cy.get('[data-cy="bill-line-actual-cost"]').then((cells) => {
|
||||
cy.get('[data-cy="bill-line-actual-price"]').then((priceCells) => {
|
||||
const totals = cells.toArray().map((el) => Number(el.value));
|
||||
const priceTotals = priceCells
|
||||
.toArray()
|
||||
.map((el) => Number(el.value));
|
||||
const sum = Cypress._.sum(totals);
|
||||
const priceSum = Cypress._.sum(priceTotals);
|
||||
|
||||
cy.get('[data-cy="bill-form-bill-total"]').type(sum);
|
||||
|
||||
// Get taxes add it to the sum
|
||||
cy.get('[data-cy="bill-form-tax"]').then((taxes) => {
|
||||
const subtotals = taxes
|
||||
.toArray()
|
||||
.map((el) => Number(el.innerText.substring(1)));
|
||||
const totalTax = Cypress._.sum(subtotals);
|
||||
|
||||
const billAmount = sum + totalTax;
|
||||
|
||||
cy.get('[data-cy="bill-form-bill-total"]')
|
||||
.find("input")
|
||||
.clear()
|
||||
.type(billAmount);
|
||||
});
|
||||
|
||||
cy.get("#bill-form-discrepancy").should("have.text", "$0.00");
|
||||
|
||||
cy.get(`.ant-select-bill-cost-center > .ant-select-selector`).each(
|
||||
(select) => {
|
||||
cy.wrap(select).click();
|
||||
|
||||
cy.wrap(select)
|
||||
.find("input")
|
||||
.invoke("attr", "id")
|
||||
.then((id) => {
|
||||
cy.get(`#${id}_list`)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click({ force: true });
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
cy.get('[data-cy="mark-as-received-checkbox"]').check({
|
||||
multiple: true,
|
||||
});
|
||||
|
||||
cy.get('[data-cy="bill-form-save-button"]').click();
|
||||
|
||||
cy.get("#totalReturns")
|
||||
.invoke("text")
|
||||
.then((value) => {
|
||||
const totalReturns =
|
||||
Number(value.substring(1)) - priceSum < 0
|
||||
? 0
|
||||
: Number(value.substring(1)) - priceSum;
|
||||
|
||||
cy.get("#creditsnotreceived").should(
|
||||
"have.text",
|
||||
Dinero({
|
||||
amount: totalReturns,
|
||||
precision: 0,
|
||||
}).toFormat()
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("views the row expander if it has the order and bill", () => {
|
||||
cy.get('[data-cy="tab-repairdata"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="filter-parts-button"]')
|
||||
.should("not.be.disabled")
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find("td")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find("td")
|
||||
.eq(13)
|
||||
.find("div")
|
||||
.should("exist");
|
||||
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find("td")
|
||||
.eq(14)
|
||||
.find("div")
|
||||
.should("exist");
|
||||
|
||||
cy.get('[data-cy="repair-data-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.first()
|
||||
.find("td")
|
||||
.eq(15)
|
||||
.find("div")
|
||||
.should("have.text", "Returned");
|
||||
|
||||
cy.get('[data-cy="parts-bills-order"]')
|
||||
.should("be.visible")
|
||||
.find("li")
|
||||
.first()
|
||||
.should("not.have.text", "This part has not yet been ordered.");
|
||||
});
|
||||
}
|
||||
);
|
||||
318
client/cypress/e2e/time-tickets/time-tickets.cy.js
Normal file
318
client/cypress/e2e/time-tickets/time-tickets.cy.js
Normal file
@@ -0,0 +1,318 @@
|
||||
import moment from "moment";
|
||||
import job2 from "../../fixtures/jobs/job-4.json";
|
||||
import Dinero from "dinero.js";
|
||||
|
||||
const uuid = () => Cypress._.random(0, 1e6);
|
||||
|
||||
describe(
|
||||
"Entering payment for the job",
|
||||
{
|
||||
defaultCommandTimeout: 5000,
|
||||
},
|
||||
() => {
|
||||
const today = moment().format("YYYY-MM-DD");
|
||||
const LABOR_HOURS = 1;
|
||||
const COST_CENTER = "Body";
|
||||
|
||||
beforeEach(() => {
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "QUERY_ACTIVE_EMPLOYEES") {
|
||||
req.alias = "employees";
|
||||
}
|
||||
});
|
||||
|
||||
cy.intercept("POST", Cypress.env("graphql_dev_endpoint"), (req) => {
|
||||
if (req.body.operationName === "QUERY_BODYSHOP") {
|
||||
req.alias = "bodyshop";
|
||||
}
|
||||
});
|
||||
|
||||
cy.visit("/manage");
|
||||
|
||||
cy.get('[data-cy="active-jobs-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("active-jobs-table")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@active-jobs-table")
|
||||
.contains(job2.clm_no)
|
||||
.first()
|
||||
.parent()
|
||||
.find('[data-cy="active-job-link"]')
|
||||
.click();
|
||||
|
||||
cy.url().should("include", "/manage/jobs");
|
||||
});
|
||||
|
||||
it("checks input validations", () => {
|
||||
cy.get('[data-cy="job-actions-button"]').click();
|
||||
|
||||
cy.get('[data-cy="actions-timetickets"]')
|
||||
.should("be.visible")
|
||||
.and("not.be.disabled")
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="timeticket-save-button"]').first().click();
|
||||
|
||||
cy.get('[data-cy="form-timeticket"]')
|
||||
.find(".ant-form-item-explain-error")
|
||||
.should("have.length", 4);
|
||||
|
||||
cy.get('[data-cy="form-timeticket-date"]').click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click({ force: true });
|
||||
|
||||
cy.antdSelect("timeticket-employee");
|
||||
|
||||
cy.antdSelect("cost-center");
|
||||
|
||||
cy.get('[data-cy="labor-allocations-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("labor-allocations")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get("@labor-allocations")
|
||||
.eq(0)
|
||||
.find("td:not(.ant-table-selection-column)")
|
||||
.eq(4)
|
||||
.find("strong")
|
||||
.invoke("text")
|
||||
.as("bodyDiff")
|
||||
.then((diff) => {
|
||||
// TODO dynamically select the employee prior to what is the labor and cost
|
||||
cy.get('[data-cy="form-timeticket-productivehrs"]').type(
|
||||
Number(diff) + 1
|
||||
);
|
||||
|
||||
cy.get(".ant-form-item-explain-error").should(
|
||||
"have.text",
|
||||
"The number of hours entered is more than what is available for this cost center."
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
it("adds new time ticket to a job with flat rate", () => {
|
||||
cy.get('[data-cy="job-actions-button"]').click();
|
||||
|
||||
cy.get('[data-cy="actions-timetickets"]')
|
||||
.should("be.visible")
|
||||
.and("not.be.disabled")
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="labor-allocations-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("labor-allocations")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
// Get Difference for Body
|
||||
cy.get('[data-cy="form-timeticket-date"]').click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click();
|
||||
|
||||
cy.get("@labor-allocations")
|
||||
.eq(0)
|
||||
.find("td:not(.ant-table-selection-column)")
|
||||
.eq(4)
|
||||
.find("strong")
|
||||
.invoke("text")
|
||||
.as("bodyDiff")
|
||||
.then((diff) => {
|
||||
cy.get('[data-cy="form-timeticket-productivehrs"]').type(LABOR_HOURS);
|
||||
|
||||
cy.get('[data-cy="form-timeticket-actualhrs"]').type(LABOR_HOURS);
|
||||
});
|
||||
|
||||
cy.wait("@employees").then(({ response }) => {
|
||||
const employees = response.body.data.employees;
|
||||
const employee = employees.find((e) => e.flat_rate);
|
||||
const employee_name = `${employee.first_name} ${employee.last_name}`;
|
||||
|
||||
cy.antdSelectValue("timeticket-employee", employee_name);
|
||||
|
||||
cy.antdSelectValue("cost-center", COST_CENTER);
|
||||
});
|
||||
|
||||
cy.get('[data-cy="form-timeticket-memo"]').type(uuid());
|
||||
|
||||
cy.get('[data-cy="timeticket-save-button"]').first().click();
|
||||
|
||||
cy.get(".ant-notification-notice-message").contains(
|
||||
"Time ticket entered successfully."
|
||||
);
|
||||
});
|
||||
|
||||
it("adds new time ticket to a job with straight rate", () => {
|
||||
cy.get('[data-cy="job-actions-button"]').click();
|
||||
|
||||
cy.get('[data-cy="actions-timetickets"]')
|
||||
.should("be.visible")
|
||||
.and("not.be.disabled")
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy="labor-allocations-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("labor-allocations")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
// Get Difference for Body
|
||||
cy.get('[data-cy="form-timeticket-date"]').click();
|
||||
cy.get(`[title="${today}"]`).should("be.visible").click();
|
||||
|
||||
cy.get("@labor-allocations")
|
||||
.eq(0)
|
||||
.find("td:not(.ant-table-selection-column)")
|
||||
.eq(4)
|
||||
.find("strong")
|
||||
.invoke("text")
|
||||
.as("bodyDiff")
|
||||
.then((diff) => {
|
||||
cy.get('[data-cy="form-timeticket-productivehrs"]').type(LABOR_HOURS);
|
||||
|
||||
cy.get('[data-cy="form-timeticket-actualhrs"]').type(LABOR_HOURS);
|
||||
});
|
||||
|
||||
cy.wait("@employees").then(({ response }) => {
|
||||
const employees = response.body.data.employees;
|
||||
const employee = employees.find((e) => !e.flat_rate);
|
||||
const employee_name = `${employee.first_name} ${employee.last_name}`;
|
||||
|
||||
cy.antdSelectValue("timeticket-employee", employee_name);
|
||||
|
||||
cy.antdSelectValue("cost-center", COST_CENTER);
|
||||
});
|
||||
|
||||
cy.get('[data-cy="form-timeticket-memo"]').type(uuid());
|
||||
|
||||
cy.get('[data-cy="timeticket-save-button"]').first().click();
|
||||
|
||||
cy.get(".ant-notification-notice-message").contains(
|
||||
"Time ticket entered successfully."
|
||||
);
|
||||
});
|
||||
|
||||
it("checks hours calculated to the allocations table", () => {
|
||||
cy.get('[data-cy="tab-labor"]').should("be.visible").click();
|
||||
|
||||
cy.get('[data-cy="labor-allocations-table"]')
|
||||
.find(".ant-table-tbody")
|
||||
.find("> tr:not(.ant-table-measure-row)")
|
||||
.as("labor-allocations")
|
||||
.should("not.have.class", "ant-table-placeholder");
|
||||
|
||||
cy.get('[data-cy="labor-total-hrs-claimed"]')
|
||||
.invoke("text")
|
||||
.then((hours) => {
|
||||
cy.wrap(hours).should("not.equal", "0");
|
||||
});
|
||||
});
|
||||
|
||||
it("checks the job costing calculations", () => {
|
||||
cy.get('[data-cy="job-actions-button"]').click();
|
||||
|
||||
cy.get('[data-cy="actions-jobcosting"]')
|
||||
.should("be.visible")
|
||||
.and("not.be.disabled")
|
||||
.click();
|
||||
|
||||
cy.wait("@bodyshop").then(({ request }) => {
|
||||
const token = request.headers.authorization;
|
||||
|
||||
const query = `query QUERY_ACTIVE_EMPLOYEES {
|
||||
employees(where: { active: { _eq: true } }) {
|
||||
last_name
|
||||
id
|
||||
first_name
|
||||
employee_number
|
||||
active
|
||||
termination_date
|
||||
hire_date
|
||||
flat_rate
|
||||
rates
|
||||
pin
|
||||
user_email
|
||||
}
|
||||
}`;
|
||||
|
||||
cy.request({
|
||||
url: "http://localhost:4000/test/query",
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: token,
|
||||
},
|
||||
body: {
|
||||
query,
|
||||
},
|
||||
}).then((response) => {
|
||||
const cost_center = COST_CENTER;
|
||||
const employees = response.body.employees;
|
||||
const total_cost = employees.reduce((prev, employee) => {
|
||||
const rate =
|
||||
employee.rates.find((rate) => rate.cost_center === cost_center)
|
||||
.rate ?? 0;
|
||||
|
||||
return prev + rate * LABOR_HOURS;
|
||||
}, 0);
|
||||
|
||||
cy.get('[data-cy="responsibilitycenter"]')
|
||||
.contains(cost_center)
|
||||
.parent()
|
||||
.parent()
|
||||
.find('[data-cy="cost"]')
|
||||
.should(
|
||||
"have.text",
|
||||
Dinero({
|
||||
amount: total_cost,
|
||||
precision: 0,
|
||||
}).toFormat()
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it.only("clocks in and out of the tech page for the timeticket", () => {
|
||||
// TODO go to tech page for the clock in and out
|
||||
cy.visit("/tech");
|
||||
|
||||
cy.get('[data-cy="tech-employee-id"]').type("a");
|
||||
cy.get('[data-cy="tech-employee-password"]').type("a{enter}");
|
||||
|
||||
cy.contains("Logged in as");
|
||||
// go to clock in
|
||||
cy.get('[data-cy="sider-joblock"]').click({ force: true });
|
||||
// find the job ro
|
||||
cy.get('[data-cy="clock-ro-select"]').type("273");
|
||||
cy.get('[data-cy="clock-ro-select"] .ant-select-selection-search input')
|
||||
.invoke("attr", "id")
|
||||
.then((selElm) => {
|
||||
const dropDownSelector = `#${selElm}_list`;
|
||||
|
||||
cy.get(dropDownSelector)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click({ force: true });
|
||||
});
|
||||
// select cost center
|
||||
cy.get('[data-cy="clock-cost-center-select"]').click();
|
||||
cy.get(
|
||||
'[data-cy="clock-cost-center-select"] .ant-select-selection-search input'
|
||||
)
|
||||
.invoke("attr", "id")
|
||||
.then((selElm) => {
|
||||
const dropDownSelector = `#${selElm}_list`;
|
||||
|
||||
cy.get(dropDownSelector)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.contains("Body")
|
||||
.first()
|
||||
.click({ force: true });
|
||||
});
|
||||
|
||||
// clock in and out of the job
|
||||
});
|
||||
}
|
||||
);
|
||||
5
client/cypress/fixtures/example.json
Normal file
5
client/cypress/fixtures/example.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Using fixtures to represent data",
|
||||
"email": "hello@cypress.io",
|
||||
"body": "Fixtures are a great way to mock data for responses to routes"
|
||||
}
|
||||
1051
client/cypress/fixtures/jobs/job-1.json
Normal file
1051
client/cypress/fixtures/jobs/job-1.json
Normal file
File diff suppressed because it is too large
Load Diff
1787
client/cypress/fixtures/jobs/job-2.json
Normal file
1787
client/cypress/fixtures/jobs/job-2.json
Normal file
File diff suppressed because it is too large
Load Diff
316
client/cypress/fixtures/jobs/job-3-jobmetadata.json
Normal file
316
client/cypress/fixtures/jobs/job-3-jobmetadata.json
Normal file
@@ -0,0 +1,316 @@
|
||||
{
|
||||
"parts": {
|
||||
"parts": {
|
||||
"list": {
|
||||
"PAE": {
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"PAN": {
|
||||
"total": {
|
||||
"amount": 26661,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"amount": 26661,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"subtotal": {
|
||||
"amount": 26661,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"prt_dsmk_total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"sublets": {
|
||||
"total": {
|
||||
"amount": 5000,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"subtotal": {
|
||||
"amount": 5000,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"rates": {
|
||||
"la1": {
|
||||
"rate": 92.49,
|
||||
"hours": 3.5,
|
||||
"total": {
|
||||
"amount": 32372,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"la2": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"la3": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"la4": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"laa": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lab": {
|
||||
"rate": 85.16,
|
||||
"hours": 29.7,
|
||||
"total": {
|
||||
"amount": 252925,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lad": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lae": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"laf": {
|
||||
"rate": 97.34,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lag": {
|
||||
"rate": 85.16,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lam": {
|
||||
"rate": 109.5,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lar": {
|
||||
"rate": 85.16,
|
||||
"hours": 8.500000000000002,
|
||||
"total": {
|
||||
"amount": 72386,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"las": {
|
||||
"rate": 85.16,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lau": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"mapa": {
|
||||
"rate": 55.38,
|
||||
"hours": 8.500000000000002,
|
||||
"total": {
|
||||
"amount": 47073,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"mash": {
|
||||
"rate": 6.85,
|
||||
"hours": 33.199999999999996,
|
||||
"total": {
|
||||
"amount": 22742,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"subtotal": {
|
||||
"amount": 427498,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"rates_subtotal": {
|
||||
"amount": 357683,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"totals": {
|
||||
"subtotal": {
|
||||
"amount": 495355,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"local_tax": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"state_tax": {
|
||||
"amount": 34675,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"custPayable": {
|
||||
"total": {
|
||||
"amount": 30000,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"dep_taxes": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"deductible": {
|
||||
"amount": 30000,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"federal_tax": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"other_customer_amount": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"federal_tax": {
|
||||
"amount": 24768,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"net_repairs": {
|
||||
"amount": 524798,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"statePartsTax": {
|
||||
"amount": 2216,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"total_repairs": {
|
||||
"amount": 554798,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"additional": {
|
||||
"pvrt": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"total": {
|
||||
"amount": 36196,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"towing": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"storage": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"shipping": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"adjustments": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"additionalCosts": {
|
||||
"amount": 36196,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"additionalCostItems": [
|
||||
{
|
||||
"key": "ATS Amount",
|
||||
"total": {
|
||||
"amount": 36196,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
2201
client/cypress/fixtures/jobs/job-3-supplement.json
Normal file
2201
client/cypress/fixtures/jobs/job-3-supplement.json
Normal file
File diff suppressed because it is too large
Load Diff
316
client/cypress/fixtures/jobs/job-3-supplment-jobmetadata.json
Normal file
316
client/cypress/fixtures/jobs/job-3-supplment-jobmetadata.json
Normal file
@@ -0,0 +1,316 @@
|
||||
{
|
||||
"parts": {
|
||||
"parts": {
|
||||
"list": {
|
||||
"PAE": {
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"PAN": {
|
||||
"total": {
|
||||
"amount": 36661,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"amount": 36661,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"subtotal": {
|
||||
"amount": 36661,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"prt_dsmk_total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"sublets": {
|
||||
"total": {
|
||||
"amount": 5000,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"subtotal": {
|
||||
"amount": 5000,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"rates": {
|
||||
"la1": {
|
||||
"rate": 92.49,
|
||||
"hours": 3.5,
|
||||
"total": {
|
||||
"amount": 32372,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"la2": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"la3": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"la4": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"laa": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lab": {
|
||||
"rate": 85.16,
|
||||
"hours": 29.7,
|
||||
"total": {
|
||||
"amount": 252925,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lad": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lae": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"laf": {
|
||||
"rate": 97.34,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lag": {
|
||||
"rate": 85.16,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lam": {
|
||||
"rate": 109.5,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lar": {
|
||||
"rate": 85.16,
|
||||
"hours": 8.500000000000002,
|
||||
"total": {
|
||||
"amount": 72386,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"las": {
|
||||
"rate": 85.16,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"lau": {
|
||||
"rate": 0,
|
||||
"hours": 0,
|
||||
"total": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"mapa": {
|
||||
"rate": 55.38,
|
||||
"hours": 8.500000000000002,
|
||||
"total": {
|
||||
"amount": 47073,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"mash": {
|
||||
"rate": 6.85,
|
||||
"hours": 33.199999999999996,
|
||||
"total": {
|
||||
"amount": 22742,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"subtotal": {
|
||||
"amount": 427498,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"rates_subtotal": {
|
||||
"amount": 357683,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"totals": {
|
||||
"subtotal": {
|
||||
"amount": 505355,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"local_tax": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"state_tax": {
|
||||
"amount": 35375,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"custPayable": {
|
||||
"total": {
|
||||
"amount": 30000,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"dep_taxes": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"deductible": {
|
||||
"amount": 30000,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"federal_tax": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"other_customer_amount": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"federal_tax": {
|
||||
"amount": 25268,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"net_repairs": {
|
||||
"amount": 535998,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"statePartsTax": {
|
||||
"amount": 2916,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"total_repairs": {
|
||||
"amount": 565998,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
},
|
||||
"additional": {
|
||||
"pvrt": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"total": {
|
||||
"amount": 36196,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"towing": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"storage": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"shipping": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"adjustments": {
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"additionalCosts": {
|
||||
"amount": 36196,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
},
|
||||
"additionalCostItems": [
|
||||
{
|
||||
"key": "ATS Amount",
|
||||
"total": {
|
||||
"amount": 36196,
|
||||
"currency": "USD",
|
||||
"precision": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
2201
client/cypress/fixtures/jobs/job-3.json
Normal file
2201
client/cypress/fixtures/jobs/job-3.json
Normal file
File diff suppressed because it is too large
Load Diff
1281
client/cypress/fixtures/jobs/job-4.json
Normal file
1281
client/cypress/fixtures/jobs/job-4.json
Normal file
File diff suppressed because it is too large
Load Diff
127
client/cypress/support/commands.js
Normal file
127
client/cypress/support/commands.js
Normal file
@@ -0,0 +1,127 @@
|
||||
// ***********************************************
|
||||
// This example commands.js shows you how to
|
||||
// create various custom commands and overwrite
|
||||
// existing commands.
|
||||
//
|
||||
// For more comprehensive examples of custom
|
||||
// commands please read more here:
|
||||
// https://on.cypress.io/custom-commands
|
||||
// ***********************************************
|
||||
//
|
||||
//
|
||||
// -- This is a parent command --
|
||||
// Cypress.Commands.add('login', (email, password) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a child command --
|
||||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a dual command --
|
||||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
|
||||
Cypress.Commands.add("goToSignInPage", () => {
|
||||
cy.visit("/");
|
||||
cy.contains("Sign In").click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add("login", (username, password) => {
|
||||
cy.goToSignInPage();
|
||||
|
||||
cy.get('[data-cy="username"]').type(username);
|
||||
cy.get('[data-cy="password"]').type(password);
|
||||
cy.get('[data-cy="sign-in-button"]', { timeout: 2000 }).click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add("passwordReset", (email) => {
|
||||
cy.goToSignInPage();
|
||||
cy.get('[data-cy="reset-password"]').click();
|
||||
cy.get('[data-cy="reset-password-email-input"]').type(email);
|
||||
cy.get('[data-cy="reset-password-button"]').click();
|
||||
});
|
||||
|
||||
Cypress.on("uncaught:exception", (err, runnable) => {
|
||||
// returning false here prevents Cypress from
|
||||
// failing the test
|
||||
return false;
|
||||
});
|
||||
|
||||
Cypress.Commands.add("antdSelect", (selector, filter) => {
|
||||
cy.get(`.ant-select-${selector} > .ant-select-selector`).click();
|
||||
cy.get(`.ant-select-${selector} .ant-select-selection-search input`)
|
||||
.invoke("attr", "id")
|
||||
.then((selElm) => {
|
||||
const dropDownSelector = `#${selElm}_list`;
|
||||
|
||||
if (filter) {
|
||||
cy.get(dropDownSelector)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.not(`:contains("${filter}")`)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
} else {
|
||||
cy.get(dropDownSelector)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.first()
|
||||
.click({ force: true });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Cypress.Commands.add("antdSelectValue", (selector, filter) => {
|
||||
cy.get(`.ant-select-${selector} > .ant-select-selector`).click();
|
||||
cy.get(`.ant-select-${selector} .ant-select-selection-search input`)
|
||||
.invoke("attr", "id")
|
||||
.then((selElm) => {
|
||||
const dropDownSelector = `#${selElm}_list`;
|
||||
|
||||
cy.get(dropDownSelector)
|
||||
.next()
|
||||
.find(".ant-select-item-option-content")
|
||||
.contains(filter)
|
||||
.first()
|
||||
.click({ force: true });
|
||||
});
|
||||
});
|
||||
|
||||
Cypress.Commands.add(
|
||||
"insertAvailableJob",
|
||||
({ bodyshopid, job, job_est_data, token }) => {
|
||||
const query = `mutation INSERT_AVAILABLE_JOB($job: available_jobs_insert_input!) {
|
||||
insert_available_jobs_one(object: $job) {
|
||||
id
|
||||
}
|
||||
}`;
|
||||
|
||||
cy.request({
|
||||
url: "http://localhost:4000/test/query",
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: token,
|
||||
},
|
||||
body: {
|
||||
query,
|
||||
job: {
|
||||
est_data: job_est_data,
|
||||
uploaded_by: Cypress.env("uploaded_by_email"),
|
||||
cieca_id: job.ciecaid,
|
||||
bodyshopid,
|
||||
clm_amt: job.clm_total,
|
||||
clm_no: job.clm_no,
|
||||
ins_co_nm: job.ins_co_nm,
|
||||
ownr_name: `${job.owner.data.ownr_fn} ${job.owner.data.ownr_ln}`,
|
||||
vehicle_info: `${job.v_model_yr} ${job.v_make_desc} ${job.v_model_desc}`,
|
||||
},
|
||||
},
|
||||
})
|
||||
.its("body.insert_available_jobs_one")
|
||||
.should("have.property", "id");
|
||||
}
|
||||
);
|
||||
20
client/cypress/support/e2e.js
Normal file
20
client/cypress/support/e2e.js
Normal file
@@ -0,0 +1,20 @@
|
||||
// ***********************************************************
|
||||
// This example support/e2e.js is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import "./commands";
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require('./commands')
|
||||
@@ -1,2 +0,0 @@
|
||||
if ("serviceWorker" in navigator)
|
||||
navigator.serviceWorker.register("/dev-sw.js?dev-sw", { scope: "/", type: "classic" });
|
||||
@@ -1,96 +0,0 @@
|
||||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// If the loader is already loaded, just stop.
|
||||
if (!self.define) {
|
||||
let registry = {};
|
||||
|
||||
// Used for `eval` and `importScripts` where we can't get script URL by other means.
|
||||
// In both cases, it's safe to use a global var because those functions are synchronous.
|
||||
let nextDefineUri;
|
||||
|
||||
const singleRequire = (uri, parentUri) => {
|
||||
uri = new URL(uri + ".js", parentUri).href;
|
||||
return (
|
||||
registry[uri] ||
|
||||
new Promise((resolve) => {
|
||||
if ("document" in self) {
|
||||
const script = document.createElement("script");
|
||||
script.src = uri;
|
||||
script.onload = resolve;
|
||||
document.head.appendChild(script);
|
||||
} else {
|
||||
nextDefineUri = uri;
|
||||
importScripts(uri);
|
||||
resolve();
|
||||
}
|
||||
}).then(() => {
|
||||
let promise = registry[uri];
|
||||
if (!promise) {
|
||||
throw new Error(`Module ${uri} didn’t register its module`);
|
||||
}
|
||||
return promise;
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
self.define = (depsNames, factory) => {
|
||||
const uri = nextDefineUri || ("document" in self ? document.currentScript.src : "") || location.href;
|
||||
if (registry[uri]) {
|
||||
// Module is already loading or loaded.
|
||||
return;
|
||||
}
|
||||
let exports = {};
|
||||
const require = (depUri) => singleRequire(depUri, uri);
|
||||
const specialDeps = {
|
||||
module: { uri },
|
||||
exports,
|
||||
require
|
||||
};
|
||||
registry[uri] = Promise.all(depsNames.map((depName) => specialDeps[depName] || require(depName))).then((deps) => {
|
||||
factory(...deps);
|
||||
return exports;
|
||||
});
|
||||
};
|
||||
}
|
||||
define(["./workbox-b5f7729d"], function (workbox) {
|
||||
"use strict";
|
||||
|
||||
self.skipWaiting();
|
||||
workbox.clientsClaim();
|
||||
|
||||
/**
|
||||
* The precacheAndRoute() method efficiently caches and responds to
|
||||
* requests for URLs in the manifest.
|
||||
* See https://goo.gl/S9QRab
|
||||
*/
|
||||
workbox.precacheAndRoute(
|
||||
[
|
||||
{
|
||||
url: "registerSW.js",
|
||||
revision: "3ca0b8505b4bec776b69afdba2768812"
|
||||
},
|
||||
{
|
||||
url: "index.html",
|
||||
revision: "0.sa702m4aq68"
|
||||
}
|
||||
],
|
||||
{}
|
||||
);
|
||||
workbox.cleanupOutdatedCaches();
|
||||
workbox.registerRoute(
|
||||
new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||
allowlist: [/^\/$/]
|
||||
})
|
||||
);
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user