Merge pull request #201 from dod-ccpo/annual-spend-threshold

make annual spending threshold available to request templates
This commit is contained in:
dandds 2018-08-22 15:25:15 -04:00 committed by GitHub
commit eb3b5848ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 2 deletions

View File

@ -32,6 +32,7 @@ def deep_merge(source, destination: dict):
class Requests(object): class Requests(object):
AUTO_APPROVE_THRESHOLD = 1000000 AUTO_APPROVE_THRESHOLD = 1000000
ANNUAL_SPEND_THRESHOLD = 1000000
@classmethod @classmethod
def create(cls, creator, body): def create(cls, creator, body):

View File

@ -1,7 +1,13 @@
from flask import Blueprint from flask import Blueprint
from atst.domain.requests import Requests
requests_bp = Blueprint("requests", __name__) requests_bp = Blueprint("requests", __name__)
from . import index from . import index
from . import requests_form from . import requests_form
from . import financial_verification from . import financial_verification
@requests_bp.context_processor
def annual_spend_threshold():
return { "annual_spend_threshold": Requests.ANNUAL_SPEND_THRESHOLD }

View File

@ -65,7 +65,7 @@
</div> </div>
<transition name='slide'> <transition name='slide'>
<template v-if="annualSpend > 1000000"> <template v-if="annualSpend > {{ annual_spend_threshold }}">
<fieldset class='form__sub-fields'> <fieldset class='form__sub-fields'>
<h3>Because the approximate annual spend is over $1,000,000, please answer a few additional questions.</h3> <h3>Because the approximate annual spend is over $1,000,000, please answer a few additional questions.</h3>
{{ TextInput(f.number_user_sessions, validation='integer', placeholder="0") }} {{ TextInput(f.number_user_sessions, validation='integer', placeholder="0") }}

View File

@ -143,7 +143,7 @@
</dd> </dd>
</div> </div>
{% if jedi_request and jedi_request.annual_spend > 1000000 %} {% if jedi_request and jedi_request.annual_spend > annual_spend_threshold %}
<div> <div>
<dt>Number of User Sessions</dt> <dt>Number of User Sessions</dt>