diff --git a/.eslintrc.json b/.eslintrc.json index 98f0163c..dff05a97 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -32,6 +32,7 @@ "allowArgumentsExplicitlyTypedAsAny": true } ], + "@typescript-eslint/restrict-template-expressions": "off", "@typescript-eslint/consistent-type-definitions": "off", "@typescript-eslint/no-explicit-any": "warn", "@typescript-eslint/ban-ts-comment": "warn", @@ -44,6 +45,7 @@ "@typescript-eslint/unbound-method": "off", "@typescript-eslint/no-extraneous-class": "off", "@typescript-eslint/no-non-null-assertion": "off", + "@angular-eslint/prefer-standalone": "off", "@angular-eslint/sort-ngmodule-metadata-arrays": "error", "@angular-eslint/component-class-suffix": "off", "@angular-eslint/use-component-selector": "off", diff --git a/src/app/_shared/form.ts b/src/app/_shared/form.ts index 24027042..2476e80a 100644 --- a/src/app/_shared/form.ts +++ b/src/app/_shared/form.ts @@ -62,7 +62,7 @@ export function injectOnSubmit { - if (continuousCreation && continuousCreation.enabled()) { + if (continuousCreation?.enabled()) { continuousCreation.patch(dto); } else { if (method === 'CREATE' && openOnCreate) { diff --git a/src/app/_shared/notifications/toasts-container.component.ts b/src/app/_shared/notifications/toasts-container.component.ts index 7ebdb312..3ed312af 100644 --- a/src/app/_shared/notifications/toasts-container.component.ts +++ b/src/app/_shared/notifications/toasts-container.component.ts @@ -23,7 +23,15 @@ import {NotificationService, Toast} from './notification.service'; } `, - styles: [':host { position: fixed; bottom: 25px; right: 0; margin: 0.5em; z-index: 1200;}'], + styles: ` + :host { + position: fixed; + bottom: 25px; + right: 0; + margin: 0.5em; + z-index: 1200; + } + `, selector: 'app-toasts', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, NgbToast, AsyncPipe], diff --git a/src/app/_shared/params.ts b/src/app/_shared/params.ts index d06a5d6a..d323fa7a 100644 --- a/src/app/_shared/params.ts +++ b/src/app/_shared/params.ts @@ -13,7 +13,7 @@ export function p_add( } } } else { - params = params.append(name, `${newParams}`); + params = params.append(name, newParams); } } return params; diff --git a/src/app/_shared/ui/app-download-btn-list.component.ts b/src/app/_shared/ui/app-download-btn-list.component.ts index e54e6e45..e58e66a5 100644 --- a/src/app/_shared/ui/app-download-btn-list.component.ts +++ b/src/app/_shared/ui/app-download-btn-list.component.ts @@ -66,21 +66,19 @@ export interface appDownload { } `, - styles: [ - ` - .customLogo img:last-child { - display: none; - } + styles: ` + .customLogo img:last-child { + display: none; + } - .customLogo:hover img:last-child { - display: inline-block; - } + .customLogo:hover img:last-child { + display: inline-block; + } - .customLogo:hover img:first-child { - display: none; - } - `, - ], + .customLogo:hover img:first-child { + display: none; + } + `, selector: 'app-download-btn-list', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, diff --git a/src/app/_shared/ui/footer/footer.component.ts b/src/app/_shared/ui/footer/footer.component.ts index 4d62da38..fe73ba36 100644 --- a/src/app/_shared/ui/footer/footer.component.ts +++ b/src/app/_shared/ui/footer/footer.component.ts @@ -82,45 +82,43 @@ import {injectWindow} from 'dfx-helper'; `, - styles: [ - ` - .heart { - color: red; - margin-top: -5px; - } + styles: ` + .heart { + color: red; + margin-top: -5px; + } - .heart:hover { - transform: scale(1.4); - } + .heart:hover { + transform: scale(1.4); + } - .name:hover { - cursor: pointer; - position: relative; - font-weight: 500; - } - .name:hover:after { - transform: scale(0.3); - width: 128px; - height: 128px; - display: block; - position: absolute; - left: -90px; - top: -196px; /* change this value to one that suits you */ - } + .name:hover { + cursor: pointer; + position: relative; + font-weight: 500; + } + .name:hover:after { + transform: scale(0.3); + width: 128px; + height: 128px; + display: block; + position: absolute; + left: -90px; + top: -196px; /* change this value to one that suits you */ + } - .dominik:hover:after { - content: url('/assets/people/dominik.png'); - } + .dominik:hover:after { + content: url('/assets/people/dominik.png'); + } - .alex:hover:after { - content: url('/assets/people/alex.png'); - } + .alex:hover:after { + content: url('/assets/people/alex.png'); + } - .fabian:hover:after { - content: url('/assets/people/fabian.png'); - } - `, - ], + .fabian:hover:after { + content: url('/assets/people/fabian.png'); + } + `, selector: 'app-footer', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, diff --git a/src/app/_shared/ui/loading/app-spinner-row.component.ts b/src/app/_shared/ui/loading/app-spinner-row.component.ts index 721ee557..359f7810 100644 --- a/src/app/_shared/ui/loading/app-spinner-row.component.ts +++ b/src/app/_shared/ui/loading/app-spinner-row.component.ts @@ -8,17 +8,15 @@ import {booleanAttribute, ChangeDetectionStrategy, Component, Input} from '@angu } `, - styles: [ - ` - .b-spinner-row { - display: flex; - align-items: center; - justify-content: center; - margin-top: 30px; - margin-bottom: 30px; - } - `, - ], + styles: ` + .b-spinner-row { + display: flex; + align-items: center; + justify-content: center; + margin-top: 30px; + margin-bottom: 30px; + } + `, selector: 'app-spinner-row', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/home/_admin/dead-letters/dead-letter-view.component.ts b/src/app/home/_admin/dead-letters/dead-letter-view.component.ts index f7fa908d..81a0d757 100644 --- a/src/app/home/_admin/dead-letters/dead-letter-view.component.ts +++ b/src/app/home/_admin/dead-letters/dead-letter-view.component.ts @@ -47,18 +47,16 @@ import {DeadLettersService} from './dead-letters.service'; } `, - styles: [ - ` - .json-box { - padding: 15px; - background-color: black; - border-radius: 5px; - } - #json-data { - margin-bottom: 0; - } - `, - ], + styles: ` + .json-box { + padding: 15px; + background-color: black; + border-radius: 5px; + } + #json-data { + margin-bottom: 0; + } + `, selector: 'app-dead-letter-view', imports: [TranslocoPipe, BiComponent, ScrollableToolbarComponent, AppBackButtonComponent, AppSpinnerRowComponent, DatePipe], standalone: true, diff --git a/src/app/home/_admin/tmp-notifications/tmp-notification-view.component.ts b/src/app/home/_admin/tmp-notifications/tmp-notification-view.component.ts index 73cfe432..d2a13e70 100644 --- a/src/app/home/_admin/tmp-notifications/tmp-notification-view.component.ts +++ b/src/app/home/_admin/tmp-notifications/tmp-notification-view.component.ts @@ -98,48 +98,46 @@ import {TmpNotificationsService} from './tmp-notifications.service'; } `, - styles: [ - ` - .json-box { - padding: 15px; - background-color: black; - border-radius: 5px; - } - .json-data { - margin-bottom: 0; - white-space: pre-wrap; - word-wrap: break-word; /* Allows words to break and wrap */ - } - - /** Style email **/ - .container { - display: flex; - flex-direction: column; - gap: 0.75rem; - margin-top: -100px; - max-width: unset; - line-height: unset; - } - - .container > ul { - display: flex; - flex-direction: column; - gap: 0.25rem; - } - - .logo-row { - display: flex; - justify-content: center; - align-items: center; - gap: 1rem; - } - - .logo { - max-width: 96px; - height: auto; - } - `, - ], + styles: ` + .json-box { + padding: 15px; + background-color: black; + border-radius: 5px; + } + .json-data { + margin-bottom: 0; + white-space: pre-wrap; + word-wrap: break-word; /* Allows words to break and wrap */ + } + + /** Style email **/ + .container { + display: flex; + flex-direction: column; + gap: 0.75rem; + margin-top: -100px; + max-width: unset; + line-height: unset; + } + + .container > ul { + display: flex; + flex-direction: column; + gap: 0.25rem; + } + + .logo-row { + display: flex; + justify-content: center; + align-items: center; + gap: 1rem; + } + + .logo { + max-width: 96px; + height: auto; + } + `, selector: 'app-tmp-notification-view', imports: [ TranslocoPipe, diff --git a/src/app/home/_layout/home.layout.html b/src/app/home/_layout/home.layout.html index 69c638c3..45044797 100644 --- a/src/app/home/_layout/home.layout.html +++ b/src/app/home/_layout/home.layout.html @@ -220,7 +220,7 @@
{{ 'NAV_USER_SETTINGS_WELCOME' | transloco }} {{ user.firstname }},
{{ 'NAV_USER_SESSIONS' | transloco }} - diff --git a/src/app/home/_shared/components/color/color-picker.component.ts b/src/app/home/_shared/components/color/color-picker.component.ts index bbd00629..a8cde034 100644 --- a/src/app/home/_shared/components/color/color-picker.component.ts +++ b/src/app/home/_shared/components/color/color-picker.component.ts @@ -53,15 +53,13 @@ import {AppIsLightColorPipe} from './app-is-light-color.pipe'; `, - styles: [ - ` - .color-btn { - border: none; - width: 33px; - height: 33px; - } - `, - ], + styles: ` + .color-btn { + border: none; + width: 33px; + height: 33px; + } + `, standalone: true, selector: 'app-color-picker', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/home/_shared/components/navbar-scrollable/app-navbar-scrollable.component.ts b/src/app/home/_shared/components/navbar-scrollable/app-navbar-scrollable.component.ts index 9a93ba10..efcce6d3 100644 --- a/src/app/home/_shared/components/navbar-scrollable/app-navbar-scrollable.component.ts +++ b/src/app/home/_shared/components/navbar-scrollable/app-navbar-scrollable.component.ts @@ -29,7 +29,7 @@ import {ScrollableToolbarComponent} from '../scrollable-toolbar.component'; ], changeDetection: ChangeDetectionStrategy.OnPush, templateUrl: './app-navbar-scrollable.component.html', - styleUrls: ['./app-navbar-scrollable.component.css'], + styleUrl: './app-navbar-scrollable.component.css', }) export class AppNavbarScrollableComponent implements AfterViewInit { @Input({transform: booleanAttribute}) isMobile = false; diff --git a/src/app/home/_shared/components/scrollable-toolbar.component.ts b/src/app/home/_shared/components/scrollable-toolbar.component.ts index 71f55a60..dde2f356 100644 --- a/src/app/home/_shared/components/scrollable-toolbar.component.ts +++ b/src/app/home/_shared/components/scrollable-toolbar.component.ts @@ -10,29 +10,27 @@ import {AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, ViewChild `, - styles: [ - ` - #overflow-container { - scroll-snap-type: y mandatory; - scroll-behavior: smooth; - } + styles: ` + #overflow-container { + scroll-snap-type: y mandatory; + scroll-behavior: smooth; + } - .overflow-auto::-webkit-scrollbar { - display: none; - } + .overflow-auto::-webkit-scrollbar { + display: none; + } - /* Hide scrollbar for IE, Edge and Firefox */ - .overflow-auto { - -ms-overflow-style: none; /* IE and Edge */ - scrollbar-width: none; /* Firefox */ - } + /* Hide scrollbar for IE, Edge and Firefox */ + .overflow-auto { + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ + } - :host(scrollable-toolbar)::ng-deep.btn { - word-break: keep-all; - white-space: nowrap; - } - `, - ], + :host(scrollable-toolbar)::ng-deep.btn { + word-break: keep-all; + white-space: nowrap; + } + `, selector: 'scrollable-toolbar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/home/bills/_components/app-bill-products-list-table.component.ts b/src/app/home/bills/_components/app-bill-products-list-table.component.ts index 1a31a0a3..da357273 100644 --- a/src/app/home/bills/_components/app-bill-products-list-table.component.ts +++ b/src/app/home/bills/_components/app-bill-products-list-table.component.ts @@ -45,13 +45,11 @@ import {DfxCurrencyCentPipe} from 'dfx-helper'; `, - styles: [ - ` + styles: ` tr.cdk-footer-row td { font-weight: bold; } `, - ], standalone: true, selector: 'app-bill-products-list-table', imports: [DfxSortModule, DfxTableModule, TranslocoPipe, RouterLink, NgbTooltip, DfxCurrencyCentPipe], diff --git a/src/app/home/orders/_components/app-order-product-state-badge.component.ts b/src/app/home/orders/_components/app-order-product-state-badge.component.ts index 9be4008a..8be73eda 100644 --- a/src/app/home/orders/_components/app-order-product-state-badge.component.ts +++ b/src/app/home/orders/_components/app-order-product-state-badge.component.ts @@ -43,33 +43,31 @@ import {BiComponent} from 'dfx-bootstrap-icons'; } `, - styles: [ - ` - .circle { - width: 10px; - height: 10px; - border-radius: 50%; - box-shadow: 0px 0px 1px 1px #0000001a; - } + styles: ` + .circle { + width: 10px; + height: 10px; + border-radius: 50%; + box-shadow: 0px 0px 1px 1px #0000001a; + } - .pulse { - animation: pulse-animation 2s infinite; - } + .pulse { + animation: pulse-animation 2s infinite; + } - .green { - background: #66ff99; - } + .green { + background: #66ff99; + } - @keyframes pulse-animation { - 0% { - box-shadow: 0 0 0 0px rgba(0, 0, 0, 0.3); - } - 100% { - box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); - } + @keyframes pulse-animation { + 0% { + box-shadow: 0 0 0 0px rgba(0, 0, 0, 0.3); + } + 100% { + box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); } - `, - ], + } + `, standalone: true, selector: 'app-order-product-state-badge', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/home/orders/_components/app-order-state-badge.component.ts b/src/app/home/orders/_components/app-order-state-badge.component.ts index 8d37a09a..077da51d 100644 --- a/src/app/home/orders/_components/app-order-state-badge.component.ts +++ b/src/app/home/orders/_components/app-order-state-badge.component.ts @@ -50,33 +50,31 @@ import {BiComponent} from 'dfx-bootstrap-icons';
Gedruckte Produkte: {{ printedProducts }} von {{ allProducts }}
`, - styles: [ - ` - .circle { - width: 15px; - height: 15px; - border-radius: 50%; - box-shadow: 0 0 1px 1px #0000001a; - } + styles: ` + .circle { + width: 15px; + height: 15px; + border-radius: 50%; + box-shadow: 0 0 1px 1px #0000001a; + } - .pulse { - animation: pulse-animation 2s infinite; - } + .pulse { + animation: pulse-animation 2s infinite; + } - .green { - background: #66ff99; - } + .green { + background: #66ff99; + } - @keyframes pulse-animation { - 0% { - box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.3); - } - 100% { - box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); - } + @keyframes pulse-animation { + 0% { + box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.3); + } + 100% { + box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); } - `, - ], + } + `, standalone: true, selector: 'app-order-state-badge', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/home/qr-code.component.ts b/src/app/home/qr-code.component.ts index e5ac8d9d..2094ddf4 100644 --- a/src/app/home/qr-code.component.ts +++ b/src/app/home/qr-code.component.ts @@ -67,21 +67,19 @@ import {QrCodeService} from './_shared/services/qr-code.service'; } `, - styles: [ - ` - .my-container { - padding-top: 5rem; - } + styles: ` + .my-container { + padding-top: 5rem; + } - .qrcode-rounded { - border-radius: 15px; - border-width: 5px; - background-color: #f6f6f6; - padding: 15px; - filter: brightness(125%); - } - `, - ], + .qrcode-rounded { + border-radius: 15px; + border-width: 5px; + background-color: #f6f6f6; + padding: 15px; + filter: brightness(125%); + } + `, selector: 'app-qr-code', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/home/statistics/components/count-card.component.ts b/src/app/home/statistics/components/count-card.component.ts index f7fcfd0b..8023adb1 100644 --- a/src/app/home/statistics/components/count-card.component.ts +++ b/src/app/home/statistics/components/count-card.component.ts @@ -20,13 +20,11 @@ import {injectBlurSetting} from '@home-shared/services/blur-setting.service'; `, - styles: [ - ` - .heading { - font-size: 2.8rem; - } - `, - ], + styles: ` + .heading { + font-size: 2.8rem; + } + `, selector: 'app-statistics-count-card', changeDetection: ChangeDetectionStrategy.OnPush, }) diff --git a/src/app/home/statistics/components/sum/sum-statistics.component.ts b/src/app/home/statistics/components/sum/sum-statistics.component.ts index 002b66ed..e8282f6f 100644 --- a/src/app/home/statistics/components/sum/sum-statistics.component.ts +++ b/src/app/home/statistics/components/sum/sum-statistics.component.ts @@ -5,7 +5,7 @@ import {StatisticsSumResponse} from '@shared/waiterrobot-backend'; @Component({ selector: 'app-sum-statistics', templateUrl: './sum-statistics.component.html', - styleUrls: ['./sum-statistics.component.scss'], + styleUrl: './sum-statistics.component.scss', changeDetection: ChangeDetectionStrategy.OnPush, }) export class SumStatisticsComponent { diff --git a/src/app/home/tables/tables-print-qr-codes.modal.ts b/src/app/home/tables/tables-print-qr-codes.modal.ts index 51284569..92c74a9e 100644 --- a/src/app/home/tables/tables-print-qr-codes.modal.ts +++ b/src/app/home/tables/tables-print-qr-codes.modal.ts @@ -76,8 +76,7 @@ import {jsPDF} from 'jspdf'; `, - styles: [ - ` + styles: ` .main { background-color: #ffffff; } @@ -93,7 +92,6 @@ import {jsPDF} from 'jspdf'; font-size: 40px; } `, - ], selector: 'app-print-table-qr-codes-modal', standalone: true, imports: [NgbProgressbarModule, QRCodeComponent, ScrollableToolbarComponent, BiComponent, NgbDropdownModule, AsyncPipe, TranslocoPipe], diff --git a/src/app/maxi/maxi.layout.ts b/src/app/maxi/maxi.layout.ts index 3655f976..2534e5cd 100644 --- a/src/app/maxi/maxi.layout.ts +++ b/src/app/maxi/maxi.layout.ts @@ -34,16 +34,14 @@ import {BiComponent} from 'dfx-bootstrap-icons'; `, - styles: [ - ` - .theme-switcher { - z-index: 1000; - right: 20px; - bottom: 40px; - position: fixed; - } - `, - ], + styles: ` + .theme-switcher { + z-index: 1000; + right: 20px; + bottom: 40px; + position: fixed; + } + `, selector: 'app-outside-layout', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgbDropdown, NgbDropdownMenu, NgbDropdownItem, NgbDropdownToggle, NgbDropdownButtonItem, RouterOutlet, BiComponent], diff --git a/src/app/outside/outside.layout.ts b/src/app/outside/outside.layout.ts index db2bbdc1..660eb8e2 100644 --- a/src/app/outside/outside.layout.ts +++ b/src/app/outside/outside.layout.ts @@ -44,23 +44,21 @@ import {AppLogoWithTextComponent} from './_shared/app-logo-with-text.component'; `, - styles: [ - ` - .d-container { - min-height: 95%; - background-color: var(--bs-body-bg); - padding-top: 6%; - padding-bottom: 6%; - } + styles: ` + .d-container { + min-height: 95%; + background-color: var(--bs-body-bg); + padding-top: 6%; + padding-bottom: 6%; + } - .theme-switcher { - z-index: 1000; - right: 20px; - bottom: 40px; - position: fixed; - } - `, - ], + .theme-switcher { + z-index: 1000; + right: 20px; + bottom: 40px; + position: fixed; + } + `, selector: 'app-outside-layout', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ diff --git a/src/main.ts b/src/main.ts index d11c4a8b..fe72882e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -96,7 +96,7 @@ bootstrapApplication(AppComponent, { }), ), ], -}).catch((err) => { +}).catch((err: unknown) => { console.error(err); });