Skip to content

Commit

Permalink
Merge pull request #465 from culturecreates/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sahalali authored Aug 7, 2023
2 parents b324ad0 + 610010b commit a0e4420
Show file tree
Hide file tree
Showing 80 changed files with 17,857 additions and 24,360 deletions.
6 changes: 4 additions & 2 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ REACT_APP_API_URL="https://api.cms.footlight.io"
REACT_APP_DEEPL_URL="https://www.deepl.com/translator#"
REACT_APP_HELP_EN_URL="https://footlight.gitbook.io/footlight-cms-guide"
REACT_APP_HELP_FR_URL="https://footlight.gitbook.io/guide-footlight-cms"
REACT_APP_FEATURE_FLAG_QUICK_CREATE_ORGANIZATION=false
REACT_APP_ENV="production"
REACT_APP_FEATURE_FLAG_QUICK_CREATE_ORGANIZATION=true
REACT_APP_FEATURE_FLAG_ORG_PERSON_PLACE_VIEW=true
REACT_APP_FEATURE_FLAG_QUICK_CREATE_PEOPLE_PLACE=true
REACT_APP_ENV="production"
2 changes: 2 additions & 0 deletions .env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ REACT_APP_DEEPL_URL="https://www.deepl.com/translator#"
REACT_APP_HELP_EN_URL="https://footlight.gitbook.io/footlight-cms-guide"
REACT_APP_HELP_FR_URL="https://footlight.gitbook.io/guide-footlight-cms"
REACT_APP_FEATURE_FLAG_QUICK_CREATE_ORGANIZATION=true
REACT_APP_FEATURE_FLAG_ORG_PERSON_PLACE_VIEW=true
REACT_APP_FEATURE_FLAG_QUICK_CREATE_PEOPLE_PLACE=true
REACT_APP_ENV="staging"
38,168 changes: 13,927 additions & 24,241 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"antd": "^4.24.0",
"async-mutex": "^0.4.0",
"compressorjs": "^1.1.1",
"env-cmd": "^10.1.0",
"i18next": "^22.0.5",
"js-cookie": "^3.0.1",
"moment": "^2.29.4",
"rc-year-calendar": "^1.0.2",
"moment-timezone": "^0.5.41",
"rc-year-calendar": "^1.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^12.0.0",
"react-places-autocomplete": "^7.3.0",
"react-quill": "^2.0.0",
"react-redux": "^8.0.5",
"react-router-dom": "^6.4.3",
Expand All @@ -28,6 +30,7 @@
},
"scripts": {
"start": "env-cmd -f .env.staging react-scripts start",
"start:develop": "env-cmd -f .env.develop react-scripts start",
"start:staging": "env-cmd -f .env.staging react-scripts start",
"start:production": "env-cmd -f .env.production react-scripts start",
"build": "env-cmd -f .env.staging react-scripts build",
Expand Down
3 changes: 2 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand All @@ -25,6 +25,7 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Footlight Calendar</title>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA34hPcJ7CKANXj1ZPcEMX5d89563wexsw&libraries=places"></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
Binary file added src/assets/icons/dot-bullet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/organization-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions src/components/ArtsDataInfo/ArtsDataInfo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import './artsDataInfo.css';
import { Badge, Col, Row } from 'antd';
import { LinkOutlined } from '@ant-design/icons';

function ArtsDataInfo(props) {
const { artsDataLink, name, disambiguatingDescription } = props;
return (
<Row className="arts-data-info" align={'middle'} justify={'space-between'}>
<Col span={20}>
<Row gutter={[8, 0]} align={'middle'}>
<Col
className="arts-data-title"
onClick={() => window.open(`${artsDataLink}`, '_blank', 'noopener,noreferrer')}>
<span style={{ textDecoration: 'underline' }}>Artsdata</span>
</Col>
<Col className="arts-data-name">
<span>{name}</span>
</Col>
<Col>
<span>
<Badge color="#1B3DE6" style={{ height: '2px', width: '2px' }} />
</span>
</Col>
<Col className="arts-data-description">{disambiguatingDescription}</Col>
</Row>
</Col>
<Col onClick={() => window.open(`${artsDataLink}`, '_blank', 'noopener,noreferrer')}>
<span>
<LinkOutlined />
</span>
</Col>
</Row>
);
}

export default ArtsDataInfo;
20 changes: 20 additions & 0 deletions src/components/ArtsDataInfo/artsDataInfo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.arts-data-info {
background-color: #e3e8ff;
color: #0f0e98;
min-height: 32px;
font-size: 12px;
font-family: Roboto;
font-style: normal;
font-weight: 400;
padding: 8px;
border-radius: 4px;
}

.arts-data-info .arts-data-title {
cursor: pointer;
}

.arts-data-info .ant-badge-status-dot {
height: 2px;
width: 2px;
}
1 change: 1 addition & 0 deletions src/components/ArtsDataInfo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './ArtsDataInfo';
28 changes: 28 additions & 0 deletions src/components/Breadcrumbs/Breadcrumbs.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from 'react';
import './breadCrumbs.css';
import { useMatches, useNavigate } from 'react-router-dom';
import { Breadcrumb } from 'antd';
import { LeftOutlined } from '@ant-design/icons';

function Breadcrumbs(props) {
const { name } = props;
let matches = useMatches();
const navigate = useNavigate();

let crumbs = matches.filter((match) => Boolean(match.handle?.crumb)).map((match) => match.handle.crumb(match.data));

return (
<Breadcrumb className="breadcrumbs">
{crumbs.map((crumb, index) => (
<Breadcrumb.Item key={index} className="breadcrumb-item cursor" onClick={() => navigate(-1)}>
<LeftOutlined style={{ marginRight: '17px' }} />
{crumb}
</Breadcrumb.Item>
))}

{name && <Breadcrumb.Item className="breadcrumb-item">{name}</Breadcrumb.Item>}
</Breadcrumb>
);
}

export default Breadcrumbs;
18 changes: 18 additions & 0 deletions src/components/Breadcrumbs/breadCrumbs.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.breadcrumbs {
font-family: 'Roboto';
font-style: normal;
font-weight: 600;
font-size: 16px;
}

.breadcrumbs .breadcrumb-item {
color: #0f0e98;
}

.breadcrumbs .ant-breadcrumb-separator {
color: #222732;
}

.breadcrumbs .cursor {
cursor: pointer;
}
1 change: 1 addition & 0 deletions src/components/Breadcrumbs/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './Breadcrumbs';
6 changes: 5 additions & 1 deletion src/components/Card/Common/Event.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import React from 'react';
import { Row, Col } from 'antd';
import './event.css';

function Event(props) {
const { title, required, hidden } = props;
return (
<Col flex={'780px'} className="add-event-section-col" style={{ display: hidden && 'none' }}>
<Col
className="add-event-section-col"
flex={'780px'}
style={{ display: hidden && 'none', borderRadius: '4px', backgroundColor: '#ffffff' }}>
<Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }} className="events-content">
<Col flex={'423px'}>
<div className="add-event-section-wrapper">
Expand Down
6 changes: 6 additions & 0 deletions src/components/Card/Common/event.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.add-event-section-col {
padding: 24px;
background-color: #ffffff;
padding-left: 24px;
padding-right: 24px;
}
2 changes: 1 addition & 1 deletion src/components/List/Events/list.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
display: flex;
flex-direction: column;
font-size: 16px;
gap: 8px;
gap: 4px;
}

