def fieldtrips_available(current_user): personnel = Person.query.fiter_by(type_id=1).all() equips_field_available = query_all_field_available() equips_field_eligible = query_all_field_eligible() return jsonify({ "personnel": people_schema.dump(personnel).data, "equips_field_available": equipments_schema.dump(equips_field_available).data, "equips_field_eligible": equipments_schema.dump(equips_field_eligible).data, })
def inventory_all(): inventory = Inventory.query.all() result = equipments_schema.dump(inventory) return jsonify(result.data)
def inventory_broken(current_user): broken = query_all_broken() return equipments_schema.dump(broken)
def inventory_ontrip(current_user): ontrip = query_all_ontrip() return equipments_schema.dump(ontrip)
def inventory_lended(current_user): lended = query_all_lended() return equipments_schema.dump(lended)
def inventory_available(current_user): available = query_all_available() return equipments_schema.dump(available)
def inventory_all(current_user): inventory = Inventory.query.all() result = equipments_schema.dump(inventory) return jsonify(result)