diff --git a/entity/Productprice_entity/Productprice_entity.aod b/entity/Productprice_entity/Productprice_entity.aod index b28ece7b968231503e48f774f9d7a5531da15b59..20e53fc299aadd601a2a2fed53c8ab2ee8e05b96 100644 --- a/entity/Productprice_entity/Productprice_entity.aod +++ b/entity/Productprice_entity/Productprice_entity.aod @@ -102,6 +102,7 @@ <name>PRICELIST</name> <documentation>%aditoprj%/entity/Productprice_entity/entityfields/pricelist/documentation.adoc</documentation> <title>Price list</title> + <colorProcess>%aditoprj%/entity/Productprice_entity/entityfields/pricelist/colorProcess.js</colorProcess> <consumer>KeywordPricelists</consumer> <state>AUTO</state> <stateProcess>%aditoprj%/entity/Productprice_entity/entityfields/pricelist/stateProcess.js</stateProcess> diff --git a/entity/Productprice_entity/entityfields/image/valueProcess.js b/entity/Productprice_entity/entityfields/image/valueProcess.js index 8ba121f73f08d59b6efda0fbaa02d9761e31b5b3..adbcde4fe369ba6683fcfb308ffbb6ae8c74639c 100644 --- a/entity/Productprice_entity/entityfields/image/valueProcess.js +++ b/entity/Productprice_entity/entityfields/image/valueProcess.js @@ -1,4 +1,4 @@ import("system.vars"); import("system.result"); -result.string("TEXT:" + vars.getString("$field.PRICELIST.displayValue")); \ No newline at end of file +result.string("TEXT:" + vars.getString("$field.PRODUCT_ID.displayValue")); \ No newline at end of file diff --git a/entity/Productprice_entity/entityfields/pricelist/colorProcess.js b/entity/Productprice_entity/entityfields/pricelist/colorProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..df4926b10119acd76184d30eb15a8ea1dc63d4d3 --- /dev/null +++ b/entity/Productprice_entity/entityfields/pricelist/colorProcess.js @@ -0,0 +1,25 @@ +import("system.result"); +import("KeywordRegistry_basic"); +import("system.vars"); +import("system.neon"); + +let color; + +switch (vars.get("$field.PRICELIST")) +{ + case $KeywordRegistry.productPricelist$keyList(): + color = neon.PRIORITY_LOW_COLOR; + break; + case $KeywordRegistry.productPricelist$specialList(): + color = neon.PRIORITY_HIGH_COLOR; + break; + case $KeywordRegistry.productPricelist$serviceList(): + color = neon.PRIORITY_NONE_COLOR + break; + case $KeywordRegistry.productPricelist$standardList(): + default: + color = neon.BRAND_COLOR; + break; +} + +result.string(color); \ No newline at end of file diff --git a/neonView/ProductpriceFilter_view/ProductpriceFilter_view.aod b/neonView/ProductpriceFilter_view/ProductpriceFilter_view.aod index 896078f3187b59918e2fdbcd20b65824c5e40cd7..9680051e7399c4618b4de58476ce62cceb09a850 100644 --- a/neonView/ProductpriceFilter_view/ProductpriceFilter_view.aod +++ b/neonView/ProductpriceFilter_view/ProductpriceFilter_view.aod @@ -107,6 +107,7 @@ <element>PRICE</element> <element>VALID_FROM</element> <element>VALID_TO</element> + <element>PRODUCT_ID</element> </editableColumns> <columns> <neonTableColumn> @@ -140,11 +141,18 @@ </columns> <editRendererMapping> <rendererMappingEntry> - <name>cef3f0d1-1976-4c69-add7-49a37893c56b</name> + <name>6bd04999-36b5-4278-a975-a24414058b8e</name> <fieldName>PRICE</fieldName> <renderer>numberInput</renderer> </rendererMappingEntry> </editRendererMapping> + <viewRendererMapping> + <rendererMappingEntry> + <name>cece5a67-394e-4fd2-8b2d-f39660290cee</name> + <fieldName>PRICELIST</fieldName> + <renderer>badge</renderer> + </rendererMappingEntry> + </viewRendererMapping> </multiEditTableViewTemplate> </children> </neonView> diff --git a/process/KeywordRegistry_basic/process.js b/process/KeywordRegistry_basic/process.js index fcb12948f27d859bc23f374130bc4d2a85ffb97f..e9326c6bf15cb78a89fd3117984cbce0fd9c387b 100644 --- a/process/KeywordRegistry_basic/process.js +++ b/process/KeywordRegistry_basic/process.js @@ -82,6 +82,9 @@ $KeywordRegistry.ticketType$supportTicket = function(){return "SUPPORTTICKET";}; $KeywordRegistry.productPricelist = function(){return "ProductPricelist";}; $KeywordRegistry.productPricelist$standardList = function(){return "PRICELISTDEFAULT";}; +$KeywordRegistry.productPricelist$keyList = function(){return "PRICELISTKEY";}; +$KeywordRegistry.productPricelist$specialList = function(){return "PRICELISTSPECIAL";}; +$KeywordRegistry.productPricelist$serviceList = function(){return "PRICELISTSERVICE";}; $KeywordRegistry.quantityUnit = function(){return "QuantityUnit";}; $KeywordRegistry.quantityUnit$pieces = function(){return "QUANTITYPIECES";};