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:
22
server/api/delete-interest.ts
Normal file
22
server/api/delete-interest.ts
Normal 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",
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user