Skip to content
Merged
Prev Previous commit
Next Next commit
fix(users): Adapt UI code to new timestamp fields names
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Jan 7, 2025
commit 9ada0bb12abffb37c7ae9ab1d10ce382eeee6ae9
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 * 1000)
}
return t('settings', 'Never')
},
Expand Down