Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1c745de
feat: add drag drop module
AlexandreInsua Aug 7, 2024
e45f900
Merge branch 'development' into kanban
AlexandreInsua Aug 11, 2024
0728c38
feat: add two pannels
AlexandreInsua Aug 11, 2024
1c108be
chore(project): change deprecated configuration options
AlexandreInsua Aug 14, 2024
eefb205
feat(IN-1): create todo form dialog
AlexandreInsua Aug 15, 2024
208c61e
feat(IN-1): save a todo
AlexandreInsua Aug 17, 2024
3b7feac
fix(IN-1): avoid save template value on form todo cancel button clicked
AlexandreInsua Aug 20, 2024
3845da7
feat(IN-1): implements columns
AlexandreInsua Aug 21, 2024
3882480
feat(IN-1): add drag functionality to todo card
AlexandreInsua Aug 21, 2024
72ddf05
feat(IN-1): add todo card styles
AlexandreInsua Aug 22, 2024
a10677b
Merge branch 'development' into kanban
AlexandreInsua Aug 25, 2024
4b2264e
chore(project): merge new dependencies
AlexandreInsua Aug 25, 2024
0957949
feat(IN-1) add reordering list functionality
AlexandreInsua Aug 25, 2024
bab2af1
chore(project): wip skip tests
AlexandreInsua Aug 25, 2024
f3876e7
feat(IN-1): persist order list on todo is moved
AlexandreInsua Aug 26, 2024
4202f07
Merge branch 'development' into kanban
AlexandreInsua Sep 15, 2024
a14ef72
feat(IN-1): generate package-lock.json
AlexandreInsua Sep 15, 2024
5f3d082
feat(IN-1): fix linting
AlexandreInsua Sep 15, 2024
7ac3745
solve merge conflicts
AlexandreInsua Oct 20, 2024
df94988
generate package-lock.json
AlexandreInsua Oct 20, 2024
0bac2b7
Merge branch 'development' into kanban
AlexandreInsua Mar 8, 2025
9cb5933
Merge branch 'development' into kanban
AlexandreInsua Apr 26, 2025
f783147
Merge branch 'development' into kanban
AlexandreInsua May 4, 2025
a6094bb
add mat-table
AlexandreInsua May 11, 2025
9ec2a2e
Merge branch 'development' into kanban
AlexandreInsua May 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
Expand Down
29 changes: 25 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@angular/platform-browser-dynamic": "19.2.13",
"@angular/router": "19.2.13",
"rxjs": "7.8.2",
"uuid": "10.0.0",
"tslib": "2.8.1",
"zone.js": "0.15.1"
},
Expand All @@ -38,6 +39,7 @@
"@angular-eslint/eslint-plugin-template": "19.4.0",
"@angular-eslint/schematics": "19.4.0",
"@angular-eslint/template-parser": "19.4.0",
"@types/uuid": "10.0.0",
"@babel/core": "7.27.1",
"@babel/preset-env": "7.27.2",
"@babel/preset-typescript": "7.27.1",
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ header {
a {
color: inherit;
text-decoration: none;
display: block;
width: 100%;
}
}
}
Expand Down
14 changes: 12 additions & 2 deletions src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { MatButtonModule } from '@angular/material/button';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatToolbarModule } from '@angular/material/toolbar';
import { BrowserModule } from '@angular/platform-browser';
import { MatIconModule } from '@angular/material/icon';
import { provideAnimations } from '@angular/platform-browser/animations';
import { provideRouter } from '@angular/router';
import { routes } from './app.routes';
Expand All @@ -11,10 +12,13 @@ import {
VERSION as MAT_VERSION,
MatNativeDateModule,
} from '@angular/material/core';
import { FormsModule } from '@angular/forms';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatDialogModule } from '@angular/material/dialog';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
import { MatFormFieldModule } from '@angular/material/form-field';
import { DragDropModule } from '@angular/cdk/drag-drop';
import { MatCardModule } from '@angular/material/card';

