From b49789e04280dfd16ba130d7b26748e77cbb05de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 22:48:32 +0100 Subject: [PATCH 01/27] ci: fix workflows dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- .github/{ => workflows}/build.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/build.yml (100%) diff --git a/.github/build.yml b/.github/workflows/build.yml similarity index 100% rename from .github/build.yml rename to .github/workflows/build.yml From 57f96a3ebd944ca38411e46860aa08a4877271e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 22:50:32 +0100 Subject: [PATCH 02/27] improve MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91ae0d0..c25a004 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ name: build -on: [push, pull_request] +on: pull_request jobs: build: From 7b863531a84739b1d9feff9d9e3b08cb0b7f8b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 22:53:01 +0100 Subject: [PATCH 03/27] improve MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- .github/workflows/build.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c25a004..d43213a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: build on: pull_request jobs: - build: + build-dotnet: runs-on: ubuntu-latest steps: @@ -16,3 +16,23 @@ jobs: - name: Build with dotnet run: dotnet build Foodie.sln --configuration Release + + build-npm: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Build + run: | + npm install + grunt \ No newline at end of file From 8346a9c20ad8dd970b197164dcdaa4ff4a3e671a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 22:54:16 +0100 Subject: [PATCH 04/27] fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d43213a..7658224 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,6 +26,8 @@ jobs: steps: - uses: actions/checkout@v3 + with: + path: Foodie/ClientApp - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 From 489bd3755f0f4c00212a2dca280f90717ad031e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 22:55:18 +0100 Subject: [PATCH 05/27] fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7658224..b6bdd23 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,8 +26,6 @@ jobs: steps: - uses: actions/checkout@v3 - with: - path: Foodie/ClientApp - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 @@ -36,5 +34,6 @@ jobs: - name: Build run: | + cd Foodie/ClientApp npm install grunt \ No newline at end of file From e438ceea9733fa300051b346aa16e5c843baf9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 22:58:38 +0100 Subject: [PATCH 06/27] fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- .github/workflows/build.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6bdd23..a874f6a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,8 +32,11 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: Build - run: | - cd Foodie/ClientApp - npm install - grunt \ No newline at end of file + - name: Run npm i + run: npm i + + - name: Run test:ci command + run: npm run test:ci + + - name: Run build:ci command + run: npm run build:ci From a121e6ca907d0c70a02216d9583e7441d0138d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 23:00:18 +0100 Subject: [PATCH 07/27] fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a874f6a..f455591 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,9 @@ jobs: build-npm: runs-on: ubuntu-latest - + defaults: + run: + working-directory: ./Foodie/ClientApp strategy: matrix: node-version: [14.x, 16.x, 18.x] From b98722112d3d3d9f9a1ed81f723af02072c3a2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 23:04:08 +0100 Subject: [PATCH 08/27] fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- Foodie/ClientApp/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/Foodie/ClientApp/package.json b/Foodie/ClientApp/package.json index 6b6cae1..b04cc06 100644 --- a/Foodie/ClientApp/package.json +++ b/Foodie/ClientApp/package.json @@ -5,6 +5,7 @@ "ng": "ng", "start": "ng serve", "build": "ng build", + "build:ci": "ng build --prod", "build:ssr": "ng run Foodie:server:dev", "test": "ng test", "lint": "ng lint", From be709e0f52c1fad7a3f3c1eeb12f16bb7cfcfdec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 23:04:23 +0100 Subject: [PATCH 09/27] fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- .github/workflows/build.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f455591..1bd0d9f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: working-directory: ./Foodie/ClientApp strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 @@ -36,9 +36,6 @@ jobs: - name: Run npm i run: npm i - - - name: Run test:ci command - run: npm run test:ci - name: Run build:ci command run: npm run build:ci From c034768614527388ee12500a93c65ab556797991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 23:06:26 +0100 Subject: [PATCH 10/27] fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- .github/workflows/build.yml | 2 +- Foodie/ClientApp/package.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1bd0d9f..08fbb33 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,4 +38,4 @@ jobs: run: npm i - name: Run build:ci command - run: npm run build:ci + run: npm run build diff --git a/Foodie/ClientApp/package.json b/Foodie/ClientApp/package.json index b04cc06..6b6cae1 100644 --- a/Foodie/ClientApp/package.json +++ b/Foodie/ClientApp/package.json @@ -5,7 +5,6 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "build:ci": "ng build --prod", "build:ssr": "ng run Foodie:server:dev", "test": "ng test", "lint": "ng lint", From 451c4da6e0ab89410fca9a8cfc3b352c024e95b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 23:08:12 +0100 Subject: [PATCH 11/27] fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- .github/workflows/build.yml | 6 +++--- Foodie/ClientApp/angular.json | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08fbb33..a511ee5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,8 +34,8 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: Run npm i - run: npm i + - name: Run npm install + run: npm install - - name: Run build:ci command + - name: Run build command run: npm run build diff --git a/Foodie/ClientApp/angular.json b/Foodie/ClientApp/angular.json index fc8b5a8..7e28261 100644 --- a/Foodie/ClientApp/angular.json +++ b/Foodie/ClientApp/angular.json @@ -148,5 +148,4 @@ } } }, - "defaultProject": "Foodie" } \ No newline at end of file From 87b6a61b45d10b645e51a18b6c054ba53dff9fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 23:09:15 +0100 Subject: [PATCH 12/27] fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- Foodie/ClientApp/angular.json | 1 - 1 file changed, 1 deletion(-) diff --git a/Foodie/ClientApp/angular.json b/Foodie/ClientApp/angular.json index 7e28261..6f0877b 100644 --- a/Foodie/ClientApp/angular.json +++ b/Foodie/ClientApp/angular.json @@ -14,7 +14,6 @@ "builder": "@angular-devkit/build-angular:browser", "options": { "progress": true, - "extractCss": true, "outputPath": "dist", "index": "src/index.html", "main": "src/main.ts", From 9cda3f22100dad7dc0d3d509dd1c07826c3ee8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 23:09:55 +0100 Subject: [PATCH 13/27] fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- Foodie/ClientApp/angular.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Foodie/ClientApp/angular.json b/Foodie/ClientApp/angular.json index 6f0877b..d026e6a 100644 --- a/Foodie/ClientApp/angular.json +++ b/Foodie/ClientApp/angular.json @@ -146,5 +146,5 @@ } } } - }, -} \ No newline at end of file + } +} From 390146a568a7f5fb463e2f26e58f1a496b7b790c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 23:17:54 +0100 Subject: [PATCH 14/27] fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- Foodie/ClientApp/src/app/app.module.ts | 5 ----- Foodie/ClientApp/src/app/app.server.module.ts | 3 +-- Foodie/ClientApp/src/app/services/meals.service.ts | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Foodie/ClientApp/src/app/app.module.ts b/Foodie/ClientApp/src/app/app.module.ts index f4fe802..269586c 100644 --- a/Foodie/ClientApp/src/app/app.module.ts +++ b/Foodie/ClientApp/src/app/app.module.ts @@ -96,11 +96,6 @@ export class MyHammerConfig extends HammerGestureConfig { MatSnackBarModule, MatButtonToggleModule ], - entryComponents: [ - IngriedientDialogComponent, - ProductDialogComponent, - MealsCountExceededSnackBarComponent - ], providers: [ { provide: HTTP_INTERCEPTORS, useClass: AuthorizeInterceptor, multi: true }, { provide: HAMMER_GESTURE_CONFIG, useClass: MyHammerConfig, }, diff --git a/Foodie/ClientApp/src/app/app.server.module.ts b/Foodie/ClientApp/src/app/app.server.module.ts index cfb0e02..316380b 100644 --- a/Foodie/ClientApp/src/app/app.server.module.ts +++ b/Foodie/ClientApp/src/app/app.server.module.ts @@ -1,11 +1,10 @@ import { NgModule } from '@angular/core'; import { ServerModule } from '@angular/platform-server'; -import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader'; import { AppComponent } from './app.component'; import { AppModule } from './app.module'; @NgModule({ - imports: [AppModule, ServerModule, ModuleMapLoaderModule], + imports: [AppModule, ServerModule], bootstrap: [AppComponent] }) export class AppServerModule { } diff --git a/Foodie/ClientApp/src/app/services/meals.service.ts b/Foodie/ClientApp/src/app/services/meals.service.ts index 2cc231e..79e90e4 100644 --- a/Foodie/ClientApp/src/app/services/meals.service.ts +++ b/Foodie/ClientApp/src/app/services/meals.service.ts @@ -3,7 +3,6 @@ import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { Meal } from '../models/meal'; import { DatePipe } from '@angular/common'; -import { debug } from 'util'; import { Ingriedient } from '../models/ingiedient'; import { Macro } from '../models/macro'; From d92381f37b42af074e4e254c703b7e7610b8030e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 23:23:31 +0100 Subject: [PATCH 15/27] fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- Foodie/ClientApp/src/app/products/products.component.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Foodie/ClientApp/src/app/products/products.component.css b/Foodie/ClientApp/src/app/products/products.component.css index 0378ea1..56fb144 100644 --- a/Foodie/ClientApp/src/app/products/products.component.css +++ b/Foodie/ClientApp/src/app/products/products.component.css @@ -35,7 +35,7 @@ padding-right: 0; } -.mat-cell:last-of-type() { +.mat-cell:last-of-type { justify-content: end; } From dd96b188b9628af7cde05795991754cb824d6f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 23:34:42 +0100 Subject: [PATCH 16/27] fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- Foodie/ClientApp/src/app/app.module.ts | 2 -- Foodie/ClientApp/src/app/app.server.module.ts | 3 ++- Foodie/ClientApp/src/polyfills.ts | 5 +++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Foodie/ClientApp/src/app/app.module.ts b/Foodie/ClientApp/src/app/app.module.ts index 269586c..4911453 100644 --- a/Foodie/ClientApp/src/app/app.module.ts +++ b/Foodie/ClientApp/src/app/app.module.ts @@ -22,7 +22,6 @@ import { MatAutocompleteModule } from '@angular/material/autocomplete'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatTooltipModule } from '@angular/material/tooltip'; import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { CountoModule } from 'angular2-counto'; import { DataComponent } from './data/data.component'; import * as Hammer from 'hammerjs'; import { StartingComponent } from './starting/starting.component'; @@ -87,7 +86,6 @@ export class MyHammerConfig extends HammerGestureConfig { MatProgressSpinnerModule, MatTooltipModule, MatProgressBarModule, - CountoModule, MatIconModule, MatChipsModule, MatRadioModule, diff --git a/Foodie/ClientApp/src/app/app.server.module.ts b/Foodie/ClientApp/src/app/app.server.module.ts index 316380b..cfb0e02 100644 --- a/Foodie/ClientApp/src/app/app.server.module.ts +++ b/Foodie/ClientApp/src/app/app.server.module.ts @@ -1,10 +1,11 @@ import { NgModule } from '@angular/core'; import { ServerModule } from '@angular/platform-server'; +import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader'; import { AppComponent } from './app.component'; import { AppModule } from './app.module'; @NgModule({ - imports: [AppModule, ServerModule], + imports: [AppModule, ServerModule, ModuleMapLoaderModule], bootstrap: [AppComponent] }) export class AppServerModule { } diff --git a/Foodie/ClientApp/src/polyfills.ts b/Foodie/ClientApp/src/polyfills.ts index aa665d6..899d11e 100644 --- a/Foodie/ClientApp/src/polyfills.ts +++ b/Foodie/ClientApp/src/polyfills.ts @@ -55,8 +55,9 @@ /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - +// import 'zone.js/dist/zone'; // Included with Angular CLI. +import 'zone.js'; +import 'zone.js/testing'; /*************************************************************************************************** * APPLICATION IMPORTS From 227b436a482098a54d2a41ee8ad40670a3ce2425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 23:38:12 +0100 Subject: [PATCH 17/27] fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- Foodie/ClientApp/src/app/app.server.module.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Foodie/ClientApp/src/app/app.server.module.ts b/Foodie/ClientApp/src/app/app.server.module.ts index cfb0e02..316380b 100644 --- a/Foodie/ClientApp/src/app/app.server.module.ts +++ b/Foodie/ClientApp/src/app/app.server.module.ts @@ -1,11 +1,10 @@ import { NgModule } from '@angular/core'; import { ServerModule } from '@angular/platform-server'; -import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader'; import { AppComponent } from './app.component'; import { AppModule } from './app.module'; @NgModule({ - imports: [AppModule, ServerModule, ModuleMapLoaderModule], + imports: [AppModule, ServerModule], bootstrap: [AppComponent] }) export class AppServerModule { } From 22553fcad4b59e15ab853635479b3eb80d3f793c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Choi=C5=84ski?= Date: Fri, 26 Jan 2024 23:43:27 +0100 Subject: [PATCH 18/27] fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Grzegorz Choiński --- .../src/app/meal-calendar/meal-calendar.component.html | 8 ++++---- Foodie/ClientApp/src/app/products/products.component.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Foodie/ClientApp/src/app/meal-calendar/meal-calendar.component.html b/Foodie/ClientApp/src/app/meal-calendar/meal-calendar.component.html index 14a3c2b..c25f9c0 100644 --- a/Foodie/ClientApp/src/app/meal-calendar/meal-calendar.component.html +++ b/Foodie/ClientApp/src/app/meal-calendar/meal-calendar.component.html @@ -116,12 +116,12 @@ - +
- listManage products - add Add new meal + listManage products + add Add new meal
-
+
diff --git a/Foodie/ClientApp/src/app/products/products.component.html b/Foodie/ClientApp/src/app/products/products.component.html index d72f7d7..be1b25a 100644 --- a/Foodie/ClientApp/src/app/products/products.component.html +++ b/Foodie/ClientApp/src/app/products/products.component.html @@ -39,12 +39,12 @@

Products

- +
- calendar_todayManage meals - add Add new product + calendar_todayManage meals + add Add new product
-
+