Skip to content

Commit

Permalink
Supply Card aesthetics set up as per David's specs but we may want a …
Browse files Browse the repository at this point in the history
…better Edit button for the supplies.
  • Loading branch information
Nick Williams committed Aug 17, 2015
1 parent 3275cfa commit c8953b4
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 62 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 2 additions & 45 deletions public/partials/farmer_profile_large.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,57 +163,14 @@ <h3 class="{{newFarm ? 'dark':'white'}}">Farms</h3>


<md-card>
<md-card-content class="{{newCommodity ? 'dark':'white'}}">
<div layout="row">
<h3 class="{{newCommodity ? 'dark':'white'}}">Supplies</h3>
<div flex class="md-actions edge" layout="row" layout-align="end center">
<md-button ng-click="newCommodityItem()" class="md-fab edge" aria-label="Add New Supply">
<md-icon class="edge" md-svg-icon="/images/ic_add_24px.svg"></md-icon>
</md-button>
</div>

</div>

<div ng-include="newCommodity ? '/partials/commodity_new.html':null">

</div>
<md-card-content ng-include="'/partials/supplies_card.html'">

<div ng-include="editCommodity ? '/partials/commodity_edit.html':null">

</div>
</md-card-content>
<md-card-content>
<div class="farmerInfo" layout-padding layout="column" ng-repeat="commodity in commodities">
<div layout-align="space-around start" layout="row">
<div layout-align="left center" layout="column">
{{commodity.cr_crop.cr_crop_name}} - {{commodity.cr_crop.cr_crop_variety}}
<label>Produce/Crop</label>
</div>
<div layout-align="left center" layout="column">
{{commodity.co_quantity}}{{commodity.un_quantity_unit.un_unit_name}}
<label>Amount</label>
</div>
<div layout-align="left center" layout="column">
{{commodity.co_price}} per {{commodity.un_price_unit.un_unit_name}}
<label>Unit Cost</label>
</div>
</div>
<div layout-align="space-around start" layout="row">
<div layout-align="left center" layout="column">
{{commodity.co_payment_preference}}
<label>Payout Preference</label>
</div>
<span></span>
<div layout-align="left center" layout="column">
{{commodity.co_notes}}
<label>Notes</label>
</div>
</md-card-content>

<button ng-click="editCommodityItem(0)">Edit</button>

</div>
</div>
</md-card-content>
</md-card>
</div>
<div ng-include="'/partials/statistics_small.html'" layout="column" flex="40" flex-md="0" flex-sm="0" hide-sm>
Expand Down
126 changes: 126 additions & 0 deletions public/partials/supplies_card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@

<md-card-content class="{{newCommodity ? 'dark':'white'}}">
<div layout="row">
<h3 class="{{newCommodity ? 'dark':'white'}}">Supplies</h3>
<div flex class="md-actions edge" layout="row" layout-align="end center">
<md-button ng-click="newCommodityItem()" class="md-fab edge" aria-label="Add New Supply">
<md-icon class="edge" md-svg-icon="/images/ic_add_24px.svg"></md-icon>
</md-button>
</div>

</div>

<div ng-include="newCommodity ? '/partials/commodity_new.html':null">

</div>

<div ng-include="editCommodity ? '/partials/commodity_edit.html':null">

</div>

<style>

md-icon.no-margin {

margin:0;
margin-right:20px;

}

</style>

<div class="farmerInfo" layout-padding layout="column" ng-repeat="commodity in commodities">

<div layout-align="space-around start" class="farmer_info" layout="row">

<div flex layout="row">
<md-icon class="no-margin" md-svg-icon="/images/icons/icons_crop.svg"></md-icon>
<div layout-align="center" style="text-align: center;" layout="column" ng-class="{'md-offset': 1}">
{{isValid(commodity.cr_crop.cr_crop_name) ? commodity.cr_crop.cr_crop_name: 'N/A'}}
<div class="label">Produce</div>
</div>
</div>


<div flex layout="row">
<md-icon class="no-margin" md-svg-icon="/images/icons/icons_variety.svg"></md-icon>
<div layout-align="center" style="text-align: center;" layout="column" ng-class="{'md-offset': 1}">
{{isValid(commodity.cr_crop.cr_crop_variety) ? commodity.cr_crop.cr_crop_variety: 'N/A'}}
<div class="label">Variety</div>
</div>
</div>


<div flex layout="row">
<md-icon class="no-margin" md-svg-icon="/images/icons/icons_amount.svg"></md-icon>
<div layout-align="center" style="text-align: center;" layout="column" ng-class="{'md-offset': 1}">
{{commodity.co_quantity}}{{commodity.un_quantity_unit.un_unit_name}}
<div class="label">Amount</div>
</div>
</div>

</div>


<div layout-align="space-around start" class="farmer_info" layout="row">

<div flex layout="row">
<md-icon class="no-margin" md-svg-icon="/images/icons/icons_recurring.svg"></md-icon>
<div layout-align="center" style="text-align: center;" layout="column" ng-class="{'md-offset': 1}">
{{isValid(commodity.co_recurring) ? commodity.co_recurring: 'N/A'}}
<div class="label">Recurring</div>
</div>
</div>


<div flex layout="row">
<md-icon class="no-margin" md-svg-icon="/images/icons/icons_payment_terms.svg"></md-icon>
<div layout-align="center" style="text-align: center;" layout="column" ng-class="{'md-offset': 1}">
{{isValid(commodity.co_payment_preference) ? commodity.co_payment_preference: 'N/A'}}
<div class="label">Payment Terms</div>
</div>
</div>


<div flex layout="row">
<md-icon class="no-margin" md-svg-icon="/images/icons/icons_deceased.svg"></md-icon>
<div layout-align="center" style="text-align: center;" layout="column" ng-class="{'md-offset': 1}">
Available
<div class="label">Status</div>
</div>
</div>

</div>


<div layout-align="space-around start" class="farmer_info" layout="row">

<div flex layout="row">
<md-icon class="no-margin" md-svg-icon="/images/report-icons/icons_date_approve.svg"></md-icon>
<div layout-align="center" style="text-align: center;" layout="column" ng-class="{'md-offset': 1}">
{{isValid(commodity.co_availability_date) ? commodity.co_availability_date.split("T")[0]: 'N/A'}}
<div class="label">Available</div>
</div>
</div>


<div flex layout="row">
<md-icon class="no-margin" md-svg-icon="/images/report-icons/icons_date_expires.svg"></md-icon>
<div layout-align="center" style="text-align: center;" layout="column" ng-class="{'md-offset': 1}">
{{isValid(commodity.co_expiration_date) ? commodity.co_expiration_date: 'N/A'}}
<div class="label">Expiry Date</div>
</div>
</div>


<div flex layout="row">

<button ng-click="editCommodityItem(0)">Edit This Supply</button>

</div>

</div>

</div>

</md-card-content>

0 comments on commit c8953b4

Please sign in to comment.