Add lock files for package management and update architecture documentation
- Introduced bun.lock and package-lock.json to manage dependencies for the project. - Enhanced backend API architecture documentation with additional security and documentation guidelines. - Made minor formatting adjustments across various files for consistency and clarity.
This commit is contained in:
@@ -4,7 +4,7 @@ import {Select, SelectContent, SelectItem, SelectTrigger, SelectValue} from '@/c
|
||||
import {Button} from '@/components/ui/button';
|
||||
import {Input} from '@/components/ui/input';
|
||||
import {Label} from '@/components/ui/label';
|
||||
import {useAppDispatch, updateLiability, removeLiability, type Liability} from '@/store';
|
||||
import {useAppDispatch, updateLiability, deleteLiability, type Liability} from '@/store';
|
||||
import {validatePositiveNumber, validateRequired} from '@/lib/validation';
|
||||
|
||||
interface Props {
|
||||
@@ -60,10 +60,11 @@ export default function EditLiabilityDialog({open, onOpenChange, liability}: Pro
|
||||
dispatch(
|
||||
updateLiability({
|
||||
id: liability.id,
|
||||
name: form.name.trim(),
|
||||
type: form.type as (typeof liabilityTypes)[number],
|
||||
balance: balanceNum,
|
||||
updatedAt: new Date().toISOString()
|
||||
data: {
|
||||
name: form.name.trim(),
|
||||
type: form.type.toUpperCase() as 'CREDIT_CARD' | 'LOAN' | 'MORTGAGE' | 'OTHER',
|
||||
currentBalance: balanceNum,
|
||||
}
|
||||
})
|
||||
);
|
||||
onOpenChange(false);
|
||||
@@ -72,7 +73,7 @@ export default function EditLiabilityDialog({open, onOpenChange, liability}: Pro
|
||||
const handleDelete = () => {
|
||||
if (!liability) return;
|
||||
if (confirm(`Are you sure you want to delete "${liability.name}"?`)) {
|
||||
dispatch(removeLiability(liability.id));
|
||||
dispatch(deleteLiability(liability.id));
|
||||
onOpenChange(false);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user