fix: ng update core 20
This commit is contained in:
34
angular.json
34
angular.json
@@ -16,7 +16,7 @@
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:application",
|
||||
"builder": "@angular/build:application",
|
||||
"options": {
|
||||
"outputPath": {
|
||||
"base": "dist/ipwa"
|
||||
@@ -96,7 +96,7 @@
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"builder": "@angular/build:dev-server",
|
||||
"configurations": {
|
||||
"production": {
|
||||
"buildTarget": "ipwa:build:production"
|
||||
@@ -112,13 +112,13 @@
|
||||
"defaultConfiguration": "development"
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"builder": "@angular/build:extract-i18n",
|
||||
"options": {
|
||||
"buildTarget": "ipwa:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"builder": "@angular/build:karma",
|
||||
"options": {
|
||||
"polyfills": [
|
||||
"zone.js",
|
||||
@@ -139,5 +139,31 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"type": "component"
|
||||
},
|
||||
"@schematics/angular:directive": {
|
||||
"type": "directive"
|
||||
},
|
||||
"@schematics/angular:service": {
|
||||
"type": "service"
|
||||
},
|
||||
"@schematics/angular:guard": {
|
||||
"typeSeparator": "."
|
||||
},
|
||||
"@schematics/angular:interceptor": {
|
||||
"typeSeparator": "."
|
||||
},
|
||||
"@schematics/angular:module": {
|
||||
"typeSeparator": "."
|
||||
},
|
||||
"@schematics/angular:pipe": {
|
||||
"typeSeparator": "."
|
||||
},
|
||||
"@schematics/angular:resolver": {
|
||||
"typeSeparator": "."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
7433
package-lock.json
generated
7433
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
@@ -12,19 +12,19 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^19.2.14",
|
||||
"@angular/animations": "^20.0.2",
|
||||
"@angular/cdk": "^19.2.18",
|
||||
"@angular/cli": "^19.2.14",
|
||||
"@angular/common": "^19.2.14",
|
||||
"@angular/compiler": "^19.2.14",
|
||||
"@angular/core": "^19.2.14",
|
||||
"@angular/forms": "^19.2.14",
|
||||
"@angular/cli": "^20.0.1",
|
||||
"@angular/common": "^20.0.2",
|
||||
"@angular/compiler": "^20.0.2",
|
||||
"@angular/core": "^20.0.2",
|
||||
"@angular/forms": "^20.0.2",
|
||||
"@angular/material": "^19.2.18",
|
||||
"@angular/material-moment-adapter": "^19.2.18",
|
||||
"@angular/platform-browser": "^19.2.14",
|
||||
"@angular/platform-browser-dynamic": "^19.2.14",
|
||||
"@angular/router": "^19.2.14",
|
||||
"@angular/service-worker": "^19.2.14",
|
||||
"@angular/platform-browser": "^20.0.2",
|
||||
"@angular/platform-browser-dynamic": "^20.0.2",
|
||||
"@angular/router": "^20.0.2",
|
||||
"@angular/service-worker": "^20.0.2",
|
||||
"marked": "^12.0.1",
|
||||
"moment": "^2.29.4",
|
||||
"rxjs": "~7.5.0",
|
||||
@@ -32,8 +32,8 @@
|
||||
"zone.js": "~0.15.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^19.2.14",
|
||||
"@angular/compiler-cli": "^19.2.14",
|
||||
"@angular/build": "^20.0.1",
|
||||
"@angular/compiler-cli": "^20.0.2",
|
||||
"@types/jasmine": "~4.3.0",
|
||||
"jasmine-core": "~4.5.0",
|
||||
"karma": "~6.4.0",
|
||||
@@ -43,4 +43,4 @@
|
||||
"karma-jasmine-html-reporter": "~2.0.0",
|
||||
"typescript": "~5.8.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +1,37 @@
|
||||
<div id="upper-bar">
|
||||
<mat-form-field>
|
||||
<mat-label>Wyszukaj</mat-label>
|
||||
<input matInput (keyup)="filter($event)">
|
||||
</mat-form-field>
|
||||
<button mat-icon-button (click)="openUserCard()"><mat-icon>add</mat-icon></button>
|
||||
<mat-form-field>
|
||||
<mat-label>Wyszukaj</mat-label>
|
||||
<input matInput (keyup)="filter($event)">
|
||||
</mat-form-field>
|
||||
<button mat-icon-button (click)="openUserCard()"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
<mat-spinner *ngIf="loading"></mat-spinner>
|
||||
@if (loading) {
|
||||
<mat-spinner></mat-spinner>
|
||||
}
|
||||
<table mat-table [dataSource]="users">
|
||||
<div matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef>Imię</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.fname}}</td>
|
||||
</div>
|
||||
<div matColumnDef="surname">
|
||||
<th mat-header-cell *matHeaderCellDef>Nazwisko</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.surname}}</td>
|
||||
</div>
|
||||
<div matColumnDef="room">
|
||||
<th mat-header-cell *matHeaderCellDef>Pokój</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.room}}</td>
|
||||
</div>
|
||||
<div matColumnDef="uname">
|
||||
<th mat-header-cell *matHeaderCellDef>Nazwa użytkownika</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.uname}}</td>
|
||||
</div>
|
||||
<div matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Karta użytkownika</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<button mat-mini-fab (click)="openUserCard(element._id)"><mat-icon>manage_accounts</mat-icon></button>
|
||||
</td>
|
||||
</div>
|
||||
<tr mat-header-row *matHeaderRowDef="collumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: collumns"></tr>
|
||||
<div matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef>Imię</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.fname}}</td>
|
||||
</div>
|
||||
<div matColumnDef="surname">
|
||||
<th mat-header-cell *matHeaderCellDef>Nazwisko</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.surname}}</td>
|
||||
</div>
|
||||
<div matColumnDef="room">
|
||||
<th mat-header-cell *matHeaderCellDef>Pokój</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.room}}</td>
|
||||
</div>
|
||||
<div matColumnDef="uname">
|
||||
<th mat-header-cell *matHeaderCellDef>Nazwa użytkownika</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.uname}}</td>
|
||||
</div>
|
||||
<div matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Karta użytkownika</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<button mat-mini-fab (click)="openUserCard(element._id)"><mat-icon>manage_accounts</mat-icon></button>
|
||||
</td>
|
||||
</div>
|
||||
<tr mat-header-row *matHeaderRowDef="collumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: collumns"></tr>
|
||||
</table>
|
||||
<mat-paginator pageSize="9" [pageSizeOptions]="[9, 15, 20, 50, 160]"></mat-paginator>
|
||||
@@ -1,67 +1,85 @@
|
||||
<h1 mat-dialog-title>Karta użytkownika</h1>
|
||||
<mat-dialog-content>
|
||||
<form [formGroup]="form">
|
||||
<div>
|
||||
<mat-form-field appearance="outline" color="accent">
|
||||
<mat-label>Imię</mat-label>
|
||||
<input type="text" matInput formControlName="fname">
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" color="accent">
|
||||
<mat-label>Nazwisko</mat-label>
|
||||
<input type="text" matInput formControlName="surname">
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" color="accent">
|
||||
<mat-label>Pokój</mat-label>
|
||||
<input type="text" matInput formControlName="room">
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" color="accent">
|
||||
<mat-label>Grupy</mat-label>
|
||||
<mat-select multiple formControlName="groups">
|
||||
@for (item of groups; track $index) {
|
||||
<mat-option [value]="item._id">{{item.name}}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="data.type == 'edit'">Data rejestracji:<br>{{regDate?.format('DD.MM.YYYY')}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<mat-form-field appearance="outline" color="accent">
|
||||
<mat-label>Nazwa użytkownika</mat-label>
|
||||
<input type="text" matInput required formControlName="uname">
|
||||
</mat-form-field>
|
||||
@if (data.type == "edit") {
|
||||
<button mat-stroked-button color="accent" (click)="resetPass()">Resetuj hasło</button>
|
||||
@if (locked) {
|
||||
<button mat-stroked-button color="warn" (click)="toggleLock(false)"><mat-icon>lock</mat-icon>Blokada ręczna</button>
|
||||
} @else {
|
||||
<button mat-stroked-button color="accent" (click)="toggleLock(true)">Zablokuj konto</button>
|
||||
}
|
||||
@if (lockout) {
|
||||
<button mat-stroked-button color="warn" (click)="disableLockout()"><mat-icon>lock_clock</mat-icon>Auto-Blokada</button>
|
||||
} @else {
|
||||
<button mat-stroked-button disabled>Auto-Blokada nieczynna</button>
|
||||
}
|
||||
<mat-form-field *ngIf="ls.permChecker(32)" color="accent">
|
||||
<mat-label>Uprawnienia</mat-label>
|
||||
<mat-select multiple formControlName="flags">
|
||||
<mat-option [value]="1" *ngIf="ls.capCheck(1)">Wiadomości</mat-option>
|
||||
<mat-option [value]="2" *ngIf="ls.capCheck(2)">Jadłospis</mat-option>
|
||||
<mat-option [value]="4" *ngIf="ls.capCheck(4)">Powiadomienia</mat-option>
|
||||
<mat-option [value]="8" *ngIf="ls.capCheck(8)">Grupy</mat-option>
|
||||
<mat-option [value]="16">Konta</mat-option>
|
||||
<mat-option [value]="64" *ngIf="ls.capCheck(32)">Klucze</mat-option>
|
||||
<mat-option [value]="128" *ngIf="ls.capCheck(16)">Czystość</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
}
|
||||
</div>
|
||||
</form>
|
||||
<form [formGroup]="form">
|
||||
<div>
|
||||
<mat-form-field appearance="outline" color="accent">
|
||||
<mat-label>Imię</mat-label>
|
||||
<input type="text" matInput formControlName="fname">
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" color="accent">
|
||||
<mat-label>Nazwisko</mat-label>
|
||||
<input type="text" matInput formControlName="surname">
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" color="accent">
|
||||
<mat-label>Pokój</mat-label>
|
||||
<input type="text" matInput formControlName="room">
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline" color="accent">
|
||||
<mat-label>Grupy</mat-label>
|
||||
<mat-select multiple formControlName="groups">
|
||||
@for (item of groups; track $index) {
|
||||
<mat-option [value]="item._id">{{item.name}}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@if (data.type == 'edit') {
|
||||
<span>Data rejestracji:<br>{{regDate?.format('DD.MM.YYYY')}}</span>
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
<mat-form-field appearance="outline" color="accent">
|
||||
<mat-label>Nazwa użytkownika</mat-label>
|
||||
<input type="text" matInput required formControlName="uname">
|
||||
</mat-form-field>
|
||||
@if (data.type == "edit") {
|
||||
<button mat-stroked-button color="accent" (click)="resetPass()">Resetuj hasło</button>
|
||||
@if (locked) {
|
||||
<button mat-stroked-button color="warn" (click)="toggleLock(false)"><mat-icon>lock</mat-icon>Blokada ręczna</button>
|
||||
} @else {
|
||||
<button mat-stroked-button color="accent" (click)="toggleLock(true)">Zablokuj konto</button>
|
||||
}
|
||||
@if (lockout) {
|
||||
<button mat-stroked-button color="warn" (click)="disableLockout()"><mat-icon>lock_clock</mat-icon>Auto-Blokada</button>
|
||||
} @else {
|
||||
<button mat-stroked-button disabled>Auto-Blokada nieczynna</button>
|
||||
}
|
||||
@if (ls.permChecker(32)) {
|
||||
<mat-form-field color="accent">
|
||||
<mat-label>Uprawnienia</mat-label>
|
||||
<mat-select multiple formControlName="flags">
|
||||
@if (ls.capCheck(1)) {
|
||||
<mat-option [value]="1">Wiadomości</mat-option>
|
||||
}
|
||||
@if (ls.capCheck(2)) {
|
||||
<mat-option [value]="2">Jadłospis</mat-option>
|
||||
}
|
||||
@if (ls.capCheck(4)) {
|
||||
<mat-option [value]="4">Powiadomienia</mat-option>
|
||||
}
|
||||
@if (ls.capCheck(8)) {
|
||||
<mat-option [value]="8">Grupy</mat-option>
|
||||
}
|
||||
<mat-option [value]="16">Konta</mat-option>
|
||||
@if (ls.capCheck(32)) {
|
||||
<mat-option [value]="64">Klucze</mat-option>
|
||||
}
|
||||
@if (ls.capCheck(16)) {
|
||||
<mat-option [value]="128">Czystość</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</form>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
@if (data.type == "edit") {
|
||||
<button mat-stroked-button color="warn" style="margin-right: auto;">Usuń konto</button>
|
||||
}
|
||||
<button mat-stroked-button mat-dialog-close>Zamknij</button>
|
||||
<button mat-flat-button color="accent" (click)="submit()">Zapisz</button>
|
||||
<mat-spinner diameter="32" color="accent" *ngIf="loading"></mat-spinner>
|
||||
@if (data.type == "edit") {
|
||||
<button mat-stroked-button color="warn" style="margin-right: auto;">Usuń konto</button>
|
||||
}
|
||||
<button mat-stroked-button mat-dialog-close>Zamknij</button>
|
||||
<button mat-flat-button color="accent" (click)="submit()">Zapisz</button>
|
||||
@if (loading) {
|
||||
<mat-spinner diameter="32" color="accent"></mat-spinner>
|
||||
}
|
||||
</mat-dialog-actions>
|
||||
@@ -1,25 +1,29 @@
|
||||
<div id="guide">
|
||||
<p><b>Uwaga:</b> Obecność resetuje się o codziennie o 00:00</p>
|
||||
<div id="legend">
|
||||
<b>Legenda: </b>
|
||||
<span class="circle">Wychowanek obecny</span>
|
||||
<span class="circle">Wyjście w ciągu 30 min.</span>
|
||||
<span class="circle">Wychowanek nieobecny</span>
|
||||
</div>
|
||||
<p><b>Uwaga:</b> Obecność resetuje się o codziennie o 00:00</p>
|
||||
<div id="legend">
|
||||
<b>Legenda: </b>
|
||||
<span class="circle">Wychowanek obecny</span>
|
||||
<span class="circle">Wyjście w ciągu 30 min.</span>
|
||||
<span class="circle">Wychowanek nieobecny</span>
|
||||
</div>
|
||||
</div>
|
||||
<table mat-table [dataSource]="data" matSort>
|
||||
<div matColumnDef="room">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Pokój</th>
|
||||
<td mat-cell *matCellDef="let item">{{item.room}}</td>
|
||||
</div>
|
||||
<div matColumnDef="hours">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Godziny</th>
|
||||
<td mat-cell *matCellDef="let item"><span *ngFor="let i of item.hours.sort().reverse(); let isLast=last"><app-hour-display [value]="i"></app-hour-display>{{ isLast ? '' : ', '}}</span><span>{{item.notes}}</span></td>
|
||||
<div matColumnDef="room">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Pokój</th>
|
||||
<td mat-cell *matCellDef="let item">{{item.room}}</td>
|
||||
</div>
|
||||
<div matColumnDef="hours">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Godziny</th>
|
||||
<td mat-cell *matCellDef="let item">@for (i of item.hours.sort().reverse(); track i; let isLast = $last) {
|
||||
<span><app-hour-display [value]="i"></app-hour-display>{{ isLast ? '' : ', '}}</span>
|
||||
}<span>{{item.notes}}</span></td>
|
||||
</div>
|
||||
<div matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Usuń</th>
|
||||
<td mat-cell *matCellDef="let item"><button mat-mini-fab color="warn" (click)="delete(item.room)" *ngIf="!item.auto"><mat-icon>delete</mat-icon></button></td>
|
||||
<th mat-header-cell *matHeaderCellDef>Usuń</th>
|
||||
<td mat-cell *matCellDef="let item">@if (!item.auto) {
|
||||
<button mat-mini-fab color="warn" (click)="delete(item.room)"><mat-icon>delete</mat-icon></button>
|
||||
}</td>
|
||||
</div>
|
||||
<tr mat-header-row *matHeaderRowDef="collumns"></tr>
|
||||
<tr mat-row *matRowDef="let rowData; columns: collumns"></tr>
|
||||
</table>
|
||||
</table>
|
||||
@@ -1,28 +1,34 @@
|
||||
<app-date-selector [(date)]="date" [filter]="filter" (dateChange)="downloadData()"></app-date-selector>
|
||||
<app-room-chooser [rooms]="rooms" (room)="roomNumber($event)"/>
|
||||
<form [formGroup]="form">
|
||||
<p>Czystość pokoju {{room}} na dzień {{date.format("dddd")}}</p>
|
||||
<p>Ocena: {{grade}}</p>
|
||||
<div id="buttons">
|
||||
<button mat-mini-fab (click)="downloadData()" color="accent"><mat-icon>cancel</mat-icon></button>
|
||||
<button mat-mini-fab (click)="attendence()" color="accent"><mat-icon>overview</mat-icon></button>
|
||||
<button mat-mini-fab (click)="save()" color="accent"><mat-icon>save</mat-icon></button>
|
||||
<button mat-mini-fab color="warn" (click)="remove()" *ngIf="id"><mat-icon>delete</mat-icon></button>
|
||||
<p>Czystość pokoju {{room}} na dzień {{date.format("dddd")}}</p>
|
||||
<p>Ocena: {{grade}}</p>
|
||||
<div id="buttons">
|
||||
<button mat-mini-fab (click)="downloadData()" color="accent"><mat-icon>cancel</mat-icon></button>
|
||||
<button mat-mini-fab (click)="attendence()" color="accent"><mat-icon>overview</mat-icon></button>
|
||||
<button mat-mini-fab (click)="save()" color="accent"><mat-icon>save</mat-icon></button>
|
||||
@if (id) {
|
||||
<button mat-mini-fab color="warn" (click)="remove()"><mat-icon>delete</mat-icon></button>
|
||||
}
|
||||
</div>
|
||||
@for (item of things.controls; track item; let i = $index) {
|
||||
<div formArrayName="things" id="things">
|
||||
<div formGroupName="{{i}}">
|
||||
<mat-checkbox formControlName="cb" #cb>
|
||||
<span control="label"></span>
|
||||
@if (cb.checked) {
|
||||
<span>
|
||||
<button mat-icon-button (click)="group.sub(i)"><mat-icon>remove</mat-icon></button>
|
||||
<span control="weight"></span>
|
||||
<button mat-icon-button (click)="group.add(i)"><mat-icon>add</mat-icon></button>
|
||||
</span>
|
||||
}
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngFor="let item of things.controls; let i = index" formArrayName="things" id="things">
|
||||
<div formGroupName="{{i}}">
|
||||
<mat-checkbox formControlName="cb" #cb>
|
||||
<span control="label"></span>
|
||||
<span *ngIf="cb.checked">
|
||||
<button mat-icon-button (click)="group.sub(i)"><mat-icon>remove</mat-icon></button>
|
||||
<span control="weight"></span>
|
||||
<button mat-icon-button (click)="group.add(i)"><mat-icon>add</mat-icon></button>
|
||||
</span>
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<mat-form-field style="width: 100%;">
|
||||
<mat-label>Dodatkowe uwagi</mat-label>
|
||||
<textarea matNativeControl cdkTextareaAutosize formControlName="tips"></textarea>
|
||||
</mat-form-field>
|
||||
}
|
||||
<mat-form-field style="width: 100%;">
|
||||
<mat-label>Dodatkowe uwagi</mat-label>
|
||||
<textarea matNativeControl cdkTextareaAutosize formControlName="tips"></textarea>
|
||||
</mat-form-field>
|
||||
</form>
|
||||
@@ -1,9 +1,11 @@
|
||||
<button mat-raised-button color="accent" (click)="newGroup()">Nowa grupa</button>
|
||||
<mat-card *ngFor="let item of groups">
|
||||
@for (item of groups; track item) {
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title contenteditable appCe (edit)="nameEdit(item._id, $event)">{{item.name}}</mat-card-title>
|
||||
<mat-card-title contenteditable appCe (edit)="nameEdit(item._id, $event)">{{item.name}}</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-actions>
|
||||
<button mat-button color="warn" (click)="remove(item._id)">Usuń</button>
|
||||
<button mat-button color="warn" (click)="remove(item._id)">Usuń</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</mat-card>
|
||||
}
|
||||
@@ -1,42 +1,46 @@
|
||||
<div id="upper-bar">
|
||||
<mat-form-field>
|
||||
<mat-label>Wyszukaj</mat-label>
|
||||
<input matInput (keyup)="filter($event)">
|
||||
</mat-form-field>
|
||||
<mat-chip-listbox [(ngModel)]="filters" multiple>
|
||||
<mat-chip-option value="showAll">Pokaż wszystko</mat-chip-option>
|
||||
</mat-chip-listbox>
|
||||
<button mat-icon-button (click)="new()"><mat-icon>add</mat-icon></button>
|
||||
<mat-form-field>
|
||||
<mat-label>Wyszukaj</mat-label>
|
||||
<input matInput (keyup)="filter($event)">
|
||||
</mat-form-field>
|
||||
<mat-chip-listbox [(ngModel)]="filters" multiple>
|
||||
<mat-chip-option value="showAll">Pokaż wszystko</mat-chip-option>
|
||||
</mat-chip-listbox>
|
||||
<button mat-icon-button (click)="new()"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
<mat-spinner *ngIf="loading" color="accent"></mat-spinner>
|
||||
@if (loading) {
|
||||
<mat-spinner color="accent"></mat-spinner>
|
||||
}
|
||||
<table mat-table [dataSource]="keys">
|
||||
<div matColumnDef="room">
|
||||
<th mat-header-cell *matHeaderCellDef>Sala</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.room}}</td>
|
||||
</div>
|
||||
<div matColumnDef="whom">
|
||||
<th mat-header-cell *matHeaderCellDef>Wypożyczający</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.whom.uname}}</td>
|
||||
</div>
|
||||
<div matColumnDef="borrow">
|
||||
<th mat-header-cell *matHeaderCellDef>Data wypożyczenia</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.borrow.format("HH:mm, ddd D.MM.")}}</td>
|
||||
</div>
|
||||
<div matColumnDef="tb">
|
||||
<th mat-header-cell *matHeaderCellDef>Data zwrotu</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
@if (element.tb) {
|
||||
{{element.tb.format("HH:mm, ddd D.MM.")}}
|
||||
}
|
||||
</td>
|
||||
</div>
|
||||
<div matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Akcje</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<button mat-mini-fab (click)="tb(element._id)" *ngIf="!element.tb"><mat-icon>person_cancel</mat-icon></button>
|
||||
</td>
|
||||
</div>
|
||||
<tr mat-header-row *matHeaderRowDef="collumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: collumns"></tr>
|
||||
<div matColumnDef="room">
|
||||
<th mat-header-cell *matHeaderCellDef>Sala</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.room}}</td>
|
||||
</div>
|
||||
<div matColumnDef="whom">
|
||||
<th mat-header-cell *matHeaderCellDef>Wypożyczający</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.whom.uname}}</td>
|
||||
</div>
|
||||
<div matColumnDef="borrow">
|
||||
<th mat-header-cell *matHeaderCellDef>Data wypożyczenia</th>
|
||||
<td mat-cell *matCellDef="let element">{{element.borrow.format("HH:mm, ddd D.MM.")}}</td>
|
||||
</div>
|
||||
<div matColumnDef="tb">
|
||||
<th mat-header-cell *matHeaderCellDef>Data zwrotu</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
@if (element.tb) {
|
||||
{{element.tb.format("HH:mm, ddd D.MM.")}}
|
||||
}
|
||||
</td>
|
||||
</div>
|
||||
<div matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Akcje</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
@if (!element.tb) {
|
||||
<button mat-mini-fab (click)="tb(element._id)"><mat-icon>person_cancel</mat-icon></button>
|
||||
}
|
||||
</td>
|
||||
</div>
|
||||
<tr mat-header-row *matHeaderRowDef="collumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: collumns"></tr>
|
||||
</table>
|
||||
<mat-paginator pageSize="9" [pageSizeOptions]="[9, 15, 20, 50, 160]"></mat-paginator>
|
||||
@@ -1,19 +1,23 @@
|
||||
<mat-dialog-content>
|
||||
<form (ngSubmit)="send()" [formGroup]="form">
|
||||
<mat-form-field color="accent">
|
||||
<mat-label>Sala</mat-label>
|
||||
<mat-select formControlName="room" required>
|
||||
@for (item of rooms; track $index) {
|
||||
<mat-option [value]="item">{{item}}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="form.controls['room'].hasError('required')">Wymagane</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field color="accent">
|
||||
<mat-label>Wypożyczający</mat-label>
|
||||
<app-user-search formControlName="user" required/>
|
||||
<mat-error *ngIf="form.controls['user'].hasError('required')">Wymagane</mat-error>
|
||||
</mat-form-field>
|
||||
<button mat-button>Wyślij</button>
|
||||
</form>
|
||||
<form (ngSubmit)="send()" [formGroup]="form">
|
||||
<mat-form-field color="accent">
|
||||
<mat-label>Sala</mat-label>
|
||||
<mat-select formControlName="room" required>
|
||||
@for (item of rooms; track $index) {
|
||||
<mat-option [value]="item">{{item}}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
@if (form.controls['room'].hasError('required')) {
|
||||
<mat-error>Wymagane</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
<mat-form-field color="accent">
|
||||
<mat-label>Wypożyczający</mat-label>
|
||||
<app-user-search formControlName="user" required/>
|
||||
@if (form.controls['user'].hasError('required')) {
|
||||
<mat-error>Wymagane</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
<button mat-button>Wyślij</button>
|
||||
</form>
|
||||
</mat-dialog-content>
|
||||
@@ -1,111 +1,141 @@
|
||||
<div id="upper-bar">
|
||||
<mat-form-field>
|
||||
<mat-label>Wybierz tydzień</mat-label>
|
||||
<mat-date-range-input [rangePicker]="picker" [formGroup]="range">
|
||||
<input matStartDate formControlName="start" (dateChange)="requestData()">
|
||||
<input matEndDate formControlName="end" (dateChange)="requestData()">
|
||||
</mat-date-range-input>
|
||||
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-date-range-picker #picker></mat-date-range-picker>
|
||||
</mat-form-field>
|
||||
<button mat-icon-button (click)="requestData()"><mat-icon>refresh</mat-icon></button>
|
||||
<button mat-icon-button (click)="addDate()"><mat-icon>add</mat-icon></button>
|
||||
<button mat-icon-button (click)="print()"><mat-icon>print</mat-icon></button>
|
||||
<mat-form-field>
|
||||
<mat-label>Wybierz tydzień</mat-label>
|
||||
<mat-date-range-input [rangePicker]="picker" [formGroup]="range">
|
||||
<input matStartDate formControlName="start" (dateChange)="requestData()">
|
||||
<input matEndDate formControlName="end" (dateChange)="requestData()">
|
||||
</mat-date-range-input>
|
||||
<mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-date-range-picker #picker></mat-date-range-picker>
|
||||
</mat-form-field>
|
||||
<button mat-icon-button (click)="requestData()"><mat-icon>refresh</mat-icon></button>
|
||||
<button mat-icon-button (click)="addDate()"><mat-icon>add</mat-icon></button>
|
||||
<button mat-icon-button (click)="print()"><mat-icon>print</mat-icon></button>
|
||||
</div>
|
||||
<mat-spinner *ngIf="loading"></mat-spinner>
|
||||
@if (loading) {
|
||||
<mat-spinner></mat-spinner>
|
||||
}
|
||||
<table mat-table [dataSource]="dataSource">
|
||||
<div matColumnDef="day">
|
||||
<th mat-header-cell *matHeaderCellDef>Dzień</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span>{{element.day.format('DD.MM.YYYY')}}r.</span>
|
||||
<p>{{element.day.format('dddd')}}</p>
|
||||
<app-field-editor category="Nazwa" [(word)]="element.dayTitle" (wordChange)="editTitle(element._id)"/><br><hr>
|
||||
<button (click)="remove(element._id)">Usuń dzień</button>
|
||||
</td>
|
||||
</div>
|
||||
<div matColumnDef="sn">
|
||||
<th mat-header-cell *matHeaderCellDef>Śniadanie</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<ul class="non-editable">
|
||||
<li *ngFor="let i of ls.defaultItems.sn">{{i}}</li>
|
||||
</ul><hr>
|
||||
<app-list-editor [(list)]="element.sn.fancy" (edit)="editSn(element._id)" dataList="sn-fancy"/><hr>
|
||||
<ul>
|
||||
<li><app-field-editor category="II Śniadanie" [(word)]="element.sn.second" list="sn-second" (wordChange)="editSn(element._id)"/></li>
|
||||
</ul>
|
||||
</td>
|
||||
</div>
|
||||
<div matColumnDef="ob">
|
||||
<th mat-header-cell *matHeaderCellDef>Obiad</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<ul>
|
||||
<li><app-field-editor category="Zupa" [(word)]="element.ob.soup" list="ob-soup" (wordChange)="editOb(element._id)"/></li>
|
||||
<li><app-field-editor category="Vege" [(word)]="element.ob.vege" list="ob-vege" (wordChange)="editOb(element._id)"/></li>
|
||||
<li><app-field-editor category="Danie główne" [(word)]="element.ob.meal" list="ob-meal" (wordChange)="editOb(element._id)"/></li>
|
||||
</ul><hr>
|
||||
<app-list-editor [(list)]="element.ob.condiments" (edit)="editOb(element._id)" dataList="ob-condiments"/><hr>
|
||||
<ul>
|
||||
<li><app-field-editor category="Napój" [(word)]="element.ob.drink" list="ob-drink" (wordChange)="editOb(element._id)"/></li>
|
||||
</ul><hr>
|
||||
<app-list-editor [(list)]="element.ob.other" (edit)="editOb(element._id)" dataList="ob-other"/>
|
||||
<button (click)="getStat(element.day, 'ob')">
|
||||
<div matColumnDef="day">
|
||||
<th mat-header-cell *matHeaderCellDef>Dzień</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span>{{element.day.format('DD.MM.YYYY')}}r.</span>
|
||||
<p>{{element.day.format('dddd')}}</p>
|
||||
<app-field-editor category="Nazwa" [(word)]="element.dayTitle" (wordChange)="editTitle(element._id)"/><br><hr>
|
||||
<button (click)="remove(element._id)">Usuń dzień</button>
|
||||
</td>
|
||||
</div>
|
||||
<div matColumnDef="sn">
|
||||
<th mat-header-cell *matHeaderCellDef>Śniadanie</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<ul class="non-editable">
|
||||
@for (i of ls.defaultItems.sn; track i) {
|
||||
<li>{{i}}</li>
|
||||
}
|
||||
</ul><hr>
|
||||
<app-list-editor [(list)]="element.sn.fancy" (edit)="editSn(element._id)" dataList="sn-fancy"/><hr>
|
||||
<ul>
|
||||
<li><app-field-editor category="II Śniadanie" [(word)]="element.sn.second" list="sn-second" (wordChange)="editSn(element._id)"/></li>
|
||||
</ul>
|
||||
</td>
|
||||
</div>
|
||||
<div matColumnDef="ob">
|
||||
<th mat-header-cell *matHeaderCellDef>Obiad</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<ul>
|
||||
<li><app-field-editor category="Zupa" [(word)]="element.ob.soup" list="ob-soup" (wordChange)="editOb(element._id)"/></li>
|
||||
<li><app-field-editor category="Vege" [(word)]="element.ob.vege" list="ob-vege" (wordChange)="editOb(element._id)"/></li>
|
||||
<li><app-field-editor category="Danie główne" [(word)]="element.ob.meal" list="ob-meal" (wordChange)="editOb(element._id)"/></li>
|
||||
</ul><hr>
|
||||
<app-list-editor [(list)]="element.ob.condiments" (edit)="editOb(element._id)" dataList="ob-condiments"/><hr>
|
||||
<ul>
|
||||
<li><app-field-editor category="Napój" [(word)]="element.ob.drink" list="ob-drink" (wordChange)="editOb(element._id)"/></li>
|
||||
</ul><hr>
|
||||
<app-list-editor [(list)]="element.ob.other" (edit)="editOb(element._id)" dataList="ob-other"/>
|
||||
<button (click)="getStat(element.day, 'ob')">
|
||||
Opinie wychowanków
|
||||
</button>
|
||||
</td>
|
||||
</div>
|
||||
<div matColumnDef="kol">
|
||||
<th mat-header-cell *matHeaderCellDef>Kolacja</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<div>
|
||||
@switch (element.day.isoWeekday()) {
|
||||
@default {
|
||||
<div>
|
||||
<ul class="non-editable">
|
||||
@for (i of ls.defaultItems.kol; track i) {
|
||||
<li>{{i}}</li>
|
||||
}
|
||||
</ul><hr>
|
||||
<ul>
|
||||
<li><app-field-editor category="Kolacja" [(word)]="element.kol" list="kol" (wordChange)="editKol(element._id)"/></li>
|
||||
</ul>
|
||||
<button (click)="getStat(element.day, 'kol')">
|
||||
Opinie wychowanków
|
||||
</button>
|
||||
</td>
|
||||
</div>
|
||||
<div matColumnDef="kol">
|
||||
<th mat-header-cell *matHeaderCellDef>Kolacja</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<div [ngSwitch]="element.day.isoWeekday()">
|
||||
<div *ngSwitchDefault>
|
||||
<ul class="non-editable">
|
||||
<li *ngFor="let i of ls.defaultItems.kol">{{i}}</li>
|
||||
</ul><hr>
|
||||
<ul>
|
||||
<li><app-field-editor category="Kolacja" [(word)]="element.kol" list="kol" (wordChange)="editKol(element._id)"/></li>
|
||||
</ul>
|
||||
<button (click)="getStat(element.day, 'kol')">
|
||||
Opinie wychowanków
|
||||
</button>
|
||||
</div>
|
||||
<div *ngSwitchCase="5" class="non-editable">
|
||||
<p>Kolacja w domu!</p>
|
||||
<p>(Nie edytowalne)</p>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="dcols"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: dcols"></tr>
|
||||
}
|
||||
@case (5) {
|
||||
<div class="non-editable">
|
||||
<p>Kolacja w domu!</p>
|
||||
<p>(Nie edytowalne)</p>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="dcols"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: dcols"></tr>
|
||||
</table>
|
||||
|
||||
<ng-container *ngIf="options">
|
||||
<datalist id="sn-fancy">
|
||||
<option *ngFor="let i of options.sn.fancy">{{i}}</option>
|
||||
</datalist>
|
||||
<datalist id="sn-second">
|
||||
<option *ngFor="let i of options.sn.second">{{i}}</option>
|
||||
</datalist>
|
||||
<datalist id="ob-soup">
|
||||
<option *ngFor="let i of options.ob.soup">{{i}}</option>
|
||||
</datalist>
|
||||
<datalist id="ob-vege">
|
||||
<option *ngFor="let i of options.ob.vege">{{i}}</option>
|
||||
</datalist>
|
||||
<datalist id="ob-meal">
|
||||
<option *ngFor="let i of options.ob.meal">{{i}}</option>
|
||||
</datalist>
|
||||
<datalist id="ob-condiments">
|
||||
<option *ngFor="let i of options.ob.condiments">{{i}}</option>
|
||||
</datalist>
|
||||
<datalist id="ob-drink">
|
||||
<option *ngFor="let i of options.ob.drink">{{i}}</option>
|
||||
</datalist>
|
||||
<datalist id="ob-other">
|
||||
<option *ngFor="let i of options.ob.other">{{i}}</option>
|
||||
</datalist>
|
||||
<datalist id="kol">
|
||||
<option *ngFor="let i of options.kol">{{i}}</option>
|
||||
</datalist>
|
||||
</ng-container>
|
||||
@if (options) {
|
||||
<datalist id="sn-fancy">
|
||||
@for (i of options.sn.fancy; track i) {
|
||||
<option>{{i}}</option>
|
||||
}
|
||||
</datalist>
|
||||
<datalist id="sn-second">
|
||||
@for (i of options.sn.second; track i) {
|
||||
<option>{{i}}</option>
|
||||
}
|
||||
</datalist>
|
||||
<datalist id="ob-soup">
|
||||
@for (i of options.ob.soup; track i) {
|
||||
<option>{{i}}</option>
|
||||
}
|
||||
</datalist>
|
||||
<datalist id="ob-vege">
|
||||
@for (i of options.ob.vege; track i) {
|
||||
<option>{{i}}</option>
|
||||
}
|
||||
</datalist>
|
||||
<datalist id="ob-meal">
|
||||
@for (i of options.ob.meal; track i) {
|
||||
<option>{{i}}</option>
|
||||
}
|
||||
</datalist>
|
||||
<datalist id="ob-condiments">
|
||||
@for (i of options.ob.condiments; track i) {
|
||||
<option>{{i}}</option>
|
||||
}
|
||||
</datalist>
|
||||
<datalist id="ob-drink">
|
||||
@for (i of options.ob.drink; track i) {
|
||||
<option>{{i}}</option>
|
||||
}
|
||||
</datalist>
|
||||
<datalist id="ob-other">
|
||||
@for (i of options.ob.other; track i) {
|
||||
<option>{{i}}</option>
|
||||
}
|
||||
</datalist>
|
||||
<datalist id="kol">
|
||||
@for (i of options.kol; track i) {
|
||||
<option>{{i}}</option>
|
||||
}
|
||||
</datalist>
|
||||
}
|
||||
@@ -1,30 +1,44 @@
|
||||
<button mat-raised-button (click)="newPost()" color="accent">Nowy post</button>
|
||||
<mat-spinner *ngIf="loading"></mat-spinner>
|
||||
<mat-card *ngFor="let item of news">
|
||||
@if (loading) {
|
||||
<mat-spinner></mat-spinner>
|
||||
}
|
||||
@for (item of news; track item) {
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>{{item.title}}</mat-card-title>
|
||||
<mat-icon *ngIf="item.pinned">push_pin</mat-icon>
|
||||
<mat-card-subtitle>{{item._id}}</mat-card-subtitle>
|
||||
<mat-card-title>{{item.title}}</mat-card-title>
|
||||
@if (item.pinned) {
|
||||
<mat-icon>push_pin</mat-icon>
|
||||
}
|
||||
<mat-card-subtitle>{{item._id}}</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<mat-card-content [innerHTML]="item.formatted">
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-mini-fab (click)="editPost(item)"><mat-icon>edit</mat-icon></button>
|
||||
<button mat-mini-fab (click)="pinToggle(item)"><mat-icon>push_pin</mat-icon></button>
|
||||
<button mat-mini-fab (click)="visibleToggle(item)">
|
||||
<div [ngSwitch]="item.visible">
|
||||
<mat-icon *ngSwitchCase="true">visibility</mat-icon>
|
||||
<mat-icon *ngSwitchDefault>visibility_off</mat-icon>
|
||||
</div>
|
||||
</button>
|
||||
<button mat-mini-fab (click)="delete(item._id)"><mat-icon>delete_forever</mat-icon></button>
|
||||
<button mat-mini-fab (click)="editPost(item)"><mat-icon>edit</mat-icon></button>
|
||||
<button mat-mini-fab (click)="pinToggle(item)"><mat-icon>push_pin</mat-icon></button>
|
||||
<button mat-mini-fab (click)="visibleToggle(item)">
|
||||
<div>
|
||||
@switch (item.visible) {
|
||||
@case (true) {
|
||||
<mat-icon>visibility</mat-icon>
|
||||
}
|
||||
@default {
|
||||
<mat-icon>visibility_off</mat-icon>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</button>
|
||||
<button mat-mini-fab (click)="delete(item._id)"><mat-icon>delete_forever</mat-icon></button>
|
||||
</mat-card-actions>
|
||||
<mat-card-footer>
|
||||
<p>{{item.date | date:'d-LL-yyyy HH:mm'}}</p>
|
||||
<p>{{item.date | date:'d-LL-yyyy HH:mm'}}</p>
|
||||
</mat-card-footer>
|
||||
</mat-card>
|
||||
<mat-card *ngIf="news.length == 0">
|
||||
</mat-card>
|
||||
}
|
||||
@if (news.length == 0) {
|
||||
<mat-card>
|
||||
<p>
|
||||
Brak wiadomości.
|
||||
Brak wiadomości.
|
||||
</p>
|
||||
</mat-card>
|
||||
</mat-card>
|
||||
}
|
||||
@@ -1,42 +1,48 @@
|
||||
<form [formGroup]="form" (ngSubmit)="submit()">
|
||||
<div formGroupName="recp">
|
||||
<mat-radio-group formControlName="type">
|
||||
<mat-radio-button value="uid">
|
||||
<mat-form-field>
|
||||
<mat-label>Użytkownik</mat-label>
|
||||
<app-user-search formControlName="uid" required/>
|
||||
</mat-form-field>
|
||||
</mat-radio-button>
|
||||
<mat-radio-button value="room">
|
||||
<mat-form-field>
|
||||
<mat-label>Pokój</mat-label>
|
||||
<input matInput type="text" formControlName="room">
|
||||
</mat-form-field>
|
||||
</mat-radio-button>
|
||||
<mat-radio-button value="group" *ngIf="ls.capCheck(8)">
|
||||
<mat-form-field>
|
||||
<mat-label>Grupa</mat-label>
|
||||
<mat-select formControlName="group">
|
||||
<mat-option *ngFor="let item of groups" [value]="item._id">{{item.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
</div>
|
||||
<div formGroupName="recp">
|
||||
<mat-radio-group formControlName="type">
|
||||
<mat-radio-button value="uid">
|
||||
<mat-form-field>
|
||||
<mat-label>Użytkownik</mat-label>
|
||||
<app-user-search formControlName="uid" required/>
|
||||
</mat-form-field>
|
||||
</mat-radio-button>
|
||||
<mat-radio-button value="room">
|
||||
<mat-form-field>
|
||||
<mat-label>Pokój</mat-label>
|
||||
<input matInput type="text" formControlName="room">
|
||||
</mat-form-field>
|
||||
</mat-radio-button>
|
||||
@if (ls.capCheck(8)) {
|
||||
<mat-radio-button value="group">
|
||||
<mat-form-field>
|
||||
<mat-label>Grupa</mat-label>
|
||||
<mat-select formControlName="group">
|
||||
@for (item of groups; track item) {
|
||||
<mat-option [value]="item._id">{{item.name}}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-radio-button>
|
||||
}
|
||||
</mat-radio-group>
|
||||
</div>
|
||||
<mat-form-field>
|
||||
<mat-label>Tytuł</mat-label>
|
||||
<input matInput type="text" formControlName="title">
|
||||
</mat-form-field>
|
||||
<br>
|
||||
<mat-form-field>
|
||||
<mat-label>Tytuł</mat-label>
|
||||
<input matInput type="text" formControlName="title">
|
||||
<mat-label>Zawartość wiadomości</mat-label>
|
||||
<textarea matInput cdkTextareaAutosize formControlName="body"></textarea>
|
||||
</mat-form-field>
|
||||
<br>
|
||||
<mat-form-field>
|
||||
<mat-label>Zawartość wiadomości</mat-label>
|
||||
<textarea matInput cdkTextareaAutosize formControlName="body"></textarea>
|
||||
</mat-form-field>
|
||||
<br>
|
||||
<button mat-fab extended type="submit">
|
||||
<button mat-fab extended type="submit">
|
||||
<mat-icon>send</mat-icon>
|
||||
Wyślij
|
||||
</button>
|
||||
</form>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<p *ngIf="success">Udało się wysłać {{success.sent}} z {{success.possible}} = {{success.sent/success.possible | percent}}</p>
|
||||
@if (success) {
|
||||
<p>Udało się wysłać {{success.sent}} z {{success.possible}} = {{success.sent/success.possible | percent}}</p>
|
||||
}
|
||||
@@ -1,31 +1,41 @@
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>
|
||||
{{item.title}}
|
||||
</mat-card-title>
|
||||
<mat-card-subtitle>{{item.sentDate.format('[Wysłano] dddd DD MMMM YYYYr. o HH:mm')}}</mat-card-subtitle>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<p *ngIf="body">
|
||||
{{body}}
|
||||
</p>
|
||||
<hr>
|
||||
<ul>
|
||||
@for (user of rcpts; track $index) {
|
||||
<li>
|
||||
<span *ngIf="user.room">{{user.room}}: </span>{{user.fname}} {{user.surname}} <span
|
||||
style="color: gray">({{user.uname}})</span>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
<mat-card-header>
|
||||
<mat-card-title-group>
|
||||
<mat-card-title>
|
||||
{{item.title}}
|
||||
</mat-card-title>
|
||||
<mat-card-subtitle>{{item.sentDate.format('[Wysłano] dddd DD MMMM YYYYr. o HH:mm')}}</mat-card-subtitle>
|
||||
</mat-card-title-group>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
@if (body) {
|
||||
<p>
|
||||
{{body}}
|
||||
</p>
|
||||
}
|
||||
<hr>
|
||||
<ul>
|
||||
@for (user of rcpts; track $index) {
|
||||
<li>
|
||||
@if (user.room) {
|
||||
<span>{{user.room}}: </span>
|
||||
}{{user.fname}} {{user.surname}} <span
|
||||
style="color: gray">({{user.uname}})</span>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</mat-card-content>
|
||||
<mat-card-footer>
|
||||
<mat-card-actions>
|
||||
<button mat-stroked-button (click)="getMessage()" *ngIf="!body">Wczytaj treść</button>
|
||||
<button mat-stroked-button (click)="getRcpts()" *ngIf="!rcpts">Wczytaj odbiorców</button>
|
||||
<mat-spinner diameter="32" color="accent" *ngIf="loading"></mat-spinner>
|
||||
</mat-card-actions>
|
||||
<mat-card-actions>
|
||||
@if (!body) {
|
||||
<button mat-stroked-button (click)="getMessage()">Wczytaj treść</button>
|
||||
}
|
||||
@if (!rcpts) {
|
||||
<button mat-stroked-button (click)="getRcpts()">Wczytaj odbiorców</button>
|
||||
}
|
||||
@if (loading) {
|
||||
<mat-spinner diameter="32" color="accent"></mat-spinner>
|
||||
}
|
||||
</mat-card-actions>
|
||||
</mat-card-footer>
|
||||
</mat-card>
|
||||
</mat-card>
|
||||
@@ -1,14 +1,20 @@
|
||||
<mat-toolbar color="accent">
|
||||
<button mat-icon-button (click)="drawer.toggle()"><mat-icon>menu</mat-icon></button>
|
||||
<span>{{title.getTitle()}}</span>
|
||||
<span style="flex: 1 1 auto"></span>
|
||||
<button mat-icon-button *ngIf="toolbar.menu" [matMenuTriggerFor]="menu" (click)="openMenu()"><mat-icon>more_vert</mat-icon></button>
|
||||
<button mat-icon-button (click)="drawer.toggle()"><mat-icon>menu</mat-icon></button>
|
||||
<span>{{title.getTitle()}}</span>
|
||||
<span style="flex: 1 1 auto"></span>
|
||||
@if (toolbar.menu) {
|
||||
<button mat-icon-button [matMenuTriggerFor]="menu" (click)="openMenu()"><mat-icon>more_vert</mat-icon></button>
|
||||
}
|
||||
</mat-toolbar>
|
||||
<mat-menu #menu="matMenu">
|
||||
@for (item of _menu; track $index) {
|
||||
<button mat-menu-item *ngIf="item.check ?? true" (click)="toolbar.comp[item.fn]()">
|
||||
<mat-icon *ngIf="item.icon">{{item.icon}}</mat-icon>
|
||||
<span>{{item.title}}</span>
|
||||
</button>
|
||||
@for (item of _menu; track $index) {
|
||||
@if (item.check ?? true) {
|
||||
<button mat-menu-item (click)="toolbar.comp[item.fn]()">
|
||||
@if (item.icon) {
|
||||
<mat-icon>{{item.icon}}</mat-icon>
|
||||
}
|
||||
<span>{{item.title}}</span>
|
||||
</button>
|
||||
}
|
||||
}
|
||||
</mat-menu>
|
||||
@@ -1,61 +1,95 @@
|
||||
<div id="cards">
|
||||
<mat-spinner *ngIf="loading"></mat-spinner>
|
||||
<mat-card *ngIf="gettitle">
|
||||
<mat-card-header>
|
||||
<mat-card-title>{{gettitle}}</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content></mat-card-content>
|
||||
@if (loading) {
|
||||
<mat-spinner></mat-spinner>
|
||||
}
|
||||
@if (gettitle) {
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>{{gettitle}}</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content></mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card *ngIf="getsn">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Śniadanie</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<ul>
|
||||
<li *ngFor="let i of ls.defaultItems.sn">{{i}}</li>
|
||||
<li *ngFor="let i of getsn.fancy">{{capitalize(i)}}</li>
|
||||
<li *ngIf="getsn.second">{{capitalize(getsn.second)}}</li>
|
||||
</ul>
|
||||
</mat-card-content>
|
||||
}
|
||||
@if (getsn) {
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Śniadanie</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<ul>
|
||||
@for (i of ls.defaultItems.sn; track i) {
|
||||
<li>{{i}}</li>
|
||||
}
|
||||
@for (i of getsn.fancy; track i) {
|
||||
<li>{{capitalize(i)}}</li>
|
||||
}
|
||||
@if (getsn.second) {
|
||||
<li>{{capitalize(getsn.second)}}</li>
|
||||
}
|
||||
</ul>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card *ngIf="getob">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Obiad</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<ul>
|
||||
<li *ngIf="getob.soup">Z: {{getob.soup}}</li>
|
||||
<li *ngIf="getob.vege" style="color: #43A047">V: {{getob.vege}}</li>
|
||||
<li *ngIf="getob.meal">{{getob.meal}}</li>
|
||||
<li *ngFor="let i of getob.condiments">{{i}}</li>
|
||||
<li *ngIf="getob.drink">{{getob.drink}}</li>
|
||||
<li *ngFor="let i of getob.other">{{i}}</li>
|
||||
</ul>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-icon-button (click)="vote('ob', '+')"><mat-icon [color]="menu!.obv == '+' ? 'primary' : null">thumb_up</mat-icon></button>
|
||||
<span *ngIf="menu?.stat?.ob != 'NaN'">{{menu?.stat?.ob}}%</span>
|
||||
<button mat-icon-button (click)="vote('ob', '-')"><mat-icon [color]="menu!.obv == '-' ? 'warn' : null">thumb_down</mat-icon></button>
|
||||
</mat-card-actions>
|
||||
}
|
||||
@if (getob) {
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Obiad</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<ul>
|
||||
@if (getob.soup) {
|
||||
<li>Z: {{getob.soup}}</li>
|
||||
}
|
||||
@if (getob.vege) {
|
||||
<li style="color: #43A047">V: {{getob.vege}}</li>
|
||||
}
|
||||
@if (getob.meal) {
|
||||
<li>{{getob.meal}}</li>
|
||||
}
|
||||
@for (i of getob.condiments; track i) {
|
||||
<li>{{i}}</li>
|
||||
}
|
||||
@if (getob.drink) {
|
||||
<li>{{getob.drink}}</li>
|
||||
}
|
||||
@for (i of getob.other; track i) {
|
||||
<li>{{i}}</li>
|
||||
}
|
||||
</ul>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-icon-button (click)="vote('ob', '+')"><mat-icon [color]="menu!.obv == '+' ? 'primary' : null">thumb_up</mat-icon></button>
|
||||
@if (menu?.stat?.ob != 'NaN') {
|
||||
<span>{{menu?.stat?.ob}}%</span>
|
||||
}
|
||||
<button mat-icon-button (click)="vote('ob', '-')"><mat-icon [color]="menu!.obv == '-' ? 'warn' : null">thumb_down</mat-icon></button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<mat-card *ngIf="getkol">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Kolacja</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<ul [innerHTML]="getkol"></ul>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-icon-button (click)="vote('kol', '+')"><mat-icon [color]="menu!.kolv == '+' ? 'primary' : null">thumb_up</mat-icon></button>
|
||||
<span *ngIf="menu?.stat?.kol != 'NaN'">{{menu?.stat?.kol}}%</span>
|
||||
<button mat-icon-button (click)="vote('kol', '-')"><mat-icon [color]="menu!.kolv == '-' ? 'warn' : null">thumb_down</mat-icon></button>
|
||||
</mat-card-actions>
|
||||
}
|
||||
@if (getkol) {
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Kolacja</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<ul [innerHTML]="getkol"></ul>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-icon-button (click)="vote('kol', '+')"><mat-icon [color]="menu!.kolv == '+' ? 'primary' : null">thumb_up</mat-icon></button>
|
||||
@if (menu?.stat?.kol != 'NaN') {
|
||||
<span>{{menu?.stat?.kol}}%</span>
|
||||
}
|
||||
<button mat-icon-button (click)="vote('kol', '-')"><mat-icon [color]="menu!.kolv == '-' ? 'warn' : null">thumb_down</mat-icon></button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<mat-card *ngIf="!(getkol || getob || getsn || loading || gettitle)">
|
||||
<mat-card-content id="no-data">
|
||||
Brak danych, wybierz inny dzień.
|
||||
</mat-card-content>
|
||||
}
|
||||
@if (!(getkol || getob || getsn || loading || gettitle)) {
|
||||
<mat-card>
|
||||
<mat-card-content id="no-data">
|
||||
Brak danych, wybierz inny dzień.
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<button id="alrg" mat-icon-button (click)="alrg()"><mat-icon color="primary">info</mat-icon></button>
|
||||
}
|
||||
<button id="alrg" mat-icon-button (click)="alrg()"><mat-icon color="primary">info</mat-icon></button>
|
||||
</div>
|
||||
<app-date-selector [(date)]="day" [filter]="filter"></app-date-selector>
|
||||
@@ -1,17 +1,25 @@
|
||||
<mat-spinner *ngIf="loading"></mat-spinner>
|
||||
<mat-card *ngFor="let item of news">
|
||||
@if (loading) {
|
||||
<mat-spinner></mat-spinner>
|
||||
}
|
||||
@for (item of news; track item) {
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-icon *ngIf="item.pinned">push_pin</mat-icon>
|
||||
<mat-card-title>{{item.title}}</mat-card-title>
|
||||
@if (item.pinned) {
|
||||
<mat-icon>push_pin</mat-icon>
|
||||
}
|
||||
<mat-card-title>{{item.title}}</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content [innerHTML]="item.content">
|
||||
</mat-card-content>
|
||||
<mat-card-footer>
|
||||
<p>{{item.date | date:'d-LL-yyyy HH:mm'}}</p>
|
||||
<p>{{item.date | date:'d-LL-yyyy HH:mm'}}</p>
|
||||
</mat-card-footer>
|
||||
</mat-card>
|
||||
<mat-card *ngIf="news.length == 0">
|
||||
</mat-card>
|
||||
}
|
||||
@if (news.length == 0) {
|
||||
<mat-card>
|
||||
<p>
|
||||
Brak wiadomości.
|
||||
Brak wiadomości.
|
||||
</p>
|
||||
</mat-card>
|
||||
</mat-card>
|
||||
}
|
||||
@@ -1,17 +1,21 @@
|
||||
<form [formGroup]="form" (ngSubmit)="changePass()">
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Aktualne hasło</mat-label>
|
||||
<input type="password" matInput formControlName="oldPass">
|
||||
</mat-form-field><br>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Nowe hasło</mat-label>
|
||||
<input type="password" matInput formControlName="newPass">
|
||||
</mat-form-field><br>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Powtórz nowe hasło</mat-label>
|
||||
<input type="password" matInput formControlName="newPassRepeat">
|
||||
<mat-error *ngIf="form.errors?.['noMatch']">Hasła muszą się zgadzać</mat-error>
|
||||
</mat-form-field><br>
|
||||
<button mat-stroked-button>Zmień hasło</button><br>
|
||||
<p *ngIf="error" style="color: red;">{{error}}</p>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Aktualne hasło</mat-label>
|
||||
<input type="password" matInput formControlName="oldPass">
|
||||
</mat-form-field><br>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Nowe hasło</mat-label>
|
||||
<input type="password" matInput formControlName="newPass">
|
||||
</mat-form-field><br>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Powtórz nowe hasło</mat-label>
|
||||
<input type="password" matInput formControlName="newPassRepeat">
|
||||
@if (form.errors?.['noMatch']) {
|
||||
<mat-error>Hasła muszą się zgadzać</mat-error>
|
||||
}
|
||||
</mat-form-field><br>
|
||||
<button mat-stroked-button>Zmień hasło</button><br>
|
||||
@if (error) {
|
||||
<p style="color: red;">{{error}}</p>
|
||||
}
|
||||
</form>
|
||||
@@ -1,18 +1,24 @@
|
||||
<h1 mat-dialog-title>Czystość</h1>
|
||||
<mat-dialog-content>
|
||||
@if (grade) {
|
||||
<h1>Twoja ocena: <span [ngStyle]="gradeColor()">{{grade}}</span></h1>
|
||||
}
|
||||
@else {
|
||||
<h1>Nie oceniono</h1>
|
||||
}
|
||||
<p *ngIf="notes.length > 0">Uwagi:</p>
|
||||
<ul>
|
||||
<li *ngFor="let i of notes">{{i.label}}<span *ngIf="i.weight > 1"> ({{i.weight}})</span></li>
|
||||
</ul>
|
||||
<p>{{tips}}</p>
|
||||
<app-date-selector [(date)]="day" [filter]="filter"/>
|
||||
@if (grade) {
|
||||
<h1>Twoja ocena: <span [ngStyle]="gradeColor()">{{grade}}</span></h1>
|
||||
}
|
||||
@else {
|
||||
<h1>Nie oceniono</h1>
|
||||
}
|
||||
@if (notes.length > 0) {
|
||||
<p>Uwagi:</p>
|
||||
}
|
||||
<ul>
|
||||
@for (i of notes; track i) {
|
||||
<li>{{i.label}}@if (i.weight > 1) {
|
||||
<span> ({{i.weight}})</span>
|
||||
}</li>
|
||||
}
|
||||
</ul>
|
||||
<p>{{tips}}</p>
|
||||
<app-date-selector [(date)]="day" [filter]="filter"/>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-icon-button mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
<button mat-icon-button mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||
</mat-dialog-actions>
|
||||
@@ -1,14 +1,16 @@
|
||||
<h1 mat-dialog-title>Dodatkowe ustawienia</h1>
|
||||
<mat-dialog-content>
|
||||
<mat-action-list>
|
||||
@for (link of LINKS; track link) {
|
||||
<button mat-list-item (click)="open(link.component)">
|
||||
<mat-icon matListItemIcon *ngIf="link.icon">{{link.icon}}</mat-icon>
|
||||
<div matListItemTitle>{{link.title}}</div>
|
||||
</button>
|
||||
<mat-action-list>
|
||||
@for (link of LINKS; track link) {
|
||||
<button mat-list-item (click)="open(link.component)">
|
||||
@if (link.icon) {
|
||||
<mat-icon matListItemIcon>{{link.icon}}</mat-icon>
|
||||
}
|
||||
</mat-action-list>
|
||||
<div matListItemTitle>{{link.title}}</div>
|
||||
</button>
|
||||
}
|
||||
</mat-action-list>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-dialog-close mat-button>Zamknij</button>
|
||||
<button mat-dialog-close mat-button>Zamknij</button>
|
||||
</mat-dialog-actions>
|
||||
@@ -1,42 +1,58 @@
|
||||
<mat-action-list>
|
||||
<button mat-list-item (click)="logout()">
|
||||
<mat-icon matListItemIcon color="primary">logout</mat-icon>
|
||||
<div matListItemTitle>Wyloguj</div>
|
||||
</button>
|
||||
<button mat-list-item (click)="openPassChange()">
|
||||
<mat-icon matListItemIcon color="primary">manage_accounts</mat-icon>
|
||||
<div matListItemTitle>Zmiana hasła</div>
|
||||
</button>
|
||||
<button mat-list-item (click)="checkUpdate()">
|
||||
<div matListItemIcon [ngSwitch]="checking">
|
||||
<mat-spinner diameter="25" *ngSwitchCase="true"></mat-spinner>
|
||||
<mat-icon *ngSwitchCase="false">update</mat-icon>
|
||||
<mat-icon *ngSwitchCase="'err'" color="warn">error</mat-icon>
|
||||
<mat-icon *ngSwitchCase="'aval'">upgrade</mat-icon>
|
||||
</div>
|
||||
<div matListItemTitle>Sprawdź dostępność aktualizacji</div>
|
||||
<div matListItemLine>Aktualna wersja: {{version}}</div>
|
||||
</button>
|
||||
<button mat-list-item (click)="openKey()" *ngIf="ls.capCheck(32)">
|
||||
<mat-icon matListItemIcon>key</mat-icon>
|
||||
<div matListItemTitle>Klucze</div>
|
||||
</button>
|
||||
<button mat-list-item *ngIf="ls.capCheck(16) && ls.hasRoom()" (click)="openClean()">
|
||||
<mat-icon matListItemIcon>cleaning_services</mat-icon>
|
||||
<div matListItemTitle>Oceny za czystość</div>
|
||||
</button>
|
||||
<button mat-list-item (click)="goToAdmin()" *ngIf="ls.admin">
|
||||
<mat-icon matListItemIcon color="accent">admin_panel_settings</mat-icon>
|
||||
<div matListItemTitle>Panel administracyjny</div>
|
||||
<div matListItemLine>Poprzednio Tryb edycji</div>
|
||||
</button>
|
||||
<button mat-list-item (click)="openExtra()">
|
||||
<mat-icon matListItemIcon>settings_applications</mat-icon>
|
||||
<div matListItemTitle>Dodatkowe ustawienia</div>
|
||||
</button>
|
||||
<button mat-list-item (click)="openAbout()">
|
||||
<mat-icon matListItemIcon>info</mat-icon>
|
||||
<div matListItemTitle>O programie</div>
|
||||
<div matListItemLine>Autor, licencja, źródło</div>
|
||||
</button>
|
||||
<button mat-list-item (click)="logout()">
|
||||
<mat-icon matListItemIcon color="primary">logout</mat-icon>
|
||||
<div matListItemTitle>Wyloguj</div>
|
||||
</button>
|
||||
<button mat-list-item (click)="openPassChange()">
|
||||
<mat-icon matListItemIcon color="primary">manage_accounts</mat-icon>
|
||||
<div matListItemTitle>Zmiana hasła</div>
|
||||
</button>
|
||||
<button mat-list-item (click)="checkUpdate()">
|
||||
<div matListItemIcon>
|
||||
@switch (checking) {
|
||||
@case (true) {
|
||||
<mat-spinner diameter="25"></mat-spinner>
|
||||
}
|
||||
@case (false) {
|
||||
<mat-icon>update</mat-icon>
|
||||
}
|
||||
@case ('err') {
|
||||
<mat-icon color="warn">error</mat-icon>
|
||||
}
|
||||
@case ('aval') {
|
||||
<mat-icon>upgrade</mat-icon>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div matListItemTitle>Sprawdź dostępność aktualizacji</div>
|
||||
<div matListItemLine>Aktualna wersja: {{version}}</div>
|
||||
</button>
|
||||
@if (ls.capCheck(32)) {
|
||||
<button mat-list-item (click)="openKey()">
|
||||
<mat-icon matListItemIcon>key</mat-icon>
|
||||
<div matListItemTitle>Klucze</div>
|
||||
</button>
|
||||
}
|
||||
@if (ls.capCheck(16) && ls.hasRoom()) {
|
||||
<button mat-list-item (click)="openClean()">
|
||||
<mat-icon matListItemIcon>cleaning_services</mat-icon>
|
||||
<div matListItemTitle>Oceny za czystość</div>
|
||||
</button>
|
||||
}
|
||||
@if (ls.admin) {
|
||||
<button mat-list-item (click)="goToAdmin()">
|
||||
<mat-icon matListItemIcon color="accent">admin_panel_settings</mat-icon>
|
||||
<div matListItemTitle>Panel administracyjny</div>
|
||||
<div matListItemLine>Poprzednio Tryb edycji</div>
|
||||
</button>
|
||||
}
|
||||
<button mat-list-item (click)="openExtra()">
|
||||
<mat-icon matListItemIcon>settings_applications</mat-icon>
|
||||
<div matListItemTitle>Dodatkowe ustawienia</div>
|
||||
</button>
|
||||
<button mat-list-item (click)="openAbout()">
|
||||
<mat-icon matListItemIcon>info</mat-icon>
|
||||
<div matListItemTitle>O programie</div>
|
||||
<div matListItemLine>Autor, licencja, źródło</div>
|
||||
</button>
|
||||
</mat-action-list>
|
||||
@@ -1,29 +1,43 @@
|
||||
<ul *ngIf="!focused">
|
||||
<li *ngFor="let item of _list">
|
||||
@if (!focused) {
|
||||
<ul>
|
||||
@for (item of _list; track item) {
|
||||
<li>
|
||||
@if (options) {
|
||||
{{idToOption(item)}}
|
||||
{{idToOption(item)}}
|
||||
} @else {
|
||||
{{item}}
|
||||
{{item}}
|
||||
}
|
||||
</li>
|
||||
<li *ngIf="_list.length == 0">[Puste]</li>
|
||||
</ul>
|
||||
<div *ngIf="focused" class="vertical">
|
||||
<button *ngIf="workList.length == 0" (click)="addPos(0)">+</button>
|
||||
</li>
|
||||
}
|
||||
@if (_list.length == 0) {
|
||||
<li>[Puste]</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
@if (focused) {
|
||||
<div class="vertical">
|
||||
@if (workList.length == 0) {
|
||||
<button (click)="addPos(0)">+</button>
|
||||
}
|
||||
<div cdkDropList class="vertical" (cdkDropListDropped)="drop($event)">
|
||||
@for (item of workList; track $index) {
|
||||
<span cdkDrag>
|
||||
<input type="text" [(ngModel)]="workList[$index]" [attr.list]="dataList" (keyup.enter)="addPos($index)" #input>
|
||||
<select *ngIf="dropdown" [(ngModel)]="workList[$index]">
|
||||
<option *ngFor="let option of options" [value]="option.id" [selected]="option.id == item">{{option.text}}</option>
|
||||
</select>
|
||||
<button (click)="remPos($index)">-</button>
|
||||
<button (click)="addPos($index)">+</button>
|
||||
</span>
|
||||
}
|
||||
@for (item of workList; track $index) {
|
||||
<span cdkDrag>
|
||||
<input type="text" [(ngModel)]="workList[$index]" [attr.list]="dataList" (keyup.enter)="addPos($index)" #input>
|
||||
@if (dropdown) {
|
||||
<select [(ngModel)]="workList[$index]">
|
||||
@for (option of options; track option) {
|
||||
<option [value]="option.id" [selected]="option.id == item">{{option.text}}</option>
|
||||
}
|
||||
</select>
|
||||
}
|
||||
<button (click)="remPos($index)">-</button>
|
||||
<button (click)="addPos($index)">+</button>
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
<span>
|
||||
<button (click)="save()">Zapisz</button>
|
||||
<button (click)="cancel()">Anuluj</button>
|
||||
<button (click)="save()">Zapisz</button>
|
||||
<button (click)="cancel()">Anuluj</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,15 +1,19 @@
|
||||
<div role="group" class="app-user-search-container" (focusin)="onFocusIn($event)" (focusout)="onFocusOut($event)">
|
||||
<input type="text" [matAutocomplete]="ac" [formControl]="control" #inputComponent class="input-element">
|
||||
<mat-spinner color="accent" diameter="16" *ngIf="loading" matSuffix></mat-spinner>
|
||||
<mat-autocomplete #ac="matAutocomplete" autoActiveFirstOption (optionSelected)="saveValue($event)" [displayWith]="displayFn">
|
||||
@for (item of list; track $index) {
|
||||
<mat-option [value]="item">
|
||||
@if (item.fname) {
|
||||
{{item.fname}} {{item.surname}} <span *ngIf="item.room" class="room">({{item.room}})</span>
|
||||
} @else {
|
||||
{{item.uname}}
|
||||
}
|
||||
</mat-option>
|
||||
<input type="text" [matAutocomplete]="ac" [formControl]="control" #inputComponent class="input-element">
|
||||
@if (loading) {
|
||||
<mat-spinner color="accent" diameter="16" matSuffix></mat-spinner>
|
||||
}
|
||||
<mat-autocomplete #ac="matAutocomplete" autoActiveFirstOption (optionSelected)="saveValue($event)" [displayWith]="displayFn">
|
||||
@for (item of list; track $index) {
|
||||
<mat-option [value]="item">
|
||||
@if (item.fname) {
|
||||
{{item.fname}} {{item.surname}} @if (item.room) {
|
||||
<span class="room">({{item.room}})</span>
|
||||
}
|
||||
</mat-autocomplete>
|
||||
} @else {
|
||||
{{item.uname}}
|
||||
}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-autocomplete>
|
||||
</div>
|
||||
@@ -1,16 +1,18 @@
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form">
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Login</mat-label>
|
||||
<input type="text" matInput formControlName="uname">
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Hasło</mat-label>
|
||||
<input type="password" matInput formControlName="pass">
|
||||
</mat-form-field>
|
||||
<button mat-stroked-button color="primary" (click)="submit()">Zaloguj</button>
|
||||
<p *ngIf="error" style="color: red;">{{error}}</p>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="form">
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Login</mat-label>
|
||||
<input type="text" matInput formControlName="uname">
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label>Hasło</mat-label>
|
||||
<input type="password" matInput formControlName="pass">
|
||||
</mat-form-field>
|
||||
<button mat-stroked-button color="primary" (click)="submit()">Zaloguj</button>
|
||||
@if (error) {
|
||||
<p style="color: red;">{{error}}</p>
|
||||
}
|
||||
</form>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
@@ -14,7 +14,7 @@
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"experimentalDecorators": true,
|
||||
"moduleResolution": "node",
|
||||
"moduleResolution": "bundler",
|
||||
"importHelpers": true,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
|
||||
Reference in New Issue
Block a user