From f4b95e5b04673272a7593eb3aef8eac3fce4745c Mon Sep 17 00:00:00 2001 From: muhammadqamar Date: Tue, 17 Oct 2023 15:25:20 +0500 Subject: [PATCH] fix permission for dropdown export --- src/utils/DropDownEdit/dropdownedit.js | 118 +++++++++++++------------ 1 file changed, 62 insertions(+), 56 deletions(-) diff --git a/src/utils/DropDownEdit/dropdownedit.js b/src/utils/DropDownEdit/dropdownedit.js index b8b819dfb..dfef9667c 100644 --- a/src/utils/DropDownEdit/dropdownedit.js +++ b/src/utils/DropDownEdit/dropdownedit.js @@ -361,66 +361,72 @@ const DropDownEdit = ({ )} -
  • - - - Export - -
    - -
    + {permission?.Activity?.includes( + "activity:view-export-xapi-option", + ) || + permission?.["Independent Activity"]?.includes( + "independent-activity:view-export-h5p-option", + ) ? ( +
  • + + + Export + +
    + +
    - -
  • - + const result = indActivityService.exportIndAvtivity( + activeOrganization.id, + data.id, + ); + result.then((data) => { + // console.log(data) + Swal.fire({ + icon: "success", + html: data?.message, + }); + }); + }} + > + H5P Format + + )} + + + ) : null} {/* */} {/* {}}>