SubFormsListFormType eklendi ve SubFormsJson ile çözüm

This commit is contained in:
Sedat ÖZTÜRK 2026-02-02 16:26:36 +03:00
parent 758d87c983
commit 8f01a7aad0
24 changed files with 1096 additions and 923 deletions

View file

@ -349,6 +349,9 @@ public class GridOptionsDto : AuditedEntityDto<Guid>
/// <summary>Bu listform show note gösterilsin mi?</summary> /// <summary>Bu listform show note gösterilsin mi?</summary>
public bool ShowNote { get; set; } = true; public bool ShowNote { get; set; } = true;
/// <summary>Subformları hangi layout gösterilecek</summary>
public string SubFormsListFormType { get; set; } = ListFormTypeEnum.Form;
[JsonIgnore] [JsonIgnore]
public string SubFormsJson { get; set; } // Cagrilacak ListFormlar public string SubFormsJson { get; set; } // Cagrilacak ListFormlar
public SubFormDto[] SubFormsDto public SubFormDto[] SubFormsDto

View file

@ -58,15 +58,16 @@ public class ListFormsAppService : CrudAppService<
if (input.EditType == ListFormEditTabs.DetailsForm) if (input.EditType == ListFormEditTabs.DetailsForm)
{ {
item.CultureName = input.CultureName; item.CultureName = input.CultureName;
item.ListFormType = input.ListFormType;
item.Title = input.Title; item.Title = input.Title;
item.Name = input.Name; item.Name = input.Name;
item.Description = input.Description;
item.IsSubForm = input.IsSubForm;
item.SubFormsListFormType = input.SubFormsListFormType;
item.ShowNote = input.ShowNote;
item.Width = input.Width; item.Width = input.Width;
item.Height = input.Height; item.Height = input.Height;
item.FullHeight = input.FullHeight; item.FullHeight = input.FullHeight;
item.Description = input.Description;
item.IsSubForm = input.IsSubForm;
item.ShowNote = input.ShowNote;
item.ListFormType = input.ListFormType;
item.LayoutJson = JsonSerializer.Serialize(input.LayoutDto); item.LayoutJson = JsonSerializer.Serialize(input.LayoutDto);
//Chart ile ilgili sütunlar //Chart ile ilgili sütunlar

View file

@ -3546,6 +3546,12 @@
"en": "Form Type", "en": "Form Type",
"tr": "Form Tipi" "tr": "Form Tipi"
}, },
{
"resourceName": "Platform",
"key": "ListForms.ListFormEdit.SubFormsListFormType",
"en": "Sub Forms List Form Type",
"tr": "Alt Formlar Liste Form Tipi"
},
{ {
"resourceName": "Platform", "resourceName": "Platform",
"key": "ListForms.ListFormEdit.DetailsDescription", "key": "ListForms.ListFormEdit.DetailsDescription",

View file

@ -84,7 +84,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Bank)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Bank)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false, true),
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 =
@ -102,19 +102,25 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() {
Hint = "Manage",
Text ="Manage",
UrlTarget="_blank",
AuthName = AppCodes.Accounting.BankAccount,
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
IsVisible = true
},
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value }
}) }),
SubFormsJson = JsonSerializer.Serialize(
new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Accounting.BankAccount,
Code = AppCodes.Accounting.BankAccount,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "BankId"
},
}
},
}
)
} }
, autoSave: true); , autoSave: true);
@ -488,32 +494,27 @@ 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",
CaptionName = "App.Listform.ListformField.BankId",
Width = 0,
ListOrderNo = 6,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Bank ve Bank Account arasında Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Accounting.Bank,
JsonSerializer.Serialize(
new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Accounting.BankAccount,
Code = AppCodes.Accounting.BankAccount,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "BankId"
},
}
},
}
)
);
#region Cash #region Cash
listFormName = AppCodes.Accounting.Cash; listFormName = AppCodes.Accounting.Cash;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -2316,7 +2317,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [
@ -2347,15 +2348,23 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
IsVisible = true, IsVisible = true,
VisibleExpression = "(e) => e.row.data.RemainingAmount == 0" VisibleExpression = "(e) => e.row.data.RemainingAmount == 0"
}, },
new() {
Hint = "Items",
Text ="Items",
UrlTarget="_blank",
AuthName = listFormName,
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
IsVisible = true
},
}), }),
SubFormsJson = JsonSerializer.Serialize(
new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Accounting.InvoiceItem,
Code = AppCodes.Accounting.InvoiceItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "InvoiceId"
},
}
},
}
)
}, autoSave: true }, autoSave: true
); );
@ -2941,32 +2950,27 @@ 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 = "InvoiceId",
CaptionName = "App.Listform.ListformField.InvoiceId",
Width = 0,
ListOrderNo = 13,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Invoice ve Invoice Item arasında Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Accounting.Invoice,
JsonSerializer.Serialize(
new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Accounting.InvoiceItem,
Code = AppCodes.Accounting.InvoiceItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "InvoiceId"
},
}
},
}
)
);
#region Waybill #region Waybill
listFormName = AppCodes.Accounting.Waybill; listFormName = AppCodes.Accounting.Waybill;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -3006,7 +3010,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [
@ -3036,15 +3040,23 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
IsVisible = true, IsVisible = true,
VisibleExpression = "(e) => e.row.data.IsInvoiced" VisibleExpression = "(e) => e.row.data.IsInvoiced"
}, },
new() {
Hint = "Items",
Text ="Items",
UrlTarget="_blank",
AuthName = listFormName,
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
IsVisible = true
},
}), }),
SubFormsJson = JsonSerializer.Serialize(
new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Accounting.WaybillItem,
Code = AppCodes.Accounting.WaybillItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "WaybillId"
},
}
},
}
)
}, autoSave: true }, autoSave: true
); );
@ -3579,31 +3591,26 @@ 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 = "WaybillId",
CaptionName = "App.Listform.ListformField.WaybillId",
Width = 0,
ListOrderNo = 13,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Waybill ve Waybill Item arasında Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Accounting.Waybill,
JsonSerializer.Serialize(
new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Accounting.WaybillItem,
Code = AppCodes.Accounting.WaybillItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "WaybillId"
},
}
},
}
)
);
} }
} }

View file

