design upgedated

This commit is contained in:
2024-09-19 14:38:45 +02:00
parent abac871af7
commit 0776505a6a
2 changed files with 8 additions and 8 deletions

View File

@@ -31,7 +31,7 @@ const ScheduleBuilder = ({ hours, days, type }) => {
alignItems: 'flex-start',
},
leftColumn: {
width: 80,
width: 60,
paddingTop: 38,
borderRightWidth: 1,
borderColor: '#ccc',

View File

@@ -110,16 +110,16 @@ const Calendar = () => {
<FlatList
refreshControl={<RefreshControl refreshing={loading} onRefresh={refresh} colors={[colors.primary]} />}
data={calendarData.tests}
keyExtractor={(item) => item.date + item.from + item.until + item.subject}
keyExtractor={(item) => item.date + item.hourFrom + item.hourUntil + item.subject}
renderItem={({ item }) => (
<View style={[styles.dayBox, styles.rowContainer, { backgroundColor: colors.backPrimary }]}>
<ThemeText style={{ width: 90 }}>{format(item.date, 'dd.MM.yyyy')}</ThemeText>
<ThemeText style={{ width: 82, fontWeight: 'bold' }}>{format(item.date, 'dd.MM.yyyy')}</ThemeText>
<ThemeText style={{ width: 60 }}>{item.subject}</ThemeText>
<ThemeText style={{ width: 30 }}>{item.type}</ThemeText>
<ThemeText style={{ width: 25 }}>{item.type}</ThemeText>
<ThemeText style={{ width: 40 }}>{item.room}</ThemeText>
<ThemeText style={{ width: 40 }}>{item.from}-{item.until}</ThemeText>
{userInformation.usertype == 'teacher' && <ThemeText style={{ width: 50 }}>{item.class}</ThemeText>}
{userInformation.usertype == 'pupil' && <ThemeText style={{ width: 50 }}>{item.class}</ThemeText>}
<ThemeText style={{ width: 40 }}>{item.hourFrom}-{item.hourUntil}</ThemeText>
<ThemeText style={{ width: 82 }}>{item.timeFrom}-{item.timeUntil}</ThemeText>
{userInformation.usertype == 'teacher' && <ThemeText style={{ width: 30 }}>{item.class}</ThemeText>}
{userInformation.usertype == 'pupil' && <ThemeText style={{ width: 30 }}>{item.teacher}</ThemeText>}
</View>
)}
@@ -346,7 +346,7 @@ const DayModal = React.memo(({ date, calendarData, onClose, dayColors, colors, u
{tests.length > 0 ? (
tests.map((test, index) => (
<View key={index} style={modalStyles.dayBox}>
<ThemeText>{`${test.subject} ${test.type} ${test.room} ${test.from}-${test.until} ${userInformation.usertype == 'pupil' ? test.teacher : test.class}`}</ThemeText>
<ThemeText>{`${test.subject} ${test.type} ${test.room} ${test.hourFrom}-${test.hourUntil} ${test.timeFrom}-${test.timeUntil} ${userInformation.usertype == 'pupil' ? test.teacher : test.class}`}</ThemeText>
</View>
))
) : (