OK-532 Bug fixed
diff --git a/src/app/dialogs/entry/entry.component.html b/src/app/dialogs/entry/entry.component.html index 7a71bf1..e37a9d4 100644 --- a/src/app/dialogs/entry/entry.component.html +++ b/src/app/dialogs/entry/entry.component.html
@@ -5,7 +5,7 @@ Betriebstagebucheintrag anlegen </h2> <h2 *ngIf="isInstructionDialog && !isEditDialog && !isReadOnlyDialog"> - Anweisung anlegen + Anweisung anlegen </h2> <h2 *ngIf="!isInstructionDialog && isEditDialog && !isReadOnlyDialog"> Betriebstagebucheintrag bearbeiten @@ -16,18 +16,24 @@ <table *ngIf="isReadOnlyDialog && notificationVersions"> <tbody> <tr> - <td class="text-left" colspan="3"><label style="font-size:30px;margin-left: 5px;">Meldungshistorie anzeigen</label></td> + <td class="text-left" colspan="3"> + <label style="font-size:30px;margin-left: 5px;">Meldungshistorie anzeigen</label> + </td> </tr> <tr> - <td class="text-left"><label style="font-size:22px;margin-right:5px;margin-left:5px;">Version</label></td> + <td class="text-left"> + <label style="font-size:22px;margin-right:5px;margin-left:5px;">Version</label> + </td> <td class="text-right" style="width: 70px;"> - <div class="form-group" > + <div class="form-group"> <select style="height:30px !important" class="form-control" name="notificationSelection" (change)="onNotificationVersionChange($event.target.value)"> <option class="nvo" dir="rtl" *ngFor="let notificationVersion of notificationVersions" [selected]="notificationVersion.version == notification.version">{{notificationVersion.version}}</option> </select> </div> </td> - <td class="text-left"><label style="font-size:22px; margin-left:5px;">erstellt am {{ (notification.modDate || notification.createDate) | formattedTimestamp: 'DD.MM.YYYY HH:mm' }}</label></td> + <td class="text-left"> + <label style="font-size:22px; margin-left:5px;">erstellt am {{ (notification.modDate || notification.createDate) | formattedTimestamp: 'DD.MM.YYYY HH:mm' }}</label> + </td> </tr> </tbody> </table> @@ -38,7 +44,9 @@ <table class="table"> <tbody> <tr> - <td class="text-right"><label>Bereich</label></td> + <td class="text-right"> + <label>Bereich</label> + </td> <td class="text-left" style="width: 17%"> <div class="form-group"> <select class="form-control" [(ngModel)]="notification.fkRefBranch" name="branchSelection" [required]="!isReadOnlyDialog && !isInstructionDialog"> @@ -46,9 +54,11 @@ <option *ngFor="let branch of branches" value="{{ branch.id }}">{{ branch.description }}</option> </select> </div> - </td> - <td></td> - <td class="text-right"><label>Netzgebiet</label></td> + </td> + <td></td> + <td class="text-right"> + <label>Netzgebiet</label> + </td> <td class="text-left" style="width: 17%"> <div class="form-group"> <select class="form-control" [(ngModel)]="notification.fkRefGridTerritory" name="gridTerritorySelection" [required]="!isReadOnlyDialog && !isInstructionDialog"> @@ -57,19 +67,21 @@ </select> </div> </td> - <td></td> - <td colspan="1" class="text-right"><label>Status</label></td> + <td></td> + <td colspan="1" class="text-right"> + <label>Status</label> + </td> <td class="text-left" style="width: 17%"> <select class="form-control" name="status" [(ngModel)]="notification.fkRefNotificationStatus" (ngModelChange)="statusChanged($event,notification)" name="statusSelection" [required]="!isReadOnlyDialog"> - <option *ngFor="let status of statuses" value="{{ status.id }}" >{{ status.name }} </option> - </select> + <option *ngFor="let status of statuses" value="{{ status.id }}">{{ status.name }} </option> + </select> </td> - <td></td> + <td></td> </tr> </tbody> </table> - <table class="table"> + <table class="table"> <tbody> <tr> <td colspan="10"> @@ -93,8 +105,8 @@ <td> <label>Zuständigkeit / weitergeleitet an</label> </td> - <td colspan="2"> - <app-autocomplete [(responsibilityForwarding)] = "notification.responsibilityForwarding"></app-autocomplete> + <td colspan="2"> + <app-autocomplete [(responsibilityForwarding)]="notification.responsibilityForwarding"></app-autocomplete> </td> <td></td> <td> @@ -102,13 +114,16 @@ </td> <td colspan="2"> <div class="input-group"> - <label for="expectedFinishDateFormControl" class="input-group-addon dateRangePickerIcon" [ngClass]="{'dateRangePickerIcon': !isReadOnlyDialog}"><span class="glyphicon glyphicon-calendar" [ngClass]="{'glyphicon-calendar': !isReadOnlyDialog}"></span></label> - <input id="expectedFinishDateFormControl" [disabled]="isReadOnlyDialog" class="form-control entry-input" *ngIf="notification.expectedFinishDate" type="text" - daterangepicker (applyDaterangepicker)="notification.expectedFinishDate=$event.picker.startDate " [options]="{ startDate: notification.expectedFinishDate | stringToDate, endDate: notification.expectedFinishDate | stringToDate }" + <label for="expectedFinishDateFormControl" class="input-group-addon dateRangePickerIcon" [ngClass]="{'dateRangePickerIcon': !isReadOnlyDialog}"> + <span class="glyphicon glyphicon-calendar" [ngClass]="{'glyphicon-calendar': !isReadOnlyDialog}"></span> + </label> + <input id="expectedFinishDateFormControl" [disabled]="isReadOnlyDialog" class="form-control entry-input" *ngIf="notification.expectedFinishDate" + type="text" daterangepicker (applyDaterangepicker)="notification.expectedFinishDate=$event.picker.startDate " + [options]="{ startDate: notification.expectedFinishDate | stringToDate, endDate: notification.expectedFinishDate | stringToDate, singleDatePicker: true }" /> - <input id="expectedFinishDateFormControl" [disabled]="isReadOnlyDialog" class="form-control entry-input" *ngIf="!notification.expectedFinishDate" type="text" - daterangepicker (applyDaterangepicker)="notification.expectedFinishDate=$event.picker.startDate " [options]="{ autoUpdateInput: false }" - /> + <input id="expectedFinishDateFormControl" [disabled]="isReadOnlyDialog" class="form-control entry-input" *ngIf="!notification.expectedFinishDate" + type="text" daterangepicker (applyDaterangepicker)="notification.expectedFinishDate=$event.picker.startDate " + [options]="{ autoUpdateInput: false, singleDatePicker: true }" /> </div> </td> </tr> @@ -117,19 +132,21 @@ <label>Letzter Bearbeiter</label> </td> <td colspan="2"> - <input class="form-control entry-input last_change_usr_test" type="text" [(ngModel)]="notification.responsibilityControlPoint" name="responsibilityControlPointInput" - disabled="true"> + <input class="form-control entry-input last_change_usr_test" type="text" [(ngModel)]="notification.responsibilityControlPoint" + name="responsibilityControlPointInput" disabled="true"> </td> <td> </td> - <td> + <td> <label>Beginnt am</label> </td> <td colspan="2"> <div class="input-group"> - <label for="beginDateFormControl" class="input-group-addon dateRangePickerIcon" [ngClass]="{'dateRangePickerIcon': !isReadOnlyDialog}"><span class="glyphicon glyphicon-calendar" [ngClass]="{'glyphicon-calendar': !isReadOnlyDialog}"></span></label> - <input id="beginDateFormControl" [disabled]="isReadOnlyDialog" class="form-control entry-input" *ngIf="notification.beginDate" type="text" daterangepicker (applyDaterangepicker)="notification.beginDate=$event.picker.startDate " - [options]="{ startDate: notification.beginDate | stringToDate, endDate: notification.beginDate | stringToDate }" + <label for="beginDateFormControl" class="input-group-addon dateRangePickerIcon" [ngClass]="{'dateRangePickerIcon': !isReadOnlyDialog}"> + <span class="glyphicon glyphicon-calendar" [ngClass]="{'glyphicon-calendar': !isReadOnlyDialog}"></span> + </label> + <input id="beginDateFormControl" [disabled]="isReadOnlyDialog" class="form-control entry-input" *ngIf="notification.beginDate" + type="text" daterangepicker (applyDaterangepicker)="notification.beginDate=$event.picker.startDate " [options]="{ startDate: notification.beginDate | stringToDate, endDate: notification.beginDate | stringToDate, singleDatePicker: true }" /> </div> </td> @@ -139,31 +156,35 @@ <label>Erinnerung</label> </td> <td style="width: 24%" colspan="2"> - <div class="input-group" > - <label for="reminderDateFormControl" class="input-group-addon dateRangePickerIcon" [ngClass]="{'dateRangePickerIcon': !isReadOnlyDialog}"><span class="glyphicon glyphicon-calendar" [ngClass]="{'glyphicon-calendar': !isReadOnlyDialog}"></span></label> + <div class="input-group"> + <label for="reminderDateFormControl" class="input-group-addon dateRangePickerIcon" [ngClass]="{'dateRangePickerIcon': !isReadOnlyDialog}"> + <span class="glyphicon glyphicon-calendar" [ngClass]="{'glyphicon-calendar': !isReadOnlyDialog}"></span> + </label> <input id="reminderDateFormControl" [disabled]="isReadOnlyDialog" class="form-control entry-input" type="text" (applyDaterangepicker)="notification.reminderDate=$event.picker.startDate" - daterangepicker [options]="{ startDate: notification.reminderDate | stringToDate, endDate: notification.reminderDate | stringToDate }" + daterangepicker [options]="{ startDate: notification.reminderDate | stringToDate, endDate: notification.reminderDate | stringToDate, singleDatePicker: true }" *ngIf="notification.reminderDate" /> - <input id="reminderDateFormControl" [disabled]="isReadOnlyDialog" class="form-control entry-input" *ngIf="!notification.reminderDate" type="text" daterangepicker - (applyDaterangepicker)="notification.reminderDate=$event.picker.startDate" [options]="{ autoUpdateInput: false }" - /> + <input id="reminderDateFormControl" [disabled]="isReadOnlyDialog" class="form-control entry-input" *ngIf="!notification.reminderDate" + type="text" daterangepicker (applyDaterangepicker)="notification.reminderDate=$event.picker.startDate" + [options]="{ autoUpdateInput: false, singleDatePicker: true }" /> </div> </td> <td style="width: 2%"></td> <td style="width: 20%"> <label>Erledigt am</label> </td> - <td colspan="2"> - <div class="input-group" > - <label for="finishedDateFormControl" class="input-group-addon dateRangePickerIcon" [ngClass]="{'dateRangePickerIcon': !isReadOnlyDialog}"><span class="glyphicon glyphicon-calendar" [ngClass]="{'glyphicon-calendar': !isReadOnlyDialog}"></span></label> + <td colspan="2"> + <div class="input-group"> + <label for="finishedDateFormControl" class="input-group-addon dateRangePickerIcon" [ngClass]="{'dateRangePickerIcon': !isReadOnlyDialog}"> + <span class="glyphicon glyphicon-calendar" [ngClass]="{'glyphicon-calendar': !isReadOnlyDialog}"></span> + </label> <input id="finishedDateFormControl" [disabled]="isReadOnlyDialog" class="form-control entry-input" type="text" (applyDaterangepicker)="notification.finishedDate=$event.picker.startDate" - daterangepicker [options]="{ startDate: notification.finishedDate | stringToDate, endDate: notification.finishedDate | stringToDate }" + daterangepicker [options]="{ startDate: notification.finishedDate | stringToDate, endDate: notification.finishedDate | stringToDate, singleDatePicker: true }" *ngIf="notification.finishedDate" /> - <input id="finishedDateFormControl" [disabled]="isReadOnlyDialog" class="form-control entry-input" *ngIf="!notification.finishedDate" type="text" daterangepicker [disabled]="true" - (applyDaterangepicker)="notification.finishedDate=$event.picker.startDate" [options]="{ autoUpdateInput: false }" - /> + <input id="finishedDateFormControl" [disabled]="isReadOnlyDialog" class="form-control entry-input" *ngIf="!notification.finishedDate" + type="text" daterangepicker [disabled]="true" (applyDaterangepicker)="notification.finishedDate=$event.picker.startDate" + [options]="{ autoUpdateInput: false, singleDatePicker: true }" /> </div> - </td> + </td> </tr> <tr> <td> @@ -171,11 +192,13 @@ </td> <td colspan="2"> <div class="input-group"> - <span class="input-group-addon"><span class="glyphicon glyphicon-calendar" [ngClass]="{'glyphicon-calendar': !isReadOnlyDialog}"></span></span> - <input class="form-control entry-input" *ngIf="notification.createDate" type="text" daterangepicker [options]="{ startDate: notification.createDate | stringToDate, endDate: notification.createDate | stringToDate }" - disabled="true"/> - <input class="form-control entry-input" *ngIf="!notification.createDate" type="text" daterangepicker disabled="true" [options]="{ autoUpdateInput: false }" - disabled="true"/> + <span class="input-group-addon"> + <span class="glyphicon glyphicon-calendar" [ngClass]="{'glyphicon-calendar': !isReadOnlyDialog}"></span> + </span> + <input class="form-control entry-input" *ngIf="notification.createDate" type="text" daterangepicker [options]="{ startDate: notification.createDate | stringToDate, endDate: notification.createDate | stringToDate, singleDatePicker: true }" + disabled="true" /> + <input class="form-control entry-input" *ngIf="!notification.createDate" type="text" daterangepicker disabled="true" [options]="{ autoUpdateInput: false, singleDatePicker: true }" + disabled="true" /> </div> </td> <td> @@ -195,8 +218,8 @@ <div> <button *ngIf="isEditDialog && !isReadOnlyDialog" class="btn btn-primary btn-sm btn-success" (click)="edit()" autofocus type="submit" [disabled]="!entryForm.form.valid">Ändern</button> - <button *ngIf="!isEditDialog && !isReadOnlyDialog" class="btn btn-primary btn-sm btn-success" (click)="add(isInstructionDialog)" autofocus type="submit" - [disabled]="!entryForm.form.valid">Hinzufügen</button> + <button *ngIf="!isEditDialog && !isReadOnlyDialog" class="btn btn-primary btn-sm btn-success" (click)="add(isInstructionDialog)" + autofocus type="submit" [disabled]="!entryForm.form.valid">Hinzufügen</button> <button class="btn btn-primary btn-sm" (click)="cancel()">Abbrechen</button> </div>
diff --git a/src/app/dialogs/entry/entry.component.ts b/src/app/dialogs/entry/entry.component.ts index 48d4186..3733b3b 100644 --- a/src/app/dialogs/entry/entry.component.ts +++ b/src/app/dialogs/entry/entry.component.ts
@@ -52,7 +52,6 @@ this.user = this.sessionContext.getCurrUser(); this.daterangepickerConfig.settings = { - singleDatePicker: true, timePicker: true, timePicker24Hour: true, timePickerSeconds: false, @@ -129,7 +128,6 @@ this.messageService.emitError('Eintrag', ErrorType.update); this.dialogRef.close(); }); - this.daterangepickerConfig.settings.singleDatePicker = false; } add(adminFlag: boolean) { @@ -140,12 +138,10 @@ this.messageService.emitError('Eintrags', ErrorType.create); this.dialogRef.close(); }); - this.daterangepickerConfig.settings.singleDatePicker = false; } cancel() { this.dialogRef.close(); - this.daterangepickerConfig.settings.singleDatePicker = false; } statusChanged(statusId: number, notification: Notification) {
diff --git a/src/app/lists/abstract-list/abstract-list.component.ts b/src/app/lists/abstract-list/abstract-list.component.ts index a39ffb0..86d1641 100644 --- a/src/app/lists/abstract-list/abstract-list.component.ts +++ b/src/app/lists/abstract-list/abstract-list.component.ts
@@ -115,7 +115,6 @@ //Daterangepicker Config this.daterangepickerConfig.settings = { - singleDatePicker: false, timePicker: true, timePicker24Hour: true, timePickerSeconds: false,