Added creation of email based CSI BOD-108
This commit is contained in:
@@ -3915,6 +3915,48 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>errors</name>
|
<name>errors</name>
|
||||||
<children>
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>creating</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>
|
||||||
|
<name>notconfigured</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>notfoundsubtitle</name>
|
<name>notfoundsubtitle</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -3988,6 +4030,27 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>successes</name>
|
<name>successes</name>
|
||||||
<children>
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>created</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>submitted</name>
|
<name>submitted</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -4976,6 +5039,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>email</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>in</name>
|
<name>in</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -5228,6 +5312,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>text</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>unknown</name>
|
<name>unknown</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -7311,6 +7416,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>sendcsi</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>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
|
|||||||
@@ -10,9 +10,12 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
|
|||||||
import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
|
import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
|
||||||
import DuplicateJob from "./jobs-detail-header-actions.duplicate.util";
|
import DuplicateJob from "./jobs-detail-header-actions.duplicate.util";
|
||||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
|
import JobsDetaiLheaderCsi from "./jobs-detail-header-actions.csi.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
setInvoiceEnterContext: (context) =>
|
setInvoiceEnterContext: (context) =>
|
||||||
@@ -29,29 +32,27 @@ 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(
|
||||||
@@ -63,13 +64,12 @@ 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,23 +77,22 @@ 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>
|
||||||
|
<JobsDetaiLheaderCsi job={job} />
|
||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<Dropdown overlay={statusmenu} key="changestatus">
|
<Dropdown overlay={statusmenu} key='changestatus'>
|
||||||
<Button>
|
<Button>
|
||||||
{t("general.labels.actions")} <DownCircleFilled />
|
{t("general.labels.actions")} <DownCircleFilled />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -0,0 +1,124 @@
|
|||||||
|
import { useMutation, useApolloClient } from "@apollo/react-hooks";
|
||||||
|
import { Menu, notification } from "antd";
|
||||||
|
import React from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import {
|
||||||
|
INSERT_CSI,
|
||||||
|
GET_CURRENT_QUESTIONSET_ID,
|
||||||
|
} from "../../graphql/csi.queries";
|
||||||
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import { setEmailOptions } from "../../redux/email/email.actions";
|
||||||
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
|
|
||||||
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
//currentUser: selectCurrentUser'
|
||||||
|
bodyshop: selectBodyshop,
|
||||||
|
});
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
setEmailOptions: (e) => dispatch(setEmailOptions(e)),
|
||||||
|
});
|
||||||
|
|
||||||
|
export function JobsDetailHeaderCsi({
|
||||||
|
setEmailOptions,
|
||||||
|
bodyshop,
|
||||||
|
job,
|
||||||
|
...props
|
||||||
|
}) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [insertCsi] = useMutation(INSERT_CSI);
|
||||||
|
const client = useApolloClient();
|
||||||
|
|
||||||
|
const handleCreateCsi = async (e) => {
|
||||||
|
console.log("e.target.key", e.key);
|
||||||
|
|
||||||
|
const questionSetResult = await client.query({
|
||||||
|
query: GET_CURRENT_QUESTIONSET_ID,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (questionSetResult.data.csiquestions.length > 0) {
|
||||||
|
const result = await insertCsi({
|
||||||
|
variables: {
|
||||||
|
csiInput: {
|
||||||
|
jobid: job.id,
|
||||||
|
bodyshopid: bodyshop.id,
|
||||||
|
questionset: questionSetResult.data.csiquestions[0].id,
|
||||||
|
relateddata: {
|
||||||
|
job: {
|
||||||
|
id: job.id,
|
||||||
|
ownr_fn: job.ownr_fn,
|
||||||
|
ro_number: job.ro_number,
|
||||||
|
v_model_yr: job.v_model_yr,
|
||||||
|
v_make_desc: job.v_make_desc,
|
||||||
|
v_model_desc: job.v_model_desc,
|
||||||
|
},
|
||||||
|
bodyshop: {
|
||||||
|
city: bodyshop.city,
|
||||||
|
email: bodyshop.email,
|
||||||
|
state: bodyshop.state,
|
||||||
|
country: bodyshop.country,
|
||||||
|
address1: bodyshop.address1,
|
||||||
|
address2: bodyshop.address2,
|
||||||
|
shopname: bodyshop.shopname,
|
||||||
|
zip_post: bodyshop.zip_post,
|
||||||
|
logo_img_path: bodyshop.logo_img_path,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!!!result.errors) {
|
||||||
|
notification["success"]({ message: t("csi.successes.created") });
|
||||||
|
} else {
|
||||||
|
notification["error"]({
|
||||||
|
message: t("csi.errors.creating", {
|
||||||
|
message: JSON.stringify(result.errors),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (e.key === "email")
|
||||||
|
setEmailOptions({
|
||||||
|
messageOptions: {
|
||||||
|
to: job.ownr_ea,
|
||||||
|
replyTo: bodyshop.email,
|
||||||
|
},
|
||||||
|
template: {
|
||||||
|
name: TemplateList.csi_invitation.key,
|
||||||
|
variables: {
|
||||||
|
id: result.data.insert_csi.returning[0].id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (e.key === "text") console.log("TODO Handling texting"); //TODO Implement texting.
|
||||||
|
} else {
|
||||||
|
notification["error"]({
|
||||||
|
message: t("csi.errors.notconfigured"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Menu.SubMenu title={t("jobs.actions.sendcsi")} {...props}>
|
||||||
|
<Menu.Item
|
||||||
|
onClick={handleCreateCsi}
|
||||||
|
key='email'
|
||||||
|
disabled={!!!job.ownr_ea}>
|
||||||
|
{t("general.labels.email")}
|
||||||
|
</Menu.Item>
|
||||||
|
<Menu.Item
|
||||||
|
onClick={handleCreateCsi}
|
||||||
|
key='text'
|
||||||
|
disabled={!!!job.ownr_ph1}>
|
||||||
|
{t("general.labels.text")}
|
||||||
|
</Menu.Item>
|
||||||
|
</Menu.SubMenu>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export default connect(
|
||||||
|
mapStateToProps,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(JobsDetailHeaderCsi);
|
||||||
@@ -21,3 +21,21 @@ export const COMPLETE_SURVEY = gql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const GET_CURRENT_QUESTIONSET_ID = gql`
|
||||||
|
query GET_CURRENT_QUESTIONSET_ID {
|
||||||
|
csiquestions(where: { current: { _eq: true } }) {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const INSERT_CSI = gql`
|
||||||
|
mutation INSERT_CSI($csiInput: [csi_insert_input!]!) {
|
||||||
|
insert_csi(objects: $csiInput) {
|
||||||
|
returning {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|||||||
@@ -256,6 +256,8 @@
|
|||||||
},
|
},
|
||||||
"csi": {
|
"csi": {
|
||||||
"errors": {
|
"errors": {
|
||||||
|
"creating": "Error creating survey {{message}}",
|
||||||
|
"notconfigured": "You do not have any current CSI Question Sets configured.",
|
||||||
"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."
|
||||||
},
|
},
|
||||||
@@ -263,6 +265,7 @@
|
|||||||
"title": "Customer Satisfaction Survey"
|
"title": "Customer Satisfaction Survey"
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
|
"created": "CSI created successfully. ",
|
||||||
"submitted": "Your responses have been submitted successfully.",
|
"submitted": "Your responses have been submitted successfully.",
|
||||||
"submittedsub": "Your input is highly appreciated."
|
"submittedsub": "Your input is highly appreciated."
|
||||||
}
|
}
|
||||||
@@ -340,6 +343,7 @@
|
|||||||
"actions": "Actions",
|
"actions": "Actions",
|
||||||
"areyousure": "Are you sure?",
|
"areyousure": "Are you sure?",
|
||||||
"barcode": "Barcode",
|
"barcode": "Barcode",
|
||||||
|
"email": "Email",
|
||||||
"in": "In",
|
"in": "In",
|
||||||
"instanceconflictext": "Your $t(titles.app) account can only be used on one device at any given time. Refresh your session to take control.",
|
"instanceconflictext": "Your $t(titles.app) account can only be used on one device at any given time. Refresh your session to take control.",
|
||||||
"instanceconflictitle": "Your account is being used elsewhere.",
|
"instanceconflictitle": "Your account is being used elsewhere.",
|
||||||
@@ -352,6 +356,7 @@
|
|||||||
"out": "Out",
|
"out": "Out",
|
||||||
"search": "Search...",
|
"search": "Search...",
|
||||||
"selectdate": "Select date...",
|
"selectdate": "Select date...",
|
||||||
|
"text": "Text",
|
||||||
"unknown": "Unknown",
|
"unknown": "Unknown",
|
||||||
"yes": "Yes"
|
"yes": "Yes"
|
||||||
},
|
},
|
||||||
@@ -496,7 +501,8 @@
|
|||||||
"postInvoices": "Post Invoices",
|
"postInvoices": "Post Invoices",
|
||||||
"printCenter": "Print Center",
|
"printCenter": "Print Center",
|
||||||
"reconcile": "Reconcile",
|
"reconcile": "Reconcile",
|
||||||
"schedule": "Schedule"
|
"schedule": "Schedule",
|
||||||
|
"sendcsi": "Send CSI"
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"addingtoproduction": "Error adding to production. {{error}}",
|
"addingtoproduction": "Error adding to production. {{error}}",
|
||||||
|
|||||||
@@ -256,6 +256,8 @@
|
|||||||
},
|
},
|
||||||
"csi": {
|
"csi": {
|
||||||
"errors": {
|
"errors": {
|
||||||
|
"creating": "",
|
||||||
|
"notconfigured": "",
|
||||||
"notfoundsubtitle": "",
|
"notfoundsubtitle": "",
|
||||||
"notfoundtitle": ""
|
"notfoundtitle": ""
|
||||||
},
|
},
|
||||||
@@ -263,6 +265,7 @@
|
|||||||
"title": ""
|
"title": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
|
"created": "",
|
||||||
"submitted": "",
|
"submitted": "",
|
||||||
"submittedsub": ""
|
"submittedsub": ""
|
||||||
}
|
}
|
||||||
@@ -340,6 +343,7 @@
|
|||||||
"actions": "Comportamiento",
|
"actions": "Comportamiento",
|
||||||
"areyousure": "",
|
"areyousure": "",
|
||||||
"barcode": "código de barras",
|
"barcode": "código de barras",
|
||||||
|
"email": "",
|
||||||
"in": "en",
|
"in": "en",
|
||||||
"instanceconflictext": "",
|
"instanceconflictext": "",
|
||||||
"instanceconflictitle": "",
|
"instanceconflictitle": "",
|
||||||
@@ -352,6 +356,7 @@
|
|||||||
"out": "Afuera",
|
"out": "Afuera",
|
||||||
"search": "Buscar...",
|
"search": "Buscar...",
|
||||||
"selectdate": "",
|
"selectdate": "",
|
||||||
|
"text": "",
|
||||||
"unknown": "Desconocido",
|
"unknown": "Desconocido",
|
||||||
"yes": ""
|
"yes": ""
|
||||||
},
|
},
|
||||||
@@ -496,7 +501,8 @@
|
|||||||
"postInvoices": "Contabilizar facturas",
|
"postInvoices": "Contabilizar facturas",
|
||||||
"printCenter": "Centro de impresión",
|
"printCenter": "Centro de impresión",
|
||||||
"reconcile": "",
|
"reconcile": "",
|
||||||
"schedule": "Programar"
|
"schedule": "Programar",
|
||||||
|
"sendcsi": ""
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"addingtoproduction": "",
|
"addingtoproduction": "",
|
||||||
|
|||||||
@@ -256,6 +256,8 @@
|
|||||||
},
|
},
|
||||||
"csi": {
|
"csi": {
|
||||||
"errors": {
|
"errors": {
|
||||||
|
"creating": "",
|
||||||
|
"notconfigured": "",
|
||||||
"notfoundsubtitle": "",
|
"notfoundsubtitle": "",
|
||||||
"notfoundtitle": ""
|
"notfoundtitle": ""
|
||||||
},
|
},
|
||||||
@@ -263,6 +265,7 @@
|
|||||||
"title": ""
|
"title": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
|
"created": "",
|
||||||
"submitted": "",
|
"submitted": "",
|
||||||
"submittedsub": ""
|
"submittedsub": ""
|
||||||
}
|
}
|
||||||
@@ -340,6 +343,7 @@
|
|||||||
"actions": "actes",
|
"actions": "actes",
|
||||||
"areyousure": "",
|
"areyousure": "",
|
||||||
"barcode": "code à barre",
|
"barcode": "code à barre",
|
||||||
|
"email": "",
|
||||||
"in": "dans",
|
"in": "dans",
|
||||||
"instanceconflictext": "",
|
"instanceconflictext": "",
|
||||||
"instanceconflictitle": "",
|
"instanceconflictitle": "",
|
||||||
@@ -352,6 +356,7 @@
|
|||||||
"out": "En dehors",
|
"out": "En dehors",
|
||||||
"search": "Chercher...",
|
"search": "Chercher...",
|
||||||
"selectdate": "",
|
"selectdate": "",
|
||||||
|
"text": "",
|
||||||
"unknown": "Inconnu",
|
"unknown": "Inconnu",
|
||||||
"yes": ""
|
"yes": ""
|
||||||
},
|
},
|
||||||
@@ -496,7 +501,8 @@
|
|||||||
"postInvoices": "Poster des factures",
|
"postInvoices": "Poster des factures",
|
||||||
"printCenter": "Centre d'impression",
|
"printCenter": "Centre d'impression",
|
||||||
"reconcile": "",
|
"reconcile": "",
|
||||||
"schedule": "Programme"
|
"schedule": "Programme",
|
||||||
|
"sendcsi": ""
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"addingtoproduction": "",
|
"addingtoproduction": "",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
export const EmailSettings = {
|
export const EmailSettings = {
|
||||||
fromNameDefault: "Bodyshop.app",
|
fromNameDefault: "ImEX Online",
|
||||||
fromAddress: "noreply@bodyshop.app",
|
fromAddress: "noreply@imex.online",
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TemplateList = {
|
export const TemplateList = {
|
||||||
@@ -28,4 +28,10 @@ export const TemplateList = {
|
|||||||
drivingId: "Parts order Id",
|
drivingId: "Parts order Id",
|
||||||
key: "parts_return_confirmation",
|
key: "parts_return_confirmation",
|
||||||
},
|
},
|
||||||
|
csi_invitation: {
|
||||||
|
title: "Customer Survey Invitation",
|
||||||
|
description: "Customer Survey Invitation",
|
||||||
|
drivingId: "csi Id",
|
||||||
|
key: "csi_invitation",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
6
client/templates/csi_invitation/csi_invitation.query.gql
Normal file
6
client/templates/csi_invitation/csi_invitation.query.gql
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
query ($id: uuid!){
|
||||||
|
csi_by_pk(id: $id){
|
||||||
|
id
|
||||||
|
relateddata
|
||||||
|
}
|
||||||
|
}
|
||||||
45
client/templates/csi_invitation/csi_invitation.template.html
Normal file
45
client/templates/csi_invitation/csi_invitation.template.html
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<div>Hi {{csi_by_pk.relateddata.job.ownr_fn}}, </div>
|
||||||
|
<div> </div>
|
||||||
|
<div>
|
||||||
|
Thank you for getting your car repaired at
|
||||||
|
{{csi_by_pk.relateddata.bodyshop.shopname}}. We invite you to complete a
|
||||||
|
survey about your experience.
|
||||||
|
</div>
|
||||||
|
<div> </div>
|
||||||
|
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: center; vertical-align: middle;">
|
||||||
|
<table style="height: 47px;" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 47px;">
|
||||||
|
<td
|
||||||
|
style="border-radius: 3px; height: 47px; width: 200px;"
|
||||||
|
align="center"
|
||||||
|
bgcolor="#e9703e"
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
font-family: Helvetica, Arial, sans-serif;
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 12px 18px;
|
||||||
|
border: 1px solid #e9703e;
|
||||||
|
display: inline-block;
|
||||||
|
"
|
||||||
|
href="https://imex.online/csi/{{csi_by_pk.id}}"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>Complete Survey →</a
|
||||||
|
>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div> </div>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
- args:
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: csi
|
||||||
|
schema: public
|
||||||
|
type: drop_insert_permission
|
||||||
|
- args:
|
||||||
|
permission:
|
||||||
|
check:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
columns:
|
||||||
|
- bodyshopid
|
||||||
|
- created_at
|
||||||
|
- id
|
||||||
|
- jobid
|
||||||
|
- relateddata
|
||||||
|
- updated_at
|
||||||
|
- valid
|
||||||
|
- validuntil
|
||||||
|
localPresets:
|
||||||
|
- key: ""
|
||||||
|
value: ""
|
||||||
|
set: {}
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: csi
|
||||||
|
schema: public
|
||||||
|
type: create_insert_permission
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
- args:
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: csi
|
||||||
|
schema: public
|
||||||
|
type: drop_insert_permission
|
||||||
|
- args:
|
||||||
|
permission:
|
||||||
|
check:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
columns:
|
||||||
|
- bodyshopid
|
||||||
|
- created_at
|
||||||
|
- id
|
||||||
|
- jobid
|
||||||
|
- questionset
|
||||||
|
- relateddata
|
||||||
|
- updated_at
|
||||||
|
- valid
|
||||||
|
- validuntil
|
||||||
|
localPresets:
|
||||||
|
- key: ""
|
||||||
|
value: ""
|
||||||
|
set: {}
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: csi
|
||||||
|
schema: public
|
||||||
|
type: create_insert_permission
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
- args:
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: csi
|
||||||
|
schema: public
|
||||||
|
type: drop_update_permission
|
||||||
|
- args:
|
||||||
|
permission:
|
||||||
|
columns:
|
||||||
|
- valid
|
||||||
|
- validuntil
|
||||||
|
- relateddata
|
||||||
|
- created_at
|
||||||
|
- updated_at
|
||||||
|
- bodyshopid
|
||||||
|
- id
|
||||||
|
- jobid
|
||||||
|
filter:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
localPresets:
|
||||||
|
- key: ""
|
||||||
|
value: ""
|
||||||
|
set: {}
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: csi
|
||||||
|
schema: public
|
||||||
|
type: create_update_permission
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
- args:
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: csi
|
||||||
|
schema: public
|
||||||
|
type: drop_update_permission
|
||||||
|
- args:
|
||||||
|
permission:
|
||||||
|
columns:
|
||||||
|
- bodyshopid
|
||||||
|
- completedon
|
||||||
|
- created_at
|
||||||
|
- id
|
||||||
|
- jobid
|
||||||
|
- relateddata
|
||||||
|
- updated_at
|
||||||
|
- valid
|
||||||
|
- validuntil
|
||||||
|
filter:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
localPresets:
|
||||||
|
- key: ""
|
||||||
|
value: ""
|
||||||
|
set: {}
|
||||||
|
role: user
|
||||||
|
table:
|
||||||
|
name: csi
|
||||||
|
schema: public
|
||||||
|
type: create_update_permission
|
||||||
@@ -913,6 +913,7 @@ tables:
|
|||||||
- created_at
|
- created_at
|
||||||
- id
|
- id
|
||||||
- jobid
|
- jobid
|
||||||
|
- questionset
|
||||||
- relateddata
|
- relateddata
|
||||||
- updated_at
|
- updated_at
|
||||||
- valid
|
- valid
|
||||||
@@ -965,14 +966,15 @@ tables:
|
|||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- valid
|
|
||||||
- validuntil
|
|
||||||
- relateddata
|
|
||||||
- created_at
|
|
||||||
- updated_at
|
|
||||||
- bodyshopid
|
- bodyshopid
|
||||||
|
- completedon
|
||||||
|
- created_at
|
||||||
- id
|
- id
|
||||||
- jobid
|
- jobid
|
||||||
|
- relateddata
|
||||||
|
- updated_at
|
||||||
|
- valid
|
||||||
|
- validuntil
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
|
|||||||
Reference in New Issue
Block a user