Skip to content

Commit

Permalink
Revert "refactor: remove phone field for user form (#6139)"
Browse files Browse the repository at this point in the history
This reverts commit f09b685.
  • Loading branch information
ruibaby committed Jun 26, 2024
1 parent aadd28a commit 4fac8c1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const formState = ref<CreateUserRequest>({
email: "",
name: "",
password: "",
phone: "",
roles: [],
});
const selectedRole = ref("");
Expand Down Expand Up @@ -107,6 +108,13 @@ const handleCreateUser = async () => {
name="email"
validation="required|email|length:0,100"
></FormKit>
<FormKit
v-model="formState.phone"
:label="$t('core.user.editing_modal.fields.phone.label')"
type="text"
name="phone"
validation="length:0,20"
></FormKit>
<FormKit
v-model="formState.password"
:label="$t('core.user.change_password_modal.fields.new_password.label')"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ const handleUpdateUser = async () => {
name="email"
validation="required|email|length:0,100"
></FormKit>
<FormKit
v-model="formState.spec.phone"
:label="$t('core.user.editing_modal.fields.phone.label')"
type="text"
name="phone"
validation="length:0,20"
></FormKit>
<FormKit
v-model="formState.spec.bio"
:label="$t('core.user.editing_modal.fields.bio.label')"
Expand Down
8 changes: 8 additions & 0 deletions ui/uc-src/modules/profile/components/ProfileEditingModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const formState = ref<User>(
spec: {
displayName: "",
email: "",
phone: "",
password: "",
bio: "",
disabled: false,
Expand Down Expand Up @@ -139,6 +140,13 @@ async function onEmailVerifyModalClose() {
</VButton>
</template>
</FormKit>
<FormKit
v-model="formState.spec.phone"
:label="$t('core.uc_profile.editing_modal.fields.phone.label')"
type="text"
name="phone"
validation="length:0,20"
></FormKit>
<FormKit
v-model="formState.spec.bio"
:label="$t('core.uc_profile.editing_modal.fields.bio.label')"
Expand Down

0 comments on commit 4fac8c1

Please sign in to comment.