@cratis/scene.blueprint.hr 0.0.0-stage → 4.50.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/blueprint.ts +16 -0
- package/blueprintCatalog.json +164 -0
- package/dist/cjs/blueprint.js +19 -0
- package/dist/cjs/blueprint.js.map +1 -0
- package/dist/cjs/hrApplication.js +49 -0
- package/dist/cjs/hrApplication.js.map +1 -0
- package/dist/cjs/hrParts.js +131 -0
- package/dist/cjs/hrParts.js.map +1 -0
- package/dist/cjs/hrQueries.js +67 -0
- package/dist/cjs/hrQueries.js.map +1 -0
- package/dist/cjs/hrScreenSet.js +61 -0
- package/dist/cjs/hrScreenSet.js.map +1 -0
- package/dist/cjs/index.js +69 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/manifest.js +65 -0
- package/dist/cjs/manifest.js.map +1 -0
- package/dist/cjs/navigation.js +135 -0
- package/dist/cjs/navigation.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/packageName.js +8 -0
- package/dist/cjs/packageName.js.map +1 -0
- package/dist/cjs/screens/index.js +22 -0
- package/dist/cjs/screens/index.js.map +1 -0
- package/dist/cjs/templateProvenance.js +24 -0
- package/dist/cjs/templateProvenance.js.map +1 -0
- package/dist/cjs/templates/formTemplates.js +51 -0
- package/dist/cjs/templates/formTemplates.js.map +1 -0
- package/dist/cjs/templates/index.js +30 -0
- package/dist/cjs/templates/index.js.map +1 -0
- package/dist/cjs/templates/listTemplates.js +210 -0
- package/dist/cjs/templates/listTemplates.js.map +1 -0
- package/dist/cjs/templates/orgChartTemplate.js +63 -0
- package/dist/cjs/templates/orgChartTemplate.js.map +1 -0
- package/dist/cjs/templates/recordTemplates.js +181 -0
- package/dist/cjs/templates/recordTemplates.js.map +1 -0
- package/dist/esm/blueprint.d.ts +3 -0
- package/dist/esm/blueprint.d.ts.map +1 -0
- package/dist/esm/blueprint.js +17 -0
- package/dist/esm/blueprint.js.map +1 -0
- package/dist/esm/hrApplication.d.ts +10 -0
- package/dist/esm/hrApplication.d.ts.map +1 -0
- package/dist/esm/hrApplication.js +44 -0
- package/dist/esm/hrApplication.js.map +1 -0
- package/dist/esm/hrParts.d.ts +15 -0
- package/dist/esm/hrParts.d.ts.map +1 -0
- package/dist/esm/hrParts.js +114 -0
- package/dist/esm/hrParts.js.map +1 -0
- package/dist/esm/hrQueries.d.ts +38 -0
- package/dist/esm/hrQueries.d.ts.map +1 -0
- package/dist/esm/hrQueries.js +59 -0
- package/dist/esm/hrQueries.js.map +1 -0
- package/dist/esm/hrScreenSet.d.ts +7 -0
- package/dist/esm/hrScreenSet.d.ts.map +1 -0
- package/dist/esm/hrScreenSet.js +59 -0
- package/dist/esm/hrScreenSet.js.map +1 -0
- package/dist/esm/index.d.ts +12 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +17 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/manifest.d.ts +3 -0
- package/dist/esm/manifest.d.ts.map +1 -0
- package/dist/esm/manifest.js +63 -0
- package/dist/esm/manifest.js.map +1 -0
- package/dist/esm/navigation.d.ts +5 -0
- package/dist/esm/navigation.d.ts.map +1 -0
- package/dist/esm/navigation.js +131 -0
- package/dist/esm/navigation.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/packageName.d.ts +2 -0
- package/dist/esm/packageName.d.ts.map +1 -0
- package/dist/esm/packageName.js +6 -0
- package/dist/esm/packageName.js.map +1 -0
- package/dist/esm/screens/index.d.ts +3 -0
- package/dist/esm/screens/index.d.ts.map +1 -0
- package/dist/esm/screens/index.js +20 -0
- package/dist/esm/screens/index.js.map +1 -0
- package/dist/esm/templateProvenance.d.ts +3 -0
- package/dist/esm/templateProvenance.d.ts.map +1 -0
- package/dist/esm/templateProvenance.js +22 -0
- package/dist/esm/templateProvenance.js.map +1 -0
- package/dist/esm/templates/formTemplates.d.ts +3 -0
- package/dist/esm/templates/formTemplates.d.ts.map +1 -0
- package/dist/esm/templates/formTemplates.js +49 -0
- package/dist/esm/templates/formTemplates.js.map +1 -0
- package/dist/esm/templates/index.d.ts +7 -0
- package/dist/esm/templates/index.d.ts.map +1 -0
- package/dist/esm/templates/index.js +19 -0
- package/dist/esm/templates/index.js.map +1 -0
- package/dist/esm/templates/listTemplates.d.ts +6 -0
- package/dist/esm/templates/listTemplates.d.ts.map +1 -0
- package/dist/esm/templates/listTemplates.js +205 -0
- package/dist/esm/templates/listTemplates.js.map +1 -0
- package/dist/esm/templates/orgChartTemplate.d.ts +3 -0
- package/dist/esm/templates/orgChartTemplate.d.ts.map +1 -0
- package/dist/esm/templates/orgChartTemplate.js +61 -0
- package/dist/esm/templates/orgChartTemplate.js.map +1 -0
- package/dist/esm/templates/recordTemplates.d.ts +4 -0
- package/dist/esm/templates/recordTemplates.d.ts.map +1 -0
- package/dist/esm/templates/recordTemplates.js +178 -0
- package/dist/esm/templates/recordTemplates.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/hrApplication.ts +28 -0
- package/hrParts.ts +52 -0
- package/hrQueries.ts +59 -0
- package/hrScreenSet.ts +24 -0
- package/index.ts +14 -0
- package/manifest.ts +41 -0
- package/navigation.ts +59 -0
- package/package.json +79 -5
- package/packageName.ts +5 -0
- package/sampleData/hr-nordic.json +1659 -0
- package/screens/index.ts +20 -0
- package/templateProvenance.ts +15 -0
- package/templates/formTemplates.ts +34 -0
- package/templates/index.ts +21 -0
- package/templates/listTemplates.ts +109 -0
- package/templates/orgChartTemplate.ts +27 -0
- package/templates/recordTemplates.ts +75 -0
- package/thumbnails/HrEmployeeDirectory.svg +29 -0
- package/thumbnails/HrEmployeePage.svg +18 -0
- package/thumbnails/HrOnboardingChecklist.svg +18 -0
- package/thumbnails/HrOnboardingList.svg +13 -0
- package/thumbnails/HrOrgChart.svg +20 -0
- package/thumbnails/HrQuickCreateEmployee.svg +12 -0
- package/thumbnails/HrRequestTimeOff.svg +12 -0
- package/thumbnails/HrTimeOffBalanceList.svg +13 -0
- package/thumbnails/HrTimeOffList.svg +13 -0
- package/thumbnails/hr.svg +14 -0
- package/README.md +0 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { hrEmployeeDirectoryTemplate, hrTimeOffListTemplate, hrTimeOffBalanceListTemplate, hrOnboardingListTemplate } from './listTemplates.js';
|
|
2
|
+
import { hrOrgChartTemplate } from './orgChartTemplate.js';
|
|
3
|
+
import { hrEmployeePageTemplate, hrOnboardingChecklistTemplate } from './recordTemplates.js';
|
|
4
|
+
export { hrQuickCreateDialogs as hrDialogTemplates, hrQuickCreateDialogs } from './formTemplates.js';
|
|
5
|
+
|
|
6
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
7
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
8
|
+
/** Every screen template this blueprint provides, in the order the manifest lists them. */ const hrScreenTemplates = [
|
|
9
|
+
hrEmployeeDirectoryTemplate,
|
|
10
|
+
hrEmployeePageTemplate,
|
|
11
|
+
hrOrgChartTemplate,
|
|
12
|
+
hrTimeOffListTemplate,
|
|
13
|
+
hrTimeOffBalanceListTemplate,
|
|
14
|
+
hrOnboardingListTemplate,
|
|
15
|
+
hrOnboardingChecklistTemplate
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
export { hrEmployeeDirectoryTemplate, hrEmployeePageTemplate, hrOnboardingChecklistTemplate, hrOnboardingListTemplate, hrOrgChartTemplate, hrScreenTemplates, hrTimeOffBalanceListTemplate, hrTimeOffListTemplate };
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../templates/index.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { hrEmployeeDirectoryTemplate, hrOnboardingListTemplate, hrTimeOffBalanceListTemplate, hrTimeOffListTemplate } from './listTemplates';\nimport { hrOrgChartTemplate } from './orgChartTemplate';\nimport { hrEmployeePageTemplate, hrOnboardingChecklistTemplate } from './recordTemplates';\n\nexport * from './listTemplates';\nexport * from './recordTemplates';\nexport * from './orgChartTemplate';\nexport * from './formTemplates';\n\n/** Every screen template this blueprint provides, in the order the manifest lists them. */\nexport const hrScreenTemplates = [\n hrEmployeeDirectoryTemplate, hrEmployeePageTemplate,\n hrOrgChartTemplate,\n hrTimeOffListTemplate, hrTimeOffBalanceListTemplate,\n hrOnboardingListTemplate, hrOnboardingChecklistTemplate,\n];\n\nexport { hrQuickCreateDialogs as hrDialogTemplates } from './formTemplates';\n"],"names":["hrScreenTemplates","hrEmployeeDirectoryTemplate","hrEmployeePageTemplate","hrOrgChartTemplate","hrTimeOffListTemplate","hrTimeOffBalanceListTemplate","hrOnboardingListTemplate","hrOnboardingChecklistTemplate"],"mappings":";;;;;AAAA;AACA;AAWA,4FACO,MAAMA,iBAAAA,GAAoB;AAC7BC,IAAAA,2BAAAA;AAA6BC,IAAAA,sBAAAA;AAC7BC,IAAAA,kBAAAA;AACAC,IAAAA,qBAAAA;AAAuBC,IAAAA,4BAAAA;AACvBC,IAAAA,wBAAAA;AAA0BC,IAAAA;;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ScreenTemplate } from '@cratis/scene.model';
|
|
2
|
+
export declare const hrEmployeeDirectoryTemplate: ScreenTemplate;
|
|
3
|
+
export declare const hrTimeOffListTemplate: ScreenTemplate;
|
|
4
|
+
export declare const hrTimeOffBalanceListTemplate: ScreenTemplate;
|
|
5
|
+
export declare const hrOnboardingListTemplate: ScreenTemplate;
|
|
6
|
+
//# sourceMappingURL=listTemplates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listTemplates.d.ts","sourceRoot":"","sources":["../../../templates/listTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkF,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AAgFpJ,eAAO,MAAM,2BAA2B,gBAItC,CAAC;AAGH,eAAO,MAAM,qBAAqB,gBAIhC,CAAC;AAGH,eAAO,MAAM,4BAA4B,gBAIvC,CAAC;AAGH,eAAO,MAAM,wBAAwB,gBAInC,CAAC"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { TemplateScope, NotificationLevel, InteractionActionKind, InteractionTriggerKind } from '@cratis/scene.model';
|
|
2
|
+
import { component, listScreenTemplate } from '@cratis/scene.blueprint.default';
|
|
3
|
+
import { hrQueriesOf, localeOfData, fromQuery, HrEntityKind } from '../hrQueries.js';
|
|
4
|
+
import { withBehaviors, opensDialog, goesTo, actionButton, hrMetadata, opensRecordOnSelect } from '../hrParts.js';
|
|
5
|
+
|
|
6
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
7
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
8
|
+
const listScopes = [
|
|
9
|
+
TemplateScope.Module,
|
|
10
|
+
TemplateScope.Feature
|
|
11
|
+
];
|
|
12
|
+
/** The Export button: it tells the user the export has started, which is what the shell does for a long-running action it does not wait on. */ const exportAction = (id)=>withBehaviors(actionButton(id, 'Export', 'secondary'), [
|
|
13
|
+
{
|
|
14
|
+
bindings: [
|
|
15
|
+
{
|
|
16
|
+
trigger: {
|
|
17
|
+
kind: InteractionTriggerKind.Click
|
|
18
|
+
},
|
|
19
|
+
actions: [
|
|
20
|
+
{
|
|
21
|
+
kind: InteractionActionKind.Notify,
|
|
22
|
+
level: NotificationLevel.Info,
|
|
23
|
+
message: {
|
|
24
|
+
text: 'The export has started.'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
]);
|
|
32
|
+
/**
|
|
33
|
+
* One HR list: the foundation `ListScreen` with its header, toolbar, filters, list and bulk bar filled for an entity. The slots, arrangement and
|
|
34
|
+
* every behavior - sort, search, paging and selection in the address, the table collapsing to cards on a phone - are the foundation's.
|
|
35
|
+
*/ function listTemplateOf(options) {
|
|
36
|
+
const queries = hrQueriesOf(options.entity);
|
|
37
|
+
const id = options.name;
|
|
38
|
+
const listId = `${id}-records`;
|
|
39
|
+
const primary = withBehaviors(actionButton(`${id}-primary`, options.primary.label, 'primary'), options.primary.dialog ? opensDialog(options.primary.dialog) : goesTo(options.primary.screen));
|
|
40
|
+
const list = component(listId, 'dataList', {
|
|
41
|
+
label: options.title,
|
|
42
|
+
rows: fromQuery(queries.rows),
|
|
43
|
+
columns: fromQuery(queries.columns),
|
|
44
|
+
titleField: options.titleField,
|
|
45
|
+
pageSize: options.cards ? 12 : 10,
|
|
46
|
+
urlKey: options.urlKey,
|
|
47
|
+
...localeOfData,
|
|
48
|
+
rowActions: options.rowActions,
|
|
49
|
+
...options.readOnly ? {} : {
|
|
50
|
+
selectionMode: options.recordScreen ? 'single' : 'multiple'
|
|
51
|
+
},
|
|
52
|
+
...options.cards ? {
|
|
53
|
+
variant: 'cards',
|
|
54
|
+
imageField: options.cards.imageField
|
|
55
|
+
} : {},
|
|
56
|
+
...options.toneField ? {
|
|
57
|
+
toneField: options.toneField
|
|
58
|
+
} : {}
|
|
59
|
+
});
|
|
60
|
+
return {
|
|
61
|
+
name: options.name,
|
|
62
|
+
fitsSlot: 'content',
|
|
63
|
+
slots: listScreenTemplate.slots,
|
|
64
|
+
arrangement: listScreenTemplate.arrangement,
|
|
65
|
+
content: {
|
|
66
|
+
header: [
|
|
67
|
+
component(`${id}-header`, 'pageHeader', {
|
|
68
|
+
title: options.title,
|
|
69
|
+
subtitle: options.subtitle
|
|
70
|
+
}, {
|
|
71
|
+
actions: [
|
|
72
|
+
exportAction(`${id}-export`),
|
|
73
|
+
primary
|
|
74
|
+
]
|
|
75
|
+
})
|
|
76
|
+
],
|
|
77
|
+
toolbar: [
|
|
78
|
+
component(`${id}-search`, 'globalSearch', {
|
|
79
|
+
placeholder: options.searchLabel,
|
|
80
|
+
label: options.searchLabel,
|
|
81
|
+
urlKey: `${options.urlKey}q`
|
|
82
|
+
}),
|
|
83
|
+
component(`${id}-views`, 'savedViewsMenu', {
|
|
84
|
+
views: fromQuery(queries.views),
|
|
85
|
+
savePermission: 'enabled',
|
|
86
|
+
managePermission: 'enabled'
|
|
87
|
+
}),
|
|
88
|
+
component(`${id}-columns`, 'columnChooser', {
|
|
89
|
+
columns: fromQuery(queries.columnChoices)
|
|
90
|
+
})
|
|
91
|
+
],
|
|
92
|
+
filters: [
|
|
93
|
+
component(`${id}-filter`, 'filterBuilder', {
|
|
94
|
+
fields: fromQuery(queries.filterFields),
|
|
95
|
+
...localeOfData
|
|
96
|
+
})
|
|
97
|
+
],
|
|
98
|
+
list: [
|
|
99
|
+
options.recordScreen ? withBehaviors(list, opensRecordOnSelect(listId, options.recordScreen)) : list
|
|
100
|
+
],
|
|
101
|
+
bulkBar: options.recordScreen || options.readOnly ? [] : [
|
|
102
|
+
component(`${id}-bulk`, 'bulkBar', {
|
|
103
|
+
selection: fromQuery(queries.selection),
|
|
104
|
+
actions: options.bulkActions
|
|
105
|
+
})
|
|
106
|
+
],
|
|
107
|
+
footer: []
|
|
108
|
+
},
|
|
109
|
+
displayName: options.displayName,
|
|
110
|
+
description: options.description,
|
|
111
|
+
metadata: hrMetadata(options.name, 'List', listScopes)
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/** The directory: everyone in the company as cards - photo, name, title, department and how to reach them. Choosing a card opens the employee. */ const hrEmployeeDirectoryTemplate = listTemplateOf({
|
|
115
|
+
name: 'HrEmployeeDirectory',
|
|
116
|
+
entity: HrEntityKind.Employee,
|
|
117
|
+
displayName: 'HR employee directory',
|
|
118
|
+
description: 'Employees as cards with photo, name, title, department and contact, filtered by department, location and status.',
|
|
119
|
+
title: 'Directory',
|
|
120
|
+
subtitle: 'Everyone in the company',
|
|
121
|
+
searchLabel: 'Search people',
|
|
122
|
+
urlKey: 'people',
|
|
123
|
+
primary: {
|
|
124
|
+
label: 'New employee',
|
|
125
|
+
dialog: 'HrQuickCreateEmployee'
|
|
126
|
+
},
|
|
127
|
+
rowActions: [
|
|
128
|
+
'View profile',
|
|
129
|
+
'Send email'
|
|
130
|
+
],
|
|
131
|
+
bulkActions: [],
|
|
132
|
+
titleField: 'name',
|
|
133
|
+
recordScreen: 'hr.directory.record',
|
|
134
|
+
cards: {
|
|
135
|
+
imageField: 'photo'
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
/** The time-off requests: who asked for what and when, with the actions a manager takes on one or many at once. */ const hrTimeOffListTemplate = listTemplateOf({
|
|
139
|
+
name: 'HrTimeOffList',
|
|
140
|
+
entity: HrEntityKind.TimeOff,
|
|
141
|
+
displayName: 'HR time off',
|
|
142
|
+
description: 'Time-off requests with the employee, type, dates, days and status, filtered by type, status and period.',
|
|
143
|
+
title: 'Time off',
|
|
144
|
+
subtitle: 'Requests to approve and who is away',
|
|
145
|
+
searchLabel: 'Search requests',
|
|
146
|
+
urlKey: 'timeoff',
|
|
147
|
+
primary: {
|
|
148
|
+
label: 'Request time off',
|
|
149
|
+
dialog: 'HrRequestTimeOff'
|
|
150
|
+
},
|
|
151
|
+
rowActions: [
|
|
152
|
+
'Approve',
|
|
153
|
+
'Decline',
|
|
154
|
+
'Cancel'
|
|
155
|
+
],
|
|
156
|
+
bulkActions: [
|
|
157
|
+
'Approve',
|
|
158
|
+
'Decline'
|
|
159
|
+
],
|
|
160
|
+
titleField: 'employee'
|
|
161
|
+
});
|
|
162
|
+
/** The balances: what each employee is entitled to, has taken and has left, with how much of the year is used. Read only. */ const hrTimeOffBalanceListTemplate = listTemplateOf({
|
|
163
|
+
name: 'HrTimeOffBalanceList',
|
|
164
|
+
entity: HrEntityKind.Balance,
|
|
165
|
+
displayName: 'HR time-off balances',
|
|
166
|
+
description: 'Each employee\'s entitlement, days taken and days left, with how much of it is used.',
|
|
167
|
+
title: 'Balances',
|
|
168
|
+
subtitle: 'Time off taken and left this year',
|
|
169
|
+
searchLabel: 'Search balances',
|
|
170
|
+
urlKey: 'balances',
|
|
171
|
+
primary: {
|
|
172
|
+
label: 'Request time off',
|
|
173
|
+
dialog: 'HrRequestTimeOff'
|
|
174
|
+
},
|
|
175
|
+
rowActions: [
|
|
176
|
+
'View employee'
|
|
177
|
+
],
|
|
178
|
+
bulkActions: [],
|
|
179
|
+
titleField: 'employee',
|
|
180
|
+
readOnly: true
|
|
181
|
+
});
|
|
182
|
+
/** The onboarding: new hires, when they start, who looks after them and how far along their checklist is. Choosing a row opens the checklist. */ const hrOnboardingListTemplate = listTemplateOf({
|
|
183
|
+
name: 'HrOnboardingList',
|
|
184
|
+
entity: HrEntityKind.Onboarding,
|
|
185
|
+
displayName: 'HR onboarding',
|
|
186
|
+
description: 'New hires with their start date, owner and a progress bar of their checklist.',
|
|
187
|
+
title: 'Onboarding',
|
|
188
|
+
subtitle: 'New hires and how far along they are',
|
|
189
|
+
searchLabel: 'Search new hires',
|
|
190
|
+
urlKey: 'onboarding',
|
|
191
|
+
primary: {
|
|
192
|
+
label: 'New employee',
|
|
193
|
+
dialog: 'HrQuickCreateEmployee'
|
|
194
|
+
},
|
|
195
|
+
rowActions: [
|
|
196
|
+
'Open checklist',
|
|
197
|
+
'Remind owner'
|
|
198
|
+
],
|
|
199
|
+
bulkActions: [],
|
|
200
|
+
titleField: 'name',
|
|
201
|
+
recordScreen: 'hr.onboarding.record'
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
export { hrEmployeeDirectoryTemplate, hrOnboardingListTemplate, hrTimeOffBalanceListTemplate, hrTimeOffListTemplate };
|
|
205
|
+
//# sourceMappingURL=listTemplates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listTemplates.js","sources":["../../../templates/listTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { InteractionActionKind, InteractionTriggerKind, NotificationLevel, NotifyAction, ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { listScreenTemplate } from '@cratis/scene.blueprint.default';\nimport { HrEntityKind, fromQuery, hrQueriesOf, localeOfData } from '../hrQueries';\nimport { actionButton, component, goesTo, hrMetadata, opensDialog, opensRecordOnSelect, withBehaviors } from '../hrParts';\n\nconst listScopes = [TemplateScope.Module, TemplateScope.Feature];\n\n/** The Export button: it tells the user the export has started, which is what the shell does for a long-running action it does not wait on. */\nconst exportAction = (id: string) => withBehaviors(actionButton(id, 'Export', 'secondary'), [{\n bindings: [{\n trigger: { kind: InteractionTriggerKind.Click },\n actions: [{ kind: InteractionActionKind.Notify, level: NotificationLevel.Info, message: { text: 'The export has started.' } } as unknown as NotifyAction],\n }],\n}]);\n\ninterface ListOptions {\n name: string;\n entity: HrEntityKind;\n displayName: string;\n description: string;\n title: string;\n subtitle: string;\n searchLabel: string;\n urlKey: string;\n /** The primary action of the header: a quick-create dialog to open, or a screen to go to. */\n primary: { label: string; dialog?: string; screen?: string };\n rowActions: string[];\n bulkActions: string[];\n titleField: string;\n /** The screen a chosen row opens; the list then selects one row at a time. Absent, rows are selected many at a time for the bulk bar. */\n recordScreen?: string;\n /** Rows are not selectable at all: a record of what happened, which nobody edits. */\n readOnly?: boolean;\n /** Show the records as cards, each with the picture its `imageField` names. */\n cards?: { imageField: string };\n /** Tint a row by the tone in this field (always beside a status column that says the same in words). */\n toneField?: string;\n}\n\n/**\n * One HR list: the foundation `ListScreen` with its header, toolbar, filters, list and bulk bar filled for an entity. The slots, arrangement and\n * every behavior - sort, search, paging and selection in the address, the table collapsing to cards on a phone - are the foundation's.\n */\nfunction listTemplateOf(options: ListOptions): ScreenTemplate {\n const queries = hrQueriesOf(options.entity);\n const id = options.name;\n const listId = `${id}-records`;\n const primary = withBehaviors(actionButton(`${id}-primary`, options.primary.label, 'primary'), options.primary.dialog ? opensDialog(options.primary.dialog) : goesTo(options.primary.screen!));\n const list = component(listId, 'dataList', {\n label: options.title, rows: fromQuery(queries.rows), columns: fromQuery(queries.columns), titleField: options.titleField, pageSize: options.cards ? 12 : 10, urlKey: options.urlKey, ...localeOfData,\n rowActions: options.rowActions,\n ...(options.readOnly ? {} : { selectionMode: options.recordScreen ? 'single' : 'multiple' }),\n ...(options.cards ? { variant: 'cards', imageField: options.cards.imageField } : {}),\n ...(options.toneField ? { toneField: options.toneField } : {}),\n });\n\n return {\n name: options.name,\n fitsSlot: 'content',\n slots: listScreenTemplate.slots,\n arrangement: listScreenTemplate.arrangement,\n content: {\n header: [component(`${id}-header`, 'pageHeader', { title: options.title, subtitle: options.subtitle }, { actions: [exportAction(`${id}-export`), primary] })],\n toolbar: [\n component(`${id}-search`, 'globalSearch', { placeholder: options.searchLabel, label: options.searchLabel, urlKey: `${options.urlKey}q` }),\n component(`${id}-views`, 'savedViewsMenu', { views: fromQuery(queries.views), savePermission: 'enabled', managePermission: 'enabled' }),\n component(`${id}-columns`, 'columnChooser', { columns: fromQuery(queries.columnChoices) }),\n ],\n filters: [component(`${id}-filter`, 'filterBuilder', { fields: fromQuery(queries.filterFields), ...localeOfData })],\n list: [options.recordScreen ? withBehaviors(list, opensRecordOnSelect(listId, options.recordScreen)) : list],\n bulkBar: options.recordScreen || options.readOnly ? [] : [component(`${id}-bulk`, 'bulkBar', { selection: fromQuery(queries.selection), actions: options.bulkActions })],\n footer: [],\n },\n displayName: options.displayName,\n description: options.description,\n metadata: hrMetadata(options.name, 'List', listScopes),\n };\n}\n\n/** The directory: everyone in the company as cards - photo, name, title, department and how to reach them. Choosing a card opens the employee. */\nexport const hrEmployeeDirectoryTemplate = listTemplateOf({\n name: 'HrEmployeeDirectory', entity: HrEntityKind.Employee, displayName: 'HR employee directory', description: 'Employees as cards with photo, name, title, department and contact, filtered by department, location and status.',\n title: 'Directory', subtitle: 'Everyone in the company', searchLabel: 'Search people', urlKey: 'people', primary: { label: 'New employee', dialog: 'HrQuickCreateEmployee' },\n rowActions: ['View profile', 'Send email'], bulkActions: [], titleField: 'name', recordScreen: 'hr.directory.record', cards: { imageField: 'photo' },\n});\n\n/** The time-off requests: who asked for what and when, with the actions a manager takes on one or many at once. */\nexport const hrTimeOffListTemplate = listTemplateOf({\n name: 'HrTimeOffList', entity: HrEntityKind.TimeOff, displayName: 'HR time off', description: 'Time-off requests with the employee, type, dates, days and status, filtered by type, status and period.',\n title: 'Time off', subtitle: 'Requests to approve and who is away', searchLabel: 'Search requests', urlKey: 'timeoff', primary: { label: 'Request time off', dialog: 'HrRequestTimeOff' },\n rowActions: ['Approve', 'Decline', 'Cancel'], bulkActions: ['Approve', 'Decline'], titleField: 'employee',\n});\n\n/** The balances: what each employee is entitled to, has taken and has left, with how much of the year is used. Read only. */\nexport const hrTimeOffBalanceListTemplate = listTemplateOf({\n name: 'HrTimeOffBalanceList', entity: HrEntityKind.Balance, displayName: 'HR time-off balances', description: 'Each employee\\'s entitlement, days taken and days left, with how much of it is used.',\n title: 'Balances', subtitle: 'Time off taken and left this year', searchLabel: 'Search balances', urlKey: 'balances', primary: { label: 'Request time off', dialog: 'HrRequestTimeOff' },\n rowActions: ['View employee'], bulkActions: [], titleField: 'employee', readOnly: true,\n});\n\n/** The onboarding: new hires, when they start, who looks after them and how far along their checklist is. Choosing a row opens the checklist. */\nexport const hrOnboardingListTemplate = listTemplateOf({\n name: 'HrOnboardingList', entity: HrEntityKind.Onboarding, displayName: 'HR onboarding', description: 'New hires with their start date, owner and a progress bar of their checklist.',\n title: 'Onboarding', subtitle: 'New hires and how far along they are', searchLabel: 'Search new hires', urlKey: 'onboarding', primary: { label: 'New employee', dialog: 'HrQuickCreateEmployee' },\n rowActions: ['Open checklist', 'Remind owner'], bulkActions: [], titleField: 'name', recordScreen: 'hr.onboarding.record',\n});\n"],"names":["listScopes","TemplateScope","Module","Feature","exportAction","id","withBehaviors","actionButton","bindings","trigger","kind","InteractionTriggerKind","Click","actions","InteractionActionKind","Notify","level","NotificationLevel","Info","message","text","listTemplateOf","options","queries","hrQueriesOf","entity","name","listId","primary","label","dialog","opensDialog","goesTo","screen","list","component","title","rows","fromQuery","columns","titleField","pageSize","cards","urlKey","localeOfData","rowActions","readOnly","selectionMode","recordScreen","variant","imageField","toneField","fitsSlot","slots","listScreenTemplate","arrangement","content","header","subtitle","toolbar","placeholder","searchLabel","views","savePermission","managePermission","columnChoices","filters","fields","filterFields","opensRecordOnSelect","bulkBar","selection","bulkActions","footer","displayName","description","metadata","hrMetadata","hrEmployeeDirectoryTemplate","HrEntityKind","Employee","hrTimeOffListTemplate","TimeOff","hrTimeOffBalanceListTemplate","Balance","hrOnboardingListTemplate","Onboarding"],"mappings":";;;;;AAAA;AACA;AAOA,MAAMA,UAAAA,GAAa;AAACC,IAAAA,aAAAA,CAAcC,MAAM;AAAED,IAAAA,aAAAA,CAAcE;AAAQ,CAAA;AAEhE,gJACA,MAAMC,YAAAA,GAAe,CAACC,KAAeC,aAAAA,CAAcC,YAAAA,CAAaF,EAAAA,EAAI,QAAA,EAAU,WAAA,CAAA,EAAc;AAAC,QAAA;YACzFG,QAAAA,EAAU;AAAC,gBAAA;oBACPC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,uBAAuBC;AAAM,qBAAA;oBAC9CC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,sBAAsBC,MAAM;AAAEC,4BAAAA,KAAAA,EAAOC,kBAAkBC,IAAI;4BAAEC,OAAAA,EAAS;gCAAEC,IAAAA,EAAM;AAA0B;AAAE;AAA6B;AAC7J;AAAE;AACN;AAAE,KAAA,CAAA;AA0BF;;;IAIA,SAASC,eAAeC,OAAoB,EAAA;IACxC,MAAMC,OAAAA,GAAUC,WAAAA,CAAYF,OAAAA,CAAQG,MAAM,CAAA;IAC1C,MAAMpB,EAAAA,GAAKiB,QAAQI,IAAI;AACvB,IAAA,MAAMC,MAAAA,GAAS,CAAA,EAAGtB,EAAAA,CAAG,QAAQ,CAAC;AAC9B,IAAA,MAAMuB,OAAAA,GAAUtB,aAAAA,CAAcC,YAAAA,CAAa,CAAA,EAAGF,EAAAA,CAAG,QAAQ,CAAC,EAAEiB,OAAAA,CAA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CAAe;IACnDK,IAAAA,EAAM,kBAAA;AAAoBD,IAAAA,MAAAA,EAAQsD,aAAaO,UAAU;IAAEZ,WAAAA,EAAa,eAAA;IAAiBC,WAAAA,EAAa,+EAAA;IACtGvC,KAAAA,EAAO,YAAA;IAAcsB,QAAAA,EAAU,sCAAA;IAAwCG,WAAAA,EAAa,kBAAA;IAAoBlB,MAAAA,EAAQ,YAAA;IAAcf,OAAAA,EAAS;QAAEC,KAAAA,EAAO,cAAA;QAAgBC,MAAAA,EAAQ;AAAwB,KAAA;IAChMe,UAAAA,EAAY;AAAC,QAAA,gBAAA;AAAkB,QAAA;AAAe,KAAA;AAAE2B,IAAAA,WAAAA,EAAa,EAAE;IAAEhC,UAAAA,EAAY,MAAA;IAAQQ,YAAAA,EAAc;AACvG,CAAA;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orgChartTemplate.d.ts","sourceRoot":"","sources":["../../../templates/orgChartTemplate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AASpE,eAAO,MAAM,kBAAkB,EAAE,cAchC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { TemplateScope } from '@cratis/scene.model';
|
|
2
|
+
import { component, column, slotLeaf } from '@cratis/scene.blueprint.default';
|
|
3
|
+
import { localeOfData, fromQuery, HrQuery } from '../hrQueries.js';
|
|
4
|
+
import { hrMetadata, withBehaviors, goesTo, actionButton } from '../hrParts.js';
|
|
5
|
+
|
|
6
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
7
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
8
|
+
/**
|
|
9
|
+
* The org chart: the company as a tree - who reports to whom, with each person's title and how many report to them. It follows the ARIA tree pattern, so it is as
|
|
10
|
+
* usable from a keyboard and a screen reader as with a pointer, and the chosen person is kept in the address, so a link points at a place in the chart.
|
|
11
|
+
*/ const hrOrgChartTemplate = {
|
|
12
|
+
name: 'HrOrgChart',
|
|
13
|
+
fitsSlot: 'content',
|
|
14
|
+
slots: [
|
|
15
|
+
{
|
|
16
|
+
name: 'header'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'chart'
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
arrangement: {
|
|
23
|
+
root: column([
|
|
24
|
+
slotLeaf('header'),
|
|
25
|
+
slotLeaf('chart')
|
|
26
|
+
], 16)
|
|
27
|
+
},
|
|
28
|
+
content: {
|
|
29
|
+
header: [
|
|
30
|
+
component('HrOrgChart-header', 'pageHeader', {
|
|
31
|
+
title: 'Org chart',
|
|
32
|
+
subtitle: 'Who reports to whom'
|
|
33
|
+
}, {
|
|
34
|
+
actions: [
|
|
35
|
+
withBehaviors(actionButton('HrOrgChart-directory', 'Open the directory', 'secondary'), goesTo('hr.directory'))
|
|
36
|
+
]
|
|
37
|
+
})
|
|
38
|
+
],
|
|
39
|
+
chart: [
|
|
40
|
+
component('HrOrgChart-tree', 'orgTree', {
|
|
41
|
+
nodes: fromQuery(HrQuery.OrgNodes),
|
|
42
|
+
expandedDepth: 2,
|
|
43
|
+
urlKey: 'person',
|
|
44
|
+
strings: {
|
|
45
|
+
orgTree: 'Org chart',
|
|
46
|
+
orgReports: '{count} reports'
|
|
47
|
+
},
|
|
48
|
+
...localeOfData
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
displayName: 'HR org chart',
|
|
53
|
+
description: 'The company as a tree of who reports to whom, with titles and report counts.',
|
|
54
|
+
metadata: hrMetadata('HrOrgChart', 'Detail', [
|
|
55
|
+
TemplateScope.Module,
|
|
56
|
+
TemplateScope.Feature
|
|
57
|
+
])
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export { hrOrgChartTemplate };
|
|
61
|
+
//# sourceMappingURL=orgChartTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orgChartTemplate.js","sources":["../../../templates/orgChartTemplate.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { column, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { HrQuery, fromQuery, localeOfData } from '../hrQueries';\nimport { actionButton, component, goesTo, hrMetadata, withBehaviors } from '../hrParts';\n\n/**\n * The org chart: the company as a tree - who reports to whom, with each person's title and how many report to them. It follows the ARIA tree pattern, so it is as\n * usable from a keyboard and a screen reader as with a pointer, and the chosen person is kept in the address, so a link points at a place in the chart.\n */\nexport const hrOrgChartTemplate: ScreenTemplate = {\n name: 'HrOrgChart',\n fitsSlot: 'content',\n slots: [{ name: 'header' }, { name: 'chart' }],\n arrangement: { root: column([slotLeaf('header'), slotLeaf('chart')], 16) },\n content: {\n header: [component('HrOrgChart-header', 'pageHeader', { title: 'Org chart', subtitle: 'Who reports to whom' }, {\n actions: [withBehaviors(actionButton('HrOrgChart-directory', 'Open the directory', 'secondary'), goesTo('hr.directory'))],\n })],\n chart: [component('HrOrgChart-tree', 'orgTree', { nodes: fromQuery(HrQuery.OrgNodes), expandedDepth: 2, urlKey: 'person', strings: { orgTree: 'Org chart', orgReports: '{count} reports' }, ...localeOfData })],\n },\n displayName: 'HR org chart',\n description: 'The company as a tree of who reports to whom, with titles and report counts.',\n metadata: hrMetadata('HrOrgChart', 'Detail', [TemplateScope.Module, TemplateScope.Feature]),\n};\n"],"names":["hrOrgChartTemplate","name","fitsSlot","slots","arrangement","root","column","slotLeaf","content","header","component","title","subtitle","actions","withBehaviors","actionButton","goesTo","chart","nodes","fromQuery","HrQuery","OrgNodes","expandedDepth","urlKey","strings","orgTree","orgReports","localeOfData","displayName","description","metadata","hrMetadata","TemplateScope","Module","Feature"],"mappings":";;;;;AAAA;AACA;AAOA;;;UAIaA,kBAAAA,GAAqC;IAC9CC,IAAAA,EAAM,YAAA;IACNC,QAAAA,EAAU,SAAA;IACV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iB,MAAM,qBAAqB,CAAC;AAYpE,eAAO,MAAM,sBAAsB,EAAE,cA8BpC,CAAC;AAOF,eAAO,MAAM,6BAA6B,EAAE,cAsB3C,CAAC"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { TemplateScope } from '@cratis/scene.model';
|
|
2
|
+
import { component, recordPageTemplate } from '@cratis/scene.blueprint.default';
|
|
3
|
+
import { localeOfData, fromQuery, hrQueriesOf, HrEntityKind, HrQuery } from '../hrQueries.js';
|
|
4
|
+
import { hrMetadata, withBehaviors, opensDialog, actionButton } from '../hrParts.js';
|
|
5
|
+
|
|
6
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
7
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
8
|
+
const employee = hrQueriesOf(HrEntityKind.Employee);
|
|
9
|
+
const onboarding = hrQueriesOf(HrEntityKind.Onboarding);
|
|
10
|
+
/**
|
|
11
|
+
* The employee page: the foundation `RecordPage` with the employee's name as its title, the time-off balance as key facts under it, the personal and job
|
|
12
|
+
* information as the record, the employee's documents and time-off requests as related lists, their history and the open tasks beside it.
|
|
13
|
+
*/ const hrEmployeePageTemplate = {
|
|
14
|
+
name: 'HrEmployeePage',
|
|
15
|
+
fitsSlot: 'content',
|
|
16
|
+
slots: recordPageTemplate.slots,
|
|
17
|
+
arrangement: recordPageTemplate.arrangement,
|
|
18
|
+
content: {
|
|
19
|
+
header: [
|
|
20
|
+
component('HrEmployeePage-header', 'pageHeader', {
|
|
21
|
+
title: fromQuery(employee.record, '0.name'),
|
|
22
|
+
subtitle: fromQuery(employee.record, '0.title')
|
|
23
|
+
}, {
|
|
24
|
+
actions: [
|
|
25
|
+
withBehaviors(actionButton('HrEmployeePage-timeoff', 'Request time off', 'primary'), opensDialog('HrRequestTimeOff'))
|
|
26
|
+
]
|
|
27
|
+
})
|
|
28
|
+
],
|
|
29
|
+
summary: [
|
|
30
|
+
component('HrEmployeePage-status', 'statusChip', {
|
|
31
|
+
status: fromQuery(employee.summary, '0.status'),
|
|
32
|
+
tone: fromQuery(employee.summary, '0.tone')
|
|
33
|
+
}),
|
|
34
|
+
component('HrEmployeePage-left', 'statCard', {
|
|
35
|
+
label: 'Leave left (days)',
|
|
36
|
+
value: fromQuery(employee.summary, '0.leaveLeft'),
|
|
37
|
+
...localeOfData
|
|
38
|
+
}),
|
|
39
|
+
component('HrEmployeePage-taken', 'statCard', {
|
|
40
|
+
label: 'Leave taken (days)',
|
|
41
|
+
value: fromQuery(employee.summary, '0.leaveTaken'),
|
|
42
|
+
...localeOfData
|
|
43
|
+
}),
|
|
44
|
+
component('HrEmployeePage-service', 'statCard', {
|
|
45
|
+
label: 'Years of service',
|
|
46
|
+
value: fromQuery(employee.summary, '0.years'),
|
|
47
|
+
...localeOfData
|
|
48
|
+
}),
|
|
49
|
+
component('HrEmployeePage-team', 'avatarStack', {
|
|
50
|
+
people: fromQuery(employee.summary, '0.people')
|
|
51
|
+
})
|
|
52
|
+
],
|
|
53
|
+
tabs: [
|
|
54
|
+
component('HrEmployeePage-tabs', 'tabSet', {
|
|
55
|
+
tabs: fromQuery(HrQuery.RecordTabs),
|
|
56
|
+
urlKey: 'tab',
|
|
57
|
+
label: 'Employee sections'
|
|
58
|
+
})
|
|
59
|
+
],
|
|
60
|
+
main: [
|
|
61
|
+
component('HrEmployeePage-form', 'formScreenBody', {
|
|
62
|
+
mode: 'readOnly',
|
|
63
|
+
sections: fromQuery(employee.sections),
|
|
64
|
+
values: fromQuery(employee.record, '0'),
|
|
65
|
+
...localeOfData
|
|
66
|
+
})
|
|
67
|
+
],
|
|
68
|
+
related: [
|
|
69
|
+
component('HrEmployeePage-documents', 'dataList', {
|
|
70
|
+
label: 'Documents',
|
|
71
|
+
rows: fromQuery(employee.documents),
|
|
72
|
+
columns: fromQuery('DocumentColumns'),
|
|
73
|
+
titleField: 'name',
|
|
74
|
+
pageSize: 5,
|
|
75
|
+
...localeOfData
|
|
76
|
+
}),
|
|
77
|
+
component('HrEmployeePage-requests', 'dataList', {
|
|
78
|
+
label: 'Time off',
|
|
79
|
+
rows: fromQuery('EmployeeTimeOff'),
|
|
80
|
+
columns: fromQuery(hrQueriesOf(HrEntityKind.TimeOff).columns),
|
|
81
|
+
titleField: 'employee',
|
|
82
|
+
pageSize: 5,
|
|
83
|
+
...localeOfData
|
|
84
|
+
})
|
|
85
|
+
],
|
|
86
|
+
activity: [
|
|
87
|
+
component('HrEmployeePage-activity', 'activityFeed', {
|
|
88
|
+
label: 'History',
|
|
89
|
+
entries: fromQuery(employee.activity),
|
|
90
|
+
...localeOfData
|
|
91
|
+
})
|
|
92
|
+
],
|
|
93
|
+
aside: [
|
|
94
|
+
component('HrEmployeePage-tasks', 'checklistSection', {
|
|
95
|
+
label: 'Open tasks',
|
|
96
|
+
sections: fromQuery(employee.tasks),
|
|
97
|
+
...localeOfData
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
displayName: 'HR employee page',
|
|
102
|
+
description: 'One employee: personal and job information, documents and time-off balance.',
|
|
103
|
+
metadata: hrMetadata('HrEmployeePage', 'Detail', [
|
|
104
|
+
TemplateScope.Feature,
|
|
105
|
+
TemplateScope.Subfeature
|
|
106
|
+
])
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* The onboarding checklist: a `RecordPage` variant for one new hire. Where an ordinary record page leads with the record's fields, this one leads with the checklist -
|
|
110
|
+
* sections of tasks (before the first day, the first week, the first month), each task with an owner and a due date and a way to tick it off - and keeps the
|
|
111
|
+
* key facts of the hire (start date, manager, buddy, equipment) beside it.
|
|
112
|
+
*/ const hrOnboardingChecklistTemplate = {
|
|
113
|
+
name: 'HrOnboardingChecklist',
|
|
114
|
+
fitsSlot: 'content',
|
|
115
|
+
slots: recordPageTemplate.slots,
|
|
116
|
+
arrangement: recordPageTemplate.arrangement,
|
|
117
|
+
content: {
|
|
118
|
+
header: [
|
|
119
|
+
component('HrOnboardingChecklist-header', 'pageHeader', {
|
|
120
|
+
title: fromQuery(onboarding.record, '0.name'),
|
|
121
|
+
subtitle: 'Onboarding checklist'
|
|
122
|
+
})
|
|
123
|
+
],
|
|
124
|
+
summary: [
|
|
125
|
+
component('HrOnboardingChecklist-status', 'statusChip', {
|
|
126
|
+
status: fromQuery(onboarding.summary, '0.status'),
|
|
127
|
+
tone: fromQuery(onboarding.summary, '0.tone')
|
|
128
|
+
}),
|
|
129
|
+
component('HrOnboardingChecklist-done', 'statCard', {
|
|
130
|
+
label: 'Tasks done',
|
|
131
|
+
value: fromQuery(onboarding.summary, '0.done'),
|
|
132
|
+
...localeOfData
|
|
133
|
+
}),
|
|
134
|
+
component('HrOnboardingChecklist-open', 'statCard', {
|
|
135
|
+
label: 'Tasks open',
|
|
136
|
+
value: fromQuery(onboarding.summary, '0.open'),
|
|
137
|
+
...localeOfData
|
|
138
|
+
}),
|
|
139
|
+
component('HrOnboardingChecklist-owners', 'avatarStack', {
|
|
140
|
+
people: fromQuery(onboarding.summary, '0.people')
|
|
141
|
+
})
|
|
142
|
+
],
|
|
143
|
+
tabs: [],
|
|
144
|
+
main: [
|
|
145
|
+
component('HrOnboardingChecklist-tasks', 'checklistSection', {
|
|
146
|
+
label: 'Onboarding tasks',
|
|
147
|
+
sections: fromQuery(onboarding.tasks),
|
|
148
|
+
editPermission: 'enabled',
|
|
149
|
+
...localeOfData
|
|
150
|
+
})
|
|
151
|
+
],
|
|
152
|
+
related: [],
|
|
153
|
+
activity: [
|
|
154
|
+
component('HrOnboardingChecklist-activity', 'activityFeed', {
|
|
155
|
+
label: 'History',
|
|
156
|
+
entries: fromQuery(onboarding.activity),
|
|
157
|
+
...localeOfData
|
|
158
|
+
})
|
|
159
|
+
],
|
|
160
|
+
aside: [
|
|
161
|
+
component('HrOnboardingChecklist-facts', 'formScreenBody', {
|
|
162
|
+
mode: 'readOnly',
|
|
163
|
+
sections: fromQuery(onboarding.sections),
|
|
164
|
+
values: fromQuery(onboarding.record, '0'),
|
|
165
|
+
...localeOfData
|
|
166
|
+
})
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
displayName: 'HR onboarding checklist',
|
|
170
|
+
description: 'One new hire\'s onboarding: checklist sections with an owner and a due date for each task, and the key facts of the hire.',
|
|
171
|
+
metadata: hrMetadata('HrOnboardingChecklist', 'Detail', [
|
|
172
|
+
TemplateScope.Feature,
|
|
173
|
+
TemplateScope.Subfeature
|
|
174
|
+
])
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
export { hrEmployeePageTemplate, hrOnboardingChecklistTemplate };
|
|
178
|
+
//# sourceMappingURL=recordTemplates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordTemplates.js","sources":["../../../templates/recordTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { recordPageTemplate } from '@cratis/scene.blueprint.default';\nimport { HrEntityKind, HrQuery, fromQuery, hrQueriesOf, localeOfData } from '../hrQueries';\nimport { actionButton, component, hrMetadata, opensDialog, withBehaviors } from '../hrParts';\n\nconst employee = hrQueriesOf(HrEntityKind.Employee);\nconst onboarding = hrQueriesOf(HrEntityKind.Onboarding);\n\n/**\n * The employee page: the foundation `RecordPage` with the employee's name as its title, the time-off balance as key facts under it, the personal and job\n * information as the record, the employee's documents and time-off requests as related lists, their history and the open tasks beside it.\n */\nexport const hrEmployeePageTemplate: ScreenTemplate = {\n name: 'HrEmployeePage',\n fitsSlot: 'content',\n slots: recordPageTemplate.slots,\n arrangement: recordPageTemplate.arrangement,\n content: {\n header: [component('HrEmployeePage-header', 'pageHeader', { title: fromQuery(employee.record, '0.name'), subtitle: fromQuery(employee.record, '0.title') }, {\n actions: [withBehaviors(actionButton('HrEmployeePage-timeoff', 'Request time off', 'primary'), opensDialog('HrRequestTimeOff'))],\n })],\n summary: [\n component('HrEmployeePage-status', 'statusChip', { status: fromQuery(employee.summary, '0.status'), tone: fromQuery(employee.summary, '0.tone') }),\n component('HrEmployeePage-left', 'statCard', { label: 'Leave left (days)', value: fromQuery(employee.summary, '0.leaveLeft'), ...localeOfData }),\n component('HrEmployeePage-taken', 'statCard', { label: 'Leave taken (days)', value: fromQuery(employee.summary, '0.leaveTaken'), ...localeOfData }),\n component('HrEmployeePage-service', 'statCard', { label: 'Years of service', value: fromQuery(employee.summary, '0.years'), ...localeOfData }),\n component('HrEmployeePage-team', 'avatarStack', { people: fromQuery(employee.summary, '0.people') }),\n ],\n tabs: [component('HrEmployeePage-tabs', 'tabSet', { tabs: fromQuery(HrQuery.RecordTabs), urlKey: 'tab', label: 'Employee sections' })],\n main: [component('HrEmployeePage-form', 'formScreenBody', { mode: 'readOnly', sections: fromQuery(employee.sections), values: fromQuery(employee.record, '0'), ...localeOfData })],\n related: [\n component('HrEmployeePage-documents', 'dataList', { label: 'Documents', rows: fromQuery(employee.documents), columns: fromQuery('DocumentColumns'), titleField: 'name', pageSize: 5, ...localeOfData }),\n component('HrEmployeePage-requests', 'dataList', {\n label: 'Time off', rows: fromQuery('EmployeeTimeOff'), columns: fromQuery(hrQueriesOf(HrEntityKind.TimeOff).columns), titleField: 'employee', pageSize: 5, ...localeOfData,\n }),\n ],\n activity: [component('HrEmployeePage-activity', 'activityFeed', { label: 'History', entries: fromQuery(employee.activity), ...localeOfData })],\n aside: [component('HrEmployeePage-tasks', 'checklistSection', { label: 'Open tasks', sections: fromQuery(employee.tasks), ...localeOfData })],\n },\n displayName: 'HR employee page',\n description: 'One employee: personal and job information, documents and time-off balance.',\n metadata: hrMetadata('HrEmployeePage', 'Detail', [TemplateScope.Feature, TemplateScope.Subfeature]),\n};\n\n/**\n * The onboarding checklist: a `RecordPage` variant for one new hire. Where an ordinary record page leads with the record's fields, this one leads with the checklist -\n * sections of tasks (before the first day, the first week, the first month), each task with an owner and a due date and a way to tick it off - and keeps the\n * key facts of the hire (start date, manager, buddy, equipment) beside it.\n */\nexport const hrOnboardingChecklistTemplate: ScreenTemplate = {\n name: 'HrOnboardingChecklist',\n fitsSlot: 'content',\n slots: recordPageTemplate.slots,\n arrangement: recordPageTemplate.arrangement,\n content: {\n header: [component('HrOnboardingChecklist-header', 'pageHeader', { title: fromQuery(onboarding.record, '0.name'), subtitle: 'Onboarding checklist' })],\n summary: [\n component('HrOnboardingChecklist-status', 'statusChip', { status: fromQuery(onboarding.summary, '0.status'), tone: fromQuery(onboarding.summary, '0.tone') }),\n component('HrOnboardingChecklist-done', 'statCard', { label: 'Tasks done', value: fromQuery(onboarding.summary, '0.done'), ...localeOfData }),\n component('HrOnboardingChecklist-open', 'statCard', { label: 'Tasks open', value: fromQuery(onboarding.summary, '0.open'), ...localeOfData }),\n component('HrOnboardingChecklist-owners', 'avatarStack', { people: fromQuery(onboarding.summary, '0.people') }),\n ],\n tabs: [],\n main: [component('HrOnboardingChecklist-tasks', 'checklistSection', { label: 'Onboarding tasks', sections: fromQuery(onboarding.tasks), editPermission: 'enabled', ...localeOfData })],\n related: [],\n activity: [component('HrOnboardingChecklist-activity', 'activityFeed', { label: 'History', entries: fromQuery(onboarding.activity), ...localeOfData })],\n aside: [component('HrOnboardingChecklist-facts', 'formScreenBody', { mode: 'readOnly', sections: fromQuery(onboarding.sections), values: fromQuery(onboarding.record, '0'), ...localeOfData })],\n },\n displayName: 'HR onboarding checklist',\n description: 'One new hire\\'s onboarding: checklist sections with an owner and a due date for each task, and the key facts of the hire.',\n metadata: hrMetadata('HrOnboardingChecklist', 'Detail', [TemplateScope.Feature, TemplateScope.Subfeature]),\n};\n"],"names":["employee","hrQueriesOf","HrEntityKind","Employee","onboarding","Onboarding","hrEmployeePageTemplate","name","fitsSlot","slots","recordPageTemplate","arrangement","content","header","component","title","fromQuery","record","subtitle","actions","withBehaviors","actionButton","opensDialog","summary","status","tone","label","value","localeOfData","people","tabs","HrQuery","RecordTabs","urlKey","main","mode","sections","values","related","rows","documents","columns","titleField","pageSize","TimeOff","activity","entries","aside","tasks","displayName","description","met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