|
@@ -39,6 +39,7 @@ import { |
|
|
} from "@/app/utils/formatUtil"; |
|
|
} from "@/app/utils/formatUtil"; |
|
|
import isDate from "lodash/isDate"; |
|
|
import isDate from "lodash/isDate"; |
|
|
import BulkAddPaymentModal from "./BulkAddPaymentModal"; |
|
|
import BulkAddPaymentModal from "./BulkAddPaymentModal"; |
|
|
|
|
|
import { deleteDialog } from "../Swal/CustomAlerts"; |
|
|
|
|
|
|
|
|
interface Props { |
|
|
interface Props { |
|
|
taskGroupId: TaskGroup["id"]; |
|
|
taskGroupId: TaskGroup["id"]; |
|
@@ -292,6 +293,11 @@ const MilestoneSection: React.FC<Props> = ({ taskGroupId }) => { |
|
|
setPayments((currentPayments) => [...currentPayments, ...entries]); |
|
|
setPayments((currentPayments) => [...currentPayments, ...entries]); |
|
|
setBulkAddModalOpen(false); |
|
|
setBulkAddModalOpen(false); |
|
|
}, []); |
|
|
}, []); |
|
|
|
|
|
const onBulkDelete = useCallback(() => { |
|
|
|
|
|
deleteDialog(() => { |
|
|
|
|
|
setPayments([]) |
|
|
|
|
|
}, t) |
|
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
const footer = ( |
|
|
const footer = ( |
|
|
<Box display="flex" gap={2} alignItems="center"> |
|
|
<Box display="flex" gap={2} alignItems="center"> |
|
@@ -311,6 +317,15 @@ const MilestoneSection: React.FC<Props> = ({ taskGroupId }) => { |
|
|
> |
|
|
> |
|
|
{t("Bulk Add Payment Milestones")} |
|
|
{t("Bulk Add Payment Milestones")} |
|
|
</Button> |
|
|
</Button> |
|
|
|
|
|
<Button |
|
|
|
|
|
variant="outlined" |
|
|
|
|
|
startIcon={<Delete />} |
|
|
|
|
|
color={"error"} |
|
|
|
|
|
onClick={onBulkDelete} |
|
|
|
|
|
size="small" |
|
|
|
|
|
> |
|
|
|
|
|
{t("Delete Payment Milestones")} |
|
|
|
|
|
</Button> |
|
|
</Box> |
|
|
</Box> |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|