Wizard Stepleri Lazy ile çalıştırıldı
This commit is contained in:
parent
9de6b1d05c
commit
e4cecc8a62
10 changed files with 497 additions and 406 deletions
|
|
@ -13842,6 +13842,18 @@
|
||||||
"en": "Is Tenant",
|
"en": "Is Tenant",
|
||||||
"tr": "Tenant"
|
"tr": "Tenant"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Listform.ListformField.IsBranch",
|
||||||
|
"en": "Is Branch",
|
||||||
|
"tr": "Şube"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Listform.ListformField.ShowNote",
|
||||||
|
"en": "Show Note",
|
||||||
|
"tr": "Not Göster"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.Listform.ListformField.Tenants",
|
"key": "App.Listform.ListformField.Tenants",
|
||||||
|
|
|
||||||
|
|
@ -4469,8 +4469,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 950, 650, true, true, true, true, false),
|
EditingOptionJson = DefaultEditingOptionJson(listFormName, 950, 650, true, true, true, true, false),
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||||
new() { Order=1, ColCount=3, ColSpan=1, ItemType="group" },
|
new() { Order=1, ColCount=3, ColSpan=1, ItemType="group" },
|
||||||
new() {
|
new() { Order=2, ColCount=3, ColSpan=1, ItemType="group" },
|
||||||
Order=2,ColCount=2,ColSpan=1,ItemType="group" },
|
new() { Order=3, ColCount=2, ColSpan=1, ItemType="group" },
|
||||||
}),
|
}),
|
||||||
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
|
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
|
||||||
{
|
{
|
||||||
|
|
@ -4495,14 +4495,21 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() { FieldName = "CultureName", FieldDbType = DbType.String, Value = "en", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "DataSourceCode", FieldDbType = DbType.String, Value = "Default", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "SelectCommandType", FieldDbType = DbType.Int32, Value = ((int)SelectCommandTypeEnum.Table).ToString(), CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "KeyFieldName", FieldDbType = DbType.String, Value = "Id", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "KeyFieldDbSourceType", FieldDbType = DbType.Int32, Value = ((int)DbType.Guid).ToString(), CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "ListFormType", FieldDbType = DbType.String, Value = ListFormTypeEnum.List, CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "ListFormType", FieldDbType = DbType.String, Value = ListFormTypeEnum.List, CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "InsertServiceAddress", FieldDbType = DbType.String, Value = "list-form-data/insert", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "InsertServiceAddress", FieldDbType = DbType.String, Value = "list-form-data/insert", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "DeleteServiceAddress", FieldDbType = DbType.String, Value = "list-form-data/delete", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "DeleteServiceAddress", FieldDbType = DbType.String, Value = "list-form-data/delete", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "UpdateServiceAddress", FieldDbType = DbType.String, Value = "list-form-data/update", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "UpdateServiceAddress", FieldDbType = DbType.String, Value = "list-form-data/update", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "IsDisabled", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "IsDisabled", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "IsTenant", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "IsTenant", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "IsBranch", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "IsOrganizationUnit", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "IsOrganizationUnit", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "IsSubForm", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "IsSubForm", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "ShowNote", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "SortMode", FieldDbType = DbType.String, Value = GridOptions.SortModeNone, CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "SortMode", FieldDbType = DbType.String, Value = GridOptions.SortModeNone, CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|
@ -4557,26 +4564,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new ListFormField
|
new ListFormField
|
||||||
{
|
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.String,
|
|
||||||
FieldName = "Description",
|
|
||||||
EditGroupOrderNo = 1,
|
|
||||||
EditOrderNo = 10,
|
|
||||||
EditorType2 = EditorTypes.dxTextBox,
|
|
||||||
ColSpan = 1,
|
|
||||||
CaptionName = "App.Listform.ListformField.Description",
|
|
||||||
Width = 0,
|
|
||||||
ListOrderNo = 3,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
new ListFormField
|
|
||||||
{
|
{
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -4588,7 +4575,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
CaptionName = "App.Listform.ListformField.ListFormCode",
|
CaptionName = "App.Listform.ListformField.ListFormCode",
|
||||||
Width = 0,
|
Width = 0,
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
|
|
@ -4612,7 +4599,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||||
CaptionName = "App.Listform.ListformField.ListFormType",
|
CaptionName = "App.Listform.ListformField.ListFormType",
|
||||||
Width = 0,
|
Width = 0,
|
||||||
ListOrderNo = 5,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
|
|
@ -4623,7 +4610,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new() { Key = ListFormTypeEnum.Form, Name = "App.StaticLookup.Form" },
|
new() { Key = ListFormTypeEnum.Form, Name = "App.StaticLookup.Form" },
|
||||||
new() { Key = ListFormTypeEnum.List, Name = "App.StaticLookup.List" },
|
new() { Key = ListFormTypeEnum.List, Name = "App.StaticLookup.List" },
|
||||||
new() { Key = ListFormTypeEnum.Chart, Name = "App.Platform.Chart" },
|
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
|
@ -4632,13 +4618,36 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new ListFormField
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "DataSourceCode",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 5,
|
||||||
|
EditorType2 = EditorTypes.dxSelectBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||||
|
CaptionName = "App.Listform.ListformField.DataSourceCode",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 5,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
|
||||||
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.DataSource), "Code", "Code"),
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
{
|
{
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.Int32,
|
SourceDbType = DbType.Int32,
|
||||||
FieldName = "SelectCommandType",
|
FieldName = "SelectCommandType",
|
||||||
EditGroupOrderNo = 1,
|
EditGroupOrderNo = 1,
|
||||||
EditOrderNo = 5,
|
EditOrderNo = 6,
|
||||||
EditorType2 = EditorTypes.dxSelectBox,
|
EditorType2 = EditorTypes.dxSelectBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||||
|
|
@ -4653,11 +4662,11 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new() { Key=SelectCommandTypeEnum.Table, Name="App.StaticLookup.Table" },
|
new() { Key = SelectCommandTypeEnum.Table, Name="App.StaticLookup.Table" },
|
||||||
new() { Key=SelectCommandTypeEnum.View, Name="App.StaticLookup.View" },
|
new() { Key = SelectCommandTypeEnum.View, Name="App.StaticLookup.View" },
|
||||||
new() { Key=SelectCommandTypeEnum.TableValuedFunction, Name="App.StaticLookup.TableValuedFunction" },
|
new() { Key = SelectCommandTypeEnum.TableValuedFunction, Name="App.StaticLookup.TableValuedFunction" },
|
||||||
new() { Key=SelectCommandTypeEnum.Query, Name="App.StaticLookup.Query" },
|
new() { Key = SelectCommandTypeEnum.Query, Name="App.StaticLookup.Query" },
|
||||||
new() { Key=SelectCommandTypeEnum.StoredProcedure, Name="App.StaticLookup.StoredProcedure" },
|
new() { Key = SelectCommandTypeEnum.StoredProcedure, Name="App.StaticLookup.StoredProcedure" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
|
@ -4672,7 +4681,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "SelectCommand",
|
FieldName = "SelectCommand",
|
||||||
EditGroupOrderNo = 1,
|
EditGroupOrderNo = 1,
|
||||||
EditOrderNo = 6,
|
EditOrderNo = 7,
|
||||||
EditorType2 = EditorTypes.dxTextBox,
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
CaptionName = "App.Listform.ListformField.SelectCommand",
|
CaptionName = "App.Listform.ListformField.SelectCommand",
|
||||||
|
|
@ -4693,7 +4702,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "TableName",
|
FieldName = "TableName",
|
||||||
EditGroupOrderNo = 1,
|
EditGroupOrderNo = 1,
|
||||||
EditOrderNo = 7,
|
EditOrderNo = 8,
|
||||||
EditorType2 = EditorTypes.dxTextBox,
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
CaptionName = "App.Listform.ListformField.TableName",
|
CaptionName = "App.Listform.ListformField.TableName",
|
||||||
|
|
@ -4713,7 +4722,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "KeyFieldName",
|
FieldName = "KeyFieldName",
|
||||||
EditGroupOrderNo = 1,
|
EditGroupOrderNo = 1,
|
||||||
EditOrderNo = 8,
|
EditOrderNo = 9,
|
||||||
EditorType2 = EditorTypes.dxTextBox,
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
CaptionName = "App.Listform.ListformField.KeyFieldName",
|
CaptionName = "App.Listform.ListformField.KeyFieldName",
|
||||||
|
|
@ -4734,7 +4743,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.Int32,
|
SourceDbType = DbType.Int32,
|
||||||
FieldName = "KeyFieldDbSourceType",
|
FieldName = "KeyFieldDbSourceType",
|
||||||
EditGroupOrderNo = 1,
|
EditGroupOrderNo = 1,
|
||||||
EditOrderNo = 9,
|
EditOrderNo = 10,
|
||||||
EditorType2 = EditorTypes.dxSelectBox,
|
EditorType2 = EditorTypes.dxSelectBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||||
|
|
@ -4750,33 +4759,33 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new() { Key=DbType.AnsiString, Name="App.StaticLookup.AnsiString" },
|
new() { Key = DbType.AnsiString, Name="App.StaticLookup.AnsiString" },
|
||||||
new() { Key=DbType.Binary, Name="App.StaticLookup.Binary" },
|
new() { Key = DbType.Binary, Name="App.StaticLookup.Binary" },
|
||||||
new() { Key=DbType.Byte, Name="App.StaticLookup.Byte" },
|
new() { Key = DbType.Byte, Name="App.StaticLookup.Byte" },
|
||||||
new() { Key=DbType.Boolean, Name="App.StaticLookup.Boolean" },
|
new() { Key = DbType.Boolean, Name="App.StaticLookup.Boolean" },
|
||||||
new() { Key=DbType.Currency, Name="App.Listform.ListformField.Currency" },
|
new() { Key = DbType.Currency, Name="App.Listform.ListformField.Currency" },
|
||||||
new() { Key=DbType.Date, Name="App.Listform.ListformField.Date" },
|
new() { Key = DbType.Date, Name="App.Listform.ListformField.Date" },
|
||||||
new() { Key=DbType.DateTime, Name="App.StaticLookup.DateTime" },
|
new() { Key = DbType.DateTime, Name="App.StaticLookup.DateTime" },
|
||||||
new() { Key=DbType.Decimal, Name="App.StaticLookup.Decimal" },
|
new() { Key = DbType.Decimal, Name="App.StaticLookup.Decimal" },
|
||||||
new() { Key=DbType.Double, Name="App.StaticLookup.Double" },
|
new() { Key = DbType.Double, Name="App.StaticLookup.Double" },
|
||||||
new() { Key=DbType.Guid, Name="App.StaticLookup.Guid" },
|
new() { Key = DbType.Guid, Name="App.StaticLookup.Guid" },
|
||||||
new() { Key=DbType.Int16, Name="App.StaticLookup.Int16" },
|
new() { Key = DbType.Int16, Name="App.StaticLookup.Int16" },
|
||||||
new() { Key=DbType.Int32, Name="App.StaticLookup.Int32" },
|
new() { Key = DbType.Int32, Name="App.StaticLookup.Int32" },
|
||||||
new() { Key=DbType.Int64, Name="App.StaticLookup.Int64" },
|
new() { Key = DbType.Int64, Name="App.StaticLookup.Int64" },
|
||||||
new() { Key=DbType.Object, Name="App.StaticLookup.Object" },
|
new() { Key = DbType.Object, Name="App.StaticLookup.Object" },
|
||||||
new() { Key=DbType.SByte, Name="App.StaticLookup.SByte" },
|
new() { Key = DbType.SByte, Name="App.StaticLookup.SByte" },
|
||||||
new() { Key=DbType.Single, Name="App.StaticLookup.Single" },
|
new() { Key = DbType.Single, Name="App.StaticLookup.Single" },
|
||||||
new() { Key=DbType.String, Name="App.StaticLookup.String" },
|
new() { Key = DbType.String, Name="App.StaticLookup.String" },
|
||||||
new() { Key=DbType.Time, Name="App.StaticLookup.Time" },
|
new() { Key = DbType.Time, Name="App.StaticLookup.Time" },
|
||||||
new() { Key=DbType.UInt16, Name="App.StaticLookup.UInt16" },
|
new() { Key = DbType.UInt16, Name="App.StaticLookup.UInt16" },
|
||||||
new() { Key=DbType.UInt32, Name="App.StaticLookup.UInt32" },
|
new() { Key = DbType.UInt32, Name="App.StaticLookup.UInt32" },
|
||||||
new() { Key=DbType.UInt64, Name="App.StaticLookup.UInt64" },
|
new() { Key = DbType.UInt64, Name="App.StaticLookup.UInt64" },
|
||||||
new() { Key=DbType.VarNumeric, Name="App.StaticLookup.VarNumeric" },
|
new() { Key = DbType.VarNumeric, Name="App.StaticLookup.VarNumeric" },
|
||||||
new() { Key=DbType.AnsiStringFixedLength, Name="App.StaticLookup.AnsiStringFixedLength" },
|
new() { Key = DbType.AnsiStringFixedLength, Name="App.StaticLookup.AnsiStringFixedLength" },
|
||||||
new() { Key=DbType.StringFixedLength, Name="App.StaticLookup.StringFixedLength" },
|
new() { Key = DbType.StringFixedLength, Name="App.StaticLookup.StringFixedLength" },
|
||||||
new() { Key=DbType.Xml, Name="App.StaticLookup.Xml" },
|
new() { Key = DbType.Xml, Name="App.StaticLookup.Xml" },
|
||||||
new() { Key=DbType.DateTime2, Name="App.StaticLookup.DateTime2" },
|
new() { Key = DbType.DateTime2, Name="App.StaticLookup.DateTime2" },
|
||||||
new() { Key=DbType.DateTimeOffset, Name="App.StaticLookup.DateTimeOffset" },
|
new() { Key = DbType.DateTimeOffset, Name="App.StaticLookup.DateTimeOffset" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -4808,15 +4817,35 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "SortMode",
|
FieldName = "Description",
|
||||||
EditGroupOrderNo = 1,
|
EditGroupOrderNo = 1,
|
||||||
EditOrderNo = 12,
|
EditOrderNo = 12,
|
||||||
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
CaptionName = "App.Listform.ListformField.Description",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 12,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "SortMode",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 13,
|
||||||
EditorType2 = EditorTypes.dxSelectBox,
|
EditorType2 = EditorTypes.dxSelectBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
EditorOptions = EditorOptionValues.ShowClearButton,
|
EditorOptions = EditorOptionValues.ShowClearButton,
|
||||||
CaptionName = "App.Listform.ListformField.SortMode",
|
CaptionName = "App.Listform.ListformField.SortMode",
|
||||||
Width = 0,
|
Width = 0,
|
||||||
ListOrderNo = 12,
|
ListOrderNo = 13,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
|
|
@ -4841,31 +4870,11 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.Boolean,
|
SourceDbType = DbType.Boolean,
|
||||||
FieldName = "IsTenant",
|
FieldName = "IsTenant",
|
||||||
EditGroupOrderNo = 1,
|
EditGroupOrderNo = 1,
|
||||||
EditOrderNo = 16,
|
EditOrderNo = 14,
|
||||||
EditorType2 = EditorTypes.dxCheckBox,
|
EditorType2 = EditorTypes.dxCheckBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
CaptionName = "App.Listform.ListformField.IsTenant",
|
CaptionName = "App.Listform.ListformField.IsTenant",
|
||||||
Width = 0,
|
Width = 0,
|
||||||
ListOrderNo = 13,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
new ListFormField
|
|
||||||
{
|
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Boolean,
|
|
||||||
FieldName = "IsOrganizationUnit",
|
|
||||||
EditGroupOrderNo = 1,
|
|
||||||
EditOrderNo = 17,
|
|
||||||
EditorType2 = EditorTypes.dxCheckBox,
|
|
||||||
ColSpan = 1,
|
|
||||||
CaptionName = "App.Listform.ListformField.IsOrganizationUnit",
|
|
||||||
Width = 0,
|
|
||||||
ListOrderNo = 14,
|
ListOrderNo = 14,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
@ -4875,18 +4884,78 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new ListFormField
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Boolean,
|
||||||
|
FieldName = "IsBranch",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 15,
|
||||||
|
EditorType2 = EditorTypes.dxCheckBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
CaptionName = "App.Listform.ListformField.IsBranch",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 15,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Boolean,
|
||||||
|
FieldName = "IsOrganizationUnit",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 16,
|
||||||
|
EditorType2 = EditorTypes.dxCheckBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
CaptionName = "App.Listform.ListformField.IsOrganizationUnit",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 16,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
{
|
{
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.Boolean,
|
SourceDbType = DbType.Boolean,
|
||||||
FieldName = "IsSubForm",
|
FieldName = "IsSubForm",
|
||||||
EditGroupOrderNo = 1,
|
EditGroupOrderNo = 1,
|
||||||
EditOrderNo = 18,
|
EditOrderNo = 17,
|
||||||
EditorType2 = EditorTypes.dxCheckBox,
|
EditorType2 = EditorTypes.dxCheckBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
CaptionName = "App.Listform.ListformField.IsSubForm",
|
CaptionName = "App.Listform.ListformField.IsSubForm",
|
||||||
Width = 0,
|
Width = 0,
|
||||||
ListOrderNo = 15,
|
ListOrderNo = 17,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new ListFormField
|
||||||
|
{
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Boolean,
|
||||||
|
FieldName = "ShowNote",
|
||||||
|
EditGroupOrderNo = 1,
|
||||||
|
EditOrderNo = 18,
|
||||||
|
EditorType2 = EditorTypes.dxCheckBox,
|
||||||
|
ColSpan = 1,
|
||||||
|
CaptionName = "App.Listform.ListformField.ShowNote",
|
||||||
|
Width = 0,
|
||||||
|
ListOrderNo = 18,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
|
|
@ -4902,7 +4971,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
FieldName = "PermissionJson",
|
FieldName = "PermissionJson",
|
||||||
CaptionName = "App.Listform.ListformField.PermissionJson",
|
CaptionName = "App.Listform.ListformField.PermissionJson",
|
||||||
Width = 0,
|
Width = 0,
|
||||||
ListOrderNo = 16,
|
ListOrderNo = 19,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
|
|
@ -4916,13 +4985,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "DeleteServiceAddress",
|
FieldName = "DeleteServiceAddress",
|
||||||
EditGroupOrderNo = 1,
|
EditGroupOrderNo = 2,
|
||||||
EditOrderNo = 13,
|
EditOrderNo = 1,
|
||||||
EditorType2 = EditorTypes.dxTextBox,
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
CaptionName = "App.Listform.ListformField.DeleteServiceAddress",
|
CaptionName = "App.Listform.ListformField.DeleteServiceAddress",
|
||||||
Width = 0,
|
Width = 0,
|
||||||
ListOrderNo = 17,
|
ListOrderNo = 20,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
|
|
@ -4936,13 +5005,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "InsertServiceAddress",
|
FieldName = "InsertServiceAddress",
|
||||||
EditGroupOrderNo = 1,
|
EditGroupOrderNo = 2,
|
||||||
EditOrderNo = 14,
|
EditOrderNo = 2,
|
||||||
EditorType2 = EditorTypes.dxTextBox,
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
CaptionName = "App.Listform.ListformField.InsertServiceAddress",
|
CaptionName = "App.Listform.ListformField.InsertServiceAddress",
|
||||||
Width = 0,
|
Width = 0,
|
||||||
ListOrderNo = 18,
|
ListOrderNo = 21,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
|
|
@ -4956,13 +5025,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "UpdateServiceAddress",
|
FieldName = "UpdateServiceAddress",
|
||||||
EditGroupOrderNo = 1,
|
EditGroupOrderNo = 2,
|
||||||
EditOrderNo = 15,
|
EditOrderNo = 3,
|
||||||
EditorType2 = EditorTypes.dxTextBox,
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
CaptionName = "App.Listform.ListformField.UpdateServiceAddress",
|
CaptionName = "App.Listform.ListformField.UpdateServiceAddress",
|
||||||
Width = 0,
|
Width = 0,
|
||||||
ListOrderNo = 19,
|
ListOrderNo = 22,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
||||||
|
|
@ -4977,13 +5046,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "PermissionJson:C",
|
FieldName = "PermissionJson:C",
|
||||||
CaptionName = "PermissionJson:C",
|
CaptionName = "PermissionJson:C",
|
||||||
EditGroupOrderNo = 2,
|
EditGroupOrderNo = 3,
|
||||||
EditOrderNo = 1,
|
EditOrderNo = 1,
|
||||||
EditorType2 = EditorTypes.dxTextBox,
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = false,
|
IsActive = false,
|
||||||
ListOrderNo = 20,
|
ListOrderNo = 23,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
},
|
},
|
||||||
new ListFormField
|
new ListFormField
|
||||||
|
|
@ -4993,13 +5062,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "PermissionJson:R",
|
FieldName = "PermissionJson:R",
|
||||||
CaptionName = "PermissionJson:R",
|
CaptionName = "PermissionJson:R",
|
||||||
EditGroupOrderNo = 2,
|
EditGroupOrderNo = 3,
|
||||||
EditOrderNo = 2,
|
EditOrderNo = 2,
|
||||||
EditorType2 = EditorTypes.dxTextBox,
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = false,
|
IsActive = false,
|
||||||
ListOrderNo = 21,
|
ListOrderNo = 24,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
},
|
},
|
||||||
new ListFormField
|
new ListFormField
|
||||||
|
|
@ -5009,13 +5078,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "PermissionJson:U",
|
FieldName = "PermissionJson:U",
|
||||||
CaptionName = "PermissionJson:U",
|
CaptionName = "PermissionJson:U",
|
||||||
EditGroupOrderNo = 2,
|
EditGroupOrderNo = 3,
|
||||||
EditOrderNo = 3,
|
EditOrderNo = 3,
|
||||||
EditorType2 = EditorTypes.dxTextBox,
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = false,
|
IsActive = false,
|
||||||
ListOrderNo = 22,
|
ListOrderNo = 25,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
},
|
},
|
||||||
new ListFormField
|
new ListFormField
|
||||||
|
|
@ -5025,13 +5094,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "PermissionJson:D",
|
FieldName = "PermissionJson:D",
|
||||||
CaptionName = "PermissionJson:D",
|
CaptionName = "PermissionJson:D",
|
||||||
EditGroupOrderNo = 2,
|
EditGroupOrderNo = 3,
|
||||||
EditOrderNo = 4,
|
EditOrderNo = 4,
|
||||||
EditorType2 = EditorTypes.dxTextBox,
|
EditorType2 = EditorTypes.dxTextBox,
|
||||||
ColSpan = 1,
|
ColSpan = 1,
|
||||||
Visible = false,
|
Visible = false,
|
||||||
IsActive = false,
|
IsActive = false,
|
||||||
ListOrderNo = 23,
|
ListOrderNo = 26,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -353,6 +353,7 @@ public class PlatformDbContext :
|
||||||
b.Property(a => a.Title).HasMaxLength(256);
|
b.Property(a => a.Title).HasMaxLength(256);
|
||||||
b.Property(a => a.SortMode).HasMaxLength(20);
|
b.Property(a => a.SortMode).HasMaxLength(20);
|
||||||
b.Property(a => a.PageSize).HasDefaultValue(50);
|
b.Property(a => a.PageSize).HasDefaultValue(50);
|
||||||
|
b.Property(a => a.FullHeight).HasDefaultValue(false);
|
||||||
b.Property(a => a.UpdateServiceAddress).HasMaxLength(256);
|
b.Property(a => a.UpdateServiceAddress).HasMaxLength(256);
|
||||||
b.Property(a => a.InsertServiceAddress).HasMaxLength(256);
|
b.Property(a => a.InsertServiceAddress).HasMaxLength(256);
|
||||||
b.Property(a => a.DeleteServiceAddress).HasMaxLength(256);
|
b.Property(a => a.DeleteServiceAddress).HasMaxLength(256);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Sozsoft.Platform.Migrations
|
namespace Sozsoft.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20260824093234_Initial")]
|
[Migration("20260826070015_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -3349,7 +3349,9 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("FullHeight")
|
b.Property<bool>("FullHeight")
|
||||||
.HasColumnType("bit");
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false);
|
||||||
|
|
||||||
b.Property<string>("GanttOptionJson")
|
b.Property<string>("GanttOptionJson")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
@ -1469,7 +1469,7 @@ namespace Sozsoft.Platform.Migrations
|
||||||
PageSize = table.Column<int>(type: "int", nullable: false, defaultValue: 50),
|
PageSize = table.Column<int>(type: "int", nullable: false, defaultValue: 50),
|
||||||
Width = table.Column<int>(type: "int", nullable: true),
|
Width = table.Column<int>(type: "int", nullable: true),
|
||||||
Height = table.Column<int>(type: "int", nullable: true),
|
Height = table.Column<int>(type: "int", nullable: true),
|
||||||
FullHeight = table.Column<bool>(type: "bit", nullable: false),
|
FullHeight = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||||
DefaultFilter = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
DefaultFilter = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ColumnOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
ColumnOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
PivotOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
PivotOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
|
@ -3346,7 +3346,9 @@ namespace Sozsoft.Platform.Migrations
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("FullHeight")
|
b.Property<bool>("FullHeight")
|
||||||
.HasColumnType("bit");
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false);
|
||||||
|
|
||||||
b.Property<string>("GanttOptionJson")
|
b.Property<string>("GanttOptionJson")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { SelectBoxOption } from '@/types/shared'
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import { Form, Formik, FormikProps } from 'formik'
|
import { Form, Formik, FormikProps } from 'formik'
|
||||||
import type { KeyboardEvent } from 'react'
|
import type { KeyboardEvent } from 'react'
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
import { Suspense, lazy, useCallback, useEffect, useRef, useState } from 'react'
|
||||||
import PageTitle from '@/components/shared/PageTitle'
|
import PageTitle from '@/components/shared/PageTitle'
|
||||||
import { useLocation, useNavigate } from 'react-router-dom'
|
import { useLocation, useNavigate } from 'react-router-dom'
|
||||||
import * as Yup from 'yup'
|
import * as Yup from 'yup'
|
||||||
|
|
@ -14,24 +14,10 @@ import { getDataSources } from '@/services/data-source.service'
|
||||||
import { sqlObjectManagerService } from '@/services/sql-query-manager.service'
|
import { sqlObjectManagerService } from '@/services/sql-query-manager.service'
|
||||||
import type { SqlObjectExplorerDto, DatabaseColumnDto } from '@/proxy/sql-query-manager/models'
|
import type { SqlObjectExplorerDto, DatabaseColumnDto } from '@/proxy/sql-query-manager/models'
|
||||||
import { MenuItem } from '@/proxy/menus/menu'
|
import { MenuItem } from '@/proxy/menus/menu'
|
||||||
// Adım bileşenleri, sihirbazda göründükleri sırayla.
|
import { MenuTreeNode, buildMenuTree, filterNonLinkNodes, findRootCode } from './menuTree'
|
||||||
import WizardStepMenu, {
|
import type { WizardGroup, WizardGroupItem } from './WizardStepFields'
|
||||||
MenuTreeNode,
|
|
||||||
buildMenuTree,
|
|
||||||
filterNonLinkNodes,
|
|
||||||
findRootCode,
|
|
||||||
} from './WizardStepMenu'
|
|
||||||
import WizardStepDataSettings from './WizardStepDataSettings'
|
|
||||||
import WizardStepFields, { WizardGroup, WizardGroupItem } from './WizardStepFields'
|
|
||||||
import WizardStepSubForms from './WizardStepSubForms'
|
|
||||||
import WizardStepWidgets from './WizardStepWidgets'
|
|
||||||
import WizardStepWorkflow from './WizardStepWorkflow'
|
|
||||||
import WizardStepTodoLayout from './WizardStepTodoLayout'
|
|
||||||
import WizardStepTreeLayout from './WizardStepTreeLayout'
|
|
||||||
import WizardStepGanttLayout from './WizardStepGanttLayout'
|
|
||||||
import WizardStepSchedulerLayout from './WizardStepSchedulerLayout'
|
|
||||||
import WizardStepDeploy from './WizardStepDeploy'
|
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import Loading from '@/components/shared/Loading'
|
||||||
import { sqlDataTypeToDbType } from '../edit/options'
|
import { sqlDataTypeToDbType } from '../edit/options'
|
||||||
import { useStoreActions } from '@/store/store'
|
import { useStoreActions } from '@/store/store'
|
||||||
import { useStoreState } from '@/store'
|
import { useStoreState } from '@/store'
|
||||||
|
|
@ -42,8 +28,6 @@ import {
|
||||||
postListFormWizard,
|
postListFormWizard,
|
||||||
} from '@/services/wizard.service'
|
} from '@/services/wizard.service'
|
||||||
import { ListFormWizardDto, WizardComponentKindEnum } from '@/proxy/admin/wizard/models'
|
import { ListFormWizardDto, WizardComponentKindEnum } from '@/proxy/admin/wizard/models'
|
||||||
import WizardStepComponent from './WizardStepComponent'
|
|
||||||
import WizardStepCustomComponent from './WizardStepCustomComponent'
|
|
||||||
import {
|
import {
|
||||||
ListFormWorkflowCriteriaDto,
|
ListFormWorkflowCriteriaDto,
|
||||||
SubFormDto,
|
SubFormDto,
|
||||||
|
|
@ -54,6 +38,22 @@ import {
|
||||||
SelectCommandTypeEnum,
|
SelectCommandTypeEnum,
|
||||||
} from '@/proxy/form/models'
|
} from '@/proxy/form/models'
|
||||||
|
|
||||||
|
// Adım bileşenleri, sihirbazda göründükleri sırayla. Her adım kendi paketinde yüklenir;
|
||||||
|
// aynı anda yalnızca görünen adım indirilir, sihirbaz açılışı adım sayısından bağımsız kalır.
|
||||||
|
const WizardStepMenu = lazy(() => import('./WizardStepMenu'))
|
||||||
|
const WizardStepDataSettings = lazy(() => import('./WizardStepDataSettings'))
|
||||||
|
const WizardStepFields = lazy(() => import('./WizardStepFields'))
|
||||||
|
const WizardStepSubForms = lazy(() => import('./WizardStepSubForms'))
|
||||||
|
const WizardStepWidgets = lazy(() => import('./WizardStepWidgets'))
|
||||||
|
const WizardStepWorkflow = lazy(() => import('./WizardStepWorkflow'))
|
||||||
|
const WizardStepTodoLayout = lazy(() => import('./WizardStepTodoLayout'))
|
||||||
|
const WizardStepTreeLayout = lazy(() => import('./WizardStepTreeLayout'))
|
||||||
|
const WizardStepGanttLayout = lazy(() => import('./WizardStepGanttLayout'))
|
||||||
|
const WizardStepSchedulerLayout = lazy(() => import('./WizardStepSchedulerLayout'))
|
||||||
|
const WizardStepDeploy = lazy(() => import('./WizardStepDeploy'))
|
||||||
|
const WizardStepComponent = lazy(() => import('./WizardStepComponent'))
|
||||||
|
const WizardStepCustomComponent = lazy(() => import('./WizardStepCustomComponent'))
|
||||||
|
|
||||||
// ─── Formik initial values & validation ──────────────────────────────────────
|
// ─── Formik initial values & validation ──────────────────────────────────────
|
||||||
const initialValues: ListFormWizardDto = {
|
const initialValues: ListFormWizardDto = {
|
||||||
wizardName: '',
|
wizardName: '',
|
||||||
|
|
@ -1306,211 +1306,213 @@ const Wizard = () => {
|
||||||
|
|
||||||
<Form onKeyDown={preventEnterSubmit}>
|
<Form onKeyDown={preventEnterSubmit}>
|
||||||
<FormContainer size={resolvedStep >= 2 ? undefined : 'sm'}>
|
<FormContainer size={resolvedStep >= 2 ? undefined : 'sm'}>
|
||||||
{/* ─── Step 1: Component Type (yol ayrımı) ─────────────── */}
|
<Suspense fallback={<Loading loading={true} />}>
|
||||||
{resolvedStep === STEP.component && (
|
{/* ─── Step 1: Component Type (yol ayrımı) ─────────────── */}
|
||||||
<WizardStepComponent
|
{resolvedStep === STEP.component && (
|
||||||
values={values}
|
<WizardStepComponent
|
||||||
onKindChange={handleComponentKindChange}
|
values={values}
|
||||||
translate={translate}
|
onKindChange={handleComponentKindChange}
|
||||||
onNext={() =>
|
translate={translate}
|
||||||
setCurrentStep(
|
onNext={() =>
|
||||||
values.componentKind === WizardComponentKindEnum.Custom
|
setCurrentStep(
|
||||||
? STEP.customComponent
|
values.componentKind === WizardComponentKindEnum.Custom
|
||||||
: STEP.menu,
|
? STEP.customComponent
|
||||||
)
|
: STEP.menu,
|
||||||
}
|
)
|
||||||
/>
|
}
|
||||||
)}
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* ─── Step 2: Custom Component seçimi ─────────────────── */}
|
{/* ─── Step 2: Custom Component seçimi ─────────────────── */}
|
||||||
{resolvedStep === STEP.customComponent && (
|
{resolvedStep === STEP.customComponent && (
|
||||||
<WizardStepCustomComponent
|
<WizardStepCustomComponent
|
||||||
values={values}
|
values={values}
|
||||||
onCustomComponentChange={handleCustomComponentChange}
|
onCustomComponentChange={handleCustomComponentChange}
|
||||||
translate={translate}
|
translate={translate}
|
||||||
onBack={() => setCurrentStep(STEP.component)}
|
onBack={() => setCurrentStep(STEP.component)}
|
||||||
onNext={() => setCurrentStep(STEP.menu)}
|
onNext={() => setCurrentStep(STEP.menu)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ─── Step 3: Menu ───────────────────────────────────── */}
|
{/* ─── Step 3: Menu ───────────────────────────────────── */}
|
||||||
{resolvedStep === STEP.menu && (
|
{resolvedStep === STEP.menu && (
|
||||||
<WizardStepMenu
|
<WizardStepMenu
|
||||||
values={values}
|
values={values}
|
||||||
errors={errors}
|
errors={errors}
|
||||||
touched={touched}
|
touched={touched}
|
||||||
wizardName={values.wizardName}
|
wizardName={values.wizardName}
|
||||||
wizardNameError={getWizardNameError(values)}
|
wizardNameError={getWizardNameError(values)}
|
||||||
onWizardNameChange={handleWizardNameChange}
|
onWizardNameChange={handleWizardNameChange}
|
||||||
rawMenuItems={rawMenuItems}
|
rawMenuItems={rawMenuItems}
|
||||||
menuTree={menuTree}
|
menuTree={menuTree}
|
||||||
isLoadingMenu={isLoadingMenu}
|
isLoadingMenu={isLoadingMenu}
|
||||||
onMenuParentChange={handleMenuParentChange}
|
onMenuParentChange={handleMenuParentChange}
|
||||||
onCreateMenuChange={handleCreateMenuChange}
|
onCreateMenuChange={handleCreateMenuChange}
|
||||||
onClearMenuParent={handleClearMenuParent}
|
onClearMenuParent={handleClearMenuParent}
|
||||||
onMenuDeleted={handleMenuDeleted}
|
onMenuDeleted={handleMenuDeleted}
|
||||||
onMenuCreated={handleMenuCreated}
|
onMenuCreated={handleMenuCreated}
|
||||||
onReloadMenu={getMenuList}
|
onReloadMenu={getMenuList}
|
||||||
permissionGroupList={permissionGroupList}
|
permissionGroupList={permissionGroupList}
|
||||||
isLoadingPermissionGroup={isLoadingPermissionGroup}
|
isLoadingPermissionGroup={isLoadingPermissionGroup}
|
||||||
onPermissionGroupChange={handlePermissionGroupChange}
|
onPermissionGroupChange={handlePermissionGroupChange}
|
||||||
onPermissionGroupDefine={handlePermissionGroupDefine}
|
onPermissionGroupDefine={handlePermissionGroupDefine}
|
||||||
onBack={() =>
|
onBack={() =>
|
||||||
setCurrentStep(
|
setCurrentStep(
|
||||||
values.componentKind === WizardComponentKindEnum.Custom
|
values.componentKind === WizardComponentKindEnum.Custom
|
||||||
? STEP.customComponent
|
? STEP.customComponent
|
||||||
: STEP.component,
|
: STEP.component,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
onNext={() =>
|
onNext={() =>
|
||||||
handleMenuNext(values.componentKind === WizardComponentKindEnum.Custom)
|
handleMenuNext(values.componentKind === WizardComponentKindEnum.Custom)
|
||||||
}
|
}
|
||||||
translate={translate}
|
translate={translate}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ─── Step 4: Data Settings ───────────────────────────── */}
|
{/* ─── Step 4: Data Settings ───────────────────────────── */}
|
||||||
{resolvedStep === STEP.settings && (
|
{resolvedStep === STEP.settings && (
|
||||||
<WizardStepDataSettings
|
<WizardStepDataSettings
|
||||||
values={values}
|
values={values}
|
||||||
errors={errors}
|
errors={errors}
|
||||||
touched={touched}
|
touched={touched}
|
||||||
isLoadingDataSource={isLoadingDataSource}
|
isLoadingDataSource={isLoadingDataSource}
|
||||||
dataSourceList={dataSourceList}
|
dataSourceList={dataSourceList}
|
||||||
isDataSourceNew={isDataSourceNew}
|
isDataSourceNew={isDataSourceNew}
|
||||||
onDataSourceSelect={setCurrentDataSource}
|
onDataSourceSelect={setCurrentDataSource}
|
||||||
onDataSourceNewChange={setIsDataSourceNew}
|
onDataSourceNewChange={setIsDataSourceNew}
|
||||||
dbObjects={dbObjects}
|
dbObjects={dbObjects}
|
||||||
isLoadingDbObjects={isLoadingDbObjects}
|
isLoadingDbObjects={isLoadingDbObjects}
|
||||||
onDbObjectsRefresh={loadDbObjects}
|
onDbObjectsRefresh={loadDbObjects}
|
||||||
selectCommandColumns={selectCommandColumns}
|
selectCommandColumns={selectCommandColumns}
|
||||||
isLoadingColumns={isLoadingColumns}
|
isLoadingColumns={isLoadingColumns}
|
||||||
selectedColumns={selectedColumns}
|
selectedColumns={selectedColumns}
|
||||||
onLoadColumns={loadColumns}
|
onLoadColumns={loadColumns}
|
||||||
onClearColumns={() => {
|
onClearColumns={() => {
|
||||||
setSelectCommandColumns([])
|
setSelectCommandColumns([])
|
||||||
setSelectedColumns(new Set())
|
setSelectedColumns(new Set())
|
||||||
}}
|
}}
|
||||||
onToggleColumn={toggleColumn}
|
onToggleColumn={toggleColumn}
|
||||||
onToggleAllColumns={(all) => toggleAllColumns(all, values.isTenant)}
|
onToggleAllColumns={(all) => toggleAllColumns(all, values.isTenant)}
|
||||||
onTenantChange={handleTenantChange}
|
onTenantChange={handleTenantChange}
|
||||||
translate={translate}
|
translate={translate}
|
||||||
onBack={handleBack}
|
onBack={handleBack}
|
||||||
onNext={handleNext2}
|
onNext={handleNext2}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ─── Step 5: List Form Fields ───────────────────────────── */}
|
{/* ─── Step 5: List Form Fields ───────────────────────────── */}
|
||||||
{resolvedStep === STEP.fields && (
|
{resolvedStep === STEP.fields && (
|
||||||
<WizardStepFields
|
<WizardStepFields
|
||||||
selectedColumns={selectedColumns}
|
selectedColumns={selectedColumns}
|
||||||
selectCommandColumns={selectCommandColumns}
|
selectCommandColumns={selectCommandColumns}
|
||||||
groups={editingGroups}
|
groups={editingGroups}
|
||||||
onGroupsChange={setEditingGroups}
|
onGroupsChange={setEditingGroups}
|
||||||
dbObjects={dbObjects}
|
dbObjects={dbObjects}
|
||||||
dsCode={currentDataSource}
|
dsCode={currentDataSource}
|
||||||
translate={translate}
|
translate={translate}
|
||||||
onBack={() => setCurrentStep(STEP.settings)}
|
onBack={() => setCurrentStep(STEP.settings)}
|
||||||
onNext={() => setCurrentStep(STEP.subForms)}
|
onNext={() => setCurrentStep(STEP.subForms)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ─── Step 6: Sub Forms ───────────────────────────── */}
|
{/* ─── Step 6: Sub Forms ───────────────────────────── */}
|
||||||
{resolvedStep === STEP.subForms && (
|
{resolvedStep === STEP.subForms && (
|
||||||
<WizardStepSubForms
|
<WizardStepSubForms
|
||||||
subForms={subForms}
|
subForms={subForms}
|
||||||
selectCommandColumns={selectCommandColumns}
|
selectCommandColumns={selectCommandColumns}
|
||||||
translate={translate}
|
translate={translate}
|
||||||
onChange={setSubForms}
|
onChange={setSubForms}
|
||||||
onBack={() => setCurrentStep(STEP.fields)}
|
onBack={() => setCurrentStep(STEP.fields)}
|
||||||
onNext={() => setCurrentStep(STEP.widgets)}
|
onNext={() => setCurrentStep(STEP.widgets)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ─── Step 7: Widgets ───────────────────────────── */}
|
{/* ─── Step 7: Widgets ───────────────────────────── */}
|
||||||
{resolvedStep === STEP.widgets && (
|
{resolvedStep === STEP.widgets && (
|
||||||
<WizardStepWidgets
|
<WizardStepWidgets
|
||||||
widgets={widgets}
|
widgets={widgets}
|
||||||
translate={translate}
|
translate={translate}
|
||||||
onChange={setWidgets}
|
onChange={setWidgets}
|
||||||
onBack={() => setCurrentStep(STEP.subForms)}
|
onBack={() => setCurrentStep(STEP.subForms)}
|
||||||
onNext={() => setCurrentStep(STEP.workflow)}
|
onNext={() => setCurrentStep(STEP.workflow)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ─── Step 8: Workflow ───────────────────────────── */}
|
{/* ─── Step 8: Workflow ───────────────────────────── */}
|
||||||
{resolvedStep === STEP.workflow && (
|
{resolvedStep === STEP.workflow && (
|
||||||
<WizardStepWorkflow
|
<WizardStepWorkflow
|
||||||
listFormCode={values.listFormCode}
|
listFormCode={values.listFormCode}
|
||||||
workflow={workflow}
|
workflow={workflow}
|
||||||
criteria={criteria}
|
criteria={criteria}
|
||||||
selectCommandColumns={selectCommandColumns}
|
selectCommandColumns={selectCommandColumns}
|
||||||
translate={translate}
|
translate={translate}
|
||||||
onWorkflowChange={setWorkflow}
|
onWorkflowChange={setWorkflow}
|
||||||
onCriteriaChange={setCriteria}
|
onCriteriaChange={setCriteria}
|
||||||
onBack={() => setCurrentStep(STEP.widgets)}
|
onBack={() => setCurrentStep(STEP.widgets)}
|
||||||
onNext={() => goToAdjacentStep(1)}
|
onNext={() => goToAdjacentStep(1)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ─── Step 9: Todo / Kanban ────────────────────── */}
|
{/* ─── Step 9: Todo / Kanban ────────────────────── */}
|
||||||
{resolvedStep === STEP.todo && values.todo && (
|
{resolvedStep === STEP.todo && values.todo && (
|
||||||
<WizardStepTodoLayout
|
<WizardStepTodoLayout
|
||||||
selectedColumns={selectedColumns}
|
selectedColumns={selectedColumns}
|
||||||
selectCommandColumns={selectCommandColumns}
|
selectCommandColumns={selectCommandColumns}
|
||||||
translate={translate}
|
translate={translate}
|
||||||
onBack={() => goToAdjacentStep(-1)}
|
onBack={() => goToAdjacentStep(-1)}
|
||||||
onNext={() => goToAdjacentStep(1)}
|
onNext={() => goToAdjacentStep(1)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ─── Step 10: Tree ─────────────────────────────── */}
|
{/* ─── Step 10: Tree ─────────────────────────────── */}
|
||||||
{resolvedStep === STEP.tree && values.tree && (
|
{resolvedStep === STEP.tree && values.tree && (
|
||||||
<WizardStepTreeLayout
|
<WizardStepTreeLayout
|
||||||
selectCommandColumns={selectCommandColumns}
|
selectCommandColumns={selectCommandColumns}
|
||||||
translate={translate}
|
translate={translate}
|
||||||
onBack={() => goToAdjacentStep(-1)}
|
onBack={() => goToAdjacentStep(-1)}
|
||||||
onNext={() => goToAdjacentStep(1)}
|
onNext={() => goToAdjacentStep(1)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ─── Step 11: Gantt ────────────────────────────── */}
|
{/* ─── Step 11: Gantt ────────────────────────────── */}
|
||||||
{resolvedStep === STEP.gantt && values.gantt && (
|
{resolvedStep === STEP.gantt && values.gantt && (
|
||||||
<WizardStepGanttLayout
|
<WizardStepGanttLayout
|
||||||
selectCommandColumns={selectCommandColumns}
|
selectCommandColumns={selectCommandColumns}
|
||||||
translate={translate}
|
translate={translate}
|
||||||
onBack={() => goToAdjacentStep(-1)}
|
onBack={() => goToAdjacentStep(-1)}
|
||||||
onNext={() => goToAdjacentStep(1)}
|
onNext={() => goToAdjacentStep(1)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ─── Step 12: Scheduler ───────────────────────── */}
|
{/* ─── Step 12: Scheduler ───────────────────────── */}
|
||||||
{resolvedStep === STEP.scheduler && values.scheduler && (
|
{resolvedStep === STEP.scheduler && values.scheduler && (
|
||||||
<WizardStepSchedulerLayout
|
<WizardStepSchedulerLayout
|
||||||
selectCommandColumns={selectCommandColumns}
|
selectCommandColumns={selectCommandColumns}
|
||||||
translate={translate}
|
translate={translate}
|
||||||
onBack={() => goToAdjacentStep(-1)}
|
onBack={() => goToAdjacentStep(-1)}
|
||||||
onNext={() => goToAdjacentStep(1)}
|
onNext={() => goToAdjacentStep(1)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ─── Step 13: Deploy ──────────────────────────── */}
|
{/* ─── Step 13: Deploy ──────────────────────────── */}
|
||||||
{resolvedStep === STEP.deploy && (
|
{resolvedStep === STEP.deploy && (
|
||||||
<WizardStepDeploy
|
<WizardStepDeploy
|
||||||
values={values}
|
values={values}
|
||||||
wizardName={values.wizardName}
|
wizardName={values.wizardName}
|
||||||
selectedColumns={selectedColumns}
|
selectedColumns={selectedColumns}
|
||||||
selectCommandColumns={selectCommandColumns}
|
selectCommandColumns={selectCommandColumns}
|
||||||
groups={editingGroups}
|
groups={editingGroups}
|
||||||
subForms={subForms}
|
subForms={subForms}
|
||||||
widgets={widgets}
|
widgets={widgets}
|
||||||
workflow={workflow}
|
workflow={workflow}
|
||||||
criteria={criteria}
|
criteria={criteria}
|
||||||
translate={translate}
|
translate={translate}
|
||||||
onBack={() => goToAdjacentStep(-1)}
|
onBack={() => goToAdjacentStep(-1)}
|
||||||
onSubmit={handleDeploy}
|
onSubmit={handleDeploy}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
</Suspense>
|
||||||
</FormContainer>
|
</FormContainer>
|
||||||
</Form>
|
</Form>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -29,74 +29,7 @@ import {
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import { IconPickerField, MenuAddDialog } from '@/views/shared/MenuAddDialog'
|
import { IconPickerField, MenuAddDialog } from '@/views/shared/MenuAddDialog'
|
||||||
import { ListFormWizardDto, WizardComponentKindEnum } from '@/proxy/admin/wizard/models'
|
import { ListFormWizardDto, WizardComponentKindEnum } from '@/proxy/admin/wizard/models'
|
||||||
|
import { MenuTreeNode, findRootCode, getAncestorCodes } from './menuTree'
|
||||||
// ─── Types (exported for Wizard.tsx) ─────────────────────────────────────────
|
|
||||||
|
|
||||||
export interface MenuTreeNode {
|
|
||||||
code: string
|
|
||||||
displayName: string
|
|
||||||
shortName?: string
|
|
||||||
icon?: string
|
|
||||||
url?: string
|
|
||||||
order?: number
|
|
||||||
children: MenuTreeNode[]
|
|
||||||
}
|
|
||||||
|
|
||||||
// ─── Helpers (exported for Wizard.tsx) ───────────────────────────────────────
|
|
||||||
|
|
||||||
export function buildMenuTree(items: MenuItem[]): MenuTreeNode[] {
|
|
||||||
const map = new Map<string, MenuTreeNode>()
|
|
||||||
const roots: MenuTreeNode[] = []
|
|
||||||
items.forEach((item) => {
|
|
||||||
map.set(item.code!, {
|
|
||||||
code: item.code!,
|
|
||||||
displayName: item.displayName ?? item.code!,
|
|
||||||
shortName: item.shortName ?? undefined,
|
|
||||||
icon: item.icon ?? undefined,
|
|
||||||
url: item.url ?? undefined,
|
|
||||||
order: item.order ?? undefined,
|
|
||||||
children: [],
|
|
||||||
})
|
|
||||||
})
|
|
||||||
items.forEach((item) => {
|
|
||||||
const node = map.get(item.code!)!
|
|
||||||
if (item.parentCode && map.has(item.parentCode)) {
|
|
||||||
map.get(item.parentCode)!.children.push(node)
|
|
||||||
} else {
|
|
||||||
roots.push(node)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return roots
|
|
||||||
}
|
|
||||||
|
|
||||||
export function filterNonLinkNodes(nodes: MenuTreeNode[]): MenuTreeNode[] {
|
|
||||||
return nodes
|
|
||||||
.filter((n) => !n.url)
|
|
||||||
.map((n) => ({ ...n, children: filterNonLinkNodes(n.children) }))
|
|
||||||
}
|
|
||||||
|
|
||||||
/** code → parentCode haritası; her aramada listeyi taramamak için. */
|
|
||||||
function buildParentMap(rawItems: MenuItem[]): Map<string, string | undefined> {
|
|
||||||
const map = new Map<string, string | undefined>()
|
|
||||||
rawItems.forEach((item) => {
|
|
||||||
if (item.code) map.set(item.code, item.parentCode ?? undefined)
|
|
||||||
})
|
|
||||||
return map
|
|
||||||
}
|
|
||||||
|
|
||||||
export function findRootCode(rawItems: MenuItem[], code: string): string {
|
|
||||||
const parents = buildParentMap(rawItems)
|
|
||||||
const visited = new Set<string>()
|
|
||||||
let current = code
|
|
||||||
// visited: veri bozulsa bile (döngüsel parent) sonsuz döngüye girilmez
|
|
||||||
while (!visited.has(current)) {
|
|
||||||
visited.add(current)
|
|
||||||
const parentCode = parents.get(current)
|
|
||||||
if (!parentCode) return current
|
|
||||||
current = parentCode
|
|
||||||
}
|
|
||||||
return current
|
|
||||||
}
|
|
||||||
|
|
||||||
// ─── MenuService singleton ────────────────────────────────────────────────────
|
// ─── MenuService singleton ────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|
@ -233,20 +166,6 @@ function TreeNode({
|
||||||
|
|
||||||
// ─── MenuTreeInline ───────────────────────────────────────────────────────────
|
// ─── MenuTreeInline ───────────────────────────────────────────────────────────
|
||||||
|
|
||||||
/** Returns all ancestor codes of `code` in the flat rawItems list */
|
|
||||||
function getAncestorCodes(rawItems: MenuItem[], code: string): Set<string> {
|
|
||||||
const parents = buildParentMap(rawItems)
|
|
||||||
const result = new Set<string>()
|
|
||||||
let current = code
|
|
||||||
while (true) {
|
|
||||||
const parentCode = parents.get(current)
|
|
||||||
if (!parentCode || result.has(parentCode)) break
|
|
||||||
result.add(parentCode)
|
|
||||||
current = parentCode
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MenuTreeInlineProps {
|
interface MenuTreeInlineProps {
|
||||||
value: string
|
value: string
|
||||||
onChange: (code: string) => void
|
onChange: (code: string) => void
|
||||||
|
|
|
||||||
84
ui/src/views/admin/listForm/wizard/menuTree.ts
Normal file
84
ui/src/views/admin/listForm/wizard/menuTree.ts
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
import { MenuItem } from '@/proxy/menus/menu'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Menu agaci yardimcilari. Adim bilesenlerinden ayri bir modulde durur; boylece Wizard ve
|
||||||
|
* SqlTableDesignerDialog bu fonksiyonlari kullanirken adim bilesenlerini (ve onlarin
|
||||||
|
* bagimliliklarini) pakete cekmez, adimlar lazy yuklenebilir.
|
||||||
|
*/
|
||||||
|
export interface MenuTreeNode {
|
||||||
|
code: string
|
||||||
|
displayName: string
|
||||||
|
shortName?: string
|
||||||
|
icon?: string
|
||||||
|
url?: string
|
||||||
|
order?: number
|
||||||
|
children: MenuTreeNode[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildMenuTree(items: MenuItem[]): MenuTreeNode[] {
|
||||||
|
const map = new Map<string, MenuTreeNode>()
|
||||||
|
const roots: MenuTreeNode[] = []
|
||||||
|
items.forEach((item) => {
|
||||||
|
map.set(item.code!, {
|
||||||
|
code: item.code!,
|
||||||
|
displayName: item.displayName ?? item.code!,
|
||||||
|
shortName: item.shortName ?? undefined,
|
||||||
|
icon: item.icon ?? undefined,
|
||||||
|
url: item.url ?? undefined,
|
||||||
|
order: item.order ?? undefined,
|
||||||
|
children: [],
|
||||||
|
})
|
||||||
|
})
|
||||||
|
items.forEach((item) => {
|
||||||
|
const node = map.get(item.code!)!
|
||||||
|
if (item.parentCode && map.has(item.parentCode)) {
|
||||||
|
map.get(item.parentCode)!.children.push(node)
|
||||||
|
} else {
|
||||||
|
roots.push(node)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return roots
|
||||||
|
}
|
||||||
|
|
||||||
|
export function filterNonLinkNodes(nodes: MenuTreeNode[]): MenuTreeNode[] {
|
||||||
|
return nodes
|
||||||
|
.filter((n) => !n.url)
|
||||||
|
.map((n) => ({ ...n, children: filterNonLinkNodes(n.children) }))
|
||||||
|
}
|
||||||
|
|
||||||
|
/** code → parentCode haritası; her aramada listeyi taramamak için. */
|
||||||
|
function buildParentMap(rawItems: MenuItem[]): Map<string, string | undefined> {
|
||||||
|
const map = new Map<string, string | undefined>()
|
||||||
|
rawItems.forEach((item) => {
|
||||||
|
if (item.code) map.set(item.code, item.parentCode ?? undefined)
|
||||||
|
})
|
||||||
|
return map
|
||||||
|
}
|
||||||
|
|
||||||
|
export function findRootCode(rawItems: MenuItem[], code: string): string {
|
||||||
|
const parents = buildParentMap(rawItems)
|
||||||
|
const visited = new Set<string>()
|
||||||
|
let current = code
|
||||||
|
// visited: veri bozulsa bile (döngüsel parent) sonsuz döngüye girilmez
|
||||||
|
while (!visited.has(current)) {
|
||||||
|
visited.add(current)
|
||||||
|
const parentCode = parents.get(current)
|
||||||
|
if (!parentCode) return current
|
||||||
|
current = parentCode
|
||||||
|
}
|
||||||
|
return current
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Returns all ancestor codes of `code` in the flat rawItems list */
|
||||||
|
export function getAncestorCodes(rawItems: MenuItem[], code: string): Set<string> {
|
||||||
|
const parents = buildParentMap(rawItems)
|
||||||
|
const result = new Set<string>()
|
||||||
|
let current = code
|
||||||
|
while (true) {
|
||||||
|
const parentCode = parents.get(current)
|
||||||
|
if (!parentCode || result.has(parentCode)) break
|
||||||
|
result.add(parentCode)
|
||||||
|
current = parentCode
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useState, useCallback, useMemo, useEffect, useRef } from 'react'
|
import React, { useState, useCallback, useMemo, useEffect, useRef } from 'react'
|
||||||
import { createPortal } from 'react-dom'
|
import { createPortal } from 'react-dom'
|
||||||
import { Button, Checkbox, Dialog, Notification, Select, toast } from '@/components/ui'
|
import { Button, Checkbox, Dialog, Notification, Select, toast } from '@/components/ui'
|
||||||
import {
|
import {
|
||||||
|
|
@ -35,7 +35,7 @@ import {
|
||||||
MenuTreeNode,
|
MenuTreeNode,
|
||||||
buildMenuTree,
|
buildMenuTree,
|
||||||
filterNonLinkNodes,
|
filterNonLinkNodes,
|
||||||
} from '@/views/admin/listForm/wizard/WizardStepMenu'
|
} from '@/views/admin/listForm/wizard/menuTree'
|
||||||
import { MenuAddDialog } from '../shared/MenuAddDialog'
|
import { MenuAddDialog } from '../shared/MenuAddDialog'
|
||||||
import { useStoreActions, useStoreState } from '@/store'
|
import { useStoreActions, useStoreState } from '@/store'
|
||||||
import { usePermission } from '@/utils/hooks/usePermission'
|
import { usePermission } from '@/utils/hooks/usePermission'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue