Skip to content

Commit

Permalink
feat(dashboard/admin-single-user-view): added proper placeholders to …
Browse files Browse the repository at this point in the history
…forms
  • Loading branch information
CodeNamedRobin committed Aug 28, 2024
1 parent 52d4e29 commit 0a016b2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion apps/dashboard/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@
"Usertype": "Usertype",
"passwordUpdated": "Password successfully updated",
"updatedUserInfo": "Succesfully updated user info.",
"userInfoUpdated": "User information successfully updated"
"userInfoUpdated": "User information successfully updated",
"userInformation": "User information"
},
"contact": {
"Contact": "Contact",
Expand Down
3 changes: 2 additions & 1 deletion apps/dashboard/src/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@
"Usertype": "Gebruikerstype",
"passwordUpdated": "Wachtwoord is succesvol geüpdatet",
"updatedUserInfo": "Profiel is succesvol geüpdatet.",
"userInfoUpdated": "Profiel is succesvol aangepast"
"userInfoUpdated": "Profiel is succesvol aangepast",
"userInformation": "Gebruikersinformatie"
},
"validation": {
"number": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<FormCard :header="$t('userDetails.User Information')"
<FormCard :header="$t('userDetails.userInformation')"
@update:modelValue="edit = $event"
@save="formSubmit"
:enableEdit="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@update:value="form.context.setFieldValue('firstName', $event)"
:errors="form.context.errors.value.firstName"
:disabled="!edit"
id="name" placeholder="John" type="text" />
id="name" :placeholder="$t('userDetails.First name')" type="text" />
<InputSpan :label="$t('userDetails.Last name')"
:value="form.model.lastName?.value.value"
:attributes="form.model.lastName?.attr.value"
Expand All @@ -20,7 +20,7 @@
@update:value="form.context.setFieldValue('nickname', $event)"
:errors="form.context.errors.value.nickname"
:disabled="!edit"
id="name" placeholder="Nick" type="text" />
id="name" :placeholder="$t('userDetails.Nickname')" type="text" />
<!-- Use user.value.type instead of user.type -->
<InputSpan
v-if="!(props.user?.type === 'MEMBER')"
Expand All @@ -30,34 +30,34 @@
@update:value="form.context.setFieldValue('email', $event)"
:errors="form.context.errors.value.email"
:disabled="!edit"
id="name" placeholder="john.doe@example.com" type="text" />
id="name" placeholder="first.last@example.com" type="text" />
<InputSpan :label="$t('userDetails.Usertype')"
:value="form.model.userType?.value.value"
:attributes="form.model.userType?.attr.value"
@update:value="form.context.setFieldValue('userType', $event)"
:errors="form.context.errors.value.userType"
id="name" placeholder="Typey McTypeface" type="usertype" disabled/>
id="name" :placeholder="$t('userDetails.Usertype')" type="usertype" disabled/>
<InputSpan :label="$t('userDetails.Active')"
:value="form.model.isActive?.value.value"
:attributes="form.model.isActive?.attr.value"
@update:value="form.context.setFieldValue('isActive', $event)"
:errors="form.context.errors.value.isActive"
:disabled="!edit"
id="name" placeholder="Typey McTypeface" type="boolean"/>
id="name" :placeholder="$t('userDetails.Active')" type="boolean"/>
<InputSpan :label="$t('profile.ofAge')"
:value="form.model.ofAge?.value.value"
:attributes="form.model.ofAge?.attr.value"
@update:value="form.context.setFieldValue('ofAge', $event)"
:errors="form.context.errors.value.ofAge"
:disabled="!edit"
id="name" placeholder="Typey McTypeface" type="boolean"/>
id="name" :placeholder="$t('profile.ofAge')" type="boolean"/>
<InputSpan :label="$t('profile.canGoIntoDebt')"
:value="form.model.canGoIntoDebt?.value.value"
:attributes="form.model.canGoIntoDebt?.attr.value"
@update:value="form.context.setFieldValue('canGoIntoDebt', $event)"
:errors="form.context.errors.value.canGoIntoDebt"
:disabled="!edit"
id="name" placeholder="Typey McTypeface" type="boolean"/>
id="name" :placeholder="$t('profile.canGoIntoDebt')" type="boolean"/>
</div>
</template>

Expand All @@ -68,7 +68,7 @@ import { useToast } from "primevue/usetoast";
import { type Form, setSubmit } from "@/utils/formUtils";
import apiService from "@/services/ApiService";
import type { UpdateUserRequest, UserResponse } from "@sudosos/sudosos-client";
import {onBeforeMount, onMounted, type PropType, type Ref, ref} from "vue";
import { type PropType } from "vue";
import * as yup from "yup";
import { updateUserDetailsObject } from "@/utils/validation-schema";
import { handleError } from "@/utils/errorUtils";
Expand Down

0 comments on commit 0a016b2

Please sign in to comment.