Skip to content

Commit

Permalink
Merge branch 'PalisadoesFoundation:develop' into userProfile
Browse files Browse the repository at this point in the history
  • Loading branch information
skbhagat0502 authored Nov 16, 2023
2 parents 89ee315 + 63b2269 commit ea6f108
Show file tree
Hide file tree
Showing 18 changed files with 353 additions and 77 deletions.
20 changes: 18 additions & 2 deletions public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
"login_to_admin_portal": "Admin Portal Login",
"OR": "OR"
},
"latestEvents": {
"eventCardTitle": "Upcoming Events",
"eventCardSeeAll": "See All",
"noEvents": "No Upcoming Events"
},
"latestPosts": {
"latestPostsTitle": "Latest Posts",
"seeAllLink": "See All",
"noPostsCreated": "No Posts Created"
},
"listNavbar": {
"talawa_portal": "Talawa Admin Portal",
"roles": "Roles",
Expand Down Expand Up @@ -75,6 +85,7 @@
"searchByName": "Search By Name",
"organizations": "Organizations",
"createOrganization": "Create Organization",
"createSampleOrganization": "Create Sample Organization",
"description": "Description",
"location": "Location",
"isPublic": "Is Public",
Expand All @@ -85,18 +96,22 @@
"filter": "Filter",
"cancel": "Cancel",
"noOrgErrorTitle": "Organizations Not Found",
"sampleOrgDuplicate": "Only one sample organization allowed",
"noOrgErrorDescription": "Please create an organization through dashboard",
"endOfResults": "End of results",
"manageFeatures": "Manage Features",
"manageFeaturesInfo": "Creation Successful ! Please select features that you want to enale for this organization from the plugin store.",
"goToStore": "Go to Plugin Store",
"enableEverything": "Enable Everything",
"noResultsFoundFor": "No results found for "
"noResultsFoundFor": "No results found for",
"OR": "OR",
"sampleOrgSuccess": "Sample Organization Successfully Created"
},
"orgListCard": {
"admins": "Admins",
"members": "Members",
"manage": "Manage"
"manage": "Manage",
"sampleOrganization": "Sample Organization"
},
"paginationList": {
"rowsPerPage": "rows per page",
Expand Down Expand Up @@ -404,6 +419,7 @@
},
"deleteOrg": {
"deleteOrganization": "Delete Organization",
"deleteSampleOrganization": "Delete Sample Organization",
"deleteMsg": "Do you want to delete this organization?",
"cancel": "Cancel",
"confirmDelete": "Confirm Delete",
Expand Down
16 changes: 14 additions & 2 deletions public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
"login_to_admin_portal": "Connexion à l'administration du portail",
"OR": "OU"
},
"latestEvents": {
"eventCardTitle": "Événements à venir",
"eventCardSeeAll": "Voir Tout",
"noEvents": "Aucun événement à venir"
},
"listNavbar": {
"talawa_portal": "Portail D'Administrateur Talawa",
"roles": "Les rôles",
Expand Down Expand Up @@ -75,6 +80,7 @@
"searchByName": "Rechercher par nom",
"organizations": "Organisations",
"createOrganization": "Créer une organisation",
"createSampleOrganization": "Créer une organisation d'exemple",
"description": "La description",
"location": "Emplacement",
"isPublic": "Est publique",
Expand All @@ -86,14 +92,19 @@
"cancel": "Annuler",
"endOfResults": "Fin des résultats",
"noOrgErrorTitle": "Organisations non trouvées",
"sampleOrgDuplicate": "Seule une organisation d'exemple est autorisée.",
"noOrgErrorDescription": "Veuillez créer une organisation via le tableau de bord",
"noResultsFoundFor": "Aucun résultat trouvé pour "
"noResultsFoundFor": "Aucun résultat trouvé pour ",
"OR": "OU",
"sampleOrgSuccess": "Organisation d'exemple créée avec succès"
},
"orgListCard": {
"admins": "Administrateurs",
"members": "Membres",
"manage": "Faire en sorte"
"manage": "Faire en sorte",
"sampleOrganization": "Organisation d'exemple"
},

