Skip to content

Commit

Permalink
fix: display of unlimited budget (phone view) (#950)
Browse files Browse the repository at this point in the history
  • Loading branch information
SGrueber committed Dec 21, 2021
1 parent 9689f54 commit 97dc386
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<div *ngIf="budget">
<dl class="row dl-horizontal dl-separator">
<dt class="col-7">{{ 'account.user.new.order_spend_limit.label' | translate }}</dt>
<dd *ngIf="budget.orderSpentLimit; else noLimit" class="col-5 column-price font-weight-bold text-right">
<dd *ngIf="budget.orderSpentLimit; else noLimit" class="col-5 font-weight-bold text-right">
{{ budget.orderSpentLimit | ishPrice }}
</dd>
<ng-template #noLimit>
<dd class="col-5 column-price font-weight-bold text-right">{{ 'account.budget.unlimited' | translate }}</dd>
<dd class="col-5 font-weight-bold text-right">{{ 'account.budget.unlimited' | translate }}</dd>
</ng-template>
</dl>

<ng-container *ngIf="budget.budget; else noBudget">
<dl class="row dl-horizontal dl-separator">
<dt class="col-7">{{ 'account.budget.label' | translate: { '0': budget.budgetPeriod } }}</dt>
<dd class="col-5 column-price font-weight-bold text-right">{{ budget.budget | ishPrice }}</dd>
<dd class="col-5 font-weight-bold text-right">{{ budget.budget | ishPrice }}</dd>
</dl>
<dl class="row dl-horizontal dl-separator">
<dt class="col-7">{{ 'account.budget.already_spent.label' | translate }}</dt>
<dd class="col-5 column-price font-weight-bold text-right">{{ usedBudget | ishPrice }}</dd>
<dd class="col-5 font-weight-bold text-right">{{ usedBudget | ishPrice }}</dd>
</dl>
<div [ngbPopover]="BudgetPopover" placement="top" data-testing-id="user-budget-popover">
<div class="progress" [ngClass]="progressBarClass">
Expand Down Expand Up @@ -57,7 +57,7 @@

<ng-template #noBudget>
<dl class="row dl-horizontal dl-separator">
<dt class="col-12 col-sm-7">{{ 'account.user.budget.label' | translate }}</dt>
<dd class="col-5 column-price font-weight-bold">{{ 'account.budget.unlimited' | translate }}</dd>
<dt class="col-7">{{ 'account.user.budget.label' | translate }}</dt>
<dd class="col-5 font-weight-bold text-right">{{ 'account.budget.unlimited' | translate }}</dd>
</dl>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ describe('User Budget Component', () => {
<div>
<dl class="row dl-horizontal dl-separator">
<dt class="col-7">account.user.new.order_spend_limit.label</dt>
<dd class="col-5 column-price font-weight-bold text-right">USD 100</dd>
<dd class="col-5 font-weight-bold text-right">USD 100</dd>
</dl>
<dl class="row dl-horizontal dl-separator">
<dt class="col-7">account.budget.label</dt>
<dd class="col-5 column-price font-weight-bold text-right">USD 5000</dd>
<dd class="col-5 font-weight-bold text-right">USD 5000</dd>
</dl>
<dl class="row dl-horizontal dl-separator">
<dt class="col-7">account.budget.already_spent.label</dt>
<dd class="col-5 column-price font-weight-bold text-right">USD 2500</dd>
<dd class="col-5 font-weight-bold text-right">USD 2500</dd>
</dl>
<div data-testing-id="user-budget-popover" placement="top" ng-reflect-placement="top">
<div class="progress">
Expand Down

1 comment on commit 97dc386

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Azure Demo Servers are available:

Please sign in to comment.