@olea-bps/components 1.0.4 → 1.0.8
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/BookDetail/index.js +2 -2
- package/ComponentJobsFilter/index.js +1 -1
- package/ContactDetail/index.js +1 -1
- package/CourseDetail/index.js +1 -1
- package/MealItem/styles.js +13 -2
- package/MensaSlider/index.js +2 -2
- package/NewsDetail/index.js +1 -1
- package/NewsList/index.js +1 -1
- package/OtherCourses/index.js +2 -2
- package/PtsStation/index.js +1 -1
- package/RoomDetail/index.js +1 -1
- package/SearchResults/index.js +5 -5
- package/SettingsDialogRadio/index.js +2 -2
- package/SettingsDialogSelect/index.js +2 -2
- package/TimetableDay/index.js +7 -21
- package/TimetableList/index.js +108 -44
- package/TimetableList/styles.js +0 -3
- package/TimetableWeek/index.js +7 -22
- package/package.json +4 -5
package/BookDetail/index.js
CHANGED
|
@@ -27,11 +27,11 @@ import merge from 'lodash/merge';
|
|
|
27
27
|
import unescape from 'lodash/unescape';
|
|
28
28
|
import uniqBy from 'lodash/uniqBy';
|
|
29
29
|
import {libraryApi} from '@olea-bps/core';
|
|
30
|
+
import {handleHtmlEntities} from "@olea-bps/core/helper/format.helper";
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
import componentStyles from "./styles"
|
|
33
|
-
import
|
|
34
|
-
import {handleHtmlEntities} from "@olea-bps/core/helper/format.helper";
|
|
34
|
+
import AppbarComponent from '../AppBar';
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class BookDetailComponent extends React.Component {
|
|
@@ -21,7 +21,7 @@ import { CheckBox } from 'react-native-elements'
|
|
|
21
21
|
|
|
22
22
|
import merge from 'lodash/merge';
|
|
23
23
|
import componentStyles from "./styles";
|
|
24
|
-
import
|
|
24
|
+
import AppbarComponent from '../AppBar';
|
|
25
25
|
import IconsOpenasist from "@olea-bps/icons-openasist";
|
|
26
26
|
|
|
27
27
|
|
package/ContactDetail/index.js
CHANGED
package/CourseDetail/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { connect } from 'react-redux'
|
|
|
25
25
|
import merge from 'lodash/merge';
|
|
26
26
|
|
|
27
27
|
import componentStyles from "./styles"
|
|
28
|
-
import
|
|
28
|
+
import AppbarComponent from '../AppBar';
|
|
29
29
|
import IconsOpenasist from "@olea-bps/icons-openasist";
|
|
30
30
|
import {withTranslation} from "react-i18next";
|
|
31
31
|
|
package/MealItem/styles.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
// Helper function to add alpha to a color
|
|
2
|
+
const addAlpha = (hexColor, alpha) => {
|
|
3
|
+
// Remove # if present
|
|
4
|
+
const hex = hexColor.replace('#', '');
|
|
5
|
+
|
|
6
|
+
// Parse RGB values
|
|
7
|
+
const r = parseInt(hex.substring(0, 2), 16);
|
|
8
|
+
const g = parseInt(hex.substring(2, 4), 16);
|
|
9
|
+
const b = parseInt(hex.substring(4, 6), 16);
|
|
10
|
+
|
|
11
|
+
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
12
|
+
};
|
|
2
13
|
|
|
3
14
|
export default function(theme) {
|
|
4
15
|
return {
|
|
@@ -7,7 +18,7 @@ export default function(theme) {
|
|
|
7
18
|
height: '75%',
|
|
8
19
|
paddingHorizontal: theme.paddings.default,
|
|
9
20
|
borderRightWidth: 1,
|
|
10
|
-
borderRightColor:
|
|
21
|
+
borderRightColor: addAlpha(theme.colors.mensaSliderTextColor, 0.5)
|
|
11
22
|
},
|
|
12
23
|
mensaItemText: {
|
|
13
24
|
fontSize: theme.fontSizes.itemText,
|
package/MensaSlider/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import { LinearGradient } from 'expo-linear-gradient'
|
|
|
22
22
|
|
|
23
23
|
import { DateTime } from 'luxon';
|
|
24
24
|
|
|
25
|
-
import
|
|
25
|
+
import MealItemComponent from '../MealItem';
|
|
26
26
|
import { toIsoDateString } from '@olea-bps/core/helper/date';
|
|
27
27
|
|
|
28
28
|
import { useCanteen, useFilteredMenu, useFavoriteCanteens } from '@olea-bps/context-canteen';
|
|
@@ -136,7 +136,7 @@ function MensaSliderComponent(props) {
|
|
|
136
136
|
|
|
137
137
|
const todayDateTime = new Date();
|
|
138
138
|
const todayDateString = toIsoDateString(todayDateTime);
|
|
139
|
-
|
|
139
|
+
|
|
140
140
|
const formattedDate = DateTime
|
|
141
141
|
.fromJSDate(todayDateTime)
|
|
142
142
|
.setLocale(settings.settingsGeneral.language)
|
package/NewsDetail/index.js
CHANGED
|
@@ -38,7 +38,7 @@ import WebViewAutoHeight from '@olea-bps/react-native-webview-autoheight';
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
import componentStyles from "./styles"
|
|
41
|
-
import
|
|
41
|
+
import AppbarComponent from '../AppBar';
|
|
42
42
|
import {selectFeedById} from "@olea-bps/core/redux/reducers/api";
|
|
43
43
|
|
|
44
44
|
|
package/NewsList/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { useTheme } from 'react-native-paper';
|
|
|
25
25
|
import { useTranslation } from 'react-i18next';
|
|
26
26
|
import { useFocusEffect } from '@react-navigation/native';
|
|
27
27
|
|
|
28
|
-
import
|
|
28
|
+
import NewsListItem from '../NewsListItem'
|
|
29
29
|
import { useApiProvider } from '@olea-bps/context-news';
|
|
30
30
|
|
|
31
31
|
import componentStyles from './styles';
|
package/OtherCourses/index.js
CHANGED
|
@@ -29,9 +29,9 @@ import { withTranslation } from 'react-i18next';
|
|
|
29
29
|
|
|
30
30
|
import merge from 'lodash/merge';
|
|
31
31
|
|
|
32
|
-
import
|
|
32
|
+
import AppbarComponent from '../AppBar';
|
|
33
33
|
import IconsOpenasist from '@olea-bps/icons-openasist';
|
|
34
|
-
import
|
|
34
|
+
import TimetableListComponent from '../TimetableList';
|
|
35
35
|
|
|
36
36
|
import componentStyles from './styles'
|
|
37
37
|
|
package/PtsStation/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import concat from "lodash/concat";
|
|
|
23
23
|
import merge from 'lodash/merge';
|
|
24
24
|
|
|
25
25
|
import {onSettingPtsStationOverride, store} from "@olea-bps/core";
|
|
26
|
-
import
|
|
26
|
+
import PtsDepartureComponent from '../PtsDeparture';
|
|
27
27
|
import IconsOpenasist from "@olea-bps/icons-openasist";
|
|
28
28
|
|
|
29
29
|
import componentStyles from "./styles"
|
package/RoomDetail/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import {withTranslation} from "react-i18next";
|
|
|
26
26
|
import merge from 'lodash/merge';
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
import
|
|
29
|
+
import AppbarComponent from '../AppBar';
|
|
30
30
|
import IconsOpenasist from "@olea-bps/icons-openasist";
|
|
31
31
|
|
|
32
32
|
import componentStyles from "./styles";
|
package/SearchResults/index.js
CHANGED
|
@@ -29,11 +29,11 @@ import {store} from '@olea-bps/core';
|
|
|
29
29
|
|
|
30
30
|
import componentStyles from "./styles"
|
|
31
31
|
import IconsOpenasist from "@olea-bps/icons-openasist";
|
|
32
|
-
import { BookDetail as BookDetailComponent } from '@olea-bps/components';
|
|
33
|
-
import { ContactDetail as ContactDetailComponent } from '@olea-bps/components';
|
|
34
|
-
import { RoomDetail as RoomDetailComponent } from '@olea-bps/components';
|
|
35
|
-
import { NewsDetail as NewsDetailComponent } from '@olea-bps/components';
|
|
36
32
|
import {handleHtmlEntities} from "@olea-bps/core/helper/format.helper";
|
|
33
|
+
import ContactDetailComponent from '../ContactDetail';
|
|
34
|
+
import RoomDetailComponent from '../RoomDetail';
|
|
35
|
+
import NewsDetailComponent from '../NewsDetail';
|
|
36
|
+
import BookDetailComponent from '../BookDetail';
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
@@ -142,7 +142,7 @@ class SearchResultsComponent extends React.Component {
|
|
|
142
142
|
key = item.bookId;
|
|
143
143
|
title = unescape(item.title);
|
|
144
144
|
subtitle = `${item.format || ''}${item.format && item.available ? ' | ' : ''}${item.available ? t('books:available') : t('books:notAvailable')}`;
|
|
145
|
-
|
|
145
|
+
|
|
146
146
|
|
|
147
147
|
// Contacts
|
|
148
148
|
} else if(item.firstName && item.lastName) {
|
|
@@ -18,7 +18,7 @@ import { StyleSheet } from 'react-native';
|
|
|
18
18
|
import { RadioButton, useTheme } from 'react-native-paper';
|
|
19
19
|
import { useTranslation } from 'react-i18next';
|
|
20
20
|
|
|
21
|
-
import
|
|
21
|
+
import SettingsDialog from '../SettingsDialog';
|
|
22
22
|
|
|
23
23
|
import componentStyles from './styles';
|
|
24
24
|
|
|
@@ -63,4 +63,4 @@ export default function SettingsDialogRadio({ title, visible, options, selectedO
|
|
|
63
63
|
</RadioButton.Group>
|
|
64
64
|
</SettingsDialog>
|
|
65
65
|
);
|
|
66
|
-
}
|
|
66
|
+
}
|
|
@@ -18,7 +18,7 @@ import { StyleSheet } from 'react-native';
|
|
|
18
18
|
import { Checkbox, useTheme } from 'react-native-paper';
|
|
19
19
|
import { useTranslation } from 'react-i18next';
|
|
20
20
|
|
|
21
|
-
import
|
|
21
|
+
import SettingsDialog from '../SettingsDialog';
|
|
22
22
|
|
|
23
23
|
import componentStyles from './styles';
|
|
24
24
|
|
|
@@ -70,4 +70,4 @@ export default function SettingsDialogSelect({ title, visible, options, onDismis
|
|
|
70
70
|
}
|
|
71
71
|
</SettingsDialog>
|
|
72
72
|
);
|
|
73
|
-
}
|
|
73
|
+
}
|
package/TimetableDay/index.js
CHANGED
|
@@ -81,12 +81,14 @@ function CalendarDay({ selectedDate, theme, settings, calendarScrollOffsetMinute
|
|
|
81
81
|
course => (
|
|
82
82
|
{
|
|
83
83
|
title: course.title.data,
|
|
84
|
-
start: course.startDateTime,
|
|
85
|
-
end: course.endDateTime,
|
|
84
|
+
start: new Date(Date.parse(course.startDateTime)),
|
|
85
|
+
end: new Date(Date.parse(course.endDateTime)),
|
|
86
86
|
color: eventColor,
|
|
87
87
|
type: course.type?.data,
|
|
88
88
|
professor: course.lecturer[0]?.data,
|
|
89
89
|
room: course.room.data,
|
|
90
|
+
// Anfügen des Ürsprügnlichen Vorlesungsobjektes, damit es beim Klick zur Verfügung steht
|
|
91
|
+
origine: course,
|
|
90
92
|
}
|
|
91
93
|
)
|
|
92
94
|
) ?? [];
|
|
@@ -174,24 +176,8 @@ function CalendarDay({ selectedDate, theme, settings, calendarScrollOffsetMinute
|
|
|
174
176
|
swipeEnabled={false}
|
|
175
177
|
onPressEvent={
|
|
176
178
|
showDetails
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
const eventStartTime = event.start.getTime();
|
|
181
|
-
const originalCourse = courses[eventDateISO]
|
|
182
|
-
?.find(
|
|
183
|
-
course =>
|
|
184
|
-
eventStartTime === course.startDateTime.getTime()
|
|
185
|
-
&&
|
|
186
|
-
event?.title === course?.title?.data
|
|
187
|
-
&&
|
|
188
|
-
event?.professor === course?.lecturer[0]?.data
|
|
189
|
-
&&
|
|
190
|
-
event?.room === course?.room?.data
|
|
191
|
-
);
|
|
192
|
-
|
|
193
|
-
onCourseSelected(originalCourse);
|
|
194
|
-
}
|
|
179
|
+
// Wenn eine Vorlesung im Kalender angeklickt wird, wird die ursprüngliche Vorlesung ausgelesen und selektiert
|
|
180
|
+
? (event) => onCourseSelected(event.origine)
|
|
195
181
|
: null
|
|
196
182
|
}
|
|
197
183
|
scrollOffsetMinutes={calendarScrollOffsetMinutes}
|
|
@@ -263,4 +249,4 @@ const mapStateToProps = (state) => {
|
|
|
263
249
|
};
|
|
264
250
|
};
|
|
265
251
|
|
|
266
|
-
export default connect(mapStateToProps, { onUpdateRefreshing })(withTranslation()(withTheme(CalendarDay)));
|
|
252
|
+
export default connect(mapStateToProps, { onUpdateRefreshing })(withTranslation()(withTheme(CalendarDay)));
|
package/TimetableList/index.js
CHANGED
|
@@ -15,21 +15,23 @@
|
|
|
15
15
|
import { useMemo } from 'react';
|
|
16
16
|
import {
|
|
17
17
|
StyleSheet,
|
|
18
|
+
TouchableOpacity,
|
|
18
19
|
View,
|
|
19
20
|
} from 'react-native';
|
|
20
21
|
|
|
21
22
|
import { connect } from 'react-redux'
|
|
22
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
useTheme,
|
|
25
|
+
Text,
|
|
26
|
+
} from "react-native-paper";
|
|
23
27
|
import { useTranslation } from "react-i18next";
|
|
24
28
|
|
|
25
29
|
import { onUpdateRefreshing } from "@olea-bps/core";
|
|
26
30
|
|
|
27
|
-
import
|
|
31
|
+
import { DateTime } from 'luxon';
|
|
28
32
|
|
|
29
33
|
import componentStyles from "./styles";
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
|
|
33
35
|
/**
|
|
34
36
|
* Timetable List Component
|
|
35
37
|
*
|
|
@@ -47,10 +49,38 @@ import componentStyles from "./styles";
|
|
|
47
49
|
function TimetableListComponent({ course, times, settings, onCourseSelected }) {
|
|
48
50
|
const { t } = useTranslation();
|
|
49
51
|
const theme = useTheme();
|
|
50
|
-
const {
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
const
|
|
52
|
+
const { themeStyles, appSettings } = theme;
|
|
53
|
+
|
|
54
|
+
const courseTitle = course?.title?.data;
|
|
55
|
+
const courseType = course?.type?.data;
|
|
56
|
+
const courseRoom = course?.room?.data;
|
|
57
|
+
const courseStartDatetime = DateTime.fromISO(course.startDateTime);
|
|
58
|
+
const courseStarTimeText = courseStartDatetime.isValid
|
|
59
|
+
? courseStartDatetime?.toLocaleString(DateTime.TIME_24_SIMPLE)
|
|
60
|
+
: undefined;
|
|
61
|
+
const courseEndDatetime = DateTime.fromISO(course.endDateTime);
|
|
62
|
+
const courseEndTimeText = courseEndDatetime.isValid
|
|
63
|
+
? courseEndDatetime?.toLocaleString(DateTime.TIME_24_SIMPLE)
|
|
64
|
+
: undefined;
|
|
65
|
+
const courseTimesTextesAvaiable = courseStartDatetime && courseEndTimeText ? true : false;
|
|
66
|
+
const courseLecturers = course?.lecturer
|
|
67
|
+
?.map(lecturer => lecturer.data);
|
|
68
|
+
const courseLecturersAmount = Array.isArray(courseLecturers)
|
|
69
|
+
? courseLecturers.length
|
|
70
|
+
: 0;
|
|
71
|
+
const courseInfo = course?.info?.data;
|
|
72
|
+
const courseUrl = course?.url?.data;
|
|
73
|
+
|
|
74
|
+
const courseAccessibilityText = t(
|
|
75
|
+
'accessibility:timetable:courseSummary',
|
|
76
|
+
{
|
|
77
|
+
type: courseType,
|
|
78
|
+
title: courseTitle,
|
|
79
|
+
startTime: courseStarTimeText,
|
|
80
|
+
endTime: courseEndTimeText,
|
|
81
|
+
room: courseRoom,
|
|
82
|
+
}
|
|
83
|
+
);
|
|
54
84
|
|
|
55
85
|
const isBigFont = settings.settingsAccessibility.increaseFontSize;
|
|
56
86
|
const showDetails = appSettings?.modules?.timetable?.showDetails;
|
|
@@ -60,48 +90,82 @@ function TimetableListComponent({ course, times, settings, onCourseSelected }) {
|
|
|
60
90
|
[theme]
|
|
61
91
|
)
|
|
62
92
|
|
|
63
|
-
const renderTimeSlot = (
|
|
64
|
-
<View style={isBigFont ? [styles.courseTimeContainer, styles.courseTimeContainerBigFont] : styles.courseTimeContainer}>
|
|
65
|
-
<Text accessibilityLabel={accessibilityStartTime} style={isBigFont ? [styles.timeText, styles.timeTextBig] : styles.timeText}>{times?.start || ''}</Text>
|
|
66
|
-
<View style={styles.verticalSeperatorSmall} />
|
|
67
|
-
<Text accessibilityLabel={accessibilityEndTime} style={isBigFont ? [styles.timeText, styles.timeTextBig] : styles.timeText}>{times?.end || ''}</Text>
|
|
68
|
-
</View>
|
|
69
|
-
);
|
|
70
|
-
var renderVerticalSeperator = (
|
|
71
|
-
<View
|
|
72
|
-
style={styles.verticalSeperator}
|
|
73
|
-
/>
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
const { type, title, room, lecturer, info, url } = course;
|
|
77
|
-
|
|
78
93
|
const courseContainerBigFont = isBigFont ? styles.courseContainerBigFont : null;
|
|
79
94
|
const titleStyle = isBigFont ? styles.titleBigFont : styles.title;
|
|
80
|
-
|
|
95
|
+
const coursePressable = showDetails &&
|
|
96
|
+
(
|
|
97
|
+
courseTitle ||
|
|
98
|
+
courseType ||
|
|
99
|
+
courseRoom ||
|
|
100
|
+
courseLecturersAmount ||
|
|
101
|
+
courseInfo ||
|
|
102
|
+
courseUrl ||
|
|
103
|
+
courseStarTimeText ||
|
|
104
|
+
courseEndTimeText
|
|
105
|
+
);
|
|
81
106
|
|
|
82
107
|
return (
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
108
|
+
<TouchableOpacity
|
|
109
|
+
style={isBigFont ? [themeStyles.card, styles.courseCard] : themeStyles.card}
|
|
110
|
+
accessibilityLabel={courseAccessibilityText}
|
|
111
|
+
onPress={
|
|
112
|
+
coursePressable
|
|
113
|
+
? () => onCourseSelected?.(course)
|
|
114
|
+
: null
|
|
115
|
+
}
|
|
116
|
+
disabled={!coursePressable}
|
|
117
|
+
>
|
|
118
|
+
{
|
|
119
|
+
courseTimesTextesAvaiable
|
|
120
|
+
? <View style={isBigFont ? [styles.courseTimeContainer, styles.courseTimeContainerBigFont] : styles.courseTimeContainer}>
|
|
121
|
+
<Text style={isBigFont ? [styles.timeText, styles.timeTextBig] : styles.timeText}>
|
|
122
|
+
{courseStarTimeText}
|
|
123
|
+
</Text>
|
|
124
|
+
<View style={styles.verticalSeperatorSmall} />
|
|
125
|
+
<Text style={isBigFont ? [styles.timeText, styles.timeTextBig] : styles.timeText}>
|
|
126
|
+
{courseEndTimeText}
|
|
127
|
+
</Text>
|
|
128
|
+
</View>
|
|
129
|
+
: null
|
|
130
|
+
}
|
|
131
|
+
{
|
|
132
|
+
courseTimesTextesAvaiable
|
|
133
|
+
? <View style={styles.verticalSeperator} />
|
|
134
|
+
: null
|
|
135
|
+
}
|
|
136
|
+
<View style={courseTimesTextesAvaiable ? [styles.courseContainer, courseContainerBigFont] : styles.otherCourseContainer}>
|
|
137
|
+
{
|
|
138
|
+
courseType
|
|
139
|
+
? <Text style={courseTimesTextesAvaiable ? [styles.type, styles.addLeftRightPadding] : styles.type} >
|
|
140
|
+
{courseType}
|
|
141
|
+
</Text>
|
|
142
|
+
: null
|
|
143
|
+
}
|
|
144
|
+
{
|
|
145
|
+
courseTitle
|
|
146
|
+
? <Text style={courseTimesTextesAvaiable ? [titleStyle, styles.addLeftRightPadding] : styles.title}>
|
|
147
|
+
{courseTitle}
|
|
148
|
+
</Text>
|
|
149
|
+
: null}
|
|
150
|
+
{
|
|
151
|
+
courseRoom
|
|
152
|
+
? <Text style={courseTimesTextesAvaiable ? [styles.room, styles.addLeftRightPadding] : styles.room} >
|
|
153
|
+
{courseRoom}
|
|
154
|
+
</Text>
|
|
155
|
+
: null
|
|
156
|
+
}
|
|
157
|
+
{
|
|
158
|
+
courseLecturersAmount ?
|
|
159
|
+
<Text style={courseTimesTextesAvaiable ? [styles.professorText, styles.addLeftRightPadding] : styles.professorText}>
|
|
160
|
+
Tutor:
|
|
161
|
+
<Text style={styles.professorName}>
|
|
162
|
+
{courseLecturers.join(', ')}
|
|
163
|
+
</Text>
|
|
164
|
+
</Text>
|
|
165
|
+
: null
|
|
95
166
|
}
|
|
96
167
|
</View>
|
|
97
|
-
|
|
98
|
-
<View style={styles.btnPosition}>
|
|
99
|
-
<Button style={styles.btnAddionals} onPress={() => onCourseSelected?.(course)}>
|
|
100
|
-
<IconsOpenasist icon={"info"} color={colors.secondaryText} size={22} />
|
|
101
|
-
</Button>
|
|
102
|
-
</View>
|
|
103
|
-
: null}
|
|
104
|
-
</View>
|
|
168
|
+
</TouchableOpacity>
|
|
105
169
|
);
|
|
106
170
|
}
|
|
107
171
|
|
package/TimetableList/styles.js
CHANGED
|
@@ -19,7 +19,6 @@ export default function (theme) {
|
|
|
19
19
|
width: "15%",
|
|
20
20
|
alignItems: "center",
|
|
21
21
|
justifyContent: "center",
|
|
22
|
-
backgroundColor: theme.colors.background
|
|
23
22
|
},
|
|
24
23
|
courseTimeContainerBigFont: {
|
|
25
24
|
width: "25%",
|
|
@@ -37,7 +36,6 @@ export default function (theme) {
|
|
|
37
36
|
flexDirection: "column",
|
|
38
37
|
paddingLeft: theme.paddings.small,
|
|
39
38
|
width: "85%",
|
|
40
|
-
backgroundColor: theme.colors.background,
|
|
41
39
|
paddingTop: theme.paddings.xsmall,
|
|
42
40
|
paddingBottom: theme.paddings.xsmall
|
|
43
41
|
},
|
|
@@ -76,7 +74,6 @@ export default function (theme) {
|
|
|
76
74
|
otherCourseContainer: {
|
|
77
75
|
padding: theme.paddings.xsmall,
|
|
78
76
|
width: "100%",
|
|
79
|
-
backgroundColor: theme.colors.background
|
|
80
77
|
},
|
|
81
78
|
btnPosition: {
|
|
82
79
|
position: 'absolute',
|
package/TimetableWeek/index.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { useMemo, useCallback } from 'react';
|
|
16
16
|
import { View, Text, TouchableOpacity, StyleSheet, useWindowDimensions } from 'react-native';
|
|
17
17
|
import { connect } from 'react-redux';
|
|
18
18
|
import { withTheme } from 'react-native-paper';
|
|
@@ -23,7 +23,6 @@ import CalendarStrip from 'react-native-calendar-strip';
|
|
|
23
23
|
import { DateTime, Duration } from 'luxon';
|
|
24
24
|
import { TabView } from 'react-native-tab-view';
|
|
25
25
|
import { onUpdateRefreshing } from '@olea-bps/core';
|
|
26
|
-
import { CourseDetailDialog } from '@olea-bps/components';
|
|
27
26
|
import moment from 'moment';
|
|
28
27
|
import 'moment/locale/de';
|
|
29
28
|
|
|
@@ -90,12 +89,14 @@ function CalendarWeek(props) {
|
|
|
90
89
|
course => (
|
|
91
90
|
{
|
|
92
91
|
title: course.title.data,
|
|
93
|
-
start: course.startDateTime,
|
|
94
|
-
end: course.endDateTime,
|
|
92
|
+
start: new Date(Date.parse(course.startDateTime)),
|
|
93
|
+
end: new Date(Date.parse(course.endDateTime)),
|
|
95
94
|
color: eventColor,
|
|
96
95
|
type: course.type?.data,
|
|
97
96
|
professor: course.lecturer[0]?.data,
|
|
98
97
|
room: course.room.data,
|
|
98
|
+
// Anfügen des Ürsprügnlichen Vorlesungsobjektes, damit es beim Klick zur Verfügung steht
|
|
99
|
+
origine: course,
|
|
99
100
|
}
|
|
100
101
|
)
|
|
101
102
|
) ?? [];
|
|
@@ -171,24 +172,8 @@ function CalendarWeek(props) {
|
|
|
171
172
|
weekStartsOn={1}
|
|
172
173
|
date={route.weekbeginISODate}
|
|
173
174
|
onPressEvent={
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
const eventStartTime = event.start.getTime();
|
|
178
|
-
const originalCourse = courses[eventDateISO]
|
|
179
|
-
?.find(
|
|
180
|
-
course =>
|
|
181
|
-
eventStartTime === course.startDateTime.getTime()
|
|
182
|
-
&&
|
|
183
|
-
event?.title === course?.title?.data
|
|
184
|
-
&&
|
|
185
|
-
event?.professor === course?.lecturer[0]?.data
|
|
186
|
-
&&
|
|
187
|
-
event?.room === course?.room?.data
|
|
188
|
-
);
|
|
189
|
-
|
|
190
|
-
onCourseSelected(originalCourse);
|
|
191
|
-
}
|
|
175
|
+
// Wenn eine Vorlesung im Kalender angeklickt wird, wird die ursprüngliche Vorlesung ausgelesen und selektiert
|
|
176
|
+
(event) => onCourseSelected(event.origine)
|
|
192
177
|
}
|
|
193
178
|
swipeEnabled={false}
|
|
194
179
|
scrollOffsetMinutes={calendarScrollOffsetMinutes}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olea-bps/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Consolidated components for OLEA",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": "https://github.com/tuc-urz/olea.git",
|
|
@@ -23,11 +23,10 @@
|
|
|
23
23
|
"@olea-bps/context-timetable": "^1.0.0",
|
|
24
24
|
"moment": "^2.29.4",
|
|
25
25
|
"react-native-tab-view": "^4.1.3",
|
|
26
|
-
"expo-linear-gradient": "
|
|
26
|
+
"expo-linear-gradient": "~15.0.7",
|
|
27
27
|
"@olea-bps/react-native-webview-autoheight": "^1.0.0",
|
|
28
|
-
"react-native-webview": "13.
|
|
29
|
-
"@react-native-community/netinfo": "^11.4.1"
|
|
30
|
-
"@olea-bps/components": "^1.0.0"
|
|
28
|
+
"react-native-webview": "13.16.0",
|
|
29
|
+
"@react-native-community/netinfo": "^11.4.1"
|
|
31
30
|
},
|
|
32
31
|
"peerDependencies": {
|
|
33
32
|
"react": "^19.0.0",
|