|
|
@@ -1202,14 +1202,15 @@ window.jobTypeForm = function (initialAttributes, customerTypes) { |
|
|
var imported = ct.attributes.slice().sort(function (a, b) { |
|
|
var imported = ct.attributes.slice().sort(function (a, b) { |
|
|
return (a.order || 0) - (b.order || 0); |
|
|
return (a.order || 0) - (b.order || 0); |
|
|
}).map(function (a) { |
|
|
}).map(function (a) { |
|
|
|
|
|
var importedType = (a.type === 'api_lookup') ? 'text' : (a.type || 'text'); |
|
|
return { |
|
|
return { |
|
|
name: a.name || '', |
|
|
name: a.name || '', |
|
|
type: a.type || 'text', |
|
|
|
|
|
|
|
|
type: importedType, |
|
|
alias: a.alias || '', |
|
|
alias: a.alias || '', |
|
|
order: 0, |
|
|
order: 0, |
|
|
api_url: a.api_url || '', |
|
|
|
|
|
api_match_field: a.api_match_field || '', |
|
|
|
|
|
api_auto_fill: a.api_auto_fill || '', |
|
|
|
|
|
|
|
|
api_url: '', |
|
|
|
|
|
api_match_field: '', |
|
|
|
|
|
api_auto_fill: '', |
|
|
api_format: a.api_format || 'json', |
|
|
api_format: a.api_format || 'json', |
|
|
api_return_type: a.api_return_type || 'text', |
|
|
api_return_type: a.api_return_type || 'text', |
|
|
customer_type_id: 0, |
|
|
customer_type_id: 0, |
|
|
|