Improve tasks management with enhanced filtering, sorting, and editing
Fixes data corruption and enhances task management in FinancesPage and TasksPage components with query updates and filtering/sorting. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ff0be73b-afdd-4747-978b-bb8301fb0a82 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/9777c70b-fc38-4831-8d6b-78dfffe041b0/b26ef047-843d-4455-a9b2-1b44a2987682.jpg
This commit is contained in:
@@ -23,14 +23,17 @@ export default function FinancesPage() {
|
||||
category: "",
|
||||
});
|
||||
|
||||
const { data: records = [], isLoading: recordsLoading } = useQuery({
|
||||
const { data: recordsResponse, isLoading: recordsLoading } = useQuery({
|
||||
queryKey: ["/api/financial/records"],
|
||||
});
|
||||
|
||||
const { data: summary = { income: 0, expenses: 0, net: 0 }, isLoading: summaryLoading } = useQuery({
|
||||
const { data: summaryResponse, isLoading: summaryLoading } = useQuery({
|
||||
queryKey: ["/api/financial/summary"],
|
||||
});
|
||||
|
||||
const records = (recordsResponse as any)?.records || [];
|
||||
const summary = (summaryResponse as any)?.summary || { income: 0, expenses: 0, net: 0 };
|
||||
|
||||
const createRecordMutation = useMutation({
|
||||
mutationFn: (record: typeof newRecord) =>
|
||||
apiRequest("/api/financial/records", {
|
||||
|
||||
Reference in New Issue
Block a user