diff --git a/public/locales/en.json b/public/locales/en.json
index 7f07275c54..0863e09c29 100644
--- a/public/locales/en.json
+++ b/public/locales/en.json
@@ -89,8 +89,6 @@
"createSampleOrganization": "Create Sample Organization",
"description": "Description",
"location": "Location",
- "isPublic": "Is Public",
- "visibleInSearch": "Visible In Search",
"displayImage": "Display Image",
"enterName": "Enter Name",
"sort": "Sort",
@@ -468,8 +466,6 @@
"description": "Description",
"location": "Location",
"displayImage": "Display Image",
- "isPublic": "Public",
- "isVisibleInSearch": "Visible in Search",
"saveChanges": "Save Changes",
"enterNameOrganization": "Enter Organization Name",
"successfulUpdated": "Organization updated successfully",
diff --git a/public/locales/fr.json b/public/locales/fr.json
index b626994c5c..bc2a4c1d76 100644
--- a/public/locales/fr.json
+++ b/public/locales/fr.json
@@ -88,8 +88,6 @@
"createSampleOrganization": "Créer une organisation d'exemple",
"description": "La description",
"location": "Emplacement",
- "isPublic": "Est publique",
- "visibleInSearch": "Visible dans la recherche",
"displayImage": "Afficher l'image",
"enterName": "Entrez le nom",
"sort": "Trier",
@@ -465,8 +463,6 @@
"description": "La description",
"location": "emplacement",
"displayImage": "Afficher l'image",
- "isPublic": "Public",
- "isVisibleInSearch": "Visible dans la recherche",
"saveChanges": "Sauvegarder les modifications",
"enterNameOrganization": "Entrez le nom de l'organisation",
"successfulUpdated": "Mise à jour réussie",
diff --git a/public/locales/hi.json b/public/locales/hi.json
index 5f272bad8f..44aef189d2 100644
--- a/public/locales/hi.json
+++ b/public/locales/hi.json
@@ -88,8 +88,6 @@
"createSampleOrganization": " सैंपल संगठन बनाएं",
"description": "विवरण",
"location": "स्थान",
- "isPublic": "सार्वजनिक है",
- "visibleInSearch": "खोज में दृश्यमान",
"displayImage": "प्रदर्शन छवि",
"enterName": "नाम दर्ज करें",
"sort": "छांटें",
@@ -464,8 +462,6 @@
"description": "विवरण",
"location": "जगह",
"displayImage": "प्रदर्शन छवि",
- "isPublic": "सार्वजनिक",
- "isVisibleInSearch": "खोज में दिखाए जा सकते हैं",
"saveChanges": "परिवर्तनों को सुरक्षित करें",
"cancel": "रद्द करना",
"enterNameOrganization": "संगठन का नाम दर्ज करें",
diff --git a/public/locales/sp.json b/public/locales/sp.json
index abf86c60dc..c9ef6804a9 100644
--- a/public/locales/sp.json
+++ b/public/locales/sp.json
@@ -88,8 +88,6 @@
"createSampleOrganization": "Crear organización de muestra",
"description": "Descripción",
"location": "Ubicación",
- "isPublic": "Es público",
- "visibleInSearch": "Visible en la búsqueda",
"displayImage": "Mostrar imagen",
"enterName": "Ingrese su nombre",
"sort": "Ordenar",
@@ -464,8 +462,6 @@
"description": "Descripción",
"location": "ubicación",
"displayImage": "Mostrar imagen",
- "isPublic": "Público",
- "isVisibleInSearch": "Visible en la búsqueda",
"saveChanges": "Guardar cambios",
"cancel": "Cancelar",
"enterNameOrganization": "Ingrese el nombre de la organización",
diff --git a/public/locales/zh.json b/public/locales/zh.json
index 30a048d1be..dc91004259 100644
--- a/public/locales/zh.json
+++ b/public/locales/zh.json
@@ -88,8 +88,6 @@
"createSampleOrganization": "创建示范组织",
"description": "描述",
"location": "地點",
- "isPublic": "是否公開",
- "visibleInSearch": "在搜索中可見",
"displayImage": "顯示圖像",
"enterName": "输入名字",
"sort": "排序",
@@ -464,8 +462,6 @@
"description": "描述",
"location": "地點",
"displayImage": "顯示圖像",
- "isPublic": "公开",
- "isVisibleInSearch": "在搜索中可见",
"saveChanges": "保存更改",
"cancel": "取消",
"enterNameOrganization": "輸入組織名稱",
diff --git a/schema.graphql b/schema.graphql
index 0d8c984c9f..9fe660fc00 100644
--- a/schema.graphql
+++ b/schema.graphql
@@ -545,7 +545,6 @@ type Organization {
creator: User!
description: String!
image: String
- isPublic: Boolean!
location: String
members: [User]
membershipRequests: [MembershipRequest]
@@ -557,7 +556,6 @@ type Organization {
first: PositiveInt
last: PositiveInt
): UserTagsConnection
- visibleInSearch: Boolean!
}
type OrganizationInfoNode {
@@ -566,9 +564,7 @@ type OrganizationInfoNode {
creator: User!
description: String!
image: String
- isPublic: Boolean!
name: String!
- visibleInSearch: Boolean!
}
input OrganizationInput {
@@ -576,10 +572,8 @@ input OrganizationInput {
attendees: String
description: String!
image: String
- isPublic: Boolean!
location: String
name: String!
- visibleInSearch: Boolean!
}
enum OrganizationOrderByInput {
@@ -614,14 +608,12 @@ input OrganizationWhereInput {
id_not: ID
id_not_in: [ID!]
id_starts_with: ID
- isPublic: Boolean
name: String
name_contains: String
name_in: [String!]
name_not: String
name_not_in: [String!]
name_starts_with: String
- visibleInSearch: Boolean
}
type OtpData {
@@ -949,10 +941,8 @@ input UpdateEventProjectInput {
input UpdateOrganizationInput {
description: String
- isPublic: Boolean
location: String
name: String
- visibleInSearch: Boolean
}
input UpdateTaskInput {
diff --git a/src/GraphQl/Mutations/mutations.ts b/src/GraphQl/Mutations/mutations.ts
index f25abab4ef..574e7f275d 100644
--- a/src/GraphQl/Mutations/mutations.ts
+++ b/src/GraphQl/Mutations/mutations.ts
@@ -50,19 +50,11 @@ export const UPDATE_ORGANIZATION_MUTATION = gql`
$name: String
$description: String
$location: String
- $isPublic: Boolean
- $visibleInSearch: Boolean
$file: String
) {
updateOrganization(
id: $id
- data: {
- name: $name
- description: $description
- isPublic: $isPublic
- visibleInSearch: $visibleInSearch
- location: $location
- }
+ data: { name: $name, description: $description, location: $location }
file: $file
) {
_id
@@ -184,18 +176,10 @@ export const CREATE_ORGANIZATION_MUTATION = gql`
$description: String!
$location: String!
$name: String!
- $visibleInSearch: Boolean!
- $isPublic: Boolean!
$image: String
) {
createOrganization(
- data: {
- description: $description
- location: $location
- name: $name
- visibleInSearch: $visibleInSearch
- isPublic: $isPublic
- }
+ data: { description: $description, location: $location, name: $name }
file: $image
) {
_id
diff --git a/src/GraphQl/Queries/Queries.ts b/src/GraphQl/Queries/Queries.ts
index 95b149b187..5b7669234c 100644
--- a/src/GraphQl/Queries/Queries.ts
+++ b/src/GraphQl/Queries/Queries.ts
@@ -271,8 +271,6 @@ export const ORGANIZATIONS_LIST = gql`
name
description
location
- isPublic
- visibleInSearch
members {
_id
firstName
diff --git a/src/components/OrgUpdate/OrgUpdate.test.tsx b/src/components/OrgUpdate/OrgUpdate.test.tsx
index 79b076c452..87426e6a7a 100644
--- a/src/components/OrgUpdate/OrgUpdate.test.tsx
+++ b/src/components/OrgUpdate/OrgUpdate.test.tsx
@@ -32,8 +32,6 @@ describe('Testing Organization Update', () => {
description: 'This is a updated description',
location: 'This is updated location',
displayImage: new File(['hello'], 'hello.png', { type: 'image/png' }),
- isPublic: false,
- isVisible: true,
};
global.alert = jest.fn();
@@ -54,22 +52,16 @@ describe('Testing Organization Update', () => {
expect(screen.getByText('Description')).toBeInTheDocument();
expect(screen.getByText('Location')).toBeInTheDocument();
expect(screen.getByText('Display Image:')).toBeInTheDocument();
- expect(screen.getByText('Public:')).toBeInTheDocument();
- expect(screen.getByText('Visible in Search:')).toBeInTheDocument();
// Get the input fields, and btns
const name = screen.getByPlaceholderText(/Enter Organization Name/i);
const des = screen.getByPlaceholderText(/Description/i);
const location = screen.getByPlaceholderText(/Location/i);
- const isPublic = screen.getByPlaceholderText(/Public/i);
- const isVisible = screen.getByPlaceholderText(/Visible/i);
// Checking if form fields got updated according to the mock data
expect(name).toHaveValue('Palisadoes');
expect(des).toHaveValue('Equitable Access to STEM Education Jobs');
expect(location).toHaveValue('Jamaica');
- expect(isPublic).toBeChecked();
- expect(isVisible).not.toBeChecked();
});
test('Should Update organization properly', async () => {
@@ -90,8 +82,6 @@ describe('Testing Organization Update', () => {
const des = screen.getByPlaceholderText(/Description/i);
const location = screen.getByPlaceholderText(/Location/i);
const displayImage = screen.getByPlaceholderText(/Display Image/i);
- const isPublic = screen.getByPlaceholderText(/Public/i);
- const isVisible = screen.getByPlaceholderText(/Visible/i);
const saveChangesBtn = screen.getByText(/Save Changes/i);
// Emptying the text fields to add updated data
@@ -104,8 +94,6 @@ describe('Testing Organization Update', () => {
userEvent.type(des, formData.description);
userEvent.type(location, formData.location);
userEvent.upload(displayImage, formData.displayImage);
- userEvent.click(isPublic);
- userEvent.click(isVisible);
await wait();
userEvent.click(saveChangesBtn);
@@ -115,8 +103,6 @@ describe('Testing Organization Update', () => {
expect(des).toHaveValue(formData.description);
expect(location).toHaveValue(formData.location);
expect(displayImage).toBeTruthy();
- expect(isPublic).not.toBeChecked();
- expect(isVisible).toBeChecked();
});
test('Should render error occured text when Organization Could not be found', async () => {
@@ -151,8 +137,6 @@ describe('Testing Organization Update', () => {
const des = screen.getByPlaceholderText(/Description/i);
const location = screen.getByPlaceholderText(/Location/i);
const displayImage = screen.getByPlaceholderText(/Display Image/i);
- const isPublic = screen.getByPlaceholderText(/Public/i);
- const isVisible = screen.getByPlaceholderText(/Visible/i);
const saveChangesBtn = screen.getByText(/Save Changes/i);
// Emptying the text fields to add updated data
@@ -165,8 +149,6 @@ describe('Testing Organization Update', () => {
userEvent.type(des, formData.description);
userEvent.type(location, formData.location);
userEvent.upload(displayImage, formData.displayImage);
- userEvent.click(isPublic);
- userEvent.click(isVisible);
await wait();
userEvent.click(saveChangesBtn);
diff --git a/src/components/OrgUpdate/OrgUpdate.tsx b/src/components/OrgUpdate/OrgUpdate.tsx
index 16222717d6..6028f3f5ad 100644
--- a/src/components/OrgUpdate/OrgUpdate.tsx
+++ b/src/components/OrgUpdate/OrgUpdate.tsx
@@ -9,7 +9,7 @@ import { WarningAmberRounded } from '@mui/icons-material';
import { UPDATE_ORGANIZATION_MUTATION } from 'GraphQl/Mutations/mutations';
import { ORGANIZATIONS_LIST } from 'GraphQl/Queries/Queries';
import Loader from 'components/Loader/Loader';
-import { Col, Form, Row } from 'react-bootstrap';
+import { Form } from 'react-bootstrap';
import convertToBase64 from 'utils/convertToBase64';
import { errorHandler } from 'utils/errorHandler';
import type { InterfaceQueryOrganizationsListObject } from 'utils/interfaces';
@@ -34,9 +34,6 @@ function orgUpdate(props: InterfaceOrgUpdateProps): JSX.Element {
orgImage: null,
});
- const [publicchecked, setPublicChecked] = React.useState(false);
- const [visiblechecked, setVisibleChecked] = React.useState(false);
-
const [login] = useMutation(UPDATE_ORGANIZATION_MUTATION);
const { t } = useTranslation('translation', {
@@ -69,8 +66,6 @@ function orgUpdate(props: InterfaceOrgUpdateProps): JSX.Element {
orgDescrip: data.organizations[0].description,
location: data.organizations[0].location,
});
- setPublicChecked(data.organizations[0].isPublic);
- setVisibleChecked(data.organizations[0].visibleInSearch);
}
return () => {
isMounted = false;
@@ -85,8 +80,6 @@ function orgUpdate(props: InterfaceOrgUpdateProps): JSX.Element {
name: formState.orgName,
description: formState.orgDescrip,
location: formState.location,
- isPublic: publicchecked,
- visibleInSearch: visiblechecked,
file: formState.orgImage,
},
});
@@ -163,26 +156,6 @@ function orgUpdate(props: InterfaceOrgUpdateProps): JSX.Element {
});
}}
/>
-