File tree Expand file tree Collapse file tree
hiveflow-backend/src/schema
hiveflow-frontend/src/views/schedule/modal Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ,
Original file line number Diff line number Diff 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" /> } />
You can’t perform that action at this time.
0 commit comments