diff --git a/src/components/PlayerCareerPitchingTable.vue b/src/components/PlayerCareerPitchingTable.vue index fd71bab..4e6c135 100644 --- a/src/components/PlayerCareerPitchingTable.vue +++ b/src/components/PlayerCareerPitchingTable.vue @@ -28,6 +28,7 @@ WP IR IRS + IRS% WHIP H/9 HR/9 @@ -37,7 +38,7 @@ - + S{{ stat.seasonNumber }}{{ stat.isRegularSeason ? '' : ' / Playoffs' }} {{ stat.win }} {{ stat.loss }} @@ -60,6 +61,7 @@ {{ stat.wp }} {{ stat.ir }} {{ stat.ir_sc }} + {{ formatIRSPercentage(stat) }} {{ stat.whip.toFixed(2) }} {{ hitsPer9(stat) }} {{ hrsPer9(stat) }} @@ -69,7 +71,7 @@ - + Career{{ idx > 0 ? ' / Playoffs' : '' }} {{ stat.win }} {{ stat.loss }} @@ -92,6 +94,7 @@ {{ stat.wp }} {{ stat.ir }} {{ stat.ir_sc }} + {{ formatIRSPercentage(stat) }} {{ stat.whip.toFixed(2) }} {{ hitsPer9(stat) }} {{ hrsPer9(stat) }} @@ -116,7 +119,7 @@ interface PitchingStatWithSeason extends PitchingStat { } export default { - name: "PlayerCareerPitchingTable", + name: 'PlayerCareerPitchingTable', props: { regularSeasonPitchingStats: { type: Array, required: true }, postSeasonPitchingStats: { type: Array, required: true }, @@ -191,6 +194,11 @@ export default { }, hrsPer9(stat: PitchingStat): string { return hrsPer9(stat) + }, + formatIRSPercentage(stat: PitchingStat): string { + if (stat.ir === 0) return '-' + + return `${(stat.ir_sc_pct * 100).toFixed(1)}%` } } }