@ossy/timesheets 1.10.2 → 1.10.3

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": "@ossy/timesheets",
3
3
  "description": "Analytics module — workspace analytics for website traffic",
4
- "version": "1.10.2",
4
+ "version": "1.10.3",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
7
7
  "module": "./src/index.js",
@@ -27,5 +27,5 @@
27
27
  "@ossy/router-react": "*",
28
28
  "react": "*"
29
29
  },
30
- "gitHead": "2b8745d57fee8b6c08787e2755b4df489291a5cd"
30
+ "gitHead": "a0d89185a17f8de8ce328c3a648c108ff1d61d8f"
31
31
  }
package/src/Timesheet.jsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Title, View, Text } from '@ossy/design-system';
2
+ import { View, Text } from '@ossy/design-system';
3
3
  import { CalendarDaySurfaceStyles, useCalendarMonths } from '@ossy/calendar';
4
4
 
5
5
  const grid = {
@@ -50,7 +50,7 @@ export const Timesheet = () => {
50
50
 
51
51
  {months.map(month => (
52
52
  <div key={month.month} data-surface="primary" style={monthCard}>
53
- <Title variant="tertiary">{month.month}</Title>
53
+ <Text variant="heading-tertiary" as="h3">{month.month}</Text>
54
54
  <View gap="s" style={{ flexGrow: '1' }}>
55
55
 
56
56
  </View>
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Title, Text, View, Tags, Button, useLocale } from '@ossy/design-system'
2
+ import { Text, View, Button, Page, useLocale, Tags } from '@ossy/design-system'
3
3
  import { Timesheet } from './Timesheet.jsx'
4
4
  import { DataLoader } from '@ossy/calendar'
5
5
  import { Definition } from '@ossy/timesheets'
@@ -8,44 +8,31 @@ import { moduleStatusTags } from './moduleStatus.js'
8
8
  export const metadata = {
9
9
  id: 'timesheets/home',
10
10
  path: {
11
- sv: '/tidrapportering',
11
+ sv: '/tidrapporter',
12
12
  en: '/timesheets',
13
13
  },
14
14
  }
15
15
 
16
16
  export const TimesheetsPage = () => {
17
17
  const { t } = useLocale()
18
- return (
19
- <View gap="m" surface="primary" style={{ padding: 'var(--space-m) var(--space-l)', height: '100%', overflowY: 'auto' }}>
20
-
21
- <View inset="s" gap="s" style={{ flexShrink: 0 }}>
22
-
23
- <View layout="row" justifyContent="space-between" alignItems="center">
24
- <View layout='row' gap="s" alignItems="center">
25
- <Title>{t('timesheets.home.title')}</Title>
26
- {moduleStatusTags(Definition).length > 0 && (
27
- <Tags tags={moduleStatusTags(Definition)} size="s" />
28
- )}
29
- </View>
30
- <Button variant="cta" disabled={true} prefix="add">
31
- {t('design-system.add')}
32
- </Button>
33
- </View>
34
-
35
- <Text style={{ maxWidth: '400px' }}>
36
- {t('timesheets.home.description')}
37
- </Text>
38
-
39
- </View>
40
-
41
- <View gap="m" inset="s">
42
- <Title variant="secondary">{t('design-system.overview')}</Title>
43
-
44
- <DataLoader content={<Timesheet />} />
18
+ const statusTags = moduleStatusTags(Definition)
45
19
 
20
+ return (
21
+ <Page
22
+ title="timesheets.home.title"
23
+ near={statusTags.length > 0 ? <Tags tags={statusTags} size="s" /> : undefined}
24
+ description="timesheets.home.description"
25
+ far={(
26
+ <Button variant="cta" disabled prefix="add">
27
+ {t('design-system.add')}
28
+ </Button>
29
+ )}
30
+ >
31
+ <View gap="m">
32
+ <Text variant="heading-secondary" as="h2" text="design-system.overview" />
33
+ <DataLoader content={<Timesheet />} />
46
34
  </View>
47
-
48
- </View>
35
+ </Page>
49
36
  )
50
37
  }
51
38