Add columns relating to Funding and Oversight sections to TaskOrder model
This commit is contained in:
@@ -37,14 +37,17 @@ class TaskOrders(object):
|
||||
"ko_first_name",
|
||||
"ko_last_name",
|
||||
"ko_email",
|
||||
"ko_phone_number",
|
||||
"ko_dod_id",
|
||||
"cor_first_name",
|
||||
"cor_last_name",
|
||||
"cor_email",
|
||||
"cor_phone_number",
|
||||
"cor_dod_id",
|
||||
"so_first_name",
|
||||
"so_last_name",
|
||||
"so_email",
|
||||
"so_phone_number",
|
||||
"so_dod_id",
|
||||
],
|
||||
}
|
||||
|
@@ -215,28 +215,28 @@ TEAM_EXPERIENCE = [
|
||||
]
|
||||
|
||||
PERIOD_OF_PERFORMANCE_LENGTH = [
|
||||
("1_month", "1 Month"),
|
||||
("2_months", "2 Months"),
|
||||
("3_months", "3 Months"),
|
||||
("4_months", "4 Months"),
|
||||
("5_months", "5 Months"),
|
||||
("6_months", "6 Months"),
|
||||
("7_months", "7 Months"),
|
||||
("8_months", "8 Months"),
|
||||
("9_months", "9 Months"),
|
||||
("10_months", "10 Months"),
|
||||
("11_months", "11 Months"),
|
||||
("1_year", "1 Year"),
|
||||
("1_year_1_month", "1 Year, 1 Month"),
|
||||
("1_year_2_months", "1 Year, 2 Months"),
|
||||
("1_year_3_months", "1 Year, 3 Months"),
|
||||
("1_year_4_months", "1 Year, 4 Months"),
|
||||
("1_year_5_months", "1 Year, 5 Months"),
|
||||
("1_year_6_months", "1 Year, 6 Months"),
|
||||
("1_year_7_months", "1 Year, 7 Months"),
|
||||
("1_hyear_8_months", "1 Year, 8 Months"),
|
||||
("1_year_9_months", "1 Year, 9 Months"),
|
||||
("1_year_10_months", "1 Year, 10 Months"),
|
||||
("1_year_11_months", "1 Year, 11 Months"),
|
||||
("2_years", "2 Years"),
|
||||
("1", "1 Month"),
|
||||
("2", "2 Months"),
|
||||
("3", "3 Months"),
|
||||
("4", "4 Months"),
|
||||
("5", "5 Months"),
|
||||
("6", "6 Months"),
|
||||
("7", "7 Months"),
|
||||
("8", "8 Months"),
|
||||
("9", "9 Months"),
|
||||
("10", "10 Months"),
|
||||
("11", "11 Months"),
|
||||
("12", "1 Year"),
|
||||
("13", "1 Year, 1 Month"),
|
||||
("14", "1 Year, 2 Months"),
|
||||
("15", "1 Year, 3 Months"),
|
||||
("16", "1 Year, 4 Months"),
|
||||
("17", "1 Year, 5 Months"),
|
||||
("18", "1 Year, 6 Months"),
|
||||
("19", "1 Year, 7 Months"),
|
||||
("20", "1 Year, 8 Months"),
|
||||
("21", "1 Year, 9 Months"),
|
||||
("22", "1 Year, 10 Months"),
|
||||
("23", "1 Year, 11 Months"),
|
||||
("24", "2 Years"),
|
||||
]
|
||||
|
@@ -112,7 +112,7 @@ class OversightForm(CacheableForm):
|
||||
)
|
||||
ko_last_name = StringField(translate("forms.task_order.oversight_last_name_label"))
|
||||
ko_email = StringField(translate("forms.task_order.oversight_email_label"))
|
||||
ko_phone = TelField(
|
||||
ko_phone_number = TelField(
|
||||
translate("forms.task_order.oversight_phone_label"), validators=[PhoneNumber()]
|
||||
)
|
||||
ko_dod_id = StringField(
|
||||
@@ -125,7 +125,7 @@ class OversightForm(CacheableForm):
|
||||
)
|
||||
cor_last_name = StringField(translate("forms.task_order.oversight_last_name_label"))
|
||||
cor_email = StringField(translate("forms.task_order.oversight_email_label"))
|
||||
cor_phone = TelField(
|
||||
cor_phone_number = TelField(
|
||||
translate("forms.task_order.oversight_phone_label"), validators=[PhoneNumber()]
|
||||
)
|
||||
cor_dod_id = StringField(
|
||||
@@ -138,7 +138,7 @@ class OversightForm(CacheableForm):
|
||||
)
|
||||
so_last_name = StringField(translate("forms.task_order.oversight_last_name_label"))
|
||||
so_email = StringField(translate("forms.task_order.oversight_email_label"))
|
||||
so_phone = TelField(
|
||||
so_phone_number = TelField(
|
||||
translate("forms.task_order.oversight_phone_label"), validators=[PhoneNumber()]
|
||||
)
|
||||
so_dod_id = StringField(
|
||||
|
@@ -1,6 +1,6 @@
|
||||
from enum import Enum
|
||||
|
||||
from sqlalchemy import Column, Enum as SQLAEnum, Numeric, String, ForeignKey, Date
|
||||
from sqlalchemy import Column, Enum as SQLAEnum, Numeric, String, ForeignKey, Date, Integer
|
||||
from sqlalchemy.types import ARRAY
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
@@ -46,6 +46,9 @@ class TaskOrder(Base, mixins.TimestampsMixin):
|
||||
team_experience = Column(String) # Team Experience
|
||||
start_date = Column(Date) # Period of Performance
|
||||
end_date = Column(Date)
|
||||
performance_length = Column(Integer)
|
||||
attachment_id = Column(ForeignKey("attachments.id"))
|
||||
pdf = relationship("Attachment")
|
||||
clin_01 = Column(Numeric(scale=2))
|
||||
clin_02 = Column(Numeric(scale=2))
|
||||
clin_03 = Column(Numeric(scale=2))
|
||||
@@ -53,14 +56,17 @@ class TaskOrder(Base, mixins.TimestampsMixin):
|
||||
ko_first_name = Column(String) # First Name
|
||||
ko_last_name = Column(String) # Last Name
|
||||
ko_email = Column(String) # Email
|
||||
ko_phone_number = Column(String) # Phone Number
|
||||
ko_dod_id = Column(String) # DOD ID
|
||||
cor_first_name = Column(String) # First Name
|
||||
cor_last_name = Column(String) # Last Name
|
||||
cor_email = Column(String) # Email
|
||||
cor_phone_number = Column(String) # Phone Number
|
||||
cor_dod_id = Column(String) # DOD ID
|
||||
so_first_name = Column(String) # First Name
|
||||
so_last_name = Column(String) # Last Name
|
||||
so_email = Column(String) # Email
|
||||
so_phone_number = Column(String) # Phone Number
|
||||
so_dod_id = Column(String) # DOD ID
|
||||
number = Column(String, unique=True) # Task Order Number
|
||||
loa = Column(ARRAY(String)) # Line of Accounting (LOA)
|
||||
|
@@ -167,7 +167,13 @@ class UpdateTaskOrderWorkflow(ShowTaskOrderWorkflow):
|
||||
prefix = officer_type["prefix"]
|
||||
officer_data = {
|
||||
field: getattr(self.task_order, prefix + "_" + field)
|
||||
for field in ["first_name", "last_name", "email", "dod_id"]
|
||||
for field in [
|
||||
"first_name",
|
||||
"last_name",
|
||||
"email",
|
||||
"phone_number",
|
||||
"dod_id",
|
||||
]
|
||||
}
|
||||
officer = TaskOrders.add_officer(
|
||||
self.user, self.task_order, officer_type["role"], officer_data
|
||||
|
Reference in New Issue
Block a user