Fix assignment deletion and team removal

This update changes assignment deletion labels to prefer WO/IM names, adds a configurable payload to ConfirmDelete for non-DELETE API calls, and switches team member removal to a PUT endpoint with status REMOVED. It also shortens project autofill toast duration, cleans out stale commented code on the client detail page, and updates the task error badge wording to better reflect app-level failures.
This commit is contained in:
Ichsan Kurniawan
2026-10-13 16:56:20 +07:00
parent 90a34330eb
commit fccb901e2a
6 changed files with 17 additions and 60 deletions
+3 -2
View File
@@ -14,16 +14,17 @@ interface Props {
title?: string
description?: string,
method?: any
payload?: any
}
export function ConfirmDelete({ endpoint, title, description, onSuccess, onCancel, method }: Props) {
export function ConfirmDelete({ endpoint, title, description, onSuccess, onCancel, method, payload }: Props) {
const [isLoading, setIsLoading] = useState(false);
const handleDelete = async () => {
setIsLoading(true)
const toastId = toast.loading('Deleting data...');
try {
const res = await serverApiCall(method || 'DELETE', endpoint!)
const res = await serverApiCall(method || 'DELETE', endpoint!, payload)
if (res.success) {
toast.success("Data deleted successfully ☺️", { id: toastId });