до сдачи 1,5 часа

This commit is contained in:
Alenka 2024-04-30 16:23:51 +04:00
commit 5c8b768dc1
132 changed files with 76081 additions and 252 deletions

View File

@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PharmacistApp", "Pharmacist
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HospitalRestApi", "HospitalRestApi\HospitalRestApi.csproj", "{C524A697-427E-40BD-955C-334255D958B7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HospitalDoctorApp", "HospitalDoctorApp\HospitalDoctorApp.csproj", "{0E3C0346-E31B-401F-8047-CE157D984F33}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -47,6 +49,10 @@ Global
{5CE4060B-0791-4F09-A52D-EF3EFF4EBF03}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CE4060B-0791-4F09-A52D-EF3EFF4EBF03}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5CE4060B-0791-4F09-A52D-EF3EFF4EBF03}.Release|Any CPU.Build.0 = Release|Any CPU
{0E3C0346-E31B-401F-8047-CE157D984F33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0E3C0346-E31B-401F-8047-CE157D984F33}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E3C0346-E31B-401F-8047-CE157D984F33}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E3C0346-E31B-401F-8047-CE157D984F33}.Release|Any CPU.Build.0 = Release|Any CPU
{C524A697-427E-40BD-955C-334255D958B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C524A697-427E-40BD-955C-334255D958B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C524A697-427E-40BD-955C-334255D958B7}.Release|Any CPU.ActiveCfg = Release|Any CPU

View File

@ -113,7 +113,7 @@ namespace HospitalBusinessLogic.BusinessLogics
var element = _doctorStorage.GetElement(new DoctorSearchModel
{
Login = model.Login,
PhoneNumber = model.PhoneNumber,
Password = model.Password
});
if (element != null && element.Id != model.Id)
{

View File

@ -26,7 +26,7 @@ namespace HospitalBusinessLogic.BusinessLogics
}
public List<PharmacistViewModel>? ReadList(PharmacistSearchModel? model)
{
_logger.LogInformation("ReadList. PharmacistFIO:{PharmacistFIO}. Id:{ Id}", model?.FIO, model?.Id);
_logger.LogInformation("ReadList. FIO:{FIO}. Id:{ Id}", model?.FIO, model?.Id);
var list = model == null ? _pharmacistStorage.GetFullList() :
_pharmacistStorage.GetFilteredList(model);
if (list == null)
@ -43,7 +43,7 @@ namespace HospitalBusinessLogic.BusinessLogics
{
throw new ArgumentNullException(nameof(model));
}
_logger.LogInformation("ReadElement. PharmacistFIO:{PharmacistFIO}.Id:{ Id}", model.FIO, model.Id);
_logger.LogInformation("ReadElement. FIO:{FIO}.Id:{ Id}", model.FIO, model.Id);
var element = _pharmacistStorage.GetElement(model);
if (element == null)
{
@ -110,7 +110,7 @@ namespace HospitalBusinessLogic.BusinessLogics
throw new ArgumentNullException("Нет пароля клиента",
nameof(model.Password));
}
_logger.LogInformation("Pharmacist. PharmacistFIO:{PharmacistFIO}." +
_logger.LogInformation("Pharmacist. FIO:{FIO}." +
"Email:{ Email}. Password:{ Password}. Id: { Id} ", model.FIO, model.Login, model.Password, model.Id);
var element = _pharmacistStorage.GetElement(new PharmacistSearchModel
{

View File

@ -97,10 +97,10 @@ namespace HospitalBusinessLogic.BusinessLogics
{
return;
}
if (model.RecipeMedicines == null || model.RecipeMedicines.Count == 0)
/*if (model.RecipeMedicines == null || model.RecipeMedicines.Count == 0)
{
throw new ArgumentNullException("Нет лекарств в рецепте", nameof(model.RecipeMedicines));
}
}TODO*/
_logger.LogInformation("Recipe. Id:{ Id}. DiseaseId:{DiseaseId}. DoctorId:{DoctorId}", model.Id, model.DiseaseId, model.DoctorId);
var element = _recipeStorage.GetElement(new RecipeSearchModel
{

View File

@ -9,10 +9,11 @@ namespace HospitalContracts.BindingModels
{
public class DescriptionProcedureBindingModel : IDescriptionProcedureModel
{
public string Description { get; set; } = string.Empty;
public int Id { get; set; }
public string Description { get; set; } = string.Empty;
public int PharmacistId { get; set; }
public int Id { get; set; }
}
}

View File

@ -10,11 +10,12 @@ namespace HospitalContracts.BindingModels
{
public class MedicineBindingModel : IMedicineModel
{
public string Name { get; set; } = string.Empty;
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string CountryOrigin { get; set; } = string.Empty;
public double Price { get; set; }
public int Id { get; set; }
public int PharmacistId { get; set; }
}
public Dictionary<int, IRecipeModel> MedicineRecipes { get; set; } = new();
}
}

View File

@ -21,6 +21,5 @@ namespace HospitalContracts.BindingModels
public Dictionary<int, IProcedureModel> PatientProcedures { get; set; } = new();
public Dictionary<int, IRecipeModel> PatientRecipes { get; set; } = new();
}
}

View File

@ -10,17 +10,17 @@ namespace HospitalContracts.BindingModels
public class ProcedureBindingModel : IProcedureModel
{
public string Name { get; set; } = string.Empty;
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public DateTime Date { get; set; }
public int DescriptionProcedureId { get; set; }
public int PharmacistId { get; set; }
public int Id { get; set; }
public Dictionary<int, IMedicineModel> ProcedureMedicines { get; set; } = new();
}
}
}
}

View File

@ -18,6 +18,6 @@ namespace HospitalContracts.BindingModels
public int DoctorId { get; set; }
public Dictionary<int, IMedicineModel> RecipeMedicines { get; set; } = new();
public Dictionary<int, IPatientModel> RecipePatients { get; set; } = new();
}
}

View File

@ -11,5 +11,6 @@ namespace HospitalContracts.SearchModels
public int? Id { get; set; }
public int? DoctorId { get; set; }
}
DateTime IssueDate { get; }
}
}

View File

@ -16,5 +16,7 @@ namespace HospitalContracts.ViewModels
[DisplayName("Фармацевт")]
public int PharmacistId { get; set; }
}
}
}

View File

@ -20,6 +20,8 @@ namespace HospitalContracts.ViewModels
[DisplayName("Фармацевт")]
public int PharmacistId { get; set; }
}
public Dictionary<int, IRecipeModel> MedicineRecipes { get; set; } = new();
}
}

View File

@ -10,7 +10,8 @@ namespace HospitalContracts.ViewModels
{
public class PatientViewModel : IPatientModel
{
public int Id { get; set; }
[DisplayName("Номер")]
public int Id { get; set; }
[DisplayName("ФИО")]
public string FIO { get; set; } = string.Empty;
@ -25,7 +26,7 @@ namespace HospitalContracts.ViewModels
public Dictionary<int, IProcedureModel> PatientProcedures { get; set; } = new();
public Dictionary<int, IRecipeModel> PatientRecipes { get; set; } = new();
}
}

View File

@ -16,7 +16,7 @@ namespace HospitalContracts.ViewModels
[DisplayName("Дата процедуры")]
public DateTime Date { get; set; }
[DisplayName("Фармацевт")]
//public string PharmacistFIO { get; set; } = string.Empty;
public int PharmacistId { get; set; }
[DisplayName("Описание процедуры")]
public int DescriptionProcedureId { get; set; }

View File

@ -9,7 +9,8 @@ namespace HospitalContracts.ViewModels
{
public class RecipeViewModel : IRecipeModel
{
public string Description { get; set; } = string.Empty;
public int Id { get; set; }
public string Description { get; set; } = string.Empty;
public DateTime IssueDate { get; set; } = DateTime.Now;
@ -17,8 +18,8 @@ namespace HospitalContracts.ViewModels
public int DoctorId { get; set; }
public Dictionary<int, IMedicineModel> RecipeMedicines { get; set; } = new();
public Dictionary<int, IPatientModel> RecipePatients { get; set; } = new();
public int Id { get; set; }
}
}

View File

@ -67,12 +67,13 @@ namespace HospitalDatabaseImplement.Implements
public DescriptionProcedureViewModel? Insert(DescriptionProcedureBindingModel model)
{
var newDisease = DescriptionProcedure.Create(model);
using var context = new HospitalDatabase();
var newDisease = DescriptionProcedure.Create(context, model);
if (newDisease == null)
{
return null;
}
using var context = new HospitalDatabase();
context.DescriptionProcedures.Add(newDisease);
context.SaveChanges();
return context.DescriptionProcedures
@ -90,7 +91,7 @@ namespace HospitalDatabaseImplement.Implements
{
return null;
}
disease.Update(model);
disease.Update(context, model);
context.SaveChanges();
return context.DescriptionProcedures
.Include(x => x.Procedures)

View File

@ -52,7 +52,7 @@ namespace HospitalDatabaseImplement.Implements
public MedicineViewModel? Insert(MedicineBindingModel model)
{
using var context = new HospitalDatabase();
var newMedicine = Medicine.Create(model);
var newMedicine = Medicine.Create(context, model);
if (newMedicine == null)
{
return null;

View File

@ -28,7 +28,7 @@ namespace HospitalDatabaseImplement.Models
[ForeignKey("IDescriptionProcedureId")]
public virtual List<Procedure> Procedures { get; set; } = new();
public static DescriptionProcedure? Create(DescriptionProcedureBindingModel model)
public static DescriptionProcedure? Create(HospitalDatabase context, DescriptionProcedureBindingModel model)
{
if (model == null)
{
@ -37,33 +37,31 @@ namespace HospitalDatabaseImplement.Models
return new DescriptionProcedure()
{
Id = model.Id,
Description = model.Description,
PharmacistId = model.PharmacistId
};
Description = model.Description,
PharmacistId = model.PharmacistId,
Pharmacist = context.Pharmacists.FirstOrDefault(x => x.Id == model.PharmacistId)
};
}
public static DescriptionProcedure Create(DescriptionProcedureViewModel model)
{
return new DescriptionProcedure
{
Id = model.Id,
Description = model.Description
};
}
public void Update(DescriptionProcedureBindingModel model)
public void Update(HospitalDatabase context, DescriptionProcedureBindingModel model)
{
if (model == null)
{
return;
}
Description = model.Description;
}
PharmacistId = model.PharmacistId;
Pharmacist = context.Pharmacists.FirstOrDefault(x => x.Id == model.PharmacistId);
}
public DescriptionProcedureViewModel GetViewModel => new()
{
Id = Id,
Description = Description
Description = Description,
PharmacistId = PharmacistId
};
}
}

View File

@ -7,10 +7,10 @@ using System.Threading.Tasks;
namespace HospitalDataModels.Models
{
public interface IDescriptionProcedureModel
public interface IDescriptionProcedureModel : IId
{
string Description { get; }
int PharmacistId { get; }
}
}
}

View File

@ -6,11 +6,10 @@ using System.Threading.Tasks;
namespace HospitalDataModels.Models
{
public interface IDiseaseModel
public interface IDiseaseModel : IId
{
string Name { get; }
string Name { get; }
string Description { get; }
int DoctorId { get; }
}
}

View File

@ -12,6 +12,7 @@ namespace HospitalDataModels.Models
string CountryOrigin { get; }
double Price { get; }
int PharmacistId { get; }
}
Dictionary<int, IRecipeModel> MedicineRecipes { get; }
}
}

View File

@ -14,6 +14,5 @@ namespace HospitalDataModels.Models
int DoctorId { get; }
Dictionary<int, IProcedureModel> PatientProcedures { get; }
Dictionary<int, IRecipeModel> PatientRecipes { get; }
}
}

View File

