IO-3320 Responsibility Center RBAC
Signed-off-by: Allan Carr <allan@imexsystems.ca>
This commit is contained in:
@@ -59,6 +59,7 @@ const ret = {
|
|||||||
"shop:dashboard": 3,
|
"shop:dashboard": 3,
|
||||||
"shop:rbac": 5,
|
"shop:rbac": 5,
|
||||||
"shop:reportcenter": 2,
|
"shop:reportcenter": 2,
|
||||||
|
"shop:responsibilitycenter": 4, // Updated from "shop:responsibility" to "shop:responsibilitycenter"
|
||||||
"shop:templates": 4,
|
"shop:templates": 4,
|
||||||
"shop:vendors": 2,
|
"shop:vendors": 2,
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||||
import { Form, InputNumber } from "antd";
|
import { Form, InputNumber } from "antd";
|
||||||
import React 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 { createStructuredSelector } from "reselect";
|
||||||
@@ -12,12 +11,12 @@ import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
|||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop
|
bodyshop: selectBodyshop
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = () => ({
|
||||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
});
|
});
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoRbacComponent);
|
export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoRbacComponent);
|
||||||
|
|
||||||
export function ShopInfoRbacComponent({ form, bodyshop }) {
|
export function ShopInfoRbacComponent({ bodyshop }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const {
|
const {
|
||||||
treatments: { Simple_Inventory }
|
treatments: { Simple_Inventory }
|
||||||
@@ -29,9 +28,11 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
return (
|
return (
|
||||||
<RbacWrapper action="shop:rbac">
|
<RbacWrapper action="shop:rbac">
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
{...HasFeatureAccess({ featureName: "export", bodyshop })
|
{[
|
||||||
|
...(HasFeatureAccess({ featureName: "export", bodyshop })
|
||||||
? [
|
? [
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="accounting:exportlog"
|
||||||
label={t("bodyshop.fields.rbac.accounting.exportlog")}
|
label={t("bodyshop.fields.rbac.accounting.exportlog")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -44,6 +45,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="accounting:payables"
|
||||||
label={t("bodyshop.fields.rbac.accounting.payables")}
|
label={t("bodyshop.fields.rbac.accounting.payables")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -56,6 +58,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="accounting:payments"
|
||||||
label={t("bodyshop.fields.rbac.accounting.payments")}
|
label={t("bodyshop.fields.rbac.accounting.payments")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -68,6 +71,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="accounting:receivables"
|
||||||
label={t("bodyshop.fields.rbac.accounting.receivables")}
|
label={t("bodyshop.fields.rbac.accounting.receivables")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -80,10 +84,11 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
]
|
]
|
||||||
: []}
|
: []),
|
||||||
{...HasFeatureAccess({ featureName: "bills", bodyshop })
|
...(HasFeatureAccess({ featureName: "bills", bodyshop })
|
||||||
? [
|
? [
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="bills:delete"
|
||||||
label={t("bodyshop.fields.rbac.bills.delete")}
|
label={t("bodyshop.fields.rbac.bills.delete")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -96,6 +101,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="bills:enter"
|
||||||
label={t("bodyshop.fields.rbac.bills.enter")}
|
label={t("bodyshop.fields.rbac.bills.enter")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -108,6 +114,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="bills:list"
|
||||||
label={t("bodyshop.fields.rbac.bills.list")}
|
label={t("bodyshop.fields.rbac.bills.list")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -120,6 +127,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="bills:reexport"
|
||||||
label={t("bodyshop.fields.rbac.bills.reexport")}
|
label={t("bodyshop.fields.rbac.bills.reexport")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -132,6 +140,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="bills:view"
|
||||||
label={t("bodyshop.fields.rbac.bills.view")}
|
label={t("bodyshop.fields.rbac.bills.view")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -144,10 +153,11 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
]
|
]
|
||||||
: []}
|
: []),
|
||||||
{...HasFeatureAccess({ featureName: "courtesycars", bodyshop })
|
...(HasFeatureAccess({ featureName: "courtesycars", bodyshop })
|
||||||
? [
|
? [
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="contracts:create"
|
||||||
label={t("bodyshop.fields.rbac.contracts.create")}
|
label={t("bodyshop.fields.rbac.contracts.create")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -160,6 +170,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="contracts:detail"
|
||||||
label={t("bodyshop.fields.rbac.contracts.detail")}
|
label={t("bodyshop.fields.rbac.contracts.detail")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -172,6 +183,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="contracts:list"
|
||||||
label={t("bodyshop.fields.rbac.contracts.list")}
|
label={t("bodyshop.fields.rbac.contracts.list")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -184,6 +196,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="courtesycar:create"
|
||||||
label={t("bodyshop.fields.rbac.courtesycar.create")}
|
label={t("bodyshop.fields.rbac.courtesycar.create")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -196,6 +209,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="courtesycar:detail"
|
||||||
label={t("bodyshop.fields.rbac.courtesycar.detail")}
|
label={t("bodyshop.fields.rbac.courtesycar.detail")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -208,6 +222,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="courtesycar:list"
|
||||||
label={t("bodyshop.fields.rbac.courtesycar.list")}
|
label={t("bodyshop.fields.rbac.courtesycar.list")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -220,10 +235,11 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
]
|
]
|
||||||
: []}
|
: []),
|
||||||
{...HasFeatureAccess({ featureName: "csi", bodyshop })
|
...(HasFeatureAccess({ featureName: "csi", bodyshop })
|
||||||
? [
|
? [
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="csi:export"
|
||||||
label={t("bodyshop.fields.rbac.csi.export")}
|
label={t("bodyshop.fields.rbac.csi.export")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -236,6 +252,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="csi:page"
|
||||||
label={t("bodyshop.fields.rbac.csi.page")}
|
label={t("bodyshop.fields.rbac.csi.page")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -248,8 +265,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
]
|
]
|
||||||
: []}
|
: []),
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="employees:page"
|
||||||
label={t("bodyshop.fields.rbac.employees.page")}
|
label={t("bodyshop.fields.rbac.employees.page")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -260,8 +278,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "employees:page"]}
|
name={["md_rbac", "employees:page"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="employee_teams:page"
|
||||||
label={t("bodyshop.fields.rbac.employee_teams.page")}
|
label={t("bodyshop.fields.rbac.employee_teams.page")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -272,8 +291,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "employee_teams:page"]}
|
name={["md_rbac", "employee_teams:page"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:admin"
|
||||||
label={t("bodyshop.fields.rbac.jobs.admin")}
|
label={t("bodyshop.fields.rbac.jobs.admin")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -284,8 +304,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:admin"]}
|
name={["md_rbac", "jobs:admin"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:available-list"
|
||||||
label={t("bodyshop.fields.rbac.jobs.available-list")}
|
label={t("bodyshop.fields.rbac.jobs.available-list")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -296,8 +317,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:available-list"]}
|
name={["md_rbac", "jobs:available-list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:checklist-view"
|
||||||
label={t("bodyshop.fields.rbac.jobs.checklist-view")}
|
label={t("bodyshop.fields.rbac.jobs.checklist-view")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -308,8 +330,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:checklist-view"]}
|
name={["md_rbac", "jobs:checklist-view"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:close"
|
||||||
label={t("bodyshop.fields.rbac.jobs.close")}
|
label={t("bodyshop.fields.rbac.jobs.close")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -320,8 +343,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:close"]}
|
name={["md_rbac", "jobs:close"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:create"
|
||||||
label={t("bodyshop.fields.rbac.jobs.create")}
|
label={t("bodyshop.fields.rbac.jobs.create")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -332,8 +356,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:create"]}
|
name={["md_rbac", "jobs:create"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:deliver"
|
||||||
label={t("bodyshop.fields.rbac.jobs.deliver")}
|
label={t("bodyshop.fields.rbac.jobs.deliver")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -344,8 +369,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:deliver"]}
|
name={["md_rbac", "jobs:deliver"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:detail"
|
||||||
label={t("bodyshop.fields.rbac.jobs.detail")}
|
label={t("bodyshop.fields.rbac.jobs.detail")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -356,8 +382,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:detail"]}
|
name={["md_rbac", "jobs:detail"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:intake"
|
||||||
label={t("bodyshop.fields.rbac.jobs.intake")}
|
label={t("bodyshop.fields.rbac.jobs.intake")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -368,8 +395,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:intake"]}
|
name={["md_rbac", "jobs:intake"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:list-active"
|
||||||
label={t("bodyshop.fields.rbac.jobs.list-active")}
|
label={t("bodyshop.fields.rbac.jobs.list-active")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -380,8 +408,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:list-active"]}
|
name={["md_rbac", "jobs:list-active"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:list-all"
|
||||||
label={t("bodyshop.fields.rbac.jobs.list-all")}
|
label={t("bodyshop.fields.rbac.jobs.list-all")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -392,8 +421,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:list-all"]}
|
name={["md_rbac", "jobs:list-all"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:list-ready"
|
||||||
label={t("bodyshop.fields.rbac.jobs.list-ready")}
|
label={t("bodyshop.fields.rbac.jobs.list-ready")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -404,8 +434,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:list-ready"]}
|
name={["md_rbac", "jobs:list-ready"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:partsqueue"
|
||||||
label={t("bodyshop.fields.rbac.jobs.partsqueue")}
|
label={t("bodyshop.fields.rbac.jobs.partsqueue")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -416,8 +447,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:partsqueue"]}
|
name={["md_rbac", "jobs:partsqueue"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="jobs:void"
|
||||||
label={t("bodyshop.fields.rbac.jobs.void")}
|
label={t("bodyshop.fields.rbac.jobs.void")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -428,8 +460,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "jobs:void"]}
|
name={["md_rbac", "jobs:void"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="owners:detail"
|
||||||
label={t("bodyshop.fields.rbac.owners.detail")}
|
label={t("bodyshop.fields.rbac.owners.detail")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -440,8 +473,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "owners:detail"]}
|
name={["md_rbac", "owners:detail"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="owners:list"
|
||||||
label={t("bodyshop.fields.rbac.owners.list")}
|
label={t("bodyshop.fields.rbac.owners.list")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -452,8 +486,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "owners:list"]}
|
name={["md_rbac", "owners:list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="payments:enter"
|
||||||
label={t("bodyshop.fields.rbac.payments.enter")}
|
label={t("bodyshop.fields.rbac.payments.enter")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -464,8 +499,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "payments:enter"]}
|
name={["md_rbac", "payments:enter"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="payments:list"
|
||||||
label={t("bodyshop.fields.rbac.payments.list")}
|
label={t("bodyshop.fields.rbac.payments.list")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -476,8 +512,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "payments:list"]}
|
name={["md_rbac", "payments:list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="phonebook:edit"
|
||||||
label={t("bodyshop.fields.rbac.phonebook.edit")}
|
label={t("bodyshop.fields.rbac.phonebook.edit")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -488,8 +525,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "phonebook:edit"]}
|
name={["md_rbac", "phonebook:edit"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="phonebook:view"
|
||||||
label={t("bodyshop.fields.rbac.phonebook.view")}
|
label={t("bodyshop.fields.rbac.phonebook.view")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -500,9 +538,11 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "phonebook:view"]}
|
name={["md_rbac", "phonebook:view"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
{HasFeatureAccess({ featureName: "visualboard", bodyshop }) && (
|
...(HasFeatureAccess({ featureName: "visualboard", bodyshop })
|
||||||
|
? [
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="production:board"
|
||||||
label={t("bodyshop.fields.rbac.production.board")}
|
label={t("bodyshop.fields.rbac.production.board")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -514,8 +554,10 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
]
|
||||||
|
: []),
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="production:list"
|
||||||
label={t("bodyshop.fields.rbac.production.list")}
|
label={t("bodyshop.fields.rbac.production.list")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -526,8 +568,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "production:list"]}
|
name={["md_rbac", "production:list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="schedule:view"
|
||||||
label={t("bodyshop.fields.rbac.schedule.view")}
|
label={t("bodyshop.fields.rbac.schedule.view")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -538,9 +581,11 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "schedule:view"]}
|
name={["md_rbac", "schedule:view"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
{HasFeatureAccess({ featureName: "scoreboard", bodyshop }) && (
|
...(HasFeatureAccess({ featureName: "scoreboard", bodyshop })
|
||||||
|
? [
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="scoreboard:view"
|
||||||
label={t("bodyshop.fields.rbac.scoreboard.view")}
|
label={t("bodyshop.fields.rbac.scoreboard.view")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -552,10 +597,12 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
]
|
||||||
{...HasFeatureAccess({ featureName: "timetickets", bodyshop })
|
: []),
|
||||||
|
...(HasFeatureAccess({ featureName: "timetickets", bodyshop })
|
||||||
? [
|
? [
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="shiftclock:view"
|
||||||
label={t("bodyshop.fields.rbac.shiftclock.view")}
|
label={t("bodyshop.fields.rbac.shiftclock.view")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -568,18 +615,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.shop.config")}
|
key="timetickets:edit"
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "shop:config"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>,
|
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.timetickets.edit")}
|
label={t("bodyshop.fields.rbac.timetickets.edit")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -592,6 +628,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="timetickets:shiftedit"
|
||||||
label={t("bodyshop.fields.rbac.timetickets.shiftedit")}
|
label={t("bodyshop.fields.rbac.timetickets.shiftedit")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -604,6 +641,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="timetickets:editcommitted"
|
||||||
label={t("bodyshop.fields.rbac.timetickets.editcommitted")}
|
label={t("bodyshop.fields.rbac.timetickets.editcommitted")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -616,6 +654,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="ttapprovals:view"
|
||||||
label={t("bodyshop.fields.rbac.ttapprovals.view")}
|
label={t("bodyshop.fields.rbac.ttapprovals.view")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -628,6 +667,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="ttapprovals:approve"
|
||||||
label={t("bodyshop.fields.rbac.ttapprovals.approve")}
|
label={t("bodyshop.fields.rbac.ttapprovals.approve")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -640,6 +680,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="timetickets:enter"
|
||||||
label={t("bodyshop.fields.rbac.timetickets.enter")}
|
label={t("bodyshop.fields.rbac.timetickets.enter")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -652,6 +693,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="timetickets:list"
|
||||||
label={t("bodyshop.fields.rbac.timetickets.list")}
|
label={t("bodyshop.fields.rbac.timetickets.list")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -664,20 +706,22 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
]
|
]
|
||||||
: []}
|
: []),
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.shop.vendors")}
|
key="shop:config"
|
||||||
|
label={t("bodyshop.fields.rbac.shop.config")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true
|
required: true
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
name={["md_rbac", "shop:vendors"]}
|
name={["md_rbac", "shop:config"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="shop:dashboard"
|
||||||
label={t("bodyshop.fields.rbac.shop.dashboard")}
|
label={t("bodyshop.fields.rbac.shop.dashboard")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -688,8 +732,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "shop:dashboard"]}
|
name={["md_rbac", "shop:dashboard"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="shop:rbac"
|
||||||
label={t("bodyshop.fields.rbac.shop.rbac")}
|
label={t("bodyshop.fields.rbac.shop.rbac")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -700,8 +745,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "shop:rbac"]}
|
name={["md_rbac", "shop:rbac"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="shop:reportcenter"
|
||||||
label={t("bodyshop.fields.rbac.shop.reportcenter")}
|
label={t("bodyshop.fields.rbac.shop.reportcenter")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -712,21 +758,37 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "shop:reportcenter"]}
|
name={["md_rbac", "shop:reportcenter"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
{/* <Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.shop.templates")}
|
key="shop:responsibilitycenter"
|
||||||
|
label={t("bodyshop.fields.rbac.shop.responsibilitycenter")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true
|
required: true
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
name={["md_rbac", "shop:templates"]}
|
name={["md_rbac", "shop:responsibilitycenter"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item> */}
|
</Form.Item>,
|
||||||
{HasFeatureAccess({ featureName: "media", bodyshop }) && (
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="shop:vendors"
|
||||||
|
label={t("bodyshop.fields.rbac.shop.vendors")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "shop:vendors"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>,
|
||||||
|
...(HasFeatureAccess({ featureName: "media", bodyshop })
|
||||||
|
? [
|
||||||
|
<Form.Item
|
||||||
|
key="temporarydocs:view"
|
||||||
label={t("bodyshop.fields.rbac.temporarydocs.view")}
|
label={t("bodyshop.fields.rbac.temporarydocs.view")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -738,8 +800,10 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
]
|
||||||
|
: []),
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="users:editaccess"
|
||||||
label={t("bodyshop.fields.rbac.users.editaccess")}
|
label={t("bodyshop.fields.rbac.users.editaccess")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -750,10 +814,11 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "users:editaccess"]}
|
name={["md_rbac", "users:editaccess"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
{Simple_Inventory.treatment === "on" && (
|
...(Simple_Inventory.treatment === "on"
|
||||||
<>
|
? [
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="inventory:list"
|
||||||
label={t("bodyshop.fields.rbac.inventory.list")}
|
label={t("bodyshop.fields.rbac.inventory.list")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -764,8 +829,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
name={["md_rbac", "inventory:list"]}
|
name={["md_rbac", "inventory:list"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>,
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key="inventory:delete"
|
||||||
label={t("bodyshop.fields.rbac.inventory.delete")}
|
label={t("bodyshop.fields.rbac.inventory.delete")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
@@ -777,8 +843,9 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</>
|
]
|
||||||
)}
|
: [])
|
||||||
|
]}
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
</RbacWrapper>
|
</RbacWrapper>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import DataLabel from "../data-label/data-label.component";
|
|||||||
import { HasFeatureAccess } from "../feature-wrapper/feature-wrapper.component";
|
import { HasFeatureAccess } from "../feature-wrapper/feature-wrapper.component";
|
||||||
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
|
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
|
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
||||||
import ShopInfoResponsibilitycentersTaxesComponent from "./shop-info.responsibilitycenters.taxes.component";
|
import ShopInfoResponsibilitycentersTaxesComponent from "./shop-info.responsibilitycenters.taxes.component";
|
||||||
|
|
||||||
const SelectorDiv = styled.div`
|
const SelectorDiv = styled.div`
|
||||||
@@ -59,6 +60,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
<RbacWrapper action="shop:responsibilitycenter">
|
||||||
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
|
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
|
||||||
<>
|
<>
|
||||||
{bodyshop.cdk_dealerid && (
|
{bodyshop.cdk_dealerid && (
|
||||||
@@ -4492,6 +4494,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
</RbacWrapper>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -512,6 +512,7 @@
|
|||||||
"dashboard": "Shop -> Dashboard",
|
"dashboard": "Shop -> Dashboard",
|
||||||
"rbac": "Shop -> RBAC",
|
"rbac": "Shop -> RBAC",
|
||||||
"reportcenter": "Shop -> Report Center",
|
"reportcenter": "Shop -> Report Center",
|
||||||
|
"responsibilitycenter": "Shop -> Responsibility Centers",
|
||||||
"templates": "Shop -> Templates",
|
"templates": "Shop -> Templates",
|
||||||
"vendors": "Shop -> Vendors"
|
"vendors": "Shop -> Vendors"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -512,6 +512,7 @@
|
|||||||
"dashboard": "",
|
"dashboard": "",
|
||||||
"rbac": "",
|
"rbac": "",
|
||||||
"reportcenter": "",
|
"reportcenter": "",
|
||||||
|
"responsibilitycenter": "",
|
||||||
"templates": "",
|
"templates": "",
|
||||||
"vendors": ""
|
"vendors": ""
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -512,6 +512,7 @@
|
|||||||
"dashboard": "",
|
"dashboard": "",
|
||||||
"rbac": "",
|
"rbac": "",
|
||||||
"reportcenter": "",
|
"reportcenter": "",
|
||||||
|
"responsibilitycenter": "",
|
||||||
"templates": "",
|
"templates": "",
|
||||||
"vendors": ""
|
"vendors": ""
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user