Skip to content
Snippets Groups Projects
Commit 5a64008e authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1032312][Keywords für bestehende Module anlegen]

parent 4afa06a6
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<column name="SALESORDER_ID" type="CHAR(36)"/> <column name="SALESORDER_ID" type="CHAR(36)"/>
<column name="UNIT" type="INTEGER"/> <column name="UNIT" type="INTEGER"/>
<column name="QUANTITY" type="NUMERIC(14,2)"/> <column name="QUANTITY" type="NUMERIC(14,2)"/>
<column name="GROUPCODEID" type="INTEGER"/> <column name="GROUPCODEID" type="CHAR(36)"/>
<column name="ASSIGNEDTO" type="CHAR(36)"> <column name="ASSIGNEDTO" type="CHAR(36)">
<constraints foreignKeyName="FK_SALESORDERITEM_ASSIGNEDTO" references="SALESORDERITEM(SALESORDERITEMID)"/> <constraints foreignKeyName="FK_SALESORDERITEM_ASSIGNEDTO" references="SALESORDERITEM(SALESORDERITEMID)"/>
</column> </column>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<constraints nullable="false"/> <constraints nullable="false"/>
</column> </column>
<column name="GROUPCODE" type="INTEGER"/> <column name="GROUPCODE" type="CHAR(36)"/>
<column name="INFO" type="NCLOB"/> <column name="INFO" type="NCLOB"/>
<column name="DATE_START" type="TIMESTAMP"/> <column name="DATE_START" type="TIMESTAMP"/>
<column name="TYPE" type="NVARCHAR(10)"/> <column name="TYPE" type="NVARCHAR(10)"/>
......
...@@ -4,6 +4,36 @@ import("system.db"); ...@@ -4,6 +4,36 @@ import("system.db");
import("system.translate"); import("system.translate");
import("system.neon"); import("system.neon");
import("Sql_lib"); import("Sql_lib");
/**
* provides static functionality for a registry of keywords
* The main reason for this is a convenient usage within jdito-code (autocomplete)
* never use these registered keywords directly in an library - only within function definition that are called later
* the reason behind this is that the registry is initalized at the position of the Keyword_lib-import;
* That means, if a value of the registry is used before the import of the Keyword_lib the registry is not set
*
* This is a very special case of an object and should not be used as a refernece for own implementations since the requirements will be different
*
* @class
*/
function $KeywordRegistry(){}
//static property
$KeywordRegistry.get = {
ContractPayment: "ContractPayment",
ContractStatus: "ContractStatus",
ContractType: "ContractType",
ActivityDirection: "ActivityDirection",
RelationStatus: "RelationStatus",
Currency: "Currency",
ProductGroupcode: "ProductGroupcode",
OfferStatus: "OfferStatus",
OrganisationType: "OrganisationType",
"null": null
};
Object.freeze($KeywordRegistry.get);
/** /**
* provides methods for interactions with keywords * provides methods for interactions with keywords
* *
...@@ -128,13 +158,6 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL ...@@ -128,13 +158,6 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL
} }
switch (keywordType){ switch (keywordType){
case "RELATION.STATUS":
valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("0", translate.text("Inactive", locale))
,_createKeywordEntry("1", translate.text("Active", locale))
,_createKeywordEntry("2", translate.text("In review", locale))
]);
break;
case "COUNTRY": case "COUNTRY":
valueContainer = _createKeywordEntriesContainer([ valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("DE", translate.text("Germany", locale)) _createKeywordEntry("DE", translate.text("Germany", locale))
...@@ -154,13 +177,6 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL ...@@ -154,13 +177,6 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL
,_createKeywordEntry("no-NO", translate.text("Norwegian", locale)) ,_createKeywordEntry("no-NO", translate.text("Norwegian", locale))
]); ]);
break; break;
case "ACTIVITY.DIRECTION":
valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("i", translate.text("Incoming", locale))
,_createKeywordEntry("o", translate.text("Outgoing", locale))
,_createKeywordEntry("p", translate.text("Internal", locale))
]);
break;
case "ACTIVITY.CATEGORY": case "ACTIVITY.CATEGORY":
valueContainer = _createKeywordEntriesContainer([ valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("0", translate.text("Visit", locale), null, {defaultAvatarRepresentation: "VAADIN:TRAIN"}) _createKeywordEntry("0", translate.text("Visit", locale), null, {defaultAvatarRepresentation: "VAADIN:TRAIN"})
...@@ -185,14 +201,6 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL ...@@ -185,14 +201,6 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL
,_createKeywordEntry("4", translate.text("Post office box", locale), null, {org: true, pers: true}) ,_createKeywordEntry("4", translate.text("Post office box", locale), null, {org: true, pers: true})
]); ]);
break; break;
case "ORG.TYPE":
valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("0", translate.text("Customer", locale))
,_createKeywordEntry("1", translate.text("Prospect", locale))
,_createKeywordEntry("2", translate.text("Supplier", locale))
,_createKeywordEntry("3", translate.text("${ORGTYPE_OTHER}", locale))
]);
break;
case "PERS.GENDER": case "PERS.GENDER":
valueContainer = _createKeywordEntriesContainer([ valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("f", translate.text("Female", locale)) _createKeywordEntry("f", translate.text("Female", locale))
...@@ -200,29 +208,6 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL ...@@ -200,29 +208,6 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL
,_createKeywordEntry("o", translate.text("${GENDER_OTHER}", locale)) ,_createKeywordEntry("o", translate.text("${GENDER_OTHER}", locale))
]); ]);
break; break;
case "CONTRACT.CONTRACTTYPE":
valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("0", translate.text("Framework contract", locale))
,_createKeywordEntry("1", translate.text("Service contract", locale))
,_createKeywordEntry("2", translate.text("Maintenance contract", locale))
]);
break;
case "CONTRACT.CONTRACTSTATUS":
valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("0", translate.text("Valid, unlimited", locale))
,_createKeywordEntry("1", translate.text("Valid, limited", locale))
,_createKeywordEntry("2", translate.text("Not signed yet", locale))
,_createKeywordEntry("3", translate.text("None, individual count", locale))
,_createKeywordEntry("4", translate.text("Resigned", locale))
]);
break;
case "CONTRACT.PAYMENT":
valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("0", translate.text("Annually", locale))
,_createKeywordEntry("1", translate.text("Semiannually", locale))
,_createKeywordEntry("2", translate.text("Quarterly", locale))
]);
break;
case "GROUPCODE": case "GROUPCODE":
valueContainer = _createKeywordEntriesContainer([ valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("1", translate.text("Commodity group 1", locale)) _createKeywordEntry("1", translate.text("Commodity group 1", locale))
...@@ -249,14 +234,6 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL ...@@ -249,14 +234,6 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL
,_createKeywordEntry("4", translate.text("${PRICELIST_SERVICE}", locale)) ,_createKeywordEntry("4", translate.text("${PRICELIST_SERVICE}", locale))
]); ]);
break; break;
case "CURRENCY":
valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("1", translate.text("EUR", locale))
,_createKeywordEntry("2", translate.text("USD", locale))
,_createKeywordEntry("3", translate.text("CND", locale))
,_createKeywordEntry("4", translate.text("CHF", locale))
]);
break;
case "STOCK.WAREHOUSE": case "STOCK.WAREHOUSE":
valueContainer = _createKeywordEntriesContainer([ valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("1", translate.text("Warehouse 1", locale)) _createKeywordEntry("1", translate.text("Warehouse 1", locale))
...@@ -435,14 +412,6 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL ...@@ -435,14 +412,6 @@ KeywordUtils.getResolvedTitleSqlPart = function(pContainerName, pDbFieldName, pL
,_createKeywordEntry("5", translate.text("100 %", locale), null, {percentValue: 100}) ,_createKeywordEntry("5", translate.text("100 %", locale), null, {percentValue: 100})
]); ]);
break; break;
case "OFFER.STATUS":
valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("1", translate.text("Checked", locale))
,_createKeywordEntry("2", translate.text("Sent", locale))
,_createKeywordEntry("3", translate.text("Won", locale))
,_createKeywordEntry("4", translate.text("Lost", locale))
]);
break;
case "SALESORDER.STATUS": case "SALESORDER.STATUS":
valueContainer = _createKeywordEntriesContainer([ valueContainer = _createKeywordEntriesContainer([
_createKeywordEntry("1", translate.text("Checked", locale)) _createKeywordEntry("1", translate.text("Checked", locale))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment