def menu(): # ----deal time----# WEEK = { "mon": "星期一", "tue": "星期二", "wed": "星期三", "thu": "星期四", "fri": "星期五", "sat": "星期六", "sun": "星期日", } raw_time = business_time.get() bussiness_time = {} for i in raw_time: bussiness_time[WEEK[i]] = ( raw_time[i]["start"] + " - " + raw_time[i]["end"] ) # ----return----# return render_template( "menu.html", menu=Menu.get_all(), bussiness_data=bussiness_time, auth=current_user.role, name=current_user.name, id=current_user.id, )
def edit_menu(): return render_template( "menu-edit.html", menu=Menu.get_all(), type=Menu.get_type(item=True, combo=True), auth=current_user.role, name=current_user.name, id=current_user.id, )
def get_menu(): return jsonify(menu.get_all())