Skip to content

Commit

Permalink
Merge pull request #818 from fedspendingtransparency/staging
Browse files Browse the repository at this point in the history
Prod deploy: Staging -> Master
  • Loading branch information
nmonga91 authored Jun 20, 2018
2 parents bc9c610 + ecc8de4 commit 2acde72
Show file tree
Hide file tree
Showing 56 changed files with 1,553 additions and 2,619 deletions.
120 changes: 120 additions & 0 deletions api_contracts/contracts/award/AwardProfile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
FORMAT: 1A
HOST: https://api.usaspending.gov

# Award Profile

These endpoints are used to power USAspending.gov's award profile pages. This data can be used to view details about a specific award.

# Group Tables

These endpoints support the tables on the individual Award Profile pages.

## SubAwards [/api/v2/subawards/]

This endpoint returns a list of sub-awards, their amount, action date, recipient name, and description.

### SubAwards [POST]

+ Request (application/json)
+ Attributes (object)
+ award_id: 123 (optional, string)
The internal id of the award to filter on. If not included, all sub-awards are returned.
+ limit: 15 (optional, number)
The number of results to include per page.
+ Default: 10
+ page: 1 (optional, number)
The page of results to return based on the limit.
+ Default: 1
+ sort: subaward_number (optional, enum[string])
The field results are sorted by.
+ Default: subaward_number
+ Members
+ subaward_number
+ description
+ action_date
+ amount
+ recipient_name
+ order: desc (optional, string)
The direction results are sorted by. `asc` for ascending, `desc` for descending.
+ Default: desc

+ Response 200 (application/json)
+ Attributes
+ results (array[SubAwardResult], fixed-type)
+ page_metadata (PageMetaDataObject)

## Transactions [/api/v2/transactions/]

This endpoint returns a list of transactions, their amount, type, action date, action type, modification number, and description.

### Transactions [POST]

+ Request (application/json)
+ Attributes (object)
+ award_id: 123 (optional, string)
The internal id of the award to filter on. If not included, all transactions are returned.
+ limit: 15 (optional, number)
The number of results to include per page.
+ Default: 10
+ page: 1 (optional, number)
The page of results to return based on the limit.
+ Default: 1
+ sort: action_date (optional, enum[string])
The field results are sorted by.
+ Default: action_date
+ Members
+ modification_number
+ action_date
+ federal_action_obligation
+ face_value_loan_guarantee
+ original_loan_subsidy_cost
+ action_type_description
+ description
+ order: desc (optional, string)
The direction results are sorted by. `asc` for ascending, `desc` for descending.
+ Default: desc

+ Response 200 (application/json)
+ Attributes
+ results (array[TransactionResult], fixed-type)
+ page_metadata (PageMetaDataObject)

# Data Structures

## SubAwardResult (object)
+ id: `1` (required, string)
The internal sub-award id.
+ subaward_number: `2-A` (required, string)
The sub-award id.
+ description: description (required, string)
+ action_date: `1999-01-15` (required, string)
Action date in the format `YYYY-MM-DD`.
+ amount: 1234.56 (required, number)
Monetary value of the sub-award.
+ recipient_name: Recipient A (required, string)

## TransactionResult (object)
+ id: `1` (required, string)
The internal transaction id.
+ type: A (required, string)
Award type code
+ type_description: BPA (required, string)
+ action_date: `1999-01-15` (required, string)
Action date in the format `YYYY-MM-DD`.
+ action_type: C (required, string)
Action type code
+ action_type_description: description (required, string)
+ modification_number: `0` (required, string)
+ description: MANAGEMENT AND OPERATIONS (required, string)
+ federal_action_obligation: 1234.56 (required, number, nullable)
Monetary value of the transaction. Null for results with award type codes that correspond to loans.
+ face_value_loan_guarantee: 1234.56 (required, number, nullable)
Face value of the loan. Null for results with award type codes that **do not** correspond to loans.
+ original_loan_subsidy_cost: 234.12 (required, number, nullable)
Original subsidy cost of the loan. Null for results with award type codes that **do not** correspond to loans.

## PageMetaDataObject (object)
+ page: 1 (required, number)
+ hasNext: false (required, boolean)
+ hasPrevious: false (required, boolean)
13 changes: 11 additions & 2 deletions api_contracts/contracts/spendingExplorer/SpendingExplorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ Using the response from the general Spending Explorer, you can drill down to mor
+ Response 200 (application/json)
+ Attributes (object)
+ total: 126073789264.49 (required, number)
+
+ end_date: `2017-09-30` (required, string)
This is the "as-of" date for the data being returned.
+ results (required, array[SpendingExplorerGeneralResponse], fixed-type)
+ results (required, array[SpendingExplorerGeneralResponse, SpendingExplorerGeneralUnreportedResponse], fixed-type)

+ Request Specific Spending Explorer (application/json)
+ Attributes (object)
Expand Down Expand Up @@ -100,7 +101,7 @@ Using the response from the general Spending Explorer, you can drill down to mor
+ type: agency (required, string)
The `type` will always be equal to the `type` parameter you provided in the request.
+ name: Department of State (required, string)
+ amount: 126073789264.49 (required, number)
+ amount: 63036894632.2 (required, number)

