diff --git a/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx b/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx
index e00e83c14..9e65f5f05 100644
--- a/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx
+++ b/client/src/components/shop-employees/shop-employees-add-vacation.component.jsx
@@ -8,7 +8,7 @@ import { INSERT_VACATION } from "../../graphql/employees.queries";
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component.jsx";
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
-export default function ShopEmployeeAddVacation({ employee }) {
+export default function ShopEmployeeAddVacation({ employee, buttonProps }) {
const { t } = useTranslation();
const [insertVacation] = useMutation(INSERT_VACATION);
@@ -117,7 +117,7 @@ export default function ShopEmployeeAddVacation({ employee }) {
return (
-
diff --git a/client/src/components/shop-employees/shop-employees-form.component.jsx b/client/src/components/shop-employees/shop-employees-form.component.jsx
index 547143592..447558ada 100644
--- a/client/src/components/shop-employees/shop-employees-form.component.jsx
+++ b/client/src/components/shop-employees/shop-employees-form.component.jsx
@@ -1,7 +1,7 @@
import { DeleteFilled } from "@ant-design/icons";
import { useApolloClient, useMutation, useQuery } from "@apollo/client/react";
import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react";
-import { Button, Card, Form, Input, InputNumber, Select, Space, Switch } from "antd";
+import { Button, Card, Col, Form, Input, InputNumber, Row, Select, Space, Switch } from "antd";
import ResponsiveTable from "../responsive-table/responsive-table.component";
import { useForm } from "antd/es/form/Form";
import queryString from "query-string";
@@ -30,6 +30,7 @@ import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.c
import { getFormListItemTitle } from "../form-list-move-arrows/form-list-item-title.utils";
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import ShopEmployeeAddVacation from "./shop-employees-add-vacation.component";
+import FormItemEmail from "../form-items-formatted/email-form-item.component.jsx";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop
@@ -42,6 +43,14 @@ export function ShopEmployeesFormComponent({ bodyshop }) {
const { t } = useTranslation();
const [form] = useForm();
const employeeRates = Form.useWatch(["rates"], form) || [];
+ const employeeOptionsColProps = {
+ xs: 24,
+ sm: 12,
+ md: 8,
+ lg: { flex: "0 0 320px" },
+ xl: { flex: "0 0 280px" },
+ xxl: { flex: "0 0 380px" }
+ };
const history = useNavigate();
const search = queryString.parse(useLocation().search);
const [deleteVacation] = useMutation(DELETE_VACATION);
@@ -177,237 +186,280 @@ export function ShopEmployeesFormComponent({ bodyshop }) {
}
>
- }
- columns={columns}
- mobileColumnKeys={["start", "length", "actions"]}
- rowKey={"id"}
- dataSource={data?.employees_by_pk?.employee_vacations ?? []}
- />
+
+
+
);
}
diff --git a/client/src/components/shop-employees/shop-employees-list.component.jsx b/client/src/components/shop-employees/shop-employees-list.component.jsx
index e9082ac05..e6ecda6cf 100644
--- a/client/src/components/shop-employees/shop-employees-list.component.jsx
+++ b/client/src/components/shop-employees/shop-employees-list.component.jsx
@@ -30,7 +30,7 @@ export default function ShopEmployeesListComponent({ loading, employees }) {
};
const columns = [
{
- title: t("employees.fields.employee_number"),
+ title: t("employees.labels.employee_number_short"),
dataIndex: "employee_number",
key: "employee_number",
sorter: (a, b) => alphaSort(a.employee_number, b.employee_number),
diff --git a/client/src/components/shop-employees/shop-employees.container.jsx b/client/src/components/shop-employees/shop-employees.container.jsx
index 8b22b87a4..6aa89fd76 100644
--- a/client/src/components/shop-employees/shop-employees.container.jsx
+++ b/client/src/components/shop-employees/shop-employees.container.jsx
@@ -1,29 +1,47 @@
import { useQuery } from "@apollo/client/react";
+import queryString from "query-string";
import { connect } from "react-redux";
+import { useLocation } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { QUERY_EMPLOYEES } from "../../graphql/employees.queries";
import AlertComponent from "../alert/alert.component";
import ShopEmployeesFormComponent from "./shop-employees-form.component";
import ShopEmployeesListComponent from "./shop-employees-list.component";
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
+import "./shop-employees.styles.scss";
const mapStateToProps = createStructuredSelector({});
function ShopEmployeesContainer() {
+ const search = queryString.parse(useLocation().search);
const { loading, error, data } = useQuery(QUERY_EMPLOYEES, {
fetchPolicy: "network-only",
nextFetchPolicy: "network-only"
});
+ const hasSelectedEmployee = Boolean(search.employeeId);
if (error) return ;
return (
-
-
-
-
-
-
+
+
+
+
+
+ {hasSelectedEmployee ? (
+
+
+
+ ) : null}
+
+
);
}
diff --git a/client/src/components/shop-employees/shop-employees.styles.scss b/client/src/components/shop-employees/shop-employees.styles.scss
new file mode 100644
index 000000000..13d893a07
--- /dev/null
+++ b/client/src/components/shop-employees/shop-employees.styles.scss
@@ -0,0 +1,16 @@
+.shop-employees-layout {
+ display: grid;
+ gap: 16px;
+ align-items: start;
+}
+
+.shop-employees-layout__list,
+.shop-employees-layout__details {
+ min-width: 0;
+}
+
+@media (min-width: 1700px) {
+ .shop-employees-layout--with-detail {
+ grid-template-columns: minmax(420px, 500px) minmax(0, 1fr);
+ }
+}
diff --git a/client/src/components/shop-info/shop-info.consent.component.jsx b/client/src/components/shop-info/shop-info.consent.component.jsx
index 28992e594..621095c14 100644
--- a/client/src/components/shop-info/shop-info.consent.component.jsx
+++ b/client/src/components/shop-info/shop-info.consent.component.jsx
@@ -1,4 +1,4 @@
-import { Card, Typography } from "antd";
+import { Card } from "antd";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
@@ -15,9 +15,8 @@ function ShopInfoConsentComponent({ bodyshop }) {
const { t } = useTranslation();
return (
-
- {t("settings.title")}
- {}
+
+
);
}
diff --git a/client/src/components/shop-teams/shop-employee-teams.form.component.jsx b/client/src/components/shop-teams/shop-employee-teams.form.component.jsx
index 7ae1000c0..4311dbfc3 100644
--- a/client/src/components/shop-teams/shop-employee-teams.form.component.jsx
+++ b/client/src/components/shop-teams/shop-employee-teams.form.component.jsx
@@ -132,9 +132,22 @@ export function ShopEmployeeTeamsFormComponent({ bodyshop }) {
const teamName = Form.useWatch("name", form);
const teamMembers = Form.useWatch(["employee_team_members"], form) || [];
const isTeamHydrating = !isNewTeam && Boolean(search.employeeTeamId) && hydratedTeamId !== search.employeeTeamId;
+ const isAllocationTotalExact = hasExactSplitTotal(teamMembers);
+ const allocationTotalValue = formatAllocationPercentage(getSplitTotal(teamMembers))?.replace("%", "") || "0";
+ const teamNameDisplay = teamName?.trim() || t("employee_teams.fields.name");
const teamCardTitle = isTeamHydrating
? t("employee_teams.fields.name")
- : teamName?.trim() || t("employee_teams.fields.name");
+ : (
+
+ {teamNameDisplay}
+ -
+
+ {t("employee_teams.labels.allocation_total", {
+ total: allocationTotalValue
+ })}
+
+
+ );
const getTeamMemberTitle = (teamMember = {}) => {
const employeeName =
@@ -241,7 +254,7 @@ export function ShopEmployeeTeamsFormComponent({ bodyshop }) {
) : (
)}
diff --git a/client/src/components/shop-teams/shop-teams.container.jsx b/client/src/components/shop-teams/shop-teams.container.jsx
index 9f5211f59..997cc309d 100644
--- a/client/src/components/shop-teams/shop-teams.container.jsx
+++ b/client/src/components/shop-teams/shop-teams.container.jsx
@@ -1,36 +1,44 @@
import { useQuery } from "@apollo/client/react";
+import queryString from "query-string";
import { connect } from "react-redux";
+import { useLocation } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { QUERY_TEAMS } from "../../graphql/employee_teams.queries";
import AlertComponent from "../alert/alert.component";
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
import ShopEmployeeTeamsListComponent from "./shop-employee-teams.list";
import ShopEmployeeTeamsFormComponent from "./shop-employee-teams.form.component";
-import { Col, Row } from "antd";
+import "./shop-teams.styles.scss";
const mapStateToProps = createStructuredSelector({});
function ShopTeamsContainer() {
+ const search = queryString.parse(useLocation().search);
const { loading, error, data } = useQuery(QUERY_TEAMS, {
fetchPolicy: "network-only",
nextFetchPolicy: "network-only"
});
+ const hasSelectedTeam = Boolean(search.employeeTeamId);
if (error) return ;
return (
-
-
-
-
-
-
-
+
+
+
+
+
+ {hasSelectedTeam ? (
+
-
-
-
-
+
+ ) : null}
+
+
);
}
diff --git a/client/src/components/shop-teams/shop-teams.styles.scss b/client/src/components/shop-teams/shop-teams.styles.scss
new file mode 100644
index 000000000..2582f7232
--- /dev/null
+++ b/client/src/components/shop-teams/shop-teams.styles.scss
@@ -0,0 +1,16 @@
+.shop-teams-layout {
+ display: grid;
+ gap: 16px;
+ align-items: start;
+}
+
+.shop-teams-layout__list,
+.shop-teams-layout__details {
+ min-width: 0;
+}
+
+@media (min-width: 1700px) {
+ .shop-teams-layout--with-detail {
+ grid-template-columns: minmax(420px, 500px) minmax(0, 1fr);
+ }
+}
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 1b146b736..cc63bdfea 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -736,6 +736,9 @@
},
"emaillater": "Email Later",
"employee_teams": "Employee Teams",
+ "employee_options": "Employee Options",
+ "employee_rates": "Employee Rates",
+ "employee_vacation": "Employee Vacation",
"employees": "Employees",
"estimators": "Estimators",
"filehandlers": "Adjusters",
@@ -1202,7 +1205,9 @@
"percentage": "Percent"
},
"labels": {
- "allocation_total": "Allocation Total: {{total}}%"
+ "allocation_total": "Allocation Total: {{total}}%",
+ "members": "Members",
+ "team_options": "Team Options"
},
"options": {
"commission": "Commission",
@@ -1246,6 +1251,7 @@
"labels": {
"actions": "Actions",
"active": "Active",
+ "employee_number_short": "Employee #",
"endmustbeafterstart": "End date must be after start date.",
"flat_rate": "Flat Rate",
"inactive": "Inactive",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index b3b6f23da..8b2443628 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -736,6 +736,9 @@
},
"emaillater": "",
"employee_teams": "",
+ "employee_options": "",
+ "employee_rates": "",
+ "employee_vacation": "",
"employees": "",
"estimators": "",
"filehandlers": "",
@@ -1202,7 +1205,9 @@
"percentage": ""
},
"labels": {
- "allocation_total": ""
+ "allocation_total": "",
+ "members": "",
+ "team_options": ""
},
"options": {
"commission": "",
@@ -1246,6 +1251,7 @@
"labels": {
"actions": "",
"active": "",
+ "employee_number_short": "",
"endmustbeafterstart": "",
"flat_rate": "",
"inactive": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 67d8d7c86..3244c162e 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -736,6 +736,9 @@
},
"emaillater": "",
"employee_teams": "",
+ "employee_options": "",
+ "employee_rates": "",
+ "employee_vacation": "",
"employees": "",
"estimators": "",
"filehandlers": "",
@@ -1202,7 +1205,9 @@
"percentage": ""
},
"labels": {
- "allocation_total": ""
+ "allocation_total": "",
+ "members": "",
+ "team_options": ""
},
"options": {
"commission": "",
@@ -1246,6 +1251,7 @@
"labels": {
"actions": "",
"active": "",
+ "employee_number_short": "",
"endmustbeafterstart": "",
"flat_rate": "",
"inactive": "",