Skip to content

Commit

Permalink
Merge pull request #208 from ottemo/isw_108390636_order_states_on_det…
Browse files Browse the repository at this point in the history
…ail_page

[#108390636 Finish] Removed New/Pending selections from order detail …
  • Loading branch information
James Vastbinder committed Nov 25, 2015
2 parents c4e58c9 + 863d0f5 commit e266dbc
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 15 deletions.
30 changes: 20 additions & 10 deletions app/scripts/order/controller/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,34 @@ function ($scope, $routeParams, $location, $q, $orderApiService, $dashboardUtils

$scope.statuses = [
{
"value": "new",
"label": "New"
value: 'new',
label: 'New',
isDisabled: true
},
{
"value": "pending",
"label": "Pending"
value: 'pending',
label: 'Pending',
isDisabled: true
},
{
"value": "processed",
"label": "Processed"
value: 'processed',
label: 'Processed',
isDisabled: false
},
{
"value": "completed",
"label": "Completed"
value: 'declined',
label: 'Declined',
isDisabled: true
},
{
"value": "cancelled",
"label": "Cancel Order"
value: 'completed',
label: 'Completed',
isDisabled: false
},
{
value: 'cancelled',
label: 'Cancelled',
isDisabled: false
}
];

Expand Down
16 changes: 11 additions & 5 deletions app/themes/views/order/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,18 @@ <h4>Order Details</h4>
<div class="panel-body">
<div class="">
<label class="">Change status</label>

<select class="form-control"
name="status"
id="status"
ng-model="order.status"
ng-init="order.status"
ng-options="obj.value as obj.label for obj in statuses"></select>
name="status"
id="status"
ng-model="order.status">
<option
ng-repeat="option in statuses"
ng-disabled="option.isDisabled"
value="{{option.value}}">
{{ option.label }}
</option>
</select>
</div>
</div>
</div>
Expand Down

0 comments on commit e266dbc

Please sign in to comment.