Initial commit
This commit is contained in:
@@ -0,0 +1,172 @@
|
||||
@implements IDisposable;
|
||||
@inject IAgileService AgileService;
|
||||
@inject DatabaseContext Database;
|
||||
|
||||
@layout PageLayout
|
||||
|
||||
@page "/agile"
|
||||
|
||||
@if (AgileService.IsLoaded()) {
|
||||
<LayoutMediumContentComponent>
|
||||
|
||||
<WebsiteTitleComponent>Agile</WebsiteTitleComponent>
|
||||
|
||||
<div class="agileViewContainer">
|
||||
@foreach (var sprint in AgileService.SprintModels.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">
|
||||
<b>Start: </b>@sprint.StartDate.Value.ToString("dd/MM/yyyy")
|
||||
</div>
|
||||
<div class="sprintEndDate">
|
||||
<b>End: </b>@sprint.EndDate.Value.ToString("dd/MM/yyyy")
|
||||
</div>
|
||||
</div>
|
||||
</summary>
|
||||
<SprintComponent Sprint=sprint Tasks=AgileService.TaskModels></SprintComponent>
|
||||
</details>
|
||||
}
|
||||
|
||||
<details class="sprintDisplayContainer">
|
||||
<summary class="sprintSummary">
|
||||
<div class="sprintTitle">Backlog</div>
|
||||
<div style="flex: 1; flex-grow: 1;"></div>
|
||||
</summary>
|
||||
<div>
|
||||
<BacklogComponent Backlog=backlog></BacklogComponent>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
</LayoutMediumContentComponent>
|
||||
}
|
||||
else {
|
||||
<LoadingComponent></LoadingComponent>
|
||||
}
|
||||
|
||||
|
||||
<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 {
|
||||
|
||||
[Parameter]
|
||||
public DbSet<SprintModel> Sprints { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public DbSet<TaskModel> Tasks { get; set; }
|
||||
|
||||
|
||||
private readonly List<TaskModel> backlog = new();
|
||||
|
||||
|
||||
protected override void OnInitialized() {
|
||||
AgileService.Subscribe(HasChanged);
|
||||
}
|
||||
|
||||
void IDisposable.Dispose() {
|
||||
AgileService.Unsubscribe(HasChanged);
|
||||
}
|
||||
|
||||
void HasChanged() {
|
||||
Sprints = AgileService.SprintModels;
|
||||
Tasks = AgileService.TaskModels;
|
||||
|
||||
backlog.Clear();
|
||||
|
||||
foreach (var task in Tasks) {
|
||||
if (task.SprintModelId == null) {
|
||||
backlog.Add(task);
|
||||
}
|
||||
}
|
||||
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync() {
|
||||
await AgileService.Load(Database);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
<div class="sprintContainer">
|
||||
<div class="tasksContainer">
|
||||
@foreach (var task in Backlog) {
|
||||
<div class="taskContainer @task.Status.ToLower()">
|
||||
<div class="taskName">@task.Name</div>
|
||||
<div class="taskDetails">
|
||||
<LayoutRowComponent>
|
||||
<LayoutColumnComponent>
|
||||
<div class="taskType">
|
||||
<b>Type: </b>@task.Task.Replace("_", " ")
|
||||
</div>
|
||||
<div class="taskStatus">
|
||||
<b>Status: </b>@task.Status.Replace("_", " ")
|
||||
</div>
|
||||
<div class="taskPriority">
|
||||
<b>Priority: </b>@task.Priority
|
||||
</div>
|
||||
</LayoutColumnComponent>
|
||||
<LayoutColumnComponent>
|
||||
@if (task.Finished != null) {
|
||||
<div class="taskFinished">
|
||||
<b>Finished: </b>@task.Finished
|
||||
</div>
|
||||
}
|
||||
<div class="taskCreated">
|
||||
<b>Created: </b>@task.Created
|
||||
</div>
|
||||
</LayoutColumnComponent>
|
||||
</LayoutRowComponent>
|
||||
</div>
|
||||
<div class="taskDescription">
|
||||
<b>Description: </b>@task.Description
|
||||
</div>
|
||||
<div class="taskNotes">
|
||||
<b>Notes: </b>@task.Notes
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<style>
|
||||
.sprintContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding-top: 16px;
|
||||
}
|
||||
|
||||
.sprintDescription {
|
||||
grid-area: description;
|
||||
}
|
||||
|
||||
.sprintStartDate {
|
||||
}
|
||||
|
||||
.sprintEndDate {
|
||||
}
|
||||
|
||||
.sprintNotes {
|
||||
}
|
||||
|
||||
|
||||
@@media only screen and (max-width: 1025px) {
|
||||
.sprintContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
border: none;
|
||||
margin-top: 12px;
|
||||
box-shadow: none;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.sprintStartDate {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.sprintEndDate {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.tasksContainer {
|
||||
grid-area: tasks;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
padding: 25px;
|
||||
align-items: stretch;
|
||||
justify-content: stretch;
|
||||
justify-items: stretch;
|
||||
}
|
||||
|
||||
.taskContainer {
|
||||
padding: 25px;
|
||||
border: 1px dashed rgba(0,0,0,0.6);
|
||||
box-shadow: 0px 2px 6px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.taskContainer.@StatusType.In_Progress.ToLower() {
|
||||
border-color: #030129;
|
||||
background-color: #2c3a4c;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.Todo.ToLower() {
|
||||
border-color: #2a2000;
|
||||
background-color: #ffbf0029;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.To_Test.ToLower() {
|
||||
border-color: #030129;
|
||||
background-color: #2c3a4c;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.Canceled.ToLower() {
|
||||
border-color: #290102;
|
||||
background-color: #4C2C33;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.Done.ToLower() {
|
||||
border-color: #042901;
|
||||
background-color: #2E4C2C;
|
||||
}
|
||||
|
||||
|
||||
.taskName {
|
||||
font-weight: bold;
|
||||
grid-area: name;
|
||||
}
|
||||
|
||||
.taskCreated {
|
||||
grid-area: created;
|
||||
}
|
||||
|
||||
.taskFinished {
|
||||
grid-area: finished;
|
||||
}
|
||||
|
||||
.taskStatus {
|
||||
grid-area: status;
|
||||
}
|
||||
|
||||
.taskDescription {
|
||||
margin-top: 10px;
|
||||
grid-area: description;
|
||||
}
|
||||
|
||||
.taskNotes {
|
||||
grid-area: notes;
|
||||
}
|
||||
|
||||
|
||||
@@media only screen and (max-width: 1025px) {
|
||||
.tasksContainer {
|
||||
padding: 0px;
|
||||
margin-top: 12px;
|
||||
padding-top: 12px;
|
||||
border-top: 4px solid rgba(0,0,0,0.4)
|
||||
}
|
||||
|
||||
.taskContainer {
|
||||
padding: 2px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.In_Progress.ToLower() {
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.Todo.ToLower() {
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.Canceled.ToLower() {
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.Done.ToLower() {
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public List<TaskModel> Backlog { get; set; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
<div class="sprintContainer">
|
||||
<div class="sprintStatus">
|
||||
<b>Status: </b>@Sprint.GetSprintType()
|
||||
</div>
|
||||
<div class="sprintDescription">
|
||||
<b>Description: </b>@Sprint.Description
|
||||
</div>
|
||||
<div class="sprintNotes">
|
||||
<b>Notes: </b>@Sprint.Notes
|
||||
</div>
|
||||
<div class="tasksContainer">
|
||||
@if (selectedTasks.Count > 0) {
|
||||
@foreach (var task in selectedTasks) {
|
||||
<div class="taskContainer @task.Status.ToLower() @task.Task.ToLower()">
|
||||
<div class="taskName">@task.Name</div>
|
||||
<div class="taskDetails">
|
||||
<LayoutRowComponent>
|
||||
<LayoutColumnComponent>
|
||||
<div class="taskType">
|
||||
<b>Type: </b>@task.Task.Replace("_", " ")
|
||||
</div>
|
||||
<div class="taskStatus">
|
||||
<b>Status: </b>@task.Status.Replace("_", " ")
|
||||
</div>
|
||||
<div class="taskPriority">
|
||||
<b>Priority: </b>@task.Priority
|
||||
</div>
|
||||
|
||||
</LayoutColumnComponent>
|
||||
<LayoutColumnComponent>
|
||||
@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")
|
||||
</div>
|
||||
</LayoutColumnComponent>
|
||||
</LayoutRowComponent>
|
||||
</div>
|
||||
<div class="taskDescription">
|
||||
<b>Description: </b>@task.Description
|
||||
</div>
|
||||
<div class="taskNotes">
|
||||
<b>Notes: </b>@task.Notes
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else {
|
||||
<div>Add Tasks...</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.sprintContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding-top: 16px;
|
||||
}
|
||||
|
||||
.sprintDescription {
|
||||
grid-area: description;
|
||||
}
|
||||
|
||||
.sprintStartDate {
|
||||
}
|
||||
|
||||
.sprintEndDate {
|
||||
}
|
||||
|
||||
.sprintNotes {
|
||||
}
|
||||
|
||||
|
||||
@@media only screen and (max-width: 1025px) {
|
||||
.sprintContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
border: none;
|
||||
margin-top: 12px;
|
||||
box-shadow: none;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.sprintStartDate {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.sprintEndDate {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.tasksContainer {
|
||||
grid-area: tasks;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
padding: 25px;
|
||||
align-items: stretch;
|
||||
justify-content: stretch;
|
||||
justify-items: stretch;
|
||||
}
|
||||
|
||||
.taskContainer {
|
||||
padding: 25px;
|
||||
border: 1px dashed rgba(0,0,0,0.6);
|
||||
box-shadow: 0px 2px 6px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.taskContainer.@StatusType.In_Progress.ToLower() {
|
||||
border-color: #030129;
|
||||
background-color: #2c3a4c;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.Todo.ToLower() {
|
||||
border-color: #2a2000;
|
||||
background-color: #ffbf0029;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.To_Test.ToLower() {
|
||||
border-color: #030129;
|
||||
background-color: #2c3a4c;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.Canceled.ToLower() {
|
||||
border-color: #290102;
|
||||
background-color: #4C2C33;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.Done.ToLower() {
|
||||
border-color: #042901;
|
||||
background-color: #2E4C2C;
|
||||
}
|
||||
|
||||
|
||||
.taskContainer.@TaskType.Bug.ToLower() {
|
||||
border-style: dotted;
|
||||
border-width: 8px;
|
||||
}
|
||||
|
||||
|
||||
.taskName {
|
||||
font-weight: bold;
|
||||
grid-area: name;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.taskDetails {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.taskCreated {
|
||||
grid-area: created;
|
||||
}
|
||||
|
||||
.taskFinished {
|
||||
grid-area: finished;
|
||||
}
|
||||
|
||||
.taskStatus {
|
||||
grid-area: status;
|
||||
}
|
||||
|
||||
.taskDescription {
|
||||
margin-top: 10px;
|
||||
grid-area: description;
|
||||
}
|
||||
|
||||
.taskNotes {
|
||||
grid-area: notes;
|
||||
}
|
||||
|
||||
|
||||
@@media only screen and (max-width: 1025px) {
|
||||
.tasksContainer {
|
||||
padding: 0px;
|
||||
margin-top: 12px;
|
||||
padding-top: 12px;
|
||||
border-top: 4px solid rgba(0,0,0,0.4)
|
||||
}
|
||||
|
||||
.taskContainer {
|
||||
padding: 2px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
.taskContainer.@StatusType.In_Progress.ToLower() {
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.Todo.ToLower() {
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.Canceled.ToLower() {
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.taskContainer.@StatusType.Done.ToLower() {
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public SprintModel Sprint { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public DbSet<TaskModel> Tasks { 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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user