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
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@page "/changelog"
|
||||
@implements IDisposable;
|
||||
@inject IGitService GitService;
|
||||
@inject DatabaseContext Database;
|
||||
|
||||
@layout PageLayout
|
||||
|
||||
@@ -47,7 +46,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@foreach (var change in patch.ChangeModels) {
|
||||
@foreach (var change in Changes.FindAll(e => e.PatchModelId == patch.Id)) {
|
||||
@if (!change.Important.Equals("True") && isViewImportant) {
|
||||
continue;
|
||||
}
|
||||
@@ -56,12 +55,12 @@
|
||||
<div>
|
||||
<div>
|
||||
<b>
|
||||
- @change.Name
|
||||
<span>- @change.Name </span>
|
||||
|
||||
@if (change.Commit != CommitType.None) {
|
||||
<span>(@change.Commit)</span>
|
||||
}
|
||||
:
|
||||
<span>: </span>
|
||||
</b> @((MarkupString)change.Description)
|
||||
</div>
|
||||
</div>
|
||||
@@ -70,8 +69,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br/>
|
||||
}
|
||||
|
||||
</PaperComponent>
|
||||
@@ -84,11 +81,22 @@ else {
|
||||
|
||||
@code {
|
||||
|
||||
#if NO_SQL
|
||||
[Parameter]
|
||||
public List<PatchModel> Patches { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public List<ChangeModel> Changes { get; set; }
|
||||
#else
|
||||
[Inject]
|
||||
DatabaseContext Database { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public DbSet<PatchModel> Patches { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public DbSet<ChangeModel> Changes { get; set; }
|
||||
#endif
|
||||
|
||||
private bool isViewImportant = true;
|
||||
|
||||
@@ -113,7 +121,11 @@ else {
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync() {
|
||||
#if NO_SQL
|
||||
GitService.Load();
|
||||
#else
|
||||
GitService.Load(Database);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
.patchContainer {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1025px) {
|
||||
.patchContainer {
|
||||
border: none;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
padding-top: 16px;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user