25 Commits

Author SHA1 Message Date
graham-dds
55736b723e Move calc of a portfolio's obligated funds to prop
Add a property on the portfolio model to calculate the total
obligated funds for a portfolio. This replaces a one-off calculation
in a view function, and sets up functionality for future access
2020-02-10 14:49:04 -05:00
leigh-mil
b5e7ea3fa6 Fix column type on portfolios defense_component 2020-01-31 14:03:30 -05:00
tomdds
d81d953c31 Fix formatting and some typos 2020-01-14 16:36:16 -05:00
Philip Kalinsky
69bd2f43a5 provision portfolio state machine 2020-01-14 16:36:16 -05:00
leigh-mil
dad54ec139 Create new migration to convert column type of defense_component from
string to array
2020-01-06 13:08:56 -05:00
graham-dds
a097a0ce61 Refactor New Portfolio page according to designs.
New designs call for a streamlined New Portfolio page, with far
fewer input options. This commit refactors that page according to those
designs.

Some of the route functions in this commit refer to a "step 1" of creating
a new Portfolio. Though there is no "step 2" right now, the designs call
for a multistep flow for Portfolio creation process, so this commit sets
the stage for that.
2019-12-13 13:17:30 -05:00
leigh-mil
614514d6a2 Update tables to match business logic 2019-12-02 14:46:11 -05:00
graham-dds
0303434561 First pass at new reporting designs
This commit lays out the genral structure and provides necessary
data for the new reporting page designs.

Some of the data generated by the report domain classes (including
the mock CSP reporting class) was modified to fit new designs. This also
included removing data that was no longer necessary. Part of the newly
mocked data includes the idea of "expended" data per CLIN or task order.
This was was mocked simply by using a 75% of the obligated funds fo a
given object. Tests were also written for these new/ modifed reporting
functions.

As for the front end, this commit only focuses on the high-level markup
layout. This includes splitting the large reporting index page into
smaller component templates for each of the major sections of the report.
2019-11-25 13:12:35 -05:00
graham-dds
7a0dc4d264 Add properties to portfolio model
1. Funding duration

Returns a tuple of the earliest period of performance start date and
latest period of performance end date for all active task order in a  portfolio.

2. Days to funding expiration
Returns the numbei of days between today and the lastest
period performance end date of all active task orders

3. Active task orders
Returns a list of a portfolio's active task orders a
2019-11-25 13:12:35 -05:00
graham-dds
4f2a75b64f Add active CLINS property to portfolio model 2019-11-25 13:12:34 -05:00
richard-dds
e3c9105270 Fix some LGTM errors 2019-10-31 13:46:04 -04:00
George Drummond
cad43af455
Portfolio archiving 2019-06-11 11:30:37 -04:00
George Drummond
0fa43021f8
Use python rather than string for primaryjoin 2019-06-05 11:12:46 -04:00
George Drummond
f7562714cb
Add New Portfolio Workflow 2019-06-04 13:10:42 -04:00
leigh-mil
9f66bbafe5 Raise NotImplementedError in AuditableMixin if the model does not have the properties portfolio_id or application_id 2019-05-22 13:12:48 -04:00
dandds
c8682c0897 Use portfolio_role entity to display and update portfolio member info.
Previously, we were encoding the portfolio_role.user_id as part of the
form data for the portfolio admin page. This was convenient because it
allowed us to easily determine certain display attributes in the
template. Instead, we should rely on the PortfolioRole as the source of
truth for member information. This commit adds:

- Portfolio.owner_role to return the PortfolioRole of the owner
- explicitly passes the PortfolioRole IDs for the PPoC and current user
  to the template
- PortfolioRole.full_name for deriving the member name
2019-05-16 08:04:48 -04:00
dandds
1c0c5dd9c5 soft deletes available for applications and environments
- parent relation will not include applications or environments marked
  as deleted
- domain classes will exclude deleted objects from selections
- changed some test factories to use domain_word for resource names,
  because they were using person names and it bugged me
2019-04-15 15:58:38 -04:00
dandds
78aa2dfcc6 permission set names should be constants on the domain class 2019-03-15 07:14:49 -04:00
dandds
0c2ab6fb7a remove portfolio_role direct relationship to role 2019-03-15 07:14:49 -04:00
Montana
4a100f913f Add num_task_orders property 2019-03-08 10:54:51 -05:00
Montana
f8a6d04d64 Move defense_component to portfolios model 2019-02-26 11:22:24 -05:00
Patrick Smith
b778942dd7 Remove unused get_by_request helper 2019-02-25 14:54:14 -05:00
Patrick Smith
2c62f54b83 Remove request-related models 2019-02-25 14:54:14 -05:00
dandds
372dac306f update workspace and project table names 2019-01-14 16:00:17 -05:00
dandds
d3d36822df workspace -> portfolio everywhere 2019-01-14 16:00:17 -05:00