.event-list-wrapper .event-list-description-name {
Expand Down
113 changes: 113 additions & 0 deletions src/components/List/ListItem.jsx/ListItem.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
import React from 'react';
import './listItem.css';
import { useTranslation } from 'react-i18next';
import { List } from 'antd';
import { LinkOutlined } from '@ant-design/icons';
import moment from 'moment-timezone';
import i18n from 'i18next';
import Username from '../../Username/Username';

import ArtsDataLink from '../../Tags/ArtsDataLink/ArtsDataLink';

function ListItem(props) {
const {
id,
title,
description,
logo,
defaultLogo,
artsDataLink,
createdDate,
createdByFirstName,
createdByLastName,
updatedDate,
updatedByFirstName,
updatedByLastName,
scheduleTimezone,
listItemHandler,
actions,
} = props;
const { t } = useTranslation();
const dateFormat = 'DD-MMM-YYYY';
const lang = i18n.language;
return (
<List.Item className="event-list-item-wrapper" key={id} actions={actions} style={{ padding: '20px 0px' }}>
<List.Item.Meta
className="event-list-item-meta"
onClick={listItemHandler}
avatar={
logo ? (
<div className="event-list-image-wrapper" style={{ height: '40px', width: '40px' }}>
<img src={logo} className="event-list-image" />
</div>
) : (
<div
className="event-list-image-wrapper"
style={{
height: '40px',
width: '40px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
borderRadius: '4px',
backgroundColor: '#E3E8FF',
}}>
{defaultLogo}
</div>
)
}
description={
<div className="event-list-description">
<span className="event-list-description-name">{title}</span>
<span className="event-list-description-place" style={{ width: '100%' }}>
{description}
</span>
</div>
}
/>
<List.Item.Meta
className="event-status-list-item"
title={
artsDataLink && (
<ArtsDataLink onClick={() => window.open(`${artsDataLink}`, '_blank', 'noopener,noreferrer')}>
<span style={{ textDecoration: 'underline' }}>Artsdata</span>
<LinkOutlined />
</ArtsDataLink>
)
}
description={
<div className="event-list-status">
<span className="event-list-status-created-by">
{t('dashboard.events.list.createdBy')}&nbsp;
{moment
.tz(createdDate, scheduleTimezone ?? 'Canada/Eastern')
.locale(lang)
.format(dateFormat)
?.toUpperCase()}
&nbsp;
{t('dashboard.events.list.by')}&nbsp;
<Username firstName={createdByFirstName} lastName={createdByLastName} />
</span>
{updatedByFirstName && updatedByLastName ? (
<span className="event-list-status-updated-by">
{t('dashboard.events.list.updatedBy')}&nbsp;
{moment
.tz(updatedDate, scheduleTimezone ?? 'Canada/Eastern')
.locale(lang)
.format(dateFormat)
?.toUpperCase()}
&nbsp;
{t('dashboard.events.list.by')}&nbsp;
<Username firstName={updatedByFirstName} lastName={updatedByLastName} />
</span>
) : (
<></>
)}
</div>
}
/>
</List.Item>
);
}

export default ListItem;
1 change: 1 addition & 0 deletions src/components/List/ListItem.jsx/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './ListItem';
Empty file.
24 changes: 21 additions & 3 deletions src/components/List/SelectionItem/SelectionItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ function SelectionItem(props) {
accessibility,
openingHours,
calendarContentLanguage,
artsDataLink,
} = props;
const { t } = useTranslation();
const { user } = useSelector(getUserDetails);

return (
<div
className="selection-item-wrapper"
Expand Down Expand Up @@ -69,7 +69,7 @@ function SelectionItem(props) {
<Col>
<div className="selection-item-sub-content">
<address>
{postalAddress?.streetAddress && (
{(postalAddress?.streetAddress?.en || postalAddress?.streetAddress?.fr) && (
<span>
{contentLanguageBilingual({
en: postalAddress?.streetAddress?.en,
Expand All @@ -80,7 +80,7 @@ function SelectionItem(props) {
,&nbsp;
</span>
)}
<br />
{(postalAddress?.streetAddress?.en || postalAddress?.streetAddress?.fr) && <br />}
{postalAddress?.addressLocality && (
<span>
{contentLanguageBilingual({
Expand Down Expand Up @@ -156,6 +156,24 @@ function SelectionItem(props) {
)}
</Row>
)}
{artsDataLink && (
<div className="arts-data-link">
<div className="arts-data-link-content">
<div className="arts-data-link-first-line">
<span
style={{ textDecoration: 'underline', cursor: 'pointer' }}
onClick={() => window.open(`${artsDataLink}`, '_blank', 'noopener,noreferrer')}>
Artsdata
</span>
{name && <span>{name}</span>}
{/* {description && <Badge color="#1B3DE6" size="small" />} */}
</div>
{description && <span>{description}</span>}
</div>

<LinkOutlined style={{ fontSize: '16px' }} />
</div>
)}
</div>
);
}
Expand Down
Loading

0 comments on commit a0e4420

Please sign in to comment.