feature/IO-3103-Ant5-Notifications

This commit is contained in:
Dave Richer
2025-01-21 17:20:46 -08:00
parent 0e218abbf4
commit 85d25862eb
161 changed files with 759 additions and 354 deletions

View File

@@ -1,13 +1,4 @@
import {
Button,
Card,
Form,
InputNumber,
notification,
Popover,
Radio,
Space,
} from "antd";
import { Button, Card, Form, InputNumber, Popover, Radio, Space } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
@@ -15,6 +6,7 @@ import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { GenerateDocument } from "../../utils/RenderTemplate";
import { TemplateList } from "../../utils/TemplateConstants";
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop
@@ -29,6 +21,7 @@ export function PrintCenterJobsLabels({ bodyshop, jobId }) {
const [loading, setLoading] = useState(false);
const { t } = useTranslation();
const [form] = Form.useForm();
const notification = useNotification();
const handleOk = (e) => {
e.stopPropagation();
@@ -51,7 +44,8 @@ export function PrintCenterJobsLabels({ bodyshop, jobId }) {
},
{},
"p",
jobId
jobId,
notification
);
setIsModalVisible(false);
} catch (error) {
@@ -109,9 +103,7 @@ export function PrintCenterJobsLabels({ bodyshop, jobId }) {
<Button type="primary" loading={loading} onClick={handleOk}>
{t("general.actions.print")}
</Button>
<Button onClick={handleCancel}>
{t("general.actions.cancel")}
</Button>
<Button onClick={handleCancel}>{t("general.actions.cancel")}</Button>
</Space>
</div>
</Form>