mirror of
https://github.com/Shchoholiev/shopping-assistant-web-client.git
synced 2025-04-12 01:48:49 +00:00
Edit list Wishlist
This commit is contained in:
parent
01de98d053
commit
c7605b5073
@ -1,6 +1,5 @@
|
|||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
|
|
||||||
|
|
||||||
<div id="leftframe" class="left_frame">
|
<div id="leftframe" class="left_frame">
|
||||||
|
|
||||||
|
|
||||||
@ -28,7 +27,7 @@
|
|||||||
|
|
||||||
<div class="wishlist_names">
|
<div class="wishlist_names">
|
||||||
|
|
||||||
@foreach (var item in wishlist)
|
@foreach (var item in Wishlists)
|
||||||
{
|
{
|
||||||
<section class="cont_wishlist">
|
<section class="cont_wishlist">
|
||||||
<div @onclick="() => RedirectToPage(item.Id)" class="wishlist_name" >@item.Name</div>
|
<div @onclick="() => RedirectToPage(item.Id)" class="wishlist_name" >@item.Name</div>
|
||||||
@ -91,8 +90,6 @@
|
|||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void RedirectToPage(string itemId) {
|
private void RedirectToPage(string itemId) {
|
||||||
var url = $"/chat/{itemId}";
|
var url = $"/chat/{itemId}";
|
||||||
Navigation.NavigateTo(url);
|
Navigation.NavigateTo(url);
|
||||||
@ -107,28 +104,6 @@
|
|||||||
}
|
}
|
||||||
private void DeleteWishlist(string itemId) {
|
private void DeleteWishlist(string itemId) {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private List<Models.Wishlist> wishlist;
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
|
||||||
{
|
|
||||||
|
|
||||||
wishlist = new List<Models.Wishlist>
|
|
||||||
{
|
|
||||||
new Models.Wishlist {Id = "0", Name = "Gift for Jessica", Type="product", CreateById="0"},
|
|
||||||
new Models.Wishlist {Id = "1", Name = "Secret Santa", Type="gift", CreateById="1"},
|
|
||||||
new Models.Wishlist {Id = "2", Name = "Mark’s Birthday", Type="product", CreateById="2"},
|
|
||||||
new Models.Wishlist {Id = "3", Name = "Garden tools", Type="product", CreateById="2"},
|
|
||||||
new Models.Wishlist {Id = "4", Name = "Phone charger ", Type="product", CreateById="2"},
|
|
||||||
new Models.Wishlist {Id = "5", Name = "Garden tools", Type="product", CreateById="2"}
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,23 @@
|
|||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.Components;
|
using ShoppingAssistantWebClient.Web.Models;
|
||||||
using ShoppingAssistantWebClient.Web.Models;
|
|
||||||
|
namespace ShoppingAssistantWebClient.Web.Shared
|
||||||
namespace ShoppingAssistantWebClient.Web.Pages;
|
{
|
||||||
|
public partial class NavMenu : ComponentBase
|
||||||
public partial class Wishlists : ComponentBase
|
{
|
||||||
{
|
|
||||||
private List<Wishlist> wishlist;
|
public List<Wishlist> Wishlists = new()
|
||||||
|
{
|
||||||
protected override async Task OnInitializedAsync()
|
new Wishlist {Id = "0", Name = "Gift for Jessica", Type="product", CreateById="0"},
|
||||||
{
|
new Wishlist {Id = "1", Name = "Secret Santa", Type="gift", CreateById="1"},
|
||||||
|
new Wishlist {Id = "2", Name = "Mark’s Birthday", Type="product", CreateById="2"}
|
||||||
wishlist = new List<Models.Wishlist>
|
};
|
||||||
{
|
|
||||||
new Models.Wishlist {Id = "0", Name = "Gift for Jessica", Type="product", CreateById="0"},
|
protected override async Task OnInitializedAsync()
|
||||||
new Models.Wishlist {Id = "1", Name = "Secret Santa", Type="gift", CreateById="1"},
|
{
|
||||||
new Models.Wishlist {Id = "2", Name = "Mark’s Birthday", Type="product", CreateById="2"},
|
// Get data from Back-end
|
||||||
new Models.Wishlist {Id = "3", Name = "Garden tools", Type="product", CreateById="2"},
|
}
|
||||||
new Models.Wishlist {Id = "4", Name = "Phone charger ", Type="product", CreateById="2"},
|
|
||||||
new Models.Wishlist {Id = "5", Name = "Garden tools", Type="product", CreateById="2"}
|
}
|
||||||
};
|
|
||||||
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user