Skip to content

Commit 43a3d33

Browse files
committed
Adding status options and adjusting doc links
1 parent 8c69d2c commit 43a3d33

File tree

6 files changed

+181
-7
lines changed

6 files changed

+181
-7
lines changed

components/monday/actions/common/common-create-item.mjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import constants from "../../common/constants.mjs";
2+
import { capitalizeWord } from "../../common/utils.mjs";
13
import monday from "../../monday.app.mjs";
24

35
export default {
@@ -20,26 +22,30 @@ export default {
2022
if (!this.columns) {
2123
return props;
2224
}
25+
let options;
2326
for (const column of this.columns) {
2427
let description;
2528
if (column === "status") {
2629
description = "The status of the item. [See more about status values here](https://view.monday.com/1073554546-ad9f20a427a16e67ded630108994c11b?r=use1).";
30+
options = constants.STATUS_OPTIONS;
2731
} else if (column === "person") {
2832
description = "The ID of a person/user.";
2933
} else if (column === "date4") {
3034
description = "A date string in `YYYY-MM-DD` format, e.g. `2022-09-02`.";
3135
} else {
32-
description = `Value for column ${column}. See the [Column Type Reference](https://developer.monday.com/api-reference/docs/column-types-reference) to learn more about entering column type values.`;
36+
description = `Value for column ${column}. See the [Column Type Reference](https://developer.monday.com/api-reference/reference/column-types-reference) to learn more about entering column type values.`;
3337
}
3438
props[column] = {
3539
type: "string",
36-
label: column,
40+
label: capitalizeWord(column),
3741
description,
42+
options,
3843
};
3944
}
4045
return props;
4146
},
4247
methods: {
48+
capitalizeWord,
4349
getEmailValue(value) {
4450
let email = value;
4551
if (typeof value === "string") {

components/monday/actions/get-column-values/get-column-values.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
...common,
55
key: "monday-get-column-values",
66
name: "Get Column Values",
7-
description: "Return values of specific column(s) for a board item. [See the documentation](https://developer.monday.com/api-reference/docs/column-values-v2)",
7+
description: "Return values of specific column(s) for a board item. [See the documentation](https://developer.monday.com/api-reference/reference/column-values-v2)",
88
version: "0.0.6",
99
type: "action",
1010
props: {

components/monday/actions/get-items-by-column-value/get-items-by-column-value.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
...common,
55
key: "monday-get-items-by-column-value",
66
name: "Get Items By Column Value",
7-
description: "Searches a column for items matching a value. [See the documentation](https://developer.monday.com/api-reference/docs/items-page-by-column-values)",
7+
description: "Searches a column for items matching a value. [See the documentation](https://developer.monday.com/api-reference/reference/items-page-by-column-values)",
88
version: "0.0.6",
99
type: "action",
1010
props: {
@@ -22,7 +22,7 @@ export default {
2222
value: {
2323
type: "string",
2424
label: "Value",
25-
description: "The value to search for. [See the documentation](https://developer.monday.com/api-reference/docs/items-by-column-values#supported-limited-support-and-unsupported-columns) for additional information about column values.",
25+
description: "The value to search for. [See the documentation](https://developer.monday.com/api-reference/reference/items-page-by-column-values#supported-and-unsupported-columns) for additional information about column values.",
2626
},
2727
},
2828
async run({ $ }) {

components/monday/actions/update-column-values/update-column-values.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ export default {
77
...common,
88
key: "monday-update-column-values",
99
name: "Update Column Values",
10-
description: "Update multiple column values of an item. [See the documentation](https://developer.monday.com/api-reference/docs/columns#change-multiple-column-values)",
10+
description: "Update multiple column values of an item. [See the documentation](https://developer.monday.com/api-reference/reference/columns#change-multiple-column-values)",
1111
version: "0.0.6",
1212
type: "action",
1313
props: {
1414
...common.props,
1515
updateInfoBox: {
1616
type: "alert",
1717
alertType: "info",
18-
content: "See the [Column types reference](https://developer.monday.com/api-reference/docs/column-types-reference) to find the proper data structures for supported column types.",
18+
content: "See the [Column types reference](https://developer.monday.com/api-reference/reference/column-types-reference) to find the proper data structures for supported column types.",
1919
},
2020
boardId: {
2121
...common.props.boardId,

components/monday/common/constants.mjs

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,172 @@ const BOARD_TYPE = {
141141
SUB_ITEMS_BOARD: "sub_items_board",
142142
};
143143

144+
const STATUS_OPTIONS = [
145+
{
146+
label: "Grey",
147+
value: "5",
148+
},
149+
{
150+
label: "Orange",
151+
value: "0",
152+
},
153+
{
154+
label: "Green Shadow",
155+
value: "1",
156+
},
157+
{
158+
label: "Red Shadow",
159+
value: "2",
160+
},
161+
{
162+
label: "Blue Links",
163+
value: "3",
164+
},
165+
{
166+
label: "Purple",
167+
value: "4",
168+
},
169+
{
170+
label: "Grass Green",
171+
value: "6",
172+
},
173+
{
174+
label: "Bright Blue",
175+
value: "7",
176+
},
177+
{
178+
label: "Mustered",
179+
value: "8",
180+
},
181+
{
182+
label: "Yellow",
183+
value: "9",
184+
},
185+
{
186+
label: "Soft Black",
187+
value: "10",
188+
},
189+
{
190+
label: "Dark Red",
191+
value: "11",
192+
},
193+
{
194+
label: "Dark Pink",
195+
value: "12",
196+
},
197+
{
198+
label: "Light Pink",
199+
value: "13",
200+
},
201+
{
202+
label: "Dark Purple",
203+
value: "14",
204+
},
205+
{
206+
label: "Lime Green",
207+
value: "15",
208+
},
209+
{
210+
label: "Turquoise",
211+
value: "16",
212+
},
213+
{
214+
label: "Trolley Grey",
215+
value: "17",
216+
},
217+
{
218+
label: "Brown",
219+
value: "18",
220+
},
221+
{
222+
label: "Dark Orange",
223+
value: "19",
224+
},
225+
{
226+
label: "Sunset",
227+
value: "101",
228+
},
229+
{
230+
label: "Bubble",
231+
value: "102",
232+
},
233+
{
234+
label: "Peach",
235+
value: "103",
236+
},
237+
{
238+
label: "Berry",
239+
value: "104",
240+
},
241+
{
242+
label: "Winter",
243+
value: "105",
244+
},
245+
{
246+
label: "River",
247+
value: "106",
248+
},
249+
{
250+
label: "Navy",
251+
value: "107",
252+
},
253+
{
254+
label: "Australia",
255+
value: "108",
256+
},
257+
{
258+
label: "Indigo",
259+
value: "109",
260+
},
261+
{
262+
label: "Dark Indigo",
263+
value: "110",
264+
},
265+
{
266+
label: "Pecan",
267+
value: "151",
268+
},
269+
{
270+
label: "Light Magic",
271+
value: "152",
272+
},
273+
{
274+
label: "Sky",
275+
value: "153",
276+
},
277+
{
278+
label: "Cold Blue",
279+
value: "154",
280+
},
281+
{
282+
label: "Kids",
283+
value: "155",
284+
},
285+
{
286+
label: "Purple Gray",
287+
value: "156",
288+
},
289+
{
290+
label: "Corona",
291+
value: "157",
292+
},
293+
{
294+
label: "Sail",
295+
value: "158",
296+
},
297+
{
298+
label: "Old Rose",
299+
value: "159",
300+
},
301+
{
302+
label: "Eden",
303+
value: "160",
304+
},
305+
];
306+
144307
export default {
145308
BOARD_KIND_OPTIONS,
146309
COLUMN_TYPE_OPTIONS,
147310
BOARD_TYPE,
311+
STATUS_OPTIONS,
148312
};

components/monday/common/utils.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ function toNumber(value) {
2323
: strNumber(value);
2424
}
2525

26+
export function capitalizeWord(str) {
27+
return str.slice(0, 1).toUpperCase() + str.slice(1);
28+
}
29+
2630
export default {
2731
emptyStrToUndefined,
2832
strinfied,

0 commit comments

Comments
 (0)