Changing of deprecated antd props.
This commit is contained in:
@@ -61,7 +61,7 @@ export function AllocationsAssignmentComponent({
|
||||
);
|
||||
|
||||
return (
|
||||
<Popover content={popContent} visible={visibility}>
|
||||
<Popover content={popContent} open={visibility}>
|
||||
<Button onClick={() => setVisibility(true)}>
|
||||
{t("allocations.actions.assign")}
|
||||
</Button>
|
||||
|
||||
@@ -59,7 +59,7 @@ export default connect(
|
||||
);
|
||||
|
||||
return (
|
||||
<Popover content={popContent} visible={visibility}>
|
||||
<Popover content={popContent} open={visibility}>
|
||||
<Button disabled={disabled} onClick={() => setVisibility(true)}>
|
||||
{t("allocations.actions.assign")}
|
||||
</Button>
|
||||
|
||||
@@ -178,7 +178,7 @@ export function BillDetailEditcontainer({
|
||||
<BillDetailEditReturn data={data} />
|
||||
|
||||
<Popconfirm
|
||||
visible={visible}
|
||||
open={visible}
|
||||
onConfirm={() => form.submit()}
|
||||
onCancel={() => setVisible(false)}
|
||||
okButtonProps={{ loading: updateLoading }}
|
||||
|
||||
@@ -77,7 +77,7 @@ export function BillDetailEditReturn({
|
||||
return (
|
||||
<>
|
||||
<Modal
|
||||
visible={visible}
|
||||
open={visible}
|
||||
onCancel={() => setVisible(false)}
|
||||
destroyOnClose
|
||||
title={t("bills.actions.return")}
|
||||
|
||||
@@ -32,7 +32,7 @@ export default function BillDetailEditcontainer() {
|
||||
history.push({ search: queryString.stringify(search) });
|
||||
}}
|
||||
destroyOnClose
|
||||
visible={search.billid}
|
||||
open={search.billid}
|
||||
>
|
||||
<BillDetailEditComponent />
|
||||
</Drawer>
|
||||
|
||||
@@ -344,7 +344,7 @@ function BillEnterModalContainer({
|
||||
<Modal
|
||||
title={t("bills.labels.new")}
|
||||
width={"98%"}
|
||||
visible={billEnterModal.visible}
|
||||
open={billEnterModal.visible}
|
||||
okText={t("general.actions.save")}
|
||||
keyboard="false"
|
||||
onOk={() => form.submit()}
|
||||
|
||||
@@ -70,7 +70,7 @@ export function ContractsFindModalContainer({
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={visible}
|
||||
open={visible}
|
||||
width="70%"
|
||||
title={t("payments.labels.findermodal")}
|
||||
onCancel={() => toggleModalVisible()}
|
||||
|
||||
@@ -35,7 +35,7 @@ export default function CABCpvrtCalculator({ disabled, form }) {
|
||||
<Popover
|
||||
destroyTooltipOnHide
|
||||
content={popContent}
|
||||
visible={visibility}
|
||||
open={visibility}
|
||||
disabled={disabled}
|
||||
>
|
||||
<Button disabled={disabled} onClick={() => setVisibility(true)}>
|
||||
|
||||
@@ -88,8 +88,8 @@ export function ChatMediaSelector({
|
||||
}
|
||||
title={t("messaging.labels.selectmedia")}
|
||||
trigger="click"
|
||||
visible={visible}
|
||||
onVisibleChange={handleVisibleChange}
|
||||
open={visible}
|
||||
onOpenChange={handleVisibleChange}
|
||||
>
|
||||
<Badge count={selectedMedia.filter((s) => s.isSelected).length}>
|
||||
<PictureFilled style={{ margin: "0 .5rem" }} />
|
||||
|
||||
@@ -390,7 +390,7 @@ export function ContractConvertToRo({
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Popover content={popContent} visible={visible}>
|
||||
<Popover content={popContent} open={visible}>
|
||||
<Button
|
||||
onClick={() => setVisible(true)}
|
||||
loading={loading}
|
||||
|
||||
@@ -55,7 +55,7 @@ export default function ContractLicenseDecodeButton({ form }) {
|
||||
return (
|
||||
<div>
|
||||
<Modal
|
||||
visible={modalVisible}
|
||||
open={modalVisible}
|
||||
okText={t("contracts.actions.senddltoform")}
|
||||
onOk={handleInsertForm}
|
||||
okButtonProps={{ disabled: !!!decodedBarcode }}
|
||||
|
||||
@@ -59,7 +59,7 @@ export function ContractsFindModalContainer({
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={visible}
|
||||
open={visible}
|
||||
width="70%"
|
||||
title={t("contracts.labels.findermodal")}
|
||||
onCancel={() => toggleModalVisible()}
|
||||
|
||||
@@ -64,7 +64,7 @@ export function CCReturnModalContainer({
|
||||
return (
|
||||
<Modal
|
||||
title={t("courtesycars.labels.return")}
|
||||
visible={visible}
|
||||
open={visible}
|
||||
onCancel={() => toggleModalVisible()}
|
||||
width={"90%"}
|
||||
okText={t("general.actions.save")}
|
||||
|
||||
@@ -51,7 +51,7 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) {
|
||||
<>
|
||||
<Modal
|
||||
width={"90%"}
|
||||
visible={visible}
|
||||
open={visible}
|
||||
onCancel={() => setVisible(false)}
|
||||
onOk={() => {
|
||||
form.setFieldsValue({
|
||||
|
||||
@@ -174,7 +174,7 @@ export function EmailOverlayContainer({
|
||||
return (
|
||||
<Modal
|
||||
destroyOnClose={true}
|
||||
visible={modalVisible}
|
||||
open={modalVisible}
|
||||
maskClosable={false}
|
||||
width={"80%"}
|
||||
onOk={() => form.submit()}
|
||||
|
||||
@@ -94,7 +94,7 @@ const FormInputNUmberCalculator = (
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Popover content={popContent} visible={history.length > 0}>
|
||||
<Popover content={popContent} open={history.length > 0}>
|
||||
<InputNumber
|
||||
ref={ref}
|
||||
value={value}
|
||||
|
||||
@@ -103,7 +103,7 @@ export function InventoryUpsertModalContainer({
|
||||
? t("inventory.actions.edit")
|
||||
: t("inventory.actions.new")
|
||||
}
|
||||
visible={visible}
|
||||
open={visible}
|
||||
okText={t("general.actions.save")}
|
||||
onOk={() => {
|
||||
form.submit();
|
||||
|
||||
@@ -96,7 +96,7 @@ export function Jobd3RdPartyModal({ bodyshop, jobId, job }) {
|
||||
return (
|
||||
<>
|
||||
<Button onClick={showModal}>{t("printcenter.jobs.3rdpartypayer")}</Button>
|
||||
<Modal visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}>
|
||||
<Modal open={isModalVisible} onOk={handleOk} onCancel={handleCancel}>
|
||||
<Form
|
||||
onFinish={handleFinish}
|
||||
autoComplete={"off"}
|
||||
|
||||
@@ -283,8 +283,8 @@ export function ScheduleEventComponent({
|
||||
|
||||
return (
|
||||
<Popover
|
||||
visible={visible}
|
||||
onVisibleChange={(vis) => !event.vacation && setVisible(vis)}
|
||||
open={visible}
|
||||
onOpenChange={(vis) => !event.vacation && setVisible(vis)}
|
||||
trigger="click"
|
||||
content={event.block ? blockContent : popoverContent}
|
||||
style={{
|
||||
|
||||
@@ -39,7 +39,7 @@ export function JobCostingModalContainer({
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={visible}
|
||||
open={visible}
|
||||
title={t("jobs.labels.jobcosting")}
|
||||
onOk={() => {
|
||||
toggleModalVisible();
|
||||
|
||||
@@ -76,7 +76,7 @@ export function JobDetailCards({ bodyshop, setPrintCenterContext }) {
|
||||
|
||||
return (
|
||||
<Drawer
|
||||
visible={!!selected}
|
||||
open={!!selected}
|
||||
destroyOnClose
|
||||
width={drawerPercentage}
|
||||
placement="right"
|
||||
|
||||
@@ -87,7 +87,7 @@ export function JobEmployeeAssignments({
|
||||
);
|
||||
|
||||
return (
|
||||
<Popover destroyTooltipOnHide content={popContent} visible={visibility}>
|
||||
<Popover destroyTooltipOnHide content={popContent} open={visibility}>
|
||||
<Spin spinning={loading}>
|
||||
<DataLabel label={t("jobs.fields.employee_body")}>
|
||||
{body ? (
|
||||
|
||||
@@ -225,7 +225,7 @@ export function JobLineConvertToLabor({
|
||||
<Popover
|
||||
disabled={jobline.convertedtolbr}
|
||||
content={overlay}
|
||||
visible={visibility}
|
||||
open={visibility}
|
||||
placement="bottom"
|
||||
>
|
||||
<Tooltip title={t("joblines.actions.converttolabor")}>
|
||||
|
||||
@@ -49,7 +49,7 @@ export function JobLinesUpsertModalComponent({
|
||||
: t("joblines.labels.new")
|
||||
}
|
||||
forceRender
|
||||
visible={visible}
|
||||
open={visible}
|
||||
width="60%"
|
||||
okText={t("general.actions.save")}
|
||||
onOk={() => form.submit()}
|
||||
|
||||
@@ -42,7 +42,7 @@ function JobReconciliationModalContainer({
|
||||
<Modal
|
||||
title={t("jobs.labels.reconciliationheader")}
|
||||
width={"95%"}
|
||||
visible={visible}
|
||||
open={visible}
|
||||
okText={t("general.actions.close")}
|
||||
onOk={handleCancel}
|
||||
onCancel={handleCancel}
|
||||
|
||||
@@ -186,7 +186,7 @@ export default function ScoreboardAddButton({
|
||||
};
|
||||
|
||||
return (
|
||||
<Popover content={overlay} visible={visibility} placement="bottom">
|
||||
<Popover content={overlay} open={visibility} placement="bottom">
|
||||
<Button
|
||||
loading={loading}
|
||||
disabled={disabled}
|
||||
|
||||
@@ -226,7 +226,7 @@ export function JobsConvertButton({
|
||||
if (job.converted) return <></>;
|
||||
|
||||
return (
|
||||
<Popover visible={visible} content={popMenu}>
|
||||
<Popover open={visible} content={popMenu}>
|
||||
<Button
|
||||
key="convert"
|
||||
type="danger"
|
||||
|
||||
@@ -159,7 +159,7 @@ export function JobsDocumentsGalleryReassign({
|
||||
);
|
||||
|
||||
return (
|
||||
<Popover content={popContent} visible={visible}>
|
||||
<Popover content={popContent} open={visible}>
|
||||
<Button
|
||||
disabled={selectedImages.length < 1}
|
||||
onClick={() => setVisible(true)}
|
||||
|
||||
@@ -83,7 +83,7 @@ export function JobsDocumentsLocalGalleryReassign({
|
||||
);
|
||||
|
||||
return (
|
||||
<Popover content={popContent} visible={visible}>
|
||||
<Popover content={popContent} open={visible}>
|
||||
<Button
|
||||
//disabled={selectedImages.length < 1}
|
||||
onClick={() => setVisible(true)}
|
||||
|
||||
@@ -171,8 +171,8 @@ export function LaborAllocationsAdjustmentEdit({
|
||||
|
||||
return (
|
||||
<Popover
|
||||
visible={visible}
|
||||
onVisibleChange={(vis) => setVisible(vis)}
|
||||
open={visible}
|
||||
onOpenChange={(vis) => setVisible(vis)}
|
||||
content={overlay}
|
||||
trigger="click"
|
||||
>
|
||||
|
||||
@@ -117,7 +117,7 @@ export function NoteUpsertModalContainer({
|
||||
return (
|
||||
<Modal
|
||||
title={existingNote ? t("notes.actions.edit") : t("notes.actions.new")}
|
||||
visible={visible}
|
||||
open={visible}
|
||||
okText={t("general.actions.save")}
|
||||
onOk={() => {
|
||||
form.submit();
|
||||
|
||||
@@ -76,7 +76,7 @@ export function PartsOrderBackorderEta({
|
||||
<Popover
|
||||
destroyTooltipOnHide
|
||||
content={popContent}
|
||||
visible={visibility}
|
||||
open={visibility}
|
||||
disabled={disabled}
|
||||
>
|
||||
<DateFormatter>{backordered_eta}</DateFormatter>
|
||||
|
||||
@@ -92,7 +92,7 @@ export function PartsOrderLineBackorderButton({
|
||||
<Popover
|
||||
destroyTooltipOnHide
|
||||
content={popContent}
|
||||
visible={visibility}
|
||||
open={visibility}
|
||||
disabled={disabled}
|
||||
>
|
||||
<Button loading={loading} onClick={handlePopover}>
|
||||
|
||||
@@ -471,7 +471,7 @@ export function PartsOrderListTableComponent({
|
||||
<Drawer
|
||||
placement="right"
|
||||
onClose={() => handleOnRowClick(null)}
|
||||
visible={selectedpartsorder}
|
||||
open={selectedpartsorder}
|
||||
closable
|
||||
width={drawerPercentage}
|
||||
>
|
||||
|
||||
@@ -350,7 +350,7 @@ export function PartsOrderModalContainer({
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={visible}
|
||||
open={visible}
|
||||
title={
|
||||
isReturn
|
||||
? `${t("parts_orders.labels.returnpartsorder")} ${invoiceNumber}`
|
||||
|
||||
@@ -92,7 +92,7 @@ export function PartsReceiveModalContainer({
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={visible}
|
||||
open={visible}
|
||||
title={t("parts_orders.labels.receive")}
|
||||
onCancel={() => toggleModalVisible()}
|
||||
onOk={() => form.submit()}
|
||||
|
||||
@@ -90,7 +90,7 @@ export function BillMarkSelectedExported({
|
||||
|
||||
return (
|
||||
<Popconfirm
|
||||
visible={visible}
|
||||
open={visible}
|
||||
title={t("general.labels.areyousure")}
|
||||
onCancel={() => setVisible(false)}
|
||||
onConfirm={handleUpdate}
|
||||
|
||||
@@ -93,7 +93,7 @@ export function PaymentMarkSelectedExported({
|
||||
|
||||
return (
|
||||
<Popconfirm
|
||||
visible={visible}
|
||||
open={visible}
|
||||
title={t("general.labels.areyousure")}
|
||||
onCancel={() => setVisible(false)}
|
||||
onConfirm={handleUpdate}
|
||||
|
||||
@@ -138,7 +138,7 @@ function PaymentModalContainer({
|
||||
? t("payments.labels.new")
|
||||
: t("payments.labels.edit")
|
||||
}
|
||||
visible={visible}
|
||||
open={visible}
|
||||
okText={t("general.actions.save")}
|
||||
onOk={() => form.submit()}
|
||||
width="50%"
|
||||
|
||||
@@ -123,7 +123,7 @@ export function PrintCenterJobsLabels({ bodyshop, jobId }) {
|
||||
</Card>
|
||||
);
|
||||
return (
|
||||
<Popover content={content} visible={isModalVisible}>
|
||||
<Popover content={content} open={isModalVisible}>
|
||||
<Button onClick={() => setIsModalVisible(true)}>
|
||||
{t("printcenter.jobs.labels.labels")}
|
||||
</Button>
|
||||
|
||||
@@ -28,7 +28,7 @@ export function PrintCenterModalContainer({
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={visible}
|
||||
open={visible}
|
||||
onOk={() => toggleModalVisible()}
|
||||
onCancel={() => toggleModalVisible()}
|
||||
cancelButtonProps={{ style: { display: "none" } }}
|
||||
|
||||
@@ -166,7 +166,7 @@ export default function ProductionBoardKanbanCardSettings({
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<Popover content={overlay} visible={visible}>
|
||||
<Popover content={overlay} open={visible}>
|
||||
<Button loading={loading} onClick={() => setVisible(true)}>
|
||||
{t("production.labels.cardsettings")}
|
||||
</Button>
|
||||
|
||||
@@ -41,8 +41,8 @@ export default function ProductionListColumnComment({ record }) {
|
||||
|
||||
return (
|
||||
<Popover
|
||||
onVisibleChange={handleVisibleChange}
|
||||
visible={visible}
|
||||
onOpenChange={handleVisibleChange}
|
||||
open={visible}
|
||||
content={
|
||||
<div style={{ width: "30em" }}>
|
||||
<Input.TextArea
|
||||
|
||||
@@ -52,7 +52,7 @@ export default function ProductionListDate({
|
||||
return (
|
||||
<Dropdown
|
||||
//trigger={["click"]}
|
||||
visible={visible}
|
||||
open={visible}
|
||||
style={{
|
||||
height: "19px",
|
||||
}}
|
||||
|
||||
@@ -153,7 +153,7 @@ export function ProductionListEmpAssignment({
|
||||
theEmployee = bodyshop.employees.find((e) => e.id === record[type]);
|
||||
|
||||
return (
|
||||
<Popover destroyTooltipOnHide content={popContent} visible={visibility}>
|
||||
<Popover destroyTooltipOnHide content={popContent} open={visibility}>
|
||||
<Spin spinning={loading}>
|
||||
{record[type] ? (
|
||||
<div>
|
||||
|
||||
@@ -93,7 +93,7 @@ export function ProductionLastContacted({ currentUser, record }) {
|
||||
<div>
|
||||
<Dropdown
|
||||
//trigger={["click"]}
|
||||
visible={visible}
|
||||
open={visible}
|
||||
style={{
|
||||
height: "19px",
|
||||
}}
|
||||
|
||||
@@ -49,8 +49,8 @@ export default function ProductionListColumnProductionNote({ record }) {
|
||||
|
||||
return (
|
||||
<Popover
|
||||
onVisibleChange={handleVisibleChange}
|
||||
visible={visible}
|
||||
onOpenChange={handleVisibleChange}
|
||||
open={visible}
|
||||
content={
|
||||
<div style={{ width: "30em" }}>
|
||||
<Input.TextArea
|
||||
|
||||
@@ -90,7 +90,7 @@ export function ProductionListDetail({
|
||||
placement="right"
|
||||
width={"33%"}
|
||||
onClose={handleClose}
|
||||
visible={selected}
|
||||
open={selected}
|
||||
>
|
||||
{loading && <LoadingSkeleton />}
|
||||
{error && <AlertComponent error={JSON.stringify(error)} />}
|
||||
|
||||
@@ -88,7 +88,7 @@ export function ProductionListSaveConfigButton({
|
||||
);
|
||||
|
||||
return (
|
||||
<Popover visible={visible} content={popMenu}>
|
||||
<Popover open={visible} content={popMenu}>
|
||||
<Button loading={loading} onClick={() => setVisible(true)}>
|
||||
{t("production.actions.saveconfig")}
|
||||
</Button>
|
||||
|
||||
@@ -25,7 +25,7 @@ export function ReportCenterModalContainer({
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={visible}
|
||||
open={visible}
|
||||
title={t("printcenter.labels.reportcentermodal")}
|
||||
onOk={() => toggleModalVisible()}
|
||||
onCancel={() => toggleModalVisible()}
|
||||
|
||||
@@ -184,7 +184,7 @@ export function ScheduleJobModalContainer({
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={visible}
|
||||
open={visible}
|
||||
onCancel={() => toggleModalVisible()}
|
||||
onOk={() => form.submit()}
|
||||
width={"90%"}
|
||||
|
||||
@@ -154,7 +154,7 @@ export function ScheduleManualEvent({ bodyshop, event }) {
|
||||
};
|
||||
|
||||
return (
|
||||
<Popover content={overlay} visible={visibility}>
|
||||
<Popover content={overlay} open={visibility}>
|
||||
<Button loading={loading} onClick={handleClick}>
|
||||
{event
|
||||
? t("appointments.actions.reschedule")
|
||||
|
||||
@@ -90,7 +90,7 @@ export default function ScoreboardEntryEdit({ entry }) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Dropdown visible={visible} overlay={popContent}>
|
||||
<Dropdown open={visible} overlay={popContent}>
|
||||
<Button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
|
||||
@@ -100,7 +100,7 @@ export default function ScoreboardJobsList({ scoreBoardlist }) {
|
||||
return (
|
||||
<>
|
||||
<Modal
|
||||
visible={state.visible}
|
||||
open={state.visible}
|
||||
destroyOnClose
|
||||
width="80%"
|
||||
cancelButtonProps={{ style: { display: "none" } }}
|
||||
|
||||
@@ -112,7 +112,7 @@ export default function ShopEmployeeAddVacation({ employee }) {
|
||||
};
|
||||
|
||||
return (
|
||||
<Popover content={overlay} visible={visibility}>
|
||||
<Popover content={overlay} open={visibility}>
|
||||
<Button
|
||||
loading={loading}
|
||||
disabled={!employee?.active}
|
||||
|
||||
@@ -38,7 +38,7 @@ export default function ShopTemplatesListContainer({ visibleState }) {
|
||||
<Drawer
|
||||
placement="left"
|
||||
width="25%"
|
||||
visible={visible}
|
||||
open={visible}
|
||||
onClose={() => setVisible(false)}
|
||||
>
|
||||
<div>
|
||||
|
||||
@@ -116,7 +116,7 @@ export function TechJobPrintTickets({ technician, event }) {
|
||||
};
|
||||
|
||||
return (
|
||||
<Popover content={overlay} visible={visibility}>
|
||||
<Popover content={overlay} open={visibility}>
|
||||
<Button loading={loading} onClick={handleClick}>
|
||||
{t("general.actions.print")}
|
||||
</Button>
|
||||
|
||||
@@ -73,7 +73,7 @@ export function TechLookupJobsDrawer({ bodyshop, setPrintCenterContext }) {
|
||||
|
||||
return (
|
||||
<Drawer
|
||||
visible={!!selected}
|
||||
open={!!selected}
|
||||
destroyOnClose
|
||||
width={drawerPercentage}
|
||||
placement="right"
|
||||
|
||||
@@ -167,7 +167,7 @@ export function TimeTicketModalContainer({
|
||||
: t("timetickets.labels.new")
|
||||
}
|
||||
width={"90%"}
|
||||
visible={timeTicketModal.visible}
|
||||
open={timeTicketModal.visible}
|
||||
forceRender
|
||||
onCancel={handleCancel}
|
||||
afterClose={() => form.resetFields()}
|
||||
|
||||
@@ -58,7 +58,7 @@ export function PhonebookContainer({ setBreadcrumbs, setSelectedHeader }) {
|
||||
delete search.phonebookentry;
|
||||
history.push({ search: queryString.stringify(search) });
|
||||
}}
|
||||
visible={phonebookentry}
|
||||
open={phonebookentry}
|
||||
>
|
||||
<PhonebookFormContainer />
|
||||
</Drawer>
|
||||
|
||||
@@ -36,7 +36,7 @@ export default function ShopVendorPageComponent() {
|
||||
delete search.selectedvendor;
|
||||
history.push({ search: queryString.stringify(search) });
|
||||
}}
|
||||
visible={selectedvendor}
|
||||
open={selectedvendor}
|
||||
>
|
||||
<VendorsFormContainer />
|
||||
</Drawer>
|
||||
|
||||
Reference in New Issue
Block a user