Added viewing all CSI responses + read only version of configurable form BOD-154
This commit is contained in:
@@ -4169,9 +4169,56 @@
|
|||||||
</concept_node>
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
|
<folder_node>
|
||||||
|
<name>fields</name>
|
||||||
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>completedon</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
</children>
|
||||||
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
<name>labels</name>
|
<name>labels</name>
|
||||||
<children>
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>noneselected</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>title</name>
|
<name>title</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -12480,6 +12527,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>shop_csi</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>shop_templates</name>
|
<name>shop_templates</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -15698,6 +15766,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>shop-csi</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>shop-templates</name>
|
<name>shop-templates</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -16246,6 +16335,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>shop-csi</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>shop-templates</name>
|
<name>shop-templates</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ export default function AccountingPayablesTableComponent({
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
console.log("transInProgress", transInProgress);
|
|
||||||
const handleSearch = (e) => {
|
const handleSearch = (e) => {
|
||||||
setState({ ...state, search: e.target.value });
|
setState({ ...state, search: e.target.value });
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,21 +2,22 @@ import React from "react";
|
|||||||
import { Form, Checkbox } from "antd";
|
import { Form, Checkbox } from "antd";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function JobIntakeFormCheckboxComponent({ formItem }) {
|
export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) {
|
||||||
const { name, label, required } = formItem;
|
const { name, label, required } = formItem;
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name={name}
|
name={name}
|
||||||
label={label}
|
label={label}
|
||||||
valuePropName='checked'
|
valuePropName="checked"
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: required,
|
required: required,
|
||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}>
|
]}
|
||||||
<Checkbox />
|
>
|
||||||
|
<Checkbox disabled={readOnly} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,21 +5,23 @@ import Text from "./text/text.component";
|
|||||||
import Textarea from "./textarea/textarea.component";
|
import Textarea from "./textarea/textarea.component";
|
||||||
import Rate from "./rate/rate.component";
|
import Rate from "./rate/rate.component";
|
||||||
|
|
||||||
export default function ConfirmFormComponents({ componentList }) {
|
export default function ConfirmFormComponents({ componentList, readOnly }) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{componentList.map((f, idx) => {
|
{componentList.map((f, idx) => {
|
||||||
switch (f.type) {
|
switch (f.type) {
|
||||||
case "checkbox":
|
case "checkbox":
|
||||||
return <CheckboxFormItem key={idx} formItem={f} />;
|
return (
|
||||||
|
<CheckboxFormItem key={idx} formItem={f} readOnly={readOnly} />
|
||||||
|
);
|
||||||
case "slider":
|
case "slider":
|
||||||
return <Slider key={idx} formItem={f} />;
|
return <Slider key={idx} formItem={f} readOnly={readOnly} />;
|
||||||
case "text":
|
case "text":
|
||||||
return <Text key={idx} formItem={f} />;
|
return <Text key={idx} formItem={f} readOnly={readOnly} />;
|
||||||
case "textarea":
|
case "textarea":
|
||||||
return <Textarea key={idx} formItem={f} />;
|
return <Textarea key={idx} formItem={f} readOnly={readOnly} />;
|
||||||
case "rate":
|
case "rate":
|
||||||
return <Rate key={idx} formItem={f} />;
|
return <Rate key={idx} formItem={f} readOnly={readOnly} />;
|
||||||
default:
|
default:
|
||||||
return <div key={idx}>Error</div>;
|
return <div key={idx}>Error</div>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from "react";
|
|||||||
import { Form, Rate } from "antd";
|
import { Form, Rate } from "antd";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function JobIntakeFormCheckboxComponent({ formItem }) {
|
export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) {
|
||||||
const { name, label, required } = formItem;
|
const { name, label, required } = formItem;
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
@@ -14,8 +14,9 @@ export default function JobIntakeFormCheckboxComponent({ formItem }) {
|
|||||||
required: required,
|
required: required,
|
||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}>
|
]}
|
||||||
<Rate allowHalf />
|
>
|
||||||
|
<Rate disabled={readOnly} allowHalf />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Form, Slider } from "antd";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function JobIntakeFormCheckboxComponent({ formItem }) {
|
export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) {
|
||||||
const { name, label, required, min, max } = formItem;
|
const { name, label, required, min, max } = formItem;
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
@@ -14,8 +14,9 @@ export default function JobIntakeFormCheckboxComponent({ formItem }) {
|
|||||||
required: required,
|
required: required,
|
||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}>
|
]}
|
||||||
<Slider min={min || 0} max={max || 10} />
|
>
|
||||||
|
<Slider disabled={readOnly} min={min || 0} max={max || 10} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from "react";
|
|||||||
import { Form, Input } from "antd";
|
import { Form, Input } from "antd";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function JobIntakeFormCheckboxComponent({ formItem }) {
|
export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) {
|
||||||
const { name, label, required } = formItem;
|
const { name, label, required } = formItem;
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
@@ -14,8 +14,9 @@ export default function JobIntakeFormCheckboxComponent({ formItem }) {
|
|||||||
required: required,
|
required: required,
|
||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}>
|
]}
|
||||||
<Input />
|
>
|
||||||
|
<Input disabled={readOnly} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from "react";
|
|||||||
import { Form, Input } from "antd";
|
import { Form, Input } from "antd";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function JobIntakeFormCheckboxComponent({ formItem }) {
|
export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) {
|
||||||
const { name, label, required, rows } = formItem;
|
const { name, label, required, rows } = formItem;
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
@@ -14,8 +14,9 @@ export default function JobIntakeFormCheckboxComponent({ formItem }) {
|
|||||||
required: required,
|
required: required,
|
||||||
message: t("general.validation.required"),
|
message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}>
|
]}
|
||||||
<Input.TextArea rows={rows || 4} />
|
>
|
||||||
|
<Input.TextArea disabled={readOnly} rows={rows || 4} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import { useQuery } from "@apollo/react-hooks";
|
||||||
|
import { Form } from "antd";
|
||||||
|
import queryString from "query-string";
|
||||||
|
import React, { useEffect } from "react";
|
||||||
|
import { useLocation } from "react-router-dom";
|
||||||
|
import { QUERY_CSI_RESPONSE_BY_PK } from "../../graphql/csi.queries";
|
||||||
|
import ConfigFormComponents from "../config-form-components/config-form-components.component";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||||
|
import AlertComponent from "../alert/alert.component";
|
||||||
|
|
||||||
|
export default function CsiResponseFormContainer() {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const searchParams = queryString.parse(useLocation().search);
|
||||||
|
const { responseid } = searchParams;
|
||||||
|
const { loading, error, data } = useQuery(QUERY_CSI_RESPONSE_BY_PK, {
|
||||||
|
variables: {
|
||||||
|
id: responseid,
|
||||||
|
},
|
||||||
|
skip: !!!responseid,
|
||||||
|
});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
form.resetFields();
|
||||||
|
}, [data, form]);
|
||||||
|
|
||||||
|
if (!!!responseid) return <div>{t("csi.labels.noneselected")}</div>;
|
||||||
|
|
||||||
|
if (loading) return <LoadingSpinner />;
|
||||||
|
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Form form={form} initialValues={data.csi_by_pk.response}>
|
||||||
|
<ConfigFormComponents
|
||||||
|
readOnly
|
||||||
|
componentList={data.csi_by_pk.csiquestion.config}
|
||||||
|
/>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
import { SyncOutlined } from "@ant-design/icons";
|
||||||
|
import { Button, Table } from "antd";
|
||||||
|
import queryString from "query-string";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { Link, useHistory, useLocation } from "react-router-dom";
|
||||||
|
import { DateFormatter } from "../../utils/DateFormatter";
|
||||||
|
import { alphaSort } from "../../utils/sorters";
|
||||||
|
|
||||||
|
export default function CsiResponseListPaginated({
|
||||||
|
refetch,
|
||||||
|
loading,
|
||||||
|
responses,
|
||||||
|
total,
|
||||||
|
}) {
|
||||||
|
const search = queryString.parse(useLocation().search);
|
||||||
|
const { responseid, page, sortcolumn, sortorder } = search;
|
||||||
|
const history = useHistory();
|
||||||
|
const [state, setState] = useState({
|
||||||
|
sortedInfo: {},
|
||||||
|
filteredInfo: { text: "" },
|
||||||
|
});
|
||||||
|
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ro_number"),
|
||||||
|
dataIndex: "ro_number",
|
||||||
|
key: "ro_number",
|
||||||
|
width: "8%",
|
||||||
|
sorter: (a, b) => alphaSort(a.job.ro_number, b.job.ro_number),
|
||||||
|
sortOrder: sortcolumn === "ro_number" && sortorder,
|
||||||
|
|
||||||
|
render: (text, record) => (
|
||||||
|
<Link to={"/manage/jobs/" + record.job.id}>{record.job.ro_number}</Link>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.est_number"),
|
||||||
|
dataIndex: "est_number",
|
||||||
|
key: "est_number",
|
||||||
|
width: "8%",
|
||||||
|
sorter: (a, b) => a.job.est_number - b.job.est_number,
|
||||||
|
sortOrder: sortcolumn === "est_number" && sortorder,
|
||||||
|
|
||||||
|
render: (text, record) => (
|
||||||
|
<Link to={"/manage/jobs/" + record.job.id}>
|
||||||
|
{record.job.est_number}
|
||||||
|
</Link>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.owner"),
|
||||||
|
dataIndex: "owner",
|
||||||
|
key: "owner",
|
||||||
|
ellipsis: true,
|
||||||
|
sorter: (a, b) => alphaSort(a.job.ownr_ln, b.job.ownr_ln),
|
||||||
|
width: "25%",
|
||||||
|
sortOrder: sortcolumn === "owner" && sortorder,
|
||||||
|
render: (text, record) => {
|
||||||
|
return record.owner ? (
|
||||||
|
<Link to={"/manage/owners/" + record.owner.id}>
|
||||||
|
{`${record.job.ownr_fn || ""} ${record.job.ownr_ln || ""}`}
|
||||||
|
</Link>
|
||||||
|
) : (
|
||||||
|
<span>{`${record.job.ownr_fn || ""} ${
|
||||||
|
record.job.ownr_ln || ""
|
||||||
|
}`}</span>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("csi.fields.completedon"),
|
||||||
|
dataIndex: "completedon",
|
||||||
|
key: "completedon",
|
||||||
|
ellipsis: true,
|
||||||
|
sorter: (a, b) => a.completedon - b.completedon,
|
||||||
|
width: "25%",
|
||||||
|
sortOrder: sortcolumn === "completedon" && sortorder,
|
||||||
|
render: (text, record) => {
|
||||||
|
return record.completedon ? (
|
||||||
|
<DateFormatter>{record.completedon}</DateFormatter>
|
||||||
|
) : null;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const handleTableChange = (pagination, filters, sorter) => {
|
||||||
|
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
||||||
|
search.page = pagination.current;
|
||||||
|
search.sortcolumn = sorter.columnKey;
|
||||||
|
search.sortorder = sorter.order;
|
||||||
|
history.push({ search: queryString.stringify(search) });
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleOnRowClick = (record) => {
|
||||||
|
if (record) {
|
||||||
|
if (record.id) {
|
||||||
|
search.responseid = record.id;
|
||||||
|
history.push({ search: queryString.stringify(search) });
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
delete search.responseid;
|
||||||
|
history.push({ search: queryString.stringify(search) });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Table
|
||||||
|
loading={loading}
|
||||||
|
title={() => {
|
||||||
|
return (
|
||||||
|
<div style={{ display: "flex" }}>
|
||||||
|
<Button onClick={() => refetch()}>
|
||||||
|
<SyncOutlined />
|
||||||
|
</Button>
|
||||||
|
{
|
||||||
|
// <Input.Search
|
||||||
|
// placeholder={t("general.labels.search")}
|
||||||
|
// onSearch={(value) => {
|
||||||
|
// search.search = value;
|
||||||
|
// history.push({ search: queryString.stringify(search) });
|
||||||
|
// }}
|
||||||
|
// enterButton
|
||||||
|
// />
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
size="small"
|
||||||
|
pagination={{
|
||||||
|
position: "top",
|
||||||
|
pageSize: 25,
|
||||||
|
current: parseInt(page || 1),
|
||||||
|
total: total,
|
||||||
|
}}
|
||||||
|
columns={columns}
|
||||||
|
rowKey="id"
|
||||||
|
dataSource={responses}
|
||||||
|
onChange={handleTableChange}
|
||||||
|
rowSelection={{
|
||||||
|
onSelect: (record) => {
|
||||||
|
handleOnRowClick(record);
|
||||||
|
},
|
||||||
|
selectedRowKeys: [responseid],
|
||||||
|
type: "radio",
|
||||||
|
}}
|
||||||
|
onRow={(record, rowIndex) => {
|
||||||
|
return {
|
||||||
|
onClick: (event) => {
|
||||||
|
handleOnRowClick(record);
|
||||||
|
}, // click row
|
||||||
|
};
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -21,7 +21,7 @@ const DateTimePicker = ({ value, onChange, onBlur }) => {
|
|||||||
selected={value ? new Date(value) : null}
|
selected={value ? new Date(value) : null}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
showTimeSelect
|
showTimeSelect
|
||||||
timeIntervals={5}
|
timeIntervals={15}
|
||||||
onBlur={onBlur}
|
onBlur={onBlur}
|
||||||
isClearable
|
isClearable
|
||||||
placeholderText={t("general.labels.selectdate")}
|
placeholderText={t("general.labels.selectdate")}
|
||||||
|
|||||||
@@ -250,6 +250,9 @@ function Header({
|
|||||||
{t("menus.header.shop_vendors")}
|
{t("menus.header.shop_vendors")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
|
<Menu.Item key="shop-csi">
|
||||||
|
<Link to="/manage/shop/csi">{t("menus.header.shop_csi")}</Link>
|
||||||
|
</Menu.Item>
|
||||||
</Menu.SubMenu>
|
</Menu.SubMenu>
|
||||||
|
|
||||||
<Menu.SubMenu
|
<Menu.SubMenu
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export function InvoiceExportAllButton({
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
PartnerResponse = await axios.post(
|
PartnerResponse = await axios.post(
|
||||||
"http://48f9a09ccdec.ngrok.io/qb/",
|
"http://localhost:1337/qb/",
|
||||||
QbXmlResponse.data
|
QbXmlResponse.data
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -32,27 +32,29 @@ export function JobsDetailHeaderActions({
|
|||||||
const client = useApolloClient();
|
const client = useApolloClient();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const statusmenu = (
|
const statusmenu = (
|
||||||
<Menu key='popovermenu'>
|
<Menu key="popovermenu">
|
||||||
<Menu.Item key='cccontract'>
|
<Menu.Item key="cccontract">
|
||||||
<Link
|
<Link
|
||||||
to={{
|
to={{
|
||||||
pathname: "/manage/courtesycars/contracts/new",
|
pathname: "/manage/courtesycars/contracts/new",
|
||||||
state: { jobId: job.id },
|
state: { jobId: job.id },
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
{t("menus.jobsactions.newcccontract")}
|
{t("menus.jobsactions.newcccontract")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
key='addtoproduction'
|
key="addtoproduction"
|
||||||
disabled={!!!job.converted || !!job.inproduction}
|
disabled={!!!job.converted || !!job.inproduction}
|
||||||
onClick={() => AddToProduction(client, job.id, refetch)}>
|
onClick={() => AddToProduction(client, job.id, refetch)}
|
||||||
|
>
|
||||||
{t("jobs.actions.addtoproduction")}
|
{t("jobs.actions.addtoproduction")}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item key='duplicatejob'>
|
<Menu.Item key="duplicatejob">
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
title={t("jobs.labels.duplicateconfirm")}
|
title={t("jobs.labels.duplicateconfirm")}
|
||||||
okText='Yes'
|
okText="Yes"
|
||||||
cancelText='No'
|
cancelText="No"
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
onConfirm={() =>
|
onConfirm={() =>
|
||||||
DuplicateJob(
|
DuplicateJob(
|
||||||
@@ -64,12 +66,13 @@ export function JobsDetailHeaderActions({
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
getPopupContainer={(trigger) => trigger.parentNode}>
|
getPopupContainer={(trigger) => trigger.parentNode}
|
||||||
|
>
|
||||||
{t("menus.jobsactions.duplicate")}
|
{t("menus.jobsactions.duplicate")}
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
key='postinvoices'
|
key="postinvoices"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setInvoiceEnterContext({
|
setInvoiceEnterContext({
|
||||||
actions: { refetch: refetch },
|
actions: { refetch: refetch },
|
||||||
@@ -77,14 +80,16 @@ export function JobsDetailHeaderActions({
|
|||||||
job: job,
|
job: job,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
{t("jobs.actions.postInvoices")}
|
{t("jobs.actions.postInvoices")}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item key='closejob'>
|
<Menu.Item key="closejob">
|
||||||
<Link
|
<Link
|
||||||
to={{
|
to={{
|
||||||
pathname: `/manage/jobs/${job.id}/close`,
|
pathname: `/manage/jobs/${job.id}/close`,
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
{t("menus.jobsactions.closejob")}
|
{t("menus.jobsactions.closejob")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
@@ -92,7 +97,7 @@ export function JobsDetailHeaderActions({
|
|||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<Dropdown overlay={statusmenu} key='changestatus'>
|
<Dropdown overlay={statusmenu} trigger={["click"]} key="changestatus">
|
||||||
<Button>
|
<Button>
|
||||||
{t("general.labels.actions")} <DownCircleFilled />
|
{t("general.labels.actions")} <DownCircleFilled />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { DownCircleFilled } from "@ant-design/icons";
|
import { DownCircleFilled, PrinterFilled } from "@ant-design/icons";
|
||||||
import {
|
import {
|
||||||
Avatar,
|
Avatar,
|
||||||
Badge,
|
Badge,
|
||||||
@@ -31,13 +31,15 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
setScheduleContext: (context) =>
|
setScheduleContext: (context) =>
|
||||||
dispatch(setModalContext({ context: context, modal: "schedule" })),
|
dispatch(setModalContext({ context: context, modal: "schedule" })),
|
||||||
|
setPrintCenterContext: (context) =>
|
||||||
|
dispatch(setModalContext({ context: context, modal: "printCenter" })),
|
||||||
});
|
});
|
||||||
|
|
||||||
export function JobsDetailHeader({
|
export function JobsDetailHeader({
|
||||||
job,
|
job,
|
||||||
mutationConvertJob,
|
mutationConvertJob,
|
||||||
refetch,
|
refetch,
|
||||||
|
setPrintCenterContext,
|
||||||
bodyshop,
|
bodyshop,
|
||||||
updateJobStatus,
|
updateJobStatus,
|
||||||
setScheduleContext,
|
setScheduleContext,
|
||||||
@@ -66,11 +68,26 @@ export function JobsDetailHeader({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const menuExtra = [
|
const menuExtra = [
|
||||||
<Dropdown overlay={statusmenu} key="changestatus">
|
<Dropdown overlay={statusmenu} trigger={["click"]} key="changestatus">
|
||||||
<Button>
|
<Button>
|
||||||
{t("jobs.actions.changestatus")} <DownCircleFilled />
|
{t("jobs.actions.changestatus")} <DownCircleFilled />
|
||||||
</Button>
|
</Button>
|
||||||
</Dropdown>,
|
</Dropdown>,
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
setPrintCenterContext({
|
||||||
|
actions: { refetch: refetch },
|
||||||
|
context: {
|
||||||
|
id: job.id,
|
||||||
|
type: "job",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
key="printing"
|
||||||
|
>
|
||||||
|
<PrinterFilled />
|
||||||
|
{t("jobs.actions.printCenter")}
|
||||||
|
</Button>,
|
||||||
<Badge key="schedule" count={job.appointments_aggregate.aggregate.count}>
|
<Badge key="schedule" count={job.appointments_aggregate.aggregate.count}>
|
||||||
<Button
|
<Button
|
||||||
//TODO Enabled logic based on status.
|
//TODO Enabled logic based on status.
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ export default function JobsList({ refetch, loading, jobs, total }) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("jobs.fields.owner"),
|
title: t("jobs.fields.owner"),
|
||||||
dataIndex: "ownr_ln",
|
dataIndex: "owner",
|
||||||
key: "ownr_ln",
|
key: "owner",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
sorter: (a, b) => alphaSort(a.ownr_ln, b.ownr_ln),
|
sorter: (a, b) => alphaSort(a.ownr_ln, b.ownr_ln),
|
||||||
width: "25%",
|
width: "25%",
|
||||||
@@ -176,7 +176,6 @@ export default function JobsList({ refetch, loading, jobs, total }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
THE RIGHT COMPONENT
|
|
||||||
<Table
|
<Table
|
||||||
loading={loading}
|
loading={loading}
|
||||||
title={() => {
|
title={() => {
|
||||||
@@ -196,7 +195,7 @@ export default function JobsList({ refetch, loading, jobs, total }) {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
size='small'
|
size="small"
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: 25,
|
pageSize: 25,
|
||||||
@@ -204,7 +203,7 @@ export default function JobsList({ refetch, loading, jobs, total }) {
|
|||||||
total: total,
|
total: total,
|
||||||
}}
|
}}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey='id'
|
rowKey="id"
|
||||||
dataSource={jobs}
|
dataSource={jobs}
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ export default function ScheduleDayViewComponent({ data, day }) {
|
|||||||
events={data}
|
events={data}
|
||||||
defaultView="day"
|
defaultView="day"
|
||||||
views={["day"]}
|
views={["day"]}
|
||||||
style={{ height: "40vh" }}
|
|
||||||
date={day}
|
date={day}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -71,7 +71,9 @@ export default function ScheduleJobModalComponent({
|
|||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={10}>
|
<Col span={10}>
|
||||||
<ScheduleDayViewContainer day={appData.start} />
|
<div style={{ height: "70vh" }}>
|
||||||
|
<ScheduleDayViewContainer day={appData.start} />
|
||||||
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -39,3 +39,43 @@ export const INSERT_CSI = gql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const QUERY_CSI_RESPONSE_PAGINATED = gql`
|
||||||
|
query QUERY_CSI_RESPONSE_PAGINATED(
|
||||||
|
$offset: Int
|
||||||
|
$limit: Int
|
||||||
|
$order: [csi_order_by!]!
|
||||||
|
) {
|
||||||
|
csi(offset: $offset, limit: $limit, order_by: $order) {
|
||||||
|
id
|
||||||
|
completedon
|
||||||
|
job {
|
||||||
|
ownr_fn
|
||||||
|
ownr_ln
|
||||||
|
ro_number
|
||||||
|
est_number
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
csi_aggregate {
|
||||||
|
aggregate {
|
||||||
|
count(distinct: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
export const QUERY_CSI_RESPONSE_BY_PK = gql`
|
||||||
|
query QUERY_CSI_RESPONSE_BY_PK($id: uuid!) {
|
||||||
|
csi_by_pk(id: $id) {
|
||||||
|
relateddata
|
||||||
|
valid
|
||||||
|
validuntil
|
||||||
|
id
|
||||||
|
response
|
||||||
|
csiquestion {
|
||||||
|
id
|
||||||
|
config
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|||||||
@@ -99,6 +99,9 @@ const AccountingPayables = lazy(() =>
|
|||||||
);
|
);
|
||||||
const AllJobs = lazy(() => import("../jobs-all/jobs-all.container"));
|
const AllJobs = lazy(() => import("../jobs-all/jobs-all.container"));
|
||||||
const JobsClose = lazy(() => import("../jobs-close/jobs-close.container"));
|
const JobsClose = lazy(() => import("../jobs-close/jobs-close.container"));
|
||||||
|
const ShopCsiPageContainer = lazy(() =>
|
||||||
|
import("../shop-csi/shop-csi.container.page")
|
||||||
|
);
|
||||||
|
|
||||||
const { Header, Content, Footer } = Layout;
|
const { Header, Content, Footer } = Layout;
|
||||||
|
|
||||||
@@ -275,6 +278,11 @@ export function Manage({ match, conflict }) {
|
|||||||
path={`${match.path}/shop/vendors`}
|
path={`${match.path}/shop/vendors`}
|
||||||
component={ShopVendorPageContainer}
|
component={ShopVendorPageContainer}
|
||||||
/>
|
/>
|
||||||
|
<Route
|
||||||
|
exact
|
||||||
|
path={`${match.path}/shop/csi`}
|
||||||
|
component={ShopCsiPageContainer}
|
||||||
|
/>
|
||||||
<Route
|
<Route
|
||||||
exact
|
exact
|
||||||
path={`${match.path}/accounting/receivables`}
|
path={`${match.path}/accounting/receivables`}
|
||||||
|
|||||||
79
client/src/pages/shop-csi/shop-csi.container.page.jsx
Normal file
79
client/src/pages/shop-csi/shop-csi.container.page.jsx
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
import { Row, Col } from "antd";
|
||||||
|
import { useQuery } from "@apollo/react-hooks";
|
||||||
|
import queryString from "query-string";
|
||||||
|
import React, { useEffect } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { useLocation } from "react-router-dom";
|
||||||
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import AlertComponent from "../../components/alert/alert.component";
|
||||||
|
import CsiResponseFormContainer from "../../components/csi-response-form/csi-response-form.container";
|
||||||
|
import CsiResponseListPaginated from "../../components/csi-response-list-paginated/csi-response-list-paginated.component";
|
||||||
|
import { QUERY_CSI_RESPONSE_PAGINATED } from "../../graphql/csi.queries";
|
||||||
|
import { setBreadcrumbs } from "../../redux/application/application.actions";
|
||||||
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
|
||||||
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
bodyshop: selectBodyshop,
|
||||||
|
});
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
||||||
|
});
|
||||||
|
|
||||||
|
export function ShopCsiContainer({ bodyshop, setBreadcrumbs }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
const searchParams = queryString.parse(useLocation().search);
|
||||||
|
const { page, sortcolumn, sortorder } = searchParams;
|
||||||
|
|
||||||
|
const { loading, error, data, refetch } = useQuery(
|
||||||
|
QUERY_CSI_RESPONSE_PAGINATED,
|
||||||
|
{
|
||||||
|
variables: {
|
||||||
|
//search: search || "",
|
||||||
|
offset: page ? (page - 1) * 25 : 0,
|
||||||
|
limit: 25,
|
||||||
|
order: [
|
||||||
|
{
|
||||||
|
[sortcolumn || "completedon"]: sortorder
|
||||||
|
? sortorder === "descend"
|
||||||
|
? "desc_nulls_last"
|
||||||
|
: "asc"
|
||||||
|
: "desc_nulls_last",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
document.title = t("titles.shop-csi");
|
||||||
|
setBreadcrumbs([
|
||||||
|
{
|
||||||
|
link: "/manage/shop",
|
||||||
|
label: t("titles.bc.shop", { shopname: bodyshop.shopname }),
|
||||||
|
},
|
||||||
|
{ link: "/manage/shop/csi", label: t("titles.bc.shop-csi") },
|
||||||
|
]);
|
||||||
|
}, [t, setBreadcrumbs, bodyshop.shopname]);
|
||||||
|
|
||||||
|
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Row>
|
||||||
|
<Col span={10}>
|
||||||
|
<CsiResponseListPaginated
|
||||||
|
refetch={refetch}
|
||||||
|
loading={loading}
|
||||||
|
responses={data ? data.csi : []}
|
||||||
|
total={data ? data.csi_aggregate.aggregate.count : 0}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={13} offset={1}>
|
||||||
|
<CsiResponseFormContainer />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export default connect(mapStateToProps, mapDispatchToProps)(ShopCsiContainer);
|
||||||
@@ -269,7 +269,11 @@
|
|||||||
"notfoundsubtitle": "We were unable to find a survey using the link you provided. Please ensure the URL is correct or reach out to your shop for more help.",
|
"notfoundsubtitle": "We were unable to find a survey using the link you provided. Please ensure the URL is correct or reach out to your shop for more help.",
|
||||||
"notfoundtitle": "No survey found."
|
"notfoundtitle": "No survey found."
|
||||||
},
|
},
|
||||||
|
"fields": {
|
||||||
|
"completedon": "Completed On"
|
||||||
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
|
"noneselected": "No response selected.",
|
||||||
"title": "Customer Satisfaction Survey"
|
"title": "Customer Satisfaction Survey"
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
@@ -429,7 +433,7 @@
|
|||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"creating": "Error adding invoice.",
|
"creating": "Error adding invoice.",
|
||||||
"exporting": "Error exporting invoice {{error}}",
|
"exporting": "Error exporting invoice(s). {{error}}",
|
||||||
"exporting-partner": "Unable to connect to ImEX Partner. Please ensure it is running and logged in.",
|
"exporting-partner": "Unable to connect to ImEX Partner. Please ensure it is running and logged in.",
|
||||||
"invalidro": "Not a valid RO.",
|
"invalidro": "Not a valid RO.",
|
||||||
"invalidvendor": "Not a valid vendor.",
|
"invalidvendor": "Not a valid vendor.",
|
||||||
@@ -759,6 +763,7 @@
|
|||||||
"schedule": "Schedule",
|
"schedule": "Schedule",
|
||||||
"shop": "My Shop",
|
"shop": "My Shop",
|
||||||
"shop_config": "Configuration",
|
"shop_config": "Configuration",
|
||||||
|
"shop_csi": "CSI",
|
||||||
"shop_templates": "Templates",
|
"shop_templates": "Templates",
|
||||||
"shop_vendors": "Vendors",
|
"shop_vendors": "Vendors",
|
||||||
"vehicles": "Vehicles"
|
"vehicles": "Vehicles"
|
||||||
@@ -988,6 +993,7 @@
|
|||||||
"productionlist": "Production - List",
|
"productionlist": "Production - List",
|
||||||
"schedule": "Schedule",
|
"schedule": "Schedule",
|
||||||
"shop": "Manage my Shop ({{shopname}})",
|
"shop": "Manage my Shop ({{shopname}})",
|
||||||
|
"shop-csi": "CSI Responses",
|
||||||
"shop-templates": "Shop Templates",
|
"shop-templates": "Shop Templates",
|
||||||
"vehicle-details": "Vehicle: {{vehicle}}",
|
"vehicle-details": "Vehicle: {{vehicle}}",
|
||||||
"vehicles": "Vehicles"
|
"vehicles": "Vehicles"
|
||||||
@@ -1015,6 +1021,7 @@
|
|||||||
"profile": "My Profile | $t(titles.app)",
|
"profile": "My Profile | $t(titles.app)",
|
||||||
"schedule": "Schedule | $t(titles.app)",
|
"schedule": "Schedule | $t(titles.app)",
|
||||||
"shop": "My Shop | $t(titles.app)",
|
"shop": "My Shop | $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)",
|
||||||
"vehicledetail": "Vehicle Details {{vehicle}} | $t(titles.app)",
|
"vehicledetail": "Vehicle Details {{vehicle}} | $t(titles.app)",
|
||||||
|
|||||||
@@ -269,7 +269,11 @@
|
|||||||
"notfoundsubtitle": "",
|
"notfoundsubtitle": "",
|
||||||
"notfoundtitle": ""
|
"notfoundtitle": ""
|
||||||
},
|
},
|
||||||
|
"fields": {
|
||||||
|
"completedon": ""
|
||||||
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
|
"noneselected": "",
|
||||||
"title": ""
|
"title": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
@@ -759,6 +763,7 @@
|
|||||||
"schedule": "Programar",
|
"schedule": "Programar",
|
||||||
"shop": "Mi tienda",
|
"shop": "Mi tienda",
|
||||||
"shop_config": "Configuración",
|
"shop_config": "Configuración",
|
||||||
|
"shop_csi": "",
|
||||||
"shop_templates": "",
|
"shop_templates": "",
|
||||||
"shop_vendors": "Vendedores",
|
"shop_vendors": "Vendedores",
|
||||||
"vehicles": "Vehículos"
|
"vehicles": "Vehículos"
|
||||||
@@ -988,6 +993,7 @@
|
|||||||
"productionlist": "",
|
"productionlist": "",
|
||||||
"schedule": "",
|
"schedule": "",
|
||||||
"shop": "",
|
"shop": "",
|
||||||
|
"shop-csi": "",
|
||||||
"shop-templates": "",
|
"shop-templates": "",
|
||||||
"vehicle-details": "",
|
"vehicle-details": "",
|
||||||
"vehicles": ""
|
"vehicles": ""
|
||||||
@@ -1015,6 +1021,7 @@
|
|||||||
"profile": "Mi perfil | $t(titles.app)",
|
"profile": "Mi perfil | $t(titles.app)",
|
||||||
"schedule": "Horario | $t(titles.app)",
|
"schedule": "Horario | $t(titles.app)",
|
||||||
"shop": "Mi tienda | $t(titles.app)",
|
"shop": "Mi tienda | $t(titles.app)",
|
||||||
|
"shop-csi": "",
|
||||||
"shop-templates": "",
|
"shop-templates": "",
|
||||||
"shop_vendors": "Vendedores | $t(titles.app)",
|
"shop_vendors": "Vendedores | $t(titles.app)",
|
||||||
"vehicledetail": "Detalles del vehículo {{vehicle}} | $t(titles.app)",
|
"vehicledetail": "Detalles del vehículo {{vehicle}} | $t(titles.app)",
|
||||||
|
|||||||
@@ -269,7 +269,11 @@
|
|||||||
"notfoundsubtitle": "",
|
"notfoundsubtitle": "",
|
||||||
"notfoundtitle": ""
|
"notfoundtitle": ""
|
||||||
},
|
},
|
||||||
|
"fields": {
|
||||||
|
"completedon": ""
|
||||||
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
|
"noneselected": "",
|
||||||
"title": ""
|
"title": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
@@ -759,6 +763,7 @@
|
|||||||
"schedule": "Programme",
|
"schedule": "Programme",
|
||||||
"shop": "Mon magasin",
|
"shop": "Mon magasin",
|
||||||
"shop_config": "Configuration",
|
"shop_config": "Configuration",
|
||||||
|
"shop_csi": "",
|
||||||
"shop_templates": "",
|
"shop_templates": "",
|
||||||
"shop_vendors": "Vendeurs",
|
"shop_vendors": "Vendeurs",
|
||||||
"vehicles": "Véhicules"
|
"vehicles": "Véhicules"
|
||||||
@@ -988,6 +993,7 @@
|
|||||||
"productionlist": "",
|
"productionlist": "",
|
||||||
"schedule": "",
|
"schedule": "",
|
||||||
"shop": "",
|
"shop": "",
|
||||||
|
"shop-csi": "",
|
||||||
"shop-templates": "",
|
"shop-templates": "",
|
||||||
"vehicle-details": "",
|
"vehicle-details": "",
|
||||||
"vehicles": ""
|
"vehicles": ""
|
||||||
@@ -1015,6 +1021,7 @@
|
|||||||
"profile": "Mon profil | $t(titles.app)",
|
"profile": "Mon profil | $t(titles.app)",
|
||||||
"schedule": "Horaire | $t(titles.app)",
|
"schedule": "Horaire | $t(titles.app)",
|
||||||
"shop": "Mon magasin | $t(titles.app)",
|
"shop": "Mon magasin | $t(titles.app)",
|
||||||
|
"shop-csi": "",
|
||||||
"shop-templates": "",
|
"shop-templates": "",
|
||||||
"shop_vendors": "Vendeurs | $t(titles.app)",
|
"shop_vendors": "Vendeurs | $t(titles.app)",
|
||||||
"vehicledetail": "Détails du véhicule {{vehicle} | $t(titles.app)",
|
"vehicledetail": "Détails du véhicule {{vehicle} | $t(titles.app)",
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
- args:
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: csi
|
||||||
|
schema: public
|
||||||
|
type: drop_select_permission
|
||||||
|
- args:
|
||||||
|
permission:
|
||||||
|
allow_aggregations: false
|
||||||
|
columns:
|
||||||
|
- bodyshopid
|
||||||
|
- completedon
|
||||||
|
- created_at
|
||||||
|
- id
|
||||||
|
- jobid
|
||||||
|
- questionset
|
||||||
|
- relateddata
|
||||||
|
- response
|
||||||
|
- updated_at
|
||||||
|
- valid
|
||||||
|
- validuntil
|
||||||
|
computed_fields: []
|
||||||
|
filter:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: csi
|
||||||
|
schema: public
|
||||||
|
type: create_select_permission
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
- args:
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: csi
|
||||||
|
schema: public
|
||||||
|
type: drop_select_permission
|
||||||
|
- args:
|
||||||
|
permission:
|
||||||
|
allow_aggregations: true
|
||||||
|
columns:
|
||||||
|
- bodyshopid
|
||||||
|
- completedon
|
||||||
|
- created_at
|
||||||
|
- id
|
||||||
|
- jobid
|
||||||
|
- questionset
|
||||||
|
- relateddata
|
||||||
|
- response
|
||||||
|
- updated_at
|
||||||
|
- valid
|
||||||
|
- validuntil
|
||||||
|
computed_fields: []
|
||||||
|
filter:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: csi
|
||||||
|
schema: public
|
||||||
|
type: create_select_permission
|
||||||
@@ -957,6 +957,7 @@ tables:
|
|||||||
_eq: X-Hasura-User-Id
|
_eq: X-Hasura-User-Id
|
||||||
- active:
|
- active:
|
||||||
_eq: true
|
_eq: true
|
||||||
|
allow_aggregations: true
|
||||||
update_permissions:
|
update_permissions:
|
||||||
- role: anonymous
|
- role: anonymous
|
||||||
permission:
|
permission:
|
||||||
|
|||||||
Reference in New Issue
Block a user