This repository has been archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #191 from CampusDual/develop
Sincronizar BD2
- Loading branch information
Showing
20 changed files
with
345 additions
and
28 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
...4bfs4g1-api/src/main/java/com/campusdual/cd2024bfs4g1/api/core/service/INotesService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.campusdual.cd2024bfs4g1.api.core.service; | ||
|
||
import com.ontimize.jee.common.dto.EntityResult; | ||
import com.ontimize.jee.common.exceptions.OntimizeJEERuntimeException; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public interface INotesService { | ||
|
||
EntityResult notesInsert(Map<String, Object> attrMap) throws OntimizeJEERuntimeException; | ||
|
||
EntityResult notesDelete(Map<String, Object> keyMap) throws OntimizeJEERuntimeException; | ||
|
||
EntityResult notesQuery(Map<String, Object> keysValues, List<String> attributes); | ||
|
||
|
||
|
||
|
||
} |
3 changes: 3 additions & 0 deletions
3
...tend/src/main/ngx/src/app/main/students/students-detail/notes-add/notes-add.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.espaciador{ | ||
margin-bottom: 10px; | ||
} |
20 changes: 20 additions & 0 deletions
20
...end/src/main/ngx/src/app/main/students/students-detail/notes-add/notes-add.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<div> | ||
<o-form #notesForm service="notes" entity="notes" show-header="no" confirm-exit="false" | ||
undo-button="false" label-header-align="center" after-insert-mode="close"> | ||
<o-text-input attr="id_students" sql-type="INTEGER" enabled="no" hidden></o-text-input> | ||
|
||
<div class="espaciador"> | ||
<label>{{ todayDate }}</label> | ||
</div> | ||
<!-- Campo de texto --> | ||
<label for="LNOTE" class="espaciador">{{'LNOTE' | oTranslate}}</label> | ||
<o-text-input attr="nota" sql-type="VARCHAR" required="yes"></o-text-input> | ||
|
||
<o-date-input #date label-visible="false" attr="fecha" format="DD/MM/YYYY" hidden></o-date-input> | ||
<!-- Botón de acción --> | ||
<div fxLayout="row" fxLayoutGap="16px" fxLayoutWrap style="margin-top: 10px;"> | ||
<o-button attr="addbutton" id="Add" type="RAISED" label="Add" color="primary" (click)="addNotes()"></o-button> | ||
</div> | ||
|
||
</o-form> | ||
</div> |
23 changes: 23 additions & 0 deletions
23
.../src/main/ngx/src/app/main/students/students-detail/notes-add/notes-add.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { NotesAddComponent } from './notes-add.component'; | ||
|
||
describe('NotesAddComponent', () => { | ||
let component: NotesAddComponent; | ||
let fixture: ComponentFixture<NotesAddComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ NotesAddComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(NotesAddComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
40 changes: 40 additions & 0 deletions
40
...ntend/src/main/ngx/src/app/main/students/students-detail/notes-add/notes-add.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Component, ViewChild } from '@angular/core'; | ||
import { ODateInputComponent, OFormComponent } from 'ontimize-web-ngx'; | ||
|
||
@Component({ | ||
selector: 'app-notes-add', | ||
templateUrl: './notes-add.component.html', | ||
styleUrls: ['./notes-add.component.css'] | ||
}) | ||
export class NotesAddComponent { | ||
todayDate: string = ''; | ||
todayTimestamp: number = 0; | ||
@ViewChild('notesForm') notesForm: OFormComponent; | ||
@ViewChild('date') date: ODateInputComponent; | ||
|
||
ngOnInit() { | ||
|
||
const today = new Date(); | ||
const day = today.getDate().toString().padStart(2, '0'); | ||
const month = (today.getMonth() + 1).toString().padStart(2, '0'); | ||
const year = today.getFullYear(); | ||
this.todayDate = `${day}/${month}/${year}`; | ||
|
||
|
||
const [dd, mm, yyyy] = this.todayDate.split('/').map(Number); | ||
const parsedDate = new Date(yyyy, mm - 1, dd); | ||
this.todayTimestamp = parsedDate.getTime(); | ||
|
||
} | ||
|
||
ngAfterViewInit() { | ||
if (this.date) { | ||
this.date.setValue(this.todayTimestamp); | ||
console.log("TiSt"+this.todayTimestamp); | ||
console.log("Date: "+ this.date.getValue().toString()); | ||
} | ||
} | ||
addNotes() { | ||
this.notesForm.insert(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
cd2024bfs4g1-model/src/main/java/com/campusdual/cd2024bfs4g1/model/core/dao/NotesDao.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.campusdual.cd2024bfs4g1.model.core.dao; | ||
|
||
|
||
import com.ontimize.jee.server.dao.common.ConfigurationFile; | ||
import com.ontimize.jee.server.dao.jdbc.OntimizeJdbcDaoSupport; | ||
import org.springframework.context.annotation.Lazy; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Lazy | ||
@Repository(value = "NotesDao") | ||
@ConfigurationFile( | ||
configurationFile = "dao/NotesDao.xml", | ||
configurationFilePlaceholder = "dao/placeholders.properties") | ||
public class NotesDao extends OntimizeJdbcDaoSupport { | ||
|
||
public static final String ATTR_ID = "id"; | ||
public static final String ATTR_ID_STUDENTS = "id_students"; | ||
public static final String ATTR_NOTA = "nota"; | ||
public static final String ATTR_FECHA = "fecha"; | ||
|
||
} |
Oops, something went wrong.