lets add settings new to css

This commit is contained in:
2025-10-09 00:34:52 +03:00
parent a8811b94b7
commit b0e17b69e7
18 changed files with 1816 additions and 118 deletions

View File

@@ -2382,6 +2382,41 @@ def generate_location_label_pdf():
from app.warehouse import generate_location_label_pdf
return generate_location_label_pdf()
@warehouse_bp.route('/update_location', methods=['POST'])
def update_location():
from app.warehouse import update_location
try:
data = request.get_json()
location_id = data.get('location_id')
location_code = data.get('location_code')
size = data.get('size')
description = data.get('description')
if not location_id or not location_code:
return jsonify({'success': False, 'error': 'Location ID and code are required'})
result = update_location(location_id, location_code, size, description)
return jsonify(result)
except Exception as e:
return jsonify({'success': False, 'error': str(e)})
@warehouse_bp.route('/delete_location', methods=['POST'])
def delete_location():
from app.warehouse import delete_location_by_id
try:
data = request.get_json()
location_id = data.get('location_id')
if not location_id:
return jsonify({'success': False, 'error': 'Location ID is required'})
result = delete_location_by_id(location_id)
return jsonify(result)
except Exception as e:
return jsonify({'success': False, 'error': str(e)})
# NOTE for frontend/extension developers:
# To print labels, call the Chrome extension and pass the PDF URL: