fix: currency display
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
import { ApplicationConfig, provideBrowserGlobalErrorListeners } from '@angular/core';
|
import { ApplicationConfig, DEFAULT_CURRENCY_CODE, provideBrowserGlobalErrorListeners } from '@angular/core';
|
||||||
import { provideRouter } from '@angular/router';
|
import { provideRouter } from '@angular/router';
|
||||||
|
|
||||||
import { routes } from './app.routes';
|
import { routes } from './app.routes';
|
||||||
|
import { DATE_PIPE_DEFAULT_OPTIONS } from '@angular/common';
|
||||||
|
|
||||||
export const appConfig: ApplicationConfig = {
|
export const appConfig: ApplicationConfig = {
|
||||||
providers: [
|
providers: [
|
||||||
provideBrowserGlobalErrorListeners(),
|
provideBrowserGlobalErrorListeners(),
|
||||||
provideRouter(routes)
|
provideRouter(routes),
|
||||||
|
{provide: DEFAULT_CURRENCY_CODE, useValue: ''},
|
||||||
|
{provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {dateFormat: 'shortDate'}},
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,7 +7,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<h3 class="mb-1">{{ username }}</h3>
|
<h3 class="mb-1">{{ username }}</h3>
|
||||||
<p class="text-muted mb-4">{{ userID }}</p>
|
<p class="text-muted mb-4">{{ userID }}</p>
|
||||||
<button class="btn btn-outline-primary">Edit Profile</button>
|
<div class="d-flex align-items-center justify-content-center gap-2 mb-1">
|
||||||
|
<i class="bi bi-wallet2 fs-4"></i>
|
||||||
|
<h3 class="mb-0">{{ balance | currency}}</h3>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import Transaction from '@model/transaction';
|
|||||||
export class ScreenProfile implements OnInit{
|
export class ScreenProfile implements OnInit{
|
||||||
username = 'John Doe';
|
username = 'John Doe';
|
||||||
userID = 'testuser';
|
userID = 'testuser';
|
||||||
|
balance = 200;
|
||||||
transactions!: Transaction[];
|
transactions!: Transaction[];
|
||||||
|
|
||||||
constructor(private api: APIService){}
|
constructor(private api: APIService){}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<div class="text-center mb-4">
|
<div class="text-center mb-4">
|
||||||
<label class="form-label h5">Amount</label>
|
<label class="form-label h5">Amount</label>
|
||||||
<div class="input-group input-group-lg mb-3">
|
<div class="input-group input-group-lg mb-3">
|
||||||
<span class="input-group-text">$</span>
|
<span class="input-group-text"><i class="bi bi-wallet2"></i></span>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
class="form-control text-center fs-2"
|
class="form-control text-center fs-2"
|
||||||
|
|||||||
Reference in New Issue
Block a user