mirror of
https://github.com/TomasiDeveloping/PlayerManagement.git
synced 2026-04-16 09:12:20 +00:00
v.Beta-0.10.0
This commit is contained in:
parent
7d798476f0
commit
fa3a0ec218
@ -23,5 +23,9 @@ public class CreateDesertStormDto
|
|||||||
[MaxLength(150)]
|
[MaxLength(150)]
|
||||||
public required string OpponentName { get; set; }
|
public required string OpponentName { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
[MaxLength(1)]
|
||||||
|
public required string Team { get; set; }
|
||||||
|
|
||||||
public bool IsInProgress { get; set; }
|
public bool IsInProgress { get; set; }
|
||||||
}
|
}
|
||||||
@ -25,4 +25,6 @@ public class DesertStormDto
|
|||||||
public int Participants { get; set; }
|
public int Participants { get; set; }
|
||||||
|
|
||||||
public bool IsInProgress { get; set; }
|
public bool IsInProgress { get; set; }
|
||||||
|
|
||||||
|
public required string Team { get; set; }
|
||||||
}
|
}
|
||||||
@ -23,4 +23,8 @@ public class UpdateDesertStormDto
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool IsInProgress { get; set; }
|
public bool IsInProgress { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
[MaxLength(1)]
|
||||||
|
public required string Team { get; set; }
|
||||||
}
|
}
|
||||||
@ -19,6 +19,7 @@ public class DesertStormConfiguration : IEntityTypeConfiguration<DesertStorm>
|
|||||||
builder.Property(desertStorm => desertStorm.CreatedBy).IsRequired().HasMaxLength(150);
|
builder.Property(desertStorm => desertStorm.CreatedBy).IsRequired().HasMaxLength(150);
|
||||||
builder.Property(desertStorm => desertStorm.OpponentName).IsRequired().HasMaxLength(150);
|
builder.Property(desertStorm => desertStorm.OpponentName).IsRequired().HasMaxLength(150);
|
||||||
builder.Property(desertStorm => desertStorm.ModifiedBy).IsRequired(false).HasMaxLength(150);
|
builder.Property(desertStorm => desertStorm.ModifiedBy).IsRequired(false).HasMaxLength(150);
|
||||||
|
builder.Property(desertStorm => desertStorm.Team).IsRequired().HasMaxLength(1).HasDefaultValue("A");
|
||||||
builder.Property(desertStorm => desertStorm.ModifiedOn).IsRequired(false);
|
builder.Property(desertStorm => desertStorm.ModifiedOn).IsRequired(false);
|
||||||
|
|
||||||
builder.HasOne(desertStorm => desertStorm.Alliance)
|
builder.HasOne(desertStorm => desertStorm.Alliance)
|
||||||
|
|||||||
@ -24,5 +24,7 @@ public class DesertStorm : BaseEntity
|
|||||||
|
|
||||||
public bool IsInProgress { get; set; }
|
public bool IsInProgress { get; set; }
|
||||||
|
|
||||||
|
public required string Team { get; set; }
|
||||||
|
|
||||||
public ICollection<DesertStormParticipant> DesertStormParticipants { get; set; } = [];
|
public ICollection<DesertStormParticipant> DesertStormParticipants { get; set; } = [];
|
||||||
}
|
}
|
||||||
1293
Database/Migrations/20250602061457_AddTeamToDesertStorm.Designer.cs
generated
Normal file
1293
Database/Migrations/20250602061457_AddTeamToDesertStorm.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
35
Database/Migrations/20250602061457_AddTeamToDesertStorm.cs
Normal file
35
Database/Migrations/20250602061457_AddTeamToDesertStorm.cs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||||
|
|
||||||
|
namespace Database.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddTeamToDesertStorm : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Team",
|
||||||
|
schema: "dbo",
|
||||||
|
table: "DesertStorms",
|
||||||
|
type: "nvarchar(1)",
|
||||||
|
maxLength: 1,
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "A");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Team",
|
||||||
|
schema: "dbo",
|
||||||
|
table: "DesertStorms");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -269,6 +269,13 @@ namespace Database.Migrations
|
|||||||
b.Property<int>("OpposingParticipants")
|
b.Property<int>("OpposingParticipants")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("Team")
|
||||||
|
.IsRequired()
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasMaxLength(1)
|
||||||
|
.HasColumnType("nvarchar(1)")
|
||||||
|
.HasDefaultValue("A");
|
||||||
|
|
||||||
b.Property<bool>("Won")
|
b.Property<bool>("Won")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
@ -654,19 +661,19 @@ namespace Database.Migrations
|
|||||||
b.HasData(
|
b.HasData(
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = new Guid("01964298-2d6d-7f54-8e1f-ab23ec343378"),
|
Id = new Guid("01972f47-5fb5-7584-a312-e749206f0036"),
|
||||||
Code = 1,
|
Code = 1,
|
||||||
Name = "Silver League"
|
Name = "Silver League"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = new Guid("01964298-2d6d-7620-bcc5-08103cbfd5de"),
|
Id = new Guid("01972f47-5fb6-7dec-93aa-b62f0e167fde"),
|
||||||
Code = 2,
|
Code = 2,
|
||||||
Name = "Gold League"
|
Name = "Gold League"
|
||||||
},
|
},
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Id = new Guid("01964298-2d6d-7e0b-b002-532458cbe7bd"),
|
Id = new Guid("01972f47-5fb6-7f9a-8a2d-9f47fa1803e1"),
|
||||||
Code = 3,
|
Code = 3,
|
||||||
Name = "Diamond League"
|
Name = "Diamond League"
|
||||||
});
|
});
|
||||||
|
|||||||
10
README.md
10
README.md
@ -21,6 +21,16 @@ This project is currently in the **Beta Phase**.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### **[0.10.0]** - *2025-06-02*
|
||||||
|
#### ✨ Added
|
||||||
|
- **Team Selection for Desert Storm:** You can now assign **Team A** or **Team B** when creating a Desert Storm entry.
|
||||||
|
- **Team Display in Table:** The selected team is now also shown in the Desert Storm overview table.
|
||||||
|
|
||||||
|
🛠️ **Fixed**
|
||||||
|
- (N/A)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### **[0.9.1]** - *2025-04-24*
|
### **[0.9.1]** - *2025-04-24*
|
||||||
#### ✨ Added
|
#### ✨ Added
|
||||||
- **Number Formatting Input Mask:** Numbers are now automatically formatted for better readability (e.g., `250000` → `250.000`).
|
- **Number Formatting Input Mask:** Numbers are now automatically formatted for better readability (e.g., `250000` → `250.000`).
|
||||||
|
|||||||
@ -13,6 +13,7 @@ export interface DesertStormModel {
|
|||||||
opponentName: string;
|
opponentName: string;
|
||||||
participants: number;
|
participants: number;
|
||||||
isInProgress: boolean;
|
isInProgress: boolean;
|
||||||
|
team: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DesertStormDetailModel extends DesertStormModel {
|
export interface DesertStormDetailModel extends DesertStormModel {
|
||||||
@ -27,4 +28,5 @@ export interface CreateDesertStormModel {
|
|||||||
eventDate: string;
|
eventDate: string;
|
||||||
opponentName: string;
|
opponentName: string;
|
||||||
isInProgress: boolean;
|
isInProgress: boolean;
|
||||||
|
team: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
</h5>
|
</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">Opponent: <span class="text-primary">{{desertStormDetail.opponentName}}</span></h5>
|
<h5 class="card-title">Opponent: <span class="text-primary">{{desertStormDetail.opponentName}}</span></h5>
|
||||||
|
<p class="card-text">Team: <span class="text-primary">{{desertStormDetail.team}}</span></p>
|
||||||
<p class="card-text">Server: <span class="text-primary">{{desertStormDetail.opponentServer}}</span></p>
|
<p class="card-text">Server: <span class="text-primary">{{desertStormDetail.opponentServer}}</span></p>
|
||||||
<p class="card-text">Opponent participants: <span class="text-primary">{{desertStormDetail.opposingParticipants}}</span></p>
|
<p class="card-text">Opponent participants: <span class="text-primary">{{desertStormDetail.opposingParticipants}}</span></p>
|
||||||
<p class="card-text">Allianz participants: <span class="text-primary">{{desertStormDetail.participants | number}}</span></p>
|
<p class="card-text">Allianz participants: <span class="text-primary">{{desertStormDetail.participants | number}}</span></p>
|
||||||
|
|||||||
@ -8,17 +8,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (!isCreateDessertStorm) {
|
@if (!isCreateDessertStorm) {
|
||||||
@if (!currentWeekDuelExists) {
|
|
||||||
<div class="d-grid gap-2 col-6 mx-auto">
|
<div class="d-grid gap-2 col-6 mx-auto">
|
||||||
<button (click)="onCreateEvent()" class="btn btn-primary" type="button">Create new Desert storm Event</button>
|
<button (click)="onCreateEvent()" class="btn btn-primary" type="button">Create new Desert storm Event</button>
|
||||||
</div>
|
</div>
|
||||||
} @else {
|
|
||||||
<div class="d-flex justify-content-center">
|
|
||||||
<div class="alert alert-primary text-center w-auto" role="alert">
|
|
||||||
One event has already been recorded for this week. You can edit or delete the event
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (isCreateDessertStorm) {
|
@if (isCreateDessertStorm) {
|
||||||
@ -73,6 +65,14 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-floating mb-3 is-invalid">
|
||||||
|
<select class="form-select" formControlName="team" id="team">
|
||||||
|
<option [ngValue]="'A'">Team A</option>
|
||||||
|
<option [ngValue]="'B'">Team B</option>
|
||||||
|
</select>
|
||||||
|
<label for="team">Team</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
@if (f['isInProgress'].value === false) {
|
@if (f['isInProgress'].value === false) {
|
||||||
<div class="form-check mb-3">
|
<div class="form-check mb-3">
|
||||||
<input class="form-check-input" type="checkbox" formControlName="won" id="won">
|
<input class="form-check-input" type="checkbox" formControlName="won" id="won">
|
||||||
@ -122,6 +122,7 @@
|
|||||||
<th scope="col">Opponent server</th>
|
<th scope="col">Opponent server</th>
|
||||||
<th scope="col">Opposing participants</th>
|
<th scope="col">Opposing participants</th>
|
||||||
<th scope="col">Allianz participants</th>
|
<th scope="col">Allianz participants</th>
|
||||||
|
<th scope="col">Team</th>
|
||||||
<th scope="col">Won</th>
|
<th scope="col">Won</th>
|
||||||
<th scope="col">Action</th>
|
<th scope="col">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -134,6 +135,7 @@
|
|||||||
<td>{{desertStorm.opponentServer}}</td>
|
<td>{{desertStorm.opponentServer}}</td>
|
||||||
<td>{{desertStorm.opposingParticipants}}</td>
|
<td>{{desertStorm.opposingParticipants}}</td>
|
||||||
<td>{{desertStorm.participants}}</td>
|
<td>{{desertStorm.participants}}</td>
|
||||||
|
<td>{{desertStorm.team}}</td>
|
||||||
<td>
|
<td>
|
||||||
@if (desertStorm.isInProgress) {
|
@if (desertStorm.isInProgress) {
|
||||||
<i class="bi bi-hourglass-split"></i> In Progress
|
<i class="bi bi-hourglass-split"></i> In Progress
|
||||||
|
|||||||
@ -92,6 +92,7 @@ export class DesertStormComponent implements OnInit {
|
|||||||
opponentName: new FormControl<string>(desertStormModel ? desertStormModel.opponentName : ''),
|
opponentName: new FormControl<string>(desertStormModel ? desertStormModel.opponentName : ''),
|
||||||
opponentServer: new FormControl<number | null>(desertStormModel ? desertStormModel.opponentServer : null),
|
opponentServer: new FormControl<number | null>(desertStormModel ? desertStormModel.opponentServer : null),
|
||||||
OpposingParticipants: new FormControl<number | null>(desertStormModel ? desertStormModel.opposingParticipants : null),
|
OpposingParticipants: new FormControl<number | null>(desertStormModel ? desertStormModel.opposingParticipants : null),
|
||||||
|
team: new FormControl<string>(desertStormModel ? desertStormModel.team : 'A')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user