예제 #1
0
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,
        })
예제 #2
0
def inventory_all():
    inventory = Inventory.query.all()
    result = equipments_schema.dump(inventory)

    return jsonify(result.data)
예제 #3
0
def inventory_broken(current_user):
    broken = query_all_broken()

    return equipments_schema.dump(broken)
예제 #4
0
def inventory_ontrip(current_user):
    ontrip = query_all_ontrip()

    return equipments_schema.dump(ontrip)
예제 #5
0
def inventory_lended(current_user):
    lended = query_all_lended()

    return equipments_schema.dump(lended)
예제 #6
0
def inventory_available(current_user):
    available = query_all_available()

    return equipments_schema.dump(available)
예제 #7
0
def inventory_all(current_user):
    inventory = Inventory.query.all()
    result = equipments_schema.dump(inventory)

    return jsonify(result)