SubForms içinde İlişkili sütunu tanımlamadan Insert
This commit is contained in:
parent
4fd5d8edd2
commit
9d80d10a18
20 changed files with 1020 additions and 1032 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
namespace Erp.Platform.ListForms;
|
using System.Data;
|
||||||
|
|
||||||
|
namespace Erp.Platform.ListForms;
|
||||||
|
|
||||||
public class SubFormDto
|
public class SubFormDto
|
||||||
{
|
{
|
||||||
|
|
@ -12,6 +14,7 @@ public class SubFormDto
|
||||||
public class SubFormRelationDto
|
public class SubFormRelationDto
|
||||||
{
|
{
|
||||||
public string ParentFieldName { get; set; }
|
public string ParentFieldName { get; set; }
|
||||||
|
public DbType DbType { get; set; }
|
||||||
public string ChildFieldName { get; set; }
|
public string ChildFieldName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,8 @@ public class ListFormFieldsAppService : CrudAppService<
|
||||||
R = listFormPermissions?.R,
|
R = listFormPermissions?.R,
|
||||||
C = listFormPermissions?.C,
|
C = listFormPermissions?.C,
|
||||||
U = listFormPermissions?.U,
|
U = listFormPermissions?.U,
|
||||||
E = true
|
E = true,
|
||||||
|
I = true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4309,6 +4309,12 @@
|
||||||
"en": "Relation Fields",
|
"en": "Relation Fields",
|
||||||
"tr": "İlişkili Sütunlar"
|
"tr": "İlişkili Sütunlar"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.ListFormEdit.SubFormsRelation.ParentFieldName",
|
||||||
|
"en": "Parent Field Name",
|
||||||
|
"tr": "Üst Kimlik İfadesi"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.ListFormEdit.SubFormsRelation.ChildFieldName",
|
"key": "ListForms.ListFormEdit.SubFormsRelation.ChildFieldName",
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -132,9 +132,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
// BranchId
|
new() {
|
||||||
new()
|
|
||||||
{
|
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.Guid,
|
SourceDbType = DbType.Guid,
|
||||||
|
|
@ -342,30 +340,6 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
||||||
},
|
},
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// Sub Forms for Bank
|
|
||||||
await utils.CloneListFormWithFieldsAsync(
|
|
||||||
_listFormRepository,
|
|
||||||
_listFormFieldRepository,
|
|
||||||
listForm.ListFormCode,
|
|
||||||
JsonSerializer.Serialize(new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
TabTitle = "Bank Accounts",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.BankAccount,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "BankId"
|
|
||||||
},
|
|
||||||
new {
|
|
||||||
ParentFieldName = "BranchId",
|
|
||||||
ChildFieldName = "BranchId"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -376,7 +350,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
||||||
new ListForm()
|
new ListForm()
|
||||||
{
|
{
|
||||||
ListFormType = ListFormTypeEnum.List,
|
ListFormType = ListFormTypeEnum.List,
|
||||||
IsSubForm = false,
|
IsSubForm = true,
|
||||||
ShowNote = true,
|
ShowNote = true,
|
||||||
LayoutJson = DefaultLayoutJson,
|
LayoutJson = DefaultLayoutJson,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -385,7 +359,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
||||||
Title = AppCodes.Accounting.BankAccount,
|
Title = AppCodes.Accounting.BankAccount,
|
||||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||||
IsTenant = true,
|
IsTenant = true,
|
||||||
IsBranch = true,
|
IsBranch = false,
|
||||||
IsOrganizationUnit = false,
|
IsOrganizationUnit = false,
|
||||||
Description = AppCodes.Accounting.BankAccount,
|
Description = AppCodes.Accounting.BankAccount,
|
||||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
|
|
@ -396,7 +370,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -410,21 +384,20 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
||||||
new() {
|
new() {
|
||||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =
|
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =
|
||||||
[
|
[
|
||||||
new EditingFormItemDto { Order = 1, DataField = "BankId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 1, DataField = "AccountNumber", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 2, DataField = "AccountNumber", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 2, DataField = "AccountOwner", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 3, DataField = "AccountOwner", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 3, DataField = "CurrencyId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
new EditingFormItemDto { Order = 4, DataField = "CurrencyId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 4, DataField = "CanTransferMoney", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||||
new EditingFormItemDto { Order = 5, DataField = "CanTransferMoney", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
new() { FieldName = "CanTransferMoney", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
|
new() { FieldName = "CanTransferMoney", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Bank Account Fields
|
#region Bank Account Fields
|
||||||
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -441,29 +414,13 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new() {
|
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "BankId",
|
|
||||||
Width = 250,
|
|
||||||
ListOrderNo = 2,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Bank), "Id", "Name"),
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "AccountNumber",
|
FieldName = "AccountNumber",
|
||||||
Width = 150,
|
Width = 150,
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -481,7 +438,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "AccountOwner",
|
FieldName = "AccountOwner",
|
||||||
Width = 250,
|
Width = 250,
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -498,7 +455,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
||||||
SourceDbType = DbType.Guid,
|
SourceDbType = DbType.Guid,
|
||||||
FieldName = "CurrencyId",
|
FieldName = "CurrencyId",
|
||||||
Width = 150,
|
Width = 150,
|
||||||
ListOrderNo = 5,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -514,7 +471,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
||||||
SourceDbType = DbType.Boolean,
|
SourceDbType = DbType.Boolean,
|
||||||
FieldName = "CanTransferMoney",
|
FieldName = "CanTransferMoney",
|
||||||
Width = 50,
|
Width = 50,
|
||||||
ListOrderNo = 6,
|
ListOrderNo = 5,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -523,10 +480,31 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
});
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
// Bank ve Bank Account arasında Sub Forms ilişkisinin kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
ListFormCodes.Lists.Bank,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Bank Accounts",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.BankAccount,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "BankId"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -190,7 +190,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
PermissionJson = DefaultPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, AbpIdentity.Permissions.Delete, AbpIdentity.Permissions.Export, AbpIdentity.Permissions.Import, AbpIdentity.Permissions.Note),
|
PermissionJson = DefaultPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, AbpIdentity.Permissions.Delete, AbpIdentity.Permissions.Export, AbpIdentity.Permissions.Import, AbpIdentity.Permissions.Note),
|
||||||
|
|
@ -410,7 +410,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -616,7 +616,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -748,7 +748,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -954,7 +954,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1090,7 +1090,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1279,7 +1279,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1495,7 +1495,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1612,7 +1612,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1731,7 +1731,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1905,7 +1905,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2121,7 +2121,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DefaultFilter = DefaultFilterJson,
|
DefaultFilter = DefaultFilterJson,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2244,7 +2244,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DefaultFilter = DefaultFilterJson,
|
DefaultFilter = DefaultFilterJson,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2367,7 +2367,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2806,7 +2806,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2990,7 +2990,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -3313,7 +3313,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -3524,7 +3524,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -3735,7 +3735,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4067,7 +4067,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4131,37 +4131,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
}
|
}
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// Sub Forms for SkillType
|
|
||||||
await utils.CloneListFormWithFieldsAsync(
|
|
||||||
_listFormRepository,
|
|
||||||
_listFormFieldRepository,
|
|
||||||
listForm.ListFormCode,
|
|
||||||
JsonSerializer.Serialize(new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
TabTitle = "Skill Levels",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.SkillLevel,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "SkillTypeId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new {
|
|
||||||
TabTitle = "Skills",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.Skill,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "SkillTypeId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -4172,7 +4141,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
new ListForm()
|
new ListForm()
|
||||||
{
|
{
|
||||||
ListFormType = ListFormTypeEnum.List,
|
ListFormType = ListFormTypeEnum.List,
|
||||||
IsSubForm = false,
|
IsSubForm = true,
|
||||||
ShowNote = true,
|
ShowNote = true,
|
||||||
LayoutJson = DefaultLayoutJson,
|
LayoutJson = DefaultLayoutJson,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -4192,7 +4161,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4207,7 +4176,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 2, DataField = "Progress", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSlider, EditorOptions=EditorOptionValues.SliderOptions },
|
new EditingFormItemDto { Order = 2, DataField = "Progress", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSlider, EditorOptions=EditorOptionValues.SliderOptions },
|
||||||
new EditingFormItemDto { Order = 3, DataField = "IsDefault", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order = 3, DataField = "IsDefault", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||||
new EditingFormItemDto { Order = 4, DataField = "SkillTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
@ -4215,11 +4183,11 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
new() { FieldName = "IsDefault", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
new() { FieldName = "IsDefault", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Skill Level Fields
|
#region Skill Level Fields
|
||||||
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -4284,24 +4252,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new() {
|
], autoSave: true);
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "SkillTypeId",
|
|
||||||
Width = 150,
|
|
||||||
ListOrderNo = 5,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.SkillType), "Id", "Name"),
|
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
});
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -4313,7 +4264,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
new ListForm()
|
new ListForm()
|
||||||
{
|
{
|
||||||
ListFormType = ListFormTypeEnum.List,
|
ListFormType = ListFormTypeEnum.List,
|
||||||
IsSubForm = false,
|
IsSubForm = true,
|
||||||
ShowNote = true,
|
ShowNote = true,
|
||||||
LayoutJson = DefaultLayoutJson,
|
LayoutJson = DefaultLayoutJson,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -4333,7 +4284,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4345,15 +4296,14 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||||
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[
|
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[
|
||||||
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 2, DataField = "SkillTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Skill Fields
|
#region Skill Fields
|
||||||
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -4388,33 +4338,50 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new() {
|
], autoSave: true);
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "SkillTypeId",
|
|
||||||
Width = 150,
|
|
||||||
ListOrderNo = 3,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.SkillType), "Id", "Name"),
|
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
});
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
// Skill Type ile Skill Level ve Skill Sub Forms ilişkisinin kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
ListFormCodes.Lists.SkillType,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Skill Levels",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.SkillLevel,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "SkillTypeId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
TabTitle = "Skills",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.Skill,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "SkillTypeId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
#region UomCategory
|
#region UomCategory
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.UomCategory))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.UomCategory))
|
||||||
{
|
{
|
||||||
var listForm = await _listFormRepository.InsertAsync(
|
var listForm = await _listFormRepository.InsertAsync(
|
||||||
new ListForm {
|
new ListForm
|
||||||
|
{
|
||||||
ListFormType = ListFormTypeEnum.List,
|
ListFormType = ListFormTypeEnum.List,
|
||||||
IsSubForm = false,
|
IsSubForm = false,
|
||||||
ShowNote = true,
|
ShowNote = true,
|
||||||
|
|
@ -4436,7 +4403,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4500,26 +4467,6 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
}
|
}
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// Sub Forms for UomCategory
|
|
||||||
await utils.CloneListFormWithFieldsAsync(
|
|
||||||
_listFormRepository,
|
|
||||||
_listFormFieldRepository,
|
|
||||||
ListFormCodes.Lists.UomCategory,
|
|
||||||
JsonSerializer.Serialize(new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
TabTitle = "Uoms",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.Uom,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "UomCategoryId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -4530,7 +4477,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
new ListForm()
|
new ListForm()
|
||||||
{
|
{
|
||||||
ListFormType = ListFormTypeEnum.List,
|
ListFormType = ListFormTypeEnum.List,
|
||||||
IsSubForm = false,
|
IsSubForm = true,
|
||||||
ShowNote = true,
|
ShowNote = true,
|
||||||
LayoutJson = DefaultLayoutJson,
|
LayoutJson = DefaultLayoutJson,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -4550,7 +4497,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4566,16 +4513,18 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
new EditingFormItemDto { Order = 3, DataField = "Ratio", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order = 3, DataField = "Ratio", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order = 4, DataField = "Rounding", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order = 4, DataField = "Rounding", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||||
new EditingFormItemDto { Order = 6, DataField = "UomCategoryId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
}
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
|
}),
|
||||||
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Uom Fields
|
#region Uom Fields
|
||||||
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
new ListFormField
|
new ListFormField
|
||||||
{
|
{
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
|
@ -4681,25 +4630,45 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
{
|
{
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.Guid,
|
SourceDbType = DbType.Boolean,
|
||||||
FieldName = "UomCategoryId",
|
FieldName = "IsActive",
|
||||||
Width = 150,
|
Width = 100,
|
||||||
ListOrderNo = 6,
|
ListOrderNo = 6,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
AllowSearch = true,
|
AllowSearch = true,
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.UomCategory), "Id", "Name"),
|
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
});
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
// UomCategory ve Uom arasında Sub Forms ilişkisinin kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
ListFormCodes.Lists.UomCategory,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Uoms",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.Uom,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "UomCategoryId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
#region Behavior
|
#region Behavior
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Behavior))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Behavior))
|
||||||
{
|
{
|
||||||
|
|
@ -4727,7 +4696,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4813,7 +4782,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4901,7 +4870,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4986,7 +4955,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -5089,7 +5058,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -5175,7 +5144,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -5448,7 +5417,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -5624,7 +5593,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -186,7 +186,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -580,7 +580,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -726,7 +726,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -899,7 +899,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1107,7 +1107,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1280,7 +1280,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1552,7 +1552,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1666,7 +1666,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1905,7 +1905,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1915,7 +1915,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
PagerOptionJson = DefaultPagerOptionJson,
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.QuestionTag, 500, 250, true, true, true, true, false),
|
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.QuestionTag, 500, 250, true, true, true, true, false),
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||||
new() {
|
new() {
|
||||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=
|
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=
|
||||||
[
|
[
|
||||||
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
|
@ -1924,7 +1924,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region QuestionTag Fields
|
#region QuestionTag Fields
|
||||||
|
|
@ -1993,7 +1993,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
}
|
}
|
||||||
]);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -2025,7 +2025,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2035,7 +2035,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
PagerOptionJson = DefaultPagerOptionJson,
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.QuestionPool, 500, 250, true, true, true, true, false),
|
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.QuestionPool, 500, 250, true, true, true, true, false),
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||||
new() {
|
new() {
|
||||||
Order=1, ColCount=1, ColSpan=1,ItemType="group", Items= [
|
Order=1, ColCount=1, ColSpan=1,ItemType="group", Items= [
|
||||||
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
|
@ -2124,26 +2124,6 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
}
|
}
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// Sub Forms for Question Pool
|
|
||||||
await utils.CloneListFormWithFieldsAsync(
|
|
||||||
_listFormRepository,
|
|
||||||
_listFormFieldRepository,
|
|
||||||
listForm.ListFormCode,
|
|
||||||
JsonSerializer.Serialize(new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
TabTitle = "Questions",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.Question,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "QuestionPoolId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -2174,7 +2154,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2197,13 +2177,13 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
}),
|
}),
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||||
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||||
new EditingFormItemDto { Order = 1, DataField = "QuestionPoolId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 1, DataField = "QuestionType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
new EditingFormItemDto { Order = 2, DataField = "QuestionType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 2, DataField = "Points", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order = 3, DataField = "Points", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order = 3, DataField = "Title", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 4, DataField = "Title", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 4, DataField = "Content", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea },
|
||||||
new EditingFormItemDto { Order = 5, DataField = "Content", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea },
|
new EditingFormItemDto { Order = 5, DataField = "MediaType", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
new EditingFormItemDto { Order = 6, DataField = "Difficulty", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 6, DataField = "MediaUrl", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 7, DataField = "MediaType", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 7, DataField = "Difficulty", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
new EditingFormItemDto { Order = 8, DataField = "MediaUrl", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 8, DataField = "MediaUrl", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 9, DataField = "CorrectAnswer", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions="{\"disabled\": true}" },
|
new EditingFormItemDto { Order = 9, DataField = "CorrectAnswer", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions="{\"disabled\": true}" },
|
||||||
new EditingFormItemDto { Order = 10, DataField = "TimeLimit", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order = 10, DataField = "TimeLimit", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
|
|
@ -2214,7 +2194,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
new() { FieldName = "MediaType", FieldDbType = DbType.String, Value = "image", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "MediaType", FieldDbType = DbType.String, Value = "image", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "Difficulty", FieldDbType = DbType.String, Value = "easy", CustomValueType = FieldCustomValueTypeEnum.Value }
|
new() { FieldName = "Difficulty", FieldDbType = DbType.String, Value = "easy", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
})
|
})
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Question Fields
|
#region Question Fields
|
||||||
|
|
@ -2235,30 +2215,13 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new() {
|
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "QuestionPoolId",
|
|
||||||
Width = 100,
|
|
||||||
ListOrderNo = 2,
|
|
||||||
Visible = false,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
SortIndex = 0,
|
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.QuestionPool), "Id", "Name"),
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "QuestionType",
|
FieldName = "QuestionType",
|
||||||
Width = 120,
|
Width = 120,
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -2292,7 +2255,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
Format = "fixedPoint",
|
Format = "fixedPoint",
|
||||||
Alignment = "right",
|
Alignment = "right",
|
||||||
Width = 60,
|
Width = 60,
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -2307,7 +2270,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "Title",
|
FieldName = "Title",
|
||||||
Width = 150,
|
Width = 150,
|
||||||
ListOrderNo = 5,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -2322,7 +2285,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "Content",
|
FieldName = "Content",
|
||||||
Width = 350,
|
Width = 350,
|
||||||
ListOrderNo = 6,
|
ListOrderNo = 5,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -2337,7 +2300,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "MediaType",
|
FieldName = "MediaType",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 7,
|
ListOrderNo = 6,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -2362,7 +2325,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "MediaUrl",
|
FieldName = "MediaUrl",
|
||||||
Width = 170,
|
Width = 170,
|
||||||
ListOrderNo = 8,
|
ListOrderNo = 7,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -2377,7 +2340,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "CorrectAnswer",
|
FieldName = "CorrectAnswer",
|
||||||
Width = 150,
|
Width = 150,
|
||||||
ListOrderNo = 9,
|
ListOrderNo = 8,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -2392,7 +2355,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "Difficulty",
|
FieldName = "Difficulty",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 10,
|
ListOrderNo = 9,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -2418,7 +2381,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SourceDbType = DbType.Int32,
|
SourceDbType = DbType.Int32,
|
||||||
FieldName = "TimeLimit",
|
FieldName = "TimeLimit",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 11,
|
ListOrderNo = 10,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -2433,7 +2396,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "Explanation",
|
FieldName = "Explanation",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 12,
|
ListOrderNo = 11,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -2442,9 +2405,30 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
]);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// QuestionPool ve Question arasında Sub Forms ilişkisinin kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
ListFormCodes.Lists.QuestionPool,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Questions",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.Question,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "QuestionPoolId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -193,7 +193,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -313,7 +313,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -936,48 +936,6 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
|
|
||||||
// Sub Forms for Customer
|
|
||||||
await utils.CloneListFormWithFieldsAsync(
|
|
||||||
_listFormRepository,
|
|
||||||
_listFormFieldRepository,
|
|
||||||
listForm.ListFormCode,
|
|
||||||
JsonSerializer.Serialize(new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
TabTitle = "Banks",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.PartnerBank,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "PartnerId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new {
|
|
||||||
TabTitle = "Certificates",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.PartnerCertificate,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "PartnerId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new {
|
|
||||||
TabTitle = "Contacts",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.PartnerContact,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "PartnerId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -1008,7 +966,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1177,7 +1135,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1531,37 +1489,6 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
},
|
},
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// Sub Forms for Opportunity
|
|
||||||
await utils.CloneListFormWithFieldsAsync(
|
|
||||||
_listFormRepository,
|
|
||||||
_listFormFieldRepository,
|
|
||||||
listForm.ListFormCode,
|
|
||||||
JsonSerializer.Serialize(new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
TabTitle = "Activity",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.OpportunityActivity,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "OpportunityId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new {
|
|
||||||
TabTitle = "Competitors",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.OpportunityCompetitor,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "OpportunityId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -1592,7 +1519,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1618,16 +1545,15 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
new EditingFormItemDto { Order = 10, DataField="FollowUpActivity", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
new EditingFormItemDto { Order = 10, DataField="FollowUpActivity", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
||||||
new EditingFormItemDto { Order = 11, DataField="Outcome", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 11, DataField="Outcome", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 12, DataField="NextSteps", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
new EditingFormItemDto { Order = 12, DataField="NextSteps", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea },
|
||||||
new EditingFormItemDto { Order = 13, DataField="OpportunityId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
new() { FieldName = "ActivityDate", FieldDbType = DbType.DateTime, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
new() { FieldName = "ActivityDate", FieldDbType = DbType.DateTime, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Action Fields
|
#region Activity Fields
|
||||||
await _listFormFieldRepository.InsertManyAsync([
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
|
@ -1845,23 +1771,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new() {
|
], autoSave: true);
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "OpportunityId",
|
|
||||||
Width = 200,
|
|
||||||
ListOrderNo = 14,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Opportunity), "Id", "Title"),
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -1893,7 +1803,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1914,7 +1824,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
new EditingFormItemDto { Order = 5, DataField="MarketShare", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order = 5, DataField="MarketShare", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Competitor Fields
|
#region Competitor Fields
|
||||||
|
|
@ -2011,9 +1921,42 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
]);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
// Opportunity ile Activity ve Competitor arasında Sub Forms ilişkisinin kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
ListFormCodes.Lists.Opportunity,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Activity",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.OpportunityActivity,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "OpportunityId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
TabTitle = "Competitors",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.OpportunityCompetitor,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "OpportunityId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -171,7 +171,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -468,7 +468,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -686,7 +686,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -992,7 +992,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1286,7 +1286,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2003,7 +2003,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2330,7 +2330,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2655,7 +2655,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2936,7 +2936,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -3298,7 +3298,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -3449,7 +3449,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -3682,7 +3682,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4016,7 +4016,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4163,37 +4163,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
},
|
},
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// Sub Forms for Survey
|
|
||||||
await utils.CloneListFormWithFieldsAsync(
|
|
||||||
_listFormRepository,
|
|
||||||
_listFormFieldRepository,
|
|
||||||
listForm.ListFormCode,
|
|
||||||
JsonSerializer.Serialize(new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
TabTitle = "Questions",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.SurveyQuestion,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "SurveyId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new {
|
|
||||||
TabTitle = "Responses",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.SurveyResponse,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "SurveyId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -4224,7 +4193,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4238,7 +4207,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
{
|
{
|
||||||
new() {
|
new() {
|
||||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
|
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
|
||||||
new EditingFormItemDto { Order = 1, DataField = "SurveyId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 1, DataField = "Order", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order = 2, DataField = "QuestionText", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 2, DataField = "QuestionText", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 3, DataField = "Type", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 3, DataField = "Type", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
new EditingFormItemDto { Order = 4, DataField = "IsRequired", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxCheckBox }
|
new EditingFormItemDto { Order = 4, DataField = "IsRequired", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxCheckBox }
|
||||||
|
|
@ -4257,7 +4226,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
Url="/admin/list/list-employees/@Id"
|
Url="/admin/list/list-employees/@Id"
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Survey Question Fields
|
#region Survey Question Fields
|
||||||
|
|
@ -4278,30 +4247,13 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new() {
|
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "SurveyId",
|
|
||||||
Width = 200,
|
|
||||||
ListOrderNo = 2,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Survey), "Id", "Title"),
|
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.Int32,
|
SourceDbType = DbType.Int32,
|
||||||
FieldName = "Order",
|
FieldName = "Order",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -4317,7 +4269,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "QuestionText",
|
FieldName = "QuestionText",
|
||||||
Width = 300,
|
Width = 300,
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -4333,7 +4285,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "Type",
|
FieldName = "Type",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 5,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -4361,7 +4313,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.Boolean,
|
SourceDbType = DbType.Boolean,
|
||||||
FieldName = "IsRequired",
|
FieldName = "IsRequired",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 6,
|
ListOrderNo = 5,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -4370,7 +4322,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
]);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -4402,7 +4354,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4416,10 +4368,9 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
{
|
{
|
||||||
new() {
|
new() {
|
||||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
|
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
|
||||||
new EditingFormItemDto { Order = 1, DataField = "SurveyId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 1, DataField = "EmployeeId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
new EditingFormItemDto { Order = 2, DataField = "EmployeeId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 2, DataField = "SubmissionTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 3, DataField = "SubmissionTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 3, DataField = "CreationTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }
|
||||||
new EditingFormItemDto { Order = 4, DataField = "CreationTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }
|
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||||
|
|
@ -4431,7 +4382,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
Url="/admin/list/list-employees/@Id"
|
Url="/admin/list/list-employees/@Id"
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Survey Response Fields
|
#region Survey Response Fields
|
||||||
|
|
@ -4452,30 +4403,13 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new() {
|
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "SurveyId",
|
|
||||||
Width = 200,
|
|
||||||
ListOrderNo = 2,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Survey), "Id", "Title"),
|
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.Guid,
|
SourceDbType = DbType.Guid,
|
||||||
FieldName = "EmployeeId",
|
FieldName = "EmployeeId",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -4492,7 +4426,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.DateTime,
|
SourceDbType = DbType.DateTime,
|
||||||
FieldName = "SubmissionTime",
|
FieldName = "SubmissionTime",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -4508,7 +4442,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.DateTime,
|
SourceDbType = DbType.DateTime,
|
||||||
FieldName = "CreationTime",
|
FieldName = "CreationTime",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 5,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -4517,9 +4451,42 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
]);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Survey ile Survey Question ve Survey Response Sub Forms ilişkisinin kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
ListFormCodes.Lists.Survey,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Questions",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.SurveyQuestion,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "SurveyId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
TabTitle = "Responses",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.SurveyResponse,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "SurveyId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,13 +74,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
PermissionJson = DefaultPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, TenantManagementPermissions.Tenants.Delete, TenantManagementPermissions.Tenants.Default + ".Export", TenantManagementPermissions.Tenants.Default + ".Import", TenantManagementPermissions.Tenants.Default + ".Note"),
|
PermissionJson = DefaultPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, TenantManagementPermissions.Tenants.Delete, TenantManagementPermissions.Tenants.Default + ".Export", TenantManagementPermissions.Tenants.Default + ".Import", TenantManagementPermissions.Tenants.Default + ".Note"),
|
||||||
PagerOptionJson = DefaultPagerOptionJson,
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
EditingOptionJson = DefaultEditingOptionJson(TenantManagementPermissions.Tenants.Default, 800, 800, true, true, true, true, false),
|
EditingOptionJson = DefaultEditingOptionJson(TenantManagementPermissions.Tenants.Default, 800, 700, true, true, true, true, false),
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||||
{
|
{
|
||||||
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =
|
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =
|
||||||
|
|
@ -140,11 +140,11 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value }
|
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
})
|
})
|
||||||
|
|
||||||
}, autoSave: true);
|
}, autoSave: true
|
||||||
|
);
|
||||||
|
|
||||||
#region Tenants Fields
|
#region Tenants Fields
|
||||||
await _listFormFieldRepository.InsertManyAsync(
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
[
|
|
||||||
new ListFormField
|
new ListFormField
|
||||||
{
|
{
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
|
@ -517,38 +517,18 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
},
|
},
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// Sub Forms for Tenant
|
|
||||||
await utils.CloneListFormWithFieldsAsync(
|
|
||||||
_listFormRepository,
|
|
||||||
_listFormFieldRepository,
|
|
||||||
listForm.ListFormCode,
|
|
||||||
JsonSerializer.Serialize(new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
TabTitle = "Branches",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.Branch,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "TenantId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} }
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Branche
|
#region Branches
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Branch))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Branch))
|
||||||
{
|
{
|
||||||
var listForm = await _listFormRepository.InsertAsync(
|
var listForm = await _listFormRepository.InsertAsync(
|
||||||
new ListForm()
|
new ListForm()
|
||||||
{
|
{
|
||||||
ListFormType = ListFormTypeEnum.List,
|
ListFormType = ListFormTypeEnum.List,
|
||||||
IsSubForm = false,
|
IsSubForm = true,
|
||||||
ShowNote = true,
|
ShowNote = true,
|
||||||
LayoutJson = DefaultLayoutJson,
|
LayoutJson = DefaultLayoutJson,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -568,13 +548,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
PermissionJson = DefaultPermissionJson(AppCodes.Branches),
|
PermissionJson = DefaultPermissionJson(AppCodes.Branches),
|
||||||
PagerOptionJson = DefaultPagerOptionJson,
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Branches, 900, 800, true, true, true, true, false),
|
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Branches, 800, 700, true, true, true, true, false),
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||||
{
|
{
|
||||||
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =
|
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =
|
||||||
|
|
@ -612,22 +592,21 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value }
|
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
}),
|
}),
|
||||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||||
new() {
|
new() {
|
||||||
Hint = "Seed",
|
Hint = "Seed",
|
||||||
Text = "Seed",
|
Text = "Seed",
|
||||||
AuthName = AppCodes.Branches + ".Update",
|
AuthName = AppCodes.Branches + ".Update",
|
||||||
DialogName = "BranchSeed",
|
DialogName = "BranchSeed",
|
||||||
DialogParameters = JsonSerializer.Serialize(
|
DialogParameters = JsonSerializer.Serialize(
|
||||||
new { id = "@Id", name = "@Name"}
|
new { id = "@Id", name = "@Name"}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Branches Fields
|
#region Branches Fields
|
||||||
await _listFormFieldRepository.InsertManyAsync(
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
[
|
|
||||||
new ListFormField
|
new ListFormField
|
||||||
{
|
{
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
|
@ -979,11 +958,32 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
]);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
// Tenant ve Branches arasında Sub Forms ilişkisinin kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
ListFormCodes.Lists.Tenant,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Branches",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.Branch,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "TenantId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
#region SettingDefinition
|
#region SettingDefinition
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.SettingDefinition))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.SettingDefinition))
|
||||||
{
|
{
|
||||||
|
|
@ -1011,7 +1011,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1381,7 +1381,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1533,7 +1533,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1564,8 +1564,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Language)}/@Id"
|
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Language)}/@Id"
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
, autoSave: true);
|
);
|
||||||
|
|
||||||
#region Language Fields
|
#region Language Fields
|
||||||
await _listFormFieldRepository.InsertManyAsync([
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
|
|
@ -1651,26 +1651,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
},
|
},
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// Sub Forms for Tenant
|
|
||||||
await utils.CloneListFormWithFieldsAsync(
|
|
||||||
_listFormRepository,
|
|
||||||
_listFormFieldRepository,
|
|
||||||
ListFormCodes.Lists.Language,
|
|
||||||
JsonSerializer.Serialize(new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
TabTitle = "Language Texts",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.LanguageText,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "CultureName",
|
|
||||||
ChildFieldName = "CultureName"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -1681,7 +1661,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
new ListForm()
|
new ListForm()
|
||||||
{
|
{
|
||||||
ListFormType = ListFormTypeEnum.List,
|
ListFormType = ListFormTypeEnum.List,
|
||||||
IsSubForm = false,
|
IsSubForm = true,
|
||||||
ShowNote = true,
|
ShowNote = true,
|
||||||
LayoutJson = DefaultLayoutJson,
|
LayoutJson = DefaultLayoutJson,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -1701,7 +1681,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -1721,7 +1701,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region LanguageText Fields
|
#region LanguageText Fields
|
||||||
|
|
@ -1828,12 +1808,33 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
]);
|
], autoSave: true);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
// Language ve LanguageText Sub Forms ilişkisinin kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
ListFormCodes.Lists.Language,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Language Texts",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.LanguageText,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "CultureName",
|
||||||
|
DbType = DbType.String,
|
||||||
|
ChildFieldName = "CultureName"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
#region Route
|
#region Route
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Route))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Route))
|
||||||
{
|
{
|
||||||
|
|
@ -1861,7 +1862,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2034,7 +2035,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2314,7 +2315,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2444,7 +2445,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeMultiple,
|
SortMode = GridOptions.SortModeMultiple,
|
||||||
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true, ApplyFilter = GridOptions.FilterRowApplyFilterAuto }),
|
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true, ApplyFilter = GridOptions.FilterRowApplyFilterAuto }),
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionMultipleJson,
|
SelectionJson = DefaultSelectionMultipleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -2912,7 +2913,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -3144,7 +3145,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -3334,7 +3335,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -3770,7 +3771,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -3924,7 +3925,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4009,7 +4010,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4208,7 +4209,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
@ -4354,7 +4355,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
SearchPanelJson= DefaultSearchPanelJson,
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }),
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
|
|
||||||
|
|
@ -1046,111 +1046,112 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
#region Supplier
|
#region Supplier
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Supply))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Supply))
|
||||||
{
|
{
|
||||||
var listForm = await _listFormRepository.InsertAsync(new ListForm()
|
var listForm = await _listFormRepository.InsertAsync(
|
||||||
{
|
new ListForm()
|
||||||
ListFormType = ListFormTypeEnum.List,
|
|
||||||
IsSubForm = false,
|
|
||||||
ShowNote = true,
|
|
||||||
LayoutJson = DefaultLayoutJson,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
ListFormCode = ListFormCodes.Lists.Supply,
|
|
||||||
Name = AppCodes.SupplyChain.Supply,
|
|
||||||
Title = AppCodes.SupplyChain.Supply,
|
|
||||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
|
||||||
IsTenant = true,
|
|
||||||
IsBranch = false,
|
|
||||||
IsOrganizationUnit = false,
|
|
||||||
Description = AppCodes.SupplyChain.Supply,
|
|
||||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
|
||||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Partner)),
|
|
||||||
KeyFieldName = "Id",
|
|
||||||
KeyFieldDbSourceType = DbType.Guid,
|
|
||||||
DefaultFilter = "\"IsDeleted\" = 'false' AND \"PartyType\" = 'Supplier'",
|
|
||||||
SortMode = GridOptions.SortModeSingle,
|
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
|
||||||
SearchPanelJson = DefaultSearchPanelJson,
|
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
|
||||||
PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.Supply),
|
|
||||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Partner)),
|
|
||||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
|
||||||
PagerOptionJson = DefaultPagerOptionJson,
|
|
||||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.Supply, 1000, 600, true, true, true, true, false),
|
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
|
||||||
{
|
{
|
||||||
new()
|
ListFormType = ListFormTypeEnum.List,
|
||||||
|
IsSubForm = false,
|
||||||
|
ShowNote = true,
|
||||||
|
LayoutJson = DefaultLayoutJson,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
ListFormCode = ListFormCodes.Lists.Supply,
|
||||||
|
Name = AppCodes.SupplyChain.Supply,
|
||||||
|
Title = AppCodes.SupplyChain.Supply,
|
||||||
|
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||||
|
IsTenant = true,
|
||||||
|
IsBranch = false,
|
||||||
|
IsOrganizationUnit = false,
|
||||||
|
Description = AppCodes.SupplyChain.Supply,
|
||||||
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
|
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Partner)),
|
||||||
|
KeyFieldName = "Id",
|
||||||
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
|
DefaultFilter = "\"IsDeleted\" = 'false' AND \"PartyType\" = 'Supplier'",
|
||||||
|
SortMode = GridOptions.SortModeSingle,
|
||||||
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.Supply),
|
||||||
|
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Partner)),
|
||||||
|
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||||
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
|
EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.Supply, 1000, 600, true, true, true, true, false),
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||||
{
|
{
|
||||||
Order = 1, Caption = "General", ColCount = 3, ColSpan = 2, ItemType = "group", Items =
|
new()
|
||||||
[
|
{
|
||||||
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
Order = 1, Caption = "General", ColCount = 3, ColSpan = 2, ItemType = "group", Items =
|
||||||
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
[
|
||||||
new EditingFormItemDto { Order = 3, DataField = "PartyType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions = EditorOptionValues.Disabled },
|
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 4, DataField = "SectorId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 5, DataField = "TaxNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order = 3, DataField = "PartyType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions = EditorOptionValues.Disabled },
|
||||||
new EditingFormItemDto { Order = 6, DataField = "TaxOffice", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 4, DataField = "SectorId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
new EditingFormItemDto { Order = 7, DataField = "CurrencyId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 5, DataField = "TaxNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order = 8, DataField = "PaymentTermId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new EditingFormItemDto { Order = 6, DataField = "TaxOffice", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 9, DataField = "CreditLimit", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order = 7, DataField = "CurrencyId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
]
|
new EditingFormItemDto { Order = 8, DataField = "PaymentTermId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
},
|
new EditingFormItemDto { Order = 9, DataField = "CreditLimit", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
new()
|
]
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
Order = 2, Caption = "Address", ColCount = 3, ColSpan = 2, ItemType = "group", Items =
|
||||||
|
[
|
||||||
|
new EditingFormItemDto { Order = 10, DataField = "Country", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
|
new EditingFormItemDto { Order = 11, DataField = "City", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
|
new EditingFormItemDto { Order = 12, DataField = "District", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
|
new EditingFormItemDto { Order = 13, DataField = "Street", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
|
new EditingFormItemDto { Order = 14, DataField = "Address1", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 15, DataField = "Address2", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 16, DataField = "PostalCode", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 17, DataField = "PhoneNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.PhoneEditorOptions },
|
||||||
|
new EditingFormItemDto { Order = 18, DataField = "MobileNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.PhoneEditorOptions },
|
||||||
|
new EditingFormItemDto { Order = 19, DataField = "FaxNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.PhoneEditorOptions },
|
||||||
|
new EditingFormItemDto { Order = 20, DataField = "Email", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 21, DataField = "Website", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||||
|
]
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
Order = 3, Caption="Supply Card", ColCount = 3, ColSpan = 2, ItemType = "group", Items =
|
||||||
|
[
|
||||||
|
new EditingFormItemDto { Order = 22, DataField = "SupplierTypeId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
|
new EditingFormItemDto { Order = 23, DataField = "SupplyCardTypeId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||||
|
new EditingFormItemDto { Order = 24, DataField = "CardNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 25, DataField = "ValidFrom", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
||||||
|
new EditingFormItemDto { Order = 26, DataField = "ValidTo", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
||||||
|
new EditingFormItemDto { Order = 27, DataField = "CurrentBalance", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
|
new EditingFormItemDto { Order = 28, DataField = "DiscountRate", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
|
new EditingFormItemDto { Order = 29, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
|
||||||
{
|
{
|
||||||
Order = 2, Caption = "Address", ColCount = 3, ColSpan = 2, ItemType = "group", Items =
|
new() { FieldName = "PartyType", FieldDbType = DbType.String, Value = "Supplier", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
[
|
new() { FieldName = "CreditLimit", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new EditingFormItemDto { Order = 10, DataField = "Country", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new() { FieldName = "CurrentBalance", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new EditingFormItemDto { Order = 11, DataField = "City", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new() { FieldName = "DiscountRate", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new EditingFormItemDto { Order = 12, DataField = "District", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new EditingFormItemDto { Order = 13, DataField = "Street", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new EditingFormItemDto { Order = 14, DataField = "Address1", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
}),
|
||||||
new EditingFormItemDto { Order = 15, DataField = "Address2", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||||
new EditingFormItemDto { Order = 16, DataField = "PostalCode", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
new() {
|
||||||
new EditingFormItemDto { Order = 17, DataField = "PhoneNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.PhoneEditorOptions },
|
Hint = "Manage",
|
||||||
new EditingFormItemDto { Order = 18, DataField = "MobileNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.PhoneEditorOptions },
|
Text ="Manage",
|
||||||
new EditingFormItemDto { Order = 19, DataField = "FaxNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.PhoneEditorOptions },
|
UrlTarget="_blank",
|
||||||
new EditingFormItemDto { Order = 20, DataField = "Email", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
AuthName = AppCodes.SupplyChain.Supply,
|
||||||
new EditingFormItemDto { Order = 21, DataField = "Website", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Supply)}/@Id"
|
||||||
]
|
},
|
||||||
},
|
}),
|
||||||
new()
|
}, autoSave: true
|
||||||
{
|
);
|
||||||
Order = 3, Caption="Supply Card", ColCount = 3, ColSpan = 2, ItemType = "group", Items =
|
|
||||||
[
|
|
||||||
new EditingFormItemDto { Order = 22, DataField = "SupplierTypeId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
|
||||||
new EditingFormItemDto { Order = 23, DataField = "SupplyCardTypeId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
|
||||||
new EditingFormItemDto { Order = 24, DataField = "CardNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
|
||||||
new EditingFormItemDto { Order = 25, DataField = "ValidFrom", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
|
||||||
new EditingFormItemDto { Order = 26, DataField = "ValidTo", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
|
||||||
new EditingFormItemDto { Order = 27, DataField = "CurrentBalance", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
|
||||||
new EditingFormItemDto { Order = 28, DataField = "DiscountRate", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
|
||||||
new EditingFormItemDto { Order = 29, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
|
||||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
|
|
||||||
{
|
|
||||||
new() { FieldName = "PartyType", FieldDbType = DbType.String, Value = "Supplier", CustomValueType = FieldCustomValueTypeEnum.Value },
|
|
||||||
new() { FieldName = "CreditLimit", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
|
||||||
new() { FieldName = "CurrentBalance", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
|
||||||
new() { FieldName = "DiscountRate", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
|
||||||
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
|
|
||||||
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value },
|
|
||||||
}),
|
|
||||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
|
||||||
new() {
|
|
||||||
Hint = "Manage",
|
|
||||||
Text ="Manage",
|
|
||||||
UrlTarget="_blank",
|
|
||||||
AuthName = AppCodes.SupplyChain.Supply,
|
|
||||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Supply)}/@Id"
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
}, autoSave: true);
|
|
||||||
|
|
||||||
await _listFormFieldRepository.InsertManyAsync(
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
[
|
|
||||||
new()
|
new()
|
||||||
{
|
{
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
|
@ -1689,48 +1690,6 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
|
|
||||||
// Sub Forms for Supply
|
|
||||||
await utils.CloneListFormWithFieldsAsync(
|
|
||||||
_listFormRepository,
|
|
||||||
_listFormFieldRepository,
|
|
||||||
listForm.ListFormCode,
|
|
||||||
JsonSerializer.Serialize(new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
TabTitle = "Banks",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.PartnerBank,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "PartnerId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new {
|
|
||||||
TabTitle = "Certificates",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.PartnerCertificate,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "PartnerId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new {
|
|
||||||
TabTitle = "Contacts",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.PartnerContact,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "PartnerId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -1788,7 +1747,6 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
new EditingFormItemDto { Order = 11, DataField="DailyTransferLimit", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order = 11, DataField="DailyTransferLimit", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order = 12, DataField="IsDefault", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order = 12, DataField="IsDefault", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||||
new EditingFormItemDto { Order = 13, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order = 13, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||||
new EditingFormItemDto { Order = 14, DataField="PartnerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
|
@ -1798,7 +1756,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
new() { FieldName = "IsDefault", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "IsDefault", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Partner Bank Fields
|
#region Partner Bank Fields
|
||||||
|
|
@ -2038,23 +1996,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new() {
|
], autoSave: true);
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "PartnerId",
|
|
||||||
Width = 100,
|
|
||||||
ListOrderNo = 15,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Partner), "Id", "Name"),
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -2104,10 +2046,9 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
new EditingFormItemDto { Order = 2, DataField="Issuer", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 2, DataField="Issuer", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 3, DataField="IssueDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
|
new EditingFormItemDto { Order = 3, DataField="IssueDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
|
||||||
new EditingFormItemDto { Order = 4, DataField="ExpiryDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
|
new EditingFormItemDto { Order = 4, DataField="ExpiryDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
|
||||||
new EditingFormItemDto { Order = 5, DataField="PartnerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Supplier Certificate Fields
|
#region Supplier Certificate Fields
|
||||||
|
|
@ -2192,23 +2133,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.PartnerCertificate),
|
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.PartnerCertificate),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new() {
|
], autoSave: true);
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "PartnerId",
|
|
||||||
Width = 100,
|
|
||||||
ListOrderNo = 6,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Partner), "Id", "Name"),
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -2262,14 +2187,13 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
new EditingFormItemDto { Order = 6, DataField="MobileNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.PhoneEditorOptions },
|
new EditingFormItemDto { Order = 6, DataField="MobileNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.PhoneEditorOptions },
|
||||||
new EditingFormItemDto { Order = 7, DataField="IsPrimary", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order = 7, DataField="IsPrimary", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||||
new EditingFormItemDto { Order = 8, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order = 8, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||||
new EditingFormItemDto { Order = 9, DataField="PartnerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
new() { FieldName = "IsPrimary", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "IsPrimary", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Supplier Contact Fields
|
#region Supplier Contact Fields
|
||||||
|
|
@ -2416,27 +2340,101 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new() {
|
], autoSave: true);
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "PartnerId",
|
|
||||||
Width = 100,
|
|
||||||
ListOrderNo = 8,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Partner), "Id", "Name"),
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
// Supply ile Bank, Certificate ve Contact Sub Forms ilişkisinin kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
ListFormCodes.Lists.Supply,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Banks",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.PartnerBank,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "PartnerId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
TabTitle = "Certificates",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.PartnerCertificate,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "PartnerId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
TabTitle = "Contacts",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.PartnerContact,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "PartnerId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
// Customer ile Bank, Certificate ve Contact Sub Forms ilişkisinin kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
ListFormCodes.Lists.Customer,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Banks",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.PartnerBank,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "PartnerId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
TabTitle = "Certificates",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.PartnerCertificate,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "PartnerId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new {
|
||||||
|
TabTitle = "Contacts",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.PartnerContact,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "PartnerId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
#region Approval
|
#region Approval
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Approval))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Approval))
|
||||||
{
|
{
|
||||||
|
|
@ -2602,27 +2600,6 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sub Forms for Approval Workflow
|
|
||||||
await utils.CloneListFormWithFieldsAsync(
|
|
||||||
_listFormRepository,
|
|
||||||
_listFormFieldRepository,
|
|
||||||
ListFormCodes.Lists.Approval,
|
|
||||||
JsonSerializer.Serialize(new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
TabTitle = "Steps",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.ApprovalStep,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "ApprovalId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Approval Step
|
#region Approval Step
|
||||||
|
|
@ -2632,7 +2609,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
new ListForm()
|
new ListForm()
|
||||||
{
|
{
|
||||||
ListFormType = ListFormTypeEnum.List,
|
ListFormType = ListFormTypeEnum.List,
|
||||||
IsSubForm = false,
|
IsSubForm = true,
|
||||||
ShowNote = true,
|
ShowNote = true,
|
||||||
LayoutJson = DefaultLayoutJson,
|
LayoutJson = DefaultLayoutJson,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -2670,7 +2647,6 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
new EditingFormItemDto { Order = 3, DataField = "TimeoutDays", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
new EditingFormItemDto { Order = 3, DataField = "TimeoutDays", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
|
||||||
new EditingFormItemDto { Order = 4, DataField = "IsRequired", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order = 4, DataField = "IsRequired", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||||
new EditingFormItemDto { Order = 5, DataField = "IsParallel", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order = 5, DataField = "IsParallel", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||||
new EditingFormItemDto { Order = 6, DataField = "ApprovalId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
|
@ -2678,10 +2654,10 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
new() { FieldName = "IsRequired", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "IsRequired", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "IsParallel", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
|
new() { FieldName = "IsParallel", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Approval Workflow Step Fields
|
#region Approval Step Fields
|
||||||
await _listFormFieldRepository.InsertManyAsync([
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
|
@ -2778,27 +2754,32 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new() {
|
], autoSave: true);
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "ApprovalId",
|
|
||||||
Width = 100,
|
|
||||||
ListOrderNo = 8,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Approval), "Id", "Name"),
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
// Approval ve Approval Step arasında Sub Forms ilişkisinin kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
ListFormCodes.Lists.Approval,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Steps",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.ApprovalStep,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "ApprovalId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
#region Request Type
|
#region Request Type
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.RequestType))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.RequestType))
|
||||||
{
|
{
|
||||||
|
|
@ -2925,74 +2906,76 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
#region Purchase Request
|
#region Purchase Request
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Request))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Request))
|
||||||
{
|
{
|
||||||
var listForm = await _listFormRepository.InsertAsync(new ListForm()
|
var listForm = await _listFormRepository.InsertAsync(
|
||||||
{
|
new ListForm()
|
||||||
ListFormType = ListFormTypeEnum.List,
|
|
||||||
IsSubForm = false,
|
|
||||||
ShowNote = true,
|
|
||||||
LayoutJson = DefaultLayoutJson,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
ListFormCode = ListFormCodes.Lists.Request,
|
|
||||||
Name = AppCodes.SupplyChain.Request,
|
|
||||||
Title = AppCodes.SupplyChain.Request,
|
|
||||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
|
||||||
IsTenant = true,
|
|
||||||
IsBranch = false,
|
|
||||||
IsOrganizationUnit = false,
|
|
||||||
Description = AppCodes.SupplyChain.Request,
|
|
||||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
|
||||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Request)),
|
|
||||||
KeyFieldName = "Id",
|
|
||||||
KeyFieldDbSourceType = DbType.Guid,
|
|
||||||
DefaultFilter = DefaultFilterJson,
|
|
||||||
SortMode = GridOptions.SortModeSingle,
|
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
|
||||||
SearchPanelJson = DefaultSearchPanelJson,
|
|
||||||
GroupPanelJson = DefaultGroupPanelJson,
|
|
||||||
SelectionJson = DefaultSelectionSingleJson,
|
|
||||||
ColumnOptionJson = DefaultColumnOptionJson,
|
|
||||||
PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.Request),
|
|
||||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Request)),
|
|
||||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
|
||||||
PagerOptionJson = DefaultPagerOptionJson,
|
|
||||||
EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.Request, 800, 300, true, true, true, true, false),
|
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
|
||||||
{
|
{
|
||||||
new()
|
ListFormType = ListFormTypeEnum.List,
|
||||||
|
IsSubForm = false,
|
||||||
|
ShowNote = true,
|
||||||
|
LayoutJson = DefaultLayoutJson,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
ListFormCode = ListFormCodes.Lists.Request,
|
||||||
|
Name = AppCodes.SupplyChain.Request,
|
||||||
|
Title = AppCodes.SupplyChain.Request,
|
||||||
|
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||||
|
IsTenant = true,
|
||||||
|
IsBranch = false,
|
||||||
|
IsOrganizationUnit = false,
|
||||||
|
Description = AppCodes.SupplyChain.Request,
|
||||||
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
|
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Request)),
|
||||||
|
KeyFieldName = "Id",
|
||||||
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
|
DefaultFilter = DefaultFilterJson,
|
||||||
|
SortMode = GridOptions.SortModeSingle,
|
||||||
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.Request),
|
||||||
|
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Request)),
|
||||||
|
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||||
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
|
EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.Request, 800, 300, true, true, true, true, false),
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||||
{
|
{
|
||||||
Order = 1, ColCount = 2, ColSpan = 2, ItemType = "group", Items =
|
new()
|
||||||
[
|
{
|
||||||
new EditingFormItemDto { Order = 1, DataField = "RequestNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.Disabled },
|
Order = 1, ColCount = 2, ColSpan = 2, ItemType = "group", Items =
|
||||||
new EditingFormItemDto { Order = 2, DataField = "RequestTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
[
|
||||||
new EditingFormItemDto { Order = 3, DataField = "DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
new EditingFormItemDto { Order = 1, DataField = "RequestNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.Disabled },
|
||||||
new EditingFormItemDto { Order = 4, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
new EditingFormItemDto { Order = 2, DataField = "RequestTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
new EditingFormItemDto { Order = 5, DataField = "RequestDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
|
new EditingFormItemDto { Order = 3, DataField = "DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
new EditingFormItemDto { Order = 6, DataField = "RequiredDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
new EditingFormItemDto { Order = 4, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
new EditingFormItemDto { Order = 7, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
new EditingFormItemDto { Order = 5, DataField = "RequestDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
|
||||||
new EditingFormItemDto { Order = 8, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
new EditingFormItemDto { Order = 6, DataField = "RequiredDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
|
||||||
new EditingFormItemDto { Order = 9, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea },
|
new EditingFormItemDto { Order = 7, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
]
|
new EditingFormItemDto { Order = 8, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
}
|
new EditingFormItemDto { Order = 9, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea },
|
||||||
}),
|
]
|
||||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
}
|
||||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
|
}),
|
||||||
{
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
new() { FieldName = "RequestNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
|
||||||
new() { FieldName = "RequestDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
{
|
||||||
new() { FieldName = "Priority", FieldDbType = DbType.String, Value = "Low", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "RequestNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||||
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Draft", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "RequestDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||||
}),
|
new() { FieldName = "Priority", FieldDbType = DbType.String, Value = "Low", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Draft", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() {
|
}),
|
||||||
Hint = "Manage",
|
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||||
Text ="Manage",
|
new() {
|
||||||
UrlTarget="_blank",
|
Hint = "Manage",
|
||||||
AuthName = AppCodes.SupplyChain.Request,
|
Text ="Manage",
|
||||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Request)}/@Id"
|
UrlTarget="_blank",
|
||||||
},
|
AuthName = AppCodes.SupplyChain.Request,
|
||||||
}),
|
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Request)}/@Id"
|
||||||
}, autoSave: true);
|
},
|
||||||
|
}),
|
||||||
|
}, autoSave: true
|
||||||
|
);
|
||||||
|
|
||||||
await _listFormFieldRepository.InsertManyAsync([
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
new() {
|
new() {
|
||||||
|
|
@ -3183,26 +3166,6 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
}
|
}
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
|
|
||||||
// Sub Forms for Supply
|
|
||||||
await utils.CloneListFormWithFieldsAsync(
|
|
||||||
_listFormRepository,
|
|
||||||
_listFormFieldRepository,
|
|
||||||
listForm.ListFormCode,
|
|
||||||
JsonSerializer.Serialize(new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
TabTitle = "Malzemeler",
|
|
||||||
TabType = ListFormTabTypeEnum.List,
|
|
||||||
Code = ListFormCodes.Lists.RequestItem,
|
|
||||||
Relation = new List<dynamic>() {
|
|
||||||
new {
|
|
||||||
ParentFieldName = "Id",
|
|
||||||
ChildFieldName = "RequestId"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -3254,7 +3217,6 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
new EditingFormItemDto { Order = 5, DataField="Specification", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 5, DataField="Specification", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 6, DataField="Justification", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 6, DataField="Justification", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 7, DataField="IsUrgent", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
new EditingFormItemDto { Order = 7, DataField="IsUrgent", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox },
|
||||||
new EditingFormItemDto { Order = 8, DataField="RequestId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
|
||||||
]}
|
]}
|
||||||
}),
|
}),
|
||||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
|
@ -3262,7 +3224,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
new() { FieldName = "EstimatedPrice", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
new() { FieldName = "EstimatedPrice", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
new() { FieldName = "IsUrgent", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
|
new() { FieldName = "IsUrgent", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
}),
|
}),
|
||||||
}
|
}, autoSave: true
|
||||||
);
|
);
|
||||||
|
|
||||||
#region Purchase Request Item Fields
|
#region Purchase Request Item Fields
|
||||||
|
|
@ -3397,25 +3359,30 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
new() {
|
], autoSave: true);
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.Guid,
|
|
||||||
FieldName = "RequestId",
|
|
||||||
Width = 130,
|
|
||||||
ListOrderNo = 8,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Request), "Id", "RequestNumber"),
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
// Purchase Request ve Purchase Request Item arasında SubForm ilişki kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
ListFormCodes.Lists.Request,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = "Malzemeler",
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = ListFormCodes.Lists.RequestItem,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "RequestId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11292,6 +11292,69 @@
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
"MenuGroup": "Erp"
|
"MenuGroup": "Erp"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Accounting",
|
||||||
|
"Name": "App.Accounting.BankAccount",
|
||||||
|
"ParentName": null,
|
||||||
|
"DisplayName": "App.Accounting.BankAccount",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Accounting",
|
||||||
|
"Name": "App.Accounting.BankAccount.Create",
|
||||||
|
"ParentName": "App.Accounting.BankAccount",
|
||||||
|
"DisplayName": "Create",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Accounting",
|
||||||
|
"Name": "App.Accounting.BankAccount.Update",
|
||||||
|
"ParentName": "App.Accounting.BankAccount",
|
||||||
|
"DisplayName": "Update",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Accounting",
|
||||||
|
"Name": "App.Accounting.BankAccount.Delete",
|
||||||
|
"ParentName": "App.Accounting.BankAccount",
|
||||||
|
"DisplayName": "Delete",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Accounting",
|
||||||
|
"Name": "App.Accounting.BankAccount.Export",
|
||||||
|
"ParentName": "App.Accounting.BankAccount",
|
||||||
|
"DisplayName": "Export",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Accounting",
|
||||||
|
"Name": "App.Accounting.BankAccount.Import",
|
||||||
|
"ParentName": "App.Accounting.BankAccount",
|
||||||
|
"DisplayName": "Import",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Accounting",
|
||||||
|
"Name": "App.Accounting.BankAccount.Note",
|
||||||
|
"ParentName": "App.Accounting.BankAccount",
|
||||||
|
"DisplayName": "Note",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "App.Accounting",
|
"GroupName": "App.Accounting",
|
||||||
"Name": "App.Accounting.CheckNote",
|
"Name": "App.Accounting.CheckNote",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Erp.Platform.Entities;
|
using Erp.Platform.Entities;
|
||||||
|
using Erp.Platform.ListForms;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Volo.Abp.Domain.Repositories;
|
using Volo.Abp.Domain.Repositories;
|
||||||
|
|
||||||
namespace Erp.Platform.Data.Seeds;
|
namespace Erp.Platform.Data.Seeds;
|
||||||
|
|
@ -12,78 +17,77 @@ public class SeederUtils : IDisposable
|
||||||
IRepository<ListForm, Guid> listFormRepository,
|
IRepository<ListForm, Guid> listFormRepository,
|
||||||
IRepository<ListFormField, Guid> listFormFieldRepository,
|
IRepository<ListFormField, Guid> listFormFieldRepository,
|
||||||
string listFormCode,
|
string listFormCode,
|
||||||
string subFormsJson = "")
|
string subFormsJson)
|
||||||
{
|
{
|
||||||
// load source form
|
// load source form
|
||||||
var sourceForm = await listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == listFormCode);
|
var listForm = await listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == listFormCode);
|
||||||
if (sourceForm == null)
|
if (listForm == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
string targetListFormCode = GetDefaultFormCodes(listFormCode);
|
string formCode = GetDefaultFormCodes(listFormCode);
|
||||||
|
|
||||||
var targetForm = await listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == targetListFormCode);
|
var targetForm = await listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == formCode);
|
||||||
if (targetForm != null)
|
if (targetForm == null)
|
||||||
{
|
{
|
||||||
return null;
|
// create a shallow copy of the source form and set the target code
|
||||||
|
var insertForm = new ListForm
|
||||||
|
{
|
||||||
|
ListFormCode = formCode,
|
||||||
|
SubFormsJson = subFormsJson, //Özelleştirilmiş SubFormsJson
|
||||||
|
|
||||||
|
ListFormType = listForm.ListFormType,
|
||||||
|
IsSubForm = listForm.IsSubForm,
|
||||||
|
ShowNote = listForm.ShowNote,
|
||||||
|
LayoutJson = listForm.LayoutJson,
|
||||||
|
CultureName = listForm.CultureName,
|
||||||
|
Name = listForm.Name,
|
||||||
|
Title = listForm.Title,
|
||||||
|
DataSourceCode = listForm.DataSourceCode,
|
||||||
|
IsTenant = listForm.IsTenant,
|
||||||
|
IsBranch = listForm.IsBranch,
|
||||||
|
IsOrganizationUnit = listForm.IsOrganizationUnit,
|
||||||
|
Description = listForm.Description,
|
||||||
|
SelectCommandType = listForm.SelectCommandType,
|
||||||
|
SelectCommand = listForm.SelectCommand,
|
||||||
|
KeyFieldName = listForm.KeyFieldName,
|
||||||
|
KeyFieldDbSourceType = listForm.KeyFieldDbSourceType,
|
||||||
|
DefaultFilter = listForm.DefaultFilter,
|
||||||
|
SortMode = listForm.SortMode,
|
||||||
|
PermissionJson = listForm.PermissionJson,
|
||||||
|
DeleteCommand = listForm.DeleteCommand,
|
||||||
|
DeleteFieldsDefaultValueJson = listForm.DeleteFieldsDefaultValueJson,
|
||||||
|
EditingOptionJson = listForm.EditingOptionJson,
|
||||||
|
EditingFormJson = listForm.EditingFormJson,
|
||||||
|
InsertFieldsDefaultValueJson = listForm.InsertFieldsDefaultValueJson,
|
||||||
|
FormFieldsDefaultValueJson = listForm.FormFieldsDefaultValueJson,
|
||||||
|
CommandColumnJson = listForm.CommandColumnJson,
|
||||||
|
InsertServiceAddress = listForm.InsertServiceAddress,
|
||||||
|
UpdateServiceAddress = listForm.UpdateServiceAddress,
|
||||||
|
FilterRowJson = listForm.FilterRowJson,
|
||||||
|
HeaderFilterJson = listForm.HeaderFilterJson,
|
||||||
|
SearchPanelJson = listForm.SearchPanelJson,
|
||||||
|
GroupPanelJson = listForm.GroupPanelJson,
|
||||||
|
SelectionJson = listForm.SelectionJson,
|
||||||
|
ColumnOptionJson = listForm.ColumnOptionJson,
|
||||||
|
PagerOptionJson = listForm.PagerOptionJson,
|
||||||
|
};
|
||||||
|
|
||||||
|
// insert cloned form
|
||||||
|
targetForm = await listFormRepository.InsertAsync(insertForm, autoSave: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a shallow copy of the source form and set the target code
|
|
||||||
var clonedForm = new ListForm
|
|
||||||
{
|
|
||||||
ListFormType = sourceForm.ListFormType,
|
|
||||||
IsSubForm = sourceForm.IsSubForm,
|
|
||||||
ShowNote = sourceForm.ShowNote,
|
|
||||||
LayoutJson = sourceForm.LayoutJson,
|
|
||||||
SubFormsJson = subFormsJson ?? sourceForm.SubFormsJson,
|
|
||||||
CultureName = sourceForm.CultureName,
|
|
||||||
ListFormCode = targetListFormCode,
|
|
||||||
Name = sourceForm.Name,
|
|
||||||
Title = sourceForm.Title,
|
|
||||||
DataSourceCode = sourceForm.DataSourceCode,
|
|
||||||
IsTenant = sourceForm.IsTenant,
|
|
||||||
IsBranch = sourceForm.IsBranch,
|
|
||||||
IsOrganizationUnit = sourceForm.IsOrganizationUnit,
|
|
||||||
Description = sourceForm.Description,
|
|
||||||
SelectCommandType = sourceForm.SelectCommandType,
|
|
||||||
SelectCommand = sourceForm.SelectCommand,
|
|
||||||
KeyFieldName = sourceForm.KeyFieldName,
|
|
||||||
KeyFieldDbSourceType = sourceForm.KeyFieldDbSourceType,
|
|
||||||
DefaultFilter = sourceForm.DefaultFilter,
|
|
||||||
SortMode = sourceForm.SortMode,
|
|
||||||
PermissionJson = sourceForm.PermissionJson,
|
|
||||||
DeleteCommand = sourceForm.DeleteCommand,
|
|
||||||
DeleteFieldsDefaultValueJson = sourceForm.DeleteFieldsDefaultValueJson,
|
|
||||||
EditingOptionJson = sourceForm.EditingOptionJson,
|
|
||||||
EditingFormJson = sourceForm.EditingFormJson,
|
|
||||||
InsertFieldsDefaultValueJson = sourceForm.InsertFieldsDefaultValueJson,
|
|
||||||
FormFieldsDefaultValueJson = sourceForm.FormFieldsDefaultValueJson,
|
|
||||||
CommandColumnJson = sourceForm.CommandColumnJson,
|
|
||||||
InsertServiceAddress = sourceForm.InsertServiceAddress,
|
|
||||||
UpdateServiceAddress = sourceForm.UpdateServiceAddress,
|
|
||||||
FilterRowJson = sourceForm.FilterRowJson,
|
|
||||||
HeaderFilterJson = sourceForm.HeaderFilterJson,
|
|
||||||
SearchPanelJson = sourceForm.SearchPanelJson,
|
|
||||||
GroupPanelJson = sourceForm.GroupPanelJson,
|
|
||||||
SelectionJson = sourceForm.SelectionJson,
|
|
||||||
ColumnOptionJson = sourceForm.ColumnOptionJson,
|
|
||||||
PagerOptionJson = sourceForm.PagerOptionJson,
|
|
||||||
};
|
|
||||||
|
|
||||||
// insert cloned form
|
|
||||||
var insertedForm = await listFormRepository.InsertAsync(clonedForm);
|
|
||||||
|
|
||||||
// copy fields
|
// copy fields
|
||||||
var fields = await listFormFieldRepository.GetListAsync(f => f.ListFormCode == listFormCode);
|
var targetFormFields = await listFormFieldRepository.GetListAsync(f => f.ListFormCode == listFormCode);
|
||||||
if (fields != null && fields.Count > 0)
|
if (targetFormFields != null && targetFormFields.Count > 0)
|
||||||
{
|
{
|
||||||
var clonedFields = new List<ListFormField>();
|
var clonedFields = new List<ListFormField>();
|
||||||
foreach (var f in fields)
|
foreach (var f in targetFormFields)
|
||||||
{
|
{
|
||||||
var newField = new ListFormField
|
var newField = new ListFormField
|
||||||
{
|
{
|
||||||
ListFormCode = targetListFormCode,
|
ListFormCode = formCode,
|
||||||
CultureName = f.CultureName,
|
CultureName = f.CultureName,
|
||||||
SourceDbType = f.SourceDbType,
|
SourceDbType = f.SourceDbType,
|
||||||
FieldName = f.FieldName,
|
FieldName = f.FieldName,
|
||||||
|
|
@ -105,10 +109,84 @@ public class SeederUtils : IDisposable
|
||||||
clonedFields.Add(newField);
|
clonedFields.Add(newField);
|
||||||
}
|
}
|
||||||
|
|
||||||
await listFormFieldRepository.InsertManyAsync(clonedFields);
|
await listFormFieldRepository.InsertManyAsync(clonedFields, autoSave: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return insertedForm;
|
//Subform içerisindeki ParentFieldName ve ChildFieldName alanlarına göre eksik olan fieldları ekle
|
||||||
|
var subForms = JsonSerializer.Deserialize<List<SubFormDto>>(subFormsJson);
|
||||||
|
if (subForms != null)
|
||||||
|
{
|
||||||
|
foreach (var subForm in subForms)
|
||||||
|
{
|
||||||
|
foreach (var sf in subForm.Relation)
|
||||||
|
{
|
||||||
|
var parentFieldName = sf.ParentFieldName;
|
||||||
|
var dbType = sf.DbType;
|
||||||
|
|
||||||
|
await InsertListFormFieldAsync(
|
||||||
|
listFormRepository,
|
||||||
|
listFormFieldRepository,
|
||||||
|
listFormCode,
|
||||||
|
parentFieldName,
|
||||||
|
dbType
|
||||||
|
);
|
||||||
|
|
||||||
|
var childListFormCode = subForm.Code;
|
||||||
|
var childFieldName = sf.ChildFieldName;
|
||||||
|
|
||||||
|
await InsertListFormFieldAsync(
|
||||||
|
listFormRepository,
|
||||||
|
listFormFieldRepository,
|
||||||
|
childListFormCode,
|
||||||
|
childFieldName,
|
||||||
|
dbType
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return targetForm;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task InsertListFormFieldAsync(
|
||||||
|
IRepository<ListForm, Guid> listFormRepository,
|
||||||
|
IRepository<ListFormField, Guid> listFormFieldRepository,
|
||||||
|
string listFormCode,
|
||||||
|
string fieldName,
|
||||||
|
DbType dbType
|
||||||
|
)
|
||||||
|
{
|
||||||
|
var form = await listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == listFormCode);
|
||||||
|
var fieldQuery = await listFormFieldRepository.GetQueryableAsync();
|
||||||
|
|
||||||
|
var formField = await fieldQuery.FirstOrDefaultAsync(f => f.ListFormCode == listFormCode && f.FieldName == fieldName);
|
||||||
|
if (formField == null)
|
||||||
|
{
|
||||||
|
var listOrderNo = await fieldQuery.Where(f => f.ListFormCode == listFormCode).MaxAsync(a => a.ListOrderNo) ?? 0;
|
||||||
|
var field = new ListFormField
|
||||||
|
{
|
||||||
|
CultureName = PlatformConsts.DefaultLanguage,
|
||||||
|
ListFormCode = listFormCode,
|
||||||
|
SourceDbType = dbType,
|
||||||
|
FieldName = fieldName,
|
||||||
|
ListOrderNo = listOrderNo + 1,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
SortIndex = 0,
|
||||||
|
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||||
|
{
|
||||||
|
C = form.Name + ".Create",
|
||||||
|
R = form.Name,
|
||||||
|
U = form.Name + ".Update",
|
||||||
|
E = true,
|
||||||
|
I = false,
|
||||||
|
Deny = false
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
|
||||||
|
await listFormFieldRepository.InsertAsync(field, autoSave: true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetDefaultFormCodes(string listCode)
|
public string GetDefaultFormCodes(string listCode)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ namespace Erp.Platform.Entities;
|
||||||
public class BankAccount : FullAuditedEntity<Guid>, IMultiTenant
|
public class BankAccount : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
{
|
{
|
||||||
public Guid? TenantId { get; set; }
|
public Guid? TenantId { get; set; }
|
||||||
public Guid? BranchId { get; set; }
|
|
||||||
|
|
||||||
public string AccountNumber { get; set; }
|
public string AccountNumber { get; set; }
|
||||||
public Guid BankId { get; set; }
|
public Guid BankId { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
using Volo.Abp.Domain.Values;
|
using Volo.Abp.Domain.Values;
|
||||||
|
|
||||||
namespace Erp.Platform.Queries;
|
namespace Erp.Platform.Queries;
|
||||||
|
|
@ -24,6 +25,7 @@ public class SubForm : ValueObject
|
||||||
public class SubFormRelation
|
public class SubFormRelation
|
||||||
{
|
{
|
||||||
public string ParentFieldName { get; set; }
|
public string ParentFieldName { get; set; }
|
||||||
|
public DbType DbType { get; set; }
|
||||||
public string ChildFieldName { get; set; }
|
public string ChildFieldName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Erp.Platform.Migrations
|
namespace Erp.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20251116194718_Initial")]
|
[Migration("20251117212636_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -1230,9 +1230,6 @@ namespace Erp.Platform.Migrations
|
||||||
b.Property<Guid>("BankId")
|
b.Property<Guid>("BankId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<Guid?>("BranchId")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<bool>("CanTransferMoney")
|
b.Property<bool>("CanTransferMoney")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
|
@ -2674,7 +2674,6 @@ namespace Erp.Platform.Migrations
|
||||||
{
|
{
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
||||||
AccountNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
AccountNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||||
BankId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
BankId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
AccountOwner = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
AccountOwner = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||||
|
|
@ -1227,9 +1227,6 @@ namespace Erp.Platform.Migrations
|
||||||
b.Property<Guid>("BankId")
|
b.Property<Guid>("BankId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<Guid?>("BranchId")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<bool>("CanTransferMoney")
|
b.Property<bool>("CanTransferMoney")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -699,6 +699,7 @@ export interface SubFormDto {
|
||||||
|
|
||||||
export interface SubFormRelationDto {
|
export interface SubFormRelationDto {
|
||||||
parentFieldName: string
|
parentFieldName: string
|
||||||
|
dbType : DbTypeEnum
|
||||||
childFieldName: string
|
childFieldName: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import { useState } from 'react'
|
||||||
import { FaEdit, FaFileMedical, FaTrash } from 'react-icons/fa'
|
import { FaEdit, FaFileMedical, FaTrash } from 'react-icons/fa'
|
||||||
import JsonRowOpDialogSubForm from './json-row-operations/JsonRowOpDialogSubForm'
|
import JsonRowOpDialogSubForm from './json-row-operations/JsonRowOpDialogSubForm'
|
||||||
import { JsonRowDialogData } from './json-row-operations/types'
|
import { JsonRowDialogData } from './json-row-operations/types'
|
||||||
|
import { dbSourceTypeOptions } from './options'
|
||||||
|
|
||||||
function FormTabSubForm() {
|
function FormTabSubForm() {
|
||||||
const [isJsonRowOpDialogOpen, setIsJsonRowOpDialogOpen] = useState(false)
|
const [isJsonRowOpDialogOpen, setIsJsonRowOpDialogOpen] = useState(false)
|
||||||
|
|
@ -111,7 +112,12 @@ function FormTabSubForm() {
|
||||||
<ul className="list-disc">
|
<ul className="list-disc">
|
||||||
{row.relation?.map((i) => (
|
{row.relation?.map((i) => (
|
||||||
<li key={i.parentFieldName + ':' + i.childFieldName}>
|
<li key={i.parentFieldName + ':' + i.childFieldName}>
|
||||||
{i.parentFieldName + ' : ' + i.childFieldName}
|
{i.parentFieldName +
|
||||||
|
' : ' +
|
||||||
|
i.childFieldName +
|
||||||
|
' (' +
|
||||||
|
dbSourceTypeOptions.find((option) => option.value === i.dbType)?.label +
|
||||||
|
')'}
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import { Field, FieldArray, FieldProps, Form, Formik } from 'formik'
|
||||||
import { Dispatch, SetStateAction } from 'react'
|
import { Dispatch, SetStateAction } from 'react'
|
||||||
import { FaCalendarPlus, FaCalendarMinus } from 'react-icons/fa'
|
import { FaCalendarPlus, FaCalendarMinus } from 'react-icons/fa'
|
||||||
import { boolean, object, string } from 'yup'
|
import { boolean, object, string } from 'yup'
|
||||||
import { tabTypeOptions } from '../options'
|
import { dbSourceTypeOptions, tabTypeOptions } from '../options'
|
||||||
import { JsonRowDialogData } from './types'
|
import { JsonRowDialogData } from './types'
|
||||||
import {
|
import {
|
||||||
deleteListFormJsonRow,
|
deleteListFormJsonRow,
|
||||||
|
|
@ -69,7 +69,7 @@ function JsonRowOpDialogSubForm({
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Dialog
|
||||||
id="subFormOperation"
|
id="subFormOperation"
|
||||||
width={1000}
|
width={900}
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
preventScroll={true}
|
preventScroll={true}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
|
|
@ -126,67 +126,66 @@ function JsonRowOpDialogSubForm({
|
||||||
{({ touched, errors, values, isSubmitting }) => (
|
{({ touched, errors, values, isSubmitting }) => (
|
||||||
<Form>
|
<Form>
|
||||||
<FormContainer size="sm">
|
<FormContainer size="sm">
|
||||||
<div className="h-full overflow-y-auto p-2">
|
<div className="h-[500px] overflow-y-auto p-2">
|
||||||
<FormItem
|
<div className="grid grid-cols-4 gap-4">
|
||||||
label="Tab Title"
|
<FormItem
|
||||||
invalid={errors.tabTitle && touched.tabTitle}
|
label="Tab Title"
|
||||||
errorMessage={errors.tabTitle}
|
invalid={errors.tabTitle && touched.tabTitle}
|
||||||
>
|
errorMessage={errors.tabTitle}
|
||||||
<Field
|
>
|
||||||
autoFocus={true}
|
<Field
|
||||||
type="text"
|
autoFocus={true}
|
||||||
autoComplete="off"
|
type="text"
|
||||||
name="tabTitle"
|
autoComplete="off"
|
||||||
placeholder="Title"
|
name="tabTitle"
|
||||||
component={Input}
|
placeholder="Title"
|
||||||
/>
|
component={Input}
|
||||||
</FormItem>
|
/>
|
||||||
|
</FormItem>
|
||||||
|
|
||||||
<FormItem
|
<FormItem
|
||||||
label="Tab Type"
|
label="Tab Type"
|
||||||
invalid={errors.tabType && touched.tabType}
|
invalid={errors.tabType && touched.tabType}
|
||||||
errorMessage={errors.tabType}
|
errorMessage={errors.tabType}
|
||||||
>
|
>
|
||||||
<Field type="text" autoComplete="off" name="tabType" placeholder="Tab Type">
|
<Field type="text" autoComplete="off" name="tabType" placeholder="Tab Type">
|
||||||
{({ field, form }: FieldProps<SelectBoxOption>) => (
|
{({ field, form }: FieldProps<SelectBoxOption>) => (
|
||||||
<Select
|
<Select
|
||||||
field={field}
|
field={field}
|
||||||
form={form}
|
form={form}
|
||||||
isClearable={true}
|
isClearable={true}
|
||||||
options={tabTypeOptions}
|
options={tabTypeOptions}
|
||||||
value={tabTypeOptions?.filter(
|
value={tabTypeOptions?.filter(
|
||||||
(option: any) => option.value === values.tabType,
|
(option: any) => option.value === values.tabType,
|
||||||
)}
|
)}
|
||||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Field>
|
</Field>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem
|
<FormItem
|
||||||
label="Code"
|
label="Code"
|
||||||
invalid={errors.code && touched.code}
|
invalid={errors.code && touched.code}
|
||||||
errorMessage={errors.code}
|
errorMessage={errors.code}
|
||||||
>
|
>
|
||||||
<Field
|
<Field
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
name="code"
|
name="code"
|
||||||
placeholder="Code"
|
placeholder="Code"
|
||||||
component={Input}
|
component={Input}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem
|
<FormItem
|
||||||
label="isRefresh"
|
label="isRefresh"
|
||||||
invalid={errors.isRefresh && touched.isRefresh}
|
invalid={errors.isRefresh && touched.isRefresh}
|
||||||
errorMessage={errors.isRefresh}
|
errorMessage={errors.isRefresh}
|
||||||
>
|
>
|
||||||
<Field
|
<Field name="isRefresh" component={Checkbox} />
|
||||||
name="isRefresh"
|
</FormItem>
|
||||||
component={Checkbox}
|
</div>
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
|
|
||||||
<FormItem label="Relations">
|
<FormItem label="Relations">
|
||||||
<FieldArray
|
<FieldArray
|
||||||
|
|
@ -196,6 +195,7 @@ function JsonRowOpDialogSubForm({
|
||||||
<div className="flex m-1 font-bold text-center">
|
<div className="flex m-1 font-bold text-center">
|
||||||
<div className="w-4/12">Parent Field Name</div>
|
<div className="w-4/12">Parent Field Name</div>
|
||||||
<div className="w-4/12">Child Field Name</div>
|
<div className="w-4/12">Child Field Name</div>
|
||||||
|
<div className="w-4/12">Db Type</div>
|
||||||
</div>
|
</div>
|
||||||
{values.relation && values.relation.length > 0 ? (
|
{values.relation && values.relation.length > 0 ? (
|
||||||
values.relation.map((item: SubFormRelationDto, index: any) => (
|
values.relation.map((item: SubFormRelationDto, index: any) => (
|
||||||
|
|
@ -206,18 +206,45 @@ function JsonRowOpDialogSubForm({
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
name={`relation.${index}.parentFieldName`}
|
name={`relation.${index}.parentFieldName`}
|
||||||
component={Input}
|
component={Input}
|
||||||
placeholder="Parent Field Name"
|
placeholder={translate('::ListForms.ListFormEdit.SubFormsRelation.ParentFieldName')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="w-4/12 ml-2">
|
<div className="w-4/12 ml-2">
|
||||||
<Field
|
<Field
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
name={`relation.${index}.childFieldName`}
|
name={`relation.${index}.childFieldName`}
|
||||||
component={Input}
|
component={Input}
|
||||||
placeholder="Child Field Name"
|
placeholder={translate('::ListForms.ListFormEdit.SubFormsRelation.ChildFieldName')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="w-3/12 ml-2">
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name={`relation.${index}.dbType`}
|
||||||
|
placeholder={translate('::ListForms.ListFormEdit.FieldDbType')}
|
||||||
|
>
|
||||||
|
{({ field, form }: FieldProps<any>) => (
|
||||||
|
<Select
|
||||||
|
field={field}
|
||||||
|
form={form}
|
||||||
|
isClearable={true}
|
||||||
|
options={dbSourceTypeOptions}
|
||||||
|
value={dbSourceTypeOptions?.find(
|
||||||
|
(option: any) =>
|
||||||
|
option.value === item?.dbType,
|
||||||
|
)}
|
||||||
|
onChange={(option) =>
|
||||||
|
form.setFieldValue(field.name, option?.value)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Field>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="w-1/12 ml-2">
|
<div className="w-1/12 ml-2">
|
||||||
<Button
|
<Button
|
||||||
shape="circle"
|
shape="circle"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue