feat(prospecting): add delete button to prospects list
- Trash icon button in Actions column with confirmation dialog
- Calls DELETE /admin/prospecting/prospects/{id} (existing endpoint)
- Reloads list after successful deletion
- Toast notification on success/failure
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -152,6 +152,18 @@ function prospectsList() {
|
||||
if (this.pagination.page > 1) { this.pagination.page--; this.loadProspects(); }
|
||||
},
|
||||
|
||||
async deleteProspect(prospect) {
|
||||
var name = prospect.business_name || prospect.domain_name || 'this prospect';
|
||||
if (!confirm('Delete "' + name + '"? This cannot be undone.')) return;
|
||||
try {
|
||||
await apiClient.delete('/admin/prospecting/prospects/' + prospect.id);
|
||||
Utils.showToast('Prospect deleted', 'success');
|
||||
await this.loadProspects();
|
||||
} catch (err) {
|
||||
Utils.showToast('Failed: ' + err.message, 'error');
|
||||
}
|
||||
},
|
||||
|
||||
statusBadgeClass(status) {
|
||||
const classes = {
|
||||
pending: 'text-yellow-700 bg-yellow-100 dark:text-yellow-100 dark:bg-yellow-700',
|
||||
|
||||
Reference in New Issue
Block a user