Skip to content

Commit

Permalink
fix(users): Adapt UI code to new timestamp fields names
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Dec 10, 2024
1 parent 76d9946 commit 99ba7d3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/settings/src/mixins/UserRowMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default {
},
},
setup(props) {
const { formattedFullTime } = useFormatDateTime(props.user.firstLogin, { relativeTime: false })
const { formattedFullTime } = useFormatDateTime(props.user.firstLoginTimestamp * 1000, { relativeTime: false })
return {
formattedFullTime,
}
Expand Down Expand Up @@ -128,25 +128,25 @@ export default {
},

userFirstLogin() {
if (this.user.firstLogin > 0) {
if (this.user.firstLoginTimestamp > 0) {
return this.formattedFullTime
}
if (this.user.firstLogin < 0) {
if (this.user.firstLoginTimestamp < 0) {
return t('settings', 'Unknown')
}
return t('settings', 'Never')
},

/* LAST LOGIN */
userLastLoginTooltip() {
if (this.user.lastLogin > 0) {
return OC.Util.formatDate(this.user.lastLogin)
if (this.user.lastLoginTimestamp > 0) {
return OC.Util.formatDate(this.user.lastLoginTimestamp * 1000)
}
return ''
},
userLastLogin() {
if (this.user.lastLogin > 0) {
return OC.Util.relativeModifiedDate(this.user.lastLogin)
if (this.user.lastLoginTimestamp > 0) {
return OC.Util.relativeModifiedDate(this.user.lastLoginTimestamp)
}
return t('settings', 'Never')
},
Expand Down

0 comments on commit 99ba7d3

Please sign in to comment.