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 (
<Popover content={popContent} visible={visibility}>
<Popover content={popContent} open={visibility}>
<Button onClick={() => setVisibility(true)}>
{t("allocations.actions.assign")}
</Button>

View File

@@ -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>

View File

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

View File

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

View File

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

View File

@@ -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()}

View File

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

View File

@@ -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)}>

View File

@@ -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" }} />

View File

@@ -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}

View File

@@ -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 }}

View File

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

View File

@@ -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")}

View File

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

View File

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

View File

@@ -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}

View File

@@ -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();

View File

@@ -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"}

View File

@@ -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={{

View File

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

View File

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

View File

@@ -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 ? (

View File

@@ -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")}>

View File

@@ -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()}

View File

@@ -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}

View File

@@ -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}

View File

@@ -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"

View File

@@ -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)}

View File

@@ -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)}

View File

@@ -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"
>

View File

@@ -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();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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%"

View File

@@ -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>

View File

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

View File

@@ -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>

View File

@@ -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

View File

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

View File

@@ -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>

View File

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

View File

@@ -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

View File

@@ -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)} />}

View File

@@ -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>

View File

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

View File

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

View File

@@ -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")

View File

@@ -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();

View File

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

View File

@@ -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}

View File

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

View File

@@ -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>

View File

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

View File

@@ -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()}

View File

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

View File

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