Commit cbdb40d0 authored by hasan khaddour's avatar hasan khaddour

fix s

parent f329fd46
using ApplicationCore.DomainModel;
using ApplicationCore.Interfaces;
using ApplicationDomain.Entities;
using Microsoft.AspNetCore.Authorization;
using AutoMapper;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace WebPresentation.Controllers
......@@ -15,7 +12,10 @@ namespace WebPresentation.Controllers
public class CRUDController<T> : BaseController where T : DomainBase
{
protected readonly IService<T> _service;
public CRUDController(UserManager<User> userManager, IService<T> service)
public CRUDController(
UserManager<User> userManager,
IService<T> service
)
:base(userManager)
{
......@@ -60,7 +60,7 @@ namespace WebPresentation.Controllers
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
// [ValidateAntiForgeryToken]
public IActionResult DeleteConfirmed(int id)
{
_service.Delete(id);
......
using ApplicationDomain.Entities;
using ApplicationCore.Interfaces.IServices;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using ApplicationCore.DomainModel;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace WebPresentation.Controllers
{
......@@ -24,9 +20,11 @@ namespace WebPresentation.Controllers
}
public async Task<IActionResult> GetIngredients()
{
var s = await _service.GetAll();
return Ok(s);
}
}
}
......@@ -67,39 +67,96 @@ namespace WebPresentation.Controllers
}
//[HttpGet]
//public IActionResult AddMedicine(int id)
//{
// var all = _medicineService.GetAll();
// ViewBag.MedicalStateId = id;
// return View(all);
//}
//[HttpPost]
//[ActionName("AddMedicine")]
//public IActionResult AddMedicineT(int id, int med)
//{
// _medicineService.AddToMedicalState(new MedicalStateMedicineModel{MedicalStateId=id ,MedicineId=med });
// return RedirectToAction("Details", "MedicalState", new { Id = id });
//}
//[ActionName("RemoveMedicine")]
//public IActionResult RemoveMedicinej(int id, int med)
//{
// _medicineService.RemoveFromMedicalState(new MedicalStateMedicineModel { MedicalStateId = id, MedicineId = med });
// return RedirectToAction("Details", "MedicalState", new { Id = id });
//}
#region json
[HttpGet]
public IActionResult AddMedicine(int id)
{
var all = _medicineService.GetAll();
ViewBag.MedicalStateId = id;
return View(all);
public JsonResult GetMedicalStateMedicine(int id) {
var r = _medicalStateService.GetDetails(id).Result.Medicines;
return Json(r);
}
[HttpPost]
public IActionResult AddMedicine(int id, int med)
public JsonResult AddMedicine([FromBody]MedicalStateMedicineModel medicalStateMedicineModel)
{
_medicineService.AddToMedicalState(new MedicalStateMedicineModel{MedicalStateId=id ,MedicineId=med });
try
{
_medicineService.AddToMedicalState(medicalStateMedicineModel);
return RedirectToAction("Details", "MedicalState", new { Id = id });
return Json("Added");
}
catch
{
return Json("faild");
}
}
[HttpPost]
public IActionResult RemoveMedicine(int id, int med)
public JsonResult RemoveMedicine([FromBody]MedicalStateMedicineModel medicalStateMedicineModel)
{
_medicineService.RemoveFromMedicalState(new MedicalStateMedicineModel { MedicalStateId = id, MedicineId = med });
_medicineService.RemoveFromMedicalState(medicalStateMedicineModel);
return RedirectToAction("Details", "MedicalState", new { Id = id });
return Json("Reomved");
}
#region json
[Authorize(Roles = "patient")]
public async Task<JsonResult> GetDetails(int? id)
{
if (id is null)
{
return Json("");
}
else
{
MedicineModel TModel = await _medicineService.GetDetails((int)id);
if (TModel is null)
return Json("");
return Json(TModel);
}
}
[Authorize(Roles = "patient")]
[HttpGet]
public JsonResult GetMedicalStateMedicine(int id) {
var r = _medicalStateService.GetDetails(id).Result.Medicines;
return Json(r);
public JsonResult GetMedicines()
{
var all = _medicineService.GetAll().Result;
return new JsonResult(all);
}
#endregion json
}
}
......@@ -4,13 +4,8 @@ using ApplicationCore.Interfaces.IServices;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using ApplicationCore.DomainModel;
using System.Threading.Tasks;
namespace WebPresentation.Controllers
{
......@@ -38,101 +33,41 @@ namespace WebPresentation.Controllers
[Authorize(Roles = "Admin")]
public IActionResult AddIngredints(int id ) {
var s = _ingredientService.GetAll().Result;
ViewBag.MedicineId = id;
return View(s);
}
[Authorize(Roles = "Admin")]
public IActionResult GetIngredints(int id)
{
var s = _ingredientService.GetAll().Result;
ViewBag.MedicineId = id;
return Ok(s);
}
[Authorize(Roles = "Admin")]
public IActionResult ReomveIngredints(int id ,int ing )
[HttpPost]
public IActionResult ReomveIngredient([FromBody] MedicineIngredientModel medicineIngredientModel)
{
_ingredientService.RemoveFromMedicine(new MedicineIngredientModel {IngredientId=ing , MedicineId=id });
_ingredientService.RemoveFromMedicine(medicineIngredientModel);
return Ok(new {message = "removed" });
}
[Authorize(Roles = "Admin")]
[HttpPost]
public IActionResult AddIngredintsT( MedicineIngredientModel medicineIngredientModel)
public async Task<IActionResult> AddIngredints([FromBody] MedicineIngredientModel medicineIngredientModel)
{
_ingredientService.AddToMedicine(medicineIngredientModel);
await _ingredientService.AddToMedicine(medicineIngredientModel);
return Ok(new { message = "added"});
}
[Authorize(Roles = "Admin")]
[HttpPost]
public IActionResult AddIngredints(int id , int med ,int ratio )
{
_ingredientService.AddToMedicine(new MedicineIngredientModel {Id=id ,MedicineId=med ,Ratio=ratio });
return RedirectToAction("Details","Medicine", new { Id = med}) ;
}
#region json
[Authorize(Roles ="patient")]
public async Task<JsonResult> GetDetails(int? id)
{
if (id is null)
{
return Json("");
}
else
{
MedicineModel TModel = await _service.GetDetails((int)id);
if (TModel is null)
return Json("");
return Json(TModel);
}
}
[Authorize(Roles = "patient")]
[HttpGet]
public JsonResult GetMedicines()
{
var all = _medicineService.GetAll().Result;
return new JsonResult(all);
}
[Authorize(Roles = "patient")]
[HttpPost]
public JsonResult AddMedicineT(int id, int med)
{
try
{
((IMedicineService)_service).AddToMedicalState(new MedicalStateMedicineModel { MedicalStateId = id, MedicineId = med });
return Json("Added");
}
catch
{
return Json("faild");
}
}
[Authorize(Roles = "patient")]
[HttpPost]
public JsonResult RemoveMedicineJ(int id, int med)
{
((IMedicineService)_service).RemoveFromMedicalState(new MedicalStateMedicineModel { MedicalStateId = id, MedicineId = med });
return Json("Reomved");
}
//[Authorize(Roles = "Admin")]
//public IActionResult AddIngredints(int id)
//{
// var s = _ingredientService.GetAll().Result;
// ViewBag.MedicineId = id;
// return View(s);
//}
//[Authorize(Roles = "Admin")]
//[HttpPost]
//public IActionResult AddIngredints(int id, int med, int ratio)
//{
// _ingredientService.AddToMedicine(new MedicineIngredientModel { Id = id, MedicineId = med, Ratio = ratio });
// return RedirectToAction("Details", "Medicine", new { Id = med });
//}
#endregion json
......
......@@ -5,9 +5,9 @@ using WebPresentation.ViewModels;
namespace ApplicationCore.Mappere
{
public class ObjectMapper : Profile
public class ViewModelObjectMapper : Profile
{
public ObjectMapper()
public ViewModelObjectMapper()
{
CreateMap<MedicineViewModel, MedicineModel>()
.ForMember(dest => dest.Category, opt => opt.MapFrom(src => src.Category))
......
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
namespace WebPresentation.Midlewares
{
public class ExceptionHandler
{
private readonly RequestDelegate _next;
public ExceptionHandler(RequestDelegate next)
{
_next = next;
}
public async Task InvokeAsync(HttpContext httpContext)
{
try
{
await _next(httpContext);
}
catch (Exception ex)
{
}
}
}
}
......@@ -19,6 +19,7 @@ using ApplicationCore.DomainModel;
using ApplicationCore.Mapper;
using System;
using Microsoft.AspNetCore.Http;
using ApplicationCore.Mappere;
namespace WebPresentation
{
......@@ -50,7 +51,7 @@ namespace WebPresentation
});
services.AddAutoMapper(typeof(ObjectMapper));
services.AddAutoMapper(typeof(ObjectMapper),typeof(ViewModelObjectMapper));
#region ADD Scoped Repository
services.AddScoped(typeof(IUnitOfWork<>),typeof(UnitOfWork<>));
......@@ -108,7 +109,16 @@ namespace WebPresentation
options.AccessDeniedPath = "/access/login";
options.SlidingExpiration = true;
});
services.Configure<IdentityOptions>(options =>
{
// Password settings.
options.Password.RequireDigit = false;
options.Password.RequireLowercase = false;
options.Password.RequireNonAlphanumeric = false;
options.Password.RequireUppercase = false;
options.Password.RequiredLength = 6;
options.Password.RequiredUniqueChars = 1;
});
services.AddAuthorization(
);
......
......@@ -35,25 +35,26 @@
</div>
<div class="col-10">
<div class="card-body p-4">
<h6>Information</h6>
<h6> Information:</h6>
<hr class="mt-0 mb-4">
<div class="row pt-1">
<div class="col-8 mb-3">
<div class="col-6 mb-3">
<h6>Description</h6>
<p class="text">@Model.StateDescription</p>
</div>
<div class="col-8 mb-3">
<div class="col-4 mb-3">
<h6>Medicines Count:@Model.Medicines.Count()</h6>
<a class="btn btn-primary m-1" asp-controller="MedicalState" asp-action="AddMedicine" asp-route-id="@Model.Id">Add Medicine</a>
<a class="btn btn-primary m-1" asp-controller="MedicalState" asp-action="Edit" asp-route-id="@Model.Id">Edit</a>
<a class="btn btn-danger m-1" asp-controller="MedicalState" asp-action="Delete" asp-route-id="@Model.Id">Delete</a>
<button class="btn btn-danger" ondblclick='DeleteConfirm("Delete Confirm", "Are you sure you want to delete @Model.StateName From your medical Cases", "Reomve",@Model.Id)'>Delete Confirm</button>
</div>
</div>
<h6>Medicines : </h6>
<hr class="mt-0 mb-4">
<div class="row pt-1">
<table class="table table-bordered">
<table id="Ingredients_" class="table table-bordered">
<thead>
<tr>
<td>#</td>
......@@ -67,7 +68,7 @@
</tr>
</thead>
<tbody id="Ingredients_">
<tbody id="cc">
@foreach (var ing in Model.Medicines)
{
<tr class=" mb-3">
......@@ -78,7 +79,7 @@
<td>@ing.Dosage</td>
<td>@ing.ManufactureName</td>
<td>
<button class="btn btn-danger" ondblclick="ReomveMedicine(@ing.Id)">Delete</button>
<button class="btn btn-danger" ondblclick='DeleteConfirm("Delete Confirm", "Are you sure you want to delete @ing.TradeName From this medical Case" , "ReomveMedicine" ,@ing.Id)'>Delete</button>
<button class="btn btn-primary" onclick="DetailMedicine( @ing.Id)">Details</button>
</td>
......@@ -90,32 +91,15 @@
<div class="row pt-1">
<div class="col-6 mb-3">
<h6>Go To list </h6>
<a asp-action="Index">Back to List</a>
<a asp-action="Index">GO Back </a>
</div>
</div>
<hr />
<div class="row pt-1">
<table id="g" class="tabl table-bordered ">
<thead>
<tr class="mb-3">
<td>ID</td>
<td>tradeName</td>
<td>description</td>
<td>price</td>
<td>dosage</td>
<td>Manufacture Name </td>
<td>
Manage
</td>
</tr>
</thead>
<tbody id="medicines-table"></tbody>
</table>
<button onclick="fetchMedicines()" class="btn btn-primary">Get All Medicine </button>
</div>
</div>
</div>
......@@ -126,19 +110,54 @@
</div>
</section>
<section class="page-section mb-4 mt-4">
<section style="background-color: #f4f5f7;">
<div class="container h-100">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col">
<div class="row g-0">
<div id="mod">
<div class="row d-flex justify-content-center align-items-center h-100">
<div id="medicines-table">
</div>
</div>
</div>
</div>
</div>
</div>
</section>
@section Scripts {
<div class="modal fade" id="item" tabindex="-1" aria-labelledby="label-" role="dialog"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header border-bottom-0">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">
<i class="fas fa-times"></i>
</span>
</button>
</div>
<div class="modal-body text-start p-3">
<h5 class="modal-title text-uppercase mb-5" id="exampleModalLabel">title</h5>
<p class=" mb-5"> message</p>
<hr class="mt-2 mb-4"
style="height: 0; background-color: transparent; opacity: .75; border-top: 2px dashed #9e9e9e;">
<div class="modal-footer d-flex justify-content-center border-top-0 py-4">
<button class="btn btn-info" data-dismiss="modal" aria-label="Close">Close</button>
</div>
</div>
</div>
</div>
</div>
@section Scripts {
<script>
async function fetchMedicines() {
try {
debugger
let response = await fetch('/Medicine/GetMedicines'); // Adjust the endpoint as needed
let response = await fetch('/MedicalState/GetMedicines'); // Adjust the endpoint as needed
if (response.ok) {
let medicines = await response.json();
populateTable(medicines, 'medicines-table');
......@@ -165,12 +184,28 @@
console.error('Fetch error:', error);
}
}
function populateTable(medicines,tableName) {
let tableBody = document.querySelector('#' + tableName);
tableBody.innerHTML = ''; // Clear any existing rows
tableBody.innerHTML = `
<table class="table">
<thead>
<tr class="mb-3">
<td>ID</td>
<td>tradeName</td>
<td>description</td>
<td>price</td>
<td>dosage</td>
<td>Manufacture Name </td>
<td>
Manage
</td>
</tr>
</thead ><tbody id="b"> </tbody></table>`;
tableBody = document.querySelector('#b');
medicines.forEach(medicine => {
let row = document.createElement('tr');
......@@ -206,18 +241,17 @@
tableBody.appendChild(row);
});
}
async function addMedicine(med) {
let id =@Model.Id
let id =@Model.Id;
try {
// showToast('Loading ... ', 'Adding medicine');
showToast('Loading ... ', 'Adding medicine');
let response = await fetch(`/Medicine/AddMedicineT?id=${id}&med=${med}`, {
let response = await fetch(`/MedicalState/AddMedicine`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ id: id, med: med }) // Adjust the body as needed
body: JSON.stringify({ MedicalStateId: id, MedicineId: med }) // Adjust the body as needed
});
if (response.ok) {
......@@ -237,7 +271,7 @@
let id =@Model.Id
try {
debugger
let response = await fetch(`/Medicine/GetDetails/${med}`, {
let response = await fetch(`/MedicalState/GetDetails/${med}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
......@@ -257,18 +291,18 @@
showToast('Failed to add medicine', 'Error');
}
}
async function ReomveMedicine(med) {
let id =@Model.Id
debugger
try {
// showToast('Loading ... ', 'Removing medicine');
let response = await fetch(`/Medicine/RemoveMedicineJ?id=${id}&med=${med}`, {
let response = await fetch(`/MedicalState/RemoveMedicine`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ id: id, med: med }) // Adjust the body as needed
body: JSON.stringify({ MedicalStateId: id, MedicineId: med }) // Adjust the body as needed
});
if (response.ok) {
......@@ -286,15 +320,75 @@
showToast('Failed to remove medicine', 'Error');
}
}
async function DeleteConfirm(id ) {
async function Reomve(med) {
debugger
try {
// showToast('Loading ... ', 'Removing medicine');
let response = await fetch(`/MedicalState/Delete/${med}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
});
if (response.ok) {
// let result = await response.json();
document.location.href="/MedicalState/"
showToast('Medicine Reomved successfully', 'Success');
} else {
console.error('Error:', response.statusText);
showToast('Failed to remove medicine', 'Error');
}
} catch (error) {
console.error('Fetch error:', error);
showToast('Failed to remove medicine', 'Error');
}
}
async function DeleteConfirm(title, message, action,param) {
debugger
const modalBody = document.querySelector('#mod');
modalBody.innerHTML = `
<div class="modal fade" id="item" tabindex="-1" aria-labelledby="label-" role="dialog"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header border-bottom-0">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">
<i class="fas fa-times"></i>
</span>
</button>
</div>
<div class="modal-body text-start p-3">
<h5 class="modal-title text-uppercase mb-5" id="exampleModalLabel">${title}</h5>
<p class=" mb-5"> ${message}</p>
<hr class="mt-2 mb-4"
style="height: 0; background-color: transparent; opacity: .75; border-top: 2px dashed #9e9e9e;">
<div class="modal-footer d-flex justify-content-center border-top-0 py-4">
<button class="btn btn-danger" onclick="${action}(${param})">Delete</button>
<button class="btn btn-info" class="close" data-dismiss="modal" aria-label="Close">Close</button>
</div>
</div>
</div>
</div> `;
// Show the modal
const medicineModal = new bootstrap.Modal(document.getElementById('item'));
medicineModal.show();
}
function showToast(message, title) {
// const Modal = new bootstrap.Modal(document.getElementById('item'));
const Modal = new bootstrap.Modal(document.getElementById('item'));
// Modal.close();
// Modal.hide();
if (Modal) Modal.hide();
// Modal.toggle();
//Modal.dispose();
const modalBody = document.querySelector('#mod');
const modalBody = document.querySelector('#item');
modalBody.innerHTML = `
<div class="modal fade" id="item" tabindex="-1" aria-labelledby="label-" role="dialog"
aria-hidden="true">
......@@ -329,6 +423,10 @@
}
function showModal(message, result) {
debugger
const Modal = new bootstrap.Modal(document.getElementById('item'));
// Modal.close();
try { Modal.hide(); } catch { }
let m = result["manufactureName"]
console.log(m)
var s = result.medicineIngredients
......@@ -346,7 +444,7 @@
<p class="text-muted mb-0">${s[i].ratio}</p>
</div>
`}
const modalBody = document.querySelector('#mod');
const modalBody = document.querySelector('#item');
modalBody.innerHTML = `
<div class="modal fade" id="item" tabindex="-1" aria-labelledby="label-" role="dialog"
aria-hidden="true">
......@@ -400,4 +498,4 @@
}
</script>
}
}
......@@ -33,7 +33,7 @@
<p class="text-muted">@Model.Description</p>
</div>
<div class="col-6 mb-3">
<h6>Medicine Type:@Model.MedicineType?.TypeName</h6>
<h6>Type:@Model.MedicineType?.TypeName</h6>
<p class="text-muted">Dosage : @Model.Dosage</p>
<p class="text-muted">Price : @Model.Price</p>
</div>
......@@ -41,12 +41,13 @@
<h6>Ingredients : </h6>
<hr class="mt-0 mb-4">
<div class="row pt-1">
<table class="table table-bordered">
<table id="Ingredients_" class="table table-bordered">
<thead>
<tr>
<td>#</td>
<td>Name</td>
<td>Description</td>
<td>Manage</td>
</tr>
</thead>
<tbody>
......@@ -56,6 +57,10 @@
<td>@(a+=1)</td>
<td>@ing.Name</td>
<td>@ing.Description</td>
<td>
<button class="btn btn-danger" ondblclick='DeleteConfirm("Delete Confirm", "Are you sure you want to delete @ing.Name From this medicine", "ReomveIngredient",@ing.Id)'>Delete</button>
</td>
</tr>
}
</tbody>
......@@ -75,8 +80,7 @@
<button class="btn btn-primary" onclick="fetchAll()">Get All Ingredients </button>
</div>
<div id="t">
</div>
</div>
</div>
......@@ -88,17 +92,23 @@
</div>
</section>
<section class="page-section mb-4 mt-4">
<div class="container h-100">
<div class="row d-flex justify-content-center align-items-center h-100">
<div id="mod">
<div id="t">
</div>
</div>
</div>
</section>
<div id="mod">
</div>
@section Scripts {
<script>
async function fetchAll() {
try {
debugger
let response = await fetch('/Medicine/GetIngredints'); // Adjust the endpoint as needed
let response = await fetch('/Ingredient/GetIngredients'); // Adjust the endpoint as needed
if (response.ok) {
let medicines = await response.json();
// showModal('',medicines);
......@@ -112,12 +122,11 @@
console.error('Fetch error:', error);
}
}
async function updateMedicines() {
let id =@Model.Id
async function updateIngredients() {
let id =@Model.Id;
try {
debugger
let response = await fetch(`/MedicalState/GetMedicalStateMedicine/?id=${id}`); // Adjust the endpoint as needed
let response = await fetch(`/Ingredient/GetIngredients`); // Adjust the endpoint as needed
if (response.ok) {
let medicines = await response.json();
populateTable(medicines, 'Ingredients_');
......@@ -140,6 +149,7 @@
<td>Name</td>
<td>Description</td>
<td>Manage</td>
</tr>
</thead ><tbody id="b"> </tbody></table>`;
......@@ -174,23 +184,57 @@
tableBody.innerHTML += ``;
}
function addIngredient(med) {
const modalBody = document.querySelector('#mod');
modalBody.innerHTML = `
<div class="modal fade" id="item" tabindex="-1" aria-labelledby="label-" role="dialog"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header border-bottom-0">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">
<i class="fas fa-times"></i>
</span>
</button>
</div>
<div class="modal-body text-start p-3">
<h5 class="modal-title text-uppercase mb-5" id="exampleModalLabel">chose the ratio</h5>
async function addIngredient(med) {
<p class=" mb-5"> what is the ratio </p>
<input type="number" value=1 id="r">
<hr class="mt-2 mb-4"
style="height: 0; background-color: transparent; opacity: .75; border-top: 2px dashed #9e9e9e;">
<div class="modal-footer d-flex justify-content-center border-top-0 py-4">
<button class="btn btn-info" onclick="addIngredientT(${med})">Add</button>
</div>
</div>
</div>
</div> `;
// Show the modal
const medicineModal = new bootstrap.Modal(document.getElementById('item'));
medicineModal.show();
}
async function addIngredientT(med) {
let id =@Model.Id
try {
var r;
prompt("what is the ratio", r);
let response = await fetch(`/Medicine/AddIngredintsT`, {
var r = document.getElementById('r').value;
console.log(r)
let response = await fetch(`/Medicine/AddIngredints`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ ingredientId: ing, medicineId: med ,ratio:r}) // Adjust the body as needed
body: JSON.stringify({ IngredientId: med , MedicineId:id ,Ratio:r}) // Adjust the body as needed
});
if (response.ok) {
let result = await response.json();
updateMedicines();
updateIngredients();
showToast('Medicine added successfully', 'Success');
} else {
console.error('Error:', response.statusText);
......@@ -226,17 +270,17 @@
}
}
async function ReomveMedicine(med) {
async function ReomveIngredient(med) {
let id =@Model.Id
try {
showToast('Loading ... ', 'Removing medicine');
let response = await fetch(`/Medicine/RemoveMedicineJ?id=${id}&med=${med}`, {
let response = await fetch(`/Medicine/ReomveIngredient`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ id: id, med: med }) // Adjust the body as needed
body: JSON.stringify({ MedicineId: id, IngredientId: med }) // Adjust the body as needed
});
if (response.ok) {
......@@ -254,9 +298,49 @@
showToast('Failed to remove medicine', 'Error');
}
}
async function DeleteConfirm(id ) {
async function DeleteConfirm(title, message, action, param) {
debugger
const modalBody = document.querySelector('#mod');
modalBody.innerHTML = `
<div class="modal fade" id="item" tabindex="-1" aria-labelledby="label-" role="dialog"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header border-bottom-0">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">
<i class="fas fa-times"></i>
</span>
</button>
</div>
<div class="modal-body text-start p-3">
<h5 class="modal-title text-uppercase mb-5" id="exampleModalLabel">${title}</h5>
<p class=" mb-5"> ${message}</p>
<hr class="mt-2 mb-4"
style="height: 0; background-color: transparent; opacity: .75; border-top: 2px dashed #9e9e9e;">
<div class="modal-footer d-flex justify-content-center border-top-0 py-4">
<button class="btn btn-danger" onclick="${action}(${param})">Delete</button>
<button class="btn btn-info" class="close" data-dismiss="modal" aria-label="Close">Close</button>
</div>
</div>
</div>
</div> `;
// Show the modal
const medicineModal = new bootstrap.Modal(document.getElementById('item'));
medicineModal.show();
}
function showToast(message, title) {
const Modal = new bootstrap.Modal(document.getElementById('item'));
// Modal.close();
try {
Modal.dispose();
} catch { }
const modalBody = document.querySelector('#mod');
modalBody.innerHTML = `
......
......@@ -27,7 +27,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Midlewares\Exception Handler\" />
<Folder Include="Filters\" />
<Folder Include="Services Consumers\" />
<Folder Include="Views\Patients\" />
</ItemGroup>
......
#pragma checksum "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "0f715de657dda20a32548f34631b9d9ede67ca8a"
#pragma checksum "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "504771db5529b84814966c894e163904dd9e44fe"
// <auto-generated/>
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Medicine_Details), @"mvc.1.0.view", @"/Views/Medicine/Details.cshtml")]
......@@ -46,7 +46,7 @@ using System;
#line default
#line hidden
#nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"0f715de657dda20a32548f34631b9d9ede67ca8a", @"/Views/Medicine/Details.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"504771db5529b84814966c894e163904dd9e44fe", @"/Views/Medicine/Details.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"00a5efe30164a0b2b148ed0b3ef352c1f6e80ba1", @"/Views/_ViewImports.cshtml")]
public class Views_Medicine_Details : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MedicineModel>
{
......@@ -103,7 +103,7 @@ using System;
<div class=""col-md-4 gradient-custom text-center text-black""
style=""border-top-left-radius: .5rem; border-bottom-left-radius: .5rem;"">
");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "0f715de657dda20a32548f34631b9d9ede67ca8a6860", async() => {
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "504771db5529b84814966c894e163904dd9e44fe6860", async() => {
}
);
__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
......@@ -145,7 +145,7 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
#line hidden
#nullable disable
WriteLiteral("</p>\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "0f715de657dda20a32548f34631b9d9ede67ca8a9226", async() => {
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "504771db5529b84814966c894e163904dd9e44fe9226", async() => {
WriteLiteral("\r\n <i class=\"far fa-edit mb-5\"></i>\r\n ");
}
);
......@@ -193,7 +193,7 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
#line default
#line hidden
#nullable disable
WriteLiteral("</p>\r\n </div>\r\n <div class=\"col-6 mb-3\">\r\n <h6>Medicine Type:");
WriteLiteral("</p>\r\n </div>\r\n <div class=\"col-6 mb-3\">\r\n <h6>Type:");
#nullable restore
#line 36 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
Write(Model.MedicineType?.TypeName);
......@@ -223,18 +223,19 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
<h6>Ingredients : </h6>
<hr class=""mt-0 mb-4"">
<div class=""row pt-1"">
<table class=""table table-bordered"">
<table id=""Ingredients_"" class=""table table-bordered"">
<thead>
<tr>
<td>#</td>
<td>Name</td>
<td>Description</td>
<td>Manage</td>
</tr>
</thead>
<tbody>
");
#nullable restore
#line 53 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
#line 54 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
foreach (var ing in Model.Ingredients)
{
......@@ -243,7 +244,7 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
#nullable disable
WriteLiteral(" <tr class=\" mb-3\">\r\n <td>");
#nullable restore
#line 56 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
#line 57 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
Write(a+=1);
#line default
......@@ -251,7 +252,7 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
#nullable disable
WriteLiteral("</td>\r\n <td>");
#nullable restore
#line 57 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
#line 58 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
Write(ing.Name);
#line default
......@@ -259,15 +260,46 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
#nullable disable
WriteLiteral("</td>\r\n <td>");
#nullable restore
#line 58 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
#line 59 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
Write(ing.Description);
#line default
#line hidden
#nullable disable
WriteLiteral("</td>\r\n </tr>\r\n");
WriteLiteral("</td>\r\n <td>\r\n <button class=\"btn btn-danger\"");
BeginWriteAttribute("ondblclick", " ondblclick=\'", 3401, "\'", 3537, 16);
WriteAttributeValue("", 3414, "DeleteConfirm(\"Delete", 3414, 21, true);
WriteAttributeValue(" ", 3435, "Confirm\",", 3436, 10, true);
WriteAttributeValue(" ", 3445, "\"Are", 3446, 5, true);
WriteAttributeValue(" ", 3450, "you", 3451, 4, true);
WriteAttributeValue(" ", 3454, "sure", 3455, 5, true);
WriteAttributeValue(" ", 3459, "you", 3460, 4, true);
WriteAttributeValue(" ", 3463, "want", 3464, 5, true);
WriteAttributeValue(" ", 3468, "to", 3469, 3, true);
WriteAttributeValue(" ", 3471, "delete", 3472, 7, true);
#nullable restore
#line 61 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
WriteAttributeValue(" ", 3478, ing.Name, 3479, 9, false);
#line default
#line hidden
#nullable disable
WriteAttributeValue(" ", 3488, "From", 3489, 5, true);
WriteAttributeValue(" ", 3493, "this", 3494, 5, true);
WriteAttributeValue(" ", 3498, "medicine\",", 3499, 11, true);
WriteAttributeValue(" ", 3509, "\"ReomveIngredient\",", 3510, 20, true);
#nullable restore
#line 60 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
#line 61 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
WriteAttributeValue("", 3529, ing.Id, 3529, 7, false);
#line default
#line hidden
#nullable disable
WriteAttributeValue("", 3536, ")", 3536, 1, true);
EndWriteAttribute();
WriteLiteral(">Delete</button>\r\n </td>\r\n\r\n </tr>\r\n");
#nullable restore
#line 65 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
}
#line default
......@@ -279,7 +311,7 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
<div class=""row pt-1"">
<div class=""col-6 mb-3"">
");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "0f715de657dda20a32548f34631b9d9ede67ca8a16149", async() => {
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "504771db5529b84814966c894e163904dd9e44fe17983", async() => {
WriteLiteral("Back to List");
}
);
......@@ -295,7 +327,7 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End();
WriteLiteral("\r\n\r\n </div>\r\n <div class=\"col-6 mb-3\">\r\n ");
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "0f715de657dda20a32548f34631b9d9ede67ca8a17467", async() => {
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "504771db5529b84814966c894e163904dd9e44fe19301", async() => {
WriteLiteral("Add Ingredients ");
}
);
......@@ -311,7 +343,7 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
}
BeginWriteTagHelperAttribute();
#nullable restore
#line 70 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
#line 75 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
WriteLiteral(Model.Id);
#line default
......@@ -335,8 +367,7 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
<button class=""btn btn-primary"" onclick=""fetchAll()"">Get All Ingredients </button>
</div>
<div id=""t"">
</div>
</div>
</div>
......@@ -348,11 +379,17 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
</div>
</section>
<section class=""page-section mb-4 mt-4"">
<div class=""container h-100"">
<div class=""row d-flex justify-content-center align-items-center h-100"">
<div id=""mod"">
<div id=""t"">
</div>
</div>
</div>
</section>
<div id=""mod"">
</div>
");
DefineSection("Scripts", async() => {
WriteLiteral(@"
......@@ -360,7 +397,7 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
async function fetchAll() {
try {
debugger
let response = await fetch('/Medicine/GetIngredints'); // Adjust the endpoint as needed
let response = await fetch('/Ingredient/GetIngredients'); // Adjust the endpoint as needed
if (response.ok) {
let medicines = await response.json();
// showModal('',medicines);
......@@ -374,20 +411,19 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
console.error('Fetch error:', error);
}
}
async function updateMedicines() {
async function updateIngredients() {
let id =");
#nullable restore
#line 116 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
#line 126 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
Write(Model.Id);
#line default
#line hidden
#nullable disable
WriteLiteral(@"
WriteLiteral(@";
try {
debugger
let response = await fetch(`/MedicalState/GetMedicalStateMedicine/?id=${id}`); // Adjust the endpoint as needed
let response = await fetch(`/Ingredient/GetIngredients`); // Adjust the endpoint as needed
if (response.ok) {
let medicines = await response.json();
populateTable(medicines, 'Ingredients_');
......@@ -410,13 +446,14 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
<td>Name</td>
<td>Description</td>
<td>Manage</td>
</tr>
</thead ><tbody id=""b""> </tbody></table>`;
tableB");
WriteLiteral(@"ody = document.querySelector('#b');
tableBody = document.querySelector('#b');
medicines.forEach(medicine => {
");
WriteLiteral(@" medicines.forEach(medicine => {
let row = document.createElement('tr');
row.classList = ""mb-3""
......@@ -445,11 +482,46 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
tableBody.innerHTML += ``;
}
function addIngredient(med) {
const modalBody = document.querySelector('#mod');
modalBody.i");
WriteLiteral(@"nnerHTML = `
<div class=""modal fade"" id=""item"" tabindex=""-1"" aria-labelledby=""label-"" role=""dialog""
aria-hidden=""true"">
<div class=""modal-dialog"">
<div class=""modal-content"">
<div class=""modal-header border-bottom-0"">
<button type=""button"" class=""close"" data-dismiss=""modal"" aria-label=""Close"">
<span aria-hidden=""true"">
<i class=""fas fa-times""></i>
</span>
</button>
</div>
<div class=""modal-body text-start p-3"">
<h5 class=""modal-title text-uppercase mb-5"" id=""exampleModalLabel"">chose the ratio</h5>
<p class="" mb-5""> what is the ratio </p>
<input type=""number"" value=1 id=""r"">
<hr class=""mt-2 mb-4""
style=""height: 0; back");
WriteLiteral(@"ground-color: transparent; opacity: .75; border-top: 2px dashed #9e9e9e;"">
<div class=""modal-footer d-flex justify-content-center border-top-0 py-4"">
<button class=""btn btn-info"" onclick=""addIngredientT(${med})"">Add</button>
</div>
</div>
</div>
</div> `;
// Show the modal
const medicineModal = new bootstrap.Modal(document.getElementById('item'));
medicineModal.show();
async function addIngredient(med) {
}
async function addIngredientT(med) {
let id =");
#nullable restore
#line 179 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
#line 222 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
Write(Model.Id);
#line default
......@@ -457,19 +529,20 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
#nullable disable
WriteLiteral(@"
try {
var r;
prompt(""what is the ratio"", r);
let response = await fetch(`/Medicine/AddIngredintsT`, {
var r = document.getElementById('r').value;
console.log(r)
let response = await fetch(`/Medicine/AddIngredints`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ ingredientId: ing, medicineId: med ,ratio:r}) // Adjust the body as needed
body: JSON.stringify({ IngredientId: med , MedicineId:id ,Ratio:r}) // Adjust the body as needed
});
if (response.ok) {
let result = await response.json();
updateMedicines();
updateIngredients();
showToast('Medicine added successfully', 'Success');
} else {
console.error('Error:', response.statusText);
......@@ -478,12 +551,10 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
} catch (error) {
console.error('Fetch error:', error);
showToast('Failed to add medicine', 'Error');
}
}
");
WriteLiteral(" async function DetailMedicine(med) {\r\n let id =");
");
WriteLiteral(" }\r\n }\r\n async function DetailMedicine(med) {\r\n let id =");
#nullable restore
#line 205 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
#line 249 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
Write(Model.Id);
#line default
......@@ -513,10 +584,10 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
}
}
async function ReomveMedicine(med) {
async function ReomveIngredient(med) {
let id =");
#nullable restore
#line 230 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
#line 274 "C:\Users\HASAN\Desktop\Medic\WebPresentation\Views\Medicine\Details.cshtml"
Write(Model.Id);
#line default
......@@ -526,12 +597,12 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
try {
showToast('Loading ... ', 'Removing medicine');
let response = await fetch(`/Medicine/RemoveMedicineJ?id=${id}&med=${med}`, {
let response = await fetch(`/Medicine/ReomveIngredient`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ id: id, med: med }) // Adjust the body as needed
body: JSON.stringify({ MedicineId: id, IngredientId: med }) // Adjust the body as needed
});
if (response.ok) {
......@@ -548,13 +619,55 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
console.error('Fetch error:', error);
showToast('Failed to remove medicine', 'Error');
}
} ");
}
");
WriteLiteral(@"
async function DeleteConfirm(id ) {
async function DeleteConfirm(title, message, action, param) {
debugger
const modalBody = document.querySelector('#mod');
modalBody.innerHTML = `
<div class=""modal fade"" id=""item"" tabindex=""-1"" aria-labelledby=""label-"" role=""dialog""
aria-hidden=""true"">
<div class=""modal-dialog"">
<div class=""modal-content"">
<div class=""modal-header border-bottom-0"">
<button type=""button"" class=""close"" data-dismiss=""modal"" aria-label=""Close"">
<span aria-hidden=""true"">
<i class=""fas fa-times""></i>
</span>
</button>
</div>
<div class=""modal-body text-start p-3"">
<h5 class=""modal-title text-uppercase mb-5"" id=""exampleModalLabel"">${title}</h5>
<p class="" mb-5""> ${message}");
WriteLiteral(@"</p>
<hr class=""mt-2 mb-4""
style=""height: 0; background-color: transparent; opacity: .75; border-top: 2px dashed #9e9e9e;"">
<div class=""modal-footer d-flex justify-content-center border-top-0 py-4"">
<button class=""btn btn-danger"" onclick=""${action}(${param})"">Delete</button>
<button class=""btn btn-info"" class=""close"" data-dismiss=""modal"" aria-label=""Close"">Close</button>
</div>
</div>
</div>
</div> `;
// Show the modal
const medicineModal = new bootstrap.Modal(document.getElementById('item'));
medicineModal.show();
}
function showToast(message, title) {
const Modal = new bootstrap.Modal(document.getElementById('item'));
// Modal.close();
try {
Modal.dispose();
} catch { }
const modalBody = document.querySelector('#mod');
const");
WriteLiteral(@" modalBody = document.querySelector('#mod');
modalBody.innerHTML = `
<div class=""modal fade"" id=""item"" tabindex=""-1"" aria-labelledby=""label-"" role=""dialog""
aria-hidden=""true"">
......@@ -570,11 +683,11 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
<div class=""modal-body text-start p-3"">
<h5 class=""modal-title text-uppercase mb-5"" id=""exampleModalLabel"">${title}</h5>
<p class="" mb-5"">");
WriteLiteral(@" ${message}</p>
<p class="" mb-5""> ${message}</p>
<hr class=""mt-2 mb-4""
style=""height: 0; background-color: transparent; opacity: .75; border-top: 2px dashed #9e9e9e;"">
style=""height: 0; background");
WriteLiteral(@"-color: transparent; opacity: .75; border-top: 2px dashed #9e9e9e;"">
<div class=""modal-footer d-flex justify-content-center border-top-0 py-4"">
<button class=""btn btn-info"" class=""close"" data-dismiss=""modal"" aria-label=""Close"">Close</button>
......@@ -598,9 +711,9 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
<tr class="" mb-3"">
<td>${s[i].name}</td>
");
WriteLiteral(@" <td>${s[i].description}</td>
<td>
<td>${s[i].description}</td>
");
WriteLiteral(@" <td>
<button class=""btn btn-info"" onclick=""addIngredient(${s[i].id})"">Add</button>
</td>
</tr>
......@@ -619,10 +732,10 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
<i class=""fas fa-times""></i>
</span>
</button>
</di");
WriteLiteral(@"v>
</div>
<div class=""modal-body text-start p-3"">
<h5 class=""modal-title text-uppercase mb-5"" id=""exampleModalLabel"">All Ingredients</h5>
<h5 class=""modal-title text-upper");
WriteLiteral(@"case mb-5"" id=""exampleModalLabel"">All Ingredients</h5>
<hr class=""mt-2 mb-4""
style=""height: 0; background-color: transparent; opacity: .75; border-top: 2px dashed #9e9e9e;"">
......@@ -641,10 +754,10 @@ AddHtmlAttributeValue("", 686, Model.Image, 686, 12, false);
</table>
<hr class=""mt-2 mb-4""
");
WriteLiteral(@" style=""height: 0; background-color: transparent; opacity: .75; border-top: 2px dashed #9e9e9e;"">
style=""height: 0; background-color: transparent; opacity: .75; border-top: 2px dashed #9e9e9e;"">
</div>
");
WriteLiteral(@" </div>
<div class=""modal-footer d-flex justify-content-center border-top-0 py-4"">
<button class=""btn btn-info"" class=""close"" data-dismiss=""modal"" aria-label=""Close"">Close</button>
......
54259885842f9a679afa2d3e67d7e5f82a2afd4c
706d978fbd9499230d73541f3c16aae883909a4e
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment