@ossy/employees 1.9.6 → 1.10.0

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/employees",
3
3
  "description": "Analytics module — workspace analytics for website traffic",
4
- "version": "1.9.6",
4
+ "version": "1.10.0",
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": "72d150cf20ff7ba25b328bc5b429b065c2840b2b"
30
+ "gitHead": "d9d31182be64a448d575da432af2830d909ad4b9"
31
31
  }
package/src/Definition.js CHANGED
@@ -2,12 +2,6 @@ export const Definition = {
2
2
  id: 'employees',
3
3
  title: 'Employees',
4
4
  description: 'Employee directory, details, and staffing visibility.',
5
- module: {
6
- id: 'employees',
7
- enabled: true
8
- },
5
+ icon: 'users',
9
6
  statuses: ['beta'],
10
- actions: ['employees.create', 'employees.update', 'employees.remove'],
11
- views: ['home.page', 'employees.list'],
12
- tasks: []
13
7
  }
@@ -1,6 +1,5 @@
1
- import React from 'react'
2
- import { useRouter } from '@ossy/router-react'
3
- import { Title, Text, View, Tags, Button } from '@ossy/design-system'
1
+ import React from 'react'
2
+ import { Title, Text, View, Tags, Button, useLocale } from '@ossy/design-system'
4
3
  import { Employees } from './Employees.jsx'
5
4
  import { DataLoader } from '@ossy/calendar'
6
5
  import { Definition } from '@ossy/employees'
@@ -15,7 +14,7 @@ export const metadata = {
15
14
  }
16
15
 
17
16
  export const EmployeesPage = () => {
18
- const router = useRouter()
17
+ const { t } = useLocale()
19
18
  return (
20
19
  <View gap="m" surface="primary" style={{ padding: 'var(--space-m) var(--space-l)', height: '100%', overflowY: 'auto' }}>
21
20
 
@@ -23,24 +22,24 @@ export const EmployeesPage = () => {
23
22
 
24
23
  <View layout="row" justifyContent="space-between" alignItems="center">
25
24
  <View layout='row' gap="s" alignItems="center">
26
- <Title>{Definition.title}</Title>
25
+ <Title>{t('employees.home.title')}</Title>
27
26
  {moduleStatusTags(Definition).length > 0 && (
28
27
  <Tags tags={moduleStatusTags(Definition)} size="s" />
29
28
  )}
30
29
  </View>
31
30
  <Button variant="cta" disabled={true} prefix="add">
32
- Add
31
+ {t('design-system.add')}
33
32
  </Button>
34
33
  </View>
35
34
 
36
35
  <Text style={{ maxWidth: '400px' }}>
37
- Manage Employees
36
+ {t('employees.home.description')}
38
37
  </Text>
39
38
 
40
39
  </View>
41
40
 
42
41
  <View gap="m" inset="s">
43
- <Title variant="secondary">Overview</Title>
42
+ <Title variant="secondary">{t('design-system.overview')}</Title>
44
43
 
45
44
  <DataLoader content={<Employees />} />
46
45
 
@@ -0,0 +1,5 @@
1
+ {
2
+ "employees.home.documentTitle": "Employees",
3
+ "employees.home.title": "Employees",
4
+ "employees.home.description": "Manage employees"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "employees.home.documentTitle": "Anställda",
3
+ "employees.home.title": "Anställda",
4
+ "employees.home.description": "Hantera anställda"
5
+ }