Kurs -> Erp

This commit is contained in:
Sedat ÖZTÜRK 2025-11-03 14:25:05 +03:00
parent 7231b895ca
commit 4e555e9cc6
88 changed files with 25069 additions and 23782 deletions

File diff suppressed because it is too large Load diff

View file

@ -11135,7 +11135,7 @@
"resourceName": "Platform",
"key": "App.Hr.Employee",
"tr": "Çalışanlar",
"en": "Employee"
"en": "Employees"
},
{
"resourceName": "Platform",

View file

@ -0,0 +1,854 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Text.Json;
using System.Threading.Tasks;
using Kurs.Languages.Languages;
using Kurs.Platform.Entities;
using Kurs.Platform.Enums;
using Kurs.Platform.ListForms;
using Kurs.Platform.Queries;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity;
using Volo.Abp.TenantManagement;
using AbpIdentity = Kurs.Platform.Data.Seeds.SeedConsts.AbpIdentity;
using AppCodes = Kurs.Platform.Data.Seeds.SeedConsts.AppCodes;
using static Kurs.Platform.PlatformConsts;
using static Kurs.Platform.PlatformSeeder.SeederDefaults;
namespace Kurs.Platform.Data.Seeds;
public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDependency
{
private readonly IRepository<ListForm, Guid> _listFormRepository;
private readonly IRepository<ListFormField, Guid> _listFormFieldRepository;
private readonly IdentityUserManager _identityUserManager;
private readonly IdentityRoleManager _identityRoleManager;
private readonly IConfiguration _configuration;
public ListFormSeeder_Accounting(
IRepository<ListForm, Guid> listFormRepository,
IRepository<ListFormField, Guid> listFormFieldRepository,
IdentityUserManager userManager,
IdentityRoleManager roleManager,
IConfiguration configuration)
{
_listFormRepository = listFormRepository;
_listFormFieldRepository = listFormFieldRepository;
_identityUserManager = userManager;
_identityRoleManager = roleManager;
_configuration = configuration;
}
public async Task SeedAsync(DataSeedContext context)
{
#region FormBank
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Forms.FormBank))
{
var formBank = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.Form,
IsSubForm = false,
ShowActivity = true,
LayoutJson = DefaultLayoutJson,
SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new {
TabTitle = "Bank Accounts",
TabType = ListFormTabTypeEnum.List,
Code = ListFormCodes.Lists.BankAccount,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
ChildFieldName = "BankId"
},
new {
ParentFieldName = "BranchId",
ChildFieldName = "BranchId"
},
}
},
}),
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Forms.FormBank,
Name = AppCodes.Accounting.Bank,
Title = AppCodes.Accounting.Bank,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = false,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Accounting.Bank,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Bank)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
PermissionJson = DefaultPermissionJson(AppCodes.Accounting.Bank),
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Bank))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
EditingOptionJson = DefaultEditingOptionJson,
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() {
Order = 1,
ColCount = 2,
ColSpan = 2,
ItemType = "group",
Items = [
new EditingFormItemDto { Order = 1, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "IdentifierCode", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox},
new EditingFormItemDto { Order = 4, DataField = "Address1", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 5, DataField = "Address2", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 6, DataField = "Country", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 7, DataField = "City", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 8, DataField = "District", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 9, DataField = "PostalCode", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 10, DataField = "Phone", ColSpan = 1, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions },
new EditingFormItemDto { Order = 11, DataField = "Email", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
]}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value }
})
}
);
#region Bank Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = formBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
SortIndex = 0,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson,
},
// BranchId
new()
{
ListFormCode = formBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "BranchId",
Width = 150,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.BranchValues,
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson,
},
new() {
ListFormCode = formBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 150,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)}
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson,
},
new() {
ListFormCode = formBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "IdentifierCode",
Width = 150,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)}
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson,
},
new() {
ListFormCode = formBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Address1",
Width = 150,
ListOrderNo = 5,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson,
},
new() {
ListFormCode = formBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Address2",
Width = 150,
ListOrderNo = 6,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson,
},
new() {
ListFormCode = formBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Country",
Width = 100,
ListOrderNo = 7,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.CountryValues,
CascadeEmptyFields = "City,District,Street"
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson,
},
new() {
ListFormCode = formBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "City",
Width = 100,
ListOrderNo = 8,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.CityValues,
CascadeRelationField = "Country",
CascadeFilterOperator="=",
CascadeParentFields = "Country",
CascadeEmptyFields = "District,Street"
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson,
},
new() {
ListFormCode = formBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "District",
Width = 100,
ListOrderNo = 9,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.DistrictValues,
CascadeRelationField = "City",
CascadeFilterOperator="=",
CascadeParentFields = "Country,City",
CascadeEmptyFields = "Street",
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson,
},
new() {
ListFormCode = formBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "PostalCode",
Width = 150,
ListOrderNo = 10,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson,
},
new() {
ListFormCode = formBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Phone",
Width = 150,
ListOrderNo = 11,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson,
},
new() {
ListFormCode = formBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Email",
Width = 150,
ListOrderNo = 10,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleEmailJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson,
},
});
#endregion
}
#endregion
#region Bank
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Bank))
{
var listFormBank = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List,
IsSubForm = false,
LayoutJson = DefaultLayoutJson,
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Lists.Bank,
Name = AppCodes.Accounting.Bank,
Title = AppCodes.Accounting.Bank,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = true,
IsOrganizationUnit = false,
Description = AppCodes.Accounting.Bank,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Bank)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.Accounting.Bank),
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Bank))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
{
Popup = new GridEditingPopupDto() { Title = AppCodes.Accounting.Bank, Width = 600, Height = 600 },
AllowDeleting = true,
AllowAdding = true,
AllowUpdating = true,
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 4, DataField = "IdentifierCode", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox},
new EditingFormItemDto { Order = 5, DataField = "Address1", ColSpan = 2, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 6, DataField = "Address2", ColSpan = 2, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 7, DataField = "Country", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 8, DataField = "City", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 9, DataField = "District", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 10, DataField = "PostalCode", ColSpan = 2, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 11, DataField = "Phone", ColSpan = 2, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions },
new EditingFormItemDto { Order = 12, DataField = "Email", ColSpan = 2, EditorType2=EditorTypes.dxTextBox },
]}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() {
Hint = "Manage",
Text ="Manage",
UrlTarget="_blank",
AuthName = AppCodes.Accounting.BankAccount,
Url=$"/admin/form/{ListFormCodes.Forms.FormBank}/@Id"
},
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value }
})
}
);
#region Bank Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listFormBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 0,
Visible = false,
IsActive = true,
IsDeleted = false,
SortIndex = 0,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson
},
// BranchId
new()
{
ListFormCode = listFormBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "BranchId",
Width = 150,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.BranchValues,
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 150,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "IdentifierCode",
Width = 150,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Address1",
Width = 150,
ListOrderNo = 5,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Address2",
Width = 150,
ListOrderNo = 6,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Country",
Width = 100,
ListOrderNo = 7,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.CountryValues,
CascadeEmptyFields = "City,District,Street"
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "City",
Width = 100,
ListOrderNo = 8,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.CityValues,
CascadeRelationField = "Country",
CascadeFilterOperator="=",
CascadeParentFields = "Country",
CascadeEmptyFields = "District,Street"
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "District",
Width = 100,
ListOrderNo = 9,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.DistrictValues,
CascadeRelationField = "City",
CascadeFilterOperator="=",
CascadeParentFields = "Country,City",
CascadeEmptyFields = "Street",
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "PostalCode",
Width = 150,
ListOrderNo = 10,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Phone",
Width = 150,
ListOrderNo = 11,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBank.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Email",
Width = 150,
ListOrderNo = 12,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleEmailJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.Bank),
PivotSettingsJson = DefaultPivotSettingsJson
},
});
#endregion
}
#endregion
#region BankAccount
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.BankAccount))
{
var listFormBankAccount = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List,
IsSubForm = false,
LayoutJson = DefaultLayoutJson,
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Lists.BankAccount,
Name = AppCodes.Accounting.BankAccount,
Title = AppCodes.Accounting.BankAccount,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = true,
IsOrganizationUnit = false,
Description = AppCodes.Accounting.BankAccount,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.BankAccount)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.Accounting.BankAccount),
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.BankAccount))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
{
Popup = new GridEditingPopupDto() { Title = AppCodes.Accounting.BankAccount, Width = 600, Height = 300 },
AllowDeleting = true,
AllowAdding = true,
AllowUpdating = true,
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "BankId", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 2, DataField = "AccountNumber", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "AccountOwner", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 4, DataField = "CurrencyId", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
new EditingFormItemDto { Order = 5, DataField = "CanTransferMoney", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox },
]}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "CanTransferMoney", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
}
);
#region Bank Account Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listFormBankAccount.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
SortIndex = 0,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.BankAccount),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBankAccount.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "BankId",
Width = 250,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.BankValues
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.BankAccount),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBankAccount.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "AccountNumber",
Width = 150,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.BankAccount),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBankAccount.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "AccountOwner",
Width = 250,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.BankAccount),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBankAccount.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "CurrencyId",
Width = 150,
ListOrderNo = 5,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.CurrencyValues,
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.BankAccount),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormBankAccount.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Boolean,
FieldName = "CanTransferMoney",
Width = 50,
ListOrderNo = 6,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Accounting.BankAccount),
PivotSettingsJson = DefaultPivotSettingsJson
},
});
#endregion
}
#endregion
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,199 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Text.Json;
using System.Threading.Tasks;
using Kurs.Languages.Languages;
using Kurs.Platform.Entities;
using Kurs.Platform.Enums;
using Kurs.Platform.ListForms;
using Kurs.Platform.Queries;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity;
using Volo.Abp.TenantManagement;
using AbpIdentity = Kurs.Platform.Data.Seeds.SeedConsts.AbpIdentity;
using AppCodes = Kurs.Platform.Data.Seeds.SeedConsts.AppCodes;
using static Kurs.Platform.PlatformConsts;
using static Kurs.Platform.PlatformSeeder.SeederDefaults;
namespace Kurs.Platform.Data.Seeds;
public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
{
private readonly IRepository<ListForm, Guid> _listFormRepository;
private readonly IRepository<ListFormField, Guid> _listFormFieldRepository;
private readonly IdentityUserManager _identityUserManager;
private readonly IdentityRoleManager _identityRoleManager;
private readonly IConfiguration _configuration;
public ListFormSeeder_Crm(
IRepository<ListForm, Guid> listFormRepository,
IRepository<ListFormField, Guid> listFormFieldRepository,
IdentityUserManager userManager,
IdentityRoleManager roleManager,
IConfiguration configuration)
{
_listFormRepository = listFormRepository;
_listFormFieldRepository = listFormFieldRepository;
_identityUserManager = userManager;
_identityRoleManager = roleManager;
_configuration = configuration;
}
public async Task SeedAsync(DataSeedContext context)
{
// #region Material Type
// if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MaterialType))
// {
// var listFormMaterialType = await _listFormRepository.InsertAsync(
// new ListForm()
// {
// ListFormType = ListFormTypeEnum.List,
// IsSubForm = false,
// LayoutJson = DefaultLayoutJson,
// CultureName = LanguageCodes.En,
// ListFormCode = ListFormCodes.Lists.MaterialType,
// Name = AppCodes.SupplyChain.MaterialType,
// Title = AppCodes.SupplyChain.MaterialType,
// DataSourceCode = SeedConsts.DataSources.DefaultCode,
// IsTenant = true,
// IsBranch = false,
// IsOrganizationUnit = false,
// Description = AppCodes.SupplyChain.MaterialType,
// SelectCommandType = SelectCommandTypeEnum.Table,
// SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType)),
// KeyFieldName = "Id",
// KeyFieldDbSourceType = DbType.Guid,
// DefaultFilter = DefaultFilterJson,
// SortMode = GridOptions.SortModeSingle,
// FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
// HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
// SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
// GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
// SelectionJson = DefaultSelectionSingleJson,
// ColumnOptionJson = DefaultColumnOptionJson,
// PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.MaterialType),
// DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
// DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
// }),
// PagerOptionJson = DefaultPagerOptionJson,
// EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
// {
// Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialType, Width = 500, Height = 250 },
// AllowDeleting = true,
// AllowAdding = true,
// AllowUpdating = true,
// SendOnlyChangedFormValuesUpdate = false,
// }),
// EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
// new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
// new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
// new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
// new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea },
// new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox },
// ]}
// }),
// InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
// }),
// FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
// }),
// }
// );
// #region MaterialType Fields
// await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.Guid,
// FieldName = "Id",
// Width = 100,
// ListOrderNo = 1,
// Visible = false,
// IsActive = true,
// IsDeleted = false,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Code",
// Width = 150,
// ListOrderNo = 2,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Name",
// Width = 350,
// ListOrderNo = 3,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// SortIndex = 1,
// SortDirection = GridColumnOptions.SortOrderAsc,
// AllowSearch = true,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Description",
// Width = 500,
// ListOrderNo = 4,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.Boolean,
// FieldName = "IsActive",
// Width = 100,
// ListOrderNo = 5,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// }
// });
// #endregion
// }
// #endregion
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,200 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Text.Json;
using System.Threading.Tasks;
using Kurs.Languages.Languages;
using Kurs.Platform.Entities;
using Kurs.Platform.Enums;
using Kurs.Platform.ListForms;
using Kurs.Platform.Queries;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity;
using Volo.Abp.TenantManagement;
using AbpIdentity = Kurs.Platform.Data.Seeds.SeedConsts.AbpIdentity;
using AppCodes = Kurs.Platform.Data.Seeds.SeedConsts.AppCodes;
using static Kurs.Platform.PlatformConsts;
using static Kurs.Platform.PlatformSeeder.SeederDefaults;
namespace Kurs.Platform.Data.Seeds;
public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDependency
{
private readonly IRepository<ListForm, Guid> _listFormRepository;
private readonly IRepository<ListFormField, Guid> _listFormFieldRepository;
private readonly IdentityUserManager _identityUserManager;
private readonly IdentityRoleManager _identityRoleManager;
private readonly IConfiguration _configuration;
public ListFormSeeder_Maintenance(
IRepository<ListForm, Guid> listFormRepository,
IRepository<ListFormField, Guid> listFormFieldRepository,
IdentityUserManager userManager,
IdentityRoleManager roleManager,
IConfiguration configuration)
{
_listFormRepository = listFormRepository;
_listFormFieldRepository = listFormFieldRepository;
_identityUserManager = userManager;
_identityRoleManager = roleManager;
_configuration = configuration;
}
public async Task SeedAsync(DataSeedContext context)
{
// #region Material Type
// if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MaterialType))
// {
// var listFormMaterialType = await _listFormRepository.InsertAsync(
// new ListForm()
// {
// ListFormType = ListFormTypeEnum.List,
// IsSubForm = false,
// LayoutJson = DefaultLayoutJson,
// CultureName = LanguageCodes.En,
// ListFormCode = ListFormCodes.Lists.MaterialType,
// Name = AppCodes.SupplyChain.MaterialType,
// Title = AppCodes.SupplyChain.MaterialType,
// DataSourceCode = SeedConsts.DataSources.DefaultCode,
// IsTenant = true,
// IsBranch = false,
// IsOrganizationUnit = false,
// Description = AppCodes.SupplyChain.MaterialType,
// SelectCommandType = SelectCommandTypeEnum.Table,
// SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType)),
// KeyFieldName = "Id",
// KeyFieldDbSourceType = DbType.Guid,
// DefaultFilter = DefaultFilterJson,
// SortMode = GridOptions.SortModeSingle,
// FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
// HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
// SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
// GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
// SelectionJson = DefaultSelectionSingleJson,
// ColumnOptionJson = DefaultColumnOptionJson,
// PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.MaterialType),
// DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
// DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
// }),
// PagerOptionJson = DefaultPagerOptionJson,
// EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
// {
// Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialType, Width = 500, Height = 250 },
// AllowDeleting = true,
// AllowAdding = true,
// AllowUpdating = true,
// SendOnlyChangedFormValuesUpdate = false,
// }),
// EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
// new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
// new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
// new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
// new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea },
// new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox },
// ]}
// }),
// InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
// }),
// FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
// }),
// }
// );
// #region MaterialType Fields
// await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.Guid,
// FieldName = "Id",
// Width = 100,
// ListOrderNo = 1,
// Visible = false,
// IsActive = true,
// IsDeleted = false,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Code",
// Width = 150,
// ListOrderNo = 2,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Name",
// Width = 350,
// ListOrderNo = 3,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// SortIndex = 1,
// SortDirection = GridColumnOptions.SortOrderAsc,
// AllowSearch = true,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Description",
// Width = 500,
// ListOrderNo = 4,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.Boolean,
// FieldName = "IsActive",
// Width = 100,
// ListOrderNo = 5,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// }
// });
// #endregion
// }
// #endregion
}
}

View file

@ -0,0 +1,200 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Text.Json;
using System.Threading.Tasks;
using Kurs.Languages.Languages;
using Kurs.Platform.Entities;
using Kurs.Platform.Enums;
using Kurs.Platform.ListForms;
using Kurs.Platform.Queries;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity;
using Volo.Abp.TenantManagement;
using AbpIdentity = Kurs.Platform.Data.Seeds.SeedConsts.AbpIdentity;
using AppCodes = Kurs.Platform.Data.Seeds.SeedConsts.AppCodes;
using static Kurs.Platform.PlatformConsts;
using static Kurs.Platform.PlatformSeeder.SeederDefaults;
namespace Kurs.Platform.Data.Seeds;
public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
{
private readonly IRepository<ListForm, Guid> _listFormRepository;
private readonly IRepository<ListFormField, Guid> _listFormFieldRepository;
private readonly IdentityUserManager _identityUserManager;
private readonly IdentityRoleManager _identityRoleManager;
private readonly IConfiguration _configuration;
public ListFormSeeder_Mrp(
IRepository<ListForm, Guid> listFormRepository,
IRepository<ListFormField, Guid> listFormFieldRepository,
IdentityUserManager userManager,
IdentityRoleManager roleManager,
IConfiguration configuration)
{
_listFormRepository = listFormRepository;
_listFormFieldRepository = listFormFieldRepository;
_identityUserManager = userManager;
_identityRoleManager = roleManager;
_configuration = configuration;
}
public async Task SeedAsync(DataSeedContext context)
{
// #region Material Type
// if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MaterialType))
// {
// var listFormMaterialType = await _listFormRepository.InsertAsync(
// new ListForm()
// {
// ListFormType = ListFormTypeEnum.List,
// IsSubForm = false,
// LayoutJson = DefaultLayoutJson,
// CultureName = LanguageCodes.En,
// ListFormCode = ListFormCodes.Lists.MaterialType,
// Name = AppCodes.SupplyChain.MaterialType,
// Title = AppCodes.SupplyChain.MaterialType,
// DataSourceCode = SeedConsts.DataSources.DefaultCode,
// IsTenant = true,
// IsBranch = false,
// IsOrganizationUnit = false,
// Description = AppCodes.SupplyChain.MaterialType,
// SelectCommandType = SelectCommandTypeEnum.Table,
// SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType)),
// KeyFieldName = "Id",
// KeyFieldDbSourceType = DbType.Guid,
// DefaultFilter = DefaultFilterJson,
// SortMode = GridOptions.SortModeSingle,
// FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
// HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
// SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
// GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
// SelectionJson = DefaultSelectionSingleJson,
// ColumnOptionJson = DefaultColumnOptionJson,
// PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.MaterialType),
// DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
// DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
// }),
// PagerOptionJson = DefaultPagerOptionJson,
// EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
// {
// Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialType, Width = 500, Height = 250 },
// AllowDeleting = true,
// AllowAdding = true,
// AllowUpdating = true,
// SendOnlyChangedFormValuesUpdate = false,
// }),
// EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
// new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
// new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
// new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
// new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea },
// new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox },
// ]}
// }),
// InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
// }),
// FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
// }),
// }
// );
// #region MaterialType Fields
// await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.Guid,
// FieldName = "Id",
// Width = 100,
// ListOrderNo = 1,
// Visible = false,
// IsActive = true,
// IsDeleted = false,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Code",
// Width = 150,
// ListOrderNo = 2,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Name",
// Width = 350,
// ListOrderNo = 3,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// SortIndex = 1,
// SortDirection = GridColumnOptions.SortOrderAsc,
// AllowSearch = true,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Description",
// Width = 500,
// ListOrderNo = 4,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.Boolean,
// FieldName = "IsActive",
// Width = 100,
// ListOrderNo = 5,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// }
// });
// #endregion
// }
// #endregion
}
}

View file

@ -0,0 +1,861 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Text.Json;
using System.Threading.Tasks;
using Kurs.Languages.Languages;
using Kurs.Platform.Entities;
using Kurs.Platform.Enums;
using Kurs.Platform.ListForms;
using Kurs.Platform.Queries;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity;
using Volo.Abp.TenantManagement;
using AbpIdentity = Kurs.Platform.Data.Seeds.SeedConsts.AbpIdentity;
using AppCodes = Kurs.Platform.Data.Seeds.SeedConsts.AppCodes;
using static Kurs.Platform.PlatformConsts;
using static Kurs.Platform.PlatformSeeder.SeederDefaults;
namespace Kurs.Platform.Data.Seeds;
public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDependency
{
private readonly IRepository<ListForm, Guid> _listFormRepository;
private readonly IRepository<ListFormField, Guid> _listFormFieldRepository;
private readonly IdentityUserManager _identityUserManager;
private readonly IdentityRoleManager _identityRoleManager;
private readonly IConfiguration _configuration;
public ListFormSeeder_Participant(
IRepository<ListForm, Guid> listFormRepository,
IRepository<ListFormField, Guid> listFormFieldRepository,
IdentityUserManager userManager,
IdentityRoleManager roleManager,
IConfiguration configuration)
{
_listFormRepository = listFormRepository;
_listFormFieldRepository = listFormFieldRepository;
_identityUserManager = userManager;
_identityRoleManager = roleManager;
_configuration = configuration;
}
public async Task SeedAsync(DataSeedContext context)
{
#region MeetingMethod
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MeetingMethod))
{
var listFormMeetingMethod = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List,
IsSubForm = false,
LayoutJson = DefaultLayoutJson,
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Lists.MeetingMethod,
Name = AppCodes.Definitions.MeetingMethod,
Title = AppCodes.Definitions.MeetingMethod,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Definitions.MeetingMethod,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MeetingMethod)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.Definitions.MeetingMethod),
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.MeetingMethod))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
{
Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.MeetingMethod, Width = 500, Height = 250 },
AllowDeleting = true,
AllowAdding = true,
AllowUpdating = true,
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
]}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}),
}
);
#region MeetingMethod Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listFormMeetingMethod.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.MeetingMethod),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMeetingMethod.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 250,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.MeetingMethod),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMeetingMethod.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Type",
Width = 250,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Dijital",Name="Dijital" },
new () { Key="Telefon",Name="Telefon" },
new () { Key="Fiziksel",Name="Fiziksel" },
new () { Key="Hibrit",Name="Hibrit" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.MeetingMethod),
PivotSettingsJson = DefaultPivotSettingsJson
},
// Status
new()
{
ListFormCode = listFormMeetingMethod.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Status",
Width = 120,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Aktif",Name="Aktif" },
new () { Key="Pasif",Name="Pasif" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.MeetingMethod),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
#region MeetingResult
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MeetingResult))
{
var listFormMeetingResult = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List,
IsSubForm = false,
LayoutJson = DefaultLayoutJson,
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Lists.MeetingResult,
Name = AppCodes.Definitions.MeetingResult,
Title = AppCodes.Definitions.MeetingResult,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Definitions.MeetingResult,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MeetingResult)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.Definitions.MeetingResult),
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.MeetingResult))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
{
Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.MeetingResult, Width = 500, Height = 250 },
AllowDeleting = true,
AllowAdding = true,
AllowUpdating = true,
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
]}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}),
}
);
#region MeetingResult Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listFormMeetingResult.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.MeetingResult),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMeetingResult.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 250,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.MeetingResult),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMeetingResult.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Order",
Width = 250,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.MeetingResult),
PivotSettingsJson = DefaultPivotSettingsJson
},
// Status
new()
{
ListFormCode = listFormMeetingResult.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Status",
Width = 120,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Aktif",Name="Aktif" },
new () { Key="Pasif",Name="Pasif" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.MeetingResult),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
#region Source
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Source))
{
var listFormSource = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List,
IsSubForm = false,
LayoutJson = DefaultLayoutJson,
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Lists.Source,
Name = AppCodes.Definitions.Source,
Title = AppCodes.Definitions.Source,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Definitions.Source,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Source)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.Definitions.Source),
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Source))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
{
Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Source, Width = 500, Height = 250 },
AllowDeleting = true,
AllowAdding = true,
AllowUpdating = true,
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
]}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}),
}
);
#region Source Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listFormSource.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.Source),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormSource.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 250,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.Source),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormSource.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Status",
Width = 250,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Aktif",Name="Aktif" },
new () { Key="Pasif",Name="Pasif" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.Source),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
#region Interesting
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Interesting))
{
var listFormInteresting = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List,
IsSubForm = false,
LayoutJson = DefaultLayoutJson,
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Lists.Interesting,
Name = AppCodes.Definitions.Interesting,
Title = AppCodes.Definitions.Interesting,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Definitions.Interesting,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Interesting)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.Definitions.Interesting),
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Interesting))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
{
Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Interesting, Width = 500, Height = 250 },
AllowDeleting = true,
AllowAdding = true,
AllowUpdating = true,
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
]}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}),
}
);
#region Interesting Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listFormInteresting.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.Interesting),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormInteresting.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 250,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.Interesting),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormInteresting.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Status",
Width = 250,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Aktif",Name="Aktif" },
new () { Key="Pasif",Name="Pasif" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.Interesting),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
#region SalesRejectionReason
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.SalesRejectionReason))
{
var listFormSalesRejectionReason = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List,
IsSubForm = false,
LayoutJson = DefaultLayoutJson,
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Lists.SalesRejectionReason,
Name = AppCodes.Definitions.SalesRejectionReason,
Title = AppCodes.Definitions.SalesRejectionReason,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Definitions.SalesRejectionReason,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.SalesRejectionReason)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.Definitions.SalesRejectionReason),
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.SalesRejectionReason))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
{
Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.SalesRejectionReason, Width = 500, Height = 250 },
AllowDeleting = true,
AllowAdding = true,
AllowUpdating = true,
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Category", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
]}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
}),
}
);
#region SalesRejectionReason Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listFormSalesRejectionReason.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
SortIndex = 0,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.SalesRejectionReason),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormSalesRejectionReason.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 500,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.SalesRejectionReason),
PivotSettingsJson = DefaultPivotSettingsJson
},
// Status
new()
{
ListFormCode = listFormSalesRejectionReason.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Category",
Width = 300,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Kişisel",Name="Kişisel" },
new () { Key="Fiyat / Bütçe",Name="Fiyat / Bütçe" },
new () { Key="Ürün / Hizmet",Name="Ürün / Hizmet" },
new () { Key="Rekabet",Name="Rekabet" },
new () { Key="Zamanlama",Name="Zamanlama" },
new () { Key="Lokasyon",Name="Lokasyon" },
new () { Key="İletişim",Name="İletişim" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.SalesRejectionReason),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormSalesRejectionReason.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Status",
Width = 100,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
LookupJson = JsonSerializer.Serialize(new LookupDto {
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new () { Key="Aktif",Name="Aktif" },
new () { Key="Pasif",Name="Pasif" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.SalesRejectionReason),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
#region NoteType
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.NoteType))
{
var listFormNoteType = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List,
IsSubForm = false,
LayoutJson = DefaultLayoutJson,
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Lists.NoteType,
Name = AppCodes.Definitions.NoteType,
Title = AppCodes.Definitions.NoteType,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.Definitions.NoteType,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.NoteType)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.Definitions.NoteType),
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.NoteType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
{
Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.NoteType, Width = 500, Height = 250 },
AllowDeleting = true,
AllowAdding = true,
AllowUpdating = true,
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
]}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
}
);
#region NoteType Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listFormNoteType.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
SortIndex = 0,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.NoteType),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormNoteType.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 250,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.Definitions.NoteType),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
}
}