### SpendingExplorerDetailedResponse (object)
+ code: `0006` (required, string)
Expand All @@ -109,3 +110,11 @@ Using the response from the general Spending Explorer, you can drill down to mor
The `type` will always be equal to the `type` parameter you provided in the request.
+ name: Law Enforcement Operations (required, string)
+ amount: 1116815570.99 (required, number)

## SpendingExplorerGeneralUnreportedResponse (object)
+ code (optional, nullable)
+ id (optional, nullable)
+ type: agency (required, string)
The `type` will always be equal to the `type` parameter you provided in the request.
+ name: Unreported Data (required, string)
+ amount: 63036894632.2 (required, number)
19 changes: 19 additions & 0 deletions src/_scss/elements/_titleSelector.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
box-shadow: 0 rem(5) rem(5) 0 rgba($color-black, .2);
ul {
@include unstyled-list;
@import "components/_comingSoon";
@include comingSoon;
width: 100%;
li.field-item {
width: 100%;
Expand All @@ -53,6 +55,23 @@
color: $color-base;
}
}

.item-button.coming-soon {
color: $color-gray-lighter;
&:hover,
&:active,
&:focus {
background-color: transparent;
}
}
.coming-soon-icon {
left: rem(185);
bottom: rem(12);
}
.coming-soon-label {
left: rem(200);
bottom: rem(10);
}
}
}
}
Expand Down
58 changes: 58 additions & 0 deletions src/_scss/pages/explorer/detail/_unreportedErrorScreen.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.explorer-unreported {
@include display(flex);
@include justify-content(center);
@include align-items(center);
margin: rem(50) 0 rem(15) 0;

.explorer-unreported__top {
display: flex;
padding-bottom: rem(20);
}

.explorer-unreported__icon {
margin-right: rem(10);
@include align-self(center);

svg {
width: rem(30);
height: rem(30);
fill: #FFB800;;
}
}

.explorer-unreported__box {
max-width: rem(720);
padding: rem(30) rem(30) rem(30) rem(30);
height: auto;
border: 1px solid #FFB800;
background-color: #FFFCF6;
}

.explorer-unreported__header {
font-size: rem(24);
margin: 0;
font-weight: 600;
padding-left: rem(20);
line-height: 1.2;
}

.explorer-unreported__info {
font-weight: 600;
font-size: rem(16);
}

.explorer-unreported__body {
padding-left: rem(62);
}

.explorer-unreported__list {
padding-left: rem(20);
margin-top: rem(10);
font-size: rem(16);
line-height: 10px;

li {
margin-bottom: 0;
}
}
}
3 changes: 2 additions & 1 deletion src/_scss/pages/explorer/detail/explorerDetail.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.explorer-detail-wrap {
@import "./_tooltip";
@import "./_noAwardsScreen";
@import "./_noAwardsScreen";
@import "./_unreportedErrorScreen";

background: url(#{$image-path}/explorer-background.jpg) no-repeat top center fixed;
background-size: cover;
Expand Down
45 changes: 42 additions & 3 deletions src/_scss/pages/explorer/detail/header/header.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.detail-header {
@include display(flex);
@include justify-content(space-between);
Expand Down Expand Up @@ -60,7 +61,7 @@
}

.detail-header__fy {
text-align: center;
text-align: right;
text-transform: uppercase;
font-weight: $font-semibold;

Expand All @@ -69,7 +70,7 @@
}

.detail-header__value {
text-align: center;
text-align: right;
text-transform: capitalize;
font-weight: $font-semibold;

Expand All @@ -80,10 +81,25 @@
}

.detail-header__update {
text-align: center;
text-align: right;
font-size: rem(14);
line-height: rem(18);
}


.detail-header__icon {
padding: 0 0 0 rem(5);
cursor: default;
margin: 0;
background-color: transparent;


svg {
width: rem(10);
height: rem(10);
fill: #555555;
}
}
}

.left-side {
Expand Down Expand Up @@ -180,5 +196,28 @@
.detail-header__truncation {
margin-top: rem(20);
}
@import "pages/homepage/hero/_heroTooltip";

.homepage-hero-tooltip {
// we don't want the tooltip to be on top of the fix header, this will make sure that
// it's stays under the fixed header when scrolling
z-index: 1;
width: rem(220);
.homepage-hero-tooltip__text_holder {
height: rem(90);
padding: rem(7) rem(20) 0 rem(35);
}

.homepage-hero-tooltip__info_icon {
top: rem(15);
left: rem(15);
}

.homepage-hero-tooltip__close_icon {
top: rem(15);
right: rem(10);
}
}

@import "./_truncation";

19 changes: 19 additions & 0 deletions src/_scss/pages/explorer/detail/visualization/visualization.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,25 @@
margin-top: rem(15);
}

.explorer-vis__link {
display: inline;
line-height: 1.5;
background-color: transparent;
font-size: rem(14);
font-style: italic;
margin: 0;
padding: 0;
color: #0071bc;

&:hover {
text-decoration: underline;
}
}

.explorer-vis_bold {
font-weight: 600;
}

.explorer-vis__table-transition {
transition: opacity 0.25s;
&.explorer-vis__table-transition_loading {
Expand Down
2 changes: 2 additions & 0 deletions src/_scss/pages/modals/redirect/redirectModal.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.redirect-modal {
background-color: $color-white;
// Overrides the default library max width of 100%
max-width: rem(1200);
.redirect-modal__header {
background-color: $color-primary;
@include display(flex);
Expand Down
Loading

0 comments on commit 2acde72

Please sign in to comment.