feat(AddFeatureFastProduct) , fix(CheckUserDiscount) , fix(SideBar)
- Add feature in fast product create dialog box - Fix user fist use discount check user - Fix sidebarsubProduct
parent
fd0f5696f4
commit
95346be5f1
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"PostgresServer": "Host=185.220.227.107;Username=vesmmehAgent;Password=g05CTjK358Vx3Eoc9satsWyVwo+15UmsA2dnCrZRUYh1pLTe;Database=NetinaShopDB;Application Name=NetinaShopApi",
|
"PostgresServer": "Host=185.220.227.246;Username=vesmmehAgent;Password=g05CTjK358Vx3Eoc9satsWyVwo+15UmsA2dnCrZRUYh1pLTe;Database=NetinaShopDB;Application Name=NetinaShopApi",
|
||||||
"Postgres": "Host=pg-0,pg-1;Username=igarsonAgent;Password=xHTpBf4wC+bBeNg2pL6Ga7VEWKFJx7VPEUpqxwPFfOc2YYTVwFQuHfsiqoVeT9+6;Database=NetinaShopDB;Load Balance Hosts=true;Target Session Attributes=primary;Application Name=iGLS",
|
"Postgres": "Host=pg-0,pg-1;Username=igarsonAgent;Password=xHTpBf4wC+bBeNg2pL6Ga7VEWKFJx7VPEUpqxwPFfOc2YYTVwFQuHfsiqoVeT9+6;Database=NetinaShopDB;Load Balance Hosts=true;Target Session Attributes=primary;Application Name=iGLS",
|
||||||
"MartenDB": "Host=pg-0,pg-1;Username=igarsonAgent;Password=xHTpBf4wC+bBeNg2pL6Ga7VEWKFJx7VPEUpqxwPFfOc2YYTVwFQuHfsiqoVeT9+6;Database=NetinaShopMartenDB;"
|
"MartenDB": "Host=pg-0,pg-1;Username=igarsonAgent;Password=xHTpBf4wC+bBeNg2pL6Ga7VEWKFJx7VPEUpqxwPFfOc2YYTVwFQuHfsiqoVeT9+6;Database=NetinaShopMartenDB;"
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<InvariantGlobalization>true</InvariantGlobalization>
|
<InvariantGlobalization>true</InvariantGlobalization>
|
||||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
<AssemblyVersion>1.0.6.7</AssemblyVersion>
|
<AssemblyVersion>1.0.7.10</AssemblyVersion>
|
||||||
<FileVersion>1.0.6.7</FileVersion>
|
<FileVersion>1.0.7.10</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -142,7 +142,7 @@ public class ExceptionHandlerMiddleware
|
||||||
});
|
});
|
||||||
|
|
||||||
if (httpStatusCode == HttpStatusCode.InternalServerError)
|
if (httpStatusCode == HttpStatusCode.InternalServerError)
|
||||||
context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
|
context.Response.StatusCode = (int)HttpStatusCode.BadRequest;
|
||||||
else
|
else
|
||||||
context.Response.StatusCode = (int)httpStatusCode;
|
context.Response.StatusCode = (int)httpStatusCode;
|
||||||
context.Response.ContentType = "application/json";
|
context.Response.ContentType = "application/json";
|
||||||
|
|
|
@ -27,8 +27,8 @@ public class CheckUserDiscountFirstUseCommandHandler : IRequestHandler<CheckUser
|
||||||
.FirstOrDefaultAsync(f => f.CustomerId == customer.Id && f.DiscountCode == request.DiscountCode,
|
.FirstOrDefaultAsync(f => f.CustomerId == customer.Id && f.DiscountCode == request.DiscountCode,
|
||||||
cancellationToken);
|
cancellationToken);
|
||||||
if (discountedUserOrder != null)
|
if (discountedUserOrder != null)
|
||||||
return true;
|
return false;
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new BaseApiException(ApiResultStatusCode.BadRequest,"UserId is wrong");
|
throw new BaseApiException(ApiResultStatusCode.BadRequest,"UserId is wrong");
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,56 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace NetinaShop.Repository.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class EditUserAddress : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_UserAddresses_Customers_CustomerId",
|
||||||
|
schema: "public",
|
||||||
|
table: "UserAddresses");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_UserAddresses_CustomerId",
|
||||||
|
schema: "public",
|
||||||
|
table: "UserAddresses");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "CustomerId",
|
||||||
|
schema: "public",
|
||||||
|
table: "UserAddresses");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "CustomerId",
|
||||||
|
schema: "public",
|
||||||
|
table: "UserAddresses",
|
||||||
|
type: "uuid",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_UserAddresses_CustomerId",
|
||||||
|
schema: "public",
|
||||||
|
table: "UserAddresses",
|
||||||
|
column: "CustomerId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_UserAddresses_Customers_CustomerId",
|
||||||
|
schema: "public",
|
||||||
|
table: "UserAddresses",
|
||||||
|
column: "CustomerId",
|
||||||
|
principalSchema: "public",
|
||||||
|
principalTable: "Customers",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1405,9 +1405,6 @@ namespace NetinaShop.Repository.Migrations
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<Guid?>("CustomerId")
|
|
||||||
.HasColumnType("uuid");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRemoved")
|
b.Property<bool>("IsRemoved")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
@ -1456,8 +1453,6 @@ namespace NetinaShop.Repository.Migrations
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("CustomerId");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
b.ToTable("UserAddresses", "public");
|
b.ToTable("UserAddresses", "public");
|
||||||
|
@ -1874,12 +1869,8 @@ namespace NetinaShop.Repository.Migrations
|
||||||
|
|
||||||
modelBuilder.Entity("Netina.Domain.Entities.Users.UserAddress", b =>
|
modelBuilder.Entity("Netina.Domain.Entities.Users.UserAddress", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Netina.Domain.Entities.Users.Customer", null)
|
|
||||||
.WithMany("Addresses")
|
|
||||||
.HasForeignKey("CustomerId");
|
|
||||||
|
|
||||||
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", "User")
|
b.HasOne("Netina.Domain.Entities.Users.ApplicationUser", "User")
|
||||||
.WithMany()
|
.WithMany("Addresses")
|
||||||
.HasForeignKey("UserId")
|
.HasForeignKey("UserId")
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
|
@ -2019,6 +2010,8 @@ namespace NetinaShop.Repository.Migrations
|
||||||
|
|
||||||
modelBuilder.Entity("Netina.Domain.Entities.Users.ApplicationUser", b =>
|
modelBuilder.Entity("Netina.Domain.Entities.Users.ApplicationUser", b =>
|
||||||
{
|
{
|
||||||
|
b.Navigation("Addresses");
|
||||||
|
|
||||||
b.Navigation("Customer");
|
b.Navigation("Customer");
|
||||||
|
|
||||||
b.Navigation("Manager");
|
b.Navigation("Manager");
|
||||||
|
@ -2026,11 +2019,6 @@ namespace NetinaShop.Repository.Migrations
|
||||||
b.Navigation("Marketer");
|
b.Navigation("Marketer");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Netina.Domain.Entities.Users.Customer", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Addresses");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Netina.Domain.Entities.Users.Marketer", b =>
|
modelBuilder.Entity("Netina.Domain.Entities.Users.Marketer", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Discount");
|
b.Navigation("Discount");
|
||||||
|
|
Loading…
Reference in New Issue