@ -16,6 +16,6 @@ namespace HospitalDataModels.Models
int DoctorId { get; }
Dictionary<int, IMedicineModel> RecipeMedicines { get; }
Dictionary<int, IPatientModel> RecipePatients { get; }
}
}

View File

@ -16,18 +16,18 @@ namespace HospitalDatabaseImplement.Implementss
{
public DoctorViewModel? GetElement(DoctorSearchModel model)
{
if (!model.Id.HasValue)
if ((string.IsNullOrEmpty(model.Login) && !model.Id.HasValue))
{
return null;
}
using var context = new HospitalDatabase();
return context.Doctors
.Include(x => x.Recipes)
.Include(x => x.Diseases)
.Include(x => x.Patients)
.FirstOrDefault(x => model.Id.HasValue && x.Id == model.Id)
?.GetViewModel;
}
.FirstOrDefault(x =>
(!model.Id.HasValue || x.Id == model.Id) && (string.IsNullOrEmpty(model.Login) || x.Login == model.Login) &&
(string.IsNullOrEmpty(model.Password) || x.Password == model.Password))
?.GetViewModel;
}
public List<DoctorViewModel> GetFilteredList(DoctorSearchModel model)
{

View File

@ -92,7 +92,7 @@ namespace HospitalDatabaseImplement.Implementss
}
patient.Update(model);
context.SaveChanges();
patient.UpdateRecipes(context, model);
patient.UpdateProcedures(context, model);
transaction.Commit();
return patient.GetViewModel;
}

View File

