Revert to three expense categories
Reverted the number of expense categories back to the original three. Future feature additions or changes will require confirmation.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Coffee, Home, Car } from 'lucide-react';
|
||||
import { categoryIcons } from '@/constants/categoryIcons';
|
||||
|
||||
interface BudgetCardProps {
|
||||
title: string;
|
||||
@@ -10,13 +10,6 @@ interface BudgetCardProps {
|
||||
color?: string;
|
||||
}
|
||||
|
||||
// Category icons mapping
|
||||
const categoryIcons: Record<string, React.ReactNode> = {
|
||||
식비: <Coffee size={18} />,
|
||||
생활비: <Home size={18} />,
|
||||
교통비: <Car size={18} />,
|
||||
};
|
||||
|
||||
const BudgetCard: React.FC<BudgetCardProps> = ({
|
||||
title,
|
||||
current,
|
||||
|
||||
@@ -6,11 +6,11 @@ import { UseFormReturn } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
import { categoryIcons, EXPENSE_CATEGORIES } from '@/constants/categoryIcons';
|
||||
|
||||
// Form schema for validation
|
||||
// Form schema for validation - 카테고리를 3개로 축소
|
||||
export const transactionFormSchema = z.object({
|
||||
title: z.string().min(1, '제목을 입력해주세요'),
|
||||
amount: z.string().min(1, '금액을 입력해주세요'),
|
||||
category: z.enum(['식비', '생활비', '교통비', '쇼핑', '교육', '의료', '여행', '기타']),
|
||||
category: z.enum(['식비', '생활비', '교통비']),
|
||||
});
|
||||
|
||||
export type TransactionFormValues = z.infer<typeof transactionFormSchema>;
|
||||
|
||||
@@ -1,34 +1,24 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Coffee, Home, Car, ShoppingBag, Book, Utensils, Plane, HeartPulse, Banknote } from 'lucide-react';
|
||||
import { Coffee, Home, Car, Banknote } from 'lucide-react';
|
||||
|
||||
// 카테고리와 아이콘 매핑 정의
|
||||
export const categoryIcons: Record<string, React.ReactNode> = {
|
||||
식비: <Utensils size={18} />,
|
||||
식비: <Coffee size={18} />,
|
||||
생활비: <Home size={18} />,
|
||||
교통비: <Car size={18} />,
|
||||
쇼핑: <ShoppingBag size={18} />,
|
||||
교육: <Book size={18} />,
|
||||
의료: <HeartPulse size={18} />,
|
||||
여행: <Plane size={18} />,
|
||||
기타: <Coffee size={18} />,
|
||||
수입: <Banknote size={18} />,
|
||||
};
|
||||
|
||||
// 지출 카테고리 목록
|
||||
export const EXPENSE_CATEGORIES = ['식비', '생활비', '교통비', '쇼핑', '교육', '의료', '여행', '기타'];
|
||||
// 지출 카테고리 목록 - 다시 3개로 축소
|
||||
export const EXPENSE_CATEGORIES = ['식비', '생활비', '교통비'];
|
||||
|
||||
// 기본 카테고리 예산 설정
|
||||
export const DEFAULT_CATEGORY_BUDGETS = {
|
||||
식비: 400000,
|
||||
생활비: 600000,
|
||||
교통비: 200000,
|
||||
쇼핑: 300000,
|
||||
교육: 150000,
|
||||
의료: 100000,
|
||||
여행: 200000,
|
||||
기타: 150000
|
||||
교통비: 200000
|
||||
};
|
||||
|
||||
// 기본 월간 예산
|
||||
export const DEFAULT_MONTHLY_BUDGET = 2100000;
|
||||
export const DEFAULT_MONTHLY_BUDGET = 1200000;
|
||||
|
||||
Reference in New Issue
Block a user