-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<div class="modal-header"> | ||
<!-- TODO: Anpassen --> | ||
<h5 i18n="@@settings.userName">Name des Bearbeiters/der Bearbeiterin</h5> | ||
</div> | ||
|
||
<div class="modal-body"> | ||
<div i18n="@@settings.userName.info"> | ||
Dieser Name wird in der Bearbeitungshistorie gespeichert, | ||
damit Änderungen an Datensätzen einer Person zugeordnet werden können. | ||
Diese Einstellung ist sehr <b>wichtig</b> bei der Datenbanksynchronisation, | ||
sowohl zwischen Nutzern bzw. Nutzerinnen als auch zum Field-Server, da das System | ||
so eventuelle Konflikte besser zuordnen und lösen kann. Sie sollte also in jedem Fall | ||
vor Inbetriebnahme gesetzt werden. Empfohlen wird, den vollen Namen des aktuellen | ||
Datenbanknutzers bzw. der Datenbanknutzerin einzutragen. | ||
</div> | ||
|
||
<div class="form-group" style="margin-bottom: 0; margin-top: 15px;"> | ||
<input id="username-input" | ||
[ngModel]="currentEditor" | ||
(ngModelChange)="currentEditor = $event" | ||
class="form-control"> | ||
</div> | ||
</div> | ||
|
||
<div class="modal-footer"> | ||
<button id="confirm-button" class="btn btn-success" | ||
(click)="confirm()"> | ||
<span class="mdi mdi-content-save"></span> | ||
<span class="button-label" i18n="@@buttons.save">Speichern</span> | ||
</button> | ||
<div class="btn btn-secondary" | ||
(click)="cancel()"> | ||
<span i18n="@@buttons.cancel">Abbrechen</span> | ||
</div> | ||
</div> |
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,35 @@ | ||
import { Component } from '@angular/core'; | ||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; | ||
import { SettingsService } from '../../services/settings/settings-service'; | ||
import { SettingsProvider } from '../../services/settings/settings-provider'; | ||
import { Settings } from '../../services/settings/settings'; | ||
|
||
|
||
@Component({ | ||
templateUrl: './update-editor.html' | ||
}) | ||
/** | ||
* @author Danilo Guzzo | ||
*/ | ||
export class UpdateEditorComponent { | ||
public currentEditor: string; | ||
|
||
constructor( | ||
public activeModal: NgbActiveModal, | ||
private settingsService: SettingsService, | ||
private settingsProvider: SettingsProvider | ||
) { | ||
this.currentEditor = this.settingsProvider.getSettings()["username"]; | ||
} | ||
|
||
public confirm = () => { | ||
console.log(this.currentEditor); | ||
let oldSettings: Settings = this.settingsProvider.getSettings(); | ||
oldSettings.username = this.currentEditor; | ||
|
||
this.settingsService.updateSettings(oldSettings); | ||
this.activeModal.close(); | ||
} | ||
|
||
public cancel = () => this.activeModal.dismiss('cancel'); | ||
} |