Merged in feature/IO-3554-Form-Row-Layout (pull request #3053)
feature/feature/IO-3554-Form-Row-Layout - Drawer changes, mask closable changes, missing translation, spinner tip changes
This commit is contained in:
@@ -7,9 +7,7 @@ export default function BillDetailEditcontainer() {
|
|||||||
const search = queryString.parse(useLocation().search);
|
const search = queryString.parse(useLocation().search);
|
||||||
const history = useNavigate();
|
const history = useNavigate();
|
||||||
|
|
||||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
const screens = Grid.useBreakpoint();
|
||||||
.filter((screen) => !!screen[1])
|
|
||||||
.slice(-1)[0];
|
|
||||||
|
|
||||||
const bpoints = {
|
const bpoints = {
|
||||||
xs: "100%",
|
xs: "100%",
|
||||||
@@ -19,7 +17,14 @@ export default function BillDetailEditcontainer() {
|
|||||||
xl: "90%",
|
xl: "90%",
|
||||||
xxl: "90%"
|
xxl: "90%"
|
||||||
};
|
};
|
||||||
const drawerPercentage = selectedBreakpoint ? bpoints[selectedBreakpoint[0]] : "100%";
|
|
||||||
|
let drawerPercentage = "100%";
|
||||||
|
if (screens.xxl) drawerPercentage = bpoints.xxl;
|
||||||
|
else if (screens.xl) drawerPercentage = bpoints.xl;
|
||||||
|
else if (screens.lg) drawerPercentage = bpoints.lg;
|
||||||
|
else if (screens.md) drawerPercentage = bpoints.md;
|
||||||
|
else if (screens.sm) drawerPercentage = bpoints.sm;
|
||||||
|
else if (screens.xs) drawerPercentage = bpoints.xs;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Drawer
|
<Drawer
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ export function EmailOverlayContainer({ emailConfig, modalVisible, toggleEmailOv
|
|||||||
<Modal
|
<Modal
|
||||||
destroyOnHidden
|
destroyOnHidden
|
||||||
open={modalVisible}
|
open={modalVisible}
|
||||||
maskClosable={false}
|
mask={{ closable: false }}
|
||||||
width={"80%"}
|
width={"80%"}
|
||||||
onOk={() => form.submit()}
|
onOk={() => form.submit()}
|
||||||
title={t("emails.labels.emailpreview")}
|
title={t("emails.labels.emailpreview")}
|
||||||
|
|||||||
@@ -58,9 +58,7 @@ const span = {
|
|||||||
export function JobDetailCards({ bodyshop, setPrintCenterContext, insertAuditTrail }) {
|
export function JobDetailCards({ bodyshop, setPrintCenterContext, insertAuditTrail }) {
|
||||||
const { scenarioNotificationsOn } = useSocket();
|
const { scenarioNotificationsOn } = useSocket();
|
||||||
const [updateJob] = useMutation(UPDATE_JOB);
|
const [updateJob] = useMutation(UPDATE_JOB);
|
||||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
const screens = Grid.useBreakpoint();
|
||||||
.filter((screen) => !!screen[1])
|
|
||||||
.slice(-1)[0];
|
|
||||||
|
|
||||||
const bpoints = {
|
const bpoints = {
|
||||||
xs: "100%",
|
xs: "100%",
|
||||||
@@ -70,7 +68,14 @@ export function JobDetailCards({ bodyshop, setPrintCenterContext, insertAuditTra
|
|||||||
xl: "75%",
|
xl: "75%",
|
||||||
xxl: "75%"
|
xxl: "75%"
|
||||||
};
|
};
|
||||||
const drawerPercentage = selectedBreakpoint ? bpoints[selectedBreakpoint[0]] : "100%";
|
|
||||||
|
let drawerPercentage = "100%";
|
||||||
|
if (screens.xxl) drawerPercentage = bpoints.xxl;
|
||||||
|
else if (screens.xl) drawerPercentage = bpoints.xl;
|
||||||
|
else if (screens.lg) drawerPercentage = bpoints.lg;
|
||||||
|
else if (screens.md) drawerPercentage = bpoints.md;
|
||||||
|
else if (screens.sm) drawerPercentage = bpoints.sm;
|
||||||
|
else if (screens.xs) drawerPercentage = bpoints.xs;
|
||||||
|
|
||||||
const searchParams = queryString.parse(useLocation().search);
|
const searchParams = queryString.parse(useLocation().search);
|
||||||
const { selected } = searchParams;
|
const { selected } = searchParams;
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
|
|||||||
open={open}
|
open={open}
|
||||||
onCancel={handleModalClose}
|
onCancel={handleModalClose}
|
||||||
closable={!(earlyRoCreatedThisSession && !job.converted)}
|
closable={!(earlyRoCreatedThisSession && !job.converted)}
|
||||||
maskClosable={!(earlyRoCreatedThisSession && !job.converted)}
|
mask={{ closable: !(earlyRoCreatedThisSession && !job.converted) }}
|
||||||
title={t("jobs.actions.convert")}
|
title={t("jobs.actions.convert")}
|
||||||
footer={null}
|
footer={null}
|
||||||
width={700}
|
width={700}
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ export function JobsDetailHeaderActions({
|
|||||||
okText,
|
okText,
|
||||||
cancelText,
|
cancelText,
|
||||||
centered: true,
|
centered: true,
|
||||||
maskClosable: false,
|
mask: { closable: false },
|
||||||
onCancel: () => {
|
onCancel: () => {
|
||||||
closeConfirmById(id);
|
closeConfirmById(id);
|
||||||
onCancel?.();
|
onCancel?.();
|
||||||
|
|||||||
@@ -28,9 +28,7 @@ const mapDispatchToProps = () => ({});
|
|||||||
export function JobsList({ bodyshop }) {
|
export function JobsList({ bodyshop }) {
|
||||||
const searchParams = queryString.parse(useLocation().search);
|
const searchParams = queryString.parse(useLocation().search);
|
||||||
const { selected } = searchParams;
|
const { selected } = searchParams;
|
||||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
const screens = Grid.useBreakpoint();
|
||||||
.filter((screen) => !!screen[1])
|
|
||||||
.slice(-1)[0];
|
|
||||||
const { loading, error, data, refetch } = useQuery(QUERY_ALL_ACTIVE_JOBS, {
|
const { loading, error, data, refetch } = useQuery(QUERY_ALL_ACTIVE_JOBS, {
|
||||||
variables: {
|
variables: {
|
||||||
statuses: bodyshop.md_ro_statuses.active_statuses || ["Open", "Open*"]
|
statuses: bodyshop.md_ro_statuses.active_statuses || ["Open", "Open*"]
|
||||||
@@ -332,7 +330,17 @@ export function JobsList({ bodyshop }) {
|
|||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={jobs}
|
dataSource={jobs}
|
||||||
scroll={{
|
scroll={{
|
||||||
x: selectedBreakpoint ? scrollMapper[selectedBreakpoint[0]] : "100%"
|
x: screens.xxl
|
||||||
|
? scrollMapper.xxl
|
||||||
|
: screens.xl
|
||||||
|
? scrollMapper.xl
|
||||||
|
: screens.lg
|
||||||
|
? scrollMapper.lg
|
||||||
|
: screens.md
|
||||||
|
? scrollMapper.md
|
||||||
|
: screens.sm
|
||||||
|
? scrollMapper.sm
|
||||||
|
: scrollMapper.xs
|
||||||
}}
|
}}
|
||||||
rowSelection={{
|
rowSelection={{
|
||||||
onSelect: (record) => {
|
onSelect: (record) => {
|
||||||
|
|||||||
@@ -25,9 +25,7 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
export function JobsReadyList({ bodyshop }) {
|
export function JobsReadyList({ bodyshop }) {
|
||||||
const searchParams = queryString.parse(useLocation().search);
|
const searchParams = queryString.parse(useLocation().search);
|
||||||
const { selected } = searchParams;
|
const { selected } = searchParams;
|
||||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
const screens = Grid.useBreakpoint();
|
||||||
.filter((screen) => !!screen[1])
|
|
||||||
.slice(-1)[0];
|
|
||||||
|
|
||||||
const readyStatuses = useMemo(() => {
|
const readyStatuses = useMemo(() => {
|
||||||
if (bodyshop.md_ro_statuses.ready_statuses) return bodyshop.md_ro_statuses.ready_statuses;
|
if (bodyshop.md_ro_statuses.ready_statuses) return bodyshop.md_ro_statuses.ready_statuses;
|
||||||
@@ -316,7 +314,17 @@ export function JobsReadyList({ bodyshop }) {
|
|||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={jobs}
|
dataSource={jobs}
|
||||||
scroll={{
|
scroll={{
|
||||||
x: selectedBreakpoint ? scrollMapper[selectedBreakpoint[0]] : "100%"
|
x: screens.xxl
|
||||||
|
? scrollMapper.xxl
|
||||||
|
: screens.xl
|
||||||
|
? scrollMapper.xl
|
||||||
|
: screens.lg
|
||||||
|
? scrollMapper.lg
|
||||||
|
: screens.md
|
||||||
|
? scrollMapper.md
|
||||||
|
: screens.sm
|
||||||
|
? scrollMapper.sm
|
||||||
|
: scrollMapper.xs
|
||||||
}}
|
}}
|
||||||
rowSelection={{
|
rowSelection={{
|
||||||
onSelect: (record) => {
|
onSelect: (record) => {
|
||||||
|
|||||||
@@ -11,9 +11,8 @@ export default function LoadingSpinner({ loading = true, message, ...props }) {
|
|||||||
position: "relative",
|
position: "relative",
|
||||||
alignContent: "center"
|
alignContent: "center"
|
||||||
}}
|
}}
|
||||||
{...(props.children ? { tip: message ? message : null } : {})}
|
{...(props.children ? { description: message ? message : null } : {})}
|
||||||
delay={200}
|
delay={200}
|
||||||
// TODO: Client Update - tip only works when there are actually children, and this component is used in a lot of places where there are no children
|
|
||||||
>
|
>
|
||||||
{props.children}
|
{props.children}
|
||||||
</Spin>
|
</Spin>
|
||||||
|
|||||||
@@ -65,9 +65,7 @@ export function PartsOrderListTableDrawerComponent({
|
|||||||
setTaskUpsertContext,
|
setTaskUpsertContext,
|
||||||
isPartsEntry
|
isPartsEntry
|
||||||
}) {
|
}) {
|
||||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
const screens = Grid.useBreakpoint();
|
||||||
.filter((screen) => !!screen[1])
|
|
||||||
.slice(-1)[0];
|
|
||||||
|
|
||||||
const bpoints = {
|
const bpoints = {
|
||||||
xs: "100%",
|
xs: "100%",
|
||||||
@@ -77,7 +75,14 @@ export function PartsOrderListTableDrawerComponent({
|
|||||||
xl: "75%",
|
xl: "75%",
|
||||||
xxl: "65%"
|
xxl: "65%"
|
||||||
};
|
};
|
||||||
const drawerPercentage = selectedBreakpoint ? bpoints[selectedBreakpoint[0]] : "100%";
|
|
||||||
|
let drawerPercentage = "100%";
|
||||||
|
if (screens.xxl) drawerPercentage = bpoints.xxl;
|
||||||
|
else if (screens.xl) drawerPercentage = bpoints.xl;
|
||||||
|
else if (screens.lg) drawerPercentage = bpoints.lg;
|
||||||
|
else if (screens.md) drawerPercentage = bpoints.md;
|
||||||
|
else if (screens.sm) drawerPercentage = bpoints.sm;
|
||||||
|
else if (screens.xs) drawerPercentage = bpoints.xs;
|
||||||
const responsibilityCenters = bodyshop.md_responsibility_centers;
|
const responsibilityCenters = bodyshop.md_responsibility_centers;
|
||||||
const Templates = TemplateList("partsorder", { job });
|
const Templates = TemplateList("partsorder", { job });
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,7 @@ import PartsQueueJobLinesComponent from "./parts-queue-job-lines.component";
|
|||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
|
|
||||||
export default function PartsQueueDetailCard() {
|
export default function PartsQueueDetailCard() {
|
||||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
const screens = Grid.useBreakpoint();
|
||||||
.filter((screen) => !!screen[1])
|
|
||||||
.slice(-1)[0];
|
|
||||||
|
|
||||||
const bpoints = {
|
const bpoints = {
|
||||||
xs: "100%",
|
xs: "100%",
|
||||||
@@ -23,7 +21,14 @@ export default function PartsQueueDetailCard() {
|
|||||||
xl: "75%",
|
xl: "75%",
|
||||||
xxl: "60%"
|
xxl: "60%"
|
||||||
};
|
};
|
||||||
const drawerPercentage = selectedBreakpoint ? bpoints[selectedBreakpoint[0]] : "100%";
|
|
||||||
|
let drawerPercentage = "100%";
|
||||||
|
if (screens.xxl) drawerPercentage = bpoints.xxl;
|
||||||
|
else if (screens.xl) drawerPercentage = bpoints.xl;
|
||||||
|
else if (screens.lg) drawerPercentage = bpoints.lg;
|
||||||
|
else if (screens.md) drawerPercentage = bpoints.md;
|
||||||
|
else if (screens.sm) drawerPercentage = bpoints.sm;
|
||||||
|
else if (screens.xs) drawerPercentage = bpoints.xs;
|
||||||
|
|
||||||
const searchParams = queryString.parse(useLocation().search);
|
const searchParams = queryString.parse(useLocation().search);
|
||||||
const { selected } = searchParams;
|
const { selected } = searchParams;
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ export function ScheduleJobModalContainer({
|
|||||||
onCancel={() => toggleModalVisible()}
|
onCancel={() => toggleModalVisible()}
|
||||||
onOk={() => form.submit()}
|
onOk={() => form.submit()}
|
||||||
width={"90%"}
|
width={"90%"}
|
||||||
maskClosable={false}
|
mask={{ closable: false }}
|
||||||
destroyOnHidden
|
destroyOnHidden
|
||||||
okButtonProps={{
|
okButtonProps={{
|
||||||
loading: loading
|
loading: loading
|
||||||
|
|||||||
@@ -39,9 +39,7 @@ export function PhonebookContainer({ setBreadcrumbs, setSelectedHeader }) {
|
|||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
const screens = Grid.useBreakpoint();
|
||||||
.filter((screen) => !!screen[1])
|
|
||||||
.slice(-1)[0];
|
|
||||||
|
|
||||||
const bpoints = {
|
const bpoints = {
|
||||||
xs: "100%",
|
xs: "100%",
|
||||||
@@ -51,7 +49,15 @@ export function PhonebookContainer({ setBreadcrumbs, setSelectedHeader }) {
|
|||||||
xl: "50%",
|
xl: "50%",
|
||||||
xxl: "45%"
|
xxl: "45%"
|
||||||
};
|
};
|
||||||
const drawerPercentage = selectedBreakpoint ? bpoints[selectedBreakpoint[0]] : "100%";
|
|
||||||
|
// Get the largest active breakpoint
|
||||||
|
let drawerPercentage = "100%";
|
||||||
|
if (screens.xxl) drawerPercentage = bpoints.xxl;
|
||||||
|
else if (screens.xl) drawerPercentage = bpoints.xl;
|
||||||
|
else if (screens.lg) drawerPercentage = bpoints.lg;
|
||||||
|
else if (screens.md) drawerPercentage = bpoints.md;
|
||||||
|
else if (screens.sm) drawerPercentage = bpoints.sm;
|
||||||
|
else if (screens.xs) drawerPercentage = bpoints.xs;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RbacWrapper action="phonebook:view">
|
<RbacWrapper action="phonebook:view">
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ export default function ShopVendorPageComponent() {
|
|||||||
const { selectedvendor } = Object.fromEntries(searchParams);
|
const { selectedvendor } = Object.fromEntries(searchParams);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
const screens = Grid.useBreakpoint();
|
||||||
.filter((screen) => !!screen[1])
|
|
||||||
.slice(-1)[0];
|
|
||||||
|
|
||||||
const bpoints = {
|
const bpoints = {
|
||||||
xs: "100%",
|
xs: "100%",
|
||||||
@@ -20,7 +18,14 @@ export default function ShopVendorPageComponent() {
|
|||||||
xl: "50%",
|
xl: "50%",
|
||||||
xxl: "45%"
|
xxl: "45%"
|
||||||
};
|
};
|
||||||
const drawerPercentage = selectedBreakpoint ? bpoints[selectedBreakpoint[0]] : "100%";
|
|
||||||
|
let drawerPercentage = "100%";
|
||||||
|
if (screens.xxl) drawerPercentage = bpoints.xxl;
|
||||||
|
else if (screens.xl) drawerPercentage = bpoints.xl;
|
||||||
|
else if (screens.lg) drawerPercentage = bpoints.lg;
|
||||||
|
else if (screens.md) drawerPercentage = bpoints.md;
|
||||||
|
else if (screens.sm) drawerPercentage = bpoints.sm;
|
||||||
|
else if (screens.xs) drawerPercentage = bpoints.xs;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -1416,6 +1416,7 @@
|
|||||||
"unsavedchangespopup": "You have unsaved changes. Are you sure you want to leave?"
|
"unsavedchangespopup": "You have unsaved changes. Are you sure you want to leave?"
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
|
"array": "Please select at least one option.",
|
||||||
"dateRangeExceeded": "The date range has been exceeded.",
|
"dateRangeExceeded": "The date range has been exceeded.",
|
||||||
"invalidemail": "Please enter a valid email.",
|
"invalidemail": "Please enter a valid email.",
|
||||||
"invalidphone": "Please enter a valid phone number.",
|
"invalidphone": "Please enter a valid phone number.",
|
||||||
|
|||||||
@@ -1416,6 +1416,7 @@
|
|||||||
"unsavedchangespopup": ""
|
"unsavedchangespopup": ""
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
|
"array": "Por favor seleccione al menos una opción.",
|
||||||
"dateRangeExceeded": "",
|
"dateRangeExceeded": "",
|
||||||
"invalidemail": "Por favor introduzca una dirección de correo electrónico válida.",
|
"invalidemail": "Por favor introduzca una dirección de correo electrónico válida.",
|
||||||
"invalidphone": "",
|
"invalidphone": "",
|
||||||
|
|||||||
@@ -1416,6 +1416,7 @@
|
|||||||
"unsavedchangespopup": ""
|
"unsavedchangespopup": ""
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
|
"array": "Veuillez sélectionner au moins une option.",
|
||||||
"dateRangeExceeded": "",
|
"dateRangeExceeded": "",
|
||||||
"invalidemail": "S'il vous plaît entrer un email valide.",
|
"invalidemail": "S'il vous plaît entrer un email valide.",
|
||||||
"invalidphone": "",
|
"invalidphone": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user