added worker client app, splitted controllers in back, fixed model and migrations, fixed contracts, added ability to add furniture modules in set in SetLogic
This commit is contained in:
parent
4f761b8a9b
commit
27da6a9552
@ -13,7 +13,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FurnitureAssembly", "Furnit
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FurnitureAssemblyBusinessLogic", "FurnitureAssemblyBusinessLogic\FurnitureAssemblyBusinessLogic.csproj", "{D7934CFF-BB47-4F7A-8B6D-2FF213542B5B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FurnitureAssemblyRestApi", "FurnitureAssemblyRestApi\FurnitureAssemblyRestApi.csproj", "{61874779-CE96-475E-A17B-69F86C1C5A85}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FurnitureAssemblyRestApi", "FurnitureAssemblyRestApi\FurnitureAssemblyRestApi.csproj", "{61874779-CE96-475E-A17B-69F86C1C5A85}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FurnitureAssemblyWorkerClientApp", "FurnitureAssemblyWorkerClientApp\FurnitureAssemblyWorkerClientApp.csproj", "{151EC2A5-A4AC-47E6-9A53-C8F3803E392F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -45,6 +47,10 @@ Global
|
||||
{61874779-CE96-475E-A17B-69F86C1C5A85}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{61874779-CE96-475E-A17B-69F86C1C5A85}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{61874779-CE96-475E-A17B-69F86C1C5A85}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{151EC2A5-A4AC-47E6-9A53-C8F3803E392F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{151EC2A5-A4AC-47E6-9A53-C8F3803E392F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{151EC2A5-A4AC-47E6-9A53-C8F3803E392F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{151EC2A5-A4AC-47E6-9A53-C8F3803E392F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -3,6 +3,7 @@ using FurnitureAssemblyContracts.BusinessLogicContracts;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
using FurnitureAssemblyContracts.StorageContracts;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDataModels.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -108,5 +109,45 @@ namespace FurnitureAssemblyBusinessLogic.BusinessLogics
|
||||
throw new InvalidOperationException("Гарнитур с таким названием уже есть");
|
||||
}
|
||||
}
|
||||
public bool AddFurnitureModuleInSet(SetSearchModel model, IFurnitureModuleModel furnitureModule, int count)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(model));
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
throw new ArgumentException("Количество мебельных модулей должно быть больше 0", nameof(count));
|
||||
}
|
||||
_logger.LogInformation("AddFurnitureModuleInSet. Name:{Name}. Id:{Id}", model.Name, model.Id);
|
||||
var set = _SetStorage.GetElement(model);
|
||||
if (set == null)
|
||||
{
|
||||
_logger.LogWarning("AddManufactureInShop element not found");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (set.SetFurnitureModules.ContainsKey(furnitureModule.Id))
|
||||
{
|
||||
set.SetFurnitureModules[furnitureModule.Id] = (furnitureModule, count + set.SetFurnitureModules[furnitureModule.Id].Item2);
|
||||
_logger.LogInformation("AddManufactureInShop. Added {count} {manufacture} to '{ShopName}' shop",
|
||||
count, furnitureModule.Name, set.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
set.SetFurnitureModules[furnitureModule.Id] = (furnitureModule, count);
|
||||
_logger.LogInformation("AddManufactureInShop. Added {count} new manufacture {manufacture} to '{ShopName}' shop",
|
||||
count, furnitureModule.Name, set.Name);
|
||||
}
|
||||
_SetStorage.Update(new()
|
||||
{
|
||||
Id = set.Id,
|
||||
Name = set.Name,
|
||||
Cost = set.Cost,
|
||||
DateCreate = set.DateCreate,
|
||||
SetFurnitureModules = set.SetFurnitureModules
|
||||
});
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
using FurnitureAssemblyContracts.BindingModels;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -15,6 +16,7 @@ namespace FurnitureAssemblyContracts.BusinessLogicContracts
|
||||
SetViewModel? ReadElement(SetSearchModel model);
|
||||
bool Create(SetBindingModel model);
|
||||
bool Update(SetBindingModel model);
|
||||
bool AddFurnitureModuleInSet(SetSearchModel model, IFurnitureModuleModel furnitureModule, int count);
|
||||
bool Delete(SetBindingModel model);
|
||||
}
|
||||
}
|
||||
|
@ -18,8 +18,6 @@ namespace FurnitureAssemblyContracts.ViewModels
|
||||
[DisplayName("Дата создания")]
|
||||
public DateTime DateCreate { get; set; }
|
||||
public int UserId { get; set; }
|
||||
[DisplayName("Изготовитель")]
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public Dictionary<int, (IFurnitureModel, int)> FurnitureModuleFurnitures { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
@ -18,5 +18,16 @@ namespace FurnitureAssemblyContracts.ViewModels
|
||||
[DisplayName("Количество")]
|
||||
public int Count { get; set; }
|
||||
public int OrderInfoId { get; set; }
|
||||
[DisplayName("Имя заказчика")]
|
||||
public string CustomerName { get; set; } = string.Empty;
|
||||
[DisplayName("Тип оплаты")]
|
||||
public PaymentType PaymentType { get; set; } = PaymentType.Неизвестен;
|
||||
[DisplayName("Дата создания")]
|
||||
public DateTime DateCreate { get; set; }
|
||||
[DisplayName("Сумма")]
|
||||
public double Sum { get; set; }
|
||||
public int UserId { get; set; }
|
||||
[DisplayName("Менеджер")]
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -18,8 +18,6 @@ namespace FurnitureAssemblyContracts.ViewModels
|
||||
[DisplayName("Дата создания")]
|
||||
public DateTime DateCreate { get; set; }
|
||||
public int UserId { get; set; }
|
||||
[DisplayName("Менеджер")]
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public Dictionary<int, (IFurnitureModuleModel, int)> SetFurnitureModules { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
{
|
||||
var deletedElement = context.Orders
|
||||
.Include(x => x.Set)
|
||||
.Include(x => x.OrderInfoId)
|
||||
.Include(x => x.OrderInfo)
|
||||
.FirstOrDefault(x => x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
context.Orders.Remove(element);
|
||||
@ -40,7 +40,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
using var context = new FurnitureAssemblyDatabase();
|
||||
return context.Orders
|
||||
.Include(x => x.Set)
|
||||
.Include(x => x.OrderInfoId)
|
||||
.Include(x => x.OrderInfo)
|
||||
.FirstOrDefault(x => model.Id.HasValue && x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
@ -51,7 +51,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
{
|
||||
return context.Orders
|
||||
.Include(x => x.Set)
|
||||
.Include(x => x.OrderInfoId)
|
||||
.Include(x => x.OrderInfo)
|
||||
.Where(x => x.Id == model.Id)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
@ -60,7 +60,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
{
|
||||
return context.Orders
|
||||
.Include(x => x.Set)
|
||||
.Include(x => x.OrderInfoId)
|
||||
.Include(x => x.OrderInfo)
|
||||
.Where(x => x.SetId == model.SetId && model.OrderInfoId.Contains(x.OrderInfoId))
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
@ -69,7 +69,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
{
|
||||
return context.Orders
|
||||
.Include(x => x.Set)
|
||||
.Include(x => x.OrderInfoId)
|
||||
.Include(x => x.OrderInfo)
|
||||
.Where(x => x.SetId == model.SetId)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
@ -78,7 +78,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
{
|
||||
return context.Orders
|
||||
.Include(x => x.Set)
|
||||
.Include(x => x.OrderInfoId)
|
||||
.Include(x => x.OrderInfo)
|
||||
.Where(x => model.OrderInfoId.Contains(x.OrderInfoId))
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
@ -93,7 +93,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
using var context = new FurnitureAssemblyDatabase();
|
||||
return context.Orders
|
||||
.Include(x => x.Set)
|
||||
.Include(x => x.OrderInfoId)
|
||||
.Include(x => x.OrderInfo)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
@ -109,7 +109,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
context.SaveChanges();
|
||||
return context.Orders
|
||||
.Include(x => x.Set)
|
||||
.Include(x => x.OrderInfoId)
|
||||
.Include(x => x.OrderInfo)
|
||||
.FirstOrDefault(x => x.Id == newOrder.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
@ -125,7 +125,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
context.SaveChanges();
|
||||
return context.Orders
|
||||
.Include(x => x.Set)
|
||||
.Include(x => x.OrderInfoId)
|
||||
.Include(x => x.OrderInfo)
|
||||
.FirstOrDefault(x => x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
if (element != null)
|
||||
{
|
||||
var deletedElement = context.Roles
|
||||
.Include(x => x.Users)
|
||||
.FirstOrDefault(x => x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
context.Roles.Remove(element);
|
||||
@ -37,6 +38,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
}
|
||||
using var context = new FurnitureAssemblyDatabase();
|
||||
return context.Roles
|
||||
.Include(x => x.Users)
|
||||
.FirstOrDefault(x => model.Id.HasValue && x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
@ -46,6 +48,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
if (model.Id.HasValue)
|
||||
{
|
||||
return context.Roles
|
||||
.Include(x => x.Users)
|
||||
.Where(x => x.Id == model.Id)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
@ -59,6 +62,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
{
|
||||
using var context = new FurnitureAssemblyDatabase();
|
||||
return context.Roles
|
||||
.Include(x => x.Users)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
@ -73,6 +77,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
context.Roles.Add(newRole);
|
||||
context.SaveChanges();
|
||||
return context.Roles
|
||||
.Include(x => x.Users)
|
||||
.FirstOrDefault(x => x.Id == newRole.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
@ -87,6 +92,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
role.Update(model);
|
||||
context.SaveChanges();
|
||||
return context.Roles
|
||||
.Include(x => x.Users)
|
||||
.FirstOrDefault(x => x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ using FurnitureAssemblyContracts.StorageContracts;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDatabaseImplement.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -27,6 +28,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
.Include(x => x.FurnitureModules)
|
||||
.Include(x => x.Furnitures)
|
||||
.Include(x => x.Materials)
|
||||
.Include(x => x.Role)
|
||||
.FirstOrDefault(x => x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
context.Users.Remove(element);
|
||||
@ -37,20 +39,37 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
}
|
||||
public UserViewModel? GetElement(UserSearchModel model)
|
||||
{
|
||||
if (!model.Id.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
using var context = new FurnitureAssemblyDatabase();
|
||||
if (model.Id.HasValue)
|
||||
{
|
||||
return context.Users
|
||||
.Include(x => x.Sets)
|
||||
.Include(x => x.Orders)
|
||||
.Include(x => x.FurnitureModules)
|
||||
.Include(x => x.Furnitures)
|
||||
.Include(x => x.Materials)
|
||||
.FirstOrDefault(x => model.Id.HasValue && x.Id == model.Id)
|
||||
.Include(x => x.Role)
|
||||
.FirstOrDefault(x => x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
else if (!model.Login.IsNullOrEmpty() && !model.Password.IsNullOrEmpty())
|
||||
{
|
||||
return context.Users
|
||||
.Include(x => x.Sets)
|
||||
.Include(x => x.Orders)
|
||||
.Include(x => x.FurnitureModules)
|
||||
.Include(x => x.Furnitures)
|
||||
.Include(x => x.Materials)
|
||||
.Include(x => x.Role)
|
||||
.FirstOrDefault(x => model.Login == x.Login && x.Password == model.Password)
|
||||
?.GetViewModel;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
public List<UserViewModel> GetFilteredList(UserSearchModel model)
|
||||
{
|
||||
using var context = new FurnitureAssemblyDatabase();
|
||||
@ -62,6 +81,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
.Include(x => x.FurnitureModules)
|
||||
.Include(x => x.Furnitures)
|
||||
.Include(x => x.Materials)
|
||||
.Include(x => x.Role)
|
||||
.Where(x => x.Login.Contains(model.Login))
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
@ -77,6 +97,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
.Include(x => x.FurnitureModules)
|
||||
.Include(x => x.Furnitures)
|
||||
.Include(x => x.Materials)
|
||||
.Include(x => x.Role)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
@ -96,6 +117,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
.Include(x => x.FurnitureModules)
|
||||
.Include(x => x.Furnitures)
|
||||
.Include(x => x.Materials)
|
||||
.Include(x => x.Role)
|
||||
.FirstOrDefault(x => x.Id == newUser.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
@ -115,6 +137,7 @@ namespace FurnitureAssemblyDatabaseImplement.Implements
|
||||
.Include(x => x.FurnitureModules)
|
||||
.Include(x => x.Furnitures)
|
||||
.Include(x => x.Materials)
|
||||
.Include(x => x.Role)
|
||||
.FirstOrDefault(x => x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
}
|
||||
|
@ -0,0 +1,549 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using FurnitureAssemblyDatabaseImplement;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FurnitureAssemblyDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(FurnitureAssemblyDatabase))]
|
||||
[Migration("20230516173056_OneMoreMigration")]
|
||||
partial class OneMoreMigration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.5")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Furniture", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<double>("Cost")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<DateTime>("DateCreate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Furnitures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.FurnitureMaterial", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("FurnitureId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("MaterialId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FurnitureId");
|
||||
|
||||
b.HasIndex("MaterialId");
|
||||
|
||||
b.ToTable("FurnitureMaterials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.FurnitureModule", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<double>("Cost")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<DateTime>("DateCreate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("FurnitureModules");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.FurnitureModuleFurniture", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("FurnitureId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("FurnitureModuleId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FurnitureId");
|
||||
|
||||
b.HasIndex("FurnitureModuleId");
|
||||
|
||||
b.ToTable("FurnitureModuleFurnitures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Material", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<double>("Cost")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("ScopeId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ScopeId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Materials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Order", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("OrderInfoId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SetId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrderInfoId");
|
||||
|
||||
b.HasIndex("SetId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Orders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.OrderInfo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("CustomerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("DateCreate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("PaymentType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<double>("Sum")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("OrderInfos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Role", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Roles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Scope", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Scopes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Set", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<double>("Cost")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<DateTime>("DateCreate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Sets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.SetFurnitureModule", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("FurnitureModuleId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SetId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FurnitureModuleId");
|
||||
|
||||
b.HasIndex("SetId");
|
||||
|
||||
b.ToTable("SetFurnitureModules");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Login")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("RoleId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Furniture", b =>
|
||||
{
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.User", "User")
|
||||
.WithMany("Furnitures")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.FurnitureMaterial", b =>
|
||||
{
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Furniture", "Furniture")
|
||||
.WithMany("Materials")
|
||||
.HasForeignKey("FurnitureId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Material", "Material")
|
||||
.WithMany("FurnitureMaterials")
|
||||
.HasForeignKey("MaterialId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Furniture");
|
||||
|
||||
b.Navigation("Material");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.FurnitureModule", b =>
|
||||
{
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.User", "User")
|
||||
.WithMany("FurnitureModules")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.FurnitureModuleFurniture", b =>
|
||||
{
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Furniture", "Furniture")
|
||||
.WithMany()
|
||||
.HasForeignKey("FurnitureId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.FurnitureModule", "FurnitureModule")
|
||||
.WithMany("Furnitures")
|
||||
.HasForeignKey("FurnitureModuleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Furniture");
|
||||
|
||||
b.Navigation("FurnitureModule");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Material", b =>
|
||||
{
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Scope", "Scope")
|
||||
.WithMany("Materials")
|
||||
.HasForeignKey("ScopeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.User", "User")
|
||||
.WithMany("Materials")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Scope");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Order", b =>
|
||||
{
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.OrderInfo", "OrderInfo")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderInfoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Set", "Set")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("SetId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.User", null)
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("OrderInfo");
|
||||
|
||||
b.Navigation("Set");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.OrderInfo", b =>
|
||||
{
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Set", b =>
|
||||
{
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.User", "User")
|
||||
.WithMany("Sets")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.SetFurnitureModule", b =>
|
||||
{
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.FurnitureModule", "FurnitureModule")
|
||||
.WithMany("Sets")
|
||||
.HasForeignKey("FurnitureModuleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Set", "Set")
|
||||
.WithMany("FurnitureModules")
|
||||
.HasForeignKey("SetId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("FurnitureModule");
|
||||
|
||||
b.Navigation("Set");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.User", b =>
|
||||
{
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Role", "Role")
|
||||
.WithMany("Users")
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Role");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Furniture", b =>
|
||||
{
|
||||
b.Navigation("Materials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.FurnitureModule", b =>
|
||||
{
|
||||
b.Navigation("Furnitures");
|
||||
|
||||
b.Navigation("Sets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Material", b =>
|
||||
{
|
||||
b.Navigation("FurnitureMaterials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Role", b =>
|
||||
{
|
||||
b.Navigation("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Scope", b =>
|
||||
{
|
||||
b.Navigation("Materials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Set", b =>
|
||||
{
|
||||
b.Navigation("FurnitureModules");
|
||||
|
||||
b.Navigation("Orders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.User", b =>
|
||||
{
|
||||
b.Navigation("FurnitureModules");
|
||||
|
||||
b.Navigation("Furnitures");
|
||||
|
||||
b.Navigation("Materials");
|
||||
|
||||
b.Navigation("Orders");
|
||||
|
||||
b.Navigation("Sets");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FurnitureAssemblyDatabaseImplement.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class OneMoreMigration : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Orders_OrderInfoId",
|
||||
table: "Orders",
|
||||
column: "OrderInfoId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Orders_OrderInfos_OrderInfoId",
|
||||
table: "Orders",
|
||||
column: "OrderInfoId",
|
||||
principalTable: "OrderInfos",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Orders_OrderInfos_OrderInfoId",
|
||||
table: "Orders");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Orders_OrderInfoId",
|
||||
table: "Orders");
|
||||
}
|
||||
}
|
||||
}
|
@ -182,6 +182,8 @@ namespace FurnitureAssemblyDatabaseImplement.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrderInfoId");
|
||||
|
||||
b.HasIndex("SetId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
@ -419,6 +421,12 @@ namespace FurnitureAssemblyDatabaseImplement.Migrations
|
||||
|
||||
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Order", b =>
|
||||
{
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.OrderInfo", "OrderInfo")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderInfoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Set", "Set")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("SetId")
|
||||
@ -429,6 +437,8 @@ namespace FurnitureAssemblyDatabaseImplement.Migrations
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.Navigation("OrderInfo");
|
||||
|
||||
b.Navigation("Set");
|
||||
});
|
||||
|
||||
|
@ -55,7 +55,7 @@ namespace FurnitureAssemblyDatabaseImplement.Models
|
||||
Id = model.Id,
|
||||
Name = model.Name,
|
||||
Cost = model.Cost,
|
||||
DateCreate = model.DateCreate,
|
||||
DateCreate = DateTime.Now.ToUniversalTime(),
|
||||
UserId = model.UserId,
|
||||
Furnitures = model.FurnitureModuleFurnitures.Select(x => new FurnitureModuleFurniture
|
||||
{
|
||||
@ -80,7 +80,6 @@ namespace FurnitureAssemblyDatabaseImplement.Models
|
||||
Cost = Cost,
|
||||
DateCreate = DateCreate,
|
||||
UserId = UserId,
|
||||
UserName = User.Name,
|
||||
FurnitureModuleFurnitures = FurnitureModuleFurnitures
|
||||
};
|
||||
public void UpdateFurnitures(FurnitureAssemblyDatabase context, FurnitureModuleBindingModel model)
|
||||
|
@ -4,6 +4,7 @@ using FurnitureAssemblyDataModels.Enums;
|
||||
using FurnitureAssemblyDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -21,6 +22,7 @@ namespace FurnitureAssemblyDatabaseImplement.Models
|
||||
public int Count { get; set; }
|
||||
[Required]
|
||||
public int OrderInfoId { get; set; }
|
||||
public virtual OrderInfo OrderInfo { get; set; }
|
||||
public static Order? Create(OrderBindingModel? model)
|
||||
{
|
||||
if (model == null)
|
||||
@ -51,7 +53,13 @@ namespace FurnitureAssemblyDatabaseImplement.Models
|
||||
SetId = SetId,
|
||||
SetName = Set.Name,
|
||||
Count = Count,
|
||||
OrderInfoId = OrderInfoId
|
||||
OrderInfoId = OrderInfoId,
|
||||
CustomerName = OrderInfo.CustomerName,
|
||||
PaymentType = OrderInfo.PaymentType,
|
||||
DateCreate = OrderInfo.DateCreate,
|
||||
Sum = OrderInfo.Sum,
|
||||
UserId = OrderInfo.UserId,
|
||||
UserName = OrderInfo.User.Name
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ namespace FurnitureAssemblyDatabaseImplement.Models
|
||||
CustomerName = model.CustomerName,
|
||||
PaymentType = model.PaymentType,
|
||||
Sum = model.Sum,
|
||||
DateCreate = model.DateCreate,
|
||||
DateCreate = DateTime.Now.ToUniversalTime(),
|
||||
UserId = model.UserId
|
||||
};
|
||||
}
|
||||
|
@ -20,10 +20,9 @@ namespace FurnitureAssemblyDatabaseImplement.Models
|
||||
[Required]
|
||||
public double Cost { get; set; }
|
||||
[Required]
|
||||
public DateTime DateCreate { get; set; }
|
||||
public DateTime DateCreate { get; set; } = DateTime.Now;
|
||||
[Required]
|
||||
public int UserId { get; set; }
|
||||
public virtual User User { get; set; }
|
||||
public Dictionary<int, (IFurnitureModuleModel, int)>? _setFurnitureModules = null;
|
||||
[NotMapped]
|
||||
public Dictionary<int, (IFurnitureModuleModel, int)> SetFurnitureModules
|
||||
@ -43,6 +42,7 @@ namespace FurnitureAssemblyDatabaseImplement.Models
|
||||
public virtual List<SetFurnitureModule> FurnitureModules { get; set; } = new();
|
||||
[ForeignKey("SetId")]
|
||||
public virtual List<Order> Orders { get; set; } = new();
|
||||
public virtual User User { get; set; }
|
||||
public static Set Create(FurnitureAssemblyDatabase context, SetBindingModel model)
|
||||
{
|
||||
return new Set()
|
||||
@ -50,7 +50,8 @@ namespace FurnitureAssemblyDatabaseImplement.Models
|
||||
Id = model.Id,
|
||||
Name = model.Name,
|
||||
Cost = model.Cost,
|
||||
DateCreate = model.DateCreate,
|
||||
DateCreate = DateTime.Now.ToUniversalTime(),
|
||||
UserId = model.UserId,
|
||||
FurnitureModules = model.SetFurnitureModules.Select(x => new SetFurnitureModule
|
||||
{
|
||||
FurnitureModule = context.FurnitureModules.First(y => y.Id == x.Key),
|
||||
@ -66,6 +67,7 @@ namespace FurnitureAssemblyDatabaseImplement.Models
|
||||
}
|
||||
Name = model.Name;
|
||||
Cost = model.Cost;
|
||||
DateCreate = model.DateCreate;
|
||||
}
|
||||
public SetViewModel GetViewModel => new()
|
||||
{
|
||||
@ -74,7 +76,6 @@ namespace FurnitureAssemblyDatabaseImplement.Models
|
||||
Cost = Cost,
|
||||
DateCreate = DateCreate,
|
||||
UserId = UserId,
|
||||
UserName = User.Name,
|
||||
SetFurnitureModules = SetFurnitureModules
|
||||
};
|
||||
public void UpdateFurnitureModules(FurnitureAssemblyDatabase context, SetBindingModel model)
|
||||
|
@ -0,0 +1,90 @@
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using FurnitureAssemblyContracts.BindingModels;
|
||||
using FurnitureAssemblyContracts.BusinessLogicContracts;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDatabaseImplement.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FurnitureAssemblyRestApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class FurnitureController : Controller
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IFurnitureLogic _furniture;
|
||||
public FurnitureController(ILogger<FurnitureController> logger, IFurnitureLogic furniture)
|
||||
{
|
||||
_logger = logger;
|
||||
_furniture = furniture;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public List<FurnitureViewModel>? GetFurnitureList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _furniture.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка мебели");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public FurnitureViewModel? GetFurniture(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _furniture.ReadElement(new FurnitureSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения мебели по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddFurniture(FurnitureBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_furniture.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания мебели");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateFurniture(FurnitureBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_furniture.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления мебели");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void DeleteFurniture(FurnitureBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_furniture.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления мебели");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using FurnitureAssemblyContracts.BindingModels;
|
||||
using FurnitureAssemblyContracts.BusinessLogicContracts;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDatabaseImplement.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FurnitureAssemblyRestApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class FurnitureModuleController : Controller
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IFurnitureModuleLogic _furnitureModule;
|
||||
public FurnitureModuleController(ILogger<FurnitureModuleController> logger, IFurnitureModuleLogic furnitureModule)
|
||||
{
|
||||
_logger = logger;
|
||||
_furnitureModule = furnitureModule;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public List<FurnitureModuleViewModel>? GetFurnitureModuleList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _furnitureModule.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка мебельных модулей");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public FurnitureModuleViewModel? GetFurnitureModule(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _furnitureModule.ReadElement(new FurnitureModuleSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения мебельного модуля по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddFurnitureModule(FurnitureModuleBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_furnitureModule.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateFurnitureModule(FurnitureModuleBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_furnitureModule.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void DeleteFurnitureModule(FurnitureModuleBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_furnitureModule.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,650 +0,0 @@
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using FurnitureAssemblyContracts.BindingModels;
|
||||
using FurnitureAssemblyContracts.BusinessLogicContracts;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDatabaseImplement.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FurnitureAssemblyRestApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class MainController : Controller
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IFurnitureLogic _furniture;
|
||||
private readonly IFurnitureModuleLogic _furnitureModule;
|
||||
private readonly IMaterialLogic _material;
|
||||
private readonly IOrderInfoLogic _orderInfo;
|
||||
private readonly IOrderLogic _order;
|
||||
private readonly IRoleLogic _role;
|
||||
private readonly IScopeLogic _scope;
|
||||
private readonly ISetLogic _set;
|
||||
private readonly IUserLogic _user;
|
||||
public MainController(ILogger<MainController> logger,
|
||||
IFurnitureLogic furniture,
|
||||
IFurnitureModuleLogic furnitureModule,
|
||||
IMaterialLogic material,
|
||||
IOrderInfoLogic orderInfo,
|
||||
IOrderLogic order,
|
||||
IRoleLogic role,
|
||||
IScopeLogic scope,
|
||||
ISetLogic set,
|
||||
IUserLogic user)
|
||||
{
|
||||
_logger = logger;
|
||||
_furniture = furniture;
|
||||
_furnitureModule = furnitureModule;
|
||||
_material = material;
|
||||
_orderInfo = orderInfo;
|
||||
_order = order;
|
||||
_role = role;
|
||||
_scope = scope;
|
||||
_set = set;
|
||||
_user = user;
|
||||
}
|
||||
[HttpGet]
|
||||
public List<FurnitureViewModel>? GetFurnitureList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _furniture.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка мебели");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public FurnitureViewModel? GetFurniture(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _furniture.ReadElement(new FurnitureSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения мебели по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddFurniture(FurnitureBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_furniture.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания мебели");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPut]
|
||||
public void UpdateFurniture(FurnitureBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_furniture.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления мебели");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpDelete]
|
||||
public void DeleteFurniture(FurnitureBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_furniture.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления мебели");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public List<FurnitureModuleViewModel>? GetFurnitureModuleList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _furnitureModule.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка мебельных модулей");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public FurnitureModuleViewModel? GetFurnitureModule(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _furnitureModule.ReadElement(new FurnitureModuleSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения мебельного модуля по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddFurnitureModule(FurnitureModuleBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_furnitureModule.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPut]
|
||||
public void UpdateFurnitureModule(FurnitureModuleBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_furnitureModule.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpDelete]
|
||||
public void DeleteFurnitureModule(FurnitureModuleBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_furnitureModule.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public List<MaterialViewModel>? GetMaterialList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _material.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка материалов");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public MaterialViewModel? GetMaterial(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _material.ReadElement(new MaterialSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения материала по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddMaterial(MaterialBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_material.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPut]
|
||||
public void UpdateMaterial(MaterialBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_material.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpDelete]
|
||||
public void DeleteMaterial(MaterialBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_material.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public List<OrderViewModel>? GetOrderList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _order.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка материалов");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public OrderViewModel? GetOrder(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _order.ReadElement(new OrderSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения материала по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddOrder(OrderBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_order.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPut]
|
||||
public void UpdateOrder(OrderBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_order.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpDelete]
|
||||
public void DeleteOrder(OrderBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_order.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public List<OrderInfoViewModel>? GetOrderInfoList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _orderInfo.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка материалов");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public OrderInfoViewModel? GetOrderInfo(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _orderInfo.ReadElement(new OrderInfoSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения материала по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddOrderInfo(OrderInfoBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_orderInfo.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPut]
|
||||
public void UpdateOrderInfo(OrderInfoBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_orderInfo.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpDelete]
|
||||
public void DeleteOrderInfo(OrderInfoBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_orderInfo.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public List<RoleViewModel>? GetRoleList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _role.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка материалов");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public RoleViewModel? GetRole(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _role.ReadElement(new RoleSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения материала по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddRole(RoleBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_role.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPut]
|
||||
public void UpdateRole(RoleBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_role.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpDelete]
|
||||
public void DeleteRole(RoleBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_role.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public List<ScopeViewModel>? GetScopeList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _scope.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка материалов");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public ScopeViewModel? GetScope(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _scope.ReadElement(new ScopeSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения материала по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddScope(ScopeBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_scope.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPut]
|
||||
public void UpdateScope(ScopeBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_scope.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpDelete]
|
||||
public void DeleteScope(ScopeBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_scope.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public List<SetViewModel>? GetSetList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _set.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка материалов");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public SetViewModel? GetSet(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _set.ReadElement(new SetSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения материала по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddSet(SetBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_set.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPut]
|
||||
public void UpdateSet(SetBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_set.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpDelete]
|
||||
public void DeleteSet(SetBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_set.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public List<UserViewModel>? GetUserList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _user.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка материалов");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public UserViewModel? GetUser(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _user.ReadElement(new UserSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения материала по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddUser(UserBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_user.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPut]
|
||||
public void UpdateUser(UserBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_user.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpDelete]
|
||||
public void DeleteUser(UserBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_user.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления материала");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using FurnitureAssemblyContracts.BindingModels;
|
||||
using FurnitureAssemblyContracts.BusinessLogicContracts;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDatabaseImplement.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FurnitureAssemblyRestApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class MaterialController : Controller
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IMaterialLogic _material;
|
||||
public MaterialController(ILogger<MaterialController> logger, IMaterialLogic material)
|
||||
{
|
||||
_logger = logger;
|
||||
_material = material;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public List<MaterialViewModel>? GetMaterialList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _material.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка мебельных модулей");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public MaterialViewModel? GetMaterial(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _material.ReadElement(new MaterialSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения мебельного модуля по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddMaterial(MaterialBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_material.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateMaterial(MaterialBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_material.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void DeleteMaterial(MaterialBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_material.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
using DocumentFormat.OpenXml.Drawing.Charts;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using FurnitureAssemblyContracts.BindingModels;
|
||||
using FurnitureAssemblyContracts.BusinessLogicContracts;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDatabaseImplement.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FurnitureAssemblyRestApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class OrderController : Controller
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IOrderLogic _order;
|
||||
private readonly IOrderInfoLogic _orderInfo;
|
||||
public OrderController(ILogger<OrderController> logger, IOrderLogic order, IOrderInfoLogic orderInfo)
|
||||
{
|
||||
_logger = logger;
|
||||
_order = order;
|
||||
_orderInfo = orderInfo;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public List<OrderViewModel>? GetOrderList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _order.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка заказов");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public OrderViewModel? GetOrder(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _order.ReadElement(new OrderSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения заказа по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public List<OrderViewModel>? GetOrderListByUser(int userId)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<OrderInfoViewModel> orderInfos = _orderInfo.ReadList(new OrderInfoSearchModel { UserId = userId });
|
||||
if (orderInfos == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<int> orderInfoIds = new List<int>();
|
||||
foreach (OrderInfoViewModel orderInfo in orderInfos)
|
||||
{
|
||||
orderInfoIds.Add(orderInfo.Id);
|
||||
}
|
||||
return _order.ReadList(new OrderSearchModel { OrderInfoId = orderInfoIds });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения заказа по userId={userId}", userId);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddOrder(OrderBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_order.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания заказа");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateOrder(OrderBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_order.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления заказа");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void DeleteOrder(OrderBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_order.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления заказа");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using FurnitureAssemblyContracts.BindingModels;
|
||||
using FurnitureAssemblyContracts.BusinessLogicContracts;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDatabaseImplement.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FurnitureAssemblyRestApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class OrderInfoController : Controller
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IOrderInfoLogic _orderInfo;
|
||||
public OrderInfoController(ILogger<OrderInfoController> logger, IOrderInfoLogic orderInfo)
|
||||
{
|
||||
_logger = logger;
|
||||
_orderInfo = orderInfo;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public List<OrderInfoViewModel>? GetOrderInfoList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _orderInfo.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка мебельных модулей");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public OrderInfoViewModel? GetOrderInfo(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _orderInfo.ReadElement(new OrderInfoSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения мебельного модуля по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddOrderInfo(OrderInfoBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_orderInfo.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateOrderInfo(OrderInfoBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_orderInfo.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void DeleteOrderInfo(OrderInfoBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_orderInfo.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using FurnitureAssemblyContracts.BindingModels;
|
||||
using FurnitureAssemblyContracts.BusinessLogicContracts;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDatabaseImplement.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FurnitureAssemblyRestApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class RoleController : Controller
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IRoleLogic _role;
|
||||
public RoleController(ILogger<RoleController> logger, IRoleLogic role)
|
||||
{
|
||||
_logger = logger;
|
||||
_role = role;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public List<RoleViewModel>? GetRoleList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _role.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка мебельных модулей");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public RoleViewModel? GetRole(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _role.ReadElement(new RoleSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения мебельного модуля по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddRole(RoleBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_role.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateRole(RoleBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_role.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void DeleteRole(RoleBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_role.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using FurnitureAssemblyContracts.BindingModels;
|
||||
using FurnitureAssemblyContracts.BusinessLogicContracts;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDatabaseImplement.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FurnitureAssemblyRestApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class ScopeController : Controller
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IScopeLogic _scope;
|
||||
public ScopeController(ILogger<ScopeController> logger, IScopeLogic scope)
|
||||
{
|
||||
_logger = logger;
|
||||
_scope = scope;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public List<ScopeViewModel>? GetScopeList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _scope.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка мебельных модулей");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public ScopeViewModel? GetScope(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _scope.ReadElement(new ScopeSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения мебельного модуля по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddScope(ScopeBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_scope.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateScope(ScopeBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_scope.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void DeleteScope(ScopeBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_scope.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using FurnitureAssemblyContracts.BindingModels;
|
||||
using FurnitureAssemblyContracts.BusinessLogicContracts;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDatabaseImplement.Models;
|
||||
using FurnitureAssemblyDataModels.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using Tuple = System.Tuple;
|
||||
|
||||
namespace FurnitureAssemblyRestApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class SetController : Controller
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly ISetLogic _set;
|
||||
public SetController(ILogger<SetController> logger, ISetLogic set)
|
||||
{
|
||||
_logger = logger;
|
||||
_set = set;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public List<SetViewModel>? GetSetList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _set.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка мебельных модулей");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public SetViewModel? GetSet(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _set.ReadElement(new SetSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения мебельного модуля по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public List<SetViewModel>? GetSetListByUser(int userId)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _set.ReadList(new SetSearchModel { UserId = userId });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка гарнитуров у пользователя по id={userId}", userId);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public Tuple<SetViewModel, List<FurnitureModuleViewModel>, List<int>>? GetSetWithFurnitureModules(int setId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var set = _set.ReadElement(new() { Id = setId });
|
||||
if (set == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var tuple = Tuple.Create(set,
|
||||
set.SetFurnitureModules.Select(x => new FurnitureModuleViewModel()
|
||||
{
|
||||
Id = x.Value.Item1.Id,
|
||||
Cost = x.Value.Item1.Cost,
|
||||
Name = x.Value.Item1.Name,
|
||||
DateCreate = x.Value.Item1.DateCreate,
|
||||
}).ToList(),
|
||||
set.SetFurnitureModules.Select(x => x.Value.Item2).ToList());
|
||||
return tuple;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка гарнитура с мебельными модулями");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public Dictionary<int, (IFurnitureModuleModel, int)>? GetSetFurnitureModules(int setId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var set = _set.ReadElement(new() { Id = setId });
|
||||
if (set == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return set.SetFurnitureModules;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка мебельных модулей поездок гарнитура");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddSet(SetBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_set.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateSet(SetBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_set.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void DeleteSet(SetBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_set.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddFurnitureModuleInSet(Tuple<SetSearchModel, FurnitureModuleViewModel, int> setFurnitureModuleWithCount)
|
||||
{
|
||||
try
|
||||
{
|
||||
_set.AddFurnitureModuleInSet(setFurnitureModuleWithCount.Item1, setFurnitureModuleWithCount.Item2, setFurnitureModuleWithCount.Item3);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка добавления поездки в магазин");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using FurnitureAssemblyContracts.BindingModels;
|
||||
using FurnitureAssemblyContracts.BusinessLogicContracts;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using FurnitureAssemblyDatabaseImplement.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FurnitureAssemblyRestApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class UserController : Controller
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IUserLogic _user;
|
||||
public UserController(ILogger<UserController> logger, IUserLogic user)
|
||||
{
|
||||
_logger = logger;
|
||||
_user = user;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public List<UserViewModel>? GetUserList()
|
||||
{
|
||||
try
|
||||
{
|
||||
return _user.ReadList(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения списка мебельных модулей");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public UserViewModel? GetUser(int Id)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _user.ReadElement(new UserSearchModel { Id = Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка получения мебельного модуля по id={Id}", Id);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpGet]
|
||||
public UserViewModel? Login(string login, string password)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _user.ReadElement(new UserSearchModel
|
||||
{
|
||||
Login = login,
|
||||
Password = password
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка входа в систему");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddUser(UserBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_user.Create(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка создания мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateUser(UserBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_user.Update(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка обновления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void DeleteUser(UserBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_user.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления мебельного модуля");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -17,4 +17,10 @@
|
||||
<ProjectReference Include="..\FurnitureAssemblyDatabaseImplement\FurnitureAssemblyDatabaseImplement.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="log4net.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
16
FurnitureAssembly/FurnitureAssemblyRestApi/log4net.config
Normal file
16
FurnitureAssembly/FurnitureAssemblyRestApi/log4net.config
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<log4net>
|
||||
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
|
||||
<file value="c:/temp/AbstractShopRestApi.log" />
|
||||
<appendToFile value="true" />
|
||||
<maximumFileSize value="100KB" />
|
||||
<maxSizeRollBackups value="2" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date %5level %logger.%method [%line] - MESSAGE: %message%newline %exception" />
|
||||
</layout>
|
||||
</appender>
|
||||
<root>
|
||||
<level value="TRACE" />
|
||||
<appender-ref ref="RollingFile" />
|
||||
</root>
|
||||
</log4net>
|
@ -0,0 +1,46 @@
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using Newtonsoft.Json;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System;
|
||||
|
||||
namespace FurnitureAssemblyWorkerClientApp
|
||||
{
|
||||
public class APIClient
|
||||
{
|
||||
private static readonly HttpClient _client = new();
|
||||
public static UserViewModel? User { get; set; } = null;
|
||||
public static void Connect(IConfiguration configuration)
|
||||
{
|
||||
_client.BaseAddress = new Uri(configuration["IPAddress"]);
|
||||
_client.DefaultRequestHeaders.Accept.Clear();
|
||||
_client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
}
|
||||
public static T? GetRequest<T>(string requestUrl)
|
||||
{
|
||||
var response = _client.GetAsync(requestUrl);
|
||||
var result = response.Result.Content.ReadAsStringAsync().Result;
|
||||
if (response.Result.IsSuccessStatusCode)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<T>(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(result);
|
||||
}
|
||||
}
|
||||
public static void PostRequest<T>(string requestUrl, T model)
|
||||
{
|
||||
var json = JsonConvert.SerializeObject(model);
|
||||
var data = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
|
||||
var response = _client.PostAsync(requestUrl, data);
|
||||
|
||||
var result = response.Result.Content.ReadAsStringAsync().Result;
|
||||
if (!response.Result.IsSuccessStatusCode)
|
||||
{
|
||||
throw new Exception(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,252 @@
|
||||
using FurnitureAssemblyWorkerClientApp.Models;
|
||||
using FurnitureAssemblyContracts.BindingModels;
|
||||
using FurnitureAssemblyContracts.ViewModels;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Diagnostics;
|
||||
using FurnitureAssemblyDataModels.Models;
|
||||
using System;
|
||||
using FurnitureAssemblyContracts.SearchModels;
|
||||
|
||||
namespace FurnitureAssemblyWorkerClientApp.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
private readonly ILogger<HomeController> _logger;
|
||||
public HomeController(ILogger<HomeController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult Index()
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
return View(APIClient.GetRequest<List<OrderViewModel>>($"api/order/getorderlistbyuser?userId={APIClient.User.Id}"));
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult Privacy()
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
return View(APIClient.User);
|
||||
}
|
||||
[HttpPost]
|
||||
public void Privacy(string login, string password, string name, int roleId)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(name))
|
||||
{
|
||||
throw new Exception("Введите логин, пароль и ФИО");
|
||||
}
|
||||
APIClient.PostRequest("api/user/updateuser", new UserBindingModel
|
||||
{
|
||||
Id = APIClient.User.Id,
|
||||
Name = name,
|
||||
Login = login,
|
||||
Password = password,
|
||||
RoleId = roleId
|
||||
});
|
||||
|
||||
APIClient.User.Name = name;
|
||||
APIClient.User.Login = login;
|
||||
APIClient.User.Password = password;
|
||||
APIClient.User.RoleId = roleId;
|
||||
Response.Redirect("Index");
|
||||
}
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Error()
|
||||
{
|
||||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult Enter()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void Enter(string login, string password)
|
||||
{
|
||||
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password))
|
||||
{
|
||||
throw new Exception("Введите логин и пароль");
|
||||
}
|
||||
APIClient.User = APIClient.GetRequest<UserViewModel>($"api/user/login?login={login}&password={password}");
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
throw new Exception("Неверный логин/пароль");
|
||||
}
|
||||
Response.Redirect("Index");
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult Register()
|
||||
{
|
||||
return View(APIClient.GetRequest<List<RoleViewModel>>($"api/role/getrolelist"));
|
||||
}
|
||||
[HttpPost]
|
||||
public void Register(string login, string password, string name, int roleId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(name))
|
||||
{
|
||||
throw new Exception("Введите логин, пароль и ФИО");
|
||||
}
|
||||
APIClient.PostRequest("api/user/adduser", new UserBindingModel
|
||||
{
|
||||
Name = name,
|
||||
Login = login,
|
||||
Password = password,
|
||||
RoleId = roleId
|
||||
});
|
||||
Response.Redirect("Enter");
|
||||
return;
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult Sets()
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
return View(APIClient.GetRequest<List<SetViewModel>>($"api/set/getsetlistbyuser?userId={APIClient.User.Id}"));
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult CreateSet()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public void CreateSet(string name, double cost)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
throw new Exception("Название гарнитура не указано");
|
||||
}
|
||||
if (cost <= 0)
|
||||
{
|
||||
throw new Exception("Стоимость гарнитура не корректна");
|
||||
}
|
||||
APIClient.PostRequest("api/set/addset", new SetBindingModel
|
||||
{
|
||||
Name = name,
|
||||
Cost = cost,
|
||||
UserId = APIClient.User.Id
|
||||
});
|
||||
Response.Redirect("Sets");
|
||||
}
|
||||
[HttpGet]
|
||||
public Tuple<SetViewModel, string>? GetSetWithFurnitureModules(int setId)
|
||||
{
|
||||
var result = APIClient.GetRequest<Tuple<SetViewModel, List<FurnitureModuleViewModel>, List<int>>>
|
||||
($"api/set/getsetwithfurnituremodules?setId={setId}");
|
||||
if (result == null)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
string furnitureModuleTable = "";
|
||||
for (int i = 0; i < result.Item2.Count; i++)
|
||||
{
|
||||
var furnitureModule = result.Item2[i];
|
||||
var count = result.Item3[i];
|
||||
furnitureModuleTable += "<tr>";
|
||||
furnitureModuleTable += $"<td>{furnitureModule.Name}</td>";
|
||||
furnitureModuleTable += $"<td>{furnitureModule.Cost}</td>";
|
||||
furnitureModuleTable += $"<td>{furnitureModule.DateCreate}</td>";
|
||||
furnitureModuleTable += $"<td>{count}</td>";
|
||||
furnitureModuleTable += "</tr>";
|
||||
}
|
||||
return Tuple.Create(result.Item1, furnitureModuleTable);
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult UpdateSet()
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
return View(APIClient.GetRequest<List<SetViewModel>>($"api/set/getsetlist"));
|
||||
}
|
||||
[HttpPost]
|
||||
public void UpdateSet(int set, string name, double cost, DateTime dateCreate)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
throw new Exception("Название гарнитура не указано");
|
||||
}
|
||||
if (cost <= 0)
|
||||
{
|
||||
throw new Exception("Стоимость гарнитура не корректна");
|
||||
}
|
||||
var listFurnitureModules = APIClient.GetRequest<Dictionary<int, (IFurnitureModuleModel, int)>>($"api/set/getsetfurnituremodules?setId={set}");
|
||||
APIClient.PostRequest("api/set/updateset", new SetBindingModel
|
||||
{
|
||||
Id = set,
|
||||
Name = name,
|
||||
Cost = cost,
|
||||
DateCreate = dateCreate.Date,
|
||||
SetFurnitureModules = listFurnitureModules!
|
||||
});
|
||||
Response.Redirect("Sets");
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult DeleteSet()
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
return View(APIClient.GetRequest<List<SetViewModel>>($"api/set/getsetlist"));
|
||||
}
|
||||
[HttpPost]
|
||||
public void DeleteSet(int set)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
APIClient.PostRequest("api/set/deleteset", new SetBindingModel
|
||||
{
|
||||
Id = set,
|
||||
});
|
||||
Response.Redirect("Sets");
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult AddFurnitureModuleInSet()
|
||||
{
|
||||
ViewBag.Shops = APIClient.GetRequest<List<SetViewModel>>("api/set/getsetlist");
|
||||
ViewBag.Manufactures = APIClient.GetRequest<List<FurnitureModuleViewModel>>("api/furnituremodule/getfurnituremodulelist");
|
||||
return View(Tuple.Create(APIClient.GetRequest<List<SetViewModel>>("api/set/getsetlist"), APIClient.GetRequest<List<FurnitureModuleViewModel>>("api/furnituremodule/getfurnituremodulelist")));
|
||||
}
|
||||
[HttpPost]
|
||||
public void AddFurnitureModuleInSet(int set, int furnitureModule, int count)
|
||||
{
|
||||
if (APIClient.User == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
if (count <= 0)
|
||||
{
|
||||
throw new Exception("Количество должно быть больше 0");
|
||||
}
|
||||
APIClient.PostRequest("api/set/addfurnituremoduleinset", Tuple.Create(
|
||||
new SetSearchModel() { Id = set },
|
||||
new FurnitureModuleViewModel() { Id = furnitureModule },
|
||||
count
|
||||
));
|
||||
Response.Redirect("Sets");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FurnitureAssemblyContracts\FurnitureAssemblyContracts.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,9 @@
|
||||
namespace FurnitureAssemblyWorkerClientApp.Models
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
using FurnitureAssemblyWorkerClientApp;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllersWithViews();
|
||||
|
||||
var app = builder.Build();
|
||||
APIClient.Connect(builder.Configuration);
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllerRoute(
|
||||
name: "default",
|
||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||
|
||||
app.Run();
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:24918",
|
||||
"sslPort": 44313
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"FurnitureAssemblyWorkerClientApp": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:7137;http://localhost:5273",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
@using FurnitureAssemblyContracts.ViewModels;
|
||||
@using FurnitureAssemblyDataModels.Models;
|
||||
|
||||
@model Tuple<List<SetViewModel>, List<FurnitureModuleViewModel>>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Добавление мебельных модулей в гарнитур";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Добавление мебельных модулей в гарнитур</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Гарнитур:</div>
|
||||
<div class="col-8">
|
||||
<select id="set" name="set" class="form-control">
|
||||
@foreach (var set in Model.Item1)
|
||||
{
|
||||
<option value="@set.Id">
|
||||
@Html.DisplayFor(modelItem => set.Name)
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Выбранный мебельный модуль:</div>
|
||||
<div class="col-8">
|
||||
<select id="furnitureModule" name="furnitureModule" class="form-control">
|
||||
@foreach (var furnitureModule in Model.Item2)
|
||||
{
|
||||
<option value="@furnitureModule.Id">
|
||||
@Html.DisplayFor(modelItem => furnitureModule.Name)
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Количество:</div>
|
||||
<div class="col-8"><input type="text" id="count" name="count" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Добавить" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1,49 @@
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Создание заказа</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Изделие:</div>
|
||||
<div class="col-8">
|
||||
<select id="manufacture" name="manufacture" class="form-control" asp-items="@(new SelectList(@ViewBag.Manufactures,"Id", "ManufactureName"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Количество:</div>
|
||||
<div class="col-8"><input type="text" name="count" id="count" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Сумма:</div>
|
||||
<div class="col-8"><input type="text" id="sum" name="sum" readonly /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Создать" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$('#manufacture').on('change', function () {
|
||||
check();
|
||||
});
|
||||
$('#count').on('change', function () {
|
||||
check();
|
||||
});
|
||||
function check() {
|
||||
var count = $('#count').val();
|
||||
var manufacture = $('#manufacture').val();
|
||||
if (count && manufacture) {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "/Home/Calc",
|
||||
data: { count: count, manufacture: manufacture },
|
||||
success: function (result) {
|
||||
$("#sum").val(result);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
</script>
|
@ -0,0 +1,20 @@
|
||||
@{
|
||||
ViewData["Title"] = "Создание гарнитура";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Создание гарнитура</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Название:</div>
|
||||
<div class="col-8"><input type="text" name="name" id="name" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Стоимость:</div>
|
||||
<div class="col-8"><input type="text" name="cost" id="cost" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Создать" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1,27 @@
|
||||
@using FurnitureAssemblyContracts.ViewModels;
|
||||
@{
|
||||
ViewData["Title"] = "Удаление гарнитура";
|
||||
}
|
||||
@model List<SetViewModel>
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Удаление гарнитура</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Выбранный гарнитур:</div>
|
||||
<div class="col-8">
|
||||
<select id="set" name="set" class="form-control">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<option value="@item.Id">
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Удалить" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1,20 @@
|
||||
@{
|
||||
ViewData["Title"] = "Enter";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Вход в приложение</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Логин:</div>
|
||||
<div class="col-8"><input type="text" name="login" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Пароль:</div>
|
||||
<div class="col-8"><input type="password" name="password" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Вход" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1,47 @@
|
||||
@using FurnitureAssemblyContracts.ViewModels
|
||||
@model List<OrderViewModel>
|
||||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Заказы</h1>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
@{
|
||||
if (Model == null)
|
||||
{
|
||||
<h3 class="display-4">Авторизируйтесь</h3>
|
||||
return;
|
||||
}
|
||||
<p>
|
||||
<a asp-action="Create">Создать заказ</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Номер
|
||||
</th>
|
||||
<th>
|
||||
Изделие
|
||||
</th>
|
||||
<th>
|
||||
Дата создания
|
||||
</th>
|
||||
<th>
|
||||
Количество
|
||||
</th>
|
||||
<th>
|
||||
Сумма
|
||||
</th>
|
||||
<th>
|
||||
Статус
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
</div>
|
@ -0,0 +1,30 @@
|
||||
@using FurnitureAssemblyContracts.ViewModels
|
||||
@model UserViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Privacy Policy";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Личные данные</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Логин:</div>
|
||||
<div class="col-8"><input type="text" name="login" value="@Model.Login" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Пароль:</div>
|
||||
<div class="col-8"><input type="password" name="password" value="@Model.Password" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">ФИО:</div>
|
||||
<div class="col-8"><input type="text" name="fio" value="@Model.Name" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Роль:</div>
|
||||
<div class="col-8"><input type="text" name="fio" value="@Model.RoleName" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Сохранить" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1,41 @@
|
||||
@using FurnitureAssemblyContracts.ViewModels;
|
||||
@model List<RoleViewModel>
|
||||
@{
|
||||
ViewData["Title"] = "Register";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Регистрация</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Логин:</div>
|
||||
<div class="col-8"><input type="text" name="login" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Пароль:</div>
|
||||
<div class="col-8"><input type="password" name="password" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">ФИО:</div>
|
||||
<div class="col-8"><input type="text" name="name" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Роль:</div>
|
||||
|
||||
<div class="col-8">
|
||||
<select name="roleId">
|
||||
<option value="0" disabled></option>
|
||||
@foreach (var role in Model)
|
||||
{
|
||||
<option value="@role.Id">
|
||||
@Html.DisplayFor(modelItem => role.Name)
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Регистрация" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1,65 @@
|
||||
@using FurnitureAssemblyContracts.ViewModels
|
||||
|
||||
@model List<SetViewModel>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Формирование гарнитуров";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Гарнитуры</h1>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
@{
|
||||
if (Model == null)
|
||||
{
|
||||
<h3 class="display-4">Авторизируйтесь</h3>
|
||||
return;
|
||||
}
|
||||
|
||||
<div>
|
||||
<a asp-action="CreateSet">Создать гарнитур</a>
|
||||
<a asp-action="UpdateSet">Обновить гарнитур</a>
|
||||
<a asp-action="DeleteSet">Удалить гарнитур</a>
|
||||
<a asp-action="AddFurnitureModuleInSet">Добавить мебельный модуль</a>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Номер
|
||||
</th>
|
||||
<th>
|
||||
Название
|
||||
</th>
|
||||
<th>
|
||||
Стоимость
|
||||
</th>
|
||||
<th>
|
||||
Дата создания
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Id)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Cost)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DateCreate)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
</div>
|
@ -0,0 +1,83 @@
|
||||
@using FurnitureAssemblyContracts.ViewModels
|
||||
|
||||
@model List<SetViewModel>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Изменение гарнитура";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Изменение гарнитура</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Гарнитур:</div>
|
||||
<div class="col-8">
|
||||
<select id="set" name="set" class="form-control">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<option value="@item.Id">
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Название:</div>
|
||||
<div class="col-8"><input type="text" name="name" id="name" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Стоимость:</div>
|
||||
<div class="col-8"><input type="text" name="cost" id="cost" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Дата создания:</div>
|
||||
<div class="col-8"><input type="datetime-local" id="dateCreate" name="dateCreate" /></div>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Название мебельного модуля
|
||||
</th>
|
||||
<th>
|
||||
Стоимость
|
||||
</th>
|
||||
<th>
|
||||
Количество
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="furnitureModules-table">
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Изменить" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
<script>
|
||||
function check() {
|
||||
var set = $('#set').val();
|
||||
if (set) {
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: "/Home/GetShopWithManufactures",
|
||||
data: { setId: set },
|
||||
success: function (result) {
|
||||
if (result != null) {
|
||||
$('#name').val(result.item1.name);
|
||||
$('#cost').val(result.item1.cost);
|
||||
$('#dateCreate').val(result.item1.dateCreate);
|
||||
$('#furnitureModules-table').html(result.item2);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
check();
|
||||
$('#set').on('change', (e) => check());
|
||||
</script>
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
@model ErrorViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@if (Model.ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@Model.RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - FurnitureAssemblyWorkerClientApp</title>
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/BlacksmithWorkshopClientApp.styles.css" asp-append-version="true" />
|
||||
</head>
|
||||
<body>
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Производство мебели</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Заказы</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Личные данные</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Enter">Вход</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Register">Регистрация</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Sets">Гарнитуры</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="container">
|
||||
<main role="main" class="pb-3">
|
||||
@RenderBody()
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© 2023 - FurnitureAssemblyWorkerClientApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,48 @@
|
||||
/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
|
||||
for details on configuring this project to bundle and minify static web assets. */
|
||||
|
||||
a.navbar-brand {
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0077cc;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.border-top {
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
.border-bottom {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.box-shadow {
|
||||
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
button.accept-policy {
|
||||
font-size: 1rem;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
line-height: 60px;
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
|
@ -0,0 +1,3 @@
|
||||
@using FurnitureAssemblyWorkerClientApp
|
||||
@using FurnitureAssemblyWorkerClientApp.Models
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"DetailedErrors": true,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"IPAddress": "https://localhost:7181"
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
html {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
html {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin-bottom: 60px;
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
@ -0,0 +1,4 @@
|
||||
// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
|
||||
// for details on configuring this project to bundle and minify static web assets.
|
||||
|
||||
// Write your JavaScript code.
|
@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2021 Twitter, Inc.
|
||||
Copyright (c) 2011-2021 The Bootstrap Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
4997
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css
vendored
Normal file
4997
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4996
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css
vendored
Normal file
4996
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,427 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--bs-body-font-family);
|
||||
font-size: var(--bs-body-font-size);
|
||||
font-weight: var(--bs-body-font-weight);
|
||||
line-height: var(--bs-body-line-height);
|
||||
color: var(--bs-body-color);
|
||||
text-align: var(--bs-body-text-align);
|
||||
background-color: var(--bs-body-bg);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
background-color: currentColor;
|
||||
border: 0;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr:not([size]) {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-bs-original-title] {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0d6efd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: #0a58ca;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 1em;
|
||||
direction: ltr /* rtl:ignore */;
|
||||
unicode-bidi: bidi-override;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: #d63384;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.2rem 0.4rem;
|
||||
font-size: 0.875em;
|
||||
color: #fff;
|
||||
background-color: #212529;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
select:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=button]:not(:disabled),
|
||||
[type=reset]:not(:disabled),
|
||||
[type=submit]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
legend + * {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type=search] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
/* rtl:raw:
|
||||
[type="tel"],
|
||||
[type="url"],
|
||||
[type="email"],
|
||||
[type="number"] {
|
||||
direction: ltr;
|
||||
}
|
||||
*/
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,424 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--bs-body-font-family);
|
||||
font-size: var(--bs-body-font-size);
|
||||
font-weight: var(--bs-body-font-weight);
|
||||
line-height: var(--bs-body-line-height);
|
||||
color: var(--bs-body-color);
|
||||
text-align: var(--bs-body-text-align);
|
||||
background-color: var(--bs-body-bg);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
background-color: currentColor;
|
||||
border: 0;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr:not([size]) {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-bs-original-title] {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-right: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0d6efd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: #0a58ca;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 1em;
|
||||
direction: ltr ;
|
||||
unicode-bidi: bidi-override;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: #d63384;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.2rem 0.4rem;
|
||||
font-size: 0.875em;
|
||||
color: #fff;
|
||||
background-color: #212529;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
select:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=button]:not(:disabled),
|
||||
[type=reset]:not(:disabled),
|
||||
[type=submit]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: right;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
legend + * {
|
||||
clear: right;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type=search] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
[type="tel"],
|
||||
[type="url"],
|
||||
[type="email"],
|
||||
[type="number"] {
|
||||
direction: ltr;
|
||||
}
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-right:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-right:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:right}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:right;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:right}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}[type=email],[type=number],[type=tel],[type=url]{direction:ltr}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.rtl.min.css.map */
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
11221
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.css
vendored
Normal file
11221
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
11197
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css
vendored
Normal file
11197
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6780
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js
vendored
Normal file
6780
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4977
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js
vendored
Normal file
4977
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
5026
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.js
vendored
Normal file
5026
FurnitureAssembly/FurnitureAssemblyWorkerClientApp/wwwroot/lib/bootstrap/dist/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user