@ -4381,7 +4381,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto> EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
{ {
new() { new() {
@ -4391,16 +4391,32 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
] ]
} }
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Manage", TabType = ListFormTabTypeEnum.List,
Text ="Manage", TabTitle = AppCodes.Definitions.SkillLevel,
UrlTarget="_blank", Code = AppCodes.Definitions.SkillLevel,
AuthName = AppCodes.Definitions.Skill, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible = true, ParentFieldName = "Id",
DbType = DbType.String,
ChildFieldName = "SkillTypeId"
}
}
}, },
}), new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Definitions.Skill,
Code = AppCodes.Definitions.Skill,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.String,
ChildFieldName = "SkillTypeId"
}
}
}
})
}, autoSave: true); }, autoSave: true);
#region SkillType Fields #region SkillType Fields
@ -4569,6 +4585,22 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
}, },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "SkillTypeId",
CaptionName = "App.Listform.ListformField.SkillTypeId",
Width = 0,
ListOrderNo = 5,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
@ -4660,42 +4692,27 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
}, },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "SkillTypeId",
CaptionName = "App.Listform.ListformField.SkillTypeId",
Width = 0,
ListOrderNo = 3,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Skill Type ile Skill Level ve Skill Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Definitions.SkillType,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Definitions.SkillLevel,
Code = AppCodes.Definitions.SkillLevel,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.String,
ChildFieldName = "SkillTypeId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Definitions.Skill,
Code = AppCodes.Definitions.Skill,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.String,
ChildFieldName = "SkillTypeId"
}
}
}
})
);
#region UomCategory #region UomCategory
listFormName = AppCodes.Definitions.UomCategory; listFormName = AppCodes.Definitions.UomCategory;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -4734,7 +4751,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.UomCategory)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.UomCategory)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, false, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, false, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto> EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>
{ {
new() { new() {
@ -4745,16 +4762,20 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
} }
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Manage", TabType = ListFormTabTypeEnum.List,
Text ="Manage", TabTitle = AppCodes.Definitions.Uom,
UrlTarget="_blank", Code = AppCodes.Definitions.Uom,
AuthName = AppCodes.Definitions.Uom, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible = true, ParentFieldName = "Id",
DbType = DbType.String,
ChildFieldName = "UomCategoryId"
}
}
}, },
}), })
}, autoSave: true); }, autoSave: true);
#region UomCategory Fields #region UomCategory Fields
@ -4980,30 +5001,27 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
}, },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "UomCategoryId",
CaptionName = "App.Listform.ListformField.UomCategoryId",
Width = 0,
ListOrderNo = 7,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// UomCategory ve Uom arasında Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Definitions.UomCategory,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Definitions.Uom,
Code = AppCodes.Definitions.Uom,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.String,
ChildFieldName = "UomCategoryId"
}
}
},
})
);
#region Behavior #region Behavior
listFormName = AppCodes.Definitions.Behavior; listFormName = AppCodes.Definitions.Behavior;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))

View file

@ -2135,7 +2135,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuestionPool)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuestionPool)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false, true),
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= [
@ -2145,16 +2145,20 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
]} ]}
}), }),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Questions", TabTitle = AppCodes.Definitions.Question,
Text ="Questions", TabType = ListFormTabTypeEnum.List,
UrlTarget="_blank", Code = AppCodes.Definitions.Question,
AuthName = AppCodes.Definitions.Question, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible = true, ParentFieldName = "Id",
}, DbType = DbType.Guid,
}), ChildFieldName = "QuestionPoolId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -2525,29 +2529,26 @@ 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",
CaptionName = "App.Listform.ListformField.QuestionPoolId",
Width = 0,
ListOrderNo = 12,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
// QuestionPool ve Question arasında Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Definitions.QuestionPool,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabTitle = AppCodes.Definitions.Question,
TabType = ListFormTabTypeEnum.List,
Code = AppCodes.Definitions.Question,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "QuestionPoolId"
}
}
}
})
);
#endregion #endregion
} }
} }

View file

@ -1113,7 +1113,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Partner)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Partner)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 600, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 600, true, true, true, true, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() new()
@ -1175,16 +1175,44 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Manage", TabType = ListFormTabTypeEnum.List,
Text ="Manage", TabTitle = AppCodes.SupplyChain.PartnerBank,
UrlTarget="_blank", Code = AppCodes.SupplyChain.PartnerBank,
AuthName = listFormName, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible = true, ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PartnerId"
}
}
}, },
}), new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.PartnerCertificate,
Code = AppCodes.SupplyChain.PartnerCertificate,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PartnerId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.PartnerContact,
Code = AppCodes.SupplyChain.PartnerContact,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PartnerId"
}
}
}
})
}, autoSave: true); }, autoSave: true);
await _listFormFieldRepository.InsertManyAsync( await _listFormFieldRepository.InsertManyAsync(
@ -2089,7 +2117,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Opportunity)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Opportunity)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false, true),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
@ -2120,16 +2148,32 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
new() { FieldName = "Stage", FieldDbType = DbType.String, Value = "Qualification", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Stage", FieldDbType = DbType.String, Value = "Qualification", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Manage", TabType = ListFormTabTypeEnum.List,
Text ="Manage", TabTitle = AppCodes.Crm.OpportunityActivity,
UrlTarget="_blank", Code = AppCodes.Crm.OpportunityActivity,
AuthName = listFormName, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible = true, ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "OpportunityId"
}
}
}, },
}), new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Crm.OpportunityCompetitor,
Code = AppCodes.Crm.OpportunityCompetitor,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "OpportunityId"
}
}
},
})
}, autoSave: true }, autoSave: true
); );
@ -2751,6 +2795,22 @@ public class ListFormSeeder_Crm : 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 = "OpportunityId",
CaptionName = "App.Listform.ListformField.OpportunityId",
Width = 0,
ListOrderNo = 14,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
@ -2910,42 +2970,27 @@ public class ListFormSeeder_Crm : 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 = "OpportunityId",
CaptionName = "App.Listform.ListformField.OpportunityId",
Width = 0,
ListOrderNo = 7,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Opportunity ile Activity ve Competitor arasında Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Crm.Opportunity,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Crm.OpportunityActivity,
Code = AppCodes.Crm.OpportunityActivity,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "OpportunityId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Crm.OpportunityCompetitor,
Code = AppCodes.Crm.OpportunityCompetitor,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "OpportunityId"
}
}
},
})
);
#region Activity #region Activity
listFormName = AppCodes.Crm.Activity; listFormName = AppCodes.Crm.Activity;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -3303,7 +3348,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SalesOrder)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SalesOrder)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false, true),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
@ -3334,16 +3379,20 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
new() { FieldName = "ExchangeRate", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "ExchangeRate", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "TaxRate", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "TaxRate", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Items", TabType = ListFormTabTypeEnum.List,
Text ="Items", TabTitle = AppCodes.Crm.SalesOrderItem,
UrlTarget="_blank", Code = AppCodes.Crm.SalesOrderItem,
AuthName = listFormName, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible = true, ParentFieldName = "Id",
}, DbType = DbType.Guid,
}), ChildFieldName = "SalesOrderId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -3928,28 +3977,25 @@ public class ListFormSeeder_Crm : 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 = "SalesOrderId",
CaptionName = "App.Listform.ListformField.SalesOrderId",
Width = 0,
ListOrderNo = 14,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Sales Order ve Sales Order Item arasında Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Crm.SalesOrder,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Crm.SalesOrderItem,
Code = AppCodes.Crm.SalesOrderItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "SalesOrderId"
}
}
}
})
);
} }
} }

