Skip to content

Commit

Permalink
awards: use last update date
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Dec 1, 2024
1 parent 4e498bb commit 1ee55b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/trcustoms/awards/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Meta:
model = UserAward
fields = [
"created",
"last_updated",
"position",
"code",
"title",
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/modals/AwardModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ const AwardModal = ({ isActive, onIsActiveChange, award }: AwardModalProps) => {
{reprPercentage(award.rarity / 100)}
</dd>
<dt className={styles.term}>Awarded:</dt>
<dd className={styles.definition}>{formatDate(award.created)}</dd>
<dd className={styles.definition}>
{formatDate(award.last_updated ?? award.created)}
</dd>
</dl>
</div>
</BaseModal>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/services/UserService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ interface UserDetails extends UserListing {

interface UserAward {
created: string;
last_updated: string;
code: string;
title: string;
description: string;
Expand Down

0 comments on commit 1ee55b7

Please sign in to comment.