Skip to content

Commit

Permalink
fix: Removed the unused organizationUserBelongsTo field (#1432)
Browse files Browse the repository at this point in the history
* fix: Removed the unused `organizationUserBelongsTo` field

- Removed `organizationUserBelongsTo` field from schema to align it with the talawa-api schema.
- Removed the field use from the memberDetail.tsx screen as it is not being modified.

Signed-off-by: Akhilender <[email protected]>

* fix: fixed the failing test

Signed-off-by: Akhilender <[email protected]>

---------

Signed-off-by: Akhilender <[email protected]>
  • Loading branch information
akhilender-bongirwar authored Jan 17, 2024
1 parent d1a9c39 commit 3624dc8
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,6 @@
"main": "Main",
"firstName": "First name",
"lastName": "Last name",
"memberOfOrganization": "Member of Organization",
"language": "Language",
"adminApproved": "Admin approved",
"pluginCreationAllowed": "Plugin creation allowed",
Expand Down
1 change: 0 additions & 1 deletion public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@
"main": "Principal",
"firstName": "Prénom",
"lastName": "Nom de famille",
"memberOfOrganization": "Membre de l'organisation",
"language": "Langue",
"adminApproved": "Approuvé par l'administrateur",
"pluginCreationAllowed": "Autorisation de création de plugin",
Expand Down
1 change: 0 additions & 1 deletion public/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@
"main": "मुख्य",
"firstName": "पहला नाम",
"lastName": "अंतिम नाम",
"memberOfOrganization": "संगठन का सदस्य",
"language": "भाषा",
"adminApproved": "व्यवस्थापक द्वारा स्वीकृत",
"pluginCreationAllowed": "प्लगइन निर्माण अनुमति दी गई",
Expand Down
1 change: 0 additions & 1 deletion public/locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@
"main": "Principal",
"firstName": "Nombre",
"lastName": "Apellido",
"memberOfOrganization": "Miembro de la organización",
"language": "Idioma",
"adminApproved": "Aprobado por el administrador",
"pluginCreationAllowed": "Permitir creación de complementos",
Expand Down
1 change: 0 additions & 1 deletion public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@
"main": "主要的",
"firstName": "名字",
"lastName": "姓氏",
"memberOfOrganization": "组织成员",
"language": "语言",
"adminApproved": "管理员已批准",
"pluginCreationAllowed": "允许创建插件",
Expand Down
1 change: 0 additions & 1 deletion schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,6 @@ type User {
joinedOrganizations: [Organization]
lastName: String!
membershipRequests: [MembershipRequest]
organizationUserBelongsTo: Organization
organizationsBlockedBy: [Organization]
pluginCreationAllowed: Boolean
registeredEvents: [Event]
Expand Down
3 changes: 0 additions & 3 deletions src/GraphQl/Queries/Queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,6 @@ export const USER_DETAILS = gql`
joinedOrganizations {
_id
}
organizationUserBelongsTo {
_id
}
organizationsBlockedBy {
_id
}
Expand Down
2 changes: 0 additions & 2 deletions src/components/UserPortal/UserSidebar/UserSidebar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const MOCKS = [
adminFor: [],
createdOrganizations: [],
joinedOrganizations: [],
organizationUserBelongsTo: null,
organizationsBlockedBy: [],
createdEvents: [],
registeredEvents: [],
Expand Down Expand Up @@ -73,7 +72,6 @@ const MOCKS = [
adminFor: [],
createdOrganizations: [],
joinedOrganizations: [],
organizationUserBelongsTo: null,
organizationsBlockedBy: [],
createdEvents: [],
registeredEvents: [],
Expand Down
1 change: 0 additions & 1 deletion src/components/UserUpdate/UserUpdate.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const MOCKS = [
adminFor: [],
createdOrganizations: [],
joinedOrganizations: [],
organizationUserBelongsTo: null,
organizationsBlockedBy: [],
createdEvents: [],
registeredEvents: [],
Expand Down
3 changes: 0 additions & 3 deletions src/screens/MemberDetail/MemberDetail.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const MOCKS1 = [
adminFor: [],
createdOrganizations: [],
joinedOrganizations: [],
organizationUserBelongsTo: null,
organizationsBlockedBy: [],
createdEvents: [],
registeredEvents: [],
Expand Down Expand Up @@ -88,7 +87,6 @@ const MOCKS2 = [
adminFor: [],
createdOrganizations: [],
joinedOrganizations: [],
organizationUserBelongsTo: null,
organizationsBlockedBy: [],
createdEvents: [],
registeredEvents: [],
Expand Down Expand Up @@ -156,7 +154,6 @@ describe('MemberDetail', () => {
expect(screen.getAllByText(/Main/i)).toBeTruthy();
expect(screen.getAllByText(/First name/i)).toBeTruthy();
expect(screen.getAllByText(/Last name/i)).toBeTruthy();
expect(screen.getAllByText(/Member of Organization/i)).toBeTruthy();
expect(screen.getAllByText(/Language/i)).toBeTruthy();
expect(screen.getByText(/Admin approved/i)).toBeInTheDocument();
expect(screen.getByText(/Plugin creation allowed/i)).toBeInTheDocument();
Expand Down
7 changes: 0 additions & 7 deletions src/screens/MemberDetail/MemberDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,6 @@ const MemberDetail: React.FC<MemberDetailProps> = ({ id }): JSX.Element => {
<Col sm={6}>{t('role')}</Col>
<Col sm={6}>{userData?.user?.userType}</Col>
</Row>
<Row className="border-bottom py-3">
<Col sm={6}>{t('memberOfOrganization')}</Col>
<Col sm={6}>
{userData?.user?.organizationUserBelongsTo ??
'None'}
</Col>
</Row>
<Row className="border-bottom py-3">
<Col sm={6}>{t('language')}</Col>
<Col sm={6}>
Expand Down

0 comments on commit 3624dc8

Please sign in to comment.