Compare commits
1 Commits
feature/IO
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf75ad68f9 |
@@ -1,407 +0,0 @@
|
||||
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
|
||||
jobs:
|
||||
imex-api-deploy:
|
||||
docker:
|
||||
- image: cimg/node:22.13.1
|
||||
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 status --verbose
|
||||
eb deploy
|
||||
eb status
|
||||
- jira/notify:
|
||||
environment: Production (ImEX) - API
|
||||
environment_type: production
|
||||
job_type: deployment
|
||||
pipeline_id: << pipeline.id >>
|
||||
pipeline_number: << pipeline.number >>
|
||||
|
||||
imex-hasura-migrate:
|
||||
docker:
|
||||
- image: cimg/node:22.13.1
|
||||
parameters:
|
||||
secret:
|
||||
type: string
|
||||
default: $HASURA_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.imex.online/ --admin-secret << parameters.secret >>
|
||||
hasura metadata apply --endpoint https://db.imex.online/ --admin-secret << parameters.secret >>
|
||||
hasura metadata reload --endpoint https://db.imex.online/ --admin-secret << parameters.secret >>
|
||||
- jira/notify:
|
||||
environment: Production (ImEX) - Hasura
|
||||
environment_type: production
|
||||
pipeline_id: << pipeline.id >>
|
||||
job_type: deployment
|
||||
pipeline_number: << pipeline.number >>
|
||||
imex-app-build:
|
||||
docker:
|
||||
- image: cimg/node:22.13.1
|
||||
resource_class: large
|
||||
working_directory: ~/repo/client
|
||||
steps:
|
||||
- checkout:
|
||||
path: ~/repo
|
||||
- run:
|
||||
name: Install Dependencies
|
||||
command: npm i
|
||||
|
||||
- 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
|
||||
|
||||
- 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 >>
|
||||
|
||||
test-hasura-migrate:
|
||||
docker:
|
||||
- image: cimg/node:22.13.1
|
||||
parameters:
|
||||
secret:
|
||||
type: string
|
||||
default: $HASURA_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.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:
|
||||
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-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 >>
|
||||
|
||||
admin-app-build:
|
||||
docker:
|
||||
- image: cimg/node:16.15.0
|
||||
|
||||
working_directory: ~/repo/admin
|
||||
|
||||
steps:
|
||||
- checkout:
|
||||
path: ~/repo
|
||||
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-dependencies-{{ checksum "package.json" }}
|
||||
# fallback to using the latest cache if no exact match is found
|
||||
- v1-dependencies-
|
||||
- run: npm i
|
||||
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
- ~/.npm
|
||||
- ~/.cache
|
||||
key: v1-dependencies-{{ checksum "package.json" }}
|
||||
|
||||
- run: npm run build
|
||||
|
||||
- aws-s3/sync:
|
||||
from: build
|
||||
to: "s3://adm.imex.online/"
|
||||
|
||||
workflows:
|
||||
deploy_and_build:
|
||||
jobs:
|
||||
- imex-api-deploy:
|
||||
filters:
|
||||
branches:
|
||||
only: master-AIO
|
||||
- imex-app-build:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
- imex-app-beta-build:
|
||||
filters:
|
||||
branches:
|
||||
only: master-AIO
|
||||
- imex-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:
|
||||
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
|
||||
#- admin-app-build:
|
||||
#filters:
|
||||
#branches:
|
||||
#only: master
|
||||
@@ -1,24 +0,0 @@
|
||||
# Directories to exclude
|
||||
.circleci
|
||||
.idea
|
||||
.platform
|
||||
.vscode
|
||||
_reference
|
||||
client
|
||||
redis/dockerdata
|
||||
hasura
|
||||
node_modules
|
||||
# Files to exclude
|
||||
.ebignore
|
||||
.editorconfig
|
||||
.eslintrc.json
|
||||
.gitignore
|
||||
.prettierrc.js
|
||||
Dockerfile
|
||||
README.MD
|
||||
bodyshop_translations.babel
|
||||
docker-compose.yml
|
||||
ecosystem.config.js
|
||||
|
||||
# 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
|
||||
@@ -8,6 +8,7 @@
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module"
|
||||
|
||||
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
|
||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -21,7 +21,6 @@ admin/coverage
|
||||
/build
|
||||
client/build
|
||||
admin/build
|
||||
client/dist
|
||||
# misc
|
||||
.DS_Store
|
||||
.env
|
||||
@@ -113,11 +112,3 @@ firebase/.env
|
||||
.elasticbeanstalk/*
|
||||
!.elasticbeanstalk/*.cfg.yml
|
||||
!.elasticbeanstalk/*.global.yml
|
||||
logs/oAuthClient-log.log
|
||||
|
||||
|
||||
.node-persist/**
|
||||
|
||||
/*.env.*
|
||||
.idea/*
|
||||
.idea
|
||||
|
||||
@@ -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,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,2 +1 @@
|
||||
client_max_body_size 50M;
|
||||
client_body_buffer_size 5M;
|
||||
client_max_body_size 15M;
|
||||
@@ -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>/**"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
43
.vscode/settings.json
vendored
43
.vscode/settings.json
vendored
@@ -1,43 +0,0 @@
|
||||
{
|
||||
"xml.fileAssociations": [
|
||||
{
|
||||
"pattern": "**/Test.xml",
|
||||
"systemId": "file:///Users/pfic/Downloads/IMEX.xsd"
|
||||
},
|
||||
{
|
||||
"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"]
|
||||
}
|
||||
59
Dockerfile
59
Dockerfile
@@ -1,59 +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
|
||||
CMD ["nodemon", "--legacy-watch", "--inspect=0.0.0.0:9229", "server.js"]
|
||||
21
README.MD
21
README.MD
@@ -1,14 +1,21 @@
|
||||
Yarn Dependency Management:
|
||||
To force upgrades for some packages:
|
||||
yarn upgrade-interactive --latest
|
||||
|
||||
To Start Hasura CLI:
|
||||
npx hasura console
|
||||
|
||||
Migrating to Staging:
|
||||
npx hasura migrate apply --endpoint https://db.imex.online/ --admin-secret 'Production-ImEXOnline!@#'
|
||||
npx hasura migrate apply --endpoint https://db.test.bodyshop.app/ --admin-secret 'Test-ImEXOnlineBySnaptSoftware!'
|
||||
|
||||
NGROK TEsting:
|
||||
./ngrok.exe http http://localhost:4000 -host-header="localhost:4000"
|
||||
./ngrok.exe http http://localhost:5000 -host-header="localhost:5000"
|
||||
|
||||
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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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,612 +0,0 @@
|
||||
<?xml 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">
|
||||
<xsl:attribute name="TranslationOutputFile">
|
||||
<xsl:value-of select="@TranslationOutputFile"/>
|
||||
</xsl:attribute>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Details/@PrgID">
|
||||
<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:for-each>
|
||||
<xsl:for-each select="Details/*">
|
||||
<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:attribute>
|
||||
<xsl:attribute name="OwnerFName">
|
||||
<xsl:value-of select="//Admin/@OwnerF"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="OwnerLName">
|
||||
<xsl:value-of select="//Admin/@OwnerL"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="VIN">
|
||||
<xsl:value-of select="//Vehicle/@TransVIN"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Mileage">
|
||||
<xsl:value-of select="//Vehicle/@TransMileage"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Year">
|
||||
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Make">
|
||||
<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:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
<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: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: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:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:apply-templates select="PartsList"/>
|
||||
<xsl:element name="Envelope">
|
||||
<xsl:element name="Software">
|
||||
<xsl:attribute name="Manifest">Audatex.xml</xsl:attribute>
|
||||
<xsl:attribute name="Descriptor">Audatex.xsl</xsl:attribute>
|
||||
<xsl:attribute name="System">
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Version">
|
||||
<xsl:value-of select="//Envelope/@SoftwareVersion"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="SystemName">
|
||||
<xsl:value-of select="//Envelope/@SystemName"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateFileID">
|
||||
<xsl:value-of select="//Envelope/@EstimateFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="UniqueFileID">
|
||||
<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:attribute>
|
||||
<xsl:attribute name="EstimateIDv2">
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-
|
||||
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateFormatVersion">
|
||||
<xsl:value-of select="//Envelope/@EMSVersion"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
<xsl:element name="Totals">
|
||||
<xsl:attribute name="GrandTotalAmount">
|
||||
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Administrative">
|
||||
<xsl:element name="Owner">
|
||||
<xsl:attribute name="FName">
|
||||
<xsl:value-of select="//Admin/@OwnerF"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LName">
|
||||
<xsl:value-of select="//Admin/@OwnerL"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Company">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerCompanyName"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerAddr1"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address2">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerAddr2"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="City">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerCity"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="State">
|
||||
<xsl:value-of select="//Admin/@OwnerState"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Zip">
|
||||
<!--<xsl:choose>
|
||||
<xsl:when test="contains(//Admin/@OwnerZip, '-')">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-before(//Admin/@OwnerZip, '-'))=5">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-after(//Admin/@OwnerZip, '-'))=4">
|
||||
<xsl:value-of select="//Admin/@OwnerZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin/@OwnerZip)=9">
|
||||
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@OwnerZip, 6, 4)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin/@OwnerZip)>4">
|
||||
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Country">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerCountry"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Phone">
|
||||
<!--<xsl:choose>
|
||||
<xsl:when test="//Admin/@OwnerPhone1Ext[. != '']">
|
||||
<xsl:value-of select="//Admin/@OwnerPhone1"/> x<xsl:value-of select="//Admin/@OwnerPhone1Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@OwnerPhone1"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Phone2">
|
||||
<!--<xsl:choose>
|
||||
<xsl:when test="//Admin/@OwnerPhone2Ext[. != '']">
|
||||
<xsl:value-of select="//Admin/@OwnerPhone2"/> x<xsl:value-of select="//Admin/@OwnerPhone2Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@OwnerPhone2"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Fax">
|
||||
<!--<xsl:choose>
|
||||
<xsl:when test="//Admin/@OwnerFaxExt[. != '']">
|
||||
<xsl:value-of select="//Admin/@OwnerFax"/> x<xsl:value-of select="//Admin/@OwnerFaxExt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@OwnerFax"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Email">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerEmail"/>-->
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="InsuranceCompany">
|
||||
<xsl:attribute name="Id">
|
||||
<xsl:value-of select="//Admin/@InsuranceCompanyID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Name">
|
||||
<xsl:value-of select="//Admin/@InsuranceCompanyName"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address">
|
||||
<xsl:value-of select="//Admin/@InsuranceAddr1"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address2">
|
||||
<xsl:value-of select="//Admin/@InsuranceAddr2"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="City">
|
||||
<xsl:value-of select="//Admin/@InsuranceCity"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="State">
|
||||
<xsl:value-of select="//Admin/@InsuranceState"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Zip">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(//Admin/@InsuranceZip, '-')">
|
||||
<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:value-of select="//Admin/@InsuranceZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</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:when>
|
||||
<xsl:when test="string-length(//Admin/@InsuranceZip)>4">
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Country">
|
||||
<xsl:value-of select="//Admin/@InsuranceCountry"/>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsuranceFax"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Email">
|
||||
<xsl:value-of select="//Admin/@InsuranceEmail"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Insured">
|
||||
<xsl:attribute name="LastName">
|
||||
<xsl:value-of select="//Admin/@InsuranceLName"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Claim">
|
||||
<xsl:attribute name="Number">
|
||||
<xsl:value-of select="//Admin/@ClaimNumber"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Estimator">
|
||||
<xsl:attribute name="FName">
|
||||
<xsl:value-of select="//Admin2/@EstimatorF"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LName">
|
||||
<xsl:value-of select="//Admin2/@EstimatorL"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Company">
|
||||
<xsl:value-of select="//Admin2/@EstimatorCompanyName"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="BodyShopCity">
|
||||
<xsl:value-of select="//Admin2/@BodyShopCity"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="BodyShopName">
|
||||
<xsl:value-of select="//Admin2/@BodyShopName"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address">
|
||||
<xsl:value-of select="//Admin2/@EstimatorAddr1"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address2">
|
||||
<xsl:value-of select="//Admin2/@EstimatorAddr2"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="City">
|
||||
<xsl:value-of select="//Admin2/@EstimatorCity"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="State">
|
||||
<xsl:value-of select="//Admin2/@EstimatorState"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Zip">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(//Admin2/@EstimatorZip, '-')">
|
||||
<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:value-of select="//Admin2/@EstimatorZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</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:when>
|
||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)>4">
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Country">
|
||||
<xsl:value-of select="//Admin2/@EstimatorCountry"/>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorFax"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Email">
|
||||
<xsl:value-of select="//Admin2/@EstimatorEmail"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="RepairInformation">
|
||||
<xsl:attribute name="VehicleDateIn">
|
||||
<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:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimatedVehicleDateOut">
|
||||
<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:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="VehicleDateOut">
|
||||
<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:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
<xsl:template match="PartsList">
|
||||
<xsl:element name="PartsList">
|
||||
<xsl:for-each select="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:if>
|
||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
|
||||
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="AltPartNumber">
|
||||
<xsl:value-of select="@AltPartNum"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="PrimaryPartType">
|
||||
<xsl:value-of select="@PartType"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="PrimaryPartNumber">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType='PAN' or @PartType='PAG'">
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType!='PAN' and @PartType!='PAG'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$AltPartNumber!=''">
|
||||
<xsl:value-of select="$AltPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$OEMPartNumber!=''">
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>Salvage or Assembly</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="SecondaryPartNumber">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType!='PAN'">
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="SecondaryPartType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType='PAA'">PAN</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:attribute name="TDPartNum">
|
||||
<xsl:value-of select="$PrimaryPartNumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="AltPartNum">
|
||||
<xsl:value-of select="$SecondaryPartNumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="ExternalPartType">
|
||||
<xsl:value-of select="$PrimaryPartType"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="ExternalAltPartType">
|
||||
<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:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="AltPartType">
|
||||
<xsl:choose>
|
||||
<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:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="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:when>
|
||||
<xsl:when test="@PartType='PAM'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAA'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAL'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartQty">
|
||||
<xsl:value-of select="@TDPartQty"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LineNumber">
|
||||
<xsl:value-of select="@LineNumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="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:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LaborType">
|
||||
<xsl:value-of select="@LaborType"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LaborHours">
|
||||
<xsl:value-of select="@LaborHours"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="OperationCode">
|
||||
<xsl:value-of select="@LaborOp"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="PriceIncluded">
|
||||
<xsl:value-of select="@PriceIncluded"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="MarkUp">
|
||||
<xsl:value-of select="@MarkUp"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="CLPart">
|
||||
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
|
||||
<!-- CLPart is false if PartType is not 'PAN','PAP','PAL','PAG', 'PAM', or 'PAA', or 'PAC' or 'PATR' -->
|
||||
<!-- CLPart is false if LaborCode is only labor -->
|
||||
<!-- CLPart is false if OpCode is not "Remove/Replace" or "Remove/Replace Partial" -->
|
||||
<!-- 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: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:choose>
|
||||
<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 -->
|
||||
<xsl:when test="@LaborOp='OP1'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP2'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP3'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP4'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP5'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP6'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP7'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP8'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP9'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP10'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP13'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP14'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP15'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP16'">False</xsl:when>
|
||||
<xsl:otherwise>True</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>False</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>False</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
@@ -1,226 +0,0 @@
|
||||
<?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">
|
||||
<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"/>
|
||||
</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="LBR_OP" Form="attribute" Name="LaborOp" FieldType="" Description="Labor Op"/>
|
||||
<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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
|
||||
</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"/>
|
||||
</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>
|
||||
</FileTranslation>
|
||||
</FileTranslations>
|
||||
<StyleSheetTranslation>
|
||||
<StyleSheetURL>Audatex.xsl</StyleSheetURL>
|
||||
</StyleSheetTranslation>
|
||||
</TranslationDescriptor>
|
||||
@@ -1,626 +0,0 @@
|
||||
<?xml 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">
|
||||
<xsl:attribute name="TranslationOutputFile">
|
||||
<xsl:value-of select="@TranslationOutputFile"/>
|
||||
</xsl:attribute>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Details/@PrgID">
|
||||
<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:for-each>
|
||||
<xsl:for-each select="Details/*">
|
||||
<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:attribute>
|
||||
<xsl:attribute name="OwnerFName">
|
||||
<xsl:value-of select="//Admin/@OwnerF"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="OwnerLName">
|
||||
<xsl:value-of select="//Admin/@OwnerL"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="VIN">
|
||||
<xsl:value-of select="//Vehicle/@TransVIN"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Mileage">
|
||||
<xsl:value-of select="//Vehicle/@TransMileage"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Year">
|
||||
<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>
|
||||
<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: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: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:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:apply-templates select="PartsList"/>
|
||||
<xsl:element name="Envelope">
|
||||
<xsl:element name="Software">
|
||||
<xsl:attribute name="Manifest">CCC.xml</xsl:attribute>
|
||||
<xsl:attribute name="Descriptor">CCC.xsl</xsl:attribute>
|
||||
<xsl:attribute name="System">
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Version">
|
||||
<xsl:value-of select="//Envelope/@SoftwareVersion"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="SystemName">
|
||||
<xsl:value-of select="//Envelope/@SystemName"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateFileID">
|
||||
<xsl:value-of select="//Envelope/@EstimateFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="UniqueFileID">
|
||||
<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:attribute>
|
||||
<xsl:attribute name="EstimateIDv2">
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-
|
||||
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateFormatVersion">
|
||||
<xsl:value-of select="//Envelope/@EMSVersion"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
<xsl:element name="Totals">
|
||||
<xsl:attribute name="GrandTotalAmount">
|
||||
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Administrative">
|
||||
<xsl:element name="Owner">
|
||||
<xsl:attribute name="FName">
|
||||
<xsl:value-of select="//Admin/@OwnerF"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LName">
|
||||
<xsl:value-of select="//Admin/@OwnerL"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Company">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerCompanyName"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerAddr1"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address2">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerAddr2"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="City">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerCity"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="State">
|
||||
<xsl:value-of select="//Admin/@OwnerState"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Zip">
|
||||
<!--<xsl:choose>
|
||||
<xsl:when test="contains(//Admin/@OwnerZip, '-')">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-before(//Admin/@OwnerZip, '-'))=5">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-after(//Admin/@OwnerZip, '-'))=4">
|
||||
<xsl:value-of select="//Admin/@OwnerZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin/@OwnerZip)=9">
|
||||
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@OwnerZip, 6, 4)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin/@OwnerZip)>4">
|
||||
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Country">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerCountry"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Phone">
|
||||
<!--<xsl:choose>
|
||||
<xsl:when test="//Admin/@OwnerPhone1Ext[. != '']">
|
||||
<xsl:value-of select="//Admin/@OwnerPhone1"/> x<xsl:value-of select="//Admin/@OwnerPhone1Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@OwnerPhone1"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Phone2">
|
||||
<!--<xsl:choose>
|
||||
<xsl:when test="//Admin/@OwnerPhone2Ext[. != '']">
|
||||
<xsl:value-of select="//Admin/@OwnerPhone2"/> x<xsl:value-of select="//Admin/@OwnerPhone2Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@OwnerPhone2"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Fax">
|
||||
<!--<xsl:choose>
|
||||
<xsl:when test="//Admin/@OwnerFaxExt[. != '']">
|
||||
<xsl:value-of select="//Admin/@OwnerFax"/> x<xsl:value-of select="//Admin/@OwnerFaxExt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@OwnerFax"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Email">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerEmail"/>-->
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="InsuranceCompany">
|
||||
<xsl:attribute name="Id">
|
||||
<xsl:value-of select="//Admin/@InsuranceCompanyID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Name">
|
||||
<xsl:value-of select="//Admin/@InsuranceCompanyName"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address">
|
||||
<xsl:value-of select="//Admin/@InsuranceAddr1"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address2">
|
||||
<xsl:value-of select="//Admin/@InsuranceAddr2"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="City">
|
||||
<xsl:value-of select="//Admin/@InsuranceCity"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="State">
|
||||
<xsl:value-of select="//Admin/@InsuranceState"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Zip">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(//Admin/@InsuranceZip, '-')">
|
||||
<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:value-of select="//Admin/@InsuranceZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</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:when>
|
||||
<xsl:when test="string-length(//Admin/@InsuranceZip)>4">
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Country">
|
||||
<xsl:value-of select="//Admin/@InsuranceCountry"/>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsuranceFax"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Email">
|
||||
<xsl:value-of select="//Admin/@InsuranceEmail"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Insured">
|
||||
<xsl:attribute name="LastName">
|
||||
<xsl:value-of select="//Admin/@InsuranceLName"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Claim">
|
||||
<xsl:attribute name="Number">
|
||||
<xsl:value-of select="//Admin/@ClaimNumber"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Estimator">
|
||||
<xsl:attribute name="FName">
|
||||
<xsl:value-of select="//Admin2/@EstimatorF"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LName">
|
||||
<xsl:value-of select="//Admin2/@EstimatorL"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Company">
|
||||
<xsl:value-of select="//Admin2/@EstimatorCompanyName"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address">
|
||||
<xsl:value-of select="//Admin2/@EstimatorAddr1"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address2">
|
||||
<xsl:value-of select="//Admin2/@EstimatorAddr2"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="City">
|
||||
<xsl:value-of select="//Admin2/@EstimatorCity"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="State">
|
||||
<xsl:value-of select="//Admin2/@EstimatorState"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Zip">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(//Admin2/@EstimatorZip, '-')">
|
||||
<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:value-of select="//Admin2/@EstimatorZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</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:when>
|
||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)>4">
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Country">
|
||||
<xsl:value-of select="//Admin2/@EstimatorCountry"/>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorFax"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Email">
|
||||
<xsl:value-of select="//Admin2/@EstimatorEmail"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="RepairInformation">
|
||||
<xsl:attribute name="VehicleDateIn">
|
||||
<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:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimatedVehicleDateOut">
|
||||
<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:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="VehicleDateOut">
|
||||
<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:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
<xsl:template match="PartsList">
|
||||
<xsl:element name="PartsList">
|
||||
<xsl:for-each select="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:if>
|
||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
|
||||
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="AltPartNumber">
|
||||
<xsl:value-of select="@AltPartNum"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="PrimaryPartType">
|
||||
<!-- RoseP modified to convert PAP to PAN -->
|
||||
<!--<xsl:value-of select="@PartType"/>-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType='PAP'">PAN</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@PartType"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="PrimaryPartNumber">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType='PAN'">
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAA'">
|
||||
<xsl:value-of select="$AltPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAL'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$AltPartNumber!=''">
|
||||
<xsl:value-of select="$AltPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$OEMPartNumber!=''">
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>Salvage or Assembly</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAG'">
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:when>
|
||||
<!-- RoseP added Dec 08, 06 -->
|
||||
<xsl:when test="@PartType='PAP'">
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAM'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$AltPartNumber!=''">
|
||||
<xsl:value-of select="$AltPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="SecondaryPartNumber">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType='PAA'">
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAM'">
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="SecondaryPartType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType='PAA'">PAN</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:attribute name="TDPartNum">
|
||||
<xsl:value-of select="$PrimaryPartNumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="AltPartNum">
|
||||
<xsl:value-of select="$SecondaryPartNumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="ExternalPartType">
|
||||
<xsl:value-of select="$PrimaryPartType"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="ExternalAltPartType">
|
||||
<xsl:value-of select="$SecondaryPartType"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$PrimaryPartType='PAN'">1</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAA'">2</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAL'">3</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAM'">4</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAR'">4</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="AltPartType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$SecondaryPartType='PAN'">1</xsl:when>
|
||||
<xsl:when test="$SecondaryPartType='PAA'">2</xsl:when>
|
||||
<xsl:when test="$SecondaryPartType='PAL'">3</xsl:when>
|
||||
<xsl:when test="$SecondaryPartType='PAM'">4</xsl:when>
|
||||
<xsl:when test="$SecondaryPartType='PAR'">4</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartDesc">
|
||||
<xsl:value-of select="@TDPartDesc"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="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:when>
|
||||
<xsl:when test="@PartType='PAM'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAA'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAL'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartQty">
|
||||
<xsl:value-of select="@TDPartQty"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LineNumber">
|
||||
<xsl:value-of select="@LineNumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="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:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LaborType">
|
||||
<xsl:value-of select="@LaborType"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LaborHours">
|
||||
<xsl:value-of select="@LaborHours"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="OperationCode">
|
||||
<xsl:value-of select="@LaborOp"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="CLPart">
|
||||
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
|
||||
<!-- CLPart is false if PartType is not 'PAN','PAP','PAL','PAG', 'PAM', 'PAA', 'PAO', 'PAR', or '' -->
|
||||
<!-- CLPart is false if LaborCode is only labor -->
|
||||
<!-- CLPart is false if OpCode is not "Remove/Replace" or "Remove/Replace Partial" or "Repair, Partial" -->
|
||||
<xsl:choose>
|
||||
<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=''">
|
||||
<!-- 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:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@LaborOp=''">False</xsl:when>
|
||||
<!--Needed for Blank Part Type-->
|
||||
<xsl:when test="@LaborOp='OP0'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP1'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP2'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP3'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP4'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP5'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP6'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP7'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP8'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP9'">False</xsl:when>
|
||||
<!-- RoseP removed OP10 Dec 08, 06 -->
|
||||
<!-- <xsl:when test="@LaborOp='OP10'">False</xsl:when> -->
|
||||
<xsl:when test="@LaborOp='OP13'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP14'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP15'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP16'">False</xsl:when>
|
||||
<xsl:otherwise>True</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>False</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>False</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
@@ -1,220 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TranslationDescriptor>
|
||||
<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"/>
|
||||
</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="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="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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
|
||||
|
||||
</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"/>
|
||||
</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>
|
||||
</FileTranslation>
|
||||
</FileTranslations>
|
||||
<StyleSheetTranslation>
|
||||
<StyleSheetURL>ccc.xsl</StyleSheetURL>
|
||||
</StyleSheetTranslation>
|
||||
</TranslationDescriptor>
|
||||
@@ -1,600 +0,0 @@
|
||||
<?xml 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">
|
||||
<xsl:attribute name="TranslationOutputFile">
|
||||
<xsl:value-of select="@TranslationOutputFile"/>
|
||||
</xsl:attribute>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Details/@PrgID">
|
||||
<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:for-each>
|
||||
<xsl:for-each select="Details/*">
|
||||
<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:attribute>
|
||||
<xsl:attribute name="OwnerFName">
|
||||
<xsl:value-of select="//Admin/@OwnerF"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="OwnerLName">
|
||||
<xsl:value-of select="//Admin/@OwnerL"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="VIN">
|
||||
<xsl:value-of select="//Vehicle/@TransVIN"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Mileage">
|
||||
<xsl:value-of select="//Vehicle/@TransMileage"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Year">
|
||||
<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>
|
||||
<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: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:attribute>
|
||||
<xsl:attribute name="LastSupplLevel">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(//Envelope/@SupplementNum) > 0">
|
||||
<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:element name="Envelope">
|
||||
<xsl:element name="Software">
|
||||
<xsl:attribute name="Manifest">Mitchell.xml</xsl:attribute>
|
||||
<xsl:attribute name="Descriptor">Mitchell.xsl</xsl:attribute>
|
||||
<xsl:attribute name="System">
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Version">
|
||||
<xsl:value-of select="//Envelope/@SoftwareVersion"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="SystemName">
|
||||
<xsl:value-of select="//Envelope/@SystemName"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateFileID">
|
||||
<xsl:value-of select="//Envelope/@EstimateFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="UniqueFileID">
|
||||
<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:attribute>
|
||||
<xsl:attribute name="EstimateIDv2">
|
||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-
|
||||
<xsl:value-of select="//Envelope/@EstimateFileID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimateFormatVersion">
|
||||
<xsl:value-of select="//Envelope/@EMSVersion"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
<xsl:element name="Totals">
|
||||
<xsl:attribute name="GrandTotalAmount">
|
||||
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Administrative">
|
||||
<xsl:element name="Owner">
|
||||
<xsl:attribute name="FName">
|
||||
<xsl:value-of select="//Admin/@OwnerF"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LName">
|
||||
<xsl:value-of select="//Admin/@OwnerL"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Company">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerCompanyName"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerAddr1"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address2">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerAddr2"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="City">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerCity"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="State">
|
||||
<xsl:value-of select="//Admin/@OwnerState"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Zip">
|
||||
<!--<xsl:choose>
|
||||
<xsl:when test="contains(//Admin/@OwnerZip, '-')">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-before(//Admin/@OwnerZip, '-'))=5">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-after(//Admin/@OwnerZip, '-'))=4">
|
||||
<xsl:value-of select="//Admin/@OwnerZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin/@OwnerZip)=9">
|
||||
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@OwnerZip, 6, 4)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="string-length(//Admin/@OwnerZip)>4">
|
||||
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Country">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerCountry"/>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Phone">
|
||||
<!--<xsl:choose>
|
||||
<xsl:when test="//Admin/@OwnerPhone1Ext[. != '']">
|
||||
<xsl:value-of select="//Admin/@OwnerPhone1"/> x<xsl:value-of select="//Admin/@OwnerPhone1Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@OwnerPhone1"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Phone2">
|
||||
<!--<xsl:choose>
|
||||
<xsl:when test="//Admin/@OwnerPhone2Ext[. != '']">
|
||||
<xsl:value-of select="//Admin/@OwnerPhone2"/> x<xsl:value-of select="//Admin/@OwnerPhone2Ext"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@OwnerPhone2"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Fax">
|
||||
<!--<xsl:choose>
|
||||
<xsl:when test="//Admin/@OwnerFaxExt[. != '']">
|
||||
<xsl:value-of select="//Admin/@OwnerFax"/> x<xsl:value-of select="//Admin/@OwnerFaxExt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@OwnerFax"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>-->
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Email">
|
||||
<!--<xsl:value-of select="//Admin/@OwnerEmail"/>-->
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="InsuranceCompany">
|
||||
<xsl:attribute name="Id">
|
||||
<xsl:value-of select="//Admin/@InsuranceCompanyID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Name">
|
||||
<xsl:value-of select="//Admin/@InsuranceCompanyName"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address">
|
||||
<xsl:value-of select="//Admin/@InsuranceAddr1"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address2">
|
||||
<xsl:value-of select="//Admin/@InsuranceAddr2"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="City">
|
||||
<xsl:value-of select="//Admin/@InsuranceCity"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="State">
|
||||
<xsl:value-of select="//Admin/@InsuranceState"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Zip">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(//Admin/@InsuranceZip, '-')">
|
||||
<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:value-of select="//Admin/@InsuranceZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</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:when>
|
||||
<xsl:when test="string-length(//Admin/@InsuranceZip)>4">
|
||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Country">
|
||||
<xsl:value-of select="//Admin/@InsuranceCountry"/>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone1"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsurancePhone2"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin/@InsuranceFax"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Email">
|
||||
<xsl:value-of select="//Admin/@InsuranceEmail"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Insured">
|
||||
<xsl:attribute name="LastName">
|
||||
<xsl:value-of select="//Admin/@InsuranceLName"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Claim">
|
||||
<xsl:attribute name="Number">
|
||||
<xsl:value-of select="//Admin/@ClaimNumber"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="Estimator">
|
||||
<xsl:attribute name="FName">
|
||||
<xsl:value-of select="//Admin2/@EstimatorF"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LName">
|
||||
<xsl:value-of select="//Admin2/@EstimatorL"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Company">
|
||||
<xsl:value-of select="//Admin2/@EstimatorCompanyName"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="BodyShopName">
|
||||
<xsl:value-of select="//Admin2/@BodyShopName"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address">
|
||||
<xsl:value-of select="//Admin2/@EstimatorAddr1"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Address2">
|
||||
<xsl:value-of select="//Admin2/@EstimatorAddr2"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="City">
|
||||
<xsl:value-of select="//Admin2/@EstimatorCity"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="State">
|
||||
<xsl:value-of select="//Admin2/@EstimatorState"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Zip">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(//Admin2/@EstimatorZip, '-')">
|
||||
<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:value-of select="//Admin2/@EstimatorZip"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</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:when>
|
||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)>4">
|
||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Country">
|
||||
<xsl:value-of select="//Admin2/@EstimatorCountry"/>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<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:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="//Admin2/@EstimatorFax"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Email">
|
||||
<xsl:value-of select="//Admin2/@EstimatorEmail"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:element name="RepairInformation">
|
||||
<xsl:attribute name="VehicleDateIn">
|
||||
<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:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="EstimatedVehicleDateOut">
|
||||
<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:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="VehicleDateOut">
|
||||
<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:if>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
<xsl:template match="PartsList">
|
||||
<xsl:element name="PartsList">
|
||||
<xsl:for-each select="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:if>
|
||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
|
||||
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="AltPartNumber">
|
||||
<xsl:value-of select="@AltPartNum"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="PrimaryPartType">
|
||||
<xsl:value-of select="@PartType"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="PrimaryPartNumber">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType='PAN'">
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType!='PAN'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$AltPartNumber!=''">
|
||||
<xsl:value-of select="$AltPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$OEMPartNumber!=''">
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>Salvage or Assembly</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="SecondaryPartNumber">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType!='PAN'">
|
||||
<xsl:value-of select="$OEMPartNumber"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="SecondaryPartType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@PartType='PAA'">PAN</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:attribute name="TDPartNum">
|
||||
<xsl:value-of select="$PrimaryPartNumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="AltPartNum">
|
||||
<xsl:value-of select="$SecondaryPartNumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="ExternalPartType">
|
||||
<xsl:value-of select="$PrimaryPartType"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="ExternalAltPartType">
|
||||
<xsl:value-of select="$SecondaryPartType"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$PrimaryPartType='PAN'">1</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAA'">2</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAL'">3</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAM'">4</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAR'">4</xsl:when>
|
||||
<xsl:when test="$PrimaryPartType='PAC'">4</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="AltPartType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$SecondaryPartType='PAN'">1</xsl:when>
|
||||
<xsl:when test="$SecondaryPartType='PAA'">2</xsl:when>
|
||||
<xsl:when test="$SecondaryPartType='PAL'">3</xsl:when>
|
||||
<xsl:when test="$SecondaryPartType='PAM'">4</xsl:when>
|
||||
<xsl:when test="$SecondaryPartType='PAC'">4</xsl:when>
|
||||
<xsl:when test="$SecondaryPartType='PAR'">4</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="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:when>
|
||||
<xsl:when test="@PartType='PAM'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAA'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@PartType='PAL'">
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="@ActPrice"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="TDPartQty">
|
||||
<xsl:value-of select="@TDPartQty"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LineNumber">
|
||||
<xsl:value-of select="@LineNumber"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="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:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LaborType">
|
||||
<xsl:value-of select="@LaborType"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="LaborHours">
|
||||
<xsl:value-of select="@LaborHours"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="OperationCode">
|
||||
<xsl:value-of select="@LaborOp"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="GlassFlag">
|
||||
<xsl:value-of select="@GlassFlag"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="MarkUp">
|
||||
<xsl:value-of select="@MarkUp"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="CLPart">
|
||||
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
|
||||
<!-- CLPart is false if PartType is not 'PAN','PAP','PAL','PAG', 'PAM', or 'PAA' or 'PAC' or 'PAR' -->
|
||||
<!-- CLPart is false if LaborCode is only labor -->
|
||||
<!-- CLPart is false if OpCode is not "Remove/Replace" or "Remove/Replace Partial" -->
|
||||
<xsl:choose>
|
||||
<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:choose>
|
||||
<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>
|
||||
<xsl:when test="@LaborOp='OP1'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP2'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP3'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP4'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP5'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP6'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP7'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP8'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP9'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP10'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP13'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP14'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP15'">False</xsl:when>
|
||||
<xsl:when test="@LaborOp='OP16'">False</xsl:when>
|
||||
<xsl:otherwise>True</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>False</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>False</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
@@ -1,225 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TranslationDescriptor>
|
||||
<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"/>
|
||||
</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="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="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"/>
|
||||
</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"/>
|
||||
</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"/>
|
||||
|
||||
|
||||
</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"/>
|
||||
|
||||
</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>
|
||||
</FileTranslation>
|
||||
</FileTranslations>
|
||||
<StyleSheetTranslation>
|
||||
<StyleSheetURL>Mitchell.xsl</StyleSheetURL>
|
||||
</StyleSheetTranslation>
|
||||
</TranslationDescriptor>
|
||||
24
_reference/SampleMetadata.md
Normal file
24
_reference/SampleMetadata.md
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,116 +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">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}`);
|
||||
});
|
||||
1214
_reference/localEmailViewer/package-lock.json
generated
1214
_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": "^4.21.1",
|
||||
"mailparser": "^3.7.1",
|
||||
"node-fetch": "^3.3.2"
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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"
|
||||
},
|
||||
@@ -22,7 +22,7 @@ hooks.js:
|
||||
module.exports = [
|
||||
{
|
||||
path: "/pull",
|
||||
command: "git pull && yarn && pm2 restart 0",
|
||||
command: "git pull && npm i",
|
||||
cwd: "/home/ubuntu/io/",
|
||||
method: "post",
|
||||
},
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
68
admin/README.md
Normal file
68
admin/README.md
Normal file
@@ -0,0 +1,68 @@
|
||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||
|
||||
## Available Scripts
|
||||
|
||||
In the project directory, you can run:
|
||||
|
||||
### `yarn start`
|
||||
|
||||
Runs the app in the development mode.<br />
|
||||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
||||
|
||||
The page will reload if you make edits.<br />
|
||||
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.
|
||||
|
||||
### `yarn build`
|
||||
|
||||
Builds the app for production to the `build` folder.<br />
|
||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||
|
||||
The build is minified and the filenames include the hashes.<br />
|
||||
Your app is ready to be deployed!
|
||||
|
||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||
|
||||
### `yarn eject`
|
||||
|
||||
**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.
|
||||
|
||||
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.
|
||||
|
||||
## Learn More
|
||||
|
||||
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/).
|
||||
|
||||
### Code Splitting
|
||||
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
|
||||
|
||||
### Analyzing the Bundle Size
|
||||
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
|
||||
|
||||
### Making a Progressive Web App
|
||||
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
|
||||
|
||||
### Advanced Configuration
|
||||
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
|
||||
|
||||
### Deployment
|
||||
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
|
||||
|
||||
### `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
|
||||
18103
admin/package-lock.json
generated
Normal file
18103
admin/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
47
admin/package.json
Normal file
47
admin/package.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "admin",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.3.15",
|
||||
"@testing-library/jest-dom": "^5.11.10",
|
||||
"@testing-library/react": "^11.2.6",
|
||||
"@testing-library/user-event": "^13.1.5",
|
||||
"@types/prop-types": "^15.7.3",
|
||||
"apollo-boost": "^0.4.9",
|
||||
"apollo-link-context": "^1.0.20",
|
||||
"apollo-link-logger": "^2.0.0",
|
||||
"dotenv": "^8.2.0",
|
||||
"firebase": "^8.4.1",
|
||||
"graphql": "^15.4.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"ra-data-hasura-graphql": "^0.1.13",
|
||||
"react": "^17.0.1",
|
||||
"react-admin": "^3.14.4",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-icons": "^4.2.0",
|
||||
"react-scripts": "4.0.3",
|
||||
"sass": "^1.32.10"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "set PORT=3001 && react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
}
|
||||
}
|
||||
BIN
admin/public/favicon.ico
Normal file
BIN
admin/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
43
admin/public/index.html
Normal file
43
admin/public/index.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Web site created using create-react-app"
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is installed on a
|
||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>ImEX Online - ADMIN</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
BIN
admin/public/logo192.png
Normal file
BIN
admin/public/logo192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
BIN
admin/public/logo512.png
Normal file
BIN
admin/public/logo512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
25
admin/public/manifest.json
Normal file
25
admin/public/manifest.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "logo192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
||||
3
admin/public/robots.txt
Normal file
3
admin/public/robots.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Disallow:
|
||||
38
admin/src/App/App.css
Normal file
38
admin/src/App/App.css
Normal file
@@ -0,0 +1,38 @@
|
||||
.App {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.App-logo {
|
||||
height: 40vmin;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.App-logo {
|
||||
animation: App-logo-spin infinite 20s linear;
|
||||
}
|
||||
}
|
||||
|
||||
.App-header {
|
||||
background-color: #282c34;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: calc(10px + 2vmin);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.App-link {
|
||||
color: #61dafb;
|
||||
}
|
||||
|
||||
@keyframes App-logo-spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
12
admin/src/App/App.js
Normal file
12
admin/src/App/App.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import React from "react";
|
||||
import AdminRoot from "../components/admin-root/admin-root.component";
|
||||
import "./App.css";
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<AdminRoot />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
9
admin/src/App/App.test.js
Normal file
9
admin/src/App/App.test.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import React from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import App from './App';
|
||||
|
||||
test('renders learn react link', () => {
|
||||
const { getByText } = render(<App />);
|
||||
const linkElement = getByText(/learn react/i);
|
||||
expect(linkElement).toBeInTheDocument();
|
||||
});
|
||||
7
admin/src/Assets/logo.svg
Normal file
7
admin/src/Assets/logo.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3">
|
||||
<g fill="#61DAFB">
|
||||
<path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/>
|
||||
<circle cx="420.9" cy="296.5" r="45.7"/>
|
||||
<path d="M520.5 78.1z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
283
admin/src/components/admin-root/admin-root.component.jsx
Normal file
283
admin/src/components/admin-root/admin-root.component.jsx
Normal file
@@ -0,0 +1,283 @@
|
||||
import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client";
|
||||
import { ApolloLink } from "apollo-boost";
|
||||
import { setContext } from "apollo-link-context";
|
||||
import { HttpLink } from "apollo-link-http";
|
||||
import apolloLogger from "apollo-link-logger";
|
||||
import buildHasuraProvider from "ra-data-hasura-graphql";
|
||||
import React, { Component } from "react";
|
||||
import {
|
||||
Admin,
|
||||
EditGuesser,
|
||||
ListGuesser,
|
||||
Resource,
|
||||
ShowGuesser,
|
||||
} from "react-admin";
|
||||
import { FaFileInvoiceDollar } from "react-icons/fa";
|
||||
import CircularProgress from "@material-ui/core/CircularProgress";
|
||||
import { auth } from "../../firebase/admin-firebase-utils";
|
||||
import authProvider from "../auth-provider/auth-provider";
|
||||
import JoblinesCreate from "../joblines/joblines.create";
|
||||
import JoblinesEdit from "../joblines/joblines.edit";
|
||||
import JoblinesList from "../joblines/joblines.list";
|
||||
import JoblinesShow from "../joblines/joblines.show";
|
||||
import JobsCreate from "../jobs/jobs.create";
|
||||
import JobsEdit from "../jobs/jobs.edit";
|
||||
import JobsList from "../jobs/jobs.list";
|
||||
import JobsShow from "../jobs/jobs.show";
|
||||
|
||||
const httpLink = new HttpLink({
|
||||
uri: process.env.REACT_APP_GRAPHQL_ENDPOINT,
|
||||
headers: {
|
||||
"x-hasura-admin-secret": `Dev-BodyShopAppBySnaptSoftware!`,
|
||||
// 'Authorization': `Bearer xxxx`,
|
||||
},
|
||||
});
|
||||
|
||||
const authLink = setContext((_, { headers }) => {
|
||||
return (
|
||||
auth.currentUser &&
|
||||
auth.currentUser.getIdToken().then((token) => {
|
||||
if (token) {
|
||||
return {
|
||||
headers: {
|
||||
...headers,
|
||||
authorization: token ? `Bearer ${token}` : "",
|
||||
},
|
||||
};
|
||||
} else {
|
||||
return { headers };
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
const middlewares = [];
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
middlewares.push(apolloLogger);
|
||||
}
|
||||
|
||||
middlewares.push(authLink.concat(httpLink));
|
||||
|
||||
const client = new ApolloClient({
|
||||
link: ApolloLink.from(middlewares),
|
||||
cache: new InMemoryCache(),
|
||||
});
|
||||
|
||||
// const client = new ApolloClient({
|
||||
// uri: process.env.REACT_APP_GRAPHQL_ENDPOINT,
|
||||
// cache: new InMemoryCache(),
|
||||
// headers: {
|
||||
// "x-hasura-admin-secret": `Dev-BodyShopAppBySnaptSoftware!`,
|
||||
// // 'Authorization': `Bearer xxxx`,
|
||||
// },
|
||||
// });
|
||||
|
||||
class AdminRoot extends Component {
|
||||
constructor() {
|
||||
super();
|
||||
this.state = { dataProvider: null };
|
||||
}
|
||||
componentDidMount() {
|
||||
buildHasuraProvider({
|
||||
client,
|
||||
}).then((dataProvider) => this.setState({ dataProvider }));
|
||||
}
|
||||
|
||||
render() {
|
||||
const { dataProvider } = this.state;
|
||||
|
||||
if (!dataProvider) {
|
||||
return (
|
||||
<div>
|
||||
<CircularProgress />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ApolloProvider client={client}>
|
||||
<Admin dataProvider={dataProvider} authProvider={authProvider}>
|
||||
<Resource
|
||||
icon={FaFileInvoiceDollar}
|
||||
name="jobs"
|
||||
list={JobsList}
|
||||
edit={JobsEdit}
|
||||
create={JobsCreate}
|
||||
show={JobsShow}
|
||||
/>
|
||||
<Resource
|
||||
name="joblines"
|
||||
list={JoblinesList}
|
||||
edit={JoblinesEdit}
|
||||
create={JoblinesCreate}
|
||||
show={JoblinesShow}
|
||||
/>
|
||||
<Resource
|
||||
name="bodyshops"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="owners"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="vehicles"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="appointments"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="available_jobs"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="cccontracts"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="conversations"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="counters"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="courtesycars"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="csi"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="csiquestions"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="documents"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="employees"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="invoicelines"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="invoices"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="job_conversations"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="masterdata"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="messages"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="notes"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="parts_order_lines"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="parts_orders"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="payments"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="scoreboard"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="templates"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="timetickets"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="users"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
<Resource
|
||||
name="vendors"
|
||||
list={ListGuesser}
|
||||
edit={EditGuesser}
|
||||
show={ShowGuesser}
|
||||
/>
|
||||
</Admin>
|
||||
</ApolloProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default AdminRoot;
|
||||
39
admin/src/components/auth-provider/auth-provider.js
Normal file
39
admin/src/components/auth-provider/auth-provider.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import { auth, getCurrentUser } from "../../firebase/admin-firebase-utils";
|
||||
|
||||
const authProvider = {
|
||||
login: async ({ username, password }) => {
|
||||
console.log(username, password);
|
||||
try {
|
||||
const { user } = await auth.signInWithEmailAndPassword(
|
||||
username,
|
||||
password
|
||||
);
|
||||
const token = await user.getIdToken();
|
||||
localStorage.setItem("token", token);
|
||||
return Promise.resolve();
|
||||
} catch (error) {
|
||||
console.log("error", error);
|
||||
return Promise.reject();
|
||||
}
|
||||
},
|
||||
logout: async (params) => {
|
||||
await auth.signOut();
|
||||
localStorage.removeItem("token");
|
||||
return Promise.resolve();
|
||||
},
|
||||
checkAuth: async (params) => {
|
||||
const user = await getCurrentUser();
|
||||
if (!!user) {
|
||||
return Promise.resolve();
|
||||
} else {
|
||||
return Promise.reject();
|
||||
}
|
||||
},
|
||||
checkError: (error) => {
|
||||
return Promise.resolve();
|
||||
},
|
||||
getPermissions: (params) => {
|
||||
return Promise.resolve();
|
||||
},
|
||||
};
|
||||
export default authProvider;
|
||||
26
admin/src/components/joblines/joblines.create.jsx
Normal file
26
admin/src/components/joblines/joblines.create.jsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from "react";
|
||||
import {
|
||||
Create,
|
||||
|
||||
|
||||
|
||||
NumberInput, SimpleForm,
|
||||
TextInput
|
||||
} from "react-admin";
|
||||
|
||||
const JoblinesCreate = (props) => (
|
||||
<Create {...props}>
|
||||
<SimpleForm>
|
||||
<TextInput source="line_ref" />
|
||||
<TextInput source="line_ind" />
|
||||
<NumberInput source="db_price" />
|
||||
<NumberInput source="act_price" />
|
||||
<NumberInput source="part_qty" />
|
||||
<NumberInput source="mod_lb_hrs" />
|
||||
<TextInput source="mod_lbr_type" />
|
||||
<TextInput source="lbr_op" />
|
||||
</SimpleForm>
|
||||
</Create>
|
||||
);
|
||||
|
||||
export default JoblinesCreate;
|
||||
70
admin/src/components/joblines/joblines.edit.jsx
Normal file
70
admin/src/components/joblines/joblines.edit.jsx
Normal file
@@ -0,0 +1,70 @@
|
||||
import React from "react";
|
||||
import {
|
||||
BooleanInput,
|
||||
DateField,
|
||||
Edit,
|
||||
NumberInput,
|
||||
SimpleForm,
|
||||
TextInput,
|
||||
} from "react-admin";
|
||||
|
||||
const JoblinesEdit = (props) => (
|
||||
<Edit {...props}>
|
||||
<SimpleForm>
|
||||
<TextInput source="id" />
|
||||
<DateField showTime source="created_at" />
|
||||
<DateField showTime source="updated_at" />
|
||||
<TextInput source="jobid" />
|
||||
<NumberInput source="unq_seq" />
|
||||
<NumberInput source="line_ind" />
|
||||
<TextInput source="line_desc" />
|
||||
<TextInput source="part_type" />
|
||||
<TextInput source="oem_partno" />
|
||||
<TextInput source="est_seq" />
|
||||
<TextInput source="db_ref" />
|
||||
<TextInput source="line_ref" />
|
||||
<BooleanInput source="tax_part" />
|
||||
<NumberInput source="db_price" />
|
||||
<NumberInput source="act_price" />
|
||||
<NumberInput source="part_qty" />
|
||||
<TextInput source="alt_partno" />
|
||||
<TextInput source="mod_lbr_ty" />
|
||||
<NumberInput source="db_hrs" />
|
||||
<NumberInput source="mod_lb_hrs" />
|
||||
<TextInput source="lbr_op" />
|
||||
<NumberInput source="lbr_amt" />
|
||||
<BooleanInput source="glass_flag" />
|
||||
<TextInput source="price_inc" />
|
||||
<TextInput source="alt_part_i" />
|
||||
<TextInput source="price_j" />
|
||||
<TextInput source="cert_part" />
|
||||
<TextInput source="alt_co_id" />
|
||||
<TextInput source="alt_overrd" />
|
||||
<TextInput source="alt_partm" />
|
||||
<TextInput source="prt_dsmk_p" />
|
||||
<TextInput source="prt_dsmk_m" />
|
||||
<TextInput source="lbr_inc" />
|
||||
<TextInput source="lbr_hrs_j" />
|
||||
<TextInput source="lbr_typ_j" />
|
||||
<TextInput source="lbr_op_j" />
|
||||
<TextInput source="paint_stg" />
|
||||
<TextInput source="paint_tone" />
|
||||
<TextInput source="lbr_tax" />
|
||||
<NumberInput source="misc_amt" />
|
||||
<TextInput source="misc_sublt" />
|
||||
<TextInput source="misc_tax" />
|
||||
<TextInput source="bett_type" />
|
||||
<NumberInput source="bett_pctg" />
|
||||
<NumberInput source="bett_amt" />
|
||||
<TextInput source="bett_tax" />
|
||||
<TextInput source="op_code_desc" />
|
||||
<TextInput source="status" />
|
||||
<TextInput source="removed" />
|
||||
<NumberInput source="line_no" />
|
||||
<TextInput source="notes" />
|
||||
<TextInput source='"location"' />
|
||||
</SimpleForm>
|
||||
</Edit>
|
||||
);
|
||||
|
||||
export default JoblinesEdit;
|
||||
29
admin/src/components/joblines/joblines.list.jsx
Normal file
29
admin/src/components/joblines/joblines.list.jsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import React from "react";
|
||||
import {
|
||||
Datagrid, List,
|
||||
|
||||
|
||||
NumberField,
|
||||
|
||||
ReferenceField, TextField
|
||||
} from "react-admin";
|
||||
|
||||
const JoblinesList = (props) => (
|
||||
<List {...props}>
|
||||
<Datagrid rowClick="edit">
|
||||
<ReferenceField source="jobid" reference="jobs">
|
||||
<TextField source="ro_number" />
|
||||
</ReferenceField>
|
||||
<TextField source="line_ref" />
|
||||
<TextField source="line_ind" />
|
||||
<NumberField source="db_price" />
|
||||
<NumberField source="act_price" />
|
||||
<NumberField source="part_qty" />
|
||||
<NumberField source="mod_lb_hrs" />
|
||||
<TextField source="mod_lbr_type" />
|
||||
<TextField source="lbr_op" />
|
||||
</Datagrid>
|
||||
</List>
|
||||
);
|
||||
|
||||
export default JoblinesList;
|
||||
24
admin/src/components/joblines/joblines.show.jsx
Normal file
24
admin/src/components/joblines/joblines.show.jsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import React from "react";
|
||||
import {
|
||||
NumberInput, Show,
|
||||
|
||||
SimpleShowLayout,
|
||||
TextInput
|
||||
} from "react-admin";
|
||||
|
||||
const JoblinesShow = (props) => (
|
||||
<Show {...props}>
|
||||
<SimpleShowLayout>
|
||||
<TextInput source="line_ref" />
|
||||
<TextInput source="line_ind" />
|
||||
<NumberInput source="db_price" />
|
||||
<NumberInput source="act_price" />
|
||||
<NumberInput source="part_qty" />
|
||||
<NumberInput source="mod_lb_hrs" />
|
||||
<TextInput source="mod_lbr_type" />
|
||||
<TextInput source="lbr_op" />
|
||||
</SimpleShowLayout>
|
||||
</Show>
|
||||
);
|
||||
|
||||
export default JoblinesShow;
|
||||
17
admin/src/components/jobs/jobs.create.jsx
Normal file
17
admin/src/components/jobs/jobs.create.jsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import React from "react";
|
||||
import { Create, EmailField, SimpleForm, TextInput } from "react-admin";
|
||||
|
||||
const JobsCreate = (props) => (
|
||||
<Create {...props}>
|
||||
<SimpleForm>
|
||||
<TextInput source="ro_number" />
|
||||
|
||||
<TextInput source="ownr_fn" />
|
||||
<TextInput source="ownr_ln" />
|
||||
<TextInput source="converted" />
|
||||
<EmailField source="ownr_ea" />
|
||||
</SimpleForm>
|
||||
</Create>
|
||||
);
|
||||
|
||||
export default JobsCreate;
|
||||
316
admin/src/components/jobs/jobs.edit.jsx
Normal file
316
admin/src/components/jobs/jobs.edit.jsx
Normal file
@@ -0,0 +1,316 @@
|
||||
import React from "react";
|
||||
//@ts-ignore
|
||||
import {
|
||||
AutocompleteInput,
|
||||
BooleanInput,
|
||||
Edit,
|
||||
FormTab,
|
||||
NumberInput,
|
||||
ReferenceInput,
|
||||
SelectInput,
|
||||
SimpleForm,
|
||||
TabbedForm,
|
||||
TextInput,
|
||||
} from "react-admin";
|
||||
|
||||
const JobsEdit = (props) => (
|
||||
<Edit {...props}>
|
||||
<TabbedForm>
|
||||
<FormTab label="Job Info">
|
||||
<SimpleForm>
|
||||
<ReferenceInput label="Shopid" source="shopid" reference="bodyshops">
|
||||
<SelectInput disabled optionText="shopname" />
|
||||
</ReferenceInput>
|
||||
<TextInput source="ro_number" />
|
||||
<ReferenceInput label="Owner ID" source="ownerid" reference="owners">
|
||||
<AutocompleteInput
|
||||
matchSuggestion={(filter, choice) =>
|
||||
choice.ownr_fn &&
|
||||
choice.ownr_fn.toLowerCase().includes(filter.toLowerCase())
|
||||
}
|
||||
optionText={(record) =>
|
||||
`${record.ownr_fn || ""} ${record.ownr_ln || ""} ${
|
||||
record.ownr_co_nm || ""
|
||||
} (${record.ownr_ph1 || ""})`
|
||||
}
|
||||
/>
|
||||
</ReferenceInput>
|
||||
<ReferenceInput
|
||||
label="Vehicle Id"
|
||||
source="vehicleid"
|
||||
reference="vehicles"
|
||||
>
|
||||
<SelectInput optionText="v_vin" />
|
||||
</ReferenceInput>
|
||||
<ReferenceInput label="Shopid" source="shopid" reference="bodyshops">
|
||||
<SelectInput disabled optionText="shopname" />
|
||||
</ReferenceInput>
|
||||
<TextInput source="ro_number" />
|
||||
<ReferenceInput label="Owner ID" source="ownerid" reference="owners">
|
||||
<AutocompleteInput
|
||||
matchSuggestion={(filter, choice) =>
|
||||
choice.ownr_fn &&
|
||||
choice.ownr_fn.toLowerCase().includes(filter.toLowerCase())
|
||||
}
|
||||
optionText={(record) =>
|
||||
`${record.ownr_fn || ""} ${record.ownr_ln || ""} ${
|
||||
record.ownr_co_nm || ""
|
||||
} (${record.ownr_ph1 || ""})`
|
||||
}
|
||||
/>
|
||||
</ReferenceInput>
|
||||
<ReferenceInput
|
||||
label="Vehicle Id"
|
||||
source="vehicleid"
|
||||
reference="vehicles"
|
||||
>
|
||||
<SelectInput optionText="v_vin" />
|
||||
</ReferenceInput>
|
||||
<BooleanInput source="inproduction" />
|
||||
<BooleanInput source="converted" />
|
||||
<TextInput disabled source="id" />
|
||||
<TextInput disabled source="created_at" />
|
||||
<TextInput disabled source="updated_at" />
|
||||
</SimpleForm>
|
||||
</FormTab>
|
||||
|
||||
<FormTab label="Labor Rates">
|
||||
<NumberInput source="labor_rate_id" />
|
||||
<NumberInput source="labor_rate_desc" />
|
||||
<NumberInput source="rate_lab" />
|
||||
<NumberInput source="rate_lad" />
|
||||
<NumberInput source="rate_lae" />
|
||||
<NumberInput source="rate_lar" />
|
||||
<NumberInput source="rate_las" />
|
||||
<NumberInput source="rate_laf" />
|
||||
<NumberInput source="rate_lam" />
|
||||
<NumberInput source="rate_lag" />
|
||||
<NumberInput source="rate_atp" />
|
||||
<NumberInput source="rate_lau" />
|
||||
<NumberInput source="rate_la1" />
|
||||
<NumberInput source="rate_la2" />
|
||||
<NumberInput source="rate_la3" />
|
||||
<NumberInput source="rate_la4" />
|
||||
<NumberInput source="rate_mapa" />
|
||||
<NumberInput source="rate_mash" />
|
||||
<NumberInput source="rate_mahw" />
|
||||
<NumberInput source="rate_ma2s" />
|
||||
<NumberInput source="rate_ma3s" />
|
||||
<NumberInput source="rate_ma2t" />
|
||||
<NumberInput source="rate_mabl" />
|
||||
<NumberInput source="rate_macs" />
|
||||
<NumberInput source="rate_matd" />
|
||||
<NumberInput source="federal_tax_rate" />
|
||||
<NumberInput source="state_tax_rate" />
|
||||
<NumberInput source="local_tax_rate" />
|
||||
</FormTab>
|
||||
<FormTab label="Dates">
|
||||
<TextInput source="scheduled_in" />
|
||||
<TextInput source="actual_in" />
|
||||
<TextInput source="scheduled_completion" />
|
||||
<TextInput source="actual_completion" />
|
||||
<TextInput source="scheduled_delivery" />
|
||||
<TextInput source="actual_delivery" />
|
||||
<TextInput source="invoice_date" />
|
||||
<TextInput source="date_estimated" />
|
||||
<TextInput source="date_open" />
|
||||
<TextInput source="date_scheduled" />
|
||||
<TextInput source="date_invoiced" />
|
||||
<TextInput source="date_exported" />
|
||||
</FormTab>
|
||||
<FormTab label="Insurance info">
|
||||
<TextInput source="est_co_nm" />
|
||||
<TextInput source="est_addr1" />
|
||||
<TextInput source="est_addr2" />
|
||||
<TextInput source="est_city" />
|
||||
<TextInput source="est_st" />
|
||||
<TextInput source="est_zip" />
|
||||
<TextInput source="est_ctry" />
|
||||
<TextInput source="est_ph1" />
|
||||
<TextInput source="est_ea" />
|
||||
<TextInput source="est_ct_ln" />
|
||||
<TextInput source="est_ct_fn" />
|
||||
<TextInput source="regie_number" />
|
||||
<TextInput source="statusid" />
|
||||
<TextInput source="ins_co_id" />
|
||||
<TextInput source="ins_co_nm" />
|
||||
<TextInput source="ins_addr1" />
|
||||
<TextInput source="ins_addr2" />
|
||||
<TextInput source="ins_city" />
|
||||
<TextInput source="ins_st" />
|
||||
<TextInput source="ins_zip" />
|
||||
<TextInput source="ins_ctry" />
|
||||
<TextInput source="ins_ph1" />
|
||||
<TextInput source="ins_ph1x" />
|
||||
<TextInput source="ins_ph2" />
|
||||
<TextInput source="ins_ph2x" />
|
||||
<TextInput source="ins_fax" />
|
||||
<TextInput source="ins_faxx" />
|
||||
<TextInput source="ins_ct_ln" />
|
||||
<TextInput source="ins_ct_fn" />
|
||||
<TextInput source="ins_title" />
|
||||
<TextInput source="ins_ct_ph" />
|
||||
<TextInput source="ins_ct_phx" />
|
||||
<TextInput source="ins_ea" />
|
||||
<TextInput source="ins_memo" />
|
||||
<TextInput source="policy_no" />
|
||||
<TextInput source="ded_amt" />
|
||||
<TextInput source="ded_status" />
|
||||
<TextInput source="asgn_no" />
|
||||
<TextInput source="asgn_date" />
|
||||
<TextInput source="asgn_type" />
|
||||
<TextInput source="clm_no" />
|
||||
<TextInput source="clm_ofc_id" />
|
||||
<TextInput source="agt_co_id" />
|
||||
<TextInput source="agt_co_nm" />
|
||||
<TextInput source="agt_addr1" />
|
||||
<TextInput source="agt_addr2" />
|
||||
<TextInput source="agt_city" />
|
||||
<TextInput source="agt_st" />
|
||||
<TextInput source="agt_zip" />
|
||||
<TextInput source="agt_ctry" />
|
||||
<TextInput source="agt_ph1" />
|
||||
<TextInput source="agt_ph1x" />
|
||||
<TextInput source="agt_ph2" />
|
||||
<TextInput source="agt_ph2x" />
|
||||
<TextInput source="agt_fax" />
|
||||
<TextInput source="agt_faxx" />
|
||||
<TextInput source="agt_ct_ln" />
|
||||
<TextInput source="agt_ct_fn" />
|
||||
<TextInput source="agt_ct_ph" />
|
||||
<TextInput source="agt_ct_phx" />
|
||||
<TextInput source="agt_ea" />
|
||||
<TextInput source="agt_lic_no" />
|
||||
<TextInput source="loss_type" />
|
||||
<TextInput source="loss_desc" />
|
||||
<TextInput source="theft_ind" />
|
||||
<TextInput source="cat_no" />
|
||||
<TextInput source="tlos_ind" />
|
||||
<TextInput source="ciecaid" />
|
||||
<TextInput source="loss_date" />
|
||||
<TextInput source="clm_ofc_nm" />
|
||||
<TextInput source="clm_addr1" />
|
||||
<TextInput source="clm_addr2" />
|
||||
<TextInput source="clm_city" />
|
||||
<TextInput source="clm_st" />
|
||||
<TextInput source="clm_zip" />
|
||||
<TextInput source="clm_ctry" />
|
||||
<TextInput source="clm_ph1" />
|
||||
<TextInput source="clm_ph1x" />
|
||||
<TextInput source="clm_ph2" />
|
||||
<TextInput source="clm_ph2x" />
|
||||
<TextInput source="clm_fax" />
|
||||
<TextInput source="clm_faxx" />
|
||||
<TextInput source="clm_ct_ln" />
|
||||
<TextInput source="clm_ct_fn" />
|
||||
<TextInput source="clm_title" />
|
||||
<TextInput source="clm_ct_ph" />
|
||||
<TextInput source="clm_ct_phx" />
|
||||
<TextInput source="clm_ea" />
|
||||
<TextInput source="payee_nms" />
|
||||
<TextInput source="pay_type" />
|
||||
<TextInput source="pay_date" />
|
||||
<TextInput source="pay_chknm" />
|
||||
<TextInput source="pay_amt" />
|
||||
</FormTab>
|
||||
<FormTab label="Owner Data on Job">
|
||||
<TextInput source="cust_pr" />
|
||||
<TextInput source="insd_ln" />
|
||||
<TextInput source="insd_fn" />
|
||||
<TextInput source="insd_title" />
|
||||
<TextInput source="insd_co_nm" />
|
||||
<TextInput source="insd_addr1" />
|
||||
<TextInput source="insd_addr2" />
|
||||
<TextInput source="insd_city" />
|
||||
<TextInput source="insd_st" />
|
||||
<TextInput source="insd_zip" />
|
||||
<TextInput source="insd_ctry" />
|
||||
<TextInput source="insd_ph1" />
|
||||
<TextInput source="insd_ph1x" />
|
||||
<TextInput source="insd_ph2" />
|
||||
<TextInput source="insd_ph2x" />
|
||||
<TextInput source="insd_fax" />
|
||||
<TextInput source="insd_faxx" />
|
||||
<TextInput source="insd_ea" />
|
||||
<TextInput source="ownr_ln" />
|
||||
<TextInput source="ownr_fn" />
|
||||
<TextInput source="ownr_title" />
|
||||
<TextInput source="ownr_co_nm" />
|
||||
<TextInput source="ownr_addr1" />
|
||||
<TextInput source="ownr_addr2" />
|
||||
<TextInput source="ownr_city" />
|
||||
<TextInput source="ownr_st" />
|
||||
<TextInput source="ownr_zip" />
|
||||
<TextInput source="ownr_ctry" />
|
||||
<TextInput source="ownr_ph1" />
|
||||
<TextInput source="ownr_ph1x" />
|
||||
<TextInput source="ownr_ph2" />
|
||||
<TextInput source="ownr_ph2x" />
|
||||
<TextInput source="ownr_fax" />
|
||||
<TextInput source="ownr_faxx" />
|
||||
<TextInput source="ownr_ea" />
|
||||
</FormTab>
|
||||
<FormTab label="Financial">
|
||||
<TextInput source="clm_total" />
|
||||
<TextInput source="owner_owing" />
|
||||
</FormTab>
|
||||
<FormTab label="Other">
|
||||
<TextInput source="area_of_damage" />
|
||||
<TextInput source="loss_cat" />
|
||||
<TextInput source="special_coverage_policy" />
|
||||
<TextInput source="csr" />
|
||||
<TextInput source="po_number" />
|
||||
<TextInput source="unit_number" />
|
||||
<TextInput source="kmin" />
|
||||
<TextInput source="kmout" />
|
||||
<TextInput source="referral_source" />
|
||||
<TextInput source="selling_dealer" />
|
||||
<TextInput source="servicing_dealer" />
|
||||
<TextInput source="servicing_dealer_contact" />
|
||||
<TextInput source="selling_dealer_contact" />
|
||||
<TextInput source="depreciation_taxes" />
|
||||
<TextInput source="federal_tax_payable" />
|
||||
<TextInput source="other_amount_payable" />
|
||||
<TextInput source="towing_payable" />
|
||||
<TextInput source="storage_payable" />
|
||||
<TextInput source="adjustment_bottom_line" />
|
||||
<TextInput source="tax_pstthr" />
|
||||
<TextInput source="tax_tow_rt" />
|
||||
<TextInput source="tax_sub_rt" />
|
||||
<TextInput source="tax_paint_mat_rt" />
|
||||
<TextInput source="tax_levies_rt" />
|
||||
<TextInput source="tax_prethr" />
|
||||
<TextInput source="tax_thramt" />
|
||||
<TextInput source="tax_str_rt" />
|
||||
<TextInput source="tax_lbr_rt" />
|
||||
<TextInput source="adj_g_disc" />
|
||||
<TextInput source="adj_towdis" />
|
||||
<TextInput source="adj_strdis" />
|
||||
<TextInput source="tax_predis" />
|
||||
<TextInput source="rate_laa" />
|
||||
<TextInput source="status" />
|
||||
<TextInput source="cieca_stl" />
|
||||
<TextInput source="g_bett_amt" />
|
||||
<TextInput source="cieca_ttl" />
|
||||
<TextInput source="plate_no" />
|
||||
<TextInput source="plate_st" />
|
||||
<TextInput source="v_vin" />
|
||||
<TextInput source="v_model_yr" />
|
||||
<TextInput source="v_model_desc" />
|
||||
<TextInput source="v_make_desc" />
|
||||
<TextInput source="v_color" />
|
||||
<TextInput source="parts_tax_rates" />
|
||||
<TextInput source="job_totals" />
|
||||
<TextInput source="production_vars" />
|
||||
<TextInput source="intakechecklist" />
|
||||
<TextInput source="invoice_allocation" />
|
||||
<TextInput source="kanbanparent" />
|
||||
<TextInput source="employee_body" />
|
||||
<TextInput source="employee_refinish" />
|
||||
<TextInput source="employee_prep" />
|
||||
</FormTab>
|
||||
</TabbedForm>
|
||||
</Edit>
|
||||
);
|
||||
|
||||
export default JobsEdit;
|
||||
66
admin/src/components/jobs/jobs.list.jsx
Normal file
66
admin/src/components/jobs/jobs.list.jsx
Normal file
@@ -0,0 +1,66 @@
|
||||
import { useQuery } from "@apollo/client";
|
||||
import CircularProgress from "@material-ui/core/CircularProgress";
|
||||
import React from "react";
|
||||
import {
|
||||
Datagrid,
|
||||
Filter,
|
||||
List,
|
||||
ReferenceField,
|
||||
SelectInput,
|
||||
TextField,
|
||||
TextInput,
|
||||
} from "react-admin";
|
||||
import { QUERY_ALL_SHOPS } from "../../graphql/admin.shop.queries";
|
||||
|
||||
const JobsList = (props) => (
|
||||
<List filters={<JobsFilter />} {...props}>
|
||||
<Datagrid rowClick="edit">
|
||||
<TextField source="id" label="Job ID" />
|
||||
<ReferenceField source="shopid" reference="bodyshops" label="Shop Name">
|
||||
<TextField source="shopname" />
|
||||
</ReferenceField>
|
||||
<TextField source="ro_number" label="RO Number" />
|
||||
|
||||
<TextField source="ownr_fn" label="Owner FN" />
|
||||
<TextField source="ownr_ln" label="Owner LN" />
|
||||
<TextField source="ownr_co_nm" label="Owner CO" />
|
||||
|
||||
<ReferenceField source="ownerid" reference="owners" label="Owner Record">
|
||||
<TextField source="id" />
|
||||
</ReferenceField>
|
||||
<TextField source="v_model_yr" label="Year" />
|
||||
<TextField source="v_make_desc" label="Make" />
|
||||
<TextField source="v_model_desc" label="Model" />
|
||||
|
||||
<ReferenceField
|
||||
source="vehicleid"
|
||||
reference="vehicles"
|
||||
label="Vehicle ID"
|
||||
>
|
||||
<TextField source="id" />
|
||||
</ReferenceField>
|
||||
</Datagrid>
|
||||
</List>
|
||||
);
|
||||
|
||||
const JobsFilter = (props) => {
|
||||
const { loading, error, data } = useQuery(QUERY_ALL_SHOPS);
|
||||
if (loading) return <CircularProgress />;
|
||||
if (error) return JSON.stringify(error);
|
||||
|
||||
return (
|
||||
<Filter {...props}>
|
||||
<TextInput label="RO Number" source="ro_number" />
|
||||
<TextInput label="Job ID" source="id" />
|
||||
<SelectInput
|
||||
source="shopid"
|
||||
label="Bodyshop"
|
||||
choices={data.bodyshops.map((b) => {
|
||||
return { id: b.id, name: b.shopname };
|
||||
})}
|
||||
/>
|
||||
</Filter>
|
||||
);
|
||||
};
|
||||
|
||||
export default JobsList;
|
||||
280
admin/src/components/jobs/jobs.show.jsx
Normal file
280
admin/src/components/jobs/jobs.show.jsx
Normal file
@@ -0,0 +1,280 @@
|
||||
import React from "react";
|
||||
import {
|
||||
Datagrid,
|
||||
EditButton,
|
||||
NumberField,
|
||||
ReferenceManyField,
|
||||
Show,
|
||||
Tab,
|
||||
TabbedShowLayout,
|
||||
TextField,
|
||||
} from "react-admin";
|
||||
|
||||
const JobsShow = (props) => (
|
||||
<Show {...props}>
|
||||
<TabbedShowLayout>
|
||||
<Tab label="summary">
|
||||
<TextField source="id" />
|
||||
<TextField source="created_at" />
|
||||
<TextField source="updated_at" />
|
||||
<TextField source="shopid" />
|
||||
<TextField source="ro_number" />
|
||||
<TextField source="ownerid" />
|
||||
<TextField source="vehicleid" />
|
||||
</Tab>
|
||||
<Tab label="Job Lines">
|
||||
<ReferenceManyField
|
||||
reference="joblines"
|
||||
target="jobid"
|
||||
label="Job Lines"
|
||||
>
|
||||
<Datagrid>
|
||||
<TextField source="id" />
|
||||
|
||||
<TextField source="line_ref" />
|
||||
<TextField source="line_desc" />
|
||||
<TextField source="line_ind" />
|
||||
<NumberField source="db_price" />
|
||||
<NumberField source="act_price" />
|
||||
<NumberField source="part_qty" />
|
||||
<NumberField source="mod_lb_hrs" />
|
||||
<TextField source="mod_lbr_type" />
|
||||
<TextField source="lbr_op" />
|
||||
|
||||
<EditButton />
|
||||
</Datagrid>
|
||||
</ReferenceManyField>
|
||||
</Tab>
|
||||
<Tab label="other">
|
||||
<TextField source="labor_rate_id" />
|
||||
<TextField source="labor_rate_desc" />
|
||||
<TextField source="rate_lab" />
|
||||
<TextField source="rate_lad" />
|
||||
<TextField source="rate_lae" />
|
||||
<TextField source="rate_lar" />
|
||||
<TextField source="rate_las" />
|
||||
<TextField source="rate_laf" />
|
||||
<TextField source="rate_lam" />
|
||||
<TextField source="rate_lag" />
|
||||
<TextField source="rate_atp" />
|
||||
<TextField source="rate_lau" />
|
||||
<TextField source="rate_la1" />
|
||||
<TextField source="rate_la2" />
|
||||
<TextField source="rate_la3" />
|
||||
<TextField source="rate_la4" />
|
||||
<TextField source="rate_mapa" />
|
||||
<TextField source="rate_mash" />
|
||||
<TextField source="rate_mahw" />
|
||||
<TextField source="rate_ma2s" />
|
||||
<TextField source="rate_ma3s" />
|
||||
<TextField source="rate_ma2t" />
|
||||
<TextField source="rate_mabl" />
|
||||
<TextField source="rate_macs" />
|
||||
<TextField source="rate_matd" />
|
||||
<TextField source="federal_tax_rate" />
|
||||
<TextField source="state_tax_rate" />
|
||||
<TextField source="local_tax_rate" />
|
||||
<TextField source="est_co_nm" />
|
||||
<TextField source="est_addr1" />
|
||||
<TextField source="est_addr2" />
|
||||
<TextField source="est_city" />
|
||||
<TextField source="est_st" />
|
||||
<TextField source="est_zip" />
|
||||
<TextField source="est_ctry" />
|
||||
<TextField source="est_ph1" />
|
||||
<TextField source="est_ea" />
|
||||
<TextField source="est_ct_ln" />
|
||||
<TextField source="est_ct_fn" />
|
||||
<TextField source="scheduled_in" />
|
||||
<TextField source="actual_in" />
|
||||
<TextField source="scheduled_completion" />
|
||||
<TextField source="actual_completion" />
|
||||
<TextField source="scheduled_delivery" />
|
||||
<TextField source="actual_delivery" />
|
||||
<TextField source="regie_number" />
|
||||
<TextField source="invoice_date" />
|
||||
<TextField source="inproduction" />
|
||||
<TextField source="statusid" />
|
||||
<TextField source="ins_co_id" />
|
||||
<TextField source="ins_co_nm" />
|
||||
<TextField source="ins_addr1" />
|
||||
<TextField source="ins_addr2" />
|
||||
<TextField source="ins_city" />
|
||||
<TextField source="ins_st" />
|
||||
<TextField source="ins_zip" />
|
||||
<TextField source="ins_ctry" />
|
||||
<TextField source="ins_ph1" />
|
||||
<TextField source="ins_ph1x" />
|
||||
<TextField source="ins_ph2" />
|
||||
<TextField source="ins_ph2x" />
|
||||
<TextField source="ins_fax" />
|
||||
<TextField source="ins_faxx" />
|
||||
<TextField source="ins_ct_ln" />
|
||||
<TextField source="ins_ct_fn" />
|
||||
<TextField source="ins_title" />
|
||||
<TextField source="ins_ct_ph" />
|
||||
<TextField source="ins_ct_phx" />
|
||||
<TextField source="ins_ea" />
|
||||
<TextField source="ins_memo" />
|
||||
<TextField source="policy_no" />
|
||||
<TextField source="ded_amt" />
|
||||
<TextField source="ded_status" />
|
||||
<TextField source="asgn_no" />
|
||||
<TextField source="asgn_date" />
|
||||
<TextField source="asgn_type" />
|
||||
<TextField source="clm_no" />
|
||||
<TextField source="clm_ofc_id" />
|
||||
<TextField source="date_estimated" />
|
||||
<TextField source="date_open" />
|
||||
<TextField source="date_scheduled" />
|
||||
<TextField source="date_invoiced" />
|
||||
<TextField source="date_exported" />
|
||||
<TextField source="clm_total" />
|
||||
<TextField source="owner_owing" />
|
||||
<TextField source="converted" />
|
||||
<TextField source="ciecaid" />
|
||||
<TextField source="loss_date" />
|
||||
<TextField source="clm_ofc_nm" />
|
||||
<TextField source="clm_addr1" />
|
||||
<TextField source="clm_addr2" />
|
||||
<TextField source="clm_city" />
|
||||
<TextField source="clm_st" />
|
||||
<TextField source="clm_zip" />
|
||||
<TextField source="clm_ctry" />
|
||||
<TextField source="clm_ph1" />
|
||||
<TextField source="clm_ph1x" />
|
||||
<TextField source="clm_ph2" />
|
||||
<TextField source="clm_ph2x" />
|
||||
<TextField source="clm_fax" />
|
||||
<TextField source="clm_faxx" />
|
||||
<TextField source="clm_ct_ln" />
|
||||
<TextField source="clm_ct_fn" />
|
||||
<TextField source="clm_title" />
|
||||
<TextField source="clm_ct_ph" />
|
||||
<TextField source="clm_ct_phx" />
|
||||
<TextField source="clm_ea" />
|
||||
<TextField source="payee_nms" />
|
||||
<TextField source="pay_type" />
|
||||
<TextField source="pay_date" />
|
||||
<TextField source="pay_chknm" />
|
||||
<TextField source="pay_amt" />
|
||||
<TextField source="agt_co_id" />
|
||||
<TextField source="agt_co_nm" />
|
||||
<TextField source="agt_addr1" />
|
||||
<TextField source="agt_addr2" />
|
||||
<TextField source="agt_city" />
|
||||
<TextField source="agt_st" />
|
||||
<TextField source="agt_zip" />
|
||||
<TextField source="agt_ctry" />
|
||||
<TextField source="agt_ph1" />
|
||||
<TextField source="agt_ph1x" />
|
||||
<TextField source="agt_ph2" />
|
||||
<TextField source="agt_ph2x" />
|
||||
<TextField source="agt_fax" />
|
||||
<TextField source="agt_faxx" />
|
||||
<TextField source="agt_ct_ln" />
|
||||
<TextField source="agt_ct_fn" />
|
||||
<TextField source="agt_ct_ph" />
|
||||
<TextField source="agt_ct_phx" />
|
||||
<TextField source="agt_ea" />
|
||||
<TextField source="agt_lic_no" />
|
||||
<TextField source="loss_type" />
|
||||
<TextField source="loss_desc" />
|
||||
<TextField source="theft_ind" />
|
||||
<TextField source="cat_no" />
|
||||
<TextField source="tlos_ind" />
|
||||
<TextField source="cust_pr" />
|
||||
<TextField source="insd_ln" />
|
||||
<TextField source="insd_fn" />
|
||||
<TextField source="insd_title" />
|
||||
<TextField source="insd_co_nm" />
|
||||
<TextField source="insd_addr1" />
|
||||
<TextField source="insd_addr2" />
|
||||
<TextField source="insd_city" />
|
||||
<TextField source="insd_st" />
|
||||
<TextField source="insd_zip" />
|
||||
<TextField source="insd_ctry" />
|
||||
<TextField source="insd_ph1" />
|
||||
<TextField source="insd_ph1x" />
|
||||
<TextField source="insd_ph2" />
|
||||
<TextField source="insd_ph2x" />
|
||||
<TextField source="insd_fax" />
|
||||
<TextField source="insd_faxx" />
|
||||
<TextField source="insd_ea" />
|
||||
<TextField source="ownr_ln" />
|
||||
<TextField source="ownr_fn" />
|
||||
<TextField source="ownr_title" />
|
||||
<TextField source="ownr_co_nm" />
|
||||
<TextField source="ownr_addr1" />
|
||||
<TextField source="ownr_addr2" />
|
||||
<TextField source="ownr_city" />
|
||||
<TextField source="ownr_st" />
|
||||
<TextField source="ownr_zip" />
|
||||
<TextField source="ownr_ctry" />
|
||||
<TextField source="ownr_ph1" />
|
||||
<TextField source="ownr_ph1x" />
|
||||
<TextField source="ownr_ph2" />
|
||||
<TextField source="ownr_ph2x" />
|
||||
<TextField source="ownr_fax" />
|
||||
<TextField source="ownr_faxx" />
|
||||
<TextField source="ownr_ea" />
|
||||
<TextField source="area_of_damage" />
|
||||
<TextField source="loss_cat" />
|
||||
|
||||
<TextField source="special_coverage_policy" />
|
||||
<TextField source="csr" />
|
||||
<TextField source="po_number" />
|
||||
<TextField source="unit_number" />
|
||||
<TextField source="kmin" />
|
||||
<TextField source="kmout" />
|
||||
<TextField source="referral_source" />
|
||||
<TextField source="selling_dealer" />
|
||||
<TextField source="servicing_dealer" />
|
||||
<TextField source="servicing_dealer_contact" />
|
||||
<TextField source="selling_dealer_contact" />
|
||||
<TextField source="depreciation_taxes" />
|
||||
<TextField source="federal_tax_payable" />
|
||||
<TextField source="other_amount_payable" />
|
||||
<TextField source="towing_payable" />
|
||||
<TextField source="storage_payable" />
|
||||
<TextField source="adjustment_bottom_line" />
|
||||
<TextField source="tax_pstthr" />
|
||||
<TextField source="tax_tow_rt" />
|
||||
<TextField source="tax_sub_rt" />
|
||||
<TextField source="tax_paint_mat_rt" />
|
||||
<TextField source="tax_levies_rt" />
|
||||
<TextField source="tax_prethr" />
|
||||
<TextField source="tax_thramt" />
|
||||
<TextField source="tax_str_rt" />
|
||||
<TextField source="tax_lbr_rt" />
|
||||
<TextField source="adj_g_disc" />
|
||||
<TextField source="adj_towdis" />
|
||||
<TextField source="adj_strdis" />
|
||||
<TextField source="tax_predis" />
|
||||
<TextField source="rate_laa" />
|
||||
<TextField source="status" />
|
||||
<TextField source="cieca_stl" />
|
||||
<TextField source="g_bett_amt" />
|
||||
<TextField source="cieca_ttl" />
|
||||
<TextField source="plate_no" />
|
||||
<TextField source="plate_st" />
|
||||
<TextField source="v_vin" />
|
||||
<TextField source="v_model_yr" />
|
||||
<TextField source="v_model_desc" />
|
||||
<TextField source="v_make_desc" />
|
||||
<TextField source="v_color" />
|
||||
<TextField source="parts_tax_rates" />
|
||||
<TextField source="job_totals" />
|
||||
<TextField source="production_vars" />
|
||||
<TextField source="intakechecklist" />
|
||||
<TextField source="invoice_allocation" />
|
||||
<TextField source="kanbanparent" />
|
||||
<TextField source="employee_body" />
|
||||
<TextField source="employee_refinish" />
|
||||
<TextField source="employee_prep" />
|
||||
</Tab>
|
||||
</TabbedShowLayout>
|
||||
</Show>
|
||||
);
|
||||
|
||||
export default JobsShow;
|
||||
31
admin/src/firebase/admin-firebase-utils.js
Normal file
31
admin/src/firebase/admin-firebase-utils.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import firebase from "firebase/app";
|
||||
import "firebase/firestore";
|
||||
import "firebase/auth";
|
||||
|
||||
const config = JSON.parse(process.env.REACT_APP_FIREBASE_CONFIG);
|
||||
firebase.initializeApp(config);
|
||||
|
||||
export const auth = firebase.auth();
|
||||
export const firestore = firebase.firestore();
|
||||
|
||||
export default firebase;
|
||||
|
||||
export const getCurrentUser = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const unsubscribe = auth.onAuthStateChanged((userAuth) => {
|
||||
unsubscribe();
|
||||
resolve(userAuth);
|
||||
}, reject);
|
||||
});
|
||||
};
|
||||
|
||||
export const updateCurrentUser = (userDetails) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const unsubscribe = auth.onAuthStateChanged((userAuth) => {
|
||||
userAuth.updateProfile(userDetails).then((r) => {
|
||||
unsubscribe();
|
||||
resolve(userAuth);
|
||||
});
|
||||
}, reject);
|
||||
});
|
||||
};
|
||||
10
admin/src/graphql/admin.shop.queries.js
Normal file
10
admin/src/graphql/admin.shop.queries.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import { gql } from "@apollo/client";
|
||||
|
||||
export const QUERY_ALL_SHOPS = gql`
|
||||
query QUERY_ALL_SHOPS {
|
||||
bodyshops {
|
||||
id
|
||||
shopname
|
||||
}
|
||||
}
|
||||
`;
|
||||
13
admin/src/index.css
Normal file
13
admin/src/index.css
Normal file
@@ -0,0 +1,13 @@
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||
sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||
monospace;
|
||||
}
|
||||
17
admin/src/index.js
Normal file
17
admin/src/index.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import "./index.css";
|
||||
import App from "./App/App";
|
||||
import * as serviceWorker from "./serviceWorker";
|
||||
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
document.getElementById("root")
|
||||
);
|
||||
|
||||
// If you want your app to work offline and load faster, you can change
|
||||
// unregister() to register() below. Note this comes with some pitfalls.
|
||||
// Learn more about service workers: https://bit.ly/CRA-PWA
|
||||
serviceWorker.unregister();
|
||||
141
admin/src/serviceWorker.js
Normal file
141
admin/src/serviceWorker.js
Normal file
@@ -0,0 +1,141 @@
|
||||
// This optional code is used to register a service worker.
|
||||
// register() is not called by default.
|
||||
|
||||
// This lets the app load faster on subsequent visits in production, and gives
|
||||
// it offline capabilities. However, it also means that developers (and users)
|
||||
// will only see deployed updates on subsequent visits to a page, after all the
|
||||
// existing tabs open on the page have been closed, since previously cached
|
||||
// resources are updated in the background.
|
||||
|
||||
// To learn more about the benefits of this model and instructions on how to
|
||||
// opt-in, read https://bit.ly/CRA-PWA
|
||||
|
||||
const isLocalhost = Boolean(
|
||||
window.location.hostname === 'localhost' ||
|
||||
// [::1] is the IPv6 localhost address.
|
||||
window.location.hostname === '[::1]' ||
|
||||
// 127.0.0.0/8 are considered localhost for IPv4.
|
||||
window.location.hostname.match(
|
||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||
)
|
||||
);
|
||||
|
||||
export function register(config) {
|
||||
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
||||
// The URL constructor is available in all browsers that support SW.
|
||||
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
|
||||
if (publicUrl.origin !== window.location.origin) {
|
||||
// Our service worker won't work if PUBLIC_URL is on a different origin
|
||||
// from what our page is served on. This might happen if a CDN is used to
|
||||
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
|
||||
return;
|
||||
}
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
|
||||
|
||||
if (isLocalhost) {
|
||||
// This is running on localhost. Let's check if a service worker still exists or not.
|
||||
checkValidServiceWorker(swUrl, config);
|
||||
|
||||
// Add some additional logging to localhost, pointing developers to the
|
||||
// service worker/PWA documentation.
|
||||
navigator.serviceWorker.ready.then(() => {
|
||||
console.log(
|
||||
'This web app is being served cache-first by a service ' +
|
||||
'worker. To learn more, visit https://bit.ly/CRA-PWA'
|
||||
);
|
||||
});
|
||||
} else {
|
||||
// Is not localhost. Just register service worker
|
||||
registerValidSW(swUrl, config);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function registerValidSW(swUrl, config) {
|
||||
navigator.serviceWorker
|
||||
.register(swUrl)
|
||||
.then(registration => {
|
||||
registration.onupdatefound = () => {
|
||||
const installingWorker = registration.installing;
|
||||
if (installingWorker == null) {
|
||||
return;
|
||||
}
|
||||
installingWorker.onstatechange = () => {
|
||||
if (installingWorker.state === 'installed') {
|
||||
if (navigator.serviceWorker.controller) {
|
||||
// At this point, the updated precached content has been fetched,
|
||||
// but the previous service worker will still serve the older
|
||||
// content until all client tabs are closed.
|
||||
console.log(
|
||||
'New content is available and will be used when all ' +
|
||||
'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
|
||||
);
|
||||
|
||||
// Execute callback
|
||||
if (config && config.onUpdate) {
|
||||
config.onUpdate(registration);
|
||||
}
|
||||
} else {
|
||||
// At this point, everything has been precached.
|
||||
// It's the perfect time to display a
|
||||
// "Content is cached for offline use." message.
|
||||
console.log('Content is cached for offline use.');
|
||||
|
||||
// Execute callback
|
||||
if (config && config.onSuccess) {
|
||||
config.onSuccess(registration);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error during service worker registration:', error);
|
||||
});
|
||||
}
|
||||
|
||||
function checkValidServiceWorker(swUrl, config) {
|
||||
// Check if the service worker can be found. If it can't reload the page.
|
||||
fetch(swUrl, {
|
||||
headers: { 'Service-Worker': 'script' },
|
||||
})
|
||||
.then(response => {
|
||||
// Ensure service worker exists, and that we really are getting a JS file.
|
||||
const contentType = response.headers.get('content-type');
|
||||
if (
|
||||
response.status === 404 ||
|
||||
(contentType != null && contentType.indexOf('javascript') === -1)
|
||||
) {
|
||||
// No service worker found. Probably a different app. Reload the page.
|
||||
navigator.serviceWorker.ready.then(registration => {
|
||||
registration.unregister().then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// Service worker found. Proceed as normal.
|
||||
registerValidSW(swUrl, config);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
console.log(
|
||||
'No internet connection found. App is running in offline mode.'
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export function unregister() {
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.ready
|
||||
.then(registration => {
|
||||
registration.unregister();
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
5
admin/src/setupTests.js
Normal file
5
admin/src/setupTests.js
Normal file
@@ -0,0 +1,5 @@
|
||||
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
||||
// allows you to do things like:
|
||||
// expect(element).toHaveTextContent(/react/i)
|
||||
// learn more: https://github.com/testing-library/jest-dom
|
||||
import '@testing-library/jest-dom/extend-expect';
|
||||
13650
admin/yarn.lock
Normal file
13650
admin/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
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-----
|
||||
@@ -1,14 +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://reports3.test.imex.online
|
||||
VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||
VITE_APP_INSTANCE=IMEX
|
||||
@@ -1,16 +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://reports3.test.imex.online
|
||||
VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||
VITE_APP_COUNTRY=USA
|
||||
VITE_APP_INSTANCE=ROME
|
||||
@@ -1,15 +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
|
||||
@@ -1,15 +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
|
||||
@@ -1,15 +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://reports3.test.imex.online
|
||||
VITE_APP_IS_TEST=true
|
||||
VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||
VITE_APP_INSTANCE=IMEX
|
||||
@@ -1,15 +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
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"react-app"
|
||||
],
|
||||
"rules": {
|
||||
"no-useless-rename": "off"
|
||||
}
|
||||
}
|
||||
4
client/.gitignore
vendored
4
client/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
|
||||
# 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
|
||||
|
||||
54
client/craco.config.js
Normal file
54
client/craco.config.js
Normal file
@@ -0,0 +1,54 @@
|
||||
// craco.config.js
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const CracoLessPlugin = require("craco-less");
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
{
|
||||
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;
|
||||
}),
|
||||
},
|
||||
}),
|
||||
},
|
||||
};
|
||||
@@ -1,17 +0,0 @@
|
||||
const { defineConfig } = require("cypress");
|
||||
|
||||
module.exports = defineConfig({
|
||||
experimentalStudio: true,
|
||||
env: {
|
||||
FIREBASE_USERNAME: "cypress@imex.test",
|
||||
FIREBASE_PASSWORD: "cypress"
|
||||
},
|
||||
e2e: {
|
||||
// We've imported your old cypress plugins here.
|
||||
// You may want to clean this up later by importing these.
|
||||
setupNodeEvents(on, config) {
|
||||
return require("./cypress/plugins/index.js")(on, config);
|
||||
},
|
||||
baseUrl: "https://localhost:3000"
|
||||
}
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user