View file

@ -0,0 +1,200 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Text.Json;
using System.Threading.Tasks;
using Kurs.Languages.Languages;
using Kurs.Platform.Entities;
using Kurs.Platform.Enums;
using Kurs.Platform.ListForms;
using Kurs.Platform.Queries;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity;
using Volo.Abp.TenantManagement;
using AbpIdentity = Kurs.Platform.Data.Seeds.SeedConsts.AbpIdentity;
using AppCodes = Kurs.Platform.Data.Seeds.SeedConsts.AppCodes;
using static Kurs.Platform.PlatformConsts;
using static Kurs.Platform.PlatformSeeder.SeederDefaults;
namespace Kurs.Platform.Data.Seeds;
public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
{
private readonly IRepository<ListForm, Guid> _listFormRepository;
private readonly IRepository<ListFormField, Guid> _listFormFieldRepository;
private readonly IdentityUserManager _identityUserManager;
private readonly IdentityRoleManager _identityRoleManager;
private readonly IConfiguration _configuration;
public ListFormSeeder_Project(
IRepository<ListForm, Guid> listFormRepository,
IRepository<ListFormField, Guid> listFormFieldRepository,
IdentityUserManager userManager,
IdentityRoleManager roleManager,
IConfiguration configuration)
{
_listFormRepository = listFormRepository;
_listFormFieldRepository = listFormFieldRepository;
_identityUserManager = userManager;
_identityRoleManager = roleManager;
_configuration = configuration;
}
public async Task SeedAsync(DataSeedContext context)
{
// #region Material Type
// if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MaterialType))
// {
// var listFormMaterialType = await _listFormRepository.InsertAsync(
// new ListForm()
// {
// ListFormType = ListFormTypeEnum.List,
// IsSubForm = false,
// LayoutJson = DefaultLayoutJson,
// CultureName = LanguageCodes.En,
// ListFormCode = ListFormCodes.Lists.MaterialType,
// Name = AppCodes.SupplyChain.MaterialType,
// Title = AppCodes.SupplyChain.MaterialType,
// DataSourceCode = SeedConsts.DataSources.DefaultCode,
// IsTenant = true,
// IsBranch = false,
// IsOrganizationUnit = false,
// Description = AppCodes.SupplyChain.MaterialType,
// SelectCommandType = SelectCommandTypeEnum.Table,
// SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType)),
// KeyFieldName = "Id",
// KeyFieldDbSourceType = DbType.Guid,
// DefaultFilter = DefaultFilterJson,
// SortMode = GridOptions.SortModeSingle,
// FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
// HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
// SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
// GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
// SelectionJson = DefaultSelectionSingleJson,
// ColumnOptionJson = DefaultColumnOptionJson,
// PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.MaterialType),
// DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
// DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
// }),
// PagerOptionJson = DefaultPagerOptionJson,
// EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
// {
// Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialType, Width = 500, Height = 250 },
// AllowDeleting = true,
// AllowAdding = true,
// AllowUpdating = true,
// SendOnlyChangedFormValuesUpdate = false,
// }),
// EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
// new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
// new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
// new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
// new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea },
// new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox },
// ]}
// }),
// InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
// }),
// FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
// }),
// }
// );
// #region MaterialType Fields
// await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.Guid,
// FieldName = "Id",
// Width = 100,
// ListOrderNo = 1,
// Visible = false,
// IsActive = true,
// IsDeleted = false,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Code",
// Width = 150,
// ListOrderNo = 2,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Name",
// Width = 350,
// ListOrderNo = 3,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// SortIndex = 1,
// SortDirection = GridColumnOptions.SortOrderAsc,
// AllowSearch = true,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Description",
// Width = 500,
// ListOrderNo = 4,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.Boolean,
// FieldName = "IsActive",
// Width = 100,
// ListOrderNo = 5,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// }
// });
// #endregion
// }
// #endregion
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,395 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Text.Json;
using System.Threading.Tasks;
using Kurs.Languages.Languages;
using Kurs.Platform.Entities;
using Kurs.Platform.Enums;
using Kurs.Platform.ListForms;
using Kurs.Platform.Queries;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity;
using Volo.Abp.TenantManagement;
using AbpIdentity = Kurs.Platform.Data.Seeds.SeedConsts.AbpIdentity;
using AppCodes = Kurs.Platform.Data.Seeds.SeedConsts.AppCodes;
using static Kurs.Platform.PlatformConsts;
using static Kurs.Platform.PlatformSeeder.SeederDefaults;
namespace Kurs.Platform.Data.Seeds;
public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDependency
{
private readonly IRepository<ListForm, Guid> _listFormRepository;
private readonly IRepository<ListFormField, Guid> _listFormFieldRepository;
private readonly IdentityUserManager _identityUserManager;
private readonly IdentityRoleManager _identityRoleManager;
private readonly IConfiguration _configuration;
public ListFormSeeder_SupplyChain(
IRepository<ListForm, Guid> listFormRepository,
IRepository<ListFormField, Guid> listFormFieldRepository,
IdentityUserManager userManager,
IdentityRoleManager roleManager,
IConfiguration configuration)
{
_listFormRepository = listFormRepository;
_listFormFieldRepository = listFormFieldRepository;
_identityUserManager = userManager;
_identityRoleManager = roleManager;
_configuration = configuration;
}
public async Task SeedAsync(DataSeedContext context)
{
#region Material Type
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MaterialType))
{
var listFormMaterialType = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List,
IsSubForm = false,
LayoutJson = DefaultLayoutJson,
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Lists.MaterialType,
Name = AppCodes.SupplyChain.MaterialType,
Title = AppCodes.SupplyChain.MaterialType,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.SupplyChain.MaterialType,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.MaterialType),
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
{
Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialType, Width = 500, Height = 250 },
AllowDeleting = true,
AllowAdding = true,
AllowUpdating = true,
SendOnlyChangedFormValuesUpdate = false,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox },
]}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
}
);
#region MaterialType Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listFormMaterialType.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMaterialType.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Code",
Width = 150,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMaterialType.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 350,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMaterialType.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Description",
Width = 500,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMaterialType.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Boolean,
FieldName = "IsActive",
Width = 100,
ListOrderNo = 5,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
PivotSettingsJson = DefaultPivotSettingsJson
}
});
#endregion
}
#endregion
#region Material Group
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MaterialGroup))
{
var listFormMaterialGroup = await _listFormRepository.InsertAsync(
new ListForm()
{
ListFormType = ListFormTypeEnum.List,
IsSubForm = false,
LayoutJson = DefaultLayoutJson,
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Lists.MaterialGroup,
Name = AppCodes.SupplyChain.MaterialGroup,
Title = AppCodes.SupplyChain.MaterialGroup,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.SupplyChain.MaterialGroup,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullViewName(nameof(TableNameEnum.MaterialGroup)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
SortMode = GridOptions.SortModeSingle,
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.MaterialGroup),
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialGroup))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
}),
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
{
Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialGroup, Width = 500, Height = 350 },
AllowDeleting = true,
AllowAdding = true,
AllowUpdating = true,
SendOnlyChangedFormValuesUpdate = true,
}),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox },
new EditingFormItemDto { Order = 5, DataField = "ParentGroupId", ColSpan = 2, EditorType2=EditorTypes.dxSelectBox },
]}
}),
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
}
);
#region MaterialGroup Fields
await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
new() {
ListFormCode = listFormMaterialGroup.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "Id",
Width = 100,
ListOrderNo = 1,
Visible = false,
IsActive = true,
IsDeleted = false,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialGroup),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMaterialGroup.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Code",
Width = 200,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialGroup),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMaterialGroup.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 250,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialGroup),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMaterialGroup.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Description",
Width = 300,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialGroup),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMaterialGroup.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Boolean,
FieldName = "IsActive",
Width = 100,
ListOrderNo = 5,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialGroup),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMaterialGroup.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "ParentGroupId",
Width = 400,
ListOrderNo = 6,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = LookupQueryValues.MaterialGroupValues,
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialGroup),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listFormMaterialGroup.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "HierarchyPath",
Width = 500,
ListOrderNo = 7,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
{
C = AppCodes.SupplyChain.MaterialGroup + ".Create",
R = AppCodes.SupplyChain.MaterialGroup,
U = AppCodes.SupplyChain.MaterialGroup + ".Update",
E = true,
I = false,
Deny = false
}),
PivotSettingsJson = DefaultPivotSettingsJson,
}
});
#endregion
}
#endregion
}
}

