From c67ba31e02f8a035626741da6269fd98a37369a1 Mon Sep 17 00:00:00 2001 From: David Dominguez Vidal Date: Wed, 15 Jan 2025 15:02:35 +0100 Subject: [PATCH 01/17] Tarea 329 bug solucionado bug solucionado arreglado todo (falta el medio-bug de timetable) medio arreglado --- .../bootcamp-details.component.html | 6 +- .../bootcamp-details.component.ts | 72 ++++++++++++++----- .../calendar-attendance.component.ts | 9 ++- 3 files changed, 62 insertions(+), 25 deletions(-) diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html index a56847032..9878a2014 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html @@ -42,7 +42,7 @@ - +
@@ -133,7 +133,7 @@

{{'Mentors' | oTranslate}}

- {{ 'BootcampDoc' | oTranslate }}
- +
diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.ts index 8bf03c8a1..27d18bd14 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.ts +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.ts @@ -8,6 +8,7 @@ import moment from 'moment'; import { ODateInputComponent, ODateRangeInputComponent, OFormComponent, OntimizeService, OTranslateService } from 'ontimize-web-ngx'; import { MatSlideToggleChange } from '@angular/material/slide-toggle'; import { CalendarAttendanceComponent } from '../../data/personal-tutor-info/calendar-attendance/calendar-attendance.component'; +import { MatTabChangeEvent } from '@angular/material/tabs'; @Component({ selector: 'app-bootcamp-details', @@ -17,16 +18,21 @@ import { CalendarAttendanceComponent } from '../../data/personal-tutor-info/cale }) export class BootcampDetailsComponent { - @ViewChild('bootcampDetailForm') bootcampDetailForm:OFormComponent; + @ViewChild('bootcampDetailForm') bootcampDetailForm: OFormComponent; @ViewChild("idNumber") idNumber: OTextInputComponent; @ViewChild("documentsTable") documentsTable: OTableComponent; @ViewChild("fileinput") fileinput: OFileInputComponent; @ViewChild('studentsTable', { static: true }) studentsTable!: OTableComponent; @ViewChild('sessionBootcampTable', { static: true }) table: OTableComponent; - selectedStatuses: string[] = ['Started', 'Pending']; + @ViewChild('bootcampTimetable', { static: true }) bootcampTimetable: OTableComponent; + + selectedStatuses: string[] = ['Started', 'Pending']; months: Date[] = []; bootcampId: number; + previousTabIndex: number | null = null; + + validatorsArray: ValidatorFn[] = []; validatorsArray1: ValidatorFn[] = []; validatorsWithoutSpace: ValidatorFn[] = []; @@ -39,7 +45,7 @@ export class BootcampDetailsComponent { @Inject(MAT_DATE_LOCALE) private _locale: string, private translateService: OTranslateService, protected dialogService: DialogService - ) { + ) { this.validatorsArray.push(this.dateValidator); this.validatorsWithoutSpace.push(OValidators.patternValidator(/^(?!\s*$).+/, 'hasSpecialCharacters')); this.service = this.injector.get(OntimizeService); @@ -55,13 +61,30 @@ export class BootcampDetailsComponent { goToStudentDetail(event: any) { const studentId = event.student_id; this.router.navigate([`/main/students/${studentId}`]); - this.clearTableSelection(); + this.clearTableSelection(); + } + + onTabChange(event: MatTabChangeEvent) { + const previousIndex = this.previousTabIndex; + const currentIndex = event.index; + + switch (currentIndex) { + case 0: + this.configureStudentBootcamps(); + this.studentsTable.refresh(); + break; + case 2: + this.configureBootcampTimetable() + this.bootcampTimetable.refresh(); + break; + } + this.previousTabIndex = currentIndex; } goToTutorDetail(tutor: any) { const tutorId = tutor.tutor_id; this.router.navigate([`/main/tutors/${tutorId}`]); - this.clearTableSelection(); + this.clearTableSelection(); } clearTableSelection(): void { @@ -115,7 +138,7 @@ export class BootcampDetailsComponent { this.bootcampDetailForm.setFieldValue("start_date", startDate); this.bootcampDetailForm.setFieldValue("end_date", endDate); -} + } @ViewChild("startdate") startDateInput: ODateInputComponent; @ViewChild("enddate") endDateInput: ODateInputComponent; @@ -130,8 +153,9 @@ export class BootcampDetailsComponent { ngOnInit() { - - } + //this.configureBootcamps(); + console.log("Estoy en el sevicio de bootcamps en Bootcamp-details"); + } protected configureBootcamps() { const conf = this.service.getDefaultServiceConfiguration('bootcamps'); @@ -139,6 +163,20 @@ export class BootcampDetailsComponent { } + + + protected configureBootcampTimetable() { + const conf = this.service.getDefaultServiceConfiguration('bootcampTimetable'); + this.service.configureService(conf); + + } + + protected configureStudentBootcamps() { + const conf = this.service.getDefaultServiceConfiguration('studentBootcamps'); + this.service.configureService(conf); + + } + protected configureDocuments() { const documentConf = this.service.getDefaultServiceConfiguration('documents'); this.service.configureService(documentConf); @@ -227,7 +265,7 @@ export class BootcampDetailsComponent { } else { return null; } - + } @@ -283,9 +321,9 @@ export class BootcampDetailsComponent { this.configureTutorsBootcamp(); this.dialogService.confirm('Confirm_dialog_title', 'Do_you_really_want_to_delete'); - this.dialogService.dialogRef.afterClosed().subscribe( result => { - if(result) { - this.service.delete({id: tutors.id}, 'tutorBootcamp').subscribe(res => { + this.dialogService.dialogRef.afterClosed().subscribe(result => { + if (result) { + this.service.delete({ id: tutors.id }, 'tutorBootcamp').subscribe(res => { if (res.code === 0) { this.list.reloadData(); } @@ -302,13 +340,13 @@ export class BootcampDetailsComponent { } getRowClass(rowData: any): string { const today = new Date(); - const sessionDate = new Date(rowData.session_date); + const sessionDate = new Date(rowData.session_date); if (isNaN(sessionDate.getTime())) { console.error('Invalid date format:', rowData.session_date); - return ''; + return ''; } if (sessionDate.toDateString() === today.toDateString()) { - return 'highlight-today'; + return 'highlight-today'; } return ''; } @@ -321,7 +359,7 @@ export class BootcampDetailsComponent { this.sessionFilters = null; } else { const filter = [{ attr: 'status', value: selectedStatuses }]; - this.table.queryData(filter); + this.table.queryData(filter); } } createFilter(values: Array<{ attr: string, value: any }>): Expression { @@ -346,7 +384,7 @@ export class BootcampDetailsComponent { return filters.length > 0 ? filters.reduce((exp1, exp2) => - FilterExpressionUtils.buildComplexExpression(exp1, exp2, FilterExpressionUtils.OP_AND)) + FilterExpressionUtils.buildComplexExpression(exp1, exp2, FilterExpressionUtils.OP_AND)) : null; } diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.ts index 2c0f235a3..09f1927e4 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.ts +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.ts @@ -70,6 +70,7 @@ export class CalendarAttendanceComponent { attendanceMap: { [key: string]: number } = {}; studentMap = new Map>(); + backendResponse: any; startBootcampDate: Date; endBootcampsDate: Date; @@ -94,6 +95,7 @@ export class CalendarAttendanceComponent { this.loadYears(); this.service = this.injector.get(OntimizeService); + } refresh() { this.loadStudents(); @@ -132,15 +134,11 @@ export class CalendarAttendanceComponent { this.service.configureService(conf); } - protected configureHolidays() { - // Configure the service using the configuration defined in the `app.services.config.ts` file - const conf = this.service.getDefaultServiceConfiguration('holidays'); - this.service.configureService(conf); - } loadStudents(): void { this.configureStudents(); this.getStudents(); + this.configureBootcamps(); } getStudents() { if (this.service && this.bootcampId) { @@ -200,6 +198,7 @@ export class CalendarAttendanceComponent { this.getAttendance(); } getAttendance() { + if (this.service && this.bootcampId) { const columns = ['id', 'student_id', 'bootcamp_id', 'date', 'attendance_status_id']; From 5b230f82944e5b96f9fe68db9fe149a832e74fc1 Mon Sep 17 00:00:00 2001 From: BrayanIgl2 Date: Fri, 17 Jan 2025 08:34:09 +0000 Subject: [PATCH 02/17] Version updated Files changed: M charts/cd2024bfs4g1/values-dev.yaml --- charts/cd2024bfs4g1/values-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cd2024bfs4g1/values-dev.yaml b/charts/cd2024bfs4g1/values-dev.yaml index c2ed998d1..f3b55f9aa 100644 --- a/charts/cd2024bfs4g1/values-dev.yaml +++ b/charts/cd2024bfs4g1/values-dev.yaml @@ -6,7 +6,7 @@ image: pullPolicy: IfNotPresent ## provided as basic setup. replace as needed repository: ghcr.io/campusdual/cd2024bfs4g1 - version: dev8c4a183 + version: devfd68556 imagePullSecrets: - name: "github-ecr-cred" nameOverride: "" From 030cbe800de2b60d41712f27b251317c5800eeb2 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 17 Jan 2025 09:23:41 +0100 Subject: [PATCH 03/17] Finished BFS42024-327 --- .../bootcamp-details.component.html | 1 + .../students-new/students-new.component.css | 38 ++----------------- .../students-new/students-new.component.html | 6 --- 3 files changed, 4 insertions(+), 41 deletions(-) diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html index 9878a2014..97cb6b905 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html @@ -255,6 +255,7 @@

{{ 'BootcampDoc' | oTranslate }}

select-all-checkbox-visible="true" selection-mode="multiple" [row-class]="getRowClass" sort-columns="session_date" + detail-mode="dblclick" > 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 95ae17e8b..f09c16d59 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 @@ -248,17 +248,6 @@ fieldset { justify-content: flex-end; } -.fct-container { - display: grid; - grid-template-columns: 2fr 1fr; - grid-template-rows: auto auto; - width: 96%; - margin: 5px auto; - background-color: #f5f0f2; - border-radius: 15px; - padding: 20px; - gap: 20px; -} .fct-grid { border-radius: 15px; @@ -294,17 +283,7 @@ fieldset { justify-content: flex-end; } -.fct-container { - display: grid; - grid-template-columns: 2fr 1fr; - grid-template-rows: auto auto; - width: 96%; - margin: 5px auto; - background-color: #f5f0f2; - border-radius: 15px; - padding: 20px; - gap: 20px; -} + .fct-grid { border-radius: 15px; @@ -339,22 +318,11 @@ fieldset { .fct-container { display: grid; - grid-template-columns: 2fr 1fr; - grid-template-rows: auto auto; - width: 96%; + grid-template-columns: 1fr; + width: 100%; margin: 5px auto; background-color: #f5f0f2; border-radius: 15px; padding: 20px; gap: 20px; } - -.fct-grid { - border-radius: 15px; - grid-column: 1 / 2; - grid-row: 1 / 3; - display: grid; - grid-template-columns: 1fr 1fr; - gap: 60px; - padding: 20px; -} \ 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 6d6c5d925..004afd3bf 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 @@ -145,12 +145,6 @@
-
- {{'LNOTES' | oTranslate}} -
- -
-
From 6dda96a81b47167fb52a99f591bc5729359eac24 Mon Sep 17 00:00:00 2001 From: eluiui Date: Fri, 17 Jan 2025 09:27:59 +0000 Subject: [PATCH 04/17] Version updated Files changed: M charts/cd2024bfs4g1/values-dev.yaml --- charts/cd2024bfs4g1/values-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cd2024bfs4g1/values-dev.yaml b/charts/cd2024bfs4g1/values-dev.yaml index f3b55f9aa..3aa620f88 100644 --- a/charts/cd2024bfs4g1/values-dev.yaml +++ b/charts/cd2024bfs4g1/values-dev.yaml @@ -6,7 +6,7 @@ image: pullPolicy: IfNotPresent ## provided as basic setup. replace as needed repository: ghcr.io/campusdual/cd2024bfs4g1 - version: devfd68556 + version: dev565644e imagePullSecrets: - name: "github-ecr-cred" nameOverride: "" From 17ce3c1542493d458c8369afd9c14c1c3293d6a8 Mon Sep 17 00:00:00 2001 From: DeNgo Date: Thu, 16 Jan 2025 13:37:10 +0100 Subject: [PATCH 05/17] solucion bug calendario BFS42024-334 --- cd2024bfs4g1-frontend/src/main/ngx/src/styles.scss | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/styles.scss b/cd2024bfs4g1-frontend/src/main/ngx/src/styles.scss index 1110e48de..e851f79ed 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/styles.scss +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/styles.scss @@ -63,7 +63,6 @@ button.calendarcellStart span { background: #2E8B57; text-align:center; - width: 100%; height: 89%; margin-top: 1.5px; @@ -76,7 +75,6 @@ button.calendarcellStart span { button.calendarcellEnd span { background: #DC143C; text-align:center; - width: 100%; height: 89%; margin-top: 1.5px; } @@ -88,7 +86,6 @@ button.calendarcell{ button.calendarcell span{ background: lightgrey; text-align:center; - width: 100%; height: 89%; } span.mat-calendar-body-cell-content{ @@ -128,7 +125,7 @@ button.mat-mdc-outlined-button:not([disabled]).mat-mdc-button-base.mat-primary, .o-button button.mat-mdc-outlined-button, button.mat-mdc-outlined-button:not([disabled]).mat-mdc-button-base.mat-accent, button.mat-mdc-outlined-button:not([disabled]).mat-mdc-button-base.mat-accent, -.list_container .o-list-container .add-button, .boton-angular, .mat-primary.mat-stroked-button +.list_container .o-list-container .add-button, .boton-angular { border: none; background-color: #8AB237; @@ -155,9 +152,9 @@ button.mat-mdc-raised-button.mat-primary:hover, button.mat-mdc-outlined-button:not([disabled]).mat-mdc-button-base.mat-primary:hover, .o-button button.mat-mdc-outlined-button:hover, button.mat-mdc-outlined-button:not([disabled]).mat-mdc-button-base.mat-accent:hover, -.list_container .o-list-container .add-button:hover, .mat-primary.mat-stroked-button:hover, +.list_container .o-list-container .add-button:hover, .boton-angular:hover { - border: none; + border: 2px solid #8AB237; background-color: #1a3459; border-radius: 10px; color: #8AB237; @@ -455,9 +452,6 @@ o-column.o-column .o-container > .o-container-title span{ .mat-calendar-body-in-range::before{ background-color: #8AB237; } -.mat-calendar-body-cell-content.mat-focus-indicator{ - border-radius: 50%; -} .active.available.end-date.in-range.weekend.ng-star-inserted, .active.available.end-date.in-range.ng-star-inserted, .available.ng-star-inserted.active.start-date.in-range{ background-color: #1a3459; From 2681344f4d241aef362cd775c419fc59b8692882 Mon Sep 17 00:00:00 2001 From: eluiui Date: Fri, 17 Jan 2025 09:52:19 +0000 Subject: [PATCH 06/17] Version updated Files changed: M charts/cd2024bfs4g1/values-dev.yaml --- charts/cd2024bfs4g1/values-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cd2024bfs4g1/values-dev.yaml b/charts/cd2024bfs4g1/values-dev.yaml index 3aa620f88..afce28208 100644 --- a/charts/cd2024bfs4g1/values-dev.yaml +++ b/charts/cd2024bfs4g1/values-dev.yaml @@ -6,7 +6,7 @@ image: pullPolicy: IfNotPresent ## provided as basic setup. replace as needed repository: ghcr.io/campusdual/cd2024bfs4g1 - version: dev565644e + version: devca1e9a8 imagePullSecrets: - name: "github-ecr-cred" nameOverride: "" From cb4db6cda57c5e7ce74042a7bf8bbb990110b257 Mon Sep 17 00:00:00 2001 From: David Dominguez Vidal Date: Fri, 17 Jan 2025 12:58:08 +0100 Subject: [PATCH 07/17] Listo --- .../bootcamp-details.component.html | 5 +- .../bootcamp-details.component.ts | 18 +-- .../calendar-attendance.component.html | 4 +- .../calendar-attendance.component.ts | 105 +++++++++++------- .../model/core/service/AttendanceService.java | 13 ++- 5 files changed, 87 insertions(+), 58 deletions(-) diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html index 9878a2014..4e3438174 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html @@ -1,6 +1,6 @@ + confirm-exit="false" (onDataLoaded)="onBootcampChange($event);inicialDR()" (onBeforeUpdate)="asistencia.saveAttendaces()">
@@ -33,7 +33,8 @@
@@ -19,7 +19,7 @@

{{'Registrar Asistencia' | - + diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.ts b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.ts index 09f1927e4..a842751fb 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.ts +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.ts @@ -50,6 +50,9 @@ export class CalendarAttendanceComponent { selectedEndDate: Date; protected service: OntimizeService; + protected serviceName: string; + protected serviceBkName: string; + @Input('bootcampId') bootcampId: number; @@ -70,7 +73,7 @@ export class CalendarAttendanceComponent { attendanceMap: { [key: string]: number } = {}; studentMap = new Map>(); - + backendResponse: any; startBootcampDate: Date; endBootcampsDate: Date; @@ -95,20 +98,23 @@ export class CalendarAttendanceComponent { this.loadYears(); this.service = this.injector.get(OntimizeService); - + + } refresh() { - this.loadStudents(); - this.loadAttendance(); + this.getStudents(); + //this.loadAttendance(); + this.getAttendance(); this.getBootcampDates(); } ngOnInit() { - this.loadAttendanceStatus(); + this.getAttendanceStatus(); this.configureBootcamps(); } ngOnChanges() { - this.loadStudents(); - this.loadAttendance(); + this.getStudents(); + // this.loadAttendance(); + this.getAttendance(); this.getBootcampDates(); } @@ -135,16 +141,12 @@ export class CalendarAttendanceComponent { } - loadStudents(): void { - this.configureStudents(); - this.getStudents(); - this.configureBootcamps(); - } getStudents() { + if (this.service && this.bootcampId) { const columns = ['student_id', 'name', 'surname1', 'surname2', 'computable']; const filter = { 'bootcamp_id': this.bootcampId }; - + this.configureStudents(); this.service.query(filter, columns, 'studentsWithComputable').subscribe(resp => { if (resp.code === 0) { if (resp.data.length > 0) { @@ -163,22 +165,19 @@ export class CalendarAttendanceComponent { this.snackBarService.open('Error al cargar los datos de los estudiantes.'); } }); + this.configureBootcamps(); } } - loadAttendanceStatus(): void { - this.configureAttendanceStatus(); - this.getAttendanceStatus(); - this.statusData.map(status => { - }); - } + getAttendanceStatus() { if (this.service !== null) { const columns = ['id', 'abbreviation', 'description', 'color']; + this.configureAttendanceStatus(); this.service.query({}, columns, 'attendanceControl').subscribe(resp => { if (resp.code === 0) { if (resp.data.length > 0) { @@ -190,15 +189,13 @@ export class CalendarAttendanceComponent { this.snackBarService.open('Error al cargar los datos de los estatus de asistencia.'); } }); + this.configureBootcamps(); } } - loadAttendance(): void { - this.configureAttendance(); - this.getAttendance(); - } + getAttendance() { - + if (this.service && this.bootcampId) { const columns = ['id', 'student_id', 'bootcamp_id', 'date', 'attendance_status_id']; @@ -206,6 +203,7 @@ export class CalendarAttendanceComponent { 'bootcamp_id': this.bootcampId } + this.configureAttendance(); this.service.query(filter, columns, 'attendance').subscribe(resp => { if (resp.code === 0) { if (resp.data.length > 0) { @@ -228,6 +226,7 @@ export class CalendarAttendanceComponent { this.snackBarService.open('Error al cargar los datos de asistencia.'); } }); + this.configureBootcamps(); } } @@ -264,22 +263,26 @@ export class CalendarAttendanceComponent { } //ir a semana anterior + + //llama decSelectedWeek(): void { this.attendanceModified = []; this.startDate = moment(this.startDate).subtract(1, 'weeks').toDate(); this.endDate = moment(this.startDate).add(this.weeksToShow * 7, 'days').toDate(); this.loadDays(); - this.loadStudents(); + this.getStudents(); this.updateCurrentMonthAndYear(); } //ir a semana posterior + + //llama incSelectedWeek(): void { this.attendanceModified = []; this.startDate = moment(this.startDate).add(1, 'weeks').toDate(); this.endDate = moment(this.startDate).add(this.weeksToShow * 7, 'days').toDate(); this.loadDays(); - this.loadStudents(); + this.getStudents(); this.updateCurrentMonthAndYear(); } @@ -367,20 +370,25 @@ export class CalendarAttendanceComponent { return selectedStatus ? selectedStatus.description : null; // Retorna null si no hay selección. } - onButtonClick() { - this.configureAttendance(); + saveAttendaces() { + const attendanceArray = Object.values(this.attendanceModified); - this.service.insert({ data: attendanceArray }, 'attendance').subscribe( - response => { - this.attendanceModified = []; - this.snackBarService.open('asistenciasSave'); - this.loadAttendance(); - }, - error => { - console.error('Error al procesar asistencias:', error); - this.snackBarService.open('Error al guardar asistencias.'); - } - ); + if(attendanceArray.length > 0){ + this.configureAttendance(); + this.service.insert({ data: attendanceArray }, 'attendance').subscribe( + response => { + this.attendanceModified = []; + this.snackBarService.open('asistenciasSave'); + //this.loadAttendance(); + this.getAttendance(); + }, + error => { + console.error('Error al procesar asistencias:', error); + this.snackBarService.open('Error al guardar asistencias.'); + } + ); + this.configureBootcamps(); + } } getBackgroundColor(abbreviation: string): string { @@ -404,13 +412,15 @@ export class CalendarAttendanceComponent { } getBootcampDates(): void { - this.configureBootcamps(); + if (this.service && this.bootcampId) { const columns = ['start_date', 'end_date']; const filter = { 'id': this.bootcampId } + + this.configureBootcamps(); this.service.query(filter, columns, 'bootcamp').subscribe(resp => { if (resp.code === 0) { if (resp.data.length > 0) { @@ -440,12 +450,13 @@ export class CalendarAttendanceComponent { this.startDate = startOfWeek.toDate(); this.endDate = moment(startOfWeek).add(this.weeksToShow * 7, 'days').toDate(); this.loadDays(); - this.loadStudents(); + this.getStudents(); this.updateCurrentMonthAndYear(); } openAttendanceDialog() { this.dialog.open(this.attendanceDialog); + this.configureBootcamps(); } iterateDateRange() { @@ -463,6 +474,13 @@ export class CalendarAttendanceComponent { return dates; } + + + onDatePickerClosed(): void { + this.configureBootcamps(); + } + + submitAttendance() { const dateRange = this.iterateDateRange(); console.log('Date Range:', dateRange); @@ -481,10 +499,13 @@ export class CalendarAttendanceComponent { } } - this.onButtonClick(); + this.saveAttendaces(); this.loadDays(); this.updateCurrentMonthAndYear(); this.dialog.closeAll(); } + + + } diff --git a/cd2024bfs4g1-model/src/main/java/com/campusdual/cd2024bfs4g1/model/core/service/AttendanceService.java b/cd2024bfs4g1-model/src/main/java/com/campusdual/cd2024bfs4g1/model/core/service/AttendanceService.java index fcbcc8fc8..4fd592493 100644 --- a/cd2024bfs4g1-model/src/main/java/com/campusdual/cd2024bfs4g1/model/core/service/AttendanceService.java +++ b/cd2024bfs4g1-model/src/main/java/com/campusdual/cd2024bfs4g1/model/core/service/AttendanceService.java @@ -3,6 +3,7 @@ import com.campusdual.cd2024bfs4g1.api.core.service.IAttendanceService; import com.campusdual.cd2024bfs4g1.model.core.dao.AttendanceDao; +import com.campusdual.cd2024bfs4g1.model.core.dao.BootcampDao; import com.ontimize.jee.common.db.AdvancedEntityResult; import com.ontimize.jee.common.dto.EntityResult; import com.ontimize.jee.common.dto.EntityResultMapImpl; @@ -21,11 +22,13 @@ @Service("AttendanceService") @Lazy public class AttendanceService implements IAttendanceService { - @Autowired - private DefaultOntimizeDaoHelper daoHelper; - @Autowired - private AttendanceDao attendanceDao; + @Autowired + private DefaultOntimizeDaoHelper daoHelper; + @Autowired + private AttendanceDao attendanceDao; + @Autowired + private BootcampDao bootcampDao; @Override public EntityResult attendanceQuery(Map keyMap, List attributes) throws OntimizeJEERuntimeException { @@ -95,6 +98,8 @@ public EntityResult attendanceUpdate(Map attrMap, Map keyMap) throws OntimizeJEERuntimeException { return this.daoHelper.delete(this.attendanceDao, keyMap); From e1e1033ee4f94cb3afa32b1de68e8a4635e5e330 Mon Sep 17 00:00:00 2001 From: marcospaab Date: Fri, 17 Jan 2025 12:18:35 +0000 Subject: [PATCH 08/17] Version updated Files changed: M charts/cd2024bfs4g1/values-dev.yaml --- charts/cd2024bfs4g1/values-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cd2024bfs4g1/values-dev.yaml b/charts/cd2024bfs4g1/values-dev.yaml index afce28208..c27f03430 100644 --- a/charts/cd2024bfs4g1/values-dev.yaml +++ b/charts/cd2024bfs4g1/values-dev.yaml @@ -6,7 +6,7 @@ image: pullPolicy: IfNotPresent ## provided as basic setup. replace as needed repository: ghcr.io/campusdual/cd2024bfs4g1 - version: devca1e9a8 + version: dev085cfc0 imagePullSecrets: - name: "github-ecr-cred" nameOverride: "" From 145a1b079f517ff0f0b67e988c86052c26d909c3 Mon Sep 17 00:00:00 2001 From: Gabriel Alonso Varela Date: Fri, 17 Jan 2025 10:56:15 +0100 Subject: [PATCH 09/17] Change assists for students and make combobox smaller --- .../bootcamp-students-table.component.html | 6 +-- .../calendar-attendance.component.css | 38 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/bootcamp-students-table/bootcamp-students-table.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/bootcamp-students-table/bootcamp-students-table.component.html index b6cf29812..70a9d5fd4 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/bootcamp-students-table/bootcamp-students-table.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/bootcamp-students-table/bootcamp-students-table.component.html @@ -2,6 +2,9 @@ show-header-navigation="no" confirm-exit="false" show-header="no" (onDataLoaded)="loadData()"> + + +
@@ -97,9 +100,6 @@
- - -
diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.css b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.css index 1f90aa85d..5297205d4 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.css +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.css @@ -6,8 +6,8 @@ } .no-computable { - background-color: rgb(255, 108, 108); - color: white; + background-color: rgb(255, 108, 108); + color: white; } @@ -228,7 +228,7 @@ select option { grid-row: 1; gap: 5px; min-width: 1550px; - + } .student_row.days { @@ -243,7 +243,7 @@ select option { .custom-select { width: 80px; - height: 40px; + height: 15px; background-color: white; border: 1px solid #ccc; border-radius: 5px; @@ -287,40 +287,40 @@ select option { .warning { display: flex; align-items: center; - color: red; + color: red; font-size: 12px; margin-top: 5px; - gap: 5px; + gap: 5px; } .fixed-size { - width: 300px; - margin: 0 auto; + width: 300px; + margin: 0 auto; } .center-content { display: flex; justify-content: center; - margin-bottom: 16px; + margin-bottom: 16px; } .form-group { display: flex; - flex-direction: column; - align-items: center; - width: 100%; - position: relative; + flex-direction: column; + align-items: center; + width: 100%; + position: relative; } .form-label { - align-self: center; - margin-bottom: 4px; - width: 100%; - max-width: 300px; + align-self: center; + margin-bottom: 4px; + width: 100%; + max-width: 300px; text-align: left; } .fixed-size { - width: 100%; - max-width: 300px; + width: 100%; + max-width: 300px; } From 33280a2fce985fb6dbfa99bcebbfd2fa3b3edae3 Mon Sep 17 00:00:00 2001 From: Gabriel Alonso Varela Date: Fri, 17 Jan 2025 12:57:06 +0100 Subject: [PATCH 10/17] Multiple seleccion fixed --- .../calendar-attendance.component.css | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.css b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.css index 5297205d4..0995e5905 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.css +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/data/personal-tutor-info/calendar-attendance/calendar-attendance.component.css @@ -292,10 +292,7 @@ select option { margin-top: 5px; gap: 5px; } -.fixed-size { - width: 300px; - margin: 0 auto; -} + .center-content { display: flex; justify-content: center; @@ -314,13 +311,11 @@ select option { align-self: center; margin-bottom: 4px; width: 100%; - max-width: 300px; - text-align: left; } .fixed-size { width: 100%; - max-width: 300px; + margin: 0 auto; } From b64f08b0c6b2ffd562df8c920890c6d91635d967 Mon Sep 17 00:00:00 2001 From: marcospaab Date: Fri, 17 Jan 2025 12:45:51 +0000 Subject: [PATCH 11/17] Version updated Files changed: M charts/cd2024bfs4g1/values-dev.yaml --- charts/cd2024bfs4g1/values-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cd2024bfs4g1/values-dev.yaml b/charts/cd2024bfs4g1/values-dev.yaml index c27f03430..e17d84614 100644 --- a/charts/cd2024bfs4g1/values-dev.yaml +++ b/charts/cd2024bfs4g1/values-dev.yaml @@ -6,7 +6,7 @@ image: pullPolicy: IfNotPresent ## provided as basic setup. replace as needed repository: ghcr.io/campusdual/cd2024bfs4g1 - version: dev085cfc0 + version: dev14cb33c imagePullSecrets: - name: "github-ecr-cred" nameOverride: "" From 544e0c39298f49c652dff941d1f58648d7234a89 Mon Sep 17 00:00:00 2001 From: Danielrey99 Date: Fri, 17 Jan 2025 12:17:00 +0100 Subject: [PATCH 12/17] =?UTF-8?q?Fix=20tama=C3=B1o=20div=20distinto=20a=20?= =?UTF-8?q?los=20otros=20mat-tab.=20&=20Modificar=204=20clases=20css=20par?= =?UTF-8?q?a=20que=20ontimize=20quite=20un=20margin.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bootcamp-details.component.css | 32 +++++++++++-------- .../bootcamp-details.component.html | 14 ++++---- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.css b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.css index 958a1cac2..32f20345d 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.css +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.css @@ -203,6 +203,23 @@ h3 { overflow-x: auto; background-color: #f5f0f2; padding: 20px 0; + border-radius: 0; + margin: 0px; +} + +.rounded_top{ + border-top-left-radius: 15px; + border-top-right-radius: 15px; +} + +.rounded_bottom{ + border-bottom-left-radius: 15px; + border-bottom-right-radius: 15px; +} + +.aligned-container { + border-top-left-radius: 15px; + border-top-right-radius: 15px; } .input-button-container { @@ -318,15 +335,7 @@ div.notification label { height: 100%; } -.table_containerfichero { - width: 98%; - overflow-x: hidden; - margin: 0 auto; - margin-top: 25px; - padding: 0 10px; -} - -.table_containerhorarios { +.mat_table_container { width: 98%; overflow-x: hidden; margin: 0 auto; @@ -559,11 +568,6 @@ div.notification label { border-radius: 15px; padding: 20px; } -.table_sesions{ - background-color: #f5f0f2; - font-family: 'Roboto', sans-serif; - height: auto; -} o-list img { width: 50px; diff --git a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html index 02b65c831..74e3c2c35 100644 --- a/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html +++ b/cd2024bfs4g1-frontend/src/main/ngx/src/app/main/bootcamps/bootcamp-details/bootcamp-details.component.html @@ -130,7 +130,7 @@

{{'Mentors' | oTranslate}}

-
+
@@ -158,7 +158,7 @@

{{'Mentors' | oTranslate}}

-
+
@@ -200,9 +200,9 @@

{{ 'BootcampDoc' | oTranslate }}

-
+
- + {{ 'BootcampDoc' | oTranslate }}

sort="session_date:ASC"> - {{ 'BootcampDoc' | oTranslate }} - +
+ +
From f71e8ac9b9823372bc661f571534e05e58521f50 Mon Sep 17 00:00:00 2001 From: marcospaab Date: Fri, 17 Jan 2025 13:08:21 +0000 Subject: [PATCH 13/17] Version updated Files changed: M charts/cd2024bfs4g1/values-dev.yaml --- charts/cd2024bfs4g1/values-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cd2024bfs4g1/values-dev.yaml b/charts/cd2024bfs4g1/values-dev.yaml index e17d84614..523e2fd05 100644 --- a/charts/cd2024bfs4g1/values-dev.yaml +++ b/charts/cd2024bfs4g1/values-dev.yaml @@ -6,7 +6,7 @@ image: pullPolicy: IfNotPresent ## provided as basic setup. replace as needed repository: ghcr.io/campusdual/cd2024bfs4g1 - version: dev14cb33c + version: devb9dd5b8 imagePullSecrets: - name: "github-ecr-cred" nameOverride: "" From f8b855f4ed71c301c9e3138b64ad0ebd98dd6abd Mon Sep 17 00:00:00 2001 From: Danielrey99 Date: Fri, 17 Jan 2025 10:33:58 +0100 Subject: [PATCH 14/17] Fix dni warning & Uppercase --- .../students-detail.component.css | 28 +++++++---------- .../students-detail.component.html | 11 +++---- .../students-detail.component.ts | 6 ++-- .../students-new/students-new.component.css | 11 +++++++ .../students-new/students-new.component.html | 31 +++++++++---------- 5 files changed, 45 insertions(+), 42 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 328f05d17..5399a9752 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 @@ -133,9 +133,6 @@ padding: 20px 40px; justify-content: flex-end; } - - - .user-grid { display: grid; grid-template-columns: 1fr 1fr; @@ -314,21 +311,18 @@ grid-column: 1 / 3; margin: 0%; height: 100%; } -.aviso label{ - color:rgb(244, 67, 54); - display: flex; - font-size: 11px; - height: 20PX; - letter-spacing: normal; - font-weight: 400; - line-height: 15px; - text-align: left; - text-size-adjust: 100%; - width: 542.453px -} -.aviso label mat-icon{ - padding-bottom: 10px; + +.aviso p{ + color: red; + display: flex; + align-items: center; + justify-content: flex-start; + text-align: left; + font-size: 0.9rem; + margin-top: 5px; + gap: 5px; } + .p_info_foto{ margin-top: 30px; font-size: 12px; 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 1bcc9fc45..acabbaa87 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,5 +1,5 @@ + show-header-navigation="no" (onUpdate)="refreshwarning()">
@@ -38,13 +38,12 @@
- -
- - +

{{'DNI_WARNING'|oTranslate}}

+ +
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 index 4bba357b9..6ac0ef2d9 100644 --- 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 @@ -354,9 +354,9 @@ deleteNotes(notas: any) { } - focusnote(){ - - } +refreshwarning(){ + this.showNotice = false; +} } 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 f09c16d59..238bab347 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 @@ -326,3 +326,14 @@ fieldset { padding: 20px; gap: 20px; } + +.aviso p{ + color: red; + display: flex; + align-items: center; + justify-content: flex-start; + text-align: left; + font-size: 0.9rem; + margin-top: 5px; + gap: 5px; +} \ 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 004afd3bf..cc60b2b04 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 @@ -29,25 +29,13 @@
-
-
- - -
-
-
- -
-
-
- -
- - +

{{'DNI_WARNING'|oTranslate}}

+ +
@@ -73,6 +61,17 @@
+
+
+ + +
+
+
+ +
+
+