feat: add address line 1 and 2 in web UI (#2961)

This commit is contained in:
DacongDA 2024-05-19 23:55:38 +08:00 committed by GitHub
parent c48306d117
commit bfcfb56336
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 80 additions and 12 deletions

View File

@ -202,7 +202,7 @@ class UserEditPage extends React.Component {
return value;
}
updateUserField(key, value) {
updateUserField(key, value, idx) {
if (this.props.account === null) {
return;
}
@ -210,7 +210,12 @@ class UserEditPage extends React.Component {
value = this.parseUserField(key, value);
const user = this.state.user;
user[key] = value;
if (key === "address") {
user[key][idx] = value;
} else {
user[key] = value;
}
this.setState({
user: user,
});
@ -501,16 +506,33 @@ class UserEditPage extends React.Component {
);
} else if (accountItem.name === "Address") {
return (
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("user:Address"), i18next.t("user:Address - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.user.address} onChange={e => {
this.updateUserField("address", e.target.value);
}} />
</Col>
</Row>
<React.Fragment>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("user:Address"), i18next.t("user:Address - Tooltip"))} :
</Col>
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
<span>{i18next.t("user:Address line") + " 1"}</span> :
</Col>
<Col span={20} >
<Input value={this.state.user.address[0]} onChange={e => {
this.updateUserField("address", e.target.value, 0);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
</Col>
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
<span>{i18next.t("user:Address line") + " 2"}</span> :
</Col>
<Col span={20} >
<Input value={this.state.user.address[1]} onChange={e => {
this.updateUserField("address", e.target.value, 1);
}} />
</Col>
</Row>
</React.Fragment>
);
} else if (accountItem.name === "Affiliation") {
return (

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
"The input is not invoice title!": "The input is not invoice title!",
"The input is not valid Email!": "The input is not valid Email!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Social logins linked by the user",
"Address": "Address",
"Address - Tooltip": "Residential address",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employer, such as company name or organization name",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "Die Eingabe ist keine Rechnungssteuer-ID!",
"The input is not invoice title!": "Der Eingabewert ist nicht die Rechnungsbezeichnung!",
"The input is not valid Email!": "Die Eingabe ist keine gültige E-Mail-Adresse!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Drittanbieter-Anmeldungen, die mit dem Benutzer verknüpft sind",
"Address": "Adresse",
"Address - Tooltip": "Wohnadresse",
"Address line": "Address line",
"Affiliation": "Zugehörigkeit",
"Affiliation - Tooltip": "Arbeitgeber, wie Firmenname oder Organisationsname",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
"The input is not invoice title!": "The input is not invoice title!",
"The input is not valid Email!": "The input is not valid Email!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Social logins linked by the user",
"Address": "Address",
"Address - Tooltip": "Residential address",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employer, such as company name or organization name",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "¡La entrada no es el ID fiscal de la factura!",
"The input is not invoice title!": "¡El entrada no es el título de la factura!",
"The input is not valid Email!": "¡La entrada no es un correo electrónico válido!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Accesos sociales ligados por el usuario",
"Address": "Dirección",
"Address - Tooltip": "Dirección residencial",
"Address line": "Address line",
"Affiliation": "Afiliación",
"Affiliation - Tooltip": "Empleador, como el nombre de una empresa u organización",
"Bio": "Bio - Biografía",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
"The input is not invoice title!": "The input is not invoice title!",
"The input is not valid Email!": "The input is not valid Email!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Social logins linked by the user",
"Address": "Address",
"Address - Tooltip": "Residential address",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employer, such as company name or organization name",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
"The input is not invoice title!": "The input is not invoice title!",
"The input is not valid Email!": "The input is not valid Email!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Social logins linked by the user",
"Address": "Address",
"Address - Tooltip": "Residential address",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employer, such as company name or organization name",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "L'entrée n'est pas l'identifiant fiscal de la facture !",
"The input is not invoice title!": "L'entrée n'est pas un nom ou une dénomination sociale !",
"The input is not valid Email!": "L'entrée n'est pas une adresse e-mail valide !",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Service de connexions tiers liés au compte",
"Address": "Adresse",
"Address - Tooltip": "Adresse résidentielle",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employeur, tel que le nom de l'entreprise ou de l'organisation",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
"The input is not invoice title!": "The input is not invoice title!",
"The input is not valid Email!": "The input is not valid Email!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Social logins linked by the user",
"Address": "Address",
"Address - Tooltip": "Residential address",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employer, such as company name or organization name",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "Input ini bukan Tax ID faktur!",
"The input is not invoice title!": "Masukan bukan judul faktur!",
"The input is not valid Email!": "Input yang dimasukkan bukan sesuai dengan format Email yang valid!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Masuk sosial yang terhubung oleh pengguna",
"Address": "Alamat",
"Address - Tooltip": "Alamat tempat tinggal",
"Address line": "Address line",
"Affiliation": "Afiliasi",
"Affiliation - Tooltip": "Pemberi Kerja, seperti nama perusahaan atau nama organisasi",
"Bio": "Bio: Biografi",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
"The input is not invoice title!": "The input is not invoice title!",
"The input is not valid Email!": "The input is not valid Email!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Social logins linked by the user",
"Address": "Address",
"Address - Tooltip": "Residential address",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employer, such as company name or organization name",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "入力されたものは請求書の税番号ではありません!",
"The input is not invoice title!": "インプットは請求書タイトルではありません!",
"The input is not valid Email!": "入力されたものは有効なメールではありません",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "ユーザーによってリンクされたソーシャルログイン",
"Address": "住所",
"Address - Tooltip": "住所",
"Address line": "Address line",
"Affiliation": "所属",
"Affiliation - Tooltip": "企業名や団体名などの雇用主",
"Bio": "バイオ技術",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
"The input is not invoice title!": "The input is not invoice title!",
"The input is not valid Email!": "The input is not valid Email!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Social logins linked by the user",
"Address": "Address",
"Address - Tooltip": "Residential address",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employer, such as company name or organization name",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "입력한 것은 송장 세금 ID가 아닙니다!",
"The input is not invoice title!": "입력값은 송장 제목이 아닙니다!",
"The input is not valid Email!": "입력 값은 유효한 이메일이 아닙니다!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "사용자가 연결한 소셜 로그인",
"Address": "주소",
"Address - Tooltip": "주거지 주소",
"Address line": "Address line",
"Affiliation": "소속",
"Affiliation - Tooltip": "고용주, 회사명 또는 조직명",
"Bio": "바이오",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
"The input is not invoice title!": "The input is not invoice title!",
"The input is not valid Email!": "The input is not valid Email!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Social logins linked by the user",
"Address": "Address",
"Address - Tooltip": "Residential address",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employer, such as company name or organization name",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
"The input is not invoice title!": "The input is not invoice title!",
"The input is not valid Email!": "The input is not valid Email!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Social logins linked by the user",
"Address": "Address",
"Address - Tooltip": "Residential address",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employer, such as company name or organization name",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
"The input is not invoice title!": "The input is not invoice title!",
"The input is not valid Email!": "The input is not valid Email!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Social logins linked by the user",
"Address": "Address",
"Address - Tooltip": "Residential address",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employer, such as company name or organization name",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "A entrada não é um ID fiscal de fatura válido!",
"The input is not invoice title!": "A entrada não é um título de fatura válido!",
"The input is not valid Email!": "A entrada não é um Email válido!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Logins sociais vinculados pelo usuário",
"Address": "Endereço",
"Address - Tooltip": "Endereço residencial",
"Address line": "Address line",
"Affiliation": "Afiliação",
"Affiliation - Tooltip": "Empregador, como nome da empresa ou organização",
"Bio": "Biografia",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "Входные данные не являются идентификатором налога по счету-фактуре!",
"The input is not invoice title!": "Входные данные не являются названием счета-фактуры!",
"The input is not valid Email!": "Ввод не является действительным адресом электронной почты!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Социальные логины, связанные пользователем",
"Address": "Адрес",
"Address - Tooltip": "Адрес проживания",
"Address line": "Address line",
"Affiliation": "Принадлежность",
"Affiliation - Tooltip": "Работодатель, такой как название компании или организации",
"Bio": "Био",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
"The input is not invoice title!": "The input is not invoice title!",
"The input is not valid Email!": "The input is not valid Email!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Social logins linked by the user",
"Address": "Address",
"Address - Tooltip": "Residential address",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employer, such as company name or organization name",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
"The input is not invoice title!": "The input is not invoice title!",
"The input is not valid Email!": "The input is not valid Email!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Social logins linked by the user",
"Address": "Address",
"Address - Tooltip": "Residential address",
"Address line": "Address line",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Employer, such as company name or organization name",
"Bio": "Bio",

View File

@ -954,6 +954,7 @@
"Text 3": "Текст 3",
"Text 4": "Текст 4",
"Text 5": "Текст 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "Введені дані не є ідентифікаційним номером платника податків!",
"The input is not invoice title!": "Введені дані не є назвою рахунку!",
"The input is not valid Email!": "Введена недійсна адреса електронної пошти!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Соціальні входи, пов’язані користувачем",
"Address": "Адреса",
"Address - Tooltip": "Адреса місця проживання",
"Address line": "Address line",
"Affiliation": "Приналежність",
"Affiliation - Tooltip": "Роботодавець, наприклад назва компанії чи організації",
"Bio": "біографія",

View File

@ -954,6 +954,7 @@
"Text 3": "Text 3",
"Text 4": "Text 4",
"Text 5": "Text 5",
"The input Email doesn't match the signup item regex!": "The input Email doesn't match the signup item regex!",
"The input is not invoice Tax ID!": "Đầu vào không phải là Mã số thuế của hóa đơn!",
"The input is not invoice title!": "Đầu vào không phải là tiêu đề hóa đơn!",
"The input is not valid Email!": "Đầu vào không phải là địa chỉ Email hợp lệ!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "Đăng nhập xã hội liên kết bởi người dùng",
"Address": "Địa chỉ",
"Address - Tooltip": "Địa chỉ cư trú",
"Address line": "Address line",
"Affiliation": "Liên kết",
"Affiliation - Tooltip": "Nhà tuyển dụng, chẳng hạn như tên công ty hoặc tổ chức",
"Bio": "bản vẻ đời sống",

View File

@ -954,6 +954,7 @@
"Text 3": "文本3",
"Text 4": "文本4",
"Text 5": "文本5",
"The input Email doesn't match the signup item regex!": "您输入的邮箱地址与注册项的regex表达式不匹配!",
"The input is not invoice Tax ID!": "您输入的纳税人识别号有误!",
"The input is not invoice title!": "您输入的发票抬头有误!",
"The input is not valid Email!": "您输入的电子邮箱格式有误!",
@ -1074,6 +1075,7 @@
"3rd-party logins - Tooltip": "用户所绑定的社会化登录",
"Address": "地址",
"Address - Tooltip": "居住地址",
"Address line": "地址",
"Affiliation": "工作单位",
"Affiliation - Tooltip": "工作单位,如公司、组织名称",
"Bio": "自我介绍",