diff --git a/src/Routes.jsx b/src/Routes.jsx index 2705f4105..22231b4bf 100644 --- a/src/Routes.jsx +++ b/src/Routes.jsx @@ -94,6 +94,9 @@ const DeleteGroup = React.lazy(() => import("pages/Admin/Group/Delete")); const DeleteUser = React.lazy(() => import("pages/Admin/Users/Delete")); const AddUser = React.lazy(() => import("pages/Admin/Users/Add")); const EditUser = React.lazy(() => import("pages/Admin/Users/Edit")); +const UploadPermissions = React.lazy(() => + import("pages/Admin/uploadPermissions") +); const AddLicense = React.lazy(() => import("pages/Admin/License/Create")); const SelectLicense = React.lazy(() => import("pages/Admin/License/SelectLicense") @@ -302,6 +305,11 @@ const Routes = () => { path={routes.admin.license.selectLicense} component={SelectLicense} /> + { }); }; +// Getting all groups with permissions based on upload ID +export const getGroupsWithPermissionsApi = (uploadId) => { + const url = endpoints.upload.getGroupsWithPermissions(uploadId); + return sendRequest({ + url, + method: "GET", + headers: { + Authorization: getToken(), + }, + }); +}; + +// change permissions for a upload for different groups +export const changeUploadPermissionsApi = (payload) => { + const url = endpoints.upload.uploadPermissions(payload.uploadId); + return sendRequest({ + url, + method: "PUT", + body: payload, + headers: { + Authorization: getToken(), + }, + }); +}; + // Getting a Upload License export const getUploadLicenseApi = (uploadId, agent) => { const url = endpoints.upload.getLicense(uploadId); diff --git a/src/assets/images/loader.svg b/src/assets/images/loader.svg new file mode 100644 index 000000000..7c0fcc2ea --- /dev/null +++ b/src/assets/images/loader.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/components/Header/index.jsx b/src/components/Header/index.jsx index bc6b0f47c..b34c2cf2d 100644 --- a/src/components/Header/index.jsx +++ b/src/components/Header/index.jsx @@ -264,6 +264,12 @@ const Header = () => { + + Upload Permissions + {children && ( - + <> + +   + )} -