Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SahilK-027 committed Dec 18, 2024
1 parent c8b950f commit df152b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<span class="stat-badge--currency">
{{ currencySymbol }}
</span>
<ng-container *ngIf="!isSmallScreen && value < 1000000000; else humanize">
<ng-container *ngIf="!isSmallScreen && value > -1000000000 && value < 1000000000; else humanize">
{{ { value: value, currencyCode: currency, skipSymbol: true } | exactCurrency }}
</ng-container>
<ng-template #humanize>
Expand Down
12 changes: 4 additions & 8 deletions src/app/fyle/dashboard/stat-badge/stat-badge.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { ReportStates } from './report-states';

@Component({
selector: 'app-stat-badge',
templateUrl: './stat-badge.component.html',
styleUrls: ['./stat-badge.component.scss'],
})
export class StatBadgeComponent implements OnInit {
export class StatBadgeComponent {
@Input() reportState: ReportStates;

@Input() name: string;
Expand All @@ -25,8 +25,8 @@ export class StatBadgeComponent implements OnInit {

@Output() badgeClicked = new EventEmitter();

// To track if the screen is small (360px or below)
isSmallScreen = false;
// To track if the screen is small (370px or below)
isSmallScreen = window.innerWidth <= 370;

onBadgeClicked(): void {
if (!this.loading) {
Expand All @@ -36,8 +36,4 @@ export class StatBadgeComponent implements OnInit {
}
}
}

ngOnInit(): void {
this.isSmallScreen = window.innerWidth <= 360;
}
}

0 comments on commit df152b0

Please sign in to comment.