@openeventkit/event-site 2.0.118 → 2.0.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openeventkit/event-site",
3
3
  "description": "Event Site",
4
- "version": "2.0.118",
4
+ "version": "2.0.119",
5
5
  "author": "Tipit LLC",
6
6
  "dependencies": {
7
7
  "@fortawesome/fontawesome-svg-core": "^6.5.2",
@@ -6,6 +6,7 @@ import marketingPage from "./marketingPage";
6
6
  import lobbyPage from "./lobbyPage";
7
7
  import expoHallPage from "./expoHallPage";
8
8
  import invitationsRejectPage from "./invitationsRejectPage";
9
+ import mySchedulePage from "./mySchedulePage";
9
10
 
10
11
  const defaultPagesCollection = {
11
12
  ...collectionDefaults({
@@ -16,7 +17,8 @@ const defaultPagesCollection = {
16
17
  marketingPage,
17
18
  lobbyPage,
18
19
  expoHallPage,
19
- invitationsRejectPage
20
+ invitationsRejectPage,
21
+ mySchedulePage
20
22
  ]
21
23
  };
22
24
 
@@ -0,0 +1,36 @@
1
+ import {
2
+ booleanField,
3
+ stringField
4
+ } from "../../../fields";
5
+
6
+ import {
7
+ MY_SCHEDULE_PAGE_FILE_PATH
8
+ } from "@utils/filePath";
9
+
10
+ const mySchedulePage = {
11
+ label: "My Schedule Page",
12
+ name: "my-schedule-page",
13
+ file: MY_SCHEDULE_PAGE_FILE_PATH,
14
+ fields: [
15
+ stringField({
16
+ label: "Title",
17
+ name: "title",
18
+ default: "My Schedule",
19
+ required: true
20
+ }),
21
+ stringField({
22
+ label: "Key",
23
+ name: "key",
24
+ default: "my-schedule-main",
25
+ required: true
26
+ }),
27
+ booleanField({
28
+ label: "Needs Ticket Permission?",
29
+ name: "needsTicketAuthz",
30
+ required: true,
31
+ default: false
32
+ })
33
+ ]
34
+ };
35
+
36
+ export default mySchedulePage;
@@ -0,0 +1,8 @@
1
+
2
+ module.exports = `
3
+ type mySchedulePageJson implements Node {
4
+ title: String
5
+ key: String
6
+ needsTicketAuthz: Boolean
7
+ }
8
+ `;
@@ -2,10 +2,12 @@ const marketingPageTypeDefs = require("./marketingPage/typeDefs");
2
2
  const lobbyPageTypeDefs = require("./lobbyPage/typeDefs");
3
3
  const expoHallPageTypeDefs = require("./expoHallPage/typeDefs");
4
4
  const invitationsRejectPageTypeDefs = require("./invitationsRejectPage/typeDefs");
5
+ const mySchedulePageTypeDefs = require("./mySchedulePage/typeDefs");
5
6
 
6
7
  module.exports = [
7
8
  marketingPageTypeDefs,
8
9
  lobbyPageTypeDefs,
9
10
  expoHallPageTypeDefs,
10
- invitationsRejectPageTypeDefs
11
+ invitationsRejectPageTypeDefs,
12
+ mySchedulePageTypeDefs
11
13
  ].join("");
@@ -0,0 +1,5 @@
1
+ {
2
+ "title": "My Schedule",
3
+ "key": "my-schedule-main",
4
+ "needsTicketAuthz": true
5
+ }
@@ -22,6 +22,23 @@ import Link from "../../components/Link";
22
22
  import { titleFromPathname } from "../../utils/urlFormating";
23
23
  import {graphql} from "gatsby";
24
24
 
25
+ const mySchedulePage = ({ location, summitPhase,isLoggedUser, user, allowClick, title, key }) => {
26
+ return <SchedulePage
27
+ path="/my-schedule"
28
+ location={location}
29
+ summitPhase={summitPhase}
30
+ isLoggedIn={isLoggedUser}
31
+ user={user}
32
+ scheduleProps={{
33
+ title: title,
34
+ showSync: true,
35
+ subtitle: <Link to={"/a/schedule"}>Show Schedule</Link>
36
+ }}
37
+ schedKey={key}
38
+ allowClick={allowClick}
39
+ />;
40
+ }
41
+
25
42
  export const appQuery = graphql`
26
43
  query {
27
44
  invitationsRejectPageJson {
@@ -33,10 +50,19 @@ export const appQuery = graphql`
33
50
  alreadyAcceptedInvitationError
34
51
  alreadyRejectedInvitationError
35
52
  }
53
+ mySchedulePageJson {
54
+ title
55
+ key
56
+ needsTicketAuthz
57
+ }
36
58
  }
37
59
  `;
38
60
 
61
+
39
62
  const App = ({ isLoggedUser, user, summitPhase, allowClick = true, data }) => {
63
+
64
+ const { mySchedulePageJson } = data;
65
+
40
66
  return (
41
67
  <Location>
42
68
  {({ location }) => (
@@ -55,24 +81,12 @@ const App = ({ isLoggedUser, user, summitPhase, allowClick = true, data }) => {
55
81
  <MyTicketsPage path="/my-tickets" isLoggedIn={isLoggedUser} user={user} location={location} />
56
82
  <FullProfilePage path="/profile" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location} />
57
83
  <ExtraQuestionsPage path="/extra-questions" isLoggedIn={isLoggedUser} user={user} location={location} />
84
+ { !mySchedulePageJson.needsTicketAuthz && mySchedulePage({location, summitPhase,isLoggedUser, user, allowClick, title:mySchedulePageJson.title, key: mySchedulePageJson.key }) }
58
85
  <WithAuthzRoute path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
59
86
  <PostersPage path="/posters" trackGroupId={0} location={location} />
60
87
  <PostersPage path="/posters/:trackGroupId" location={location} />
61
88
  <PosterDetailPage path="/poster/:presentationId/" isLoggedIn={isLoggedUser} user={user} location={location} />
62
- <SchedulePage
63
- path="/my-schedule"
64
- location={location}
65
- summitPhase={summitPhase}
66
- isLoggedIn={isLoggedUser}
67
- user={user}
68
- scheduleProps={{
69
- title: "My Schedule",
70
- showSync: true,
71
- subtitle: <Link to={"/a/schedule"}>Show Schedule</Link>
72
- }}
73
- schedKey="my-schedule-main"
74
- allowClick={allowClick}
75
- />
89
+ { mySchedulePageJson.needsTicketAuthz && mySchedulePage({location, summitPhase,isLoggedUser, user, allowClick, title: mySchedulePageJson.title, key: mySchedulePageJson.key }) }
76
90
  <ShowOpenRoute path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
77
91
  <WithBadgeRoute path="/event/:eventId" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
78
92
  <EventPage path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location} />
@@ -44,6 +44,8 @@ const CMS_FONT_FILE_PATH = "/static/fonts/"
44
44
  const PAYMENTS_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/payments.json`;
45
45
  const APPLE_PAY_DOMAIN_FILE_PATH = `/static/.well-known/`
46
46
  const APPLE_PAY_DOMAIN_FILE_NAME = `apple-developer-merchantid-domain-association`;
47
+ const MY_SCHEDULE_PAGE_DIR_PATH = `${STATIC_CONTENT_DIR_PATH}/my-schedule-page`;
48
+ const MY_SCHEDULE_PAGE_FILE_PATH = `${MY_SCHEDULE_PAGE_DIR_PATH}/index.json`;
47
49
 
48
50
  exports.REQUIRED_DIR_PATHS = [
49
51
  DATA_DIR_PATH,
@@ -55,8 +57,10 @@ exports.REQUIRED_DIR_PATHS = [
55
57
  LOBBY_PAGE_DIR_PATH,
56
58
  INVITATIONS_REJECT_PAGE_FILE_PATH,
57
59
  NAVBAR_DIR_PATH,
58
- FOOTER_DIR_PATH
60
+ FOOTER_DIR_PATH,
61
+ MY_SCHEDULE_PAGE_FILE_PATH
59
62
  ];
63
+
60
64
  exports.STATIC_CONTENT_DIR_PATH = STATIC_CONTENT_DIR_PATH;
61
65
  exports.PAGES_DIR_PATH = PAGES_DIR_PATH;
62
66
  exports.CONTENT_PAGES_PATH_NAME = CONTENT_PAGES_PATH_NAME;
@@ -95,3 +99,4 @@ exports.CMS_FONT_FILE_PATH = CMS_FONT_FILE_PATH;
95
99
  exports.PAYMENTS_FILE_PATH = PAYMENTS_FILE_PATH;
96
100
  exports.APPLE_PAY_DOMAIN_FILE_PATH = APPLE_PAY_DOMAIN_FILE_PATH;
97
101
  exports.APPLE_PAY_DOMAIN_FILE_NAME = APPLE_PAY_DOMAIN_FILE_NAME;
102
+ exports.MY_SCHEDULE_PAGE_FILE_PATH = MY_SCHEDULE_PAGE_FILE_PATH;