View file

@ -4169,7 +4169,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Survey)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Survey)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false, true),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
@ -4187,16 +4187,32 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
new() { FieldName = "IsAnonymous", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsAnonymous", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Taslak", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Taslak", CustomValueType = FieldCustomValueTypeEnum.Value }
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Manage", TabType = ListFormTabTypeEnum.List,
Text ="Manage", TabTitle = AppCodes.Hr.SurveyQuestion,
UrlTarget="_blank", Code = AppCodes.Hr.SurveyQuestion,
AuthName = listFormName, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible=true, ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "SurveyId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Hr.SurveyResponse,
Code = AppCodes.Hr.SurveyResponse,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "SurveyId"
}
}
} }
}), })
}, autoSave: true }, autoSave: true
); );
@ -4356,7 +4372,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyQuestion)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyQuestion)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false, true),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
@ -4373,16 +4389,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
{ {
new() { FieldName = "IsRequired", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsRequired", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() {
Hint = "Options",
Text ="Options",
UrlTarget="_blank",
AuthName = AppCodes.Hr.SurveyQuestionOption,
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
IsVisible=true,
},
}),
}, autoSave: true }, autoSave: true
); );
@ -4484,6 +4490,22 @@ 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",
CaptionName = "App.Listform.ListformField.SurveyId",
Width = 0,
ListOrderNo = 14,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
@ -4527,7 +4549,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyResponse)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyResponse)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false, true),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
@ -4538,16 +4560,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
new EditingFormItemDto { Order = 3, DataField = "CreationTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox } new EditingFormItemDto { Order = 3, DataField = "CreationTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }
]} ]}
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() {
Hint = "Answers",
Text ="Answers",
UrlTarget="_blank",
AuthName = listFormName,
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
IsVisible=true
},
}),
}, autoSave: true }, autoSave: true
); );
@ -4621,41 +4633,26 @@ 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",
CaptionName = "App.Listform.ListformField.SurveyId",
Width = 0,
ListOrderNo = 5,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
// Survey ile Survey Question ve Survey Response Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Hr.Survey,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Hr.SurveyQuestion,
Code = AppCodes.Hr.SurveyQuestion,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "SurveyId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Hr.SurveyResponse,
Code = AppCodes.Hr.SurveyResponse,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "SurveyId"
}
}
}
})
);
#endregion #endregion
} }
} }

View file

@ -1774,7 +1774,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialPost)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialPost)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 600, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 600, true, true, true, true, false, true),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
@ -1787,16 +1787,6 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
new EditingFormItemDto { Order = 5, DataField = "IsOwnPost", ColSpan=1, EditorType2 = EditorTypes.dxCheckBox } new EditingFormItemDto { Order = 5, DataField = "IsOwnPost", ColSpan=1, EditorType2 = EditorTypes.dxCheckBox }
]} ]}
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() {
Hint = "Comments",
Text ="Comments",
UrlTarget="_blank",
AuthName = listFormName,
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
IsVisible = true,
},
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
{ {
new() { FieldName = "LikeCount", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "LikeCount", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },

View file

@ -715,7 +715,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 550, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 550, true, true, true, true, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=2, ColSpan=1, Caption="General", ItemType="group", Items= Order=1, ColCount=2, ColSpan=1, Caption="General", ItemType="group", Items=
@ -748,14 +748,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() { FieldName = "EstimatedDuration", FieldDbType = DbType.Int32, Value = "60", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "EstimatedDuration", FieldDbType = DbType.Int32, Value = "60", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() {
Hint = "Manage",
Text ="Manage",
UrlTarget="_blank",
AuthName = listFormName,
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
IsVisible = true,
},
new() { new() {
Hint = "Work Order", Hint = "Work Order",
Text ="Work Order", Text ="Work Order",
@ -765,6 +757,32 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
IsVisible = true, IsVisible = true,
}, },
}), }),
SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Maintenance.PlanWizardMaterial,
Code = AppCodes.Maintenance.PlanWizardMaterial,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PlanWizardId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Maintenance.PlanWizardEmployee,
Code = AppCodes.Maintenance.PlanWizardEmployee,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PlanWizardId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -1148,6 +1166,22 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
PivotSettingsJson = DefaultPivotSettingsJson, PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat() EditorOptions=EditorOptionValues.NumberStandartFormat()
}, },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "PlanWizardId",
CaptionName = "App.Listform.ListformField.PlanWizardId",
Width = 0,
ListOrderNo = 4,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
@ -1291,42 +1325,27 @@ public class ListFormSeeder_Maintenance : 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 = "PlanWizardId",
CaptionName = "App.Listform.ListformField.PlanWizardId",
Width = 0,
ListOrderNo = 6,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Maintenance Plan ile Maintenance Plan Material ve Maintenance Plan Employee arasında Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Maintenance.PlanWizard,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Maintenance.PlanWizardMaterial,
Code = AppCodes.Maintenance.PlanWizardMaterial,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PlanWizardId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Maintenance.PlanWizardEmployee,
Code = AppCodes.Maintenance.PlanWizardEmployee,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PlanWizardId"
}
}
}
})
);
#region Fault #region Fault
listFormName = AppCodes.Maintenance.Fault; listFormName = AppCodes.Maintenance.Fault;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -2176,7 +2195,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [
@ -2215,15 +2234,33 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
IsVisible = true, IsVisible = true,
VisibleExpression = "(e) => e.row.data.WorkorderNumber == null" VisibleExpression = "(e) => e.row.data.WorkorderNumber == null"
}, },
new() {
Hint = "Detail",
Text ="Detail",
UrlTarget="_blank",
AuthName = listFormName,
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
IsVisible = true,
},
}), }),
SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Maintenance.WorkorderMaterial,
Code = AppCodes.Maintenance.WorkorderMaterial,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "WorkorderId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Maintenance.WorkorderActivity,
Code = AppCodes.Maintenance.WorkorderActivity,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "WorkorderId"
}
}
}
})
} }
); );
@ -2669,7 +2706,23 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson, PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat() EditorOptions=EditorOptionValues.NumberStandartFormat()
} },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "WorkorderId",
CaptionName = "App.Listform.ListformField.WorkorderId",
Width = 0,
ListOrderNo = 6,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
@ -2798,43 +2851,28 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
} },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "WorkorderId",
CaptionName = "App.Listform.ListformField.WorkorderId",
Width = 0,
ListOrderNo = 5,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Workorder ile WorkorderMaterial ve WorkorderActivity arasında Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Maintenance.Workorder,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Maintenance.WorkorderMaterial,
Code = AppCodes.Maintenance.WorkorderMaterial,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "WorkorderId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Maintenance.WorkorderActivity,
Code = AppCodes.Maintenance.WorkorderActivity,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "WorkorderId"
}
}
}
})
);
#region Workorder Calendar #region Workorder Calendar
listFormName = AppCodes.Maintenance.WorkorderCalendar; listFormName = AppCodes.Maintenance.WorkorderCalendar;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))

