fix bugs
This commit is contained in:
parent
55a77aec8c
commit
8ff2711363
@ -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;
|
||||
}
|
||||
|
@ -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',
|
||||
};
|
||||
|
@ -13,24 +13,24 @@
|
||||
<ng-container matColumnDef="itemName" >
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header > Name </th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span *ngIf="row.armor != null; else weaponNameBlock" >
|
||||
<span *ngIf="row.armor != null" >
|
||||
{{row.armor.name}}
|
||||
</span>
|
||||
<ng-template #weaponNameBlock >
|
||||
<span *ngIf="row.weapon != null" >
|
||||
{{row.weapon.name}}
|
||||
</ng-template>
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="itemType">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Type </th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span *ngIf="row.armor != null; else weaponTypeBlock" >
|
||||
<span *ngIf="row.armorId !== null" >
|
||||
Armor
|
||||
</span>
|
||||
<ng-template #weaponTypeBlock >
|
||||
<span *ngIf="row.weaponId !== null" >
|
||||
Weapon
|
||||
</ng-template>
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
@ -70,6 +70,7 @@ export class PlayerShopComponent implements OnInit {
|
||||
}
|
||||
|
||||
BuyItem(weaponId: number, armorId: number) {
|
||||
debugger;
|
||||
this.store
|
||||
.select((s) => s.playerStore.characterId)
|
||||
.pipe(first())
|
||||
|
Loading…
Reference in New Issue
Block a user