@ -30,8 +30,8 @@ namespace HospitalDatabaseImplement.Implementss
{
return context.Recipes
.Include(x => x.Doctor)
.Include(x => x.Medicines)
.ThenInclude(x => x.Medicine)
.Include(x => x.Patients)
.ThenInclude(x => x.Patient)
.Where(x => x.Id == model.Id).ToList()
.Select(x => x.GetViewModel).ToList();
}
@ -39,8 +39,8 @@ namespace HospitalDatabaseImplement.Implementss
{
return context.Recipes
.Include(x => x.Doctor)
.Include(x => x.Medicines)
.ThenInclude(x => x.Medicine)
.Include(x => x.Patients)
.ThenInclude(x => x.Patient)
.Where(x => x.DoctorId == model.DoctorId)
.Select(x => x.GetViewModel).ToList();
}
@ -59,8 +59,8 @@ namespace HospitalDatabaseImplement.Implementss
using var context = new HospitalDatabase();
return context.Recipes
.Include(x => x.Doctor)
.Include(x => x.Medicines)
.ThenInclude(x => x.Medicine)
.Include(x => x.Patients)
.ThenInclude(x => x.Patient)
.FirstOrDefault(x => model.Id.HasValue && x.Id == model.Id)
?.GetViewModel;
}
@ -94,7 +94,7 @@ namespace HospitalDatabaseImplement.Implementss
}
recipe.Update(model);
context.SaveChanges();
recipe.UpdateMedicines(context, model);
recipe.UpdatePatients(context, model);
transaction.Commit();
return recipe.GetViewModel;
}
@ -109,7 +109,7 @@ namespace HospitalDatabaseImplement.Implementss
using var context = new HospitalDatabase();
var element = context.Recipes
.Include(x => x.Doctor)
.Include(x => x.Medicines)
.Include(x => x.Patients)
.FirstOrDefault(rec => rec.Id == model.Id);
if (element != null)
{

View File

@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace HospitalDatabaseImplement.Migrations
{
[DbContext(typeof(HospitalDatabase))]
[Migration("20240429163909_InitialCreate")]
partial class InitialCreate
[Migration("20240430102720_InitCreate")]
partial class InitCreate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -436,7 +436,7 @@ namespace HospitalDatabaseImplement.Migrations
.IsRequired();
b.HasOne("HospitalDatabaseImplement.Modelss.Recipe", "Recipe")
.WithMany()
.WithMany("Patients")
.HasForeignKey("RecipeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@ -468,7 +468,7 @@ namespace HospitalDatabaseImplement.Migrations
modelBuilder.Entity("HospitalDatabaseImplement.Models.ProcedureMedicine", b =>
{
b.HasOne("HospitalDatabaseImplement.Models.Medicine", "Medicine")
.WithMany()
.WithMany("Services")
.HasForeignKey("MedicineId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@ -487,13 +487,13 @@ namespace HospitalDatabaseImplement.Migrations
modelBuilder.Entity("HospitalDatabaseImplement.Models.RecipeMedicine", b =>
{
b.HasOne("HospitalDatabaseImplement.Models.Medicine", "Medicine")
.WithMany("RecipeMedicines")
.WithMany("Recipes")
.HasForeignKey("MedicineId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HospitalDatabaseImplement.Modelss.Recipe", "Recipe")
.WithMany("Medicines")
.WithMany()
.HasForeignKey("RecipeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@ -543,7 +543,9 @@ namespace HospitalDatabaseImplement.Migrations
modelBuilder.Entity("HospitalDatabaseImplement.Models.Medicine", b =>
{
b.Navigation("RecipeMedicines");
b.Navigation("Recipes");
b.Navigation("Services");
});
modelBuilder.Entity("HospitalDatabaseImplement.Models.Patient", b =>
@ -571,7 +573,7 @@ namespace HospitalDatabaseImplement.Migrations
modelBuilder.Entity("HospitalDatabaseImplement.Modelss.Recipe", b =>
{
b.Navigation("Medicines");
b.Navigation("Patients");
});
#pragma warning restore 612, 618
}

View File

@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
namespace HospitalDatabaseImplement.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
public partial class InitCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
@ -182,7 +182,8 @@ namespace HospitalDatabaseImplement.Migrations
name: "FK_Procedures_Pharmacists_PharmacistId",
column: x => x.PharmacistId,
principalTable: "Pharmacists",
principalColumn: "Id");
principalColumn: "Id"
);
});
migrationBuilder.CreateTable(
@ -207,7 +208,8 @@ namespace HospitalDatabaseImplement.Migrations
name: "FK_PatientRecipes_Recipes_RecipeId",
column: x => x.RecipeId,
principalTable: "Recipes",
principalColumn: "Id");
principalColumn: "Id"
);
});
migrationBuilder.CreateTable(
@ -284,7 +286,8 @@ namespace HospitalDatabaseImplement.Migrations
name: "FK_ProcedureMedicines_Procedures_ProcedureId",
column: x => x.ProcedureId,
principalTable: "Procedures",
principalColumn: "Id");
principalColumn: "Id"
);
});
migrationBuilder.CreateIndex(

View File

@ -433,7 +433,7 @@ namespace HospitalDatabaseImplement.Migrations
.IsRequired();
b.HasOne("HospitalDatabaseImplement.Modelss.Recipe", "Recipe")
.WithMany()
.WithMany("Patients")
.HasForeignKey("RecipeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@ -465,7 +465,7 @@ namespace HospitalDatabaseImplement.Migrations
modelBuilder.Entity("HospitalDatabaseImplement.Models.ProcedureMedicine", b =>
{
b.HasOne("HospitalDatabaseImplement.Models.Medicine", "Medicine")
.WithMany()
.WithMany("Services")
.HasForeignKey("MedicineId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@ -484,13 +484,13 @@ namespace HospitalDatabaseImplement.Migrations
modelBuilder.Entity("HospitalDatabaseImplement.Models.RecipeMedicine", b =>
{
b.HasOne("HospitalDatabaseImplement.Models.Medicine", "Medicine")
.WithMany("RecipeMedicines")
.WithMany("Recipes")
.HasForeignKey("MedicineId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HospitalDatabaseImplement.Modelss.Recipe", "Recipe")
.WithMany("Medicines")
.WithMany()
.HasForeignKey("RecipeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
@ -540,7 +540,9 @@ namespace HospitalDatabaseImplement.Migrations
modelBuilder.Entity("HospitalDatabaseImplement.Models.Medicine", b =>
{
b.Navigation("RecipeMedicines");
b.Navigation("Recipes");
b.Navigation("Services");
});
modelBuilder.Entity("HospitalDatabaseImplement.Models.Patient", b =>
@ -568,7 +570,7 @@ namespace HospitalDatabaseImplement.Migrations
modelBuilder.Entity("HospitalDatabaseImplement.Modelss.Recipe", b =>
{
b.Navigation("Medicines");
b.Navigation("Patients");
});
#pragma warning restore 612, 618
}

View File

@ -53,7 +53,7 @@ namespace HospitalDatabaseImplement.Models
}
return new Doctor()
{
Id = model.Id,
//Id = model.Id,
Login = model.Login,
PhoneNumber = model.PhoneNumber,
Password = model.Password,

View File

@ -14,12 +14,11 @@ namespace HospitalDatabaseImplement.Models
{
public class Medicine : IMedicineModel
{
public int Id { get; set; }
public int Id { get; set; }
[Required]
[MaxLength(50)]
public string Name { get; set; } = string.Empty;
[Required]
[MaxLength(50)]
public string Name { get; set; } = string.Empty;
[Required]
@ -29,45 +28,87 @@ namespace HospitalDatabaseImplement.Models
public double Price { get; set; }
public int PharmacistId { get; private set; }
public virtual Pharmacist Pharmacist { get; set; }
[ForeignKey("MedicineId")]
public virtual List<RecipeMedicine> RecipeMedicines { get; set; } = new();
private Dictionary<int, IRecipeModel>? _medicineRecipes =
null;
[NotMapped]
public Dictionary<int, IRecipeModel> MedicineRecipes
{
get
{
if (_medicineRecipes == null)
{
_medicineRecipes = Recipes
.ToDictionary(recPC => recPC.RecipeId, recPC =>
recPC.Recipe as IRecipeModel);
}
return _medicineRecipes;
}
}
public static Medicine? Create(MedicineBindingModel model)
{
if (model == null)
{
return null;
}
return new Medicine()
{
Id = model.Id,
Name = model.Name
};
}
public static Medicine Create(MedicineViewModel model)
{
return new Medicine
{
Id = model.Id,
Name = model.Name
};
}
public void Update(MedicineBindingModel model)
{
if (model == null)
{
return;
}
Name = model.Name;
}
public MedicineViewModel GetViewModel => new()
{
Id = Id,
Name = Name
};
}
[ForeignKey("MedicineId")]
public virtual List<RecipeMedicine> Recipes { get; set; } = new();
[ForeignKey("MedicineId")]
public virtual List<ProcedureMedicine> Services { get; set; } = new();
public static Medicine Create(HospitalDatabase context,
MedicineBindingModel model)
{
return new Medicine()
{
Id = model.Id,
Name = model.Name,
Price = model.Price,
Recipes = model.MedicineRecipes.Select(x => new
RecipeMedicine
{
Recipe = context.Recipes.First(y => y.Id == x.Key),
}).ToList(),
PharmacistId = model.PharmacistId,
Pharmacist = context.Pharmacists.First(x => x.Id == model.PharmacistId)
};
}
public void Update(MedicineBindingModel model)
{
Name = model.Name;
Price = model.Price;
}
public MedicineViewModel GetViewModel => new()
{
Id = Id,
Name = Name,
Price = Price,
MedicineRecipes = MedicineRecipes,
};
public void UpdateRecipes(HospitalDatabase context,
MedicineBindingModel model)
{
if (model.MedicineRecipes == null)
return;
var medicineRecipes = context.RecipeMedicines.Where(rec =>
rec.MedicineId == model.Id).ToList();
if (medicineRecipes != null && medicineRecipes.Count > 0)
{
context.RecipeMedicines.RemoveRange(medicineRecipes.Where(rec
=> !model.MedicineRecipes.ContainsKey(rec.RecipeId)));
foreach (var recipe in medicineRecipes)
{
model.MedicineRecipes.Remove(recipe.RecipeId);
}
context.SaveChanges();
}
var medicine = context.Medicines.First(x => x.Id == Id);
foreach (var pc in model.MedicineRecipes)
{
context.RecipeMedicines.Add(new RecipeMedicine
{
Medicine = medicine,
Recipe = context.Recipes.First(x => x.Id == pc.Key),
});
context.SaveChanges();
}
_medicineRecipes = null;
}
}
}

View File

@ -14,8 +14,8 @@ namespace HospitalDatabaseImplement.Models
public class Patient : IPatientModel
{
public int Id { get; set; }
public int DoctorId { get; private set; }
[Required]
public int DoctorId { get; private set; }
public virtual Doctor Doctor { get; set; }
@ -32,7 +32,13 @@ namespace HospitalDatabaseImplement.Models
private Dictionary<int, IRecipeModel>? _patientRecipes = null;
[NotMapped]
[ForeignKey("PatientId")]
public virtual List<PatientProcedure> Procedures { get; set; } = new();
[ForeignKey("PatientId")]
public virtual List<PatientRecipe> Recipes { get; set; } = new();
/*[NotMapped]
public Dictionary<int, IRecipeModel> PatientRecipes
{
get
@ -43,11 +49,9 @@ namespace HospitalDatabaseImplement.Models
}
return _patientRecipes;
}
}
[ForeignKey("PatientId")]
public virtual List<PatientRecipe> Recipes { get; set; } = new();
}*/
private Dictionary<int, IProcedureModel>? _patientProcedures = null;
[NotMapped]
@ -63,9 +67,7 @@ namespace HospitalDatabaseImplement.Models
}
}
[ForeignKey("PatientId")]
public virtual List<PatientProcedure> Procedures { get; set; } = new();
public static Patient Create(HospitalDatabase context, PatientBindingModel model)
{
return new Patient()
@ -77,10 +79,6 @@ namespace HospitalDatabaseImplement.Models
BirthDate = model.BirthDate,
DoctorId = model.DoctorId,
Doctor = context.Doctors.First(x => x.Id == model.DoctorId),
Recipes = model.PatientRecipes.Select(x => new PatientRecipe
{
Recipe = context.Recipes.First(y => y.Id == x.Key),
}).ToList(),
Procedures = model.PatientProcedures.Select(x => new PatientProcedure
{
Procedure = context.Procedures.First(y => y.Id == x.Key),
@ -93,36 +91,44 @@ namespace HospitalDatabaseImplement.Models
FIO = model.FIO;
Address = model.Address;
BirthDate = model.BirthDate;
}
}
public PatientViewModel GetViewModel => new()
{
FIO = FIO,
Address = Address,
BirthDate = BirthDate,
PatientRecipes = PatientRecipes,
PatientProcedures = PatientProcedures
};
public void UpdateRecipes(HospitalDatabase context, PatientBindingModel model)
{
var patientRecipes = context.PatientRecipes.Where(rec => rec.PatientId == model.Id).ToList();
if (patientRecipes != null)
{ // удалили те, которых нет в модели
context.PatientRecipes.RemoveRange(patientRecipes.Where(rec => !model.PatientRecipes.ContainsKey(rec.RecipeId)));
context.SaveChanges();
}
var patient = context.Patients.First(x => x.Id == Id);
foreach (var pr in model.PatientRecipes)
{
context.PatientRecipes.Add(new PatientRecipe
{
Patient = patient,
Recipe = context.Recipes.First(x => x.Id == pr.Key),
});
context.SaveChanges();
}
_patientRecipes = null;
}
}
public void UpdateProcedures(HospitalDatabase context, PatientBindingModel model)
{
var servicePatients = context.PatientProcedures.Where(rec => rec.PatientId == model.Id).ToList();
if (servicePatients != null)
{ // удалили те, которых нет в модели
context.PatientProcedures.RemoveRange(servicePatients.Where(rec => !model.PatientProcedures.ContainsKey(rec.ProcedureId)));
context.SaveChanges();
foreach (var service in servicePatients)
{
model.PatientProcedures.Remove(service.ProcedureId);
}
context.SaveChanges();
}
var visit = context.Patients.First(x => x.Id == Id);
foreach (var pc in model.PatientProcedures)
{
context.PatientProcedures.Add(new PatientProcedure
{
Patient = visit,
Procedure = context.Procedures.First(x => x.Id == pc.Key),
});
context.SaveChanges();
}
_patientProcedures = null;
}
}
}

View File

@ -13,7 +13,7 @@ using HospitalDatabaseImplement.Modelss;
namespace HospitalDatabaseImplement.Models
{
// TODO переделать под все необходимые атрибуты фармацевту
public class Procedure : IProcedureModel
{
public int Id { get; set; }

View File

@ -30,23 +30,23 @@ namespace HospitalDatabaseImplement.Modelss
[Required]
public string Description { get; private set; } = string.Empty;
private Dictionary<int, IMedicineModel>? _recipeMedicines = null;
private Dictionary<int, IPatientModel>? _recipePatients = null;
[NotMapped]
public Dictionary<int, IMedicineModel> RecipeMedicines
public Dictionary<int, IPatientModel> RecipePatients
{
get
{
if (_recipeMedicines == null)
if (_recipePatients == null)
{
_recipeMedicines = Medicines.ToDictionary(recRM => recRM.MedicineId, recRM => (recRM.Medicine as IMedicineModel));
_recipePatients = Patients.ToDictionary(recRM => recRM.PatientId, recRM => (recRM.Patient as IPatientModel));
}
return _recipeMedicines;
return _recipePatients;
}
}
[ForeignKey("RecipeId")]
public virtual List<RecipeMedicine> Medicines { get; set; } = new();
public virtual List<PatientRecipe> Patients { get; set; } = new();
public static Recipe Create(HospitalDatabase context, RecipeBindingModel model)
{
@ -58,9 +58,9 @@ namespace HospitalDatabaseImplement.Modelss
DiseaseId = model.DiseaseId,
DoctorId = model.DoctorId,
Doctor = context.Doctors.First(x => x.Id == model.DoctorId),
Medicines = model.RecipeMedicines.Select(x => new RecipeMedicine
{
Medicine = context.Medicines.First(y => y.Id == x.Key),
Patients = model.RecipePatients.Select(x => new PatientRecipe
{
Patient = context.Patients.First(y => y.Id == x.Key),
}).ToList()
};
}
@ -75,28 +75,28 @@ namespace HospitalDatabaseImplement.Modelss
{
Id = Id,
IssueDate = IssueDate,
RecipeMedicines = RecipeMedicines
RecipePatients = RecipePatients
};
public void UpdateMedicines(HospitalDatabase context, RecipeBindingModel model)
public void UpdatePatients(HospitalDatabase context, RecipeBindingModel model)
{
var recipeMedicines = context.RecipeMedicines.Where(rec => rec.RecipeId == model.Id).ToList();
if (recipeMedicines != null)
var recipePatients = context.PatientRecipes.Where(rec => rec.RecipeId == model.Id).ToList();
if (recipePatients != null)
{ // удалили те, которых нет в модели
context.RecipeMedicines.RemoveRange(recipeMedicines.Where(rec => !model.RecipeMedicines.ContainsKey(rec.MedicineId)));
context.PatientRecipes.RemoveRange(recipePatients.Where(rec => !model.RecipePatients.ContainsKey(rec.PatientId)));
context.SaveChanges();
}
var recipe = context.Recipes.First(x => x.Id == Id);
foreach (var pr in model.RecipeMedicines)
foreach (var pr in model.RecipePatients)
{
context.RecipeMedicines.Add(new RecipeMedicine
{
context.PatientRecipes.Add(new PatientRecipe
{
Recipe = recipe,
Medicine = context.Medicines.First(x => x.Id == pr.Key),
Patient = context.Patients.First(x => x.Id == pr.Key),
});
context.SaveChanges();
}
_recipeMedicines = null;
_recipePatients = null;
}
}
}

View File

@ -0,0 +1,52 @@
using System.Net.Http.Headers;
using System.Text;
using HospitalContracts.ViewModels;
using Newtonsoft.Json;
namespace HospitalDoctorApp
{
public class APIClient
{
private static readonly HttpClient _doctor = new();
public static DoctorViewModel? Doctor { get; set; } = null;
public static void Connect(IConfiguration configuration)
{
_doctor.BaseAddress = new Uri(configuration["IPAddress"]);
_doctor.DefaultRequestHeaders.Accept.Clear();
_doctor.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
}
public static T? GetRequest<T>(string requestUrl)
{
var response = _doctor.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 = _doctor.PostAsync(requestUrl, data);
var result = response.Result.Content.ReadAsStringAsync().Result;
if (!response.Result.IsSuccessStatusCode)
{
throw new Exception(result);
}
}
}
}

View File

@ -0,0 +1,165 @@
using HospitalContracts.BindingModels;
using HospitalContracts.ViewModels;
using HospitalDoctorApp.Models;
using Microsoft.AspNetCore.Mvc;
using System.Diagnostics;
namespace HospitalDoctorApp.Controllers
{
public class HomeController : Controller
{
private readonly ILogger<HomeController> _logger;
public HomeController(ILogger<HomeController> logger)
{
_logger = logger;
}
[HttpGet]
public IActionResult CreatePatient()
{
return View();
}
[HttpGet]
public IActionResult CreateDisease()
{
return View();
}
[HttpGet]
public IActionResult CreateRecipe()
{
return View();
}
public IActionResult Index()
{
if (APIClient.Doctor == null)
{
return Redirect("~/Home/Enter");
}
return
View(APIClient.GetRequest<List<PatientViewModel>>($"api/visit/getpatients?doctorId={APIClient.Doctor.Id}"));
}
public IActionResult IndexRecipes()
{
if (APIClient.Doctor == null)
{
return Redirect("~/Home/Enter");
}
return
View(APIClient.GetRequest<List<RecipeViewModel>>($"api/animal/getrecipelist?doctorId={APIClient.Doctor.Id}"));
}
public IActionResult IndexDiseases()
{
if (APIClient.Doctor == null)
{
return Redirect("~/Home/Enter");
}
return
View(APIClient.GetRequest<List<DiseaseViewModel>>($"api/disease/getdiseases?diseaseId={APIClient.Doctor.Id}"));
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
#region Вход и регистрация
[HttpGet]
public IActionResult Register()
{
return View();
}
[HttpGet]
public IActionResult Privacy()
{
if (APIClient.Doctor == null)
{
return Redirect("~/Home/Enter");
}
return View(APIClient.Doctor);
}
[HttpGet]
public IActionResult Enter()
{
return View();
}
[HttpPost]
public void Privacy(string login, string email, string password, string fio, string telephone)
{
if (APIClient.Doctor == null)
{
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
}
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(fio))
{
throw new Exception("Введите логин, пароль и ФИО");
}
APIClient.PostRequest("api/doctor/updatedata", new DoctorBindingModel
{
Id = APIClient.Doctor.Id,
FIO = fio,
Login = login,
Password = password,
MailAddress = email,
PhoneNumber = telephone
});
APIClient.Doctor.FIO = fio;
APIClient.Doctor.Login = login;
APIClient.Doctor.Password = password;
APIClient.Doctor.MailAddress = email;
APIClient.Doctor.PhoneNumber = telephone;
Response.Redirect("Index");
}
[HttpPost]
public void Register(string login, string email, string password, string fio, string telephone)
{
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(fio))
{
throw new Exception("Введите логин, пароль и ФИО");
}
APIClient.PostRequest("api/doctor/register", new DoctorBindingModel
{
FIO = fio,
Login = login,
Password = password,
MailAddress = email,
PhoneNumber = telephone
});
Response.Redirect("Enter");
return;
}
[HttpPost]
public void Enter(string login, string password)
{
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password))
{
throw new Exception("Введите логин и пароль");
}
APIClient.Doctor = APIClient.GetRequest<DoctorViewModel>($"api/doctor/login?login={login}&password={password}");
if (APIClient.Doctor == null)
{
throw new Exception("Неверный логин/пароль");
}
Response.Redirect("Index");
}
#endregion
}
}

View File

@ -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.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HospitalContracts\HospitalContracts.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,9 @@
namespace HospitalDoctorApp.Models
{
public class ErrorViewModel
{
public string? RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
}
}

View File

@ -0,0 +1,29 @@
using HospitalDoctorApp;
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();

View File

@ -0,0 +1,28 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:22150",
"sslPort": 44369
}
},
"profiles": {
"HospitalDoctorApp": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7242;http://localhost:5089",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -0,0 +1,28 @@
@{
ViewData["Title"] = "CreateDisease";
}
<head>
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
</head>
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
<input type="text"
placeholder="Введите название болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
<input type="text"
placeholder="Введите описание болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-align-right u-form-group u-form-submit u-label-top">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
</div>
</form>

View File

@ -0,0 +1,28 @@
@{
ViewData["Title"] = "CreateDisease";
}
<head>
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
</head>
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
<input type="text"
placeholder="Введите название болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
<input type="text"
placeholder="Введите описание болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-align-right u-form-group u-form-submit u-label-top">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
</div>
</form>

View File

@ -0,0 +1,35 @@
@{
ViewData["Title"] = "CreatePatient";
}
<head>
<link rel="stylesheet" href="~/css/createpatient.css" asp-append-version="true" />
</head>
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">ФИО участника</label>
<input type="text"
placeholder="Введите ФИО"
name="fio"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Дата рождения</label>
<input type="date"
placeholder="Введите дату рождения"
name="birthdate"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Адрес</label>
<input type="text"
placeholder="Введите адрес "
name="address"
class="u-input u-input-rectangle" />
</div>
<div class="u-align-right u-form-group u-form-submit u-label-top">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
</div>
</form>

View File

@ -0,0 +1,51 @@
@{
ViewData["Title"] = "CreateRecipe";
}
<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="description" />
</div>
</div>
<div class="row">
<div class="col-4">Болезнь:</div>
<div class="col-8">
<select id="disease" name="disease" class="form-control" asp-items="@(new SelectList(@ViewBag.Diseases, "Id", "Name"))"></select>
</div>
</div>
<div class="row">
<div class="col-4">Дата назначения:</div>
<div class="col-8">
<input type="datetime" name="date" />
</div>
</div>
<div class="row">
<div class="col-8"></div>
<div class="col-4">
<input type="submit" value="Создать" class="btn btn-primary" />
</div>
</div>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
</form>
<script>
$('#disease').on('change', function () {
//check();
});
function check() {
if (snack) {
$.ajax({
method: "POST",
url: "/Home/GetDisease",
data: { disease: disease },
success: function (result) {
$("#disease").val(result);
}
});
};
}
</script>

View File

@ -0,0 +1,28 @@
@{
ViewData["Title"] = "CreateDisease";
}
<head>
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
</head>
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
<input type="text"
placeholder="Введите название болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
<input type="text"
placeholder="Введите описание болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-align-right u-form-group u-form-submit u-label-top">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
</div>
</form>

View File

@ -0,0 +1,28 @@
@{
ViewData["Title"] = "CreateDisease";
}
<head>
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
</head>
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
<input type="text"
placeholder="Введите название болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
<input type="text"
placeholder="Введите описание болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-align-right u-form-group u-form-submit u-label-top">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
</div>
</form>

View File

@ -0,0 +1,28 @@
@{
ViewData["Title"] = "CreateDisease";
}
<head>
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
</head>
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
<input type="text"
placeholder="Введите название болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
<input type="text"
placeholder="Введите описание болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-align-right u-form-group u-form-submit u-label-top">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
</div>
</form>

View File

@ -0,0 +1,35 @@
@{
ViewData["Title"] = "Enter";
}
<head>
<link rel="stylesheet" href="~/css/entry.css" asp-append-version="true" />
</head>
<div class="text-center">
<h2
class="u-text u-text-custom-color-1 u-text-default u-text-1"
>
Вход
</h2>
</div>
<form method="post">
<div class="u-form-group u-label-top u-form-group-1">
<label class="u-label u-text-custom-color-1 u-label-1">Электронная почта</label>
<input
type="text"
placeholder="Введите свой логин"
name="login"
class="u-input u-input-rectangle u-input-1"/>
</div>
<div class="u-form-group u-label-top u-form-group-2">
<label class="u-label u-text-custom-color-1 u-label-2">Пароль</label>
<input
type="password"
placeholder="Введите свой пароль"
name="password"
class="u-input u-input-rectangle u-input-2"/>
</div>
<div class="u-align-center u-form-group u-form-submit u-label-top" style="padding-bottom: 120px">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Войти" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1"/></div>
</div>
</form>

View File

@ -0,0 +1,63 @@
@using HospitalContracts.ViewModels
@model List<PatientViewModel>
@{
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="Update">Редактировать пациента</a>
<a asp-action="Delete">Удалить пациента</a>
<a asp-action="ServiceVisits">Связать пацииента и процедуру</a>
</p>
<p>
<a asp-action="Create">Создать пациента</a>
</p>
<table class="table">
<thead>
<tr>
<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.FIO)
</td>
<td>
@Html.DisplayFor(modelItem => item.Address)
</td>
</tr>
}
</tbody>
</table>
}
</div>

View File

@ -0,0 +1,62 @@
@using HospitalContracts.ViewModels
@model List<DiseaseViewModel>
@{
ViewData["Title"] = "IndexDiseases";
}
<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="UpdateAnimal">Редактировать болезнь</a>
<a asp-action="DeleteAnimal">Удалить болезнь</a>
</p>
<p>
<a asp-action="CreateAnimal">Создать болезнь</a>
</p>
<table class="table">
<thead>
<tr>
<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.Description)
</td>
</tr>
}
</tbody>
</table>
}
</div>