View file

@ -865,7 +865,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false, true),
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= [
@ -885,16 +885,32 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
new() { FieldName = "BaseQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "BaseQuantity", FieldDbType = DbType.Decimal, Value = "0", 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 }
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Manage", TabType = ListFormTabTypeEnum.List,
Text ="Manage", TabTitle = AppCodes.Mrp.BomComponent,
UrlTarget="_blank", Code = AppCodes.Mrp.BomComponent,
AuthName = AppCodes.Mrp.Bom, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible = true ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "BomId"
}
}
}, },
}), new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Mrp.BomOperation,
Code = AppCodes.Mrp.BomOperation,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "BomId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -1307,7 +1323,23 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
} },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "BomId",
CaptionName = "App.Listform.ListformField.BomId",
Width = 0,
ListOrderNo = 12,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
@ -1562,42 +1594,27 @@ public class ListFormSeeder_Mrp : 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 = "BomId",
CaptionName = "App.Listform.ListformField.BomId",
Width = 0,
ListOrderNo = 12,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Bom ile Bom Component ve Bom Operation Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Mrp.Bom,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Mrp.BomComponent,
Code = AppCodes.Mrp.BomComponent,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "BomId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Mrp.BomOperation,
Code = AppCodes.Mrp.BomOperation,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "BomId"
}
}
}
})
);
#region Order Type #region Order Type
listFormName = AppCodes.Mrp.ProductionOrderType; listFormName = AppCodes.Mrp.ProductionOrderType;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -1893,7 +1910,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [
@ -1931,14 +1948,6 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() {
Hint = "Items",
Text ="Items",
UrlTarget="_blank",
AuthName = listFormName,
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
IsVisible = true
},
new() { new() {
Hint = "Work Orders", Hint = "Work Orders",
Text ="Work Orders", Text ="Work Orders",
@ -1949,6 +1958,20 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
VisibleExpression = "(e) => e.row.data.ConfirmedQuantity == 0" VisibleExpression = "(e) => e.row.data.ConfirmedQuantity == 0"
}, },
}), }),
SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Mrp.ProductionOrderItem,
Code = AppCodes.Mrp.ProductionOrderItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "ProductionOrderId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -2492,31 +2515,28 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson, PivotSettingsJson = DefaultPivotSettingsJson,
EditorOptions=EditorOptionValues.NumberStandartFormat() EditorOptions=EditorOptionValues.NumberStandartFormat()
} },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "ProductionOrderId",
CaptionName = "App.Listform.ListformField.ProductionOrderId",
Width = 0,
ListOrderNo = 9,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Production Order ve Production Order Item Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Mrp.ProductionOrder,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Mrp.ProductionOrderItem,
Code = AppCodes.Mrp.ProductionOrderItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "ProductionOrderId"
}
}
}
})
);
// Clone Maintenance Forms to MRP Forms // Clone Maintenance Forms to MRP Forms
await utils.CloneListFormWithFieldsAsync(AppCodes.Maintenance.WorkorderStatus, AppCodes.Mrp.WorkorderStatus); await utils.CloneListFormWithFieldsAsync(AppCodes.Maintenance.WorkorderStatus, AppCodes.Mrp.WorkorderStatus);

View file

@ -858,7 +858,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Projects)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Projects)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 900, 550, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 900, 550, true, true, true, true, false, true),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
@ -901,16 +901,32 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
new() { FieldName = "ActualCost", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "ActualCost", FieldDbType = DbType.Decimal, Value = "0", 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 }
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Manage", TabType = ListFormTabTypeEnum.List,
Text = "Manage", TabTitle = AppCodes.Project.ProjectRisk,
UrlTarget = "_blank", Code = AppCodes.Project.ProjectRisk,
AuthName = listFormName, Relation = new List<dynamic>() {
Url = $"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible = true, ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "ProjectId"
}
}
}, },
}), new {
TabType = ListFormTabTypeEnum.Tree,
TabTitle = AppCodes.Project.ProjectTeam,
Code = AppCodes.Project.ProjectTeam,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "ProjectId"
}
}
}
})
} }
); );
@ -1334,6 +1350,22 @@ public class ListFormSeeder_Project : 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 = "ProjectId",
CaptionName = "App.Listform.ListformField.ProjectId",
Width = 0,
ListOrderNo = 3,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
@ -1443,42 +1475,27 @@ public class ListFormSeeder_Project : 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 = "ProjectId",
CaptionName = "App.Listform.ListformField.ProjectId",
Width = 0,
ListOrderNo = 4,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Project ile Risk ve Team Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Project.Projects,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Project.ProjectRisk,
Code = AppCodes.Project.ProjectRisk,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "ProjectId"
}
}
},
new {
TabType = ListFormTabTypeEnum.Tree,
TabTitle = AppCodes.Project.ProjectTeam,
Code = AppCodes.Project.ProjectTeam,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "ProjectId"
}
}
}
})
);
#region Project Phase #region Project Phase
listFormName = AppCodes.Project.ProjectPhase; listFormName = AppCodes.Project.ProjectPhase;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))

