diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod index 9d6a57ef2c1474184a09038d369b7f82ddfb9918..3eef0efb486ce5f5475060985092621781e35f0c 100644 --- a/entity/Offer_entity/Offer_entity.aod +++ b/entity/Offer_entity/Offer_entity.aod @@ -31,6 +31,7 @@ <title>Currency</title> <consumer>KeywordCurrencies</consumer> <mandatory v="true" /> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/currency/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/currency/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/currency/displayValueProcess.js</displayValueProcess> </entityField> @@ -50,11 +51,13 @@ <outputFormat>dd.MM.yyyy</outputFormat> <inputFormat>dd.MM.yyyy</inputFormat> <mandatory v="true" /> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/offerdate/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offerdate/valueProcess.js</valueProcess> </entityField> <entityField> <name>OFFERID</name> <title>OFFERID (UID)</title> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/offerid/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offerid/valueProcess.js</valueProcess> </entityField> <entityField> @@ -62,6 +65,7 @@ <title>Probability</title> <consumer>KeywordProbabilities</consumer> <contentType>NUMBER</contentType> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/probability/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/probability/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/probability/displayValueProcess.js</displayValueProcess> </entityField> @@ -70,6 +74,7 @@ <title>Status</title> <consumer>KeywordOfferStates</consumer> <mandatory v="true" /> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/status/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/status/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/status/displayValueProcess.js</displayValueProcess> </entityField> @@ -91,6 +96,7 @@ <name>HEADER</name> <title>Header text</title> <contentType>LONG_TEXT</contentType> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/header/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/header/valueProcess.js</valueProcess> </entityField> <entityConsumer> @@ -181,6 +187,7 @@ <name>OFFER_ID</name> <documentation>%aditoprj%/entity/Offer_entity/entityfields/offer_id/documentation.adoc</documentation> <title>OFFER_ID</title> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/offer_id/stateProcess.js</stateProcess> </entityField> <entityFieldGroup> <name>OfferCode_VersNr_fieldgroup</name> @@ -209,10 +216,12 @@ <entityField> <name>CONTACT_ORG_ID</name> <title>Company</title> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/contact_org_id/stateProcess.js</stateProcess> </entityField> <entityField> <name>CONTACT_PERSON_ID</name> <title>Person</title> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/contact_person_id/stateProcess.js</stateProcess> </entityField> <entityConsumer> <name>AnyContacts</name> @@ -274,6 +283,7 @@ <description></description> <contentType>LONG_TEXT</contentType> <mandatory v="true" /> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/address/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/address/valueProcess.js</valueProcess> </entityField> <entityField> @@ -503,6 +513,7 @@ <name>PAYMENTTERMS</name> <title>Payment term</title> <consumer>KeywordPaymentTerm</consumer> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/paymentterms/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/paymentterms/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/paymentterms/displayValueProcess.js</displayValueProcess> </entityField> @@ -510,6 +521,7 @@ <name>DELIVERYTERMS</name> <title>Delivery specification</title> <consumer>KeywordDeliveryTerm</consumer> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/deliveryterms/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/deliveryterms/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/deliveryterms/displayValueProcess.js</displayValueProcess> </entityField> @@ -568,6 +580,7 @@ <name>INFO</name> <title>Information</title> <contentType>LONG_TEXT</contentType> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/info/stateProcess.js</stateProcess> </entityField> <entityConsumer> <name>Attributes</name> @@ -643,6 +656,7 @@ <name>ChoosenTEXHeader</name> <title>Choose Header</title> <consumer>DocumentTemplateTexHeader</consumer> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/choosentexheader/stateProcess.js</stateProcess> </entityField> <entityField> <name>OBJECT_ROWID</name> @@ -787,6 +801,7 @@ <entityField> <name>chooseTEXHeader</name> <consumer>DocumentTemplateTex</consumer> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/choosetexheader/stateProcess.js</stateProcess> </entityField> <entityConsumer> <name>DocumentTemplateTexHeader</name> @@ -824,6 +839,7 @@ <name>FOOTER</name> <title>Footer text</title> <contentType>LONG_TEXT</contentType> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/footer/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/footer/valueProcess.js</valueProcess> </entityField> <entityParameter> @@ -835,6 +851,7 @@ <name>ChoosenTEXFooter</name> <title>Choose Footer</title> <consumer>DocumentTemplateTexFooter</consumer> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/choosentexfooter/stateProcess.js</stateProcess> </entityField> <entityConsumer> <name>DocumentTemplateTexFooter</name> @@ -891,6 +908,7 @@ <entityField> <name>LETTERSALUTATION</name> <title>Letter salutation</title> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/lettersalutation/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/lettersalutation/valueProcess.js</valueProcess> </entityField> <entityActionField> diff --git a/entity/Offer_entity/entityfields/address/stateProcess.js b/entity/Offer_entity/entityfields/address/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/address/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/choosentexfooter/stateProcess.js b/entity/Offer_entity/entityfields/choosentexfooter/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/choosentexfooter/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/choosentexheader/stateProcess.js b/entity/Offer_entity/entityfields/choosentexheader/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/choosentexheader/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/choosetexheader/stateProcess.js b/entity/Offer_entity/entityfields/choosetexheader/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/choosetexheader/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/chosenaddress/stateProcess.js b/entity/Offer_entity/entityfields/chosenaddress/stateProcess.js index 8553fd8936f517191bb51aacc3649a77359c9bed..a49551269900dfc2a17fc0db6f8e827da42d2a46 100644 --- a/entity/Offer_entity/entityfields/chosenaddress/stateProcess.js +++ b/entity/Offer_entity/entityfields/chosenaddress/stateProcess.js @@ -1,8 +1,9 @@ -import("system.vars"); +import("Offer_lib"); import("system.result"); import("system.neon"); +import("system.vars"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW) result.string(neon.COMPONENTSTATE_INVISIBLE); else - result.string(neon.COMPONENTSTATE_EDITABLE); \ No newline at end of file + result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_EDITABLE : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/contact_id/stateProcess.js b/entity/Offer_entity/entityfields/contact_id/stateProcess.js index f246db11722b6d2cca8a3a3144177f2dcd78a677..e64c4d20acc8987719c1a474f96da92ddce301e4 100644 --- a/entity/Offer_entity/entityfields/contact_id/stateProcess.js +++ b/entity/Offer_entity/entityfields/contact_id/stateProcess.js @@ -1,7 +1,10 @@ +import("Offer_lib"); import("system.result"); -import("system.vars"); import("system.neon"); +import("system.vars"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT || (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param"))) - result.string(neon.COMPONENTSTATE_READONLY); \ No newline at end of file + result.string(neon.COMPONENTSTATE_READONLY); +else + result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/contact_org_id/stateProcess.js b/entity/Offer_entity/entityfields/contact_org_id/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/contact_org_id/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/contact_person_id/stateProcess.js b/entity/Offer_entity/entityfields/contact_person_id/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/contact_person_id/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/currency/stateProcess.js b/entity/Offer_entity/entityfields/currency/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/currency/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/deliveryterms/stateProcess.js b/entity/Offer_entity/entityfields/deliveryterms/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/deliveryterms/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/footer/stateProcess.js b/entity/Offer_entity/entityfields/footer/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/footer/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/header/stateProcess.js b/entity/Offer_entity/entityfields/header/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/header/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/info/stateProcess.js b/entity/Offer_entity/entityfields/info/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/info/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/isolanguage/stateProcess.js b/entity/Offer_entity/entityfields/isolanguage/stateProcess.js index 05ceada3a320c2eed56dab6341368a831ee73b1e..060fbc1396ae5f8617153cb4c925e31f0fae84c3 100644 --- a/entity/Offer_entity/entityfields/isolanguage/stateProcess.js +++ b/entity/Offer_entity/entityfields/isolanguage/stateProcess.js @@ -1,10 +1,11 @@ +import("Offer_lib"); import("system.result"); import("system.neon"); import("system.vars"); if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) { - result.string(neon.COMPONENTSTATE_EDITABLE); + result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_EDITABLE : neon.COMPONENTSTATE_DISABLED); } else { diff --git a/entity/Offer_entity/entityfields/lettersalutation/stateProcess.js b/entity/Offer_entity/entityfields/lettersalutation/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/lettersalutation/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/object_rowid/stateProcess.js b/entity/Offer_entity/entityfields/object_rowid/stateProcess.js index a69c939f7d40740ebb993eddb54960cdec74d493..f1db45bc94e4f54be9d2e9379dc164ccb23eba9d 100644 --- a/entity/Offer_entity/entityfields/object_rowid/stateProcess.js +++ b/entity/Offer_entity/entityfields/object_rowid/stateProcess.js @@ -1,3 +1,4 @@ +import("Offer_lib"); import("system.neon"); import("system.result"); import("system.vars"); @@ -15,4 +16,6 @@ switch (vars.get("$sys.recordstate")) default: result.object(neon.COMPONENTSTATE_READONLY); } -*/ \ No newline at end of file +*/ + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/offer_id/stateProcess.js b/entity/Offer_entity/entityfields/offer_id/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/offer_id/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/offerdate/stateProcess.js b/entity/Offer_entity/entityfields/offerdate/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/offerdate/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/offerid/stateProcess.js b/entity/Offer_entity/entityfields/offerid/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/offerid/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/paymentterms/stateProcess.js b/entity/Offer_entity/entityfields/paymentterms/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/paymentterms/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/probability/stateProcess.js b/entity/Offer_entity/entityfields/probability/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3625a84172ccbedf97a4a6aa2c74ff6f9fe83679 --- /dev/null +++ b/entity/Offer_entity/entityfields/probability/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/status/stateProcess.js b/entity/Offer_entity/entityfields/status/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..2f47d5d1011fd2ccbe859630ac7904f21f4c6a09 --- /dev/null +++ b/entity/Offer_entity/entityfields/status/stateProcess.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); +import("KeywordRegistry_basic"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) || vars.get("$field.STATUS") == $KeywordRegistry.offerStatus$sent() ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file diff --git a/entity/Offer_entity/grantUpdateProcess.js b/entity/Offer_entity/grantUpdateProcess.js index 1a954c942613dda279e45f7b7956110af83c58c9..f022059101691315bf584048dfcd766f0d747cdf 100644 --- a/entity/Offer_entity/grantUpdateProcess.js +++ b/entity/Offer_entity/grantUpdateProcess.js @@ -1,5 +1,2 @@ -import("system.vars"); -import("system.result"); -import("Offer_lib"); - -result.string(OfferUtils.isEditable(vars.get("$field.STATUS"))); \ No newline at end of file +// as one field (status) should be editable if status is sent and all other not, it is done by a state process in each field. +// using the grant update would also disable the status field. \ No newline at end of file diff --git a/process/Offer_lib/process.js b/process/Offer_lib/process.js index c9372d0b94322fd67e926278c1e0b9ec7f6696f4..91ca23abe7a4bc2a80ae7a6d2fb1539ce1cdf7cd 100644 --- a/process/Offer_lib/process.js +++ b/process/Offer_lib/process.js @@ -61,7 +61,7 @@ OfferUtils.getOfferNumberValidationFailString = function() { OfferUtils.isEditable = function(status) { // TODO: Administrator darf immer ändern, warten auf neue Berechtigungslogik? // Offer should be editable if offer state not equals "Sent", "Won" or "Lost" - return status != $KeywordRegistry.offerStatus$won() && status != $KeywordRegistry.offerStatus$lost(); + return status != $KeywordRegistry.offerStatus$sent() && status != $KeywordRegistry.offerStatus$won() && status != $KeywordRegistry.offerStatus$lost(); } OfferUtils.isDeletable = function(status) {