Introduce new org types

This commit is contained in:
Pea Tyczynska
2019-07-15 18:03:59 +01:00
parent 42300371b0
commit 77d281f44f
7 changed files with 52 additions and 13 deletions

View File

@@ -39,6 +39,11 @@ class Config(object):
'central': 250000,
'local': 25000,
'nhs': 25000,
'nhs_central': 250000,
'nhs_local': 25000,
'emergency_service': 25000,
'school_or_college': 25000,
'other': 25000,
}
EMAIL_EXPIRY_SECONDS = 3600 # 1 hour
INVITATION_EXPIRY_SECONDS = 3600 * 24 * 2 # 2 days - also set on api

View File

@@ -248,7 +248,11 @@ def organisation_type(label='Who runs this service?'):
choices=[
('central', 'Central government'),
('local', 'Local government'),
('nhs', 'NHS'),
('nhs_central', 'NHS central government agency or public body'),
('nhs_local', 'NHS Trust, GP surgery or Clinical Commissioning Group'),
('emergency_service', 'Emergency service'),
('school_or_college', 'School or college'),
('other', 'Other'),
],
validators=[DataRequired()],
)

View File

@@ -268,7 +268,9 @@ class Service(JSONModel):
@property
def shouldnt_use_govuk_as_sms_sender(self):
return self.organisation_type in {'local', 'nhs'}
return self.organisation_type in {
'local', 'nhs', 'nhs_local', 'nhs_central', 'emergency_service', 'school_or_college', 'other'
}
@cached_property
def sms_senders(self):

View File

@@ -322,7 +322,7 @@ class User(JSONModel, UserMixin):
if self.default_organisation:
return self.default_organisation.organisation_type
if self.has_nhs_email_address:
return 'nhs'
return 'nhs_local'
return None
@property

View File

@@ -28,7 +28,11 @@
{{ optional_text_field({
'central': 'Central government',
'local': 'Local government',
'nhs': 'NHS',
'nhs_central': 'NHS central government agency or public body',
'nhs_local': 'NHS Trust, GP surgery or Clinical Commissioning Group',
'emergency_service': 'Emergency service',
'school_or_college': 'School or college',
'other': 'Other',
}.get(current_org.organisation_type)) }}
{{ edit_field(
'Change',