Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated UI for Admin-> User Profile #1667

Merged
merged 36 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a83e112
Updated UI for Admin-> User Profile
pranshugupta54 Mar 4, 2024
628ff5a
Added languages
pranshugupta54 Mar 4, 2024
360e6e1
Merge branch 'develop' into admin-profile
pranshugupta54 Mar 4, 2024
8e1fab7
Merge branch 'develop' into admin-profile
pranshugupta54 Mar 9, 2024
ce541b6
Update localization strings for personal details
pranshugupta54 Mar 9, 2024
aa496b8
Add WidthFit class to MemberDetail module CSS
pranshugupta54 Mar 9, 2024
b9bbccf
Add sanitize-html package and update MemberDetail component
pranshugupta54 Mar 9, 2024
9c06eb6
Merge branch 'develop' into admin-profile
pranshugupta54 Mar 9, 2024
0ec4d57
lint fix
pranshugupta54 Mar 9, 2024
32eb991
Merge branch 'admin-profile' of https://github.com/pranshugupta54/tal…
pranshugupta54 Mar 9, 2024
f92304f
Merge branch 'admin-profile' of https://github.com/pranshugupta54/tal…
pranshugupta54 Mar 9, 2024
eed9b6a
fix test - added fields to profile for test
pranshugupta54 Mar 10, 2024
7fbd34b
Added placeholded, dynamicDropdown
pranshugupta54 Mar 10, 2024
af4d2a5
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
pranshugupta54 Mar 11, 2024
97c77af
Wrapped the component in LocalizationProvider of dayjs
pranshugupta54 Mar 11, 2024
cadf2c7
Merge branch 'develop' into admin-profile
pranshugupta54 Mar 11, 2024
8077780
remove unused lines
pranshugupta54 Mar 12, 2024
379c843
Merge branch 'develop' into admin-profile
pranshugupta54 Mar 13, 2024
ee039e9
Merge branch 'develop' into admin-profile
pranshugupta54 Mar 15, 2024
d03b66f
Merge branch 'develop' into admin-profile
pranshugupta54 Mar 22, 2024
d07b83d
Add new translations and update MemberDetail component
pranshugupta54 Mar 22, 2024
728660f
Add toast warnings for blank form submission
pranshugupta54 Mar 22, 2024
53632d0
Update MemberDetail.test.tsx with additional form fields and birth date
pranshugupta54 Mar 22, 2024
c587b02
Added test for dropdown
pranshugupta54 Mar 22, 2024
88115dc
Merge branch 'develop' into admin-profile
pranshugupta54 Mar 22, 2024
1e074d1
remove unused code
pranshugupta54 Mar 22, 2024
c164af1
merge upstream develop
pranshugupta54 Mar 24, 2024
8104c61
Update MemberDetail.test.tsx and DynamicDropDown.module.css, add styl…
pranshugupta54 Mar 24, 2024
5ebfb82
Merge branch 'develop' into admin-profile
pranshugupta54 Mar 25, 2024
aa245d1
Refactor MemberDetail component
pranshugupta54 Mar 26, 2024
f54cd22
Merge branch 'develop' into admin-profile
pranshugupta54 Mar 26, 2024
2f66112
Update pre-commit
pranshugupta54 Mar 26, 2024
525bffa
remove unused UserUpdate
pranshugupta54 Mar 26, 2024
e2d4b36
Merge remote-tracking branch 'upstream/develop' into admin-profile
pranshugupta54 Mar 26, 2024
2a5657a
Add user profile fields and update app user profile in UserSidebar.te…
pranshugupta54 Mar 26, 2024
ed8fc08
Merge branch 'develop' into admin-profile
pranshugupta54 Mar 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,24 @@
"firstName": "First name",
"lastName": "Last name",
"language": "Language",
"gender": "Gender",
"birthDate": "Birth Date",
"educationGrade": "Educational Grade",
"employmentStatus": "Employment Status",
"maritalStatus": "Marital Status",
"displayImage": "Display Image",
"phone": "Phone",
"address": "Address",
"countryCode": "Country Code",
"state": "State",
"city": "City",
"personalInfoHeading": "Personal Information",
"contactInfoHeading": "Contact Information",
"actionsHeading": "Actions",
"personalDetailsHeading": "Personal Details",
"appLanguageCode": "Choose Language",
"delete": "Delete User",
"saveChanges": "Save Changes",
"adminApproved": "Admin approved",
"pluginCreationAllowed": "Plugin creation allowed",
"joined": "Joined",
Expand Down
18 changes: 18 additions & 0 deletions public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,24 @@
"firstName": "Prénom",
"lastName": "Nom de famille",
"language": "Langue",
"gender": "Genre",
"birthDate": "Date de naissance",
"educationGrade": "Niveau d'éducation",
"employmentStatus": "Statut d'emploi",
"maritalStatus": "État civil",
"displayImage": "Image de profil",
"phone": "Téléphone",
"address": "Adresse",
"countryCode": "Code pays",
"state": "État",
"city": "Ville",
"personalInfoHeading": "Informations personnelles",
"contactInfoHeading": "Coordonnées",
"actionsHeading": "Actions",
"personalDetailsHeading": "Détails personnels",
"appLanguageCode": "Choisir la langue",
"delete": "Supprimer l'utilisateur",
"saveChanges": "Enregistrer les modifications",
"adminApproved": "Approuvé par l'administrateur",
"pluginCreationAllowed": "Autorisation de création de plugin",
"joined": "Rejoint",
Expand Down
18 changes: 18 additions & 0 deletions public/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,24 @@
"firstName": "पहला नाम",
"lastName": "अंतिम नाम",
"language": "भाषा",
"gender": "लिंग",
"birthDate": "जन्म तिथि",
"educationGrade": "शैक्षिक ग्रेड",
"employmentStatus": "रोजगार की स्थिति",
"maritalStatus": "वैवाहिक स्थिति",
"displayImage": "प्रदर्शन छवि",
"phone": "फोन",
"address": "पता",
"countryCode": "देश कोड",
"state": "राज्य",
"city": "शहर",
"personalInfoHeading": "व्यक्तिगत जानकारी",
"contactInfoHeading": "संपर्क जानकारी",
"actionsHeading": "कार्रवाई",
"personalDetailsHeading": "व्यक्तिगत विवरण",
"appLanguageCode": "भाषा चुनें",
"delete": "उपयोगकर्ता को हटाएं",
"saveChanges": "परिवर्तन सहेजें",
"adminApproved": "व्यवस्थापक द्वारा स्वीकृत",
"pluginCreationAllowed": "प्लगइन निर्माण अनुमति दी गई",
"joined": "शामिल हुए",
Expand Down
18 changes: 18 additions & 0 deletions public/locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,24 @@
"firstName": "Nombre",
"lastName": "Apellido",
"language": "Idioma",
"gender": "Género",
"birthDate": "Fecha de Nacimiento",
"educationGrade": "Nivel Educativo",
"employmentStatus": "Estado Laboral",
"maritalStatus": "Estado Civil",
"displayImage": "Imagen de Perfil",
"phone": "Teléfono",
"address": "Dirección",
"countryCode": "Código de País",
"state": "Estado",
"city": "Ciudad",
"personalInfoHeading": "Información Personal",
"contactInfoHeading": "Información de Contacto",
"actionsHeading": "Acciones",
"personalDetailsHeading": "Detalles Personales",
"appLanguageCode": "Elegir Idioma",
"delete": "Eliminar Usuario",
"saveChanges": "Guardar Cambios",
"adminApproved": "Aprobado por el administrador",
"pluginCreationAllowed": "Permitir creación de complementos",
"joined": "Unido",
Expand Down
18 changes: 18 additions & 0 deletions public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,24 @@
"firstName": "名字",
"lastName": "姓氏",
"language": "语言",
"gender": "性别",
"birthDate": "出生日期",
"educationGrade": "教育程度",
"employmentStatus": "就业状况",
"maritalStatus": "婚姻状况",
"displayImage": "显示图片",
"phone": "电话",
"address": "地址",
"countryCode": "国家代码",
"state": "州/省",
"city": "城市",
"personalInfoHeading": "个人信息",
"contactInfoHeading": "联系信息",
"actionsHeading": "操作",
"personalDetailsHeading": "个人详情",
"appLanguageCode": "选择语言",
"delete": "删除用户",
"saveChanges": "保存更改",
"adminApproved": "管理员已批准",
"pluginCreationAllowed": "允许创建插件",
"joined": "加入",
Expand Down
20 changes: 19 additions & 1 deletion src/GraphQl/Mutations/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,28 @@ export const UPDATE_USER_MUTATION = gql`
$firstName: String
$lastName: String
$email: EmailAddress
$gender: Gender
$address: AddressInput
$birthDate: Date
$educationGrade: EducationGrade
$employmentStatus: EmploymentStatus
$maritalStatus: MaritalStatus
$phone: UserPhoneInput
$file: String
) {
updateUserProfile(
data: { firstName: $firstName, lastName: $lastName, email: $email }
data: {
firstName: $firstName
lastName: $lastName
email: $email
gender: $gender
address: $address
birthDate: $birthDate
educationGrade: $educationGrade
employmentStatus: $employmentStatus
maritalStatus: $maritalStatus
phone: $phone
}
file: $file
) {
_id
Expand Down
14 changes: 14 additions & 0 deletions src/GraphQl/Queries/Queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,20 @@ export const USER_DETAILS = gql`
pluginCreationAllowed
adminApproved
createdAt
gender
birthDate
educationGrade
employmentStatus
maritalStatus
address {
line1
countryCode
city
state
}
phone {
home
}
adminFor {
_id
}
Expand Down
3 changes: 3 additions & 0 deletions src/components/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface InterfaceAvatarProps {
size?: number;
avatarStyle?: string;
dataTestId?: string;
radius?: number;
}

const Avatar = ({
Expand All @@ -16,11 +17,13 @@ const Avatar = ({
size,
avatarStyle,
dataTestId,
radius,
}: InterfaceAvatarProps): JSX.Element => {
const avatar = useMemo(() => {
return createAvatar(initials, {
size: size || 128,
seed: name,
radius: radius || 0,
}).toDataUriSync();
}, [name, size]);

Expand Down
21 changes: 21 additions & 0 deletions src/screens/MemberDetail/MemberDetail.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -448,3 +448,24 @@
.inactiveBtn:hover i {
color: #31bb6b;
}

.topRadius {
border-top-left-radius: 16px;
border-top-right-radius: 16px;
}

.inputColor {
background: #f1f3f6;
}

.width60 {
width: 60%;
}

.maxWidth40 {
max-width: 40%;
}

.allRound {
border-radius: 16px;
}
Loading
Loading