"paginationList": {
"rowsPerPage": "lignes par page",
"all": "Tout"
Expand Down Expand Up @@ -400,6 +411,7 @@
},
"deleteOrg": {
"deleteOrganization": "Supprimer l'organisation",
"deleteSampleOrganization": "Supprimer l'organisation d'exemple",
"deleteMsg": "Voulez-vous supprimer cette organisation ?",
"cancel": "Annuler",
"confirmDelete": "Confirmer la suppression",
Expand Down
15 changes: 13 additions & 2 deletions public/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
"login_to_admin_portal": "एडमिन पोर्टल लॉगिन",
"OR": "या"
},
"latestEvents": {
"eventCardTitle": "आगामी घटनाएँ",
"eventCardSeeAll": "सभी देखें",
"noEvents": "कोई आगामी घटनाएँ नहीं"
},
"listNavbar": {
"talawa_portal": "तलावा प्रशासन पोर्टल",
"roles": "भूमिकाएँ",
Expand Down Expand Up @@ -75,6 +80,7 @@
"searchByName": "नाम से खोजें",
"organizations": "संगठन",
"createOrganization": "संगठन बनाएं",
"createSampleOrganization": " सैंपल संगठन बनाएं",
"description": "विवरण",
"location": "स्थान",
"isPublic": "सार्वजनिक है",
Expand All @@ -86,13 +92,17 @@
"cancel": "रद्द करना",
"endOfResults": "परिणामों का अंत",
"noOrgErrorTitle": "संगठन नहीं मिला",
"sampleOrgDuplicate": "केवल एक नमूना संगठन को अनुमति दी गई",
"noOrgErrorDescription": "कृपया डैशबोर्ड के माध्यम से एक संगठन बनाएं",
"noResultsFoundFor": "के लिए कोई परिणाम नहीं मिला "
"noResultsFoundFor": "के लिए कोई परिणाम नहीं मिला ",
"OR": "या",
"sampleOrgSuccess": "सैंपल संगठन सफलतापूर्वक बनाया गया"
},
"orgListCard": {
"admins": "व्यवस्थापक",
"members": "सदस्य",
"manage": "प्रबंधित करना"
"manage": "प्रबंधित करना",
"sampleOrganization": "सैंपल संगठन"
},
"paginationList": {
"rowsPerPage": "प्रति पृष्ठ पंक्तियाँ",
Expand Down Expand Up @@ -400,6 +410,7 @@
},
"deleteOrg": {
"deleteOrganization": "संगठन हटाएं",
"deleteSampleOrganization": "सैंपल संगठन को हटाएं",
"deleteMsg": "क्या आप इस संगठन को हटाना चाहते हैं?",
"cancel": "रद्द करना",
"confirmDelete": "हटाने की पुष्टि करें",
Expand Down
15 changes: 13 additions & 2 deletions public/locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
"login_to_admin_portal": "Inicio de sesión en el portal de administración",
"OR": "O"
},
"latestEvents": {
"eventCardTitle": "Próximos Eventos",
"eventCardSeeAll": "Ver Todos",
"noEvents": "No Hay Eventos Próximos"
},
"listNavbar": {
"talawa_portal": "Portal De Administración Talawa",
"roles": "Roles",
Expand Down Expand Up @@ -75,6 +80,7 @@
"searchByName": "Buscar por nombre",
"organizations": "Organizaciones",
"createOrganization": "Crear organización",
"createSampleOrganization": "Crear organización de muestra",
"description": "Descripción",
"location": "Ubicación",
"isPublic": "Es público",
Expand All @@ -86,13 +92,17 @@
"cancel": "Cancelar",
"endOfResults": "Fin de los resultados",
"noOrgErrorTitle": "Organizaciones no encontradas",
"sampleOrgDuplicate": "Solo se permite una organización de muestra",
"noOrgErrorDescription": "Por favor, crea una organización a través del panel de control",
"noResultsFoundFor": "No se encontraron resultados para "
"noResultsFoundFor": "No se encontraron resultados para ",
"OR": "O",
"sampleOrgSuccess": "Organización de ejemplo creada exitosamente"
},
"orgListCard": {
"admins": "Administradores",
"members": "Miembros",
"manage": "Administrar"
"manage": "Administrar",
"sampleOrganization": "Organización de muestra"
},
"paginationList": {
"rowsPerPage": "filas por página",
Expand Down Expand Up @@ -400,6 +410,7 @@
},
"deleteOrg": {
"deleteOrganization": "Eliminar organización",
"deleteSampleOrganization": "Eliminar organización de muestra",
"deleteMsg": "¿Desea eliminar esta organización?",
"cancel": "Cancelar",
"confirmDelete": "Confirmar eliminación",
Expand Down
15 changes: 13 additions & 2 deletions public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
"login_to_admin_portal": " 管理员门户登录 ",
"OR": "或者"
},
"latestEvents": {
"eventCardTitle": "即将举行的活动",
"eventCardSeeAll": "查看全部",
"noEvents": "暂无即将举行的活动"
},
"listNavbar": {
"talawa_portal": "塔拉瓦管理門戶",
"roles": "角色",
Expand Down Expand Up @@ -75,6 +80,7 @@
"searchByName": "按名稱搜索",
"organizations": "组织",
"createOrganization": "創建組織",
"createSampleOrganization": "创建示范组织",
"description": "描述",
"location": "地點",
"isPublic": "是否公開",
Expand All @@ -86,13 +92,17 @@
"cancel": "取消",
"endOfResults": "結果結束",
"noOrgErrorTitle": "找不到组织",
"sampleOrgDuplicate": "只允许一个样本组织",
"noOrgErrorDescription": "请通过仪表板创建一个组织",
"noResultsFoundFor": "未找到结果 "
"noResultsFoundFor": "未找到结果 ",
"OR": "或者",
"sampleOrgSuccess": "示例组织成功创建"
},
"orgListCard": {
"admins": "管理員",
"members": "成員",
"manage": "管理"
"manage": "管理",
"sampleOrganization": "示例组织"
},
"paginationList": {
"rowsPerPage": "每頁行數",
Expand Down Expand Up @@ -400,6 +410,7 @@
},
"deleteOrg": {
"deleteOrganization": "删除组织",
"deleteSampleOrganization": "删除示范组织",
"deleteMsg": "您是否要删除此组织?",
"cancel": "取消",
"confirmDelete": "确认删除",
Expand Down
12 changes: 12 additions & 0 deletions src/GraphQl/Mutations/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,18 @@ export const UPDATE_USER_ROLE_IN_ORG_MUTATION = gql`
}
`;

export const CREATE_SAMPLE_ORGANIZATION_MUTATION = gql`
mutation {
createSampleOrganization
}
`;

export const REMOVE_SAMPLE_ORGANIZATION_MUTATION = gql`
mutation {
removeSampleOrganization
}
`;

export const CREATE_DIRECT_CHAT = gql`
mutation createDirectChat($userIds: [ID!]!, $organizationId: ID!) {
createDirectChat(
Expand Down
6 changes: 6 additions & 0 deletions src/GraphQl/Queries/Queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -825,3 +825,9 @@ export const DIRECT_CHATS_LIST = gql`
}
}
`;

export const IS_SAMPLE_ORGANIZATION_QUERY = gql`
query ($isSampleOrganizationId: ID!) {
isSampleOrganization(id: $isSampleOrganizationId)
}
`;
1 change: 1 addition & 0 deletions src/assets/svgs/flask.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/components/CheckIn/CheckInModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import { ToastContainer } from 'react-toastify';
import { LocalizationProvider } from '@mui/x-date-pickers';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { checkInQueryMock } from './mocks';
import { StaticMockLink } from 'utils/StaticMockLink';

const link = new StaticMockLink(checkInQueryMock, true);

describe('Testing Check In Attendees Modal', () => {
const props = {
Expand All @@ -21,7 +24,7 @@ describe('Testing Check In Attendees Modal', () => {

test('The modal should be rendered, and all the fetched users should be shown properly and user filtering should work', async () => {
const { queryByText, queryByLabelText } = render(
<MockedProvider addTypename={false} mocks={checkInQueryMock}>
<MockedProvider addTypename={false} link={link}>
<BrowserRouter>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<Provider store={store}>
Expand Down
1 change: 1 addition & 0 deletions src/components/CheckIn/CheckInModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const CheckInModal = (props: InterfaceModalProp): JSX.Element => {
});

useEffect(() => {
checkInRefetch();
if (checkInLoading) setTableData([]);
else
setTableData(
Expand Down
5 changes: 4 additions & 1 deletion src/components/CheckIn/CheckInWrapper.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import { ToastContainer } from 'react-toastify';
import { LocalizationProvider } from '@mui/x-date-pickers';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { checkInQueryMock } from './mocks';
import { StaticMockLink } from 'utils/StaticMockLink';

const link = new StaticMockLink(checkInQueryMock, true);

describe('Testing CheckIn Wrapper', () => {
const props = {
Expand All @@ -19,7 +22,7 @@ describe('Testing CheckIn Wrapper', () => {

test('The button to open and close the modal should work properly', async () => {
const { queryByText } = render(
<MockedProvider addTypename={false} mocks={checkInQueryMock}>
<MockedProvider addTypename={false} link={link}>
<BrowserRouter>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<Provider store={store}>
Expand Down
Loading

0 comments on commit ea6f108

Please sign in to comment.