fix(work-orders): remove Preferred Contact from WO vendor editor (SH-180)

EOF
This commit is contained in:
arthur.bassi 2026-08-04 19:07:12 -03:00
parent a3a4eb3f8e
commit babb314613
3 changed files with 0 additions and 26 deletions

View file

@ -7,12 +7,10 @@ import {
DialogActions,
DialogContent,
DialogTitle,
MenuItem,
Stack,
TextField,
Typography,
} from "@mui/material";
import type { VendorPreferredContact } from "@/domain/vendors/types/vendor";
import type { VendorEditorState } from "./work-order-vendor-editor-types";
import { formatPhoneMask, isVendorEditorValid } from "./work-order-vendor-editor-utils";
@ -62,25 +60,6 @@ export function WorkOrderVendorEditorDialog({
}
slotProps={{ htmlInput: { maxLength: 200 } }}
/>
<TextField
select
label="Preferred contact"
value={editor?.preferredContact ?? "Phone"}
onChange={(event) =>
onEditorChange((current) =>
current
? {
...current,
preferredContact: event.target.value as VendorPreferredContact,
}
: current,
)
}
>
<MenuItem value="Phone">Phone</MenuItem>
<MenuItem value="Email">Email</MenuItem>
<MenuItem value="Text">Text</MenuItem>
</TextField>
<TextField
label="Phone"
value={editor?.phone ?? ""}

View file

@ -1,10 +1,7 @@
import type { VendorPreferredContact } from "@/domain/vendors/types/vendor";
export interface VendorEditorState {
vendorId: string | number;
vendorName: string;
contactName: string;
preferredContact: VendorPreferredContact;
phone: string;
email: string;
notes: string;

View file

@ -63,7 +63,6 @@ export function useWorkOrderViewPage(workOrderId: string) {
vendorId,
vendorName,
contactName: "",
preferredContact: "Phone",
phone: "",
email: "",
notes: "",
@ -75,7 +74,6 @@ export function useWorkOrderViewPage(workOrderId: string) {
vendorId,
vendorName: vendor.companyName || vendorName,
contactName: vendor.contactName,
preferredContact: vendor.preferredContact,
phone: vendor.phone,
email: vendor.email,
notes: vendor.notes,