more fixes

This commit is contained in:
jason
2026-03-12 10:36:02 -05:00
parent 1b8e0367f6
commit ff0730b6c6
3 changed files with 10 additions and 10 deletions

View File

@@ -29,17 +29,15 @@ def create_app(config_name=None):
db.create_all()
_run_migrations()
@app.route('/', defaults={'path': ''})
@app.route('/<path:path>')
def serve_react(path):
static_folder = app.static_folder
if path and os.path.exists(os.path.join(static_folder, path)):
return send_from_directory(static_folder, path)
return send_from_directory(static_folder, 'index.html')
@app.route('/')
def index():
return send_from_directory(app.static_folder, 'index.html')
@app.errorhandler(404)
def not_found(e):
def handle_404(e):
if request.path.startswith('/api/'):
return jsonify({'error': 'Resource not found', 'message': str(e)}), 404
return send_from_directory(app.static_folder, 'index.html')
@app.errorhandler(400)
def bad_request(e):

View File

@@ -69,6 +69,7 @@ export default function MainCalendar({ onCalendarReady }) {
}, [openFocus])
const handleEventDrop = useCallback(async ({ event, oldEvent }) => {
const { deliverableId } = event.extendedProps
const newDate = event.startStr.substring(0, 10)
const oldDate = oldEvent.startStr.substring(0, 10)
await storeUpdate(deliverableId, { due_date: newDate })

View File

@@ -4,6 +4,7 @@ import ProjectModal from './ProjectModal'
import Button from '../UI/Button'
import AgendaPanel from '../Calendar/AgendaPanel'
import useProjectStore from '../../store/useProjectStore'
import useUIStore from '../../store/useUIStore'
const VIEW_OPTIONS = [
{ key: 'active', label: 'Active' },