Skip to content

Commit

Permalink
Donnerstag 19:30
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Hornburger committed Apr 11, 2024
1 parent c454d1a commit cb1bf0d
Show file tree
Hide file tree
Showing 21 changed files with 1,261 additions and 967 deletions.
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export class AppComponent implements OnInit, OnDestroy, AfterContentChecked {

if(this.Pool.Mitarbeiterdaten.Planeradministrator === true) {

Page = this.Const.Pages.HomePage;
Page = this.Const.Pages.UrlaubPlanungPage;
}
else {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,48 +174,47 @@
</ng-container>
<ng-container *ngIf="Bereich === Bereiche.Positionen">

<table style="width: 100%">
<tr>
<td style="width: 50%;" valign="top">
<div class="keeperdivclass">

<ion-list>
<ion-item class="ion-text-wrap" class="ion-no-padding" *ngFor="let Position of Pool.Mitarbeiterpositionenliste" (click)="PositionButtonClicked(Position)">
<table class="paddingtable">
<tr>
<td>
<div class="positionclass">{{Position.Bezeichnung}}</div>
</td>
</tr>
</table>
<div class="poslisteclass">
<ion-list>
<ion-item class="ion-text-wrap" class="ion-no-padding" *ngFor="let Position of Pool.Mitarbeiterpositionenliste" (click)="PositionButtonClicked(Position)">
<table class="paddingtable">
<tr>
<td>
<div class="positionclass">{{Position.Bezeichnung}}</div>
</td>
</tr>
</table>

</ion-item>
</ion-list>
</ion-item>
</ion-list>

</td>
<td style="width: 50%;" valign="top">
</div>
<div class="poseditorclass">

<table class="paddingtable">
<tr *ngIf="AddNewPosition === false && EditPosition === false">
<td><ion-button color="grau" size="small" (click)="NeuePositionButtonClicked()">Neue Position eintragen</ion-button></td>
</tr>
<tr *ngIf="AddNewPosition === true || EditPosition === true">
<td style="width: 400px;">
<input-clone [(Value)]="DB.CurrentPosition.Bezeichnung" [Required]="true" [MaxLength]="200" [Titel]="AddNewPosition ? 'Neue Position' : 'Position bearbeiten'" (TextChanged)="NewPositionTextChanged($event)"></input-clone>
</td>
</tr>
<tr *ngIf="AddNewPosition || EditPosition === true">
<td>
<table class="paddingtable">
<tr>
<table class="paddingtable">
<tr *ngIf="AddNewPosition === false && EditPosition === false">
<td><ion-button color="grau" size="small" (click)="NeuePositionButtonClicked()">Neue Position eintragen</ion-button></td>
</tr>
<tr *ngIf="AddNewPosition === true || EditPosition === true">
<td style="width: 400px;">
<input-clone [(Value)]="DB.CurrentPosition.Bezeichnung" [Required]="true" [MaxLength]="200" [Titel]="AddNewPosition ? 'Neue Position' : 'Position bearbeiten'" (TextChanged)="NewPositionTextChanged($event)"></input-clone>
</td>
</tr>
<tr *ngIf="AddNewPosition || EditPosition === true">
<td>
<table class="paddingtable">
<tr>
<td><ion-button (click)="PositionCancelButtonClicked()" color="rot" size="small"><ion-icon name="close-outline"></ion-icon></ion-button></td>
<td><ion-button (click)="PositionOkButtonClicked()" color="gruen" size="small"><ion-icon name="checkmark-outline"></ion-icon></ion-button></td>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</table>
</td>
</tr>
</table>

</div>
</div>
</ng-container>

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,28 @@

background: silver;
}

.keeperdivclass {

display: flex;
flex-direction: row;
position: relative;
width: 100%;
height: 100%;
}

.poslisteclass {

height: 100%;
width: 65%;
overflow: auto;
}

.poseditorclass {

height: 100%;
width: 35%;
overflow: auto;
border-left: 2px solid #444444;

}
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,13 @@ export class FiMitarbeiterEditorComponent implements OnInit, OnDestroy, AfterVie
this.AddNewPosition = false;
this.DB.CurrentPosition = null;
}

