-
Notifications
You must be signed in to change notification settings - Fork 0
/
reportTransport.js
40 lines (40 loc) · 1.05 KB
/
reportTransport.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function readTransport(stmt, cell) {
makeReport(stmt, {
sheetName: "Transport",
query: `
SELECT
\`first_name\` AS "First Name",
\`nickname\` AS "Facebook Name",
\`transport-need-lift\` AS "Needs Lift",
\`transport-will-you-give-lift\` AS "Offering Lift",
\`transport-leaving-location\` AS "Leaving From",
\`transport-depature-time\` AS "Departure Time",
pd.order_id AS "Order ID"
FROM jtl_member_db db
LEFT JOIN jtl_order_product_customer_lookup pd ON pd.user_id = db.id
WHERE product_id=${cell} AND status="wc-processing"
ORDER BY \`transport-need-lift\` ASC
`,
formatting: [
{
type: "color",
column: "Needs Lift",
search: "Yes",
color: colors.lightRed,
},
{
type: "color",
column: "Offering Lift",
search: "Yes",
color: colors.lightGreen,
},
{ type: "text", column: "Needs Lift", search: "No", color: colors.grey },
{
type: "text",
column: "Offering Lift",
search: "No",
color: colors.grey,
},
],
});
}