Changing of deprecated antd props.

This commit is contained in:
Patrick Fic
2023-01-17 20:00:29 -08:00
parent 7bd83557c1
commit 533a5b87ec
61 changed files with 66 additions and 66 deletions

View File

@@ -61,7 +61,7 @@ export function AllocationsAssignmentComponent({
); );
return ( return (
<Popover content={popContent} visible={visibility}> <Popover content={popContent} open={visibility}>
<Button onClick={() => setVisibility(true)}> <Button onClick={() => setVisibility(true)}>
{t("allocations.actions.assign")} {t("allocations.actions.assign")}
</Button> </Button>

View File

@@ -59,7 +59,7 @@ export default connect(
); );
return ( return (
<Popover content={popContent} visible={visibility}> <Popover content={popContent} open={visibility}>
<Button disabled={disabled} onClick={() => setVisibility(true)}> <Button disabled={disabled} onClick={() => setVisibility(true)}>
{t("allocations.actions.assign")} {t("allocations.actions.assign")}
</Button> </Button>

View File

@@ -178,7 +178,7 @@ export function BillDetailEditcontainer({
<BillDetailEditReturn data={data} /> <BillDetailEditReturn data={data} />
<Popconfirm <Popconfirm
visible={visible} open={visible}
onConfirm={() => form.submit()} onConfirm={() => form.submit()}
onCancel={() => setVisible(false)} onCancel={() => setVisible(false)}
okButtonProps={{ loading: updateLoading }} okButtonProps={{ loading: updateLoading }}

View File

@@ -77,7 +77,7 @@ export function BillDetailEditReturn({
return ( return (
<> <>
<Modal <Modal
visible={visible} open={visible}
onCancel={() => setVisible(false)} onCancel={() => setVisible(false)}
destroyOnClose destroyOnClose
title={t("bills.actions.return")} title={t("bills.actions.return")}

View File

@@ -32,7 +32,7 @@ export default function BillDetailEditcontainer() {
history.push({ search: queryString.stringify(search) }); history.push({ search: queryString.stringify(search) });
}} }}
destroyOnClose destroyOnClose
visible={search.billid} open={search.billid}
> >
<BillDetailEditComponent /> <BillDetailEditComponent />
</Drawer> </Drawer>

View File

@@ -344,7 +344,7 @@ function BillEnterModalContainer({
<Modal <Modal
title={t("bills.labels.new")} title={t("bills.labels.new")}
width={"98%"} width={"98%"}
visible={billEnterModal.visible} open={billEnterModal.visible}
okText={t("general.actions.save")} okText={t("general.actions.save")}
keyboard="false" keyboard="false"
onOk={() => form.submit()} onOk={() => form.submit()}

View File

@@ -70,7 +70,7 @@ export function ContractsFindModalContainer({
return ( return (
<Modal <Modal
visible={visible} open={visible}
width="70%" width="70%"
title={t("payments.labels.findermodal")} title={t("payments.labels.findermodal")}
onCancel={() => toggleModalVisible()} onCancel={() => toggleModalVisible()}

View File

@@ -35,7 +35,7 @@ export default function CABCpvrtCalculator({ disabled, form }) {
<Popover <Popover
destroyTooltipOnHide destroyTooltipOnHide
content={popContent} content={popContent}
visible={visibility} open={visibility}
disabled={disabled} disabled={disabled}
> >
<Button disabled={disabled} onClick={() => setVisibility(true)}> <Button disabled={disabled} onClick={() => setVisibility(true)}>

View File

@@ -88,8 +88,8 @@ export function ChatMediaSelector({
} }
title={t("messaging.labels.selectmedia")} title={t("messaging.labels.selectmedia")}
trigger="click" trigger="click"
visible={visible} open={visible}
onVisibleChange={handleVisibleChange} onOpenChange={handleVisibleChange}
> >
<Badge count={selectedMedia.filter((s) => s.isSelected).length}> <Badge count={selectedMedia.filter((s) => s.isSelected).length}>
<PictureFilled style={{ margin: "0 .5rem" }} /> <PictureFilled style={{ margin: "0 .5rem" }} />

View File

@@ -390,7 +390,7 @@ export function ContractConvertToRo({
return ( return (
<div> <div>
<Popover content={popContent} visible={visible}> <Popover content={popContent} open={visible}>
<Button <Button
onClick={() => setVisible(true)} onClick={() => setVisible(true)}
loading={loading} loading={loading}

View File

@@ -55,7 +55,7 @@ export default function ContractLicenseDecodeButton({ form }) {
return ( return (
<div> <div>
<Modal <Modal
visible={modalVisible} open={modalVisible}
okText={t("contracts.actions.senddltoform")} okText={t("contracts.actions.senddltoform")}
onOk={handleInsertForm} onOk={handleInsertForm}
okButtonProps={{ disabled: !!!decodedBarcode }} okButtonProps={{ disabled: !!!decodedBarcode }}

View File

@@ -59,7 +59,7 @@ export function ContractsFindModalContainer({
return ( return (
<Modal <Modal
visible={visible} open={visible}
width="70%" width="70%"
title={t("contracts.labels.findermodal")} title={t("contracts.labels.findermodal")}
onCancel={() => toggleModalVisible()} onCancel={() => toggleModalVisible()}

View File

@@ -64,7 +64,7 @@ export function CCReturnModalContainer({
return ( return (
<Modal <Modal
title={t("courtesycars.labels.return")} title={t("courtesycars.labels.return")}
visible={visible} open={visible}
onCancel={() => toggleModalVisible()} onCancel={() => toggleModalVisible()}
width={"90%"} width={"90%"}
okText={t("general.actions.save")} okText={t("general.actions.save")}

View File

@@ -51,7 +51,7 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) {
<> <>
<Modal <Modal
width={"90%"} width={"90%"}
visible={visible} open={visible}
onCancel={() => setVisible(false)} onCancel={() => setVisible(false)}
onOk={() => { onOk={() => {
form.setFieldsValue({ form.setFieldsValue({

View File

@@ -174,7 +174,7 @@ export function EmailOverlayContainer({
return ( return (
<Modal <Modal
destroyOnClose={true} destroyOnClose={true}
visible={modalVisible} open={modalVisible}
maskClosable={false} maskClosable={false}
width={"80%"} width={"80%"}
onOk={() => form.submit()} onOk={() => form.submit()}

View File

@@ -94,7 +94,7 @@ const FormInputNUmberCalculator = (
return ( return (
<div> <div>
<Popover content={popContent} visible={history.length > 0}> <Popover content={popContent} open={history.length > 0}>
<InputNumber <InputNumber
ref={ref} ref={ref}
value={value} value={value}

View File

@@ -103,7 +103,7 @@ export function InventoryUpsertModalContainer({
? t("inventory.actions.edit") ? t("inventory.actions.edit")
: t("inventory.actions.new") : t("inventory.actions.new")
} }
visible={visible} open={visible}
okText={t("general.actions.save")} okText={t("general.actions.save")}
onOk={() => { onOk={() => {
form.submit(); form.submit();

View File

@@ -96,7 +96,7 @@ export function Jobd3RdPartyModal({ bodyshop, jobId, job }) {
return ( return (
<> <>
<Button onClick={showModal}>{t("printcenter.jobs.3rdpartypayer")}</Button> <Button onClick={showModal}>{t("printcenter.jobs.3rdpartypayer")}</Button>
<Modal visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}> <Modal open={isModalVisible} onOk={handleOk} onCancel={handleCancel}>
<Form <Form
onFinish={handleFinish} onFinish={handleFinish}
autoComplete={"off"} autoComplete={"off"}

View File

@@ -283,8 +283,8 @@ export function ScheduleEventComponent({
return ( return (
<Popover <Popover
visible={visible} open={visible}
onVisibleChange={(vis) => !event.vacation && setVisible(vis)} onOpenChange={(vis) => !event.vacation && setVisible(vis)}
trigger="click" trigger="click"
content={event.block ? blockContent : popoverContent} content={event.block ? blockContent : popoverContent}
style={{ style={{

View File

@@ -39,7 +39,7 @@ export function JobCostingModalContainer({
return ( return (
<Modal <Modal
visible={visible} open={visible}
title={t("jobs.labels.jobcosting")} title={t("jobs.labels.jobcosting")}
onOk={() => { onOk={() => {
toggleModalVisible(); toggleModalVisible();

View File

@@ -76,7 +76,7 @@ export function JobDetailCards({ bodyshop, setPrintCenterContext }) {
return ( return (
<Drawer <Drawer
visible={!!selected} open={!!selected}
destroyOnClose destroyOnClose
width={drawerPercentage} width={drawerPercentage}
placement="right" placement="right"

View File

@@ -87,7 +87,7 @@ export function JobEmployeeAssignments({
); );
return ( return (
<Popover destroyTooltipOnHide content={popContent} visible={visibility}> <Popover destroyTooltipOnHide content={popContent} open={visibility}>
<Spin spinning={loading}> <Spin spinning={loading}>
<DataLabel label={t("jobs.fields.employee_body")}> <DataLabel label={t("jobs.fields.employee_body")}>
{body ? ( {body ? (

View File

@@ -225,7 +225,7 @@ export function JobLineConvertToLabor({
<Popover <Popover
disabled={jobline.convertedtolbr} disabled={jobline.convertedtolbr}
content={overlay} content={overlay}
visible={visibility} open={visibility}
placement="bottom" placement="bottom"
> >
<Tooltip title={t("joblines.actions.converttolabor")}> <Tooltip title={t("joblines.actions.converttolabor")}>

View File

@@ -49,7 +49,7 @@ export function JobLinesUpsertModalComponent({
: t("joblines.labels.new") : t("joblines.labels.new")
} }
forceRender forceRender
visible={visible} open={visible}
width="60%" width="60%"
okText={t("general.actions.save")} okText={t("general.actions.save")}
onOk={() => form.submit()} onOk={() => form.submit()}

View File

@@ -42,7 +42,7 @@ function JobReconciliationModalContainer({
<Modal <Modal
title={t("jobs.labels.reconciliationheader")} title={t("jobs.labels.reconciliationheader")}
width={"95%"} width={"95%"}
visible={visible} open={visible}
okText={t("general.actions.close")} okText={t("general.actions.close")}
onOk={handleCancel} onOk={handleCancel}
onCancel={handleCancel} onCancel={handleCancel}

View File

@@ -186,7 +186,7 @@ export default function ScoreboardAddButton({
}; };
return ( return (
<Popover content={overlay} visible={visibility} placement="bottom"> <Popover content={overlay} open={visibility} placement="bottom">
<Button <Button
loading={loading} loading={loading}
disabled={disabled} disabled={disabled}

View File

@@ -226,7 +226,7 @@ export function JobsConvertButton({
if (job.converted) return <></>; if (job.converted) return <></>;
return ( return (
<Popover visible={visible} content={popMenu}> <Popover open={visible} content={popMenu}>
<Button <Button
key="convert" key="convert"
type="danger" type="danger"

View File

@@ -159,7 +159,7 @@ export function JobsDocumentsGalleryReassign({
); );
return ( return (
<Popover content={popContent} visible={visible}> <Popover content={popContent} open={visible}>
<Button <Button
disabled={selectedImages.length < 1} disabled={selectedImages.length < 1}
onClick={() => setVisible(true)} onClick={() => setVisible(true)}

View File

@@ -83,7 +83,7 @@ export function JobsDocumentsLocalGalleryReassign({
); );
return ( return (
<Popover content={popContent} visible={visible}> <Popover content={popContent} open={visible}>
<Button <Button
//disabled={selectedImages.length < 1} //disabled={selectedImages.length < 1}
onClick={() => setVisible(true)} onClick={() => setVisible(true)}

View File

@@ -171,8 +171,8 @@ export function LaborAllocationsAdjustmentEdit({
return ( return (
<Popover <Popover
visible={visible} open={visible}
onVisibleChange={(vis) => setVisible(vis)} onOpenChange={(vis) => setVisible(vis)}
content={overlay} content={overlay}
trigger="click" trigger="click"
> >

View File

@@ -117,7 +117,7 @@ export function NoteUpsertModalContainer({
return ( return (
<Modal <Modal
title={existingNote ? t("notes.actions.edit") : t("notes.actions.new")} title={existingNote ? t("notes.actions.edit") : t("notes.actions.new")}
visible={visible} open={visible}
okText={t("general.actions.save")} okText={t("general.actions.save")}
onOk={() => { onOk={() => {
form.submit(); form.submit();

View File

@@ -76,7 +76,7 @@ export function PartsOrderBackorderEta({
<Popover <Popover
destroyTooltipOnHide destroyTooltipOnHide
content={popContent} content={popContent}
visible={visibility} open={visibility}
disabled={disabled} disabled={disabled}
> >
<DateFormatter>{backordered_eta}</DateFormatter> <DateFormatter>{backordered_eta}</DateFormatter>

View File

@@ -92,7 +92,7 @@ export function PartsOrderLineBackorderButton({
<Popover <Popover
destroyTooltipOnHide destroyTooltipOnHide
content={popContent} content={popContent}
visible={visibility} open={visibility}
disabled={disabled} disabled={disabled}
> >
<Button loading={loading} onClick={handlePopover}> <Button loading={loading} onClick={handlePopover}>

View File

@@ -471,7 +471,7 @@ export function PartsOrderListTableComponent({
<Drawer <Drawer
placement="right" placement="right"
onClose={() => handleOnRowClick(null)} onClose={() => handleOnRowClick(null)}
visible={selectedpartsorder} open={selectedpartsorder}
closable closable
width={drawerPercentage} width={drawerPercentage}
> >

View File

@@ -350,7 +350,7 @@ export function PartsOrderModalContainer({
return ( return (
<Modal <Modal
visible={visible} open={visible}
title={ title={
isReturn isReturn
? `${t("parts_orders.labels.returnpartsorder")} ${invoiceNumber}` ? `${t("parts_orders.labels.returnpartsorder")} ${invoiceNumber}`

View File

@@ -92,7 +92,7 @@ export function PartsReceiveModalContainer({
return ( return (
<Modal <Modal
visible={visible} open={visible}
title={t("parts_orders.labels.receive")} title={t("parts_orders.labels.receive")}
onCancel={() => toggleModalVisible()} onCancel={() => toggleModalVisible()}
onOk={() => form.submit()} onOk={() => form.submit()}

View File

@@ -90,7 +90,7 @@ export function BillMarkSelectedExported({
return ( return (
<Popconfirm <Popconfirm
visible={visible} open={visible}
title={t("general.labels.areyousure")} title={t("general.labels.areyousure")}
onCancel={() => setVisible(false)} onCancel={() => setVisible(false)}
onConfirm={handleUpdate} onConfirm={handleUpdate}

View File

@@ -93,7 +93,7 @@ export function PaymentMarkSelectedExported({
return ( return (
<Popconfirm <Popconfirm
visible={visible} open={visible}
title={t("general.labels.areyousure")} title={t("general.labels.areyousure")}
onCancel={() => setVisible(false)} onCancel={() => setVisible(false)}
onConfirm={handleUpdate} onConfirm={handleUpdate}

View File

@@ -138,7 +138,7 @@ function PaymentModalContainer({
? t("payments.labels.new") ? t("payments.labels.new")
: t("payments.labels.edit") : t("payments.labels.edit")
} }
visible={visible} open={visible}
okText={t("general.actions.save")} okText={t("general.actions.save")}
onOk={() => form.submit()} onOk={() => form.submit()}
width="50%" width="50%"

View File

@@ -123,7 +123,7 @@ export function PrintCenterJobsLabels({ bodyshop, jobId }) {
</Card> </Card>
); );
return ( return (
<Popover content={content} visible={isModalVisible}> <Popover content={content} open={isModalVisible}>
<Button onClick={() => setIsModalVisible(true)}> <Button onClick={() => setIsModalVisible(true)}>
{t("printcenter.jobs.labels.labels")} {t("printcenter.jobs.labels.labels")}
</Button> </Button>

View File

@@ -28,7 +28,7 @@ export function PrintCenterModalContainer({
return ( return (
<Modal <Modal
visible={visible} open={visible}
onOk={() => toggleModalVisible()} onOk={() => toggleModalVisible()}
onCancel={() => toggleModalVisible()} onCancel={() => toggleModalVisible()}
cancelButtonProps={{ style: { display: "none" } }} cancelButtonProps={{ style: { display: "none" } }}

View File

@@ -166,7 +166,7 @@ export default function ProductionBoardKanbanCardSettings({
</div> </div>
); );
return ( return (
<Popover content={overlay} visible={visible}> <Popover content={overlay} open={visible}>
<Button loading={loading} onClick={() => setVisible(true)}> <Button loading={loading} onClick={() => setVisible(true)}>
{t("production.labels.cardsettings")} {t("production.labels.cardsettings")}
</Button> </Button>

View File

@@ -41,8 +41,8 @@ export default function ProductionListColumnComment({ record }) {
return ( return (
<Popover <Popover
onVisibleChange={handleVisibleChange} onOpenChange={handleVisibleChange}
visible={visible} open={visible}
content={ content={
<div style={{ width: "30em" }}> <div style={{ width: "30em" }}>
<Input.TextArea <Input.TextArea

View File

@@ -52,7 +52,7 @@ export default function ProductionListDate({
return ( return (
<Dropdown <Dropdown
//trigger={["click"]} //trigger={["click"]}
visible={visible} open={visible}
style={{ style={{
height: "19px", height: "19px",
}} }}

View File

@@ -153,7 +153,7 @@ export function ProductionListEmpAssignment({
theEmployee = bodyshop.employees.find((e) => e.id === record[type]); theEmployee = bodyshop.employees.find((e) => e.id === record[type]);
return ( return (
<Popover destroyTooltipOnHide content={popContent} visible={visibility}> <Popover destroyTooltipOnHide content={popContent} open={visibility}>
<Spin spinning={loading}> <Spin spinning={loading}>
{record[type] ? ( {record[type] ? (
<div> <div>

View File

@@ -93,7 +93,7 @@ export function ProductionLastContacted({ currentUser, record }) {
<div> <div>
<Dropdown <Dropdown
//trigger={["click"]} //trigger={["click"]}
visible={visible} open={visible}
style={{ style={{
height: "19px", height: "19px",
}} }}

View File

@@ -49,8 +49,8 @@ export default function ProductionListColumnProductionNote({ record }) {
return ( return (
<Popover <Popover
onVisibleChange={handleVisibleChange} onOpenChange={handleVisibleChange}
visible={visible} open={visible}
content={ content={
<div style={{ width: "30em" }}> <div style={{ width: "30em" }}>
<Input.TextArea <Input.TextArea

View File

@@ -90,7 +90,7 @@ export function ProductionListDetail({
placement="right" placement="right"
width={"33%"} width={"33%"}
onClose={handleClose} onClose={handleClose}
visible={selected} open={selected}
> >
{loading && <LoadingSkeleton />} {loading && <LoadingSkeleton />}
{error && <AlertComponent error={JSON.stringify(error)} />} {error && <AlertComponent error={JSON.stringify(error)} />}

View File

@@ -88,7 +88,7 @@ export function ProductionListSaveConfigButton({
); );
return ( return (
<Popover visible={visible} content={popMenu}> <Popover open={visible} content={popMenu}>
<Button loading={loading} onClick={() => setVisible(true)}> <Button loading={loading} onClick={() => setVisible(true)}>
{t("production.actions.saveconfig")} {t("production.actions.saveconfig")}
</Button> </Button>

View File

@@ -25,7 +25,7 @@ export function ReportCenterModalContainer({
return ( return (
<Modal <Modal
visible={visible} open={visible}
title={t("printcenter.labels.reportcentermodal")} title={t("printcenter.labels.reportcentermodal")}
onOk={() => toggleModalVisible()} onOk={() => toggleModalVisible()}
onCancel={() => toggleModalVisible()} onCancel={() => toggleModalVisible()}

View File

@@ -184,7 +184,7 @@ export function ScheduleJobModalContainer({
return ( return (
<Modal <Modal
visible={visible} open={visible}
onCancel={() => toggleModalVisible()} onCancel={() => toggleModalVisible()}
onOk={() => form.submit()} onOk={() => form.submit()}
width={"90%"} width={"90%"}

View File

@@ -154,7 +154,7 @@ export function ScheduleManualEvent({ bodyshop, event }) {
}; };
return ( return (
<Popover content={overlay} visible={visibility}> <Popover content={overlay} open={visibility}>
<Button loading={loading} onClick={handleClick}> <Button loading={loading} onClick={handleClick}>
{event {event
? t("appointments.actions.reschedule") ? t("appointments.actions.reschedule")

View File

@@ -90,7 +90,7 @@ export default function ScoreboardEntryEdit({ entry }) {
return ( return (
<div> <div>
<Dropdown visible={visible} overlay={popContent}> <Dropdown open={visible} overlay={popContent}>
<Button <Button
onClick={(e) => { onClick={(e) => {
e.stopPropagation(); e.stopPropagation();

View File

@@ -100,7 +100,7 @@ export default function ScoreboardJobsList({ scoreBoardlist }) {
return ( return (
<> <>
<Modal <Modal
visible={state.visible} open={state.visible}
destroyOnClose destroyOnClose
width="80%" width="80%"
cancelButtonProps={{ style: { display: "none" } }} cancelButtonProps={{ style: { display: "none" } }}

View File

@@ -112,7 +112,7 @@ export default function ShopEmployeeAddVacation({ employee }) {
}; };
return ( return (
<Popover content={overlay} visible={visibility}> <Popover content={overlay} open={visibility}>
<Button <Button
loading={loading} loading={loading}
disabled={!employee?.active} disabled={!employee?.active}

View File

@@ -38,7 +38,7 @@ export default function ShopTemplatesListContainer({ visibleState }) {
<Drawer <Drawer
placement="left" placement="left"
width="25%" width="25%"
visible={visible} open={visible}
onClose={() => setVisible(false)} onClose={() => setVisible(false)}
> >
<div> <div>

View File

@@ -116,7 +116,7 @@ export function TechJobPrintTickets({ technician, event }) {
}; };
return ( return (
<Popover content={overlay} visible={visibility}> <Popover content={overlay} open={visibility}>
<Button loading={loading} onClick={handleClick}> <Button loading={loading} onClick={handleClick}>
{t("general.actions.print")} {t("general.actions.print")}
</Button> </Button>

View File

@@ -73,7 +73,7 @@ export function TechLookupJobsDrawer({ bodyshop, setPrintCenterContext }) {
return ( return (
<Drawer <Drawer
visible={!!selected} open={!!selected}
destroyOnClose destroyOnClose
width={drawerPercentage} width={drawerPercentage}
placement="right" placement="right"

View File

@@ -167,7 +167,7 @@ export function TimeTicketModalContainer({
: t("timetickets.labels.new") : t("timetickets.labels.new")
} }
width={"90%"} width={"90%"}
visible={timeTicketModal.visible} open={timeTicketModal.visible}
forceRender forceRender
onCancel={handleCancel} onCancel={handleCancel}
afterClose={() => form.resetFields()} afterClose={() => form.resetFields()}

View File

@@ -58,7 +58,7 @@ export function PhonebookContainer({ setBreadcrumbs, setSelectedHeader }) {
delete search.phonebookentry; delete search.phonebookentry;
history.push({ search: queryString.stringify(search) }); history.push({ search: queryString.stringify(search) });
}} }}
visible={phonebookentry} open={phonebookentry}
> >
<PhonebookFormContainer /> <PhonebookFormContainer />
</Drawer> </Drawer>

View File

@@ -36,7 +36,7 @@ export default function ShopVendorPageComponent() {
delete search.selectedvendor; delete search.selectedvendor;
history.push({ search: queryString.stringify(search) }); history.push({ search: queryString.stringify(search) });
}} }}
visible={selectedvendor} open={selectedvendor}
> >
<VendorsFormContainer /> <VendorsFormContainer />
</Drawer> </Drawer>