Commit dabd6158 authored by hasan khaddour's avatar hasan khaddour

update views

parent ba0e4980
......@@ -62,7 +62,7 @@
</div>
<!-- Portfolio Grid Items -->
<div class="row d-flex flex-wrap justify-content-sm-around">
<div class="row d-flex flex-wrap justify-content-sm-center">
@if (Model.Medicines.Count() == 0)
{
<h2 class="text-center">You dont have any Medicine</h2>
......@@ -73,13 +73,23 @@
{
<div class="card col-md-4 col-lg-4 m-1 " style="width: 10rem;">
<img class=" card-img-top mw-30 mh-30 card-img-top" style="height:250px;max-width:270px ;" src=@("/img/portfolio/" +item.Image ) ) alt="...">
<div class="card-body">
<h5 class="card-title">@item.Name</h5>
<p class="card-text">project cost : @item.Price</p>
<div class="col-lg-4">
<div class="card m-3">
<img src="/img/portfolio/@item.Image"
class="card-img-top img-fluid" style="max-height:250px "
alt="Waterfall" />
<div class="card-body">
<h5 class="card-title">@item.Name</h5>
<p class="card-text">
@item.Description
<br />
Price : @item.Price <br />
<a href="#" class="btn btn-primary" data-toggle="modal" data-target="#item-@(item.Id)">go to descriptiuon </a>
Type : @item.MedicineType
</p>
<a href="#" class="btn btn-primary" data-toggle="modal" data-target="#item-@(item.Id)">go to descriptiuon </a>
</div>
</div>
</div>}
</div>
......@@ -88,9 +98,14 @@
</div>
</section>
<section class="page-section bg-primary text-white mb-0" id="topThree">
<div >
<a class="text-white text-center" asp-controller="Home" asp-action="MedicinesGalary" asp-route-id="@Model.Id">Go to Add Medicine to your profile </a>
</div>
<div class="container-fluid">
<!-- Portfolio Section Heading -->
<h2 class=" page-section-heading text-center text-uppercase text-secondary mb-0">For more Medicine</h2><br/>
<h2 class="page-section-heading text-center text-bg-info text-secondary mb-0r"><a>Go to Add Medicine to your profile</a> </h2>
<!-- Icon Divider -->
</div>
</section>
<!-- Contact Section -->
......
......@@ -16,7 +16,7 @@
<img src="~/img/portfolio/@Model.Image"
alt="Avatar" class="img-fluid my-5" style="width: 80px;" />
<h5>@Model.Name</h5>
<p>For: @Model.Category.Name</p>
<p>For: @(Model.Category is null ? "":Model.Category.Name)</p>
<a asp-action="Edit" asp-route-id="@Model.Id">
<i class="far fa-edit mb-5"></i>
</a>
......@@ -47,13 +47,25 @@
<h6>Ingredients : </h6>
<hr class="mt-0 mb-4">
<div class="row pt-1">
@foreach (var ing in Model.Ingredients)
{
<div class=" mb-3">
<h6>@ing.Name @ing.Description </h6>
</div>
}
<table class="table table-bordered">
<thead>
<tr>
<td>#</td>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
@foreach (var ing in Model.Ingredients)
{
<tr class=" mb-3">
<td>@(a+=1)</td>
<td>@ing.Name</td>
<td>@ing.Description</td>
</tr>
}
</tbody>
</table>
</div>
<div class="row pt-1">
<div class="col-6 mb-3">
......@@ -62,11 +74,6 @@
</div>
</div>
<div class="d-flex justify-content-start">
<a href="#!"><i class="fab fa-facebook-f fa-lg me-3"></i></a>
<a href="#!"><i class="fab fa-twitter fa-lg me-3"></i></a>
<a href="#!"><i class="fab fa-instagram fa-lg"></i></a>
</div>
</div>
</div>
</div>
......
......@@ -16,7 +16,7 @@
<div class="col-lg-4">
<div class="card m-3">
<img src="/img/portfolio/@item.Image"
class="card-img-top "style="max-height:250px ; max-width:200px"
class="card-img-top img-fluid"style="max-height:250px "
alt="Waterfall" />
<div class="card-body">
<h5 class="card-title">@item.Name</h5>
......@@ -28,7 +28,7 @@
Type : @item.MedicineType
</p>
<a href="#!" data-mdb-ripple-init class="btn btn-primary">Add to my Profile</a>
<a asp-action="AddMedicine" asp-controller="Home" asp-route-id="@item.Id" data-mdb-ripple-init class="btn btn-primary">Add to my Profile</a>
</div>
</div>
</div>
......
@model ApplicationCore.Entities.Ingredient
@{
ViewData["Title"] = "Create";
Layout = "_AdminLayout";
}
<h1>Create</h1>
<h4>Ingredient</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="Name" class="control-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Description" class="control-label"></label>
<input asp-for="Description" class="form-control" />
<span asp-validation-for="Description" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
@model ApplicationCore.Entities.Ingredient
@{
ViewData["Title"] = "Delete";
Layout = "_AdminLayout";
}
<h1>Delete</h1>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>Ingredient</h4>
<hr />
<dl class="row">
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Name)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Description)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Description)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-danger" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>
@model ApplicationCore.Entities.Ingredient
@{
ViewData["Title"] = "Details";
Layout = "_AdminLayout";
}
<section class="vh-100" style="background-color: #f4f5f7;">
<div class="container py-5 h-100">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col col-lg-6 mb-4 mb-lg-0">
<div class="card mb-3" style="border-radius: .5rem;">
<div class="row g-0">
<div class="col-md-4 gradient-custom text-center text-black"
style="border-top-left-radius: .5rem; border-bottom-left-radius: .5rem;">
<img src="~/img/portfolio/instagram.png"
alt="Avatar" class="img-fluid my-5" style="width: 80px;" />
<h5>@Model.Name</h5>
<p>For: @Model.Medicines.Count()</p>
<a asp-action="Edit" asp-route-id="@Model.Id">
<i class="far fa-edit mb-5"></i>
</a>
<a asp-action="Index">
<i class="far fa-backward">
</i>
</a>
</div>
<div class="col-md-8">
<div class="card-body p-4">
<h6>Information</h6>
<hr class="mt-0 mb-4">
<div class="row pt-1">
<div class="col-6 mb-3">
<h6>Description</h6>
<p class="text-muted">@Model.Description</p>
</div>
<div class="col-6 mb-3">
<h6>Price</h6>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
@model ApplicationCore.Entities.Ingredient;
@{
ViewData["Title"] = "Edit";
Layout = "_AdminLayout";
}
<div style="padding:120px ;">
<h1>Edit</h1>
<h4>Project</h4>
<hr />
<div class="row p-120">
<div class="col-md-4">
<form asp-action="Edit" class="form-group ">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="Name" class="control-label "></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Description" class="control-label"></label>
<input asp-for="Description" class="form-control" />
<span asp-validation-for="Description" class="text-danger"></span>
</div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<input type="submit" value="Save" class="btn btn-primary" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
@model IEnumerable<ApplicationCore.Entities.Ingredient>
@{
ViewData["Title"] = "Index";
Layout = "_AdminLayout";
}
<div class="row">
<div class="col-xl-3 col-md-6">
<div class="card bg-primary text-white mb-4">
<div class="card-body">Ingredients Counts </div>
<div class="card-footer d-flex align-items-center justify-content-between">
<a class="small text-white stretched-link" href="#"> @Model.Count()</a>
<div class="small text-white"><i class="fas fa-angle-right"></i></div>
</div>
</div>
</div>
</div>
<div>
<table id="datatablesSimple" class="table">
<thead>
<tr>
<th scope="col">
@Html.DisplayNameFor(model => model.First().Id)
</th>
<th scope="col">
@Html.DisplayNameFor(model => model.First().Name)
</th>
<th scope="col">
@Html.DisplayNameFor(model => model.First().Description)
</th>
<th scope="col">
Manage
</th>
</tr>
</thead>
<tfoot>
<tr>
<th scope="row">ID</th>
<th> name</th>
<th>Description</th>
<th>Manage</th>
</tr>
</tfoot>
<tbody>
@foreach (var item in Model)
{
<tr>
<td scope="row">
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
<a asp-action="Edit" asp-controller="Ingredient" asp-route-id="@item.Id"><i class="far fa-pen-to-square text-bg-info"></i></a>
<a asp-action="Details" asp-controller="Ingredient" asp-route-id="@item.Id"><i class="far fa-address-card"></i></a>
<a asp-action="Delete" asp-controller="Ingredient" asp-route-id="@item.Id"><i class="far fa-trash-can text-bg-danger"></i></a>
</td>
</tr>
}
</tbody>
</table>
</div>
<hr />
@model IEnumerable<Ingredient>
@{
}
<section class="page-section">
<form method="post" asp-action="AddIngredints">
<select asp-for="@Model.First().Id">
@foreach (var i in Model)
{
<option value="@i.Id">@i.Name </option>
}
</select>
<input type="number"name="ratio" />
<input value="@ViewBag.MedicineId" name="med" hidden />
<button role="submit">Submit</button>
</form>
</section>
......@@ -31,11 +31,20 @@
<span asp-validation-for="Dosage" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Price" class="control-label"></label>
<input asp-for="Price" class="form-control" />
<span asp-validation-for="Price" class="text-danger"></span>
<label asp-for="Category.Name" class="control-label"></label>
<input asp-for="Category.Name" class="form-control" />
<span asp-validation-for="Category.Name" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Image" class="control-label"></label>
<input asp-for="Image" class="form-control" />
<span asp-validation-for="Image" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Image" class="control-label"></label>
<input asp-for="Image" class="form-control" />
<span asp-validation-for="Image" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" />
</div>
......
@model ApplicationCore.Entities.Medicine
@model Medicine
@{
ViewData["Title"] = "Details";
Layout = "_AdminLayout";
ViewData["Title"] = "Medicine Details ";
Layout = "_AdminLayout";
var a = 0;
}
<section class="vh-100" style="background-color: #f4f5f7;">
<section class="page-section">
<div class="container py-5 h-100">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col col-lg-6 mb-4 mb-lg-0">
<div class="col col-lg-8 mb-4 mb-lg-0">
<div class="card mb-3" style="border-radius: .5rem;">
<div class="row g-0">
<div class="col-md-4 gradient-custom text-center text-black"
style="border-top-left-radius: .5rem; border-bottom-left-radius: .5rem;">
<img src="~/img/portfolio/instagram.png"
<img src="~/img/portfolio/@Model.Image"
alt="Avatar" class="img-fluid my-5" style="width: 80px;" />
<h5>@Model.Name</h5>
<p>For: @Model.Patients.Count()</p>
<p>For: @(Model.Category is null ? "":Model.Category.Name)</p>
<a asp-action="Edit" asp-route-id="@Model.Id">
<i class="far fa-edit mb-5"></i>
</a>
</a>
<a asp-action="Index">
<i class="far fa-backward">
</i>
Go Back
</a>
</div>
<div class="col-md-8">
......@@ -38,27 +40,47 @@
<p class="text-muted">@Model.Description</p>
</div>
<div class="col-6 mb-3">
<h6>Price</h6>
<p class="text-muted">@Model.Price</p>
<h6>Medicine Type:@Model.MedicineType</h6>
<p class="text-muted">Dosage : @Model.Dosage</p>
<p class="text-muted">Price : @Model.Price</p>
</div>
</div>
<h6>Category</h6>
<h6>Ingredients : </h6>
<hr class="mt-0 mb-4">
<div class="row pt-1">
<div class="col-6 mb-3">
<h6>@Model.Category</h6>
<p class="text-muted">Lorem ipsum</p>
</div>
<table class="table table-bordered">
<thead>
<tr>
<td>#</td>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
@foreach (var ing in Model.Ingredients)
{
<tr class=" mb-3">
<td>@(a+=1)</td>
<td>@ing.Name</td>
<td>@ing.Description</td>
</tr>
}
</tbody>
</table>
</div>
<div class="row pt-1">
<div class="col-6 mb-3">
<h6>Go To list </h6>
<a asp-action="Index">Back to List</a>
</div>
</div>
<div class="d-flex justify-content-start">
<a href="#!"><i class="fab fa-facebook-f fa-lg me-3"></i></a>
<a href="#!"><i class="fab fa-twitter fa-lg me-3"></i></a>
<a href="#!"><i class="fab fa-instagram fa-lg"></i></a>
<div class="col-6 mb-3">
<h6>Add Ingredient </h6>
<a asp-action="AddIngredints" asp-controller="Medicine" asp-route-id="@Model.Id">Add </a>
</div>
</div>
</div>
</div>
......@@ -67,4 +89,4 @@
</div>
</div>
</div>
</section>
</section>
\ No newline at end of file
......@@ -38,7 +38,7 @@
<span asp-validation-for="Price" class="text-danger"></span>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label asp-for="Image" class="control-label"></label>
<input asp-for="Image" class="form-control" />
<span asp-validation-for="Image" class="text-danger"></span>
......
......@@ -50,7 +50,7 @@
</th>
<th scope="col">
@Html.DisplayNameFor(model => model.Patients.First().User.Email)
@Html.DisplayNameFor(model => model.Patients.First().User.CreationTime)
</th>
......@@ -67,7 +67,7 @@
<th>First name</th>
<th>Last name</th>
<th>BIO</th>
<th>Email</th>
<th>Creation Time</th>
<th>Manage</th>
</tr>
......@@ -92,7 +92,7 @@
@Html.DisplayFor(modelItem => item.BIO)
</td>
<td>
@Html.DisplayFor(modelItem => item.User.Email)
@Html.DisplayFor(modelItem => item.User.CreationTime)
</td>
<td>
<a asp-action="Edit" asp-controller="Patients" asp-route-id="@item.Id"><i class="far fa-pen-to-square text-bg-info"></i></a>
......
......@@ -20,7 +20,6 @@
<body class="sb-nav-fixed">
<nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
<!-- Navbar Brand-->
<a class="navbar-brand ps-3" href="index.html">Start Bootstrap</a>
<!-- Sidebar Toggle-->
<button class="btn btn-link btn-sm order-1 order-lg-0 me-4 me-lg-0" id="sidebarToggle" href="#!"><i class="fas fa-bars"></i></button>
<!-- Navbar Search-->
......@@ -65,38 +64,37 @@
</a>
<div class="collapse" id="collapseLayouts" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" asp-controller="Projects" asp-action="Create">Add Patient </a>
<a class="nav-link" asp-controller="Projects" asp-action="Index">ALL Patients </a>
<a class="nav-link" asp-controller="Patient" asp-action="Create">Add Patient </a>
<a class="nav-link" asp-controller="Patient" asp-action="Index">ALL Patients </a>
</nav>
</div>
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#collapsePages" aria-expanded="false" aria-controls="collapsePages">
<div class="sb-nav-link-icon"><i class="fas fa-book-open"></i></div>
Medicine Managment
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#collapseLayouts" aria-expanded="false" aria-controls="collapseLayouts">
<div class="sb-nav-link-icon"><i class="fas fa-columns"></i></div>
Ingredients Manage
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
</a>
<div class="collapse" id="collapsePages" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion">
<div class="collapse" id="collapseLayouts" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" asp-controller="Medicine" asp-action="Create">Add Medicine </a>
<a class="nav-link" asp-controller="Medicine" asp-action="Index">ALL Medicines </a>
<a class="nav-link" asp-controller="Ingredient" asp-action="Create">Add Ingredient </a>
<a class="nav-link" asp-controller="Ingredient" asp-action="Index">ALL Ingredients </a>
</nav>
</div>
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#collapsePages" aria-expanded="false" aria-controls="collapsePages">
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#cPages" aria-expanded="false" aria-controls="collapsePages">
<div class="sb-nav-link-icon"><i class="fas fa-book-open"></i></div>
User Accounts
Medicine Managment
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
</a>
<div class="collapse" id="collapsePages" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion">
<div class="collapse" id="cPages" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" asp-controller="Projects" asp-action="Create">Add User </a>
<a class="nav-link" asp-controller="Projects" asp-action="Index">ALL Users </a>
<a class="nav-link" asp-controller="Medicine" asp-action="Create">Add Medicine </a>
<a class="nav-link" asp-controller="Medicine" asp-action="Index">ALL Medicines </a>
</nav>
</div>
<div class="sb-sidenav-footer">
<div class="small">Logged in as:@UserManager.GetUserName(User)</div>
Start Bootstrap
</div>
</div>
</div>
......@@ -120,7 +118,7 @@
<footer class="py-4 bg-light mt-auto">
<div class="container-fluid px-4">
<div class="d-flex align-items-center justify-content-between small">
<div class="text-muted">Copyright &copy; Your Website 2023</div>
<div class="text-muted">Copyright &copy; Hasan & Rawad &yacute; Website 2023</div>
<div>
<a href="#">Privacy Policy</a>
&middot;
......
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