Begin work on speed print menu. BOD-229
This commit is contained in:
@@ -17053,6 +17053,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>type</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>
|
||||
@@ -17142,27 +17163,6 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>type</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>
|
||||
@@ -22013,7 +22013,7 @@
|
||||
</editor_configuration>
|
||||
<primary_language>en-US</primary_language>
|
||||
<configuration>
|
||||
<definitions>client/src</definitions>
|
||||
<definitions>.</definitions>
|
||||
<indent>tab</indent>
|
||||
<format>namespaced-json</format>
|
||||
<support_arrays>true</support_arrays>
|
||||
|
||||
@@ -66,7 +66,7 @@ export function PaymentFormComponent({
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t("payments.labels.type")}
|
||||
label={t("payments.fields.type")}
|
||||
name="type"
|
||||
rules={[
|
||||
{
|
||||
|
||||
@@ -7,9 +7,10 @@ import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
||||
import { selectPrintCenter } from "../../redux/modals/modals.selectors";
|
||||
import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser,
|
||||
selectCurrentUser
|
||||
} from "../../redux/user/user.selectors";
|
||||
import PrintCenterItem from "../print-center-item/print-center-item.component";
|
||||
import PrintCenterSpeedPrint from "../print-center-speed-print/print-center-speed-print.component";
|
||||
import JobsReports from "./print-center-jobs.list";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
@@ -17,17 +18,19 @@ const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
printCenterModal: selectPrintCenter,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setEmailOptions: (e) => dispatch(setEmailOptions(e)),
|
||||
toggleModalVisible: () => dispatch(toggleModalVisible("printCenter")),
|
||||
});
|
||||
export function PrintCenterJobsComponent({ printCenterModal }) {
|
||||
const { id: jobId } = printCenterModal.context;
|
||||
|
||||
export function PrintCenterJobsComponent({ bodyshop, printCenterModal }) {
|
||||
const { id: jobId } = printCenterModal.context;
|
||||
const JobsReportsList = JobsReports(null);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PrintCenterSpeedPrint job={jobId} />
|
||||
<Collapse accordion>
|
||||
{JobsReportsList.map((section) => (
|
||||
<Collapse.Panel key={section.key} header={section.title}>
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import React from "react";
|
||||
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import RenderTemplate, {
|
||||
displayTemplateInWindow,
|
||||
} from "../../utils/RenderTemplate";
|
||||
import { Button } from "antd";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop, //currentUser: selectCurrentUser
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
|
||||
export function PrintCenterSpeedPrint({ bodyshop, job }) {
|
||||
const { speedprint } = bodyshop;
|
||||
|
||||
const renderTemplate = async (templateKey) => {
|
||||
logImEXEvent("speed_print_template_render");
|
||||
|
||||
const html = await RenderTemplate(
|
||||
{
|
||||
name: templateKey,
|
||||
variables: { id: job.id },
|
||||
},
|
||||
bodyshop
|
||||
);
|
||||
displayTemplateInWindow(html);
|
||||
};
|
||||
|
||||
const renderAllTemplates = (templateKeys) => {
|
||||
logImEXEvent("speed_print_render_all_templates");
|
||||
|
||||
templateKeys.forEach((templateKey) => renderTemplate(templateKey));
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
{speedprint.map((sp) => (
|
||||
<div>
|
||||
{JSON.stringify(sp)}
|
||||
<Button onClick={() => renderAllTemplates(sp.templates)}>
|
||||
Print All
|
||||
</Button>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(PrintCenterSpeedPrint);
|
||||
@@ -47,6 +47,7 @@ export const QUERY_BODYSHOP = gql`
|
||||
md_referral_sources
|
||||
md_messaging_presets
|
||||
intakechecklist
|
||||
speedprint
|
||||
employees {
|
||||
id
|
||||
first_name
|
||||
@@ -102,6 +103,7 @@ export const UPDATE_SHOP = gql`
|
||||
md_referral_sources
|
||||
md_messaging_presets
|
||||
intakechecklist
|
||||
speedprint
|
||||
employees {
|
||||
id
|
||||
first_name
|
||||
|
||||
@@ -1048,14 +1048,14 @@
|
||||
"memo": "Memo",
|
||||
"payer": "Payer",
|
||||
"stripeid": "Stripe ID",
|
||||
"transactionid": "Transaction ID"
|
||||
"transactionid": "Transaction ID",
|
||||
"type": "Type"
|
||||
},
|
||||
"labels": {
|
||||
"electronicpayment": "Use Electronic Payment Processing?",
|
||||
"new": "New Payment",
|
||||
"signup": "Please contact support to sign up for electronic payments.",
|
||||
"title": "Payments",
|
||||
"type": "Type"
|
||||
"title": "Payments"
|
||||
},
|
||||
"successes": {
|
||||
"payment": "Payment created successfully. ",
|
||||
|
||||
@@ -1048,14 +1048,14 @@
|
||||
"memo": "",
|
||||
"payer": "",
|
||||
"stripeid": "",
|
||||
"transactionid": ""
|
||||
"transactionid": "",
|
||||
"type": ""
|
||||
},
|
||||
"labels": {
|
||||
"electronicpayment": "",
|
||||
"new": "",
|
||||
"signup": "",
|
||||
"title": "",
|
||||
"type": ""
|
||||
"title": ""
|
||||
},
|
||||
"successes": {
|
||||
"payment": "",
|
||||
|
||||
@@ -1048,14 +1048,14 @@
|
||||
"memo": "",
|
||||
"payer": "",
|
||||
"stripeid": "",
|
||||
"transactionid": ""
|
||||
"transactionid": "",
|
||||
"type": ""
|
||||
},
|
||||
"labels": {
|
||||
"electronicpayment": "",
|
||||
"new": "",
|
||||
"signup": "",
|
||||
"title": "",
|
||||
"type": ""
|
||||
"title": ""
|
||||
},
|
||||
"successes": {
|
||||
"payment": "",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "speedprint";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "speedprint" jsonb NULL DEFAULT
|
||||
jsonb_build_array();
|
||||
type: run_sql
|
||||
@@ -0,0 +1,57 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- accountingconfig
|
||||
- address1
|
||||
- address2
|
||||
- appt_length
|
||||
- city
|
||||
- country
|
||||
- created_at
|
||||
- email
|
||||
- federal_tax_id
|
||||
- id
|
||||
- inhousevendorid
|
||||
- insurance_vendor_id
|
||||
- intakechecklist
|
||||
- invoice_tax_rates
|
||||
- logo_img_path
|
||||
- md_messaging_presets
|
||||
- md_order_statuses
|
||||
- md_referral_sources
|
||||
- md_responsibility_centers
|
||||
- md_ro_statuses
|
||||
- messagingservicesid
|
||||
- production_config
|
||||
- region_config
|
||||
- scoreboard_target
|
||||
- shopname
|
||||
- shoprates
|
||||
- ssbuckets
|
||||
- state
|
||||
- state_tax_id
|
||||
- stripe_acct_id
|
||||
- template_header
|
||||
- textid
|
||||
- updated_at
|
||||
- zip_post
|
||||
computed_fields: []
|
||||
filter:
|
||||
associations:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,58 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- accountingconfig
|
||||
- address1
|
||||
- address2
|
||||
- appt_length
|
||||
- city
|
||||
- country
|
||||
- created_at
|
||||
- email
|
||||
- federal_tax_id
|
||||
- id
|
||||
- inhousevendorid
|
||||
- insurance_vendor_id
|
||||
- intakechecklist
|
||||
- invoice_tax_rates
|
||||
- logo_img_path
|
||||
- md_messaging_presets
|
||||
- md_order_statuses
|
||||
- md_referral_sources
|
||||
- md_responsibility_centers
|
||||
- md_ro_statuses
|
||||
- messagingservicesid
|
||||
- production_config
|
||||
- region_config
|
||||
- scoreboard_target
|
||||
- shopname
|
||||
- shoprates
|
||||
- speedprint
|
||||
- ssbuckets
|
||||
- state
|
||||
- state_tax_id
|
||||
- stripe_acct_id
|
||||
- template_header
|
||||
- textid
|
||||
- updated_at
|
||||
- zip_post
|
||||
computed_fields: []
|
||||
filter:
|
||||
associations:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,51 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- accountingconfig
|
||||
- address1
|
||||
- address2
|
||||
- appt_length
|
||||
- city
|
||||
- country
|
||||
- created_at
|
||||
- email
|
||||
- federal_tax_id
|
||||
- id
|
||||
- inhousevendorid
|
||||
- insurance_vendor_id
|
||||
- intakechecklist
|
||||
- invoice_tax_rates
|
||||
- logo_img_path
|
||||
- md_messaging_presets
|
||||
- md_order_statuses
|
||||
- md_referral_sources
|
||||
- md_responsibility_centers
|
||||
- md_ro_statuses
|
||||
- production_config
|
||||
- scoreboard_target
|
||||
- shopname
|
||||
- shoprates
|
||||
- ssbuckets
|
||||
- state
|
||||
- state_tax_id
|
||||
- updated_at
|
||||
- zip_post
|
||||
filter:
|
||||
associations:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,52 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- accountingconfig
|
||||
- address1
|
||||
- address2
|
||||
- appt_length
|
||||
- city
|
||||
- country
|
||||
- created_at
|
||||
- email
|
||||
- federal_tax_id
|
||||
- id
|
||||
- inhousevendorid
|
||||
- insurance_vendor_id
|
||||
- intakechecklist
|
||||
- invoice_tax_rates
|
||||
- logo_img_path
|
||||
- md_messaging_presets
|
||||
- md_order_statuses
|
||||
- md_referral_sources
|
||||
- md_responsibility_centers
|
||||
- md_ro_statuses
|
||||
- production_config
|
||||
- scoreboard_target
|
||||
- shopname
|
||||
- shoprates
|
||||
- speedprint
|
||||
- ssbuckets
|
||||
- state
|
||||
- state_tax_id
|
||||
- updated_at
|
||||
- zip_post
|
||||
filter:
|
||||
associations:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -484,6 +484,7 @@ tables:
|
||||
- scoreboard_target
|
||||
- shopname
|
||||
- shoprates
|
||||
- speedprint
|
||||
- ssbuckets
|
||||
- state
|
||||
- state_tax_id
|
||||
@@ -527,6 +528,7 @@ tables:
|
||||
- scoreboard_target
|
||||
- shopname
|
||||
- shoprates
|
||||
- speedprint
|
||||
- ssbuckets
|
||||
- state
|
||||
- state_tax_id
|
||||
|
||||
Reference in New Issue
Block a user