View file

@ -84,7 +84,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
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, 650, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(TenantManagementPermissions.Tenants.Default, 800, 650, true, true, true, true, false, true),
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 =
@ -124,13 +124,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
DialogParameters = JsonSerializer.Serialize(new { name = "@Name", id = "@Id" }), DialogParameters = JsonSerializer.Serialize(new { name = "@Name", id = "@Id" }),
IsVisible = true, IsVisible = true,
}, },
new() {
Hint = "Branches",
Text = "Branches",
AuthName = AppCodes.Branches,
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
IsVisible = true,
},
}), }),
InsertServiceAddress = "list-form-dynamic-api/tenant-insert", InsertServiceAddress = "list-form-dynamic-api/tenant-insert",
UpdateServiceAddress = "list-form-dynamic-api/tenant-update", UpdateServiceAddress = "list-form-dynamic-api/tenant-update",
@ -141,8 +134,21 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value }
}) }),
SubFormsJson =JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Branches,
Code = AppCodes.Branches,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "TenantId"
}
}
}}
)
}, autoSave: true }, autoSave: true
); );
@ -1006,25 +1012,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
} }
#endregion #endregion
// Tenant ve Branches arasında Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
TenantManagementPermissions.Tenants.Default,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Branches,
Code = AppCodes.Branches,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "TenantId"
}
}
}}
)
);
#region SettingDefinition #region SettingDefinition
listFormName = AppCodes.Settings.SettingDefinitions; listFormName = AppCodes.Settings.SettingDefinitions;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -1760,7 +1747,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false, true),
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= [
@ -1773,16 +1760,20 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsEnabled", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "IsEnabled", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Manage", TabType = ListFormTabTypeEnum.List,
Text ="Manage", TabTitle = AppCodes.Languages.LanguageText,
UrlTarget="_blank", Code = AppCodes.Languages.LanguageText,
AuthName = AppCodes.Languages.LanguageText, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible = true, ParentFieldName = "CultureName",
}, DbType = DbType.String,
}), ChildFieldName = "CultureName"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -2055,25 +2046,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
} }
#endregion #endregion
// Language ve LanguageText Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Languages.Language,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Languages.LanguageText,
Code = AppCodes.Languages.LanguageText,
Relation = new List<dynamic>() {
new {
ParentFieldName = "CultureName",
DbType = DbType.String,
ChildFieldName = "CultureName"
}
}
}
})
);
#region Route #region Route
listFormName = AppCodes.Routes; listFormName = AppCodes.Routes;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))

View file

@ -1325,7 +1325,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=2, ColSpan=1, Caption="General", ItemType="group", Items= [ Order=1, ColCount=2, ColSpan=1, Caption="General", ItemType="group", Items= [
@ -1349,16 +1349,20 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
new() { FieldName = "Strategy", FieldDbType = DbType.String, Value = "FIFO", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Strategy", FieldDbType = DbType.String, Value = "FIFO", 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 }
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Conditions", TabType = ListFormTabTypeEnum.List,
Text = "Conditions", TabTitle = AppCodes.Store.PutawayCondition,
UrlTarget = "_blank", Code = AppCodes.Store.PutawayCondition,
AuthName = listFormName, Relation = new List<dynamic>() {
Url = $"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible = true, ParentFieldName = "Id",
}, DbType = DbType.Guid,
}), ChildFieldName = "RuleId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -1736,31 +1740,28 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
ColumnCustomizationJson = DefaultColumnCustomizationJson, ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
} },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "RuleId",
CaptionName = "App.Listform.ListformField.RuleId",
Width = 0,
ListOrderNo = 5,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Putaway ve Putaway Condition Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Store.Putaway,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Store.PutawayCondition,
Code = AppCodes.Store.PutawayCondition,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "RuleId"
}
}
}
})
);
#region Inventory #region Inventory
listFormName = AppCodes.Store.Inventory; listFormName = AppCodes.Store.Inventory;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -2698,7 +2699,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
InsertAfterCommand = $"UPDATE {TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement))} SET \"MovementType\" = 'Giriş' WHERE \"Id\" = @Id;", InsertAfterCommand = $"UPDATE {TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement))} SET \"MovementType\" = 'Giriş' WHERE \"Id\" = @Id;",
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [
@ -2714,16 +2715,20 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
new() { FieldName = "MovementNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "MovementNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "MovementDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "MovementDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Items", TabType = ListFormTabTypeEnum.List,
Text ="Items", TabTitle = AppCodes.Store.EntryItem,
UrlTarget="_blank", Code = AppCodes.Store.EntryItem,
AuthName = listFormName, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible = true, ParentFieldName = "Id",
}, DbType = DbType.Guid,
}), ChildFieldName = "MovementId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -3124,30 +3129,27 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
}, },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "MovementId",
CaptionName = "App.Listform.ListformField.MovementId",
Width = 0,
ListOrderNo = 10,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Movement Entry ve Movement Entry Items Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Store.Entry,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Store.EntryItem,
Code = AppCodes.Store.EntryItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "MovementId"
}
}
}
})
);
#region Stock Exit #region Stock Exit
listFormName = AppCodes.Store.Exit; listFormName = AppCodes.Store.Exit;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -3188,7 +3190,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
InsertAfterCommand = $"UPDATE {TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement))} SET \"MovementType\" = 'Çıkış' WHERE \"Id\" = @Id;", InsertAfterCommand = $"UPDATE {TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement))} SET \"MovementType\" = 'Çıkış' WHERE \"Id\" = @Id;",
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() { EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { new() {
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [
@ -3204,16 +3206,20 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
new() { FieldName = "MovementNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "MovementNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "MovementDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "MovementDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Items", TabType = ListFormTabTypeEnum.List,
Text ="Items", TabTitle = AppCodes.Store.ExitItem,
UrlTarget="_blank", Code = AppCodes.Store.ExitItem,
AuthName = listFormName, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible = true, ParentFieldName = "Id",
}, DbType = DbType.Guid,
}), ChildFieldName = "MovementId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -3625,30 +3631,27 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
PermissionJson = DefaultFieldPermissionJson(listForm.Name), PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
}, },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "MovementId",
CaptionName = "App.Listform.ListformField.MovementId",
Width = 0,
ListOrderNo = 10,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Movement Entry ve Movement Entry Items Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.Store.Exit,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.Store.ExitItem,
Code = AppCodes.Store.ExitItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "MovementId"
}
}
}
})
);
#region Stock Transfer #region Stock Transfer
listFormName = AppCodes.Store.Transfer; listFormName = AppCodes.Store.Transfer;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))

