@@ -8,7 +8,6 @@
|
|||||||
"Atomics": "readonly",
|
"Atomics": "readonly",
|
||||||
"SharedArrayBuffer": "readonly"
|
"SharedArrayBuffer": "readonly"
|
||||||
},
|
},
|
||||||
|
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 2018,
|
"ecmaVersion": 2018,
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
|
|||||||
1
.vscode/launch.json
vendored
@@ -8,7 +8,6 @@
|
|||||||
"type": "pwa-chrome",
|
"type": "pwa-chrome",
|
||||||
"webRoot": "${workspaceFolder}/client/src"
|
"webRoot": "${workspaceFolder}/client/src"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "Chrome",
|
"name": "Chrome",
|
||||||
"type": "chrome",
|
"type": "chrome",
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ npx deadfile ./src/index.js --exclude build templates
|
|||||||
|
|
||||||
#Crushing all hasura migrations by creating a new initialization from the server.
|
#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 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!@#'
|
hasura migrate status --endpoint https://db.imex.online/ --admin-secret 'Production-ImEXOnline!@#'
|
||||||
|
|
||||||
Generate the license file:
|
Generate the license file:
|
||||||
$ generate-license-file --input package.json --output third-party-licenses.txt --overwrite
|
$ generate-license-file --input package.json --output third-party-licenses.txt --overwrite
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
|
Ensure following environment variables are set:
|
||||||
Ensure following environment variables are set:
|
|
||||||
|
|
||||||
__S3 Related__
|
__S3 Related__
|
||||||
AWSAccessKeyId=
|
AWSAccessKeyId=
|
||||||
|
|||||||
@@ -16,9 +16,11 @@ jsreport configure
|
|||||||
|
|
||||||
sudo apt-get install -y libgconf-2-4
|
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 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 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
|
# on ubuntu 20 run also
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,9 @@
|
|||||||
|
|
||||||
</div>
|
</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 -->
|
<!-- To reformat run: npx prettier --print-width 100 --single-quote --no-semi --prose-wrap never --write Readme.md -->
|
||||||
|
|
||||||
@@ -16,31 +18,31 @@ _I recommend [Mrm](https://github.com/sapegin/mrm-tasks/tree/master/packages/mrm
|
|||||||
|
|
||||||
- [Test structure](#test-structure)
|
- [Test structure](#test-structure)
|
||||||
- [Matchers](#matchers)
|
- [Matchers](#matchers)
|
||||||
- [Basic matchers](#basic-matchers)
|
- [Basic matchers](#basic-matchers)
|
||||||
- [Truthiness](#truthiness)
|
- [Truthiness](#truthiness)
|
||||||
- [Numbers](#numbers)
|
- [Numbers](#numbers)
|
||||||
- [Strings](#strings)
|
- [Strings](#strings)
|
||||||
- [Arrays](#arrays)
|
- [Arrays](#arrays)
|
||||||
- [Objects](#objects)
|
- [Objects](#objects)
|
||||||
- [Exceptions](#exceptions)
|
- [Exceptions](#exceptions)
|
||||||
- [Snapshots](#snapshots)
|
- [Snapshots](#snapshots)
|
||||||
- [Mock functions](#mock-functions)
|
- [Mock functions](#mock-functions)
|
||||||
- [Misc](#misc)
|
- [Misc](#misc)
|
||||||
- [Promise matchers (Jest 20+)](#promise-matchers-jest-20)
|
- [Promise matchers (Jest 20+)](#promise-matchers-jest-20)
|
||||||
- [Async tests](#async-tests)
|
- [Async tests](#async-tests)
|
||||||
- [async/await](#asyncawait)
|
- [async/await](#asyncawait)
|
||||||
- [Promises](#promises)
|
- [Promises](#promises)
|
||||||
- [done() callback](#done-callback)
|
- [done() callback](#done-callback)
|
||||||
- [Mocks](#mocks)
|
- [Mocks](#mocks)
|
||||||
- [Mock functions](#mock-functions-1)
|
- [Mock functions](#mock-functions-1)
|
||||||
- [Mock modules using jest.mock method](#mock-modules-using-jestmock-method)
|
- [Mock modules using jest.mock method](#mock-modules-using-jestmock-method)
|
||||||
- [Mock modules using a mock file](#mock-modules-using-a-mock-file)
|
- [Mock modules using a mock file](#mock-modules-using-a-mock-file)
|
||||||
- [Mock object methods](#mock-object-methods)
|
- [Mock object methods](#mock-object-methods)
|
||||||
- [Mock getters and setters (Jest 22.1.0+)](#mock-getters-and-setters-jest-2210)
|
- [Mock getters and setters (Jest 22.1.0+)](#mock-getters-and-setters-jest-2210)
|
||||||
- [Mock getters and setters](#mock-getters-and-setters)
|
- [Mock getters and setters](#mock-getters-and-setters)
|
||||||
- [Clearing and restoring mocks](#clearing-and-restoring-mocks)
|
- [Clearing and restoring mocks](#clearing-and-restoring-mocks)
|
||||||
- [Accessing the original module when using mocks](#accessing-the-original-module-when-using-mocks)
|
- [Accessing the original module when using mocks](#accessing-the-original-module-when-using-mocks)
|
||||||
- [Timer mocks](#timer-mocks)
|
- [Timer mocks](#timer-mocks)
|
||||||
- [Data-driven tests (Jest 23+)](#data-driven-tests-jest-23)
|
- [Data-driven tests (Jest 23+)](#data-driven-tests-jest-23)
|
||||||
- [Skipping tests](#skipping-tests)
|
- [Skipping tests](#skipping-tests)
|
||||||
- [Testing modules with side effects](#testing-modules-with-side-effects)
|
- [Testing modules with side effects](#testing-modules-with-side-effects)
|
||||||
@@ -205,8 +207,8 @@ expect(fn.mock.calls[0][0]).toBe(2) // fn.mock.calls[0][0] — the first argumen
|
|||||||
- `nthCalledWith` → `toHaveBeenNthCalledWith`
|
- `nthCalledWith` → `toHaveBeenNthCalledWith`
|
||||||
- `toReturnTimes` → `toHaveReturnedTimes`
|
- `toReturnTimes` → `toHaveReturnedTimes`
|
||||||
- `toReturnWith` → `toHaveReturnedWith`
|
- `toReturnWith` → `toHaveReturnedWith`
|
||||||
- `lastReturnedWith` → `toHaveLastReturnedWith`
|
- `lastReturnedWith`→ `toHaveLastReturnedWith`
|
||||||
- `nthReturnedWith` → `toHaveNthReturnedWith`
|
- `nthReturnedWith` →`toHaveNthReturnedWith`
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### Misc
|
### Misc
|
||||||
@@ -244,7 +246,8 @@ test('resolve to lemon', async () => {
|
|||||||
|
|
||||||
See [more examples](https://facebook.github.io/jest/docs/en/tutorial-async.html) in Jest docs.
|
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
|
```js
|
||||||
test('async test', () => {
|
test('async test', () => {
|
||||||
@@ -343,23 +346,25 @@ 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)
|
[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
|
### 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
|
```js
|
||||||
module.exports = a => a
|
module.exports = a => a
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Add to your test:
|
2. Add to your test:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
jest.mock('lodash/memoize')
|
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)
|
[Manual mocks docs](https://facebook.github.io/jest/docs/manual-mocks.html)
|
||||||
|
|
||||||
@@ -407,7 +412,7 @@ fn.mockReset() // Clears and removes any mocked return values or implementations
|
|||||||
fn.mockRestore() // Resets and restores the initial implementation
|
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:
|
For all mocks:
|
||||||
|
|
||||||
@@ -427,7 +432,8 @@ const fs = require.requireActual('fs') // Original module
|
|||||||
|
|
||||||
### Timer mocks
|
### 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
|
```js
|
||||||
// Enable fake timers
|
// Enable fake timers
|
||||||
@@ -471,7 +477,7 @@ test.each`
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
Or on `describe` level:
|
Or on `describe` level:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
describe.each([['mobile'], ['tablet'], ['desktop']])('checkout flow on %s', (viewport) => {
|
describe.each([['mobile'], ['tablet'], ['desktop']])('checkout flow on %s', (viewport) => {
|
||||||
@@ -481,7 +487,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
|
## Skipping tests
|
||||||
|
|
||||||
@@ -501,7 +507,8 @@ tests.only('make each pony pink'...
|
|||||||
|
|
||||||
## Testing modules with side effects
|
## 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
|
```js
|
||||||
const modulePath = '../module-to-test'
|
const modulePath = '../module-to-test'
|
||||||
@@ -525,7 +532,8 @@ test('second text', () => {
|
|||||||
|
|
||||||
## Usage with Babel and TypeScript
|
## 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
|
## Resources
|
||||||
|
|
||||||
@@ -536,10 +544,14 @@ Add [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jes
|
|||||||
- [Effective Snapshot Testing](https://blog.kentcdodds.com/effective-snapshot-testing-e0d1a2c28eca) by Kent C. Dodds
|
- [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 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
|
- [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
|
- [How to Test React and MobX with Jest](https://semaphoreci.com/community/tutorials/how-to-test-react-and-mobx-with-jest)
|
||||||
- [Testing React Intl components with Jest and Enzyme](https://medium.com/@sapegin/testing-react-intl-components-with-jest-and-enzyme-f9d43d9c923e) by Artem Sapegin
|
by Will Stern
|
||||||
- [Testing with Jest: 15 Awesome Tips and Tricks](https://medium.com/@stipsan/testing-with-jest-15-awesome-tips-and-tricks-42150ec4c262) by Stian Didriksen
|
- [Testing React Intl components with Jest and Enzyme](https://medium.com/@sapegin/testing-react-intl-components-with-jest-and-enzyme-f9d43d9c923e)
|
||||||
- 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/)
|
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/)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -559,6 +571,8 @@ This software has been developed with lots of coffee, buy me one more cup to kee
|
|||||||
|
|
||||||
## Author and license
|
## 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.
|
CC0 1.0 Universal license, see the included [License.md](/License.md) file.
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ $ hasura migrate create "init" --from-server
|
|||||||
## mark the migration as applied on this server
|
## mark the migration as applied on this server
|
||||||
|
|
||||||
$ hasura migrate apply --version "<version>" --skip-execution
|
$ 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
|
Step 4: Verify the status
|
||||||
Execute the following command to verify status of migration:
|
Execute the following command to verify status of migration:
|
||||||
@@ -54,4 +55,5 @@ Execute the following command to verify status of migration:
|
|||||||
$ hasura migrate status
|
$ hasura migrate status
|
||||||
You have brand new migrations now!
|
You have brand new migrations now!
|
||||||
|
|
||||||
This can also be used to combine (kind of squash) all of your migration files into a single one. You're snapshotting the state of a server and adding it as a new migration.
|
This can also be used to combine (kind of squash) all of your migration files into a single one. You're snapshotting the
|
||||||
|
state of a server and adding it as a new migration.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:for-each select="//TranslatedData">
|
<xsl:for-each select="//TranslatedData">
|
||||||
<xsl:element name="TranslatedData">
|
<xsl:element name="TranslatedData">
|
||||||
@@ -8,23 +8,23 @@
|
|||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="Details/@PrgID">
|
<xsl:when test="Details/@PrgID">
|
||||||
<xsl:copy-of select="Details" />
|
<xsl:copy-of select="Details"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:element name="Details">
|
<xsl:element name="Details">
|
||||||
<xsl:attribute name="PrgID">OECTrans.ImportTrans</xsl:attribute>
|
<xsl:attribute name="PrgID">OECTrans.ImportTrans</xsl:attribute>
|
||||||
<xsl:for-each select="Details/@*">
|
<xsl:for-each select="Details/@*">
|
||||||
<xsl:copy-of select="." />
|
<xsl:copy-of select="."/>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
<xsl:for-each select="Details/*">
|
<xsl:for-each select="Details/*">
|
||||||
<xsl:copy-of select="." />
|
<xsl:copy-of select="."/>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:element name="Header">
|
<xsl:element name="Header">
|
||||||
<xsl:attribute name="RONum">
|
<xsl:attribute name="RONum">
|
||||||
<xsl:value-of select="//Envelope/@RONum" />
|
<xsl:value-of select="//Envelope/@RONum"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="OwnerFName">
|
<xsl:attribute name="OwnerFName">
|
||||||
<xsl:value-of select="//Admin/@OwnerF"/>
|
<xsl:value-of select="//Admin/@OwnerF"/>
|
||||||
@@ -33,49 +33,49 @@
|
|||||||
<xsl:value-of select="//Admin/@OwnerL"/>
|
<xsl:value-of select="//Admin/@OwnerL"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="VIN">
|
<xsl:attribute name="VIN">
|
||||||
<xsl:value-of select="//Vehicle/@TransVIN" />
|
<xsl:value-of select="//Vehicle/@TransVIN"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Mileage">
|
<xsl:attribute name="Mileage">
|
||||||
<xsl:value-of select="//Vehicle/@TransMileage" />
|
<xsl:value-of select="//Vehicle/@TransMileage"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Year">
|
<xsl:attribute name="Year">
|
||||||
<xsl:value-of select="//Vehicle/@TransYear" />
|
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Make">
|
<xsl:attribute name="Make">
|
||||||
<xsl:if test="//Vehicle/@ManufName[. != '']" >
|
<xsl:if test="//Vehicle/@ManufName[. != '']">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Vehicle/@ManufName[. = 'Geo']">CHEV</xsl:when>
|
<xsl:when test="//Vehicle/@ManufName[. = 'Geo']">CHEV</xsl:when>
|
||||||
<xsl:when test="//Vehicle/@ManufName[. = 'Chev-GMC Truck']">CHEV</xsl:when>
|
<xsl:when test="//Vehicle/@ManufName[. = 'Chev-GMC Truck']">CHEV</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Vehicle/@ManufName" />
|
<xsl:value-of select="//Vehicle/@ManufName"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="//Vehicle/@ManufName[. = '']" >
|
<xsl:if test="//Vehicle/@ManufName[. = '']">
|
||||||
<xsl:value-of select="//Vehicle/@ManufCode" />
|
<xsl:value-of select="//Vehicle/@ManufCode"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Model">
|
<xsl:attribute name="Model">
|
||||||
<xsl:value-of select="//Vehicle/@TransModel" />
|
<xsl:value-of select="//Vehicle/@TransModel"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Description">
|
<xsl:attribute name="Description">
|
||||||
<xsl:value-of select="//Vehicle/@TransYear" />
|
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text></xsl:text>
|
||||||
<xsl:value-of select="//Vehicle/@ManufName" />
|
<xsl:value-of select="//Vehicle/@ManufName"/>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text></xsl:text>
|
||||||
<xsl:value-of select="//Vehicle/@TransModel" />
|
<xsl:value-of select="//Vehicle/@TransModel"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="LastSupplLevel">
|
<xsl:attribute name="LastSupplLevel">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Envelope/@TransactionType = 'E'">0</xsl:when>
|
<xsl:when test="//Envelope/@TransactionType = 'E'">0</xsl:when>
|
||||||
<xsl:when test="substring(//Envelope/@SupplementNum, 1, 1) = 'S'">
|
<xsl:when test="substring(//Envelope/@SupplementNum, 1, 1) = 'S'">
|
||||||
<xsl:value-of select="substring(//Envelope/@SupplementNum, 2)" />
|
<xsl:value-of select="substring(//Envelope/@SupplementNum, 2)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>0</xsl:otherwise>
|
<xsl:otherwise>0</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:apply-templates select="PartsList" />
|
<xsl:apply-templates select="PartsList"/>
|
||||||
<xsl:element name="Envelope">
|
<xsl:element name="Envelope">
|
||||||
<xsl:element name="Software">
|
<xsl:element name="Software">
|
||||||
<xsl:attribute name="Manifest">Audatex.xml</xsl:attribute>
|
<xsl:attribute name="Manifest">Audatex.xml</xsl:attribute>
|
||||||
@@ -96,10 +96,13 @@
|
|||||||
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="EstimateID">
|
<xsl:attribute name="EstimateID">
|
||||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@SoftwareVersion"/>-<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of
|
||||||
|
select="//Envelope/@SoftwareVersion"/>-
|
||||||
|
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="EstimateIDv2">
|
<xsl:attribute name="EstimateIDv2">
|
||||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-
|
||||||
|
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="EstimateFormatVersion">
|
<xsl:attribute name="EstimateFormatVersion">
|
||||||
<xsl:value-of select="//Envelope/@EMSVersion"/>
|
<xsl:value-of select="//Envelope/@EMSVersion"/>
|
||||||
@@ -107,9 +110,9 @@
|
|||||||
</xsl:element>
|
</xsl:element>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:element name="Totals">
|
<xsl:element name="Totals">
|
||||||
<xsl:attribute name="GrandTotalAmount">
|
<xsl:attribute name="GrandTotalAmount">
|
||||||
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:element name="Administrative">
|
<xsl:element name="Administrative">
|
||||||
<xsl:element name="Owner">
|
<xsl:element name="Owner">
|
||||||
@@ -220,7 +223,8 @@
|
|||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(substring-before(//Admin/@InsuranceZip, '-'))=5">
|
<xsl:when test="string-length(substring-before(//Admin/@InsuranceZip, '-'))=5">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
|
<xsl:when
|
||||||
|
test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
|
||||||
<xsl:value-of select="//Admin/@InsuranceZip"/>
|
<xsl:value-of select="//Admin/@InsuranceZip"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
@@ -231,7 +235,8 @@
|
|||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="string-length(//Admin/@InsuranceZip)=9">
|
<xsl:when test="string-length(//Admin/@InsuranceZip)=9">
|
||||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
|
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-
|
||||||
|
<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="string-length(//Admin/@InsuranceZip)>4">
|
<xsl:when test="string-length(//Admin/@InsuranceZip)>4">
|
||||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
||||||
@@ -244,7 +249,8 @@
|
|||||||
<xsl:attribute name="Phone">
|
<xsl:attribute name="Phone">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin/@InsurancePhone1Ext[. != '']">
|
<xsl:when test="//Admin/@InsurancePhone1Ext[. != '']">
|
||||||
<xsl:value-of select="//Admin/@InsurancePhone1"/> x<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
|
<xsl:value-of select="//Admin/@InsurancePhone1"/> x
|
||||||
|
<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin/@InsurancePhone1"/>
|
<xsl:value-of select="//Admin/@InsurancePhone1"/>
|
||||||
@@ -254,7 +260,8 @@
|
|||||||
<xsl:attribute name="Phone2">
|
<xsl:attribute name="Phone2">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin/@InsurancePhone2Ext[. != '']">
|
<xsl:when test="//Admin/@InsurancePhone2Ext[. != '']">
|
||||||
<xsl:value-of select="//Admin/@InsurancePhone2"/> x<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
|
<xsl:value-of select="//Admin/@InsurancePhone2"/> x
|
||||||
|
<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin/@InsurancePhone2"/>
|
<xsl:value-of select="//Admin/@InsurancePhone2"/>
|
||||||
@@ -264,7 +271,8 @@
|
|||||||
<xsl:attribute name="Fax">
|
<xsl:attribute name="Fax">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin/@InsuranceFaxExt[. != '']">
|
<xsl:when test="//Admin/@InsuranceFaxExt[. != '']">
|
||||||
<xsl:value-of select="//Admin/@InsuranceFax"/> x<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
|
<xsl:value-of select="//Admin/@InsuranceFax"/> x
|
||||||
|
<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin/@InsuranceFax"/>
|
<xsl:value-of select="//Admin/@InsuranceFax"/>
|
||||||
@@ -277,7 +285,7 @@
|
|||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:element name="Insured">
|
<xsl:element name="Insured">
|
||||||
<xsl:attribute name="LastName">
|
<xsl:attribute name="LastName">
|
||||||
<xsl:value-of select="//Admin/@InsuranceLName" />
|
<xsl:value-of select="//Admin/@InsuranceLName"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:element name="Claim">
|
<xsl:element name="Claim">
|
||||||
@@ -319,7 +327,8 @@
|
|||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(substring-before(//Admin2/@EstimatorZip, '-'))=5">
|
<xsl:when test="string-length(substring-before(//Admin2/@EstimatorZip, '-'))=5">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
|
<xsl:when
|
||||||
|
test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
|
||||||
<xsl:value-of select="//Admin2/@EstimatorZip"/>
|
<xsl:value-of select="//Admin2/@EstimatorZip"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
@@ -330,7 +339,8 @@
|
|||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)=9">
|
<xsl:when test="string-length(//Admin2/@EstimatorZip)=9">
|
||||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
|
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-
|
||||||
|
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)>4">
|
<xsl:when test="string-length(//Admin2/@EstimatorZip)>4">
|
||||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
||||||
@@ -343,7 +353,8 @@
|
|||||||
<xsl:attribute name="Phone">
|
<xsl:attribute name="Phone">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin2/@EstimatorPhone1Ext[. != '']">
|
<xsl:when test="//Admin2/@EstimatorPhone1Ext[. != '']">
|
||||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/> x<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
|
<xsl:value-of select="//Admin2/@EstimatorPhone1"/> x
|
||||||
|
<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
|
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
|
||||||
@@ -353,7 +364,8 @@
|
|||||||
<xsl:attribute name="Phone2">
|
<xsl:attribute name="Phone2">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin2/@EstimatorPhone2Ext[. != '']">
|
<xsl:when test="//Admin2/@EstimatorPhone2Ext[. != '']">
|
||||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/> x<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
|
<xsl:value-of select="//Admin2/@EstimatorPhone2"/> x
|
||||||
|
<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
|
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
|
||||||
@@ -363,7 +375,8 @@
|
|||||||
<xsl:attribute name="Fax">
|
<xsl:attribute name="Fax">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin2/@EstimatorFaxExt[. != '']">
|
<xsl:when test="//Admin2/@EstimatorFaxExt[. != '']">
|
||||||
<xsl:value-of select="//Admin2/@EstimatorFax"/> x<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
|
<xsl:value-of select="//Admin2/@EstimatorFax"/> x
|
||||||
|
<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin2/@EstimatorFax"/>
|
<xsl:value-of select="//Admin2/@EstimatorFax"/>
|
||||||
@@ -379,7 +392,8 @@
|
|||||||
<xsl:if test="string-length(//Admin2/@VehicleInDate)>6">
|
<xsl:if test="string-length(//Admin2/@VehicleInDate)>6">
|
||||||
<xsl:value-of select="substring-before(//Admin2/@VehicleInDate, ' ')"/>
|
<xsl:value-of select="substring-before(//Admin2/@VehicleInDate, ' ')"/>
|
||||||
<xsl:if test="string-length(//Admin2/@VehicleInTime)=4">
|
<xsl:if test="string-length(//Admin2/@VehicleInTime)=4">
|
||||||
 <xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
|
 <xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:
|
||||||
|
<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
@@ -387,7 +401,8 @@
|
|||||||
<xsl:if test="string-length(//Admin2/@TargetVehicleOutDate)>6">
|
<xsl:if test="string-length(//Admin2/@TargetVehicleOutDate)>6">
|
||||||
<xsl:value-of select="substring-before(//Admin2/@TargetVehicleOutDate,' ')"/>
|
<xsl:value-of select="substring-before(//Admin2/@TargetVehicleOutDate,' ')"/>
|
||||||
<xsl:if test="string-length(//Admin2/@TargetVehicleOutTime)=4">
|
<xsl:if test="string-length(//Admin2/@TargetVehicleOutTime)=4">
|
||||||
 <xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
|
 <xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:
|
||||||
|
<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
@@ -395,7 +410,8 @@
|
|||||||
<xsl:if test="string-length(//Admin2/@VehicleOutDate)>6">
|
<xsl:if test="string-length(//Admin2/@VehicleOutDate)>6">
|
||||||
<xsl:value-of select="substring-before(//Admin2/@VehicleOutDate, ' ')"/>
|
<xsl:value-of select="substring-before(//Admin2/@VehicleOutDate, ' ')"/>
|
||||||
<xsl:if test="string-length(//Admin2/@VehicleOutTime)=4">
|
<xsl:if test="string-length(//Admin2/@VehicleOutTime)=4">
|
||||||
 <xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
|
 <xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:
|
||||||
|
<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
@@ -405,16 +421,16 @@
|
|||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<xsl:template match="PartsList">
|
<xsl:template match="PartsList">
|
||||||
<xsl:element name="PartsList" >
|
<xsl:element name="PartsList">
|
||||||
<xsl:for-each select="Part">
|
<xsl:for-each select="Part">
|
||||||
<xsl:element name="Part" >
|
<xsl:element name="Part">
|
||||||
<!-- Part number translation rules -->
|
<!-- Part number translation rules -->
|
||||||
<xsl:variable name="OEMPartNumber">
|
<xsl:variable name="OEMPartNumber">
|
||||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) != ' GM PART'">
|
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) != ' GM PART'">
|
||||||
<xsl:value-of select="@TDPartNum" />
|
<xsl:value-of select="@TDPartNum"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
|
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
|
||||||
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')" />
|
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="AltPartNumber">
|
<xsl:variable name="AltPartNumber">
|
||||||
@@ -457,20 +473,22 @@
|
|||||||
<xsl:value-of select="$PrimaryPartNumber"/>
|
<xsl:value-of select="$PrimaryPartNumber"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="AltPartNum">
|
<xsl:attribute name="AltPartNum">
|
||||||
<xsl:value-of select="$SecondaryPartNumber" />
|
<xsl:value-of select="$SecondaryPartNumber"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="ExternalPartType">
|
<xsl:attribute name="ExternalPartType">
|
||||||
<xsl:value-of select="$PrimaryPartType" />
|
<xsl:value-of select="$PrimaryPartType"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="ExternalAltPartType">
|
<xsl:attribute name="ExternalAltPartType">
|
||||||
<xsl:value-of select="$SecondaryPartType" />
|
<xsl:value-of select="$SecondaryPartType"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDPartType">
|
<xsl:attribute name="TDPartType">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$PrimaryPartType='PAN' or $PrimaryPartType='PAP'">1</xsl:when>
|
<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='PAA' or $PrimaryPartType='PATR'">2</xsl:when>
|
||||||
<xsl:when test="$PrimaryPartType='PAL'">3</xsl:when>
|
<xsl:when test="$PrimaryPartType='PAL'">3</xsl:when>
|
||||||
<xsl:when test="$PrimaryPartType='PAM' or $PrimaryPartType='PAC' or $PrimaryPartType='PAR'">4</xsl:when>
|
<xsl:when test="$PrimaryPartType='PAM' or $PrimaryPartType='PAC' or $PrimaryPartType='PAR'">
|
||||||
|
4
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>0</xsl:otherwise>
|
<xsl:otherwise>0</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
@@ -479,64 +497,67 @@
|
|||||||
<xsl:when test="$SecondaryPartType='PAN'">1</xsl:when>
|
<xsl:when test="$SecondaryPartType='PAN'">1</xsl:when>
|
||||||
<xsl:when test="$SecondaryPartType='PAA' or $SecondaryPartType='PATR'">2</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='PAL'">3</xsl:when>
|
||||||
<xsl:when test="$SecondaryPartType='PAM' or $SecondaryPartType='PAC' or $SecondaryPartType='PAR'">4</xsl:when>
|
<xsl:when
|
||||||
|
test="$SecondaryPartType='PAM' or $SecondaryPartType='PAC' or $SecondaryPartType='PAR'">
|
||||||
|
4
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>0</xsl:otherwise>
|
<xsl:otherwise>0</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDPartDesc">
|
<xsl:attribute name="TDPartDesc">
|
||||||
<xsl:value-of select="@TDPartDesc" />
|
<xsl:value-of select="@TDPartDesc"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDEstimate">
|
<xsl:attribute name="TDEstimate">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@PartType='PAN'">
|
<xsl:when test="@PartType='PAN'">
|
||||||
<xsl:value-of select="@TDEstimate" />
|
<xsl:value-of select="@TDEstimate"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@PartType='PAM'">
|
<xsl:when test="@PartType='PAM'">
|
||||||
<xsl:value-of select="@ActPrice" />
|
<xsl:value-of select="@ActPrice"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@PartType='PAA'">
|
<xsl:when test="@PartType='PAA'">
|
||||||
<xsl:value-of select="@ActPrice" />
|
<xsl:value-of select="@ActPrice"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@PartType='PAL'">
|
<xsl:when test="@PartType='PAL'">
|
||||||
<xsl:value-of select="@ActPrice" />
|
<xsl:value-of select="@ActPrice"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="@ActPrice" />
|
<xsl:value-of select="@ActPrice"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDPartQty">
|
<xsl:attribute name="TDPartQty">
|
||||||
<xsl:value-of select="@TDPartQty" />
|
<xsl:value-of select="@TDPartQty"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="LineNumber">
|
<xsl:attribute name="LineNumber">
|
||||||
<xsl:value-of select="@LineNumber" />
|
<xsl:value-of select="@LineNumber"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="SequenceNumber">
|
<xsl:attribute name="SequenceNumber">
|
||||||
<xsl:value-of select="@SequenceNumber" />
|
<xsl:value-of select="@SequenceNumber"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="SupplLevel">
|
<xsl:attribute name="SupplLevel">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@SupplementLevel = 'E'">0</xsl:when>
|
<xsl:when test="@SupplementLevel = 'E'">0</xsl:when>
|
||||||
<xsl:when test="substring(@SupplementLevel, 1, 1) = 'S'">
|
<xsl:when test="substring(@SupplementLevel, 1, 1) = 'S'">
|
||||||
<xsl:value-of select="substring(@SupplementLevel, 2)" />
|
<xsl:value-of select="substring(@SupplementLevel, 2)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>0</xsl:otherwise>
|
<xsl:otherwise>0</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="LaborType">
|
<xsl:attribute name="LaborType">
|
||||||
<xsl:value-of select="@LaborType" />
|
<xsl:value-of select="@LaborType"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="LaborHours">
|
<xsl:attribute name="LaborHours">
|
||||||
<xsl:value-of select="@LaborHours" />
|
<xsl:value-of select="@LaborHours"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="OperationCode">
|
<xsl:attribute name="OperationCode">
|
||||||
<xsl:value-of select="@LaborOp" />
|
<xsl:value-of select="@LaborOp"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="PriceIncluded">
|
<xsl:attribute name="PriceIncluded">
|
||||||
<xsl:value-of select="@PriceIncluded" />
|
<xsl:value-of select="@PriceIncluded"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="MarkUp">
|
<xsl:attribute name="MarkUp">
|
||||||
<xsl:value-of select="@MarkUp" />
|
<xsl:value-of select="@MarkUp"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="CLPart">
|
<xsl:attribute name="CLPart">
|
||||||
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
|
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
|
||||||
@@ -546,11 +567,16 @@
|
|||||||
<!-- If LaborOp is OP1, then allow the part to import CP 12/28/08 for Shop Client Release 4.1.4 -->
|
<!-- If LaborOp is OP1, then allow the part to import CP 12/28/08 for Shop Client Release 4.1.4 -->
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@TransactionCode='3'">False</xsl:when>
|
<xsl:when test="@TransactionCode='3'">False</xsl:when>
|
||||||
<xsl:when test="@TransactionCode='1' or @TransactionCode=' ' or @TransactionCode='' or @TransactionCode='2'">
|
<xsl:when
|
||||||
|
test="@TransactionCode='1' or @TransactionCode=' ' or @TransactionCode='' or @TransactionCode='2'">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAC' or @PartType='PATR'">
|
<xsl:when
|
||||||
|
test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAC' or @PartType='PATR'">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">False</xsl:when>
|
<xsl:when
|
||||||
|
test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">
|
||||||
|
False
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<!--xsl:when test="@LaborOp='OP0'">False</xsl:when -->
|
<!--xsl:when test="@LaborOp='OP0'">False</xsl:when -->
|
||||||
|
|||||||
@@ -1,128 +1,223 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<TranslationDescriptor>
|
<TranslationDescriptor>
|
||||||
<FileTranslations FormatName="ADP EMS" ElementName="Estimate" Description="Translation Descriptor for a ADP ShopLink Estimate, Version EMS 2.0">
|
<FileTranslations FormatName="ADP EMS" ElementName="Estimate"
|
||||||
|
Description="Translation Descriptor for a ADP ShopLink Estimate, Version EMS 2.0">
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.env">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.env">
|
||||||
<DBFFileTranslation ID="ID1" ElementName="Envelope" Description="Envelope Table">
|
<DBFFileTranslation ID="ID1" ElementName="Envelope" Description="Envelope Table">
|
||||||
<DBFFieldSpec FieldName="RO_ID" Form="attribute" Name="RONum" FieldType="" Description="RO Number"/>
|
<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="UNQFILE_ID" Form="attribute" Name="UniqueFileID" FieldType=""
|
||||||
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType="" Description="Estimate File Identifier"/>
|
Description="Unique File Identifier"/>
|
||||||
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean" Description="Includes Admin Info Flag"/>
|
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean" Description="Includes Vehicle Info Flag"/>
|
Description="Estimate File Identifier"/>
|
||||||
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean" Description="Includes Estimate Info Flag"/>
|
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean"
|
||||||
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean" Description="Includes Profile Info Flag"/>
|
Description="Includes Admin Info Flag"/>
|
||||||
<DBFFieldSpec FieldName="INCL_TOTAL" Form="attribute" Name="IncludesTotalsInfo" FieldType="Boolean" Description="Includes Totals Info Flag"/>
|
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean"
|
||||||
<DBFFieldSpec FieldName="INCL_VENDR" Form="attribute" Name="IncludesVendorInfo" FieldType="Boolean" Description="Includes Vendor Info Flag"/>
|
Description="Includes Vehicle Info Flag"/>
|
||||||
<DBFFieldSpec FieldName="EMS_VER" Form="attribute" Name="EMSVersion" FieldType="" Description="EMS Version Number"/>
|
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean"
|
||||||
<DBFFieldSpec FieldName="SUPP_NO" Form="attribute" Name="SupplementNum" FieldType="" Description="Supplement Number"/>
|
Description="Includes Estimate Info Flag"/>
|
||||||
<DBFFieldSpec FieldName="TRANS_TYPE" Form="attribute" Name="TransactionType" FieldType="" Description="Transaction Type"/>
|
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean"
|
||||||
<DBFFieldSpec FieldName="EST_SYSTEM" Form="attribute" Name="EstimatingSystem" FieldType="" Description="Estimating System Software"/>
|
Description="Includes Profile Info Flag"/>
|
||||||
<DBFFieldSpec FieldName="SW_VERSION" Form="attribute" Name="SoftwareVersion" FieldType="" Description="Software Version Identifier"/>
|
<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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.LIN">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.LIN">
|
||||||
<DBFFileTranslation ID="ID2" ElementSetName="PartsList" ElementName="Part" Description="Parts List Table">
|
<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="OEM_PARTNO" Form="attribute" Name="TDPartNum" FieldType=""
|
||||||
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType="" Description="Alternate Part Number"/>
|
Description="Part Number"/>
|
||||||
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType="" Description="Actual Part Price"/>
|
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType=""
|
||||||
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType="" Description="Part Description"/>
|
Description="Alternate Part Number"/>
|
||||||
<DBFFieldSpec FieldName="DB_PRICE" Form="attribute" Name="TDEstimate" FieldType="" Description="DB_Price"/>
|
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType=""
|
||||||
<DBFFieldSpec FieldName="PART_QTY" Form="attribute" Name="TDPartQty" FieldType="" Description="Part Quantity"/>
|
Description="Actual Part Price"/>
|
||||||
<DBFFieldSpec FieldName="PART_TYPE" Form="attribute" Name="PartType" FieldType="" Description="Part Type"/>
|
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType=""
|
||||||
<DBFFieldSpec FieldName="MOD_LBR_TY" Form="attribute" Name="LaborType" FieldType="" Description="Labor Type"/>
|
Description="Part Description"/>
|
||||||
<DBFFieldSpec FieldName="MOD_LB_HRS" Form="attribute" Name="LaborHours" FieldType="" Description="Labor Hours"/>
|
<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="LBR_OP" Form="attribute" Name="LaborOp" FieldType="" Description="Labor Op"/>
|
||||||
<DBFFieldSpec FieldName="LINE_NO" Form="attribute" Name="LineNumber" FieldType="" Description="Line number"/>
|
<DBFFieldSpec FieldName="LINE_NO" Form="attribute" Name="LineNumber" FieldType=""
|
||||||
|
Description="Line number"/>
|
||||||
<DBFFieldSpec FieldName="UNQ_SEQ" Form="attribute" Name="SequenceNumber" FieldType="" Description=""/>
|
<DBFFieldSpec FieldName="UNQ_SEQ" Form="attribute" Name="SequenceNumber" FieldType="" Description=""/>
|
||||||
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType="" Description="Supplement Level"/>
|
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType=""
|
||||||
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType="" Description="Transaction Code"/>
|
Description="Supplement Level"/>
|
||||||
<DBFFieldSpec FieldName="PRICE_INC" Form="attribute" Name="PriceIncluded" FieldType="" Description="Price Included"/>
|
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType=""
|
||||||
<DBFFieldSpec FieldName="PRT_DSMK_P" Form="attribute" Name="MarkUp" FieldType="" Description="Price Mark up for non OEM parts"/>
|
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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.VEH">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.VEH">
|
||||||
<DBFFileTranslation ID="ID3" ElementName="Vehicle" Description="Vehicle Table">
|
<DBFFileTranslation ID="ID3" ElementName="Vehicle" Description="Vehicle Table">
|
||||||
<DBFFieldSpec FieldName="V_VIN" Form="attribute" Name="TransVIN" FieldType="" Description=""/>
|
<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_MODEL_YR" Form="attribute" Name="TransYear" FieldType=""
|
||||||
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType="" Description="V_MAKEDESC"/>
|
Description="V_MODEL_YR"/>
|
||||||
<DBFFieldSpec FieldName="V_MAKECODE" Form="attribute" Name="ManufCode" FieldType="" Description="V_MAKECODE"/>
|
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType=""
|
||||||
<DBFFieldSpec FieldName="V_MODEL" Form="attribute" Name="TransModel" FieldType="" Description="V_MODEL"/>
|
Description="V_MAKEDESC"/>
|
||||||
<DBFFieldSpec FieldName="V_MILEAGE" Form="attribute" Name="TransMileage" FieldType="" Description="V_MILEAGE"/>
|
<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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD1">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD1">
|
||||||
<DBFFileTranslation ID="ID4" ElementName="Admin" Description="Administrative information">
|
<DBFFileTranslation ID="ID4" ElementName="Admin" Description="Administrative information">
|
||||||
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType="" Description="Owner Lastname"/>
|
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType="" Description="Owner Firstname"/>
|
Description="Owner Lastname"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType="" Description="Owner Company Name"/>
|
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType="" Description="Owner Title"/>
|
Description="Owner Firstname"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType="" Description="Owner Address Line 1"/>
|
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType="" Description="Owner Address Line 2"/>
|
Description="Owner Company Name"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType="" Description="Owner City"/>
|
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType="" Description="Owner State"/>
|
Description="Owner Title"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType="" Description="Owner Zip"/>
|
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType="" Description="Owner Country"/>
|
Description="Owner Address Line 1"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType="" Description="Owner Primary Phone"/>
|
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType="" Description="Owner Primary Phone Extension"/>
|
Description="Owner Address Line 2"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType="" Description="Owner Secondary Phone"/>
|
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType="" Description="Owner Secondary Phone Extension"/>
|
Description="Owner City"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType="" Description="Owner Fax"/>
|
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType="" Description="Owner Fax Extension"/>
|
Description="Owner State"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType="" Description="Owner Email Address"/>
|
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_CO_NM" Form="attribute" Name="InsuranceCompanyName" FieldType="" Description="Insurance Company Name"/>
|
Description="Owner Zip"/>
|
||||||
<DBFFieldSpec FieldName="INS_CO_ID" Form="attribute" Name="InsuranceCompanyID" FieldType="" Description="Insurance Company Identifier"/>
|
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_ADDR1" Form="attribute" Name="InsuranceAddr1" FieldType="" Description="Insurance Address Line 1"/>
|
Description="Owner Country"/>
|
||||||
<DBFFieldSpec FieldName="INS_ADDR2" Form="attribute" Name="InsuranceAddr2" FieldType="" Description="Insurance Address Line 2"/>
|
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_CITY" Form="attribute" Name="InsuranceCity" FieldType="" Description="Insurance City"/>
|
Description="Owner Primary Phone"/>
|
||||||
<DBFFieldSpec FieldName="INS_ST" Form="attribute" Name="InsuranceState" FieldType="" Description="Insurance State"/>
|
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_ZIP" Form="attribute" Name="InsuranceZip" FieldType="" Description="Insurance Zip"/>
|
Description="Owner Primary Phone Extension"/>
|
||||||
<DBFFieldSpec FieldName="INS_CTRY" Form="attribute" Name="InsuranceCountry" FieldType="" Description="Insurance Country"/>
|
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_PH1" Form="attribute" Name="InsurancePhone1" FieldType="" Description="Insurance Primary Phone"/>
|
Description="Owner Secondary Phone"/>
|
||||||
<DBFFieldSpec FieldName="INS_PH1X" Form="attribute" Name="InsurancePhone1Ext" FieldType="" Description="Insurance Primary Phone Extension"/>
|
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_PH2" Form="attribute" Name="InsurancePhone2" FieldType="" Description="Insurance Secondary Phone"/>
|
Description="Owner Secondary Phone Extension"/>
|
||||||
<DBFFieldSpec FieldName="INS_PH2X" Form="attribute" Name="InsurancePhone2Ext" FieldType="" Description="Insurance Secondary Phone Extension"/>
|
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_FAX" Form="attribute" Name="InsuranceFax" FieldType="" Description="Insurance Fax"/>
|
Description="Owner Fax"/>
|
||||||
<DBFFieldSpec FieldName="INS_FAXX" Form="attribute" Name="InsuranceFaxExt" FieldType="" Description="Insurance Fax Extension"/>
|
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_EA" Form="attribute" Name="InsuranceEmail" FieldType="" Description="Insurance Email Address"/>
|
Description="Owner Fax Extension"/>
|
||||||
<DBFFieldSpec FieldName="INSD_LN" Form="attribute" Name="InsuranceLName" FieldType="" Description="Insurance Last Name"/>
|
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType=""
|
||||||
<DBFFieldSpec FieldName="CLM_NO" Form="attribute" Name="ClaimNumber" FieldType="" Description="Claim Number"/>
|
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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD2">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD2">
|
||||||
<DBFFileTranslation ID="ID5" ElementName="Admin2" Description="Administrative information2">
|
<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_LN" Form="attribute" Name="EstimatorL" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType="" Description="Estimator Firstname"/>
|
Description="Estimator Lastname"/>
|
||||||
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType="" Description="Estimator Company Name"/>
|
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType="" Description="Estimator Company Identifier"/>
|
Description="Estimator Firstname"/>
|
||||||
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType="" Description="Estimator Address1"/>
|
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType="" Description="Estimator Address2"/>
|
Description="Estimator Company Name"/>
|
||||||
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType="" Description="Estimator City"/>
|
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType="" Description="Estimator State"/>
|
Description="Estimator Company Identifier"/>
|
||||||
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType="" Description="Estimator Zip"/>
|
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType="" Description="Estimator Country"/>
|
Description="Estimator Address1"/>
|
||||||
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType="" Description="Estimator Primary Phone"/>
|
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType="" Description="Estimator Primary Phone Extension"/>
|
Description="Estimator Address2"/>
|
||||||
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType="" Description="Estimator Secondary Phone"/>
|
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_PH2X" Form="attribute" Name="EstimatorPhone2Ext" FieldType="" Description="Estimator Secondary Phone Extension"/>
|
Description="Estimator City"/>
|
||||||
<DBFFieldSpec FieldName="EST_FAX" Form="attribute" Name="EstimatorFax" FieldType="" Description="Estimator Fax"/>
|
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_FAXX" Form="attribute" Name="EstimatorFaxExt" FieldType="" Description="Estimator Fax Extension"/>
|
Description="Estimator State"/>
|
||||||
<DBFFieldSpec FieldName="EST_EA" Form="attribute" Name="EstimatorEmail" FieldType="" Description="Estimator Email Address"/>
|
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_LIC_NO" Form="attribute" Name="EstimatorLicenseNumber" FieldType="" Description="Estimator License Number"/>
|
Description="Estimator Zip"/>
|
||||||
<DBFFieldSpec FieldName="EST_FILENO" Form="attribute" Name="EstimatorFileNumber" FieldType="" Description="Estimator File Number"/>
|
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType=""
|
||||||
<DBFFieldSpec FieldName="RO_IN_DATE" Form="attribute" Name="VehicleInDate" FieldType="" Description="Date arrived in shop"/>
|
Description="Estimator Country"/>
|
||||||
<DBFFieldSpec FieldName="RO_IN_TIME" Form="attribute" Name="VehicleInTime" FieldType="" Description="Time arrived in shop"/>
|
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType=""
|
||||||
<DBFFieldSpec FieldName="TAR_DATE" Form="attribute" Name="TargetVehicleOutDate" FieldType="" Description="Target date to be completed"/>
|
Description="Estimator Primary Phone"/>
|
||||||
<DBFFieldSpec FieldName="TAR_TIME" Form="attribute" Name="TargetVehicleOutTime" FieldType="" Description="Target time to be completed"/>
|
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType=""
|
||||||
<DBFFieldSpec FieldName="RO_CMPDATE" Form="attribute" Name="VehicleOutDate" FieldType="" Description="Date completed"/>
|
Description="Estimator Primary Phone Extension"/>
|
||||||
<DBFFieldSpec FieldName="RO_CMPTIME" Form="attribute" Name="VehicleOutTime" FieldType="" Description="Time completed"/>
|
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType=""
|
||||||
<DBFFieldSpec FieldName="RF_CITY" Form="attribute" Name="BodyShopCity" FieldType="" Description="Body Shop City"/>
|
Description="Estimator Secondary Phone"/>
|
||||||
<DBFFieldSpec FieldName="RF_CO_NM" Form="attribute" Name="BodyShopName" FieldType="" Description="Body Shop Name"/>
|
<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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.TTL">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.TTL">
|
||||||
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
|
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
|
||||||
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType="" Description=""/>
|
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType=""
|
||||||
</DBFFileTranslation>
|
Description=""/>
|
||||||
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
</FileTranslations>
|
</FileTranslations>
|
||||||
<StyleSheetTranslation>
|
<StyleSheetTranslation>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:for-each select="//TranslatedData">
|
<xsl:for-each select="//TranslatedData">
|
||||||
<xsl:element name="TranslatedData">
|
<xsl:element name="TranslatedData">
|
||||||
@@ -9,23 +8,23 @@
|
|||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="Details/@PrgID">
|
<xsl:when test="Details/@PrgID">
|
||||||
<xsl:copy-of select="Details" />
|
<xsl:copy-of select="Details"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:element name="Details">
|
<xsl:element name="Details">
|
||||||
<xsl:attribute name="PrgID">OECTrans.ImportTrans</xsl:attribute>
|
<xsl:attribute name="PrgID">OECTrans.ImportTrans</xsl:attribute>
|
||||||
<xsl:for-each select="Details/@*">
|
<xsl:for-each select="Details/@*">
|
||||||
<xsl:copy-of select="." />
|
<xsl:copy-of select="."/>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
<xsl:for-each select="Details/*">
|
<xsl:for-each select="Details/*">
|
||||||
<xsl:copy-of select="." />
|
<xsl:copy-of select="."/>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:element name="Header">
|
<xsl:element name="Header">
|
||||||
<xsl:attribute name="RONum">
|
<xsl:attribute name="RONum">
|
||||||
<xsl:value-of select="//Envelope/@RONum" />
|
<xsl:value-of select="//Envelope/@RONum"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="OwnerFName">
|
<xsl:attribute name="OwnerFName">
|
||||||
<xsl:value-of select="//Admin/@OwnerF"/>
|
<xsl:value-of select="//Admin/@OwnerF"/>
|
||||||
@@ -34,43 +33,43 @@
|
|||||||
<xsl:value-of select="//Admin/@OwnerL"/>
|
<xsl:value-of select="//Admin/@OwnerL"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="VIN">
|
<xsl:attribute name="VIN">
|
||||||
<xsl:value-of select="//Vehicle/@TransVIN" />
|
<xsl:value-of select="//Vehicle/@TransVIN"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Mileage">
|
<xsl:attribute name="Mileage">
|
||||||
<xsl:value-of select="//Vehicle/@TransMileage" />
|
<xsl:value-of select="//Vehicle/@TransMileage"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Year">
|
<xsl:attribute name="Year">
|
||||||
<xsl:value-of select="//Vehicle/@TransYear" />
|
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Make">
|
<xsl:attribute name="Make">
|
||||||
<xsl:if test="//Vehicle/@ManufName[. != '']" >
|
<xsl:if test="//Vehicle/@ManufName[. != '']">
|
||||||
<xsl:value-of select="//Vehicle/@ManufName" />
|
<xsl:value-of select="//Vehicle/@ManufName"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="//Vehicle/@ManufName[. = '']" >
|
<xsl:if test="//Vehicle/@ManufName[. = '']">
|
||||||
<xsl:value-of select="//Vehicle/@ManufCode" />
|
<xsl:value-of select="//Vehicle/@ManufCode"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Model">
|
<xsl:attribute name="Model">
|
||||||
<xsl:value-of select="//Vehicle/@TransModel" />
|
<xsl:value-of select="//Vehicle/@TransModel"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Description">
|
<xsl:attribute name="Description">
|
||||||
<xsl:value-of select="//Vehicle/@TransYear" />
|
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text></xsl:text>
|
||||||
<xsl:value-of select="//Vehicle/@ManufName" />
|
<xsl:value-of select="//Vehicle/@ManufName"/>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text></xsl:text>
|
||||||
<xsl:value-of select="//Vehicle/@TransModel" />
|
<xsl:value-of select="//Vehicle/@TransModel"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="LastSupplLevel">
|
<xsl:attribute name="LastSupplLevel">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Envelope/@TransactionType = 'E'">0</xsl:when>
|
<xsl:when test="//Envelope/@TransactionType = 'E'">0</xsl:when>
|
||||||
<xsl:when test="//Envelope/@TransactionType = 'S'">
|
<xsl:when test="//Envelope/@TransactionType = 'S'">
|
||||||
<xsl:value-of select="substring(//Envelope/@SupplementNum, 2)" />
|
<xsl:value-of select="substring(//Envelope/@SupplementNum, 2)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>0</xsl:otherwise>
|
<xsl:otherwise>0</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:apply-templates select="PartsList" />
|
<xsl:apply-templates select="PartsList"/>
|
||||||
<xsl:element name="Envelope">
|
<xsl:element name="Envelope">
|
||||||
<xsl:element name="Software">
|
<xsl:element name="Software">
|
||||||
<xsl:attribute name="Manifest">CCC.xml</xsl:attribute>
|
<xsl:attribute name="Manifest">CCC.xml</xsl:attribute>
|
||||||
@@ -91,10 +90,13 @@
|
|||||||
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="EstimateID">
|
<xsl:attribute name="EstimateID">
|
||||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@SoftwareVersion"/>-<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of
|
||||||
|
select="//Envelope/@SoftwareVersion"/>-
|
||||||
|
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="EstimateIDv2">
|
<xsl:attribute name="EstimateIDv2">
|
||||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-
|
||||||
|
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="EstimateFormatVersion">
|
<xsl:attribute name="EstimateFormatVersion">
|
||||||
<xsl:value-of select="//Envelope/@EMSVersion"/>
|
<xsl:value-of select="//Envelope/@EMSVersion"/>
|
||||||
@@ -102,9 +104,9 @@
|
|||||||
</xsl:element>
|
</xsl:element>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:element name="Totals">
|
<xsl:element name="Totals">
|
||||||
<xsl:attribute name="GrandTotalAmount">
|
<xsl:attribute name="GrandTotalAmount">
|
||||||
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:element name="Administrative">
|
<xsl:element name="Administrative">
|
||||||
<xsl:element name="Owner">
|
<xsl:element name="Owner">
|
||||||
@@ -215,7 +217,8 @@
|
|||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(substring-before(//Admin/@InsuranceZip, '-'))=5">
|
<xsl:when test="string-length(substring-before(//Admin/@InsuranceZip, '-'))=5">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
|
<xsl:when
|
||||||
|
test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
|
||||||
<xsl:value-of select="//Admin/@InsuranceZip"/>
|
<xsl:value-of select="//Admin/@InsuranceZip"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
@@ -226,7 +229,8 @@
|
|||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="string-length(//Admin/@InsuranceZip)=9">
|
<xsl:when test="string-length(//Admin/@InsuranceZip)=9">
|
||||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
|
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-
|
||||||
|
<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="string-length(//Admin/@InsuranceZip)>4">
|
<xsl:when test="string-length(//Admin/@InsuranceZip)>4">
|
||||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
||||||
@@ -239,7 +243,8 @@
|
|||||||
<xsl:attribute name="Phone">
|
<xsl:attribute name="Phone">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin/@InsurancePhone1Ext[. != '']">
|
<xsl:when test="//Admin/@InsurancePhone1Ext[. != '']">
|
||||||
<xsl:value-of select="//Admin/@InsurancePhone1"/> x<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
|
<xsl:value-of select="//Admin/@InsurancePhone1"/> x
|
||||||
|
<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin/@InsurancePhone1"/>
|
<xsl:value-of select="//Admin/@InsurancePhone1"/>
|
||||||
@@ -249,7 +254,8 @@
|
|||||||
<xsl:attribute name="Phone2">
|
<xsl:attribute name="Phone2">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin/@InsurancePhone2Ext[. != '']">
|
<xsl:when test="//Admin/@InsurancePhone2Ext[. != '']">
|
||||||
<xsl:value-of select="//Admin/@InsurancePhone2"/> x<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
|
<xsl:value-of select="//Admin/@InsurancePhone2"/> x
|
||||||
|
<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin/@InsurancePhone2"/>
|
<xsl:value-of select="//Admin/@InsurancePhone2"/>
|
||||||
@@ -259,7 +265,8 @@
|
|||||||
<xsl:attribute name="Fax">
|
<xsl:attribute name="Fax">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin/@InsuranceFaxExt[. != '']">
|
<xsl:when test="//Admin/@InsuranceFaxExt[. != '']">
|
||||||
<xsl:value-of select="//Admin/@InsuranceFax"/> x<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
|
<xsl:value-of select="//Admin/@InsuranceFax"/> x
|
||||||
|
<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin/@InsuranceFax"/>
|
<xsl:value-of select="//Admin/@InsuranceFax"/>
|
||||||
@@ -272,7 +279,7 @@
|
|||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:element name="Insured">
|
<xsl:element name="Insured">
|
||||||
<xsl:attribute name="LastName">
|
<xsl:attribute name="LastName">
|
||||||
<xsl:value-of select="//Admin/@InsuranceLName" />
|
<xsl:value-of select="//Admin/@InsuranceLName"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:element name="Claim">
|
<xsl:element name="Claim">
|
||||||
@@ -308,7 +315,8 @@
|
|||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(substring-before(//Admin2/@EstimatorZip, '-'))=5">
|
<xsl:when test="string-length(substring-before(//Admin2/@EstimatorZip, '-'))=5">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
|
<xsl:when
|
||||||
|
test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
|
||||||
<xsl:value-of select="//Admin2/@EstimatorZip"/>
|
<xsl:value-of select="//Admin2/@EstimatorZip"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
@@ -319,7 +327,8 @@
|
|||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)=9">
|
<xsl:when test="string-length(//Admin2/@EstimatorZip)=9">
|
||||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
|
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-
|
||||||
|
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)>4">
|
<xsl:when test="string-length(//Admin2/@EstimatorZip)>4">
|
||||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
||||||
@@ -332,7 +341,8 @@
|
|||||||
<xsl:attribute name="Phone">
|
<xsl:attribute name="Phone">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin2/@EstimatorPhone1Ext[. != '']">
|
<xsl:when test="//Admin2/@EstimatorPhone1Ext[. != '']">
|
||||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/> x<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
|
<xsl:value-of select="//Admin2/@EstimatorPhone1"/> x
|
||||||
|
<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
|
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
|
||||||
@@ -342,7 +352,8 @@
|
|||||||
<xsl:attribute name="Phone2">
|
<xsl:attribute name="Phone2">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin2/@EstimatorPhone2Ext[. != '']">
|
<xsl:when test="//Admin2/@EstimatorPhone2Ext[. != '']">
|
||||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/> x<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
|
<xsl:value-of select="//Admin2/@EstimatorPhone2"/> x
|
||||||
|
<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
|
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
|
||||||
@@ -352,7 +363,8 @@
|
|||||||
<xsl:attribute name="Fax">
|
<xsl:attribute name="Fax">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin2/@EstimatorFaxExt[. != '']">
|
<xsl:when test="//Admin2/@EstimatorFaxExt[. != '']">
|
||||||
<xsl:value-of select="//Admin2/@EstimatorFax"/> x<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
|
<xsl:value-of select="//Admin2/@EstimatorFax"/> x
|
||||||
|
<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin2/@EstimatorFax"/>
|
<xsl:value-of select="//Admin2/@EstimatorFax"/>
|
||||||
@@ -368,7 +380,8 @@
|
|||||||
<xsl:if test="string-length(//Admin2/@VehicleInDate)>6">
|
<xsl:if test="string-length(//Admin2/@VehicleInDate)>6">
|
||||||
<xsl:value-of select="substring-before(//Admin2/@VehicleInDate, ' ')"/>
|
<xsl:value-of select="substring-before(//Admin2/@VehicleInDate, ' ')"/>
|
||||||
<xsl:if test="string-length(//Admin2/@VehicleInTime)=4">
|
<xsl:if test="string-length(//Admin2/@VehicleInTime)=4">
|
||||||
 <xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
|
 <xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:
|
||||||
|
<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
@@ -376,7 +389,8 @@
|
|||||||
<xsl:if test="string-length(//Admin2/@TargetVehicleOutDate)>6">
|
<xsl:if test="string-length(//Admin2/@TargetVehicleOutDate)>6">
|
||||||
<xsl:value-of select="substring-before(//Admin2/@TargetVehicleOutDate,' ')"/>
|
<xsl:value-of select="substring-before(//Admin2/@TargetVehicleOutDate,' ')"/>
|
||||||
<xsl:if test="string-length(//Admin2/@TargetVehicleOutTime)=4">
|
<xsl:if test="string-length(//Admin2/@TargetVehicleOutTime)=4">
|
||||||
 <xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
|
 <xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:
|
||||||
|
<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
@@ -384,7 +398,8 @@
|
|||||||
<xsl:if test="string-length(//Admin2/@VehicleOutDate)>6">
|
<xsl:if test="string-length(//Admin2/@VehicleOutDate)>6">
|
||||||
<xsl:value-of select="substring-before(//Admin2/@VehicleOutDate, ' ')"/>
|
<xsl:value-of select="substring-before(//Admin2/@VehicleOutDate, ' ')"/>
|
||||||
<xsl:if test="string-length(//Admin2/@VehicleOutTime)=4">
|
<xsl:if test="string-length(//Admin2/@VehicleOutTime)=4">
|
||||||
 <xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
|
 <xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:
|
||||||
|
<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
@@ -394,16 +409,16 @@
|
|||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<xsl:template match="PartsList">
|
<xsl:template match="PartsList">
|
||||||
<xsl:element name="PartsList" >
|
<xsl:element name="PartsList">
|
||||||
<xsl:for-each select="Part">
|
<xsl:for-each select="Part">
|
||||||
<xsl:element name="Part" >
|
<xsl:element name="Part">
|
||||||
<!-- Part number translation rules -->
|
<!-- Part number translation rules -->
|
||||||
<xsl:variable name="OEMPartNumber">
|
<xsl:variable name="OEMPartNumber">
|
||||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) != ' GM PART'">
|
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) != ' GM PART'">
|
||||||
<xsl:value-of select="@TDPartNum" />
|
<xsl:value-of select="@TDPartNum"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
|
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
|
||||||
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')" />
|
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="AltPartNumber">
|
<xsl:variable name="AltPartNumber">
|
||||||
@@ -476,13 +491,13 @@
|
|||||||
<xsl:value-of select="$PrimaryPartNumber"/>
|
<xsl:value-of select="$PrimaryPartNumber"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="AltPartNum">
|
<xsl:attribute name="AltPartNum">
|
||||||
<xsl:value-of select="$SecondaryPartNumber" />
|
<xsl:value-of select="$SecondaryPartNumber"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="ExternalPartType">
|
<xsl:attribute name="ExternalPartType">
|
||||||
<xsl:value-of select="$PrimaryPartType" />
|
<xsl:value-of select="$PrimaryPartType"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="ExternalAltPartType">
|
<xsl:attribute name="ExternalAltPartType">
|
||||||
<xsl:value-of select="$SecondaryPartType" />
|
<xsl:value-of select="$SecondaryPartType"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDPartType">
|
<xsl:attribute name="TDPartType">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
@@ -505,56 +520,56 @@
|
|||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDPartDesc">
|
<xsl:attribute name="TDPartDesc">
|
||||||
<xsl:value-of select="@TDPartDesc" />
|
<xsl:value-of select="@TDPartDesc"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDLineRef">
|
<xsl:attribute name="TDLineRef">
|
||||||
<xsl:value-of select="@TDLineRef" />
|
<xsl:value-of select="@TDLineRef"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDEstimate">
|
<xsl:attribute name="TDEstimate">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@PartType='PAN'">
|
<xsl:when test="@PartType='PAN'">
|
||||||
<xsl:value-of select="@TDEstimate" />
|
<xsl:value-of select="@TDEstimate"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@PartType='PAM'">
|
<xsl:when test="@PartType='PAM'">
|
||||||
<xsl:value-of select="@ActPrice" />
|
<xsl:value-of select="@ActPrice"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@PartType='PAA'">
|
<xsl:when test="@PartType='PAA'">
|
||||||
<xsl:value-of select="@ActPrice" />
|
<xsl:value-of select="@ActPrice"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@PartType='PAL'">
|
<xsl:when test="@PartType='PAL'">
|
||||||
<xsl:value-of select="@ActPrice" />
|
<xsl:value-of select="@ActPrice"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="@ActPrice" />
|
<xsl:value-of select="@ActPrice"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDPartQty">
|
<xsl:attribute name="TDPartQty">
|
||||||
<xsl:value-of select="@TDPartQty" />
|
<xsl:value-of select="@TDPartQty"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="LineNumber">
|
<xsl:attribute name="LineNumber">
|
||||||
<xsl:value-of select="@LineNumber" />
|
<xsl:value-of select="@LineNumber"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="SequenceNumber">
|
<xsl:attribute name="SequenceNumber">
|
||||||
<xsl:value-of select="@SequenceNumber" />
|
<xsl:value-of select="@SequenceNumber"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="SupplLevel">
|
<xsl:attribute name="SupplLevel">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@SupplementLevel = 'E01'">0</xsl:when>
|
<xsl:when test="@SupplementLevel = 'E01'">0</xsl:when>
|
||||||
<xsl:when test="substring(@SupplementLevel, 1, 1) = 'S'">
|
<xsl:when test="substring(@SupplementLevel, 1, 1) = 'S'">
|
||||||
<xsl:value-of select="substring(@SupplementLevel, 2)" />
|
<xsl:value-of select="substring(@SupplementLevel, 2)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>0</xsl:otherwise>
|
<xsl:otherwise>0</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="LaborType">
|
<xsl:attribute name="LaborType">
|
||||||
<xsl:value-of select="@LaborType" />
|
<xsl:value-of select="@LaborType"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="LaborHours">
|
<xsl:attribute name="LaborHours">
|
||||||
<xsl:value-of select="@LaborHours" />
|
<xsl:value-of select="@LaborHours"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="OperationCode">
|
<xsl:attribute name="OperationCode">
|
||||||
<xsl:value-of select="@LaborOp" />
|
<xsl:value-of select="@LaborOp"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="CLPart">
|
<xsl:attribute name="CLPart">
|
||||||
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
|
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
|
||||||
@@ -565,10 +580,14 @@
|
|||||||
<xsl:when test="@TransactionCode='3'">False</xsl:when>
|
<xsl:when test="@TransactionCode='3'">False</xsl:when>
|
||||||
<xsl:when test="@TransactionCode='1' or @TransactionCode ='2'">
|
<xsl:when test="@TransactionCode='1' or @TransactionCode ='2'">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAO' or @PartType='PAR' or @PartType=''" >
|
<xsl:when
|
||||||
|
test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAO' or @PartType='PAR' or @PartType=''">
|
||||||
<!-- we now handle blank part types-->
|
<!-- we now handle blank part types-->
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">False</xsl:when>
|
<xsl:when
|
||||||
|
test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">
|
||||||
|
False
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@LaborOp=''">False</xsl:when>
|
<xsl:when test="@LaborOp=''">False</xsl:when>
|
||||||
|
|||||||
@@ -1,126 +1,217 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<TranslationDescriptor>
|
<TranslationDescriptor>
|
||||||
<FileTranslations FormatName="CCC" ElementName="Estimate" Description="Translation Descriptor for a CCC Estimate, Version 2.0">
|
<FileTranslations FormatName="CCC" ElementName="Estimate"
|
||||||
|
Description="Translation Descriptor for a CCC Estimate, Version 2.0">
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.env">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.env">
|
||||||
<DBFFileTranslation ID="ID1" ElementName="Envelope" Description="Envelope Table">
|
<DBFFileTranslation ID="ID1" ElementName="Envelope" Description="Envelope Table">
|
||||||
<DBFFieldSpec FieldName="RO_ID" Form="attribute" Name="RONum" FieldType="" Description="RO Number"/>
|
<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="UNQFILE_ID" Form="attribute" Name="UniqueFileID" FieldType=""
|
||||||
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType="" Description="Estimate File Identifier"/>
|
Description="Unique File Identifier"/>
|
||||||
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean" Description="Includes Admin Info Flag"/>
|
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean" Description="Includes Vehicle Info Flag"/>
|
Description="Estimate File Identifier"/>
|
||||||
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean" Description="Includes Estimate Info Flag"/>
|
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean"
|
||||||
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean" Description="Includes Profile Info Flag"/>
|
Description="Includes Admin Info Flag"/>
|
||||||
<DBFFieldSpec FieldName="INCL_TOTAL" Form="attribute" Name="IncludesTotalsInfo" FieldType="Boolean" Description="Includes Totals Info Flag"/>
|
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean"
|
||||||
<DBFFieldSpec FieldName="INCL_VENDR" Form="attribute" Name="IncludesVendorInfo" FieldType="Boolean" Description="Includes Vendor Info Flag"/>
|
Description="Includes Vehicle Info Flag"/>
|
||||||
<DBFFieldSpec FieldName="EMS_VER" Form="attribute" Name="EMSVersion" FieldType="" Description="EMS Version Number"/>
|
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean"
|
||||||
<DBFFieldSpec FieldName="SUPP_NO" Form="attribute" Name="SupplementNum" FieldType="" Description="Supplement Number"/>
|
Description="Includes Estimate Info Flag"/>
|
||||||
<DBFFieldSpec FieldName="TRANS_TYPE" Form="attribute" Name="TransactionType" FieldType="" Description="Transaction Type"/>
|
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean"
|
||||||
<DBFFieldSpec FieldName="EST_SYSTEM" Form="attribute" Name="EstimatingSystem" FieldType="" Description="Estimating System Software"/>
|
Description="Includes Profile Info Flag"/>
|
||||||
<DBFFieldSpec FieldName="SW_VERSION" Form="attribute" Name="SoftwareVersion" FieldType="" Description="Software Version Identifier"/>
|
<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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.LIN">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.LIN">
|
||||||
<DBFFileTranslation ID="ID2" ElementSetName="PartsList" ElementName="Part" Description="Parts List Table">
|
<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="OEM_PARTNO" Form="attribute" Name="TDPartNum" FieldType=""
|
||||||
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType="" Description="Alternate Part Number"/>
|
Description="Part Number"/>
|
||||||
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType="" Description="Actual Part Price"/>
|
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType=""
|
||||||
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType="" Description="Part Description"/>
|
Description="Alternate Part Number"/>
|
||||||
<DBFFieldSpec FieldName="DB_PRICE" Form="attribute" Name="TDEstimate" FieldType="" Description="DB_Price"/>
|
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType=""
|
||||||
<DBFFieldSpec FieldName="PART_QTY" Form="attribute" Name="TDPartQty" FieldType="" Description="PART_QTY"/>
|
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="LINE_NO" Form="attribute" Name="LineNumber" FieldType="" Description=""/>
|
||||||
<DBFFieldSpec FieldName="UNQ_SEQ" Form="attribute" Name="SequenceNumber" 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="PART_TYPE" Form="attribute" Name="PartType" FieldType=""
|
||||||
<DBFFieldSpec FieldName="MOD_LBR_TY" Form="attribute" Name="LaborType" FieldType="" Description="Labor Type"/>
|
Description="Part Type"/>
|
||||||
<DBFFieldSpec FieldName="MOD_LB_HRS" Form="attribute" Name="LaborHours" FieldType="" Description="Labor Hours"/>
|
<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="LBR_OP" Form="attribute" Name="LaborOp" FieldType="" Description="Labor Op"/>
|
||||||
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType="" Description="Supplement Level"/>
|
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType=""
|
||||||
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType="" Description="Transaction Code"/>
|
Description="Supplement Level"/>
|
||||||
<DBFFieldSpec FieldName="LINE_REF" Form="attribute" Name="TDLineRef" FieldType="" Description="Line Reference Number"/>
|
<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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.VEH">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.VEH">
|
||||||
<DBFFileTranslation ID="ID3" ElementName="Vehicle" Description="Vehicle Table">
|
<DBFFileTranslation ID="ID3" ElementName="Vehicle" Description="Vehicle Table">
|
||||||
<DBFFieldSpec FieldName="V_VIN" Form="attribute" Name="TransVIN" FieldType="" Description="V_VIN"/>
|
<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_MODEL_YR" Form="attribute" Name="TransYear" FieldType=""
|
||||||
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType="" Description="V_MAKEDESC"/>
|
Description="V_MODEL_YR"/>
|
||||||
<DBFFieldSpec FieldName="V_MAKECODE" Form="attribute" Name="ManufCode" FieldType="" Description="V_MAKECODE"/>
|
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType=""
|
||||||
<DBFFieldSpec FieldName="V_MODEL" Form="attribute" Name="TransModel" FieldType="" Description="V_MODEL"/>
|
Description="V_MAKEDESC"/>
|
||||||
<DBFFieldSpec FieldName="V_MILEAGE" Form="attribute" Name="TransMileage" FieldType="" Description="V_MILEAGE"/>
|
<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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD1">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD1">
|
||||||
<DBFFileTranslation ID="ID4" ElementName="Admin" Description="Administrative information">
|
<DBFFileTranslation ID="ID4" ElementName="Admin" Description="Administrative information">
|
||||||
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType="" Description="Owner Lastname"/>
|
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType="" Description="Owner Firstname"/>
|
Description="Owner Lastname"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType="" Description="Owner Company Name"/>
|
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType="" Description="Owner Title"/>
|
Description="Owner Firstname"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType="" Description="Owner Address Line 1"/>
|
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType="" Description="Owner Address Line 2"/>
|
Description="Owner Company Name"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType="" Description="Owner City"/>
|
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType="" Description="Owner State"/>
|
Description="Owner Title"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType="" Description="Owner Zip"/>
|
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType="" Description="Owner Country"/>
|
Description="Owner Address Line 1"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType="" Description="Owner Primary Phone"/>
|
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType="" Description="Owner Primary Phone Extension"/>
|
Description="Owner Address Line 2"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType="" Description="Owner Secondary Phone"/>
|
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType="" Description="Owner Secondary Phone Extension"/>
|
Description="Owner City"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType="" Description="Owner Fax"/>
|
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType="" Description="Owner Fax Extension"/>
|
Description="Owner State"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType="" Description="Owner Email Address"/>
|
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_CO_NM" Form="attribute" Name="InsuranceCompanyName" FieldType="" Description="Insurance Company Name"/>
|
Description="Owner Zip"/>
|
||||||
<DBFFieldSpec FieldName="INS_CO_ID" Form="attribute" Name="InsuranceCompanyID" FieldType="" Description="Insurance Company Identifier"/>
|
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_ADDR1" Form="attribute" Name="InsuranceAddr1" FieldType="" Description="Insurance Address Line 1"/>
|
Description="Owner Country"/>
|
||||||
<DBFFieldSpec FieldName="INS_ADDR2" Form="attribute" Name="InsuranceAddr2" FieldType="" Description="Insurance Address Line 2"/>
|
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_CITY" Form="attribute" Name="InsuranceCity" FieldType="" Description="Insurance City"/>
|
Description="Owner Primary Phone"/>
|
||||||
<DBFFieldSpec FieldName="INS_ST" Form="attribute" Name="InsuranceState" FieldType="" Description="Insurance State"/>
|
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_ZIP" Form="attribute" Name="InsuranceZip" FieldType="" Description="Insurance Zip"/>
|
Description="Owner Primary Phone Extension"/>
|
||||||
<DBFFieldSpec FieldName="INS_CTRY" Form="attribute" Name="InsuranceCountry" FieldType="" Description="Insurance Country"/>
|
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_PH1" Form="attribute" Name="InsurancePhone1" FieldType="" Description="Insurance Primary Phone"/>
|
Description="Owner Secondary Phone"/>
|
||||||
<DBFFieldSpec FieldName="INS_PH1X" Form="attribute" Name="InsurancePhone1Ext" FieldType="" Description="Insurance Primary Phone Extension"/>
|
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_PH2" Form="attribute" Name="InsurancePhone2" FieldType="" Description="Insurance Secondary Phone"/>
|
Description="Owner Secondary Phone Extension"/>
|
||||||
<DBFFieldSpec FieldName="INS_PH2X" Form="attribute" Name="InsurancePhone2Ext" FieldType="" Description="Insurance Secondary Phone Extension"/>
|
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_FAX" Form="attribute" Name="InsuranceFax" FieldType="" Description="Insurance Fax"/>
|
Description="Owner Fax"/>
|
||||||
<DBFFieldSpec FieldName="INS_FAXX" Form="attribute" Name="InsuranceFaxExt" FieldType="" Description="Insurance Fax Extension"/>
|
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_EA" Form="attribute" Name="InsuranceEmail" FieldType="" Description="Insurance Email Address"/>
|
Description="Owner Fax Extension"/>
|
||||||
<DBFFieldSpec FieldName="INSD_LN" Form="attribute" Name="InsuranceLName" FieldType="" Description="Insurance Last Name"/>
|
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType=""
|
||||||
<DBFFieldSpec FieldName="CLM_NO" Form="attribute" Name="ClaimNumber" FieldType="" Description="Claim Number"/>
|
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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD2">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD2">
|
||||||
<DBFFileTranslation ID="ID5" ElementName="Admin2" Description="Administrative information2">
|
<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_LN" Form="attribute" Name="EstimatorL" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType="" Description="Estimator Firstname"/>
|
Description="Estimator Lastname"/>
|
||||||
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType="" Description="Estimator Company Name"/>
|
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType="" Description="Estimator Company Identifier"/>
|
Description="Estimator Firstname"/>
|
||||||
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType="" Description="Estimator Address1"/>
|
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType="" Description="Estimator Address2"/>
|
Description="Estimator Company Name"/>
|
||||||
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType="" Description="Estimator City"/>
|
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType="" Description="Estimator State"/>
|
Description="Estimator Company Identifier"/>
|
||||||
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType="" Description="Estimator Zip"/>
|
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType="" Description="Estimator Country"/>
|
Description="Estimator Address1"/>
|
||||||
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType="" Description="Estimator Primary Phone"/>
|
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType="" Description="Estimator Primary Phone Extension"/>
|
Description="Estimator Address2"/>
|
||||||
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType="" Description="Estimator Secondary Phone"/>
|
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_PH2X" Form="attribute" Name="EstimatorPhone2Ext" FieldType="" Description="Estimator Secondary Phone Extension"/>
|
Description="Estimator City"/>
|
||||||
<DBFFieldSpec FieldName="EST_FAX" Form="attribute" Name="EstimatorFax" FieldType="" Description="Estimator Fax"/>
|
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_FAXX" Form="attribute" Name="EstimatorFaxExt" FieldType="" Description="Estimator Fax Extension"/>
|
Description="Estimator State"/>
|
||||||
<DBFFieldSpec FieldName="EST_EA" Form="attribute" Name="EstimatorEmail" FieldType="" Description="Estimator Email Address"/>
|
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_LIC_NO" Form="attribute" Name="EstimatorLicenseNumber" FieldType="" Description="Estimator License Number"/>
|
Description="Estimator Zip"/>
|
||||||
<DBFFieldSpec FieldName="EST_FILENO" Form="attribute" Name="EstimatorFileNumber" FieldType="" Description="Estimator File Number"/>
|
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType=""
|
||||||
<DBFFieldSpec FieldName="RO_IN_DATE" Form="attribute" Name="VehicleInDate" FieldType="" Description="Date arrived in shop"/>
|
Description="Estimator Country"/>
|
||||||
<DBFFieldSpec FieldName="RO_IN_TIME" Form="attribute" Name="VehicleInTime" FieldType="" Description="Time arrived in shop"/>
|
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType=""
|
||||||
<DBFFieldSpec FieldName="TAR_DATE" Form="attribute" Name="TargetVehicleOutDate" FieldType="" Description="Target date to be completed"/>
|
Description="Estimator Primary Phone"/>
|
||||||
<DBFFieldSpec FieldName="TAR_TIME" Form="attribute" Name="TargetVehicleOutTime" FieldType="" Description="Target time to be completed"/>
|
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType=""
|
||||||
<DBFFieldSpec FieldName="RO_CMPDATE" Form="attribute" Name="VehicleOutDate" FieldType="" Description="Date completed"/>
|
Description="Estimator Primary Phone Extension"/>
|
||||||
<DBFFieldSpec FieldName="RO_CMPTIME" Form="attribute" Name="VehicleOutTime" FieldType="" Description="Time completed"/>
|
<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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.TTL">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.TTL">
|
||||||
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
|
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
|
||||||
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType="" Description=""/>
|
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType=""
|
||||||
</DBFFileTranslation>
|
Description=""/>
|
||||||
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
</FileTranslations>
|
</FileTranslations>
|
||||||
<StyleSheetTranslation>
|
<StyleSheetTranslation>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||||
|
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:for-each select="//TranslatedData">
|
<xsl:for-each select="//TranslatedData">
|
||||||
@@ -9,23 +9,23 @@
|
|||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="Details/@PrgID">
|
<xsl:when test="Details/@PrgID">
|
||||||
<xsl:copy-of select="Details" />
|
<xsl:copy-of select="Details"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:element name="Details">
|
<xsl:element name="Details">
|
||||||
<xsl:attribute name="PrgID">OECTrans.ImportTrans</xsl:attribute>
|
<xsl:attribute name="PrgID">OECTrans.ImportTrans</xsl:attribute>
|
||||||
<xsl:for-each select="Details/@*">
|
<xsl:for-each select="Details/@*">
|
||||||
<xsl:copy-of select="." />
|
<xsl:copy-of select="."/>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
<xsl:for-each select="Details/*">
|
<xsl:for-each select="Details/*">
|
||||||
<xsl:copy-of select="." />
|
<xsl:copy-of select="."/>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:element name="Header">
|
<xsl:element name="Header">
|
||||||
<xsl:attribute name="RONum">
|
<xsl:attribute name="RONum">
|
||||||
<xsl:value-of select="//Envelope/@RONum" />
|
<xsl:value-of select="//Envelope/@RONum"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="OwnerFName">
|
<xsl:attribute name="OwnerFName">
|
||||||
<xsl:value-of select="//Admin/@OwnerF"/>
|
<xsl:value-of select="//Admin/@OwnerF"/>
|
||||||
@@ -34,42 +34,42 @@
|
|||||||
<xsl:value-of select="//Admin/@OwnerL"/>
|
<xsl:value-of select="//Admin/@OwnerL"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="VIN">
|
<xsl:attribute name="VIN">
|
||||||
<xsl:value-of select="//Vehicle/@TransVIN" />
|
<xsl:value-of select="//Vehicle/@TransVIN"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Mileage">
|
<xsl:attribute name="Mileage">
|
||||||
<xsl:value-of select="//Vehicle/@TransMileage" />
|
<xsl:value-of select="//Vehicle/@TransMileage"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Year">
|
<xsl:attribute name="Year">
|
||||||
<xsl:value-of select="//Vehicle/@TransYear" />
|
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Make">
|
<xsl:attribute name="Make">
|
||||||
<xsl:if test="//Vehicle/@ManufName[. != '']" >
|
<xsl:if test="//Vehicle/@ManufName[. != '']">
|
||||||
<xsl:value-of select="//Vehicle/@ManufName" />
|
<xsl:value-of select="//Vehicle/@ManufName"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="//Vehicle/@ManufName[. = '']" >
|
<xsl:if test="//Vehicle/@ManufName[. = '']">
|
||||||
<xsl:value-of select="//Vehicle/@ManufCode" />
|
<xsl:value-of select="//Vehicle/@ManufCode"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Model">
|
<xsl:attribute name="Model">
|
||||||
<xsl:value-of select="//Vehicle/@TransModel" />
|
<xsl:value-of select="//Vehicle/@TransModel"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="Description">
|
<xsl:attribute name="Description">
|
||||||
<xsl:value-of select="//Vehicle/@TransYear" />
|
<xsl:value-of select="//Vehicle/@TransYear"/>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text></xsl:text>
|
||||||
<xsl:value-of select="//Vehicle/@ManufName" />
|
<xsl:value-of select="//Vehicle/@ManufName"/>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text></xsl:text>
|
||||||
<xsl:value-of select="//Vehicle/@TransModel" />
|
<xsl:value-of select="//Vehicle/@TransModel"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="LastSupplLevel">
|
<xsl:attribute name="LastSupplLevel">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(//Envelope/@SupplementNum) > 0">
|
<xsl:when test="string-length(//Envelope/@SupplementNum) > 0">
|
||||||
<xsl:value-of select="//Envelope/@SupplementNum" />
|
<xsl:value-of select="//Envelope/@SupplementNum"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>0</xsl:otherwise>
|
<xsl:otherwise>0</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:apply-templates select="PartsList" />
|
<xsl:apply-templates select="PartsList"/>
|
||||||
<xsl:element name="Envelope">
|
<xsl:element name="Envelope">
|
||||||
<xsl:element name="Software">
|
<xsl:element name="Software">
|
||||||
<xsl:attribute name="Manifest">Mitchell.xml</xsl:attribute>
|
<xsl:attribute name="Manifest">Mitchell.xml</xsl:attribute>
|
||||||
@@ -90,10 +90,13 @@
|
|||||||
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
<xsl:value-of select="//Envelope/@UniqueFileID"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="EstimateID">
|
<xsl:attribute name="EstimateID">
|
||||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@SoftwareVersion"/>-<xsl:value-of select="//Envelope/@EstimateFileID"/>
|
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of
|
||||||
|
select="//Envelope/@SoftwareVersion"/>-
|
||||||
|
<xsl:value-of select="//Envelope/@EstimateFileID"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="EstimateIDv2">
|
<xsl:attribute name="EstimateIDv2">
|
||||||
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@EstimateFileID"/>
|
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-
|
||||||
|
<xsl:value-of select="//Envelope/@EstimateFileID"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="EstimateFormatVersion">
|
<xsl:attribute name="EstimateFormatVersion">
|
||||||
<xsl:value-of select="//Envelope/@EMSVersion"/>
|
<xsl:value-of select="//Envelope/@EMSVersion"/>
|
||||||
@@ -102,7 +105,7 @@
|
|||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:element name="Totals">
|
<xsl:element name="Totals">
|
||||||
<xsl:attribute name="GrandTotalAmount">
|
<xsl:attribute name="GrandTotalAmount">
|
||||||
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
<xsl:value-of select="//Total/@GrandTotalAmount"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:element name="Administrative">
|
<xsl:element name="Administrative">
|
||||||
@@ -214,7 +217,8 @@
|
|||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(substring-before(//Admin/@InsuranceZip, '-'))=5">
|
<xsl:when test="string-length(substring-before(//Admin/@InsuranceZip, '-'))=5">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
|
<xsl:when
|
||||||
|
test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
|
||||||
<xsl:value-of select="//Admin/@InsuranceZip"/>
|
<xsl:value-of select="//Admin/@InsuranceZip"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
@@ -225,7 +229,8 @@
|
|||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="string-length(//Admin/@InsuranceZip)=9">
|
<xsl:when test="string-length(//Admin/@InsuranceZip)=9">
|
||||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
|
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-
|
||||||
|
<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="string-length(//Admin/@InsuranceZip)>4">
|
<xsl:when test="string-length(//Admin/@InsuranceZip)>4">
|
||||||
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
|
||||||
@@ -238,7 +243,8 @@
|
|||||||
<xsl:attribute name="Phone">
|
<xsl:attribute name="Phone">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin/@InsurancePhone1Ext[. != '']">
|
<xsl:when test="//Admin/@InsurancePhone1Ext[. != '']">
|
||||||
<xsl:value-of select="//Admin/@InsurancePhone1"/> x<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
|
<xsl:value-of select="//Admin/@InsurancePhone1"/> x
|
||||||
|
<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin/@InsurancePhone1"/>
|
<xsl:value-of select="//Admin/@InsurancePhone1"/>
|
||||||
@@ -248,7 +254,8 @@
|
|||||||
<xsl:attribute name="Phone2">
|
<xsl:attribute name="Phone2">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin/@InsurancePhone2Ext[. != '']">
|
<xsl:when test="//Admin/@InsurancePhone2Ext[. != '']">
|
||||||
<xsl:value-of select="//Admin/@InsurancePhone2"/> x<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
|
<xsl:value-of select="//Admin/@InsurancePhone2"/> x
|
||||||
|
<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin/@InsurancePhone2"/>
|
<xsl:value-of select="//Admin/@InsurancePhone2"/>
|
||||||
@@ -258,7 +265,8 @@
|
|||||||
<xsl:attribute name="Fax">
|
<xsl:attribute name="Fax">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin/@InsuranceFaxExt[. != '']">
|
<xsl:when test="//Admin/@InsuranceFaxExt[. != '']">
|
||||||
<xsl:value-of select="//Admin/@InsuranceFax"/> x<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
|
<xsl:value-of select="//Admin/@InsuranceFax"/> x
|
||||||
|
<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin/@InsuranceFax"/>
|
<xsl:value-of select="//Admin/@InsuranceFax"/>
|
||||||
@@ -310,7 +318,8 @@
|
|||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(substring-before(//Admin2/@EstimatorZip, '-'))=5">
|
<xsl:when test="string-length(substring-before(//Admin2/@EstimatorZip, '-'))=5">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
|
<xsl:when
|
||||||
|
test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
|
||||||
<xsl:value-of select="//Admin2/@EstimatorZip"/>
|
<xsl:value-of select="//Admin2/@EstimatorZip"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
@@ -321,7 +330,8 @@
|
|||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)=9">
|
<xsl:when test="string-length(//Admin2/@EstimatorZip)=9">
|
||||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
|
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-
|
||||||
|
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="string-length(//Admin2/@EstimatorZip)>4">
|
<xsl:when test="string-length(//Admin2/@EstimatorZip)>4">
|
||||||
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
|
||||||
@@ -334,7 +344,8 @@
|
|||||||
<xsl:attribute name="Phone">
|
<xsl:attribute name="Phone">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin2/@EstimatorPhone1Ext[. != '']">
|
<xsl:when test="//Admin2/@EstimatorPhone1Ext[. != '']">
|
||||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/> x<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
|
<xsl:value-of select="//Admin2/@EstimatorPhone1"/> x
|
||||||
|
<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
|
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
|
||||||
@@ -344,7 +355,8 @@
|
|||||||
<xsl:attribute name="Phone2">
|
<xsl:attribute name="Phone2">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin2/@EstimatorPhone2Ext[. != '']">
|
<xsl:when test="//Admin2/@EstimatorPhone2Ext[. != '']">
|
||||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/> x<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
|
<xsl:value-of select="//Admin2/@EstimatorPhone2"/> x
|
||||||
|
<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
|
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
|
||||||
@@ -354,7 +366,8 @@
|
|||||||
<xsl:attribute name="Fax">
|
<xsl:attribute name="Fax">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//Admin2/@EstimatorFaxExt[. != '']">
|
<xsl:when test="//Admin2/@EstimatorFaxExt[. != '']">
|
||||||
<xsl:value-of select="//Admin2/@EstimatorFax"/> x<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
|
<xsl:value-of select="//Admin2/@EstimatorFax"/> x
|
||||||
|
<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="//Admin2/@EstimatorFax"/>
|
<xsl:value-of select="//Admin2/@EstimatorFax"/>
|
||||||
@@ -370,7 +383,8 @@
|
|||||||
<xsl:if test="string-length(//Admin2/@VehicleInDate)>6">
|
<xsl:if test="string-length(//Admin2/@VehicleInDate)>6">
|
||||||
<xsl:value-of select="substring-before(//Admin2/@VehicleInDate, ' ')"/>
|
<xsl:value-of select="substring-before(//Admin2/@VehicleInDate, ' ')"/>
|
||||||
<xsl:if test="string-length(//Admin2/@VehicleInTime)=4">
|
<xsl:if test="string-length(//Admin2/@VehicleInTime)=4">
|
||||||
 <xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
|
 <xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:
|
||||||
|
<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
@@ -378,7 +392,8 @@
|
|||||||
<xsl:if test="string-length(//Admin2/@TargetVehicleOutDate)>6">
|
<xsl:if test="string-length(//Admin2/@TargetVehicleOutDate)>6">
|
||||||
<xsl:value-of select="substring-before(//Admin2/@TargetVehicleOutDate,' ')"/>
|
<xsl:value-of select="substring-before(//Admin2/@TargetVehicleOutDate,' ')"/>
|
||||||
<xsl:if test="string-length(//Admin2/@TargetVehicleOutTime)=4">
|
<xsl:if test="string-length(//Admin2/@TargetVehicleOutTime)=4">
|
||||||
 <xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
|
 <xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:
|
||||||
|
<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
@@ -386,7 +401,8 @@
|
|||||||
<xsl:if test="string-length(//Admin2/@VehicleOutDate)>6">
|
<xsl:if test="string-length(//Admin2/@VehicleOutDate)>6">
|
||||||
<xsl:value-of select="substring-before(//Admin2/@VehicleOutDate, ' ')"/>
|
<xsl:value-of select="substring-before(//Admin2/@VehicleOutDate, ' ')"/>
|
||||||
<xsl:if test="string-length(//Admin2/@VehicleOutTime)=4">
|
<xsl:if test="string-length(//Admin2/@VehicleOutTime)=4">
|
||||||
 <xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
|
 <xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:
|
||||||
|
<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
@@ -396,16 +412,16 @@
|
|||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<xsl:template match="PartsList">
|
<xsl:template match="PartsList">
|
||||||
<xsl:element name="PartsList" >
|
<xsl:element name="PartsList">
|
||||||
<xsl:for-each select="Part">
|
<xsl:for-each select="Part">
|
||||||
<xsl:element name="Part" >
|
<xsl:element name="Part">
|
||||||
<!-- Part number translation rules -->
|
<!-- Part number translation rules -->
|
||||||
<xsl:variable name="OEMPartNumber">
|
<xsl:variable name="OEMPartNumber">
|
||||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) != ' GM PART'">
|
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) != ' GM PART'">
|
||||||
<xsl:value-of select="@TDPartNum" />
|
<xsl:value-of select="@TDPartNum"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
|
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
|
||||||
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')" />
|
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="AltPartNumber">
|
<xsl:variable name="AltPartNumber">
|
||||||
@@ -448,13 +464,13 @@
|
|||||||
<xsl:value-of select="$PrimaryPartNumber"/>
|
<xsl:value-of select="$PrimaryPartNumber"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="AltPartNum">
|
<xsl:attribute name="AltPartNum">
|
||||||
<xsl:value-of select="$SecondaryPartNumber" />
|
<xsl:value-of select="$SecondaryPartNumber"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="ExternalPartType">
|
<xsl:attribute name="ExternalPartType">
|
||||||
<xsl:value-of select="$PrimaryPartType" />
|
<xsl:value-of select="$PrimaryPartType"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="ExternalAltPartType">
|
<xsl:attribute name="ExternalAltPartType">
|
||||||
<xsl:value-of select="$SecondaryPartType" />
|
<xsl:value-of select="$SecondaryPartType"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDPartType">
|
<xsl:attribute name="TDPartType">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
@@ -479,59 +495,59 @@
|
|||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDPartDesc">
|
<xsl:attribute name="TDPartDesc">
|
||||||
<xsl:value-of select="@TDPartDesc" />
|
<xsl:value-of select="@TDPartDesc"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDEstimate">
|
<xsl:attribute name="TDEstimate">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@PartType='PAN'">
|
<xsl:when test="@PartType='PAN'">
|
||||||
<xsl:value-of select="@TDEstimate" />
|
<xsl:value-of select="@TDEstimate"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@PartType='PAM'">
|
<xsl:when test="@PartType='PAM'">
|
||||||
<xsl:value-of select="@ActPrice" />
|
<xsl:value-of select="@ActPrice"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@PartType='PAA'">
|
<xsl:when test="@PartType='PAA'">
|
||||||
<xsl:value-of select="@ActPrice" />
|
<xsl:value-of select="@ActPrice"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@PartType='PAL'">
|
<xsl:when test="@PartType='PAL'">
|
||||||
<xsl:value-of select="@ActPrice" />
|
<xsl:value-of select="@ActPrice"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="@ActPrice" />
|
<xsl:value-of select="@ActPrice"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="TDPartQty">
|
<xsl:attribute name="TDPartQty">
|
||||||
<xsl:value-of select="@TDPartQty" />
|
<xsl:value-of select="@TDPartQty"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="LineNumber">
|
<xsl:attribute name="LineNumber">
|
||||||
<xsl:value-of select="@LineNumber" />
|
<xsl:value-of select="@LineNumber"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="SequenceNumber">
|
<xsl:attribute name="SequenceNumber">
|
||||||
<xsl:value-of select="@SequenceNumber" />
|
<xsl:value-of select="@SequenceNumber"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="SupplLevel">
|
<xsl:attribute name="SupplLevel">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@SupplementLevel = 'E'">0</xsl:when>
|
<xsl:when test="@SupplementLevel = 'E'">0</xsl:when>
|
||||||
<xsl:when test="substring(@SupplementLevel, 1, 1) = 'S'">
|
<xsl:when test="substring(@SupplementLevel, 1, 1) = 'S'">
|
||||||
<xsl:value-of select="substring(@SupplementLevel, 2)" />
|
<xsl:value-of select="substring(@SupplementLevel, 2)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>0</xsl:otherwise>
|
<xsl:otherwise>0</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="LaborType">
|
<xsl:attribute name="LaborType">
|
||||||
<xsl:value-of select="@LaborType" />
|
<xsl:value-of select="@LaborType"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="LaborHours">
|
<xsl:attribute name="LaborHours">
|
||||||
<xsl:value-of select="@LaborHours" />
|
<xsl:value-of select="@LaborHours"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="OperationCode">
|
<xsl:attribute name="OperationCode">
|
||||||
<xsl:value-of select="@LaborOp" />
|
<xsl:value-of select="@LaborOp"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="GlassFlag">
|
<xsl:attribute name="GlassFlag">
|
||||||
<xsl:value-of select="@GlassFlag" />
|
<xsl:value-of select="@GlassFlag"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="MarkUp">
|
<xsl:attribute name="MarkUp">
|
||||||
<xsl:value-of select="@MarkUp" />
|
<xsl:value-of select="@MarkUp"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="CLPart">
|
<xsl:attribute name="CLPart">
|
||||||
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
|
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
|
||||||
@@ -542,9 +558,13 @@
|
|||||||
<xsl:when test="@TransactionCode='3'">False</xsl:when>
|
<xsl:when test="@TransactionCode='3'">False</xsl:when>
|
||||||
<xsl:when test="@TransactionCode='1' or @TransactionCode='2'">
|
<xsl:when test="@TransactionCode='1' or @TransactionCode='2'">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAR' or @PartType='PAC'">
|
<xsl:when
|
||||||
|
test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAR' or @PartType='PAC'">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">False</xsl:when>
|
<xsl:when
|
||||||
|
test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">
|
||||||
|
False
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@LaborOp='OP0'">False</xsl:when>
|
<xsl:when test="@LaborOp='OP0'">False</xsl:when>
|
||||||
|
|||||||
@@ -1,129 +1,222 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<TranslationDescriptor>
|
<TranslationDescriptor>
|
||||||
<FileTranslations FormatName="Mitchell" ElementName="Estimate" Description="Translation Descriptor for a Mitchell Estimate, Version EMS 2.0">
|
<FileTranslations FormatName="Mitchell" ElementName="Estimate"
|
||||||
|
Description="Translation Descriptor for a Mitchell Estimate, Version EMS 2.0">
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.env">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.env">
|
||||||
<DBFFileTranslation ID="ID1" ElementName="Envelope" Description="Envelope Table">
|
<DBFFileTranslation ID="ID1" ElementName="Envelope" Description="Envelope Table">
|
||||||
<DBFFieldSpec FieldName="RO_ID" Form="attribute" Name="RONum" FieldType="" Description="RO Number"/>
|
<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="UNQFILE_ID" Form="attribute" Name="UniqueFileID" FieldType=""
|
||||||
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType="" Description="Estimate File Identifier"/>
|
Description="Unique File Identifier"/>
|
||||||
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean" Description="Includes Admin Info Flag"/>
|
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean" Description="Includes Vehicle Info Flag"/>
|
Description="Estimate File Identifier"/>
|
||||||
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean" Description="Includes Estimate Info Flag"/>
|
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean"
|
||||||
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean" Description="Includes Profile Info Flag"/>
|
Description="Includes Admin Info Flag"/>
|
||||||
<DBFFieldSpec FieldName="INCL_TOTAL" Form="attribute" Name="IncludesTotalsInfo" FieldType="Boolean" Description="Includes Totals Info Flag"/>
|
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean"
|
||||||
<DBFFieldSpec FieldName="INCL_VENDR" Form="attribute" Name="IncludesVendorInfo" FieldType="Boolean" Description="Includes Vendor Info Flag"/>
|
Description="Includes Vehicle Info Flag"/>
|
||||||
<DBFFieldSpec FieldName="EMS_VER" Form="attribute" Name="EMSVersion" FieldType="" Description="EMS Version Number"/>
|
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean"
|
||||||
<DBFFieldSpec FieldName="SUPP_NO" Form="attribute" Name="SupplementNum" FieldType="" Description="Supplement Number"/>
|
Description="Includes Estimate Info Flag"/>
|
||||||
<DBFFieldSpec FieldName="TRANS_TYPE" Form="attribute" Name="TransactionType" FieldType="" Description="Transaction Type"/>
|
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean"
|
||||||
<DBFFieldSpec FieldName="EST_SYSTEM" Form="attribute" Name="EstimatingSystem" FieldType="" Description="Estimating System Software"/>
|
Description="Includes Profile Info Flag"/>
|
||||||
<DBFFieldSpec FieldName="SW_VERSION" Form="attribute" Name="SoftwareVersion" FieldType="" Description="Software Version Identifier"/>
|
<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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.LIN">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.LIN">
|
||||||
<DBFFileTranslation ID="ID2" ElementSetName="PartsList" ElementName="Part" Description="Parts List Table">
|
<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="OEM_PARTNO" Form="attribute" Name="TDPartNum" FieldType=""
|
||||||
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType="" Description="Alternate Part Number"/>
|
Description="Part Number"/>
|
||||||
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType="" Description="Actual Part Price"/>
|
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType=""
|
||||||
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType="" Description="Part Description"/>
|
Description="Alternate Part Number"/>
|
||||||
<DBFFieldSpec FieldName="DB_PRICE" Form="attribute" Name="TDEstimate" FieldType="" Description="DB_Price"/>
|
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType=""
|
||||||
<DBFFieldSpec FieldName="PART_QTY" Form="attribute" Name="TDPartQty" FieldType="" Description="Part Quantity"/>
|
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="LINE_NO" Form="attribute" Name="LineNumber" FieldType="" Description=""/>
|
||||||
<DBFFieldSpec FieldName="UNQ_SEQ" Form="attribute" Name="SequenceNumber" 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="PART_TYPE" Form="attribute" Name="PartType" FieldType=""
|
||||||
<DBFFieldSpec FieldName="MOD_LBR_TY" Form="attribute" Name="LaborType" FieldType="" Description="Labor Type"/>
|
Description="Part Type"/>
|
||||||
<DBFFieldSpec FieldName="MOD_LB_HRS" Form="attribute" Name="LaborHours" FieldType="" Description="Labor Hours"/>
|
<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="LBR_OP" Form="attribute" Name="LaborOp" FieldType="" Description="Labor Op"/>
|
||||||
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType="" Description="Supplement Level"/>
|
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType=""
|
||||||
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType="" Description="Transaction Code"/>
|
Description="Supplement Level"/>
|
||||||
<DBFFieldSpec FieldName="GLASS_FLAG" Form="attribute" Name="GlassFlag" FieldType="" Description="Glass Flag"/>
|
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType=""
|
||||||
<DBFFieldSpec FieldName="PRT_DSMK_M" Form="attribute" Name="MarkUp" FieldType="" Description="Price Mark up for non OEM parts"/>
|
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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.VEH">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.VEH">
|
||||||
<DBFFileTranslation ID="ID3" ElementName="Vehicle" Description="Vehicle Table">
|
<DBFFileTranslation ID="ID3" ElementName="Vehicle" Description="Vehicle Table">
|
||||||
<DBFFieldSpec FieldName="V_VIN" Form="attribute" Name="TransVIN" FieldType="" Description=""/>
|
<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_MODEL_YR" Form="attribute" Name="TransYear" FieldType=""
|
||||||
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType="" Description="V_MAKEDESC"/>
|
Description="V_MODEL_YR"/>
|
||||||
<DBFFieldSpec FieldName="V_MAKECODE" Form="attribute" Name="ManufCode" FieldType="" Description="V_MAKECODE"/>
|
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType=""
|
||||||
<DBFFieldSpec FieldName="V_MODEL" Form="attribute" Name="TransModel" FieldType="" Description="V_MODEL"/>
|
Description="V_MAKEDESC"/>
|
||||||
<DBFFieldSpec FieldName="V_MILEAGE" Form="attribute" Name="TransMileage" FieldType="" Description="V_MILEAGE"/>
|
<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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD1">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD1">
|
||||||
<DBFFileTranslation ID="ID4" ElementName="Admin" Description="Administrative information">
|
<DBFFileTranslation ID="ID4" ElementName="Admin" Description="Administrative information">
|
||||||
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType="" Description="Owner Lastname"/>
|
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType="" Description="Owner Firstname"/>
|
Description="Owner Lastname"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType="" Description="Owner Company Name"/>
|
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType="" Description="Owner Title"/>
|
Description="Owner Firstname"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType="" Description="Owner Address Line 1"/>
|
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType="" Description="Owner Address Line 2"/>
|
Description="Owner Company Name"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType="" Description="Owner City"/>
|
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType="" Description="Owner State"/>
|
Description="Owner Title"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType="" Description="Owner Zip"/>
|
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType="" Description="Owner Country"/>
|
Description="Owner Address Line 1"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType="" Description="Owner Primary Phone"/>
|
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType="" Description="Owner Primary Phone Extension"/>
|
Description="Owner Address Line 2"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType="" Description="Owner Secondary Phone"/>
|
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType="" Description="Owner Secondary Phone Extension"/>
|
Description="Owner City"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType="" Description="Owner Fax"/>
|
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType=""
|
||||||
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType="" Description="Owner Fax Extension"/>
|
Description="Owner State"/>
|
||||||
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType="" Description="Owner Email Address"/>
|
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_CO_NM" Form="attribute" Name="InsuranceCompanyName" FieldType="" Description="Insurance Company Name"/>
|
Description="Owner Zip"/>
|
||||||
<DBFFieldSpec FieldName="INS_CO_ID" Form="attribute" Name="InsuranceCompanyID" FieldType="" Description="Insurance Company Identifier"/>
|
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_ADDR1" Form="attribute" Name="InsuranceAddr1" FieldType="" Description="Insurance Address Line 1"/>
|
Description="Owner Country"/>
|
||||||
<DBFFieldSpec FieldName="INS_ADDR2" Form="attribute" Name="InsuranceAddr2" FieldType="" Description="Insurance Address Line 2"/>
|
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_CITY" Form="attribute" Name="InsuranceCity" FieldType="" Description="Insurance City"/>
|
Description="Owner Primary Phone"/>
|
||||||
<DBFFieldSpec FieldName="INS_ST" Form="attribute" Name="InsuranceState" FieldType="" Description="Insurance State"/>
|
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_ZIP" Form="attribute" Name="InsuranceZip" FieldType="" Description="Insurance Zip"/>
|
Description="Owner Primary Phone Extension"/>
|
||||||
<DBFFieldSpec FieldName="INS_CTRY" Form="attribute" Name="InsuranceCountry" FieldType="" Description="Insurance Country"/>
|
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_PH1" Form="attribute" Name="InsurancePhone1" FieldType="" Description="Insurance Primary Phone"/>
|
Description="Owner Secondary Phone"/>
|
||||||
<DBFFieldSpec FieldName="INS_PH1X" Form="attribute" Name="InsurancePhone1Ext" FieldType="" Description="Insurance Primary Phone Extension"/>
|
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_PH2" Form="attribute" Name="InsurancePhone2" FieldType="" Description="Insurance Secondary Phone"/>
|
Description="Owner Secondary Phone Extension"/>
|
||||||
<DBFFieldSpec FieldName="INS_PH2X" Form="attribute" Name="InsurancePhone2Ext" FieldType="" Description="Insurance Secondary Phone Extension"/>
|
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_FAX" Form="attribute" Name="InsuranceFax" FieldType="" Description="Insurance Fax"/>
|
Description="Owner Fax"/>
|
||||||
<DBFFieldSpec FieldName="INS_FAXX" Form="attribute" Name="InsuranceFaxExt" FieldType="" Description="Insurance Fax Extension"/>
|
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType=""
|
||||||
<DBFFieldSpec FieldName="INS_EA" Form="attribute" Name="InsuranceEmail" FieldType="" Description="Insurance Email Address"/>
|
Description="Owner Fax Extension"/>
|
||||||
<DBFFieldSpec FieldName="INSD_LN" Form="attribute" Name="InsuranceLName" FieldType="" Description="Insurance Last Name"/>
|
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType=""
|
||||||
<DBFFieldSpec FieldName="CLM_NO" Form="attribute" Name="ClaimNumber" FieldType="" Description="Claim Number"/>
|
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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD2">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD2">
|
||||||
<DBFFileTranslation ID="ID5" ElementName="Admin2" Description="Administrative information2">
|
<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_LN" Form="attribute" Name="EstimatorL" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType="" Description="Estimator Firstname"/>
|
Description="Estimator Lastname"/>
|
||||||
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType="" Description="Estimator Company Name"/>
|
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType="" Description="Estimator Company Identifier"/>
|
Description="Estimator Firstname"/>
|
||||||
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType="" Description="Estimator Address1"/>
|
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType="" Description="Estimator Address2"/>
|
Description="Estimator Company Name"/>
|
||||||
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType="" Description="Estimator City"/>
|
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType="" Description="Estimator State"/>
|
Description="Estimator Company Identifier"/>
|
||||||
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType="" Description="Estimator Zip"/>
|
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType="" Description="Estimator Country"/>
|
Description="Estimator Address1"/>
|
||||||
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType="" Description="Estimator Primary Phone"/>
|
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType="" Description="Estimator Primary Phone Extension"/>
|
Description="Estimator Address2"/>
|
||||||
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType="" Description="Estimator Secondary Phone"/>
|
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_PH2X" Form="attribute" Name="EstimatorPhone2Ext" FieldType="" Description="Estimator Secondary Phone Extension"/>
|
Description="Estimator City"/>
|
||||||
<DBFFieldSpec FieldName="EST_FAX" Form="attribute" Name="EstimatorFax" FieldType="" Description="Estimator Fax"/>
|
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_FAXX" Form="attribute" Name="EstimatorFaxExt" FieldType="" Description="Estimator Fax Extension"/>
|
Description="Estimator State"/>
|
||||||
<DBFFieldSpec FieldName="EST_EA" Form="attribute" Name="EstimatorEmail" FieldType="" Description="Estimator Email Address"/>
|
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType=""
|
||||||
<DBFFieldSpec FieldName="EST_LIC_NO" Form="attribute" Name="EstimatorLicenseNumber" FieldType="" Description="Estimator License Number"/>
|
Description="Estimator Zip"/>
|
||||||
<DBFFieldSpec FieldName="EST_FILENO" Form="attribute" Name="EstimatorFileNumber" FieldType="" Description="Estimator File Number"/>
|
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType=""
|
||||||
<DBFFieldSpec FieldName="RO_IN_DATE" Form="attribute" Name="VehicleInDate" FieldType="" Description="Date arrived in shop"/>
|
Description="Estimator Country"/>
|
||||||
<DBFFieldSpec FieldName="RO_IN_TIME" Form="attribute" Name="VehicleInTime" FieldType="" Description="Time arrived in shop"/>
|
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType=""
|
||||||
<DBFFieldSpec FieldName="TAR_DATE" Form="attribute" Name="TargetVehicleOutDate" FieldType="" Description="Target date to be completed"/>
|
Description="Estimator Primary Phone"/>
|
||||||
<DBFFieldSpec FieldName="TAR_TIME" Form="attribute" Name="TargetVehicleOutTime" FieldType="" Description="Target time to be completed"/>
|
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType=""
|
||||||
<DBFFieldSpec FieldName="RO_CMPDATE" Form="attribute" Name="VehicleOutDate" FieldType="" Description="Date completed"/>
|
Description="Estimator Primary Phone Extension"/>
|
||||||
<DBFFieldSpec FieldName="RO_CMPTIME" Form="attribute" Name="VehicleOutTime" FieldType="" Description="Time completed"/>
|
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType=""
|
||||||
<DBFFieldSpec FieldName="RF_CO_NM" Form="attribute" Name="BodyShopName" FieldType="" Description="Body Shop Name"/>
|
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>
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.TTL">
|
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.TTL">
|
||||||
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
|
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
|
||||||
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType="" Description=""/>
|
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType=""
|
||||||
</DBFFileTranslation>
|
Description=""/>
|
||||||
|
</DBFFileTranslation>
|
||||||
</FileTranslation>
|
</FileTranslation>
|
||||||
</FileTranslations>
|
</FileTranslations>
|
||||||
<StyleSheetTranslation>
|
<StyleSheetTranslation>
|
||||||
|
|||||||
@@ -13,47 +13,47 @@ Copy the new key to clipboard:
|
|||||||
Add the SSH key to the drop creation screen.
|
Add the SSH key to the drop creation screen.
|
||||||
|
|
||||||
1. Create a new user to replace root user
|
1. Create a new user to replace root user
|
||||||
1. # adduser imex
|
1. # adduser imex
|
||||||
2. # usermod -aG sudo imex
|
2. # usermod -aG sudo imex
|
||||||
3. # su - imex
|
3. # su - imex
|
||||||
4. $ mkdir ~/.ssh
|
4. $ mkdir ~/.ssh
|
||||||
5. $ chmod 700 ~/.ssh
|
5. $ chmod 700 ~/.ssh
|
||||||
6. $ nano ~/.ssh/authorized_keys
|
6. $ nano ~/.ssh/authorized_keys
|
||||||
7. Add the copied SSH key and save.
|
7. Add the copied SSH key and save.
|
||||||
8. $ chmod 600 ~/.ssh/authorized_keys #Restrict access to authorized keys.
|
8. $ chmod 600 ~/.ssh/authorized_keys #Restrict access to authorized keys.
|
||||||
2. Setup the Firewall
|
2. Setup the Firewall
|
||||||
1. $ sudo ufw allow OpenSSH.
|
1. $ sudo ufw allow OpenSSH.
|
||||||
2. $ sudo ufw enable
|
2. $ sudo ufw enable
|
||||||
3. Add Nginx & Configure
|
3. Add Nginx & Configure
|
||||||
1. $ sudo apt-get update
|
1. $ sudo apt-get update
|
||||||
2. $ sudo apt-get install nginx
|
2. $ sudo apt-get install nginx
|
||||||
3. $ sudo ufw allow 'Nginx Full'
|
3. $ sudo ufw allow 'Nginx Full'
|
||||||
4. $ sudo ufw app list
|
4. $ sudo ufw app list
|
||||||
1. Nginx Full: Opens both port 80 (normal, unencrypted web traffic) and port 443 (TLS/SSL encrypted traffic)
|
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)
|
2. Nginx Http: Opens only port 80 (normal, unencrypted web traffic)
|
||||||
3. Nginx Https: Opens only port 443 (TLS/SSL encrypted 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.
|
5. Should now be able to go to IP and see nginx responding with a blank page.
|
||||||
4. Install NodeJs
|
4. Install NodeJs
|
||||||
1. $ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
|
1. $ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
|
||||||
2. $ sudo apt install nodejs
|
2. $ sudo apt install nodejs
|
||||||
3. $ node --version
|
3. $ node --version
|
||||||
5. Clone Source Code
|
5. Clone Source Code
|
||||||
1. $ git clone git@bitbucket.org:snaptsoft/bodyshop.git //Requires SSH setup.
|
1. $ git clone git@bitbucket.org:snaptsoft/bodyshop.git //Requires SSH setup.
|
||||||
2. $ cd bodyshop && npm install //Install all server dependencies.
|
2. $ cd bodyshop && npm install //Install all server dependencies.
|
||||||
6. Setup PM2
|
6. Setup PM2
|
||||||
1. $ npm install pm2 -g //Had to be run as root.
|
1. $ npm install pm2 -g //Had to be run as root.
|
||||||
2. $ pm2 start ecosystem.config.js
|
2. $ pm2 start ecosystem.config.js
|
||||||
3. $ pm2 startup ubuntu //Ensure it starts when server does.
|
3. $ pm2 startup ubuntu //Ensure it starts when server does.
|
||||||
7. Alter Nginx config
|
7. Alter Nginx config
|
||||||
1. sudo nano /etc/nginx/sites-available/default
|
1. sudo nano /etc/nginx/sites-available/default
|
||||||
2. //Add Appropriate server names to the file. www. and non-www.
|
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.)
|
3. Add the following inside the location of the server block: (Remove the 404 bit.)
|
||||||
proxy_pass http://localhost:5000;
|
proxy_pass http://localhost:5000;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection 'upgrade';
|
proxy_set_header Connection 'upgrade';
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_cache_bypass $http_upgrade;
|
proxy_cache_bypass $http_upgrade;
|
||||||
8. Install Certbot
|
8. Install Certbot
|
||||||
9. $ sudo add-apt-repository ppa:certbot/certbot //Potential issue on ubuntu 20.04
|
9. $ sudo add-apt-repository ppa:certbot/certbot //Potential issue on ubuntu 20.04
|
||||||
10. $ sudo apt-get update
|
10. $ sudo apt-get update
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
1. Create a new project
|
1. Create a new project
|
||||||
2. Setup sign in methods to be user and email only.
|
2. Setup sign in methods to be user and email only.
|
||||||
3. Update .env to include config.
|
3. Update .env to include config.
|
||||||
4. Setup the Firebase CLI
|
4. Setup the Firebase CLI
|
||||||
1. cd to client firebase at server directory.
|
1. cd to client firebase at server directory.
|
||||||
2. ensure all dependencies installed
|
2. ensure all dependencies installed
|
||||||
1. $ npm install firebase-functions@latest firebase-admin@latest --save
|
1. $ npm install firebase-functions@latest firebase-admin@latest --save
|
||||||
2. $ npm install -g firebase-tools
|
2. $ npm install -g firebase-tools
|
||||||
3. $ firebase login //Login as needed.
|
3. $ firebase login //Login as needed.
|
||||||
5. Set the current projct
|
5. Set the current projct
|
||||||
1. firebase use <projectname>
|
1. firebase use <projectname>
|
||||||
6. Deploy the function
|
6. Deploy the function
|
||||||
1. $ firebase deploy --only functions
|
1. $ firebase deploy --only functions
|
||||||
7. Add the allowed domains.
|
7. Add the allowed domains.
|
||||||
8. Update server variables including FIREBASE_ADMINSDK_JSON, FIREBASE_DATABASE_URL
|
8. Update server variables including FIREBASE_ADMINSDK_JSON, FIREBASE_DATABASE_URL
|
||||||
9. Create the firestore and copy the rules from dev for userinstances.
|
9. Create the firestore and copy the rules from dev for userinstances.
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
apps: [
|
apps: [
|
||||||
{
|
{
|
||||||
name: "IO Test API",
|
name: "IO Test API",
|
||||||
cwd: "./io",
|
cwd: "./io",
|
||||||
script: "./server.js",
|
script: "./server.js",
|
||||||
env: {
|
env: {
|
||||||
NODE_ENV: "test",
|
NODE_ENV: "test",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "Bitbucket Webhook",
|
name: "Bitbucket Webhook",
|
||||||
script: "./webhook/index.js",
|
script: "./webhook/index.js",
|
||||||
env: {
|
env: {
|
||||||
NODE_ENV: "production",
|
NODE_ENV: "production",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ You will also see any lint errors in the console.
|
|||||||
### `yarn test`
|
### `yarn test`
|
||||||
|
|
||||||
Launches the test runner in the interactive watch mode.<br />
|
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`
|
### `yarn build`
|
||||||
|
|
||||||
@@ -31,15 +32,21 @@ 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!**
|
**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
|
## 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/).
|
To learn React, check out the [React documentation](https://reactjs.org/).
|
||||||
|
|
||||||
@@ -65,4 +72,5 @@ This section has moved here: https://facebook.github.io/create-react-app/docs/de
|
|||||||
|
|
||||||
### `yarn build` fails to minify
|
### `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
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
const { defineConfig } = require('cypress')
|
const {defineConfig} = require('cypress')
|
||||||
|
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
experimentalStudio: true,
|
experimentalStudio: true,
|
||||||
env: {
|
env: {
|
||||||
FIREBASE_USERNAME: 'cypress@imex.test',
|
FIREBASE_USERNAME: 'cypress@imex.test',
|
||||||
FIREBASE_PASSWORD: 'cypress',
|
FIREBASE_PASSWORD: 'cypress',
|
||||||
},
|
},
|
||||||
e2e: {
|
e2e: {
|
||||||
// We've imported your old cypress plugins here.
|
// We've imported your old cypress plugins here.
|
||||||
// You may want to clean this up later by importing these.
|
// You may want to clean this up later by importing these.
|
||||||
setupNodeEvents(on, config) {
|
setupNodeEvents(on, config) {
|
||||||
return require('./cypress/plugins/index.js')(on, config)
|
return require('./cypress/plugins/index.js')(on, config)
|
||||||
|
},
|
||||||
|
baseUrl: 'http://localhost:3000',
|
||||||
},
|
},
|
||||||
baseUrl: 'http://localhost:3000',
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,23 +1,24 @@
|
|||||||
/// <reference types="Cypress" />
|
/// <reference types="Cypress" />
|
||||||
const { FIREBASE_USERNAME, FIREBASE_PASSWORcD } = Cypress.env();
|
const {FIREBASE_USERNAME, FIREBASE_PASSWORcD} = Cypress.env();
|
||||||
describe("Renders the General Page", () => {
|
describe("Renders the General Page", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit("/");
|
cy.visit("/");
|
||||||
});
|
});
|
||||||
it("Renders Correctly", () => {});
|
it("Renders Correctly", () => {
|
||||||
it("Has the Slogan", () => {
|
});
|
||||||
cy.findByText("A whole x22new kind of shop management system.").should(
|
it("Has the Slogan", () => {
|
||||||
"exist"
|
cy.findByText("A whole x22new kind of shop management system.").should(
|
||||||
);
|
"exist"
|
||||||
/* ==== Generated with Cypress Studio ==== */
|
);
|
||||||
cy.get(
|
/* ==== Generated with Cypress Studio ==== */
|
||||||
".ant-menu-item-active > .ant-menu-title-content > .header0-item-block"
|
cy.get(
|
||||||
).click();
|
".ant-menu-item-active > .ant-menu-title-content > .header0-item-block"
|
||||||
cy.get("#email").clear();
|
).click();
|
||||||
cy.get("#email").type("patrick@imex.dev");
|
cy.get("#email").clear();
|
||||||
cy.get("#password").clear();
|
cy.get("#email").type("patrick@imex.dev");
|
||||||
cy.get("#password").type("patrick123{enter}");
|
cy.get("#password").clear();
|
||||||
cy.get(".ant-form > .ant-btn").click();
|
cy.get("#password").type("patrick123{enter}");
|
||||||
/* ==== End Cypress Studio ==== */
|
cy.get(".ant-form > .ant-btn").click();
|
||||||
});
|
/* ==== End Cypress Studio ==== */
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,132 +12,132 @@
|
|||||||
// https://on.cypress.io/introduction-to-cypress
|
// https://on.cypress.io/introduction-to-cypress
|
||||||
|
|
||||||
describe('example to-do app', () => {
|
describe('example to-do app', () => {
|
||||||
beforeEach(() => {
|
|
||||||
// Cypress starts out with a blank slate for each test
|
|
||||||
// so we must tell it to visit our website with the `cy.visit()` command.
|
|
||||||
// Since we want to visit the same URL at the start of all our tests,
|
|
||||||
// we include it in our beforeEach function so that it runs before each test
|
|
||||||
cy.visit('https://example.cypress.io/todo')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('displays two todo items by default', () => {
|
|
||||||
// We use the `cy.get()` command to get all elements that match the selector.
|
|
||||||
// Then, we use `should` to assert that there are two matched items,
|
|
||||||
// which are the two default items.
|
|
||||||
cy.get('.todo-list li').should('have.length', 2)
|
|
||||||
|
|
||||||
// We can go even further and check that the default todos each contain
|
|
||||||
// the correct text. We use the `first` and `last` functions
|
|
||||||
// to get just the first and last matched elements individually,
|
|
||||||
// and then perform an assertion with `should`.
|
|
||||||
cy.get('.todo-list li').first().should('have.text', 'Pay electric bill')
|
|
||||||
cy.get('.todo-list li').last().should('have.text', 'Walk the dog')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('can add new todo items', () => {
|
|
||||||
// We'll store our item text in a variable so we can reuse it
|
|
||||||
const newItem = 'Feed the cat'
|
|
||||||
|
|
||||||
// Let's get the input element and use the `type` command to
|
|
||||||
// input our new list item. After typing the content of our item,
|
|
||||||
// we need to type the enter key as well in order to submit the input.
|
|
||||||
// This input has a data-test attribute so we'll use that to select the
|
|
||||||
// element in accordance with best practices:
|
|
||||||
// https://on.cypress.io/selecting-elements
|
|
||||||
cy.get('[data-test=new-todo]').type(`${newItem}{enter}`)
|
|
||||||
|
|
||||||
// Now that we've typed our new item, let's check that it actually was added to the list.
|
|
||||||
// Since it's the newest item, it should exist as the last element in the list.
|
|
||||||
// In addition, with the two default items, we should have a total of 3 elements in the list.
|
|
||||||
// Since assertions yield the element that was asserted on,
|
|
||||||
// we can chain both of these assertions together into a single statement.
|
|
||||||
cy.get('.todo-list li')
|
|
||||||
.should('have.length', 3)
|
|
||||||
.last()
|
|
||||||
.should('have.text', newItem)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('can check off an item as completed', () => {
|
|
||||||
// In addition to using the `get` command to get an element by selector,
|
|
||||||
// we can also use the `contains` command to get an element by its contents.
|
|
||||||
// However, this will yield the <label>, which is lowest-level element that contains the text.
|
|
||||||
// In order to check the item, we'll find the <input> element for this <label>
|
|
||||||
// by traversing up the dom to the parent element. From there, we can `find`
|
|
||||||
// the child checkbox <input> element and use the `check` command to check it.
|
|
||||||
cy.contains('Pay electric bill')
|
|
||||||
.parent()
|
|
||||||
.find('input[type=checkbox]')
|
|
||||||
.check()
|
|
||||||
|
|
||||||
// Now that we've checked the button, we can go ahead and make sure
|
|
||||||
// that the list element is now marked as completed.
|
|
||||||
// Again we'll use `contains` to find the <label> element and then use the `parents` command
|
|
||||||
// to traverse multiple levels up the dom until we find the corresponding <li> element.
|
|
||||||
// Once we get that element, we can assert that it has the completed class.
|
|
||||||
cy.contains('Pay electric bill')
|
|
||||||
.parents('li')
|
|
||||||
.should('have.class', 'completed')
|
|
||||||
})
|
|
||||||
|
|
||||||
context('with a checked task', () => {
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
// We'll take the command we used above to check off an element
|
// Cypress starts out with a blank slate for each test
|
||||||
// Since we want to perform multiple tests that start with checking
|
// so we must tell it to visit our website with the `cy.visit()` command.
|
||||||
// one element, we put it in the beforeEach hook
|
// Since we want to visit the same URL at the start of all our tests,
|
||||||
// so that it runs at the start of every test.
|
// we include it in our beforeEach function so that it runs before each test
|
||||||
cy.contains('Pay electric bill')
|
cy.visit('https://example.cypress.io/todo')
|
||||||
.parent()
|
|
||||||
.find('input[type=checkbox]')
|
|
||||||
.check()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can filter for uncompleted tasks', () => {
|
it('displays two todo items by default', () => {
|
||||||
// We'll click on the "active" button in order to
|
// We use the `cy.get()` command to get all elements that match the selector.
|
||||||
// display only incomplete items
|
// Then, we use `should` to assert that there are two matched items,
|
||||||
cy.contains('Active').click()
|
// which are the two default items.
|
||||||
|
cy.get('.todo-list li').should('have.length', 2)
|
||||||
|
|
||||||
// After filtering, we can assert that there is only the one
|
// We can go even further and check that the default todos each contain
|
||||||
// incomplete item in the list.
|
// the correct text. We use the `first` and `last` functions
|
||||||
cy.get('.todo-list li')
|
// to get just the first and last matched elements individually,
|
||||||
.should('have.length', 1)
|
// and then perform an assertion with `should`.
|
||||||
.first()
|
cy.get('.todo-list li').first().should('have.text', 'Pay electric bill')
|
||||||
.should('have.text', 'Walk the dog')
|
cy.get('.todo-list li').last().should('have.text', 'Walk the dog')
|
||||||
|
|
||||||
// For good measure, let's also assert that the task we checked off
|
|
||||||
// does not exist on the page.
|
|
||||||
cy.contains('Pay electric bill').should('not.exist')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can filter for completed tasks', () => {
|
it('can add new todo items', () => {
|
||||||
// We can perform similar steps as the test above to ensure
|
// We'll store our item text in a variable so we can reuse it
|
||||||
// that only completed tasks are shown
|
const newItem = 'Feed the cat'
|
||||||
cy.contains('Completed').click()
|
|
||||||
|
|
||||||
cy.get('.todo-list li')
|
// Let's get the input element and use the `type` command to
|
||||||
.should('have.length', 1)
|
// input our new list item. After typing the content of our item,
|
||||||
.first()
|
// we need to type the enter key as well in order to submit the input.
|
||||||
.should('have.text', 'Pay electric bill')
|
// This input has a data-test attribute so we'll use that to select the
|
||||||
|
// element in accordance with best practices:
|
||||||
|
// https://on.cypress.io/selecting-elements
|
||||||
|
cy.get('[data-test=new-todo]').type(`${newItem}{enter}`)
|
||||||
|
|
||||||
cy.contains('Walk the dog').should('not.exist')
|
// Now that we've typed our new item, let's check that it actually was added to the list.
|
||||||
|
// Since it's the newest item, it should exist as the last element in the list.
|
||||||
|
// In addition, with the two default items, we should have a total of 3 elements in the list.
|
||||||
|
// Since assertions yield the element that was asserted on,
|
||||||
|
// we can chain both of these assertions together into a single statement.
|
||||||
|
cy.get('.todo-list li')
|
||||||
|
.should('have.length', 3)
|
||||||
|
.last()
|
||||||
|
.should('have.text', newItem)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can delete all completed tasks', () => {
|
it('can check off an item as completed', () => {
|
||||||
// First, let's click the "Clear completed" button
|
// In addition to using the `get` command to get an element by selector,
|
||||||
// `contains` is actually serving two purposes here.
|
// we can also use the `contains` command to get an element by its contents.
|
||||||
// First, it's ensuring that the button exists within the dom.
|
// However, this will yield the <label>, which is lowest-level element that contains the text.
|
||||||
// This button only appears when at least one task is checked
|
// In order to check the item, we'll find the <input> element for this <label>
|
||||||
// so this command is implicitly verifying that it does exist.
|
// by traversing up the dom to the parent element. From there, we can `find`
|
||||||
// Second, it selects the button so we can click it.
|
// the child checkbox <input> element and use the `check` command to check it.
|
||||||
cy.contains('Clear completed').click()
|
cy.contains('Pay electric bill')
|
||||||
|
.parent()
|
||||||
|
.find('input[type=checkbox]')
|
||||||
|
.check()
|
||||||
|
|
||||||
// Then we can make sure that there is only one element
|
// Now that we've checked the button, we can go ahead and make sure
|
||||||
// in the list and our element does not exist
|
// that the list element is now marked as completed.
|
||||||
cy.get('.todo-list li')
|
// Again we'll use `contains` to find the <label> element and then use the `parents` command
|
||||||
.should('have.length', 1)
|
// to traverse multiple levels up the dom until we find the corresponding <li> element.
|
||||||
.should('not.have.text', 'Pay electric bill')
|
// Once we get that element, we can assert that it has the completed class.
|
||||||
|
cy.contains('Pay electric bill')
|
||||||
// Finally, make sure that the clear button no longer exists.
|
.parents('li')
|
||||||
cy.contains('Clear completed').should('not.exist')
|
.should('have.class', 'completed')
|
||||||
|
})
|
||||||
|
|
||||||
|
context('with a checked task', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
// We'll take the command we used above to check off an element
|
||||||
|
// Since we want to perform multiple tests that start with checking
|
||||||
|
// one element, we put it in the beforeEach hook
|
||||||
|
// so that it runs at the start of every test.
|
||||||
|
cy.contains('Pay electric bill')
|
||||||
|
.parent()
|
||||||
|
.find('input[type=checkbox]')
|
||||||
|
.check()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('can filter for uncompleted tasks', () => {
|
||||||
|
// We'll click on the "active" button in order to
|
||||||
|
// display only incomplete items
|
||||||
|
cy.contains('Active').click()
|
||||||
|
|
||||||
|
// After filtering, we can assert that there is only the one
|
||||||
|
// incomplete item in the list.
|
||||||
|
cy.get('.todo-list li')
|
||||||
|
.should('have.length', 1)
|
||||||
|
.first()
|
||||||
|
.should('have.text', 'Walk the dog')
|
||||||
|
|
||||||
|
// For good measure, let's also assert that the task we checked off
|
||||||
|
// does not exist on the page.
|
||||||
|
cy.contains('Pay electric bill').should('not.exist')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('can filter for completed tasks', () => {
|
||||||
|
// We can perform similar steps as the test above to ensure
|
||||||
|
// that only completed tasks are shown
|
||||||
|
cy.contains('Completed').click()
|
||||||
|
|
||||||
|
cy.get('.todo-list li')
|
||||||
|
.should('have.length', 1)
|
||||||
|
.first()
|
||||||
|
.should('have.text', 'Pay electric bill')
|
||||||
|
|
||||||
|
cy.contains('Walk the dog').should('not.exist')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('can delete all completed tasks', () => {
|
||||||
|
// First, let's click the "Clear completed" button
|
||||||
|
// `contains` is actually serving two purposes here.
|
||||||
|
// First, it's ensuring that the button exists within the dom.
|
||||||
|
// This button only appears when at least one task is checked
|
||||||
|
// so this command is implicitly verifying that it does exist.
|
||||||
|
// Second, it selects the button so we can click it.
|
||||||
|
cy.contains('Clear completed').click()
|
||||||
|
|
||||||
|
// Then we can make sure that there is only one element
|
||||||
|
// in the list and our element does not exist
|
||||||
|
cy.get('.todo-list li')
|
||||||
|
.should('have.length', 1)
|
||||||
|
.should('not.have.text', 'Pay electric bill')
|
||||||
|
|
||||||
|
// Finally, make sure that the clear button no longer exists.
|
||||||
|
cy.contains('Clear completed').should('not.exist')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,299 +1,299 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Actions', () => {
|
context('Actions', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/actions')
|
cy.visit('https://example.cypress.io/commands/actions')
|
||||||
})
|
})
|
||||||
|
|
||||||
// https://on.cypress.io/interacting-with-elements
|
// https://on.cypress.io/interacting-with-elements
|
||||||
|
|
||||||
it('.type() - type into a DOM element', () => {
|
it('.type() - type into a DOM element', () => {
|
||||||
// https://on.cypress.io/type
|
// https://on.cypress.io/type
|
||||||
cy.get('.action-email')
|
cy.get('.action-email')
|
||||||
.type('fake@email.com').should('have.value', 'fake@email.com')
|
.type('fake@email.com').should('have.value', 'fake@email.com')
|
||||||
|
|
||||||
// .type() with special character sequences
|
// .type() with special character sequences
|
||||||
.type('{leftarrow}{rightarrow}{uparrow}{downarrow}')
|
.type('{leftarrow}{rightarrow}{uparrow}{downarrow}')
|
||||||
.type('{del}{selectall}{backspace}')
|
.type('{del}{selectall}{backspace}')
|
||||||
|
|
||||||
// .type() with key modifiers
|
// .type() with key modifiers
|
||||||
.type('{alt}{option}') //these are equivalent
|
.type('{alt}{option}') //these are equivalent
|
||||||
.type('{ctrl}{control}') //these are equivalent
|
.type('{ctrl}{control}') //these are equivalent
|
||||||
.type('{meta}{command}{cmd}') //these are equivalent
|
.type('{meta}{command}{cmd}') //these are equivalent
|
||||||
.type('{shift}')
|
.type('{shift}')
|
||||||
|
|
||||||
// Delay each keypress by 0.1 sec
|
// Delay each keypress by 0.1 sec
|
||||||
.type('slow.typing@email.com', { delay: 100 })
|
.type('slow.typing@email.com', {delay: 100})
|
||||||
.should('have.value', 'slow.typing@email.com')
|
.should('have.value', 'slow.typing@email.com')
|
||||||
|
|
||||||
cy.get('.action-disabled')
|
cy.get('.action-disabled')
|
||||||
// Ignore error checking prior to type
|
// Ignore error checking prior to type
|
||||||
// like whether the input is visible or disabled
|
// like whether the input is visible or disabled
|
||||||
.type('disabled error checking', { force: true })
|
.type('disabled error checking', {force: true})
|
||||||
.should('have.value', 'disabled error checking')
|
.should('have.value', 'disabled error checking')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.focus() - focus on a DOM element', () => {
|
it('.focus() - focus on a DOM element', () => {
|
||||||
// https://on.cypress.io/focus
|
// https://on.cypress.io/focus
|
||||||
cy.get('.action-focus').focus()
|
cy.get('.action-focus').focus()
|
||||||
.should('have.class', 'focus')
|
.should('have.class', 'focus')
|
||||||
.prev().should('have.attr', 'style', 'color: orange;')
|
.prev().should('have.attr', 'style', 'color: orange;')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.blur() - blur off a DOM element', () => {
|
it('.blur() - blur off a DOM element', () => {
|
||||||
// https://on.cypress.io/blur
|
// https://on.cypress.io/blur
|
||||||
cy.get('.action-blur').type('About to blur').blur()
|
cy.get('.action-blur').type('About to blur').blur()
|
||||||
.should('have.class', 'error')
|
.should('have.class', 'error')
|
||||||
.prev().should('have.attr', 'style', 'color: red;')
|
.prev().should('have.attr', 'style', 'color: red;')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.clear() - clears an input or textarea element', () => {
|
it('.clear() - clears an input or textarea element', () => {
|
||||||
// https://on.cypress.io/clear
|
// https://on.cypress.io/clear
|
||||||
cy.get('.action-clear').type('Clear this text')
|
cy.get('.action-clear').type('Clear this text')
|
||||||
.should('have.value', 'Clear this text')
|
.should('have.value', 'Clear this text')
|
||||||
.clear()
|
.clear()
|
||||||
.should('have.value', '')
|
.should('have.value', '')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.submit() - submit a form', () => {
|
it('.submit() - submit a form', () => {
|
||||||
// https://on.cypress.io/submit
|
// https://on.cypress.io/submit
|
||||||
cy.get('.action-form')
|
cy.get('.action-form')
|
||||||
.find('[type="text"]').type('HALFOFF')
|
.find('[type="text"]').type('HALFOFF')
|
||||||
|
|
||||||
cy.get('.action-form').submit()
|
cy.get('.action-form').submit()
|
||||||
.next().should('contain', 'Your form has been submitted!')
|
.next().should('contain', 'Your form has been submitted!')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.click() - click on a DOM element', () => {
|
it('.click() - click on a DOM element', () => {
|
||||||
// https://on.cypress.io/click
|
// https://on.cypress.io/click
|
||||||
cy.get('.action-btn').click()
|
cy.get('.action-btn').click()
|
||||||
|
|
||||||
// You can click on 9 specific positions of an element:
|
// You can click on 9 specific positions of an element:
|
||||||
// -----------------------------------
|
// -----------------------------------
|
||||||
// | topLeft top topRight |
|
// | topLeft top topRight |
|
||||||
// | |
|
// | |
|
||||||
// | |
|
// | |
|
||||||
// | |
|
// | |
|
||||||
// | left center right |
|
// | left center right |
|
||||||
// | |
|
// | |
|
||||||
// | |
|
// | |
|
||||||
// | |
|
// | |
|
||||||
// | bottomLeft bottom bottomRight |
|
// | bottomLeft bottom bottomRight |
|
||||||
// -----------------------------------
|
// -----------------------------------
|
||||||
|
|
||||||
// clicking in the center of the element is the default
|
// clicking in the center of the element is the default
|
||||||
cy.get('#action-canvas').click()
|
cy.get('#action-canvas').click()
|
||||||
|
|
||||||
cy.get('#action-canvas').click('topLeft')
|
cy.get('#action-canvas').click('topLeft')
|
||||||
cy.get('#action-canvas').click('top')
|
cy.get('#action-canvas').click('top')
|
||||||
cy.get('#action-canvas').click('topRight')
|
cy.get('#action-canvas').click('topRight')
|
||||||
cy.get('#action-canvas').click('left')
|
cy.get('#action-canvas').click('left')
|
||||||
cy.get('#action-canvas').click('right')
|
cy.get('#action-canvas').click('right')
|
||||||
cy.get('#action-canvas').click('bottomLeft')
|
cy.get('#action-canvas').click('bottomLeft')
|
||||||
cy.get('#action-canvas').click('bottom')
|
cy.get('#action-canvas').click('bottom')
|
||||||
cy.get('#action-canvas').click('bottomRight')
|
cy.get('#action-canvas').click('bottomRight')
|
||||||
|
|
||||||
// .click() accepts an x and y coordinate
|
// .click() accepts an x and y coordinate
|
||||||
// that controls where the click occurs :)
|
// that controls where the click occurs :)
|
||||||
|
|
||||||
cy.get('#action-canvas')
|
cy.get('#action-canvas')
|
||||||
.click(80, 75) // click 80px on x coord and 75px on y coord
|
.click(80, 75) // click 80px on x coord and 75px on y coord
|
||||||
.click(170, 75)
|
.click(170, 75)
|
||||||
.click(80, 165)
|
.click(80, 165)
|
||||||
.click(100, 185)
|
.click(100, 185)
|
||||||
.click(125, 190)
|
.click(125, 190)
|
||||||
.click(150, 185)
|
.click(150, 185)
|
||||||
.click(170, 165)
|
.click(170, 165)
|
||||||
|
|
||||||
// click multiple elements by passing multiple: true
|
// click multiple elements by passing multiple: true
|
||||||
cy.get('.action-labels>.label').click({ multiple: true })
|
cy.get('.action-labels>.label').click({multiple: true})
|
||||||
|
|
||||||
// Ignore error checking prior to clicking
|
// Ignore error checking prior to clicking
|
||||||
cy.get('.action-opacity>.btn').click({ force: true })
|
cy.get('.action-opacity>.btn').click({force: true})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.dblclick() - double click on a DOM element', () => {
|
it('.dblclick() - double click on a DOM element', () => {
|
||||||
// https://on.cypress.io/dblclick
|
// https://on.cypress.io/dblclick
|
||||||
|
|
||||||
// Our app has a listener on 'dblclick' event in our 'scripts.js'
|
// Our app has a listener on 'dblclick' event in our 'scripts.js'
|
||||||
// that hides the div and shows an input on double click
|
// that hides the div and shows an input on double click
|
||||||
cy.get('.action-div').dblclick().should('not.be.visible')
|
cy.get('.action-div').dblclick().should('not.be.visible')
|
||||||
cy.get('.action-input-hidden').should('be.visible')
|
cy.get('.action-input-hidden').should('be.visible')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.rightclick() - right click on a DOM element', () => {
|
it('.rightclick() - right click on a DOM element', () => {
|
||||||
// https://on.cypress.io/rightclick
|
// https://on.cypress.io/rightclick
|
||||||
|
|
||||||
// Our app has a listener on 'contextmenu' event in our 'scripts.js'
|
// Our app has a listener on 'contextmenu' event in our 'scripts.js'
|
||||||
// that hides the div and shows an input on right click
|
// that hides the div and shows an input on right click
|
||||||
cy.get('.rightclick-action-div').rightclick().should('not.be.visible')
|
cy.get('.rightclick-action-div').rightclick().should('not.be.visible')
|
||||||
cy.get('.rightclick-action-input-hidden').should('be.visible')
|
cy.get('.rightclick-action-input-hidden').should('be.visible')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.check() - check a checkbox or radio element', () => {
|
it('.check() - check a checkbox or radio element', () => {
|
||||||
// https://on.cypress.io/check
|
// https://on.cypress.io/check
|
||||||
|
|
||||||
// By default, .check() will check all
|
// By default, .check() will check all
|
||||||
// matching checkbox or radio elements in succession, one after another
|
// matching checkbox or radio elements in succession, one after another
|
||||||
cy.get('.action-checkboxes [type="checkbox"]').not('[disabled]')
|
cy.get('.action-checkboxes [type="checkbox"]').not('[disabled]')
|
||||||
.check().should('be.checked')
|
.check().should('be.checked')
|
||||||
|
|
||||||
cy.get('.action-radios [type="radio"]').not('[disabled]')
|
cy.get('.action-radios [type="radio"]').not('[disabled]')
|
||||||
.check().should('be.checked')
|
.check().should('be.checked')
|
||||||
|
|
||||||
// .check() accepts a value argument
|
// .check() accepts a value argument
|
||||||
cy.get('.action-radios [type="radio"]')
|
cy.get('.action-radios [type="radio"]')
|
||||||
.check('radio1').should('be.checked')
|
.check('radio1').should('be.checked')
|
||||||
|
|
||||||
// .check() accepts an array of values
|
// .check() accepts an array of values
|
||||||
cy.get('.action-multiple-checkboxes [type="checkbox"]')
|
cy.get('.action-multiple-checkboxes [type="checkbox"]')
|
||||||
.check(['checkbox1', 'checkbox2']).should('be.checked')
|
.check(['checkbox1', 'checkbox2']).should('be.checked')
|
||||||
|
|
||||||
// Ignore error checking prior to checking
|
// Ignore error checking prior to checking
|
||||||
cy.get('.action-checkboxes [disabled]')
|
cy.get('.action-checkboxes [disabled]')
|
||||||
.check({ force: true }).should('be.checked')
|
.check({force: true}).should('be.checked')
|
||||||
|
|
||||||
cy.get('.action-radios [type="radio"]')
|
cy.get('.action-radios [type="radio"]')
|
||||||
.check('radio3', { force: true }).should('be.checked')
|
.check('radio3', {force: true}).should('be.checked')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.uncheck() - uncheck a checkbox element', () => {
|
it('.uncheck() - uncheck a checkbox element', () => {
|
||||||
// https://on.cypress.io/uncheck
|
// https://on.cypress.io/uncheck
|
||||||
|
|
||||||
// By default, .uncheck() will uncheck all matching
|
// By default, .uncheck() will uncheck all matching
|
||||||
// checkbox elements in succession, one after another
|
// checkbox elements in succession, one after another
|
||||||
cy.get('.action-check [type="checkbox"]')
|
cy.get('.action-check [type="checkbox"]')
|
||||||
.not('[disabled]')
|
.not('[disabled]')
|
||||||
.uncheck().should('not.be.checked')
|
.uncheck().should('not.be.checked')
|
||||||
|
|
||||||
// .uncheck() accepts a value argument
|
// .uncheck() accepts a value argument
|
||||||
cy.get('.action-check [type="checkbox"]')
|
cy.get('.action-check [type="checkbox"]')
|
||||||
.check('checkbox1')
|
.check('checkbox1')
|
||||||
.uncheck('checkbox1').should('not.be.checked')
|
.uncheck('checkbox1').should('not.be.checked')
|
||||||
|
|
||||||
// .uncheck() accepts an array of values
|
// .uncheck() accepts an array of values
|
||||||
cy.get('.action-check [type="checkbox"]')
|
cy.get('.action-check [type="checkbox"]')
|
||||||
.check(['checkbox1', 'checkbox3'])
|
.check(['checkbox1', 'checkbox3'])
|
||||||
.uncheck(['checkbox1', 'checkbox3']).should('not.be.checked')
|
.uncheck(['checkbox1', 'checkbox3']).should('not.be.checked')
|
||||||
|
|
||||||
// Ignore error checking prior to unchecking
|
// Ignore error checking prior to unchecking
|
||||||
cy.get('.action-check [disabled]')
|
cy.get('.action-check [disabled]')
|
||||||
.uncheck({ force: true }).should('not.be.checked')
|
.uncheck({force: true}).should('not.be.checked')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.select() - select an option in a <select> element', () => {
|
it('.select() - select an option in a <select> element', () => {
|
||||||
// https://on.cypress.io/select
|
// https://on.cypress.io/select
|
||||||
|
|
||||||
// at first, no option should be selected
|
// at first, no option should be selected
|
||||||
cy.get('.action-select')
|
cy.get('.action-select')
|
||||||
.should('have.value', '--Select a fruit--')
|
.should('have.value', '--Select a fruit--')
|
||||||
|
|
||||||
// Select option(s) with matching text content
|
// Select option(s) with matching text content
|
||||||
cy.get('.action-select').select('apples')
|
cy.get('.action-select').select('apples')
|
||||||
// confirm the apples were selected
|
// confirm the apples were selected
|
||||||
// note that each value starts with "fr-" in our HTML
|
// note that each value starts with "fr-" in our HTML
|
||||||
cy.get('.action-select').should('have.value', 'fr-apples')
|
cy.get('.action-select').should('have.value', 'fr-apples')
|
||||||
|
|
||||||
cy.get('.action-select-multiple')
|
cy.get('.action-select-multiple')
|
||||||
.select(['apples', 'oranges', 'bananas'])
|
.select(['apples', 'oranges', 'bananas'])
|
||||||
// when getting multiple values, invoke "val" method first
|
// when getting multiple values, invoke "val" method first
|
||||||
.invoke('val')
|
.invoke('val')
|
||||||
.should('deep.equal', ['fr-apples', 'fr-oranges', 'fr-bananas'])
|
.should('deep.equal', ['fr-apples', 'fr-oranges', 'fr-bananas'])
|
||||||
|
|
||||||
// Select option(s) with matching value
|
// Select option(s) with matching value
|
||||||
cy.get('.action-select').select('fr-bananas')
|
cy.get('.action-select').select('fr-bananas')
|
||||||
// can attach an assertion right away to the element
|
// can attach an assertion right away to the element
|
||||||
.should('have.value', 'fr-bananas')
|
.should('have.value', 'fr-bananas')
|
||||||
|
|
||||||
cy.get('.action-select-multiple')
|
cy.get('.action-select-multiple')
|
||||||
.select(['fr-apples', 'fr-oranges', 'fr-bananas'])
|
.select(['fr-apples', 'fr-oranges', 'fr-bananas'])
|
||||||
.invoke('val')
|
.invoke('val')
|
||||||
.should('deep.equal', ['fr-apples', 'fr-oranges', 'fr-bananas'])
|
.should('deep.equal', ['fr-apples', 'fr-oranges', 'fr-bananas'])
|
||||||
|
|
||||||
// assert the selected values include oranges
|
// assert the selected values include oranges
|
||||||
cy.get('.action-select-multiple')
|
cy.get('.action-select-multiple')
|
||||||
.invoke('val').should('include', 'fr-oranges')
|
.invoke('val').should('include', 'fr-oranges')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.scrollIntoView() - scroll an element into view', () => {
|
it('.scrollIntoView() - scroll an element into view', () => {
|
||||||
// https://on.cypress.io/scrollintoview
|
// https://on.cypress.io/scrollintoview
|
||||||
|
|
||||||
// normally all of these buttons are hidden,
|
// normally all of these buttons are hidden,
|
||||||
// because they're not within
|
// because they're not within
|
||||||
// the viewable area of their parent
|
// the viewable area of their parent
|
||||||
// (we need to scroll to see them)
|
// (we need to scroll to see them)
|
||||||
cy.get('#scroll-horizontal button')
|
cy.get('#scroll-horizontal button')
|
||||||
.should('not.be.visible')
|
.should('not.be.visible')
|
||||||
|
|
||||||
// scroll the button into view, as if the user had scrolled
|
// scroll the button into view, as if the user had scrolled
|
||||||
cy.get('#scroll-horizontal button').scrollIntoView()
|
cy.get('#scroll-horizontal button').scrollIntoView()
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
|
|
||||||
cy.get('#scroll-vertical button')
|
cy.get('#scroll-vertical button')
|
||||||
.should('not.be.visible')
|
.should('not.be.visible')
|
||||||
|
|
||||||
// Cypress handles the scroll direction needed
|
// Cypress handles the scroll direction needed
|
||||||
cy.get('#scroll-vertical button').scrollIntoView()
|
cy.get('#scroll-vertical button').scrollIntoView()
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
|
|
||||||
cy.get('#scroll-both button')
|
cy.get('#scroll-both button')
|
||||||
.should('not.be.visible')
|
.should('not.be.visible')
|
||||||
|
|
||||||
// Cypress knows to scroll to the right and down
|
// Cypress knows to scroll to the right and down
|
||||||
cy.get('#scroll-both button').scrollIntoView()
|
cy.get('#scroll-both button').scrollIntoView()
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.trigger() - trigger an event on a DOM element', () => {
|
it('.trigger() - trigger an event on a DOM element', () => {
|
||||||
// https://on.cypress.io/trigger
|
// https://on.cypress.io/trigger
|
||||||
|
|
||||||
// To interact with a range input (slider)
|
// To interact with a range input (slider)
|
||||||
// we need to set its value & trigger the
|
// we need to set its value & trigger the
|
||||||
// event to signal it changed
|
// event to signal it changed
|
||||||
|
|
||||||
// Here, we invoke jQuery's val() method to set
|
// Here, we invoke jQuery's val() method to set
|
||||||
// the value and trigger the 'change' event
|
// the value and trigger the 'change' event
|
||||||
cy.get('.trigger-input-range')
|
cy.get('.trigger-input-range')
|
||||||
.invoke('val', 25)
|
.invoke('val', 25)
|
||||||
.trigger('change')
|
.trigger('change')
|
||||||
.get('input[type=range]').siblings('p')
|
.get('input[type=range]').siblings('p')
|
||||||
.should('have.text', '25')
|
.should('have.text', '25')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('cy.scrollTo() - scroll the window or element to a position', () => {
|
it('cy.scrollTo() - scroll the window or element to a position', () => {
|
||||||
// https://on.cypress.io/scrollto
|
// https://on.cypress.io/scrollto
|
||||||
|
|
||||||
// You can scroll to 9 specific positions of an element:
|
// You can scroll to 9 specific positions of an element:
|
||||||
// -----------------------------------
|
// -----------------------------------
|
||||||
// | topLeft top topRight |
|
// | topLeft top topRight |
|
||||||
// | |
|
// | |
|
||||||
// | |
|
// | |
|
||||||
// | |
|
// | |
|
||||||
// | left center right |
|
// | left center right |
|
||||||
// | |
|
// | |
|
||||||
// | |
|
// | |
|
||||||
// | |
|
// | |
|
||||||
// | bottomLeft bottom bottomRight |
|
// | bottomLeft bottom bottomRight |
|
||||||
// -----------------------------------
|
// -----------------------------------
|
||||||
|
|
||||||
// if you chain .scrollTo() off of cy, we will
|
// if you chain .scrollTo() off of cy, we will
|
||||||
// scroll the entire window
|
// scroll the entire window
|
||||||
cy.scrollTo('bottom')
|
cy.scrollTo('bottom')
|
||||||
|
|
||||||
cy.get('#scrollable-horizontal').scrollTo('right')
|
cy.get('#scrollable-horizontal').scrollTo('right')
|
||||||
|
|
||||||
// or you can scroll to a specific coordinate:
|
// or you can scroll to a specific coordinate:
|
||||||
// (x axis, y axis) in pixels
|
// (x axis, y axis) in pixels
|
||||||
cy.get('#scrollable-vertical').scrollTo(250, 250)
|
cy.get('#scrollable-vertical').scrollTo(250, 250)
|
||||||
|
|
||||||
// or you can scroll to a specific percentage
|
// or you can scroll to a specific percentage
|
||||||
// of the (width, height) of the element
|
// of the (width, height) of the element
|
||||||
cy.get('#scrollable-both').scrollTo('75%', '25%')
|
cy.get('#scrollable-both').scrollTo('75%', '25%')
|
||||||
|
|
||||||
// control the easing of the scroll (default is 'swing')
|
// control the easing of the scroll (default is 'swing')
|
||||||
cy.get('#scrollable-vertical').scrollTo('center', { easing: 'linear' })
|
cy.get('#scrollable-vertical').scrollTo('center', {easing: 'linear'})
|
||||||
|
|
||||||
// control the duration of the scroll (in ms)
|
// control the duration of the scroll (in ms)
|
||||||
cy.get('#scrollable-both').scrollTo('center', { duration: 2000 })
|
cy.get('#scrollable-both').scrollTo('center', {duration: 2000})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,39 +1,39 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Aliasing', () => {
|
context('Aliasing', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/aliasing')
|
cy.visit('https://example.cypress.io/commands/aliasing')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.as() - alias a DOM element for later use', () => {
|
it('.as() - alias a DOM element for later use', () => {
|
||||||
// https://on.cypress.io/as
|
// https://on.cypress.io/as
|
||||||
|
|
||||||
// Alias a DOM element for use later
|
// Alias a DOM element for use later
|
||||||
// We don't have to traverse to the element
|
// We don't have to traverse to the element
|
||||||
// later in our code, we reference it with @
|
// later in our code, we reference it with @
|
||||||
|
|
||||||
cy.get('.as-table').find('tbody>tr')
|
cy.get('.as-table').find('tbody>tr')
|
||||||
.first().find('td').first()
|
.first().find('td').first()
|
||||||
.find('button').as('firstBtn')
|
.find('button').as('firstBtn')
|
||||||
|
|
||||||
// when we reference the alias, we place an
|
// when we reference the alias, we place an
|
||||||
// @ in front of its name
|
// @ in front of its name
|
||||||
cy.get('@firstBtn').click()
|
cy.get('@firstBtn').click()
|
||||||
|
|
||||||
cy.get('@firstBtn')
|
cy.get('@firstBtn')
|
||||||
.should('have.class', 'btn-success')
|
.should('have.class', 'btn-success')
|
||||||
.and('contain', 'Changed')
|
.and('contain', 'Changed')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.as() - alias a route for later use', () => {
|
it('.as() - alias a route for later use', () => {
|
||||||
// Alias the route to wait for its response
|
// Alias the route to wait for its response
|
||||||
cy.intercept('GET', '**/comments/*').as('getComment')
|
cy.intercept('GET', '**/comments/*').as('getComment')
|
||||||
|
|
||||||
// we have code that gets a comment when
|
// we have code that gets a comment when
|
||||||
// the button is clicked in scripts.js
|
// the button is clicked in scripts.js
|
||||||
cy.get('.network-btn').click()
|
cy.get('.network-btn').click()
|
||||||
|
|
||||||
// https://on.cypress.io/wait
|
// https://on.cypress.io/wait
|
||||||
cy.wait('@getComment').its('response.statusCode').should('eq', 200)
|
cy.wait('@getComment').its('response.statusCode').should('eq', 200)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,177 +1,177 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Assertions', () => {
|
context('Assertions', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/assertions')
|
cy.visit('https://example.cypress.io/commands/assertions')
|
||||||
})
|
|
||||||
|
|
||||||
describe('Implicit Assertions', () => {
|
|
||||||
it('.should() - make an assertion about the current subject', () => {
|
|
||||||
// https://on.cypress.io/should
|
|
||||||
cy.get('.assertion-table')
|
|
||||||
.find('tbody tr:last')
|
|
||||||
.should('have.class', 'success')
|
|
||||||
.find('td')
|
|
||||||
.first()
|
|
||||||
// checking the text of the <td> element in various ways
|
|
||||||
.should('have.text', 'Column content')
|
|
||||||
.should('contain', 'Column content')
|
|
||||||
.should('have.html', 'Column content')
|
|
||||||
// chai-jquery uses "is()" to check if element matches selector
|
|
||||||
.should('match', 'td')
|
|
||||||
// to match text content against a regular expression
|
|
||||||
// first need to invoke jQuery method text()
|
|
||||||
// and then match using regular expression
|
|
||||||
.invoke('text')
|
|
||||||
.should('match', /column content/i)
|
|
||||||
|
|
||||||
// a better way to check element's text content against a regular expression
|
|
||||||
// is to use "cy.contains"
|
|
||||||
// https://on.cypress.io/contains
|
|
||||||
cy.get('.assertion-table')
|
|
||||||
.find('tbody tr:last')
|
|
||||||
// finds first <td> element with text content matching regular expression
|
|
||||||
.contains('td', /column content/i)
|
|
||||||
.should('be.visible')
|
|
||||||
|
|
||||||
// for more information about asserting element's text
|
|
||||||
// see https://on.cypress.io/using-cypress-faq#How-do-I-get-an-element’s-text-contents
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.and() - chain multiple assertions together', () => {
|
describe('Implicit Assertions', () => {
|
||||||
// https://on.cypress.io/and
|
it('.should() - make an assertion about the current subject', () => {
|
||||||
cy.get('.assertions-link')
|
// https://on.cypress.io/should
|
||||||
.should('have.class', 'active')
|
cy.get('.assertion-table')
|
||||||
.and('have.attr', 'href')
|
.find('tbody tr:last')
|
||||||
.and('include', 'cypress.io')
|
.should('have.class', 'success')
|
||||||
})
|
.find('td')
|
||||||
})
|
.first()
|
||||||
|
// checking the text of the <td> element in various ways
|
||||||
|
.should('have.text', 'Column content')
|
||||||
|
.should('contain', 'Column content')
|
||||||
|
.should('have.html', 'Column content')
|
||||||
|
// chai-jquery uses "is()" to check if element matches selector
|
||||||
|
.should('match', 'td')
|
||||||
|
// to match text content against a regular expression
|
||||||
|
// first need to invoke jQuery method text()
|
||||||
|
// and then match using regular expression
|
||||||
|
.invoke('text')
|
||||||
|
.should('match', /column content/i)
|
||||||
|
|
||||||
describe('Explicit Assertions', () => {
|
// a better way to check element's text content against a regular expression
|
||||||
// https://on.cypress.io/assertions
|
// is to use "cy.contains"
|
||||||
it('expect - make an assertion about a specified subject', () => {
|
// https://on.cypress.io/contains
|
||||||
// We can use Chai's BDD style assertions
|
cy.get('.assertion-table')
|
||||||
expect(true).to.be.true
|
.find('tbody tr:last')
|
||||||
const o = { foo: 'bar' }
|
// finds first <td> element with text content matching regular expression
|
||||||
|
.contains('td', /column content/i)
|
||||||
|
.should('be.visible')
|
||||||
|
|
||||||
expect(o).to.equal(o)
|
// for more information about asserting element's text
|
||||||
expect(o).to.deep.equal({ foo: 'bar' })
|
// see https://on.cypress.io/using-cypress-faq#How-do-I-get-an-element’s-text-contents
|
||||||
// matching text using regular expression
|
})
|
||||||
expect('FooBar').to.match(/bar$/i)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('pass your own callback function to should()', () => {
|
it('.and() - chain multiple assertions together', () => {
|
||||||
// Pass a function to should that can have any number
|
// https://on.cypress.io/and
|
||||||
// of explicit assertions within it.
|
cy.get('.assertions-link')
|
||||||
// The ".should(cb)" function will be retried
|
.should('have.class', 'active')
|
||||||
// automatically until it passes all your explicit assertions or times out.
|
.and('have.attr', 'href')
|
||||||
cy.get('.assertions-p')
|
.and('include', 'cypress.io')
|
||||||
.find('p')
|
|
||||||
.should(($p) => {
|
|
||||||
// https://on.cypress.io/$
|
|
||||||
// return an array of texts from all of the p's
|
|
||||||
// @ts-ignore TS6133 unused variable
|
|
||||||
const texts = $p.map((i, el) => Cypress.$(el).text())
|
|
||||||
|
|
||||||
// jquery map returns jquery object
|
|
||||||
// and .get() convert this to simple array
|
|
||||||
const paragraphs = texts.get()
|
|
||||||
|
|
||||||
// array should have length of 3
|
|
||||||
expect(paragraphs, 'has 3 paragraphs').to.have.length(3)
|
|
||||||
|
|
||||||
// use second argument to expect(...) to provide clear
|
|
||||||
// message with each assertion
|
|
||||||
expect(paragraphs, 'has expected text in each paragraph').to.deep.eq([
|
|
||||||
'Some text from first p',
|
|
||||||
'More text from second p',
|
|
||||||
'And even more text from third p',
|
|
||||||
])
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('finds element by class name regex', () => {
|
describe('Explicit Assertions', () => {
|
||||||
cy.get('.docs-header')
|
// https://on.cypress.io/assertions
|
||||||
.find('div')
|
it('expect - make an assertion about a specified subject', () => {
|
||||||
// .should(cb) callback function will be retried
|
// We can use Chai's BDD style assertions
|
||||||
.should(($div) => {
|
expect(true).to.be.true
|
||||||
expect($div).to.have.length(1)
|
const o = {foo: 'bar'}
|
||||||
|
|
||||||
const className = $div[0].className
|
expect(o).to.equal(o)
|
||||||
|
expect(o).to.deep.equal({foo: 'bar'})
|
||||||
expect(className).to.match(/heading-/)
|
// matching text using regular expression
|
||||||
|
expect('FooBar').to.match(/bar$/i)
|
||||||
})
|
})
|
||||||
// .then(cb) callback is not retried,
|
|
||||||
// it either passes or fails
|
it('pass your own callback function to should()', () => {
|
||||||
.then(($div) => {
|
// Pass a function to should that can have any number
|
||||||
expect($div, 'text content').to.have.text('Introduction')
|
// of explicit assertions within it.
|
||||||
|
// The ".should(cb)" function will be retried
|
||||||
|
// automatically until it passes all your explicit assertions or times out.
|
||||||
|
cy.get('.assertions-p')
|
||||||
|
.find('p')
|
||||||
|
.should(($p) => {
|
||||||
|
// https://on.cypress.io/$
|
||||||
|
// return an array of texts from all of the p's
|
||||||
|
// @ts-ignore TS6133 unused variable
|
||||||
|
const texts = $p.map((i, el) => Cypress.$(el).text())
|
||||||
|
|
||||||
|
// jquery map returns jquery object
|
||||||
|
// and .get() convert this to simple array
|
||||||
|
const paragraphs = texts.get()
|
||||||
|
|
||||||
|
// array should have length of 3
|
||||||
|
expect(paragraphs, 'has 3 paragraphs').to.have.length(3)
|
||||||
|
|
||||||
|
// use second argument to expect(...) to provide clear
|
||||||
|
// message with each assertion
|
||||||
|
expect(paragraphs, 'has expected text in each paragraph').to.deep.eq([
|
||||||
|
'Some text from first p',
|
||||||
|
'More text from second p',
|
||||||
|
'And even more text from third p',
|
||||||
|
])
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('finds element by class name regex', () => {
|
||||||
|
cy.get('.docs-header')
|
||||||
|
.find('div')
|
||||||
|
// .should(cb) callback function will be retried
|
||||||
|
.should(($div) => {
|
||||||
|
expect($div).to.have.length(1)
|
||||||
|
|
||||||
|
const className = $div[0].className
|
||||||
|
|
||||||
|
expect(className).to.match(/heading-/)
|
||||||
|
})
|
||||||
|
// .then(cb) callback is not retried,
|
||||||
|
// it either passes or fails
|
||||||
|
.then(($div) => {
|
||||||
|
expect($div, 'text content').to.have.text('Introduction')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('can throw any error', () => {
|
||||||
|
cy.get('.docs-header')
|
||||||
|
.find('div')
|
||||||
|
.should(($div) => {
|
||||||
|
if ($div.length !== 1) {
|
||||||
|
// you can throw your own errors
|
||||||
|
throw new Error('Did not find 1 element')
|
||||||
|
}
|
||||||
|
|
||||||
|
const className = $div[0].className
|
||||||
|
|
||||||
|
if (!className.match(/heading-/)) {
|
||||||
|
throw new Error(`Could not find class "heading-" in ${className}`)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('matches unknown text between two elements', () => {
|
||||||
|
/**
|
||||||
|
* Text from the first element.
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
let text
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Normalizes passed text,
|
||||||
|
* useful before comparing text with spaces and different capitalization.
|
||||||
|
* @param {string} s Text to normalize
|
||||||
|
*/
|
||||||
|
const normalizeText = (s) => s.replace(/\s/g, '').toLowerCase()
|
||||||
|
|
||||||
|
cy.get('.two-elements')
|
||||||
|
.find('.first')
|
||||||
|
.then(($first) => {
|
||||||
|
// save text from the first element
|
||||||
|
text = normalizeText($first.text())
|
||||||
|
})
|
||||||
|
|
||||||
|
cy.get('.two-elements')
|
||||||
|
.find('.second')
|
||||||
|
.should(($div) => {
|
||||||
|
// we can massage text before comparing
|
||||||
|
const secondText = normalizeText($div.text())
|
||||||
|
|
||||||
|
expect(secondText, 'second text').to.equal(text)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('assert - assert shape of an object', () => {
|
||||||
|
const person = {
|
||||||
|
name: 'Joe',
|
||||||
|
age: 20,
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.isObject(person, 'value is object')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('retries the should callback until assertions pass', () => {
|
||||||
|
cy.get('#random-number')
|
||||||
|
.should(($div) => {
|
||||||
|
const n = parseFloat($div.text())
|
||||||
|
|
||||||
|
expect(n).to.be.gte(1).and.be.lte(10)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can throw any error', () => {
|
|
||||||
cy.get('.docs-header')
|
|
||||||
.find('div')
|
|
||||||
.should(($div) => {
|
|
||||||
if ($div.length !== 1) {
|
|
||||||
// you can throw your own errors
|
|
||||||
throw new Error('Did not find 1 element')
|
|
||||||
}
|
|
||||||
|
|
||||||
const className = $div[0].className
|
|
||||||
|
|
||||||
if (!className.match(/heading-/)) {
|
|
||||||
throw new Error(`Could not find class "heading-" in ${className}`)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('matches unknown text between two elements', () => {
|
|
||||||
/**
|
|
||||||
* Text from the first element.
|
|
||||||
* @type {string}
|
|
||||||
*/
|
|
||||||
let text
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Normalizes passed text,
|
|
||||||
* useful before comparing text with spaces and different capitalization.
|
|
||||||
* @param {string} s Text to normalize
|
|
||||||
*/
|
|
||||||
const normalizeText = (s) => s.replace(/\s/g, '').toLowerCase()
|
|
||||||
|
|
||||||
cy.get('.two-elements')
|
|
||||||
.find('.first')
|
|
||||||
.then(($first) => {
|
|
||||||
// save text from the first element
|
|
||||||
text = normalizeText($first.text())
|
|
||||||
})
|
|
||||||
|
|
||||||
cy.get('.two-elements')
|
|
||||||
.find('.second')
|
|
||||||
.should(($div) => {
|
|
||||||
// we can massage text before comparing
|
|
||||||
const secondText = normalizeText($div.text())
|
|
||||||
|
|
||||||
expect(secondText, 'second text').to.equal(text)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('assert - assert shape of an object', () => {
|
|
||||||
const person = {
|
|
||||||
name: 'Joe',
|
|
||||||
age: 20,
|
|
||||||
}
|
|
||||||
|
|
||||||
assert.isObject(person, 'value is object')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('retries the should callback until assertions pass', () => {
|
|
||||||
cy.get('#random-number')
|
|
||||||
.should(($div) => {
|
|
||||||
const n = parseFloat($div.text())
|
|
||||||
|
|
||||||
expect(n).to.be.gte(1).and.be.lte(10)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,97 +1,97 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Connectors', () => {
|
context('Connectors', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/connectors')
|
cy.visit('https://example.cypress.io/commands/connectors')
|
||||||
})
|
|
||||||
|
|
||||||
it('.each() - iterate over an array of elements', () => {
|
|
||||||
// https://on.cypress.io/each
|
|
||||||
cy.get('.connectors-each-ul>li')
|
|
||||||
.each(($el, index, $list) => {
|
|
||||||
console.log($el, index, $list)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('.its() - get properties on the current subject', () => {
|
|
||||||
// https://on.cypress.io/its
|
|
||||||
cy.get('.connectors-its-ul>li')
|
|
||||||
// calls the 'length' property yielding that value
|
|
||||||
.its('length')
|
|
||||||
.should('be.gt', 2)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('.invoke() - invoke a function on the current subject', () => {
|
|
||||||
// our div is hidden in our script.js
|
|
||||||
// $('.connectors-div').hide()
|
|
||||||
|
|
||||||
// https://on.cypress.io/invoke
|
|
||||||
cy.get('.connectors-div').should('be.hidden')
|
|
||||||
// call the jquery method 'show' on the 'div.container'
|
|
||||||
.invoke('show')
|
|
||||||
.should('be.visible')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('.spread() - spread an array as individual args to callback function', () => {
|
|
||||||
// https://on.cypress.io/spread
|
|
||||||
const arr = ['foo', 'bar', 'baz']
|
|
||||||
|
|
||||||
cy.wrap(arr).spread((foo, bar, baz) => {
|
|
||||||
expect(foo).to.eq('foo')
|
|
||||||
expect(bar).to.eq('bar')
|
|
||||||
expect(baz).to.eq('baz')
|
|
||||||
})
|
})
|
||||||
})
|
|
||||||
|
|
||||||
describe('.then()', () => {
|
it('.each() - iterate over an array of elements', () => {
|
||||||
it('invokes a callback function with the current subject', () => {
|
// https://on.cypress.io/each
|
||||||
// https://on.cypress.io/then
|
cy.get('.connectors-each-ul>li')
|
||||||
cy.get('.connectors-list > li')
|
.each(($el, index, $list) => {
|
||||||
.then(($lis) => {
|
console.log($el, index, $list)
|
||||||
expect($lis, '3 items').to.have.length(3)
|
})
|
||||||
expect($lis.eq(0), 'first item').to.contain('Walk the dog')
|
})
|
||||||
expect($lis.eq(1), 'second item').to.contain('Feed the cat')
|
|
||||||
expect($lis.eq(2), 'third item').to.contain('Write JavaScript')
|
it('.its() - get properties on the current subject', () => {
|
||||||
|
// https://on.cypress.io/its
|
||||||
|
cy.get('.connectors-its-ul>li')
|
||||||
|
// calls the 'length' property yielding that value
|
||||||
|
.its('length')
|
||||||
|
.should('be.gt', 2)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('.invoke() - invoke a function on the current subject', () => {
|
||||||
|
// our div is hidden in our script.js
|
||||||
|
// $('.connectors-div').hide()
|
||||||
|
|
||||||
|
// https://on.cypress.io/invoke
|
||||||
|
cy.get('.connectors-div').should('be.hidden')
|
||||||
|
// call the jquery method 'show' on the 'div.container'
|
||||||
|
.invoke('show')
|
||||||
|
.should('be.visible')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('.spread() - spread an array as individual args to callback function', () => {
|
||||||
|
// https://on.cypress.io/spread
|
||||||
|
const arr = ['foo', 'bar', 'baz']
|
||||||
|
|
||||||
|
cy.wrap(arr).spread((foo, bar, baz) => {
|
||||||
|
expect(foo).to.eq('foo')
|
||||||
|
expect(bar).to.eq('bar')
|
||||||
|
expect(baz).to.eq('baz')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('yields the returned value to the next command', () => {
|
describe('.then()', () => {
|
||||||
cy.wrap(1)
|
it('invokes a callback function with the current subject', () => {
|
||||||
.then((num) => {
|
// https://on.cypress.io/then
|
||||||
expect(num).to.equal(1)
|
cy.get('.connectors-list > li')
|
||||||
|
.then(($lis) => {
|
||||||
return 2
|
expect($lis, '3 items').to.have.length(3)
|
||||||
|
expect($lis.eq(0), 'first item').to.contain('Walk the dog')
|
||||||
|
expect($lis.eq(1), 'second item').to.contain('Feed the cat')
|
||||||
|
expect($lis.eq(2), 'third item').to.contain('Write JavaScript')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.then((num) => {
|
|
||||||
expect(num).to.equal(2)
|
it('yields the returned value to the next command', () => {
|
||||||
|
cy.wrap(1)
|
||||||
|
.then((num) => {
|
||||||
|
expect(num).to.equal(1)
|
||||||
|
|
||||||
|
return 2
|
||||||
|
})
|
||||||
|
.then((num) => {
|
||||||
|
expect(num).to.equal(2)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('yields the original subject without return', () => {
|
||||||
|
cy.wrap(1)
|
||||||
|
.then((num) => {
|
||||||
|
expect(num).to.equal(1)
|
||||||
|
// note that nothing is returned from this callback
|
||||||
|
})
|
||||||
|
.then((num) => {
|
||||||
|
// this callback receives the original unchanged value 1
|
||||||
|
expect(num).to.equal(1)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('yields the value yielded by the last Cypress command inside', () => {
|
||||||
|
cy.wrap(1)
|
||||||
|
.then((num) => {
|
||||||
|
expect(num).to.equal(1)
|
||||||
|
// note how we run a Cypress command
|
||||||
|
// the result yielded by this Cypress command
|
||||||
|
// will be passed to the second ".then"
|
||||||
|
cy.wrap(2)
|
||||||
|
})
|
||||||
|
.then((num) => {
|
||||||
|
// this callback receives the value yielded by "cy.wrap(2)"
|
||||||
|
expect(num).to.equal(2)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('yields the original subject without return', () => {
|
|
||||||
cy.wrap(1)
|
|
||||||
.then((num) => {
|
|
||||||
expect(num).to.equal(1)
|
|
||||||
// note that nothing is returned from this callback
|
|
||||||
})
|
|
||||||
.then((num) => {
|
|
||||||
// this callback receives the original unchanged value 1
|
|
||||||
expect(num).to.equal(1)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('yields the value yielded by the last Cypress command inside', () => {
|
|
||||||
cy.wrap(1)
|
|
||||||
.then((num) => {
|
|
||||||
expect(num).to.equal(1)
|
|
||||||
// note how we run a Cypress command
|
|
||||||
// the result yielded by this Cypress command
|
|
||||||
// will be passed to the second ".then"
|
|
||||||
cy.wrap(2)
|
|
||||||
})
|
|
||||||
.then((num) => {
|
|
||||||
// this callback receives the value yielded by "cy.wrap(2)"
|
|
||||||
expect(num).to.equal(2)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,77 +1,77 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Cookies', () => {
|
context('Cookies', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
Cypress.Cookies.debug(true)
|
Cypress.Cookies.debug(true)
|
||||||
|
|
||||||
cy.visit('https://example.cypress.io/commands/cookies')
|
cy.visit('https://example.cypress.io/commands/cookies')
|
||||||
|
|
||||||
// clear cookies again after visiting to remove
|
// clear cookies again after visiting to remove
|
||||||
// any 3rd party cookies picked up such as cloudflare
|
// any 3rd party cookies picked up such as cloudflare
|
||||||
cy.clearCookies()
|
cy.clearCookies()
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.getCookie() - get a browser cookie', () => {
|
|
||||||
// https://on.cypress.io/getcookie
|
|
||||||
cy.get('#getCookie .set-a-cookie').click()
|
|
||||||
|
|
||||||
// cy.getCookie() yields a cookie object
|
|
||||||
cy.getCookie('token').should('have.property', 'value', '123ABC')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.getCookies() - get browser cookies', () => {
|
|
||||||
// https://on.cypress.io/getcookies
|
|
||||||
cy.getCookies().should('be.empty')
|
|
||||||
|
|
||||||
cy.get('#getCookies .set-a-cookie').click()
|
|
||||||
|
|
||||||
// cy.getCookies() yields an array of cookies
|
|
||||||
cy.getCookies().should('have.length', 1).should((cookies) => {
|
|
||||||
// each cookie has these properties
|
|
||||||
expect(cookies[0]).to.have.property('name', 'token')
|
|
||||||
expect(cookies[0]).to.have.property('value', '123ABC')
|
|
||||||
expect(cookies[0]).to.have.property('httpOnly', false)
|
|
||||||
expect(cookies[0]).to.have.property('secure', false)
|
|
||||||
expect(cookies[0]).to.have.property('domain')
|
|
||||||
expect(cookies[0]).to.have.property('path')
|
|
||||||
})
|
})
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.setCookie() - set a browser cookie', () => {
|
it('cy.getCookie() - get a browser cookie', () => {
|
||||||
// https://on.cypress.io/setcookie
|
// https://on.cypress.io/getcookie
|
||||||
cy.getCookies().should('be.empty')
|
cy.get('#getCookie .set-a-cookie').click()
|
||||||
|
|
||||||
cy.setCookie('foo', 'bar')
|
// cy.getCookie() yields a cookie object
|
||||||
|
cy.getCookie('token').should('have.property', 'value', '123ABC')
|
||||||
|
})
|
||||||
|
|
||||||
// cy.getCookie() yields a cookie object
|
it('cy.getCookies() - get browser cookies', () => {
|
||||||
cy.getCookie('foo').should('have.property', 'value', 'bar')
|
// https://on.cypress.io/getcookies
|
||||||
})
|
cy.getCookies().should('be.empty')
|
||||||
|
|
||||||
it('cy.clearCookie() - clear a browser cookie', () => {
|
cy.get('#getCookies .set-a-cookie').click()
|
||||||
// https://on.cypress.io/clearcookie
|
|
||||||
cy.getCookie('token').should('be.null')
|
|
||||||
|
|
||||||
cy.get('#clearCookie .set-a-cookie').click()
|
// cy.getCookies() yields an array of cookies
|
||||||
|
cy.getCookies().should('have.length', 1).should((cookies) => {
|
||||||
|
// each cookie has these properties
|
||||||
|
expect(cookies[0]).to.have.property('name', 'token')
|
||||||
|
expect(cookies[0]).to.have.property('value', '123ABC')
|
||||||
|
expect(cookies[0]).to.have.property('httpOnly', false)
|
||||||
|
expect(cookies[0]).to.have.property('secure', false)
|
||||||
|
expect(cookies[0]).to.have.property('domain')
|
||||||
|
expect(cookies[0]).to.have.property('path')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
cy.getCookie('token').should('have.property', 'value', '123ABC')
|
it('cy.setCookie() - set a browser cookie', () => {
|
||||||
|
// https://on.cypress.io/setcookie
|
||||||
|
cy.getCookies().should('be.empty')
|
||||||
|
|
||||||
// cy.clearCookies() yields null
|
cy.setCookie('foo', 'bar')
|
||||||
cy.clearCookie('token').should('be.null')
|
|
||||||
|
|
||||||
cy.getCookie('token').should('be.null')
|
// cy.getCookie() yields a cookie object
|
||||||
})
|
cy.getCookie('foo').should('have.property', 'value', 'bar')
|
||||||
|
})
|
||||||
|
|
||||||
it('cy.clearCookies() - clear browser cookies', () => {
|
it('cy.clearCookie() - clear a browser cookie', () => {
|
||||||
// https://on.cypress.io/clearcookies
|
// https://on.cypress.io/clearcookie
|
||||||
cy.getCookies().should('be.empty')
|
cy.getCookie('token').should('be.null')
|
||||||
|
|
||||||
cy.get('#clearCookies .set-a-cookie').click()
|
cy.get('#clearCookie .set-a-cookie').click()
|
||||||
|
|
||||||
cy.getCookies().should('have.length', 1)
|
cy.getCookie('token').should('have.property', 'value', '123ABC')
|
||||||
|
|
||||||
// cy.clearCookies() yields null
|
// cy.clearCookies() yields null
|
||||||
cy.clearCookies()
|
cy.clearCookie('token').should('be.null')
|
||||||
|
|
||||||
cy.getCookies().should('be.empty')
|
cy.getCookie('token').should('be.null')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('cy.clearCookies() - clear browser cookies', () => {
|
||||||
|
// https://on.cypress.io/clearcookies
|
||||||
|
cy.getCookies().should('be.empty')
|
||||||
|
|
||||||
|
cy.get('#clearCookies .set-a-cookie').click()
|
||||||
|
|
||||||
|
cy.getCookies().should('have.length', 1)
|
||||||
|
|
||||||
|
// cy.clearCookies() yields null
|
||||||
|
cy.clearCookies()
|
||||||
|
|
||||||
|
cy.getCookies().should('be.empty')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,202 +1,202 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Cypress.Commands', () => {
|
context('Cypress.Commands', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/cypress-api')
|
cy.visit('https://example.cypress.io/cypress-api')
|
||||||
})
|
|
||||||
|
|
||||||
// https://on.cypress.io/custom-commands
|
|
||||||
|
|
||||||
it('.add() - create a custom command', () => {
|
|
||||||
Cypress.Commands.add('console', {
|
|
||||||
prevSubject: true,
|
|
||||||
}, (subject, method) => {
|
|
||||||
// the previous subject is automatically received
|
|
||||||
// and the commands arguments are shifted
|
|
||||||
|
|
||||||
// allow us to change the console method used
|
|
||||||
method = method || 'log'
|
|
||||||
|
|
||||||
// log the subject to the console
|
|
||||||
// @ts-ignore TS7017
|
|
||||||
console[method]('The subject is', subject)
|
|
||||||
|
|
||||||
// whatever we return becomes the new subject
|
|
||||||
// we don't want to change the subject so
|
|
||||||
// we return whatever was passed in
|
|
||||||
return subject
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// @ts-ignore TS2339
|
// https://on.cypress.io/custom-commands
|
||||||
cy.get('button').console('info').then(($button) => {
|
|
||||||
// subject is still $button
|
it('.add() - create a custom command', () => {
|
||||||
|
Cypress.Commands.add('console', {
|
||||||
|
prevSubject: true,
|
||||||
|
}, (subject, method) => {
|
||||||
|
// the previous subject is automatically received
|
||||||
|
// and the commands arguments are shifted
|
||||||
|
|
||||||
|
// allow us to change the console method used
|
||||||
|
method = method || 'log'
|
||||||
|
|
||||||
|
// log the subject to the console
|
||||||
|
// @ts-ignore TS7017
|
||||||
|
console[method]('The subject is', subject)
|
||||||
|
|
||||||
|
// whatever we return becomes the new subject
|
||||||
|
// we don't want to change the subject so
|
||||||
|
// we return whatever was passed in
|
||||||
|
return subject
|
||||||
|
})
|
||||||
|
|
||||||
|
// @ts-ignore TS2339
|
||||||
|
cy.get('button').console('info').then(($button) => {
|
||||||
|
// subject is still $button
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
context('Cypress.Cookies', () => {
|
context('Cypress.Cookies', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/cypress-api')
|
cy.visit('https://example.cypress.io/cypress-api')
|
||||||
})
|
})
|
||||||
|
|
||||||
// https://on.cypress.io/cookies
|
// https://on.cypress.io/cookies
|
||||||
it('.debug() - enable or disable debugging', () => {
|
it('.debug() - enable or disable debugging', () => {
|
||||||
Cypress.Cookies.debug(true)
|
Cypress.Cookies.debug(true)
|
||||||
|
|
||||||
// Cypress will now log in the console when
|
// Cypress will now log in the console when
|
||||||
// cookies are set or cleared
|
// cookies are set or cleared
|
||||||
cy.setCookie('fakeCookie', '123ABC')
|
cy.setCookie('fakeCookie', '123ABC')
|
||||||
cy.clearCookie('fakeCookie')
|
cy.clearCookie('fakeCookie')
|
||||||
cy.setCookie('fakeCookie', '123ABC')
|
cy.setCookie('fakeCookie', '123ABC')
|
||||||
cy.clearCookie('fakeCookie')
|
cy.clearCookie('fakeCookie')
|
||||||
cy.setCookie('fakeCookie', '123ABC')
|
cy.setCookie('fakeCookie', '123ABC')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.preserveOnce() - preserve cookies by key', () => {
|
it('.preserveOnce() - preserve cookies by key', () => {
|
||||||
// normally cookies are reset after each test
|
// normally cookies are reset after each test
|
||||||
cy.getCookie('fakeCookie').should('not.be.ok')
|
cy.getCookie('fakeCookie').should('not.be.ok')
|
||||||
|
|
||||||
// preserving a cookie will not clear it when
|
// preserving a cookie will not clear it when
|
||||||
// the next test starts
|
// the next test starts
|
||||||
cy.setCookie('lastCookie', '789XYZ')
|
cy.setCookie('lastCookie', '789XYZ')
|
||||||
Cypress.Cookies.preserveOnce('lastCookie')
|
Cypress.Cookies.preserveOnce('lastCookie')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.defaults() - set defaults for all cookies', () => {
|
it('.defaults() - set defaults for all cookies', () => {
|
||||||
// now any cookie with the name 'session_id' will
|
// now any cookie with the name 'session_id' will
|
||||||
// not be cleared before each new test runs
|
// not be cleared before each new test runs
|
||||||
Cypress.Cookies.defaults({
|
Cypress.Cookies.defaults({
|
||||||
preserve: 'session_id',
|
preserve: 'session_id',
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
context('Cypress.arch', () => {
|
context('Cypress.arch', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/cypress-api')
|
cy.visit('https://example.cypress.io/cypress-api')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Get CPU architecture name of underlying OS', () => {
|
it('Get CPU architecture name of underlying OS', () => {
|
||||||
// https://on.cypress.io/arch
|
// https://on.cypress.io/arch
|
||||||
expect(Cypress.arch).to.exist
|
expect(Cypress.arch).to.exist
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
context('Cypress.config()', () => {
|
context('Cypress.config()', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/cypress-api')
|
cy.visit('https://example.cypress.io/cypress-api')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Get and set configuration options', () => {
|
it('Get and set configuration options', () => {
|
||||||
// https://on.cypress.io/config
|
// https://on.cypress.io/config
|
||||||
let myConfig = Cypress.config()
|
let myConfig = Cypress.config()
|
||||||
|
|
||||||
expect(myConfig).to.have.property('animationDistanceThreshold', 5)
|
expect(myConfig).to.have.property('animationDistanceThreshold', 5)
|
||||||
expect(myConfig).to.have.property('baseUrl', null)
|
expect(myConfig).to.have.property('baseUrl', null)
|
||||||
expect(myConfig).to.have.property('defaultCommandTimeout', 4000)
|
expect(myConfig).to.have.property('defaultCommandTimeout', 4000)
|
||||||
expect(myConfig).to.have.property('requestTimeout', 5000)
|
expect(myConfig).to.have.property('requestTimeout', 5000)
|
||||||
expect(myConfig).to.have.property('responseTimeout', 30000)
|
expect(myConfig).to.have.property('responseTimeout', 30000)
|
||||||
expect(myConfig).to.have.property('viewportHeight', 660)
|
expect(myConfig).to.have.property('viewportHeight', 660)
|
||||||
expect(myConfig).to.have.property('viewportWidth', 1000)
|
expect(myConfig).to.have.property('viewportWidth', 1000)
|
||||||
expect(myConfig).to.have.property('pageLoadTimeout', 60000)
|
expect(myConfig).to.have.property('pageLoadTimeout', 60000)
|
||||||
expect(myConfig).to.have.property('waitForAnimations', true)
|
expect(myConfig).to.have.property('waitForAnimations', true)
|
||||||
|
|
||||||
expect(Cypress.config('pageLoadTimeout')).to.eq(60000)
|
expect(Cypress.config('pageLoadTimeout')).to.eq(60000)
|
||||||
|
|
||||||
// this will change the config for the rest of your tests!
|
// this will change the config for the rest of your tests!
|
||||||
Cypress.config('pageLoadTimeout', 20000)
|
Cypress.config('pageLoadTimeout', 20000)
|
||||||
|
|
||||||
expect(Cypress.config('pageLoadTimeout')).to.eq(20000)
|
expect(Cypress.config('pageLoadTimeout')).to.eq(20000)
|
||||||
|
|
||||||
Cypress.config('pageLoadTimeout', 60000)
|
Cypress.config('pageLoadTimeout', 60000)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
context('Cypress.dom', () => {
|
context('Cypress.dom', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/cypress-api')
|
cy.visit('https://example.cypress.io/cypress-api')
|
||||||
})
|
})
|
||||||
|
|
||||||
// https://on.cypress.io/dom
|
// https://on.cypress.io/dom
|
||||||
it('.isHidden() - determine if a DOM element is hidden', () => {
|
it('.isHidden() - determine if a DOM element is hidden', () => {
|
||||||
let hiddenP = Cypress.$('.dom-p p.hidden').get(0)
|
let hiddenP = Cypress.$('.dom-p p.hidden').get(0)
|
||||||
let visibleP = Cypress.$('.dom-p p.visible').get(0)
|
let visibleP = Cypress.$('.dom-p p.visible').get(0)
|
||||||
|
|
||||||
// our first paragraph has css class 'hidden'
|
// our first paragraph has css class 'hidden'
|
||||||
expect(Cypress.dom.isHidden(hiddenP)).to.be.true
|
expect(Cypress.dom.isHidden(hiddenP)).to.be.true
|
||||||
expect(Cypress.dom.isHidden(visibleP)).to.be.false
|
expect(Cypress.dom.isHidden(visibleP)).to.be.false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
context('Cypress.env()', () => {
|
context('Cypress.env()', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/cypress-api')
|
cy.visit('https://example.cypress.io/cypress-api')
|
||||||
})
|
|
||||||
|
|
||||||
// We can set environment variables for highly dynamic values
|
|
||||||
|
|
||||||
// https://on.cypress.io/environment-variables
|
|
||||||
it('Get environment variables', () => {
|
|
||||||
// https://on.cypress.io/env
|
|
||||||
// set multiple environment variables
|
|
||||||
Cypress.env({
|
|
||||||
host: 'veronica.dev.local',
|
|
||||||
api_server: 'http://localhost:8888/v1/',
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// get environment variable
|
// We can set environment variables for highly dynamic values
|
||||||
expect(Cypress.env('host')).to.eq('veronica.dev.local')
|
|
||||||
|
|
||||||
// set environment variable
|
// https://on.cypress.io/environment-variables
|
||||||
Cypress.env('api_server', 'http://localhost:8888/v2/')
|
it('Get environment variables', () => {
|
||||||
expect(Cypress.env('api_server')).to.eq('http://localhost:8888/v2/')
|
// https://on.cypress.io/env
|
||||||
|
// set multiple environment variables
|
||||||
|
Cypress.env({
|
||||||
|
host: 'veronica.dev.local',
|
||||||
|
api_server: 'http://localhost:8888/v1/',
|
||||||
|
})
|
||||||
|
|
||||||
// get all environment variable
|
// get environment variable
|
||||||
expect(Cypress.env()).to.have.property('host', 'veronica.dev.local')
|
expect(Cypress.env('host')).to.eq('veronica.dev.local')
|
||||||
expect(Cypress.env()).to.have.property('api_server', 'http://localhost:8888/v2/')
|
|
||||||
})
|
// set environment variable
|
||||||
|
Cypress.env('api_server', 'http://localhost:8888/v2/')
|
||||||
|
expect(Cypress.env('api_server')).to.eq('http://localhost:8888/v2/')
|
||||||
|
|
||||||
|
// get all environment variable
|
||||||
|
expect(Cypress.env()).to.have.property('host', 'veronica.dev.local')
|
||||||
|
expect(Cypress.env()).to.have.property('api_server', 'http://localhost:8888/v2/')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
context('Cypress.log', () => {
|
context('Cypress.log', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/cypress-api')
|
cy.visit('https://example.cypress.io/cypress-api')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Control what is printed to the Command Log', () => {
|
it('Control what is printed to the Command Log', () => {
|
||||||
// https://on.cypress.io/cypress-log
|
// https://on.cypress.io/cypress-log
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
context('Cypress.platform', () => {
|
context('Cypress.platform', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/cypress-api')
|
cy.visit('https://example.cypress.io/cypress-api')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Get underlying OS name', () => {
|
it('Get underlying OS name', () => {
|
||||||
// https://on.cypress.io/platform
|
// https://on.cypress.io/platform
|
||||||
expect(Cypress.platform).to.be.exist
|
expect(Cypress.platform).to.be.exist
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
context('Cypress.version', () => {
|
context('Cypress.version', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/cypress-api')
|
cy.visit('https://example.cypress.io/cypress-api')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Get current version of Cypress being run', () => {
|
it('Get current version of Cypress being run', () => {
|
||||||
// https://on.cypress.io/version
|
// https://on.cypress.io/version
|
||||||
expect(Cypress.version).to.be.exist
|
expect(Cypress.version).to.be.exist
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
context('Cypress.spec', () => {
|
context('Cypress.spec', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/cypress-api')
|
cy.visit('https://example.cypress.io/cypress-api')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Get current spec information', () => {
|
it('Get current spec information', () => {
|
||||||
// https://on.cypress.io/spec
|
// https://on.cypress.io/spec
|
||||||
// wrap the object so we can inspect it easily by clicking in the command log
|
// wrap the object so we can inspect it easily by clicking in the command log
|
||||||
cy.wrap(Cypress.spec).should('include.keys', ['name', 'relative', 'absolute'])
|
cy.wrap(Cypress.spec).should('include.keys', ['name', 'relative', 'absolute'])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,83 +6,83 @@
|
|||||||
const requiredExample = require('../../fixtures/example')
|
const requiredExample = require('../../fixtures/example')
|
||||||
|
|
||||||
context('Files', () => {
|
context('Files', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/files')
|
cy.visit('https://example.cypress.io/commands/files')
|
||||||
})
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
// load example.json fixture file and store
|
|
||||||
// in the test context object
|
|
||||||
cy.fixture('example.json').as('example')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.fixture() - load a fixture', () => {
|
|
||||||
// https://on.cypress.io/fixture
|
|
||||||
|
|
||||||
// Instead of writing a response inline you can
|
|
||||||
// use a fixture file's content.
|
|
||||||
|
|
||||||
// when application makes an Ajax request matching "GET **/comments/*"
|
|
||||||
// Cypress will intercept it and reply with the object in `example.json` fixture
|
|
||||||
cy.intercept('GET', '**/comments/*', { fixture: 'example.json' }).as('getComment')
|
|
||||||
|
|
||||||
// we have code that gets a comment when
|
|
||||||
// the button is clicked in scripts.js
|
|
||||||
cy.get('.fixture-btn').click()
|
|
||||||
|
|
||||||
cy.wait('@getComment').its('response.body')
|
|
||||||
.should('have.property', 'name')
|
|
||||||
.and('include', 'Using fixtures to represent data')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.fixture() or require - load a fixture', function () {
|
|
||||||
// we are inside the "function () { ... }"
|
|
||||||
// callback and can use test context object "this"
|
|
||||||
// "this.example" was loaded in "beforeEach" function callback
|
|
||||||
expect(this.example, 'fixture in the test context')
|
|
||||||
.to.deep.equal(requiredExample)
|
|
||||||
|
|
||||||
// or use "cy.wrap" and "should('deep.equal', ...)" assertion
|
|
||||||
cy.wrap(this.example)
|
|
||||||
.should('deep.equal', requiredExample)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.readFile() - read file contents', () => {
|
|
||||||
// https://on.cypress.io/readfile
|
|
||||||
|
|
||||||
// You can read a file and yield its contents
|
|
||||||
// The filePath is relative to your project's root.
|
|
||||||
cy.readFile('cypress.json').then((json) => {
|
|
||||||
expect(json).to.be.an('object')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.writeFile() - write to a file', () => {
|
|
||||||
// https://on.cypress.io/writefile
|
|
||||||
|
|
||||||
// You can write to a file
|
|
||||||
|
|
||||||
// Use a response from a request to automatically
|
|
||||||
// generate a fixture file for use later
|
|
||||||
cy.request('https://jsonplaceholder.cypress.io/users')
|
|
||||||
.then((response) => {
|
|
||||||
cy.writeFile('cypress/fixtures/users.json', response.body)
|
|
||||||
})
|
|
||||||
|
|
||||||
cy.fixture('users').should((users) => {
|
|
||||||
expect(users[0].name).to.exist
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// JavaScript arrays and objects are stringified
|
beforeEach(() => {
|
||||||
// and formatted into text.
|
// load example.json fixture file and store
|
||||||
cy.writeFile('cypress/fixtures/profile.json', {
|
// in the test context object
|
||||||
id: 8739,
|
cy.fixture('example.json').as('example')
|
||||||
name: 'Jane',
|
|
||||||
email: 'jane@example.com',
|
|
||||||
})
|
})
|
||||||
|
|
||||||
cy.fixture('profile').should((profile) => {
|
it('cy.fixture() - load a fixture', () => {
|
||||||
expect(profile.name).to.eq('Jane')
|
// https://on.cypress.io/fixture
|
||||||
|
|
||||||
|
// Instead of writing a response inline you can
|
||||||
|
// use a fixture file's content.
|
||||||
|
|
||||||
|
// when application makes an Ajax request matching "GET **/comments/*"
|
||||||
|
// Cypress will intercept it and reply with the object in `example.json` fixture
|
||||||
|
cy.intercept('GET', '**/comments/*', {fixture: 'example.json'}).as('getComment')
|
||||||
|
|
||||||
|
// we have code that gets a comment when
|
||||||
|
// the button is clicked in scripts.js
|
||||||
|
cy.get('.fixture-btn').click()
|
||||||
|
|
||||||
|
cy.wait('@getComment').its('response.body')
|
||||||
|
.should('have.property', 'name')
|
||||||
|
.and('include', 'Using fixtures to represent data')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.fixture() or require - load a fixture', function () {
|
||||||
|
// we are inside the "function () { ... }"
|
||||||
|
// callback and can use test context object "this"
|
||||||
|
// "this.example" was loaded in "beforeEach" function callback
|
||||||
|
expect(this.example, 'fixture in the test context')
|
||||||
|
.to.deep.equal(requiredExample)
|
||||||
|
|
||||||
|
// or use "cy.wrap" and "should('deep.equal', ...)" assertion
|
||||||
|
cy.wrap(this.example)
|
||||||
|
.should('deep.equal', requiredExample)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.readFile() - read file contents', () => {
|
||||||
|
// https://on.cypress.io/readfile
|
||||||
|
|
||||||
|
// You can read a file and yield its contents
|
||||||
|
// The filePath is relative to your project's root.
|
||||||
|
cy.readFile('cypress.json').then((json) => {
|
||||||
|
expect(json).to.be.an('object')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.writeFile() - write to a file', () => {
|
||||||
|
// https://on.cypress.io/writefile
|
||||||
|
|
||||||
|
// You can write to a file
|
||||||
|
|
||||||
|
// Use a response from a request to automatically
|
||||||
|
// generate a fixture file for use later
|
||||||
|
cy.request('https://jsonplaceholder.cypress.io/users')
|
||||||
|
.then((response) => {
|
||||||
|
cy.writeFile('cypress/fixtures/users.json', response.body)
|
||||||
|
})
|
||||||
|
|
||||||
|
cy.fixture('users').should((users) => {
|
||||||
|
expect(users[0].name).to.exist
|
||||||
|
})
|
||||||
|
|
||||||
|
// JavaScript arrays and objects are stringified
|
||||||
|
// and formatted into text.
|
||||||
|
cy.writeFile('cypress/fixtures/profile.json', {
|
||||||
|
id: 8739,
|
||||||
|
name: 'Jane',
|
||||||
|
email: 'jane@example.com',
|
||||||
|
})
|
||||||
|
|
||||||
|
cy.fixture('profile').should((profile) => {
|
||||||
|
expect(profile.name).to.eq('Jane')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,52 +1,52 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Local Storage', () => {
|
context('Local Storage', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/local-storage')
|
cy.visit('https://example.cypress.io/commands/local-storage')
|
||||||
})
|
|
||||||
// Although local storage is automatically cleared
|
|
||||||
// in between tests to maintain a clean state
|
|
||||||
// sometimes we need to clear the local storage manually
|
|
||||||
|
|
||||||
it('cy.clearLocalStorage() - clear all data in local storage', () => {
|
|
||||||
// https://on.cypress.io/clearlocalstorage
|
|
||||||
cy.get('.ls-btn').click().should(() => {
|
|
||||||
expect(localStorage.getItem('prop1')).to.eq('red')
|
|
||||||
expect(localStorage.getItem('prop2')).to.eq('blue')
|
|
||||||
expect(localStorage.getItem('prop3')).to.eq('magenta')
|
|
||||||
})
|
})
|
||||||
|
// Although local storage is automatically cleared
|
||||||
|
// in between tests to maintain a clean state
|
||||||
|
// sometimes we need to clear the local storage manually
|
||||||
|
|
||||||
// clearLocalStorage() yields the localStorage object
|
it('cy.clearLocalStorage() - clear all data in local storage', () => {
|
||||||
cy.clearLocalStorage().should((ls) => {
|
// https://on.cypress.io/clearlocalstorage
|
||||||
expect(ls.getItem('prop1')).to.be.null
|
cy.get('.ls-btn').click().should(() => {
|
||||||
expect(ls.getItem('prop2')).to.be.null
|
expect(localStorage.getItem('prop1')).to.eq('red')
|
||||||
expect(ls.getItem('prop3')).to.be.null
|
expect(localStorage.getItem('prop2')).to.eq('blue')
|
||||||
})
|
expect(localStorage.getItem('prop3')).to.eq('magenta')
|
||||||
|
})
|
||||||
|
|
||||||
cy.get('.ls-btn').click().should(() => {
|
// clearLocalStorage() yields the localStorage object
|
||||||
expect(localStorage.getItem('prop1')).to.eq('red')
|
cy.clearLocalStorage().should((ls) => {
|
||||||
expect(localStorage.getItem('prop2')).to.eq('blue')
|
expect(ls.getItem('prop1')).to.be.null
|
||||||
expect(localStorage.getItem('prop3')).to.eq('magenta')
|
expect(ls.getItem('prop2')).to.be.null
|
||||||
})
|
expect(ls.getItem('prop3')).to.be.null
|
||||||
|
})
|
||||||
|
|
||||||
// Clear key matching string in Local Storage
|
cy.get('.ls-btn').click().should(() => {
|
||||||
cy.clearLocalStorage('prop1').should((ls) => {
|
expect(localStorage.getItem('prop1')).to.eq('red')
|
||||||
expect(ls.getItem('prop1')).to.be.null
|
expect(localStorage.getItem('prop2')).to.eq('blue')
|
||||||
expect(ls.getItem('prop2')).to.eq('blue')
|
expect(localStorage.getItem('prop3')).to.eq('magenta')
|
||||||
expect(ls.getItem('prop3')).to.eq('magenta')
|
})
|
||||||
})
|
|
||||||
|
|
||||||
cy.get('.ls-btn').click().should(() => {
|
// Clear key matching string in Local Storage
|
||||||
expect(localStorage.getItem('prop1')).to.eq('red')
|
cy.clearLocalStorage('prop1').should((ls) => {
|
||||||
expect(localStorage.getItem('prop2')).to.eq('blue')
|
expect(ls.getItem('prop1')).to.be.null
|
||||||
expect(localStorage.getItem('prop3')).to.eq('magenta')
|
expect(ls.getItem('prop2')).to.eq('blue')
|
||||||
})
|
expect(ls.getItem('prop3')).to.eq('magenta')
|
||||||
|
})
|
||||||
|
|
||||||
// Clear keys matching regex in Local Storage
|
cy.get('.ls-btn').click().should(() => {
|
||||||
cy.clearLocalStorage(/prop1|2/).should((ls) => {
|
expect(localStorage.getItem('prop1')).to.eq('red')
|
||||||
expect(ls.getItem('prop1')).to.be.null
|
expect(localStorage.getItem('prop2')).to.eq('blue')
|
||||||
expect(ls.getItem('prop2')).to.be.null
|
expect(localStorage.getItem('prop3')).to.eq('magenta')
|
||||||
expect(ls.getItem('prop3')).to.eq('magenta')
|
})
|
||||||
|
|
||||||
|
// Clear keys matching regex in Local Storage
|
||||||
|
cy.clearLocalStorage(/prop1|2/).should((ls) => {
|
||||||
|
expect(ls.getItem('prop1')).to.be.null
|
||||||
|
expect(ls.getItem('prop2')).to.be.null
|
||||||
|
expect(ls.getItem('prop3')).to.eq('magenta')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,32 +1,32 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Location', () => {
|
context('Location', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/location')
|
cy.visit('https://example.cypress.io/commands/location')
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.hash() - get the current URL hash', () => {
|
|
||||||
// https://on.cypress.io/hash
|
|
||||||
cy.hash().should('be.empty')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.location() - get window.location', () => {
|
|
||||||
// https://on.cypress.io/location
|
|
||||||
cy.location().should((location) => {
|
|
||||||
expect(location.hash).to.be.empty
|
|
||||||
expect(location.href).to.eq('https://example.cypress.io/commands/location')
|
|
||||||
expect(location.host).to.eq('example.cypress.io')
|
|
||||||
expect(location.hostname).to.eq('example.cypress.io')
|
|
||||||
expect(location.origin).to.eq('https://example.cypress.io')
|
|
||||||
expect(location.pathname).to.eq('/commands/location')
|
|
||||||
expect(location.port).to.eq('')
|
|
||||||
expect(location.protocol).to.eq('https:')
|
|
||||||
expect(location.search).to.be.empty
|
|
||||||
})
|
})
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.url() - get the current URL', () => {
|
it('cy.hash() - get the current URL hash', () => {
|
||||||
// https://on.cypress.io/url
|
// https://on.cypress.io/hash
|
||||||
cy.url().should('eq', 'https://example.cypress.io/commands/location')
|
cy.hash().should('be.empty')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('cy.location() - get window.location', () => {
|
||||||
|
// https://on.cypress.io/location
|
||||||
|
cy.location().should((location) => {
|
||||||
|
expect(location.hash).to.be.empty
|
||||||
|
expect(location.href).to.eq('https://example.cypress.io/commands/location')
|
||||||
|
expect(location.host).to.eq('example.cypress.io')
|
||||||
|
expect(location.hostname).to.eq('example.cypress.io')
|
||||||
|
expect(location.origin).to.eq('https://example.cypress.io')
|
||||||
|
expect(location.pathname).to.eq('/commands/location')
|
||||||
|
expect(location.port).to.eq('')
|
||||||
|
expect(location.protocol).to.eq('https:')
|
||||||
|
expect(location.search).to.be.empty
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.url() - get the current URL', () => {
|
||||||
|
// https://on.cypress.io/url
|
||||||
|
cy.url().should('eq', 'https://example.cypress.io/commands/location')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,104 +1,106 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Misc', () => {
|
context('Misc', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/misc')
|
cy.visit('https://example.cypress.io/commands/misc')
|
||||||
})
|
|
||||||
|
|
||||||
it('.end() - end the command chain', () => {
|
|
||||||
// https://on.cypress.io/end
|
|
||||||
|
|
||||||
// cy.end is useful when you want to end a chain of commands
|
|
||||||
// and force Cypress to re-query from the root element
|
|
||||||
cy.get('.misc-table').within(() => {
|
|
||||||
// ends the current chain and yields null
|
|
||||||
cy.contains('Cheryl').click().end()
|
|
||||||
|
|
||||||
// queries the entire table again
|
|
||||||
cy.contains('Charles').click()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.exec() - execute a system command', () => {
|
|
||||||
// execute a system command.
|
|
||||||
// so you can take actions necessary for
|
|
||||||
// your test outside the scope of Cypress.
|
|
||||||
// https://on.cypress.io/exec
|
|
||||||
|
|
||||||
// we can use Cypress.platform string to
|
|
||||||
// select appropriate command
|
|
||||||
// https://on.cypress/io/platform
|
|
||||||
cy.log(`Platform ${Cypress.platform} architecture ${Cypress.arch}`)
|
|
||||||
|
|
||||||
// on CircleCI Windows build machines we have a failure to run bash shell
|
|
||||||
// https://github.com/cypress-io/cypress/issues/5169
|
|
||||||
// so skip some of the tests by passing flag "--env circle=true"
|
|
||||||
const isCircleOnWindows = Cypress.platform === 'win32' && Cypress.env('circle')
|
|
||||||
|
|
||||||
if (isCircleOnWindows) {
|
|
||||||
cy.log('Skipping test on CircleCI')
|
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// cy.exec problem on Shippable CI
|
|
||||||
// https://github.com/cypress-io/cypress/issues/6718
|
|
||||||
const isShippable = Cypress.platform === 'linux' && Cypress.env('shippable')
|
|
||||||
|
|
||||||
if (isShippable) {
|
|
||||||
cy.log('Skipping test on ShippableCI')
|
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
cy.exec('echo Jane Lane')
|
|
||||||
.its('stdout').should('contain', 'Jane Lane')
|
|
||||||
|
|
||||||
if (Cypress.platform === 'win32') {
|
|
||||||
cy.exec('print cypress.json')
|
|
||||||
.its('stderr').should('be.empty')
|
|
||||||
} else {
|
|
||||||
cy.exec('cat cypress.json')
|
|
||||||
.its('stderr').should('be.empty')
|
|
||||||
|
|
||||||
cy.exec('pwd')
|
|
||||||
.its('code').should('eq', 0)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.focused() - get the DOM element that has focus', () => {
|
|
||||||
// https://on.cypress.io/focused
|
|
||||||
cy.get('.misc-form').find('#name').click()
|
|
||||||
cy.focused().should('have.id', 'name')
|
|
||||||
|
|
||||||
cy.get('.misc-form').find('#description').click()
|
|
||||||
cy.focused().should('have.id', 'description')
|
|
||||||
})
|
|
||||||
|
|
||||||
context('Cypress.Screenshot', function () {
|
|
||||||
it('cy.screenshot() - take a screenshot', () => {
|
|
||||||
// https://on.cypress.io/screenshot
|
|
||||||
cy.screenshot('my-image')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Cypress.Screenshot.defaults() - change default config of screenshots', function () {
|
it('.end() - end the command chain', () => {
|
||||||
Cypress.Screenshot.defaults({
|
// https://on.cypress.io/end
|
||||||
blackout: ['.foo'],
|
|
||||||
capture: 'viewport',
|
|
||||||
clip: { x: 0, y: 0, width: 200, height: 200 },
|
|
||||||
scale: false,
|
|
||||||
disableTimersAndAnimations: true,
|
|
||||||
screenshotOnRunFailure: true,
|
|
||||||
onBeforeScreenshot () { },
|
|
||||||
onAfterScreenshot () { },
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.wrap() - wrap an object', () => {
|
// cy.end is useful when you want to end a chain of commands
|
||||||
// https://on.cypress.io/wrap
|
// and force Cypress to re-query from the root element
|
||||||
cy.wrap({ foo: 'bar' })
|
cy.get('.misc-table').within(() => {
|
||||||
.should('have.property', 'foo')
|
// ends the current chain and yields null
|
||||||
.and('include', 'bar')
|
cy.contains('Cheryl').click().end()
|
||||||
})
|
|
||||||
|
// queries the entire table again
|
||||||
|
cy.contains('Charles').click()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.exec() - execute a system command', () => {
|
||||||
|
// execute a system command.
|
||||||
|
// so you can take actions necessary for
|
||||||
|
// your test outside the scope of Cypress.
|
||||||
|
// https://on.cypress.io/exec
|
||||||
|
|
||||||
|
// we can use Cypress.platform string to
|
||||||
|
// select appropriate command
|
||||||
|
// https://on.cypress/io/platform
|
||||||
|
cy.log(`Platform ${Cypress.platform} architecture ${Cypress.arch}`)
|
||||||
|
|
||||||
|
// on CircleCI Windows build machines we have a failure to run bash shell
|
||||||
|
// https://github.com/cypress-io/cypress/issues/5169
|
||||||
|
// so skip some of the tests by passing flag "--env circle=true"
|
||||||
|
const isCircleOnWindows = Cypress.platform === 'win32' && Cypress.env('circle')
|
||||||
|
|
||||||
|
if (isCircleOnWindows) {
|
||||||
|
cy.log('Skipping test on CircleCI')
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// cy.exec problem on Shippable CI
|
||||||
|
// https://github.com/cypress-io/cypress/issues/6718
|
||||||
|
const isShippable = Cypress.platform === 'linux' && Cypress.env('shippable')
|
||||||
|
|
||||||
|
if (isShippable) {
|
||||||
|
cy.log('Skipping test on ShippableCI')
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
cy.exec('echo Jane Lane')
|
||||||
|
.its('stdout').should('contain', 'Jane Lane')
|
||||||
|
|
||||||
|
if (Cypress.platform === 'win32') {
|
||||||
|
cy.exec('print cypress.json')
|
||||||
|
.its('stderr').should('be.empty')
|
||||||
|
} else {
|
||||||
|
cy.exec('cat cypress.json')
|
||||||
|
.its('stderr').should('be.empty')
|
||||||
|
|
||||||
|
cy.exec('pwd')
|
||||||
|
.its('code').should('eq', 0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.focused() - get the DOM element that has focus', () => {
|
||||||
|
// https://on.cypress.io/focused
|
||||||
|
cy.get('.misc-form').find('#name').click()
|
||||||
|
cy.focused().should('have.id', 'name')
|
||||||
|
|
||||||
|
cy.get('.misc-form').find('#description').click()
|
||||||
|
cy.focused().should('have.id', 'description')
|
||||||
|
})
|
||||||
|
|
||||||
|
context('Cypress.Screenshot', function () {
|
||||||
|
it('cy.screenshot() - take a screenshot', () => {
|
||||||
|
// https://on.cypress.io/screenshot
|
||||||
|
cy.screenshot('my-image')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('Cypress.Screenshot.defaults() - change default config of screenshots', function () {
|
||||||
|
Cypress.Screenshot.defaults({
|
||||||
|
blackout: ['.foo'],
|
||||||
|
capture: 'viewport',
|
||||||
|
clip: {x: 0, y: 0, width: 200, height: 200},
|
||||||
|
scale: false,
|
||||||
|
disableTimersAndAnimations: true,
|
||||||
|
screenshotOnRunFailure: true,
|
||||||
|
onBeforeScreenshot() {
|
||||||
|
},
|
||||||
|
onAfterScreenshot() {
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.wrap() - wrap an object', () => {
|
||||||
|
// https://on.cypress.io/wrap
|
||||||
|
cy.wrap({foo: 'bar'})
|
||||||
|
.should('have.property', 'foo')
|
||||||
|
.and('include', 'bar')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,56 +1,56 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Navigation', () => {
|
context('Navigation', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io')
|
cy.visit('https://example.cypress.io')
|
||||||
cy.get('.navbar-nav').contains('Commands').click()
|
cy.get('.navbar-nav').contains('Commands').click()
|
||||||
cy.get('.dropdown-menu').contains('Navigation').click()
|
cy.get('.dropdown-menu').contains('Navigation').click()
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.go() - go back or forward in the browser\'s history', () => {
|
|
||||||
// https://on.cypress.io/go
|
|
||||||
|
|
||||||
cy.location('pathname').should('include', 'navigation')
|
|
||||||
|
|
||||||
cy.go('back')
|
|
||||||
cy.location('pathname').should('not.include', 'navigation')
|
|
||||||
|
|
||||||
cy.go('forward')
|
|
||||||
cy.location('pathname').should('include', 'navigation')
|
|
||||||
|
|
||||||
// clicking back
|
|
||||||
cy.go(-1)
|
|
||||||
cy.location('pathname').should('not.include', 'navigation')
|
|
||||||
|
|
||||||
// clicking forward
|
|
||||||
cy.go(1)
|
|
||||||
cy.location('pathname').should('include', 'navigation')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.reload() - reload the page', () => {
|
|
||||||
// https://on.cypress.io/reload
|
|
||||||
cy.reload()
|
|
||||||
|
|
||||||
// reload the page without using the cache
|
|
||||||
cy.reload(true)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.visit() - visit a remote url', () => {
|
|
||||||
// https://on.cypress.io/visit
|
|
||||||
|
|
||||||
// Visit any sub-domain of your current domain
|
|
||||||
|
|
||||||
// Pass options to the visit
|
|
||||||
cy.visit('https://example.cypress.io/commands/navigation', {
|
|
||||||
timeout: 50000, // increase total time for the visit to resolve
|
|
||||||
onBeforeLoad (contentWindow) {
|
|
||||||
// contentWindow is the remote page's window object
|
|
||||||
expect(typeof contentWindow === 'object').to.be.true
|
|
||||||
},
|
|
||||||
onLoad (contentWindow) {
|
|
||||||
// contentWindow is the remote page's window object
|
|
||||||
expect(typeof contentWindow === 'object').to.be.true
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('cy.go() - go back or forward in the browser\'s history', () => {
|
||||||
|
// https://on.cypress.io/go
|
||||||
|
|
||||||
|
cy.location('pathname').should('include', 'navigation')
|
||||||
|
|
||||||
|
cy.go('back')
|
||||||
|
cy.location('pathname').should('not.include', 'navigation')
|
||||||
|
|
||||||
|
cy.go('forward')
|
||||||
|
cy.location('pathname').should('include', 'navigation')
|
||||||
|
|
||||||
|
// clicking back
|
||||||
|
cy.go(-1)
|
||||||
|
cy.location('pathname').should('not.include', 'navigation')
|
||||||
|
|
||||||
|
// clicking forward
|
||||||
|
cy.go(1)
|
||||||
|
cy.location('pathname').should('include', 'navigation')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.reload() - reload the page', () => {
|
||||||
|
// https://on.cypress.io/reload
|
||||||
|
cy.reload()
|
||||||
|
|
||||||
|
// reload the page without using the cache
|
||||||
|
cy.reload(true)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.visit() - visit a remote url', () => {
|
||||||
|
// https://on.cypress.io/visit
|
||||||
|
|
||||||
|
// Visit any sub-domain of your current domain
|
||||||
|
|
||||||
|
// Pass options to the visit
|
||||||
|
cy.visit('https://example.cypress.io/commands/navigation', {
|
||||||
|
timeout: 50000, // increase total time for the visit to resolve
|
||||||
|
onBeforeLoad(contentWindow) {
|
||||||
|
// contentWindow is the remote page's window object
|
||||||
|
expect(typeof contentWindow === 'object').to.be.true
|
||||||
|
},
|
||||||
|
onLoad(contentWindow) {
|
||||||
|
// contentWindow is the remote page's window object
|
||||||
|
expect(typeof contentWindow === 'object').to.be.true
|
||||||
|
},
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,163 +1,163 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Network Requests', () => {
|
context('Network Requests', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/network-requests')
|
cy.visit('https://example.cypress.io/commands/network-requests')
|
||||||
})
|
|
||||||
|
|
||||||
// Manage HTTP requests in your app
|
|
||||||
|
|
||||||
it('cy.request() - make an XHR request', () => {
|
|
||||||
// https://on.cypress.io/request
|
|
||||||
cy.request('https://jsonplaceholder.cypress.io/comments')
|
|
||||||
.should((response) => {
|
|
||||||
expect(response.status).to.eq(200)
|
|
||||||
// the server sometimes gets an extra comment posted from another machine
|
|
||||||
// which gets returned as 1 extra object
|
|
||||||
expect(response.body).to.have.property('length').and.be.oneOf([500, 501])
|
|
||||||
expect(response).to.have.property('headers')
|
|
||||||
expect(response).to.have.property('duration')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.request() - verify response using BDD syntax', () => {
|
|
||||||
cy.request('https://jsonplaceholder.cypress.io/comments')
|
|
||||||
.then((response) => {
|
|
||||||
// https://on.cypress.io/assertions
|
|
||||||
expect(response).property('status').to.equal(200)
|
|
||||||
expect(response).property('body').to.have.property('length').and.be.oneOf([500, 501])
|
|
||||||
expect(response).to.include.keys('headers', 'duration')
|
|
||||||
})
|
})
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.request() with query parameters', () => {
|
// Manage HTTP requests in your app
|
||||||
// will execute request
|
|
||||||
// https://jsonplaceholder.cypress.io/comments?postId=1&id=3
|
|
||||||
cy.request({
|
|
||||||
url: 'https://jsonplaceholder.cypress.io/comments',
|
|
||||||
qs: {
|
|
||||||
postId: 1,
|
|
||||||
id: 3,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.its('body')
|
|
||||||
.should('be.an', 'array')
|
|
||||||
.and('have.length', 1)
|
|
||||||
.its('0') // yields first element of the array
|
|
||||||
.should('contain', {
|
|
||||||
postId: 1,
|
|
||||||
id: 3,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.request() - pass result to the second request', () => {
|
it('cy.request() - make an XHR request', () => {
|
||||||
// first, let's find out the userId of the first user we have
|
// https://on.cypress.io/request
|
||||||
cy.request('https://jsonplaceholder.cypress.io/users?_limit=1')
|
cy.request('https://jsonplaceholder.cypress.io/comments')
|
||||||
.its('body') // yields the response object
|
.should((response) => {
|
||||||
.its('0') // yields the first element of the returned list
|
expect(response.status).to.eq(200)
|
||||||
// the above two commands its('body').its('0')
|
// the server sometimes gets an extra comment posted from another machine
|
||||||
// can be written as its('body.0')
|
// which gets returned as 1 extra object
|
||||||
// if you do not care about TypeScript checks
|
expect(response.body).to.have.property('length').and.be.oneOf([500, 501])
|
||||||
.then((user) => {
|
expect(response).to.have.property('headers')
|
||||||
expect(user).property('id').to.be.a('number')
|
expect(response).to.have.property('duration')
|
||||||
// make a new post on behalf of the user
|
})
|
||||||
cy.request('POST', 'https://jsonplaceholder.cypress.io/posts', {
|
})
|
||||||
userId: user.id,
|
|
||||||
title: 'Cypress Test Runner',
|
it('cy.request() - verify response using BDD syntax', () => {
|
||||||
body: 'Fast, easy and reliable testing for anything that runs in a browser.',
|
cy.request('https://jsonplaceholder.cypress.io/comments')
|
||||||
|
.then((response) => {
|
||||||
|
// https://on.cypress.io/assertions
|
||||||
|
expect(response).property('status').to.equal(200)
|
||||||
|
expect(response).property('body').to.have.property('length').and.be.oneOf([500, 501])
|
||||||
|
expect(response).to.include.keys('headers', 'duration')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.request() with query parameters', () => {
|
||||||
|
// will execute request
|
||||||
|
// https://jsonplaceholder.cypress.io/comments?postId=1&id=3
|
||||||
|
cy.request({
|
||||||
|
url: 'https://jsonplaceholder.cypress.io/comments',
|
||||||
|
qs: {
|
||||||
|
postId: 1,
|
||||||
|
id: 3,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
})
|
.its('body')
|
||||||
// note that the value here is the returned value of the 2nd request
|
.should('be.an', 'array')
|
||||||
// which is the new post object
|
.and('have.length', 1)
|
||||||
.then((response) => {
|
.its('0') // yields first element of the array
|
||||||
expect(response).property('status').to.equal(201) // new entity created
|
.should('contain', {
|
||||||
expect(response).property('body').to.contain({
|
postId: 1,
|
||||||
title: 'Cypress Test Runner',
|
id: 3,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.request() - pass result to the second request', () => {
|
||||||
|
// first, let's find out the userId of the first user we have
|
||||||
|
cy.request('https://jsonplaceholder.cypress.io/users?_limit=1')
|
||||||
|
.its('body') // yields the response object
|
||||||
|
.its('0') // yields the first element of the returned list
|
||||||
|
// the above two commands its('body').its('0')
|
||||||
|
// can be written as its('body.0')
|
||||||
|
// if you do not care about TypeScript checks
|
||||||
|
.then((user) => {
|
||||||
|
expect(user).property('id').to.be.a('number')
|
||||||
|
// make a new post on behalf of the user
|
||||||
|
cy.request('POST', 'https://jsonplaceholder.cypress.io/posts', {
|
||||||
|
userId: user.id,
|
||||||
|
title: 'Cypress Test Runner',
|
||||||
|
body: 'Fast, easy and reliable testing for anything that runs in a browser.',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// note that the value here is the returned value of the 2nd request
|
||||||
|
// which is the new post object
|
||||||
|
.then((response) => {
|
||||||
|
expect(response).property('status').to.equal(201) // new entity created
|
||||||
|
expect(response).property('body').to.contain({
|
||||||
|
title: 'Cypress Test Runner',
|
||||||
|
})
|
||||||
|
|
||||||
|
// we don't know the exact post id - only that it will be > 100
|
||||||
|
// since JSONPlaceholder has built-in 100 posts
|
||||||
|
expect(response.body).property('id').to.be.a('number')
|
||||||
|
.and.to.be.gt(100)
|
||||||
|
|
||||||
|
// we don't know the user id here - since it was in above closure
|
||||||
|
// so in this test just confirm that the property is there
|
||||||
|
expect(response.body).property('userId').to.be.a('number')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.request() - save response in the shared test context', () => {
|
||||||
|
// https://on.cypress.io/variables-and-aliases
|
||||||
|
cy.request('https://jsonplaceholder.cypress.io/users?_limit=1')
|
||||||
|
.its('body').its('0') // yields the first element of the returned list
|
||||||
|
.as('user') // saves the object in the test context
|
||||||
|
.then(function () {
|
||||||
|
// NOTE 👀
|
||||||
|
// By the time this callback runs the "as('user')" command
|
||||||
|
// has saved the user object in the test context.
|
||||||
|
// To access the test context we need to use
|
||||||
|
// the "function () { ... }" callback form,
|
||||||
|
// otherwise "this" points at a wrong or undefined object!
|
||||||
|
cy.request('POST', 'https://jsonplaceholder.cypress.io/posts', {
|
||||||
|
userId: this.user.id,
|
||||||
|
title: 'Cypress Test Runner',
|
||||||
|
body: 'Fast, easy and reliable testing for anything that runs in a browser.',
|
||||||
|
})
|
||||||
|
.its('body').as('post') // save the new post from the response
|
||||||
|
})
|
||||||
|
.then(function () {
|
||||||
|
// When this callback runs, both "cy.request" API commands have finished
|
||||||
|
// and the test context has "user" and "post" objects set.
|
||||||
|
// Let's verify them.
|
||||||
|
expect(this.post, 'post has the right user id').property('userId').to.equal(this.user.id)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.intercept() - route responses to matching requests', () => {
|
||||||
|
// https://on.cypress.io/intercept
|
||||||
|
|
||||||
|
let message = 'whoa, this comment does not exist'
|
||||||
|
|
||||||
|
// Listen to GET to comments/1
|
||||||
|
cy.intercept('GET', '**/comments/*').as('getComment')
|
||||||
|
|
||||||
|
// we have code that gets a comment when
|
||||||
|
// the button is clicked in scripts.js
|
||||||
|
cy.get('.network-btn').click()
|
||||||
|
|
||||||
|
// https://on.cypress.io/wait
|
||||||
|
cy.wait('@getComment').its('response.statusCode').should('be.oneOf', [200, 304])
|
||||||
|
|
||||||
|
// Listen to POST to comments
|
||||||
|
cy.intercept('POST', '**/comments').as('postComment')
|
||||||
|
|
||||||
|
// we have code that posts a comment when
|
||||||
|
// the button is clicked in scripts.js
|
||||||
|
cy.get('.network-post').click()
|
||||||
|
cy.wait('@postComment').should(({request, response}) => {
|
||||||
|
expect(request.body).to.include('email')
|
||||||
|
expect(request.headers).to.have.property('content-type')
|
||||||
|
expect(response && response.body).to.have.property('name', 'Using POST in cy.intercept()')
|
||||||
})
|
})
|
||||||
|
|
||||||
// we don't know the exact post id - only that it will be > 100
|
// Stub a response to PUT comments/ ****
|
||||||
// since JSONPlaceholder has built-in 100 posts
|
cy.intercept({
|
||||||
expect(response.body).property('id').to.be.a('number')
|
method: 'PUT',
|
||||||
.and.to.be.gt(100)
|
url: '**/comments/*',
|
||||||
|
}, {
|
||||||
|
statusCode: 404,
|
||||||
|
body: {error: message},
|
||||||
|
headers: {'access-control-allow-origin': '*'},
|
||||||
|
delayMs: 500,
|
||||||
|
}).as('putComment')
|
||||||
|
|
||||||
// we don't know the user id here - since it was in above closure
|
// we have code that puts a comment when
|
||||||
// so in this test just confirm that the property is there
|
// the button is clicked in scripts.js
|
||||||
expect(response.body).property('userId').to.be.a('number')
|
cy.get('.network-put').click()
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.request() - save response in the shared test context', () => {
|
cy.wait('@putComment')
|
||||||
// https://on.cypress.io/variables-and-aliases
|
|
||||||
cy.request('https://jsonplaceholder.cypress.io/users?_limit=1')
|
|
||||||
.its('body').its('0') // yields the first element of the returned list
|
|
||||||
.as('user') // saves the object in the test context
|
|
||||||
.then(function () {
|
|
||||||
// NOTE 👀
|
|
||||||
// By the time this callback runs the "as('user')" command
|
|
||||||
// has saved the user object in the test context.
|
|
||||||
// To access the test context we need to use
|
|
||||||
// the "function () { ... }" callback form,
|
|
||||||
// otherwise "this" points at a wrong or undefined object!
|
|
||||||
cy.request('POST', 'https://jsonplaceholder.cypress.io/posts', {
|
|
||||||
userId: this.user.id,
|
|
||||||
title: 'Cypress Test Runner',
|
|
||||||
body: 'Fast, easy and reliable testing for anything that runs in a browser.',
|
|
||||||
})
|
|
||||||
.its('body').as('post') // save the new post from the response
|
|
||||||
})
|
|
||||||
.then(function () {
|
|
||||||
// When this callback runs, both "cy.request" API commands have finished
|
|
||||||
// and the test context has "user" and "post" objects set.
|
|
||||||
// Let's verify them.
|
|
||||||
expect(this.post, 'post has the right user id').property('userId').to.equal(this.user.id)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.intercept() - route responses to matching requests', () => {
|
// our 404 statusCode logic in scripts.js executed
|
||||||
// https://on.cypress.io/intercept
|
cy.get('.network-put-comment').should('contain', message)
|
||||||
|
|
||||||
let message = 'whoa, this comment does not exist'
|
|
||||||
|
|
||||||
// Listen to GET to comments/1
|
|
||||||
cy.intercept('GET', '**/comments/*').as('getComment')
|
|
||||||
|
|
||||||
// we have code that gets a comment when
|
|
||||||
// the button is clicked in scripts.js
|
|
||||||
cy.get('.network-btn').click()
|
|
||||||
|
|
||||||
// https://on.cypress.io/wait
|
|
||||||
cy.wait('@getComment').its('response.statusCode').should('be.oneOf', [200, 304])
|
|
||||||
|
|
||||||
// Listen to POST to comments
|
|
||||||
cy.intercept('POST', '**/comments').as('postComment')
|
|
||||||
|
|
||||||
// we have code that posts a comment when
|
|
||||||
// the button is clicked in scripts.js
|
|
||||||
cy.get('.network-post').click()
|
|
||||||
cy.wait('@postComment').should(({ request, response }) => {
|
|
||||||
expect(request.body).to.include('email')
|
|
||||||
expect(request.headers).to.have.property('content-type')
|
|
||||||
expect(response && response.body).to.have.property('name', 'Using POST in cy.intercept()')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Stub a response to PUT comments/ ****
|
|
||||||
cy.intercept({
|
|
||||||
method: 'PUT',
|
|
||||||
url: '**/comments/*',
|
|
||||||
}, {
|
|
||||||
statusCode: 404,
|
|
||||||
body: { error: message },
|
|
||||||
headers: { 'access-control-allow-origin': '*' },
|
|
||||||
delayMs: 500,
|
|
||||||
}).as('putComment')
|
|
||||||
|
|
||||||
// we have code that puts a comment when
|
|
||||||
// the button is clicked in scripts.js
|
|
||||||
cy.get('.network-put').click()
|
|
||||||
|
|
||||||
cy.wait('@putComment')
|
|
||||||
|
|
||||||
// our 404 statusCode logic in scripts.js executed
|
|
||||||
cy.get('.network-put-comment').should('contain', message)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,114 +1,114 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Querying', () => {
|
context('Querying', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/querying')
|
cy.visit('https://example.cypress.io/commands/querying')
|
||||||
})
|
|
||||||
|
|
||||||
// The most commonly used query is 'cy.get()', you can
|
|
||||||
// think of this like the '$' in jQuery
|
|
||||||
|
|
||||||
it('cy.get() - query DOM elements', () => {
|
|
||||||
// https://on.cypress.io/get
|
|
||||||
|
|
||||||
cy.get('#query-btn').should('contain', 'Button')
|
|
||||||
|
|
||||||
cy.get('.query-btn').should('contain', 'Button')
|
|
||||||
|
|
||||||
cy.get('#querying .well>button:first').should('contain', 'Button')
|
|
||||||
// ↲
|
|
||||||
// Use CSS selectors just like jQuery
|
|
||||||
|
|
||||||
cy.get('[data-test-id="test-example"]').should('have.class', 'example')
|
|
||||||
|
|
||||||
// 'cy.get()' yields jQuery object, you can get its attribute
|
|
||||||
// by invoking `.attr()` method
|
|
||||||
cy.get('[data-test-id="test-example"]')
|
|
||||||
.invoke('attr', 'data-test-id')
|
|
||||||
.should('equal', 'test-example')
|
|
||||||
|
|
||||||
// or you can get element's CSS property
|
|
||||||
cy.get('[data-test-id="test-example"]')
|
|
||||||
.invoke('css', 'position')
|
|
||||||
.should('equal', 'static')
|
|
||||||
|
|
||||||
// or use assertions directly during 'cy.get()'
|
|
||||||
// https://on.cypress.io/assertions
|
|
||||||
cy.get('[data-test-id="test-example"]')
|
|
||||||
.should('have.attr', 'data-test-id', 'test-example')
|
|
||||||
.and('have.css', 'position', 'static')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.contains() - query DOM elements with matching content', () => {
|
|
||||||
// https://on.cypress.io/contains
|
|
||||||
cy.get('.query-list')
|
|
||||||
.contains('bananas')
|
|
||||||
.should('have.class', 'third')
|
|
||||||
|
|
||||||
// we can pass a regexp to `.contains()`
|
|
||||||
cy.get('.query-list')
|
|
||||||
.contains(/^b\w+/)
|
|
||||||
.should('have.class', 'third')
|
|
||||||
|
|
||||||
cy.get('.query-list')
|
|
||||||
.contains('apples')
|
|
||||||
.should('have.class', 'first')
|
|
||||||
|
|
||||||
// passing a selector to contains will
|
|
||||||
// yield the selector containing the text
|
|
||||||
cy.get('#querying')
|
|
||||||
.contains('ul', 'oranges')
|
|
||||||
.should('have.class', 'query-list')
|
|
||||||
|
|
||||||
cy.get('.query-button')
|
|
||||||
.contains('Save Form')
|
|
||||||
.should('have.class', 'btn')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('.within() - query DOM elements within a specific element', () => {
|
|
||||||
// https://on.cypress.io/within
|
|
||||||
cy.get('.query-form').within(() => {
|
|
||||||
cy.get('input:first').should('have.attr', 'placeholder', 'Email')
|
|
||||||
cy.get('input:last').should('have.attr', 'placeholder', 'Password')
|
|
||||||
})
|
})
|
||||||
})
|
|
||||||
|
|
||||||
it('cy.root() - query the root DOM element', () => {
|
// The most commonly used query is 'cy.get()', you can
|
||||||
// https://on.cypress.io/root
|
// think of this like the '$' in jQuery
|
||||||
|
|
||||||
// By default, root is the document
|
it('cy.get() - query DOM elements', () => {
|
||||||
cy.root().should('match', 'html')
|
// https://on.cypress.io/get
|
||||||
|
|
||||||
cy.get('.query-ul').within(() => {
|
cy.get('#query-btn').should('contain', 'Button')
|
||||||
// In this within, the root is now the ul DOM element
|
|
||||||
cy.root().should('have.class', 'query-ul')
|
cy.get('.query-btn').should('contain', 'Button')
|
||||||
|
|
||||||
|
cy.get('#querying .well>button:first').should('contain', 'Button')
|
||||||
|
// ↲
|
||||||
|
// Use CSS selectors just like jQuery
|
||||||
|
|
||||||
|
cy.get('[data-test-id="test-example"]').should('have.class', 'example')
|
||||||
|
|
||||||
|
// 'cy.get()' yields jQuery object, you can get its attribute
|
||||||
|
// by invoking `.attr()` method
|
||||||
|
cy.get('[data-test-id="test-example"]')
|
||||||
|
.invoke('attr', 'data-test-id')
|
||||||
|
.should('equal', 'test-example')
|
||||||
|
|
||||||
|
// or you can get element's CSS property
|
||||||
|
cy.get('[data-test-id="test-example"]')
|
||||||
|
.invoke('css', 'position')
|
||||||
|
.should('equal', 'static')
|
||||||
|
|
||||||
|
// or use assertions directly during 'cy.get()'
|
||||||
|
// https://on.cypress.io/assertions
|
||||||
|
cy.get('[data-test-id="test-example"]')
|
||||||
|
.should('have.attr', 'data-test-id', 'test-example')
|
||||||
|
.and('have.css', 'position', 'static')
|
||||||
})
|
})
|
||||||
})
|
|
||||||
|
|
||||||
it('best practices - selecting elements', () => {
|
it('cy.contains() - query DOM elements with matching content', () => {
|
||||||
// https://on.cypress.io/best-practices#Selecting-Elements
|
// https://on.cypress.io/contains
|
||||||
cy.get('[data-cy=best-practices-selecting-elements]').within(() => {
|
cy.get('.query-list')
|
||||||
// Worst - too generic, no context
|
.contains('bananas')
|
||||||
cy.get('button').click()
|
.should('have.class', 'third')
|
||||||
|
|
||||||
// Bad. Coupled to styling. Highly subject to change.
|
// we can pass a regexp to `.contains()`
|
||||||
cy.get('.btn.btn-large').click()
|
cy.get('.query-list')
|
||||||
|
.contains(/^b\w+/)
|
||||||
|
.should('have.class', 'third')
|
||||||
|
|
||||||
// Average. Coupled to the `name` attribute which has HTML semantics.
|
cy.get('.query-list')
|
||||||
cy.get('[name=submission]').click()
|
.contains('apples')
|
||||||
|
.should('have.class', 'first')
|
||||||
|
|
||||||
// Better. But still coupled to styling or JS event listeners.
|
// passing a selector to contains will
|
||||||
cy.get('#main').click()
|
// yield the selector containing the text
|
||||||
|
cy.get('#querying')
|
||||||
|
.contains('ul', 'oranges')
|
||||||
|
.should('have.class', 'query-list')
|
||||||
|
|
||||||
// Slightly better. Uses an ID but also ensures the element
|
cy.get('.query-button')
|
||||||
// has an ARIA role attribute
|
.contains('Save Form')
|
||||||
cy.get('#main[role=button]').click()
|
.should('have.class', 'btn')
|
||||||
|
})
|
||||||
// Much better. But still coupled to text content that may change.
|
|
||||||
cy.contains('Submit').click()
|
it('.within() - query DOM elements within a specific element', () => {
|
||||||
|
// https://on.cypress.io/within
|
||||||
// Best. Insulated from all changes.
|
cy.get('.query-form').within(() => {
|
||||||
cy.get('[data-cy=submit]').click()
|
cy.get('input:first').should('have.attr', 'placeholder', 'Email')
|
||||||
|
cy.get('input:last').should('have.attr', 'placeholder', 'Password')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('cy.root() - query the root DOM element', () => {
|
||||||
|
// https://on.cypress.io/root
|
||||||
|
|
||||||
|
// By default, root is the document
|
||||||
|
cy.root().should('match', 'html')
|
||||||
|
|
||||||
|
cy.get('.query-ul').within(() => {
|
||||||
|
// In this within, the root is now the ul DOM element
|
||||||
|
cy.root().should('have.class', 'query-ul')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('best practices - selecting elements', () => {
|
||||||
|
// https://on.cypress.io/best-practices#Selecting-Elements
|
||||||
|
cy.get('[data-cy=best-practices-selecting-elements]').within(() => {
|
||||||
|
// Worst - too generic, no context
|
||||||
|
cy.get('button').click()
|
||||||
|
|
||||||
|
// Bad. Coupled to styling. Highly subject to change.
|
||||||
|
cy.get('.btn.btn-large').click()
|
||||||
|
|
||||||
|
// Average. Coupled to the `name` attribute which has HTML semantics.
|
||||||
|
cy.get('[name=submission]').click()
|
||||||
|
|
||||||
|
// Better. But still coupled to styling or JS event listeners.
|
||||||
|
cy.get('#main').click()
|
||||||
|
|
||||||
|
// Slightly better. Uses an ID but also ensures the element
|
||||||
|
// has an ARIA role attribute
|
||||||
|
cy.get('#main[role=button]').click()
|
||||||
|
|
||||||
|
// Much better. But still coupled to text content that may change.
|
||||||
|
cy.contains('Submit').click()
|
||||||
|
|
||||||
|
// Best. Insulated from all changes.
|
||||||
|
cy.get('[data-cy=submit]').click()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,203 +3,204 @@
|
|||||||
// https://github.com/cypress-io/cypress/issues/6720
|
// https://github.com/cypress-io/cypress/issues/6720
|
||||||
|
|
||||||
context('Spies, Stubs, and Clock', () => {
|
context('Spies, Stubs, and Clock', () => {
|
||||||
it('cy.spy() - wrap a method in a spy', () => {
|
it('cy.spy() - wrap a method in a spy', () => {
|
||||||
// https://on.cypress.io/spy
|
// https://on.cypress.io/spy
|
||||||
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
|
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
|
||||||
|
|
||||||
const obj = {
|
const obj = {
|
||||||
foo () {},
|
foo() {
|
||||||
}
|
},
|
||||||
|
}
|
||||||
|
|
||||||
const spy = cy.spy(obj, 'foo').as('anyArgs')
|
const spy = cy.spy(obj, 'foo').as('anyArgs')
|
||||||
|
|
||||||
obj.foo()
|
obj.foo()
|
||||||
|
|
||||||
expect(spy).to.be.called
|
expect(spy).to.be.called
|
||||||
})
|
})
|
||||||
|
|
||||||
it('cy.spy() retries until assertions pass', () => {
|
it('cy.spy() retries until assertions pass', () => {
|
||||||
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
|
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
|
||||||
|
|
||||||
const obj = {
|
const obj = {
|
||||||
/**
|
/**
|
||||||
* Prints the argument passed
|
* Prints the argument passed
|
||||||
* @param x {any}
|
* @param x {any}
|
||||||
*/
|
*/
|
||||||
foo (x) {
|
foo(x) {
|
||||||
console.log('obj.foo called with', x)
|
console.log('obj.foo called with', x)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
cy.spy(obj, 'foo').as('foo')
|
cy.spy(obj, 'foo').as('foo')
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
obj.foo('first')
|
obj.foo('first')
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
obj.foo('second')
|
obj.foo('second')
|
||||||
}, 2500)
|
}, 2500)
|
||||||
|
|
||||||
cy.get('@foo').should('have.been.calledTwice')
|
cy.get('@foo').should('have.been.calledTwice')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('cy.stub() - create a stub and/or replace a function with stub', () => {
|
it('cy.stub() - create a stub and/or replace a function with stub', () => {
|
||||||
// https://on.cypress.io/stub
|
// https://on.cypress.io/stub
|
||||||
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
|
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
|
||||||
|
|
||||||
const obj = {
|
const obj = {
|
||||||
/**
|
/**
|
||||||
* prints both arguments to the console
|
* prints both arguments to the console
|
||||||
* @param a {string}
|
* @param a {string}
|
||||||
* @param b {string}
|
* @param b {string}
|
||||||
*/
|
*/
|
||||||
foo (a, b) {
|
foo(a, b) {
|
||||||
console.log('a', a, 'b', b)
|
console.log('a', a, 'b', b)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const stub = cy.stub(obj, 'foo').as('foo')
|
const stub = cy.stub(obj, 'foo').as('foo')
|
||||||
|
|
||||||
obj.foo('foo', 'bar')
|
obj.foo('foo', 'bar')
|
||||||
|
|
||||||
expect(stub).to.be.called
|
expect(stub).to.be.called
|
||||||
})
|
})
|
||||||
|
|
||||||
it('cy.clock() - control time in the browser', () => {
|
it('cy.clock() - control time in the browser', () => {
|
||||||
// https://on.cypress.io/clock
|
// https://on.cypress.io/clock
|
||||||
|
|
||||||
// create the date in UTC so its always the same
|
// create the date in UTC so its always the same
|
||||||
// no matter what local timezone the browser is running in
|
// no matter what local timezone the browser is running in
|
||||||
const now = new Date(Date.UTC(2017, 2, 14)).getTime()
|
const now = new Date(Date.UTC(2017, 2, 14)).getTime()
|
||||||
|
|
||||||
cy.clock(now)
|
cy.clock(now)
|
||||||
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
|
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
|
||||||
cy.get('#clock-div').click()
|
cy.get('#clock-div').click()
|
||||||
.should('have.text', '1489449600')
|
.should('have.text', '1489449600')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('cy.tick() - move time in the browser', () => {
|
it('cy.tick() - move time in the browser', () => {
|
||||||
// https://on.cypress.io/tick
|
// https://on.cypress.io/tick
|
||||||
|
|
||||||
// create the date in UTC so its always the same
|
// create the date in UTC so its always the same
|
||||||
// no matter what local timezone the browser is running in
|
// no matter what local timezone the browser is running in
|
||||||
const now = new Date(Date.UTC(2017, 2, 14)).getTime()
|
const now = new Date(Date.UTC(2017, 2, 14)).getTime()
|
||||||
|
|
||||||
cy.clock(now)
|
cy.clock(now)
|
||||||
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
|
cy.visit('https://example.cypress.io/commands/spies-stubs-clocks')
|
||||||
cy.get('#tick-div').click()
|
cy.get('#tick-div').click()
|
||||||
.should('have.text', '1489449600')
|
.should('have.text', '1489449600')
|
||||||
|
|
||||||
cy.tick(10000) // 10 seconds passed
|
cy.tick(10000) // 10 seconds passed
|
||||||
cy.get('#tick-div').click()
|
cy.get('#tick-div').click()
|
||||||
.should('have.text', '1489449610')
|
.should('have.text', '1489449610')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('cy.stub() matches depending on arguments', () => {
|
it('cy.stub() matches depending on arguments', () => {
|
||||||
// see all possible matchers at
|
// see all possible matchers at
|
||||||
// https://sinonjs.org/releases/latest/matchers/
|
// https://sinonjs.org/releases/latest/matchers/
|
||||||
const greeter = {
|
const greeter = {
|
||||||
/**
|
/**
|
||||||
* Greets a person
|
* Greets a person
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
*/
|
*/
|
||||||
greet (name) {
|
greet(name) {
|
||||||
return `Hello, ${name}!`
|
return `Hello, ${name}!`
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
cy.stub(greeter, 'greet')
|
cy.stub(greeter, 'greet')
|
||||||
.callThrough() // if you want non-matched calls to call the real method
|
.callThrough() // if you want non-matched calls to call the real method
|
||||||
.withArgs(Cypress.sinon.match.string).returns('Hi')
|
.withArgs(Cypress.sinon.match.string).returns('Hi')
|
||||||
.withArgs(Cypress.sinon.match.number).throws(new Error('Invalid name'))
|
.withArgs(Cypress.sinon.match.number).throws(new Error('Invalid name'))
|
||||||
|
|
||||||
expect(greeter.greet('World')).to.equal('Hi')
|
expect(greeter.greet('World')).to.equal('Hi')
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
expect(() => greeter.greet(42)).to.throw('Invalid name')
|
expect(() => greeter.greet(42)).to.throw('Invalid name')
|
||||||
expect(greeter.greet).to.have.been.calledTwice
|
expect(greeter.greet).to.have.been.calledTwice
|
||||||
|
|
||||||
// non-matched calls goes the actual method
|
// non-matched calls goes the actual method
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
expect(greeter.greet()).to.equal('Hello, undefined!')
|
expect(greeter.greet()).to.equal('Hello, undefined!')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('matches call arguments using Sinon matchers', () => {
|
it('matches call arguments using Sinon matchers', () => {
|
||||||
// see all possible matchers at
|
// see all possible matchers at
|
||||||
// https://sinonjs.org/releases/latest/matchers/
|
// https://sinonjs.org/releases/latest/matchers/
|
||||||
const calculator = {
|
const calculator = {
|
||||||
/**
|
/**
|
||||||
* returns the sum of two arguments
|
* returns the sum of two arguments
|
||||||
* @param a {number}
|
* @param a {number}
|
||||||
* @param b {number}
|
* @param b {number}
|
||||||
*/
|
*/
|
||||||
add (a, b) {
|
add(a, b) {
|
||||||
return a + b
|
return a + b
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const spy = cy.spy(calculator, 'add').as('add')
|
const spy = cy.spy(calculator, 'add').as('add')
|
||||||
|
|
||||||
expect(calculator.add(2, 3)).to.equal(5)
|
expect(calculator.add(2, 3)).to.equal(5)
|
||||||
|
|
||||||
// if we want to assert the exact values used during the call
|
// if we want to assert the exact values used during the call
|
||||||
expect(spy).to.be.calledWith(2, 3)
|
expect(spy).to.be.calledWith(2, 3)
|
||||||
|
|
||||||
// let's confirm "add" method was called with two numbers
|
// let's confirm "add" method was called with two numbers
|
||||||
expect(spy).to.be.calledWith(Cypress.sinon.match.number, Cypress.sinon.match.number)
|
expect(spy).to.be.calledWith(Cypress.sinon.match.number, Cypress.sinon.match.number)
|
||||||
|
|
||||||
// alternatively, provide the value to match
|
// alternatively, provide the value to match
|
||||||
expect(spy).to.be.calledWith(Cypress.sinon.match(2), Cypress.sinon.match(3))
|
expect(spy).to.be.calledWith(Cypress.sinon.match(2), Cypress.sinon.match(3))
|
||||||
|
|
||||||
// match any value
|
// match any value
|
||||||
expect(spy).to.be.calledWith(Cypress.sinon.match.any, 3)
|
expect(spy).to.be.calledWith(Cypress.sinon.match.any, 3)
|
||||||
|
|
||||||
// match any value from a list
|
// match any value from a list
|
||||||
expect(spy).to.be.calledWith(Cypress.sinon.match.in([1, 2, 3]), 3)
|
expect(spy).to.be.calledWith(Cypress.sinon.match.in([1, 2, 3]), 3)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the given number is event
|
* Returns true if the given number is event
|
||||||
* @param {number} x
|
* @param {number} x
|
||||||
*/
|
*/
|
||||||
const isEven = (x) => x % 2 === 0
|
const isEven = (x) => x % 2 === 0
|
||||||
|
|
||||||
// expect the value to pass a custom predicate function
|
// expect the value to pass a custom predicate function
|
||||||
// the second argument to "sinon.match(predicate, message)" is
|
// the second argument to "sinon.match(predicate, message)" is
|
||||||
// shown if the predicate does not pass and assertion fails
|
// shown if the predicate does not pass and assertion fails
|
||||||
expect(spy).to.be.calledWith(Cypress.sinon.match(isEven, 'isEven'), 3)
|
expect(spy).to.be.calledWith(Cypress.sinon.match(isEven, 'isEven'), 3)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a function that checks if a given number is larger than the limit
|
* Returns a function that checks if a given number is larger than the limit
|
||||||
* @param {number} limit
|
* @param {number} limit
|
||||||
* @returns {(x: number) => boolean}
|
* @returns {(x: number) => boolean}
|
||||||
*/
|
*/
|
||||||
const isGreaterThan = (limit) => (x) => x > limit
|
const isGreaterThan = (limit) => (x) => x > limit
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a function that checks if a given number is less than the limit
|
* Returns a function that checks if a given number is less than the limit
|
||||||
* @param {number} limit
|
* @param {number} limit
|
||||||
* @returns {(x: number) => boolean}
|
* @returns {(x: number) => boolean}
|
||||||
*/
|
*/
|
||||||
const isLessThan = (limit) => (x) => x < limit
|
const isLessThan = (limit) => (x) => x < limit
|
||||||
|
|
||||||
// you can combine several matchers using "and", "or"
|
// you can combine several matchers using "and", "or"
|
||||||
expect(spy).to.be.calledWith(
|
expect(spy).to.be.calledWith(
|
||||||
Cypress.sinon.match.number,
|
Cypress.sinon.match.number,
|
||||||
Cypress.sinon.match(isGreaterThan(2), '> 2').and(Cypress.sinon.match(isLessThan(4), '< 4')),
|
Cypress.sinon.match(isGreaterThan(2), '> 2').and(Cypress.sinon.match(isLessThan(4), '< 4')),
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(spy).to.be.calledWith(
|
expect(spy).to.be.calledWith(
|
||||||
Cypress.sinon.match.number,
|
Cypress.sinon.match.number,
|
||||||
Cypress.sinon.match(isGreaterThan(200), '> 200').or(Cypress.sinon.match(3)),
|
Cypress.sinon.match(isGreaterThan(200), '> 200').or(Cypress.sinon.match(3)),
|
||||||
)
|
)
|
||||||
|
|
||||||
// matchers can be used from BDD assertions
|
// matchers can be used from BDD assertions
|
||||||
cy.get('@add').should('have.been.calledWith',
|
cy.get('@add').should('have.been.calledWith',
|
||||||
Cypress.sinon.match.number, Cypress.sinon.match(3))
|
Cypress.sinon.match.number, Cypress.sinon.match(3))
|
||||||
|
|
||||||
// you can alias matchers for shorter test code
|
// you can alias matchers for shorter test code
|
||||||
const { match: M } = Cypress.sinon
|
const {match: M} = Cypress.sinon
|
||||||
|
|
||||||
cy.get('@add').should('have.been.calledWith', M.number, M(3))
|
cy.get('@add').should('have.been.calledWith', M.number, M(3))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,121 +1,121 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Traversal', () => {
|
context('Traversal', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/traversal')
|
cy.visit('https://example.cypress.io/commands/traversal')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.children() - get child DOM elements', () => {
|
it('.children() - get child DOM elements', () => {
|
||||||
// https://on.cypress.io/children
|
// https://on.cypress.io/children
|
||||||
cy.get('.traversal-breadcrumb')
|
cy.get('.traversal-breadcrumb')
|
||||||
.children('.active')
|
.children('.active')
|
||||||
.should('contain', 'Data')
|
.should('contain', 'Data')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.closest() - get closest ancestor DOM element', () => {
|
it('.closest() - get closest ancestor DOM element', () => {
|
||||||
// https://on.cypress.io/closest
|
// https://on.cypress.io/closest
|
||||||
cy.get('.traversal-badge')
|
cy.get('.traversal-badge')
|
||||||
.closest('ul')
|
.closest('ul')
|
||||||
.should('have.class', 'list-group')
|
.should('have.class', 'list-group')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.eq() - get a DOM element at a specific index', () => {
|
it('.eq() - get a DOM element at a specific index', () => {
|
||||||
// https://on.cypress.io/eq
|
// https://on.cypress.io/eq
|
||||||
cy.get('.traversal-list>li')
|
cy.get('.traversal-list>li')
|
||||||
.eq(1).should('contain', 'siamese')
|
.eq(1).should('contain', 'siamese')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.filter() - get DOM elements that match the selector', () => {
|
it('.filter() - get DOM elements that match the selector', () => {
|
||||||
// https://on.cypress.io/filter
|
// https://on.cypress.io/filter
|
||||||
cy.get('.traversal-nav>li')
|
cy.get('.traversal-nav>li')
|
||||||
.filter('.active').should('contain', 'About')
|
.filter('.active').should('contain', 'About')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.find() - get descendant DOM elements of the selector', () => {
|
it('.find() - get descendant DOM elements of the selector', () => {
|
||||||
// https://on.cypress.io/find
|
// https://on.cypress.io/find
|
||||||
cy.get('.traversal-pagination')
|
cy.get('.traversal-pagination')
|
||||||
.find('li').find('a')
|
.find('li').find('a')
|
||||||
.should('have.length', 7)
|
.should('have.length', 7)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.first() - get first DOM element', () => {
|
it('.first() - get first DOM element', () => {
|
||||||
// https://on.cypress.io/first
|
// https://on.cypress.io/first
|
||||||
cy.get('.traversal-table td')
|
cy.get('.traversal-table td')
|
||||||
.first().should('contain', '1')
|
.first().should('contain', '1')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.last() - get last DOM element', () => {
|
it('.last() - get last DOM element', () => {
|
||||||
// https://on.cypress.io/last
|
// https://on.cypress.io/last
|
||||||
cy.get('.traversal-buttons .btn')
|
cy.get('.traversal-buttons .btn')
|
||||||
.last().should('contain', 'Submit')
|
.last().should('contain', 'Submit')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.next() - get next sibling DOM element', () => {
|
it('.next() - get next sibling DOM element', () => {
|
||||||
// https://on.cypress.io/next
|
// https://on.cypress.io/next
|
||||||
cy.get('.traversal-ul')
|
cy.get('.traversal-ul')
|
||||||
.contains('apples').next().should('contain', 'oranges')
|
.contains('apples').next().should('contain', 'oranges')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.nextAll() - get all next sibling DOM elements', () => {
|
it('.nextAll() - get all next sibling DOM elements', () => {
|
||||||
// https://on.cypress.io/nextall
|
// https://on.cypress.io/nextall
|
||||||
cy.get('.traversal-next-all')
|
cy.get('.traversal-next-all')
|
||||||
.contains('oranges')
|
.contains('oranges')
|
||||||
.nextAll().should('have.length', 3)
|
.nextAll().should('have.length', 3)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.nextUntil() - get next sibling DOM elements until next el', () => {
|
it('.nextUntil() - get next sibling DOM elements until next el', () => {
|
||||||
// https://on.cypress.io/nextuntil
|
// https://on.cypress.io/nextuntil
|
||||||
cy.get('#veggies')
|
cy.get('#veggies')
|
||||||
.nextUntil('#nuts').should('have.length', 3)
|
.nextUntil('#nuts').should('have.length', 3)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.not() - remove DOM elements from set of DOM elements', () => {
|
it('.not() - remove DOM elements from set of DOM elements', () => {
|
||||||
// https://on.cypress.io/not
|
// https://on.cypress.io/not
|
||||||
cy.get('.traversal-disabled .btn')
|
cy.get('.traversal-disabled .btn')
|
||||||
.not('[disabled]').should('not.contain', 'Disabled')
|
.not('[disabled]').should('not.contain', 'Disabled')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.parent() - get parent DOM element from DOM elements', () => {
|
it('.parent() - get parent DOM element from DOM elements', () => {
|
||||||
// https://on.cypress.io/parent
|
// https://on.cypress.io/parent
|
||||||
cy.get('.traversal-mark')
|
cy.get('.traversal-mark')
|
||||||
.parent().should('contain', 'Morbi leo risus')
|
.parent().should('contain', 'Morbi leo risus')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.parents() - get parent DOM elements from DOM elements', () => {
|
it('.parents() - get parent DOM elements from DOM elements', () => {
|
||||||
// https://on.cypress.io/parents
|
// https://on.cypress.io/parents
|
||||||
cy.get('.traversal-cite')
|
cy.get('.traversal-cite')
|
||||||
.parents().should('match', 'blockquote')
|
.parents().should('match', 'blockquote')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.parentsUntil() - get parent DOM elements from DOM elements until el', () => {
|
it('.parentsUntil() - get parent DOM elements from DOM elements until el', () => {
|
||||||
// https://on.cypress.io/parentsuntil
|
// https://on.cypress.io/parentsuntil
|
||||||
cy.get('.clothes-nav')
|
cy.get('.clothes-nav')
|
||||||
.find('.active')
|
.find('.active')
|
||||||
.parentsUntil('.clothes-nav')
|
.parentsUntil('.clothes-nav')
|
||||||
.should('have.length', 2)
|
.should('have.length', 2)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.prev() - get previous sibling DOM element', () => {
|
it('.prev() - get previous sibling DOM element', () => {
|
||||||
// https://on.cypress.io/prev
|
// https://on.cypress.io/prev
|
||||||
cy.get('.birds').find('.active')
|
cy.get('.birds').find('.active')
|
||||||
.prev().should('contain', 'Lorikeets')
|
.prev().should('contain', 'Lorikeets')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.prevAll() - get all previous sibling DOM elements', () => {
|
it('.prevAll() - get all previous sibling DOM elements', () => {
|
||||||
// https://on.cypress.io/prevall
|
// https://on.cypress.io/prevall
|
||||||
cy.get('.fruits-list').find('.third')
|
cy.get('.fruits-list').find('.third')
|
||||||
.prevAll().should('have.length', 2)
|
.prevAll().should('have.length', 2)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.prevUntil() - get all previous sibling DOM elements until el', () => {
|
it('.prevUntil() - get all previous sibling DOM elements until el', () => {
|
||||||
// https://on.cypress.io/prevuntil
|
// https://on.cypress.io/prevuntil
|
||||||
cy.get('.foods-list').find('#nuts')
|
cy.get('.foods-list').find('#nuts')
|
||||||
.prevUntil('#veggies').should('have.length', 3)
|
.prevUntil('#veggies').should('have.length', 3)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('.siblings() - get all sibling DOM elements', () => {
|
it('.siblings() - get all sibling DOM elements', () => {
|
||||||
// https://on.cypress.io/siblings
|
// https://on.cypress.io/siblings
|
||||||
cy.get('.traversal-pills .active')
|
cy.get('.traversal-pills .active')
|
||||||
.siblings().should('have.length', 2)
|
.siblings().should('have.length', 2)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,110 +1,110 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Utilities', () => {
|
context('Utilities', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/utilities')
|
cy.visit('https://example.cypress.io/utilities')
|
||||||
})
|
|
||||||
|
|
||||||
it('Cypress._ - call a lodash method', () => {
|
|
||||||
// https://on.cypress.io/_
|
|
||||||
cy.request('https://jsonplaceholder.cypress.io/users')
|
|
||||||
.then((response) => {
|
|
||||||
let ids = Cypress._.chain(response.body).map('id').take(3).value()
|
|
||||||
|
|
||||||
expect(ids).to.deep.eq([1, 2, 3])
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Cypress.$ - call a jQuery method', () => {
|
|
||||||
// https://on.cypress.io/$
|
|
||||||
let $li = Cypress.$('.utility-jquery li:first')
|
|
||||||
|
|
||||||
cy.wrap($li)
|
|
||||||
.should('not.have.class', 'active')
|
|
||||||
.click()
|
|
||||||
.should('have.class', 'active')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Cypress.Blob - blob utilities and base64 string conversion', () => {
|
|
||||||
// https://on.cypress.io/blob
|
|
||||||
cy.get('.utility-blob').then(($div) => {
|
|
||||||
// https://github.com/nolanlawson/blob-util#imgSrcToDataURL
|
|
||||||
// get the dataUrl string for the javascript-logo
|
|
||||||
return Cypress.Blob.imgSrcToDataURL('https://example.cypress.io/assets/img/javascript-logo.png', undefined, 'anonymous')
|
|
||||||
.then((dataUrl) => {
|
|
||||||
// create an <img> element and set its src to the dataUrl
|
|
||||||
let img = Cypress.$('<img />', { src: dataUrl })
|
|
||||||
|
|
||||||
// need to explicitly return cy here since we are initially returning
|
|
||||||
// the Cypress.Blob.imgSrcToDataURL promise to our test
|
|
||||||
// append the image
|
|
||||||
$div.append(img)
|
|
||||||
|
|
||||||
cy.get('.utility-blob img').click()
|
|
||||||
.should('have.attr', 'src', dataUrl)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('Cypress.minimatch - test out glob patterns against strings', () => {
|
|
||||||
// https://on.cypress.io/minimatch
|
|
||||||
let matching = Cypress.minimatch('/users/1/comments', '/users/*/comments', {
|
|
||||||
matchBase: true,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(matching, 'matching wildcard').to.be.true
|
it('Cypress._ - call a lodash method', () => {
|
||||||
|
// https://on.cypress.io/_
|
||||||
|
cy.request('https://jsonplaceholder.cypress.io/users')
|
||||||
|
.then((response) => {
|
||||||
|
let ids = Cypress._.chain(response.body).map('id').take(3).value()
|
||||||
|
|
||||||
matching = Cypress.minimatch('/users/1/comments/2', '/users/*/comments', {
|
expect(ids).to.deep.eq([1, 2, 3])
|
||||||
matchBase: true,
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(matching, 'comments').to.be.false
|
it('Cypress.$ - call a jQuery method', () => {
|
||||||
|
// https://on.cypress.io/$
|
||||||
|
let $li = Cypress.$('.utility-jquery li:first')
|
||||||
|
|
||||||
// ** matches against all downstream path segments
|
cy.wrap($li)
|
||||||
matching = Cypress.minimatch('/foo/bar/baz/123/quux?a=b&c=2', '/foo/**', {
|
.should('not.have.class', 'active')
|
||||||
matchBase: true,
|
.click()
|
||||||
|
.should('have.class', 'active')
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(matching, 'comments').to.be.true
|
it('Cypress.Blob - blob utilities and base64 string conversion', () => {
|
||||||
|
// https://on.cypress.io/blob
|
||||||
|
cy.get('.utility-blob').then(($div) => {
|
||||||
|
// https://github.com/nolanlawson/blob-util#imgSrcToDataURL
|
||||||
|
// get the dataUrl string for the javascript-logo
|
||||||
|
return Cypress.Blob.imgSrcToDataURL('https://example.cypress.io/assets/img/javascript-logo.png', undefined, 'anonymous')
|
||||||
|
.then((dataUrl) => {
|
||||||
|
// create an <img> element and set its src to the dataUrl
|
||||||
|
let img = Cypress.$('<img />', {src: dataUrl})
|
||||||
|
|
||||||
// whereas * matches only the next path segment
|
// need to explicitly return cy here since we are initially returning
|
||||||
|
// the Cypress.Blob.imgSrcToDataURL promise to our test
|
||||||
|
// append the image
|
||||||
|
$div.append(img)
|
||||||
|
|
||||||
matching = Cypress.minimatch('/foo/bar/baz/123/quux?a=b&c=2', '/foo/*', {
|
cy.get('.utility-blob img').click()
|
||||||
matchBase: false,
|
.should('have.attr', 'src', dataUrl)
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(matching, 'comments').to.be.false
|
it('Cypress.minimatch - test out glob patterns against strings', () => {
|
||||||
})
|
// https://on.cypress.io/minimatch
|
||||||
|
let matching = Cypress.minimatch('/users/1/comments', '/users/*/comments', {
|
||||||
|
matchBase: true,
|
||||||
|
})
|
||||||
|
|
||||||
it('Cypress.Promise - instantiate a bluebird promise', () => {
|
expect(matching, 'matching wildcard').to.be.true
|
||||||
// https://on.cypress.io/promise
|
|
||||||
let waited = false
|
|
||||||
|
|
||||||
/**
|
matching = Cypress.minimatch('/users/1/comments/2', '/users/*/comments', {
|
||||||
* @return Bluebird<string>
|
matchBase: true,
|
||||||
*/
|
})
|
||||||
function waitOneSecond () {
|
|
||||||
// return a promise that resolves after 1 second
|
|
||||||
// @ts-ignore TS2351 (new Cypress.Promise)
|
|
||||||
return new Cypress.Promise((resolve, reject) => {
|
|
||||||
setTimeout(() => {
|
|
||||||
// set waited to true
|
|
||||||
waited = true
|
|
||||||
|
|
||||||
// resolve with 'foo' string
|
expect(matching, 'comments').to.be.false
|
||||||
resolve('foo')
|
|
||||||
}, 1000)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
cy.then(() => {
|
// ** matches against all downstream path segments
|
||||||
// return a promise to cy.then() that
|
matching = Cypress.minimatch('/foo/bar/baz/123/quux?a=b&c=2', '/foo/**', {
|
||||||
// is awaited until it resolves
|
matchBase: true,
|
||||||
// @ts-ignore TS7006
|
})
|
||||||
return waitOneSecond().then((str) => {
|
|
||||||
expect(str).to.eq('foo')
|
expect(matching, 'comments').to.be.true
|
||||||
expect(waited).to.be.true
|
|
||||||
})
|
// whereas * matches only the next path segment
|
||||||
|
|
||||||
|
matching = Cypress.minimatch('/foo/bar/baz/123/quux?a=b&c=2', '/foo/*', {
|
||||||
|
matchBase: false,
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(matching, 'comments').to.be.false
|
||||||
|
})
|
||||||
|
|
||||||
|
it('Cypress.Promise - instantiate a bluebird promise', () => {
|
||||||
|
// https://on.cypress.io/promise
|
||||||
|
let waited = false
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Bluebird<string>
|
||||||
|
*/
|
||||||
|
function waitOneSecond() {
|
||||||
|
// return a promise that resolves after 1 second
|
||||||
|
// @ts-ignore TS2351 (new Cypress.Promise)
|
||||||
|
return new Cypress.Promise((resolve, reject) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
// set waited to true
|
||||||
|
waited = true
|
||||||
|
|
||||||
|
// resolve with 'foo' string
|
||||||
|
resolve('foo')
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
cy.then(() => {
|
||||||
|
// return a promise to cy.then() that
|
||||||
|
// is awaited until it resolves
|
||||||
|
// @ts-ignore TS7006
|
||||||
|
return waitOneSecond().then((str) => {
|
||||||
|
expect(str).to.eq('foo')
|
||||||
|
expect(waited).to.be.true
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,59 +1,59 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Viewport', () => {
|
context('Viewport', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/viewport')
|
cy.visit('https://example.cypress.io/commands/viewport')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('cy.viewport() - set the viewport size and dimension', () => {
|
it('cy.viewport() - set the viewport size and dimension', () => {
|
||||||
// https://on.cypress.io/viewport
|
// https://on.cypress.io/viewport
|
||||||
|
|
||||||
cy.get('#navbar').should('be.visible')
|
cy.get('#navbar').should('be.visible')
|
||||||
cy.viewport(320, 480)
|
cy.viewport(320, 480)
|
||||||
|
|
||||||
// the navbar should have collapse since our screen is smaller
|
// the navbar should have collapse since our screen is smaller
|
||||||
cy.get('#navbar').should('not.be.visible')
|
cy.get('#navbar').should('not.be.visible')
|
||||||
cy.get('.navbar-toggle').should('be.visible').click()
|
cy.get('.navbar-toggle').should('be.visible').click()
|
||||||
cy.get('.nav').find('a').should('be.visible')
|
cy.get('.nav').find('a').should('be.visible')
|
||||||
|
|
||||||
// lets see what our app looks like on a super large screen
|
// lets see what our app looks like on a super large screen
|
||||||
cy.viewport(2999, 2999)
|
cy.viewport(2999, 2999)
|
||||||
|
|
||||||
// cy.viewport() accepts a set of preset sizes
|
// cy.viewport() accepts a set of preset sizes
|
||||||
// to easily set the screen to a device's width and height
|
// to easily set the screen to a device's width and height
|
||||||
|
|
||||||
// We added a cy.wait() between each viewport change so you can see
|
// We added a cy.wait() between each viewport change so you can see
|
||||||
// the change otherwise it is a little too fast to see :)
|
// the change otherwise it is a little too fast to see :)
|
||||||
|
|
||||||
cy.viewport('macbook-15')
|
cy.viewport('macbook-15')
|
||||||
cy.wait(200)
|
cy.wait(200)
|
||||||
cy.viewport('macbook-13')
|
cy.viewport('macbook-13')
|
||||||
cy.wait(200)
|
cy.wait(200)
|
||||||
cy.viewport('macbook-11')
|
cy.viewport('macbook-11')
|
||||||
cy.wait(200)
|
cy.wait(200)
|
||||||
cy.viewport('ipad-2')
|
cy.viewport('ipad-2')
|
||||||
cy.wait(200)
|
cy.wait(200)
|
||||||
cy.viewport('ipad-mini')
|
cy.viewport('ipad-mini')
|
||||||
cy.wait(200)
|
cy.wait(200)
|
||||||
cy.viewport('iphone-6+')
|
cy.viewport('iphone-6+')
|
||||||
cy.wait(200)
|
cy.wait(200)
|
||||||
cy.viewport('iphone-6')
|
cy.viewport('iphone-6')
|
||||||
cy.wait(200)
|
cy.wait(200)
|
||||||
cy.viewport('iphone-5')
|
cy.viewport('iphone-5')
|
||||||
cy.wait(200)
|
cy.wait(200)
|
||||||
cy.viewport('iphone-4')
|
cy.viewport('iphone-4')
|
||||||
cy.wait(200)
|
cy.wait(200)
|
||||||
cy.viewport('iphone-3')
|
cy.viewport('iphone-3')
|
||||||
cy.wait(200)
|
cy.wait(200)
|
||||||
|
|
||||||
// cy.viewport() accepts an orientation for all presets
|
// cy.viewport() accepts an orientation for all presets
|
||||||
// the default orientation is 'portrait'
|
// the default orientation is 'portrait'
|
||||||
cy.viewport('ipad-2', 'portrait')
|
cy.viewport('ipad-2', 'portrait')
|
||||||
cy.wait(200)
|
cy.wait(200)
|
||||||
cy.viewport('iphone-4', 'landscape')
|
cy.viewport('iphone-4', 'landscape')
|
||||||
cy.wait(200)
|
cy.wait(200)
|
||||||
|
|
||||||
// The viewport will be reset back to the default dimensions
|
// The viewport will be reset back to the default dimensions
|
||||||
// in between tests (the default can be set in cypress.json)
|
// in between tests (the default can be set in cypress.json)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Waiting', () => {
|
context('Waiting', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/waiting')
|
cy.visit('https://example.cypress.io/commands/waiting')
|
||||||
})
|
})
|
||||||
// BE CAREFUL of adding unnecessary wait times.
|
// BE CAREFUL of adding unnecessary wait times.
|
||||||
// https://on.cypress.io/best-practices#Unnecessary-Waiting
|
// https://on.cypress.io/best-practices#Unnecessary-Waiting
|
||||||
|
|
||||||
// https://on.cypress.io/wait
|
// https://on.cypress.io/wait
|
||||||
it('cy.wait() - wait for a specific amount of time', () => {
|
it('cy.wait() - wait for a specific amount of time', () => {
|
||||||
cy.get('.wait-input1').type('Wait 1000ms after typing')
|
cy.get('.wait-input1').type('Wait 1000ms after typing')
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
cy.get('.wait-input2').type('Wait 1000ms after typing')
|
cy.get('.wait-input2').type('Wait 1000ms after typing')
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
cy.get('.wait-input3').type('Wait 1000ms after typing')
|
cy.get('.wait-input3').type('Wait 1000ms after typing')
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('cy.wait() - wait for a specific route', () => {
|
it('cy.wait() - wait for a specific route', () => {
|
||||||
// Listen to GET to comments/1
|
// Listen to GET to comments/1
|
||||||
cy.intercept('GET', '**/comments/*').as('getComment')
|
cy.intercept('GET', '**/comments/*').as('getComment')
|
||||||
|
|
||||||
// we have code that gets a comment when
|
// we have code that gets a comment when
|
||||||
// the button is clicked in scripts.js
|
// the button is clicked in scripts.js
|
||||||
cy.get('.network-btn').click()
|
cy.get('.network-btn').click()
|
||||||
|
|
||||||
// wait for GET comments/1
|
// wait for GET comments/1
|
||||||
cy.wait('@getComment').its('response.statusCode').should('be.oneOf', [200, 304])
|
cy.wait('@getComment').its('response.statusCode').should('be.oneOf', [200, 304])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
context('Window', () => {
|
context('Window', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('https://example.cypress.io/commands/window')
|
cy.visit('https://example.cypress.io/commands/window')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('cy.window() - get the global window object', () => {
|
it('cy.window() - get the global window object', () => {
|
||||||
// https://on.cypress.io/window
|
// https://on.cypress.io/window
|
||||||
cy.window().should('have.property', 'top')
|
cy.window().should('have.property', 'top')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('cy.document() - get the document object', () => {
|
it('cy.document() - get the document object', () => {
|
||||||
// https://on.cypress.io/document
|
// https://on.cypress.io/document
|
||||||
cy.document().should('have.property', 'charset').and('eq', 'UTF-8')
|
cy.document().should('have.property', 'charset').and('eq', 'UTF-8')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('cy.title() - get the title', () => {
|
it('cy.title() - get the title', () => {
|
||||||
// https://on.cypress.io/title
|
// https://on.cypress.io/title
|
||||||
cy.title().should('include', 'Kitchen Sink')
|
cy.title().should('include', 'Kitchen Sink')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -17,6 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
module.exports = (on, config) => {
|
module.exports = (on, config) => {
|
||||||
// `on` is used to hook into various events Cypress emits
|
// `on` is used to hook into various events Cypress emits
|
||||||
// `config` is the resolved Cypress config
|
// `config` is the resolved Cypress config
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"baseUrl": "../node_modules",
|
"baseUrl": "../node_modules",
|
||||||
"types": ["cypress"]
|
"types": [
|
||||||
|
"cypress"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": ["**/*.*"]
|
"include": [
|
||||||
|
"**/*.*"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,52 +5,52 @@ importScripts("https://www.gstatic.com/firebasejs/8.2.0/firebase-messaging.js");
|
|||||||
// Initialize the Firebase app in the service worker by passing the generated config
|
// Initialize the Firebase app in the service worker by passing the generated config
|
||||||
let firebaseConfig;
|
let firebaseConfig;
|
||||||
switch (this.location.hostname) {
|
switch (this.location.hostname) {
|
||||||
case "localhost":
|
case "localhost":
|
||||||
firebaseConfig = {
|
firebaseConfig = {
|
||||||
apiKey: "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc",
|
apiKey: "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc",
|
||||||
authDomain: "imex-dev.firebaseapp.com",
|
authDomain: "imex-dev.firebaseapp.com",
|
||||||
databaseURL: "https://imex-dev.firebaseio.com",
|
databaseURL: "https://imex-dev.firebaseio.com",
|
||||||
projectId: "imex-dev",
|
projectId: "imex-dev",
|
||||||
storageBucket: "imex-dev.appspot.com",
|
storageBucket: "imex-dev.appspot.com",
|
||||||
messagingSenderId: "759548147434",
|
messagingSenderId: "759548147434",
|
||||||
appId: "1:759548147434:web:e8239868a48ceb36700993",
|
appId: "1:759548147434:web:e8239868a48ceb36700993",
|
||||||
measurementId: "G-K5XRBVVB4S",
|
measurementId: "G-K5XRBVVB4S",
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case "test.imex.online":
|
case "test.imex.online":
|
||||||
firebaseConfig = {
|
firebaseConfig = {
|
||||||
apiKey: "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c",
|
apiKey: "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c",
|
||||||
authDomain: "imex-test.firebaseapp.com",
|
authDomain: "imex-test.firebaseapp.com",
|
||||||
projectId: "imex-test",
|
projectId: "imex-test",
|
||||||
storageBucket: "imex-test.appspot.com",
|
storageBucket: "imex-test.appspot.com",
|
||||||
messagingSenderId: "991923618608",
|
messagingSenderId: "991923618608",
|
||||||
appId: "1:991923618608:web:633437569cdad78299bef5",
|
appId: "1:991923618608:web:633437569cdad78299bef5",
|
||||||
// measurementId: "${config.measurementId}",
|
// measurementId: "${config.measurementId}",
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case "romeonline.io":
|
case "romeonline.io":
|
||||||
firebaseConfig = {
|
firebaseConfig = {
|
||||||
apiKey: "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE",
|
apiKey: "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE",
|
||||||
authDomain: "rome-prod-1.firebaseapp.com",
|
authDomain: "rome-prod-1.firebaseapp.com",
|
||||||
projectId: "rome-prod-1",
|
projectId: "rome-prod-1",
|
||||||
storageBucket: "rome-prod-1.appspot.com",
|
storageBucket: "rome-prod-1.appspot.com",
|
||||||
messagingSenderId: "147786367145",
|
messagingSenderId: "147786367145",
|
||||||
appId: "1:147786367145:web:9d4cba68071c3f29a8a9b8",
|
appId: "1:147786367145:web:9d4cba68071c3f29a8a9b8",
|
||||||
measurementId: "G-G8Z9DRHTZS",
|
measurementId: "G-G8Z9DRHTZS",
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case "imex.online":
|
case "imex.online":
|
||||||
default:
|
default:
|
||||||
firebaseConfig = {
|
firebaseConfig = {
|
||||||
apiKey: "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU",
|
apiKey: "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU",
|
||||||
authDomain: "imex-prod.firebaseapp.com",
|
authDomain: "imex-prod.firebaseapp.com",
|
||||||
databaseURL: "https://imex-prod.firebaseio.com",
|
databaseURL: "https://imex-prod.firebaseio.com",
|
||||||
projectId: "imex-prod",
|
projectId: "imex-prod",
|
||||||
storageBucket: "imex-prod.appspot.com",
|
storageBucket: "imex-prod.appspot.com",
|
||||||
messagingSenderId: "253497221485",
|
messagingSenderId: "253497221485",
|
||||||
appId: "1:253497221485:web:3c81c483b94db84b227a64",
|
appId: "1:253497221485:web:3c81c483b94db84b227a64",
|
||||||
measurementId: "G-NTWBKG2L0M",
|
measurementId: "G-NTWBKG2L0M",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
firebase.initializeApp(firebaseConfig);
|
firebase.initializeApp(firebaseConfig);
|
||||||
@@ -59,9 +59,9 @@ firebase.initializeApp(firebaseConfig);
|
|||||||
const messaging = firebase.messaging();
|
const messaging = firebase.messaging();
|
||||||
|
|
||||||
messaging.onBackgroundMessage(function (payload) {
|
messaging.onBackgroundMessage(function (payload) {
|
||||||
// Customize notification here
|
// Customize notification here
|
||||||
const channel = new BroadcastChannel("imex-sw-messages");
|
const channel = new BroadcastChannel("imex-sw-messages");
|
||||||
channel.postMessage(payload);
|
channel.postMessage(payload);
|
||||||
|
|
||||||
//self.registration.showNotification(notificationTitle, notificationOptions);
|
//self.registration.showNotification(notificationTitle, notificationOptions);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,131 +1,134 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8"/>
|
||||||
<link rel="icon" href="%PUBLIC_URL%/ro-favicon.png" />
|
<link href="%PUBLIC_URL%/ro-favicon.png" rel="icon"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta content="width=device-width, initial-scale=1" name="viewport"/>
|
||||||
<meta name="theme-color" content="#002366" />
|
<meta content="#002366" name="theme-color"/>
|
||||||
<meta name="description" content="Rome Online" />
|
<meta content="Rome Online" name="description"/>
|
||||||
<!-- <link rel="apple-touch-icon" href="logo192.png" /> -->
|
<!-- <link rel="apple-touch-icon" href="logo192.png" /> -->
|
||||||
|
|
||||||
<!--Use the below code snippet to provide real time updates to the live chat plugin without the need of copying and paste each time to your website when changes are made via PBX-->
|
<!--Use the below code snippet to provide real time updates to the live chat plugin without the need of copying and paste each time to your website when changes are made via PBX-->
|
||||||
|
|
||||||
<call-us-selector phonesystem-url=https://rometech.east.3cx.us:5001 party="LiveChat528346"></call-us-selector>
|
<call-us-selector party="LiveChat528346" phonesystem-url=https://rometech.east.3cx.us:5001></call-us-selector>
|
||||||
|
|
||||||
<!--Incase you don't want real time updates to the live chat plugin when options are changed, use the below code snippet. Please note that each time you change the settings you will need to copy and paste the snippet code to your website-->
|
<!--Incase you don't want real time updates to the live chat plugin when options are changed, use the below code snippet. Please note that each time you change the settings you will need to copy and paste the snippet code to your website-->
|
||||||
|
|
||||||
<!--<call-us
|
<!--<call-us
|
||||||
|
|
||||||
phonesystem-url=https://rometech.east.3cx.us:5001
|
phonesystem-url=https://rometech.east.3cx.us:5001
|
||||||
|
|
||||||
style="position:fixed;font-size:16px;line-height:17px;z-index: 99999;right: 20px; bottom: 20px;"
|
style="position:fixed;font-size:16px;line-height:17px;z-index: 99999;right: 20px; bottom: 20px;"
|
||||||
|
|
||||||
id="wp-live-chat-by-3CX"
|
id="wp-live-chat-by-3CX"
|
||||||
|
|
||||||
minimized="true"
|
minimized="true"
|
||||||
|
|
||||||
animation-style="noanimation"
|
animation-style="noanimation"
|
||||||
|
|
||||||
party="LiveChat528346"
|
party="LiveChat528346"
|
||||||
|
|
||||||
minimized-style="bubbleright"
|
minimized-style="bubbleright"
|
||||||
|
|
||||||
allow-call="true"
|
allow-call="true"
|
||||||
|
|
||||||
allow-video="false"
|
allow-video="false"
|
||||||
|
|
||||||
allow-soundnotifications="true"
|
allow-soundnotifications="true"
|
||||||
|
|
||||||
enable-mute="true"
|
enable-mute="true"
|
||||||
|
|
||||||
enable-onmobile="true"
|
enable-onmobile="true"
|
||||||
|
|
||||||
offline-enabled="true"
|
offline-enabled="true"
|
||||||
|
|
||||||
enable="true"
|
enable="true"
|
||||||
|
|
||||||
ignore-queueownership="false"
|
ignore-queueownership="false"
|
||||||
|
|
||||||
authentication="both"
|
authentication="both"
|
||||||
|
|
||||||
show-operator-actual-name="true"
|
show-operator-actual-name="true"
|
||||||
|
|
||||||
aknowledge-received="true"
|
aknowledge-received="true"
|
||||||
|
|
||||||
gdpr-enabled="false"
|
gdpr-enabled="false"
|
||||||
|
|
||||||
message-userinfo-format="name"
|
message-userinfo-format="name"
|
||||||
|
|
||||||
message-dateformat="both"
|
message-dateformat="both"
|
||||||
|
|
||||||
lang="browser"
|
lang="browser"
|
||||||
|
|
||||||
button-icon-type="default"
|
button-icon-type="default"
|
||||||
|
|
||||||
greeting-visibility="none"
|
greeting-visibility="none"
|
||||||
|
|
||||||
greeting-offline-visibility="none"
|
greeting-offline-visibility="none"
|
||||||
|
|
||||||
chat-delay="2000"
|
chat-delay="2000"
|
||||||
|
|
||||||
enable-direct-call="true"
|
enable-direct-call="true"
|
||||||
|
|
||||||
enable-ga="false"
|
enable-ga="false"
|
||||||
|
|
||||||
></call-us>-->
|
></call-us>-->
|
||||||
|
|
||||||
<script defer src=https://downloads-global.3cx.com/downloads/livechatandtalk/v1/callus.js id="tcx-callus-js" charset="utf-8"></script>
|
<script charset="utf-8" defer id="tcx-callus-js"
|
||||||
|
src=https://downloads-global.3cx.com/downloads/livechatandtalk/v1/callus.js></script>
|
||||||
|
|
||||||
<link rel="apple-touch-icon" href="logo192.png" />
|
<link href="logo192.png" rel="apple-touch-icon"/>
|
||||||
<script>
|
<script>
|
||||||
!(function () {
|
!(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
var e = [
|
var e = [
|
||||||
"debug",
|
"debug",
|
||||||
"destroy",
|
"destroy",
|
||||||
"do",
|
"do",
|
||||||
"help",
|
"help",
|
||||||
"identify",
|
"identify",
|
||||||
"is",
|
"is",
|
||||||
"off",
|
"off",
|
||||||
"on",
|
"on",
|
||||||
"ready",
|
"ready",
|
||||||
"render",
|
"render",
|
||||||
"reset",
|
"reset",
|
||||||
"safe",
|
"safe",
|
||||||
"set",
|
"set",
|
||||||
];
|
];
|
||||||
if (window.noticeable)
|
if (window.noticeable)
|
||||||
console.warn("Noticeable SDK code snippet loaded more than once");
|
console.warn("Noticeable SDK code snippet loaded more than once");
|
||||||
else {
|
else {
|
||||||
var n = (window.noticeable = window.noticeable || []);
|
var n = (window.noticeable = window.noticeable || []);
|
||||||
function t(e) {
|
|
||||||
return function () {
|
function t(e) {
|
||||||
var t = Array.prototype.slice.call(arguments);
|
return function () {
|
||||||
return t.unshift(e), n.push(t), n;
|
var t = Array.prototype.slice.call(arguments);
|
||||||
};
|
return t.unshift(e), n.push(t), n;
|
||||||
}
|
};
|
||||||
!(function () {
|
}
|
||||||
for (var o = 0; o < e.length; o++) {
|
|
||||||
var r = e[o];
|
!(function () {
|
||||||
n[r] = t(r);
|
for (var o = 0; o < e.length; o++) {
|
||||||
|
var r = e[o];
|
||||||
|
n[r] = t(r);
|
||||||
|
}
|
||||||
|
})(),
|
||||||
|
(function () {
|
||||||
|
var e = document.createElement("script");
|
||||||
|
(e.async = !0), (e.src = "https://sdk.noticeable.io/l.js");
|
||||||
|
var n = document.head;
|
||||||
|
n.insertBefore(e, n.firstChild);
|
||||||
|
})();
|
||||||
}
|
}
|
||||||
})(),
|
})();
|
||||||
(function () {
|
|
||||||
var e = document.createElement("script");
|
|
||||||
(e.async = !0), (e.src = "https://sdk.noticeable.io/l.js");
|
|
||||||
var n = document.head;
|
|
||||||
n.insertBefore(e, n.firstChild);
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
manifest.json provides metadata used when your web app is installed on a
|
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/
|
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||||
-->
|
-->
|
||||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
<link href="%PUBLIC_URL%/manifest.json" rel="manifest"/>
|
||||||
<!--
|
<!--
|
||||||
Notice the use of %PUBLIC_URL% in the tags above.
|
Notice the use of %PUBLIC_URL% in the tags above.
|
||||||
It will be replaced with the URL of the `public` folder during the build.
|
It will be replaced with the URL of the `public` folder during the build.
|
||||||
@@ -136,9 +139,9 @@ enable-ga="false"
|
|||||||
Learn how to configure a non-root public URL by running `npm run build`.
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
-->
|
-->
|
||||||
<title>Rome Online</title>
|
<title>Rome Online</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
id="etuajo-oikeus"
|
id="etuajo-oikeus"
|
||||||
width="450"
|
width="450"
|
||||||
height="450">
|
height="450">
|
||||||
<path d="M 0,225 L 225,0 L 450,225 L 225,450" fill="#000000" />
|
<path d="M 0,225 L 225,0 L 450,225 L 225,450" fill="#000000"/>
|
||||||
<path d="M 225,431.25 L 18.75,225 L 225,18.75 L 431.25,225" fill="#ffffff" />
|
<path d="M 225,431.25 L 18.75,225 L 225,18.75 L 431.25,225" fill="#ffffff"/>
|
||||||
<path d="M 56.25,225 L 225,56.25 L 393.75,225 L 225,393.75" fill="#000000" />
|
<path d="M 56.25,225 L 225,56.25 L 393.75,225 L 225,393.75" fill="#000000"/>
|
||||||
<path d="M 225,386.25 L 63.75,225 L 225,63.75 L 386.25,225" fill="#ffd90f" />
|
<path d="M 225,386.25 L 63.75,225 L 225,63.75 L 386.25,225" fill="#ffd90f"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 572 B |
@@ -56,7 +56,7 @@ export function App({bodyshop, checkUserSession, currentUser, online, setOnline,
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkUserSession();
|
checkUserSession();
|
||||||
}, [checkUserSession, setOnline]);
|
}, [checkUserSession, setOnline]);
|
||||||
|
|
||||||
//const b = Grid.useBreakpoint();
|
//const b = Grid.useBreakpoint();
|
||||||
// console.log("Breakpoints:", b);
|
// console.log("Breakpoints:", b);
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
animation: alertBlinker 1s linear infinite;
|
animation: alertBlinker 1s linear infinite;
|
||||||
color: blue;
|
color: blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes alertBlinker {
|
@keyframes alertBlinker {
|
||||||
50% {
|
50% {
|
||||||
color: red;
|
color: red;
|
||||||
@@ -99,6 +100,7 @@
|
|||||||
color: rgba(255, 140, 0, 0.8);
|
color: rgba(255, 140, 0, 0.8);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-completion-past {
|
.production-completion-past {
|
||||||
color: rgba(255, 0, 0, 0.8);
|
color: rgba(255, 0, 0, 0.8);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 52 KiB |
@@ -1,7 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 -256 1792 1792">
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
|
||||||
<g transform="matrix(1,0,0,-1,197.42373,1300.6102)">
|
viewBox="0 -256 1792 1792">
|
||||||
<path d="M 1408,131 Q 1408,11 1335,-58.5 1262,-128 1141,-128 H 267 Q 146,-128 73,-58.5 0,11 0,131 0,184 3.5,234.5 7,285 17.5,343.5 28,402 44,452 q 16,50 43,97.5 27,47.5 62,81 35,33.5 85.5,53.5 50.5,20 111.5,20 9,0 42,-21.5 33,-21.5 74.5,-48 41.5,-26.5 108,-48 Q 637,565 704,565 q 67,0 133.5,21.5 66.5,21.5 108,48 41.5,26.5 74.5,48 33,21.5 42,21.5 61,0 111.5,-20 50.5,-20 85.5,-53.5 35,-33.5 62,-81 27,-47.5 43,-97.5 16,-50 26.5,-108.5 10.5,-58.5 14,-109 Q 1408,184 1408,131 z m -320,893 Q 1088,865 975.5,752.5 863,640 704,640 545,640 432.5,752.5 320,865 320,1024 320,1183 432.5,1295.5 545,1408 704,1408 863,1408 975.5,1295.5 1088,1183 1088,1024 z"/>
|
<g transform="matrix(1,0,0,-1,197.42373,1300.6102)">
|
||||||
</g>
|
<path d="M 1408,131 Q 1408,11 1335,-58.5 1262,-128 1141,-128 H 267 Q 146,-128 73,-58.5 0,11 0,131 0,184 3.5,234.5 7,285 17.5,343.5 28,402 44,452 q 16,50 43,97.5 27,47.5 62,81 35,33.5 85.5,53.5 50.5,20 111.5,20 9,0 42,-21.5 33,-21.5 74.5,-48 41.5,-26.5 108,-48 Q 637,565 704,565 q 67,0 133.5,21.5 66.5,21.5 108,48 41.5,26.5 74.5,48 33,21.5 42,21.5 61,0 111.5,-20 50.5,-20 85.5,-53.5 35,-33.5 62,-81 27,-47.5 43,-97.5 16,-50 26.5,-108.5 10.5,-58.5 14,-109 Q 1408,184 1408,131 z m -320,893 Q 1088,865 975.5,752.5 863,640 704,640 545,640 432.5,752.5 320,865 320,1024 320,1183 432.5,1295.5 545,1408 704,1408 863,1408 975.5,1295.5 1088,1183 1088,1024 z"/>
|
||||||
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 981 B After Width: | Height: | Size: 955 B |
@@ -1 +1,3 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.5 7c.276 0 .5.224.5.5v.511c0 .793-.926.989-1.616.989l-1.086-2h2.202zm-1.441 3.506c.639 1.186.946 2.252.946 3.666 0 1.37-.397 2.533-1.005 3.981v1.847c0 .552-.448 1-1 1h-1.5c-.552 0-1-.448-1-1v-1h-13v1c0 .552-.448 1-1 1h-1.5c-.552 0-1-.448-1-1v-1.847c-.608-1.448-1.005-2.611-1.005-3.981 0-1.414.307-2.48.946-3.666.829-1.537 1.851-3.453 2.93-5.252.828-1.382 1.262-1.707 2.278-1.889 1.532-.275 2.918-.365 4.851-.365s3.319.09 4.851.365c1.016.182 1.45.507 2.278 1.889 1.079 1.799 2.101 3.715 2.93 5.252zm-16.059 2.994c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5zm10 1c0-.276-.224-.5-.5-.5h-7c-.276 0-.5.224-.5.5s.224.5.5.5h7c.276 0 .5-.224.5-.5zm2.941-5.527s-.74-1.826-1.631-3.142c-.202-.298-.515-.502-.869-.566-1.511-.272-2.835-.359-4.441-.359s-2.93.087-4.441.359c-.354.063-.667.267-.869.566-.891 1.315-1.631 3.142-1.631 3.142 1.64.313 4.309.497 6.941.497s5.301-.184 6.941-.497zm2.059 4.527c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5zm-18.298-6.5h-2.202c-.276 0-.5.224-.5.5v.511c0 .793.926.989 1.616.989l1.086-2z"/></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
||||||
|
<path d="M23.5 7c.276 0 .5.224.5.5v.511c0 .793-.926.989-1.616.989l-1.086-2h2.202zm-1.441 3.506c.639 1.186.946 2.252.946 3.666 0 1.37-.397 2.533-1.005 3.981v1.847c0 .552-.448 1-1 1h-1.5c-.552 0-1-.448-1-1v-1h-13v1c0 .552-.448 1-1 1h-1.5c-.552 0-1-.448-1-1v-1.847c-.608-1.448-1.005-2.611-1.005-3.981 0-1.414.307-2.48.946-3.666.829-1.537 1.851-3.453 2.93-5.252.828-1.382 1.262-1.707 2.278-1.889 1.532-.275 2.918-.365 4.851-.365s3.319.09 4.851.365c1.016.182 1.45.507 2.278 1.889 1.079 1.799 2.101 3.715 2.93 5.252zm-16.059 2.994c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5zm10 1c0-.276-.224-.5-.5-.5h-7c-.276 0-.5.224-.5.5s.224.5.5.5h7c.276 0 .5-.224.5-.5zm2.941-5.527s-.74-1.826-1.631-3.142c-.202-.298-.515-.502-.869-.566-1.511-.272-2.835-.359-4.441-.359s-2.93.087-4.441.359c-.354.063-.667.267-.869.566-.891 1.315-1.631 3.142-1.631 3.142 1.64.313 4.309.497 6.941.497s5.301-.184 6.941-.497zm2.059 4.527c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5zm-18.298-6.5h-2.202c-.276 0-.5.224-.5.5v.511c0 .793.926.989 1.616.989l1.086-2z"/>
|
||||||
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1,5 +1,21 @@
|
|||||||
<?xml version="1.0" ?><svg style="enable-background:new 0 0 128 128;" version="1.1" viewBox="0 0 128 128" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css">
|
<?xml version="1.0" ?>
|
||||||
|
<svg style="enable-background:new 0 0 128 128;" version="1.1" viewBox="0 0 128 128" xml:space="preserve"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"><style type="text/css">
|
||||||
.st0{fill:none;stroke:#000000;stroke-width:8;stroke-miterlimit:10;}
|
.st0{fill:none;stroke:#000000;stroke-width:8;stroke-miterlimit:10;}
|
||||||
.st1{display:none;}
|
.st1{display:none;}
|
||||||
.st2{display:inline;opacity:0.25;fill:#F45EFD;}
|
.st2{display:inline;opacity:0.25;fill:#F45EFD;}
|
||||||
</style><g id="_x31_2_3D_Printing"/><g id="_x31_1_VR_Gear"/><g id="_x31_0_Virtual_reality"/><g id="_x39__Augmented_reality"/><g id="_x38__Teleport"/><g id="_x37__Glassess"/><g id="_x36__Folding_phone"/><g id="_x35__Drone"/><g id="_x34__Retina_scan"/><g id="_x33__Smartwatch"/><g id="_x32__Bionic_Arm"/><g id="_x31__Chip"><g><path d="M108,40c-5.2,0-9.6,3.3-11.3,8H84V32h-8V20h-8v12h-8V20h-8v12h-8v16H24v-8.7c4.7-1.7,8-6.1,8-11.3c0-6.6-5.4-12-12-12 S8,21.4,8,28c0,5.2,3.3,9.6,8,11.3V56h28v8H16v16.7c-4.7,1.7-8,6.1-8,11.3c0,6.6,5.4,12,12,12s12-5.4,12-12c0-5.2-3.3-9.6-8-11.3 V72h20v16h8v12h8V88h8v12h8V88h8V72h8v16.7c-4.7,1.7-8,6.1-8,11.3c0,6.6,5.4,12,12,12s12-5.4,12-12c0-5.2-3.3-9.6-8-11.3V64H84v-8 h12.7c1.7,4.7,6.1,8,11.3,8c6.6,0,12-5.4,12-12S114.6,40,108,40z M20,32c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S22.2,32,20,32z M20,96c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S22.2,96,20,96z M76,80H52V40h24V80z M96,96c2.2,0,4,1.8,4,4s-1.8,4-4,4s-4-1.8-4-4 S93.8,96,96,96z M108,56c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S110.2,56,108,56z"/><rect height="8" width="8" x="56" y="64"/></g></g><g class="st1" id="Guide"><path class="st2" d="M120,8v112H8V8H120 M128,0H0v128h128V0L128,0z"/></g></svg>
|
</style>
|
||||||
|
<g id="_x31_2_3D_Printing"/>
|
||||||
|
<g id="_x31_1_VR_Gear"/>
|
||||||
|
<g id="_x31_0_Virtual_reality"/>
|
||||||
|
<g id="_x39__Augmented_reality"/>
|
||||||
|
<g id="_x38__Teleport"/>
|
||||||
|
<g id="_x37__Glassess"/>
|
||||||
|
<g id="_x36__Folding_phone"/>
|
||||||
|
<g id="_x35__Drone"/>
|
||||||
|
<g id="_x34__Retina_scan"/>
|
||||||
|
<g id="_x33__Smartwatch"/>
|
||||||
|
<g id="_x32__Bionic_Arm"/>
|
||||||
|
<g id="_x31__Chip"><g><path d="M108,40c-5.2,0-9.6,3.3-11.3,8H84V32h-8V20h-8v12h-8V20h-8v12h-8v16H24v-8.7c4.7-1.7,8-6.1,8-11.3c0-6.6-5.4-12-12-12 S8,21.4,8,28c0,5.2,3.3,9.6,8,11.3V56h28v8H16v16.7c-4.7,1.7-8,6.1-8,11.3c0,6.6,5.4,12,12,12s12-5.4,12-12c0-5.2-3.3-9.6-8-11.3 V72h20v16h8v12h8V88h8v12h8V88h8V72h8v16.7c-4.7,1.7-8,6.1-8,11.3c0,6.6,5.4,12,12,12s12-5.4,12-12c0-5.2-3.3-9.6-8-11.3V64H84v-8 h12.7c1.7,4.7,6.1,8,11.3,8c6.6,0,12-5.4,12-12S114.6,40,108,40z M20,32c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S22.2,32,20,32z M20,96c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S22.2,96,20,96z M76,80H52V40h24V80z M96,96c2.2,0,4,1.8,4,4s-1.8,4-4,4s-4-1.8-4-4 S93.8,96,96,96z M108,56c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S110.2,56,108,56z"/><rect
|
||||||
|
height="8" width="8" x="56" y="64"/></g></g>
|
||||||
|
<g class="st1" id="Guide"><path class="st2" d="M120,8v112H8V8H120 M128,0H0v128h128V0L128,0z"/></g></svg>
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 30 KiB |
@@ -1,144 +1,216 @@
|
|||||||
<svg id="svg166" version="1.1" viewBox="0 0 1668 1160" xmlns="http://www.w3.org/2000/svg">
|
<svg id="svg166" version="1.1" viewBox="0 0 1668 1160" xmlns="http://www.w3.org/2000/svg">
|
||||||
<g id="g158" transform="translate(254 -254)">
|
<g id="g158" transform="translate(254 -254)">
|
||||||
<g id="g34" transform="translate(-13.78 3.524)" stroke="#000">
|
<g id="g34" transform="translate(-13.78 3.524)" stroke="#000">
|
||||||
<path id="path10" d="m494.57 1006.9c41.429-15.714 140-11.427 191.43-12.857 51.429-1.429 160.48 10.23 201.43 27.143 40.995 16.93 134.78 67.656 151.43 72.857 22.857 7.143 41.429 7.143 80 20 38.572 12.857 25.714 32.857 25.714 32.857l-30-4.286-5.756 52.92s37.185 1.366 41.47 15.652c4.286 14.286 5.715 31.428-2.856 41.428-8.572 10-14.286-1.428-18.572 12.858-4.286 14.285-2.857 28.571-27.143 27.142-24.285-1.428-98.571 0-98.571 0s-15.714-108.57-98.573-105.71c-82.857 2.857-95.714 105.71-95.714 105.71h-500s-5.714-104.28-97.143-105.71c-91.428-1.428-98.571 105.71-98.571 105.71h-65.713l-18.572-38.571c-0.515 0-26.243 0-21.428-17.143 4.651-16.561-4.286-41.428 17.142-41.428 21.429 0 47.143 1.428 47.143 1.428l15.715-44.286-41.429-2.857s34.286-24.285 118.57-32.857c84.286-8.571 157.14-8.571 192.86-31.428 35.714-22.858 137.14-78.572 137.14-78.572z" fill="none" stroke-width="5"/>
|
<path id="path10"
|
||||||
<path id="path12" d="m28.857 1254h92.857m180 0h517.14m172.86 0h151.43" fill="none" stroke-width="2"/>
|
d="m494.57 1006.9c41.429-15.714 140-11.427 191.43-12.857 51.429-1.429 160.48 10.23 201.43 27.143 40.995 16.93 134.78 67.656 151.43 72.857 22.857 7.143 41.429 7.143 80 20 38.572 12.857 25.714 32.857 25.714 32.857l-30-4.286-5.756 52.92s37.185 1.366 41.47 15.652c4.286 14.286 5.715 31.428-2.856 41.428-8.572 10-14.286-1.428-18.572 12.858-4.286 14.285-2.857 28.571-27.143 27.142-24.285-1.428-98.571 0-98.571 0s-15.714-108.57-98.573-105.71c-82.857 2.857-95.714 105.71-95.714 105.71h-500s-5.714-104.28-97.143-105.71c-91.428-1.428-98.571 105.71-98.571 105.71h-65.713l-18.572-38.571c-0.515 0-26.243 0-21.428-17.143 4.651-16.561-4.286-41.428 17.142-41.428 21.429 0 47.143 1.428 47.143 1.428l15.715-44.286-41.429-2.857s34.286-24.285 118.57-32.857c84.286-8.571 157.14-8.571 192.86-31.428 35.714-22.858 137.14-78.572 137.14-78.572z"
|
||||||
<path id="path14" d="m364.57 1101.1c15.715-18.572 123.37-81.525 151.43-88.572 29.502-7.41 103-7.142 103-7.142l-7.143 95.714z" fill="#f0ffeb" stroke-width="5"/>
|
fill="none" stroke-width="5"/>
|
||||||
<path id="path16" d="m404.57 1071.1v28.571" fill="none" stroke-width="2"/>
|
<path id="path12" d="m28.857 1254h92.857m180 0h517.14m172.86 0h151.43" fill="none" stroke-width="2"/>
|
||||||
<path id="path18" d="m644.7 1006.8-4.285 94.328h207.16c-11.307-20.753-46.612-74.906-72.857-88.572-14.285-10-82.878-4.327-130.02-5.756zm167.02 7.164s80 84.286 85.715 87.143c5.714 2.857 115.71 1.428 115.71 1.428s-77.143-47.141-102.86-58.571c-25.715-11.429-90-31.429-98.572-30z" fill="#f0ffeb" stroke-width="5"/>
|
<path id="path14"
|
||||||
<g fill="none">
|
d="m364.57 1101.1c15.715-18.572 123.37-81.525 151.43-88.572 29.502-7.41 103-7.142 103-7.142l-7.143 95.714z"
|
||||||
<path id="path20" d="m345.64 1091.7c-14.075 30.968-18.298 71.788-18.298 94.31 0 22.521 4.223 91.493 22.521 105.57m282.93-298.41c-1.408 5.63-4.047 81.903-6.51 106.93-3.67 18.715-4.989 51.219-6.159 87.315 0 22.522 7.038 80.233 12.669 105.57" stroke-width="5"/>
|
fill="#f0ffeb" stroke-width="5"/>
|
||||||
<path id="path22" d="m103.53 1252.1s15.483-85.864 106.98-85.864c91.494 0 109.79 87.271 109.79 87.271m479.99 0s15.483-85.863 106.98-85.863c91.493 0 109.79 87.27 109.79 87.27m-947.31-57.711h63.342" stroke-width="2"/>
|
<path id="path16" d="m404.57 1071.1v28.571" fill="none" stroke-width="2"/>
|
||||||
<path id="path24" d="m779.18 1000.2c18.299 12.668 56.304 50.673 92.9 104.16 36.598 53.489 8.447 59.12-18.298 74.603-26.744 15.483-49.266 42.227-67.564 112.61" stroke-width="5"/>
|
<path id="path18"
|
||||||
<path id="path26" d="m1112.8 1196h-129.5m-696.76-0.222h544.74m-22.522-150.61v54.896" stroke-width="2"/>
|
d="m644.7 1006.8-4.285 94.328h207.16c-11.307-20.753-46.612-74.906-72.857-88.572-14.285-10-82.878-4.327-130.02-5.756zm167.02 7.164s80 84.286 85.715 87.143c5.714 2.857 115.71 1.428 115.71 1.428s-77.143-47.141-102.86-58.571c-25.715-11.429-90-31.429-98.572-30z"
|
||||||
</g>
|
fill="#f0ffeb" stroke-width="5"/>
|
||||||
<g stroke-width="2">
|
<g fill="none">
|
||||||
<rect id="rect28" x="558.65" y="1144.9" width="41.286" height="14.541" rx="2.933" ry="7.379" fill="#e6e6e6"/>
|
<path id="path20"
|
||||||
<rect id="rect30" x="816.24" y="1144.9" width="41.286" height="14.541" rx="2.933" ry="7.379" fill="#e6e6e6"/>
|
d="m345.64 1091.7c-14.075 30.968-18.298 71.788-18.298 94.31 0 22.521 4.223 91.493 22.521 105.57m282.93-298.41c-1.408 5.63-4.047 81.903-6.51 106.93-3.67 18.715-4.989 51.219-6.159 87.315 0 22.522 7.038 80.233 12.669 105.57"
|
||||||
<rect id="rect32" x="259.53" y="1146.3" width="18.776" height="11.738" rx="1.63" ry="7.692" fill="#ffcb00"/>
|
stroke-width="5"/>
|
||||||
</g>
|
<path id="path22"
|
||||||
</g>
|
d="m103.53 1252.1s15.483-85.864 106.98-85.864c91.494 0 109.79 87.271 109.79 87.271m479.99 0s15.483-85.863 106.98-85.863c91.493 0 109.79 87.27 109.79 87.27m-947.31-57.711h63.342"
|
||||||
<g id="g54" transform="translate(-13.78 15.524)" stroke="#000">
|
stroke-width="2"/>
|
||||||
<path id="path36" d="m62.767 812.59-11.712 16.12-18.95-6.157v-19.925l18.95-6.158z" fill="none" stroke-width="5"/>
|
<path id="path24"
|
||||||
<path id="path38" d="m31.742 745.02 315.3-111.2m-316.71 254.77 315.3 115.42" fill="none" stroke-width="2"/>
|
d="m779.18 1000.2c18.299 12.668 56.304 50.673 92.9 104.16 36.598 53.489 8.447 59.12-18.298 74.603-26.744 15.483-49.266 42.227-67.564 112.61"
|
||||||
<path id="path40" d="m341.41 632.78 140.76 38.005s-8.446 49.222-8.446 71.963v147.62c0 30.967 8.445 78.825 8.445 78.825l-140.76 33.782s-17.242-61.902-17.242-92.901l2.111-185.8c-1.408-30.967 15.132-91.493 15.132-91.493z" fill="#f0ffeb" stroke-width="5"/>
|
stroke-width="5"/>
|
||||||
<g fill="none">
|
<path id="path26" d="m1112.8 1196h-129.5m-696.76-0.222h544.74m-22.522-150.61v54.896" stroke-width="2"/>
|
||||||
<path id="path42" d="m482.17 670.79s94.309 5.63 152.02 5.63c106.98 0 201.29-5.63 201.29-5.63m-1.408 297s-77.418-5.63-199.88-5.63c-68.972 0-152.02 7.038-152.02 7.038" stroke-width="5"/>
|
</g>
|
||||||
<rect id="rect44" x="528.62" y="729.2" width="106.98" height="181.58" rx="31.19" ry="34.436" stroke-width="2"/>
|
<g stroke-width="2">
|
||||||
<path id="path46" d="m345.78 632.78h-294.19l-14.076 102.75-7.038 11.26v142.17l7.038 14.076 15.483 101.35h288.56m491.11-333.6s-12.668 47.858-12.668 73.195v146.39c0 25.336 12.668 77.417 12.668 77.417l205.51 38.005h108.38s14.076-81.64 14.076-115.42v-147.8c0-38.005-14.076-109.79-14.076-109.79h-108.38z" stroke-width="5"/>
|
<rect id="rect28" x="558.65" y="1144.9" width="41.286" height="14.541" rx="2.933" ry="7.379"
|
||||||
</g>
|
fill="#e6e6e6"/>
|
||||||
<path id="path48" d="m843.92 689.09s-8.445 40.82-8.445 56.303v144.98c0 19.706 7.038 57.711 7.038 57.711s94.308 26.744 123.87 26.744h42.228v-312.49h-47.859c-25.336 0-116.83 26.745-116.83 26.745z" fill="#f0ffeb" stroke-width="5"/>
|
<rect id="rect30" x="816.24" y="1144.9" width="41.286" height="14.541" rx="2.933" ry="7.379"
|
||||||
<path id="path50" d="m1038.2 632.78s30.967 40.82 30.967 111.2v146.39c0 64.749-30.967 116.83-30.967 116.83m-713.65-263.22 32.374-32.375v-40.82 112.61m-33.078 81.641 32.374-32.375v-40.82 112.61m648.9-116.83-32.375-32.374v-40.82 112.61" fill="none" stroke-width="2"/>
|
fill="#e6e6e6"/>
|
||||||
<path id="path52" d="m341.41 632.78s-42.228 78.825-42.228 111.2v146.39c0 40.82 42.228 114.02 42.228 114.02" fill="none" stroke-width="2"/>
|
<rect id="rect32" x="259.53" y="1146.3" width="18.776" height="11.738" rx="1.63" ry="7.692"
|
||||||
</g>
|
fill="#ffcb00"/>
|
||||||
<g fill="none" stroke="#000">
|
</g>
|
||||||
<path id="path56" d="m-106.79 740.92 1.407-91.493s5.63-23.93-25.337-25.337c-30.967-1.408-26.744 2.815-26.744 2.815l1.408 415.24h28.152c28.152 0 22.521-22.52 22.521-22.52v-95.717c-12.677 0-11.26-9.614-11.26-16.891v-149.2c0.45-18.89 9.853-16.892 9.853-16.892z" stroke-width="5"/>
|
</g>
|
||||||
<path id="path58" d="m-155.99 646.16h49.265m-48.415 374.27h49.266m-50.82-315.37h49.266m-46.451 259.81h49.266" stroke-width="2.2"/>
|
<g id="g54" transform="translate(-13.78 15.524)" stroke="#000">
|
||||||
<path id="path60" d="m-147.1 703.82v260.4m9.853-258.84v260.4" stroke-width="2"/>
|
<path id="path36" d="m62.767 812.59-11.712 16.12-18.95-6.157v-19.925l18.95-6.158z" fill="none"
|
||||||
</g>
|
stroke-width="5"/>
|
||||||
<g id="g88" transform="translate(-13.78 15.524)" stroke="#000">
|
<path id="path38" d="m31.742 745.02 315.3-111.2m-316.71 254.77 315.3 115.42" fill="none" stroke-width="2"/>
|
||||||
<path id="path62" d="m494.57 641.61c41.429 15.714 140 11.428 191.43 12.856s160.48-10.23 201.43-27.143c40.995-16.93 134.78-67.656 151.43-72.857 22.857-7.143 41.429-7.143 80-20 38.572-12.857 25.714-32.857 25.714-32.857l-30 4.285-5.756-52.92s37.185-1.365 41.47-15.651c4.286-14.286 5.715-31.429-2.856-41.429-8.572-10-14.286 1.429-18.572-12.857-4.286-14.285-2.857-28.571-27.143-27.143-24.285 1.429-98.571 0-98.571 0s-15.714 108.57-98.572 105.72c-82.857-2.857-95.714-105.72-95.714-105.72h-500s-5.714 104.29-97.143 105.72c-91.428 1.428-98.571-105.72-98.571-105.72h-65.714l-18.572 38.572c-0.515 0-26.243 0-21.428 17.143 4.651 16.561-4.286 41.428 17.142 41.428 21.429 0 47.143-1.428 47.143-1.428l15.715 44.285-41.429 2.859s34.286 24.285 118.57 32.857c84.286 8.571 157.14 8.571 192.86 31.428 35.714 22.857 137.14 78.572 137.14 78.572z" fill="none" stroke-width="5"/>
|
<path id="path40"
|
||||||
<path id="path64" d="m28.857 394.47h92.857m180 0h517.14m172.86 0h151.43" fill="none" stroke-width="2"/>
|
d="m341.41 632.78 140.76 38.005s-8.446 49.222-8.446 71.963v147.62c0 30.967 8.445 78.825 8.445 78.825l-140.76 33.782s-17.242-61.902-17.242-92.901l2.111-185.8c-1.408-30.967 15.132-91.493 15.132-91.493z"
|
||||||
<path id="path66" d="m364.57 547.33c15.715 18.571 123.37 81.524 151.43 88.571 29.502 7.41 103 7.143 103 7.143l-7.143-95.714z" fill="#f0ffeb" stroke-width="5"/>
|
fill="#f0ffeb" stroke-width="5"/>
|
||||||
<path id="path68" d="m404.57 577.33v-28.571" fill="none" stroke-width="2"/>
|
<g fill="none">
|
||||||
<path id="path70" d="m644.7 641.64-4.285-94.328h207.16c-11.307 20.753-46.612 74.906-72.857 88.571-14.285 10-82.878 4.328-130.02 5.757zm167.02-7.165s80-84.285 85.715-87.142c5.714-2.857 115.71-1.429 115.71-1.429s-77.143 47.143-102.86 58.572c-25.715 11.428-90 31.428-98.572 30z" fill="#f0ffeb" stroke-width="5"/>
|
<path id="path42"
|
||||||
<g fill="none">
|
d="m482.17 670.79s94.309 5.63 152.02 5.63c106.98 0 201.29-5.63 201.29-5.63m-1.408 297s-77.418-5.63-199.88-5.63c-68.972 0-152.02 7.038-152.02 7.038"
|
||||||
<path id="path72" d="m345.64 556.81c-14.075-30.967-18.298-71.787-18.298-94.309 0-22.521 4.223-91.493 22.521-105.57m282.93 298.41c-1.408-5.63-4.047-81.905-6.51-106.93-3.67-18.714-4.989-51.218-6.159-87.314 0-22.522 7.038-80.233 12.669-105.57" stroke-width="5"/>
|
stroke-width="5"/>
|
||||||
<path id="path74" d="m103.53 396.34s15.483 85.864 106.98 85.864c91.494 0 109.79-87.271 109.79-87.271m479.99 0s15.483 85.863 106.98 85.863c91.493 0 109.79-87.27 109.79-87.27m-947.31 57.71h63.342" stroke-width="2"/>
|
<rect id="rect44" x="528.62" y="729.2" width="106.98" height="181.58" rx="31.19" ry="34.436"
|
||||||
<path id="path76" d="m779.18 648.3c18.299-12.669 56.304-50.674 92.9-104.16 36.598-53.489 8.447-59.12-18.298-74.603-26.744-15.483-49.266-42.228-67.564-112.61" stroke-width="5"/>
|
stroke-width="2"/>
|
||||||
<path id="path78" d="m1112.8 452.42h-129.5m-696.76 0.223h544.74m-22.522 150.61v-54.895" stroke-width="2"/>
|
<path id="path46"
|
||||||
</g>
|
d="m345.78 632.78h-294.19l-14.076 102.75-7.038 11.26v142.17l7.038 14.076 15.483 101.35h288.56m491.11-333.6s-12.668 47.858-12.668 73.195v146.39c0 25.336 12.668 77.417 12.668 77.417l205.51 38.005h108.38s14.076-81.64 14.076-115.42v-147.8c0-38.005-14.076-109.79-14.076-109.79h-108.38z"
|
||||||
<g stroke-width="2">
|
stroke-width="5"/>
|
||||||
<rect id="rect80" transform="scale(1 -1)" x="558.65" y="-503.55" width="41.286" height="14.541" rx="2.933" ry="7.379" fill="#e6e6e6"/>
|
</g>
|
||||||
<rect id="rect82" transform="scale(1 -1)" x="816.24" y="-503.55" width="41.286" height="14.541" rx="2.933" ry="7.379" fill="#e6e6e6"/>
|
<path id="path48"
|
||||||
<rect id="rect84" transform="scale(1 -1)" x="259.53" y="-502.15" width="18.776" height="11.738" rx="1.63" ry="7.692" fill="#ffcb00"/>
|
d="m843.92 689.09s-8.445 40.82-8.445 56.303v144.98c0 19.706 7.038 57.711 7.038 57.711s94.308 26.744 123.87 26.744h42.228v-312.49h-47.859c-25.336 0-116.83 26.745-116.83 26.745z"
|
||||||
<circle id="circle86" transform="translate(941.34 284)" cx="59.119" cy="211.28" r="16.891" fill="#fff"/>
|
fill="#f0ffeb" stroke-width="5"/>
|
||||||
</g>
|
<path id="path50"
|
||||||
</g>
|
d="m1038.2 632.78s30.967 40.82 30.967 111.2v146.39c0 64.749-30.967 116.83-30.967 116.83m-713.65-263.22 32.374-32.375v-40.82 112.61m-33.078 81.641 32.374-32.375v-40.82 112.61m648.9-116.83-32.375-32.374v-40.82 112.61"
|
||||||
<path id="path90" d="m-126.58 704.93v260.4" fill="none" stroke="#000" stroke-width="2"/>
|
fill="none" stroke-width="2"/>
|
||||||
<path id="path92" d="m-153.88 992.49v-26.041h45.043v52.08h-45.043zm0-316.71v-27.448h45.043v54.898h-45.043z" fill="#ffffc0"/>
|
<path id="path52" d="m341.41 632.78s-42.228 78.825-42.228 111.2v146.39c0 40.82 42.228 114.02 42.228 114.02"
|
||||||
<g fill="none" stroke="#000">
|
fill="none" stroke-width="2"/>
|
||||||
<path id="path94" d="m-157.4 624.38s-4.223-12.669-18.299-12.669-14.076 8.446-14.076 8.446v423.69s1.408 9.853 14.076 9.853c12.669 0 18.3-9.853 18.3-9.853" stroke-width="5"/>
|
</g>
|
||||||
<path id="path96" d="m-191.18 624.38s-35.19-1.408-35.19 21.114v371.6c0 22.521 36.597 25.336 36.597 25.336" stroke-width="5"/>
|
<g fill="none" stroke="#000">
|
||||||
<g stroke-width="2">
|
<path id="path56"
|
||||||
<rect id="rect98" x="-216.51" y="648.31" width="16.891" height="35.19" rx="7.742" ry="6.284"/>
|
d="m-106.79 740.92 1.407-91.493s5.63-23.93-25.337-25.337c-30.967-1.408-26.744 2.815-26.744 2.815l1.408 415.24h28.152c28.152 0 22.521-22.52 22.521-22.52v-95.717c-12.677 0-11.26-9.614-11.26-16.891v-149.2c0.45-18.89 9.853-16.892 9.853-16.892z"
|
||||||
<rect id="rect100" x="-216.51" y="985.58" width="16.891" height="35.19" rx="7.742" ry="6.284"/>
|
stroke-width="5"/>
|
||||||
<path id="path102" d="m-62.939 645.49h30.967v377.24h-30.967z"/>
|
<path id="path58"
|
||||||
</g>
|
d="m-155.99 646.16h49.265m-48.415 374.27h49.266m-50.82-315.37h49.266m-46.451 259.81h49.266"
|
||||||
<path id="path104" d="m1200.9 633.86v73.195h67.565v-83.048l-25.337-14.076zm0 329.38h67.565v78.826l-23.93 14.076-43.635-18.3zm0-270.26v284.33m67.565-283.74v284.33" stroke-width="5"/>
|
stroke-width="2.2"/>
|
||||||
<path id="path106" d="m1216.6 759.51h14.076v147.8h-14.076zm7.631-1.408v-53.488m0 257.37v-53.49m30.375-201.06v256.18" stroke-width="2"/>
|
<path id="path60" d="m-147.1 703.82v260.4m9.853-258.84v260.4" stroke-width="2"/>
|
||||||
<path id="path108" d="m1268.8 624.97s4.223-12.668 18.299-12.668 14.076 8.445 14.076 8.445v423.69s-1.408 9.853-14.076 9.853c-12.669 0-18.299-9.853-18.299-9.853m33.783-419.46s35.19-1.408 35.19 21.114v371.6c0 22.521-36.598 25.337-36.598 25.337" stroke-width="5"/>
|
</g>
|
||||||
<g stroke-width="2">
|
<g id="g88" transform="translate(-13.78 15.524)" stroke="#000">
|
||||||
<rect id="rect110" transform="scale(-1 1)" x="-1329.9" y="648.9" width="16.891" height="35.19" rx="7.742" ry="6.284"/>
|
<path id="path62"
|
||||||
<rect id="rect112" transform="scale(-1 1)" x="-1329.9" y="986.17" width="16.891" height="35.19" rx="7.742" ry="6.284"/>
|
d="m494.57 641.61c41.429 15.714 140 11.428 191.43 12.856s160.48-10.23 201.43-27.143c40.995-16.93 134.78-67.656 151.43-72.857 22.857-7.143 41.429-7.143 80-20 38.572-12.857 25.714-32.857 25.714-32.857l-30 4.285-5.756-52.92s37.185-1.365 41.47-15.651c4.286-14.286 5.715-31.429-2.856-41.429-8.572-10-14.286 1.429-18.572-12.857-4.286-14.285-2.857-28.571-27.143-27.143-24.285 1.429-98.571 0-98.571 0s-15.714 108.57-98.572 105.72c-82.857-2.857-95.714-105.72-95.714-105.72h-500s-5.714 104.29-97.143 105.72c-91.428 1.428-98.571-105.72-98.571-105.72h-65.714l-18.572 38.572c-0.515 0-26.243 0-21.428 17.143 4.651 16.561-4.286 41.428 17.142 41.428 21.429 0 47.143-1.428 47.143-1.428l15.715 44.285-41.429 2.859s34.286 24.285 118.57 32.857c84.286 8.571 157.14 8.571 192.86 31.428 35.714 22.857 137.14 78.572 137.14 78.572z"
|
||||||
<path id="path114" d="m1199.7 632.82 67.565 74.603m-67.565 0.592 67.565-73.195m-67.342 328.16 67.565 74.602m-67.565 0.593 67.565-73.195"/>
|
fill="none" stroke-width="5"/>
|
||||||
</g>
|
<path id="path64" d="m28.857 394.47h92.857m180 0h517.14m172.86 0h151.43" fill="none" stroke-width="2"/>
|
||||||
</g>
|
<path id="path66"
|
||||||
<g stroke="#000">
|
d="m364.57 547.33c15.715 18.571 123.37 81.524 151.43 88.571 29.502 7.41 103 7.143 103 7.143l-7.143-95.714z"
|
||||||
<g stroke-width="2">
|
fill="#f0ffeb" stroke-width="5"/>
|
||||||
<circle id="circle116" transform="translate(78.489 1074.7)" cx="119.65" cy="202.84" r="76.01" fill="#c8c8c8"/>
|
<path id="path68" d="m404.57 577.33v-28.571" fill="none" stroke-width="2"/>
|
||||||
<circle id="circle118" transform="translate(94.676 1204.9)" cx="103.46" cy="72.633" r="44.339" fill="#fff"/>
|
<path id="path70"
|
||||||
<circle id="circle120" transform="translate(78.489 187.66)" cx="119.65" cy="202.84" r="76.01" fill="#c8c8c8"/>
|
d="m644.7 641.64-4.285-94.328h207.16c-11.307 20.753-46.612 74.906-72.857 88.571-14.285 10-82.878 4.328-130.02 5.757zm167.02-7.165s80-84.285 85.715-87.142c5.714-2.857 115.71-1.429 115.71-1.429s-77.143 47.143-102.86 58.572c-25.715 11.428-90 31.428-98.572 30z"
|
||||||
<circle id="circle122" transform="translate(94.676 317.86)" cx="103.46" cy="72.633" r="44.339" fill="#fff"/>
|
fill="#f0ffeb" stroke-width="5"/>
|
||||||
<circle id="circle124" transform="translate(773.02 187.66)" cx="119.65" cy="202.84" r="76.01" fill="#c8c8c8"/>
|
<g fill="none">
|
||||||
<circle id="circle126" transform="translate(789.21 317.86)" cx="103.46" cy="72.633" r="44.339" fill="#fff"/>
|
<path id="path72"
|
||||||
<circle id="circle128" transform="translate(773.02 1074.7)" cx="119.65" cy="202.84" r="76.01" fill="#c8c8c8"/>
|
d="m345.64 556.81c-14.075-30.967-18.298-71.787-18.298-94.309 0-22.521 4.223-91.493 22.521-105.57m282.93 298.41c-1.408-5.63-4.047-81.905-6.51-106.93-3.67-18.714-4.989-51.218-6.159-87.314 0-22.522 7.038-80.233 12.669-105.57"
|
||||||
<circle id="circle130" transform="translate(789.21 1204.9)" cx="103.46" cy="72.633" r="44.339" fill="#fff"/>
|
stroke-width="5"/>
|
||||||
</g>
|
<path id="path74"
|
||||||
<path id="path132" d="m1338.5 829.07h40.82" fill="none" stroke-width="5"/>
|
d="m103.53 396.34s15.483 85.864 106.98 85.864c91.494 0 109.79-87.271 109.79-87.271m479.99 0s15.483 85.863 106.98 85.863c91.493 0 109.79-87.27 109.79-87.27m-947.31 57.71h63.342"
|
||||||
<circle id="circle134" transform="translate(1441.3 600.31)" cx="-59.119" cy="229.58" r="4.223" fill="#3c3c3c" stroke-width="5"/>
|
stroke-width="2"/>
|
||||||
<g stroke-width="2">
|
<path id="path76"
|
||||||
<path id="path136" d="m778.06 845.37-38.709-38.709" fill="none"/>
|
d="m779.18 648.3c18.299-12.669 56.304-50.674 92.9-104.16 36.598-53.489 8.447-59.12-18.298-74.603-26.744-15.483-49.266-42.228-67.564-112.61"
|
||||||
<g id="g146" transform="translate(-13.78 15.524)" fill="#3c3c3c">
|
stroke-width="5"/>
|
||||||
<circle id="circle138" transform="translate(-79.458 449.8)" cx="-81.641" cy="188.76" r="4.223"/>
|
<path id="path78" d="m1112.8 452.42h-129.5m-696.76 0.223h544.74m-22.522 150.61v-54.895"
|
||||||
<circle id="circle140" transform="translate(-79.458 569.92)" cx="-81.641" cy="188.76" r="4.223"/>
|
stroke-width="2"/>
|
||||||
<circle id="circle142" transform="translate(-79.458 690.03)" cx="-81.641" cy="188.76" r="4.223"/>
|
</g>
|
||||||
<circle id="circle144" transform="translate(-79.458 810.15)" cx="-81.641" cy="188.76" r="4.223"/>
|
<g stroke-width="2">
|
||||||
|
<rect id="rect80" transform="scale(1 -1)" x="558.65" y="-503.55" width="41.286" height="14.541"
|
||||||
|
rx="2.933" ry="7.379" fill="#e6e6e6"/>
|
||||||
|
<rect id="rect82" transform="scale(1 -1)" x="816.24" y="-503.55" width="41.286" height="14.541"
|
||||||
|
rx="2.933" ry="7.379" fill="#e6e6e6"/>
|
||||||
|
<rect id="rect84" transform="scale(1 -1)" x="259.53" y="-502.15" width="18.776" height="11.738"
|
||||||
|
rx="1.63" ry="7.692" fill="#ffcb00"/>
|
||||||
|
<circle id="circle86" transform="translate(941.34 284)" cx="59.119" cy="211.28" r="16.891" fill="#fff"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path id="path90" d="m-126.58 704.93v260.4" fill="none" stroke="#000" stroke-width="2"/>
|
||||||
|
<path id="path92" d="m-153.88 992.49v-26.041h45.043v52.08h-45.043zm0-316.71v-27.448h45.043v54.898h-45.043z"
|
||||||
|
fill="#ffffc0"/>
|
||||||
|
<g fill="none" stroke="#000">
|
||||||
|
<path id="path94"
|
||||||
|
d="m-157.4 624.38s-4.223-12.669-18.299-12.669-14.076 8.446-14.076 8.446v423.69s1.408 9.853 14.076 9.853c12.669 0 18.3-9.853 18.3-9.853"
|
||||||
|
stroke-width="5"/>
|
||||||
|
<path id="path96" d="m-191.18 624.38s-35.19-1.408-35.19 21.114v371.6c0 22.521 36.597 25.336 36.597 25.336"
|
||||||
|
stroke-width="5"/>
|
||||||
|
<g stroke-width="2">
|
||||||
|
<rect id="rect98" x="-216.51" y="648.31" width="16.891" height="35.19" rx="7.742" ry="6.284"/>
|
||||||
|
<rect id="rect100" x="-216.51" y="985.58" width="16.891" height="35.19" rx="7.742" ry="6.284"/>
|
||||||
|
<path id="path102" d="m-62.939 645.49h30.967v377.24h-30.967z"/>
|
||||||
|
</g>
|
||||||
|
<path id="path104"
|
||||||
|
d="m1200.9 633.86v73.195h67.565v-83.048l-25.337-14.076zm0 329.38h67.565v78.826l-23.93 14.076-43.635-18.3zm0-270.26v284.33m67.565-283.74v284.33"
|
||||||
|
stroke-width="5"/>
|
||||||
|
<path id="path106"
|
||||||
|
d="m1216.6 759.51h14.076v147.8h-14.076zm7.631-1.408v-53.488m0 257.37v-53.49m30.375-201.06v256.18"
|
||||||
|
stroke-width="2"/>
|
||||||
|
<path id="path108"
|
||||||
|
d="m1268.8 624.97s4.223-12.668 18.299-12.668 14.076 8.445 14.076 8.445v423.69s-1.408 9.853-14.076 9.853c-12.669 0-18.299-9.853-18.299-9.853m33.783-419.46s35.19-1.408 35.19 21.114v371.6c0 22.521-36.598 25.337-36.598 25.337"
|
||||||
|
stroke-width="5"/>
|
||||||
|
<g stroke-width="2">
|
||||||
|
<rect id="rect110" transform="scale(-1 1)" x="-1329.9" y="648.9" width="16.891" height="35.19"
|
||||||
|
rx="7.742" ry="6.284"/>
|
||||||
|
<rect id="rect112" transform="scale(-1 1)" x="-1329.9" y="986.17" width="16.891" height="35.19"
|
||||||
|
rx="7.742" ry="6.284"/>
|
||||||
|
<path id="path114"
|
||||||
|
d="m1199.7 632.82 67.565 74.603m-67.565 0.592 67.565-73.195m-67.342 328.16 67.565 74.602m-67.565 0.593 67.565-73.195"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g stroke="#000">
|
||||||
|
<g stroke-width="2">
|
||||||
|
<circle id="circle116" transform="translate(78.489 1074.7)" cx="119.65" cy="202.84" r="76.01"
|
||||||
|
fill="#c8c8c8"/>
|
||||||
|
<circle id="circle118" transform="translate(94.676 1204.9)" cx="103.46" cy="72.633" r="44.339"
|
||||||
|
fill="#fff"/>
|
||||||
|
<circle id="circle120" transform="translate(78.489 187.66)" cx="119.65" cy="202.84" r="76.01"
|
||||||
|
fill="#c8c8c8"/>
|
||||||
|
<circle id="circle122" transform="translate(94.676 317.86)" cx="103.46" cy="72.633" r="44.339"
|
||||||
|
fill="#fff"/>
|
||||||
|
<circle id="circle124" transform="translate(773.02 187.66)" cx="119.65" cy="202.84" r="76.01"
|
||||||
|
fill="#c8c8c8"/>
|
||||||
|
<circle id="circle126" transform="translate(789.21 317.86)" cx="103.46" cy="72.633" r="44.339"
|
||||||
|
fill="#fff"/>
|
||||||
|
<circle id="circle128" transform="translate(773.02 1074.7)" cx="119.65" cy="202.84" r="76.01"
|
||||||
|
fill="#c8c8c8"/>
|
||||||
|
<circle id="circle130" transform="translate(789.21 1204.9)" cx="103.46" cy="72.633" r="44.339"
|
||||||
|
fill="#fff"/>
|
||||||
|
</g>
|
||||||
|
<path id="path132" d="m1338.5 829.07h40.82" fill="none" stroke-width="5"/>
|
||||||
|
<circle id="circle134" transform="translate(1441.3 600.31)" cx="-59.119" cy="229.58" r="4.223"
|
||||||
|
fill="#3c3c3c" stroke-width="5"/>
|
||||||
|
<g stroke-width="2">
|
||||||
|
<path id="path136" d="m778.06 845.37-38.709-38.709" fill="none"/>
|
||||||
|
<g id="g146" transform="translate(-13.78 15.524)" fill="#3c3c3c">
|
||||||
|
<circle id="circle138" transform="translate(-79.458 449.8)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||||
|
<circle id="circle140" transform="translate(-79.458 569.92)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||||
|
<circle id="circle142" transform="translate(-79.458 690.03)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||||
|
<circle id="circle144" transform="translate(-79.458 810.15)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||||
|
</g>
|
||||||
|
<g id="g156" transform="translate(-13.78 17.524)" fill="#3c3c3c">
|
||||||
|
<circle id="circle148" transform="translate(1381.6 448.25)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||||
|
<circle id="circle150" transform="translate(1381.6 568.36)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||||
|
<circle id="circle152" transform="translate(1381.6 688.48)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||||
|
<circle id="circle154" transform="translate(1381.6 808.59)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
</g>
|
</g>
|
||||||
<g id="g156" transform="translate(-13.78 17.524)" fill="#3c3c3c">
|
<g id="layer2" fill="#d00000">
|
||||||
<circle id="circle148" transform="translate(1381.6 448.25)" cx="-81.641" cy="188.76" r="4.223"/>
|
<circle id="p02" cx="503.65" cy="248.75" r="61.935"/>
|
||||||
<circle id="circle150" transform="translate(1381.6 568.36)" cx="-81.641" cy="188.76" r="4.223"/>
|
<circle id="p03" cx="863.41" cy="248.75" r="61.935"/>
|
||||||
<circle id="circle152" transform="translate(1381.6 688.48)" cx="-81.641" cy="188.76" r="4.223"/>
|
<circle id="p04" cx="1181.5" cy="248.75" r="61.935"/>
|
||||||
<circle id="circle154" transform="translate(1381.6 808.59)" cx="-81.641" cy="188.76" r="4.223"/>
|
<circle id="p05" cx="1378.4" cy="151.16" r="61.935"/>
|
||||||
|
<circle id="p06" cx="1535.1" cy="581.37" r="61.935"/>
|
||||||
|
<circle id="p07" cx="1378.4" cy="997.9" r="61.935"/>
|
||||||
|
<circle id="p08" cx="1181.5" cy="914.24" r="61.935"/>
|
||||||
|
<circle id="p09" transform="scale(1,-1)" cx="863.41" cy="-914.24" r="61.935"/>
|
||||||
|
<circle id="p10" cx="503.65" cy="914.24" r="61.935"/>
|
||||||
|
<circle id="p11" cx="297.77" cy="997.9" r="61.935"/>
|
||||||
|
<circle id="p12" cx="93.269" cy="581.37" r="61.935"/>
|
||||||
|
<circle id="p25" cx="424.31" cy="581.37" r="61.935"/>
|
||||||
|
<circle id="p27" cx="972.84" cy="581.37" r="61.935"/>
|
||||||
|
<circle id="p01" cx="297.77" cy="151.16" r="61.935"/>
|
||||||
|
<circle id="p26" cx="1339.4" cy="581.37" r="61.935"/>
|
||||||
|
</g>
|
||||||
|
<g id="g4994" fill="#ffef00">
|
||||||
|
<circle id="s02" cx="503.65" cy="248.75" r="61.935"/>
|
||||||
|
<circle id="s03" cx="863.41" cy="248.75" r="61.935"/>
|
||||||
|
<circle id="s04" cx="1181.5" cy="248.75" r="61.935"/>
|
||||||
|
<circle id="s05" cx="1378.4" cy="151.16" r="61.935"/>
|
||||||
|
<circle id="s06" cx="1535.1" cy="581.37" r="61.935"/>
|
||||||
|
<circle id="s07" cx="1378.4" cy="997.9" r="61.935"/>
|
||||||
|
<circle id="s08" cx="1181.5" cy="914.24" r="61.935"/>
|
||||||
|
<circle id="s09" transform="scale(1,-1)" cx="863.41" cy="-914.24" r="61.935"/>
|
||||||
|
<circle id="s10" cx="503.65" cy="914.24" r="61.935"/>
|
||||||
|
<circle id="s11" cx="297.77" cy="997.9" r="61.935"/>
|
||||||
|
<circle id="s12" cx="93.269" cy="581.37" r="61.935"/>
|
||||||
|
<circle id="s25" cx="424.31" cy="581.37" r="61.935"/>
|
||||||
|
<circle id="s27" cx="972.84" cy="581.37" r="61.935"/>
|
||||||
|
<circle id="s01" cx="297.77" cy="151.16" r="61.935"/>
|
||||||
|
<circle id="s26" cx="1339.4" cy="581.37" r="61.935"/>
|
||||||
|
</g>
|
||||||
|
<g id="layer3">
|
||||||
|
<text id="p15" opacity="0" x="382.62802" y="1034.3463" fill="#fd0000" font-family="sans-serif"
|
||||||
|
font-size="1696.9px" letter-spacing="0px" stroke-width="17.676" word-spacing="0px"
|
||||||
|
style="line-height:5.25" xml:space="preserve"><tspan id="tspan4997" x="382.62802" y="1034.3463" fill="#fd0000" stroke-width="17.676">x</tspan></text>
|
||||||
</g>
|
</g>
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="layer2" fill="#d00000">
|
|
||||||
<circle id="p02" cx="503.65" cy="248.75" r="61.935" />
|
|
||||||
<circle id="p03" cx="863.41" cy="248.75" r="61.935"/>
|
|
||||||
<circle id="p04" cx="1181.5" cy="248.75" r="61.935"/>
|
|
||||||
<circle id="p05" cx="1378.4" cy="151.16" r="61.935"/>
|
|
||||||
<circle id="p06" cx="1535.1" cy="581.37" r="61.935"/>
|
|
||||||
<circle id="p07" cx="1378.4" cy="997.9" r="61.935"/>
|
|
||||||
<circle id="p08" cx="1181.5" cy="914.24" r="61.935"/>
|
|
||||||
<circle id="p09" transform="scale(1,-1)" cx="863.41" cy="-914.24" r="61.935"/>
|
|
||||||
<circle id="p10" cx="503.65" cy="914.24" r="61.935"/>
|
|
||||||
<circle id="p11" cx="297.77" cy="997.9" r="61.935"/>
|
|
||||||
<circle id="p12" cx="93.269" cy="581.37" r="61.935"/>
|
|
||||||
<circle id="p25" cx="424.31" cy="581.37" r="61.935"/>
|
|
||||||
<circle id="p27" cx="972.84" cy="581.37" r="61.935"/>
|
|
||||||
<circle id="p01" cx="297.77" cy="151.16" r="61.935"/>
|
|
||||||
<circle id="p26" cx="1339.4" cy="581.37" r="61.935"/>
|
|
||||||
</g>
|
|
||||||
<g id="g4994" fill="#ffef00">
|
|
||||||
<circle id="s02" cx="503.65" cy="248.75" r="61.935"/>
|
|
||||||
<circle id="s03" cx="863.41" cy="248.75" r="61.935"/>
|
|
||||||
<circle id="s04" cx="1181.5" cy="248.75" r="61.935"/>
|
|
||||||
<circle id="s05" cx="1378.4" cy="151.16" r="61.935"/>
|
|
||||||
<circle id="s06" cx="1535.1" cy="581.37" r="61.935"/>
|
|
||||||
<circle id="s07" cx="1378.4" cy="997.9" r="61.935"/>
|
|
||||||
<circle id="s08" cx="1181.5" cy="914.24" r="61.935"/>
|
|
||||||
<circle id="s09" transform="scale(1,-1)" cx="863.41" cy="-914.24" r="61.935"/>
|
|
||||||
<circle id="s10" cx="503.65" cy="914.24" r="61.935"/>
|
|
||||||
<circle id="s11" cx="297.77" cy="997.9" r="61.935"/>
|
|
||||||
<circle id="s12" cx="93.269" cy="581.37" r="61.935"/>
|
|
||||||
<circle id="s25" cx="424.31" cy="581.37" r="61.935"/>
|
|
||||||
<circle id="s27" cx="972.84" cy="581.37" r="61.935"/>
|
|
||||||
<circle id="s01" cx="297.77" cy="151.16" r="61.935"/>
|
|
||||||
<circle id="s26" cx="1339.4" cy="581.37" r="61.935"/>
|
|
||||||
</g>
|
|
||||||
<g id="layer3">
|
|
||||||
<text id="p15" opacity="0" x="382.62802" y="1034.3463" fill="#fd0000" font-family="sans-serif" font-size="1696.9px" letter-spacing="0px" stroke-width="17.676" word-spacing="0px" style="line-height:5.25" xml:space="preserve"><tspan id="tspan4997" x="382.62802" y="1034.3463" fill="#fd0000" stroke-width="17.676">x</tspan></text>
|
|
||||||
</g>
|
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
@@ -16,31 +16,31 @@ import {UPDATE_DASHBOARD_LAYOUT} from "../../graphql/user.queries";
|
|||||||
import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors";
|
import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors";
|
||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import DashboardMonthlyEmployeeEfficiency, {
|
import DashboardMonthlyEmployeeEfficiency, {
|
||||||
DashboardMonthlyEmployeeEfficiencyGql,
|
DashboardMonthlyEmployeeEfficiencyGql,
|
||||||
} from "../dashboard-components/monthly-employee-efficiency/monthly-employee-efficiency.component";
|
} from "../dashboard-components/monthly-employee-efficiency/monthly-employee-efficiency.component";
|
||||||
import DashboardMonthlyJobCosting from "../dashboard-components/monthly-job-costing/monthly-job-costing.component";
|
import DashboardMonthlyJobCosting from "../dashboard-components/monthly-job-costing/monthly-job-costing.component";
|
||||||
import DashboardMonthlyLaborSales from "../dashboard-components/monthly-labor-sales/monthly-labor-sales.component";
|
import DashboardMonthlyLaborSales from "../dashboard-components/monthly-labor-sales/monthly-labor-sales.component";
|
||||||
import DashboardMonthlyPartsSales from "../dashboard-components/monthly-parts-sales/monthly-parts-sales.component";
|
import DashboardMonthlyPartsSales from "../dashboard-components/monthly-parts-sales/monthly-parts-sales.component";
|
||||||
import DashboardMonthlyRevenueGraph, {
|
import DashboardMonthlyRevenueGraph, {
|
||||||
DashboardMonthlyRevenueGraphGql,
|
DashboardMonthlyRevenueGraphGql,
|
||||||
} from "../dashboard-components/monthly-revenue-graph/monthly-revenue-graph.component";
|
} from "../dashboard-components/monthly-revenue-graph/monthly-revenue-graph.component";
|
||||||
import DashboardProjectedMonthlySales, {
|
import DashboardProjectedMonthlySales, {
|
||||||
DashboardProjectedMonthlySalesGql,
|
DashboardProjectedMonthlySalesGql,
|
||||||
} from "../dashboard-components/pojected-monthly-sales/projected-monthly-sales.component";
|
} from "../dashboard-components/pojected-monthly-sales/projected-monthly-sales.component";
|
||||||
import DashboardTotalProductionDollars
|
import DashboardTotalProductionDollars
|
||||||
from "../dashboard-components/total-production-dollars/total-production-dollars.component";
|
from "../dashboard-components/total-production-dollars/total-production-dollars.component";
|
||||||
import DashboardTotalProductionHours, {
|
import DashboardTotalProductionHours, {
|
||||||
DashboardTotalProductionHoursGql,
|
DashboardTotalProductionHoursGql,
|
||||||
} from "../dashboard-components/total-production-hours/total-production-hours.component";
|
} from "../dashboard-components/total-production-hours/total-production-hours.component";
|
||||||
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
||||||
//Combination of the following:
|
//Combination of the following:
|
||||||
// /node_modules/react-grid-layout/css/styles.css
|
// /node_modules/react-grid-layout/css/styles.css
|
||||||
// /node_modules/react-resizable/css/styles.css
|
// /node_modules/react-resizable/css/styles.css
|
||||||
import DashboardScheduledInToday, {
|
import DashboardScheduledInToday, {
|
||||||
DashboardScheduledInTodayGql,
|
DashboardScheduledInTodayGql,
|
||||||
} from "../dashboard-components/scheduled-in-today/scheduled-in-today.component";
|
} from "../dashboard-components/scheduled-in-today/scheduled-in-today.component";
|
||||||
import DashboardScheduledOutToday, {
|
import DashboardScheduledOutToday, {
|
||||||
DashboardScheduledOutTodayGql,
|
DashboardScheduledOutTodayGql,
|
||||||
} from "../dashboard-components/scheduled-out-today/scheduled-out-today.component";
|
} from "../dashboard-components/scheduled-out-today/scheduled-out-today.component";
|
||||||
import "./dashboard-grid.styles.scss";
|
import "./dashboard-grid.styles.scss";
|
||||||
import {GenerateDashboardData} from "./dashboard-grid.utils";
|
import {GenerateDashboardData} from "./dashboard-grid.utils";
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
import {Button, Col, Collapse, Result, Row, Space} from "antd";
|
import {Button, Col, Collapse, Result, Row, Space} from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { withTranslation } from "react-i18next";
|
import {withTranslation} from "react-i18next";
|
||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import {logImEXEvent} from "../../firebase/firebase.utils";
|
||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
import { connect } from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import {
|
import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors";
|
||||||
selectBodyshop,
|
|
||||||
selectCurrentUser,
|
|
||||||
} from "../../redux/user/user.selectors";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
currentUser: selectCurrentUser,
|
currentUser: selectCurrentUser,
|
||||||
@@ -139,5 +136,5 @@ class ErrorBoundary extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default Sentry.withErrorBoundary(
|
export default Sentry.withErrorBoundary(
|
||||||
connect(mapStateToProps, mapDispatchToProps)(withTranslation()(ErrorBoundary))
|
connect(mapStateToProps, mapDispatchToProps)(withTranslation()(ErrorBoundary))
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -169,7 +169,8 @@ const EulaFormComponent = ({form, handleChange, onFinish, t}) => (
|
|||||||
value.trim() !== '' ? Promise.resolve() : Promise.reject(new Error(t('eula.messages.business_name'))),
|
value.trim() !== '' ? Promise.resolve() : Promise.reject(new Error(t('eula.messages.business_name'))),
|
||||||
}]}
|
}]}
|
||||||
>
|
>
|
||||||
<Input placeholder={t('eula.labels.business_name')} aria-label={t('eula.labels.business_name')}/>
|
<Input placeholder={t('eula.labels.business_name')}
|
||||||
|
aria-label={t('eula.labels.business_name')}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
@@ -230,7 +231,8 @@ const EulaFormComponent = ({form, handleChange, onFinish, t}) => (
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Checkbox aria-label={t('eula.labels.accepted_terms')}>{t('eula.labels.accepted_terms')}</Checkbox>
|
<Checkbox
|
||||||
|
aria-label={t('eula.labels.accepted_terms')}>{t('eula.labels.accepted_terms')}</Checkbox>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export default function JobBillsTotalComponent({
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (pol.cm_received === null) {
|
if (pol.cm_received === null) {
|
||||||
// Skip this calculation for bills posted prior to the CNR change.
|
// Skip this calculation for bills posted prior to the CNR change.
|
||||||
} else {
|
} else {
|
||||||
if (pol.cm_received === false) {
|
if (pol.cm_received === false) {
|
||||||
totalReturnsMarkedNotReceived = totalReturnsMarkedNotReceived.add(
|
totalReturnsMarkedNotReceived = totalReturnsMarkedNotReceived.add(
|
||||||
|
|||||||
@@ -179,7 +179,8 @@ export function JobLifecycleComponent({job, statuses, ...rest}) {
|
|||||||
style={{marginTop: '10px'}}>
|
style={{marginTop: '10px'}}>
|
||||||
<div>
|
<div>
|
||||||
{lifecycleData.durations.summations.map((key) => (
|
{lifecycleData.durations.summations.map((key) => (
|
||||||
<Tag key={key.status} color={key.color} style={{width: '13vh', padding: '4px', margin: '4px'}}>
|
<Tag key={key.status} color={key.color}
|
||||||
|
style={{width: '13vh', padding: '4px', margin: '4px'}}>
|
||||||
<div
|
<div
|
||||||
aria-label={`${key.status} | ${key.roundedPercentage} | ${key.humanReadable}`}
|
aria-label={`${key.status} | ${key.roundedPercentage} | ${key.humanReadable}`}
|
||||||
title={`${key.status} | ${key.roundedPercentage} | ${key.humanReadable}`}
|
title={`${key.status} | ${key.roundedPercentage} | ${key.humanReadable}`}
|
||||||
|
|||||||
@@ -1,54 +1,54 @@
|
|||||||
import { DownCircleFilled } from "@ant-design/icons";
|
import {DownCircleFilled} from "@ant-design/icons";
|
||||||
import { useMutation } from "@apollo/client";
|
import {useMutation} from "@apollo/client";
|
||||||
import { Button, Dropdown, notification } from "antd";
|
import {Button, Dropdown, notification} from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import { UPDATE_JOB_STATUS } from "../../graphql/jobs.queries";
|
import {UPDATE_JOB_STATUS} from "../../graphql/jobs.queries";
|
||||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
import {insertAuditTrail} from "../../redux/application/application.actions";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
insertAuditTrail: ({ jobid, operation }) =>
|
insertAuditTrail: ({jobid, operation}) =>
|
||||||
dispatch(insertAuditTrail({ jobid, operation })),
|
dispatch(insertAuditTrail({jobid, operation})),
|
||||||
});
|
});
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(JobsAdminStatus);
|
export default connect(mapStateToProps, mapDispatchToProps)(JobsAdminStatus);
|
||||||
|
|
||||||
export function JobsAdminStatus({ insertAuditTrail, bodyshop, job }) {
|
export function JobsAdminStatus({insertAuditTrail, bodyshop, job}) {
|
||||||
const { t } = useTranslation();
|
const {t} = useTranslation();
|
||||||
|
|
||||||
const [mutationUpdateJobstatus] = useMutation(UPDATE_JOB_STATUS);
|
const [mutationUpdateJobstatus] = useMutation(UPDATE_JOB_STATUS);
|
||||||
const updateJobStatus = (status) => {
|
const updateJobStatus = (status) => {
|
||||||
mutationUpdateJobstatus({
|
mutationUpdateJobstatus({
|
||||||
variables: { jobId: job.id, status: status },
|
variables: {jobId: job.id, status: status},
|
||||||
})
|
})
|
||||||
.then((r) => {
|
.then((r) => {
|
||||||
notification["success"]({ message: t("jobs.successes.save") });
|
notification["success"]({message: t("jobs.successes.save")});
|
||||||
insertAuditTrail({
|
insertAuditTrail({
|
||||||
jobid: job.id,
|
jobid: job.id,
|
||||||
operation: AuditTrailMapping.admin_jobstatuschange(status),
|
operation: AuditTrailMapping.admin_jobstatuschange(status),
|
||||||
});
|
});
|
||||||
// refetch();
|
// refetch();
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
notification["error"]({ message: t("jobs.errors.saving") });
|
notification["error"]({message: t("jobs.errors.saving")});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const statusMenu = {
|
const statusMenu = {
|
||||||
items: bodyshop.md_ro_statuses.statuses.map((item) => ({
|
items: bodyshop.md_ro_statuses.statuses.map((item) => ({
|
||||||
key: item,
|
key: item,
|
||||||
label: item,
|
label: item,
|
||||||
})),
|
})),
|
||||||
onClick: (e) => {
|
onClick: (e) => {
|
||||||
updateJobStatus(e.key);
|
updateJobStatus(e.key);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -56,7 +56,7 @@ export function JobsAdminStatus({ insertAuditTrail, bodyshop, job }) {
|
|||||||
<Button shape="round">
|
<Button shape="round">
|
||||||
<span>{job.status}</span>
|
<span>{job.status}</span>
|
||||||
|
|
||||||
<DownCircleFilled />
|
<DownCircleFilled/>
|
||||||
</Button>
|
</Button>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import {useMutation} from "@apollo/client";
|
||||||
import { Button, Space, notification } from "antd";
|
import {Button, Space, notification} from "antd";
|
||||||
import React, { useState } from "react";
|
import React, {useState} from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import {
|
import {
|
||||||
DELETE_DELIVERY_CHECKLIST,
|
DELETE_DELIVERY_CHECKLIST,
|
||||||
DELETE_INTAKE_CHECKLIST,
|
DELETE_INTAKE_CHECKLIST,
|
||||||
} from "../../graphql/jobs.queries";
|
} from "../../graphql/jobs.queries";
|
||||||
|
|
||||||
export default function JobAdminDeleteIntake({ job }) {
|
export default function JobAdminDeleteIntake({job}) {
|
||||||
const { t } = useTranslation();
|
const {t} = useTranslation();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
||||||
const [deleteIntake] = useMutation(DELETE_INTAKE_CHECKLIST);
|
const [deleteIntake] = useMutation(DELETE_INTAKE_CHECKLIST);
|
||||||
const [deleteDelivery] = useMutation(DELETE_DELIVERY_CHECKLIST);
|
const [deleteDelivery] = useMutation(DELETE_DELIVERY_CHECKLIST);
|
||||||
|
|
||||||
const handleDelete = async (values) => {
|
const handleDelete = async (values) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
@@ -32,11 +32,11 @@ export default function JobAdminDeleteIntake({ job }) {
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDeleteDelivery = async (values) => {
|
const handleDeleteDelivery = async (values) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const result = await deleteDelivery({
|
const result = await deleteDelivery({
|
||||||
variables: { jobId: job.id },
|
variables: {jobId: job.id},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!!!result.errors) {
|
if (!!!result.errors) {
|
||||||
notification["success"]({message: t("jobs.successes.save")});
|
notification["success"]({message: t("jobs.successes.save")});
|
||||||
@@ -50,24 +50,24 @@ export default function JobAdminDeleteIntake({ job }) {
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
<Button
|
<Button
|
||||||
loading={loading}
|
loading={loading}
|
||||||
onClick={handleDelete}
|
onClick={handleDelete}
|
||||||
disabled={!job.intakechecklist}
|
disabled={!job.intakechecklist}
|
||||||
>
|
>
|
||||||
{t("jobs.labels.deleteintake")}
|
{t("jobs.labels.deleteintake")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
loading={loading}
|
loading={loading}
|
||||||
onClick={handleDeleteDelivery}
|
onClick={handleDeleteDelivery}
|
||||||
disabled={!job.deliverychecklist}
|
disabled={!job.deliverychecklist}
|
||||||
>
|
>
|
||||||
{t("jobs.labels.deletedelivery")}
|
{t("jobs.labels.deletedelivery")}
|
||||||
</Button>
|
</Button>
|
||||||
</Space>
|
</Space>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import {useMutation} from "@apollo/client";
|
||||||
import { Button, Space, notification } from "antd";
|
import {Button, Space, notification} from "antd";
|
||||||
import React, { useState } from "react";
|
import React, {useState} from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
|
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { connect } from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
import {INSERT_EXPORT_LOG} from "../../graphql/accounting.queries";
|
||||||
import {
|
import {
|
||||||
MARK_JOB_AS_EXPORTED,
|
MARK_JOB_AS_EXPORTED,
|
||||||
MARK_JOB_AS_UNINVOICED,
|
MARK_JOB_AS_UNINVOICED,
|
||||||
MARK_JOB_FOR_REEXPORT,
|
MARK_JOB_FOR_REEXPORT,
|
||||||
} from "../../graphql/jobs.queries";
|
} from "../../graphql/jobs.queries";
|
||||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
import {insertAuditTrail} from "../../redux/application/application.actions";
|
||||||
import {
|
import {
|
||||||
selectBodyshop,
|
selectBodyshop,
|
||||||
selectCurrentUser,
|
selectCurrentUser,
|
||||||
} from "../../redux/user/user.selectors";
|
} from "../../redux/user/user.selectors";
|
||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
|
|
||||||
@@ -33,27 +33,27 @@ export default connect(
|
|||||||
)(JobAdminMarkReexport);
|
)(JobAdminMarkReexport);
|
||||||
|
|
||||||
export function JobAdminMarkReexport({
|
export function JobAdminMarkReexport({
|
||||||
insertAuditTrail,
|
insertAuditTrail,
|
||||||
bodyshop,
|
bodyshop,
|
||||||
currentUser,
|
currentUser,
|
||||||
job,
|
job,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const {t} = useTranslation();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||||
|
|
||||||
const [markJobForReexport] = useMutation(MARK_JOB_FOR_REEXPORT);
|
const [markJobForReexport] = useMutation(MARK_JOB_FOR_REEXPORT);
|
||||||
const [markJobExported] = useMutation(MARK_JOB_AS_EXPORTED);
|
const [markJobExported] = useMutation(MARK_JOB_AS_EXPORTED);
|
||||||
const [markJobUninvoiced] = useMutation(MARK_JOB_AS_UNINVOICED);
|
const [markJobUninvoiced] = useMutation(MARK_JOB_AS_UNINVOICED);
|
||||||
|
|
||||||
const handleMarkForExport = async () => {
|
const handleMarkForExport = async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const result = await markJobForReexport({
|
const result = await markJobForReexport({
|
||||||
variables: {
|
variables: {
|
||||||
jobId: job.id,
|
jobId: job.id,
|
||||||
default_invoiced: bodyshop.md_ro_statuses.default_invoiced,
|
default_invoiced: bodyshop.md_ro_statuses.default_invoiced,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result.errors) {
|
if (!result.errors) {
|
||||||
notification["success"]({message: t("jobs.successes.save")});
|
notification["success"]({message: t("jobs.successes.save")});
|
||||||
@@ -71,15 +71,15 @@ export function JobAdminMarkReexport({
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleMarkExported = async () => {
|
const handleMarkExported = async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const result = await markJobExported({
|
const result = await markJobExported({
|
||||||
variables: {
|
variables: {
|
||||||
jobId: job.id,
|
jobId: job.id,
|
||||||
date_exported: dayjs(),
|
date_exported: dayjs(),
|
||||||
default_exported: bodyshop.md_ro_statuses.default_exported,
|
default_exported: bodyshop.md_ro_statuses.default_exported,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
await insertExportLog({
|
await insertExportLog({
|
||||||
variables: {
|
variables: {
|
||||||
@@ -111,14 +111,14 @@ export function JobAdminMarkReexport({
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleUninvoice = async () => {
|
const handleUninvoice = async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const result = await markJobUninvoiced({
|
const result = await markJobUninvoiced({
|
||||||
variables: {
|
variables: {
|
||||||
jobId: job.id,
|
jobId: job.id,
|
||||||
default_delivered: bodyshop.md_ro_statuses.default_delivered,
|
default_delivered: bodyshop.md_ro_statuses.default_delivered,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result.errors) {
|
if (!result.errors) {
|
||||||
notification["success"]({message: t("jobs.successes.save")});
|
notification["success"]({message: t("jobs.successes.save")});
|
||||||
@@ -136,31 +136,31 @@ export function JobAdminMarkReexport({
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
<Button
|
<Button
|
||||||
loading={loading}
|
loading={loading}
|
||||||
disabled={!job.date_exported}
|
disabled={!job.date_exported}
|
||||||
onClick={handleMarkForExport}
|
onClick={handleMarkForExport}
|
||||||
>
|
>
|
||||||
{t("jobs.labels.markforreexport")}
|
{t("jobs.labels.markforreexport")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
loading={loading}
|
loading={loading}
|
||||||
disabled={job.date_exported}
|
disabled={job.date_exported}
|
||||||
onClick={handleMarkExported}
|
onClick={handleMarkExported}
|
||||||
>
|
>
|
||||||
{t("jobs.actions.markasexported")}
|
{t("jobs.actions.markasexported")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
loading={loading}
|
loading={loading}
|
||||||
disabled={!job.date_invoiced || job.date_exported}
|
disabled={!job.date_invoiced || job.date_exported}
|
||||||
onClick={handleUninvoice}
|
onClick={handleUninvoice}
|
||||||
>
|
>
|
||||||
{t("jobs.actions.uninvoice")}
|
{t("jobs.actions.uninvoice")}
|
||||||
</Button>
|
</Button>
|
||||||
</Space>
|
</Space>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,65 +1,65 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import {useMutation} from "@apollo/client";
|
||||||
import { Switch, notification } from "antd";
|
import {Switch, notification} from "antd";
|
||||||
import React, { useState } from "react";
|
import React, {useState} from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import { UPDATE_REMOVE_FROM_AR } from "../../graphql/jobs.queries";
|
import {UPDATE_REMOVE_FROM_AR} from "../../graphql/jobs.queries";
|
||||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
import {insertAuditTrail} from "../../redux/application/application.actions";
|
||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({});
|
const mapStateToProps = createStructuredSelector({});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
insertAuditTrail: ({ jobid, operation }) =>
|
insertAuditTrail: ({jobid, operation}) =>
|
||||||
dispatch(insertAuditTrail({ jobid, operation })),
|
dispatch(insertAuditTrail({jobid, operation})),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(JobsAdminRemoveAR);
|
export default connect(mapStateToProps, mapDispatchToProps)(JobsAdminRemoveAR);
|
||||||
|
|
||||||
export function JobsAdminRemoveAR({ insertAuditTrail, job }) {
|
export function JobsAdminRemoveAR({insertAuditTrail, job}) {
|
||||||
const { t } = useTranslation();
|
const {t} = useTranslation();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [switchValue, setSwitchValue] = useState(job.remove_from_ar);
|
const [switchValue, setSwitchValue] = useState(job.remove_from_ar);
|
||||||
|
|
||||||
const [mutationUpdateRemoveFromAR] = useMutation(UPDATE_REMOVE_FROM_AR);
|
const [mutationUpdateRemoveFromAR] = useMutation(UPDATE_REMOVE_FROM_AR);
|
||||||
|
|
||||||
const handleChange = async (value) => {
|
const handleChange = async (value) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const result = await mutationUpdateRemoveFromAR({
|
const result = await mutationUpdateRemoveFromAR({
|
||||||
variables: { jobId: job.id, remove_from_ar: value },
|
variables: {jobId: job.id, remove_from_ar: value},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result.errors) {
|
if (!result.errors) {
|
||||||
notification["success"]({ message: t("jobs.successes.save") });
|
notification["success"]({message: t("jobs.successes.save")});
|
||||||
insertAuditTrail({
|
insertAuditTrail({
|
||||||
jobid: job.id,
|
jobid: job.id,
|
||||||
operation: AuditTrailMapping.admin_job_remove_from_ar(value),
|
operation: AuditTrailMapping.admin_job_remove_from_ar(value),
|
||||||
});
|
});
|
||||||
setSwitchValue(value);
|
setSwitchValue(value);
|
||||||
} else {
|
} else {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
message: t("jobs.errors.saving", {
|
message: t("jobs.errors.saving", {
|
||||||
error: JSON.stringify(result.errors),
|
error: JSON.stringify(result.errors),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div style={{ display: "flex", alignItems: "center" }}>
|
<div style={{display: "flex", alignItems: "center"}}>
|
||||||
<div style={{ marginRight: "10px" }}>
|
<div style={{marginRight: "10px"}}>
|
||||||
{t("jobs.labels.remove_from_ar")}:
|
{t("jobs.labels.remove_from_ar")}:
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Switch
|
<Switch
|
||||||
checked={switchValue}
|
checked={switchValue}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,68 +1,68 @@
|
|||||||
import {gql, useMutation} from "@apollo/client";
|
import {useMutation} from "@apollo/client";
|
||||||
import {Button, notification} from "antd";
|
import {Button, notification} from "antd";
|
||||||
import React, {useState} from "react";
|
import React, {useState} from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import {createStructuredSelector} from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import { UNVOID_JOB } from "../../graphql/jobs.queries";
|
import {UNVOID_JOB} from "../../graphql/jobs.queries";
|
||||||
import {insertAuditTrail} from "../../redux/application/application.actions";
|
import {insertAuditTrail} from "../../redux/application/application.actions";
|
||||||
import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors";
|
import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors";
|
||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
currentUser: selectCurrentUser,
|
currentUser: selectCurrentUser,
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
insertAuditTrail: ({ jobid, operation }) =>
|
insertAuditTrail: ({jobid, operation}) =>
|
||||||
dispatch(insertAuditTrail({ jobid, operation })),
|
dispatch(insertAuditTrail({jobid, operation})),
|
||||||
});
|
});
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(JobsAdminUnvoid);
|
export default connect(mapStateToProps, mapDispatchToProps)(JobsAdminUnvoid);
|
||||||
|
|
||||||
export function JobsAdminUnvoid({
|
export function JobsAdminUnvoid({
|
||||||
insertAuditTrail,
|
insertAuditTrail,
|
||||||
bodyshop,
|
bodyshop,
|
||||||
job,
|
job,
|
||||||
currentUser,
|
currentUser,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const {t} = useTranslation();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [mutationUnvoidJob] = useMutation(UNVOID_JOB);
|
const [mutationUnvoidJob] = useMutation(UNVOID_JOB);
|
||||||
|
|
||||||
const handleUpdate = async (values) => {
|
const handleUpdate = async (values) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const result = await mutationUnvoidJob({
|
const result = await mutationUnvoidJob({
|
||||||
variables: {
|
variables: {
|
||||||
jobId: job.id,
|
jobId: job.id,
|
||||||
default_imported: bodyshop.md_ro_statuses.default_imported,
|
default_imported: bodyshop.md_ro_statuses.default_imported,
|
||||||
currentUserEmail: currentUser.email,
|
currentUserEmail: currentUser.email,
|
||||||
text: t("jobs.labels.unvoidnote"),
|
text: t("jobs.labels.unvoidnote"),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result.errors) {
|
if (!result.errors) {
|
||||||
notification["success"]({ message: t("jobs.successes.save") });
|
notification["success"]({message: t("jobs.successes.save")});
|
||||||
|
|
||||||
insertAuditTrail({
|
insertAuditTrail({
|
||||||
jobid: job.id,
|
jobid: job.id,
|
||||||
operation: AuditTrailMapping.admin_jobunvoid(),
|
operation: AuditTrailMapping.admin_jobunvoid(),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
message: t("jobs.errors.saving", {
|
message: t("jobs.errors.saving", {
|
||||||
error: JSON.stringify(result.errors),
|
error: JSON.stringify(result.errors),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
//Get the owner details, populate it all back into the job.
|
//Get the owner details, populate it all back into the job.
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button loading={loading} disabled={!job.voided} onClick={handleUpdate}>
|
<Button loading={loading} disabled={!job.voided} onClick={handleUpdate}>
|
||||||
{t("jobs.actions.unvoid")}
|
{t("jobs.actions.unvoid")}
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,12 +220,12 @@ export function PayableExportAll({
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (bodyshop.pbs_serialnumber)
|
if (bodyshop.pbs_serialnumber)
|
||||||
return (
|
return (
|
||||||
<Link to='/manage/dmsap' state={{ billids }}>
|
<Link to='/manage/dmsap' state={{billids}}>
|
||||||
<Button>{t("jobs.actions.export")}</Button>
|
<Button>{t("jobs.actions.export")}</Button>
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button onClick={handleQbxml} loading={loading} disabled={disabled}>
|
<Button onClick={handleQbxml} loading={loading} disabled={disabled}>
|
||||||
|
|||||||
@@ -213,12 +213,12 @@ export function PayableExportButton({
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (bodyshop.pbs_serialnumber)
|
if (bodyshop.pbs_serialnumber)
|
||||||
return (
|
return (
|
||||||
<Link to='/manage/dmsap' state={{billids: [billId]}}>
|
<Link to='/manage/dmsap' state={{billids: [billId]}}>
|
||||||
<Button>{t("jobs.actions.export")}</Button>
|
<Button>{t("jobs.actions.export")}</Button>
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button onClick={handleQbxml} loading={loading} disabled={disabled}>
|
<Button onClick={handleQbxml} loading={loading} disabled={disabled}>
|
||||||
|
|||||||
@@ -106,36 +106,36 @@ export function ProductionBoardKanbanComponent({
|
|||||||
|
|
||||||
const oldChildCardNewParent = oldChildCard ? card.kanbanparent : null;
|
const oldChildCardNewParent = oldChildCard ? card.kanbanparent : null;
|
||||||
|
|
||||||
let movedCardNewKanbanParent;
|
let movedCardNewKanbanParent;
|
||||||
if (movedCardWillBeFirst) {
|
if (movedCardWillBeFirst) {
|
||||||
//console.log("==> New Card is first.");
|
//console.log("==> New Card is first.");
|
||||||
movedCardNewKanbanParent = "-1";
|
movedCardNewKanbanParent = "-1";
|
||||||
} else if (movedCardWillBeLast) {
|
} else if (movedCardWillBeLast) {
|
||||||
// console.log("==> New Card is last.");
|
// console.log("==> New Card is last.");
|
||||||
movedCardNewKanbanParent = lastCardInDestinationColumn.id;
|
movedCardNewKanbanParent = lastCardInDestinationColumn.id;
|
||||||
} else if (!!newChildCard) {
|
} else if (!!newChildCard) {
|
||||||
// console.log("==> New Card is somewhere in the middle");
|
// console.log("==> New Card is somewhere in the middle");
|
||||||
movedCardNewKanbanParent = newChildCard.kanbanparent;
|
movedCardNewKanbanParent = newChildCard.kanbanparent;
|
||||||
} else {
|
} else {
|
||||||
console.log("==> !!!!!!Couldn't find a parent.!!!! <==");
|
console.log("==> !!!!!!Couldn't find a parent.!!!! <==");
|
||||||
}
|
}
|
||||||
const newChildCardNewParent = newChildCard ? card.id : null;
|
const newChildCardNewParent = newChildCard ? card.id : null;
|
||||||
const update = await client.mutate({
|
const update = await client.mutate({
|
||||||
mutation: generate_UPDATE_JOB_KANBAN(
|
mutation: generate_UPDATE_JOB_KANBAN(
|
||||||
oldChildCard ? oldChildCard.id : null,
|
oldChildCard ? oldChildCard.id : null,
|
||||||
oldChildCardNewParent,
|
oldChildCardNewParent,
|
||||||
card.id,
|
card.id,
|
||||||
movedCardNewKanbanParent,
|
movedCardNewKanbanParent,
|
||||||
destination.toColumnId,
|
destination.toColumnId,
|
||||||
newChildCard ? newChildCard.id : null,
|
newChildCard ? newChildCard.id : null,
|
||||||
newChildCardNewParent
|
newChildCardNewParent
|
||||||
),
|
),
|
||||||
// TODO: optimisticResponse
|
// TODO: optimisticResponse
|
||||||
});
|
});
|
||||||
insertAuditTrail({
|
insertAuditTrail({
|
||||||
jobid: card.id,
|
jobid: card.id,
|
||||||
operation: AuditTrailMapping.jobstatuschange(destination.toColumnId),
|
operation: AuditTrailMapping.jobstatuschange(destination.toColumnId),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (update.errors) {
|
if (update.errors) {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
@@ -146,30 +146,30 @@ export function ProductionBoardKanbanComponent({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const totalHrs = data
|
const totalHrs = data
|
||||||
.reduce(
|
.reduce(
|
||||||
(acc, val) =>
|
(acc, val) =>
|
||||||
acc +
|
acc +
|
||||||
(val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0) +
|
(val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0) +
|
||||||
(val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
(val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
.toFixed(1);
|
.toFixed(1);
|
||||||
const totalLAB = data
|
const totalLAB = data
|
||||||
.reduce(
|
.reduce(
|
||||||
(acc, val) => acc + (val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
(acc, val) => acc + (val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
.toFixed(1);
|
.toFixed(1);
|
||||||
const totalLAR = data
|
const totalLAR = data
|
||||||
.reduce(
|
.reduce(
|
||||||
(acc, val) => acc + (val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
(acc, val) => acc + (val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
.toFixed(1);
|
.toFixed(1);
|
||||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
||||||
.filter((screen) => !!screen[1])
|
.filter((screen) => !!screen[1])
|
||||||
.slice(-1)[0];
|
.slice(-1)[0];
|
||||||
|
|
||||||
const standardSizes = {
|
const standardSizes = {
|
||||||
xs: "250",
|
xs: "250",
|
||||||
|
|||||||
@@ -65,132 +65,132 @@ export function ProductionListDetail({
|
|||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Drawer
|
<Drawer
|
||||||
title={
|
title={
|
||||||
<PageHeader
|
<PageHeader
|
||||||
title={theJob.ro_number}
|
title={theJob.ro_number}
|
||||||
extra={
|
extra={
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
{!technician ? (
|
{!technician ? (
|
||||||
<ProductionRemoveButton jobId={theJob.id} />
|
<ProductionRemoveButton jobId={theJob.id}/>
|
||||||
) : null}
|
) : null}
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setPrintCenterContext({
|
setPrintCenterContext({
|
||||||
actions: { refetch: refetch },
|
actions: {refetch: refetch},
|
||||||
context: {
|
context: {
|
||||||
id: theJob.id,
|
id: theJob.id,
|
||||||
job: theJob,
|
job: theJob,
|
||||||
type: "job",
|
type: "job",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<PrinterFilled />
|
<PrinterFilled/>
|
||||||
{t("jobs.actions.printCenter")}
|
{t("jobs.actions.printCenter")}
|
||||||
</Button>
|
</Button>
|
||||||
{!technician ? (
|
{!technician ? (
|
||||||
<ScoreboardAddButton job={data ? data.jobs_by_pk : {}} />
|
<ScoreboardAddButton job={data ? data.jobs_by_pk : {}}/>
|
||||||
) : null}
|
) : null}
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
placement="right"
|
placement="right"
|
||||||
width={"50%"}
|
width={"50%"}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
open={selected}
|
open={selected}
|
||||||
>
|
>
|
||||||
{loading && <LoadingSkeleton />}
|
{loading && <LoadingSkeleton/>}
|
||||||
{error && <AlertComponent error={JSON.stringify(error)} />}
|
{error && <AlertComponent error={JSON.stringify(error)}/>}
|
||||||
{!loading && data && (
|
{!loading && data && (
|
||||||
<div>
|
<div>
|
||||||
<CardTemplate
|
<CardTemplate
|
||||||
title={t("jobs.labels.employeeassignments")}
|
title={t("jobs.labels.employeeassignments")}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
>
|
>
|
||||||
<JobEmployeeAssignments job={data.jobs_by_pk} refetch={refetch} />
|
<JobEmployeeAssignments job={data.jobs_by_pk} refetch={refetch}/>
|
||||||
</CardTemplate>
|
</CardTemplate>
|
||||||
<div style={{ height: "8px" }} />
|
<div style={{height: "8px"}}/>
|
||||||
<Descriptions bordered column={1}>
|
<Descriptions bordered column={1}>
|
||||||
<Descriptions.Item label={t("jobs.fields.ro_number")}>
|
<Descriptions.Item label={t("jobs.fields.ro_number")}>
|
||||||
{theJob.ro_number || ""}
|
{theJob.ro_number || ""}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label={t("jobs.fields.alt_transport")}>
|
<Descriptions.Item label={t("jobs.fields.alt_transport")}>
|
||||||
<Space>
|
<Space>
|
||||||
{data.jobs_by_pk.alt_transport || ""}
|
{data.jobs_by_pk.alt_transport || ""}
|
||||||
<JobAtChange job={data.jobs_by_pk} />
|
<JobAtChange job={data.jobs_by_pk}/>
|
||||||
</Space>
|
</Space>
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label={t("jobs.fields.clm_no")}>
|
<Descriptions.Item label={t("jobs.fields.clm_no")}>
|
||||||
{theJob.clm_no || ""}
|
{theJob.clm_no || ""}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label={t("jobs.fields.ins_co_nm")}>
|
<Descriptions.Item label={t("jobs.fields.ins_co_nm")}>
|
||||||
{theJob.ins_co_nm || ""}
|
{theJob.ins_co_nm || ""}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label={t("jobs.fields.owner")}>
|
<Descriptions.Item label={t("jobs.fields.owner")}>
|
||||||
<Space>
|
<Space>
|
||||||
<OwnerNameDisplay ownerObject={theJob} />
|
<OwnerNameDisplay ownerObject={theJob}/>
|
||||||
{!technician ? (
|
{!technician ? (
|
||||||
<>
|
<>
|
||||||
<StartChatButton
|
<StartChatButton
|
||||||
phone={data.jobs_by_pk.ownr_ph1}
|
phone={data.jobs_by_pk.ownr_ph1}
|
||||||
jobid={data.jobs_by_pk.id}
|
jobid={data.jobs_by_pk.id}
|
||||||
|
/>
|
||||||
|
<StartChatButton
|
||||||
|
phone={data.jobs_by_pk.ownr_ph2}
|
||||||
|
jobid={data.jobs_by_pk.id}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<PhoneNumberFormatter>
|
||||||
|
{data.jobs_by_pk.ownr_ph1}
|
||||||
|
</PhoneNumberFormatter>
|
||||||
|
<PhoneNumberFormatter>
|
||||||
|
{data.jobs_by_pk.ownr_ph2}
|
||||||
|
</PhoneNumberFormatter>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label={t("jobs.fields.vehicle")}>
|
||||||
|
{`${theJob.v_model_yr || ""} ${theJob.v_color || ""} ${
|
||||||
|
theJob.v_make_desc || ""
|
||||||
|
} ${theJob.v_model_desc || ""}`}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label={t("jobs.fields.clm_total")}>
|
||||||
|
<CurrencyFormatter>{theJob.clm_total}</CurrencyFormatter>
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label={t("jobs.fields.actual_in")}>
|
||||||
|
<DateFormatter>{theJob.actual_in}</DateFormatter>
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label={t("jobs.fields.scheduled_completion")}>
|
||||||
|
<DateFormatter>{theJob.scheduled_completion}</DateFormatter>
|
||||||
|
</Descriptions.Item>
|
||||||
|
</Descriptions>
|
||||||
|
<div style={{height: "8px"}}/>
|
||||||
|
<JobDetailCardsPartsComponent
|
||||||
|
loading={loading}
|
||||||
|
data={data ? data.jobs_by_pk : null}
|
||||||
/>
|
/>
|
||||||
<StartChatButton
|
<div style={{height: "8px"}}/>
|
||||||
phone={data.jobs_by_pk.ownr_ph2}
|
<JobDetailCardsNotesComponent
|
||||||
jobid={data.jobs_by_pk.id}
|
loading={loading}
|
||||||
|
data={data ? data.jobs_by_pk : null}
|
||||||
/>
|
/>
|
||||||
</>
|
{!bodyshop.uselocalmediaserver && (
|
||||||
) : (
|
<>
|
||||||
<>
|
<div style={{height: "8px"}}/>
|
||||||
<PhoneNumberFormatter>
|
<JobDetailCardsDocumentsComponent
|
||||||
{data.jobs_by_pk.ownr_ph1}
|
loading={loading}
|
||||||
</PhoneNumberFormatter>
|
data={data ? data.jobs_by_pk : null}
|
||||||
<PhoneNumberFormatter>
|
/>
|
||||||
{data.jobs_by_pk.ownr_ph2}
|
</>
|
||||||
</PhoneNumberFormatter>
|
)}
|
||||||
</>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Space>
|
</Drawer>
|
||||||
</Descriptions.Item>
|
);
|
||||||
<Descriptions.Item label={t("jobs.fields.vehicle")}>
|
|
||||||
{`${theJob.v_model_yr || ""} ${theJob.v_color || ""} ${
|
|
||||||
theJob.v_make_desc || ""
|
|
||||||
} ${theJob.v_model_desc || ""}`}
|
|
||||||
</Descriptions.Item>
|
|
||||||
<Descriptions.Item label={t("jobs.fields.clm_total")}>
|
|
||||||
<CurrencyFormatter>{theJob.clm_total}</CurrencyFormatter>
|
|
||||||
</Descriptions.Item>
|
|
||||||
<Descriptions.Item label={t("jobs.fields.actual_in")}>
|
|
||||||
<DateFormatter>{theJob.actual_in}</DateFormatter>
|
|
||||||
</Descriptions.Item>
|
|
||||||
<Descriptions.Item label={t("jobs.fields.scheduled_completion")}>
|
|
||||||
<DateFormatter>{theJob.scheduled_completion}</DateFormatter>
|
|
||||||
</Descriptions.Item>
|
|
||||||
</Descriptions>
|
|
||||||
<div style={{ height: "8px" }} />
|
|
||||||
<JobDetailCardsPartsComponent
|
|
||||||
loading={loading}
|
|
||||||
data={data ? data.jobs_by_pk : null}
|
|
||||||
/>
|
|
||||||
<div style={{ height: "8px" }} />
|
|
||||||
<JobDetailCardsNotesComponent
|
|
||||||
loading={loading}
|
|
||||||
data={data ? data.jobs_by_pk : null}
|
|
||||||
/>
|
|
||||||
{!bodyshop.uselocalmediaserver && (
|
|
||||||
<>
|
|
||||||
<div style={{ height: "8px" }} />
|
|
||||||
<JobDetailCardsDocumentsComponent
|
|
||||||
loading={loading}
|
|
||||||
data={data ? data.jobs_by_pk : null}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</Drawer>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export function ReportCenterModalComponent({reportCenterModal, bodyshop}) {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
const start = values.dates ? values.dates[0] : null;
|
const start = values.dates ? values.dates[0] : null;
|
||||||
const end = values.dates ? values.dates[1] : null;
|
const end = values.dates ? values.dates[1] : null;
|
||||||
const { id } = values;
|
const {id} = values;
|
||||||
|
|
||||||
await GenerateDocument(
|
await GenerateDocument(
|
||||||
{
|
{
|
||||||
@@ -257,7 +257,7 @@ export function ReportCenterModalComponent({reportCenterModal, bodyshop}) {
|
|||||||
else return null;
|
else return null;
|
||||||
}}
|
}}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item style={{ margin: 0, padding: 0 }} dependencies={["key"]}>
|
<Form.Item style={{margin: 0, padding: 0}} dependencies={["key"]}>
|
||||||
{() => {
|
{() => {
|
||||||
const key = form.getFieldValue("key");
|
const key = form.getFieldValue("key");
|
||||||
const datedisable = Templates[key] && Templates[key].datedisable;
|
const datedisable = Templates[key] && Templates[key].datedisable;
|
||||||
@@ -316,18 +316,18 @@ export function ReportCenterModalComponent({reportCenterModal, bodyshop}) {
|
|||||||
}}
|
}}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
marginTop: "1rem",
|
marginTop: "1rem",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Button onClick={() => form.submit()} style={{}} loading={loading}>
|
<Button onClick={() => form.submit()} style={{}} loading={loading}>
|
||||||
{t("reportcenter.actions.generate")}
|
{t("reportcenter.actions.generate")}
|
||||||
</Button>
|
</Button>
|
||||||
|
</div>
|
||||||
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
);
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import EmailInput from "../form-items-formatted/email-form-item.component";
|
|||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import ScheduleDayViewContainer from "../schedule-day-view/schedule-day-view.container";
|
import ScheduleDayViewContainer from "../schedule-day-view/schedule-day-view.container";
|
||||||
import ScheduleExistingAppointmentsList
|
import ScheduleExistingAppointmentsList
|
||||||
from "../schedule-existing-appointments-list/schedule-existing-appointments-list.component";
|
from "../schedule-existing-appointments-list/schedule-existing-appointments-list.component";
|
||||||
import "./schedule-job-modal.scss";
|
import "./schedule-job-modal.scss";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import querystring from "query-string";
|
|||||||
import React, {useEffect} from "react";
|
import React, {useEffect} from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import {useNavigate, useLocation} from "react-router-dom";
|
import {useLocation, useNavigate} from "react-router-dom";
|
||||||
import {createStructuredSelector} from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import {logImEXEvent} from "../../firebase/firebase.utils";
|
import {logImEXEvent} from "../../firebase/firebase.utils";
|
||||||
import {selectBodyshop} from "../../redux/user/user.selectors";
|
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {Button, Table} from "antd";
|
|||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import {useNavigate, useLocation} from "react-router-dom";
|
import {useLocation, useNavigate} from "react-router-dom";
|
||||||
|
|
||||||
export default function ShopEmployeeTeamsListComponent({
|
export default function ShopEmployeeTeamsListComponent({
|
||||||
loading,
|
loading,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {EditFilled, SyncOutlined} from "@ant-design/icons";
|
import {EditFilled, SyncOutlined} from "@ant-design/icons";
|
||||||
import {Card, Space, Table, Checkbox, Button} from "antd";
|
import {Button, Card, Checkbox, Space, Table} from "antd";
|
||||||
import dayjs from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import React, {useMemo, useState} from "react";
|
import React, {useMemo, useState} from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import queryString from "query-string";
|
|||||||
import React, {useState} from "react";
|
import React, {useState} from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import {Link, useNavigate, useLocation} from "react-router-dom";
|
import {Link, useLocation, useNavigate} from "react-router-dom";
|
||||||
import {createStructuredSelector} from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import {setModalContext} from "../../redux/modals/modals.actions";
|
import {setModalContext} from "../../redux/modals/modals.actions";
|
||||||
import {selectAuthLevel, selectBodyshop,} from "../../redux/user/user.selectors";
|
import {selectAuthLevel, selectBodyshop,} from "../../redux/user/user.selectors";
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { getAnalytics, logEvent } from "firebase/analytics";
|
import {getAnalytics, logEvent} from "firebase/analytics";
|
||||||
import { initializeApp } from "firebase/app";
|
import {initializeApp} from "firebase/app";
|
||||||
import { getAuth, updatePassword, updateProfile } from "firebase/auth";
|
import {getAuth, updatePassword, updateProfile} from "firebase/auth";
|
||||||
import { getFirestore } from "firebase/firestore";
|
import {getFirestore} from "firebase/firestore";
|
||||||
import { getMessaging, getToken, onMessage } from "firebase/messaging";
|
import {getMessaging, getToken, onMessage} from "firebase/messaging";
|
||||||
import { store } from "../redux/store";
|
import {store} from "../redux/store";
|
||||||
|
|
||||||
const config = JSON.parse(process.env.REACT_APP_FIREBASE_CONFIG);
|
const config = JSON.parse(process.env.REACT_APP_FIREBASE_CONFIG);
|
||||||
initializeApp(config);
|
initializeApp(config);
|
||||||
@@ -14,85 +14,85 @@ export const analytics = getAnalytics();
|
|||||||
|
|
||||||
//export default firebase;
|
//export default firebase;
|
||||||
export const getCurrentUser = () => {
|
export const getCurrentUser = () => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const unsubscribe = auth.onAuthStateChanged((userAuth) => {
|
const unsubscribe = auth.onAuthStateChanged((userAuth) => {
|
||||||
unsubscribe();
|
unsubscribe();
|
||||||
resolve(userAuth);
|
resolve(userAuth);
|
||||||
}, reject);
|
}, reject);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const updateCurrentUser = (userDetails) => {
|
export const updateCurrentUser = (userDetails) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const unsubscribe = auth.onAuthStateChanged((userAuth) => {
|
const unsubscribe = auth.onAuthStateChanged((userAuth) => {
|
||||||
updateProfile(userAuth, userDetails).then((r) => {
|
updateProfile(userAuth, userDetails).then((r) => {
|
||||||
unsubscribe();
|
unsubscribe();
|
||||||
resolve(userAuth);
|
resolve(userAuth);
|
||||||
});
|
});
|
||||||
}, reject);
|
}, reject);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const updateCurrentPassword = async (password) => {
|
export const updateCurrentPassword = async (password) => {
|
||||||
const currentUser = await getCurrentUser();
|
const currentUser = await getCurrentUser();
|
||||||
|
|
||||||
return updatePassword(currentUser, password);
|
return updatePassword(currentUser, password);
|
||||||
};
|
};
|
||||||
let messaging;
|
let messaging;
|
||||||
try {
|
try {
|
||||||
messaging = getMessaging();
|
messaging = getMessaging();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { messaging };
|
export {messaging};
|
||||||
|
|
||||||
export const requestForToken = () => {
|
export const requestForToken = () => {
|
||||||
return getToken(messaging, {
|
return getToken(messaging, {
|
||||||
vapidKey: process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY,
|
vapidKey: process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY,
|
||||||
})
|
|
||||||
.then((currentToken) => {
|
|
||||||
if (currentToken) {
|
|
||||||
window.sessionStorage.setItem("fcmtoken", currentToken);
|
|
||||||
// Perform any other necessary action with the token
|
|
||||||
} else {
|
|
||||||
// Show permission request UI
|
|
||||||
console.log(
|
|
||||||
"No registration token available. Request permission to generate one."
|
|
||||||
);
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.then((currentToken) => {
|
||||||
console.log("An error occurred while retrieving token. ", err);
|
if (currentToken) {
|
||||||
});
|
window.sessionStorage.setItem("fcmtoken", currentToken);
|
||||||
|
// Perform any other necessary action with the token
|
||||||
|
} else {
|
||||||
|
// Show permission request UI
|
||||||
|
console.log(
|
||||||
|
"No registration token available. Request permission to generate one."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("An error occurred while retrieving token. ", err);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const onMessageListener = () =>
|
export const onMessageListener = () =>
|
||||||
new Promise((resolve) => {
|
new Promise((resolve) => {
|
||||||
onMessage(messaging, (payload) => {
|
onMessage(messaging, (payload) => {
|
||||||
console.log("Inbound FCM Message", payload);
|
console.log("Inbound FCM Message", payload);
|
||||||
resolve(payload);
|
resolve(payload);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
|
export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
|
||||||
const state = stateProp || store.getState();
|
const state = stateProp || store.getState();
|
||||||
const eventParams = {
|
const eventParams = {
|
||||||
shop:
|
shop:
|
||||||
(state.user && state.user.bodyshop && state.user.bodyshop.shopname) ||
|
(state.user && state.user.bodyshop && state.user.bodyshop.shopname) ||
|
||||||
null,
|
null,
|
||||||
user:
|
user:
|
||||||
(state.user && state.user.currentUser && state.user.currentUser.email) ||
|
(state.user && state.user.currentUser && state.user.currentUser.email) ||
|
||||||
null,
|
null,
|
||||||
...additionalParams,
|
...additionalParams,
|
||||||
};
|
};
|
||||||
// console.log(
|
// console.log(
|
||||||
// "%c[Analytics]",
|
// "%c[Analytics]",
|
||||||
// "background-color: green ;font-weight:bold;",
|
// "background-color: green ;font-weight:bold;",
|
||||||
// eventName,
|
// eventName,
|
||||||
// eventParams
|
// eventParams
|
||||||
// );
|
// );
|
||||||
logEvent(analytics, eventName, eventParams);
|
logEvent(analytics, eventName, eventParams);
|
||||||
};
|
};
|
||||||
|
|
||||||
// if (messaging) {
|
// if (messaging) {
|
||||||
|
|||||||
@@ -1,174 +1,174 @@
|
|||||||
import { gql } from "@apollo/client";
|
import {gql} from "@apollo/client";
|
||||||
|
|
||||||
export const QUERY_JOBS_FOR_EXPORT = gql`
|
export const QUERY_JOBS_FOR_EXPORT = gql`
|
||||||
query QUERY_JOBS_FOR_EXPORT($invoicedStatus: String!) {
|
query QUERY_JOBS_FOR_EXPORT($invoicedStatus: String!) {
|
||||||
jobs(
|
jobs(
|
||||||
where: {
|
where: {
|
||||||
date_exported: { _is_null: true }
|
date_exported: { _is_null: true }
|
||||||
status: { _eq: $invoicedStatus }
|
status: { _eq: $invoicedStatus }
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
ro_number
|
ro_number
|
||||||
ownr_fn
|
ownr_fn
|
||||||
ownr_ln
|
ownr_ln
|
||||||
ownr_co_nm
|
ownr_co_nm
|
||||||
date_invoiced
|
date_invoiced
|
||||||
date_exported
|
date_exported
|
||||||
status
|
status
|
||||||
v_model_desc
|
v_model_desc
|
||||||
v_make_desc
|
v_make_desc
|
||||||
v_model_yr
|
v_model_yr
|
||||||
v_color
|
v_color
|
||||||
|
|
||||||
clm_total
|
clm_total
|
||||||
clm_no
|
clm_no
|
||||||
ins_co_nm
|
ins_co_nm
|
||||||
exportlogs {
|
exportlogs {
|
||||||
id
|
id
|
||||||
successful
|
successful
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_BILLS_FOR_EXPORT = gql`
|
export const QUERY_BILLS_FOR_EXPORT = gql`
|
||||||
query QUERY_BILLS_FOR_EXPORT {
|
query QUERY_BILLS_FOR_EXPORT {
|
||||||
bills(where: { exported: { _eq: false }, isinhouse: { _eq: false } }) {
|
bills(where: { exported: { _eq: false }, isinhouse: { _eq: false } }) {
|
||||||
id
|
id
|
||||||
exported
|
exported
|
||||||
date
|
date
|
||||||
invoice_number
|
invoice_number
|
||||||
is_credit_memo
|
is_credit_memo
|
||||||
total
|
total
|
||||||
exportlogs {
|
exportlogs {
|
||||||
id
|
id
|
||||||
successful
|
successful
|
||||||
}
|
}
|
||||||
job {
|
job {
|
||||||
id
|
id
|
||||||
ro_number
|
ro_number
|
||||||
}
|
}
|
||||||
vendor {
|
vendor {
|
||||||
name
|
name
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_PAYMENTS_FOR_EXPORT = gql`
|
export const QUERY_PAYMENTS_FOR_EXPORT = gql`
|
||||||
query QUERY_PAYMENTS_FOR_EXPORT {
|
query QUERY_PAYMENTS_FOR_EXPORT {
|
||||||
payments(
|
payments(
|
||||||
where: { exportedat: { _is_null: true } }
|
where: { exportedat: { _is_null: true } }
|
||||||
order_by: { created_at: desc }
|
order_by: { created_at: desc }
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
amount
|
amount
|
||||||
job {
|
job {
|
||||||
ro_number
|
ro_number
|
||||||
|
|
||||||
id
|
id
|
||||||
ownr_fn
|
ownr_fn
|
||||||
ownr_ln
|
ownr_ln
|
||||||
ownr_co_nm
|
ownr_co_nm
|
||||||
}
|
}
|
||||||
payer
|
payer
|
||||||
memo
|
memo
|
||||||
exportedat
|
exportedat
|
||||||
stripeid
|
stripeid
|
||||||
created_at
|
created_at
|
||||||
transactionid
|
transactionid
|
||||||
paymentnum
|
paymentnum
|
||||||
date
|
date
|
||||||
exportlogs {
|
exportlogs {
|
||||||
id
|
id
|
||||||
successful
|
successful
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
export const INSERT_EXPORT_LOG = gql`
|
export const INSERT_EXPORT_LOG = gql`
|
||||||
mutation INSERT_EXPORT_LOG($logs: [exportlog_insert_input!]!) {
|
mutation INSERT_EXPORT_LOG($logs: [exportlog_insert_input!]!) {
|
||||||
insert_exportlog(objects: $logs) {
|
insert_exportlog(objects: $logs) {
|
||||||
affected_rows
|
affected_rows
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_PHONEBOOK_PAGINATED = gql`
|
export const QUERY_PHONEBOOK_PAGINATED = gql`
|
||||||
query QUERY_PHONEBOOK_PAGINATED(
|
query QUERY_PHONEBOOK_PAGINATED(
|
||||||
$search: String
|
$search: String
|
||||||
$offset: Int
|
$offset: Int
|
||||||
$limit: Int
|
$limit: Int
|
||||||
$order: [phonebook_order_by!]
|
$order: [phonebook_order_by!]
|
||||||
) {
|
|
||||||
search_phonebook(
|
|
||||||
offset: $offset
|
|
||||||
limit: $limit
|
|
||||||
order_by: $order
|
|
||||||
args: { search: $search }
|
|
||||||
) {
|
) {
|
||||||
id
|
search_phonebook(
|
||||||
created_at
|
offset: $offset
|
||||||
firstname
|
limit: $limit
|
||||||
lastname
|
order_by: $order
|
||||||
phone1
|
args: { search: $search }
|
||||||
phone2
|
) {
|
||||||
state
|
id
|
||||||
zip
|
created_at
|
||||||
fax
|
firstname
|
||||||
email
|
lastname
|
||||||
country
|
phone1
|
||||||
company
|
phone2
|
||||||
city
|
state
|
||||||
category
|
zip
|
||||||
address2
|
fax
|
||||||
address1
|
email
|
||||||
|
country
|
||||||
|
company
|
||||||
|
city
|
||||||
|
category
|
||||||
|
address2
|
||||||
|
address1
|
||||||
|
}
|
||||||
|
search_phonebook_aggregate(args: { search: $search }) {
|
||||||
|
aggregate {
|
||||||
|
count(distinct: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
search_phonebook_aggregate(args: { search: $search }) {
|
|
||||||
aggregate {
|
|
||||||
count(distinct: true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_EXPORT_LOG_PAGINATED = gql`
|
export const QUERY_EXPORT_LOG_PAGINATED = gql`
|
||||||
query QUERY_ALL_EXPORTLOG_PAGINATED(
|
query QUERY_ALL_EXPORTLOG_PAGINATED(
|
||||||
$search: String
|
$search: String
|
||||||
$offset: Int
|
$offset: Int
|
||||||
$limit: Int
|
$limit: Int
|
||||||
$order: [exportlog_order_by!]
|
$order: [exportlog_order_by!]
|
||||||
) {
|
|
||||||
search_exportlog(
|
|
||||||
offset: $offset
|
|
||||||
limit: $limit
|
|
||||||
order_by: $order
|
|
||||||
args: { search: $search }
|
|
||||||
) {
|
) {
|
||||||
id
|
search_exportlog(
|
||||||
job {
|
offset: $offset
|
||||||
ro_number
|
limit: $limit
|
||||||
id
|
order_by: $order
|
||||||
}
|
args: { search: $search }
|
||||||
payment {
|
) {
|
||||||
id
|
id
|
||||||
paymentnum
|
job {
|
||||||
}
|
ro_number
|
||||||
bill {
|
id
|
||||||
invoice_number
|
}
|
||||||
id
|
payment {
|
||||||
}
|
id
|
||||||
successful
|
paymentnum
|
||||||
message
|
}
|
||||||
created_at
|
bill {
|
||||||
useremail
|
invoice_number
|
||||||
|
id
|
||||||
|
}
|
||||||
|
successful
|
||||||
|
message
|
||||||
|
created_at
|
||||||
|
useremail
|
||||||
|
}
|
||||||
|
search_exportlog_aggregate(args: { search: $search }) {
|
||||||
|
aggregate {
|
||||||
|
count(distinct: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
search_exportlog_aggregate(args: { search: $search }) {
|
|
||||||
aggregate {
|
|
||||||
count(distinct: true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
import { gql } from "@apollo/client";
|
import {gql} from "@apollo/client";
|
||||||
|
|
||||||
export const INSERT_ALLOCATION = gql`
|
export const INSERT_ALLOCATION = gql`
|
||||||
mutation INSERT_ALLOCATION($alloc: [allocations_insert_input!]!) {
|
mutation INSERT_ALLOCATION($alloc: [allocations_insert_input!]!) {
|
||||||
insert_allocations(objects: $alloc) {
|
insert_allocations(objects: $alloc) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const DELETE_ALLOCATION = gql`
|
export const DELETE_ALLOCATION = gql`
|
||||||
mutation DELETE_ALLOCATION($id: uuid!) {
|
mutation DELETE_ALLOCATION($id: uuid!) {
|
||||||
delete_allocations(where: { id: { _eq: $id } }) {
|
delete_allocations(where: { id: { _eq: $id } }) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
import { onError } from "@apollo/client/link/error";
|
import {onError} from "@apollo/client/link/error";
|
||||||
//https://stackoverflow.com/questions/57163454/refreshing-a-token-with-apollo-client-firebase-auth
|
//https://stackoverflow.com/questions/57163454/refreshing-a-token-with-apollo-client-firebase-auth
|
||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
|
|
||||||
const errorLink = onError(
|
const errorLink = onError(
|
||||||
({ graphQLErrors, networkError, operation, forward }) => {
|
({graphQLErrors, networkError, operation, forward}) => {
|
||||||
if (graphQLErrors) {
|
if (graphQLErrors) {
|
||||||
graphQLErrors.forEach(({ message, locations, path }) => {
|
graphQLErrors.forEach(({message, locations, path}) => {
|
||||||
console.log(
|
console.log(
|
||||||
`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`
|
`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`
|
||||||
);
|
);
|
||||||
Sentry.captureException({ message, locations, path });
|
Sentry.captureException({message, locations, path});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
if (networkError)
|
||||||
|
console.log(`[Network error]: ${JSON.stringify(networkError)}`);
|
||||||
|
console.log(operation.getContext());
|
||||||
|
return forward(operation);
|
||||||
}
|
}
|
||||||
if (networkError)
|
|
||||||
console.log(`[Network error]: ${JSON.stringify(networkError)}`);
|
|
||||||
console.log(operation.getContext());
|
|
||||||
return forward(operation);
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
export default errorLink;
|
export default errorLink;
|
||||||
|
|||||||
@@ -1,439 +1,439 @@
|
|||||||
import { gql } from "@apollo/client";
|
import {gql} from "@apollo/client";
|
||||||
|
|
||||||
export const QUERY_ALL_ACTIVE_APPOINTMENTS = gql`
|
export const QUERY_ALL_ACTIVE_APPOINTMENTS = gql`
|
||||||
query QUERY_ALL_ACTIVE_APPOINTMENTS(
|
query QUERY_ALL_ACTIVE_APPOINTMENTS(
|
||||||
$start: timestamptz!
|
$start: timestamptz!
|
||||||
$end: timestamptz!
|
$end: timestamptz!
|
||||||
$startd: date!
|
$startd: date!
|
||||||
$endd: date!
|
$endd: date!
|
||||||
) {
|
|
||||||
employee_vacation(
|
|
||||||
where: {
|
|
||||||
_or: [
|
|
||||||
{ start: { _gte: $startd } }
|
|
||||||
{ end: { _lte: $endd } }
|
|
||||||
{ _and: [{ start: { _lte: $startd } }, { end: { _gte: $endd } }] }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
) {
|
) {
|
||||||
id
|
employee_vacation(
|
||||||
start
|
where: {
|
||||||
end
|
_or: [
|
||||||
employee {
|
{ start: { _gte: $startd } }
|
||||||
id
|
{ end: { _lte: $endd } }
|
||||||
last_name
|
{ _and: [{ start: { _lte: $startd } }, { end: { _gte: $endd } }] }
|
||||||
first_name
|
]
|
||||||
}
|
|
||||||
}
|
|
||||||
appointments(
|
|
||||||
where: {
|
|
||||||
canceled: { _eq: false }
|
|
||||||
end: { _lte: $end }
|
|
||||||
start: { _gte: $start }
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
start
|
|
||||||
id
|
|
||||||
end
|
|
||||||
arrived
|
|
||||||
title
|
|
||||||
isintake
|
|
||||||
block
|
|
||||||
color
|
|
||||||
note
|
|
||||||
job {
|
|
||||||
alt_transport
|
|
||||||
ro_number
|
|
||||||
ownr_ln
|
|
||||||
ownr_co_nm
|
|
||||||
ownr_fn
|
|
||||||
ownr_ph1
|
|
||||||
ownr_ph2
|
|
||||||
ownr_ea
|
|
||||||
clm_total
|
|
||||||
id
|
|
||||||
clm_no
|
|
||||||
ins_co_nm
|
|
||||||
v_model_yr
|
|
||||||
v_make_desc
|
|
||||||
v_model_desc
|
|
||||||
est_ct_fn
|
|
||||||
est_ct_ln
|
|
||||||
labhrs: joblines_aggregate(
|
|
||||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
|
||||||
) {
|
|
||||||
aggregate {
|
|
||||||
sum {
|
|
||||||
mod_lb_hrs
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
larhrs: joblines_aggregate(
|
|
||||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
|
||||||
) {
|
) {
|
||||||
aggregate {
|
id
|
||||||
sum {
|
start
|
||||||
mod_lb_hrs
|
end
|
||||||
|
employee {
|
||||||
|
id
|
||||||
|
last_name
|
||||||
|
first_name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appointments(
|
||||||
|
where: {
|
||||||
|
canceled: { _eq: false }
|
||||||
|
end: { _lte: $end }
|
||||||
|
start: { _gte: $start }
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
start
|
||||||
|
id
|
||||||
|
end
|
||||||
|
arrived
|
||||||
|
title
|
||||||
|
isintake
|
||||||
|
block
|
||||||
|
color
|
||||||
|
note
|
||||||
|
job {
|
||||||
|
alt_transport
|
||||||
|
ro_number
|
||||||
|
ownr_ln
|
||||||
|
ownr_co_nm
|
||||||
|
ownr_fn
|
||||||
|
ownr_ph1
|
||||||
|
ownr_ph2
|
||||||
|
ownr_ea
|
||||||
|
clm_total
|
||||||
|
id
|
||||||
|
clm_no
|
||||||
|
ins_co_nm
|
||||||
|
v_model_yr
|
||||||
|
v_make_desc
|
||||||
|
v_model_desc
|
||||||
|
est_ct_fn
|
||||||
|
est_ct_ln
|
||||||
|
labhrs: joblines_aggregate(
|
||||||
|
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
larhrs: joblines_aggregate(
|
||||||
|
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const INSERT_APPOINTMENT_BLOCK = gql`
|
export const INSERT_APPOINTMENT_BLOCK = gql`
|
||||||
mutation INSERT_APPOINTMENT_BLOCK($app: [appointments_insert_input!]!) {
|
mutation INSERT_APPOINTMENT_BLOCK($app: [appointments_insert_input!]!) {
|
||||||
insert_appointments(objects: $app) {
|
insert_appointments(objects: $app) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
start
|
start
|
||||||
end
|
end
|
||||||
arrived
|
arrived
|
||||||
title
|
title
|
||||||
isintake
|
isintake
|
||||||
block
|
block
|
||||||
note
|
note
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const INSERT_MANUAL_APPT = gql`
|
export const INSERT_MANUAL_APPT = gql`
|
||||||
mutation INSERT_MANUAL_APPT($apt: appointments_insert_input!) {
|
mutation INSERT_MANUAL_APPT($apt: appointments_insert_input!) {
|
||||||
insert_appointments_one(object: $apt) {
|
insert_appointments_one(object: $apt) {
|
||||||
start
|
start
|
||||||
id
|
id
|
||||||
end
|
end
|
||||||
arrived
|
arrived
|
||||||
title
|
title
|
||||||
isintake
|
isintake
|
||||||
block
|
block
|
||||||
color
|
color
|
||||||
note
|
note
|
||||||
canceled
|
canceled
|
||||||
job {
|
job {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const INSERT_APPOINTMENT = gql`
|
export const INSERT_APPOINTMENT = gql`
|
||||||
mutation INSERT_APPOINTMENT(
|
mutation INSERT_APPOINTMENT(
|
||||||
$app: [appointments_insert_input!]!
|
$app: [appointments_insert_input!]!
|
||||||
$jobId: uuid
|
$jobId: uuid
|
||||||
$altTransport: String
|
$altTransport: String
|
||||||
) {
|
|
||||||
insert_appointments(objects: $app) {
|
|
||||||
returning {
|
|
||||||
id
|
|
||||||
start
|
|
||||||
end
|
|
||||||
arrived
|
|
||||||
title
|
|
||||||
isintake
|
|
||||||
block
|
|
||||||
color
|
|
||||||
note
|
|
||||||
}
|
|
||||||
}
|
|
||||||
update_jobs(
|
|
||||||
where: { id: { _eq: $jobId } }
|
|
||||||
_set: { alt_transport: $altTransport }
|
|
||||||
) {
|
) {
|
||||||
returning {
|
insert_appointments(objects: $app) {
|
||||||
id
|
returning {
|
||||||
alt_transport
|
id
|
||||||
}
|
start
|
||||||
|
end
|
||||||
|
arrived
|
||||||
|
title
|
||||||
|
isintake
|
||||||
|
block
|
||||||
|
color
|
||||||
|
note
|
||||||
|
}
|
||||||
|
}
|
||||||
|
update_jobs(
|
||||||
|
where: { id: { _eq: $jobId } }
|
||||||
|
_set: { alt_transport: $altTransport }
|
||||||
|
) {
|
||||||
|
returning {
|
||||||
|
id
|
||||||
|
alt_transport
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_APPOINTMENT_BY_DATE = gql`
|
export const QUERY_APPOINTMENT_BY_DATE = gql`
|
||||||
query QUERY_APPOINTMENT_BY_DATE(
|
query QUERY_APPOINTMENT_BY_DATE(
|
||||||
$start: timestamptz
|
$start: timestamptz
|
||||||
$end: timestamptz
|
$end: timestamptz
|
||||||
$startd: date!
|
$startd: date!
|
||||||
$endd: date!
|
$endd: date!
|
||||||
) {
|
|
||||||
employee_vacation(
|
|
||||||
where: { _or: [{ start: { _gte: $startd } }, { end: { _lte: $endd } }] }
|
|
||||||
) {
|
) {
|
||||||
id
|
employee_vacation(
|
||||||
start
|
where: { _or: [{ start: { _gte: $startd } }, { end: { _lte: $endd } }] }
|
||||||
end
|
|
||||||
employee {
|
|
||||||
id
|
|
||||||
last_name
|
|
||||||
first_name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
appointments(
|
|
||||||
where: { start: { _lte: $end, _gte: $start }, canceled: { _eq: false } }
|
|
||||||
) {
|
|
||||||
start
|
|
||||||
id
|
|
||||||
end
|
|
||||||
title
|
|
||||||
isintake
|
|
||||||
block
|
|
||||||
color
|
|
||||||
note
|
|
||||||
job {
|
|
||||||
alt_transport
|
|
||||||
ro_number
|
|
||||||
ownr_ln
|
|
||||||
ownr_fn
|
|
||||||
ownr_ph1
|
|
||||||
ownr_ph2
|
|
||||||
ownr_ea
|
|
||||||
clm_total
|
|
||||||
id
|
|
||||||
clm_no
|
|
||||||
vehicle {
|
|
||||||
id
|
|
||||||
v_model_yr
|
|
||||||
v_make_desc
|
|
||||||
v_model_desc
|
|
||||||
}
|
|
||||||
labhrs: joblines_aggregate(
|
|
||||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
|
||||||
) {
|
) {
|
||||||
aggregate {
|
id
|
||||||
sum {
|
start
|
||||||
mod_lb_hrs
|
end
|
||||||
|
employee {
|
||||||
|
id
|
||||||
|
last_name
|
||||||
|
first_name
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
larhrs: joblines_aggregate(
|
appointments(
|
||||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
where: { start: { _lte: $end, _gte: $start }, canceled: { _eq: false } }
|
||||||
) {
|
) {
|
||||||
aggregate {
|
start
|
||||||
sum {
|
id
|
||||||
mod_lb_hrs
|
end
|
||||||
|
title
|
||||||
|
isintake
|
||||||
|
block
|
||||||
|
color
|
||||||
|
note
|
||||||
|
job {
|
||||||
|
alt_transport
|
||||||
|
ro_number
|
||||||
|
ownr_ln
|
||||||
|
ownr_fn
|
||||||
|
ownr_ph1
|
||||||
|
ownr_ph2
|
||||||
|
ownr_ea
|
||||||
|
clm_total
|
||||||
|
id
|
||||||
|
clm_no
|
||||||
|
vehicle {
|
||||||
|
id
|
||||||
|
v_model_yr
|
||||||
|
v_make_desc
|
||||||
|
v_model_desc
|
||||||
|
}
|
||||||
|
labhrs: joblines_aggregate(
|
||||||
|
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
larhrs: joblines_aggregate(
|
||||||
|
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const UPDATE_APPOINTMENT = gql`
|
export const UPDATE_APPOINTMENT = gql`
|
||||||
mutation UPDATE_APPOINTMENT($appid: uuid!, $app: appointments_set_input) {
|
mutation UPDATE_APPOINTMENT($appid: uuid!, $app: appointments_set_input) {
|
||||||
update_appointments(where: { id: { _eq: $appid } }, _set: $app) {
|
update_appointments(where: { id: { _eq: $appid } }, _set: $app) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
start
|
start
|
||||||
id
|
id
|
||||||
end
|
end
|
||||||
arrived
|
arrived
|
||||||
title
|
title
|
||||||
isintake
|
isintake
|
||||||
block
|
block
|
||||||
color
|
color
|
||||||
note
|
note
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const CANCEL_APPOINTMENT_BY_ID = gql`
|
export const CANCEL_APPOINTMENT_BY_ID = gql`
|
||||||
mutation CANCEL_APPOINTMENT_BY_ID($appid: uuid!) {
|
mutation CANCEL_APPOINTMENT_BY_ID($appid: uuid!) {
|
||||||
update_appointments(
|
update_appointments(
|
||||||
where: { id: { _eq: $appid } }
|
where: { id: { _eq: $appid } }
|
||||||
_set: { canceled: true }
|
_set: { canceled: true }
|
||||||
) {
|
) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
canceled
|
canceled
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const CANCEL_APPOINTMENTS_BY_JOB_ID = gql`
|
export const CANCEL_APPOINTMENTS_BY_JOB_ID = gql`
|
||||||
mutation CANCEL_APPOINTMENTS_BY_JOB_ID($jobid: uuid!, $job: jobs_set_input) {
|
mutation CANCEL_APPOINTMENTS_BY_JOB_ID($jobid: uuid!, $job: jobs_set_input) {
|
||||||
update_appointments(
|
update_appointments(
|
||||||
where: { _and: { jobid: { _eq: $jobid }, arrived: { _eq: false } } }
|
where: { _and: { jobid: { _eq: $jobid }, arrived: { _eq: false } } }
|
||||||
_set: { canceled: true }
|
_set: { canceled: true }
|
||||||
) {
|
) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
canceled
|
canceled
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
update_jobs_by_pk(pk_columns: { id: $jobid }, _set: $job) {
|
||||||
|
date_scheduled
|
||||||
|
id
|
||||||
|
scheduled_in
|
||||||
|
scheduled_completion
|
||||||
|
status
|
||||||
|
lost_sale_reason
|
||||||
|
date_lost_sale
|
||||||
|
}
|
||||||
}
|
}
|
||||||
update_jobs_by_pk(pk_columns: { id: $jobid }, _set: $job) {
|
|
||||||
date_scheduled
|
|
||||||
id
|
|
||||||
scheduled_in
|
|
||||||
scheduled_completion
|
|
||||||
status
|
|
||||||
lost_sale_reason
|
|
||||||
date_lost_sale
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_APPOINTMENTS_BY_JOBID = gql`
|
export const QUERY_APPOINTMENTS_BY_JOBID = gql`
|
||||||
query QUERY_APPOINTMENTS_BY_JOBID($jobid: uuid!) {
|
query QUERY_APPOINTMENTS_BY_JOBID($jobid: uuid!) {
|
||||||
appointments(where: { jobid: { _eq: $jobid } }, order_by: { start: desc }) {
|
appointments(where: { jobid: { _eq: $jobid } }, order_by: { start: desc }) {
|
||||||
start
|
start
|
||||||
id
|
id
|
||||||
end
|
end
|
||||||
color
|
color
|
||||||
isintake
|
isintake
|
||||||
arrived
|
arrived
|
||||||
canceled
|
canceled
|
||||||
created_at
|
created_at
|
||||||
block
|
block
|
||||||
note
|
note
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
export const QUERY_SCHEDULE_LOAD_DATA = gql`
|
export const QUERY_SCHEDULE_LOAD_DATA = gql`
|
||||||
query QUERY_SCHEDULE_LOAD_DATA($start: timestamptz!, $end: timestamptz!) {
|
query QUERY_SCHEDULE_LOAD_DATA($start: timestamptz!, $end: timestamptz!) {
|
||||||
prodJobs: jobs(
|
prodJobs: jobs(
|
||||||
where: { inproduction: { _eq: true }, suspended: { _eq: false } }
|
where: { inproduction: { _eq: true }, suspended: { _eq: false } }
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
actual_in
|
actual_in
|
||||||
scheduled_in
|
scheduled_in
|
||||||
actual_completion
|
actual_completion
|
||||||
scheduled_completion
|
scheduled_completion
|
||||||
inproduction
|
inproduction
|
||||||
ro_number
|
ro_number
|
||||||
labhrs: joblines_aggregate(
|
labhrs: joblines_aggregate(
|
||||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||||
) {
|
) {
|
||||||
aggregate {
|
aggregate {
|
||||||
sum {
|
sum {
|
||||||
mod_lb_hrs
|
mod_lb_hrs
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
larhrs: joblines_aggregate(
|
||||||
|
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
compJobs: jobs(
|
||||||
larhrs: joblines_aggregate(
|
where: {
|
||||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
_and: [
|
||||||
) {
|
{ suspended: { _eq: false } }
|
||||||
aggregate {
|
{
|
||||||
sum {
|
_or: [
|
||||||
mod_lb_hrs
|
{ scheduled_completion: { _gte: $start, _lte: $end } }
|
||||||
}
|
{ actual_completion: { _gte: $start, _lte: $end } }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
id
|
||||||
|
status
|
||||||
|
ro_number
|
||||||
|
scheduled_completion
|
||||||
|
actual_completion
|
||||||
|
scheduled_in
|
||||||
|
ownr_fn
|
||||||
|
ownr_ln
|
||||||
|
ownr_co_nm
|
||||||
|
inproduction
|
||||||
|
labhrs: joblines_aggregate(
|
||||||
|
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
larhrs: joblines_aggregate(
|
||||||
|
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arrJobs: jobs(
|
||||||
|
where: {
|
||||||
|
scheduled_in: { _gte: $start, _lte: $end }
|
||||||
|
suspended: { _eq: false }
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
id
|
||||||
|
scheduled_in
|
||||||
|
actual_in
|
||||||
|
scheduled_completion
|
||||||
|
ro_number
|
||||||
|
ownr_fn
|
||||||
|
ownr_ln
|
||||||
|
ownr_co_nm
|
||||||
|
alt_transport
|
||||||
|
actual_completion
|
||||||
|
inproduction
|
||||||
|
status
|
||||||
|
labhrs: joblines_aggregate(
|
||||||
|
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
larhrs: joblines_aggregate(
|
||||||
|
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
compJobs: jobs(
|
|
||||||
where: {
|
|
||||||
_and: [
|
|
||||||
{ suspended: { _eq: false } }
|
|
||||||
{
|
|
||||||
_or: [
|
|
||||||
{ scheduled_completion: { _gte: $start, _lte: $end } }
|
|
||||||
{ actual_completion: { _gte: $start, _lte: $end } }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
id
|
|
||||||
status
|
|
||||||
ro_number
|
|
||||||
scheduled_completion
|
|
||||||
actual_completion
|
|
||||||
scheduled_in
|
|
||||||
ownr_fn
|
|
||||||
ownr_ln
|
|
||||||
ownr_co_nm
|
|
||||||
inproduction
|
|
||||||
labhrs: joblines_aggregate(
|
|
||||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
|
||||||
) {
|
|
||||||
aggregate {
|
|
||||||
sum {
|
|
||||||
mod_lb_hrs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
larhrs: joblines_aggregate(
|
|
||||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
|
||||||
) {
|
|
||||||
aggregate {
|
|
||||||
sum {
|
|
||||||
mod_lb_hrs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
arrJobs: jobs(
|
|
||||||
where: {
|
|
||||||
scheduled_in: { _gte: $start, _lte: $end }
|
|
||||||
suspended: { _eq: false }
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
id
|
|
||||||
scheduled_in
|
|
||||||
actual_in
|
|
||||||
scheduled_completion
|
|
||||||
ro_number
|
|
||||||
ownr_fn
|
|
||||||
ownr_ln
|
|
||||||
ownr_co_nm
|
|
||||||
alt_transport
|
|
||||||
actual_completion
|
|
||||||
inproduction
|
|
||||||
status
|
|
||||||
labhrs: joblines_aggregate(
|
|
||||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
|
||||||
) {
|
|
||||||
aggregate {
|
|
||||||
sum {
|
|
||||||
mod_lb_hrs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
larhrs: joblines_aggregate(
|
|
||||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
|
||||||
) {
|
|
||||||
aggregate {
|
|
||||||
sum {
|
|
||||||
mod_lb_hrs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const MARK_APPOINTMENT_ARRIVED = gql`
|
export const MARK_APPOINTMENT_ARRIVED = gql`
|
||||||
mutation MARK_APPOINTMENT_ARRIVED($appointmentId: uuid!) {
|
mutation MARK_APPOINTMENT_ARRIVED($appointmentId: uuid!) {
|
||||||
update_appointments(
|
update_appointments(
|
||||||
where: { id: { _eq: $appointmentId } }
|
where: { id: { _eq: $appointmentId } }
|
||||||
_set: { arrived: true }
|
_set: { arrived: true }
|
||||||
) {
|
) {
|
||||||
affected_rows
|
affected_rows
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
arrived
|
arrived
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
export const MARK_LATEST_APPOINTMENT_ARRIVED = gql`
|
export const MARK_LATEST_APPOINTMENT_ARRIVED = gql`
|
||||||
mutation MARK_LATEST_APPOINTMENT_ARRIVED($jobId: uuid!) {
|
mutation MARK_LATEST_APPOINTMENT_ARRIVED($jobId: uuid!) {
|
||||||
update_appointments(
|
update_appointments(
|
||||||
where: {
|
where: {
|
||||||
jobid: { _eq: $jobId }
|
jobid: { _eq: $jobId }
|
||||||
canceled: { _eq: false }
|
canceled: { _eq: false }
|
||||||
isintake: { _eq: true }
|
isintake: { _eq: true }
|
||||||
}
|
}
|
||||||
_set: { arrived: true }
|
_set: { arrived: true }
|
||||||
) {
|
) {
|
||||||
affected_rows
|
affected_rows
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
arrived
|
arrived
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1,70 +1,70 @@
|
|||||||
import { gql } from "@apollo/client";
|
import {gql} from "@apollo/client";
|
||||||
|
|
||||||
export const QUERY_ALL_ASSOCIATIONS = gql`
|
export const QUERY_ALL_ASSOCIATIONS = gql`
|
||||||
query QUERY_ALL_ASSOCIATIONS($email: String) {
|
query QUERY_ALL_ASSOCIATIONS($email: String) {
|
||||||
associations(
|
associations(
|
||||||
where: { useremail: { _eq: $email } }
|
where: { useremail: { _eq: $email } }
|
||||||
order_by: { bodyshop: { shopname: asc } }
|
order_by: { bodyshop: { shopname: asc } }
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
active
|
active
|
||||||
bodyshop {
|
bodyshop {
|
||||||
shopname
|
shopname
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const UPDATE_ASSOCIATION = gql`
|
export const UPDATE_ASSOCIATION = gql`
|
||||||
mutation UPDATE_ASSOCIATION($assocId: uuid, $assocActive: Boolean) {
|
mutation UPDATE_ASSOCIATION($assocId: uuid, $assocActive: Boolean) {
|
||||||
update_associations(
|
update_associations(
|
||||||
where: { id: { _eq: $assocId } }
|
where: { id: { _eq: $assocId } }
|
||||||
_set: { active: $assocActive }
|
_set: { active: $assocActive }
|
||||||
) {
|
) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
active
|
active
|
||||||
authlevel
|
authlevel
|
||||||
default_prod_list_view
|
default_prod_list_view
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
export const UPDATE_ACTIVE_ASSOCIATION = gql`
|
export const UPDATE_ACTIVE_ASSOCIATION = gql`
|
||||||
mutation UPDATE_ACTIVE_ASSOCIATION($newActiveAssocId: uuid) {
|
mutation UPDATE_ACTIVE_ASSOCIATION($newActiveAssocId: uuid) {
|
||||||
nweActive: update_associations(
|
nweActive: update_associations(
|
||||||
where: { id: { _eq: $newActiveAssocId } }
|
where: { id: { _eq: $newActiveAssocId } }
|
||||||
_set: { active: true }
|
_set: { active: true }
|
||||||
) {
|
) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
shopid
|
shopid
|
||||||
active
|
active
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
inactive: update_associations(
|
||||||
|
where: { id: { _neq: $newActiveAssocId } }
|
||||||
|
_set: { active: false }
|
||||||
|
) {
|
||||||
|
returning {
|
||||||
|
id
|
||||||
|
shopid
|
||||||
|
active
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
inactive: update_associations(
|
|
||||||
where: { id: { _neq: $newActiveAssocId } }
|
|
||||||
_set: { active: false }
|
|
||||||
) {
|
|
||||||
returning {
|
|
||||||
id
|
|
||||||
shopid
|
|
||||||
active
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const UPDATE_ACTIVE_PROD_LIST_VIEW = gql`
|
export const UPDATE_ACTIVE_PROD_LIST_VIEW = gql`
|
||||||
mutation UPDATE_ACTIVE_PROD_LIST_VIEW($assocId: uuid, $view: String) {
|
mutation UPDATE_ACTIVE_PROD_LIST_VIEW($assocId: uuid, $view: String) {
|
||||||
update_associations(
|
update_associations(
|
||||||
where: { id: { _eq: $assocId } }
|
where: { id: { _eq: $assocId } }
|
||||||
_set: { default_prod_list_view: $view }
|
_set: { default_prod_list_view: $view }
|
||||||
) {
|
) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
default_prod_list_view
|
default_prod_list_view
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1,46 +1,46 @@
|
|||||||
import { gql } from "@apollo/client";
|
import {gql} from "@apollo/client";
|
||||||
|
|
||||||
export const QUERY_AUDIT_TRAIL = gql`
|
export const QUERY_AUDIT_TRAIL = gql`
|
||||||
query QUERY_AUDIT_TRAIL($jobid: uuid!) {
|
query QUERY_AUDIT_TRAIL($jobid: uuid!) {
|
||||||
audit_trail(
|
audit_trail(
|
||||||
where: { jobid: { _eq: $jobid } }
|
where: { jobid: { _eq: $jobid } }
|
||||||
order_by: { created: desc }
|
order_by: { created: desc }
|
||||||
) {
|
) {
|
||||||
useremail
|
useremail
|
||||||
jobid
|
jobid
|
||||||
operation
|
operation
|
||||||
id
|
id
|
||||||
created
|
created
|
||||||
bodyshopid
|
bodyshopid
|
||||||
|
}
|
||||||
|
email_audit_trail(
|
||||||
|
where: { jobid: { _eq: $jobid } }
|
||||||
|
order_by: { created_at: desc }
|
||||||
|
) {
|
||||||
|
cc
|
||||||
|
contents
|
||||||
|
created_at
|
||||||
|
id
|
||||||
|
jobid
|
||||||
|
noteid
|
||||||
|
subject
|
||||||
|
to
|
||||||
|
useremail
|
||||||
|
status
|
||||||
|
}
|
||||||
}
|
}
|
||||||
email_audit_trail(
|
|
||||||
where: { jobid: { _eq: $jobid } }
|
|
||||||
order_by: { created_at: desc }
|
|
||||||
) {
|
|
||||||
cc
|
|
||||||
contents
|
|
||||||
created_at
|
|
||||||
id
|
|
||||||
jobid
|
|
||||||
noteid
|
|
||||||
subject
|
|
||||||
to
|
|
||||||
useremail
|
|
||||||
status
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const INSERT_AUDIT_TRAIL = gql`
|
export const INSERT_AUDIT_TRAIL = gql`
|
||||||
mutation INSERT_AUDIT_TRAIL($auditObj: audit_trail_insert_input!) {
|
mutation INSERT_AUDIT_TRAIL($auditObj: audit_trail_insert_input!) {
|
||||||
insert_audit_trail_one(object: $auditObj) {
|
insert_audit_trail_one(object: $auditObj) {
|
||||||
id
|
id
|
||||||
jobid
|
jobid
|
||||||
billid
|
billid
|
||||||
bodyshopid
|
bodyshopid
|
||||||
created
|
created
|
||||||
operation
|
operation
|
||||||
useremail
|
useremail
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1,118 +1,118 @@
|
|||||||
import { gql } from "@apollo/client";
|
import {gql} from "@apollo/client";
|
||||||
|
|
||||||
export const QUERY_AVAILABLE_JOBS = gql`
|
export const QUERY_AVAILABLE_JOBS = gql`
|
||||||
query QUERY_AVAILABLE_JOBS {
|
query QUERY_AVAILABLE_JOBS {
|
||||||
available_jobs(order_by: { updated_at: desc }) {
|
available_jobs(order_by: { updated_at: desc }) {
|
||||||
cieca_id
|
cieca_id
|
||||||
clm_amt
|
clm_amt
|
||||||
clm_no
|
clm_no
|
||||||
created_at
|
created_at
|
||||||
id
|
id
|
||||||
issupplement
|
issupplement
|
||||||
ownr_name
|
ownr_name
|
||||||
source_system
|
source_system
|
||||||
supplement_number
|
supplement_number
|
||||||
updated_at
|
updated_at
|
||||||
uploaded_by
|
uploaded_by
|
||||||
ins_co_nm
|
ins_co_nm
|
||||||
vehicle_info
|
vehicle_info
|
||||||
job {
|
job {
|
||||||
id
|
id
|
||||||
ro_number
|
ro_number
|
||||||
status
|
status
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_AVAILABLE_NEW_JOBS = gql`
|
export const QUERY_AVAILABLE_NEW_JOBS = gql`
|
||||||
query QUERY_AVAILABLE_NEW_JOBS {
|
query QUERY_AVAILABLE_NEW_JOBS {
|
||||||
available_jobs(
|
available_jobs(
|
||||||
where: { issupplement: { _eq: false } }
|
where: { issupplement: { _eq: false } }
|
||||||
order_by: { updated_at: desc }
|
order_by: { updated_at: desc }
|
||||||
) {
|
) {
|
||||||
cieca_id
|
cieca_id
|
||||||
clm_amt
|
clm_amt
|
||||||
clm_no
|
clm_no
|
||||||
created_at
|
created_at
|
||||||
id
|
id
|
||||||
issupplement
|
issupplement
|
||||||
ownr_name
|
ownr_name
|
||||||
source_system
|
source_system
|
||||||
supplement_number
|
supplement_number
|
||||||
updated_at
|
updated_at
|
||||||
uploaded_by
|
uploaded_by
|
||||||
ins_co_nm
|
ins_co_nm
|
||||||
vehicle_info
|
vehicle_info
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_AVAILABLE_SUPPLEMENT_JOBS = gql`
|
export const QUERY_AVAILABLE_SUPPLEMENT_JOBS = gql`
|
||||||
query QUERY_AVAILABLE_SUPPLEMENT_JOBS {
|
query QUERY_AVAILABLE_SUPPLEMENT_JOBS {
|
||||||
available_jobs(
|
available_jobs(
|
||||||
where: { issupplement: { _eq: true } }
|
where: { issupplement: { _eq: true } }
|
||||||
order_by: { updated_at: desc }
|
order_by: { updated_at: desc }
|
||||||
) {
|
) {
|
||||||
cieca_id
|
cieca_id
|
||||||
clm_amt
|
clm_amt
|
||||||
clm_no
|
clm_no
|
||||||
created_at
|
created_at
|
||||||
id
|
id
|
||||||
issupplement
|
issupplement
|
||||||
ownr_name
|
ownr_name
|
||||||
source_system
|
source_system
|
||||||
supplement_number
|
supplement_number
|
||||||
updated_at
|
updated_at
|
||||||
uploaded_by
|
uploaded_by
|
||||||
ins_co_nm
|
ins_co_nm
|
||||||
vehicle_info
|
vehicle_info
|
||||||
job {
|
job {
|
||||||
id
|
id
|
||||||
ro_number
|
ro_number
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const DELETE_AVAILABLE_JOB = gql`
|
export const DELETE_AVAILABLE_JOB = gql`
|
||||||
mutation DELETE_AVAILABLE_JOB($id: uuid) {
|
mutation DELETE_AVAILABLE_JOB($id: uuid) {
|
||||||
delete_available_jobs(where: { id: { _eq: $id } }) {
|
delete_available_jobs(where: { id: { _eq: $id } }) {
|
||||||
affected_rows
|
affected_rows
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const DELETE_ALL_AVAILABLE_JOBS = gql`
|
export const DELETE_ALL_AVAILABLE_JOBS = gql`
|
||||||
mutation DELETE_ALL_AVAILABLE_JOBS {
|
mutation DELETE_ALL_AVAILABLE_JOBS {
|
||||||
delete_available_jobs(where: {}) {
|
delete_available_jobs(where: {}) {
|
||||||
affected_rows
|
affected_rows
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const DELETE_ALL_AVAILABLE_NEW_JOBS = gql`
|
export const DELETE_ALL_AVAILABLE_NEW_JOBS = gql`
|
||||||
mutation DELETE_ALL_AVAILABLE_NEW_JOBS {
|
mutation DELETE_ALL_AVAILABLE_NEW_JOBS {
|
||||||
delete_available_jobs(where: { issupplement: { _eq: false } }) {
|
delete_available_jobs(where: { issupplement: { _eq: false } }) {
|
||||||
affected_rows
|
affected_rows
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const DELETE_ALL_AVAILABLE_SUPPLEMENT_JOBS = gql`
|
export const DELETE_ALL_AVAILABLE_SUPPLEMENT_JOBS = gql`
|
||||||
mutation DELETE_ALL_AVAILABLE_NEW_JOBS {
|
mutation DELETE_ALL_AVAILABLE_NEW_JOBS {
|
||||||
delete_available_jobs(where: { issupplement: { _eq: true } }) {
|
delete_available_jobs(where: { issupplement: { _eq: true } }) {
|
||||||
affected_rows
|
affected_rows
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_AVAILABLE_NEW_JOBS_EST_DATA_BY_PK = gql`
|
export const QUERY_AVAILABLE_NEW_JOBS_EST_DATA_BY_PK = gql`
|
||||||
query QUERY_AVAILABLE_NEW_JOBS_EST_DATA_BY_PK($id: uuid!) {
|
query QUERY_AVAILABLE_NEW_JOBS_EST_DATA_BY_PK($id: uuid!) {
|
||||||
available_jobs_by_pk(id: $id) {
|
available_jobs_by_pk(id: $id) {
|
||||||
id
|
id
|
||||||
issupplement
|
issupplement
|
||||||
est_data
|
est_data
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
import { gql } from "@apollo/client";
|
import {gql} from "@apollo/client";
|
||||||
|
|
||||||
export const UPDATE_BILL_LINE = gql`
|
export const UPDATE_BILL_LINE = gql`
|
||||||
mutation UPDATE_BILL_LINE(
|
mutation UPDATE_BILL_LINE(
|
||||||
$billLineId: uuid!
|
$billLineId: uuid!
|
||||||
$billLine: billlines_set_input!
|
$billLine: billlines_set_input!
|
||||||
) {
|
) {
|
||||||
update_billlines(where: { id: { _eq: $billLineId } }, _set: $billLine) {
|
update_billlines(where: { id: { _eq: $billLineId } }, _set: $billLine) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
export const DELETE_BILL_LINE = gql`
|
export const DELETE_BILL_LINE = gql`
|
||||||
mutation DELETE_BILL_LINE($id: uuid!) {
|
mutation DELETE_BILL_LINE($id: uuid!) {
|
||||||
delete_billlines_by_pk(id: $id) {
|
delete_billlines_by_pk(id: $id) {
|
||||||
id
|
id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const INSERT_NEW_BILL_LINES = gql`
|
export const INSERT_NEW_BILL_LINES = gql`
|
||||||
mutation INSERT_NEW_BILL_LINES($billLines: [billlines_insert_input!]!) {
|
mutation INSERT_NEW_BILL_LINES($billLines: [billlines_insert_input!]!) {
|
||||||
insert_billlines(objects: $billLines) {
|
insert_billlines(objects: $billLines) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1,250 +1,250 @@
|
|||||||
import { gql } from "@apollo/client";
|
import {gql} from "@apollo/client";
|
||||||
|
|
||||||
export const INSERT_NEW_BILL = gql`
|
export const INSERT_NEW_BILL = gql`
|
||||||
mutation INSERT_NEW_BILL($bill: [bills_insert_input!]!) {
|
mutation INSERT_NEW_BILL($bill: [bills_insert_input!]!) {
|
||||||
insert_bills(objects: $bill) {
|
insert_bills(objects: $bill) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
invoice_number
|
invoice_number
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const DELETE_BILL = gql`
|
export const DELETE_BILL = gql`
|
||||||
mutation DELETE_BILL($billId: uuid!) {
|
mutation DELETE_BILL($billId: uuid!) {
|
||||||
delete_bills_by_pk(id: $billId) {
|
delete_bills_by_pk(id: $billId) {
|
||||||
id
|
id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_ALL_BILLS_PAGINATED = gql`
|
export const QUERY_ALL_BILLS_PAGINATED = gql`
|
||||||
query QUERY_ALL_BILLS_PAGINATED(
|
query QUERY_ALL_BILLS_PAGINATED(
|
||||||
$offset: Int
|
$offset: Int
|
||||||
$limit: Int
|
$limit: Int
|
||||||
$order: [bills_order_by!]!
|
$order: [bills_order_by!]!
|
||||||
) {
|
) {
|
||||||
bills(offset: $offset, limit: $limit, order_by: $order) {
|
bills(offset: $offset, limit: $limit, order_by: $order) {
|
||||||
id
|
id
|
||||||
vendorid
|
vendorid
|
||||||
vendor {
|
vendor {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
federal_tax_rate
|
federal_tax_rate
|
||||||
local_tax_rate
|
local_tax_rate
|
||||||
state_tax_rate
|
state_tax_rate
|
||||||
is_credit_memo
|
is_credit_memo
|
||||||
total
|
total
|
||||||
invoice_number
|
invoice_number
|
||||||
date
|
date
|
||||||
isinhouse
|
isinhouse
|
||||||
exported
|
exported
|
||||||
job {
|
job {
|
||||||
id
|
id
|
||||||
ro_number
|
ro_number
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
bills_aggregate {
|
||||||
|
aggregate {
|
||||||
|
count(distinct: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
bills_aggregate {
|
|
||||||
aggregate {
|
|
||||||
count(distinct: true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_BILLS_BY_JOBID = gql`
|
export const QUERY_BILLS_BY_JOBID = gql`
|
||||||
query QUERY_PARTS_BILLS_BY_JOBID($jobid: uuid!) {
|
query QUERY_PARTS_BILLS_BY_JOBID($jobid: uuid!) {
|
||||||
parts_orders(
|
parts_orders(
|
||||||
where: { jobid: { _eq: $jobid } }
|
where: { jobid: { _eq: $jobid } }
|
||||||
order_by: { order_date: desc }
|
order_by: { order_date: desc }
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
vendor {
|
vendor {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
email
|
email
|
||||||
}
|
}
|
||||||
order_date
|
order_date
|
||||||
deliver_by
|
deliver_by
|
||||||
return
|
return
|
||||||
orderedby
|
orderedby
|
||||||
parts_order_lines {
|
parts_order_lines {
|
||||||
id
|
id
|
||||||
act_price
|
act_price
|
||||||
db_price
|
db_price
|
||||||
line_desc
|
line_desc
|
||||||
oem_partno
|
oem_partno
|
||||||
status
|
status
|
||||||
line_remarks
|
line_remarks
|
||||||
quantity
|
quantity
|
||||||
job_line_id
|
job_line_id
|
||||||
part_type
|
part_type
|
||||||
cost
|
cost
|
||||||
cm_received
|
cm_received
|
||||||
jobline {
|
jobline {
|
||||||
id
|
id
|
||||||
part_type
|
part_type
|
||||||
|
}
|
||||||
|
backordered_eta
|
||||||
|
backordered_on
|
||||||
|
}
|
||||||
|
order_number
|
||||||
|
comments
|
||||||
|
user_email
|
||||||
}
|
}
|
||||||
backordered_eta
|
parts_dispatch(where: { jobid: { _eq: $jobid } }) {
|
||||||
backordered_on
|
id
|
||||||
}
|
dispatched_at
|
||||||
order_number
|
dispatched_by
|
||||||
comments
|
employeeid
|
||||||
user_email
|
number
|
||||||
}
|
parts_dispatch_lines {
|
||||||
parts_dispatch(where: { jobid: { _eq: $jobid } }) {
|
joblineid
|
||||||
id
|
id
|
||||||
dispatched_at
|
quantity
|
||||||
dispatched_by
|
accepted_at
|
||||||
employeeid
|
jobline {
|
||||||
number
|
id
|
||||||
parts_dispatch_lines {
|
line_desc
|
||||||
joblineid
|
}
|
||||||
id
|
}
|
||||||
quantity
|
|
||||||
accepted_at
|
|
||||||
jobline {
|
|
||||||
id
|
|
||||||
line_desc
|
|
||||||
}
|
}
|
||||||
}
|
bills(where: { jobid: { _eq: $jobid } }, order_by: { date: desc }) {
|
||||||
}
|
id
|
||||||
bills(where: { jobid: { _eq: $jobid } }, order_by: { date: desc }) {
|
vendorid
|
||||||
id
|
vendor {
|
||||||
vendorid
|
id
|
||||||
vendor {
|
name
|
||||||
id
|
email
|
||||||
name
|
}
|
||||||
email
|
total
|
||||||
}
|
invoice_number
|
||||||
total
|
date
|
||||||
invoice_number
|
federal_tax_rate
|
||||||
date
|
state_tax_rate
|
||||||
federal_tax_rate
|
local_tax_rate
|
||||||
state_tax_rate
|
is_credit_memo
|
||||||
local_tax_rate
|
isinhouse
|
||||||
is_credit_memo
|
exported
|
||||||
isinhouse
|
billlines {
|
||||||
exported
|
actual_price
|
||||||
billlines {
|
quantity
|
||||||
actual_price
|
actual_cost
|
||||||
quantity
|
cost_center
|
||||||
actual_cost
|
id
|
||||||
cost_center
|
joblineid
|
||||||
id
|
line_desc
|
||||||
joblineid
|
applicable_taxes
|
||||||
line_desc
|
deductedfromlbr
|
||||||
applicable_taxes
|
lbr_adjustment
|
||||||
deductedfromlbr
|
jobline {
|
||||||
lbr_adjustment
|
oem_partno
|
||||||
jobline {
|
part_type
|
||||||
oem_partno
|
}
|
||||||
part_type
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_BILL_BY_PK = gql`
|
export const QUERY_BILL_BY_PK = gql`
|
||||||
query QUERY_BILL_BY_PK($billid: uuid!) {
|
query QUERY_BILL_BY_PK($billid: uuid!) {
|
||||||
bills_by_pk(id: $billid) {
|
bills_by_pk(id: $billid) {
|
||||||
due_date
|
due_date
|
||||||
exported
|
exported
|
||||||
exported_at
|
exported_at
|
||||||
id
|
id
|
||||||
invoice_number
|
invoice_number
|
||||||
date
|
date
|
||||||
is_credit_memo
|
is_credit_memo
|
||||||
jobid
|
jobid
|
||||||
total
|
total
|
||||||
updated_at
|
updated_at
|
||||||
vendorid
|
vendorid
|
||||||
local_tax_rate
|
local_tax_rate
|
||||||
state_tax_rate
|
state_tax_rate
|
||||||
federal_tax_rate
|
federal_tax_rate
|
||||||
isinhouse
|
isinhouse
|
||||||
inventories {
|
inventories {
|
||||||
id
|
id
|
||||||
line_desc
|
line_desc
|
||||||
}
|
}
|
||||||
vendor {
|
vendor {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
discount
|
discount
|
||||||
}
|
}
|
||||||
billlines {
|
billlines {
|
||||||
id
|
id
|
||||||
line_desc
|
line_desc
|
||||||
actual_price
|
actual_price
|
||||||
actual_cost
|
actual_cost
|
||||||
cost_center
|
cost_center
|
||||||
quantity
|
quantity
|
||||||
joblineid
|
joblineid
|
||||||
inventories {
|
inventories {
|
||||||
id
|
id
|
||||||
|
}
|
||||||
|
jobline {
|
||||||
|
oem_partno
|
||||||
|
part_type
|
||||||
|
}
|
||||||
|
applicable_taxes
|
||||||
|
deductedfromlbr
|
||||||
|
lbr_adjustment
|
||||||
|
}
|
||||||
|
documents {
|
||||||
|
id
|
||||||
|
key
|
||||||
|
name
|
||||||
|
type
|
||||||
|
size
|
||||||
|
}
|
||||||
}
|
}
|
||||||
jobline {
|
|
||||||
oem_partno
|
|
||||||
part_type
|
|
||||||
}
|
|
||||||
applicable_taxes
|
|
||||||
deductedfromlbr
|
|
||||||
lbr_adjustment
|
|
||||||
}
|
|
||||||
documents {
|
|
||||||
id
|
|
||||||
key
|
|
||||||
name
|
|
||||||
type
|
|
||||||
size
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const UPDATE_BILL = gql`
|
export const UPDATE_BILL = gql`
|
||||||
mutation UPDATE_BILL($billId: uuid!, $bill: bills_set_input!) {
|
mutation UPDATE_BILL($billId: uuid!, $bill: bills_set_input!) {
|
||||||
update_bills(where: { id: { _eq: $billId } }, _set: $bill) {
|
update_bills(where: { id: { _eq: $billId } }, _set: $bill) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
exported
|
exported
|
||||||
exported_at
|
exported_at
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const UPDATE_BILLS = gql`
|
export const UPDATE_BILLS = gql`
|
||||||
mutation UPDATE_BILLS($billIdList: [uuid!]!, $bill: bills_set_input!) {
|
mutation UPDATE_BILLS($billIdList: [uuid!]!, $bill: bills_set_input!) {
|
||||||
update_bills(where: { id: { _in: $billIdList } }, _set: $bill) {
|
update_bills(where: { id: { _in: $billIdList } }, _set: $bill) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
exported
|
exported
|
||||||
exported_at
|
exported_at
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const CHECK_BILL_INVOICE_NUMBER = gql`
|
export const CHECK_BILL_INVOICE_NUMBER = gql`
|
||||||
query CHECK_BILL_INVOICE_NUMBER($invoice_number: String!, $vendorid: uuid!) {
|
query CHECK_BILL_INVOICE_NUMBER($invoice_number: String!, $vendorid: uuid!) {
|
||||||
bills_aggregate(
|
bills_aggregate(
|
||||||
where: {
|
where: {
|
||||||
_and: {
|
_and: {
|
||||||
invoice_number: { _ilike: $invoice_number }
|
invoice_number: { _ilike: $invoice_number }
|
||||||
vendorid: { _eq: $vendorid }
|
vendorid: { _eq: $vendorid }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
count
|
||||||
|
}
|
||||||
|
nodes {
|
||||||
|
id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
) {
|
|
||||||
aggregate {
|
|
||||||
count
|
|
||||||
}
|
|
||||||
nodes {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1,358 +1,359 @@
|
|||||||
import { gql } from "@apollo/client";
|
import {gql} from "@apollo/client";
|
||||||
|
|
||||||
export const INTROSPECTION = gql`
|
export const INTROSPECTION = gql`
|
||||||
query INTROSPECTION {
|
query INTROSPECTION {
|
||||||
__schema {
|
__schema {
|
||||||
types {
|
types {
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_EULA = gql`
|
export const QUERY_EULA = gql`
|
||||||
query QUERY_EULA($now: timestamptz!) {
|
query QUERY_EULA($now: timestamptz!) {
|
||||||
eulas(where: {effective_date: {_lte: $now}, _or: [{end_date: {_is_null: true}}, {end_date: {_gt: $now}}]}) {
|
eulas(where: {effective_date: {_lte: $now}, _or: [{end_date: {_is_null: true}}, {end_date: {_gt: $now}}]}) {
|
||||||
id
|
id
|
||||||
content
|
content
|
||||||
|
|
||||||
eula_acceptances {
|
eula_acceptances {
|
||||||
id
|
id
|
||||||
date_accepted
|
date_accepted
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_BODYSHOP = gql`
|
export const QUERY_BODYSHOP = gql`
|
||||||
query QUERY_BODYSHOP {
|
query QUERY_BODYSHOP {
|
||||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||||
associations {
|
associations {
|
||||||
id
|
id
|
||||||
authlevel
|
authlevel
|
||||||
useremail
|
useremail
|
||||||
default_prod_list_view
|
default_prod_list_view
|
||||||
user {
|
user {
|
||||||
authid
|
authid
|
||||||
email
|
email
|
||||||
dashboardlayout
|
dashboardlayout
|
||||||
validemail
|
validemail
|
||||||
employee {
|
employee {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
address1
|
||||||
|
address2
|
||||||
|
city
|
||||||
|
country
|
||||||
|
created_at
|
||||||
|
email
|
||||||
|
phone
|
||||||
|
federal_tax_id
|
||||||
id
|
id
|
||||||
}
|
insurance_vendor_id
|
||||||
|
logo_img_path
|
||||||
|
md_ro_statuses
|
||||||
|
md_order_statuses
|
||||||
|
md_functionality_toggles
|
||||||
|
shopname
|
||||||
|
state
|
||||||
|
state_tax_id
|
||||||
|
updated_at
|
||||||
|
zip_post
|
||||||
|
shoprates
|
||||||
|
region_config
|
||||||
|
md_responsibility_centers
|
||||||
|
messagingservicesid
|
||||||
|
template_header
|
||||||
|
textid
|
||||||
|
production_config
|
||||||
|
bill_tax_rates
|
||||||
|
inhousevendorid
|
||||||
|
accountingconfig
|
||||||
|
appt_length
|
||||||
|
stripe_acct_id
|
||||||
|
ssbuckets
|
||||||
|
scoreboard_target
|
||||||
|
md_referral_sources
|
||||||
|
md_messaging_presets
|
||||||
|
intakechecklist
|
||||||
|
speedprint
|
||||||
|
md_parts_locations
|
||||||
|
md_notes_presets
|
||||||
|
md_rbac
|
||||||
|
prodtargethrs
|
||||||
|
md_classes
|
||||||
|
md_ins_cos
|
||||||
|
md_categories
|
||||||
|
enforce_class
|
||||||
|
md_labor_rates
|
||||||
|
deliverchecklist
|
||||||
|
target_touchtime
|
||||||
|
appt_colors
|
||||||
|
appt_alt_transport
|
||||||
|
schedule_start_time
|
||||||
|
schedule_end_time
|
||||||
|
imexshopid
|
||||||
|
default_adjustment_rate
|
||||||
|
workingdays
|
||||||
|
use_fippa
|
||||||
|
md_payment_types
|
||||||
|
md_hour_split
|
||||||
|
sub_status
|
||||||
|
jobsizelimit
|
||||||
|
md_ccc_rates
|
||||||
|
enforce_referral
|
||||||
|
website
|
||||||
|
jc_hourly_rates
|
||||||
|
md_jobline_presets
|
||||||
|
cdk_dealerid
|
||||||
|
features
|
||||||
|
attach_pdf_to_email
|
||||||
|
tt_allow_post_to_invoiced
|
||||||
|
cdk_configuration
|
||||||
|
md_estimators
|
||||||
|
md_ded_notes
|
||||||
|
pbs_configuration
|
||||||
|
pbs_serialnumber
|
||||||
|
md_filehandlers
|
||||||
|
md_email_cc
|
||||||
|
timezone
|
||||||
|
ss_configuration
|
||||||
|
md_from_emails
|
||||||
|
last_name_first
|
||||||
|
md_parts_order_comment
|
||||||
|
bill_allow_post_to_closed
|
||||||
|
md_to_emails
|
||||||
|
uselocalmediaserver
|
||||||
|
localmediaserverhttp
|
||||||
|
localmediaservernetwork
|
||||||
|
localmediatoken
|
||||||
|
enforce_conversion_csr
|
||||||
|
md_lost_sale_reasons
|
||||||
|
md_parts_scan
|
||||||
|
enforce_conversion_category
|
||||||
|
tt_enforce_hours_for_tech_console
|
||||||
|
md_tasks_presets
|
||||||
|
use_paint_scale_data
|
||||||
|
employee_teams(
|
||||||
|
order_by: { name: asc }
|
||||||
|
where: { active: { _eq: true } }
|
||||||
|
) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
employee_team_members {
|
||||||
|
id
|
||||||
|
employeeid
|
||||||
|
labor_rates
|
||||||
|
percentage
|
||||||
|
}
|
||||||
|
}
|
||||||
|
employees {
|
||||||
|
user_email
|
||||||
|
id
|
||||||
|
active
|
||||||
|
first_name
|
||||||
|
last_name
|
||||||
|
employee_number
|
||||||
|
rates
|
||||||
|
external_id
|
||||||
|
flat_rate
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
address1
|
|
||||||
address2
|
|
||||||
city
|
|
||||||
country
|
|
||||||
created_at
|
|
||||||
email
|
|
||||||
phone
|
|
||||||
federal_tax_id
|
|
||||||
id
|
|
||||||
insurance_vendor_id
|
|
||||||
logo_img_path
|
|
||||||
md_ro_statuses
|
|
||||||
md_order_statuses
|
|
||||||
md_functionality_toggles
|
|
||||||
shopname
|
|
||||||
state
|
|
||||||
state_tax_id
|
|
||||||
updated_at
|
|
||||||
zip_post
|
|
||||||
shoprates
|
|
||||||
region_config
|
|
||||||
md_responsibility_centers
|
|
||||||
messagingservicesid
|
|
||||||
template_header
|
|
||||||
textid
|
|
||||||
production_config
|
|
||||||
bill_tax_rates
|
|
||||||
inhousevendorid
|
|
||||||
accountingconfig
|
|
||||||
appt_length
|
|
||||||
stripe_acct_id
|
|
||||||
ssbuckets
|
|
||||||
scoreboard_target
|
|
||||||
md_referral_sources
|
|
||||||
md_messaging_presets
|
|
||||||
intakechecklist
|
|
||||||
speedprint
|
|
||||||
md_parts_locations
|
|
||||||
md_notes_presets
|
|
||||||
md_rbac
|
|
||||||
prodtargethrs
|
|
||||||
md_classes
|
|
||||||
md_ins_cos
|
|
||||||
md_categories
|
|
||||||
enforce_class
|
|
||||||
md_labor_rates
|
|
||||||
deliverchecklist
|
|
||||||
target_touchtime
|
|
||||||
appt_colors
|
|
||||||
appt_alt_transport
|
|
||||||
schedule_start_time
|
|
||||||
schedule_end_time
|
|
||||||
imexshopid
|
|
||||||
default_adjustment_rate
|
|
||||||
workingdays
|
|
||||||
use_fippa
|
|
||||||
md_payment_types
|
|
||||||
md_hour_split
|
|
||||||
sub_status
|
|
||||||
jobsizelimit
|
|
||||||
md_ccc_rates
|
|
||||||
enforce_referral
|
|
||||||
website
|
|
||||||
jc_hourly_rates
|
|
||||||
md_jobline_presets
|
|
||||||
cdk_dealerid
|
|
||||||
features
|
|
||||||
attach_pdf_to_email
|
|
||||||
tt_allow_post_to_invoiced
|
|
||||||
cdk_configuration
|
|
||||||
md_estimators
|
|
||||||
md_ded_notes
|
|
||||||
pbs_configuration
|
|
||||||
pbs_serialnumber
|
|
||||||
md_filehandlers
|
|
||||||
md_email_cc
|
|
||||||
timezone
|
|
||||||
ss_configuration
|
|
||||||
md_from_emails
|
|
||||||
last_name_first
|
|
||||||
md_parts_order_comment
|
|
||||||
bill_allow_post_to_closed
|
|
||||||
md_to_emails
|
|
||||||
uselocalmediaserver
|
|
||||||
localmediaserverhttp
|
|
||||||
localmediaservernetwork
|
|
||||||
localmediatoken
|
|
||||||
enforce_conversion_csr
|
|
||||||
md_lost_sale_reasons
|
|
||||||
md_parts_scan
|
|
||||||
enforce_conversion_category
|
|
||||||
tt_enforce_hours_for_tech_console
|
|
||||||
md_tasks_presets
|
|
||||||
use_paint_scale_data
|
|
||||||
employee_teams(
|
|
||||||
order_by: { name: asc }
|
|
||||||
where: { active: { _eq: true } }
|
|
||||||
) {
|
|
||||||
id
|
|
||||||
name
|
|
||||||
employee_team_members {
|
|
||||||
id
|
|
||||||
employeeid
|
|
||||||
labor_rates
|
|
||||||
percentage
|
|
||||||
}
|
|
||||||
}
|
|
||||||
employees {
|
|
||||||
user_email
|
|
||||||
id
|
|
||||||
active
|
|
||||||
first_name
|
|
||||||
last_name
|
|
||||||
employee_number
|
|
||||||
rates
|
|
||||||
external_id
|
|
||||||
flat_rate
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const QUERY_SHOP_ID = gql`
|
export const QUERY_SHOP_ID = gql`
|
||||||
query QUERY_SHOP_ID {
|
query QUERY_SHOP_ID {
|
||||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||||
id
|
id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const UPDATE_SHOP = gql`
|
export const UPDATE_SHOP = gql`
|
||||||
mutation UPDATE_SHOP($id: uuid, $shop: bodyshops_set_input!) {
|
mutation UPDATE_SHOP($id: uuid, $shop: bodyshops_set_input!) {
|
||||||
update_bodyshops(where: { id: { _eq: $id } }, _set: $shop) {
|
update_bodyshops(where: { id: { _eq: $id } }, _set: $shop) {
|
||||||
returning {
|
returning {
|
||||||
address1
|
address1
|
||||||
address2
|
address2
|
||||||
city
|
city
|
||||||
country
|
country
|
||||||
created_at
|
created_at
|
||||||
email
|
email
|
||||||
phone
|
phone
|
||||||
federal_tax_id
|
federal_tax_id
|
||||||
id
|
id
|
||||||
insurance_vendor_id
|
insurance_vendor_id
|
||||||
logo_img_path
|
logo_img_path
|
||||||
md_ro_statuses
|
md_ro_statuses
|
||||||
md_order_statuses
|
md_order_statuses
|
||||||
md_functionality_toggles
|
md_functionality_toggles
|
||||||
shopname
|
shopname
|
||||||
state
|
state
|
||||||
state_tax_id
|
state_tax_id
|
||||||
updated_at
|
updated_at
|
||||||
zip_post
|
zip_post
|
||||||
shoprates
|
shoprates
|
||||||
region_config
|
region_config
|
||||||
md_responsibility_centers
|
md_responsibility_centers
|
||||||
messagingservicesid
|
messagingservicesid
|
||||||
template_header
|
template_header
|
||||||
textid
|
textid
|
||||||
production_config
|
production_config
|
||||||
bill_tax_rates
|
bill_tax_rates
|
||||||
appt_length
|
appt_length
|
||||||
stripe_acct_id
|
stripe_acct_id
|
||||||
ssbuckets
|
ssbuckets
|
||||||
scoreboard_target
|
scoreboard_target
|
||||||
md_referral_sources
|
md_referral_sources
|
||||||
md_messaging_presets
|
md_messaging_presets
|
||||||
intakechecklist
|
intakechecklist
|
||||||
speedprint
|
speedprint
|
||||||
md_parts_locations
|
md_parts_locations
|
||||||
md_notes_presets
|
md_notes_presets
|
||||||
md_rbac
|
md_rbac
|
||||||
prodtargethrs
|
prodtargethrs
|
||||||
md_classes
|
md_classes
|
||||||
md_ins_cos
|
md_ins_cos
|
||||||
md_categories
|
md_categories
|
||||||
enforce_class
|
enforce_class
|
||||||
md_labor_rates
|
md_labor_rates
|
||||||
deliverchecklist
|
deliverchecklist
|
||||||
target_touchtime
|
target_touchtime
|
||||||
appt_colors
|
appt_colors
|
||||||
appt_alt_transport
|
appt_alt_transport
|
||||||
schedule_start_time
|
schedule_start_time
|
||||||
schedule_end_time
|
schedule_end_time
|
||||||
imexshopid
|
imexshopid
|
||||||
default_adjustment_rate
|
default_adjustment_rate
|
||||||
workingdays
|
workingdays
|
||||||
use_fippa
|
use_fippa
|
||||||
md_payment_types
|
md_payment_types
|
||||||
md_hour_split
|
md_hour_split
|
||||||
sub_status
|
sub_status
|
||||||
jobsizelimit
|
jobsizelimit
|
||||||
md_ccc_rates
|
md_ccc_rates
|
||||||
enforce_referral
|
enforce_referral
|
||||||
website
|
website
|
||||||
jc_hourly_rates
|
jc_hourly_rates
|
||||||
md_jobline_presets
|
md_jobline_presets
|
||||||
cdk_dealerid
|
cdk_dealerid
|
||||||
attach_pdf_to_email
|
attach_pdf_to_email
|
||||||
tt_allow_post_to_invoiced
|
tt_allow_post_to_invoiced
|
||||||
cdk_configuration
|
cdk_configuration
|
||||||
md_estimators
|
md_estimators
|
||||||
md_ded_notes
|
md_ded_notes
|
||||||
pbs_configuration
|
pbs_configuration
|
||||||
pbs_serialnumber
|
pbs_serialnumber
|
||||||
md_filehandlers
|
md_filehandlers
|
||||||
md_email_cc
|
md_email_cc
|
||||||
timezone
|
timezone
|
||||||
ss_configuration
|
ss_configuration
|
||||||
md_from_emails
|
md_from_emails
|
||||||
last_name_first
|
last_name_first
|
||||||
md_parts_order_comment
|
md_parts_order_comment
|
||||||
bill_allow_post_to_closed
|
bill_allow_post_to_closed
|
||||||
md_to_emails
|
md_to_emails
|
||||||
uselocalmediaserver
|
uselocalmediaserver
|
||||||
localmediaserverhttp
|
localmediaserverhttp
|
||||||
localmediaservernetwork
|
localmediaservernetwork
|
||||||
localmediatoken
|
localmediatoken
|
||||||
enforce_conversion_csr
|
enforce_conversion_csr
|
||||||
md_lost_sale_reasons
|
md_lost_sale_reasons
|
||||||
md_parts_scan
|
md_parts_scan
|
||||||
enforce_conversion_category
|
enforce_conversion_category
|
||||||
tt_enforce_hours_for_tech_console
|
tt_enforce_hours_for_tech_console
|
||||||
md_tasks_presets
|
md_tasks_presets
|
||||||
employee_teams(
|
employee_teams(
|
||||||
order_by: { name: asc }
|
order_by: { name: asc }
|
||||||
where: { active: { _eq: true } }
|
where: { active: { _eq: true } }
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
employee_team_members {
|
employee_team_members {
|
||||||
id
|
id
|
||||||
employeeid
|
employeeid
|
||||||
labor_rates
|
labor_rates
|
||||||
percentage
|
percentage
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
employees {
|
||||||
|
id
|
||||||
|
first_name
|
||||||
|
active
|
||||||
|
last_name
|
||||||
|
employee_number
|
||||||
|
rates
|
||||||
|
user_email
|
||||||
|
external_id
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
employees {
|
|
||||||
id
|
|
||||||
first_name
|
|
||||||
active
|
|
||||||
last_name
|
|
||||||
employee_number
|
|
||||||
rates
|
|
||||||
user_email
|
|
||||||
external_id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
export const QUERY_INTAKE_CHECKLIST = gql`
|
export const QUERY_INTAKE_CHECKLIST = gql`
|
||||||
query QUERY_INTAKE_CHECKLIST($shopId: uuid!, $jobId: uuid!) {
|
query QUERY_INTAKE_CHECKLIST($shopId: uuid!, $jobId: uuid!) {
|
||||||
bodyshops_by_pk(id: $shopId) {
|
bodyshops_by_pk(id: $shopId) {
|
||||||
id
|
id
|
||||||
intakechecklist
|
intakechecklist
|
||||||
|
}
|
||||||
|
jobs_by_pk(id: $jobId) {
|
||||||
|
id
|
||||||
|
ro_number
|
||||||
|
production_vars
|
||||||
|
scheduled_completion
|
||||||
|
scheduled_delivery
|
||||||
|
intakechecklist
|
||||||
|
status
|
||||||
|
owner {
|
||||||
|
allow_text_message
|
||||||
|
id
|
||||||
|
}
|
||||||
|
labhrs: joblines_aggregate(
|
||||||
|
where: {
|
||||||
|
_and: [{ mod_lbr_ty: { _neq: "LAR" } }, { removed: { _eq: false } }]
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
larhrs: joblines_aggregate(
|
||||||
|
where: {
|
||||||
|
_and: [{ mod_lbr_ty: { _eq: "LAR" } }, { removed: { _eq: false } }]
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
jobs_by_pk(id: $jobId) {
|
|
||||||
id
|
|
||||||
ro_number
|
|
||||||
production_vars
|
|
||||||
scheduled_completion
|
|
||||||
scheduled_delivery
|
|
||||||
intakechecklist
|
|
||||||
status
|
|
||||||
owner {
|
|
||||||
allow_text_message
|
|
||||||
id
|
|
||||||
}
|
|
||||||
labhrs: joblines_aggregate(
|
|
||||||
where: {
|
|
||||||
_and: [{ mod_lbr_ty: { _neq: "LAR" } }, { removed: { _eq: false } }]
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
aggregate {
|
|
||||||
sum {
|
|
||||||
mod_lb_hrs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
larhrs: joblines_aggregate(
|
|
||||||
where: {
|
|
||||||
_and: [{ mod_lbr_ty: { _eq: "LAR" } }, { removed: { _eq: false } }]
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
aggregate {
|
|
||||||
sum {
|
|
||||||
mod_lb_hrs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
export const QUERY_DELIVER_CHECKLIST = gql`
|
export const QUERY_DELIVER_CHECKLIST = gql`
|
||||||
query QUERY_DELIVER_CHECKLIST($shopId: uuid!, $jobId: uuid!) {
|
query QUERY_DELIVER_CHECKLIST($shopId: uuid!, $jobId: uuid!) {
|
||||||
bodyshops_by_pk(id: $shopId) {
|
bodyshops_by_pk(id: $shopId) {
|
||||||
id
|
id
|
||||||
deliverchecklist
|
deliverchecklist
|
||||||
|
}
|
||||||
|
jobs_by_pk(id: $jobId) {
|
||||||
|
id
|
||||||
|
ro_number
|
||||||
|
actual_completion
|
||||||
|
actual_delivery
|
||||||
|
}
|
||||||
}
|
}
|
||||||
jobs_by_pk(id: $jobId) {
|
|
||||||
id
|
|
||||||
ro_number
|
|
||||||
actual_completion
|
|
||||||
actual_delivery
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
export const QUERY_STRIPE_ID = gql`
|
export const QUERY_STRIPE_ID = gql`
|
||||||
query QUERY_STRIPE_ID {
|
query QUERY_STRIPE_ID {
|
||||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||||
stripe_acct_id
|
stripe_acct_id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|||||||