View File

@ -0,0 +1,63 @@
@using HospitalContracts.ViewModels
@model List<RecipeViewModel>
@{
ViewData["Title"] = "IndexRecipe";
}
<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="Update">Редактировать рецепт</a>
<a asp-action="Delete">Удалить рецепт</a>
<a asp-action="ServiceVisits">Связать рецепт и пациента</a>
</p>
<p>
<a asp-action="Create">Создать рецепт</a>
</p>
<table class="table">
<thead>
<tr>
<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.Description)
</td>
<td>
@Html.DisplayFor(modelItem => item.IssueDate)
</td>
</tr>
}
</tbody>
</table>
}
</div>

View File

@ -0,0 +1,28 @@
@{
ViewData["Title"] = "CreateDisease";
}
<head>
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
</head>
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
<input type="text"
placeholder="Введите название болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
<input type="text"
placeholder="Введите описание болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-align-right u-form-group u-form-submit u-label-top">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
</div>
</form>

View File

@ -0,0 +1,60 @@
@using HospitalContracts.ViewModels
@model DoctorViewModel
@{
ViewData["Title"] = "Privacy";
}
<head>
<link rel="stylesheet" href="~/css/register.css" asp-append-version="true" />
</head>
<div class="text-center">
<h2 class="u-text u-text-custom-color-1 u-text-default u-text-1"> Мои данные </h2>
</div>
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Логин</label>
<input type="text"
placeholder="Введите логин"
name="login"
value="@Model.Login"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Электронная почта</label>
<input type="email"
placeholder="Введите электронную почту"
name="email"
value="@Model.MailAddress"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-group u-label-top u-form-group-3">
<label class="u-label u-text-custom-color-1 u-label-3">ФИО</label>
<input type="text"
placeholder="Введите ФИО"
name="fio"
value="@Model.FIO"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-group u-label-top u-form-group-4">
<label class="u-label u-text-custom-color-1 u-label-4">Номер телефона</label>
<input type="text"
name="telephone"
class="u-input u-input-rectangle"
value="@Model.PhoneNumber"
placeholder="Введите номер телефона" />
</div>
<div class="u-form-group u-label-top u-form-group-5">
<label class="u-label u-text-custom-color-1 u-label-5">Пароль</label>
<input type="text"
placeholder="Введите пароль"
name="password"
value="@Model.Password"
class="u-input u-input-rectangle" />
</div>
<div class="u-align-center u-form-group u-form-submit u-label-top"
style="padding-bottom: 120px">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Изменить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
</div>
</form>

View File

@ -0,0 +1,51 @@
@{
ViewData["Title"] = "Register";
}
<head>
<link rel="stylesheet" href="~/css/register.css" asp-append-version="true" />
</head>
<div class="text-center">
<h2 class="u-text u-text-custom-color-1 u-text-default u-text-1"> Регистрация </h2>
</div>
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Логин</label>
<input type="text"
placeholder="Введите логин"
name="login"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Электронная почта</label>
<input type="email"
placeholder="Введите электронную почту"
name="email"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-group u-label-top u-form-group-3">
<label class="u-label u-text-custom-color-1 u-label-3">ФИО</label>
<input type="text"
placeholder="Введите ФИО"
name="fio"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-group u-label-top u-form-group-4">
<label class="u-label u-text-custom-color-1 u-label-4">Номер телефона</label>
<input type="text"
name="telephone"
class="u-input u-input-rectangle"
placeholder="Введите номер телефона" />
</div>
<div class="u-form-group u-label-top u-form-group-5">
<label class="u-label u-text-custom-color-1 u-label-5">Пароль</label>
<input type="password"
placeholder="Введите пароль"
name="password"
class="u-input u-input-rectangle" />
</div>
<div class="u-align-center u-form-group u-form-submit u-label-top"
style="padding-bottom: 120px">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Зарегистрироваться" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
</div>
</form>