View file

@ -1089,7 +1089,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Partner)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Partner)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 600, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 600, true, true, true, true, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() new()
@ -1151,16 +1151,44 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Manage", TabType = ListFormTabTypeEnum.List,
Text ="Manage", TabTitle = AppCodes.SupplyChain.PartnerBank,
UrlTarget="_blank", Code = AppCodes.SupplyChain.PartnerBank,
AuthName = listFormName, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible=true, ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PartnerId"
}
}
}, },
}), new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.PartnerCertificate,
Code = AppCodes.SupplyChain.PartnerCertificate,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PartnerId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.PartnerContact,
Code = AppCodes.SupplyChain.PartnerContact,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PartnerId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -2057,6 +2085,22 @@ public class ListFormSeeder_SupplyChain : 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 = "PartnerId",
CaptionName = "App.Listform.ListformField.PartnerId",
Width = 0,
ListOrderNo = 15,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
@ -2202,6 +2246,22 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.PartnerCertificate), PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.PartnerCertificate),
PivotSettingsJson = DefaultPivotSettingsJson PivotSettingsJson = DefaultPivotSettingsJson
}, },
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "PartnerId",
CaptionName = "App.Listform.ListformField.PartnerId",
Width = 0,
ListOrderNo = 6,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
@ -2421,97 +2481,27 @@ public class ListFormSeeder_SupplyChain : 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 = "PartnerId",
CaptionName = "App.Listform.ListformField.PartnerId",
Width = 0,
ListOrderNo = 8,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Supply ile Bank, Certificate ve Contact Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.SupplyChain.Supply,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.PartnerBank,
Code = AppCodes.SupplyChain.PartnerBank,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PartnerId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.PartnerCertificate,
Code = AppCodes.SupplyChain.PartnerCertificate,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PartnerId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.PartnerContact,
Code = AppCodes.SupplyChain.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.CloneFormLayoutAsync(
AppCodes.Crm.Customer,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.PartnerBank,
Code = AppCodes.SupplyChain.PartnerBank,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PartnerId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.PartnerCertificate,
Code = AppCodes.SupplyChain.PartnerCertificate,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PartnerId"
}
}
},
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.PartnerContact,
Code = AppCodes.SupplyChain.PartnerContact,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PartnerId"
}
}
}
})
);
#region Approval #region Approval
listFormName = AppCodes.SupplyChain.Approval; listFormName = AppCodes.SupplyChain.Approval;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -2551,7 +2541,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false, true),
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= [
@ -2565,16 +2555,20 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Manage", TabType = ListFormTabTypeEnum.List,
Text ="Manage", TabTitle = AppCodes.SupplyChain.ApprovalStep,
UrlTarget="_blank", Code = AppCodes.SupplyChain.ApprovalStep,
AuthName = listFormName, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible=true, ParentFieldName = "Id",
}, DbType = DbType.Guid,
}), ChildFieldName = "ApprovalId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -2850,30 +2844,27 @@ public class ListFormSeeder_SupplyChain : 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 = "ApprovalId",
CaptionName = "App.Listform.ListformField.ApprovalId",
Width = 0,
ListOrderNo = 8,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Approval ve Approval Step arasında Sub Forms ilişkisinin kurulması
await utils.CloneFormLayoutAsync(
AppCodes.SupplyChain.Approval,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.ApprovalStep,
Code = AppCodes.SupplyChain.ApprovalStep,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "ApprovalId"
}
}
}
})
);
#region Request Type #region Request Type
listFormName = AppCodes.SupplyChain.RequestType; listFormName = AppCodes.SupplyChain.RequestType;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -3042,7 +3033,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Request)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Request)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false, true),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
new() new()
@ -3069,16 +3060,20 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
new() { FieldName = "Priority", FieldDbType = DbType.String, Value = "Low", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Priority", FieldDbType = DbType.String, Value = "Low", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Draft", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Draft", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Manage", TabType = ListFormTabTypeEnum.List,
Text ="Manage", TabTitle = AppCodes.SupplyChain.RequestItem,
UrlTarget="_blank", Code = AppCodes.SupplyChain.RequestItem,
AuthName = listFormName, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible=true, ParentFieldName = "Id",
}, DbType = DbType.Guid,
}), ChildFieldName = "RequestId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -3486,30 +3481,27 @@ public class ListFormSeeder_SupplyChain : 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 = "RequestId",
CaptionName = "App.Listform.ListformField.RequestId",
Width = 0,
ListOrderNo = 9,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Purchase Request ve Purchase Request Item arasında SubForm ilişki kurulması
await utils.CloneFormLayoutAsync(
AppCodes.SupplyChain.Request,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.RequestItem,
Code = AppCodes.SupplyChain.RequestItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "RequestId"
}
}
}
})
);
#region Quotation Status #region Quotation Status
listFormName = AppCodes.SupplyChain.QuotationStatus; listFormName = AppCodes.SupplyChain.QuotationStatus;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -3809,7 +3801,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Quotation)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Quotation)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 700, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 700, true, true, true, true, false, true),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
@ -3853,14 +3845,6 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
new() { FieldName = "EvaluationScore", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "EvaluationScore", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() {
Hint = "Manage",
Text ="Manage",
UrlTarget="_blank",
AuthName = listFormName,
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
IsVisible = true
},
new() { new() {
ButtonPosition = UiCommandButtonPositionTypeEnum.Toolbar, ButtonPosition = UiCommandButtonPositionTypeEnum.Toolbar,
Hint = "Toplu Teklif", Hint = "Toplu Teklif",
@ -3878,6 +3862,20 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
IsVisible = true IsVisible = true
}, },
}), }),
SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.QuotationItem,
Code = AppCodes.SupplyChain.QuotationItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "QuotationId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -4482,30 +4480,27 @@ public class ListFormSeeder_SupplyChain : 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 = "QuotationId",
CaptionName = "App.Listform.ListformField.QuotationId",
Width = 0,
ListOrderNo = 9,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Quatation ve Quatation Item arasında SubForm ilişki kurulması
await utils.CloneFormLayoutAsync(
AppCodes.SupplyChain.Quotation,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.QuotationItem,
Code = AppCodes.SupplyChain.QuotationItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "QuotationId"
}
}
}
})
);
#region Order Status #region Order Status
listFormName = AppCodes.SupplyChain.OrderStatus; listFormName = AppCodes.SupplyChain.OrderStatus;
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
@ -4672,7 +4667,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PurchaseOrder)), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PurchaseOrder)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(),
PagerOptionJson = DefaultPagerOptionJson, PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false, true),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{ {
@ -4698,16 +4693,20 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
new() { FieldName = "ExchangeRate", FieldDbType = DbType.Decimal, Value = "1", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "ExchangeRate", FieldDbType = DbType.Decimal, Value = "1", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Taslak", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Taslak", CustomValueType = FieldCustomValueTypeEnum.Value },
}), }),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new() { new {
Hint = "Manage", TabType = ListFormTabTypeEnum.List,
Text ="Manage", TabTitle = AppCodes.SupplyChain.PurchaseOrderItem,
UrlTarget="_blank", Code = AppCodes.SupplyChain.PurchaseOrderItem,
AuthName = listFormName, Relation = new List<dynamic>() {
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", new {
IsVisible=true, ParentFieldName = "Id",
}, DbType = DbType.Guid,
}), ChildFieldName = "PurchaseOrderId"
}
}
}
})
}, autoSave: true }, autoSave: true
); );
@ -5190,28 +5189,25 @@ public class ListFormSeeder_SupplyChain : 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 = "PurchaseOrderId",
CaptionName = "App.Listform.ListformField.PurchaseOrderId",
Width = 0,
ListOrderNo = 7,
Visible = false,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true); ], autoSave: true);
#endregion #endregion
} }
#endregion #endregion
// Purchase Order ve Purchase Order Item arasında SubForm ilişki kurulması
await utils.CloneFormLayoutAsync(
AppCodes.SupplyChain.PurchaseOrder,
JsonSerializer.Serialize(new List<dynamic>() {
new {
TabType = ListFormTabTypeEnum.List,
TabTitle = AppCodes.SupplyChain.PurchaseOrderItem,
Code = AppCodes.SupplyChain.PurchaseOrderItem,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "PurchaseOrderId"
}
}
}
})
);
} }
} }

