fix: Fix the user's real name field to real_name

For better readability, change the user's real name field to real_name

Change-Id: I509e854102f4e6f90f59b78dbe75953f5c17b4c1
This commit is contained in:
xusongfu 2021-08-23 14:08:25 +08:00
parent 15128f67e3
commit a5e03f36cb
11 changed files with 26 additions and 26 deletions

View File

@ -55,7 +55,7 @@ export const fetchUserDetails = (userId) =>
* @param {String} data.user.email The email for the user.
* @param {String} data.user.password The password for the user.
* @param {String} data.user.phone The phone for the user.
* @param {String} data.user.full_name The true name for the user.
* @param {String} data.user.real_name The true name for the user.
* @param {Boolean} data.user.enabled Default value : true
* @param {String} data.user.description The description for the user.
* @returns {Promise}
@ -75,7 +75,7 @@ export const createUser = (data) =>
* @param {String} data.user.name The name for the user.
* @param {String} data.user.email The email for the user.
* @param {String} data.user.phone The phone for the user.
* @param {String} data.user.full_name The true name for the user.
* @param {String} data.user.real_name The true name for the user.
* @param {String} data.user.description The description for the user.
* @returns {Promise}
*/

View File

@ -1251,6 +1251,7 @@
"Ramdisk ID": "Ramdisk ID",
"Ramdisk Image": "Ramdisk Image",
"Raw": "Raw",
"Real Name": "Real Name",
"Reason": "Reason",
"Reason: ": "Reason: ",
"Reboot": "Reboot",
@ -1567,7 +1568,6 @@
"Transfer ID": "Transfer ID",
"Transfer Name": "Transfer Name",
"Transform Protocol": "Transform Protocol",
"True Name": "True Name",
"Type": "Type",
"UDPLite": "UDPLite",
"USB Info": "USB Info",

View File

@ -1251,6 +1251,7 @@
"Ramdisk ID": "内存盘ID",
"Ramdisk Image": "Ramdisk镜像",
"Raw": "原始",
"Real Name": "真实姓名",
"Reason": "原因",
"Reason: ": "原因:",
"Reboot": "重启",
@ -1567,7 +1568,6 @@
"Transfer ID": "转让ID",
"Transfer Name": "转让名称",
"Transform Protocol": "转换协议",
"True Name": "真实姓名",
"Type": "类型",
"UDPLite": "",
"USB Info": "USB 信息",

View File

@ -85,8 +85,8 @@ export default class UserDetail extends Base {
},
},
{
title: t('True Name'),
dataIndex: 'full_name',
title: t('Real Name'),
dataIndex: 'real_name',
},
// {
// title: t('User Group Num'),

View File

@ -333,8 +333,8 @@ class CreateForm extends FormAction {
colNum: 2,
},
{
name: 'full_name',
label: t('True Name'),
name: 'real_name',
label: t('Real Name'),
type: 'input',
required: true,
labelCol,

View File

@ -89,7 +89,7 @@ class EditForm extends ModalAction {
name,
email,
phone,
full_name,
real_name,
description,
domain_id,
default_project_id,
@ -105,7 +105,7 @@ class EditForm extends ModalAction {
default_project_id: project ? project.name : '',
email,
phone,
full_name,
real_name,
description,
});
}
@ -153,8 +153,8 @@ class EditForm extends ModalAction {
validator: phoneNumberValidate,
},
{
name: 'full_name',
label: t('True Name'),
name: 'real_name',
label: t('Real Name'),
type: 'input',
required: true,
},
@ -174,12 +174,12 @@ class EditForm extends ModalAction {
}
onSubmit = (values) => {
const { email, phone, full_name, description, name } = values;
const { email, phone, real_name, description, name } = values;
const { id } = this.item;
return globalUserStore.edit(id, {
email,
phone,
full_name,
real_name,
description,
name,
});

View File

@ -197,8 +197,8 @@ export default class CreateForm extends ModalAction {
type: 'textarea',
},
{
name: 'full_name',
label: t('True Name'),
name: 'real_name',
label: t('Real Name'),
type: 'input',
required: true,
},
@ -214,7 +214,7 @@ export default class CreateForm extends ModalAction {
enabled,
default_project_id,
description,
full_name,
real_name,
} = values;
const { id: domain_id } = this.item;
const data = {
@ -225,7 +225,7 @@ export default class CreateForm extends ModalAction {
domain_id,
enabled,
description,
full_name,
real_name,
default_project_id,
};
// eslint-disable-next-line no-console

View File

@ -76,8 +76,8 @@ export default class User extends Base {
},
},
{
title: t('True Name'),
dataIndex: 'full_name',
title: t('Real Name'),
dataIndex: 'real_name',
isHideable: true,
},
{
@ -164,8 +164,8 @@ export default class User extends Base {
name: 'name',
},
{
label: t('True Name'),
name: 'full_name',
label: t('Real Name'),
name: 'real_name',
},
{
label: t('Enabled'),

View File

@ -337,13 +337,13 @@ export class UserStore extends Base {
}
@action
async edit(id, { email, phone, full_name, description, name }) {
async edit(id, { email, phone, real_name, description, name }) {
const url = `${this.apiVersion}/users/${id}`;
const reqBody = {
user: {
email,
phone,
full_name,
real_name,
description,
name,
},

View File

@ -48,7 +48,7 @@ describe('The User Page', () => {
.formInput('password', tmpPassword)
.formInput('confirmPassword', tmpPassword)
.formInput('phone', phone)
.formInput('full_name', name)
.formInput('real_name', name)
.formButtonClick('more')
.wait(2000)
.formTransfer('select_project', projectName)

View File

@ -208,7 +208,7 @@ Cypress.Commands.add('createUser', ({ name }) => {
.formInput('password', password)
.formInput('confirmPassword', password)
.formInput('phone', phone)
.formInput('full_name', name)
.formInput('real_name', name)
.clickFormActionSubmitButton()
.tableSearchText(name)
.waitStatusGreen(7);