sozsoft-platform/api/src/Sozsoft.Platform.Domain/Queries/CommandColumn.cs
Sedat Öztürk 429227df1d Initial
2026-02-24 23:44:16 +03:00

83 lines
3.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections.Generic;
using Sozsoft.Platform.Enums;
using Volo.Abp.Domain.Values;
namespace Sozsoft.Platform.Queries;
public class CommandColumn : ValueObject
{
/// <summary> Gridde kullanılacak fonksiyon butonlarının konumunu belirler
/// </summary>
public UiCommandButtonPositionTypeEnum ButtonPosition { get; set; } = UiCommandButtonPositionTypeEnum.CommandColumn;
/// <summary> Burada yazan yetki ismi kullanicilarin yetkisinde varsa ilgili fonksiyon/buton gorunur olur.
/// Boş bırakılmış ise yetkisi var sayılır
/// CommandColumn icerisindeki buton icin yeni bir yetki tanimi yapilir, tanimi yapilan yetkinin ismi buraya yazilir
/// </summary>
public string AuthName { get; set; }
/// <summary> Eklenecek butonun görünen ismi
/// </summary>
public string Text { get; set; }
/// <summary> Fare ile bağlantı yada icon üzerine gelince çıkacak yazı
/// </summary>
public string Hint { get; set; }
/// <summary>
/// Alabilecegi degerler:
/// Url
/// The icon's name if the icon is from the DevExtreme icon library: https://js.devexpress.com/Documentation/Guide/Themes_and_Styles/Icons/#Built-In_Icon_Library
/// The icon's CSS class if the icon is from an external icon library (see External Icon Libraries)
/// The icon in the Base64 format
/// The icon in the SVG format. Ensure that the source is reliable.
///
/// https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxContextMenu/Configuration/items/#icon
/// </summary>
public string Icon { get; set; }
/// <summary> Tiklandiginda calistirilacak baglanti
/// url icerisine süslü parantez ile {alanismi} girid icerisindeki kolonlarin FieldName bilgileri yazilabilir.
/// Bu sekilde ilgili baglanti dinamik olarak olusturulabilir
/// Ek olarak yazilabilecek parametreler:
/// {ListFormCode}
/// </summary>
public string Url { get; set; }
/// <summary>
/// Alabilecegi Degerler: _blank
/// _parent
/// _self
/// _top
/// </summary>
public string UrlTarget { get; set; }
/// <summary> UI tarafında çağrılacak dialog component adı
/// </summary>
public string DialogName { get; set; }
/// <summary> UI tarafında çağrılacak dialog component parametrelerier
/// </summary>
public string DialogParameters { get; set; }
/// <summary> Url boş ise calisacak 'eval' icerisinde calisacak olan kod
/// </summary>
public string OnClick { get; set; }
/// <summary> Görünür durumu
/// </summary>
public bool IsVisible { get; set; } = true;
/// <summary> Dinamik görünürlük kontrolü için JavaScript fonksiyonu
/// Örnek: "(e) => !e.row.isEditing" veya "(e) => e.row.data.Status === 'Active'"
/// Fonksiyon parametre olarak DevExtreme button event objesini alır (e.row, e.row.data, e.row.isEditing vb.)
/// true/false döndürmelidir
/// </summary>
public string VisibleExpression { get; set; }
protected override IEnumerable<object> GetAtomicValues()
{
yield return ButtonPosition;
yield return AuthName;
yield return Text;
yield return Hint;
yield return Icon;
yield return Url;
yield return UrlTarget;
yield return DialogName;
yield return DialogParameters;
yield return OnClick;
yield return IsVisible;
yield return VisibleExpression;
}
}