Grid CommandColumn IsVisible ve Visible Expression
This commit is contained in:
parent
1745707691
commit
abd7dd05fd
26 changed files with 359 additions and 253 deletions
|
|
@ -52,5 +52,14 @@ public class CommandColumnDto
|
|||
/// <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; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4141,6 +4141,12 @@
|
|||
"en": "Authorization Type",
|
||||
"tr": "Yetkilendirme Türü"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.CommandUrl",
|
||||
"en": "Url",
|
||||
"tr": "Url"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.CommandUrlOptions",
|
||||
|
|
@ -4153,6 +4159,18 @@
|
|||
"en": "Url Target",
|
||||
"tr": "Url Türü"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.CommandVisible",
|
||||
"en": "Visible",
|
||||
"tr": "Görünür"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.CommandVisibleExpression",
|
||||
"en": "Visible Expression",
|
||||
"tr": "Görünür İfade"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.WidgetsDescription",
|
||||
|
|
@ -9472,7 +9490,7 @@
|
|||
"resourceName": "Platform",
|
||||
"key": "App.Maintenance.Workorders",
|
||||
"tr": "Bakım İş Emirleri",
|
||||
"en": "Maintenance Workorders"
|
||||
"en": "Workorders"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
|
|||
|
|
@ -105,7 +105,8 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Accounting.BankAccount,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Bank)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Bank)}/@Id",
|
||||
IsVisible = true
|
||||
},
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
|
|
|
|||
|
|
@ -641,9 +641,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
Text = "Permission",
|
||||
AuthName = PlatformConsts.IdentityPermissions.Roles.ManagePermissions,
|
||||
DialogName = "RolesPermission",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
name = "@Name",
|
||||
})
|
||||
DialogParameters = JsonSerializer.Serialize(new { name = "@Name" }),
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
|
|
@ -769,22 +768,21 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
InsertServiceAddress = "list-form-dynamic-api/user-insert",
|
||||
UpdateServiceAddress = "list-form-dynamic-api/user-update",
|
||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||
new CommandColumnDto() {
|
||||
new() {
|
||||
Hint = "Detail",
|
||||
Text ="Detail",
|
||||
UrlTarget="_blank",
|
||||
AuthName=PlatformConsts.IdentityPermissions.Users.Update,
|
||||
Url="/admin/users/detail/@Id"
|
||||
Url="/admin/users/detail/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
new CommandColumnDto() {
|
||||
new() {
|
||||
Hint = "Permission",
|
||||
Text = "Permission",
|
||||
AuthName = PlatformConsts.IdentityPermissions.Users.ManagePermissions,
|
||||
DialogName = "UsersPermission",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
name = "@Email",
|
||||
id = "@Id"
|
||||
})
|
||||
DialogParameters = JsonSerializer.Serialize(new { name = "@Email", id = "@Id" }),
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
|
|
@ -1102,9 +1100,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
Text = "Details",
|
||||
AuthName = AppCodes.AuditLogs,
|
||||
DialogName = "AuditLogDetail",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
id = "@Id",
|
||||
})
|
||||
DialogParameters = JsonSerializer.Serialize(new { id = "@Id" }),
|
||||
IsVisible = true
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
|
@ -1308,6 +1305,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
Text = "Swagger",
|
||||
AuthName=AppCodes.DeveloperKits.CustomEndpoints,
|
||||
Url= swaggerRootUrl + "/swagger/index.html",
|
||||
IsVisible = true
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
|
@ -4092,7 +4090,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Definitions.Skill,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.SkillType)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.SkillType)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true);
|
||||
|
|
@ -4428,7 +4427,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Definitions.Uom,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.UomCategory)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.UomCategory)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true);
|
||||
|
|
|
|||
|
|
@ -2050,6 +2050,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Definitions.Question,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.QuestionPool)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
@ -2170,9 +2171,8 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
Text = "Answers",
|
||||
AuthName = AppCodes.Definitions.Question,
|
||||
DialogName = "QuestionAnswers",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
id = "@Id"
|
||||
})
|
||||
DialogParameters = JsonSerializer.Serialize(new { id = "@Id" }),
|
||||
IsVisible = true
|
||||
},
|
||||
}),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
|
|
|
|||
|
|
@ -388,7 +388,8 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Crm.Customer,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Customer)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Customer)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true);
|
||||
|
|
@ -1179,7 +1180,8 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Crm.Opportunity,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Opportunity)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Opportunity)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
|
|||
|
|
@ -2052,25 +2052,26 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Text ="Toplu İzin",
|
||||
AuthName = AppCodes.Hr.Leave + ".Update",
|
||||
DialogName = "CollectiveLeave",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
name = "@Name",
|
||||
id = "@Id"
|
||||
})
|
||||
DialogParameters = JsonSerializer.Serialize(new { name = "@Name", id = "@Id" }),
|
||||
IsVisible=true,
|
||||
},
|
||||
new() {
|
||||
Hint = "Accept",
|
||||
Text ="Accept",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.Leave + ".Update",
|
||||
Url="/admin/list/list-employees/@Id"
|
||||
Url="/admin/list/list-employees/@Id",
|
||||
IsVisible=true,
|
||||
VisibleExpression="(e) => e.row.data.Status === 'Askıda'"
|
||||
},
|
||||
new() {
|
||||
Hint = "Reject",
|
||||
Text ="Reject",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.Leave + ".Update",
|
||||
Url="/admin/list/list-employees/@Id"
|
||||
},
|
||||
Url="/admin/list/list-employees/@Id",
|
||||
IsVisible=true,
|
||||
VisibleExpression="(e) => e.row.data.Status === 'Askıda'" },
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
|
@ -2378,24 +2379,26 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Text ="Toplu Mesai",
|
||||
AuthName = AppCodes.Hr.Overtime + ".Update",
|
||||
DialogName = "CollectiveOvertime",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
name = "@Name",
|
||||
id = "@Id"
|
||||
})
|
||||
DialogParameters = JsonSerializer.Serialize(new { name = "@Name", id = "@Id" }),
|
||||
IsVisible=true,
|
||||
},
|
||||
new() {
|
||||
Hint = "Accept",
|
||||
Text ="Accept",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.Overtime + ".Update",
|
||||
Url="/admin/list/list-employees/@Id"
|
||||
Url="/admin/list/list-employees/@Id",
|
||||
IsVisible=true,
|
||||
VisibleExpression="(e) => e.row.data.Status === 'Askıda'"
|
||||
},
|
||||
new() {
|
||||
Hint = "Reject",
|
||||
Text ="Reject",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.Overtime + ".Update",
|
||||
Url="/admin/list/list-employees/@Id"
|
||||
Url="/admin/list/list-employees/@Id",
|
||||
IsVisible=true,
|
||||
VisibleExpression="(e) => e.row.data.Status === 'Askıda'"
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
|
@ -2703,14 +2706,18 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Text ="Accept",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.Expense + ".Update",
|
||||
Url="/admin/list/list-employees/@Id"
|
||||
Url="/admin/list/list-employees/@Id",
|
||||
IsVisible=true,
|
||||
VisibleExpression="(e) => e.row.data.Status === 'Askıda'"
|
||||
},
|
||||
new() {
|
||||
Hint = "Reject",
|
||||
Text ="Reject",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.Expense + ".Update",
|
||||
Url="/admin/list/list-employees/@Id"
|
||||
Url="/admin/list/list-employees/@Id",
|
||||
IsVisible=true,
|
||||
VisibleExpression="(e) => e.row.data.Status === 'Askıda'"
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
|
@ -2996,31 +3003,34 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Text ="Toplu Bordro",
|
||||
AuthName = AppCodes.Hr.Payroll + ".Update",
|
||||
DialogName = "CollectivePayroll",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
name = "@Name",
|
||||
id = "@Id"
|
||||
})
|
||||
DialogParameters = JsonSerializer.Serialize(new { name = "@Name", id = "@Id" }),
|
||||
IsVisible=true,
|
||||
},
|
||||
new() {
|
||||
Hint = "Ödeme & Kesinti",
|
||||
Text ="Ödeme & Kesinti",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.Payroll + ".Update",
|
||||
Url="/admin/list/list-employees/@Id"
|
||||
Url="/admin/list/list-employees/@Id",
|
||||
IsVisible=true,
|
||||
},
|
||||
new() {
|
||||
Hint = "Accept",
|
||||
Text ="Accept",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.Payroll + ".Update",
|
||||
Url="/admin/list/list-employees/@Id"
|
||||
Url="/admin/list/list-employees/@Id",
|
||||
IsVisible=true,
|
||||
VisibleExpression="(e) => e.row.data.Status === 'Taslak'"
|
||||
},
|
||||
new() {
|
||||
Hint = "Reject",
|
||||
Text ="Reject",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.Payroll + ".Update",
|
||||
Url="/admin/list/list-employees/@Id"
|
||||
Url="/admin/list/list-employees/@Id",
|
||||
IsVisible=true,
|
||||
VisibleExpression="(e) => e.row.data.Status === 'Taslak'"
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
|
@ -3339,10 +3349,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Text = "Questions",
|
||||
AuthName = TenantManagementPermissions.Tenants.ManageConnectionStrings,
|
||||
DialogName = "Template360Questions",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
name = "@Name",
|
||||
id = "@Id"
|
||||
})
|
||||
DialogParameters = JsonSerializer.Serialize(new { name = "@Name", id = "@Id"}),
|
||||
IsVisible=true
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
|
@ -3494,10 +3502,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Text = "Evaluations",
|
||||
AuthName = TenantManagementPermissions.Tenants.ManageConnectionStrings,
|
||||
DialogName = "Evaluation360",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
name = "@Name",
|
||||
id = "@Id"
|
||||
})
|
||||
DialogParameters = JsonSerializer.Serialize(new { name = "@Name", id = "@Id" }),
|
||||
IsVisible=true,
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
|
@ -3728,15 +3734,13 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
new() { FieldName = "MaxParticipants", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
}),
|
||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||
new CommandColumnDto() {
|
||||
new() {
|
||||
Hint = "Sertifikalar",
|
||||
Text = "Sertifikalar",
|
||||
AuthName = AppCodes.Hr.Training + ".Update",
|
||||
DialogName = "TrainingCertificates",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
name = "@Email",
|
||||
id = "@Id"
|
||||
})
|
||||
DialogParameters = JsonSerializer.Serialize(new { name = "@Email", id = "@Id" }),
|
||||
IsVisible=true
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
|
@ -4061,6 +4065,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.Survey,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Survey)}/@Id",
|
||||
IsVisible=true,
|
||||
}
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
@ -4235,7 +4240,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Text ="Options",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.Survey,
|
||||
Url="/admin/list/list-employees/@Id"
|
||||
Url="/admin/list/list-employees/@Id",
|
||||
IsVisible=true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
@ -4391,7 +4397,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Text ="Answers",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.SurveyResponse,
|
||||
Url="/admin/list/list-employees/@Id"
|
||||
Url="/admin/list/list-employees/@Id",
|
||||
IsVisible=true
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
|
|||
|
|
@ -1706,6 +1706,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
|
|||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Intranet.SocialComment,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.SocialComment)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
new EditingFormItemDto { Order = 9, DataField = "WarrantyExpiry", ColSpan = 1, EditorType2=EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat },
|
||||
new EditingFormItemDto { Order = 10, DataField = "Location", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 11, DataField = "DepartmentId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 12, DataField = "StatusId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 13, DataField = "Criticality", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 14, DataField = "Capacity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 15, DataField = "CostPerHour", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
|
||||
|
|
@ -585,15 +585,15 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "StatusId",
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Status",
|
||||
Width = 150,
|
||||
ListOrderNo = 13,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkcenterStatus), "Id", "Name"),
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkcenterStatus), "Name", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
|
|
@ -768,14 +768,16 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Maintenance.Plan,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Plan)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Plan)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
new() {
|
||||
Hint = "Work Order",
|
||||
Text ="Work Order",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Maintenance.Plan,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Plan)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Plan)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
@ -1350,7 +1352,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Maintenance.Fault, 500, 250, true, true, true, true, false),
|
||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Maintenance.Fault, 500, 500, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||
|
|
@ -1362,15 +1364,18 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
new EditingFormItemDto { Order = 6, DataField = "FaultTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 7, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 8, DataField = "Severity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 9, DataField = "AssignedTo", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 10, DataField = "EstimatedRepairTime", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 11, DataField = "FollowUpRequired", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
new EditingFormItemDto { Order = 12, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
new EditingFormItemDto { Order = 13, DataField = "FaultStatusId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 9, DataField = "EstimatedRepairTime", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 10, DataField = "FollowUpRequired", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
new EditingFormItemDto { Order = 11, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "FollowUpRequired", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "Priority", FieldDbType = DbType.String, Value = "Low", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "Severity", FieldDbType = DbType.String, Value = "Low", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Açık", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
|
@ -1576,15 +1581,30 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "FaultStatusId",
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Status",
|
||||
Width = 100,
|
||||
ListOrderNo = 11,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.FaultStatus), "Id", "Name"),
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.FaultStatus), "Name", "Name"),
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsActive",
|
||||
Width = 100,
|
||||
ListOrderNo = 12,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
|
|||
|
|
@ -117,16 +117,15 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
Text = "Seed",
|
||||
AuthName = TenantManagementPermissions.Tenants.ManageConnectionStrings,
|
||||
DialogName = "TenantsConnectionString",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
name = "@Name",
|
||||
id = "@Id"
|
||||
})
|
||||
DialogParameters = JsonSerializer.Serialize(new { name = "@Name", id = "@Id" }),
|
||||
IsVisible = true,
|
||||
},
|
||||
new() {
|
||||
Hint = "Branches",
|
||||
Text = "Branches",
|
||||
AuthName = AppCodes.Branches,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Tenant)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
InsertServiceAddress = "list-form-dynamic-api/tenant-insert",
|
||||
|
|
@ -597,9 +596,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
Text = "Seed",
|
||||
AuthName = AppCodes.Branches + ".Update",
|
||||
DialogName = "BranchSeed",
|
||||
DialogParameters = JsonSerializer.Serialize(
|
||||
new { id = "@Id", name = "@Name"}
|
||||
)
|
||||
DialogParameters = JsonSerializer.Serialize( new { id = "@Id", name = "@Name"} ),
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
@ -1561,7 +1559,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Languages.LanguageText,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Language)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Language)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
@ -2490,14 +2489,16 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName=AppCodes.Listforms.Listform + ".Update",
|
||||
Url="/admin/listform/edit/@ListFormCode"
|
||||
Url="/admin/listform/edit/@ListFormCode",
|
||||
IsVisible = true,
|
||||
},
|
||||
new() {
|
||||
Hint = "Göster",
|
||||
Text ="Göster",
|
||||
UrlTarget="_blank",
|
||||
AuthName=AppCodes.Listforms.Listform,
|
||||
Url="/admin/list/@ListFormCode"
|
||||
Url="/admin/list/@ListFormCode",
|
||||
IsVisible = true,
|
||||
}
|
||||
}),
|
||||
StateStoringJson = JsonSerializer.Serialize(new StateStoringDto { Enabled = true, StorageKey = "listFormGridStorage", Type = "custom" }),
|
||||
|
|
@ -2945,10 +2946,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
Text = "Create",
|
||||
AuthName = AppCodes.Notifications.NotificationRules,
|
||||
DialogName = "CreateNotification",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
name = "id",
|
||||
id = "@Id"
|
||||
})
|
||||
DialogParameters = JsonSerializer.Serialize(new { name = "id", id = "@Id" }),
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
|
@ -3346,6 +3345,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
Text = "Hangfire Login",
|
||||
AuthName=AppCodes.BackgroundWorkers,
|
||||
Url= swaggerRootUrl + "/Account/Login",
|
||||
IsVisible = true,
|
||||
},
|
||||
new() {
|
||||
ButtonPosition= UiCommandButtonPositionTypeEnum.Toolbar,
|
||||
|
|
@ -3353,13 +3353,15 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
Text = "Hangfire Aç",
|
||||
AuthName=AppCodes.BackgroundWorkers,
|
||||
Url= swaggerRootUrl + "/hangfire",
|
||||
IsVisible = true,
|
||||
},
|
||||
new() {
|
||||
ButtonPosition= UiCommandButtonPositionTypeEnum.Toolbar,
|
||||
Hint = "Hangfire Tazele",
|
||||
Text = "Hangfire Tazele",
|
||||
AuthName=AppCodes.BackgroundWorkers,
|
||||
OnClick="UiEvalService.ApiGenerateBackgroundWorkers();"
|
||||
OnClick="UiEvalService.ApiGenerateBackgroundWorkers();",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
PermissionJson = DefaultPermissionJson(AppCodes.BackgroundWorkers),
|
||||
|
|
|
|||
|
|
@ -1145,7 +1145,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.SupplyChain.Supply,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Supply)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Supply)}/@Id",
|
||||
IsVisible=true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
@ -2491,7 +2492,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.SupplyChain.Approval,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Approval)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Approval)}/@Id",
|
||||
IsVisible=true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
@ -2971,7 +2973,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.SupplyChain.Request,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Request)}/@Id"
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Request)}/@Id",
|
||||
IsVisible=true,
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@ public class Fault : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public string Severity { get; set; }
|
||||
public int? EstimatedRepairTime { get; set; }
|
||||
public bool FollowUpRequired { get; set; }
|
||||
public Guid? FaultStatusId { get; set; }
|
||||
public FaultStatus? FaultStatus { get; set; }
|
||||
public string Status { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
public string AssignedTo { get; set; }
|
||||
|
|
|
|||
|
|
@ -27,9 +27,7 @@ public class Workcenter : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public Guid? DepartmentId { get; set; }
|
||||
public Department? Department { get; set; }
|
||||
|
||||
public Guid? StatusId { get; set; }
|
||||
public WorkcenterStatus? Status { get; set; }
|
||||
|
||||
public string Status { get; set; }
|
||||
public string Criticality { get; set; }
|
||||
public int Capacity { get; set; }
|
||||
public decimal CostPerHour { get; set; }
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ public class WorkcenterStatus : FullAuditedEntity<Guid>, IMultiTenant
|
|||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Code { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
|
|
|
|||
|
|
@ -54,6 +54,15 @@ public class CommandColumn : ValueObject
|
|||
/// <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()
|
||||
{
|
||||
|
|
@ -67,6 +76,8 @@ public class CommandColumn : ValueObject
|
|||
yield return DialogName;
|
||||
yield return DialogParameters;
|
||||
yield return OnClick;
|
||||
yield return IsVisible;
|
||||
yield return VisibleExpression;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2717,7 +2717,7 @@ public class PlatformDbContext :
|
|||
b.Property(x => x.Location).HasMaxLength(250);
|
||||
|
||||
b.Property(x => x.DepartmentId).IsRequired();
|
||||
b.Property(x => x.StatusId).IsRequired();
|
||||
b.Property(x => x.Status).IsRequired().HasMaxLength(20);
|
||||
|
||||
b.Property(x => x.Criticality).HasMaxLength(10);
|
||||
b.Property(x => x.Capacity).HasDefaultValue(0);
|
||||
|
|
@ -2729,11 +2729,6 @@ public class PlatformDbContext :
|
|||
.WithMany(x => x.Workcenters)
|
||||
.HasForeignKey(x => x.WorkcenterTypeId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne(x => x.Status)
|
||||
.WithMany(x => x.Workcenters)
|
||||
.HasForeignKey(x => x.StatusId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
builder.Entity<WorkcenterSpecification>(b =>
|
||||
|
|
@ -2815,7 +2810,7 @@ public class PlatformDbContext :
|
|||
b.Property(x => x.Title).HasMaxLength(200);
|
||||
b.Property(x => x.Description);
|
||||
b.Property(x => x.AssignedTo).HasMaxLength(150);
|
||||
b.Property(x => x.FaultStatusId).IsRequired();
|
||||
b.Property(x => x.Status).IsRequired().HasMaxLength(20);
|
||||
b.Property(x => x.ResolutionNotes);
|
||||
b.Property(x => x.ClosedBy).HasMaxLength(150);
|
||||
b.Property(x => x.WorkOrderId).HasMaxLength(100);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Erp.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251121074401_Initial")]
|
||||
[Migration("20251121142619_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -4586,7 +4586,7 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<int?>("EstimatedRepairTime")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("FaultStatusId")
|
||||
b.Property<Guid?>("FaultStatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("FaultTypeId")
|
||||
|
|
@ -4627,6 +4627,11 @@ namespace Erp.Platform.Migrations
|
|||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
|
@ -11668,8 +11673,10 @@ namespace Erp.Platform.Migrations
|
|||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<Guid>("StatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
|
|
@ -11678,6 +11685,9 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<DateTime?>("WarrantyExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("WorkcenterStatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("WorkcenterTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
|
|
@ -11685,7 +11695,7 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasIndex("DepartmentId");
|
||||
|
||||
b.HasIndex("StatusId");
|
||||
b.HasIndex("WorkcenterStatusId");
|
||||
|
||||
b.HasIndex("WorkcenterTypeId");
|
||||
|
||||
|
|
@ -11766,9 +11776,6 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
|
@ -14515,11 +14522,9 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Fault", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.FaultStatus", "FaultStatus")
|
||||
b.HasOne("Erp.Platform.Entities.FaultStatus", null)
|
||||
.WithMany("Faults")
|
||||
.HasForeignKey("FaultStatusId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
.HasForeignKey("FaultStatusId");
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.FaultType", "FaultType")
|
||||
.WithMany("Faults")
|
||||
|
|
@ -14533,8 +14538,6 @@ namespace Erp.Platform.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("FaultStatus");
|
||||
|
||||
b.Navigation("FaultType");
|
||||
|
||||
b.Navigation("WorkCenter");
|
||||
|
|
@ -15271,11 +15274,9 @@ namespace Erp.Platform.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.WorkcenterStatus", "Status")
|
||||
b.HasOne("Erp.Platform.Entities.WorkcenterStatus", null)
|
||||
.WithMany("Workcenters")
|
||||
.HasForeignKey("StatusId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
.HasForeignKey("WorkcenterStatusId");
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.WorkcenterType", "WorkcenterType")
|
||||
.WithMany("Workcenters")
|
||||
|
|
@ -15285,8 +15286,6 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.Navigation("Department");
|
||||
|
||||
b.Navigation("Status");
|
||||
|
||||
b.Navigation("WorkcenterType");
|
||||
});
|
||||
|
||||
|
|
@ -1326,7 +1326,6 @@ namespace Erp.Platform.Migrations
|
|||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
|
|
@ -4823,12 +4822,13 @@ namespace Erp.Platform.Migrations
|
|||
WarrantyExpiry = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
Location = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: true),
|
||||
DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
StatusId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Status = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||
Criticality = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
|
||||
Capacity = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
||||
CostPerHour = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
SetupTime = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
WorkcenterStatusId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
|
|
@ -4847,11 +4847,10 @@ namespace Erp.Platform.Migrations
|
|||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Mnt_T_Workcenter_Mnt_T_WorkcenterStatus_StatusId",
|
||||
column: x => x.StatusId,
|
||||
name: "FK_Mnt_T_Workcenter_Mnt_T_WorkcenterStatus_WorkcenterStatusId",
|
||||
column: x => x.WorkcenterStatusId,
|
||||
principalTable: "Mnt_T_WorkcenterStatus",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_Mnt_T_Workcenter_Mnt_T_WorkcenterType_WorkcenterTypeId",
|
||||
column: x => x.WorkcenterTypeId,
|
||||
|
|
@ -4996,7 +4995,7 @@ namespace Erp.Platform.Migrations
|
|||
Severity = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||
EstimatedRepairTime = table.Column<int>(type: "int", nullable: true),
|
||||
FollowUpRequired = table.Column<bool>(type: "bit", nullable: false),
|
||||
FaultStatusId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Status = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
AssignedTo = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: true),
|
||||
ActualRepairTime = table.Column<int>(type: "int", nullable: true),
|
||||
|
|
@ -5004,6 +5003,7 @@ namespace Erp.Platform.Migrations
|
|||
ResolutionNotes = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ClosedBy = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: true),
|
||||
ClosedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
FaultStatusId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
|
|
@ -5019,8 +5019,7 @@ namespace Erp.Platform.Migrations
|
|||
name: "FK_Mnt_T_Fault_Mnt_T_FaultStatus_FaultStatusId",
|
||||
column: x => x.FaultStatusId,
|
||||
principalTable: "Mnt_T_FaultStatus",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_Mnt_T_Fault_Mnt_T_FaultType_FaultTypeId",
|
||||
column: x => x.FaultTypeId,
|
||||
|
|
@ -6575,9 +6574,9 @@ namespace Erp.Platform.Migrations
|
|||
column: "DepartmentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mnt_T_Workcenter_StatusId",
|
||||
name: "IX_Mnt_T_Workcenter_WorkcenterStatusId",
|
||||
table: "Mnt_T_Workcenter",
|
||||
column: "StatusId");
|
||||
column: "WorkcenterStatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mnt_T_Workcenter_WorkcenterTypeId",
|
||||
|
|
@ -4583,7 +4583,7 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<int?>("EstimatedRepairTime")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("FaultStatusId")
|
||||
b.Property<Guid?>("FaultStatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("FaultTypeId")
|
||||
|
|
@ -4624,6 +4624,11 @@ namespace Erp.Platform.Migrations
|
|||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
|
@ -11665,8 +11670,10 @@ namespace Erp.Platform.Migrations
|
|||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<Guid>("StatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
b.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
|
|
@ -11675,6 +11682,9 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<DateTime?>("WarrantyExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("WorkcenterStatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("WorkcenterTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
|
|
@ -11682,7 +11692,7 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.HasIndex("DepartmentId");
|
||||
|
||||
b.HasIndex("StatusId");
|
||||
b.HasIndex("WorkcenterStatusId");
|
||||
|
||||
b.HasIndex("WorkcenterTypeId");
|
||||
|
||||
|
|
@ -11763,9 +11773,6 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
|
@ -14512,11 +14519,9 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Fault", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.FaultStatus", "FaultStatus")
|
||||
b.HasOne("Erp.Platform.Entities.FaultStatus", null)
|
||||
.WithMany("Faults")
|
||||
.HasForeignKey("FaultStatusId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
.HasForeignKey("FaultStatusId");
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.FaultType", "FaultType")
|
||||
.WithMany("Faults")
|
||||
|
|
@ -14530,8 +14535,6 @@ namespace Erp.Platform.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("FaultStatus");
|
||||
|
||||
b.Navigation("FaultType");
|
||||
|
||||
b.Navigation("WorkCenter");
|
||||
|
|
@ -15268,11 +15271,9 @@ namespace Erp.Platform.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.WorkcenterStatus", "Status")
|
||||
b.HasOne("Erp.Platform.Entities.WorkcenterStatus", null)
|
||||
.WithMany("Workcenters")
|
||||
.HasForeignKey("StatusId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
.HasForeignKey("WorkcenterStatusId");
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.WorkcenterType", "WorkcenterType")
|
||||
.WithMany("Workcenters")
|
||||
|
|
@ -15282,8 +15283,6 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.Navigation("Department");
|
||||
|
||||
b.Navigation("Status");
|
||||
|
||||
b.Navigation("WorkcenterType");
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -3301,7 +3301,7 @@
|
|||
"endDate": "01-12-2024",
|
||||
"totalDays": 0.5,
|
||||
"reason": "Kişisel işler",
|
||||
"status": "Rejected",
|
||||
"status": "Reddedildi",
|
||||
"appliedDate": "02-11-2024",
|
||||
"rejectionReason": "Proje teslim tarihi nedeniyle uygun değil",
|
||||
"isHalfDay": true
|
||||
|
|
@ -4857,25 +4857,21 @@
|
|||
],
|
||||
"WorkcenterStatuses": [
|
||||
{
|
||||
"code": "OP",
|
||||
"name": "Operational",
|
||||
"description": "İş Merkezi Operatif Durumda",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"code": "UM",
|
||||
"name": "Under Maintenance",
|
||||
"description": "İş Merkezi Bakımda",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"code": "OO",
|
||||
"name": "Out of Order",
|
||||
"description": "İş Merkezi Arızalı",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"code": "RT",
|
||||
"name": "Retired",
|
||||
"description": "İş Merkezi Kullanımdan Kaldırıldı",
|
||||
"isActive": true
|
||||
|
|
@ -4894,7 +4890,7 @@
|
|||
"warrantyExpiry": "2025-03-15T00:00:00",
|
||||
"location": "Atölye A - Hat 1",
|
||||
"departmentCode": "ÜRT",
|
||||
"statusCode": "OP",
|
||||
"status": "Operational",
|
||||
"criticality": "High",
|
||||
"capacity": 8,
|
||||
"costPerHour": 75,
|
||||
|
|
@ -4913,7 +4909,7 @@
|
|||
"warrantyExpiry": "2024-08-20T00:00:00",
|
||||
"location": "Kompresör Odası",
|
||||
"departmentCode": "BAK",
|
||||
"statusCode": "UM",
|
||||
"status": "Under Maintenance",
|
||||
"criticality": "Critical",
|
||||
"capacity": 8,
|
||||
"costPerHour": 85,
|
||||
|
|
@ -4931,7 +4927,7 @@
|
|||
"installationDate": "2020-11-10T00:00:00",
|
||||
"location": "Ana Üretim Hattı",
|
||||
"departmentCode": "KAL",
|
||||
"statusCode": "OO",
|
||||
"status": "Out of Order",
|
||||
"criticality": "Medium",
|
||||
"capacity": 8,
|
||||
"costPerHour": 85,
|
||||
|
|
|
|||
|
|
@ -1950,13 +1950,12 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
|
||||
foreach (var item in items.WorkcenterStatuses)
|
||||
{
|
||||
var exists = await _workcenterStatusRepository.AnyAsync(x => x.Code == item.Code);
|
||||
var exists = await _workcenterStatusRepository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _workcenterStatusRepository.InsertAsync(new WorkcenterStatus
|
||||
{
|
||||
Code = item.Code,
|
||||
Name = item.Name,
|
||||
Description = item.Description,
|
||||
IsActive = item.IsActive
|
||||
|
|
@ -1971,7 +1970,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
|
||||
var department = await _departmentRepository.FirstOrDefaultAsync(x => x.Code == item.DepartmentCode);
|
||||
var workcenterType = await _workcenterTypeRepository.FirstOrDefaultAsync(x => x.Code == item.WorkcenterTypeCode);
|
||||
var status = await _workcenterStatusRepository.FirstOrDefaultAsync(x => x.Code == item.StatusCode);
|
||||
|
||||
await _workcenterRepository.InsertAsync(new Workcenter
|
||||
{
|
||||
|
|
@ -1986,7 +1984,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
WarrantyExpiry = item.WarrantyExpiry,
|
||||
Location = item.Location,
|
||||
DepartmentId = department?.Id,
|
||||
StatusId = status?.Id,
|
||||
Status = item.Status,
|
||||
Criticality = item.Criticality,
|
||||
Capacity = item.Capacity,
|
||||
CostPerHour = item.CostPerHour,
|
||||
|
|
@ -2069,7 +2067,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
Severity = item.Severity,
|
||||
Title = item.Title,
|
||||
Description = item.Description,
|
||||
FaultStatusId = faultStatus?.Id,
|
||||
Status = item.Status,
|
||||
EstimatedRepairTime = item.EstimatedRepairTime,
|
||||
ActualRepairTime = item.ActualRepairTime,
|
||||
ResolutionNotes = item.ResolutionNotes,
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ public class WorkcenterSeedDto
|
|||
public string Location { get; set; }
|
||||
|
||||
public string DepartmentCode { get; set; }
|
||||
public string StatusCode { get; set; }
|
||||
public string Status { get; set; }
|
||||
|
||||
public string Criticality { get; set; }
|
||||
public int Capacity { get; set; }
|
||||
|
|
@ -189,7 +189,6 @@ public class WorkcenterTypeSeedDto
|
|||
|
||||
public class WorkcenterStatusSeedDto
|
||||
{
|
||||
public string Code { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
|
|
|
|||
|
|
@ -303,6 +303,8 @@ export interface CommandColumnDto {
|
|||
dialogName?: string
|
||||
dialogParameters?: string
|
||||
onClick?: string
|
||||
isVisible: boolean
|
||||
visibleExpression?: string
|
||||
}
|
||||
|
||||
export interface GridBoxOptionsDto {
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ function FormTabCommands() {
|
|||
<Th>{translate('::ListForms.ListFormEdit.CommandAuthorizationType')}</Th>
|
||||
<Th>{translate('::ListForms.ListFormEdit.CommandUrlTarget')}</Th>
|
||||
<Th>{translate('::ListForms.ListFormEdit.CommandUrl')}</Th>
|
||||
<Th>{translate('::ListForms.ListFormEdit.CommandVisible')}</Th>
|
||||
<Th>{translate('::ListForms.ListFormEdit.CommandVisibleExpression')}</Th>
|
||||
</Tr>
|
||||
</THead>
|
||||
<TBody>
|
||||
|
|
@ -113,6 +115,8 @@ function FormTabCommands() {
|
|||
<Td>{row.authName}</Td>
|
||||
<Td>{row.urlTarget}</Td>
|
||||
<Td>{row.url}</Td>
|
||||
<Td>{row.isVisible ? 'Yes' : 'No'}</Td>
|
||||
<Td>{row.visibleExpression}</Td>
|
||||
</Tr>
|
||||
))}
|
||||
</TBody>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import {
|
||||
Button,
|
||||
Checkbox,
|
||||
Dialog,
|
||||
FormContainer,
|
||||
FormItem,
|
||||
|
|
@ -98,6 +99,7 @@ function JsonRowOpDialogCommand({
|
|||
id="commandOperation"
|
||||
isOpen={isOpen}
|
||||
preventScroll={true}
|
||||
width={900}
|
||||
onClose={handleClose}
|
||||
onRequestClose={handleClose}
|
||||
>
|
||||
|
|
@ -117,6 +119,8 @@ function JsonRowOpDialogCommand({
|
|||
dialogName: '',
|
||||
dialogParameters: '',
|
||||
onClick: '',
|
||||
isVisible: true,
|
||||
visibleExpression: '',
|
||||
}
|
||||
}
|
||||
validationSchema={schema}
|
||||
|
|
@ -157,96 +161,124 @@ function JsonRowOpDialogCommand({
|
|||
<Form>
|
||||
<FormContainer size="sm">
|
||||
<div className="h-full overflow-y-auto p-2">
|
||||
<FormItem
|
||||
label="Button Position"
|
||||
invalid={errors.buttonPosition && touched.buttonPosition}
|
||||
errorMessage={errors.buttonPosition}
|
||||
>
|
||||
<Field
|
||||
autoFocus={true}
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="buttonPosition"
|
||||
placeholder="Button Position"
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<FormItem
|
||||
label="Button Position"
|
||||
invalid={errors.buttonPosition && touched.buttonPosition}
|
||||
errorMessage={errors.buttonPosition}
|
||||
>
|
||||
{({ field, form }: FieldProps<UiCommandButtonPositionTypeEnum>) => (
|
||||
<Select
|
||||
field={field}
|
||||
form={form}
|
||||
isClearable={true}
|
||||
options={commandButtonPositionTypeOptions}
|
||||
value={commandButtonPositionTypeOptions?.filter(
|
||||
(option: any) => option.value === values.buttonPosition,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="Authorization Name"
|
||||
invalid={errors.authName && touched.authName}
|
||||
errorMessage={errors.authName}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="authName"
|
||||
placeholder="Authorization Name"
|
||||
<Field
|
||||
autoFocus={true}
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="buttonPosition"
|
||||
placeholder="Button Position"
|
||||
>
|
||||
{({ field, form }: FieldProps<UiCommandButtonPositionTypeEnum>) => (
|
||||
<Select
|
||||
field={field}
|
||||
form={form}
|
||||
isClearable={true}
|
||||
options={commandButtonPositionTypeOptions}
|
||||
value={commandButtonPositionTypeOptions?.filter(
|
||||
(option: any) => option.value === values.buttonPosition,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="Authorization Name"
|
||||
invalid={errors.authName && touched.authName}
|
||||
errorMessage={errors.authName}
|
||||
>
|
||||
{({ field, form }: FieldProps<SelectBoxOption>) => (
|
||||
<Select
|
||||
field={field}
|
||||
form={form}
|
||||
isClearable={true}
|
||||
options={permissionOptions}
|
||||
value={permissionOptions?.filter(
|
||||
(option) => option.value === values.authName,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="authName"
|
||||
placeholder="Authorization Name"
|
||||
>
|
||||
{({ field, form }: FieldProps<SelectBoxOption>) => (
|
||||
<Select
|
||||
field={field}
|
||||
form={form}
|
||||
isClearable={true}
|
||||
options={permissionOptions}
|
||||
value={permissionOptions?.filter(
|
||||
(option) => option.value === values.authName,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="Text"
|
||||
invalid={errors.text && touched.text}
|
||||
errorMessage={errors.text}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="text"
|
||||
placeholder="Text"
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="Hint"
|
||||
invalid={errors.hint && touched.hint}
|
||||
errorMessage={errors.hint}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="hint"
|
||||
placeholder="Hint"
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="Icon"
|
||||
invalid={errors.icon && touched.icon}
|
||||
errorMessage={errors.icon}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="icon"
|
||||
placeholder="Icon"
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="Is Visible"
|
||||
invalid={errors.isVisible && touched.isVisible}
|
||||
errorMessage={errors.isVisible}
|
||||
>
|
||||
<Field
|
||||
type="checkbox"
|
||||
name="isVisible"
|
||||
placeholder="is Visible"
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
<FormItem
|
||||
label="Text"
|
||||
invalid={errors.text && touched.text}
|
||||
errorMessage={errors.text}
|
||||
label="Visible Expression (Sample: (e) => e.row.data.Status === 'Taslak')"
|
||||
invalid={errors.visibleExpression && touched.visibleExpression}
|
||||
errorMessage={errors.visibleExpression}
|
||||
className="mt-4"
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="text"
|
||||
placeholder="Text"
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="Hint"
|
||||
invalid={errors.hint && touched.hint}
|
||||
errorMessage={errors.hint}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="hint"
|
||||
placeholder="Hint"
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label="Icon"
|
||||
invalid={errors.icon && touched.icon}
|
||||
errorMessage={errors.icon}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
name="icon"
|
||||
placeholder="Icon"
|
||||
name="visibleExpression"
|
||||
placeholder="Visible Expression"
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<Tabs defaultValue="urlOptions" variant="pill">
|
||||
<TabList>
|
||||
<TabNav value="urlOptions">Url Options</TabNav>
|
||||
|
|
|
|||
|
|
@ -323,8 +323,21 @@ const useListFormColumns = ({
|
|||
if (action.buttonPosition !== UiCommandButtonPositionTypeEnum.CommandColumn) return
|
||||
if (!checkPermission(action.authName)) return
|
||||
|
||||
// visibleExpression varsa dinamik fonksiyon oluştur, yoksa statik değer kullan
|
||||
let visibleFunc: ((e: any) => boolean) | boolean = action.isVisible
|
||||
if (action.visibleExpression) {
|
||||
try {
|
||||
// visibleExpression string'ini fonksiyona çevir
|
||||
// Örnek: "(e) => !e.row.isEditing" veya "(e) => e.row.data.Status === 'Active'"
|
||||
visibleFunc = eval(action.visibleExpression)
|
||||
} catch (error) {
|
||||
console.error('VisibleExpression evaluation error:', error, action.visibleExpression)
|
||||
visibleFunc = action.isVisible // Hata durumunda varsayılan değeri kullan
|
||||
}
|
||||
}
|
||||
|
||||
const item = {
|
||||
visible: true,
|
||||
visible: visibleFunc,
|
||||
hint: action.hint,
|
||||
icon: action.icon,
|
||||
text: translate('::' + action.text),
|
||||
|
|
|
|||
Loading…
Reference in a new issue