web: easier to navigate around + a lot of minor ui improvements

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-12-12 14:26:54 +01:00
parent c175707be4
commit 7ca643bf7e
18 changed files with 271 additions and 40 deletions

View File

@@ -1,16 +1,19 @@
import { Button } from '@/components/ui/button';
import { toast } from '@/components/ui/use-toast';
import { pushModal } from '@/modals';
import { useSelector } from '@/redux';
import { useDispatch, useSelector } from '@/redux';
import { api, handleError } from '@/utils/api';
import { SaveIcon } from 'lucide-react';
import { useReportId } from './hooks/useReportId';
import { resetDirty } from './reportSlice';
export function ReportSaveButton() {
const { reportId } = useReportId();
const dispatch = useDispatch();
const update = api.report.update.useMutation({
onSuccess() {
dispatch(resetDirty());
toast({
title: 'Success',
description: 'Report updated.',