From 2fa772854d39d0f5f4e9dccc3b38378d7a9c8682 Mon Sep 17 00:00:00 2001 From: Olmo del Corral Date: Wed, 16 Sep 2020 23:32:57 +0200 Subject: [PATCH] add MultiSetter --- Signum.Entities/EnumMessages.cs | 2 ++ Signum.React/Scripts/Operations/ContextualOperations.tsx | 2 +- Signum.React/Scripts/Signum.Entities.ts | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Signum.Entities/EnumMessages.cs b/Signum.Entities/EnumMessages.cs index 241a3c3e4b..3308218a0b 100644 --- a/Signum.Entities/EnumMessages.cs +++ b/Signum.Entities/EnumMessages.cs @@ -44,6 +44,8 @@ public enum OperationMessage Setters, [Description("Add setter")] AddSetter, + [Description("multi setter")] + MultiSetter, } public enum SynchronizerMessage diff --git a/Signum.React/Scripts/Operations/ContextualOperations.tsx b/Signum.React/Scripts/Operations/ContextualOperations.tsx index 9d5ba58219..8fe8cfc34a 100644 --- a/Signum.React/Scripts/Operations/ContextualOperations.tsx +++ b/Signum.React/Scripts/Operations/ContextualOperations.tsx @@ -227,7 +227,7 @@ export namespace MenuItemConstructor { //To allow monkey patching const text = coc.settings && coc.settings.text ? coc.settings.text() : coc.entityOperationSettings?.text ? coc.entityOperationSettings.text() : - simplifyName(coc.operationInfo.niceName); + <>{simplifyName(coc.operationInfo.niceName)}{coc.operationInfo.canBeModified ? {OperationMessage.MultiSetter.niceToString()} : null}; const color = coc.settings?.color ?? coc.entityOperationSettings?.color ?? Defaults.getColor(coc.operationInfo); const icon = coalesceIcon(coc.settings?.icon, coc.entityOperationSettings?.icon); diff --git a/Signum.React/Scripts/Signum.Entities.ts b/Signum.React/Scripts/Signum.Entities.ts index b144b9de41..1d9bb8e991 100644 --- a/Signum.React/Scripts/Signum.Entities.ts +++ b/Signum.React/Scripts/Signum.Entities.ts @@ -401,6 +401,7 @@ export module OperationMessage { export const Predictate = new MessageKey("OperationMessage", "Predictate"); export const Setters = new MessageKey("OperationMessage", "Setters"); export const AddSetter = new MessageKey("OperationMessage", "AddSetter"); + export const MultiSetter = new MessageKey("OperationMessage", "MultiSetter"); } export const OperationSymbol = new Type("Operation");