Updated Pokemon Entity to allow for Ingredients. Created Ingredients and Type/Berry json data. Updated badges. Faulty add ingredients, needs work!
This commit is contained in:
parent
1daad24db7
commit
3feacfaa96
|
|
@ -0,0 +1,15 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Portfolio.Domain.Features.Pokemon
|
||||||
|
{
|
||||||
|
public class Ingredient
|
||||||
|
{
|
||||||
|
public string Ing { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public string ImageURL { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -19,6 +19,9 @@ namespace Portfolio.Domain.Features.Pokemon
|
||||||
public string? PokemonImageUrl { get; set; }
|
public string? PokemonImageUrl { get; set; }
|
||||||
public string? PokemonShinyImageUrl { get; set; }
|
public string? PokemonShinyImageUrl { get; set; }
|
||||||
public string? FlavorText { get; set; }
|
public string? FlavorText { get; set; }
|
||||||
|
public string? Ingredient1 { get; set; }
|
||||||
|
public string? Ingredient2 { get; set; }
|
||||||
|
public string? Ingredient3 { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
130
Portfolio.Infrastructure/Migrations/20251117160500_updatePokemonAddIngredients.Designer.cs
generated
Normal file
130
Portfolio.Infrastructure/Migrations/20251117160500_updatePokemonAddIngredients.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,130 @@
|
||||||
|
// <auto-generated />
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Portfolio.Infrastructure;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Portfolio.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
|
[Migration("20251117160500_updatePokemonAddIngredients")]
|
||||||
|
partial class updatePokemonAddIngredients
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "9.0.2")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("Portfolio.Domain.Features.Pokemon.Pokemon", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("FlavorText")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.PrimitiveCollection<string>("Ingredients")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsVariation")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<int>("PokemonId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("PokemonImageUrl")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PokemonName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PokemonShinyImageUrl")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PokemonType")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("SleepType")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Speciality")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("VariationName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Pokemons");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Portfolio.Domain.Features.Pokemon_Natures.PokemonNature", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("BerryRating")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int>("IngredientRating")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("Nature")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("SkillRating")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("PokemonNatures");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Portfolio.Domain.Features.Pokemon_Subskills.PokemonSubskill", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("BerryRank")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int>("IngredientRank")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int>("SkillRank")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("SubSkill")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("PokemonSubskills");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Portfolio.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class updatePokemonAddIngredients : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Ingredients",
|
||||||
|
table: "Pokemons",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Ingredients",
|
||||||
|
table: "Pokemons");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
136
Portfolio.Infrastructure/Migrations/20251117171147_updatePokemonChangeIngredient.Designer.cs
generated
Normal file
136
Portfolio.Infrastructure/Migrations/20251117171147_updatePokemonChangeIngredient.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,136 @@
|
||||||
|
// <auto-generated />
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Portfolio.Infrastructure;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Portfolio.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
|
[Migration("20251117171147_updatePokemonChangeIngredient")]
|
||||||
|
partial class updatePokemonChangeIngredient
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "9.0.2")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("Portfolio.Domain.Features.Pokemon.Pokemon", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("FlavorText")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Ingredient1")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Ingredient2")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Ingredient3")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsVariation")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<int>("PokemonId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("PokemonImageUrl")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PokemonName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PokemonShinyImageUrl")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PokemonType")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("SleepType")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Speciality")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("VariationName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Pokemons");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Portfolio.Domain.Features.Pokemon_Natures.PokemonNature", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("BerryRating")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int>("IngredientRating")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("Nature")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("SkillRating")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("PokemonNatures");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Portfolio.Domain.Features.Pokemon_Subskills.PokemonSubskill", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("BerryRank")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int>("IngredientRank")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int>("SkillRank")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("SubSkill")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("PokemonSubskills");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Portfolio.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class updatePokemonChangeIngredient : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "Ingredients",
|
||||||
|
table: "Pokemons",
|
||||||
|
newName: "Ingredient3");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Ingredient1",
|
||||||
|
table: "Pokemons",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Ingredient2",
|
||||||
|
table: "Pokemons",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Ingredient1",
|
||||||
|
table: "Pokemons");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Ingredient2",
|
||||||
|
table: "Pokemons");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "Ingredient3",
|
||||||
|
table: "Pokemons",
|
||||||
|
newName: "Ingredients");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -32,6 +32,15 @@ namespace Portfolio.Infrastructure.Migrations
|
||||||
b.Property<string>("FlavorText")
|
b.Property<string>("FlavorText")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Ingredient1")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Ingredient2")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Ingredient3")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("IsVariation")
|
b.Property<bool>("IsVariation")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
To Update Entites in the Database:
|
||||||
|
|
||||||
|
1. Make necessary changes to Enttities within .Domain
|
||||||
|
2. Open NuGet Packet Manager
|
||||||
|
3. Ensure default project is pointed to .Infrastructure
|
||||||
|
4. Enter `Add-Migration [Migration Tag Name, ex: updateEntityAddChange]`
|
||||||
|
5. Enter `Update-Database`
|
||||||
|
6. Check SSMS to ensure changes.
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
.badge {
|
$width: 200px;
|
||||||
|
$height: 80px;
|
||||||
|
|
||||||
|
*, *::before, *::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
@ -9,9 +16,14 @@
|
||||||
color: white;
|
color: white;
|
||||||
font-size: clamp(0.7rem, 1vw, 0.9rem);
|
font-size: clamp(0.7rem, 1vw, 0.9rem);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
font-weight: 400;
|
||||||
|
text-shadow: 0 2px 2px rgba(0,0,0,0.25);
|
||||||
|
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.35);
|
||||||
|
transition: all 0.2s ease;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.statText {
|
.statText {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,8 @@
|
||||||
right: 2%;
|
right: 2%;
|
||||||
width: clamp(1.5rem, 2.5vw, 2.5rem);
|
width: clamp(1.5rem, 2.5vw, 2.5rem);
|
||||||
height: clamp(1.5rem, 2.5vw, 2.5rem);
|
height: clamp(1.5rem, 2.5vw, 2.5rem);
|
||||||
|
box-shadow: 0 1px 2px 1px rgba(0,0,0,0.35);
|
||||||
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pokemon-flavor-text {
|
.pokemon-flavor-text {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
@inject IPokemonService PokemonService
|
@inject IPokemonService PokemonService
|
||||||
|
@inject IHttpClientFactory ClientFactory
|
||||||
|
|
||||||
|
|
||||||
@if(formUse == "ADD")
|
@if(formUse == "ADD")
|
||||||
{
|
{
|
||||||
|
|
@ -95,6 +97,26 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Pokemon Ingredients -->
|
||||||
|
<div class="row mb-3 mx-0">
|
||||||
|
<!-- Ingredient 1 -->
|
||||||
|
<div class="col ps-0 pe-1">
|
||||||
|
<div class="row input-group m-auto">
|
||||||
|
<span for="Ingredient1" class="input-group-text rounded-top">Ingredient 1</span>
|
||||||
|
</div>
|
||||||
|
<div class="row input-group m-auto">
|
||||||
|
<InputSelect id="Ingredient1" @bind-Value="NewPokemon.Ingredient1" @onchange="@SendPokemon" class="form-select rounded-bottom">
|
||||||
|
<option disabled value="" selected>Select...</option>
|
||||||
|
@foreach (var ingredient in Ingredients)
|
||||||
|
{
|
||||||
|
<option value="@ingredient.Ing">@ingredient.Ing</option>
|
||||||
|
}
|
||||||
|
</InputSelect>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- <br> -->
|
<!-- <br> -->
|
||||||
<div class="border-bottom border-3 border-info-subtle rounded m-1 my-3"></div>
|
<div class="border-bottom border-3 border-info-subtle rounded m-1 my-3"></div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Components.Web;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||||
using Portfolio.Application.Services.PokemonService;
|
using Portfolio.Application.Services.PokemonService;
|
||||||
using Portfolio.Domain.Features.Pokemon;
|
using Portfolio.Domain.Features.Pokemon;
|
||||||
|
using Portfolio.Domain.Features.Portfolio;
|
||||||
|
|
||||||
namespace Portfolio.WebUI.Server.Components.Component.Pokemon_Components
|
namespace Portfolio.WebUI.Server.Components.Component.Pokemon_Components
|
||||||
{
|
{
|
||||||
|
|
@ -28,7 +29,10 @@ namespace Portfolio.WebUI.Server.Components.Component.Pokemon_Components
|
||||||
PokemonName = string.Empty, // Required fields cannot be null
|
PokemonName = string.Empty, // Required fields cannot be null
|
||||||
SleepType = string.Empty,
|
SleepType = string.Empty,
|
||||||
Speciality = string.Empty,
|
Speciality = string.Empty,
|
||||||
IsVariation = false
|
IsVariation = false,
|
||||||
|
Ingredient1 = "",
|
||||||
|
Ingredient2 = "",
|
||||||
|
Ingredient3 = ""
|
||||||
};
|
};
|
||||||
|
|
||||||
// When Editing
|
// When Editing
|
||||||
|
|
@ -38,6 +42,9 @@ namespace Portfolio.WebUI.Server.Components.Component.Pokemon_Components
|
||||||
|
|
||||||
|
|
||||||
// General Form
|
// General Form
|
||||||
|
|
||||||
|
private List<string> PokemonTypeInfo;
|
||||||
|
|
||||||
protected static readonly string[] PokemonTypes = new[]
|
protected static readonly string[] PokemonTypes = new[]
|
||||||
{
|
{
|
||||||
"Grass","Fire","Water","Normal","Flying","Bug","Poison","Electric","Ground","Rock","Ice",
|
"Grass","Fire","Water","Normal","Flying","Bug","Poison","Electric","Ground","Rock","Ice",
|
||||||
|
|
@ -45,6 +52,7 @@ namespace Portfolio.WebUI.Server.Components.Component.Pokemon_Components
|
||||||
};
|
};
|
||||||
protected static readonly string[] SleepTypes = new[] { "Dozing", "Snoozing", "Slumbering" };
|
protected static readonly string[] SleepTypes = new[] { "Dozing", "Snoozing", "Slumbering" };
|
||||||
protected static readonly string[] Specialities = new[] { "Berries", "Ingredients", "Skills", "All" };
|
protected static readonly string[] Specialities = new[] { "Berries", "Ingredients", "Skills", "All" };
|
||||||
|
private List<Ingredient> Ingredients { get; set; }
|
||||||
|
|
||||||
|
|
||||||
private bool HideLabel { get; set; }
|
private bool HideLabel { get; set; }
|
||||||
|
|
@ -53,6 +61,9 @@ namespace Portfolio.WebUI.Server.Components.Component.Pokemon_Components
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
|
var http = ClientFactory.CreateClient("LocalClient");
|
||||||
|
Ingredients = await http.GetFromJsonAsync<List<Ingredient>>("data/ingredients.json");
|
||||||
|
|
||||||
if (formUse == "EDIT")
|
if (formUse == "EDIT")
|
||||||
{
|
{
|
||||||
if (PokemonToEdit.IsVariation == true)
|
if (PokemonToEdit.IsVariation == true)
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
<!-- Section 4: Pokemon Type -->
|
<!-- Section 4: Pokemon Type -->
|
||||||
<td>
|
<td>
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<img src="@GetTypeImageUrl(pokemon.PokemonType)" style="width:36px; height:36px;" />
|
<img src="@GetTypeImageUrl(pokemon.PokemonType)" style="width:36px; height:36px;box-shadow: 0 1px 2px 1px rgba(0,0,0,0.35);border-radius: 20px;" />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"ingredient": "Large Leek",
|
||||||
|
"description": "Whether this is the kind of vegetable stalk that Farfetch'd like is unknown.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/largeleek.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Tasty Mushroom",
|
||||||
|
"description": "A juicy mushroom with an abundance of umami flavor.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/tastymushroom.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Fancy Egg",
|
||||||
|
"description": "A nutritious cooking ingredient that goes well with all sorts of seasonings.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/fancyegg.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Soft Potato",
|
||||||
|
"description": "Its mellow flavor makes both body and spirit feel warm and fuzzy.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/softpotato.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Fancy Apple",
|
||||||
|
"description": "An apple chosen above others. It has spectacular form and a brilliant sheen.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/fancyapple.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Fiery Herb",
|
||||||
|
"description": "The fiery taste of this bright-red herb will wake anyone right up.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/fieryherb.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Bean Sausage",
|
||||||
|
"description": "A healthy sausage made from beans that Pok<6F>mon like to eat.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/beansausage.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Moomoo Milk",
|
||||||
|
"description": "Highly nutritious milk. Pok<6F>mon that drink it become full of energy.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/moomoomilk.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Honey",
|
||||||
|
"description": "A sweet honey collected by Pok<6F>mon.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/honey.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Pure Oil",
|
||||||
|
"description": "All-purpose oil that can be used in any type of cuisine.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/pureoil.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Warming Ginger",
|
||||||
|
"description": "Spicy ginger that warms the body better than any other ingredient.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/warmingginger.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Snoozy Tomato",
|
||||||
|
"description": "A bright-red tomato. Eat it and you'll sleep like a baby.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/snoozytomato.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Soothing Cacao",
|
||||||
|
"description": "This cacao bean is time-consuming to process, but its soothing effects make the effort worthwhile.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/soothingcacao.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Slowpoke Tail",
|
||||||
|
"description": "A very tasty tail of something. When it falls off, it grows back quickly.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/slowpoketail.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Greengrass Soybeans",
|
||||||
|
"description": "This Greengrass Isle specialty is easy to process into foods that are great for training.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/greengrasssoybeans.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Greengrass Corn",
|
||||||
|
"description": "This Greengrass Isle specialty can be eaten raw. It's remarkably sweet.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/greengrasscorn.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Rousing Coffee",
|
||||||
|
"description": "You may have trouble sleeping if you drink too much of this. It may help make you feel more alert.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/rousingcoffee.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Plump Pumpkin",
|
||||||
|
"description": "A big pumpkin packed full of pulp.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/plumppumpkin.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ingredient": "Glossy Avocado",
|
||||||
|
"description": "The glossy green shine is a sign it' s freshly picked.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/ingredients/glossyavocado.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"type": "Grass",
|
||||||
|
"berry": "Durin",
|
||||||
|
"description": "This Berry is tremendously bitter. Just one bite is enough to instantly stop hiccups.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/durinberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Fire",
|
||||||
|
"berry": "Leppa",
|
||||||
|
"description": "It takes longer to grow than Berries such as Cheri. The smaller Berries taste better.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/leppaberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Water",
|
||||||
|
"berry": "Oran",
|
||||||
|
"description": "Nature's gifts came together as one in this Berry. It has a wondrous mix of flavors that spread in the mouth.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/oranberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Normal",
|
||||||
|
"berry": "Persim",
|
||||||
|
"description": "The more this Berry absorbs energy from sunlight, the more vividly colorful it grows.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/persimberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Flying",
|
||||||
|
"berry": "Pamtre",
|
||||||
|
"description": "This Berry drifted from a faraway sea. It can now be cultivated even on this island.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/pamtreberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Bug",
|
||||||
|
"berry": "Lum",
|
||||||
|
"description": "This Berry's gradual process of storing nutrients beneficial to Pok<6F>mon health causes it to mature slowly.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/lumberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Poison",
|
||||||
|
"berry": "Chesto",
|
||||||
|
"description": "This Berry's thick skin and fruit are very tough and dry-tasting. However, every bit of it can be eaten.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/chestoberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Electric",
|
||||||
|
"berry": "Grepa",
|
||||||
|
"description": "One bite of this very tender Berry fills the mouth with its sweet and tangy flavor.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/grepaberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Ground",
|
||||||
|
"berry": "Figy",
|
||||||
|
"description": "This Berry is oddly shaped, appearing as if someone took a bite out of it. It's packed full of spicy substances.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/figyberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Rock",
|
||||||
|
"berry": "Sitrus",
|
||||||
|
"description": "Sitrus came from the same family as Oran. It's larger and smoother- tasting than Oran.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/sitrusberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Ice",
|
||||||
|
"berry": "Rawst",
|
||||||
|
"description": "If the leaves grow longer and curlier than average, this Berry will have a somewhat bitter taste.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/rawstberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Steel",
|
||||||
|
"berry": "Belue",
|
||||||
|
"description": "This glossy and colorful Berry has a mouthwateringly delicious appearance. However, it's awfully sour.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/belueberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Fighting",
|
||||||
|
"berry": "Cheri",
|
||||||
|
"description": "This bright red Berry is very spicy and has a provocative flavor. It blooms with delicate, pretty flowers.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/cheriberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Psychic",
|
||||||
|
"berry": "Mago",
|
||||||
|
"description": "This Berry progressively curves as it grows. The curvier the Berry, the sweeter it tastes.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/magoberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Dark",
|
||||||
|
"berry": "Wiki",
|
||||||
|
"description": "It's said that this Berry grew lumps to help Pok<6F>mon grip it, allowing propagation farther afield.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/wikiberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Fairy",
|
||||||
|
"berry": "Pecha",
|
||||||
|
"description": "Because of its hollow inside pocket, there isn't a lot to eat. What can be eaten is very sweet and delicious.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/pechaberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Ghost",
|
||||||
|
"berry": "Bluk",
|
||||||
|
"description": "Though this small, delicately skinned Berry is blue in color, it dyes the mouth black when eaten.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/blukberry.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Dragon",
|
||||||
|
"berry": "Yache",
|
||||||
|
"description": "This Berry has a refreshing flavor that strikes a good balance of dryness and sourness. It tastes better chilled.",
|
||||||
|
"imageURL": "https://www.serebii.net/pokemonsleep/berries/yacheberry.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
Loading…
Reference in New Issue