feat(Documents) Notes/Docs page improvements and warning cleanup

This commit is contained in:
2022-04-07 13:30:00 -04:00
parent b270453030
commit d82e60efdf
223 changed files with 4396 additions and 2861 deletions
+45 -32
View File
@@ -5,34 +5,39 @@
@page "/agile"
@if (AgileService.IsLoaded()) {
@if (AgileService.IsLoaded())
{
<LayoutMediumContentComponent>
<WebsiteTitleComponent>Agile</WebsiteTitleComponent>
<div class="agileViewContainer">
@foreach (var sprint in AgileService.SprintModels.OrderBy(e => e.EndDate).Reverse()) {
@foreach (var sprint in AgileService.AgileSprintModels!.OrderBy(e => e.EndDate).Reverse())
{
<details class="sprintDisplayContainer @sprint.GetSprintType().ToLower()" open="@(sprint.GetSprintType() == SprintType.Current)">
<summary class="sprintSummary">
<div class="sprintTitle">@sprint.Name</div>
<div style="flex: 1; flex-grow: 1;"></div>
<div class="sprintDates">
<div class="sprintStartDate">
@if (sprint.StartDate != null)
{
<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">
@if (sprint.EndDate != null)
{
<b>End: </b>@sprint.EndDate.Value.ToString("dd/MM/yyyy")
}
{
<b>End: </b>
@sprint.EndDate.Value.ToString("dd/MM/yyyy")
}
</div>
</div>
</summary>
<SprintComponent Sprint=sprint Tasks=AgileService.TaskModels></SprintComponent>
<SprintComponent AgileSprint="sprint"></SprintComponent>
</details>
}
@@ -49,29 +54,31 @@
<ContentDividerComponent></ContentDividerComponent>
<InfoBodyComponent>
<InfoQuestionComponent>What is Agile?</InfoQuestionComponent>
<InfoAnswerComponent>
Agile is a work methodology for determing task assignment and release deadlines.
<br/><br/>
My agile practice will be creating tasks in a backlog. Assigning them to weekly sprints. And completing all tasks in the allotted time frame.
<br/><br/>
Any unfinished tasks are moved into the next sprint, or the sprint will be extended by a week.
</InfoAnswerComponent>
</InfoBodyComponent>
<PaperComponent>
<InfoBodyComponent>
<InfoQuestionComponent>What is Agile?</InfoQuestionComponent>
<InfoAnswerComponent>
Agile is a work methodology for determing task assignment and release deadlines.
<br/><br/>
My agile practice will be creating tasks in a backlog. Assigning them to weekly sprints. And completing all tasks in the allotted time frame.
<br/><br/>
Any unfinished tasks are moved into the next sprint, or the sprint will be extended by a week.
</InfoAnswerComponent>
</InfoBodyComponent>
</PaperComponent>
</LayoutMediumContentComponent>
}
else {
<LoadingComponent></LoadingComponent>
else
{
<LoadingComponent/>
}
@code {
#if NO_SQL
public List<TaskModel> Tasks => AgileService.TaskModels;
public List<SprintModel> Sprints => AgileService.SprintModels;
#else
[Inject]
DatabaseContext Database { get; set; }
@@ -83,21 +90,26 @@ else {
public DbSet<SprintModel> Sprints { get; set; }
#endif
private readonly List<TaskModel> backlog = new();
private readonly List<AgileTaskModel> backlog = new();
protected override void OnInitialized() {
protected override void OnInitialized()
{
AgileService.Subscribe(HasChanged);
}
void IDisposable.Dispose() {
void IDisposable.Dispose()
{
AgileService.Unsubscribe(HasChanged);
}
void HasChanged() {
void HasChanged()
{
backlog.Clear();
foreach (var task in Tasks) {
if (task.SprintModelId == null) {
foreach (var task in AgileService.AgileTaskModels!)
{
if (task.AgileSprintModelId == null)
{
backlog.Add(task);
}
}
@@ -105,7 +117,8 @@ else {
StateHasChanged();
}
protected override async Task OnInitializedAsync() {
protected override async Task OnInitializedAsync()
{
#if NO_SQL
await AgileService.Load();
#else
+1 -1
View File
@@ -7,7 +7,7 @@
.sprintDisplayContainer {
border: 4px solid var(--paper);
box-shadow: 0px 2px 12px rgba(0,0,0,0.2);
box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.2);
border-radius: 2px;
padding: 25px;
margin: auto;
+5 -24
View File
@@ -1,6 +1,7 @@
<div class="sprintContainer">
<div class="tasksContainer">
@foreach (var task in Backlog) {
@foreach (var task in Backlog)
{
<div class="taskContainer @task.Status.ToLower()">
<div class="taskName">@task.Name</div>
<div class="taskDetails">
@@ -17,7 +18,8 @@
</div>
</LayoutColumnComponent>
<LayoutColumnComponent>
@if (task.Finished != null) {
@if (task.Finished != null)
{
<div class="taskFinished">
<b>Finished: </b>@task.Finished
</div>
@@ -49,19 +51,6 @@
padding-top: 16px;
}
.sprintDescription {
grid-area: description;
}
.sprintStartDate {
}
.sprintEndDate {
}
.sprintNotes {
}
@@media only screen and (max-width: 1025px) {
.sprintContainer {
@@ -73,14 +62,6 @@
box-shadow: none;
padding: 8px;
}
.sprintStartDate {
text-align: left;
}
.sprintEndDate {
text-align: left;
}
}
.tasksContainer {
@@ -197,6 +178,6 @@
@code {
[Parameter]
public List<TaskModel> Backlog { get; set; }
public List<AgileTaskModel> Backlog { get; set; } = default!;
}
+13 -33
View File
@@ -1,16 +1,18 @@
<div class="sprintContainer">
<div class="sprintStatus">
<b>Status: </b>@Sprint.GetSprintType()
<b>Status: </b>@AgileSprint.GetSprintType()
</div>
<div class="sprintDescription">
<b>Description: </b>@Sprint.Description
<b>Description: </b>@AgileSprint.Description
</div>
<div class="sprintNotes">
<b>Notes: </b>@Sprint.Notes
<b>Notes: </b>@AgileSprint.Notes
</div>
<div class="tasksContainer">
@if (selectedTasks.Count > 0) {
@foreach (var task in selectedTasks) {
@if (AgileSprint.AgileTaskModels.Count > 0)
{
@foreach (var task in AgileSprint.AgileTaskModels)
{
<div class="taskContainer @task.Status.ToLower() @task.Task.ToLower()">
<div class="taskName">@task.Name</div>
<div class="taskDetails">
@@ -28,13 +30,14 @@
</LayoutColumnComponent>
<LayoutColumnComponent>
@if (task.Finished != null) {
@if (task.Finished != null)
{
<div class="taskFinished">
<b>Finished: </b>@task.Finished.Value.ToString("dd/MM/yyyy")
</div>
}
<div class="taskCreated">
<b>Created: </b>@task.Created.Value.ToString("dd/MM/yyyy")
<b>Created: </b>@task.Created!.Value.ToString("dd/MM/yyyy")
</div>
</LayoutColumnComponent>
</LayoutRowComponent>
@@ -48,7 +51,8 @@
</div>
}
}
else {
else
{
<div>Add Tasks...</div>
}
</div>
@@ -66,14 +70,6 @@
grid-area: description;
}
.sprintStartDate {
}
.sprintEndDate {
}
.sprintNotes {
}
@@media only screen and (max-width: 1025px) {
@@ -221,23 +217,7 @@
@code {
#if NO_SQL
[Parameter]
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
select task).OrderBy(x => x.Created).OrderBy(x => x.Finished).Reverse().OrderBy(x => x.Status).ToList();
}
public AgileSprintModel AgileSprint { get; set; } = default!;
}