View file

@ -0,0 +1,200 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Text.Json;
using System.Threading.Tasks;
using Kurs.Languages.Languages;
using Kurs.Platform.Entities;
using Kurs.Platform.Enums;
using Kurs.Platform.ListForms;
using Kurs.Platform.Queries;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity;
using Volo.Abp.TenantManagement;
using AbpIdentity = Kurs.Platform.Data.Seeds.SeedConsts.AbpIdentity;
using AppCodes = Kurs.Platform.Data.Seeds.SeedConsts.AppCodes;
using static Kurs.Platform.PlatformConsts;
using static Kurs.Platform.PlatformSeeder.SeederDefaults;
namespace Kurs.Platform.Data.Seeds;
public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependency
{
private readonly IRepository<ListForm, Guid> _listFormRepository;
private readonly IRepository<ListFormField, Guid> _listFormFieldRepository;
private readonly IdentityUserManager _identityUserManager;
private readonly IdentityRoleManager _identityRoleManager;
private readonly IConfiguration _configuration;
public ListFormSeeder_Warehouse(
IRepository<ListForm, Guid> listFormRepository,
IRepository<ListFormField, Guid> listFormFieldRepository,
IdentityUserManager userManager,
IdentityRoleManager roleManager,
IConfiguration configuration)
{
_listFormRepository = listFormRepository;
_listFormFieldRepository = listFormFieldRepository;
_identityUserManager = userManager;
_identityRoleManager = roleManager;
_configuration = configuration;
}
public async Task SeedAsync(DataSeedContext context)
{
// #region Material Type
// if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MaterialType))
// {
// var listFormMaterialType = await _listFormRepository.InsertAsync(
// new ListForm()
// {
// ListFormType = ListFormTypeEnum.List,
// IsSubForm = false,
// LayoutJson = DefaultLayoutJson,
// CultureName = LanguageCodes.En,
// ListFormCode = ListFormCodes.Lists.MaterialType,
// Name = AppCodes.SupplyChain.MaterialType,
// Title = AppCodes.SupplyChain.MaterialType,
// DataSourceCode = SeedConsts.DataSources.DefaultCode,
// IsTenant = true,
// IsBranch = false,
// IsOrganizationUnit = false,
// Description = AppCodes.SupplyChain.MaterialType,
// SelectCommandType = SelectCommandTypeEnum.Table,
// SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType)),
// KeyFieldName = "Id",
// KeyFieldDbSourceType = DbType.Guid,
// DefaultFilter = DefaultFilterJson,
// SortMode = GridOptions.SortModeSingle,
// FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }),
// HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }),
// SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }),
// GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }),
// SelectionJson = DefaultSelectionSingleJson,
// ColumnOptionJson = DefaultColumnOptionJson,
// PermissionJson = DefaultPermissionJson(AppCodes.SupplyChain.MaterialType),
// DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaterialType))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
// DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }
// }),
// PagerOptionJson = DefaultPagerOptionJson,
// EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
// {
// Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialType, Width = 500, Height = 250 },
// AllowDeleting = true,
// AllowAdding = true,
// AllowUpdating = true,
// SendOnlyChangedFormValuesUpdate = false,
// }),
// EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
// new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[
// new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
// new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
// new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea },
// new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox },
// ]}
// }),
// InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
// new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }
// }),
// FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
// new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
// }),
// }
// );
// #region MaterialType Fields
// await _listFormFieldRepository.InsertManyAsync(new ListFormField[] {
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.Guid,
// FieldName = "Id",
// Width = 100,
// ListOrderNo = 1,
// Visible = false,
// IsActive = true,
// IsDeleted = false,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Code",
// Width = 150,
// ListOrderNo = 2,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Name",
// Width = 350,
// ListOrderNo = 3,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// SortIndex = 1,
// SortDirection = GridColumnOptions.SortOrderAsc,
// AllowSearch = true,
// ValidationRuleJson = DefaultValidationRuleRequiredJson,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.String,
// FieldName = "Description",
// Width = 500,
// ListOrderNo = 4,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// },
// new() {
// ListFormCode = listFormMaterialType.ListFormCode,
// CultureName = LanguageCodes.En,
// SourceDbType = DbType.Boolean,
// FieldName = "IsActive",
// Width = 100,
// ListOrderNo = 5,
// Visible = true,
// IsActive = true,
// IsDeleted = false,
// AllowSearch = true,
// ColumnCustomizationJson = DefaultColumnCustomizationJson,
// PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.MaterialType),
// PivotSettingsJson = DefaultPivotSettingsJson
// }
// });
// #endregion
// }
// #endregion
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
{
"ConnectionStrings": {
"SqlServer": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;",
"PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
"SqlServer": "Server=sql;Database=Erp;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;Encrypt=False;TrustServerCertificate=True;Connection Timeout=60;",
"PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Erp;"
},
"Redis": {
"IsEnabled": "true",

View file

@ -1,7 +1,7 @@
{
"ConnectionStrings": {
"SqlServer": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;",
"PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
"SqlServer": "Server=sql;Database=Erp;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;Encrypt=False;TrustServerCertificate=True;Connection Timeout=60;",
"PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Erp;"
},
"Redis": {
"IsEnabled": "true",

View file

@ -1,8 +1,8 @@
{
"Seed": false,
"ConnectionStrings": {
"SqlServer": "Server=localhost;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;",
"PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=KURS;"
"SqlServer": "Server=localhost;Database=Erp;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;Encrypt=False;TrustServerCertificate=True;Connection Timeout=60;",
"PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=Erp;"
},
"Redis": {
"IsEnabled": "true",

View file

@ -5,6 +5,8 @@ namespace Kurs.Platform;
public static class LookupQueryValues
{
private const string defaultDomain = "Erp";
public static string LanguageKeyValues =
$"SELECT " +
$"\"{FullNameTable(TableNameEnum.LanguageKey)}\".\"Key\", " +
@ -129,7 +131,7 @@ public static class LookupQueryValues
public static string BranchValues =
$"SELECT \"Id\" AS \"Key\", " +
$"\"Name\" AS \"Name\" " +
$"FROM \"KURS\".\"dbo\".\"{FullNameTable(TableNameEnum.Branch)}\" " +
$"FROM \"{defaultDomain}\".\"dbo\".\"{FullNameTable(TableNameEnum.Branch)}\" " +
$"WHERE " +
$"\"TenantId\" = '@TENANTID' " + // 🔹 Bu form doğru — Replace hedefi bu.
$"AND \"IsDeleted\" = 'false' " +

View file

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Kurs.Platform.Migrations
{
[DbContext(typeof(PlatformDbContext))]
[Migration("20251101111255_Initial")]
[Migration("20251103110012_Initial")]
partial class Initial
{
/// <inheritdoc />

File diff suppressed because one or more lines are too long

View file

@ -9,8 +9,8 @@
"BaseDomain": "sozsoft.com"
},
"ConnectionStrings": {
"SqlServer": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;",
"PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
"SqlServer": "Server=sql;Database=Erp;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;Encrypt=False;TrustServerCertificate=True;Connection Timeout=60;",
"PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Erp;"
},
"Redis": {
"IsEnabled": "true",

View file

@ -9,8 +9,8 @@
"BaseDomain": "sozsoft.com"
},
"ConnectionStrings": {
"SqlServer": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;",
"PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;"
"SqlServer": "Server=sql;Database=Erp;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;Encrypt=False;TrustServerCertificate=True;Connection Timeout=60;",
"PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Erp;"
},
"Redis": {
"IsEnabled": "true",

View file

@ -9,8 +9,8 @@
"Version": "1.0.1"
},
"ConnectionStrings": {
"SqlServer": "Server=localhost;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;",
"PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=KURS;"
"SqlServer": "Server=localhost;Database=Erp;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;Encrypt=False;TrustServerCertificate=True;Connection Timeout=60;",
"PostgreSql": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=Erp;"
},
"Redis": {
"IsEnabled": "true",

File diff suppressed because one or more lines are too long

View file

@ -36,15 +36,19 @@ services:
- db
sql:
image: mcr.microsoft.com/mssql/server:2022-CU19-ubuntu-22.04
container_name: kurs-platform-data-sql
profiles: ["sql"]
user: root
environment:
- SA_PASSWORD=NvQp8s@l
- ACCEPT_EULA=Y
- MSSQL_PID=Web
- MSSQL_PID=Developer
ports:
- 1433:1433
- "1433:1433"
volumes:
- mssql:/var/opt/mssql
networks:
- db
db:
aliases:
- sql
restart: unless-stopped

View file

@ -2,6 +2,7 @@
set -e
cd ~/kurs-platform
git restore ui/public/version.json 2>/dev/null || git checkout -- ui/public/version.json
./configs/deployment/scripts/build/api.sh
./configs/deployment/scripts/build/migrator.sh

View file

@ -401,7 +401,7 @@ const PublicLayout = () => {
<div className="border-t border-gray-800 mt-12 pt-8">
<div className="flex flex-col md:flex-row justify-between items-center">
<p className="text-gray-400 text-sm">
&copy; {currentYear} Sözsoft. {translate('::Public.footer.copyright')}
&copy; {currentYear} Erp Platform. {translate('::Public.footer.copyright')}
</p>
<div className="mt-4 md:mt-0">
<ul className="flex space-x-6 text-sm">

View file

@ -1,6 +1,6 @@
const { VITE_CDN_URL } = import.meta.env
export const APP_NAME = 'Sözsoft Kurs Platform'
export const APP_NAME = 'Erp Platform'
export const PERSIST_STORE_NAME = 'admin'
export const REDIRECT_URL_KEY = 'redirectUrl'
export const DEFAULT_API_NAME = 'Default'

View file

@ -74,7 +74,7 @@ export const mockActivities: CrmActivity[] = [
activityType: CrmActivityTypeEnum.Demo,
subject: "Yazılım Demo Sunumu",
description:
"ERP sisteminin demo sunumu müşteri lokasyonunda gerçekleştirilecek.",
"Erp sisteminin demo sunumu müşteri lokasyonunda gerçekleştirilecek.",
customerId: "5",
customer: mockBusinessParties.find((cust) => cust.id === "5"),
activityDate: new Date("2024-01-26T13:00:00"),

View file

@ -34,7 +34,7 @@ export const mockOpportunities: CrmOpportunity[] = [
{
id: "opp2",
opportunityNumber: "OPP-2024-002",
title: "XYZ Kurumu ERP Sistemi",
title: "XYZ Kurumu Erp Sistemi",
customerId: "6",
customer: mockBusinessParties.find((c) => c.id === "6"),
stage: OpportunityStageEnum.ClosedLost,

View file

@ -4,7 +4,7 @@ export const mockProjectCostTracking: PsProjectCostTracking[] = [
{
id: '1',
projectId: '1',
projectName: 'ERP Sistemi Geliştirme',
projectName: 'Erp Sistemi Geliştirme',
projectCode: 'PRJ-2024-001',
plannedBudget: 500000,
actualCost: 325000,

View file

@ -11,7 +11,7 @@ export const mockProjectTasks: PsProjectTask[] = [
phase: mockProjectPhases.find((phase) => phase.id === "1"),
taskCode: "TSK-001",
name: "Veritabanı Tasarımı",
description: "ERP sistemi için veritabanı şemasının tasarlanması",
description: "Erp sistemi için veritabanı şemasının tasarlanması",
taskType: TaskTypeEnum.Development,
status: TaskStatusEnum.InProgress,
priority: PriorityEnum.High,

View file

@ -17,7 +17,7 @@ export const mockProjects: PsProject[] = [
{
id: "1",
code: "PRJ-2024-001",
name: "ERP Sistemi Geliştirme",
name: "Erp Sistemi Geliştirme",
description: "Kurumsal kaynak planlama sistemi geliştirilmesi",
projectType: ProjectTypeEnum.Internal,
status: ProjectStatusEnum.Active,

View file

@ -75,7 +75,7 @@ export const mockWaybills: FiWaybill[] = [
{
id: "3",
waybillId: "2",
description: "Yazılım Lisansı - ERP Modülü",
description: "Yazılım Lisansı - Erp Modülü",
quantity: 1,
unit: "Adet",
unitPrice: 15000,

View file

@ -1,4 +1,4 @@
const defaultSubDomain = 'KURS'
export const defaultDomain = 'Erp'
export const getSubdomain = (): string | null => {
if (typeof window === 'undefined') return null
@ -12,7 +12,7 @@ export const getSubdomain = (): string | null => {
}
// Default subdomain ise null döndür
if (parts[0].toUpperCase() === defaultSubDomain) {
if (parts[0].toUpperCase() === defaultDomain) {
return null
}

View file

@ -17,9 +17,9 @@ const AccessDenied = () => {
return (
<Container className="h-full">
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Access Denied')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div className="h-full flex flex-col items-center justify-center p-28">
<DoubleSidedImage

View file

@ -8,9 +8,9 @@ const Dashboard = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Dashboard')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
/>
<IntranetDashboard />
</>

View file

@ -13,9 +13,9 @@ const NotFoundPage = () => {
return (
<div className="p-28">
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Not Found')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div className="flex items-center justify-center font-inter">
<div className="text-[8rem] sm:text-[10rem] md:text-[12rem] font-bold bg-gradient-to-br from-primary to-secondary bg-clip-text animate-pulse">

View file

@ -82,9 +82,9 @@ const ActivityLog = () => {
return (
<Container>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Abp.Identity.ActivityLogs')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<AdaptableCard>

View file

@ -677,9 +677,9 @@ const FileManager = () => {
return (
<Container className="px-3 sm:px-4 md:px-6">
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.Files')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
{/* Enhanced Unified Toolbar */}

View file

@ -131,9 +131,9 @@ const Wizard = () => {
return (
<Container>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.Listforms.Wizard')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div className="grid lg:grid-cols-2 xl:grid-cols-3">

View file

@ -170,9 +170,9 @@ const FormEdit = () => {
return listFormCode && listFormValues && customizations && roleList && userList ? (
<Container>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={`${listFormCode} - ${translate(`::${listFormValues.title}`)}`}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div className="lg:flex items-center justify-between mb-4 gap-3">
<div className="mb-4 lg:mb-0">

View file

@ -456,9 +456,9 @@ const OrganizationUnits = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::Abp.Identity.OrganizationUnits')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<Loading type="cover" className="h-full" loading={loading}>
<Container className="h-full">

View file

@ -68,9 +68,9 @@ const Profile = () => {
return (
<Container>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Abp.Identity.Profile')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<AdaptableCard>
<Tabs value={currentTab} onChange={(val) => onTabChange(val)}>

View file

@ -37,9 +37,9 @@ const Roles = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::AbpIdentity.Roles')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<Button
onClick={() => {

View file

@ -43,9 +43,9 @@ const Tenants = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::AbpTenantManagement.Tenants')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<Loading type="cover" loading={loading}>
<Container>

View file

@ -104,9 +104,9 @@ function UserDetails() {
return userDetails ? (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={userDetails.email}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<Container>
<Tabs defaultValue="user">

View file

@ -218,9 +218,9 @@ const Users = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::AbpIdentity.Users')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<Container>
<AdaptableCard>

View file

@ -270,9 +270,9 @@ const Assistant = () => {
return (
<Container>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Abp.Identity.Ai')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<LoadAiPostsFromLocalStorage />

View file

@ -55,9 +55,9 @@ const ExtendLogin = () => {
return emailSent ? (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('AbpAccount::' + 'Abp.Account.ExtendLogin')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div>
<h3 className="mb-1">{translate('::Abp.Account.ExtendLogin.Title')}</h3>
@ -71,9 +71,9 @@ const ExtendLogin = () => {
) : (
<div>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Abp.Account.ExtendLogin')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div className="mb-6">
<h3 className="mb-1">{translate('::Abp.Account.ExtendLogin')}</h3>

View file

@ -59,9 +59,9 @@ const ForgotPassword = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Abp.Account.ForgotPassword')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<motion.div
initial={{ opacity: 0, x: 100 }}

View file

@ -20,7 +20,7 @@ import { motion } from 'framer-motion'
import { useEffect, useRef, useState } from 'react'
import { useNavigate } from 'react-router-dom'
import * as Yup from 'yup'
import { getSubdomain } from '@/utils/subdomain'
import { defaultDomain, getSubdomain } from '@/utils/subdomain'
import { Helmet } from 'react-helmet'
type SignInFormSchema = {
@ -70,8 +70,6 @@ const Login = () => {
const { signIn } = useAuth()
const { translate } = useLocalization()
const defaultSubDomain = 'KURS'
const onSignIn = async (
values: SignInFormSchema,
{ setSubmitting, isSubmitting, setFieldValue, setFieldTouched }: any,
@ -189,7 +187,7 @@ const Login = () => {
}, [subDomainName])
const tenantStyle: React.CSSProperties | undefined =
subDomainName && subDomainName !== defaultSubDomain
subDomainName && subDomainName !== defaultDomain
? {
opacity: 0,
position: 'absolute',
@ -217,9 +215,9 @@ const Login = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('AbpAccount::' + 'Login')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<motion.div
initial={{ opacity: 0, x: 100 }}
@ -242,7 +240,7 @@ const Login = () => {
value={tenantName}
onChange={(e) => setTenantName(e.target.value)}
style={tenantStyle}
aria-hidden={subDomainName && subDomainName !== defaultSubDomain ? 'true' : 'false'}
aria-hidden={subDomainName && subDomainName !== defaultDomain ? 'true' : 'false'}
/>
</div>
</>

View file

@ -62,9 +62,9 @@ const Register = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('AbpAccount::' + 'Register')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div className="mb-4">

View file

@ -79,9 +79,9 @@ const ResetPassword = () => {
return (
<div>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('AbpAccount::' + 'ResetPassword')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div className="mb-6">
{resetComplete ? (

View file

@ -36,9 +36,9 @@ const SendConfirmationCode = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Abp.Account.SendConfirmationCode')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div className="mb-8">

View file

@ -22,9 +22,9 @@ const VerifyConfirmationCode = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Abp.Account.VerifyConfirmationCode')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div>

View file

@ -257,9 +257,9 @@ const ClassList: React.FC = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.Coordinator.Classroom.List')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<Container>
{/* Stats Cards */}

View file

@ -26,9 +26,9 @@ const Dashboard: React.FC = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.Coordinator.Classroom.Dashboard')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div className="flex items-center justify-center p-4">
<motion.div

View file

@ -163,9 +163,9 @@ const PlanningPage: React.FC = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.Coordinator.Classroom.Planning')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
/>
<Container>
{/* Header */}

View file

@ -854,9 +854,9 @@ const RoomDetail: React.FC = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.Coordinator.Classroom.RoomDetail')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
{teacherDisconnected && (

View file

@ -11,9 +11,9 @@ const DashboardPage: React.FC = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.DeveloperKit')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<DeveloperLayout>
<EntityProvider>

View file

@ -81,9 +81,9 @@ const FormEdit = (
>
{!isSubForm && (
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + gridDto?.gridOptions.title)}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
)}

View file

@ -196,9 +196,9 @@ const FormNew = (
<Container>
{!isSubForm && (
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + gridDto?.gridOptions.title)}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
)}
<div

View file

@ -77,9 +77,9 @@ const FormView = (
>
{!isSubForm && (
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + gridDto?.gridOptions.title)}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
)}
<div

View file

@ -52,9 +52,9 @@ export function Forum() {
return (
<Container>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.Forum')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
{error && (

View file

@ -58,9 +58,9 @@ export function Management() {
return (
<Container>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.ForumManagement')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
{error && (

View file

@ -251,9 +251,9 @@ const Chart = (props: ChartProps) => {
<Container className={DX_CLASSNAMES}>
{!isSubForm && gridDto && (
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + gridDto?.gridOptions?.title)}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
)}
{_listFormCode && chartOptions && (

View file

@ -652,9 +652,9 @@ const Grid = (props: GridProps) => {
<Container className={DX_CLASSNAMES}>
{!isSubForm && (
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + gridDto?.gridOptions.title)}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
)}
{gridDto && columnData && (

View file

@ -306,9 +306,9 @@ const Pivot = (props: PivotProps) => {
<Container className={DX_CLASSNAMES}>
{!isSubForm && (
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + gridDto?.gridOptions.title)}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
)}
{gridDto && columnData && (

View file

@ -88,9 +88,9 @@ export const MenuManager = () => {
return (
<Container>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.Menus.Manager')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div className="bg-white rounded px-4 sm:px-4 lg:px-6 py-6">

View file

@ -52,9 +52,9 @@ const About: React.FC = () => {
return (
<>
<Helmet
titleTemplate="%s | Sözsoft"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Public.about.title')}
defaultTitle="Sözsoft"
defaultTitle="Erp Platform"
></Helmet>
<div className="min-h-screen bg-gray-50">

View file

@ -76,9 +76,9 @@ const Blog = () => {
return (
<div className="min-h-screen bg-gray-50">
<Helmet
titleTemplate="%s | Sözsoft"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Public.blog.title')}
defaultTitle="Sözsoft"
defaultTitle="Erp Platform"
></Helmet>
{/* Hero Section */}
<div className="relative bg-blue-900 text-white py-12">

View file

@ -82,9 +82,9 @@ const BlogDetail: React.FC = () => {
return (
<div className="min-h-screen bg-gray-50">
<Helmet
titleTemplate="%s | Sözsoft"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Public.blog.title')}
defaultTitle="Sözsoft"
defaultTitle="Erp Platform"
></Helmet>
<div className="relative bg-blue-900 text-white py-12"></div>
<div className="container mx-auto px-4">

View file

@ -57,9 +57,9 @@ const Checkout: React.FC = () => {
return (
<div className="min-h-screen bg-gray-50">
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Public.nav.checkout')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
{/* Hero Section */}

View file

@ -54,9 +54,9 @@ const Contact: React.FC = () => {
return (
<div className="min-h-screen bg-gray-50">
<Helmet
titleTemplate="%s | Sözsoft"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Public.contact.title')}
defaultTitle="Sözsoft"
defaultTitle="Erp Platform"
></Helmet>
{/* Hero Section */}

View file

@ -95,9 +95,9 @@ const Home: React.FC = () => {
return (
<div className="min-h-screen">
<Helmet
titleTemplate="%s | Sözsoft"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.Home')}
defaultTitle="Sözsoft"
defaultTitle="Erp Platform"
></Helmet>
{/* Hero */}

View file

@ -119,9 +119,9 @@ const Payment: React.FC = () => {
return (
<div className="min-h-screen bg-gray-50">
<Helmet
titleTemplate="%s | Sözsoft"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Public.nav.payment')}
defaultTitle="Sözsoft"
defaultTitle="Erp Platform"
></Helmet>
{/* Hero Section */}

View file

@ -76,9 +76,9 @@ const Products: React.FC = () => {
return (
<div className="min-h-screen bg-gray-50">
<Helmet
titleTemplate="%s | Sözsoft"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Public.nav.products')}
defaultTitle="Sözsoft"
defaultTitle="Erp Platform"
></Helmet>
{/* Hero Section */}

View file

@ -73,9 +73,9 @@ const Services: React.FC = () => {
return (
<div className="min-h-screen bg-gray-50">
<Helmet
titleTemplate="%s | Sözsoft"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Public.nav.services')}
defaultTitle="Sözsoft"
defaultTitle="Erp Platform"
></Helmet>
{/* Hero Section */}

View file

@ -40,9 +40,9 @@ const Success: React.FC = () => {
return (
<div className="min-h-screen bg-gray-50">
<Helmet
titleTemplate="%s | Sözsoft"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'Public.nav.success')}
defaultTitle="Sözsoft"
defaultTitle="Erp Platform"
></Helmet>
<div className="relative bg-blue-900 text-white py-12">
<div

View file

@ -10,9 +10,9 @@ const DashboardPage: React.FC = () => {
return (
<Container>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.Reports')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<Dashboard />
</Container>

View file

@ -10,9 +10,9 @@ const ReportViewerPage: React.FC = () => {
return (
<Container>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.Reports')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<ReportViewer />
</Container>

View file

@ -120,9 +120,9 @@ const Settings = () => {
return (
<Container className="h-full">
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate('::' + 'App.Settings')}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
></Helmet>
<div className="flex flex-col md:flex-row gap-4">

View file

@ -46,9 +46,9 @@ const Changelog = () => {
return (
<Container>
<Helmet
titleTemplate="%s | Sözsoft Kurs Platform"
titleTemplate="%s | Erp Platform"
title={translate("::App.ChangeLog")}
defaultTitle="Sözsoft Kurs Platform"
defaultTitle="Erp Platform"
/>
<AdaptableCard>
<div className="p-2">

View file

@ -83,8 +83,8 @@ export default defineConfig(async ({ mode }) => {
},
manifest: {
name: 'Sözsoft Kurs Platform',
short_name: 'Sözsoft Kurs Platform',
name: 'Erp Platform',
short_name: 'Erp Platform',
theme_color: '#FF99C8',
background_color: '#f0e7db',
display: 'standalone',
@ -109,7 +109,7 @@ export default defineConfig(async ({ mode }) => {
},
],
categories: ['business', 'productivity'],
description: 'Sözsoft Kurs Platform Application',
description: 'Erp Platform Application',
},
}),
],