feat: implement admin inquiry create/edit/delete functionality
TaxBaik CI/CD / build-and-deploy (push) Successful in 48s
TaxBaik CI/CD / build-and-deploy (push) Successful in 48s
Core Components: - Create reusable InquiryForm.razor component following SOLID principles - Implement InquiryCreate.razor for registering new inquiries (offline, phone) - Implement InquiryEdit.razor for modifying existing inquiries with delete - Add DeleteAsync method to InquiryRepository and InquiryService - Update InquiryList with 'Create' button and Edit link in table Architecture: - InquiryForm: Encapsulates form logic, can be reused for create/edit - Service Layer: All operations go through InquiryService for cache invalidation - Repository Pattern: Database operations isolated in InquiryRepository - UI Consistency: Both pages follow admin-page-hero pattern Features: - Admin can create inquiries from phone/offline consultations - Admin can modify inquiry details (name, phone, email, message, status, memo) - Admin can delete inquiries with confirmation dialog - All operations update dashboard cache - Status validation and error handling throughout Testing: - Updated FakeInquiryRepository in tests to implement DeleteAsync
This commit is contained in:
@@ -119,4 +119,10 @@ public class InquiryRepository(IDbConnectionFactory connectionFactory) : BaseRep
|
||||
"UPDATE inquiries SET client_id = @ClientId, updated_at = NOW() WHERE id = @Id",
|
||||
new { Id = inquiryId, ClientId = clientId });
|
||||
}
|
||||
|
||||
public async Task DeleteAsync(int id, CancellationToken cancellationToken = default)
|
||||
{
|
||||
using var conn = Conn();
|
||||
await conn.ExecuteAsync("DELETE FROM inquiries WHERE id = @Id", new { Id = id });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user