-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreportGear.js
124 lines (124 loc) · 2.91 KB
/
reportGear.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
function readGear(stmt, cell) {
makeReport(stmt, {
sheetName: "Gear",
query: `
SELECT DISTINCT
\`first_name\` AS "First Name",
\`nickname\` AS "Facebook Name",
\`skills-horizontal\` AS "Horizontal Skills",
\`skills-leading-horizontal\` AS "Horizontal Leading Skills",
\`caving-horizontal-happy-to-second-or-lead\` AS "Lead/Second in Horizontal",
\`skills-srt\` AS "SRT Skills",
\`skills-leading-srt\` AS "SRT Leading Skills",
\`caving-srt-happy-to-second-or-lead\` AS "Lead in Vertical",
\`gear-bringing-evening-or-day-trip\` AS "Kit Bringing",
\`gear-rope-length\` AS "Rope Length",
\`skills-leading-coaching\` AS "Coaching Skills",
\`caving-srt-or-horizontal-preference\` AS "Horizontal/Vertical Preference",
\`gear-walking-equipment-weekend\` AS "Walking Gear",
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 \`first_name\` ASC
`,
formatting: [
{
type: "columnWidth",
column: "Wellie Size",
width: 100,
},
{
type: "color",
column: "Horizontal Skills",
search: "Yes",
color: colors.lightGreen,
},
{
type: "color",
column: "Horizontal Leading Skills",
search: "Yes",
color: colors.lightGreen,
},
{
type: "color",
column: "Lead/Second in Horizontal",
search: "Yes",
color: colors.lightGreen,
},
{
type: "color",
column: "SRT Skills",
search: "Yes",
color: colors.lightGreen,
},
{
type: "text",
column: "Lead in Vertical",
search: "No",
color: colors.grey,
},
{
type: "text",
column: "Kit Bringing",
search: "No",
color: colors.grey,
},
{ type: "text", column: "Rope Length", search: "No", color: colors.grey },
{
type: "text",
column: "Coaching Skills",
search: "No",
color: colors.grey,
},
{
type: "text",
column: "Horizontal/Vertical Preference",
search: "No",
color: colors.grey,
},
{
type: "text",
column: "Walking Gear",
search: "No",
color: colors.grey,
},
{
type: "color",
column: "SRT Skills",
search: "No-SRT",
color: colors.lightRed,
},
{
type: "color",
column: "SRT Skills",
search: "Pre-SRT Basic",
color: colors.lightYellow,
},
{
type: "color",
column: "SRT Skills",
search: "Pre-SRT Intermediate",
color: colors.yellow,
},
{
type: "color",
column: "SRT Skills",
search: "SRT Intermediate",
color: colors.lightGreen,
},
{
type: "color",
column: "Kit Bringing",
search: "Nothing",
color: colors.lightRed,
},
{
type: "text",
column: "Kit Bringing",
search: "Nothing - I'm totally new to this",
color: colors.lightRed,
},
],
});
}