console.info('Angular CDK version', CDK_VERSION.full);
console.info('Angular Material version', MAT_VERSION.full);
Expand All @@ -25,13 +29,19 @@ export const appConfig: ApplicationConfig = {
provideRouter(routes),
importProvidersFrom(
BrowserModule,
DragDropModule,
FormsModule,
ReactiveFormsModule,
MatCardModule,
MatSidenavModule,
MatToolbarModule,
MatButtonModule,
MatDialogModule,
MatNativeDateModule,
FormsModule,
MatFormFieldModule,
MatSelectModule,
MatInputModule,
MatIconModule,
MatInputModule
),
provideAnimations(),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<h2>{{ title }}</h2>

<app-todos-wrapper
[identifier]="identifier"
[todos]="todos"
(updatedList)="updateList($event)"></app-todos-wrapper>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:host {
height: 100%;
flex: 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { TodoListComponent } from './todo-list.component';

describe('TodoListComponent', () => {
let component: TodoListComponent;
let fixture: ComponentFixture<TodoListComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [TodoListComponent]
})
.compileComponents();

fixture = TestBed.createComponent(TodoListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { TodostWrapperComponent } from '../todos-wrapper/todos-wrapper.component';
import { Todo } from '../../model/todo';

@Component({
selector: 'app-todo-list',
standalone: true,
imports: [TodostWrapperComponent],
templateUrl: './todo-list.component.html',
styleUrl: './todo-list.component.scss',
})
export class TodoListComponent {
@Input() title!: string;
@Input() identifier!: string;
@Input() todos!: Todo[];

@Output() updatedList = new EventEmitter<Todo[]>();

updateList(event: Todo[]): void {
this.updatedList.emit(event);
}
}
9 changes: 9 additions & 0 deletions src/app/components/kanban/components/todo/todo.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<mat-card class="todo" appearance="outlined" cdkDrag>
<mat-card-header>
<mat-card-title-group>
<mat-card-title>{{ todo.title }}</mat-card-title>
<mat-card-subtitle>{{ todo.createAt | date: 'long' }}</mat-card-subtitle>
</mat-card-title-group>
</mat-card-header>
<mat-card-content> >{{ todo.description }} </mat-card-content>
</mat-card>
26 changes: 26 additions & 0 deletions src/app/components/kanban/components/todo/todo.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.todo {
width: 100%;
height: 150px;
border: solid 1px #ccc;
color: rgba(0, 0, 0, 0.87);
cursor: move;
display: flex;
// justify-content: center;
// align-items: center;
// text-align: center;
background: #fff;
border-radius: 4px;
position: relative;
z-index: 1;
transition: box-shadow 200ms cubic-bezier(0, 0, 0.2, 1);
box-shadow:
0 3px 1px -2px rgba(0, 0, 0, 0.2),
0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 1px 5px 0 rgba(0, 0, 0, 0.12);
&:active {
box-shadow:
0 5px 5px -3px rgba(0, 0, 0, 0.2),
0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12);
}
}
22 changes: 22 additions & 0 deletions src/app/components/kanban/components/todo/todo.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { TodoComponent } from './todo.component';

describe('TodoComponent', () => {
let component: TodoComponent;
let fixture: ComponentFixture<TodoComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [TodoComponent],
}).compileComponents();

fixture = TestBed.createComponent(TodoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it.skip('should create', () => {
expect(component).toBeTruthy();
});
});
16 changes: 16 additions & 0 deletions src/app/components/kanban/components/todo/todo.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Component, Input } from '@angular/core';
import { Todo } from '../../model/todo';
import { MatCardModule } from '@angular/material/card';
import { DatePipe } from '@angular/common';
import { CdkDrag } from '@angular/cdk/drag-drop';

@Component({
selector: 'app-todo',
standalone: true,
imports: [CdkDrag, DatePipe, MatCardModule],
templateUrl: './todo.component.html',
styleUrl: './todo.component.scss',
})
export class TodoComponent {
@Input() todo!: Todo;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div
class="todo-container"
cdkDropList
[cdkDropListData]="todos"
(cdkDropListDropped)="drop($event)">
@for (todo of todos; track todo) {
<app-todo [todo]="todo"></app-todo>
}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:host {
display: block;
height: 90%;
background-color: beige;
border-radius: 1em;
.todo-container {
height: 100%;
display: flex;
flex-direction: column;
gap: 1em;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { TodostWrapperComponent } from './todos-wrapper.component';

describe('TodoListWrapperComponent', () => {
let component: TodostWrapperComponent;
let fixture: ComponentFixture<TodostWrapperComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [TodostWrapperComponent],
}).compileComponents();

fixture = TestBed.createComponent(TodostWrapperComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { TodoComponent } from '../todo/todo.component';
import { Todo } from '../../model/todo';
import {
CdkDragDrop,
CdkDropList,
moveItemInArray,
} from '@angular/cdk/drag-drop';

@Component({
selector: 'app-todos-wrapper',
standalone: true,
imports: [CdkDropList, TodoComponent],
templateUrl: './todos-wrapper.component.html',
styleUrl: './todos-wrapper.component.scss',
})
export class TodostWrapperComponent {
@Input() identifier!: string;
@Input() todos!: Todo[];

@Output() updatedList = new EventEmitter<Todo[]>();

drop(event: CdkDragDrop<Todo[]>) {
moveItemInArray(this.todos, event.previousIndex, event.currentIndex);
this.updatedList.emit(this.todos);
}
}
27 changes: 27 additions & 0 deletions src/app/components/kanban/form/todo-form.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<h2 mat-dialog-title>Crear una tarefa</h2>
<mat-dialog-content>
<form [formGroup]="form" class="task-form">
<mat-form-field class="title">
<mat-label>Título</mat-label>
<input matInput placeholder="Título da tarea" formControlName="title" />
</mat-form-field>

<mat-form-field class="description">
<mat-label>Descrición da tarefa</mat-label>
<textarea
matInput
placeholder="Descrición da tarefa"
formControlName="description"></textarea>
</mat-form-field>
</form>
</mat-dialog-content>
<mat-dialog-actions>
<button color="warn" mat-flat-button mat-dialog-close>Pechar</button>
<button
[disabled]="!form.valid"
color="primary"
mat-flat-button
(click)="saveData()">
Aceptar
</button>
</mat-dialog-actions>
14 changes: 14 additions & 0 deletions src/app/components/kanban/form/todo-form.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.task-form {
min-width: 150px;
max-width: 500px;
width: 100%;
}

.title,
.description {
width: 100%;
}

mat-dialog-actions {
justify-content: end;
}
Loading