Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: physical card status color AB#28503 #5375

Merged
merged 6 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/pages/PhysicalCardOverview/PhysicalCardOverview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PhysicalCardOverview {
this.debitCardPaTable = this.page.getByTestId(
'physical-cards-overview-title',
);
this.debitCardStatus = this.page.getByTestId('card-status-chip');
this.debitCardStatus = this.page.getByTestId('physical-card-status-badge');
}

async validateDebitCardStatus(cardOverviewTitle: string, status: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,14 @@
<ion-label class="card-key-value">
{{ 'registration-details.physical-cards-overview.status' | translate }}:
</ion-label>
<ion-label class="ion-text-end">
<ion-chip
class="physical-card-status-chip"
[ngClass]="
'physical-card-status-chip-' +
card?.status.replace(' ', '-').toLowerCase()
"
>
{{ card?.status }}
</ion-chip>
</ion-label>
<span
class="badge"
[ngClass]="
'physical-card-status-' + card?.status.replace(' ', '-').toLowerCase()
"
>
{{ card?.status }}
</span>
</ion-item>

<!-- Explanation -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
font-size: 14px !important;
}

ion-chip {
pointer-events: none;
}

.physical-card-explanation {
white-space: normal;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,22 @@
[detail-icon]="'card'"
(click)="openCardDetails(card)"
>
<ion-label class="card">
<ion-label
class="physical-card-number util--half-margin-end"
[title]="card.tokenCode"
>
<code>{{ card.tokenCode }}</code>
</ion-label>
<ion-label
data-testid="card-status-chip"
class="ion-text-right"
><ion-chip
class="physical-card-status-chip"
[ngClass]="
'physical-card-status-chip-' +
card.status.replace(' ', '-').toLowerCase()
"
>{{ card.status }}</ion-chip
></ion-label
<span
data-testid="physical-card-status-badge"
class="badge"
[ngClass]="
'physical-card-status-' +
card.status.replace(' ', '-').toLowerCase()
"
>
{{ card.status }}
</span>
</ion-item>
</ion-list>
</ion-card-content>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.card {
font-size: 14px;
.physical-card-number {
font-size: 0.875rem;
overflow: visible;
overflow-wrap: anywhere;
}
35 changes: 0 additions & 35 deletions interfaces/Portal/src/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -271,41 +271,6 @@ ion-button {
color: var(--ion-color-fiveten-red-700);
}

// for physical card list and popup in registration details page
.physical-card-status-chip {
pointer-events: none;
height: 20px;
&.physical-card-status-chip-active {
background-color: var(--ion-color-fiveten-success-100);
color: var(--ion-color-fiveten-success-700);
}
&.physical-card-status-chip-blocked {
background-color: var(--ion-color-fiveten-error-100);
color: var(--ion-color-fiveten-error-700);
}
&.physical-card-status-chip-issued {
background-color: var(--ion-color-fiveten-navy-100);
color: var(--ion-color-fiveten-link-700);
}
&.physical-card-status-chip-paused {
background-color: var(--ion-color-fiveten-warning-100);
color: var(--ion-color-fiveten-warning-700);
}
&.physical-card-status-chip-unknown {
background-color: var(--ion-color-fiveten-warning-100);
color: var(--ion-color-fiveten-warning-700);
}
&.physical-card-status-chip-suspected-fraud {
background-color: var(--ion-color-fiveten-error-100);
color: var(--ion-color-fiveten-error-700);
}
}
.chip {
pointer-events: none;
background-color: var(--ion-color-fiveten-neutral-100);
height: 27px;
}

ion-input.custom-border {
&.invalid-border {
--border-color: var(--ion-color-danger) !important;
Expand Down
25 changes: 25 additions & 0 deletions interfaces/Portal/src/styles/components/badge.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,28 @@
background-color: var(--ion-color-fiveten-red-100);
color: var(--ion-color-fiveten-red-700);
}

.badge.physical-card-status-active {
background-color: var(--ion-color-fiveten-green-100);
color: var(--ion-color-fiveten-green-700);
}
.badge.physical-card-status-blocked {
background-color: var(--ion-color-fiveten-red-100);
color: var(--ion-color-fiveten-red-700);
}
.badge.physical-card-status-issued {
background-color: var(--ion-color-fiveten-neutral-100);
color: var(--ion-color-fiveten-neutral-700);
}
.badge.physical-card-status-paused {
background-color: var(--ion-color-fiveten-yellow-100);
color: var(--ion-color-fiveten-yellow-700);
}
.badge.physical-card-status-unknown {
background-color: var(--ion-color-fiveten-yellow-100);
color: var(--ion-color-fiveten-yellow-700);
}
.badge.physical-card-status-suspected-fraud {
background-color: var(--ion-color-fiveten-red-100);
color: var(--ion-color-fiveten-red-700);
}
Loading