mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
[Bug] machine name is not shown in plan edition
This commit is contained in:
parent
9212ef7c4a
commit
cb42b46790
@ -31,6 +31,7 @@
|
||||
- Admins can toggle reminders on/off and customize the delay
|
||||
- Fix a bug: project drafts are shown on public profiles
|
||||
- Fix a bug: event category disappear when editing the event
|
||||
- Fix a bug: machine name is not shown in plan edition
|
||||
- [TODO DEPLOY] `rake fablab:es_add_event_filters`
|
||||
- [TODO DEPLOY] `rake db:migrate`
|
||||
- [TODO DEPLOY] `bundle install`
|
||||
|
@ -60,6 +60,18 @@ class PlanController
|
||||
|
||||
|
||||
|
||||
##
|
||||
# Retrieve the name of a machine from its ID
|
||||
# @param machine_id {number} machine identifier
|
||||
# @returns {string} Machine's name
|
||||
##
|
||||
$scope.getMachineName = (machine_id) ->
|
||||
for machine in $scope.machines
|
||||
if machine.id == machine_id
|
||||
return machine.name
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
<tbody>
|
||||
|
||||
<tr ng-repeat="price in plan.prices">
|
||||
<td style="width: 60%;">{{ price.priceable_name }} (id {{ price.priceable_id }}) *</td>
|
||||
<td style="width: 60%;">{{ getMachineName(price.priceable_id) }} (id {{ price.priceable_id }}) *</td>
|
||||
<td>
|
||||
<div class="input-group" ng-class="{'has-error': planForm['plan[prices_attributes][][amount]'].$dirty && planForm['plan[prices_attributes][][amount]'].$invalid}">
|
||||
<span class="input-group-addon">{{currencySymbol}}</span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user