Skip to content

Commit

Permalink
Display stroked status style if the asset is not owned by the user. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
seanwu1105 authored Feb 3, 2021
1 parent fa25672 commit f65b5cd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@ mat-toolbar {

button.returned {
color: white;
border-color: var(--ion-color-danger);
border-color: #e31587;
background-color: #e31587;
}

button.missed {
color: #e31587;
border-color: #e31587;
}
}

.column {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ export async function getStatus(
) {
const resolvedEmail = await email;
if (transaction.expired) {
return Status.Returned;
if (transaction.sender === resolvedEmail) {
return Status.Returned;
}
return Status.Missed;
}
if (!transaction.fulfilled_at) {
if (transaction.receiver_email === resolvedEmail) {
Expand All @@ -59,6 +62,7 @@ enum Status {
waitingToBeAccepted = 'waitingToBeAccepted',
InProgress = 'inProgress',
Returned = 'returned',
Missed = 'missed',
Delivered = 'delivered',
Accepted = 'accepted',
}
7 changes: 6 additions & 1 deletion src/app/features/home/transaction/transaction.page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@ mat-toolbar {

button.returned {
color: white;
border-color: var(--ion-color-danger);
border-color: #e31587;
background-color: #e31587;
}

button.missed {
color: #e31587;
border-color: #e31587;
}
}
}
1 change: 1 addition & 0 deletions src/assets/i18n/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
"accepted": "Accepted",
"delivered": "Delivered",
"returned": "Returned",
"missed": "Returned",
"inProgress": "In Progress",
"waitingToBeAccepted": "In Progress",
"null": "Not Provided"
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
"accepted": "已接收",
"delivered": "已送出",
"returned": "已退回",
"missed": "已退回",
"inProgress": "等待中",
"waitingToBeAccepted": "等待中",
"null": "未提供"
Expand Down

0 comments on commit f65b5cd

Please sign in to comment.