Skip to content
Snippets Groups Projects
Commit 9680abda authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

state processes in offer consumers

parent 67630709
No related branches found
No related tags found
No related merge requests found
......@@ -223,6 +223,7 @@
<entityConsumer>
<name>Documents</name>
<selectionMode>MULTI</selectionMode>
<stateProcess>%aditoprj%/entity/Offer_entity/entityfields/documents/stateProcess.js</stateProcess>
<dependency>
<name>dependency</name>
<entityName>Document_entity</entityName>
......@@ -556,6 +557,7 @@
</entityField>
<entityConsumer>
<name>Attributes</name>
<stateProcess>%aditoprj%/entity/Offer_entity/entityfields/attributes/stateProcess.js</stateProcess>
<onValidation>%aditoprj%/entity/Offer_entity/entityfields/attributes/onValidation.js</onValidation>
<dependency>
<name>dependency</name>
......
import("Offer_lib");
import("Sql_lib");
import("system.vars");
import("system.db");
import("system.neon");
import("system.result");
if (OfferUtils.isEditable(vars.get("$field.STATUS")))
{
result.string(neon.COMPONENTSTATE_EDITABLE);
}
else
{
result.string(neon.COMPONENTSTATE_READONLY);
}
\ No newline at end of file
import("system.logging");
import("system.vars");
import("Offer_lib");
import("system.result");
import("system.neon");
if (OfferUtils.isEditable(vars.get("$field.STATUS")))
{
result.string(neon.COMPONENTSTATE_EDITABLE);
}
else
{
result.string(neon.COMPONENTSTATE_READONLY);
}
\ No newline at end of file
import("Offer_lib");
import("system.result");
import("system.db");
import("system.vars");
import("system.neon");
import("Sql_lib");
if (0 == db.getBinaryCount("OFFER", "DOCUMENT", vars.get("$sys.uid"), SqlUtils.getSystemAlias(), "MAINDOCUMENT"))
if (OfferUtils.isEditable(vars.get("$field.STATUS")))
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
if (0 == db.getBinaryCount("OFFER", "DOCUMENT", vars.get("$sys.uid"), SqlUtils.getSystemAlias(), "MAINDOCUMENT"))
{
result.string(neon.COMPONENTSTATE_INVISIBLE);
}
else
{
result.string(neon.COMPONENTSTATE_EDITABLE);
}
}
else
{
result.string(neon.COMPONENTSTATE_EDITABLE);
result.string(neon.COMPONENTSTATE_READONLY);
}
\ No newline at end of file
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