From 8ff271136310de01c794c9e9433437549e3f0fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20G=C3=B3reczny?= Date: Mon, 25 Jan 2021 11:50:18 +0100 Subject: [PATCH] fix bugs --- .../game-master-shopkeepers-table.component.ts | 4 ---- .../new-shopkeeper-dialog.component.ts | 4 ++-- .../player-shop/player-shop.component.html | 12 ++++++------ .../components/player-shop/player-shop.component.ts | 1 + 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-shopkeepers-table/game-master-shopkeepers-table.component.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-shopkeepers-table/game-master-shopkeepers-table.component.ts index 17ead8c..abdb887 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-shopkeepers-table/game-master-shopkeepers-table.component.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-shopkeepers-table/game-master-shopkeepers-table.component.ts @@ -47,7 +47,6 @@ export class GameMasterShopkeepersTableComponent implements OnInit { } }, (error: ErrorResponse | HttpErrorResponse) => { - console.error(error); if (error instanceof HttpErrorResponse) { error = error.error as ErrorResponse; } @@ -68,7 +67,6 @@ export class GameMasterShopkeepersTableComponent implements OnInit { this.isAnyAvailable = true; }, (error: ErrorResponse | HttpErrorResponse) => { - console.error(error); if (error instanceof HttpErrorResponse) { error = error.error as ErrorResponse; } @@ -89,7 +87,6 @@ export class GameMasterShopkeepersTableComponent implements OnInit { this.isAnyAvailable = false; }, (error: ErrorResponse | HttpErrorResponse) => { - console.error(error); if (error instanceof HttpErrorResponse) { error = error.error as ErrorResponse; } @@ -114,7 +111,6 @@ export class GameMasterShopkeepersTableComponent implements OnInit { ); }, (error: ErrorResponse | HttpErrorResponse) => { - console.error(error); if (error instanceof HttpErrorResponse) { error = error.error as ErrorResponse; } diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-shopkeepers-table/shopkeeper-dialogs/new-shopkeeper-dialog/new-shopkeeper-dialog.component.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-shopkeepers-table/shopkeeper-dialogs/new-shopkeeper-dialog/new-shopkeeper-dialog.component.ts index 59412fc..967c1be 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-shopkeepers-table/shopkeeper-dialogs/new-shopkeeper-dialog/new-shopkeeper-dialog.component.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/game-master-shopkeepers-table/shopkeeper-dialogs/new-shopkeeper-dialog/new-shopkeeper-dialog.component.ts @@ -104,8 +104,8 @@ export class NewShopkeeperDialogComponent implements OnInit { return { shopkeeperId: null, amount: 1, - armorId: null, - weaponId: e.id, + armorId: e.id, + weaponId: null, itemName: e.name, itemType: 'Armor', }; diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-shop/player-shop.component.html b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-shop/player-shop.component.html index 5f81186..376a238 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-shop/player-shop.component.html +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-shop/player-shop.component.html @@ -13,24 +13,24 @@ Name - + {{row.armor.name}} - + {{row.weapon.name}} - + Type - + Armor - + Weapon - + diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-shop/player-shop.component.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-shop/player-shop.component.ts index f6b76a0..496e3de 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-shop/player-shop.component.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/player-shop/player-shop.component.ts @@ -70,6 +70,7 @@ export class PlayerShopComponent implements OnInit { } BuyItem(weaponId: number, armorId: number) { + debugger; this.store .select((s) => s.playerStore.characterId) .pipe(first())