{itemsSelected.length > 0 && (
@@ -261,13 +269,15 @@ const VFPanel = ({ moment: Moment, toastify }) => {
{intl.formatMessage(messages.items_selected)}
-
+ {can_delete_feedbacks && (
+
+ )}
)}
@@ -293,27 +303,29 @@ const VFPanel = ({ moment: Moment, toastify }) => {
>
-
- {
- if (o.checked) {
- setItemsSelected(feedbacks?.result?.items);
- } else {
- setItemsSelected([]);
+ {can_delete_feedbacks && (
+
+
-
+ onChange={(e, o) => {
+ if (o.checked) {
+ setItemsSelected(feedbacks?.result?.items);
+ } else {
+ setItemsSelected([]);
+ }
+ }}
+ />
+
+ )}
{
{feedbacks?.loaded &&
feedbacks.result?.items?.map((item) => (
-
- is.url === item.url,
- )}
- onChange={(e, o) => {
- if (o.checked) {
- let s = [...itemsSelected];
- s.push(item);
- setItemsSelected(s);
- } else {
- setItemsSelected(
- itemsSelected.filter(
- (i) => i.url !== item.url,
- ),
- );
- }
- }}
- />
-
+ {can_delete_feedbacks && (
+
+ is.url === item.url,
+ )}
+ onChange={(e, o) => {
+ if (o.checked) {
+ let s = [...itemsSelected];
+ s.push(item);
+ setItemsSelected(s);
+ } else {
+ setItemsSelected(
+ itemsSelected.filter(
+ (i) => i.url !== item.url,
+ ),
+ );
+ }
+ }}
+ />
+
+ )}
{
+const VFPanelMenu = ({ toastify, doSearch, can_delete_feedbacks }) => {
const intl = useIntl();
const dispatch = useDispatch();
const [openConfirm, setOpenConfirm] = useState(false);
@@ -99,21 +99,23 @@ const VFPanelMenu = ({ toastify, doSearch }) => {
-
-
-
-
-
+ {can_delete_feedbacks && (
+
+
+
+
+
+ )}