This commit is contained in:
2025-08-30 15:04:24 +08:00
parent 9dfb53889f
commit eaa11b2d33
2 changed files with 4 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ import {
} from "../api"
import Actions from "./components/Actions.vue"
import Name from "./components/Name.vue"
import { USER_TYPE } from "~/utils/constants"
const message = useMessage()
@@ -102,8 +103,8 @@ async function onDeleteUsers(userIDs: DataTableRowKey[] | Ref<number[]>) {
async function onResetPassword(user: User) {
const res = await resetPassword(user.id)
users.value = users.value.map((it) => {
if (it.id === user.id) {
it.password = res.data.new_password
if (it.id === user.id && user.admin_type === USER_TYPE.REGULAR_USER) {
it.raw_password = res.data.new_password
}
return it
})

View File

@@ -46,6 +46,7 @@ export interface User {
open_api: boolean
is_disabled: boolean
password?: string
raw_password?: string
}
export type LANGUAGE =