diff --git a/api/src/Kurs.Platform.Application/Public/PublicAppService.cs b/api/src/Kurs.Platform.Application/Public/PublicAppService.cs index 403d732f..ad49f8e7 100644 --- a/api/src/Kurs.Platform.Application/Public/PublicAppService.cs +++ b/api/src/Kurs.Platform.Application/Public/PublicAppService.cs @@ -222,7 +222,9 @@ public class PublicAppService : PlatformAppService { var entity = new Order() { - TenantId = input.Tenant.Id, + Name = input.Tenant.Name, + IsActive = input.Tenant.IsActive, + OrganizationName = input.Tenant.OrganizationName, Founder = input.Tenant.Founder, VknTckn = input.Tenant.VknTckn, @@ -238,6 +240,7 @@ public class PublicAppService : PlatformAppService Fax = input.Tenant.Fax, Email = input.Tenant.Email, Website = input.Tenant.Website, + MenuGroup = input.Tenant.MenuGroup, Subtotal = input.Subtotal, Commission = input.Commission, diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs index b6117c29..4cdaa825 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs @@ -13625,7 +13625,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency Name = AppCodes.Orders.PurchaseOrders, Title = AppCodes.Orders.PurchaseOrders, DataSourceCode = SeedConsts.DataSources.DefaultCode, - IsTenant = false, + IsTenant = true, IsBranch = false, IsOrganizationUnit = false, Description = AppCodes.Orders.PurchaseOrders, diff --git a/api/src/Kurs.Platform.Domain/Entities/Tenant/Public/Order.cs b/api/src/Kurs.Platform.Domain/Entities/Tenant/Public/Order.cs index a38ed767..58e2519d 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Tenant/Public/Order.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Tenant/Public/Order.cs @@ -9,6 +9,9 @@ public class Order : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } + public string Name { get; set; } + public bool IsActive { get; set; } + public string OrganizationName { get; set; } public string Founder { get; set; } public long VknTckn { get; set; } @@ -24,6 +27,7 @@ public class Order : FullAuditedEntity, IMultiTenant public string Fax { get; set; } public string Email { get; set; } public string Website { get; set; } + public string MenuGroup { get; set; } public List Items { get; set; } = new(); public decimal Subtotal { get; set; } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index 47af45ee..88c8faf2 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -1377,6 +1377,7 @@ public class PlatformDbContext : b.ToTable(Prefix.DbTableWeb + nameof(Order), Prefix.DbSchema); b.ConfigureByConvention(); + b.Property(o => o.Name).HasMaxLength(64); b.Property(o => o.OrganizationName).HasMaxLength(128); b.Property(o => o.Founder).HasMaxLength(128); b.Property(o => o.TaxOffice).HasMaxLength(128); @@ -1388,6 +1389,7 @@ public class PlatformDbContext : b.Property(o => o.PostalCode).HasMaxLength(16); b.Property(o => o.Email).HasMaxLength(128); b.Property(o => o.Website).HasMaxLength(128); + b.Property(o => o.MenuGroup).HasMaxLength(64); b.Property(o => o.Subtotal).IsRequired().HasPrecision(18, 2); b.Property(o => o.Commission).IsRequired().HasPrecision(18, 2); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251012075048_Initial.Designer.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251013062624_Initial.Designer.cs similarity index 99% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251012075048_Initial.Designer.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251013062624_Initial.Designer.cs index a19e3b54..3d08fe6f 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251012075048_Initial.Designer.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251013062624_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251012075048_Initial")] + [Migration("20251013062624_Initial")] partial class Initial { /// @@ -4643,6 +4643,9 @@ namespace Kurs.Platform.Migrations b.Property("Installment") .HasColumnType("int"); + b.Property("IsActive") + .HasColumnType("bit"); + b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -4657,9 +4660,17 @@ namespace Kurs.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("MenuGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Mobile") .HasColumnType("nvarchar(max)"); + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("OrganizationName") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251012075048_Initial.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251013062624_Initial.cs similarity index 99% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251012075048_Initial.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251013062624_Initial.cs index 066fba37..d13ca453 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251012075048_Initial.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251013062624_Initial.cs @@ -1934,6 +1934,8 @@ namespace Kurs.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsActive = table.Column(type: "bit", nullable: false), OrganizationName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Founder = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), VknTckn = table.Column(type: "bigint", nullable: false), @@ -1949,6 +1951,7 @@ namespace Kurs.Platform.Migrations Fax = table.Column(type: "nvarchar(max)", nullable: true), Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Website = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + MenuGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Subtotal = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), Commission = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), Total = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 57c726b0..cbc82249 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -4640,6 +4640,9 @@ namespace Kurs.Platform.Migrations b.Property("Installment") .HasColumnType("int"); + b.Property("IsActive") + .HasColumnType("bit"); + b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -4654,9 +4657,17 @@ namespace Kurs.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("MenuGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Mobile") .HasColumnType("nvarchar(max)"); + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("OrganizationName") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); diff --git a/ui/src/components/orders/TenantForm.tsx b/ui/src/components/orders/TenantForm.tsx index 509bf48e..f08d7d4c 100644 --- a/ui/src/components/orders/TenantForm.tsx +++ b/ui/src/components/orders/TenantForm.tsx @@ -65,6 +65,7 @@ export const TenantForm: React.FC = ({ onSubmit }) => { fax: tenant.data.fax, email: tenant.data.email, website: tenant.data.website, + menuGroup: tenant.data.menuGroup, })) } catch (error) { console.error('Kurum bilgisi alınırken hata:', error)