mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Change type form is aware of existing state of enterprise
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
angular.module("admin.enterprises")
|
||||
.controller "changeTypeFormCtrl", ($scope) ->
|
||||
$scope.sells = "unspecified"
|
||||
$scope.producer_profile_only = true
|
||||
.controller "changeTypeFormCtrl", ($scope, enterprise) ->
|
||||
$scope.sells = enterprise.sells
|
||||
$scope.producer_profile_only = enterprise.producer_profile_only
|
||||
$scope.submitted = false
|
||||
|
||||
$scope.valid = (form) ->
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
class Api::Admin::EnterpriseSerializer < ActiveModel::Serializer
|
||||
attributes :name, :id, :is_primary_producer, :is_distributor, :sells, :category, :payment_method_ids, :shipping_method_ids
|
||||
attributes :producer_profile_only
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user