@cratis/scene.blueprint.hr 4.53.1 → 4.59.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/blueprintCatalog.json +16 -0
- package/dist/cjs/hrParts.js.map +1 -1
- package/dist/cjs/hrQueries.js +3 -0
- package/dist/cjs/hrQueries.js.map +1 -1
- package/dist/cjs/hrScreenSet.js +7 -0
- package/dist/cjs/hrScreenSet.js.map +1 -1
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/navigation.js +9 -1
- package/dist/cjs/navigation.js.map +1 -1
- package/dist/cjs/templates/index.js +3 -0
- package/dist/cjs/templates/index.js.map +1 -1
- package/dist/cjs/templates/teamCalendarTemplate.js +99 -0
- package/dist/cjs/templates/teamCalendarTemplate.js.map +1 -0
- package/dist/esm/hrParts.d.ts +1 -1
- package/dist/esm/hrParts.d.ts.map +1 -1
- package/dist/esm/hrParts.js.map +1 -1
- package/dist/esm/hrQueries.d.ts +3 -0
- package/dist/esm/hrQueries.d.ts.map +1 -1
- package/dist/esm/hrQueries.js +3 -0
- package/dist/esm/hrQueries.js.map +1 -1
- package/dist/esm/hrScreenSet.d.ts.map +1 -1
- package/dist/esm/hrScreenSet.js +7 -0
- package/dist/esm/hrScreenSet.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/navigation.d.ts.map +1 -1
- package/dist/esm/navigation.js +9 -1
- package/dist/esm/navigation.js.map +1 -1
- package/dist/esm/templates/index.d.ts +1 -0
- package/dist/esm/templates/index.d.ts.map +1 -1
- package/dist/esm/templates/index.js +3 -1
- package/dist/esm/templates/index.js.map +1 -1
- package/dist/esm/templates/teamCalendarTemplate.d.ts +3 -0
- package/dist/esm/templates/teamCalendarTemplate.d.ts.map +1 -0
- package/dist/esm/templates/teamCalendarTemplate.js +97 -0
- package/dist/esm/templates/teamCalendarTemplate.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/hrParts.ts +1 -1
- package/hrQueries.ts +3 -0
- package/hrScreenSet.ts +1 -0
- package/navigation.ts +2 -1
- package/package.json +9 -9
- package/sampleData/hr-nordic.json +150 -1
- package/templates/index.ts +3 -1
- package/templates/teamCalendarTemplate.ts +33 -0
- package/thumbnails/HrTeamCalendar.svg +16 -0
package/hrParts.ts
CHANGED
|
@@ -16,7 +16,7 @@ export const hrCategory = 'Business / HR';
|
|
|
16
16
|
export const thumbnailOf = (templateName: string): string => `thumbnails/${templateName}.svg`;
|
|
17
17
|
|
|
18
18
|
/** The metadata of a screen template of this blueprint: provenance, a type from the vocabulary, the category, a thumbnail and the levels it applies at. */
|
|
19
|
-
export const hrMetadata = (name: string, type: 'Dashboard' | 'List' | 'Board' | 'Detail' | 'Form' | 'Dialog' | 'Workspace', scopes: TemplateScope[]): TemplateMetadata =>
|
|
19
|
+
export const hrMetadata = (name: string, type: 'Dashboard' | 'List' | 'Board' | 'Detail' | 'Form' | 'Dialog' | 'Workspace' | 'Calendar', scopes: TemplateScope[]): TemplateMetadata =>
|
|
20
20
|
({ ...hrTemplateProvenance, type, category: hrCategory, thumbnail: thumbnailOf(name), scopes });
|
|
21
21
|
|
|
22
22
|
/** A button of the foundation: a verb, its emphasis, and the permission rule every action declares (spec Part B 1.5). */
|
package/hrQueries.ts
CHANGED
|
@@ -15,6 +15,9 @@ export const HrQuery = {
|
|
|
15
15
|
Settings: 'HrSettings',
|
|
16
16
|
RecordTabs: 'HrRecordTabs',
|
|
17
17
|
OrgNodes: 'OrgNodes',
|
|
18
|
+
TeamCalendarEvents: 'TeamCalendarEvents',
|
|
19
|
+
TeamCalendarFilterFields: 'TeamCalendarFilterFields',
|
|
20
|
+
TeamCalendarColumns: 'TeamCalendarColumns',
|
|
18
21
|
FormErrors: 'HrFormErrors',
|
|
19
22
|
} as const;
|
|
20
23
|
|
package/hrScreenSet.ts
CHANGED
|
@@ -19,6 +19,7 @@ export const hrScreenDefinitions: HrScreenDefinition[] = [
|
|
|
19
19
|
{ name: 'hr.org', title: 'Org chart', template: 'HrOrgChart', order: 1, description: 'Who reports to whom, as a tree.' },
|
|
20
20
|
{ name: 'hr.timeoff', title: 'Time off', template: 'HrTimeOffList', order: 2, description: 'Time-off requests to approve, with who is away and for how long.' },
|
|
21
21
|
{ name: 'hr.timeoff.balances', title: 'Balances', template: 'HrTimeOffBalanceList', parent: 'hr.timeoff', description: 'What each employee has taken and has left.' },
|
|
22
|
+
{ name: 'hr.timeoff.calendar', title: 'Team calendar', template: 'HrTeamCalendar', parent: 'hr.timeoff', description: 'Who is away and when, on a month, a week or as an agenda.' },
|
|
22
23
|
{ name: 'hr.onboarding', title: 'Onboarding', template: 'HrOnboardingList', order: 3, description: 'New hires and how far along their onboarding is.' },
|
|
23
24
|
{ name: 'hr.onboarding.record', title: 'Onboarding checklist', template: 'HrOnboardingChecklist', parent: 'hr.onboarding', description: 'One new hire\'s checklist: sections of tasks, each with an owner and a due date.' },
|
|
24
25
|
];
|
package/navigation.ts
CHANGED
|
@@ -31,7 +31,7 @@ export const hrStructure: ApplicationStructure = (() => {
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* The navigation of the application the blueprint is: the topbar names the module, and the module's sidebar - which overrides the application's - lists
|
|
34
|
-
* the four places an HR team goes: Directory, Org chart, Time off (with its requests and its balances beneath it) and Onboarding.
|
|
34
|
+
* the four places an HR team goes: Directory, Org chart, Time off (with its requests, the team calendar and its balances beneath it) and Onboarding.
|
|
35
35
|
*/
|
|
36
36
|
export const hrNavigation: NavigationModel = {
|
|
37
37
|
application: {
|
|
@@ -49,6 +49,7 @@ export const hrNavigation: NavigationModel = {
|
|
|
49
49
|
{
|
|
50
50
|
id: 'timeoff', title: 'Time off', target: { module: hrModule, feature: 'timeoff' }, children: [
|
|
51
51
|
{ id: 'requests', title: 'Requests', target: { module: hrModule, feature: 'timeoff' } },
|
|
52
|
+
{ id: 'calendar', title: 'Team calendar', target: { module: hrModule, feature: 'timeoff.calendar' } },
|
|
52
53
|
{ id: 'balances', title: 'Balances', target: { module: hrModule, feature: 'timeoff.balances' } },
|
|
53
54
|
],
|
|
54
55
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cratis/scene.blueprint.hr",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.59.0",
|
|
4
4
|
"description": "People, the org chart, time off and onboarding for an HR team.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cratis",
|
|
@@ -51,16 +51,16 @@
|
|
|
51
51
|
"up": "yarn g:up"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@cratis/scene.blueprint.default": "4.
|
|
55
|
-
"@cratis/scene.engine": "4.
|
|
56
|
-
"@cratis/scene.model": "4.
|
|
57
|
-
"@cratis/scene.react": "4.
|
|
54
|
+
"@cratis/scene.blueprint.default": "4.59.0",
|
|
55
|
+
"@cratis/scene.engine": "4.59.0",
|
|
56
|
+
"@cratis/scene.model": "4.59.0",
|
|
57
|
+
"@cratis/scene.react": "4.59.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@cratis/scene.blueprint.default": "4.
|
|
61
|
-
"@cratis/scene.engine": "4.
|
|
62
|
-
"@cratis/scene.model": "4.
|
|
63
|
-
"@cratis/scene.react": "4.
|
|
60
|
+
"@cratis/scene.blueprint.default": "4.59.0",
|
|
61
|
+
"@cratis/scene.engine": "4.59.0",
|
|
62
|
+
"@cratis/scene.model": "4.59.0",
|
|
63
|
+
"@cratis/scene.react": "4.59.0",
|
|
64
64
|
"@primereact/core": "11.2.0",
|
|
65
65
|
"@primereact/headless": "11.2.0",
|
|
66
66
|
"primeicons": "8.0.2",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"rows": [
|
|
10
10
|
{
|
|
11
11
|
"locale": "nb-NO",
|
|
12
|
-
"currency": "NOK"
|
|
12
|
+
"currency": "NOK",
|
|
13
|
+
"calendarDay": "2026-10-19"
|
|
13
14
|
}
|
|
14
15
|
]
|
|
15
16
|
},
|
|
@@ -1654,6 +1655,154 @@
|
|
|
1654
1655
|
"rows": [
|
|
1655
1656
|
{}
|
|
1656
1657
|
]
|
|
1658
|
+
},
|
|
1659
|
+
{
|
|
1660
|
+
"shape": "TeamCalendarEvents",
|
|
1661
|
+
"rows": [
|
|
1662
|
+
{
|
|
1663
|
+
"id": "req-1",
|
|
1664
|
+
"title": "Silje Andersen",
|
|
1665
|
+
"start": "2026-10-26",
|
|
1666
|
+
"end": "2026-10-30",
|
|
1667
|
+
"category": "Ferie · Venter",
|
|
1668
|
+
"tone": "warning",
|
|
1669
|
+
"person": "Silje Andersen"
|
|
1670
|
+
},
|
|
1671
|
+
{
|
|
1672
|
+
"id": "req-2",
|
|
1673
|
+
"title": "Emil Johansen",
|
|
1674
|
+
"start": "2026-11-02",
|
|
1675
|
+
"end": "2026-11-04",
|
|
1676
|
+
"category": "Ferie · Venter",
|
|
1677
|
+
"tone": "warning",
|
|
1678
|
+
"person": "Emil Johansen"
|
|
1679
|
+
},
|
|
1680
|
+
{
|
|
1681
|
+
"id": "req-3",
|
|
1682
|
+
"title": "Thea Pedersen",
|
|
1683
|
+
"start": "2026-10-19",
|
|
1684
|
+
"end": "2026-10-19",
|
|
1685
|
+
"category": "Avspasering · Godkjent",
|
|
1686
|
+
"tone": "success",
|
|
1687
|
+
"person": "Thea Pedersen"
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
"id": "req-4",
|
|
1691
|
+
"title": "Nora Karlsen",
|
|
1692
|
+
"start": "2026-09-01",
|
|
1693
|
+
"end": "2026-12-31",
|
|
1694
|
+
"category": "Permisjon · Godkjent",
|
|
1695
|
+
"tone": "success",
|
|
1696
|
+
"person": "Nora Karlsen"
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"id": "req-5",
|
|
1700
|
+
"title": "Oskar Nilsen",
|
|
1701
|
+
"start": "2026-12-21",
|
|
1702
|
+
"end": "2026-12-31",
|
|
1703
|
+
"category": "Ferie · Venter",
|
|
1704
|
+
"tone": "warning",
|
|
1705
|
+
"person": "Oskar Nilsen"
|
|
1706
|
+
},
|
|
1707
|
+
{
|
|
1708
|
+
"id": "req-6",
|
|
1709
|
+
"title": "Lars Strand",
|
|
1710
|
+
"start": "2026-10-12",
|
|
1711
|
+
"end": "2026-10-14",
|
|
1712
|
+
"category": "Sykefravær · Godkjent",
|
|
1713
|
+
"tone": "success",
|
|
1714
|
+
"person": "Lars Strand"
|
|
1715
|
+
},
|
|
1716
|
+
{
|
|
1717
|
+
"id": "req-8",
|
|
1718
|
+
"title": "Maja Bakken",
|
|
1719
|
+
"start": "2026-10-05",
|
|
1720
|
+
"end": "2026-10-09",
|
|
1721
|
+
"category": "Ferie · Godkjent",
|
|
1722
|
+
"tone": "success",
|
|
1723
|
+
"person": "Maja Bakken"
|
|
1724
|
+
},
|
|
1725
|
+
{
|
|
1726
|
+
"id": "req-9",
|
|
1727
|
+
"title": "Jonas Eriksen",
|
|
1728
|
+
"start": "2026-10-23",
|
|
1729
|
+
"end": "2026-10-23",
|
|
1730
|
+
"category": "Avspasering · Venter",
|
|
1731
|
+
"tone": "warning",
|
|
1732
|
+
"person": "Jonas Eriksen"
|
|
1733
|
+
},
|
|
1734
|
+
{
|
|
1735
|
+
"id": "req-10",
|
|
1736
|
+
"title": "Henriette Vik",
|
|
1737
|
+
"start": "2026-11-09",
|
|
1738
|
+
"end": "2026-11-13",
|
|
1739
|
+
"category": "Ferie · Venter",
|
|
1740
|
+
"tone": "warning",
|
|
1741
|
+
"person": "Henriette Vik"
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
"id": "req-11",
|
|
1745
|
+
"title": "Kristian Moen",
|
|
1746
|
+
"start": "2026-12-28",
|
|
1747
|
+
"end": "2026-12-31",
|
|
1748
|
+
"category": "Ferie · Godkjent",
|
|
1749
|
+
"tone": "success",
|
|
1750
|
+
"person": "Kristian Moen"
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
"id": "req-12",
|
|
1754
|
+
"title": "Henrik Lund",
|
|
1755
|
+
"start": "2026-10-21",
|
|
1756
|
+
"end": "2026-10-22",
|
|
1757
|
+
"category": "Ferie · Venter",
|
|
1758
|
+
"tone": "warning",
|
|
1759
|
+
"person": "Henrik Lund"
|
|
1760
|
+
}
|
|
1761
|
+
]
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
"shape": "TeamCalendarColumns",
|
|
1765
|
+
"rows": [
|
|
1766
|
+
{
|
|
1767
|
+
"field": "person",
|
|
1768
|
+
"header": "Ansatt"
|
|
1769
|
+
},
|
|
1770
|
+
{
|
|
1771
|
+
"field": "category",
|
|
1772
|
+
"header": "Fravær"
|
|
1773
|
+
},
|
|
1774
|
+
{
|
|
1775
|
+
"field": "start",
|
|
1776
|
+
"header": "Fra",
|
|
1777
|
+
"kind": "date"
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
"field": "end",
|
|
1781
|
+
"header": "Til",
|
|
1782
|
+
"kind": "date"
|
|
1783
|
+
}
|
|
1784
|
+
]
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
"shape": "TeamCalendarFilterFields",
|
|
1788
|
+
"rows": [
|
|
1789
|
+
{
|
|
1790
|
+
"name": "person",
|
|
1791
|
+
"label": "Ansatt",
|
|
1792
|
+
"type": "text"
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
"name": "category",
|
|
1796
|
+
"label": "Fravær",
|
|
1797
|
+
"type": "select",
|
|
1798
|
+
"options": [
|
|
1799
|
+
"Ferie",
|
|
1800
|
+
"Sykefravær",
|
|
1801
|
+
"Permisjon",
|
|
1802
|
+
"Avspasering"
|
|
1803
|
+
]
|
|
1804
|
+
}
|
|
1805
|
+
]
|
|
1657
1806
|
}
|
|
1658
1807
|
]
|
|
1659
1808
|
}
|
package/templates/index.ts
CHANGED
|
@@ -3,18 +3,20 @@
|
|
|
3
3
|
|
|
4
4
|
import { hrEmployeeDirectoryTemplate, hrOnboardingListTemplate, hrTimeOffBalanceListTemplate, hrTimeOffListTemplate } from './listTemplates';
|
|
5
5
|
import { hrOrgChartTemplate } from './orgChartTemplate';
|
|
6
|
+
import { hrTeamCalendarTemplate } from './teamCalendarTemplate';
|
|
6
7
|
import { hrEmployeePageTemplate, hrOnboardingChecklistTemplate } from './recordTemplates';
|
|
7
8
|
|
|
8
9
|
export * from './listTemplates';
|
|
9
10
|
export * from './recordTemplates';
|
|
10
11
|
export * from './orgChartTemplate';
|
|
12
|
+
export * from './teamCalendarTemplate';
|
|
11
13
|
export * from './formTemplates';
|
|
12
14
|
|
|
13
15
|
/** Every screen template this blueprint provides, in the order the manifest lists them. */
|
|
14
16
|
export const hrScreenTemplates = [
|
|
15
17
|
hrEmployeeDirectoryTemplate, hrEmployeePageTemplate,
|
|
16
18
|
hrOrgChartTemplate,
|
|
17
|
-
hrTimeOffListTemplate, hrTimeOffBalanceListTemplate,
|
|
19
|
+
hrTimeOffListTemplate, hrTimeOffBalanceListTemplate, hrTeamCalendarTemplate,
|
|
18
20
|
hrOnboardingListTemplate, hrOnboardingChecklistTemplate,
|
|
19
21
|
];
|
|
20
22
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { ScreenTemplate, TemplateScope, WidthSizeClass } from '@cratis/scene.model';
|
|
5
|
+
import { column, grid, slotLeaf } from '@cratis/scene.blueprint.default';
|
|
6
|
+
import { HrQuery, fromQuery, localeOfData } from '../hrQueries';
|
|
7
|
+
import { actionButton, component, hrMetadata, opensDialog, withBehaviors } from '../hrParts';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The team calendar: who is away and when, on a month, a week or as an agenda (the foundation's `calendarGrid`). A request spans the days it asks for, the kind of
|
|
11
|
+
* leave is told in words as well as by color, and the day and view are kept in the address, so a link shares the calendar as it is. A filter narrows it to a person
|
|
12
|
+
* or a kind of leave, and the list beside it names everyone away in the period.
|
|
13
|
+
*/
|
|
14
|
+
export const hrTeamCalendarTemplate: ScreenTemplate = {
|
|
15
|
+
name: 'HrTeamCalendar',
|
|
16
|
+
fitsSlot: 'content',
|
|
17
|
+
slots: [{ name: 'header' }, { name: 'filters' }, { name: 'calendar' }, { name: 'away' }],
|
|
18
|
+
arrangement: {
|
|
19
|
+
root: column([slotLeaf('header'), slotLeaf('filters'), grid([slotLeaf('calendar', { span: 2 }), slotLeaf('away')], 3, 16)], 16),
|
|
20
|
+
overrides: [{ width: WidthSizeClass.Compact, root: column([slotLeaf('header'), slotLeaf('filters'), slotLeaf('calendar'), slotLeaf('away')], 16) }],
|
|
21
|
+
},
|
|
22
|
+
content: {
|
|
23
|
+
header: [component('HrTeamCalendar-header', 'pageHeader', { title: 'Team calendar', subtitle: 'Who is away and when' }, {
|
|
24
|
+
actions: [withBehaviors(actionButton('HrTeamCalendar-request', 'Request time off', 'primary'), opensDialog('HrRequestTimeOff'))],
|
|
25
|
+
})],
|
|
26
|
+
filters: [component('HrTeamCalendar-filter', 'filterBuilder', { fields: fromQuery(HrQuery.TeamCalendarFilterFields) })],
|
|
27
|
+
calendar: [component('HrTeamCalendar-grid', 'calendarGrid', { label: 'Team calendar', events: fromQuery(HrQuery.TeamCalendarEvents), date: fromQuery(HrQuery.Settings, '0.calendarDay'), urlKey: 'day', ...localeOfData })],
|
|
28
|
+
away: [component('HrTeamCalendar-away', 'dataList', { label: 'Away in this period', rows: fromQuery(HrQuery.TeamCalendarEvents), columns: fromQuery(HrQuery.TeamCalendarColumns), titleField: 'person', pageSize: 6, ...localeOfData })],
|
|
29
|
+
},
|
|
30
|
+
displayName: 'HR team calendar',
|
|
31
|
+
description: 'Who is away and when, on a month, a week or as an agenda, with the kind of leave told in words.',
|
|
32
|
+
metadata: hrMetadata('HrTeamCalendar', 'Calendar', [TemplateScope.Module, TemplateScope.Feature]),
|
|
33
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="320" height="200" viewBox="0 0 320 200" role="img" aria-label="HrTeamCalendar">
|
|
2
|
+
<rect width="320" height="200" rx="8" fill="#f4f5f7"/>
|
|
3
|
+
<rect x="0" y="0" width="320" height="22" fill="#0f766e"/>
|
|
4
|
+
<rect x="0" y="22" width="56" height="178" fill="#e3e5ea"/>
|
|
5
|
+
<rect x="64" y="30" width="90" height="12" rx="3" fill="#ffffff" stroke="#d5d9df"/>
|
|
6
|
+
<rect x="64" y="48" width="170" height="140" fill="#ffffff" stroke="#d5d9df"/>
|
|
7
|
+
<rect x="64" y="48" width="170" height="14" fill="#e3e5ea"/>
|
|
8
|
+
<path d="M64 90H234M64 118H234M64 146H234M98 62V188M132 62V188M166 62V188M200 62V188" stroke="#d5d9df"/>
|
|
9
|
+
<rect x="68" y="96" width="60" height="6" rx="2" fill="#16a34a"/>
|
|
10
|
+
<rect x="136" y="124" width="26" height="6" rx="2" fill="#d97706"/>
|
|
11
|
+
<rect x="102" y="152" width="94" height="6" rx="2" fill="#16a34a"/>
|
|
12
|
+
<rect x="244" y="48" width="66" height="140" rx="3" fill="#ffffff" stroke="#d5d9df"/>
|
|
13
|
+
<rect x="250" y="58" width="54" height="5" rx="2" fill="#d5d9df"/>
|
|
14
|
+
<rect x="250" y="70" width="54" height="5" rx="2" fill="#d5d9df"/>
|
|
15
|
+
<rect x="250" y="82" width="54" height="5" rx="2" fill="#d5d9df"/>
|
|
16
|
+
</svg>
|