Vue for adding multiple CLINs

This commit is contained in:
leigh-mil
2019-06-07 09:25:25 -04:00
parent cca101b50c
commit e017cd12af
5 changed files with 133 additions and 116 deletions

View File

@@ -27,3 +27,10 @@ class CLIN(Base, mixins.TimestampsMixin):
end_date = Column(Date, nullable=False)
obligated_amount = Column(Numeric(scale=2), nullable=False)
jedi_clin_type = Column(SQLAEnum(JEDICLINType, native_enum=False), nullable=False)
def to_dictionary(self):
return {
c.name: getattr(self, c.name)
for c in self.__table__.columns
if c.name not in ["id"]
}

View File

@@ -129,6 +129,9 @@ class TaskOrder(Base, mixins.TimestampsMixin):
def to_dictionary(self):
return {
"portfolio_name": self.portfolio_name,
"clins": [
clin.to_dictionary() for clin in self.clins
],
**{
c.name: getattr(self, c.name)
for c in self.__table__.columns