View file

@ -125,6 +125,9 @@ public class ListForm : FullAuditedEntity<Guid>
/// <summary>Bu listform sub olarak mı kullanılacak</summary> /// <summary>Bu listform sub olarak mı kullanılacak</summary>
public bool IsSubForm { get; set; } public bool IsSubForm { get; set; }
/// <summary>Subformları hangi layout gösterilecek</summary>
public string SubFormsListFormType { get; set; } = ListFormTypeEnum.Form;
/// <summary>Bu listform show note gösterilsin mi?</summary> /// <summary>Bu listform show note gösterilsin mi?</summary>
public bool ShowNote { get; set; } = true; public bool ShowNote { get; set; } = true;

View file

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Erp.Platform.Migrations namespace Erp.Platform.Migrations
{ {
[DbContext(typeof(PlatformDbContext))] [DbContext(typeof(PlatformDbContext))]
[Migration("20260117151816_Initial")] [Migration("20260202065947_Initial")]
partial class Initial partial class Initial
{ {
/// <inheritdoc /> /// <inheritdoc />
@ -7038,6 +7038,9 @@ namespace Erp.Platform.Migrations
b.Property<string>("SubFormsJson") b.Property<string>("SubFormsJson")
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("SubFormsListFormType")
.HasColumnType("nvarchar(max)");
b.Property<string>("TableName") b.Property<string>("TableName")
.HasMaxLength(128) .HasMaxLength(128)
.HasColumnType("nvarchar(128)"); .HasColumnType("nvarchar(128)");

View file

@ -2501,6 +2501,7 @@ namespace Erp.Platform.Migrations
IsOrganizationUnit = table.Column<bool>(type: "bit", nullable: false), IsOrganizationUnit = table.Column<bool>(type: "bit", nullable: false),
ListFormType = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true), ListFormType = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
IsSubForm = table.Column<bool>(type: "bit", nullable: false), IsSubForm = table.Column<bool>(type: "bit", nullable: false),
SubFormsListFormType = table.Column<string>(type: "nvarchar(max)", nullable: true),
ShowNote = table.Column<bool>(type: "bit", nullable: false), ShowNote = table.Column<bool>(type: "bit", nullable: false),
SubFormsJson = table.Column<string>(type: "text", nullable: true), SubFormsJson = table.Column<string>(type: "text", nullable: true),
WidgetsJson = table.Column<string>(type: "text", nullable: true), WidgetsJson = table.Column<string>(type: "text", nullable: true),

View file

@ -7035,6 +7035,9 @@ namespace Erp.Platform.Migrations
b.Property<string>("SubFormsJson") b.Property<string>("SubFormsJson")
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("SubFormsListFormType")
.HasColumnType("nvarchar(max)");
b.Property<string>("TableName") b.Property<string>("TableName")
.HasMaxLength(128) .HasMaxLength(128)
.HasColumnType("nvarchar(128)"); .HasColumnType("nvarchar(128)");

View file

@ -569,6 +569,7 @@ export interface GridOptionsDto extends AuditedEntityDto<string> {
listFormType: string listFormType: string
isSubForm: boolean isSubForm: boolean
showNote: boolean showNote: boolean
subFormsListFormType: string
subFormsJson?: string subFormsJson?: string
subFormsDto: SubFormDto[] subFormsDto: SubFormDto[]
extraFilterJson?: string extraFilterJson?: string

View file

@ -18,9 +18,13 @@ const schema = Yup.object().shape({
title: Yup.string().required('Title Required'), title: Yup.string().required('Title Required'),
name: Yup.string(), name: Yup.string(),
description: Yup.string(), description: Yup.string(),
pageSize: Yup.number(),
isSubForm: Yup.boolean(), isSubForm: Yup.boolean(),
subFormsListFormType: Yup.string(),
showNote: Yup.boolean(), showNote: Yup.boolean(),
width: Yup.number(),
height: Yup.number(),
fullHeight: Yup.boolean(),
defaultLayout: Yup.string(),
layoutDto: Yup.object().shape({ layoutDto: Yup.object().shape({
grid: Yup.boolean(), grid: Yup.boolean(),
pivot: Yup.boolean(), pivot: Yup.boolean(),
@ -174,6 +178,35 @@ function FormTabDetails(
/> />
</FormItem> </FormItem>
<FormItem
label={translate('::ListForms.ListFormEdit.SubFormsListFormType')}
invalid={errors.subFormsListFormType && touched.subFormsListFormType}
errorMessage={errors.subFormsListFormType}
>
<Field
type="text"
autoComplete="off"
name="subFormsListFormType"
placeholder={translate('::ListForms.ListFormEdit.SubFormsListFormType')}
>
{({ field, form }: FieldProps<SelectBoxOption>) => (
<Select
field={field}
form={form}
isClearable={true}
options={listFormTypeOptions}
value={listFormTypeOptions?.filter(
(option) => option.value === values.subFormsListFormType,
)}
onChange={(option) => {
form.setFieldValue(field.name, option?.value)
props.onFormTypeChange(option?.value || 'List')
}}
/>
)}
</Field>
</FormItem>
<FormItem <FormItem
label={translate('::ListForms.ListFormEdit.ShowNote')} label={translate('::ListForms.ListFormEdit.ShowNote')}
invalid={errors.showNote && touched.showNote} invalid={errors.showNote && touched.showNote}
@ -340,7 +373,9 @@ function FormTabDetails(
className="w-20" className="w-20"
autoComplete="off" autoComplete="off"
name="layoutDto.scheduler" name="layoutDto.scheduler"
placeholder={translate('::ListForms.ListFormEdit.DetailsLayoutDto.SchedulerLayout')} placeholder={translate(
'::ListForms.ListFormEdit.DetailsLayoutDto.SchedulerLayout',
)}
component={Checkbox} component={Checkbox}
/> />
</FormItem> </FormItem>

View file

@ -1,6 +1,6 @@
import Container from '@/components/shared/Container' import Container from '@/components/shared/Container'
import { DX_CLASSNAMES } from '@/constants/app.constant' import { DX_CLASSNAMES } from '@/constants/app.constant'
import { GridDto } from '@/proxy/form/models' import { GridDto, SubFormTabTypeEnum } from '@/proxy/form/models'
import { useLocalization } from '@/utils/hooks/useLocalization' import { useLocalization } from '@/utils/hooks/useLocalization'
import Gantt, { import Gantt, {
Column, Column,
@ -30,6 +30,7 @@ import CustomStore from 'devextreme/data/custom_store'
import { GridColumnData } from './GridColumnData' import { GridColumnData } from './GridColumnData'
import { Loading } from '@/components/shared' import { Loading } from '@/components/shared'
import { usePermission } from '@/utils/hooks/usePermission' import { usePermission } from '@/utils/hooks/usePermission'
import SubForms from '../form/SubForms'
interface GanttViewProps { interface GanttViewProps {
listFormCode: string listFormCode: string
@ -289,7 +290,6 @@ const GanttView = (props: GanttViewProps) => {
allowTaskAdding={gridDto.gridOptions.ganttOptionDto?.allowTaskAdding} allowTaskAdding={gridDto.gridOptions.ganttOptionDto?.allowTaskAdding}
allowTaskUpdating={gridDto.gridOptions.ganttOptionDto?.allowTaskUpdating} allowTaskUpdating={gridDto.gridOptions.ganttOptionDto?.allowTaskUpdating}
allowTaskDeleting={gridDto.gridOptions.ganttOptionDto?.allowTaskDeleting} allowTaskDeleting={gridDto.gridOptions.ganttOptionDto?.allowTaskDeleting}
allowDependencyAdding={gridDto.gridOptions.ganttOptionDto?.allowDependencyAdding} allowDependencyAdding={gridDto.gridOptions.ganttOptionDto?.allowDependencyAdding}
allowDependencyDeleting={ allowDependencyDeleting={
gridDto.gridOptions.ganttOptionDto?.allowDependencyDeleting gridDto.gridOptions.ganttOptionDto?.allowDependencyDeleting

View file

@ -7,6 +7,7 @@ import {
GridDto, GridDto,
ListFormCustomizationTypeEnum, ListFormCustomizationTypeEnum,
PlatformEditorTypes, PlatformEditorTypes,
SubFormTabTypeEnum,
} from '@/proxy/form/models' } from '@/proxy/form/models'
import { import {
getListFormCustomization, getListFormCustomization,
@ -1408,12 +1409,13 @@ const Grid = (props: GridProps) => {
</Summary> </Summary>
</DataGrid> </DataGrid>
{gridDto?.gridOptions?.subFormsDto?.length > 0 && ( {gridDto?.gridOptions?.subFormsDto?.length > 0 &&
<> gridDto?.gridOptions?.subFormsListFormType === SubFormTabTypeEnum.List && (
<hr className="my-2" /> <>
<SubForms gridDto={gridDto!} formData={formData} level={level ?? 0} /> <hr className="my-2" />
</> <SubForms gridDto={gridDto!} formData={formData} level={level ?? 0} />
)} </>
)}
<Dialog <Dialog
width={smaller.md ? '100%' : 1000} width={smaller.md ? '100%' : 1000}

View file

@ -7,6 +7,7 @@ import {
GridDto, GridDto,
ListFormCustomizationTypeEnum, ListFormCustomizationTypeEnum,
PlatformEditorTypes, PlatformEditorTypes,
SubFormTabTypeEnum,
} from '@/proxy/form/models' } from '@/proxy/form/models'
import { import {
getListFormCustomization, getListFormCustomization,
@ -64,6 +65,7 @@ import { useListFormCustomDataSource } from './useListFormCustomDataSource'
import { useListFormColumns } from './useListFormColumns' import { useListFormColumns } from './useListFormColumns'
import { DataType } from 'devextreme/common' import { DataType } from 'devextreme/common'
import { useStoreState } from '@/store/store' import { useStoreState } from '@/store/store'
import SubForms from '../form/SubForms'
interface TreeProps { interface TreeProps {
listFormCode: string listFormCode: string
@ -1192,6 +1194,14 @@ const Tree = (props: TreeProps) => {
text={gridDto.gridOptions.pagerOptionDto?.loadPanelText} text={gridDto.gridOptions.pagerOptionDto?.loadPanelText}
></LoadPanel> ></LoadPanel>
</TreeListDx> </TreeListDx>
{gridDto?.gridOptions?.subFormsDto?.length > 0 &&
gridDto?.gridOptions?.subFormsListFormType === SubFormTabTypeEnum.List && (
<>
<hr className="my-2" />
<SubForms gridDto={gridDto!} formData={formData} level={level ?? 0} />
</>
)}
</div> </div>
)} )}