Enhance CarModifications component by integrating API calls for fetching modifications and customers, implementing a dialog for adding modifications to customers, and improving error and success message handling. Refactor state management and UI elements for better user experience.

This commit is contained in:
Alvin
2025-06-12 09:38:03 +02:00
parent 1ac852f2a1
commit f66670137b
11 changed files with 516 additions and 234 deletions

14
models/Modification.js Normal file
View File

@@ -0,0 +1,14 @@
const mongoose = require('mongoose');
const modificationSchema = new mongoose.Schema({
name: { type: String, required: true },
description: { type: String, required: true },
price: { type: Number, required: true },
category: { type: String, required: true },
icon: { type: String }, // optional: path to SVG/icon
createdAt: { type: Date, default: Date.now }
});
const Modification = mongoose.model('Modification', modificationSchema);
module.exports = Modification;