Added several fixes throughout for demo.

This commit is contained in:
Patrick Fic
2020-12-15 14:38:26 -08:00
parent 2981c7ba67
commit b6d8aa287f
19 changed files with 597 additions and 201 deletions

125
client/package-lock.json generated
View File

@@ -5,18 +5,13 @@
"requires": true,
"dependencies": {
"@ant-design/colors": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-5.0.0.tgz",
"integrity": "sha512-Pe1rYorgVC1v4f+InDXvIlQH715pO1g7BsOhy/ehX/U6ebPKqojmkYJKU3lF+84Zmvyar7ngZ28hesAa1nWjLg==",
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-5.0.1.tgz",
"integrity": "sha512-x1TUaRILaqy3zgFNo+kIqOa3eTYPt81H1/3E4dCjDP4Qvk/xaPEizLDFdRUcIx0cWwyu2LklwfyLHWpbYK8v6A==",
"requires": {
"@ctrl/tinycolor": "^3.1.6"
"@ctrl/tinycolor": "^3.3.1"
}
},
"@ant-design/css-animation": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/@ant-design/css-animation/-/css-animation-1.7.3.tgz",
"integrity": "sha512-LrX0OGZtW+W6iLnTAqnTaoIsRelYeuLZWsrmBJFUXDALQphPsN8cE5DCsmoSlL0QYb94BQxINiuS70Ar/8BNgA=="
},
"@ant-design/icons": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-4.3.0.tgz",
@@ -48,9 +43,9 @@
}
},
"@apollo/client": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.3.2.tgz",
"integrity": "sha512-drgbagTptpo33EfOL9VedyOrPwx6u49vUdySAA3FMYRW5pSOtnWf5WMOC0fRp2xIGEtKAf0ZGC0DBbXbLvxiig==",
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.3.6.tgz",
"integrity": "sha512-XSm/STyNS8aHdDigLLACKNMHwI0qaQmEHWHtTP+jHe/E1wZRnn66VZMMgwKLy2V4uHISHfmiZ4KpUKDPeJAKqg==",
"requires": {
"@graphql-typed-document-node/core": "^3.0.0",
"@types/zen-observable": "^0.8.0",
@@ -62,9 +57,21 @@
"optimism": "^0.13.1",
"prop-types": "^15.7.2",
"symbol-observable": "^2.0.0",
"ts-invariant": "^0.5.1",
"ts-invariant": "^0.6.0",
"tslib": "^1.10.0",
"zen-observable": "^0.8.14"
},
"dependencies": {
"ts-invariant": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.6.0.tgz",
"integrity": "sha512-caoafsfgb8QxdrKzFfjKt627m4i8KTtfAiji0DYJfWI4A/S9ORNNpzYuD9br64kyKFgxn9UNaLLbSupam84mCA==",
"requires": {
"@types/ungap__global-this": "^0.3.1",
"@ungap/global-this": "^0.4.2",
"tslib": "^1.9.3"
}
}
}
},
"@apollo/react-common": {
@@ -1396,9 +1403,9 @@
"integrity": "sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg=="
},
"@ctrl/tinycolor": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.2.0.tgz",
"integrity": "sha512-cP1tbXA1qJp/er2CJaO+Pbe38p7RlhV9WytUxUe79xj++Q6s/jKVvzJ9U2dF9f1/lZAdG+j94A38CsNR+uW4gw=="
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.3.1.tgz",
"integrity": "sha512-jUJrjU62MUgHDSu5JfONfgRM2V7GfN5KknsygfIbxwRZXGeayIzxk4O9GiYgEAr9DG5HJThTF5+a5x3wtrOKzQ=="
},
"@emotion/is-prop-valid": {
"version": "0.8.8",
@@ -2807,9 +2814,9 @@
}
},
"@tanem/react-nprogress": {
"version": "3.0.50",
"resolved": "https://registry.npmjs.org/@tanem/react-nprogress/-/react-nprogress-3.0.50.tgz",
"integrity": "sha512-+nwKV/QMjMCE+5Cs7+zhlE/n+W/tOcsqVhcnRqSbzl4yErUrxXeq03ilrEmYn2jlW+dX90Q928IZ0E/OOAbBlg==",
"version": "3.0.51",
"resolved": "https://registry.npmjs.org/@tanem/react-nprogress/-/react-nprogress-3.0.51.tgz",
"integrity": "sha512-5IH/cu6+G7jTacrT87OZS0w3OUX5QF3yMsTHGTDca5YAmjMTHeW4zk9/w4nW2BuFnZd5nk/lny6aGJ6z/gGHvQ==",
"requires": {
"@babel/runtime": "^7.12.5",
"hoist-non-react-statics": "^3.3.2",
@@ -2818,12 +2825,12 @@
}
},
"@tinymce/tinymce-react": {
"version": "3.8.1",
"resolved": "https://registry.npmjs.org/@tinymce/tinymce-react/-/tinymce-react-3.8.1.tgz",
"integrity": "sha512-mLoA7CJoi4e0NqgNmCLLmK/gAvh9Tjd9WHWHtUJ6msBciLfc3c4Ma3UKlAvlRqNR8Q07ywTeRWvUjTn3zbqxIQ==",
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/@tinymce/tinymce-react/-/tinymce-react-3.8.3.tgz",
"integrity": "sha512-nDs41NVZsl6EgP5rsWzWzO/aGlyZRbcSiFnRcGSvuE0BqDHKaDE3467WjWJreA+8QgcnCR1XP8o3FCLVrnPWqA==",
"requires": {
"prop-types": "^15.6.2",
"tinymce": "^5.5.0"
"tinymce": "^5.6.1"
}
},
"@types/anymatch": {
@@ -3027,6 +3034,11 @@
"source-map": "^0.6.1"
}
},
"@types/ungap__global-this": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/@types/ungap__global-this/-/ungap__global-this-0.3.1.tgz",
"integrity": "sha512-+/DsiV4CxXl6ZWefwHZDXSe1Slitz21tom38qPCaG0DYCS1NnDPIQDTKcmQ/tvK/edJUKkmuIDBJbmKDiB0r/g=="
},
"@types/webpack": {
"version": "4.41.25",
"resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.25.tgz",
@@ -3171,6 +3183,11 @@
"eslint-visitor-keys": "^2.0.0"
}
},
"@ungap/global-this": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/@ungap/global-this/-/global-this-0.4.3.tgz",
"integrity": "sha512-MuHEpDBurNVeD6mV9xBcAN2wfTwuaFQhHuhWkJuXmyVJ5P5sBCw+nnFpdfb0tAvgWkfefWCsAoAsh7MTUr3LPg=="
},
"@webassemblyjs/ast": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz",
@@ -3537,12 +3554,11 @@
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
},
"antd": {
"version": "4.9.1",
"resolved": "https://registry.npmjs.org/antd/-/antd-4.9.1.tgz",
"integrity": "sha512-q+Uf8xWeUB+O+xELq3tvprj2cEot/JnCAjS24scIadHSFzCkUr1nVcHU7dTtZommx7zQgC2ajWBOCVMmJD/lrw==",
"version": "4.9.3",
"resolved": "https://registry.npmjs.org/antd/-/antd-4.9.3.tgz",
"integrity": "sha512-91+YwXG/CUND+Za5HLIE4SHfIjxCZFM+Cy9DreKM51llvCZimoLMXbIuhHOB5quTwTlA7ZO2g10SR08yvZWdBQ==",
"requires": {
"@ant-design/colors": "^5.0.0",
"@ant-design/css-animation": "^1.7.2",
"@ant-design/icons": "^4.3.0",
"@ant-design/react-slick": "~0.27.0",
"@babel/runtime": "^7.11.2",
@@ -6307,9 +6323,9 @@
"integrity": "sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ=="
},
"dayjs": {
"version": "1.9.6",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.9.6.tgz",
"integrity": "sha512-HngNLtPEBWRo8EFVmHFmSXAjtCX8rGNqeXQI0Gh7wCTSqwaKgPIDqu9m07wABVopNwzvOeCb+2711vQhDlcIXw=="
"version": "1.9.7",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.9.7.tgz",
"integrity": "sha512-IC877KBdMhBrCfBfJXHQlo0G8keZ0Opy7YIIq5QKtUbCuHMzim8S4PyiVK4YmihI3iOF9lhfUBW4AQWHTR5WHA=="
},
"debug": {
"version": "4.3.1",
@@ -12344,9 +12360,9 @@
}
},
"jsoneditor": {
"version": "9.1.4",
"resolved": "https://registry.npmjs.org/jsoneditor/-/jsoneditor-9.1.4.tgz",
"integrity": "sha512-+OVL01G490dGnUTRzP+eNtDfPYTEfjX15wRTi1HgKlxi10btFFOG4rvZoiLN2ejBptwXdnFu2Qf9nJtH2Ic4jQ==",
"version": "9.1.5",
"resolved": "https://registry.npmjs.org/jsoneditor/-/jsoneditor-9.1.5.tgz",
"integrity": "sha512-mLip7wKbG18sO2q5sHo/exokHLrClGXa2RnZYDAfkOenuTLzBQG21cTHQMbjUaX3+3i466EFKwnLm3BEFWv+Og==",
"requires": {
"ace-builds": "^1.4.12",
"ajv": "^6.12.6",
@@ -15470,9 +15486,9 @@
}
},
"rc-checkbox": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/rc-checkbox/-/rc-checkbox-2.3.1.tgz",
"integrity": "sha512-i290/iTqmZ0WtI2UPIryqT9rW6O99+an4KeZIyZDH3r+Jbb6YdddaWNdzq7g5m9zaNhJvgjf//wJtC4fvve2Tg==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/rc-checkbox/-/rc-checkbox-2.3.2.tgz",
"integrity": "sha512-afVi1FYiGv1U0JlpNH/UaEXdh6WUJjcWokj/nUN2TgG80bfG+MDdbfHKlLcNNba94mbjy2/SXJ1HDgrOkXGAjg==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.1"
@@ -15491,9 +15507,9 @@
}
},
"rc-dialog": {
"version": "8.4.3",
"resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-8.4.3.tgz",
"integrity": "sha512-LHsWXb+2Cy4vEOeJcPvk9M0WSr80Gi438ov5rXt3E6XB4j+53Z+vMFRr+TagnVuOVQRCLmmzT4qutfm2U1OK6w==",
"version": "8.4.5",
"resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-8.4.5.tgz",
"integrity": "sha512-0a1Uuy1BRBTdIkfR1VE91kis6dBui7tAIPaQQLj28vBdGg9IqVkiLguCdaDW+4E4vZediePz49PKFbLkx2PL5Q==",
"requires": {
"@babel/runtime": "^7.10.1",
"classnames": "^2.2.6",
@@ -15773,9 +15789,9 @@
}
},
"rc-trigger": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-5.1.2.tgz",
"integrity": "sha512-A6UdDy95masAEIaNmazPtqHW1EOFDWi2C2bJGDpr9OYpmObDpWKdxyNijVbFb6l1viTkAU9d3FyStgNPddgFzw==",
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-5.2.0.tgz",
"integrity": "sha512-fpC1ZkM/IgIIDfF6XHx3Hb2zXy9wvdI5eMh+6DdLygk6Z3HGmkri6ZCXg9a0wfF9AFuzlYTeBLS1uRASZRsnMQ==",
"requires": {
"@babel/runtime": "^7.11.2",
"classnames": "^2.2.6",
@@ -15795,18 +15811,18 @@
}
},
"rc-util": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.5.0.tgz",
"integrity": "sha512-YJB+zZGvCll/bhxXRVLAekr7lOvTgqMlRIhgINoINfUek7wQvi5sft46NOi3yYUYhocpuW4k8+5okW46sBsZAQ==",
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.5.1.tgz",
"integrity": "sha512-lnkBptu1RX65GO6jf28scbDMM/9MVl/hYI0uMEVM+cQ0ALLhFChDzgv7ciNpjayCH88wSDHTp6582es4tzJHhA==",
"requires": {
"react-is": "^16.12.0",
"shallowequal": "^1.1.0"
}
},
"rc-virtual-list": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.2.2.tgz",
"integrity": "sha512-OepvZDQGUbQQBFk5m2Ds32rfO/tSj9gZkLbzwaIw/hwGgvatDmW+j97YQvFkUQp/XDgdSGcfFfj/6XTKpz0J4g==",
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.2.3.tgz",
"integrity": "sha512-uEeYDQWwQhxR97SekPeGRbzPtHSbSpw/mYb6QpZZ9bA43kf7s1socV3fD3ySYhQVzo0I+/IUD9jFGit6FbM0WA==",
"requires": {
"classnames": "^2.2.6",
"rc-resize-observer": "^0.2.3",
@@ -16118,9 +16134,9 @@
}
},
"react-i18next": {
"version": "11.7.3",
"resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-11.7.3.tgz",
"integrity": "sha512-7sYZqVZgdaS9Z0ZH6nuJFErCD0zz5wK3jR4/xCrWjZcxHHF3GRu7BXdicbSPprZV4ZYz7LJzxxMHO7dg5Qb70A==",
"version": "11.8.4",
"resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-11.8.4.tgz",
"integrity": "sha512-QlPJfX+Roi+jEQ6frBSsLHHH+VWbUoCl6wZDT8XHMd6PsSgepjgD2sZf/h7F46JnHeuy0U+SxY3TtrJF+aDIyg==",
"requires": {
"@babel/runtime": "^7.3.1",
"html-parse-stringify2": "2.0.1"
@@ -19296,9 +19312,9 @@
"integrity": "sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA=="
},
"tinymce": {
"version": "5.6.1",
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-5.6.1.tgz",
"integrity": "sha512-gLtuSk3VH5P36wYOxrkjKvLnPnuNRZ77t2fjTMz95ASnd5FsTBCLadnr8YKcWrBommFQoSzmVlTDyR7gXgR3nw=="
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-5.6.2.tgz",
"integrity": "sha512-z7zvM5seOPiW86/vqf08kStwW5Zs5U9oQfuqh2rTj4jEcT2QzxT0v72i2zw3W6rbTLldkAej6edFZphj5ee5zg=="
},
"tmpl": {
"version": "1.0.4",
@@ -19432,6 +19448,7 @@
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.5.1.tgz",
"integrity": "sha512-k3UpDNrBZpqJFnAAkAHNmSHtNuCxcU6xLiziPgalHRKZHme6T6jnKC8CcXDmk1zbHLQM8pc+rNC1Q6FvXMAl+g==",
"dev": true,
"requires": {
"tslib": "^1.9.3"
}

View File

@@ -4,14 +4,14 @@
"private": true,
"proxy": "http://localhost:5000",
"dependencies": {
"@apollo/client": "^3.3.2",
"@apollo/client": "^3.3.6",
"@fingerprintjs/fingerprintjs": "^3.0.3",
"@lourenci/react-kanban": "^2.1.0",
"@stripe/react-stripe-js": "^1.1.2",
"@stripe/stripe-js": "^1.11.0",
"@tanem/react-nprogress": "^3.0.50",
"@tinymce/tinymce-react": "^3.7.0",
"antd": "^4.9.1",
"@tanem/react-nprogress": "^3.0.51",
"@tinymce/tinymce-react": "^3.8.3",
"antd": "^4.9.3",
"apollo-boost": "^0.4.9",
"apollo-link-logger": "^2.0.0",
"axios": "^0.20.0",
@@ -23,7 +23,7 @@
"graphql": "^15.4.0",
"i18next": "^19.8.4",
"i18next-browser-languagedetector": "^6.0.1",
"jsoneditor": "^9.1.4",
"jsoneditor": "^9.1.5",
"jsoneditor-react": "^3.1.0",
"logrocket": "^1.0.13",
"moment-business-days": "^1.2.0",
@@ -41,7 +41,7 @@
"react-email-editor": "^1.2.0",
"react-ga": "^3.3.0",
"react-grid-gallery": "^0.5.5",
"react-i18next": "^11.7.3",
"react-i18next": "^11.8.4",
"react-icons": "^3.11.0",
"react-moment": "^1.0.0",
"react-number-format": "^4.4.1",

View File

@@ -1,7 +1,8 @@
import { UploadOutlined } from "@ant-design/icons";
import { Editor } from "@tinymce/tinymce-react";
import { Button, Input, Upload, Select } from "antd";
import { Button, Card, Input, Select, Upload } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
export default function EmailOverlayComponent({
messageOptions,
@@ -11,6 +12,7 @@ export default function EmailOverlayComponent({
handleUpload,
handleFileRemove,
}) {
const { t } = useTranslation();
return (
<div>
To:
@@ -53,17 +55,20 @@ export default function EmailOverlayComponent({
}}
onEditorChange={handleHtmlChange}
/>
<Upload
fileList={messageOptions.fileList}
beforeUpload={handleUpload}
onRemove={handleFileRemove}
multiple
listType="picture-card"
>
<Button>
<UploadOutlined /> Upload
</Button>
</Upload>
<Card title={t("emails.labels.attachments")}>
<Upload
fileList={messageOptions.fileList}
beforeUpload={handleUpload}
onRemove={handleFileRemove}
multiple
listType="picture-card"
style={{ width: "100%" }}
>
<Button>
<UploadOutlined /> Upload
</Button>
</Upload>
</Card>
</div>
);
}

View File

@@ -166,7 +166,7 @@ export function JobChecklistForm({
valuePropName="checked"
label={t("checklist.labels.removefromproduction")}
>
<Switch />
<Switch defaultChecked={true} />
</Form.Item>
</div>
)}

View File

@@ -1,4 +1,4 @@
import { Collapse, Space } from "antd";
import { Collapse, Space, Card } from "antd";
import React, { useEffect, useState } from "react";
import Gallery from "react-grid-gallery";
import { useTranslation } from "react-i18next";
@@ -66,13 +66,13 @@ function JobsDocumentsComponent({
return (
<div className="clearfix">
<DocumentsUploadComponent
jobId={jobId}
billId={billId}
callbackAfterUpload={billsCallback || refetch}
tagsArray={["test"]}
/>
<Space>
<DocumentsUploadComponent
jobId={jobId}
billId={billId}
callbackAfterUpload={billsCallback || refetch}
tagsArray={["test"]}
/>
<JobsDocumentsGallerySelectAllComponent
galleryImages={galleryImages}
setGalleryImages={setgalleryImages}
@@ -83,12 +83,8 @@ function JobsDocumentsComponent({
deletionCallback={billsCallback || refetch}
/>
</Space>
<Collapse
style={{ marginTop: "2rem" }}
defaultActiveKey={["images", "other"]}
bordered="false"
>
<Collapse.Panel key="images" header={t("jobs.labels.documents-images")}>
<div style={{ marginTop: "2rem" }}>
<Card title={t("jobs.labels.documents-images")}>
<Gallery
images={galleryImages.images}
backdropClosesModal={true}
@@ -108,8 +104,9 @@ function JobsDocumentsComponent({
});
}}
/>
</Collapse.Panel>
<Collapse.Panel key="other" header={t("jobs.labels.documents-other")}>
</Card>
<Card title={t("jobs.labels.documents-other")}>
<Gallery
images={galleryImages.other}
backdropClosesModal={true}
@@ -130,8 +127,8 @@ function JobsDocumentsComponent({
});
}}
/>
</Collapse.Panel>
</Collapse>
</Card>
</div>
</div>
);
}

View File

@@ -150,6 +150,12 @@ export function JobsList({ bodyshop }) {
) : null;
},
},
{
title: t("jobs.fields.ins_co_nm"),
dataIndex: "ins_co_nm",
key: "ins_co_nm",
ellipsis: true,
},
{
title: t("jobs.fields.status"),
dataIndex: "status",

View File

@@ -75,9 +75,13 @@ export const createBoardData = (AllStatuses, Jobs, filter) => {
const DataGroupedByStatus = _.groupBy(filteredJobs, (d) => d.status);
Object.keys(DataGroupedByStatus).map((statusGroupKey) => {
boardLanes.columns.find(
(l) => l.id === statusGroupKey
).cards = sortByParentId(DataGroupedByStatus[statusGroupKey]);
try {
boardLanes.columns.find(
(l) => l.id === statusGroupKey
).cards = sortByParentId(DataGroupedByStatus[statusGroupKey]);
} catch (error) {
console.log("Error while creating board card", error);
}
return null;
});

View File

@@ -13,6 +13,9 @@ import ProductionListColumnNote from "./production-list-columns.productionnote.c
import ProductionListColumnStatus from "./production-list-columns.status.component";
import ProductionlistColumnTouchTime from "./prodution-list-columns.touchtime.component";
const OneCalendarDay = 60 * 60 * 24 * 1000;
const Now = new Date();
const r = [
{
title: i18n.t("jobs.actions.viewdetail"),
@@ -75,7 +78,16 @@ const r = [
ellipsis: true,
sorter: (a, b) => a.scheduled_completion - b.scheduled_completion,
render: (text, record) => (
<DateFormatter>{record.scheduled_completion}</DateFormatter>
<DateFormatter
className={
!!record.scheduled_completion &&
new Date(record.scheduled_completion) - Now < OneCalendarDay
? "production-completion-1"
: ""
}
>
{record.scheduled_completion}
</DateFormatter>
),
},
{
@@ -156,13 +168,17 @@ const r = [
title: i18n.t("production.labels.bodyhours"),
dataIndex: "labhrs",
key: "labhrs",
sorter: (a, b) => a.labhrs - b.labhrs,
sorter: (a, b) =>
a.labhrs.aggregate.sum.mod_lb_hrs - b.labhrs.aggregate.sum.mod_lb_hrs,
render: (text, record) => record.labhrs.aggregate.sum.mod_lb_hrs,
},
{
title: i18n.t("production.labels.refinishhours"),
dataIndex: "larhrs",
key: "larhrs",
sorter: (a, b) => a.larhrs - b.larhrs,
sorter: (a, b) =>
a.larhrs.aggregate.sum.mod_lb_hrs - b.larhrs.aggregate.sum.mod_lb_hrs,
render: (text, record) => record.larhrs.aggregate.sum.mod_lb_hrs,
},
{
title: i18n.t("production.labels.alert"),

View File

@@ -16,8 +16,6 @@ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
const OneCalendarDay = 60 * 60 * 24 * 1000;
export function ProductionListTable({
columnState,
loading,
@@ -174,12 +172,12 @@ export function ProductionListTable({
dataSource={dataSource}
onChange={handleTableChange}
rowClassName={(record, index) => {
const classes = []; //TODO What could be good usage here?
if (!!record.scheduled_completion) {
if (new Date(record.scheduled_completion) - Now < OneCalendarDay)
classes.push("production-completion-1");
}
return classes.join(" ");
// const classes = []; //TODO What could be good usage here?
// if (!!record.scheduled_completion) {
// if (new Date(record.scheduled_completion) - Now < OneCalendarDay)
// classes.push("production-completion-1");
// }
// return classes.join(" ");
}}
/>
</ReactDragListView.DragColumn>

View File

@@ -1,4 +1,4 @@
import { Button, Col, Form, Row, Select, Switch } from "antd";
import { Button, Col, Form, Row, Select, Switch, Card } from "antd";
import axios from "axios";
import moment from "moment";
import React, { useState } from "react";
@@ -79,9 +79,26 @@ export function ScheduleJobModalComponent({
>
<DateTimePicker onBlur={handleDateBlur} />
</Form.Item>
<Form.Item
name="scheduled_completion"
label={t("jobs.fields.scheduled_completion")}
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}
>
<DateTimePicker />
</Form.Item>
</LayoutFormRow>
<Card title={t("appointments.labels.smartscheduling")}>
<Button onClick={handleAuto} loading={loading}>
{t("appointments.actions.smartscheduling")}
{t("appointments.actions.calculate")}
</Button>
{smartOptions.length > 0 && (
<div>{t("appointments.labels.suggesteddates")}</div>
)}
<div className="imex-flex-row imex-flex-row__flex-space-around">
{smartOptions.map((d, idx) => (
<Button
@@ -96,20 +113,8 @@ export function ScheduleJobModalComponent({
</Button>
))}
</div>
</LayoutFormRow>
</Card>
<LayoutFormRow grow>
<Form.Item
name="scheduled_completion"
label={t("jobs.fields.scheduled_completion")}
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}
>
<DateTimePicker />
</Form.Item>
<Form.Item
name="notifyCustomer"
valuePropName="checked"
@@ -120,6 +125,8 @@ export function ScheduleJobModalComponent({
<Form.Item name="email" label={t("jobs.fields.ownr_ea")}>
<EmailInput />
</Form.Item>
</LayoutFormRow>
<LayoutFormRow grow>
<Form.Item name="color" label={t("appointments.fields.color")}>
<Select>
{bodyshop.appt_colors &&

View File

@@ -128,7 +128,7 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
]}
>
<Select mode="multiple">
{Object.keys(TemplateList).map((i) => (
{Object.keys(TemplateList()).map((i) => (
<Select.Option
key={TemplateList()[i].key}
value={TemplateList()[i].key}
@@ -250,7 +250,7 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
]}
>
<Select mode="multiple">
{Object.keys(TemplateList).map((i) => (
{Object.keys(TemplateList()).map((i) => (
<Select.Option
key={TemplateList()[i].key}
value={TemplateList()[i].key}

View File

@@ -20,11 +20,11 @@
"appointments": {
"actions": {
"block": "Block Day",
"calculate": "Calculate SMART Dates",
"cancel": "Cancel",
"intake": "Intake",
"new": "New Appointment",
"reschedule": "Reschedule",
"smartscheduling": "SMART Scheduling",
"viewjob": "View Job"
},
"errors": {
@@ -33,8 +33,8 @@
"saving": "Error scheduling appointment. {{message}}"
},
"fields": {
"alt_transport": "A.T.",
"color": "Color",
"alt_transport": "Alt. Trans.",
"color": "Appointment Color",
"time": "Appointment Time",
"title": "Title"
},
@@ -50,7 +50,9 @@
"nocompletingjobs": "No jobs scheduled for completion.",
"nodateselected": "No date has been selected.",
"priorappointments": "Previous Appointments",
"scheduledfor": "Scheduled appointment for: "
"scheduledfor": "Scheduled appointment for: ",
"smartscheduling": "Smart Scheduling",
"suggesteddates": "Suggested Dates"
},
"successes": {
"canceled": "Appointment canceled successfully.",
@@ -182,11 +184,17 @@
"country": "Country",
"dailybodytarget": "Scoreboard - Daily Body Target",
"dailypainttarget": "Scoreboard - Daily Paint Target",
"deliver": {
"templates": "Delivery Templates"
},
"email": "General Shop Email",
"enforce_class": "Enforce Class on Conversion?",
"federal_tax_id": "Federal Tax ID (GST/HST)",
"inhousevendorid": "In House Vendor ID",
"insurance_vendor_id": "Insurance Vendor ID",
"intake": {
"template": "Intake Templates"
},
"invoice_federal_tax_rate": "Invoices - Federal Tax Rate",
"invoice_local_tax_rate": "Invoices - Local Tax Rate",
"invoice_state_tax_rate": "Invoices - State Tax Rate",
@@ -583,6 +591,9 @@
"errors": {
"notsent": "Email not sent. Error encountered while sending {{message}}"
},
"labels": {
"attachments": "Attachments"
},
"successes": {
"sent": "Email sent successfully."
}
@@ -713,6 +724,11 @@
"rescuetitle": "Rescue Me!"
}
},
"intake": {
"labels": {
"printpack": "Intake Print Pack"
}
},
"joblines": {
"actions": {
"new": "New Line"
@@ -1344,15 +1360,21 @@
},
"jobs": {
"all_job_notes": "All Job Notes",
"appointment_confirmation": "Appointment Confirmation",
"appointment_reminder": "Appointment Reminder",
"casl_authorization": "CASL Authorization",
"casl_work_authorization": "CASL Work Authorization",
"cover_sheet": "Cover Sheet",
"coversheet": "Coversheet",
"csi_invitation": "CSI Invite",
"estimate_detail": "Estimate Details",
"fippa_authorization": "FIPPA Authorization",
"fippa_work_authorization": "FIPPA Work Authorization",
"job_totals": "Job Totals Only",
"parts_order_confirmation": "Parts Order Confirmation",
"parts_return_confirmation": "Parts Return Confirmation",
"payment_recept": "Payment Receipt",
"time_tickets_by_employee": "Time Tickets By Employee",
"window_tag": "Window Tag",
"work_authorization": "Work Authorization"
},

View File

@@ -20,11 +20,11 @@
"appointments": {
"actions": {
"block": "",
"calculate": "",
"cancel": "Cancelar",
"intake": "Consumo",
"new": "Nueva cita",
"reschedule": "Reprogramar",
"smartscheduling": "",
"viewjob": "Ver trabajo"
},
"errors": {
@@ -50,7 +50,9 @@
"nocompletingjobs": "",
"nodateselected": "No se ha seleccionado ninguna fecha.",
"priorappointments": "Nombramientos previos",
"scheduledfor": "Cita programada para:"
"scheduledfor": "Cita programada para:",
"smartscheduling": "",
"suggesteddates": ""
},
"successes": {
"canceled": "Cita cancelada con éxito.",
@@ -182,11 +184,17 @@
"country": "",
"dailybodytarget": "",
"dailypainttarget": "",
"deliver": {
"templates": ""
},
"email": "",
"enforce_class": "",
"federal_tax_id": "",
"inhousevendorid": "",
"insurance_vendor_id": "",
"intake": {
"template": ""
},
"invoice_federal_tax_rate": "",
"invoice_local_tax_rate": "",
"invoice_state_tax_rate": "",
@@ -583,6 +591,9 @@
"errors": {
"notsent": "Correo electrónico no enviado Se encontró un error al enviar {{message}}"
},
"labels": {
"attachments": ""
},
"successes": {
"sent": "Correo electrónico enviado con éxito."
}
@@ -713,6 +724,11 @@
"rescuetitle": ""
}
},
"intake": {
"labels": {
"printpack": ""
}
},
"joblines": {
"actions": {
"new": ""
@@ -1344,15 +1360,21 @@
},
"jobs": {
"all_job_notes": "",
"appointment_confirmation": "",
"appointment_reminder": "",
"casl_authorization": "",
"casl_work_authorization": "",
"cover_sheet": "",
"coversheet": "",
"csi_invitation": "",
"estimate_detail": "",
"fippa_authorization": "",
"fippa_work_authorization": "",
"job_totals": "",
"parts_order_confirmation": "",
"parts_return_confirmation": "",
"payment_recept": "",
"time_tickets_by_employee": "",
"window_tag": "",
"work_authorization": ""
},

View File

@@ -20,11 +20,11 @@
"appointments": {
"actions": {
"block": "",
"calculate": "",
"cancel": "annuler",
"intake": "Admission",
"new": "Nouveau rendez-vous",
"reschedule": "Replanifier",
"smartscheduling": "",
"viewjob": "Voir le travail"
},
"errors": {
@@ -50,7 +50,9 @@
"nocompletingjobs": "",
"nodateselected": "Aucune date n'a été sélectionnée.",
"priorappointments": "Rendez-vous précédents",
"scheduledfor": "Rendez-vous prévu pour:"
"scheduledfor": "Rendez-vous prévu pour:",
"smartscheduling": "",
"suggesteddates": ""
},
"successes": {
"canceled": "Rendez-vous annulé avec succès.",
@@ -182,11 +184,17 @@
"country": "",
"dailybodytarget": "",
"dailypainttarget": "",
"deliver": {
"templates": ""
},
"email": "",
"enforce_class": "",
"federal_tax_id": "",
"inhousevendorid": "",
"insurance_vendor_id": "",
"intake": {
"template": ""
},
"invoice_federal_tax_rate": "",
"invoice_local_tax_rate": "",
"invoice_state_tax_rate": "",
@@ -583,6 +591,9 @@
"errors": {
"notsent": "Courriel non envoyé. Erreur rencontrée lors de l'envoi de {{message}}"
},
"labels": {
"attachments": ""
},
"successes": {
"sent": "E-mail envoyé avec succès."
}
@@ -713,6 +724,11 @@
"rescuetitle": ""
}
},
"intake": {
"labels": {
"printpack": ""
}
},
"joblines": {
"actions": {
"new": ""
@@ -1344,15 +1360,21 @@
},
"jobs": {
"all_job_notes": "",
"appointment_confirmation": "",
"appointment_reminder": "",
"casl_authorization": "",
"casl_work_authorization": "",
"cover_sheet": "",
"coversheet": "",
"csi_invitation": "",
"estimate_detail": "",
"fippa_authorization": "",
"fippa_work_authorization": "",
"job_totals": "",
"parts_order_confirmation": "",
"parts_return_confirmation": "",
"payment_recept": "",
"time_tickets_by_employee": "",
"window_tag": "",
"work_authorization": ""
},

View File

@@ -5,7 +5,9 @@ import { Tooltip } from "antd";
export function DateFormatter(props) {
return props.children ? (
<Moment format="MM/DD/YYYY ">{props.children}</Moment>
<Moment className={props && props.className} format="MM/DD/YYYY ">
{props.children}
</Moment>
) : null;
}

View File

@@ -59,6 +59,7 @@ export const TemplateList = (type, object) => {
"Sent to a customer as a reminder of an upcoming appointment.",
drivingId: "appointment",
key: "appointment_reminder",
subject: `Appointment Reminder`,
},
appointment_confirmation: {
title: "Appointment Confirmation",