From b46a46471826a7661e2d928a07a704155948fffd Mon Sep 17 00:00:00 2001 From: Gabriel Alonso Varela Date: Mon, 14 Oct 2024 11:16:30 +0200 Subject: [PATCH 1/9] Front HTML code --- .../src/main/ngx/src/app/app.module.ts | 2 +- .../students-detail.component.css | 0 .../students-detail.component.html | 12 ++++++++++ .../students-detail.component.spec.ts | 23 +++++++++++++++++++ .../students-detail.component.ts | 10 ++++++++ .../students-new/students-new.component.css | 0 .../students-new/students-new.component.html | 9 ++++++++ .../students-new.component.spec.ts | 23 +++++++++++++++++++ .../students-new/students-new.component.ts | 10 ++++++++ .../main/students/students-routing.module.ts | 6 ++++- .../src/app/main/students/students.module.ts | 9 ++++++-- 11 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css create mode 100644 cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html create mode 100644 cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.spec.ts create mode 100644 cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.ts create mode 100644 cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css create mode 100644 cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html create mode 100644 cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts create mode 100644 cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.ts diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/app.module.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/app.module.ts index 897f497e4..d9ae8e811 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/app.module.ts +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/app.module.ts @@ -29,7 +29,7 @@ export const customProviders: any = [ ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }) ], declarations: [ - AppComponent + AppComponent, ], bootstrap: [ AppComponent diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html new file mode 100644 index 000000000..096fa0d7a --- /dev/null +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html @@ -0,0 +1,12 @@ + + + +
+ + +
+
+ +
+
+
diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.spec.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.spec.ts new file mode 100644 index 000000000..b3fcb8c7c --- /dev/null +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { StudentsDetailComponent } from './students-detail.component'; + +describe('StudentsDetailComponent', () => { + let component: StudentsDetailComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ StudentsDetailComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(StudentsDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.ts new file mode 100644 index 000000000..1a615dab1 --- /dev/null +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-students-detail', + templateUrl: './students-detail.component.html', + styleUrls: ['./students-detail.component.css'] +}) +export class StudentsDetailComponent { + +} diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html new file mode 100644 index 000000000..c3d282599 --- /dev/null +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html @@ -0,0 +1,9 @@ + +
+
+ + + +
+
+
diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts new file mode 100644 index 000000000..eb0dfb6b8 --- /dev/null +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { StudentsNewComponent } from './students-new.component'; + +describe('StudentsNewComponent', () => { + let component: StudentsNewComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ StudentsNewComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(StudentsNewComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.ts new file mode 100644 index 000000000..4d7d4074b --- /dev/null +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-students-new', + templateUrl: './students-new.component.html', + styleUrls: ['./students-new.component.css'] +}) +export class StudentsNewComponent { + +} diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-routing.module.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-routing.module.ts index f5e6a839c..6ebcbc7cc 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-routing.module.ts +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-routing.module.ts @@ -1,9 +1,13 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { StudentsNewComponent } from './students-new/students-new.component'; +import { StudentsDetailComponent } from './students-detail/students-detail.component'; import { StudentsTableComponent } from './students-table/students-table.component'; const routes: Routes = [ - { path:'', pathMatch:'full', component: StudentsTableComponent} + { path:'', pathMatch:'full', component: StudentsTableComponent}, + { path:"list/new", component:StudentsNewComponent}, + { path:"list/:id", component:StudentsDetailComponent} ]; @NgModule({ diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students.module.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students.module.ts index f5b405ca5..9b66196e4 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students.module.ts +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students.module.ts @@ -1,12 +1,17 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { OntimizeWebModule } from 'ontimize-web-ngx'; + import { StudentsRoutingModule } from './students-routing.module'; +import { StudentsDetailComponent } from './students-detail/students-detail.component'; +import { StudentsNewComponent } from './students-new/students-new.component'; +import { OntimizeWebModule } from 'ontimize-web-ngx'; import { StudentsTableComponent } from './students-table/students-table.component'; @NgModule({ declarations: [ + StudentsDetailComponent, + StudentsNewComponent StudentsTableComponent ], imports: [ @@ -15,4 +20,4 @@ import { StudentsTableComponent } from './students-table/students-table.componen StudentsRoutingModule ] }) -export class StudentsModule { } \ No newline at end of file +export class StudentsModule { } From ca528df83cbbc7dd4c581907f7f23c70a834d9b9 Mon Sep 17 00:00:00 2001 From: Chus Date: Tue, 15 Oct 2024 09:07:48 +0200 Subject: [PATCH 2/9] Front HTML&CSS code --- .../students-detail.component.css | 37 +++++++++++++++ .../students-detail.component.html | 2 +- .../students-new/students-new.component.css | 45 +++++++++++++++++++ .../students-new/students-new.component.html | 21 ++++++--- .../students-new.component.spec.ts | 23 ---------- .../students-new/students-new.component.ts | 9 +++- .../resources/public/restapi/openapi-rest.yml | 2 +- 7 files changed, 107 insertions(+), 32 deletions(-) delete mode 100644 cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css index e69de29bb..04628ca5c 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css @@ -0,0 +1,37 @@ + + /* Estilos para los formularios */ + o-form[attr="contactDetail"] { + background-color: #d5e9de; + border: 2px solid #a8d5ba; + padding: 20px; + border-radius: 10px; + max-width: 700px; + margin: 0 auto; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + } + + /* Contenedor con fxLayout row para manejar las filas */ + [fxLayout="row"] { + display: flex; + align-items: center; + justify-content: space-evenly; + flex-wrap: wrap; + } + + /* Inputs de texto y email */ + o-text-input, o-email-input { + display: block; + width: 86%; + padding: 10px; + margin: 10px 0; + background-color: #F5F5F5; + border: 1px solid #c8e6c9; + border-radius: 5px; + font-size: 14px; + color: #2f4f4f; + box-sizing: border-box; + } + + + + \ No newline at end of file diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html index 096fa0d7a..d8e51dd2c 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html @@ -1,4 +1,4 @@ - +
diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css index e69de29bb..b4ad871c6 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css @@ -0,0 +1,45 @@ + + /* Estilos para los formularios */ + o-form[attr="contactDetail"] { + background-color: #d5e9de; + border: 2px solid #a8d3b8; + padding: 20px; + border-radius: 10px; + max-width: 700px; + margin: 0 auto; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + } + + [fxLayout="row"] { + display: flex; + align-items: center; + justify-content:space-between; + flex-wrap: wrap; + } + + o-text-input, o-email-input { + display: block; + width: 100%; + padding: 10px; + margin: 10px 0 10px 10px; + background-color: #F5F5F5; + border: 1px solid #a8d3b8; + border-radius: 5px; + font-size: 14px; + color: #2f4f4f; + box-sizing: border-box; + } + +label { + display: block; + width: 100%; + margin: 10px 0 10px 10px; + font-size: 16px; + font-weight: bold; + color: #668873; + box-sizing: border-box; +} + + + + \ No newline at end of file diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html index c3d282599..dc0ce240c 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html @@ -1,9 +1,18 @@ - -
-
- - - + +
+
+ + +
+
+ + +
+
+ +
+ +
diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts deleted file mode 100644 index eb0dfb6b8..000000000 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { StudentsNewComponent } from './students-new.component'; - -describe('StudentsNewComponent', () => { - let component: StudentsNewComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ StudentsNewComponent ] - }) - .compileComponents(); - - fixture = TestBed.createComponent(StudentsNewComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.ts index 4d7d4074b..0c13cbece 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.ts +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.ts @@ -1,4 +1,5 @@ -import { Component } from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; +import { OFormComponent } from 'ontimize-web-ngx'; @Component({ selector: 'app-students-new', @@ -7,4 +8,10 @@ import { Component } from '@angular/core'; }) export class StudentsNewComponent { + @ViewChild('studentsform') protected formStudents: OFormComponent; + + insertStudent() { + this.formStudents.insert(); + } + } diff --git a/cd2024bfs4g1-openapi/src/main/resources/public/restapi/openapi-rest.yml b/cd2024bfs4g1-openapi/src/main/resources/public/restapi/openapi-rest.yml index 05c488ded..59561ed9c 100644 --- a/cd2024bfs4g1-openapi/src/main/resources/public/restapi/openapi-rest.yml +++ b/cd2024bfs4g1-openapi/src/main/resources/public/restapi/openapi-rest.yml @@ -4,7 +4,7 @@ info: version: '1.0' description: The cd2024bfs4g1 API servers: - - url: '/' + - url: '' description: Localhost paths: From b4aa82f0f18f0c77f5b39118b04a52f955efd647 Mon Sep 17 00:00:00 2001 From: Gabriel Alonso Varela Date: Mon, 14 Oct 2024 11:16:30 +0200 Subject: [PATCH 3/9] Front HTML code --- .../students-new/students-new.component.html | 2 -- .../students-new.component.spec.ts | 23 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html index dc0ce240c..57d256f55 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html @@ -13,6 +13,4 @@
- -
diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts new file mode 100644 index 000000000..eb0dfb6b8 --- /dev/null +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { StudentsNewComponent } from './students-new.component'; + +describe('StudentsNewComponent', () => { + let component: StudentsNewComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ StudentsNewComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(StudentsNewComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); From de26238b473281b4249cd1be9570863829849630 Mon Sep 17 00:00:00 2001 From: Chus Date: Tue, 15 Oct 2024 09:07:48 +0200 Subject: [PATCH 4/9] Front HTML&CSS code --- .../students-new/students-new.component.html | 2 ++ .../students-new.component.spec.ts | 23 ------------------- 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html index 57d256f55..dc0ce240c 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html @@ -13,4 +13,6 @@
+ +
diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts deleted file mode 100644 index eb0dfb6b8..000000000 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { StudentsNewComponent } from './students-new.component'; - -describe('StudentsNewComponent', () => { - let component: StudentsNewComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ StudentsNewComponent ] - }) - .compileComponents(); - - fixture = TestBed.createComponent(StudentsNewComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); From 784e447053d841780455021c108237f7a7d394d9 Mon Sep 17 00:00:00 2001 From: Gabriel Alonso Varela Date: Wed, 16 Oct 2024 13:54:32 +0200 Subject: [PATCH 5/9] HTML&CSS Changes --- .../students-detail.component.css | 88 ++++++++++++------- .../students-detail.component.html | 27 +++--- .../students-new/students-new.component.css | 25 ++++-- .../students-new/students-new.component.html | 10 +-- .../main/students/students-routing.module.ts | 4 +- 5 files changed, 95 insertions(+), 59 deletions(-) diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css index 04628ca5c..92710594a 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css @@ -1,37 +1,61 @@ +o-form-toolbar { + background-color: #f0f0f0; + padding: 10px; + border-radius: 5px; + box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); +} - /* Estilos para los formularios */ - o-form[attr="contactDetail"] { - background-color: #d5e9de; - border: 2px solid #a8d5ba; - padding: 20px; - border-radius: 10px; - max-width: 700px; - margin: 0 auto; - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); - } - - /* Contenedor con fxLayout row para manejar las filas */ - [fxLayout="row"] { - display: flex; - align-items: center; - justify-content: space-evenly; - flex-wrap: wrap; - } - - /* Inputs de texto y email */ - o-text-input, o-email-input { - display: block; - width: 86%; - padding: 10px; - margin: 10px 0; - background-color: #F5F5F5; - border: 1px solid #c8e6c9; - border-radius: 5px; - font-size: 14px; - color: #2f4f4f; - box-sizing: border-box; - } +o-form-toolbar button { + margin-right: 10px; + background-color: #007bff; + color: white; + border-radius: 3px; + padding: 5px 15px; +} + +o-form { + background-color: #d5e9de; + border: 2px solid #a8d3b8; + padding: 20px; + border-radius: 10px; + max-width: 700px; + margin: 0 auto; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); +} + +[fxLayout="row"] { + display: flex; + align-items: center; + justify-content:space-between; + flex-wrap: wrap; +} + +o-text-input, o-email-input { + display: block; + width: 100%; + padding: 10px; + margin: 10px 0 10px 10px; + background-color: #F5F5F5; + border: 1px solid #a8d3b8; + border-radius: 5px; + font-size: 14px; + color: #2f4f4f; + box-sizing: border-box; +} + +label { + display: block; + width: 100%; + margin: 10px 0 10px 10px; + font-size: 16px; + font-weight: bold; + color: #668873; + box-sizing: border-box; +} +.hidden { + display: none; +} \ No newline at end of file diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html index d8e51dd2c..a9264f571 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html @@ -1,12 +1,17 @@ - - - -
- - -
-
- -
-
+ + +
+
+ + +
+
+ + +
+
+ + +
+
diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css index b4ad871c6..7596c4db2 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css @@ -1,6 +1,19 @@ +o-form-toolbar { + background-color: #f0f0f0; + padding: 10px; + border-radius: 5px; + box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); + } + + o-form-toolbar button { + margin-right: 10px; + background-color: #007bff; + color: white; + border-radius: 3px; + padding: 5px 15px; + } - /* Estilos para los formularios */ - o-form[attr="contactDetail"] { + o-form { background-color: #d5e9de; border: 2px solid #a8d3b8; padding: 20px; @@ -9,14 +22,14 @@ margin: 0 auto; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } - + [fxLayout="row"] { display: flex; align-items: center; justify-content:space-between; flex-wrap: wrap; } - + o-text-input, o-email-input { display: block; width: 100%; @@ -39,7 +52,3 @@ label { color: #668873; box-sizing: border-box; } - - - - \ No newline at end of file diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html index dc0ce240c..e4a096888 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html @@ -1,18 +1,16 @@ - +
- +
- +
- +
- -
diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-routing.module.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-routing.module.ts index 6ebcbc7cc..0a2e01b9c 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-routing.module.ts +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-routing.module.ts @@ -6,8 +6,8 @@ import { StudentsTableComponent } from './students-table/students-table.componen const routes: Routes = [ { path:'', pathMatch:'full', component: StudentsTableComponent}, - { path:"list/new", component:StudentsNewComponent}, - { path:"list/:id", component:StudentsDetailComponent} + { path:"new", component:StudentsNewComponent}, + { path:":id", component:StudentsDetailComponent} ]; @NgModule({ From 534a5f4b718560c1a01175090bf9a1de309c0e4d Mon Sep 17 00:00:00 2001 From: Gabriel Alonso Varela Date: Wed, 16 Oct 2024 14:26:57 +0200 Subject: [PATCH 6/9] Edited Module --- .../src/main/ngx/src/app/main/students/students.module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students.module.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students.module.ts index 9b66196e4..11b489406 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students.module.ts +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students.module.ts @@ -11,7 +11,7 @@ import { StudentsTableComponent } from './students-table/students-table.componen @NgModule({ declarations: [ StudentsDetailComponent, - StudentsNewComponent + StudentsNewComponent, StudentsTableComponent ], imports: [ From 608a9b0129143a1d0f98fc80be8fbdd0cdf7470d Mon Sep 17 00:00:00 2001 From: Gabriel Alonso Varela Date: Thu, 17 Oct 2024 09:49:58 +0200 Subject: [PATCH 7/9] Edited CSS --- .../main/students/students-detail/students-detail.component.css | 2 +- .../app/main/students/students-new/students-new.component.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css index 92710594a..e36180d76 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.css @@ -18,7 +18,7 @@ o-form { border: 2px solid #a8d3b8; padding: 20px; border-radius: 10px; - max-width: 700px; + max-width: 80%; margin: 0 auto; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css index 7596c4db2..77241687e 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.css @@ -18,7 +18,7 @@ o-form-toolbar { border: 2px solid #a8d3b8; padding: 20px; border-radius: 10px; - max-width: 700px; + max-width: 80%; margin: 0 auto; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } From 6255f9673c7cd24e05c0534ed41e14484f06a702 Mon Sep 17 00:00:00 2001 From: Gabriel Alonso Varela Date: Thu, 17 Oct 2024 10:21:05 +0200 Subject: [PATCH 8/9] Implementing Delete --- .../cd2024bfs4g1/api/core/service/IStudentService.java | 2 ++ .../cd2024bfs4g1/model/core/service/StudentService.java | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cd2024bfs4g1-api/src/main/java/com/campusdual/cd2024bfs4g1/api/core/service/IStudentService.java b/cd2024bfs4g1-api/src/main/java/com/campusdual/cd2024bfs4g1/api/core/service/IStudentService.java index 683bef004..f5619cf17 100644 --- a/cd2024bfs4g1-api/src/main/java/com/campusdual/cd2024bfs4g1/api/core/service/IStudentService.java +++ b/cd2024bfs4g1-api/src/main/java/com/campusdual/cd2024bfs4g1/api/core/service/IStudentService.java @@ -14,4 +14,6 @@ public interface IStudentService { EntityResult studentInsert(Map attrMap) throws OntimizeJEERuntimeException; EntityResult studentUpdate(Map attrMap, Map keyMap) throws OntimizeJEERuntimeException; + + EntityResult studentDelete(Map keyMap) throws OntimizeJEERuntimeException; } diff --git a/cd2024bfs4g1-model/src/main/java/com/campusdual/cd2024bfs4g1/model/core/service/StudentService.java b/cd2024bfs4g1-model/src/main/java/com/campusdual/cd2024bfs4g1/model/core/service/StudentService.java index 8605fc58a..9662e5ad2 100644 --- a/cd2024bfs4g1-model/src/main/java/com/campusdual/cd2024bfs4g1/model/core/service/StudentService.java +++ b/cd2024bfs4g1-model/src/main/java/com/campusdual/cd2024bfs4g1/model/core/service/StudentService.java @@ -12,8 +12,6 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; -import javax.swing.text.html.parser.Entity; - @Service("StudentService") @Lazy public class StudentService implements IStudentService { @@ -39,4 +37,9 @@ public EntityResult studentInsert(Map attrMap) throws OntimizeJE public EntityResult studentUpdate(Map attrMap, Map keyMap) throws OntimizeJEERuntimeException { return this.daoHelper.update(this.studentDao, attrMap, keyMap); } + + @Override + public EntityResult studentDelete(Map keyMap) throws OntimizeJEERuntimeException { + return this.daoHelper.delete(this.studentDao, keyMap); + } } From e75785fc64e371dc4e4cc6625415cea824e6b429 Mon Sep 17 00:00:00 2001 From: Gabriel Alonso Varela Date: Thu, 17 Oct 2024 10:24:51 +0200 Subject: [PATCH 9/9] Email required --- .../students/students-detail/students-detail.component.html | 2 +- .../app/main/students/students-new/students-new.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html index a9264f571..202bfaad6 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-detail/students-detail.component.html @@ -11,7 +11,7 @@
- +
diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html index e4a096888..7f62a2961 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/students/students-new/students-new.component.html @@ -10,7 +10,7 @@
- +