hold type updated , delete done by prajkta
This commit is contained in:
@@ -10,21 +10,21 @@ hold_bp = Blueprint("hold_types", __name__)
|
||||
@hold_bp.route('/add_hold_type', methods=['GET','POST'])
|
||||
@login_required
|
||||
def add_hold_type():
|
||||
|
||||
hold = HoldTypes()
|
||||
hold = HoldTypes()
|
||||
|
||||
if request.method == 'POST':
|
||||
hold.AddHoldType(request) # ✅
|
||||
return hold.resultMessage
|
||||
hold.AddHoldType(request)
|
||||
# ✅ Always redirect to same page (NO JSON)
|
||||
return redirect(url_for("hold_types.add_hold_type"))
|
||||
|
||||
hold_types = hold.GetAllHoldTypes() # ✅
|
||||
# GET request → show data
|
||||
hold_types = hold.GetAllHoldTypes()
|
||||
|
||||
return render_template(
|
||||
"add_hold_type.html",
|
||||
Hold_Types_data=hold_types
|
||||
)
|
||||
|
||||
|
||||
# ---------------- CHECK HOLD TYPE (OPTIONAL LIKE BLOCK) ----------------
|
||||
@hold_bp.route('/check_hold_type', methods=['POST'])
|
||||
@login_required
|
||||
|
||||
Reference in New Issue
Block a user