IO-1591 added labels to print center.
This commit is contained in:
@@ -14010,6 +14010,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>print</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>refresh</name>
|
<name>refresh</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -34070,6 +34091,74 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<folder_node>
|
||||||
|
<name>labels</name>
|
||||||
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>count</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>labels</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>position</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
</children>
|
||||||
|
</folder_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>mpi_animal_checklist</name>
|
<name>mpi_animal_checklist</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -111,9 +111,13 @@
|
|||||||
"last 1 safari version"
|
"last 1 safari version"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"resolutions": {
|
||||||
|
"react-error-overlay": "6.0.9"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sentry/webpack-plugin": "^1.18.3",
|
"@sentry/webpack-plugin": "^1.18.3",
|
||||||
"@testing-library/cypress": "^8.0.2",
|
"@testing-library/cypress": "^8.0.2",
|
||||||
|
"react-error-overlay": "6.0.9",
|
||||||
"cypress": "^9.1.1",
|
"cypress": "^9.1.1",
|
||||||
"eslint-plugin-cypress": "^2.12.1",
|
"eslint-plugin-cypress": "^2.12.1",
|
||||||
"redux-logger": "^3.0.6",
|
"redux-logger": "^3.0.6",
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
import { Button, Card, Form, InputNumber, Popover } from "antd";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||||
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
|
|
||||||
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
bodyshop: selectBodyshop,
|
||||||
|
});
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
|
});
|
||||||
|
export default connect(
|
||||||
|
mapStateToProps,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(PrintCenterJobsLabels);
|
||||||
|
|
||||||
|
export function PrintCenterJobsLabels({ bodyshop, jobId }) {
|
||||||
|
const [isModalVisible, setIsModalVisible] = useState(false);
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
|
const handleOk = () => {
|
||||||
|
form.submit();
|
||||||
|
setIsModalVisible(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCancel = () => {
|
||||||
|
setIsModalVisible(false);
|
||||||
|
setLoading(false);
|
||||||
|
};
|
||||||
|
const handleFinish = async (values) => {
|
||||||
|
const { sendtype, ...restVals } = values;
|
||||||
|
setLoading(true);
|
||||||
|
await GenerateDocument(
|
||||||
|
{
|
||||||
|
name: TemplateList("job_special").folder_label_multiple.key,
|
||||||
|
variables: { id: jobId },
|
||||||
|
context: restVals,
|
||||||
|
},
|
||||||
|
{},
|
||||||
|
"p"
|
||||||
|
);
|
||||||
|
setLoading(false);
|
||||||
|
setIsModalVisible(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const content = (
|
||||||
|
<Card>
|
||||||
|
<Form
|
||||||
|
onFinish={handleFinish}
|
||||||
|
autoComplete={"off"}
|
||||||
|
layout="vertical"
|
||||||
|
form={form}
|
||||||
|
>
|
||||||
|
<Form.Item
|
||||||
|
label={t("printcenter.jobs.labels.position")}
|
||||||
|
name="position"
|
||||||
|
>
|
||||||
|
<InputNumber min={0} precision={0} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label={t("printcenter.jobs.labels.count")} name="count">
|
||||||
|
<InputNumber min={0} precision={0} />
|
||||||
|
</Form.Item>
|
||||||
|
<Button type="primary" loading={loading} onClick={handleOk}>
|
||||||
|
{t("general.actions.print")}
|
||||||
|
</Button>
|
||||||
|
<Button onClick={handleCancel}>{t("general.actions.cancel")}</Button>
|
||||||
|
</Form>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
<Popover content={content} visible={isModalVisible}>
|
||||||
|
<Button onClick={() => setIsModalVisible(true)}>
|
||||||
|
{t("printcenter.jobs.labels.labels")}
|
||||||
|
</Button>
|
||||||
|
</Popover>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
|
|||||||
import { TemplateList } from "../../utils/TemplateConstants";
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
import Jobd3RdPartyModal from "../job-3rd-party-modal/job-3rd-party-modal.component";
|
import Jobd3RdPartyModal from "../job-3rd-party-modal/job-3rd-party-modal.component";
|
||||||
import PrintCenterItem from "../print-center-item/print-center-item.component";
|
import PrintCenterItem from "../print-center-item/print-center-item.component";
|
||||||
|
import PrintCenterJobsLabels from "../print-center-jobs-labels/print-center-jobs-labels.component";
|
||||||
import PrintCenterSpeedPrint from "../print-center-speed-print/print-center-speed-print.component";
|
import PrintCenterSpeedPrint from "../print-center-speed-print/print-center-speed-print.component";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
printCenterModal: selectPrintCenter,
|
printCenterModal: selectPrintCenter,
|
||||||
@@ -52,6 +53,7 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop }) {
|
|||||||
<Card
|
<Card
|
||||||
extra={
|
extra={
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
|
<PrintCenterJobsLabels jobId={jobId} />
|
||||||
<Jobd3RdPartyModal jobId={jobId} />
|
<Jobd3RdPartyModal jobId={jobId} />
|
||||||
<Input.Search
|
<Input.Search
|
||||||
onChange={(e) => setSearch(e.target.value)}
|
onChange={(e) => setSearch(e.target.value)}
|
||||||
|
|||||||
@@ -890,6 +890,7 @@
|
|||||||
"deselectall": "Deselect All",
|
"deselectall": "Deselect All",
|
||||||
"edit": "Edit",
|
"edit": "Edit",
|
||||||
"login": "Login",
|
"login": "Login",
|
||||||
|
"print": "Print",
|
||||||
"refresh": "Refresh",
|
"refresh": "Refresh",
|
||||||
"remove": "Remove",
|
"remove": "Remove",
|
||||||
"reset": "Reset your changes.",
|
"reset": "Reset your changes.",
|
||||||
@@ -2032,6 +2033,11 @@
|
|||||||
"job_costing_ro": "Job Costing",
|
"job_costing_ro": "Job Costing",
|
||||||
"job_notes": "Job Notes",
|
"job_notes": "Job Notes",
|
||||||
"key_tag": "Key Tag",
|
"key_tag": "Key Tag",
|
||||||
|
"labels": {
|
||||||
|
"count": "Count",
|
||||||
|
"labels": "Labels",
|
||||||
|
"position": "Starting Position"
|
||||||
|
},
|
||||||
"mpi_animal_checklist": "MPI - Animal Checklist",
|
"mpi_animal_checklist": "MPI - Animal Checklist",
|
||||||
"mpi_eglass_auth": "MPI - eGlass Auth",
|
"mpi_eglass_auth": "MPI - eGlass Auth",
|
||||||
"mpi_final_acct_sheet": "MPI - Final Accounting Sheet",
|
"mpi_final_acct_sheet": "MPI - Final Accounting Sheet",
|
||||||
|
|||||||
@@ -890,6 +890,7 @@
|
|||||||
"deselectall": "",
|
"deselectall": "",
|
||||||
"edit": "Editar",
|
"edit": "Editar",
|
||||||
"login": "",
|
"login": "",
|
||||||
|
"print": "",
|
||||||
"refresh": "",
|
"refresh": "",
|
||||||
"remove": "",
|
"remove": "",
|
||||||
"reset": " Restablecer a original.",
|
"reset": " Restablecer a original.",
|
||||||
@@ -2032,6 +2033,11 @@
|
|||||||
"job_costing_ro": "",
|
"job_costing_ro": "",
|
||||||
"job_notes": "",
|
"job_notes": "",
|
||||||
"key_tag": "",
|
"key_tag": "",
|
||||||
|
"labels": {
|
||||||
|
"count": "",
|
||||||
|
"labels": "",
|
||||||
|
"position": ""
|
||||||
|
},
|
||||||
"mpi_animal_checklist": "",
|
"mpi_animal_checklist": "",
|
||||||
"mpi_eglass_auth": "",
|
"mpi_eglass_auth": "",
|
||||||
"mpi_final_acct_sheet": "",
|
"mpi_final_acct_sheet": "",
|
||||||
|
|||||||
@@ -890,6 +890,7 @@
|
|||||||
"deselectall": "",
|
"deselectall": "",
|
||||||
"edit": "modifier",
|
"edit": "modifier",
|
||||||
"login": "",
|
"login": "",
|
||||||
|
"print": "",
|
||||||
"refresh": "",
|
"refresh": "",
|
||||||
"remove": "",
|
"remove": "",
|
||||||
"reset": " Rétablir l'original.",
|
"reset": " Rétablir l'original.",
|
||||||
@@ -2032,6 +2033,11 @@
|
|||||||
"job_costing_ro": "",
|
"job_costing_ro": "",
|
||||||
"job_notes": "",
|
"job_notes": "",
|
||||||
"key_tag": "",
|
"key_tag": "",
|
||||||
|
"labels": {
|
||||||
|
"count": "",
|
||||||
|
"labels": "",
|
||||||
|
"position": ""
|
||||||
|
},
|
||||||
"mpi_animal_checklist": "",
|
"mpi_animal_checklist": "",
|
||||||
"mpi_eglass_auth": "",
|
"mpi_eglass_auth": "",
|
||||||
"mpi_final_acct_sheet": "",
|
"mpi_final_acct_sheet": "",
|
||||||
|
|||||||
@@ -464,6 +464,12 @@ export const TemplateList = (type, context) => {
|
|||||||
key: "special_thirdpartypayer",
|
key: "special_thirdpartypayer",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
},
|
},
|
||||||
|
folder_label_multiple: {
|
||||||
|
title: i18n.t("printcenter.jobs.folder_label_multiple"),
|
||||||
|
description: "Folder Label Multiple",
|
||||||
|
key: "folder_label_multiple",
|
||||||
|
disabled: false,
|
||||||
|
},
|
||||||
csi_invitation_action: {
|
csi_invitation_action: {
|
||||||
title: i18n.t("printcenter.jobs.csi_invitation_action"),
|
title: i18n.t("printcenter.jobs.csi_invitation_action"),
|
||||||
description: "CSI invite",
|
description: "CSI invite",
|
||||||
|
|||||||
@@ -11842,10 +11842,10 @@ react-draggable@^4.0.0, react-draggable@^4.0.3:
|
|||||||
clsx "^1.1.1"
|
clsx "^1.1.1"
|
||||||
prop-types "^15.6.0"
|
prop-types "^15.6.0"
|
||||||
|
|
||||||
react-error-overlay@^6.0.9:
|
react-error-overlay@6.0.9, react-error-overlay@^6.0.9:
|
||||||
version "6.0.10"
|
version "6.0.9"
|
||||||
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.10.tgz#0fe26db4fa85d9dbb8624729580e90e7159a59a6"
|
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.9.tgz#3c743010c9359608c375ecd6bc76f35d93995b0a"
|
||||||
integrity sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA==
|
integrity sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==
|
||||||
|
|
||||||
react-grid-gallery@^0.5.5:
|
react-grid-gallery@^0.5.5:
|
||||||
version "0.5.5"
|
version "0.5.5"
|
||||||
|
|||||||
Reference in New Issue
Block a user