Add interest deletion and sales pipeline status tracking

- Add delete button with confirmation dialog to InterestDetailsModal
- Implement delete-interest API endpoint
- Add sales pipeline status section with visual indicators
- Update UI states to handle deletion loading states
- Add color-coded sales process level selection
This commit is contained in:
2025-06-04 19:51:51 +02:00
parent 4d3935e863
commit 2ea72ef24e
5 changed files with 280 additions and 81 deletions

View File

@@ -0,0 +1,22 @@
import { deleteInterest } from "~/server/utils/nocodb";
export default defineEventHandler(async (event) => {
const body = await readBody(event);
const { id } = body;
const xTag = getHeader(event, "x-tag");
try {
// Delete the interest from NocoDB
await deleteInterest(id);
return {
success: true,
message: "Interest deleted successfully",
};
} catch (error: any) {
throw createError({
statusCode: 500,
statusMessage: error.message || "Failed to delete interest",
});
}
});