more fixes #3

Merged
jason merged 1 commits from updates into main 2026-03-12 10:36:23 -05:00
3 changed files with 10 additions and 10 deletions

View File

@@ -29,17 +29,15 @@ def create_app(config_name=None):
db.create_all() db.create_all()
_run_migrations() _run_migrations()
@app.route('/', defaults={'path': ''}) @app.route('/')
@app.route('/<path:path>') def index():
def serve_react(path): return send_from_directory(app.static_folder, 'index.html')
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.errorhandler(404) @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 jsonify({'error': 'Resource not found', 'message': str(e)}), 404
return send_from_directory(app.static_folder, 'index.html')
@app.errorhandler(400) @app.errorhandler(400)
def bad_request(e): def bad_request(e):

View File

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

View File

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