Added multi dictionary support
This commit is contained in:
parent
bc820d0a69
commit
47741acd28
@ -84,6 +84,7 @@ class CustomField
|
||||
public $entity;
|
||||
|
||||
/**
|
||||
* @deprecated Please use $defaultTyped instead.
|
||||
* @var string
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
@ -122,4 +123,12 @@ class CustomField
|
||||
* @JMS\SerializedName("dictionary")
|
||||
*/
|
||||
public $dictionary;
|
||||
|
||||
/**
|
||||
* @var mixed
|
||||
*
|
||||
* @JMS\Type("mixed")
|
||||
* @JMS\SerializedName("defaultTyped")
|
||||
*/
|
||||
public $defaultTyped;
|
||||
}
|
||||
|
@ -58,6 +58,40 @@ class CustomFieldsTest extends AbstractApiResourceGroupTestCase
|
||||
"ordering": 50,
|
||||
"displayArea": "customer",
|
||||
"viewMode": "editable"
|
||||
},
|
||||
{
|
||||
"name": "мультисправочник",
|
||||
"code": "multi-dictionary",
|
||||
"required": false,
|
||||
"inFilter": true,
|
||||
"inList": true,
|
||||
"inGroupActions": false,
|
||||
"type": "multiselect_dictionary",
|
||||
"entity": "order",
|
||||
"ordering": 50,
|
||||
"displayArea": "customer",
|
||||
"viewMode": "editable",
|
||||
"dictionary": "test_dictionary",
|
||||
"defaultTyped": [
|
||||
"test1",
|
||||
"test2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "справочник",
|
||||
"code": "dictionary",
|
||||
"required": false,
|
||||
"inFilter": true,
|
||||
"inList": true,
|
||||
"inGroupActions": false,
|
||||
"type": "dictionary",
|
||||
"entity": "order",
|
||||
"ordering": 50,
|
||||
"displayArea": "customer",
|
||||
"viewMode": "editable",
|
||||
"dictionary": "test_dictionary",
|
||||
"default": 1,
|
||||
"defaultTyped": "test1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -296,7 +330,8 @@ EOF;
|
||||
"default": "false",
|
||||
"ordering": 50,
|
||||
"displayArea": "customer",
|
||||
"viewMode": "editable"
|
||||
"viewMode": "editable",
|
||||
"defaultTyped": false
|
||||
}
|
||||
}
|
||||
EOF;
|
||||
|
@ -191,7 +191,17 @@ class CustomersTest extends AbstractApiResourceGroupTestCase
|
||||
"allowedSendByPhone": false
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"customFields": {
|
||||
"bool_field": true,
|
||||
"string_field": "my_string",
|
||||
"float_field": 3.8,
|
||||
"dictionary": "test1",
|
||||
"multiselect_dictionary": [
|
||||
"test2",
|
||||
"test3"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -450,7 +450,12 @@ class OrdersTest extends AbstractApiResourceGroupTestCase
|
||||
"galka": false,
|
||||
"test_number": 0,
|
||||
"otpravit_dozakaz": false,
|
||||
"moyskladexternalid": "0f203a5f-7734-11eb-0a80-026b0001f435"
|
||||
"moyskladexternalid": "0f203a5f-7734-11eb-0a80-026b0001f435",
|
||||
"dictionary": "test2",
|
||||
"multiselect": [
|
||||
"test1",
|
||||
"test3"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user