if(this.EditPosition) {

this.EditPosition = false;
this.DB.CurrentPosition = null;
}

} catch (error) {

this.Debug.ShowErrorMessage(error, 'Mitarbeiter Editor', 'PositionCancelButtonClicked', this.Debug.Typen.Component);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
</table>
</div>
</td>
<ng-container *ngIf="Pool.Mitarbeiterdaten.Urlaubsfreigaben === true || Pool.Mitarbeiterdaten.Planeradministrator">
<ng-container *ngIf="Pool.Mitarbeiterdaten.Urlaubsfreigaben === true || Pool.Mitarbeiterdaten.Homeofficefreigaben === true || Pool.Mitarbeiterdaten.Planeradministrator">
<td style="width: 20px"></td>
<td>
<div class="menubuttonclass" (click)="UrlaubMenueButtonClicked(Menuservice.UrlaubMenuebereiche.Gesamtplanung)">
Expand All @@ -92,7 +92,7 @@
</div>
</td>
</ng-container>
<ng-container *ngIf="DBUrlaub.CurrentMitarbeiter.Homeofficefreigaben === true || DBUrlaub.CurrentMitarbeiter.Urlaubsfreigaben === true || DBUrlaub.Vertretungsanfragenanzahl > 0">
<ng-container *ngIf="Pool.Mitarbeiterdaten.Homeofficefreigaben === true || Pool.Mitarbeiterdaten.Urlaubsfreigaben === true || DBUrlaub.Vertretungsanfragenanzahl > 0">
<td style="width: 20px"></td>
<td>
<div class="menubuttonclass" (click)="UrlaubMenueButtonClicked(Menuservice.UrlaubMenuebereiche.Freigaben)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<ng-container *ngIf="Tagindex < 5">
<ng-container *ngIf="Tag.Hauptmonat === true && Pool.Mitarbeitersettings !== null">
<div
(click)="TagClicked(Tag, Wocheindex, Tagindex)" class="tagrahmenclass">
(click)="TagClicked($event, Tag, Wocheindex, Tagindex)" class="tagrahmenclass">
<div class="tagdivclass"
[style.background]="GetTagBackground(Tag)"
[style.color]="Pool.Mitarbeitersettings.UrlaubShowMeinenUrlaub ? Tag.Color : 'black' || Pool.Mitarbeitersettings.ShowHomeoffice ? Tag.Color : 'black'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export class PjProjektpunktDateKWPickerComponent implements OnInit, OnDestroy, O

@Output() FeiertagCrossedEvent = new EventEmitter<{Name: string; Laendercode: string}>();
@Output() FerientagCrossedEvent = new EventEmitter<{Name: string; Laendercode: string}>();
@Output() AddUrlaubFinished = new EventEmitter<boolean>();
@Output() AddHomeofficeEvent = new EventEmitter<boolean>();
@Output() AddUrlaubFinishedEvent = new EventEmitter<boolean>();
@Output() AddHomeofficeFinishedEvent = new EventEmitter<boolean>();

public Kalendertageliste: Kalendertagestruktur[][];
public KalendertageExternliste: Kalendertagestruktur[][][];
Expand Down Expand Up @@ -451,7 +451,7 @@ export class PjProjektpunktDateKWPickerComponent implements OnInit, OnDestroy, O
}
}

TagClicked(Tag: Kalendertagestruktur, Wocheindex: number, Tagindex: number) {
TagClicked(event: MouseEvent, Tag: Kalendertagestruktur, Wocheindex: number, Tagindex: number) {

try {

Expand All @@ -464,6 +464,9 @@ export class PjProjektpunktDateKWPickerComponent implements OnInit, OnDestroy, O
let IsUrlaub: boolean = Tag.IsUrlaub;
let IsHomeoffice: boolean = Tag.IsHomeoffice;

event.stopPropagation();
event.preventDefault();

if(this.AddUrlaubRunning) {

if (IsFeiertag === false && IsHomeoffice === false && IsUrlaub === false) {
Expand Down Expand Up @@ -510,7 +513,7 @@ export class PjProjektpunktDateKWPickerComponent implements OnInit, OnDestroy, O

if (Resturlaub - Anzahl >= 0) {

this.AddUrlaubFinished.emit(true);
this.AddUrlaubFinishedEvent.emit(true);
} else {

this.Tools.ShowHinweisDialog('Du hast nur noch ' + Resturlaub + ' Tage Resturlaub.');
Expand All @@ -532,7 +535,7 @@ export class PjProjektpunktDateKWPickerComponent implements OnInit, OnDestroy, O
}
}

this.AddUrlaubFinished.emit(false);
this.AddUrlaubFinishedEvent.emit(false);

}, 3000);

Expand All @@ -553,7 +556,6 @@ export class PjProjektpunktDateKWPickerComponent implements OnInit, OnDestroy, O

if(this.AddHomeofficerunning) {


if(IsFeiertag === false && IsUrlaub === false && IsHomeoffice === false) {

this.DB.CurrentHomeofficezeitspanne = this.DB.GetEmptyHomeofficezeitspanne();
Expand All @@ -569,14 +571,16 @@ export class PjProjektpunktDateKWPickerComponent implements OnInit, OnDestroy, O
Kalendertag.IsHomeoffice = true;
Kalendertag.Color = 'white';

this.AddHomeofficeFinishedEvent.emit(true);

} else {

if (IsFeiertag) this.Tools.ShowHinweisDialog('Dieser Tag ist ein Feiertag.');
else if(IsUrlaub) this.Tools.ShowHinweisDialog('Dieser Tag ist ein Urlaubstag.');
else this.Tools.ShowHinweisDialog('Dieser Tag ist bereits ein Homeofficetag.');
}

this.AddHomeofficeEvent.emit(true);
this.DB.CurrentHomeofficezeitspanne = null;
}
}
} catch (error) {

Expand Down
1 change: 1 addition & 0 deletions src/app/dataclasses/homeofficezeitspannenstruktur.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ export type Homeofficezeitspannenstruktur = {
Tageanzahl: number;
FreigabeanfrageSended: boolean;
FreigabeantwortSended: boolean;
Checked?: boolean;

};
1 change: 1 addition & 0 deletions src/app/dataclasses/urlauzeitspannenstruktur.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ export type Urlauzeitspannenstruktur = {
FreigabeanfrageSended: boolean;
FreigabeantwortSended: boolean;
FreigabeantwortOfficeSended: boolean;
Checked?: boolean;

};
Loading

0 comments on commit cb1bf0d

Please sign in to comment.