Mrp Workcenter güncellemeleri
This commit is contained in:
parent
c437f4cf75
commit
e664ad4ccc
19 changed files with 360 additions and 220 deletions
|
|
@ -4,8 +4,8 @@ namespace Erp.Platform.ListForms;
|
|||
|
||||
public class SubFormDto
|
||||
{
|
||||
public string TabTitle { get; set; }
|
||||
public string TabType { get; set; }
|
||||
public string TabTitle { get; set; }
|
||||
public string Code { get; set; }
|
||||
public bool IsRefresh { get; set; }
|
||||
public SubFormRelationDto[] Relation { get; set; }
|
||||
|
|
|
|||
|
|
@ -9763,6 +9763,18 @@
|
|||
"tr": "Operasyon Türleri",
|
||||
"en": "Operation Types"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Mrp.WorkcenterType",
|
||||
"tr": "İş Merkezleri Tipleri",
|
||||
"en": "Workcenter Types"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Mrp.WorkcenterStatus",
|
||||
"tr": "İş Merkezleri Durumları",
|
||||
"en": "Workcenter Statuses"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Mrp.Workcenter",
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
using var utils = new SeederUtils();
|
||||
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
||||
var listFormName = String.Empty;
|
||||
|
||||
#region Bank
|
||||
|
|
@ -107,7 +107,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Accounting.BankAccount,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(AppCodes.Accounting.Bank)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(AppCodes.Accounting.Bank)}/@Id",
|
||||
IsVisible = true
|
||||
},
|
||||
}),
|
||||
|
|
@ -491,24 +491,24 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende
|
|||
#endregion
|
||||
|
||||
// Bank ve Bank Account arasında Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.Accounting.Bank,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = AppCodes.Accounting.BankAccount,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = AppCodes.Accounting.BankAccount,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
ParentFieldName = "Id",
|
||||
DbType = DbType.Guid,
|
||||
ChildFieldName = "BankId"
|
||||
},
|
||||
}
|
||||
},
|
||||
})
|
||||
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
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
{
|
||||
var configurationSection = _configuration.GetSection("OpenIddict:Applications");
|
||||
var swaggerRootUrl = configurationSection["Platform_Swagger:RootUrl"]?.TrimEnd('/');
|
||||
using var utils = new SeederUtils();
|
||||
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
||||
var listFormName = String.Empty;
|
||||
|
||||
#region Permission Group
|
||||
|
|
@ -4108,7 +4108,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Definitions.Skill,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -4192,7 +4192,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=
|
||||
[
|
||||
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Progress", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSlider, EditorOptions=EditorOptionValues.SliderOptions },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Progress", ColSpan = 1, EditorType2=EditorTypes.dxSlider, EditorOptions=EditorOptionValues.SliderOptions },
|
||||
new EditingFormItemDto { Order = 3, DataField = "IsDefault", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
]
|
||||
}
|
||||
|
|
@ -4363,14 +4363,12 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
#endregion
|
||||
|
||||
// Skill Type ile Skill Level ve Skill Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.Definitions.SkillType,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = AppCodes.Definitions.SkillLevel,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Definitions.SkillLevel,
|
||||
Code = AppCodes.Definitions.SkillLevel,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -4381,8 +4379,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
}
|
||||
},
|
||||
new {
|
||||
TabTitle = AppCodes.Definitions.Skill,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Definitions.Skill,
|
||||
Code = AppCodes.Definitions.Skill,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -4448,7 +4446,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Definitions.Uom,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -4671,14 +4669,12 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
|||
#endregion
|
||||
|
||||
// UomCategory ve Uom arasında Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.Definitions.UomCategory,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = AppCodes.Definitions.Uom,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Definitions.Uom,
|
||||
Code = AppCodes.Definitions.Uom,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
using var utils = new SeederUtils();
|
||||
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
||||
var listFormName = String.Empty;
|
||||
|
||||
#region Program
|
||||
|
|
@ -2061,7 +2061,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
Text ="Questions",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Definitions.Question,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -2423,9 +2423,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
}
|
||||
|
||||
// QuestionPool ve Question arasında Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.Definitions.QuestionPool,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -2442,6 +2440,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
|||
}
|
||||
})
|
||||
);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,9 +43,10 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
using var utils = new SeederUtils();
|
||||
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
||||
var listFormName = String.Empty;
|
||||
|
||||
|
||||
#region Customer Type
|
||||
listFormName = AppCodes.Crm.CustomerType;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
|
|
@ -393,7 +394,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(AppCodes.Crm.Customer)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(AppCodes.Crm.Customer)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -1188,7 +1189,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -1939,14 +1940,12 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
#endregion
|
||||
|
||||
// Opportunity ile Activity ve Competitor arasında Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.Crm.Opportunity,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = AppCodes.Crm.OpportunityActivity,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Crm.OpportunityActivity,
|
||||
Code = AppCodes.Crm.OpportunityActivity,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -1957,8 +1956,8 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
},
|
||||
new {
|
||||
TabTitle = AppCodes.Crm.OpportunityCompetitor,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Crm.OpportunityCompetitor,
|
||||
Code = AppCodes.Crm.OpportunityCompetitor,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
using var utils = new SeederUtils();
|
||||
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
||||
var listFormName = String.Empty;
|
||||
|
||||
#region EmploymentType
|
||||
|
|
@ -4056,7 +4056,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible=true,
|
||||
}
|
||||
}),
|
||||
|
|
@ -4234,7 +4234,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Text ="Options",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Hr.SurveyQuestionOption,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible=true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -4392,7 +4392,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
Text ="Answers",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible=true
|
||||
},
|
||||
}),
|
||||
|
|
@ -4470,14 +4470,12 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
|
||||
// Survey ile Survey Question ve Survey Response Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.Hr.Survey,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = AppCodes.Hr.SurveyQuestion,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Hr.SurveyQuestion,
|
||||
Code = AppCodes.Hr.SurveyQuestion,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -4488,8 +4486,8 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
},
|
||||
new {
|
||||
TabTitle = AppCodes.Hr.SurveyResponse,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Hr.SurveyResponse,
|
||||
Code = AppCodes.Hr.SurveyResponse,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
|
|||
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
using var utils = new SeederUtils();
|
||||
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
||||
var listFormName = String.Empty;
|
||||
|
||||
#region EventType
|
||||
|
|
@ -1715,7 +1715,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc
|
|||
Text ="Comments",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
using var utils = new SeederUtils();
|
||||
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
||||
var listFormName = String.Empty;
|
||||
|
||||
#region Workcenter Type
|
||||
|
|
@ -95,7 +95,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
}),
|
||||
}
|
||||
}, autoSave: true
|
||||
);
|
||||
|
||||
#region WorkcenterType Fields
|
||||
|
|
@ -148,7 +148,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
|
|
@ -164,7 +163,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
}
|
||||
]);
|
||||
], autoSave: true);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
|
@ -218,7 +217,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
}),
|
||||
}
|
||||
}, autoSave: true
|
||||
);
|
||||
|
||||
#region WorkcenterStatus Fields
|
||||
|
|
@ -271,7 +270,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
|
|
@ -287,7 +285,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
}
|
||||
]);
|
||||
], autoSave: true);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
|
@ -359,7 +357,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
new() { FieldName = "SetupTime", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
}),
|
||||
}
|
||||
}, autoSave: true
|
||||
);
|
||||
|
||||
#region Workcenter Fields
|
||||
|
|
@ -659,7 +657,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
}
|
||||
]);
|
||||
], autoSave: true);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
|
@ -739,7 +737,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
new() {
|
||||
|
|
@ -747,7 +745,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
Text ="Work Order",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -1257,14 +1255,12 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
#endregion
|
||||
|
||||
// Maintenance Plan ile Maintenance Plan Material ve Maintenance Plan Employee arasında Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.Maintenance.Plan,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = listFormName,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Maintenance.PlanMaterial,
|
||||
Code = AppCodes.Maintenance.PlanMaterial,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -1275,9 +1271,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
|
|||
}
|
||||
},
|
||||
new {
|
||||
TabTitle = listFormName,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = listFormName,
|
||||
TabTitle = AppCodes.Maintenance.PlanEmployee,
|
||||
Code = AppCodes.Maintenance.PlanEmployee,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
ParentFieldName = "Id",
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
||||
var listFormName = String.Empty;
|
||||
|
||||
#region Operation Category
|
||||
|
|
@ -691,6 +692,11 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
// Clone Maintenance Forms to MRP Forms
|
||||
await utils.CloneListFormWithFieldsAsync(AppCodes.Maintenance.WorkcenterType, AppCodes.Mrp.WorkcenterType);
|
||||
await utils.CloneListFormWithFieldsAsync(AppCodes.Maintenance.WorkcenterStatus, AppCodes.Mrp.WorkcenterStatus);
|
||||
await utils.CloneListFormWithFieldsAsync(AppCodes.Maintenance.Workcenter, AppCodes.Mrp.Workcenter);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
var configurationSection = _configuration.GetSection("OpenIddict:Applications");
|
||||
var swaggerRootUrl = configurationSection["Platform_Swagger:RootUrl"]?.TrimEnd('/');
|
||||
using var utils = new SeederUtils();
|
||||
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
||||
var listFormName = String.Empty;
|
||||
|
||||
#region Tenant
|
||||
|
|
@ -126,7 +126,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
Hint = "Branches",
|
||||
Text = "Branches",
|
||||
AuthName = AppCodes.Branches,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -964,14 +964,12 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
#endregion
|
||||
|
||||
// Tenant ve Branches arasında Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
TenantManagementPermissions.Tenants.Default,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = AppCodes.Branches,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Branches,
|
||||
Code = AppCodes.Branches,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -1564,7 +1562,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = AppCodes.Languages.LanguageText,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -1820,14 +1818,12 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
|||
#endregion
|
||||
|
||||
// Language ve LanguageText Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.Languages.Language,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = listFormName,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Languages.LanguageText,
|
||||
Code = AppCodes.Languages.LanguageText,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
|||
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
using var utils = new SeederUtils();
|
||||
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
||||
var listFormName = String.Empty;
|
||||
|
||||
#region Warehouse Type
|
||||
|
|
@ -1398,7 +1398,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
|||
Text = "Conditions",
|
||||
UrlTarget = "_blank",
|
||||
AuthName = listFormName,
|
||||
Url = $"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url = $"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -1785,14 +1785,12 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
|||
#endregion
|
||||
|
||||
// Putaway ve Putaway Condition Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.Store.Putaway,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = AppCodes.Store.PutawayCondition,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Store.PutawayCondition,
|
||||
Code = AppCodes.Store.PutawayCondition,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
using var utils = new SeederUtils();
|
||||
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
||||
var listFormName = String.Empty;
|
||||
|
||||
#region Material Type
|
||||
|
|
@ -1147,7 +1147,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible=true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -2353,14 +2353,12 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
#endregion
|
||||
|
||||
// Supply ile Bank, Certificate ve Contact Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.SupplyChain.Supply,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = AppCodes.SupplyChain.PartnerBank,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.SupplyChain.PartnerBank,
|
||||
Code = AppCodes.SupplyChain.PartnerBank,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -2371,8 +2369,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
}
|
||||
},
|
||||
new {
|
||||
TabTitle = AppCodes.SupplyChain.PartnerCertificate,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.SupplyChain.PartnerCertificate,
|
||||
Code = AppCodes.SupplyChain.PartnerCertificate,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -2383,8 +2381,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
}
|
||||
},
|
||||
new {
|
||||
TabTitle = AppCodes.SupplyChain.PartnerContact,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.SupplyChain.PartnerContact,
|
||||
Code = AppCodes.SupplyChain.PartnerContact,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -2398,14 +2396,12 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
);
|
||||
|
||||
// Customer ile Bank, Certificate ve Contact Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.Crm.Customer,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = AppCodes.SupplyChain.PartnerBank,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.SupplyChain.PartnerBank,
|
||||
Code = AppCodes.SupplyChain.PartnerBank,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -2416,8 +2412,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
}
|
||||
},
|
||||
new {
|
||||
TabTitle = AppCodes.SupplyChain.PartnerCertificate,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.SupplyChain.PartnerCertificate,
|
||||
Code = AppCodes.SupplyChain.PartnerCertificate,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -2428,8 +2424,8 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
}
|
||||
},
|
||||
new {
|
||||
TabTitle = AppCodes.SupplyChain.PartnerContact,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.SupplyChain.PartnerContact,
|
||||
Code = AppCodes.SupplyChain.PartnerContact,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -2499,7 +2495,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible=true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -2770,14 +2766,12 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
#endregion
|
||||
|
||||
// Approval ve Approval Step arasında Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.SupplyChain.Approval,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = AppCodes.SupplyChain.ApprovalStep,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.SupplyChain.ApprovalStep,
|
||||
Code = AppCodes.SupplyChain.ApprovalStep,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
@ -2789,7 +2783,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
}
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
#region Request Type
|
||||
listFormName = AppCodes.SupplyChain.RequestType;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
|
|
@ -2983,7 +2977,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
Text ="Manage",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible=true,
|
||||
},
|
||||
}),
|
||||
|
|
@ -3379,14 +3373,12 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
|
|||
#endregion
|
||||
|
||||
// Purchase Request ve Purchase Request Item arasında SubForm ilişki kurulması
|
||||
await utils.CloneListFormWithFieldsAsync(
|
||||
_listFormRepository,
|
||||
_listFormFieldRepository,
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.SupplyChain.Request,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = listFormName,
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.SupplyChain.RequestItem,
|
||||
Code = AppCodes.SupplyChain.RequestItem,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
|
|
|
|||
|
|
@ -2834,12 +2834,32 @@
|
|||
"RequiredPermissionName": "App.Mrp.Operation",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.WorkcenterType",
|
||||
"DisplayName": "App.Mrp.WorkcenterType",
|
||||
"Order": 4,
|
||||
"Url": "/admin/list/App.Mrp.WorkcenterType",
|
||||
"Icon": "FcOrganization",
|
||||
"RequiredPermissionName": "App.Mrp.WorkcenterType",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.WorkcenterStatus",
|
||||
"DisplayName": "App.Mrp.WorkcenterStatus",
|
||||
"Order": 5,
|
||||
"Url": "/admin/list/App.Mrp.WorkcenterStatus",
|
||||
"Icon": "FcProcess",
|
||||
"RequiredPermissionName": "App.Mrp.WorkcenterStatus",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.Workcenter",
|
||||
"DisplayName": "App.Mrp.Workcenter",
|
||||
"Order": 4,
|
||||
"Url": "/admin/mrp/workcenters",
|
||||
"Order": 6,
|
||||
"Url": "/admin/list/App.Mrp.Workcenter",
|
||||
"Icon": "FcWorkflow",
|
||||
"RequiredPermissionName": "App.Mrp.Workcenter",
|
||||
"IsDisabled": false
|
||||
|
|
@ -2848,7 +2868,7 @@
|
|||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.Bom",
|
||||
"DisplayName": "App.Mrp.Bom",
|
||||
"Order": 5,
|
||||
"Order": 7,
|
||||
"Url": "/admin/mrp/bom",
|
||||
"Icon": "FcFlowChart",
|
||||
"RequiredPermissionName": "App.Mrp.Bom",
|
||||
|
|
@ -2858,7 +2878,7 @@
|
|||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.ProductionOrder",
|
||||
"DisplayName": "App.Mrp.ProductionOrder",
|
||||
"Order": 6,
|
||||
"Order": 8,
|
||||
"Url": "/admin/mrp/production-orders",
|
||||
"Icon": "FcFactory",
|
||||
"RequiredPermissionName": "App.Mrp.ProductionOrder",
|
||||
|
|
@ -2868,7 +2888,7 @@
|
|||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.WorkOrder",
|
||||
"DisplayName": "App.Mrp.WorkOrder",
|
||||
"Order": 7,
|
||||
"Order": 9,
|
||||
"Url": "/admin/mrp/work-orders",
|
||||
"Icon": "FcList",
|
||||
"RequiredPermissionName": "App.Mrp.WorkOrder",
|
||||
|
|
@ -2878,7 +2898,7 @@
|
|||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.DemandPlanning",
|
||||
"DisplayName": "App.Mrp.DemandPlanning",
|
||||
"Order": 8,
|
||||
"Order": 10,
|
||||
"Url": "/admin/mrp/demand-planning",
|
||||
"Icon": "FcPlanner",
|
||||
"RequiredPermissionName": "App.Mrp.DemandPlanning",
|
||||
|
|
@ -2888,7 +2908,7 @@
|
|||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.MaterialRequirement",
|
||||
"DisplayName": "App.Mrp.MaterialRequirement",
|
||||
"Order": 9,
|
||||
"Order": 11,
|
||||
"Url": "/admin/mrp/material-requirements",
|
||||
"Icon": "FcDataSheet",
|
||||
"RequiredPermissionName": "App.Mrp.MaterialRequirement",
|
||||
|
|
@ -2898,7 +2918,7 @@
|
|||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.PlanningGantt",
|
||||
"DisplayName": "App.Mrp.PlanningGantt",
|
||||
"Order": 10,
|
||||
"Order": 12,
|
||||
"Url": "/admin/mrp/planning-gantt",
|
||||
"Icon": "FcTimeline",
|
||||
"RequiredPermissionName": "App.Mrp.PlanningGantt",
|
||||
|
|
|
|||
|
|
@ -11042,6 +11042,135 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterType",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Mrp.WorkcenterType",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterType.Create",
|
||||
"ParentName": "App.Mrp.WorkcenterType",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterType.Update",
|
||||
"ParentName": "App.Mrp.WorkcenterType",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterType.Delete",
|
||||
"ParentName": "App.Mrp.WorkcenterType",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterType.Export",
|
||||
"ParentName": "App.Mrp.WorkcenterType",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterType.Import",
|
||||
"ParentName": "App.Mrp.WorkcenterType",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterType.Note",
|
||||
"ParentName": "App.Mrp.WorkcenterType",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterStatus",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Mrp.WorkcenterStatus",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterStatus.Create",
|
||||
"ParentName": "App.Mrp.WorkcenterStatus",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterStatus.Update",
|
||||
"ParentName": "App.Mrp.WorkcenterStatus",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterStatus.Delete",
|
||||
"ParentName": "App.Mrp.WorkcenterStatus",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterStatus.Export",
|
||||
"ParentName": "App.Mrp.WorkcenterStatus",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterStatus.Import",
|
||||
"ParentName": "App.Mrp.WorkcenterStatus",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkcenterStatus.Note",
|
||||
"ParentName": "App.Mrp.WorkcenterStatus",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.Workcenter",
|
||||
|
|
|
|||
|
|
@ -5,38 +5,54 @@ using System.Linq;
|
|||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Erp.Platform.Entities;
|
||||
using Erp.Platform.Enums;
|
||||
using Erp.Platform.ListForms;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
|
||||
namespace Erp.Platform.Data.Seeds;
|
||||
|
||||
public class SeederUtils : IDisposable
|
||||
public class SeederUtils
|
||||
{
|
||||
public async Task<ListForm> CloneListFormWithFieldsAsync(
|
||||
private readonly IRepository<ListForm, Guid> _listFormRepository;
|
||||
private readonly IRepository<ListFormField, Guid> _listFormFieldRepository;
|
||||
|
||||
public SeederUtils(
|
||||
IRepository<ListForm, Guid> listFormRepository,
|
||||
IRepository<ListFormField, Guid> listFormFieldRepository,
|
||||
string listFormCode,
|
||||
string subFormsJson)
|
||||
IRepository<ListFormField, Guid> listFormFieldRepository)
|
||||
{
|
||||
// load source form
|
||||
var listForm = await listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == listFormCode);
|
||||
_listFormRepository = listFormRepository;
|
||||
_listFormFieldRepository = listFormFieldRepository;
|
||||
}
|
||||
|
||||
public static string GetDefaultFormCodes(string listFormCode) => "form-" + listFormCode;
|
||||
|
||||
public async Task CloneFormLayoutAsync(string listFormCode, string subFormsJson)
|
||||
{
|
||||
var newListFormCode = GetDefaultFormCodes(listFormCode);
|
||||
var cloneForm = await CloneListFormWithFieldsAsync(listFormCode, newListFormCode);
|
||||
|
||||
if (cloneForm != null)
|
||||
{
|
||||
await SetSubFormsJsonAsync(cloneForm, subFormsJson);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<ListForm> CloneListFormWithFieldsAsync(string listFormCode, string newListFormCode, bool copyFormFields = true)
|
||||
{
|
||||
var listForm = await _listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == listFormCode);
|
||||
if (listForm == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
string formCode = GetDefaultFormCodes(listFormCode);
|
||||
|
||||
var targetForm = await listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == formCode);
|
||||
var targetForm = await _listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == newListFormCode);
|
||||
if (targetForm == null)
|
||||
{
|
||||
// create a shallow copy of the source form and set the target code
|
||||
var insertForm = new ListForm
|
||||
{
|
||||
ListFormCode = formCode,
|
||||
SubFormsJson = subFormsJson, //Özelleştirilmiş SubFormsJson
|
||||
|
||||
ListFormCode = newListFormCode,
|
||||
SubFormsJson = listForm.SubFormsJson,
|
||||
ListFormType = listForm.ListFormType,
|
||||
IsSubForm = listForm.IsSubForm,
|
||||
ShowNote = listForm.ShowNote,
|
||||
|
|
@ -75,44 +91,55 @@ public class SeederUtils : IDisposable
|
|||
};
|
||||
|
||||
// insert cloned form
|
||||
targetForm = await listFormRepository.InsertAsync(insertForm, autoSave: true);
|
||||
targetForm = await _listFormRepository.InsertAsync(insertForm, autoSave: true);
|
||||
}
|
||||
|
||||
// copy fields
|
||||
var targetFormFields = await listFormFieldRepository.GetListAsync(f => f.ListFormCode == listFormCode);
|
||||
if (targetFormFields != null && targetFormFields.Count > 0)
|
||||
if (copyFormFields)
|
||||
{
|
||||
var clonedFields = new List<ListFormField>();
|
||||
foreach (var f in targetFormFields)
|
||||
var targetFormFields = await _listFormFieldRepository.GetListAsync(f => f.ListFormCode == listFormCode);
|
||||
if (targetFormFields != null && targetFormFields.Count > 0)
|
||||
{
|
||||
var newField = new ListFormField
|
||||
var clonedFields = new List<ListFormField>();
|
||||
foreach (var f in targetFormFields)
|
||||
{
|
||||
ListFormCode = formCode,
|
||||
CultureName = f.CultureName,
|
||||
SourceDbType = f.SourceDbType,
|
||||
FieldName = f.FieldName,
|
||||
Width = f.Width,
|
||||
ListOrderNo = f.ListOrderNo,
|
||||
Visible = f.Visible,
|
||||
IsActive = f.IsActive,
|
||||
IsDeleted = f.IsDeleted,
|
||||
AllowSearch = f.AllowSearch,
|
||||
LookupJson = f.LookupJson,
|
||||
ColumnCustomizationJson = f.ColumnCustomizationJson,
|
||||
PermissionJson = f.PermissionJson,
|
||||
PivotSettingsJson = f.PivotSettingsJson,
|
||||
ValidationRuleJson = f.ValidationRuleJson,
|
||||
EditorOptions = f.EditorOptions,
|
||||
SortIndex = f.SortIndex,
|
||||
SortDirection = f.SortDirection,
|
||||
};
|
||||
clonedFields.Add(newField);
|
||||
}
|
||||
var newField = new ListFormField
|
||||
{
|
||||
ListFormCode = newListFormCode,
|
||||
CultureName = f.CultureName,
|
||||
SourceDbType = f.SourceDbType,
|
||||
FieldName = f.FieldName,
|
||||
Width = f.Width,
|
||||
ListOrderNo = f.ListOrderNo,
|
||||
Visible = f.Visible,
|
||||
IsActive = f.IsActive,
|
||||
IsDeleted = f.IsDeleted,
|
||||
AllowSearch = f.AllowSearch,
|
||||
LookupJson = f.LookupJson,
|
||||
ColumnCustomizationJson = f.ColumnCustomizationJson,
|
||||
PermissionJson = f.PermissionJson,
|
||||
PivotSettingsJson = f.PivotSettingsJson,
|
||||
ValidationRuleJson = f.ValidationRuleJson,
|
||||
EditorOptions = f.EditorOptions,
|
||||
SortIndex = f.SortIndex,
|
||||
SortDirection = f.SortDirection,
|
||||
};
|
||||
clonedFields.Add(newField);
|
||||
}
|
||||
|
||||
await listFormFieldRepository.InsertManyAsync(clonedFields, autoSave: true);
|
||||
await _listFormFieldRepository.InsertManyAsync(clonedFields, autoSave: true);
|
||||
}
|
||||
}
|
||||
|
||||
//Subform içerisindeki ParentFieldName ve ChildFieldName alanlarına göre eksik olan fieldları ekle
|
||||
return targetForm;
|
||||
}
|
||||
|
||||
private async Task SetSubFormsJsonAsync(ListForm listForm, string subFormsJson)
|
||||
{
|
||||
listForm.ListFormType = ListFormTypeEnum.Form;
|
||||
listForm.SubFormsJson = subFormsJson;
|
||||
await _listFormRepository.UpdateAsync(listForm, autoSave: true);
|
||||
|
||||
//Eksik olan form alanlarını ekle
|
||||
var subForms = JsonSerializer.Deserialize<List<SubFormDto>>(subFormsJson);
|
||||
if (subForms != null)
|
||||
{
|
||||
|
|
@ -124,9 +151,7 @@ public class SeederUtils : IDisposable
|
|||
var dbType = sf.DbType;
|
||||
|
||||
await InsertListFormFieldAsync(
|
||||
listFormRepository,
|
||||
listFormFieldRepository,
|
||||
listFormCode,
|
||||
listForm.ListFormCode,
|
||||
parentFieldName,
|
||||
dbType
|
||||
);
|
||||
|
|
@ -135,8 +160,6 @@ public class SeederUtils : IDisposable
|
|||
var childFieldName = sf.ChildFieldName;
|
||||
|
||||
await InsertListFormFieldAsync(
|
||||
listFormRepository,
|
||||
listFormFieldRepository,
|
||||
childListFormCode,
|
||||
childFieldName,
|
||||
dbType
|
||||
|
|
@ -144,20 +167,12 @@ public class SeederUtils : IDisposable
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return targetForm;
|
||||
}
|
||||
|
||||
private async Task InsertListFormFieldAsync(
|
||||
IRepository<ListForm, Guid> listFormRepository,
|
||||
IRepository<ListFormField, Guid> listFormFieldRepository,
|
||||
string listFormCode,
|
||||
string fieldName,
|
||||
DbType dbType
|
||||
)
|
||||
private async Task InsertListFormFieldAsync(string listFormCode, string fieldName, DbType dbType)
|
||||
{
|
||||
var form = await listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == listFormCode);
|
||||
var fieldQuery = await listFormFieldRepository.GetQueryableAsync();
|
||||
var form = await _listFormRepository.FirstOrDefaultAsync(f => f.ListFormCode == listFormCode);
|
||||
var fieldQuery = await _listFormFieldRepository.GetQueryableAsync();
|
||||
|
||||
var formField = await fieldQuery.FirstOrDefaultAsync(f => f.ListFormCode == listFormCode && f.FieldName == fieldName);
|
||||
if (formField == null)
|
||||
|
|
@ -185,36 +200,7 @@ public class SeederUtils : IDisposable
|
|||
}),
|
||||
};
|
||||
|
||||
await listFormFieldRepository.InsertAsync(field, autoSave: true);
|
||||
await _listFormFieldRepository.InsertAsync(field, autoSave: true);
|
||||
}
|
||||
}
|
||||
|
||||
public string GetDefaultFormCodes(string listCode)
|
||||
{
|
||||
return "form-" + listCode;
|
||||
}
|
||||
|
||||
private bool _disposed;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (_disposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (disposing)
|
||||
{
|
||||
// If the class ever holds disposable fields, dispose them here.
|
||||
// Currently SeederUtils does not own any IDisposable resources.
|
||||
}
|
||||
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -565,6 +565,9 @@ public static class SeedConsts
|
|||
public const string OperationCategory = Default + ".OperationCategory";
|
||||
public const string OperationType = Default + ".OperationType";
|
||||
public const string Operation = Default + ".Operation";
|
||||
public const string WorkcenterType = Default + ".WorkcenterType";
|
||||
public const string WorkcenterStatus = Default + ".WorkcenterStatus";
|
||||
public const string Workcenter = Default + ".Workcenter";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@ namespace Erp.Platform.Queries;
|
|||
|
||||
public class SubForm : ValueObject
|
||||
{
|
||||
public string TabTitle { get; set; }
|
||||
public string TabType { get; set; }
|
||||
public string TabTitle { get; set; }
|
||||
public string Code { get; set; }
|
||||
public bool IsRefresh { get; set; }
|
||||
public SubFormRelation[] Relation { get; set; }
|
||||
|
||||
protected override IEnumerable<object> GetAtomicValues()
|
||||
{
|
||||
yield return TabTitle;
|
||||
yield return TabType;
|
||||
yield return TabTitle;
|
||||
yield return Code;
|
||||
yield return IsRefresh;
|
||||
yield return Relation;
|
||||
|
|
|
|||
|
|
@ -12,12 +12,22 @@ export function useCurrentMenuIcon(className = 'w-6 h-6'): JSX.Element {
|
|||
const currentMenu = menus.find((menu) => {
|
||||
if (!menu.path) return false
|
||||
|
||||
// normalize: /list/ -> /form/
|
||||
const menuPath = menu.path.toLowerCase()
|
||||
const listFormPath = menuPath.replace('/list/', '/form/')
|
||||
const formPath = listFormPath.replace('/list-', '/form-')
|
||||
const currentPath = location.pathname.toLowerCase()
|
||||
|
||||
return location.pathname.startsWith(menuPath) || location.pathname.startsWith(listFormPath) || location.pathname.startsWith(formPath)
|
||||
// Exact match
|
||||
if (currentPath.startsWith(menuPath)) return true
|
||||
|
||||
// Extract the form code (e.g., "App.Definitions.Program" from path)
|
||||
const menuFormCode = menuPath.split('/').pop() || ''
|
||||
|
||||
// Check if current path contains the form code with form- prefix
|
||||
if (menuFormCode && currentPath.includes(`/form-${menuFormCode}`)) return true
|
||||
|
||||
// Check if current path contains just the form code
|
||||
if (menuFormCode && currentPath.endsWith(`/${menuFormCode}`)) return true
|
||||
|
||||
return false
|
||||
})
|
||||
|
||||
const IconComponent = currentMenu?.icon ? navigationIcon[currentMenu.icon] || FaUser : FaUser
|
||||
|
|
|
|||
Loading…
Reference in a new issue