Skip to content

Commit 8767661

Browse files
committed
tested all endpoints
1 parent b46a1e6 commit 8767661

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/file-selector/file-selector-input.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@ export function FileSelectorInput({
5454
const [boardIdCamelFromStore] = useSubBlockValue(blockId, 'boardId')
5555
const [boardIdListFromStore] = useSubBlockValue(blockId, 'board_id_list')
5656
const [boardIdUpdateFromStore] = useSubBlockValue(blockId, 'board_id_update')
57+
const [boardIdGetFromStore] = useSubBlockValue(blockId, 'board_id_get')
5758
const [groupIdValueFromStore] = useSubBlockValue(blockId, 'group_id')
5859
const [groupIdCamelFromStore] = useSubBlockValue(blockId, 'groupId')
5960
const [groupIdListFromStore] = useSubBlockValue(blockId, 'group_id_list')
6061
const [columnIdValueFromStore] = useSubBlockValue(blockId, 'column_id')
6162
const [columnIdCamelFromStore] = useSubBlockValue(blockId, 'columnId')
6263
const [itemIdValueFromStore] = useSubBlockValue(blockId, 'item_id')
6364
const [itemIdCamelFromStore] = useSubBlockValue(blockId, 'itemId')
65+
const [itemIdGetFromStore] = useSubBlockValue(blockId, 'item_id_get')
6466

6567
const connectedCredential = previewContextValues?.credential ?? connectedCredentialFromStore
6668
const domainValue = previewContextValues?.domain ?? domainValueFromStore
@@ -76,7 +78,8 @@ export function FileSelectorInput({
7678
boardIdValueFromStore ??
7779
boardIdCamelFromStore ??
7880
boardIdListFromStore ??
79-
boardIdUpdateFromStore
81+
boardIdUpdateFromStore ??
82+
boardIdGetFromStore
8083
const groupIdValue =
8184
previewContextValues?.group_id ??
8285
previewContextValues?.groupId ??
@@ -92,7 +95,8 @@ export function FileSelectorInput({
9295
previewContextValues?.item_id ??
9396
previewContextValues?.itemId ??
9497
itemIdValueFromStore ??
95-
itemIdCamelFromStore
98+
itemIdCamelFromStore ??
99+
itemIdGetFromStore
96100

97101
const normalizedCredentialId =
98102
typeof connectedCredential === 'string'

apps/sim/blocks/blocks/monday.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,27 @@ export const MondayBlock: BlockConfig<MondayResponse> = {
117117
condition: { field: 'operation', value: 'monday_update_item' },
118118
},
119119
// GET ITEM fields
120+
{
121+
id: 'board_id_get',
122+
title: 'Board',
123+
type: 'file-selector',
124+
serviceId: 'monday',
125+
canonicalParamId: 'board_id',
126+
placeholder: 'Select a Monday.com board',
127+
required: true,
128+
condition: { field: 'operation', value: 'monday_get_item' },
129+
dependsOn: ['apiKey'],
130+
},
120131
{
121132
id: 'item_id_get',
122-
title: 'Item ID',
123-
type: 'short-input',
133+
title: 'Item',
134+
type: 'file-selector',
135+
serviceId: 'monday',
124136
canonicalParamId: 'item_id',
125-
placeholder: 'Enter item ID to retrieve',
137+
placeholder: 'Select an item to retrieve',
126138
required: true,
127139
condition: { field: 'operation', value: 'monday_get_item' },
140+
dependsOn: ['apiKey', 'board_id_get'],
128141
},
129142
// LIST ITEMS fields
130143
{

apps/sim/hooks/selectors/resolution.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ function resolveFileSelector(
133133
subBlock.id === 'board_id' ||
134134
subBlock.id === 'boardId' ||
135135
subBlock.id === 'board_id_list' ||
136-
subBlock.id === 'board_id_update'
136+
subBlock.id === 'board_id_update' ||
137+
subBlock.id === 'board_id_get'
137138
) {
138139
return { key: 'monday.boards', context, allowSearch: true }
139140
}
@@ -150,7 +151,7 @@ function resolveFileSelector(
150151
if (subBlock.id === 'status_column' || subBlock.id === 'statusColumn') {
151152
return { key: 'monday.status-options', context, allowSearch: true }
152153
}
153-
if (subBlock.id === 'item_id' || subBlock.id === 'itemId') {
154+
if (subBlock.id === 'item_id' || subBlock.id === 'itemId' || subBlock.id === 'item_id_get') {
154155
return { key: 'monday.items', context, allowSearch: true }
155156
}
156157
if (subBlock.id === 'subitem_id' || subBlock.id === 'subitemId') {

0 commit comments

Comments
 (0)