File tree Expand file tree Collapse file tree 5 files changed +523
-3
lines changed
Expand file tree Collapse file tree 5 files changed +523
-3
lines changed Original file line number Diff line number Diff line change @@ -303,10 +303,50 @@ export async function trashObjects({
303303} : {
304304 objectIds : string [ ] ;
305305} ) : Promise < number > {
306-
307306 const response = await axiosClient . post ( 'object/trash' , {
308- ObjectIds : objectIds ,
307+ ObjectIds : objectIds ,
309308 } ) ;
310309
311310 return response . data ;
312- }
311+ } ;
312+
313+ export const fetchTrashedIds = async ( {
314+ pageParam,
315+ } : {
316+ pageParam : string ;
317+ } ) : Promise < IGetObjects > => {
318+ const res = await axiosClient . get ( '/objects/trashed' , {
319+ params : { lastId : pageParam , PageSize : NUMBER_OF_OBJECTS_PER_PAGE } ,
320+ } ) ;
321+ return res . data ;
322+ } ;
323+
324+ export async function trashRestoreObjects ( {
325+ objectIds,
326+ } : {
327+ objectIds : string [ ] ;
328+ } ) : Promise < number > {
329+ const response = await axiosClient . post ( '/object/trash/removeObjects' , {
330+ ObjectIds : objectIds ,
331+ } ) ;
332+
333+ return response . data ;
334+ } ;
335+
336+ export async function trashDeletePermamnentObjects ( {
337+ objectIds,
338+ } : {
339+ objectIds : string [ ] ;
340+ } ) : Promise < number > {
341+ const response = await axiosClient . post ( '/object/trash/deletePermanent' , {
342+ ObjectIds : objectIds ,
343+ } ) ;
344+
345+ return response . data ;
346+ } ;
347+
348+ export async function emptyTrash ( ) : Promise < boolean > {
349+ const response = await axiosClient . delete ( 'emptytrash' ) ;
350+
351+ return response . data ;
352+ } ;
Original file line number Diff line number Diff line change 11import AnalyticsIcon from '@mui/icons-material/Analytics' ;
2+ import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline' ;
23import GroupIcon from '@mui/icons-material/Group' ;
34import LogoutIcon from '@mui/icons-material/Logout' ;
45import ManageAccountsIcon from '@mui/icons-material/ManageAccounts' ;
@@ -51,6 +52,12 @@ const NAVIGATION_ITEMS: Array<{
5152 icon : < SettingsIcon color = "primary" /> ,
5253 adminOnly : true ,
5354 } ,
55+ {
56+ to : '/trash' ,
57+ label : 'Trash' ,
58+ icon : < DeleteOutlineIcon color = "primary" /> ,
59+ adminOnly : true ,
60+ } ,
5461 {
5562 to : null ,
5663 label : 'Logout' ,
You can’t perform that action at this time.
0 commit comments