Merge branch 'feature/IO-1828-Front-End-Package-Updates' into test-beta
This commit is contained in:
@@ -487,7 +487,7 @@ function Header({
|
|||||||
key: 'beta-switch',
|
key: 'beta-switch',
|
||||||
style: {marginLeft: 'auto'},
|
style: {marginLeft: 'auto'},
|
||||||
label: (
|
label: (
|
||||||
<Tooltip title="A faster more modern ImEX Online is ready for you to try! You can switch back at any time.">
|
<Tooltip title="A more modern ImEX Online is ready for you to try! You can switch back at any time.">
|
||||||
<InfoCircleOutlined/>
|
<InfoCircleOutlined/>
|
||||||
<span style={{marginRight: 8}}>Try the new ImEX Online</span>
|
<span style={{marginRight: 8}}>Try the new ImEX Online</span>
|
||||||
<Switch
|
<Switch
|
||||||
|
|||||||
@@ -19,10 +19,13 @@ export default function JobsCreateOwnerInfoNewComponent() {
|
|||||||
label={t("owners.fields.ownr_ln")}
|
label={t("owners.fields.ownr_ln")}
|
||||||
name={["owner", "data", "ownr_ln"]}
|
name={["owner", "data", "ownr_ln"]}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
({ getFieldValue }) => ({
|
||||||
required: state.owner.new,
|
required:
|
||||||
|
state.owner.new &&
|
||||||
|
(!getFieldValue(["owner", "data", "ownr_co_nm"]) ||
|
||||||
|
getFieldValue(["owner", "data", "ownr_co_nm"]) === ""),
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
},
|
}),
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input disabled={!state.owner.new} />
|
<Input disabled={!state.owner.new} />
|
||||||
@@ -31,10 +34,13 @@ export default function JobsCreateOwnerInfoNewComponent() {
|
|||||||
label={t("owners.fields.ownr_fn")}
|
label={t("owners.fields.ownr_fn")}
|
||||||
name={["owner", "data", "ownr_fn"]}
|
name={["owner", "data", "ownr_fn"]}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
({ getFieldValue }) => ({
|
||||||
required: state.owner.new,
|
required:
|
||||||
|
state.owner.new &&
|
||||||
|
(!getFieldValue(["owner", "data", "ownr_co_nm"]) ||
|
||||||
|
getFieldValue(["owner", "data", "ownr_co_nm"]) === ""),
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
},
|
}),
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input disabled={!state.owner.new} />
|
<Input disabled={!state.owner.new} />
|
||||||
@@ -51,6 +57,17 @@ export default function JobsCreateOwnerInfoNewComponent() {
|
|||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("owners.fields.ownr_co_nm")}
|
label={t("owners.fields.ownr_co_nm")}
|
||||||
name={["owner", "data", "ownr_co_nm"]}
|
name={["owner", "data", "ownr_co_nm"]}
|
||||||
|
rules={[
|
||||||
|
({ getFieldValue }) => ({
|
||||||
|
required:
|
||||||
|
state.owner.new &&
|
||||||
|
(!getFieldValue(["owner", "data", "ownr_ln"]) ||
|
||||||
|
!getFieldValue(["owner", "data", "ownr_fn"]) ||
|
||||||
|
getFieldValue(["owner", "data", "ownr_ln"]) === "" ||
|
||||||
|
getFieldValue(["owner", "data", "ownr_fn"]) === ""),
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<Input disabled={!state.owner.new} />
|
<Input disabled={!state.owner.new} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ export function ScheduleJobModalContainer({
|
|||||||
okButtonProps={{
|
okButtonProps={{
|
||||||
loading: loading,
|
loading: loading,
|
||||||
}}
|
}}
|
||||||
|
closable={false}
|
||||||
>
|
>
|
||||||
<Form
|
<Form
|
||||||
form={form}
|
form={form}
|
||||||
|
|||||||
@@ -166,9 +166,6 @@ export function TechClockOffButton({
|
|||||||
},
|
},
|
||||||
({ getFieldValue }) => ({
|
({ getFieldValue }) => ({
|
||||||
validator(rule, value) {
|
validator(rule, value) {
|
||||||
console.log(
|
|
||||||
bodyshop.tt_enforce_hours_for_tech_console
|
|
||||||
);
|
|
||||||
if (!bodyshop.tt_enforce_hours_for_tech_console) {
|
if (!bodyshop.tt_enforce_hours_for_tech_console) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,84 +1,85 @@
|
|||||||
import { Button, Form, Input } from "antd";
|
import {Button, Form, Input} from "antd";
|
||||||
import React, {useEffect} from "react";
|
import React, {useEffect} from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import {useNavigate} from "react-router-dom";
|
||||||
import { techLoginStart } from "../../redux/tech/tech.actions";
|
import {createStructuredSelector} from "reselect";
|
||||||
import {
|
import {techLoginStart} from "../../redux/tech/tech.actions";
|
||||||
selectLoginError,
|
import {selectLoginError, selectLoginLoading, selectTechnician,} from "../../redux/tech/tech.selectors";
|
||||||
selectLoginLoading,
|
|
||||||
selectTechnician,
|
|
||||||
} from "../../redux/tech/tech.selectors";
|
|
||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import "./tech-login.styles.scss";
|
import "./tech-login.styles.scss";
|
||||||
import { useNavigate } from "react-router-dom";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
technician: selectTechnician,
|
technician: selectTechnician,
|
||||||
loginError: selectLoginError,
|
loginError: selectLoginError,
|
||||||
loginLoading: selectLoginLoading,
|
loginLoading: selectLoginLoading,
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
techLoginStart: (user) => dispatch(techLoginStart(user)),
|
techLoginStart: (user) => dispatch(techLoginStart(user)),
|
||||||
});
|
});
|
||||||
|
|
||||||
export function TechLogin({
|
export function TechLogin({
|
||||||
technician,
|
technician,
|
||||||
loginError,
|
loginError,
|
||||||
loginLoading,
|
loginLoading,
|
||||||
techLoginStart,
|
techLoginStart,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const {t} = useTranslation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const handleFinish = (values) => {
|
const handleFinish = (values) => {
|
||||||
// Remap these because EmployeeID form name has previously been used in the project
|
// Remap these because EmployeeID form name has previously been used in the project
|
||||||
techLoginStart({pin: values.pin, employeeid: values.techEmployeeId});
|
techLoginStart({pin: values.pin, employeeid: values.techEmployeeId});
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (technician) return navigate("/tech/joblookup");
|
if (technician) return navigate("/tech/joblookup");
|
||||||
}, [technician, navigate]);
|
}, [technician, navigate]);
|
||||||
|
|
||||||
return (
|
useEffect(() => {
|
||||||
<div className="tech-login-container">
|
document.title = t("titles.techconsole");
|
||||||
<Form
|
}, [t]);
|
||||||
layout="vertical"
|
|
||||||
onFinish={handleFinish}
|
|
||||||
autoComplete="new-password"
|
|
||||||
>
|
|
||||||
<Form.Item
|
|
||||||
label={t("tech.fields.employeeid")}
|
|
||||||
name="techEmployeeId"
|
|
||||||
|
|
||||||
rules={[
|
return (
|
||||||
{
|
<div className="tech-login-container">
|
||||||
required: true,
|
<Form
|
||||||
//message: t("general.validation.required"),
|
layout="vertical"
|
||||||
},
|
onFinish={handleFinish}
|
||||||
]}
|
autoComplete="new-password"
|
||||||
>
|
>
|
||||||
<Input size="large" autoComplete="new-password" />
|
<Form.Item
|
||||||
</Form.Item>
|
label={t("tech.fields.employeeid")}
|
||||||
<Form.Item
|
name="techEmployeeId"
|
||||||
label={t("tech.fields.pin")}
|
|
||||||
name="pin"
|
rules={[
|
||||||
rules={[
|
{
|
||||||
{
|
required: true,
|
||||||
required: true,
|
//message: t("general.validation.required"),
|
||||||
//message: t("general.validation.required"),
|
},
|
||||||
},
|
]}
|
||||||
]}
|
>
|
||||||
>
|
<Input size="large" autoComplete="new-password"/>
|
||||||
<Input.Password size="large" autoComplete="new-password" />
|
</Form.Item>
|
||||||
</Form.Item>
|
<Form.Item
|
||||||
<Button htmlType="submit" loading={loginLoading} className="login-btn">
|
label={t("tech.fields.pin")}
|
||||||
{t("general.actions.login")}
|
name="pin"
|
||||||
</Button>
|
rules={[
|
||||||
</Form>
|
{
|
||||||
{loginError ? <AlertComponent type="error" message={loginError} /> : null}
|
required: true,
|
||||||
</div>
|
//message: t("general.validation.required"),
|
||||||
);
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Input.Password size="large" autoComplete="new-password"/>
|
||||||
|
</Form.Item>
|
||||||
|
<Button htmlType="submit" loading={loginLoading} className="login-btn">
|
||||||
|
{t("general.actions.login")}
|
||||||
|
</Button>
|
||||||
|
</Form>
|
||||||
|
{loginError ? <AlertComponent type="error" message={loginError}/> : null}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(TechLogin);
|
export default connect(mapStateToProps, mapDispatchToProps)(TechLogin);
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
import { Divider } from "antd";
|
import { Divider } from "antd";
|
||||||
import React from "react";
|
import React, { useEffect } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
import TechClockInFormContainer from "../../components/tech-job-clock-in-form/tech-job-clock-in-form.container";
|
import TechClockInFormContainer from "../../components/tech-job-clock-in-form/tech-job-clock-in-form.container";
|
||||||
import TechClockedInList from "../../components/tech-job-clocked-in-list/tech-job-clocked-in-list.component";
|
import TechClockedInList from "../../components/tech-job-clocked-in-list/tech-job-clocked-in-list.component";
|
||||||
import TechJobStatistics from "../../components/tech-job-statistics/tech-job-statistics.component";
|
import TechJobStatistics from "../../components/tech-job-statistics/tech-job-statistics.component";
|
||||||
|
|
||||||
export default function TechClockComponent() {
|
export default function TechClockComponent() {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
document.title = t("titles.techjobclock");
|
||||||
|
}, [t]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<TechJobStatistics />
|
<TechJobStatistics />
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
import React from "react";
|
import React, { useEffect } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
import RbacWrapperComponent from "../../components/rbac-wrapper/rbac-wrapper.component";
|
import RbacWrapperComponent from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||||
import TechLookupJobsDrawer from "../../components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component";
|
import TechLookupJobsDrawer from "../../components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component";
|
||||||
import TechLookupJobsList from "../../components/tech-lookup-jobs-list/tech-lookup-jobs-list.component";
|
import TechLookupJobsList from "../../components/tech-lookup-jobs-list/tech-lookup-jobs-list.component";
|
||||||
|
|
||||||
export default function TechLookupContainer() {
|
export default function TechLookupContainer() {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
document.title = t("titles.techjoblookup");
|
||||||
|
}, [t]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<RbacWrapperComponent action="jobs:list-active">
|
<RbacWrapperComponent action="jobs:list-active">
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
import React from "react";
|
import React, { useEffect } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
import TimeTicketShift from "../../components/time-ticket-shift/time-ticket-shift.container";
|
import TimeTicketShift from "../../components/time-ticket-shift/time-ticket-shift.container";
|
||||||
|
|
||||||
export default function TechShiftClock() {
|
export default function TechShiftClock() {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
document.title = t("titles.techshiftclock");
|
||||||
|
}, [t]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<TimeTicketShift isTechConsole />
|
<TimeTicketShift isTechConsole />
|
||||||
|
|||||||
@@ -2024,7 +2024,7 @@
|
|||||||
"joblookup": "Job Lookup",
|
"joblookup": "Job Lookup",
|
||||||
"login": "Login",
|
"login": "Login",
|
||||||
"logout": "Logout",
|
"logout": "Logout",
|
||||||
"productionboard": "Production Board - Visual",
|
"productionboard": "Production Visual",
|
||||||
"productionlist": "Production List",
|
"productionlist": "Production List",
|
||||||
"shiftclockin": "Shift Clock"
|
"shiftclockin": "Shift Clock"
|
||||||
}
|
}
|
||||||
@@ -2902,7 +2902,7 @@
|
|||||||
"parts-queue": "Parts Queue | $t(titles.app)",
|
"parts-queue": "Parts Queue | $t(titles.app)",
|
||||||
"payments-all": "Payments | $t(titles.app)",
|
"payments-all": "Payments | $t(titles.app)",
|
||||||
"phonebook": "Phonebook | $t(titles.app)",
|
"phonebook": "Phonebook | $t(titles.app)",
|
||||||
"productionboard": "Production - Board",
|
"productionboard": "Production Board - Visual | $t(titles.app)",
|
||||||
"productionlist": "Production Board - List | $t(titles.app)",
|
"productionlist": "Production Board - List | $t(titles.app)",
|
||||||
"profile": "My Profile | $t(titles.app)",
|
"profile": "My Profile | $t(titles.app)",
|
||||||
"readyjobs": "Ready Jobs | $t(titles.app)",
|
"readyjobs": "Ready Jobs | $t(titles.app)",
|
||||||
@@ -2914,6 +2914,10 @@
|
|||||||
"shop-csi": "CSI Responses | $t(titles.app)",
|
"shop-csi": "CSI Responses | $t(titles.app)",
|
||||||
"shop-templates": "Shop Templates | $t(titles.app)",
|
"shop-templates": "Shop Templates | $t(titles.app)",
|
||||||
"shop_vendors": "Vendors | $t(titles.app)",
|
"shop_vendors": "Vendors | $t(titles.app)",
|
||||||
|
"techconsole": "Technician Console | $t(titles.app)",
|
||||||
|
"techjoblookup": "Technician Job Lookup | $t(titles.app)",
|
||||||
|
"techjobclock": "Technician Job Clock | $t(titles.app)",
|
||||||
|
"techshiftclock": "Technician Shift Clock | $t(titles.app)",
|
||||||
"temporarydocs": "Temporary Documents | $t(titles.app)",
|
"temporarydocs": "Temporary Documents | $t(titles.app)",
|
||||||
"timetickets": "Time Tickets | $t(titles.app)",
|
"timetickets": "Time Tickets | $t(titles.app)",
|
||||||
"ttapprovals": "",
|
"ttapprovals": "",
|
||||||
|
|||||||
@@ -2895,7 +2895,7 @@
|
|||||||
"jobs-intake": "",
|
"jobs-intake": "",
|
||||||
"jobsavailable": "Empleos disponibles | $t(titles.app)",
|
"jobsavailable": "Empleos disponibles | $t(titles.app)",
|
||||||
"jobsdetail": "Trabajo {{ro_number}} | $t(titles.app)",
|
"jobsdetail": "Trabajo {{ro_number}} | $t(titles.app)",
|
||||||
"jobsdocuments": "Documentos de trabajo {{ro_number}} | $ t (títulos.app)",
|
"jobsdocuments": "Documentos de trabajo {{ro_number}} | $t(titles.app)",
|
||||||
"manageroot": "Casa | $t(titles.app)",
|
"manageroot": "Casa | $t(titles.app)",
|
||||||
"owners": "Todos los propietarios | $t(titles.app)",
|
"owners": "Todos los propietarios | $t(titles.app)",
|
||||||
"owners-detail": "",
|
"owners-detail": "",
|
||||||
@@ -2914,6 +2914,10 @@
|
|||||||
"shop-csi": "",
|
"shop-csi": "",
|
||||||
"shop-templates": "",
|
"shop-templates": "",
|
||||||
"shop_vendors": "Vendedores | $t(titles.app)",
|
"shop_vendors": "Vendedores | $t(titles.app)",
|
||||||
|
"techconsole": "$t(titles.app)",
|
||||||
|
"techjoblookup": "$t(titles.app)",
|
||||||
|
"techjobclock": "$t(titles.app)",
|
||||||
|
"techshiftclock": "$t(titles.app)",
|
||||||
"temporarydocs": "",
|
"temporarydocs": "",
|
||||||
"timetickets": "",
|
"timetickets": "",
|
||||||
"ttapprovals": "",
|
"ttapprovals": "",
|
||||||
|
|||||||
@@ -2895,7 +2895,7 @@
|
|||||||
"jobs-intake": "",
|
"jobs-intake": "",
|
||||||
"jobsavailable": "Emplois disponibles | $t(titles.app)",
|
"jobsavailable": "Emplois disponibles | $t(titles.app)",
|
||||||
"jobsdetail": "Travail {{ro_number}} | $t(titles.app)",
|
"jobsdetail": "Travail {{ro_number}} | $t(titles.app)",
|
||||||
"jobsdocuments": "Documents de travail {{ro_number}} | $ t (titres.app)",
|
"jobsdocuments": "Documents de travail {{ro_number}} | $t(titles.app)",
|
||||||
"manageroot": "Accueil | $t(titles.app)",
|
"manageroot": "Accueil | $t(titles.app)",
|
||||||
"owners": "Tous les propriétaires | $t(titles.app)",
|
"owners": "Tous les propriétaires | $t(titles.app)",
|
||||||
"owners-detail": "",
|
"owners-detail": "",
|
||||||
@@ -2914,6 +2914,10 @@
|
|||||||
"shop-csi": "",
|
"shop-csi": "",
|
||||||
"shop-templates": "",
|
"shop-templates": "",
|
||||||
"shop_vendors": "Vendeurs | $t(titles.app)",
|
"shop_vendors": "Vendeurs | $t(titles.app)",
|
||||||
|
"techconsole": "$t(titles.app)",
|
||||||
|
"techjoblookup": "$t(titles.app)",
|
||||||
|
"techjobclock": "$t(titles.app)",
|
||||||
|
"techshiftclock": "$t(titles.app)",
|
||||||
"temporarydocs": "",
|
"temporarydocs": "",
|
||||||
"timetickets": "",
|
"timetickets": "",
|
||||||
"ttapprovals": "",
|
"ttapprovals": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user