Browse Source

Moved planning event display in own screen

keplyx 4 years ago
parent
commit
128b398aac

+ 5
- 1
components/BaseContainer.js View File

@@ -14,6 +14,7 @@ import {NavigationActions} from "react-navigation";
14 14
 type Props = {
15 15
     navigation: Object,
16 16
     headerTitle: string,
17
+    headerSubtitle: string,
17 18
     headerRightButton: React.Node,
18 19
     children: React.Node,
19 20
     hasTabs: boolean,
@@ -37,6 +38,7 @@ export default class BaseContainer extends React.Component<Props, State> {
37 38
         hasSideMenu: true,
38 39
         enableRotation: false,
39 40
         hideHeaderOnLandscape: false,
41
+        headerSubtitle: '',
40 42
     };
41 43
     willBlurSubscription: function;
42 44
     willFocusSubscription: function;
@@ -96,7 +98,9 @@ export default class BaseContainer extends React.Component<Props, State> {
96 98
             <Container>
97 99
                 {this.state.isHeaderVisible ?
98 100
                     <CustomHeader
99
-                        navigation={this.props.navigation} title={this.props.headerTitle}
101
+                        navigation={this.props.navigation}
102
+                        title={this.props.headerTitle}
103
+                        subtitle={this.props.headerSubtitle}
100 104
                         leftButton={
101 105
                             <Touchable
102 106
                                 style={{padding: 6}}

+ 36
- 24
components/CustomHeader.js View File

@@ -1,14 +1,14 @@
1 1
 // @flow
2 2
 
3 3
 import * as React from "react";
4
-import {Body, Header, Input, Item, Left, Right, Title} from "native-base";
4
+import {Body, Header, Input, Item, Left, Right, Subtitle, Title} from "native-base";
5 5
 import {Platform, StyleSheet, View} from "react-native";
6 6
 import {getStatusBarHeight} from "react-native-status-bar-height";
7 7
 import Touchable from 'react-native-platform-touchable';
8 8
 import ThemeManager from "../utils/ThemeManager";
9 9
 import CustomMaterialIcon from "./CustomMaterialIcon";
10 10
 import i18n from "i18n-js";
11
-import { NavigationActions } from 'react-navigation';
11
+import {NavigationActions} from 'react-navigation';
12 12
 
13 13
 type Props = {
14 14
     hasBackButton: boolean,
@@ -18,6 +18,7 @@ type Props = {
18 18
     leftButton: React.Node,
19 19
     rightButton: React.Node,
20 20
     title: string,
21
+    subtitle: string,
21 22
     navigation: Object,
22 23
     hasTabs: boolean,
23 24
 };
@@ -38,6 +39,7 @@ export default class CustomHeader extends React.Component<Props> {
38 39
         searchCallback: () => null,
39 40
         shouldFocusSearchBar: false,
40 41
         title: '',
42
+        subtitle: '',
41 43
         leftButton: <View/>,
42 44
         rightButton: <View/>,
43 45
         hasTabs: false,
@@ -52,23 +54,39 @@ export default class CustomHeader extends React.Component<Props> {
52 54
 
53 55
     getSearchBar() {
54 56
         return (
55
-            <Item
56
-                style={{
57
-                    width: '100%',
58
-                    marginBottom: 7
57
+            <Body>
58
+                <Item
59
+                    style={{
60
+                        width: '100%',
61
+                        marginBottom: 7
62
+                    }}>
63
+                    <CustomMaterialIcon
64
+                        icon={'magnify'}
65
+                        color={ThemeManager.getCurrentThemeVariables().toolbarBtnColor}/>
66
+                    <Input
67
+                        ref="searchInput"
68
+                        placeholder={i18n.t('proximoScreen.search')}
69
+                        placeholderTextColor={ThemeManager.getCurrentThemeVariables().toolbarPlaceholderColor}
70
+                        onChangeText={(text) => this.props.searchCallback(text)}/>
71
+                </Item>
72
+            </Body>
73
+        );
74
+    }
75
+
76
+    getHeaderTitle() {
77
+        return (
78
+            <Body>
79
+                <Title style={{
80
+                    color: ThemeManager.getCurrentThemeVariables().toolbarTextColor
59 81
                 }}>
60
-                <CustomMaterialIcon
61
-                    icon={'magnify'}
62
-                    color={ThemeManager.getCurrentThemeVariables().toolbarBtnColor}/>
63
-                <Input
64
-                    ref="searchInput"
65
-                    placeholder={i18n.t('proximoScreen.search')}
66
-                    placeholderTextColor={ThemeManager.getCurrentThemeVariables().toolbarPlaceholderColor}
67
-                    onChangeText={(text) => this.props.searchCallback(text)}/>
68
-            </Item>
82
+                    {this.props.title}
83
+                </Title>
84
+                {this.props.subtitle !== '' ? <Subtitle>{this.props.subtitle}</Subtitle> : null}
85
+            </Body>
69 86
         );
70 87
     }
71 88
 
89
+
72 90
     render() {
73 91
         let button;
74 92
         // Does the app have a back button or a burger menu ?
@@ -93,14 +111,9 @@ export default class CustomHeader extends React.Component<Props> {
93 111
                 <Left style={{flex: 0}}>
94 112
                     {button}
95 113
                 </Left>
96
-                <Body>
97
-                    {this.props.hasSearchField ?
98
-                        this.getSearchBar() :
99
-                        <Title style={{
100
-                            paddingLeft: 10,
101
-                            color: ThemeManager.getCurrentThemeVariables().toolbarTextColor
102
-                        }}>{this.props.title}</Title>}
103
-                </Body>
114
+                {this.props.hasSearchField ?
115
+                    this.getSearchBar() :
116
+                    this.getHeaderTitle()}
104 117
                 <Right style={{flex: this.props.hasSearchField ? 0 : 1}}>
105 118
                     {this.props.rightButton}
106 119
                 </Right>
@@ -108,7 +121,6 @@ export default class CustomHeader extends React.Component<Props> {
108 121
     }
109 122
 };
110 123
 
111
-
112 124
 // Fix header in status bar on Android
113 125
 const styles = StyleSheet.create({
114 126
     header: {

+ 33
- 2
navigation/MainTabNavigator.js View File

@@ -4,6 +4,7 @@ import {createMaterialBottomTabNavigator} from "react-navigation-material-bottom
4 4
 
5 5
 import HomeScreen from '../screens/HomeScreen';
6 6
 import PlanningScreen from '../screens/PlanningScreen';
7
+import PlanningDisplayScreen from '../screens/PlanningDisplayScreen';
7 8
 import ProxiwashScreen from '../screens/Proxiwash/ProxiwashScreen';
8 9
 import ProxiwashAboutScreen from '../screens/Proxiwash/ProxiwashAboutScreen';
9 10
 import ProximoMainScreen from '../screens/Proximo/ProximoMainScreen';
@@ -57,10 +58,40 @@ const ProxiwashStack = createStackNavigator({
57 58
         },
58 59
     });
59 60
 
61
+const PlanningStack = createStackNavigator({
62
+        PlanningScreen: {screen: PlanningScreen},
63
+        PlanningDisplayScreen: {screen: PlanningDisplayScreen},
64
+    },
65
+    {
66
+        initialRouteName: "PlanningScreen",
67
+        mode: 'card',
68
+        headerMode: "none",
69
+        defaultNavigationOptions: {
70
+            gestureEnabled: true,
71
+            cardOverlayEnabled: true,
72
+            ...TransitionPresets.ModalPresentationIOS,
73
+        },
74
+    });
75
+
76
+const HomeStack = createStackNavigator({
77
+        HomeScreen: {screen: HomeScreen},
78
+        PlanningDisplayScreen: {screen: PlanningDisplayScreen},
79
+    },
80
+    {
81
+        initialRouteName: "HomeScreen",
82
+        mode: 'card',
83
+        headerMode: "none",
84
+        defaultNavigationOptions: {
85
+            gestureEnabled: true,
86
+            cardOverlayEnabled: true,
87
+            ...TransitionPresets.ModalPresentationIOS,
88
+        },
89
+    });
90
+
60 91
 function createMaterialBottomTabNavigatorWithInitialRoute(initialRoute: string) {
61 92
     return createMaterialBottomTabNavigator({
62
-        Home: {screen: HomeScreen},
63
-        Planning: {screen: PlanningScreen},
93
+        Home: HomeStack,
94
+        Planning: PlanningStack,
64 95
         Proxiwash: ProxiwashStack,
65 96
         Proximo: ProximoStack,
66 97
         Planex: {

+ 1
- 1
screens/HomeScreen.js View File

@@ -310,7 +310,7 @@ export default class HomeScreen extends FetchedDataSectionList {
310 310
                 </Text>;
311 311
         } else
312 312
             subtitle = i18n.t('homeScreen.dashboard.todayEventsSubtitleNA');
313
-        let clickAction = () => this.props.navigation.navigate('Planning');
313
+        let clickAction = () => this.props.navigation.navigate('PlanningDisplayScreen', {data: displayEvent});
314 314
 
315 315
         let displayEvent = this.getDisplayEvent(futureEvents);
316 316
 

+ 63
- 0
screens/PlanningDisplayScreen.js View File

@@ -0,0 +1,63 @@
1
+// @flow
2
+
3
+import * as React from 'react';
4
+import {Image} from 'react-native';
5
+import {Container, Content, H1, H3, View} from 'native-base';
6
+import CustomHeader from "../components/CustomHeader";
7
+import ThemeManager from "../utils/ThemeManager";
8
+import HTML from "react-native-render-html";
9
+import {Linking} from "expo";
10
+import PlanningEventManager from '../utils/PlanningEventManager';
11
+import i18n from 'i18n-js';
12
+
13
+type Props = {
14
+    navigation: Object,
15
+};
16
+
17
+function openWebLink(link) {
18
+    Linking.openURL(link).catch((err) => console.error('Error opening link', err));
19
+}
20
+
21
+/**
22
+ * Class defining an about screen. This screen shows the user information about the app and it's author.
23
+ */
24
+export default class PlanningDisplayScreen extends React.Component<Props> {
25
+
26
+    render() {
27
+        const nav = this.props.navigation;
28
+        const displayData = nav.getParam('data', []);
29
+        return (
30
+            <Container>
31
+                <CustomHeader
32
+                    navigation={nav}
33
+                    title={i18n.t('screens.planningDisplayScreen')}
34
+                    subtitle={PlanningEventManager.getFormattedTime(displayData)}
35
+                    hasBackButton={true}/>
36
+                <Content padder>
37
+                    <H1>
38
+                        {displayData.title}
39
+                    </H1>
40
+                    {displayData.logo !== null ?
41
+                        <View style={{width: '100%', height: 300, marginTop: 20, marginBottom: 20}}>
42
+                            <Image style={{flex: 1, resizeMode: "contain"}}
43
+                                   source={{uri: displayData.logo}}/>
44
+                        </View>
45
+                        : <View/>}
46
+
47
+                    {displayData.description !== null ?
48
+                        // Surround description with div to allow text styling if the description is not html
49
+                        <HTML html={"<div>" + displayData.description + "</div>"}
50
+                              tagsStyles={{
51
+                                  p: {
52
+                                      color: ThemeManager.getCurrentThemeVariables().textColor,
53
+                                      fontSize: ThemeManager.getCurrentThemeVariables().fontSizeBase
54
+                                  },
55
+                                  div: {color: ThemeManager.getCurrentThemeVariables().textColor}
56
+                              }}
57
+                              onLinkPress={(event, link) => openWebLink(link)}/>
58
+                        : <View/>}
59
+                </Content>
60
+            </Container>
61
+        );
62
+    }
63
+}

+ 12
- 142
screens/PlanningScreen.js View File

@@ -1,18 +1,16 @@
1 1
 // @flow
2 2
 
3 3
 import * as React from 'react';
4
-import {BackHandler, Image, View} from 'react-native';
5
-import {Button, Content, H1, H3, Text} from 'native-base';
4
+import {BackHandler, Image} from 'react-native';
5
+import {H3, Text, View} from 'native-base';
6 6
 import i18n from "i18n-js";
7 7
 import ThemeManager from "../utils/ThemeManager";
8 8
 import {Linking} from "expo";
9 9
 import BaseContainer from "../components/BaseContainer";
10 10
 import {Agenda, LocaleConfig} from 'react-native-calendars';
11
-import HTML from 'react-native-render-html';
12 11
 import Touchable from 'react-native-platform-touchable';
13
-import {Modalize} from 'react-native-modalize';
14 12
 import WebDataManager from "../utils/WebDataManager";
15
-import CustomMaterialIcon from "../components/CustomMaterialIcon";
13
+import PlanningEventManager from '../utils/PlanningEventManager';
16 14
 
17 15
 LocaleConfig.locales['fr'] = {
18 16
     monthNames: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
@@ -28,7 +26,6 @@ type Props = {
28 26
 }
29 27
 
30 28
 type State = {
31
-    modalCurrentDisplayItem: Object,
32 29
     refreshing: boolean,
33 30
     agendaItems: Object,
34 31
     calendarShowing: boolean,
@@ -51,7 +48,6 @@ function openWebLink(link) {
51 48
  */
52 49
 export default class PlanningScreen extends React.Component<Props, State> {
53 50
 
54
-    modalRef: Modalize;
55 51
     agendaRef: Agenda;
56 52
     webDataManager: WebDataManager;
57 53
 
@@ -61,7 +57,6 @@ export default class PlanningScreen extends React.Component<Props, State> {
61 57
     didFocusSubscription: Function;
62 58
     willBlurSubscription: Function;
63 59
     state = {
64
-        modalCurrentDisplayItem: {},
65 60
         refreshing: false,
66 61
         agendaItems: {},
67 62
         calendarShowing: false,
@@ -69,7 +64,6 @@ export default class PlanningScreen extends React.Component<Props, State> {
69 64
 
70 65
     constructor(props: any) {
71 66
         super(props);
72
-        this.modalRef = React.createRef();
73 67
         this.webDataManager = new WebDataManager(FETCH_URL);
74 68
         this.didFocusSubscription = props.navigation.addListener(
75 69
             'didFocus',
@@ -131,72 +125,11 @@ export default class PlanningScreen extends React.Component<Props, State> {
131 125
         return daysOfYear;
132 126
     }
133 127
 
134
-    getModalHeader() {
135
-        return (
136
-            <View style={{marginBottom: 0}}>
137
-                <Button
138
-                    onPress={() => this.modalRef.current.close()}
139
-                    style={{
140
-                        marginTop: 50,
141
-                        marginLeft: 'auto',
142
-                    }}
143
-                    transparent>
144
-                    <CustomMaterialIcon icon={'close'}/>
145
-                </Button>
146
-            </View>
147
-        );
148
-    }
149
-
150
-    getModalContent() {
151
-        return (
152
-            <View style={{
153
-                flex: 1,
154
-                padding: 20
155
-            }}>
156
-                <H1>
157
-                    {this.state.modalCurrentDisplayItem.title}
158
-                </H1>
159
-                <H3 style={{
160
-                    marginTop: 10,
161
-                    color: ThemeManager.getCurrentThemeVariables().listNoteColor
162
-                }}>
163
-                    {this.getFormattedTime(this.state.modalCurrentDisplayItem)}
164
-                </H3>
165
-                <Content>
166
-                    {this.state.modalCurrentDisplayItem.logo !== null ?
167
-                        <View style={{width: '100%', height: 200, marginTop: 20, marginBottom: 20}}>
168
-                            <Image style={{flex: 1, resizeMode: "contain"}}
169
-                                   source={{uri: this.state.modalCurrentDisplayItem.logo}}/>
170
-                        </View>
171
-                        : <View/>}
172
-
173
-                    {this.state.modalCurrentDisplayItem.description !== null ?
174
-                        // Surround description with div to allow text styling if the description is not html
175
-                        <HTML html={"<div>" + this.state.modalCurrentDisplayItem.description + "</div>"}
176
-                              tagsStyles={{
177
-                                  p: {
178
-                                      color: ThemeManager.getCurrentThemeVariables().textColor,
179
-                                      fontSize: ThemeManager.getCurrentThemeVariables().fontSizeBase
180
-                                  },
181
-                                  div: {color: ThemeManager.getCurrentThemeVariables().textColor}
182
-                              }}
183
-                              onLinkPress={(event, link) => openWebLink(link)}/>
184
-                        : <View/>}
185
-                </Content>
186
-            </View>
187
-        );
188
-    }
189
-
190
-    showItemDetails(item: Object) {
191
-        this.setState({
192
-            modalCurrentDisplayItem: item,
193
-        });
194
-        if (this.modalRef.current) {
195
-            this.modalRef.current.open();
196
-        }
197
-    }
198
-
199 128
     getRenderItem(item: Object) {
129
+        let navData = {
130
+            data: item
131
+        };
132
+        const nav = this.props.navigation;
200 133
         return (
201 134
             <Touchable
202 135
                 style={{
@@ -205,7 +138,7 @@ export default class PlanningScreen extends React.Component<Props, State> {
205 138
                     marginRight: 10,
206 139
                     marginTop: 17,
207 140
                 }}
208
-                onPress={() => this.showItemDetails(item)}>
141
+                onPress={() => nav.navigate('PlanningDisplayScreen', navData)}>
209 142
                 <View style={{
210 143
                     padding: 10,
211 144
                     flex: 1,
@@ -219,7 +152,7 @@ export default class PlanningScreen extends React.Component<Props, State> {
219 152
                             marginTop: 5,
220 153
                             marginBottom: 10
221 154
                         }}>
222
-                            {this.getFormattedTime(item)}
155
+                            {PlanningEventManager.getFormattedTime(item)}
223 156
                         </Text>
224 157
                         <H3 style={{marginBottom: 10}}>{item.title}</H3>
225 158
                     </View>
@@ -296,8 +229,8 @@ export default class PlanningScreen extends React.Component<Props, State> {
296 229
     generateEventAgenda(eventList: Array<Object>) {
297 230
         let agendaItems = this.generateEmptyCalendar();
298 231
         for (let i = 0; i < eventList.length; i++) {
299
-            if (agendaItems[this.getEventStartDate(eventList[i])] !== undefined) {
300
-                this.pushEventInOrder(agendaItems, eventList[i], this.getEventStartDate(eventList[i]));
232
+            if (agendaItems[PlanningEventManager.getEventStartDate(eventList[i])] !== undefined) {
233
+                this.pushEventInOrder(agendaItems, eventList[i], PlanningEventManager.getEventStartDate(eventList[i]));
301 234
             }
302 235
         }
303 236
         this.setState({agendaItems: agendaItems})
@@ -308,7 +241,7 @@ export default class PlanningScreen extends React.Component<Props, State> {
308 241
             agendaItems[startDate].push(event);
309 242
         else {
310 243
             for (let i = 0; i < agendaItems[startDate].length; i++) {
311
-                if (this.isEventBefore(event, agendaItems[startDate][i])) {
244
+                if (PlanningEventManager.isEventBefore(event, agendaItems[startDate][i])) {
312 245
                     agendaItems[startDate].splice(i, 0, event);
313 246
                     break;
314 247
                 } else if (i === agendaItems[startDate].length - 1) {
@@ -319,65 +252,10 @@ export default class PlanningScreen extends React.Component<Props, State> {
319 252
         }
320 253
     }
321 254
 
322
-    isEventBefore(event1: Object, event2: Object) {
323
-        let date1 = new Date();
324
-        let date2 = new Date();
325
-        let timeArray = this.getEventStartTime(event1).split(":");
326
-        date1.setHours(parseInt(timeArray[0]), parseInt(timeArray[1]));
327
-        timeArray = this.getEventStartTime(event2).split(":");
328
-        date2.setHours(parseInt(timeArray[0]), parseInt(timeArray[1]));
329
-        return date1 < date2;
330
-    }
331
-
332
-    getEventStartDate(event: Object) {
333
-        return event.date_begin.split(" ")[0];
334
-    }
335
-
336
-    getEventStartTime(event: Object) {
337
-        if (event !== undefined && Object.keys(event).length > 0 && event.date_begin !== null)
338
-            return this.formatTime(event.date_begin.split(" ")[1]);
339
-        else
340
-            return "";
341
-    }
342
-
343
-    getEventEndTime(event: Object) {
344
-        if (event !== undefined && Object.keys(event).length > 0 && event.date_end !== null)
345
-            return this.formatTime(event.date_end.split(" ")[1]);
346
-        else
347
-            return "";
348
-    }
349
-
350
-    getFormattedTime(event: Object) {
351
-        if (this.getEventEndTime(event) !== "")
352
-            return this.getEventStartTime(event) + " - " + this.getEventEndTime(event);
353
-        else
354
-            return this.getEventStartTime(event);
355
-    }
356
-
357
-    formatTime(time: string) {
358
-        let array = time.split(':');
359
-        return array[0] + ':' + array[1];
360
-    }
361
-
362
-    onModalClosed() {
363
-        this.setState({
364
-            modalCurrentDisplayItem: {},
365
-        });
366
-    }
367
-
368 255
     render() {
369 256
         const nav = this.props.navigation;
370 257
         return (
371 258
             <BaseContainer navigation={nav} headerTitle={i18n.t('screens.planning')}>
372
-                <Modalize ref={this.modalRef}
373
-                          modalStyle={{
374
-                              backgroundColor: ThemeManager.getCurrentThemeVariables().containerBgColor,
375
-                          }}
376
-                    // adjustToContentHeight // Breaks when displaying full screen, half, then full again
377
-                          HeaderComponent={() => this.getModalHeader()}
378
-                          onClosed={() => this.onModalClosed()}>
379
-                    {this.getModalContent()}
380
-                </Modalize>
381 259
                 <Agenda
382 260
                     // the list of items that have to be displayed in agenda. If you want to render item as empty date
383 261
                     // the value of date key kas to be an empty array []. If there exists no value for date key it is
@@ -431,14 +309,6 @@ export default class PlanningScreen extends React.Component<Props, State> {
431 309
                         agendaDayNumColor: ThemeManager.getCurrentThemeVariables().listNoteColor,
432 310
                         agendaTodayColor: ThemeManager.getCurrentThemeVariables().brandPrimary,
433 311
                         agendaKnobColor: ThemeManager.getCurrentThemeVariables().brandPrimary,
434
-                        // Fix for days hiding behind knob
435
-                        'stylesheet.calendar.header': {
436
-                            week: {
437
-                                marginTop: 0,
438
-                                flexDirection: 'row',
439
-                                justifyContent: 'space-between'
440
-                            }
441
-                        }
442 312
                     }}
443 313
                 />
444 314
             </BaseContainer>

+ 1
- 0
translations/en.json View File

@@ -2,6 +2,7 @@
2 2
   "screens": {
3 3
     "home": "Home",
4 4
     "planning": "Planning",
5
+    "planningDisplayScreen": "Event Details",
5 6
     "proxiwash": "Proxiwash",
6 7
     "proximo": "Proximo",
7 8
     "menuSelf": "RU Menu",

+ 1
- 0
translations/fr.json View File

@@ -2,6 +2,7 @@
2 2
   "screens": {
3 3
     "home": "Accueil",
4 4
     "planning": "Planning",
5
+    "planningDisplayScreen": "Détails",
5 6
     "proxiwash": "Proxiwash",
6 7
     "proximo": "Proximo",
7 8
     "menuSelf": "Menu du RU",

+ 42
- 0
utils/PlanningEventManager.js View File

@@ -0,0 +1,42 @@
1
+
2
+export default class PlanningEventManager {
3
+    static isEventBefore(event1: Object, event2: Object) {
4
+        let date1 = new Date();
5
+        let date2 = new Date();
6
+        let timeArray = this.getEventStartTime(event1).split(":");
7
+        date1.setHours(parseInt(timeArray[0]), parseInt(timeArray[1]));
8
+        timeArray = this.getEventStartTime(event2).split(":");
9
+        date2.setHours(parseInt(timeArray[0]), parseInt(timeArray[1]));
10
+        return date1 < date2;
11
+    }
12
+
13
+    static getEventStartDate(event: Object) {
14
+        return event.date_begin.split(" ")[0];
15
+    }
16
+
17
+    static getEventStartTime(event: Object) {
18
+        if (event !== undefined && Object.keys(event).length > 0 && event.date_begin !== null)
19
+            return this.formatTime(event.date_begin.split(" ")[1]);
20
+        else
21
+            return "";
22
+    }
23
+
24
+    static getEventEndTime(event: Object) {
25
+        if (event !== undefined && Object.keys(event).length > 0 && event.date_end !== null)
26
+            return this.formatTime(event.date_end.split(" ")[1]);
27
+        else
28
+            return "";
29
+    }
30
+
31
+    static getFormattedTime(event: Object) {
32
+        if (this.getEventEndTime(event) !== "")
33
+            return this.getEventStartTime(event) + " - " + this.getEventEndTime(event);
34
+        else
35
+            return this.getEventStartTime(event);
36
+    }
37
+
38
+    static formatTime(time: string) {
39
+        let array = time.split(':');
40
+        return array[0] + ':' + array[1];
41
+    }
42
+}

Loading…
Cancel
Save