feat(Immortal) Disabling SQL
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
@implements IDisposable;
|
||||
@inject IAgileService AgileService;
|
||||
@inject DatabaseContext Database;
|
||||
|
||||
@layout PageLayout
|
||||
|
||||
@@ -19,10 +18,18 @@
|
||||
<div style="flex: 1; flex-grow: 1;"></div>
|
||||
<div class="sprintDates">
|
||||
<div class="sprintStartDate">
|
||||
<b>Start: </b>@sprint.StartDate.Value.ToString("dd/MM/yyyy")
|
||||
@if (sprint.StartDate != null)
|
||||
{
|
||||
<b>Start: </b>@sprint.StartDate.Value.ToString("dd/MM/yyyy")
|
||||
}
|
||||
</div>
|
||||
<div class="sprintEndDate">
|
||||
<b>End: </b>@sprint.EndDate.Value.ToString("dd/MM/yyyy")
|
||||
@if (sprint.EndDate != null)
|
||||
{
|
||||
<b>End: </b>@sprint.EndDate.Value.ToString("dd/MM/yyyy")
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</summary>
|
||||
@@ -60,88 +67,27 @@ else {
|
||||
}
|
||||
|
||||
|
||||
<style>
|
||||
.agileViewContainer {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sprintDisplayContainer {
|
||||
border: 4px solid var(--paper);
|
||||
box-shadow: 0px 2px 12px rgba(0,0,0,0.2);
|
||||
border-radius: 2px;
|
||||
padding: 25px;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
background-color:var(--paper);
|
||||
}
|
||||
|
||||
@@media only screen and (max-width: 1025px) {
|
||||
.sprintDisplayContainer {
|
||||
padding: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.sprintSummary {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sprintDisplayContainer.@SprintType.Current.ToLower() {
|
||||
border-color: #042901;
|
||||
background-color:var(--paper);
|
||||
}
|
||||
|
||||
.sprintDisplayContainer.@SprintType.Planned.ToLower() {
|
||||
border-color: #2a2000;
|
||||
background-color:var(--paper);
|
||||
}
|
||||
|
||||
.sprintDisplayContainer.@SprintType.Completed.ToLower() {
|
||||
border-color: #2a2000;
|
||||
background-color:var(--paper);
|
||||
}
|
||||
|
||||
|
||||
details .sprintSummary::before {
|
||||
content: "+";
|
||||
font-weight: bolder;
|
||||
font-size: 1.5rem;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
details[open] .sprintSummary::before {
|
||||
content: "-";
|
||||
}
|
||||
|
||||
|
||||
.sprintTitle {
|
||||
width: 400px;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.sprintDates {
|
||||
width: 160px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
#if NO_SQL
|
||||
[Parameter]
|
||||
public DbSet<SprintModel> Sprints { get; set; }
|
||||
public List<TaskModel> Tasks { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public List<SprintModel> Sprints { get; set; }
|
||||
#else
|
||||
[Inject]
|
||||
DatabaseContext Database { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public DbSet<TaskModel> Tasks { get; set; }
|
||||
|
||||
|
||||
[Parameter]
|
||||
public DbSet<SprintModel> Sprints { get; set; }
|
||||
#endif
|
||||
|
||||
private readonly List<TaskModel> backlog = new();
|
||||
|
||||
|
||||
protected override void OnInitialized() {
|
||||
AgileService.Subscribe(HasChanged);
|
||||
}
|
||||
@@ -166,7 +112,11 @@ details[open] .sprintSummary::before {
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync() {
|
||||
#if NO_SQL
|
||||
await AgileService.Load();
|
||||
#else
|
||||
await AgileService.Load(Database);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
.agileViewContainer {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sprintDisplayContainer {
|
||||
border: 4px solid var(--paper);
|
||||
box-shadow: 0px 2px 12px rgba(0,0,0,0.2);
|
||||
border-radius: 2px;
|
||||
padding: 25px;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
background-color: var(--paper);
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1025px) {
|
||||
.sprintDisplayContainer {
|
||||
padding: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.sprintSummary {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sprintDisplayContainer.current {
|
||||
border-color: #042901;
|
||||
background-color: var(--paper);
|
||||
}
|
||||
|
||||
.sprintDisplayContainer.planned {
|
||||
border-color: #2a2000;
|
||||
background-color: var(--paper);
|
||||
}
|
||||
|
||||
.sprintDisplayContainer.completed {
|
||||
border-color: #2a2000;
|
||||
background-color: var(--paper);
|
||||
}
|
||||
|
||||
|
||||
details .sprintSummary::before {
|
||||
content: "+";
|
||||
font-weight: bolder;
|
||||
font-size: 1.5rem;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
details[open] .sprintSummary::before {
|
||||
content: "-";
|
||||
}
|
||||
|
||||
|
||||
.sprintTitle {
|
||||
width: 400px;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.sprintDates {
|
||||
width: 160px;
|
||||
text-align: right;
|
||||
}
|
||||
@@ -221,14 +221,19 @@
|
||||
|
||||
@code {
|
||||
|
||||
#if NO_SQL
|
||||
[Parameter]
|
||||
public SprintModel Sprint { get; set; }
|
||||
|
||||
public List<TaskModel> Tasks { get; set; }
|
||||
#else
|
||||
[Parameter]
|
||||
public DbSet<TaskModel> Tasks { get; set; }
|
||||
#endif
|
||||
|
||||
[Parameter]
|
||||
public SprintModel Sprint { get; set; }
|
||||
|
||||
private List<TaskModel> selectedTasks { get; set; }
|
||||
|
||||
|
||||
protected override void OnInitialized() {
|
||||
selectedTasks = (from task in Tasks
|
||||
where task.SprintModelId == Sprint.Id
|
||||
|
||||
Reference in New Issue
Block a user