2023-01-16 09:45:12 +00:00
|
|
|
import ActionDialog from "@dashboard/components/ActionDialog";
|
2023-05-30 07:42:22 +00:00
|
|
|
import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton";
|
2021-05-14 08:15:15 +00:00
|
|
|
import { DialogContentText } from "@material-ui/core";
|
2020-11-19 14:42:14 +00:00
|
|
|
import React from "react";
|
2022-03-21 11:29:08 +00:00
|
|
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
|
|
|
|
|
|
import messages from "./messages";
|
2020-11-19 14:42:14 +00:00
|
|
|
|
|
|
|
export interface BulkAttributeUnassignDialogProps {
|
|
|
|
title: string;
|
|
|
|
attributeQuantity: number;
|
|
|
|
confirmButtonState: ConfirmButtonTransitionState;
|
|
|
|
open: boolean;
|
|
|
|
itemTypeName: string;
|
|
|
|
onClose: () => void;
|
|
|
|
onConfirm: () => void;
|
|
|
|
}
|
|
|
|
|
2023-05-30 07:42:22 +00:00
|
|
|
const BulkAttributeUnassignDialog: React.FC<
|
|
|
|
BulkAttributeUnassignDialogProps
|
|
|
|
> = ({
|
2020-11-19 14:42:14 +00:00
|
|
|
title,
|
|
|
|
attributeQuantity,
|
|
|
|
confirmButtonState,
|
|
|
|
open,
|
|
|
|
itemTypeName,
|
|
|
|
onClose,
|
2022-06-21 09:36:55 +00:00
|
|
|
onConfirm,
|
2022-03-21 11:29:08 +00:00
|
|
|
}) => {
|
|
|
|
const intl = useIntl();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<ActionDialog
|
|
|
|
confirmButtonState={confirmButtonState}
|
|
|
|
open={open}
|
|
|
|
onClose={onClose}
|
|
|
|
onConfirm={onConfirm}
|
|
|
|
title={title}
|
|
|
|
confirmButtonLabel={intl.formatMessage(messages.confirmBtn)}
|
|
|
|
>
|
|
|
|
<DialogContentText>
|
|
|
|
<FormattedMessage
|
|
|
|
{...messages.content}
|
|
|
|
values={{
|
|
|
|
attributeQuantity: <strong>{attributeQuantity}</strong>,
|
|
|
|
counter: attributeQuantity,
|
2022-06-21 09:36:55 +00:00
|
|
|
itemTypeName: <strong>{itemTypeName}</strong>,
|
2022-03-21 11:29:08 +00:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</DialogContentText>
|
|
|
|
</ActionDialog>
|
|
|
|
);
|
|
|
|
};
|
2020-11-19 14:42:14 +00:00
|
|
|
BulkAttributeUnassignDialog.displayName = "BulkAttributeUnassignDialog";
|
|
|
|
export default BulkAttributeUnassignDialog;
|