File tree Expand file tree Collapse file tree 5 files changed +18
-13
lines changed
Expand file tree Collapse file tree 5 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 347347 "other" : " Other" ,
348348 "gallery" : " Gallery" ,
349349 "batchFieldValues" : " Batch Field Values" ,
350- "fieldValuesHidden" : " Hidden for privacy " ,
350+ "fieldValuesHidden" : " < Hidden> " ,
351351 "cannotViewDetails" : " You do not have permission to view the details of this queue item" ,
352352 "item" : " Item" ,
353353 "session" : " Session" ,
Original file line number Diff line number Diff line change @@ -32,19 +32,20 @@ const sx: ChakraProps['sx'] = {
3232const QueueItemComponent = ( { index, item } : InnerItemProps ) => {
3333 const { t } = useTranslation ( ) ;
3434 const [ isOpen , setIsOpen ] = useState ( false ) ;
35- const handleToggle = useCallback ( ( ) => setIsOpen ( ( s ) => ! s ) , [ setIsOpen ] ) ;
3635 const currentUser = useAppSelector ( selectCurrentUser ) ;
37-
36+
3837 // Check if current user can manage this queue item
3938 const canManageItem = useMemo ( ( ) => {
40- if ( ! currentUser ) return false ;
39+ if ( ! currentUser ) {
40+ return false ;
41+ }
4142 // Admin users can manage all items
42- if ( currentUser . is_admin ) return true ;
43+ if ( currentUser . is_admin ) {
44+ return true ;
45+ }
4346 // Non-admin users can only manage their own items
4447 return item . user_id === currentUser . user_id ;
4548 } , [ currentUser , item . user_id ] ) ;
46-
47- const currentUser = useAppSelector ( selectCurrentUser ) ;
4849
4950 // Check if the current user can view this queue item's details
5051 const canViewDetails = useMemo ( ( ) => {
Original file line number Diff line number Diff line change @@ -11,16 +11,20 @@ export const useCancelCurrentQueueItem = () => {
1111 const { data : currentQueueItem } = useGetCurrentQueueItemQuery ( ) ;
1212 const currentUser = useAppSelector ( selectCurrentUser ) ;
1313 const cancelQueueItem = useCancelQueueItem ( ) ;
14-
14+
1515 // Check if current user can cancel the current item
1616 const canCancelCurrentItem = useMemo ( ( ) => {
17- if ( ! currentUser || ! currentQueueItem ) return false ;
17+ if ( ! currentUser || ! currentQueueItem ) {
18+ return false ;
19+ }
1820 // Admin users can cancel all items
19- if ( currentUser . is_admin ) return true ;
21+ if ( currentUser . is_admin ) {
22+ return true ;
23+ }
2024 // Non-admin users can only cancel their own items
2125 return currentQueueItem . user_id === currentUser . user_id ;
2226 } , [ currentUser , currentQueueItem ] ) ;
23-
27+
2428 const trigger = useCallback (
2529 ( options ?: { withToast ?: boolean } ) => {
2630 if ( currentQueueItemId === null ) {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export const usePauseProcessor = () => {
1515 const [ _trigger , { isLoading } ] = usePauseProcessorMutation ( {
1616 fixedCacheKey : 'pauseProcessor' ,
1717 } ) ;
18-
18+
1919 // Only admin users can pause the processor
2020 const isAdmin = useMemo ( ( ) => currentUser ?. is_admin ?? false , [ currentUser ] ) ;
2121
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export const useResumeProcessor = () => {
1515 const [ _trigger , { isLoading } ] = useResumeProcessorMutation ( {
1616 fixedCacheKey : 'resumeProcessor' ,
1717 } ) ;
18-
18+
1919 // Only admin users can resume the processor
2020 const isAdmin = useMemo ( ( ) => currentUser ?. is_admin ?? false , [ currentUser ] ) ;
2121
You can’t perform that action at this time.
0 commit comments