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

use state processes of all fields in offer instead of the grantUpdateProcess

parent 8dc6701e
No related branches found
No related tags found
No related merge requests found
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
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
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
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
......@@ -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) {
......
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