From 4e4588e7d98f2e112191bfec7076ecf858b81889 Mon Sep 17 00:00:00 2001 From: sniedzielski Date: Tue, 13 Feb 2024 15:38:38 +0100 Subject: [PATCH] CM-551: remove delete in payroll page, keep on Searcher only --- src/pages/payroll/PayrollPage.js | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/pages/payroll/PayrollPage.js b/src/pages/payroll/PayrollPage.js index 0b02297..7f90a14 100644 --- a/src/pages/payroll/PayrollPage.js +++ b/src/pages/payroll/PayrollPage.js @@ -3,7 +3,6 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { makeStyles } from '@material-ui/styles'; -import DeleteIcon from '@material-ui/icons/Delete'; import { Form, @@ -18,7 +17,6 @@ import { fetchPayroll, clearPayroll, createPayroll, - deletePayrolls, } from '../../actions'; import { MODULE_NAME, @@ -44,8 +42,6 @@ function PayrollPage({ fetchPayroll, createPayroll, clearPayroll, - deletePayrolls, - coreConfirm, clearConfirm, journalize, }) { @@ -128,26 +124,7 @@ function PayrollPage({ ); }; - const deletePayrollCallback = () => deletePayrolls( - payroll, - formatMessageWithValues('payroll.mutation.deleteLabel', mutationLabel(payroll)), - ); - - const openDeletePayrollConfirmDialog = () => { - setConfirmedAction(() => deletePayrollCallback); - coreConfirm( - formatMessageWithValues('payroll.delete.confirm.title', pageTitle(payroll)), - formatMessage('payroll.delete.confirm.message'), - ); - }; - - const actions = [ - !!payroll && readOnly && !isInTask && { - doIt: openDeletePayrollConfirmDialog, - icon: , - tooltip: formatMessage('tooltip.delete'), - }, - ]; + const actions = []; return ( rights.includes(RIGHT_PAYROLL_CREATE) && (