def getAllVehicle(): global action global response form = VehicleTypeForm(request.form) if form.validate_on_submit(): action = 'save' response = services.saveVehicleType(current_user.parking.identificationCode, form.description.data) cleanFields(response, form) vehicleTypeList = services.getAllVehicleType(current_user.parking.identificationCode) rt = render_template('abm-vehicle.html', form=form, vehicleTypeList=vehicleTypeList, action=action, response=response) action = None response = None return rt
def getAllFrequency(): global action global response form = FrequencyTypeForm(request.form) if form.validate_on_submit(): action = 'save' response = services.saveFrequencyType(current_user.parking.identificationCode, form.description.data, form.type.data, form.time.data, int(form.timeType.data), form.priority.data, form.combinablePreviousFrequency.data) cleanFields(response, form) frequencyTypeList = services.getAllFrequencyType(current_user.parking.identificationCode) rt = render_template('abm-frequency.html', form=form, frequencyTypeList=frequencyTypeList, action=action, response=response) action = None response = None return rt
def getAllParkingRates(): global action global response form = ParkingRatesForm(request.form) if form.validate_on_submit(): action = 'save' response = services.saveParkingRate(current_user.parking.identificationCode, int(form.vehicle.data), int(form.frequency.data), form.amount.data) cleanFields(response, form) priceList = services.getAllParkingRates(current_user.parking.identificationCode) rt = render_template('abm-parkingRates.html', form=form, priceList=priceList, action=action, response=response) action = None response = None return rt