Add complete settlement system with visual distinction
- Add settlement category with handshake emoji (🤝) - Create settlement page for recording debt payments with user → user flow - Implement settlement detection and visual styling across all views - Add conditional "Settle Debts" button (hidden when balance is 0) - Style settlement payments distinctly in recent activity with large profile pictures - Add settlement flow styling in payments overview with green theme - Update backend validation and Mongoose schema for settlement category - Fix settlement receiver detection with proper user flow logic 🤝 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ export interface IPayment {
|
||||
paidBy: string; // username/nickname of the person who paid
|
||||
date: Date;
|
||||
image?: string; // path to uploaded image
|
||||
category: 'groceries' | 'shopping' | 'travel' | 'restaurant' | 'utilities' | 'fun';
|
||||
category: 'groceries' | 'shopping' | 'travel' | 'restaurant' | 'utilities' | 'fun' | 'settlement';
|
||||
splitMethod: 'equal' | 'full' | 'proportional' | 'personal_equal';
|
||||
createdBy: string; // username/nickname of the person who created the payment
|
||||
createdAt?: Date;
|
||||
@@ -55,7 +55,7 @@ const PaymentSchema = new mongoose.Schema(
|
||||
category: {
|
||||
type: String,
|
||||
required: true,
|
||||
enum: ['groceries', 'shopping', 'travel', 'restaurant', 'utilities', 'fun'],
|
||||
enum: ['groceries', 'shopping', 'travel', 'restaurant', 'utilities', 'fun', 'settlement'],
|
||||
default: 'groceries'
|
||||
},
|
||||
splitMethod: {
|
||||
|
||||
Reference in New Issue
Block a user