Skip to content

Commit 4b85511

Browse files
committed
Update query params
1 parent a221c09 commit 4b85511

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

  • packages/app

packages/app/hiveflow-backend/src/schema/schedule.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export default (prisma: PrismaClient) => {
261261
}
262262
},
263263
Query: {
264-
calendarItems: async (root: any, args: any) => {
264+
calendarItems: async (root: any, args: any, context: any) => {
265265
let query : any = {};
266266

267267
if(args.where?.end_GTE) query['end'] = {...query['end'], gt: args.where.end_GTE};
@@ -270,7 +270,8 @@ export default (prisma: PrismaClient) => {
270270

271271
return await prisma.calendarItem.findMany({
272272
where: {
273-
...query
273+
...query,
274+
organisation: context?.jwt?.organisation
274275
},
275276
include: {
276277
permissions: true,

packages/app/hiveflow-frontend/src/views/schedule/modal/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export const SchedulingModal = (props: any) => {
177177
<Autocomplete
178178
options={rowOptions || []}
179179
value={rowOptions?.find((a) => a.id == schedule.groupBy?.id) || null}
180-
onChange={(e, newValue) => setSchedule({ ...schedule, groupBy: newValue })}
180+
onChange={(e, newValue) => setSchedule({ ...schedule, groupBy: {id: newValue?.id} })}
181181
groupBy={(option) => option.project ? 'Project' : 'Estimate'}
182182
getOptionLabel={(option: any) => typeof (option) == 'string' ? option : option.name}
183183
renderInput={(params) => <TextField {...params} label="Row" size="small" />} />

0 commit comments

Comments
 (0)