Baseline email wrapper

This commit is contained in:
Patrick Fic
2020-02-19 11:01:05 -08:00
parent 81e3ea622f
commit 0b47fb166e
14 changed files with 286 additions and 213 deletions

View File

@@ -0,0 +1,30 @@
import React from "react";
import { A, Box, Email, Item, Span } from "react-html-email";
export default function PartsOrderEmail({ data }) {
console.log("Data", data);
return (
<Email title='Hello World!'>
<Box>
<Item align='center'>
<Span fontSize={20}>
This is an example email made with:
<A href='https://github.com/chromakode/react-html-email'>
react-html-email
</A>
.
</Span>
</Item>
<Item align='center'>
<Span fontSize={20}>
This is an example email made with:
<A href='https://github.com/chromakode/react-html-email'>
react-html-email
</A>
.
</Span>
</Item>
</Box>
</Email>
);
}

View File

@@ -0,0 +1,45 @@
import { gql } from "apollo-boost";
export const REPORT_QUERY_PARTS_ORDER_BY_PK = gql`
query REPORT_QUERY_PARTS_ORDER_BY_PK($id: uuid!) {
parts_orders_by_pk(id: $id) {
job {
id
vehicle {
id
v_model_desc
v_make_desc
v_model_yr
v_vin
}
ro_number
est_number
}
id
deliver_by
parts_order_lines {
id
db_price
act_price
line_desc
line_remarks
oem_partno
status
}
status
user_email
}
bodyshops(where: { associations: { active: { _eq: true } } }) {
id
address1
address2
city
email
federal_tax_id
state
shopname
zip_post
logo_img_path
}
}
`;