Add bulk price editing features and fix quantity update price preservation
- Fix FilamentForm to preserve prices when updating quantities - Add isInitialLoad flag to prevent price override on form load - Only update prices when color is actively changed, not on initial render - Add bulk filament price editor to dashboard - Filter by material and finish - Set refill and/or spool prices for multiple filaments - Preview changes before applying - Update all filtered filaments at once - Add bulk color price editor to colors page - Edit prices for all colors in one interface - Global price application with search filtering - Individual price editing with change tracking - Add auto-kill script for dev server - Kill existing processes on ports 3000/3001 before starting - Prevent "port already in use" errors - Clean start every time npm run dev is executed
This commit is contained in:
26
scripts/kill-dev.sh
Executable file
26
scripts/kill-dev.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Kill any processes running on ports 3000 and 3001
|
||||
echo "🔍 Checking for processes on ports 3000 and 3001..."
|
||||
PIDS=$(lsof -ti:3000,3001 2>/dev/null)
|
||||
if [ -n "$PIDS" ]; then
|
||||
echo "$PIDS" | xargs kill -9 2>/dev/null
|
||||
echo "✅ Killed processes on ports 3000/3001"
|
||||
else
|
||||
echo "ℹ️ No processes found on ports 3000/3001"
|
||||
fi
|
||||
|
||||
# Kill any old Next.js dev server processes (but not the current script)
|
||||
echo "🔍 Checking for Next.js dev processes..."
|
||||
OLD_PIDS=$(ps aux | grep -i "next dev" | grep -v grep | grep -v "kill-dev.sh" | awk '{print $2}')
|
||||
if [ -n "$OLD_PIDS" ]; then
|
||||
echo "$OLD_PIDS" | xargs kill -9 2>/dev/null
|
||||
echo "✅ Killed Next.js dev processes"
|
||||
else
|
||||
echo "ℹ️ No Next.js dev processes found"
|
||||
fi
|
||||
|
||||
# Give it a moment to clean up
|
||||
sleep 0.5
|
||||
|
||||
echo "✨ Ready to start fresh dev server!"
|
||||
Reference in New Issue
Block a user