View File

@ -0,0 +1,28 @@
@{
ViewData["Title"] = "CreateDisease";
}
<head>
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
</head>
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
<input type="text"
placeholder="Введите название болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
<input type="text"
placeholder="Введите описание болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-align-right u-form-group u-form-submit u-label-top">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
</div>
</form>

View File

@ -0,0 +1,28 @@
@{
ViewData["Title"] = "CreateDisease";
}
<head>
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
</head>
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
<input type="text"
placeholder="Введите название болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
<input type="text"
placeholder="Введите описание болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-align-right u-form-group u-form-submit u-label-top">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
</div>
</form>

View File

@ -0,0 +1,28 @@
@{
ViewData["Title"] = "CreateDisease";
}
<head>
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
</head>
<form method="post">
<div class="u-form-group u-form-name u-label-top">
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
<input type="text"
placeholder="Введите название болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-form-email u-form-group u-label-top">
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
<input type="text"
placeholder="Введите описание болезни"
name="conferenceName"
class="u-input u-input-rectangle" />
</div>
<div class="u-align-right u-form-group u-form-submit u-label-top">
<div class="col-8"></div>
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
</div>
</form>

View File

@ -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>

View File

@ -0,0 +1,61 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - HospitalDoctorApp</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="~/HospitalDoctorApp.styles.css" asp-append-version="true" />
</head>
<body>
<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">HospitalDoctorApp</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-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-smrow-reverse">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="IndexRecipes">Рецепты</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="IndexDiseases">Болезни</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Index">Пациенты</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Privacy">Личные данные</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Enter">Вход</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Register">Регистрация</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">
&copy; 2024 - HospitalDoctorApp - <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>
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>

View File

@ -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;
}

View File

@ -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>

View File

@ -0,0 +1,3 @@
@using HospitalDoctorApp
@using HospitalDoctorApp.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@ -0,0 +1,3 @@
@{
Layout = "_Layout";
}

View File

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"IPAddress": "http://localhost:5092/"
}

View File

@ -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

View File

@ -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.

View File

@ -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.

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

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

Some files were not shown because too many files have changed in this diff Show More