Skip to content

Commit

Permalink
Merge pull request #438 from culturecreates/feature/issue-420
Browse files Browse the repository at this point in the history
Feature/issue 420
  • Loading branch information
AbhishekPAnil authored Jul 12, 2023
2 parents 2bfc309 + b2f4db5 commit 5fff685
Show file tree
Hide file tree
Showing 13 changed files with 454 additions and 24 deletions.
14 changes: 14 additions & 0 deletions src/locales/en/translationEn.json
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,20 @@
"description": "Are you sure you want to permanently delete this organization?",
"ok": "OK",
"cancel": "Cancel"
},
"readOnly": {
"details": "Details",
"name": "Name",
"disambiguatingDescription": "Disambiguating description",
"description": "Description",
"website": "Website",
"contact": "Contact",
"frenchContactTitle": "French contact title",
"englishContactTitle": "English contact title",
"phoneNumber": "Phone number",
"email": "Email",
"memberOf": "Member of",
"location": "Location"
}
},
"places": {
Expand Down
14 changes: 14 additions & 0 deletions src/locales/fr/transalationFr.json
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,20 @@
"description": "Êtes-vous sûr de vouloir supprimer définitivement cet organisation?",
"ok": "OK",
"cancel": "Annuler"
},
"readOnly": {
"details": "Détails",
"name": "Nom",
"disambiguatingDescription": "Description identifiante",
"description": "Description",
"website": "Site web",
"contact": "Contact",
"frenchContactTitle": "Titre du contact en français",
"englishContactTitle": "Titre du contact en anglais",
"phoneNumber": "Numéro de téléphone",
"email": "Courriel",
"memberOf": "Membre de",
"location": "Endroit"
}
},
"places": {
Expand Down
1 change: 1 addition & 0 deletions src/pages/CreateAccount/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './CreateAccount';
1 change: 1 addition & 0 deletions src/pages/Dashboard/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function Dashboard() {
const timestampRef = useRef(Date.now()).current;
const { accessToken, user } = useSelector(getUserDetails);
const [getCalendar, { currentData: currentCalendarData }] = useLazyGetCalendarQuery();

const { currentData: allCalendarsData, isLoading } = useGetAllCalendarsQuery(
{ sessionId: timestampRef },
{ skip: accessToken ? false : true },
Expand Down
32 changes: 14 additions & 18 deletions src/pages/Dashboard/EventReadOnly/EventReadOnly.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,20 @@ function EventReadOnly() {
<div>
<Row gutter={[32, 24]} className="read-only-wrapper">
<Col span={24}>
<Row>
<Col>
<Breadcrumb className="breadcrumb-item">
<Breadcrumb.Item>
<LeftOutlined style={{ marginRight: '17px' }} />
{t('dashboard.sidebar.events')}
</Breadcrumb.Item>
<Breadcrumb.Item className="breadcrumb-item">
{contentLanguageBilingual({
en: eventData?.name?.en,
fr: eventData?.name?.fr,
interfaceLanguage: user?.interfaceLanguage?.toLowerCase(),
calendarContentLanguage: calendarContentLanguage,
})}
</Breadcrumb.Item>
</Breadcrumb>
</Col>
</Row>
<Breadcrumb className="breadcrumb-item">
<Breadcrumb.Item>
<LeftOutlined style={{ marginRight: '17px' }} />
{t('dashboard.sidebar.events')}
</Breadcrumb.Item>
<Breadcrumb.Item className="breadcrumb-item">
{contentLanguageBilingual({
en: eventData?.name?.en,
fr: eventData?.name?.fr,
interfaceLanguage: user?.interfaceLanguage?.toLowerCase(),
calendarContentLanguage: calendarContentLanguage,
})}
</Breadcrumb.Item>
</Breadcrumb>
</Col>

<Col span={24}>
Expand Down
9 changes: 8 additions & 1 deletion src/pages/Dashboard/Organizations/Organizations.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import NoContent from '../../../components/NoContent/NoContent';
import ListItem from '../../../components/List/ListItem.jsx/ListItem';
import { useDeleteOrganizationMutation, useLazyGetAllOrganizationQuery } from '../../../services/organization';
import LoadingIndicator from '../../../components/LoadingIndicator/LoadingIndicator';
import { useOutletContext, useParams } from 'react-router-dom';
import { useLocation, useNavigate, useOutletContext, useParams } from 'react-router-dom';
import { contentLanguageBilingual } from '../../../utils/bilingual';
import { useSelector } from 'react-redux';
import { getUserDetails } from '../../../redux/reducer/userSlice';
Expand All @@ -25,6 +25,8 @@ const { useBreakpoint } = Grid;

function Organizations() {
const { t } = useTranslation();
const navigate = useNavigate();
const location = useLocation();
const screens = useBreakpoint();
const timestampRef = useRef(Date.now()).current;
const { calendarId } = useParams();
Expand Down Expand Up @@ -67,6 +69,10 @@ function Organizations() {
else return false;
};

const listItemHandler = (id) => {
navigate(`${location.pathname}/${id}`);
};

useEffect(() => {
getAllOrganization({
calendarId,
Expand Down Expand Up @@ -132,6 +138,7 @@ function Organizations() {
createdByFirstName={item?.creator?.firstName}
createdByLastName={item?.creator?.lastName}
artsDataLink={artsDataLinkChecker(item?.sameAs)}
listItemHandler={() => listItemHandler(item?.id)}
actions={[
adminCheckHandler() && (
<DeleteOutlined
Expand Down
Loading

0 comments on commit 5fff685

Please sign in to comment.