Supply Chain Form Partner

This commit is contained in:
Sedat ÖZTÜRK 2025-11-12 17:57:52 +03:00
parent 7d993f7daf
commit 877f4b203a
3 changed files with 705 additions and 6 deletions

View file

@ -13,8 +13,6 @@ using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity;
using Volo.Abp.TenantManagement;
using AbpIdentity = Erp.Platform.Data.Seeds.SeedConsts.AbpIdentity;
using AppCodes = Erp.Platform.Data.Seeds.SeedConsts.AppCodes;
using static Erp.Platform.PlatformConsts;
using static Erp.Platform.PlatformSeeder.SeederDefaults;
@ -2172,7 +2170,6 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
Url=$"/admin/form/{ListFormCodes.Forms.FormQuestionPool}/@Id"
},
}),
}
);

View file

@ -43,6 +43,696 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
public async Task SeedAsync(DataSeedContext context)
{
#region FormSupplier
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Forms.FormSupply))
{
var listForm = await _listFormRepository.InsertAsync(new ListForm()
{
ListFormType = ListFormTypeEnum.Form,
IsSubForm = false,
ShowActivity = true,
LayoutJson = DefaultLayoutJson,
SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
new {
TabTitle = "Banks",
TabType = ListFormTabTypeEnum.List,
Code = ListFormCodes.Lists.SupplyBank,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
ChildFieldName = "PartnerId"
}
}
},
new {
TabTitle = "Certificates",
TabType = ListFormTabTypeEnum.List,
Code = ListFormCodes.Lists.SupplyCertificate,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
ChildFieldName = "PartnerId"
}
}
},
new {
TabTitle = "Contacts",
TabType = ListFormTabTypeEnum.List,
Code = ListFormCodes.Lists.SupplyContact,
Relation = new List<dynamic>() {
new {
ParentFieldName = "Id",
ChildFieldName = "PartnerId"
}
}
}
}),
CultureName = LanguageCodes.En,
ListFormCode = ListFormCodes.Forms.FormSupply,
Name = AppCodes.SupplyChain.Supply,
Title = AppCodes.SupplyChain.Supply,
DataSourceCode = SeedConsts.DataSources.DefaultCode,
IsTenant = true,
IsBranch = false,
IsOrganizationUnit = false,
Description = AppCodes.SupplyChain.Supply,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Partner)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = "\"IsDeleted\" = 'false' AND \"PartyType\" = 'Supplier'",
SortMode = GridOptions.SortModeSingle,
FilterRowJson = 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.Supply),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Partner)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
PagerOptionJson = DefaultPagerOptionJson,
EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.Supply, 900, 800, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
{
new()
{
Order = 1, Caption = "General", ColCount = 2, ColSpan = 2, ItemType = "group", Items =
[
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField = "PartyType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 4, DataField = "SectorId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 5, DataField = "TaxNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 6, DataField = "TaxOffice", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 7, DataField = "CurrencyId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 8, DataField = "PaymentTermId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 9, DataField = "CreditLimit", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox },
]
},
new()
{
Order = 2, Caption = "Address", ColCount = 2, ColSpan = 2, ItemType = "group", Items =
[
new EditingFormItemDto { Order = 10, DataField = "Country", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 11, DataField = "City", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 12, DataField = "District", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 13, DataField = "Street", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 14, DataField = "Address1", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 15, DataField = "Address2", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 16, DataField = "PostalCode", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 17, DataField = "PhoneNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 18, DataField = "MobileNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 19, DataField = "FaxNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 20, DataField = "Email", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 21, DataField = "Website", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
]
},
new()
{
Order = 3, Caption="Supply Card", ColCount = 2, ColSpan = 2, ItemType = "group", Items =
[
new EditingFormItemDto { Order = 22, DataField = "SupplierTypeId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 23, DataField = "SupplyCardTypeId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 24, DataField = "CardNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 25, DataField = "ValidFrom", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 26, DataField = "ValidTo", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 27, DataField = "CurrentBalance", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 28, DataField = "DiscountRate", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 29, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
]
}
}),
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[]
{
new() { FieldName = "PartyType", FieldDbType = DbType.String, Value = "Supplier", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "CreditLimit", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "CurrentBalance", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "DiscountRate", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value },
})
});
await _listFormFieldRepository.InsertManyAsync(
[
new()
{
ListFormCode = listForm.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.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Code",
Width = 140,
ListOrderNo = 2,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Name",
Width = 250,
ListOrderNo = 3,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "PartyType",
Width = 100,
ListOrderNo = 4,
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="Customer", Name="Customer" },
new() { Key="Supplier", Name="Supplier" },
new() { Key="Both", Name="Both" },
new() { Key="Other", Name="Other" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "SectorId",
Width = 100,
ListOrderNo = 5,
Visible = true,
IsActive = true,
IsDeleted = false,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Sector), "Id", "Name"),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Int64,
FieldName = "TaxNumber",
Width = 100,
ListOrderNo = 6,
Visible = true,
IsActive = true,
IsDeleted = false,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "TaxOffice",
Width = 100,
ListOrderNo = 7,
Visible = true,
IsActive = true,
IsDeleted = false,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "CurrencyId",
Width = 100,
ListOrderNo = 8,
Visible = true,
IsActive = true,
IsDeleted = false,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Id", "Name"),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "PaymentTermId",
Width = 100,
ListOrderNo = 9,
Visible = true,
IsActive = true,
IsDeleted = false,
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.PaymentTerm), "Id", "Name"),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new()
{
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal,
FieldName = "CreditLimit",
Width = 100,
ListOrderNo = 10,
Visible = true,
IsActive = true,
IsDeleted = false,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Country",
Width = 100,
ListOrderNo = 11,
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.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "City",
Width = 100,
ListOrderNo = 12,
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.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "District",
Width = 100,
ListOrderNo = 13,
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.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Street",
Width = 100,
ListOrderNo = 14,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.StreetValues,
CascadeRelationField = "District",
CascadeFilterOperator="=",
CascadeParentFields = "Country,City,District",
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Address1",
Width = 150,
ListOrderNo = 15,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Address2",
Width = 150,
ListOrderNo = 16,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "PostalCode",
Width = 100,
ListOrderNo = 17,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "PhoneNumber",
Width = 100,
ListOrderNo = 18,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "MobileNumber",
Width = 100,
ListOrderNo = 19,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "FaxNumber",
Width = 100,
ListOrderNo = 20,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Email",
Width = 100,
ListOrderNo = 21,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleEmailJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Website",
Width = 100,
ListOrderNo = 22,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "SupplierTypeId",
Width = 100,
ListOrderNo = 23,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new() { Key="Manufacturer", Name="Manufacturer" },
new() { Key="Distributor", Name="Distributor" },
new() { Key="Wholesaler", Name="Wholesaler" },
new() { Key="ServiceProvider", Name="ServiceProvider" },
new() { Key="Other", Name="Other" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "SupplyCardTypeId",
Width = 100,
ListOrderNo = 24,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new() { Key="Standard", Name="Standard" },
new() { Key="Premium", Name="Premium" },
new() { Key="Strategic", Name="Strategic" },
new() { Key="Preferred", Name="Preferred" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Status",
Width = 100,
ListOrderNo = 25,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
DisplayExpr = "name",
ValueExpr = "key",
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
new() { Key="Prospect", Name="Prospect" },
new() { Key="Active", Name="Active" },
new() { Key="Inactive", Name="Inactive" },
new() { Key="Blocked", Name="Blocked" },
}),
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "CardNumber",
Width = 100,
ListOrderNo = 26,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Date,
FieldName = "ValidFrom",
Width = 100,
ListOrderNo = 27,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Date,
FieldName = "ValidTo",
Width = 100,
ListOrderNo = 28,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal,
FieldName = "CurrentBalance",
Width = 100,
ListOrderNo = 29,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal,
FieldName = "DiscountRate",
Width = 100,
ListOrderNo = 30,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.Supply),
PivotSettingsJson = DefaultPivotSettingsJson
},
]);
}
#endregion
#region Material Type
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MaterialType))
{
@ -1128,7 +1818,16 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
new() { FieldName = "DiscountRate", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Aktif", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Country", FieldDbType = DbType.String, Value = "TR", CustomValueType = FieldCustomValueTypeEnum.Value },
})
}),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() {
Hint = "Manage",
Text ="Manage",
UrlTarget="_blank",
AuthName = AppCodes.SupplyChain.Supply,
Url=$"/admin/form/{ListFormCodes.Forms.FormSupply}/@Id"
},
}),
});
await _listFormFieldRepository.InsertManyAsync(
@ -1729,6 +2428,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
{
new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 0, DataField="PartnerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 1, DataField="BankName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField="AccountNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField="Iban", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
@ -2030,6 +2730,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
{
new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 0, DataField="PartnerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 1, DataField="Certificate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField="Issuer", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 3, DataField="IssueDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox },
@ -2166,6 +2867,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
{
new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[
new EditingFormItemDto { Order = 0, DataField="PartnerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 1, DataField="FullName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 2, DataField="Title", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
new EditingFormItemDto { Order = 3, DataField="Department", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox },
@ -2326,6 +3028,5 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend
#endregion
}
#endregion
}
}

View file

@ -404,6 +404,7 @@ public static class PlatformConsts
public const string FormQuestionPool = "form-questionpool";
public const string FormBank = "form-bank";
public const string FormSurvey = "form-survey";
public const string FormSupply = "form-supply";
}
public static class Lists