@kernhq/module-hr 0.8.0 → 0.9.1

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.
Files changed (31) hide show
  1. package/package.json +25 -5
  2. package/src/client/api-instance.ts +29 -0
  3. package/src/client/components/ClockControls.svelte +127 -0
  4. package/src/client/components/HrSidebar.svelte +73 -0
  5. package/src/client/components/LeaveRequestDialog.svelte +169 -0
  6. package/src/client/components/PersonFormDialog.svelte +184 -0
  7. package/src/client/components/PersonInline.svelte +49 -0
  8. package/src/client/components/PersonPanel.svelte +328 -0
  9. package/src/client/core-api.ts +34 -0
  10. package/src/client/i18n.ts +640 -0
  11. package/src/client/index.ts +3 -0
  12. package/src/client/mock.ts +447 -0
  13. package/src/client/module.ts +295 -0
  14. package/src/client/pages/ApprovalsPage.svelte +129 -0
  15. package/src/client/pages/AttendancePage.svelte +147 -0
  16. package/src/client/pages/DirectoryPage.svelte +428 -0
  17. package/src/client/pages/LeavePage.svelte +180 -0
  18. package/src/client/pages/OfficesPage.svelte +119 -0
  19. package/src/client/permissions.ts +31 -0
  20. package/src/client/query.test.ts +70 -0
  21. package/src/client/query.ts +69 -0
  22. package/src/client/settings/CalendarsSettings.svelte +21 -0
  23. package/src/client/settings/CapabilitiesSettings.svelte +122 -0
  24. package/src/client/settings/LeaveSettings.svelte +21 -0
  25. package/src/client/settings/OfficesSettings.svelte +21 -0
  26. package/src/client/settings/SchedulesSettings.svelte +21 -0
  27. package/src/client/widgets/ApprovalsWidget.svelte +86 -0
  28. package/src/client/widgets/ClockWidget.svelte +9 -0
  29. package/src/client/widgets/HeadcountWidget.svelte +29 -0
  30. package/src/client/widgets/LeaveBalanceWidget.svelte +67 -0
  31. package/src/client/widgets/WhosOutWidget.svelte +75 -0
@@ -0,0 +1,640 @@
1
+ /**
2
+ * Hr's own strings, in every locale the platform ships.
3
+ *
4
+ * A module ships separately from the app, so Paraglide cannot compile these — the shell merges
5
+ * them into the framework's message runtime when it registers this module, and `t()` resolves
6
+ * against the merged map. Keys are namespaced by module id, which is what keeps two modules from
7
+ * colliding in that one map.
8
+ *
9
+ * Bundles are thunks so a locale is only fetched when it is the one in use; English is the
10
+ * fallback and is therefore always loaded.
11
+ */
12
+ import { type Message, scopedT } from '@kernhq/ui'
13
+
14
+ export const en: Record<string, Message> = {
15
+ 'hr.add_person': 'Add person',
16
+ 'hr.add_person_desc':
17
+ 'Name and a start date are enough. An employee number is assigned if you leave it blank.',
18
+ 'hr.approvals_none': 'Nothing waiting on you',
19
+ 'hr.approvals_none_desc': 'Requests needing your decision appear here.',
20
+ 'hr.approvals_title': 'Approvals',
21
+ 'hr.approve': 'Approve',
22
+ 'hr.att_overtime': 'Overtime',
23
+ 'hr.att_scheduled': 'Scheduled',
24
+ 'hr.att_status_absent': 'Absent',
25
+ 'hr.att_status_holiday': 'Holiday',
26
+ 'hr.att_status_leave': 'On leave',
27
+ 'hr.att_status_partial': 'Partial',
28
+ 'hr.att_status_pending': 'Needs review',
29
+ 'hr.att_status_present': 'Present',
30
+ 'hr.att_status_weekend': 'Weekend',
31
+ 'hr.att_worked': 'Worked',
32
+ 'hr.attendance_none': 'Nothing recorded yet',
33
+ 'hr.attendance_none_desc': 'Clock in to start recording your day.',
34
+ 'hr.attendance_title': 'Attendance',
35
+ 'hr.available': 'Available',
36
+ 'hr.break_end': 'End break',
37
+ 'hr.break_start': 'Start break',
38
+ 'hr.cancel_request': 'Cancel request',
39
+ 'hr.capabilities_desc':
40
+ 'Turn a feature off and it disappears — from navigation, dashboards and the API. Nothing is deleted, so turning it back on restores what was there.',
41
+ 'hr.capability_requires': 'Needs {name}',
42
+ 'hr.clock_in': 'Clock in',
43
+ 'hr.clock_out': 'Clock out',
44
+ 'hr.clocked_in_since': 'Working since {time}',
45
+ 'hr.cmd_approvals': 'Open approvals',
46
+ 'hr.cmd_attendance': 'Open my attendance',
47
+ 'hr.cmd_directory': 'Open the people directory',
48
+ 'hr.cmd_request_leave': 'Request time off',
49
+ 'hr.days': 'days',
50
+ 'hr.department': 'Department',
51
+ 'hr.display_name': 'Name',
52
+ 'hr.edit_person': 'Edit',
53
+ 'hr.employee_no': 'ID',
54
+ 'hr.employment': 'Job',
55
+ 'hr.employment_contract': 'Contract',
56
+ 'hr.employment_freelance': 'Freelance',
57
+ 'hr.employment_full_time': 'Full time',
58
+ 'hr.employment_intern': 'Intern',
59
+ 'hr.employment_part_time': 'Part time',
60
+ 'hr.employment_temporary': 'Temporary',
61
+ 'hr.headcount': '{count} people',
62
+ 'hr.hired_on': 'Started on',
63
+ 'hr.hours_short': '{n}h',
64
+ 'hr.leave_after': '{days} days left afterwards',
65
+ 'hr.leave_approved': 'Approved',
66
+ 'hr.leave_blocked': 'This request cannot be submitted.',
67
+ 'hr.leave_cancelled': 'Cancelled',
68
+ 'hr.leave_cancelled_toast': 'Request cancelled',
69
+ 'hr.leave_from': 'From',
70
+ 'hr.leave_none': 'No time off booked',
71
+ 'hr.leave_none_desc': 'When you book time off it will appear here.',
72
+ 'hr.leave_pending': 'Awaiting approval',
73
+ 'hr.leave_reason': 'Reason',
74
+ 'hr.leave_rejected': 'Rejected',
75
+ 'hr.leave_submitted': 'Time off requested',
76
+ 'hr.leave_title': 'Time off',
77
+ 'hr.leave_to': 'To',
78
+ 'hr.leave_type': 'Type',
79
+ 'hr.leave_withdrawn': 'Withdrawn',
80
+ 'hr.leave_would_cost': '{days} working days',
81
+ 'hr.local_time': 'Local time',
82
+ 'hr.manager': 'Manager',
83
+ 'hr.minutes_short': '{n}m',
84
+ 'hr.nav': 'People',
85
+ 'hr.no_people': 'Nobody here yet',
86
+ 'hr.no_people_desc': 'Add the first person to start the directory.',
87
+ 'hr.not_clocked_in': 'Not clocked in',
88
+ 'hr.offboard': 'End employment',
89
+ 'hr.offboard_body':
90
+ 'Their record stays. This does not remove their Kern membership — it only ends the employment line.',
91
+ 'hr.offboard_date': 'Last day',
92
+ 'hr.offboard_reason': 'Reason',
93
+ 'hr.offboard_title': 'End employment for {name}',
94
+ 'hr.office': 'Office',
95
+ 'hr.office_default': 'Default',
96
+ 'hr.offices_none': 'No offices yet',
97
+ 'hr.offices_none_desc': 'Add an office to give a group its own holidays and timezone.',
98
+ 'hr.offices_title': 'Offices',
99
+ 'hr.on_break_since': 'On break since {time}',
100
+ 'hr.people_error': 'The directory could not be loaded',
101
+ 'hr.person_created': '{name} is in the directory',
102
+ 'hr.person_offboarded': '{name} has left',
103
+ 'hr.person_updated': 'Saved',
104
+ 'hr.personal_email': 'Personal email',
105
+ 'hr.phone': 'Phone',
106
+ 'hr.reject': 'Reject',
107
+ 'hr.request_leave': 'Request time off',
108
+ 'hr.search_people': 'Search people',
109
+ 'hr.settings_calendars': 'Holidays',
110
+ 'hr.settings_capabilities': 'Features',
111
+ 'hr.settings_leave': 'Time off',
112
+ 'hr.settings_not_built': 'The API for this is complete; the editing screen is not built yet.',
113
+ 'hr.settings_offices': 'Offices',
114
+ 'hr.settings_schedules': 'Schedules',
115
+ 'hr.started': 'Started',
116
+ 'hr.status': 'Status',
117
+ 'hr.status_active': 'Active',
118
+ 'hr.status_offboarding': 'Offboarding',
119
+ 'hr.status_on_leave': 'On leave',
120
+ 'hr.status_onboarding': 'Onboarding',
121
+ 'hr.status_terminated': 'Left',
122
+ 'hr.subtitle': 'Everyone who works here',
123
+ 'hr.title': 'People',
124
+ 'hr.widget_approvals_desc': 'Requests needing your decision.',
125
+ 'hr.widget_approvals_title': 'Waiting on you',
126
+ 'hr.widget_balance_desc': 'What is left of each kind of leave.',
127
+ 'hr.widget_balance_title': 'My time off',
128
+ 'hr.widget_clock_desc': "Clock in and out, and see today's total.",
129
+ 'hr.widget_clock_title': 'Clock',
130
+ 'hr.widget_headcount_desc': 'How many people work here.',
131
+ 'hr.widget_headcount_title': 'Headcount',
132
+ 'hr.widget_whos_out_desc': 'People away over the next two weeks.',
133
+ 'hr.widget_whos_out_title': "Who's out",
134
+ 'hr.work_email': 'Work email',
135
+ 'hr.worked_today': 'Worked today',
136
+ }
137
+
138
+ export type HrMessageKey = keyof typeof en
139
+
140
+ const ar: Record<string, Message> = {
141
+ 'hr.add_person': 'إضافة شخص',
142
+ 'hr.add_person_desc': 'يكفي الاسم وتاريخ البدء. يُنشأ رقم وظيفي إن تركته فارغًا.',
143
+ 'hr.approvals_none': 'Nothing waiting on you',
144
+ 'hr.approvals_none_desc': 'Requests needing your decision appear here.',
145
+ 'hr.approvals_title': 'Approvals',
146
+ 'hr.approve': 'Approve',
147
+ 'hr.att_overtime': 'Overtime',
148
+ 'hr.att_scheduled': 'Scheduled',
149
+ 'hr.att_status_absent': 'Absent',
150
+ 'hr.att_status_holiday': 'Holiday',
151
+ 'hr.att_status_leave': 'On leave',
152
+ 'hr.att_status_partial': 'Partial',
153
+ 'hr.att_status_pending': 'Needs review',
154
+ 'hr.att_status_present': 'Present',
155
+ 'hr.att_status_weekend': 'Weekend',
156
+ 'hr.att_worked': 'Worked',
157
+ 'hr.attendance_none': 'Nothing recorded yet',
158
+ 'hr.attendance_none_desc': 'Clock in to start recording your day.',
159
+ 'hr.attendance_title': 'Attendance',
160
+ 'hr.available': 'Available',
161
+ 'hr.break_end': 'End break',
162
+ 'hr.break_start': 'Start break',
163
+ 'hr.cancel_request': 'Cancel request',
164
+ 'hr.capabilities_desc':
165
+ 'Turn a feature off and it disappears — from navigation, dashboards and the API. Nothing is deleted, so turning it back on restores what was there.',
166
+ 'hr.capability_requires': 'Needs {name}',
167
+ 'hr.clock_in': 'Clock in',
168
+ 'hr.clock_out': 'Clock out',
169
+ 'hr.clocked_in_since': 'Working since {time}',
170
+ 'hr.cmd_approvals': 'Open approvals',
171
+ 'hr.cmd_attendance': 'Open my attendance',
172
+ 'hr.cmd_directory': 'Open the people directory',
173
+ 'hr.cmd_request_leave': 'Request time off',
174
+ 'hr.days': 'days',
175
+ 'hr.department': 'Department',
176
+ 'hr.display_name': 'الاسم',
177
+ 'hr.edit_person': 'تعديل',
178
+ 'hr.employee_no': 'ID',
179
+ 'hr.employment': 'الوظيفة',
180
+ 'hr.employment_contract': 'عقد',
181
+ 'hr.employment_freelance': 'مستقل',
182
+ 'hr.employment_full_time': 'دوام كامل',
183
+ 'hr.employment_intern': 'متدرب',
184
+ 'hr.employment_part_time': 'دوام جزئي',
185
+ 'hr.employment_temporary': 'مؤقت',
186
+ 'hr.headcount': '{count} people',
187
+ 'hr.hired_on': 'تاريخ البدء',
188
+ 'hr.hours_short': '{n}h',
189
+ 'hr.leave_after': 'يتبقى بعدها {days} أيام',
190
+ 'hr.leave_approved': 'Approved',
191
+ 'hr.leave_blocked': 'لا يمكن تقديم هذا الطلب.',
192
+ 'hr.leave_cancelled': 'Cancelled',
193
+ 'hr.leave_cancelled_toast': 'أُلغي الطلب',
194
+ 'hr.leave_from': 'من',
195
+ 'hr.leave_none': 'No time off booked',
196
+ 'hr.leave_none_desc': 'When you book time off it will appear here.',
197
+ 'hr.leave_pending': 'Awaiting approval',
198
+ 'hr.leave_reason': 'السبب',
199
+ 'hr.leave_rejected': 'Rejected',
200
+ 'hr.leave_submitted': 'قُدّم طلب الإجازة',
201
+ 'hr.leave_title': 'Time off',
202
+ 'hr.leave_to': 'إلى',
203
+ 'hr.leave_type': 'النوع',
204
+ 'hr.leave_withdrawn': 'Withdrawn',
205
+ 'hr.leave_would_cost': '{days} أيام عمل',
206
+ 'hr.local_time': 'Local time',
207
+ 'hr.manager': 'Manager',
208
+ 'hr.minutes_short': '{n}m',
209
+ 'hr.nav': 'People',
210
+ 'hr.no_people': 'Nobody here yet',
211
+ 'hr.no_people_desc': 'Add the first person to start the directory.',
212
+ 'hr.not_clocked_in': 'Not clocked in',
213
+ 'hr.offboard': 'إنهاء التوظيف',
214
+ 'hr.offboard_body': 'يبقى السجل. هذا لا يحذف عضويتهم في كرن — ينهي خط التوظيف فقط.',
215
+ 'hr.offboard_date': 'آخر يوم',
216
+ 'hr.offboard_reason': 'السبب',
217
+ 'hr.offboard_title': 'إنهاء توظيف {name}',
218
+ 'hr.office': 'Office',
219
+ 'hr.office_default': 'Default',
220
+ 'hr.offices_none': 'No offices yet',
221
+ 'hr.offices_none_desc': 'Add an office to give a group its own holidays and timezone.',
222
+ 'hr.offices_title': 'Offices',
223
+ 'hr.on_break_since': 'On break since {time}',
224
+ 'hr.people_error': 'The directory could not be loaded',
225
+ 'hr.person_created': 'أُضيف {name} إلى الدليل',
226
+ 'hr.person_offboarded': 'غادر {name}',
227
+ 'hr.person_updated': 'حُفظ',
228
+ 'hr.personal_email': 'البريد الشخصي',
229
+ 'hr.phone': 'الهاتف',
230
+ 'hr.reject': 'Reject',
231
+ 'hr.request_leave': 'Request time off',
232
+ 'hr.search_people': 'Search people',
233
+ 'hr.settings_calendars': 'Holidays',
234
+ 'hr.settings_capabilities': 'Features',
235
+ 'hr.settings_leave': 'Time off',
236
+ 'hr.settings_not_built': 'The API for this is complete; the editing screen is not built yet.',
237
+ 'hr.settings_offices': 'Offices',
238
+ 'hr.settings_schedules': 'Schedules',
239
+ 'hr.started': 'Started',
240
+ 'hr.status': 'Status',
241
+ 'hr.status_active': 'Active',
242
+ 'hr.status_offboarding': 'Offboarding',
243
+ 'hr.status_on_leave': 'On leave',
244
+ 'hr.status_onboarding': 'Onboarding',
245
+ 'hr.status_terminated': 'Left',
246
+ 'hr.subtitle': 'Everyone who works here',
247
+ 'hr.title': 'People',
248
+ 'hr.widget_approvals_desc': 'Requests needing your decision.',
249
+ 'hr.widget_approvals_title': 'Waiting on you',
250
+ 'hr.widget_balance_desc': 'What is left of each kind of leave.',
251
+ 'hr.widget_balance_title': 'My time off',
252
+ 'hr.widget_clock_desc': "Clock in and out, and see today's total.",
253
+ 'hr.widget_clock_title': 'Clock',
254
+ 'hr.widget_headcount_desc': 'How many people work here.',
255
+ 'hr.widget_headcount_title': 'Headcount',
256
+ 'hr.widget_whos_out_desc': 'People away over the next two weeks.',
257
+ 'hr.widget_whos_out_title': "Who's out",
258
+ 'hr.work_email': 'بريد العمل',
259
+ 'hr.worked_today': 'Worked today',
260
+ }
261
+
262
+ const de: Record<string, Message> = {
263
+ 'hr.add_person': 'Person hinzufügen',
264
+ 'hr.add_person_desc':
265
+ 'Name und Eintrittsdatum reichen. Eine Personalnummer wird vergeben, wenn Sie das Feld leer lassen.',
266
+ 'hr.approvals_none': 'Nothing waiting on you',
267
+ 'hr.approvals_none_desc': 'Requests needing your decision appear here.',
268
+ 'hr.approvals_title': 'Approvals',
269
+ 'hr.approve': 'Approve',
270
+ 'hr.att_overtime': 'Overtime',
271
+ 'hr.att_scheduled': 'Scheduled',
272
+ 'hr.att_status_absent': 'Absent',
273
+ 'hr.att_status_holiday': 'Holiday',
274
+ 'hr.att_status_leave': 'On leave',
275
+ 'hr.att_status_partial': 'Partial',
276
+ 'hr.att_status_pending': 'Needs review',
277
+ 'hr.att_status_present': 'Present',
278
+ 'hr.att_status_weekend': 'Weekend',
279
+ 'hr.att_worked': 'Worked',
280
+ 'hr.attendance_none': 'Nothing recorded yet',
281
+ 'hr.attendance_none_desc': 'Clock in to start recording your day.',
282
+ 'hr.attendance_title': 'Attendance',
283
+ 'hr.available': 'Available',
284
+ 'hr.break_end': 'End break',
285
+ 'hr.break_start': 'Start break',
286
+ 'hr.cancel_request': 'Cancel request',
287
+ 'hr.capabilities_desc':
288
+ 'Turn a feature off and it disappears — from navigation, dashboards and the API. Nothing is deleted, so turning it back on restores what was there.',
289
+ 'hr.capability_requires': 'Needs {name}',
290
+ 'hr.clock_in': 'Clock in',
291
+ 'hr.clock_out': 'Clock out',
292
+ 'hr.clocked_in_since': 'Working since {time}',
293
+ 'hr.cmd_approvals': 'Open approvals',
294
+ 'hr.cmd_attendance': 'Open my attendance',
295
+ 'hr.cmd_directory': 'Open the people directory',
296
+ 'hr.cmd_request_leave': 'Request time off',
297
+ 'hr.days': 'days',
298
+ 'hr.department': 'Department',
299
+ 'hr.display_name': 'Name',
300
+ 'hr.edit_person': 'Bearbeiten',
301
+ 'hr.employee_no': 'ID',
302
+ 'hr.employment': 'Anstellung',
303
+ 'hr.employment_contract': 'Vertrag',
304
+ 'hr.employment_freelance': 'Freelance',
305
+ 'hr.employment_full_time': 'Vollzeit',
306
+ 'hr.employment_intern': 'Praktikum',
307
+ 'hr.employment_part_time': 'Teilzeit',
308
+ 'hr.employment_temporary': 'Befristet',
309
+ 'hr.headcount': '{count} people',
310
+ 'hr.hired_on': 'Eintritt',
311
+ 'hr.hours_short': '{n}h',
312
+ 'hr.leave_after': 'danach bleiben {days} Tage',
313
+ 'hr.leave_approved': 'Approved',
314
+ 'hr.leave_blocked': 'Dieser Antrag kann nicht gestellt werden.',
315
+ 'hr.leave_cancelled': 'Cancelled',
316
+ 'hr.leave_cancelled_toast': 'Antrag storniert',
317
+ 'hr.leave_from': 'Von',
318
+ 'hr.leave_none': 'No time off booked',
319
+ 'hr.leave_none_desc': 'When you book time off it will appear here.',
320
+ 'hr.leave_pending': 'Awaiting approval',
321
+ 'hr.leave_reason': 'Grund',
322
+ 'hr.leave_rejected': 'Rejected',
323
+ 'hr.leave_submitted': 'Abwesenheit beantragt',
324
+ 'hr.leave_title': 'Time off',
325
+ 'hr.leave_to': 'Bis',
326
+ 'hr.leave_type': 'Art',
327
+ 'hr.leave_withdrawn': 'Withdrawn',
328
+ 'hr.leave_would_cost': '{days} Arbeitstage',
329
+ 'hr.local_time': 'Local time',
330
+ 'hr.manager': 'Manager',
331
+ 'hr.minutes_short': '{n}m',
332
+ 'hr.nav': 'People',
333
+ 'hr.no_people': 'Nobody here yet',
334
+ 'hr.no_people_desc': 'Add the first person to start the directory.',
335
+ 'hr.not_clocked_in': 'Not clocked in',
336
+ 'hr.offboard': 'Beschäftigung beenden',
337
+ 'hr.offboard_body':
338
+ 'Der Datensatz bleibt. Die Kern-Mitgliedschaft wird nicht entfernt — es endet nur die Anstellung.',
339
+ 'hr.offboard_date': 'Letzter Tag',
340
+ 'hr.offboard_reason': 'Grund',
341
+ 'hr.offboard_title': 'Beschäftigung von {name} beenden',
342
+ 'hr.office': 'Office',
343
+ 'hr.office_default': 'Default',
344
+ 'hr.offices_none': 'No offices yet',
345
+ 'hr.offices_none_desc': 'Add an office to give a group its own holidays and timezone.',
346
+ 'hr.offices_title': 'Offices',
347
+ 'hr.on_break_since': 'On break since {time}',
348
+ 'hr.people_error': 'The directory could not be loaded',
349
+ 'hr.person_created': '{name} steht im Verzeichnis',
350
+ 'hr.person_offboarded': '{name} ist ausgeschieden',
351
+ 'hr.person_updated': 'Gespeichert',
352
+ 'hr.personal_email': 'Private E-Mail',
353
+ 'hr.phone': 'Telefon',
354
+ 'hr.reject': 'Reject',
355
+ 'hr.request_leave': 'Request time off',
356
+ 'hr.search_people': 'Search people',
357
+ 'hr.settings_calendars': 'Holidays',
358
+ 'hr.settings_capabilities': 'Features',
359
+ 'hr.settings_leave': 'Time off',
360
+ 'hr.settings_not_built': 'The API for this is complete; the editing screen is not built yet.',
361
+ 'hr.settings_offices': 'Offices',
362
+ 'hr.settings_schedules': 'Schedules',
363
+ 'hr.started': 'Started',
364
+ 'hr.status': 'Status',
365
+ 'hr.status_active': 'Active',
366
+ 'hr.status_offboarding': 'Offboarding',
367
+ 'hr.status_on_leave': 'On leave',
368
+ 'hr.status_onboarding': 'Onboarding',
369
+ 'hr.status_terminated': 'Left',
370
+ 'hr.subtitle': 'Everyone who works here',
371
+ 'hr.title': 'People',
372
+ 'hr.widget_approvals_desc': 'Requests needing your decision.',
373
+ 'hr.widget_approvals_title': 'Waiting on you',
374
+ 'hr.widget_balance_desc': 'What is left of each kind of leave.',
375
+ 'hr.widget_balance_title': 'My time off',
376
+ 'hr.widget_clock_desc': "Clock in and out, and see today's total.",
377
+ 'hr.widget_clock_title': 'Clock',
378
+ 'hr.widget_headcount_desc': 'How many people work here.',
379
+ 'hr.widget_headcount_title': 'Headcount',
380
+ 'hr.widget_whos_out_desc': 'People away over the next two weeks.',
381
+ 'hr.widget_whos_out_title': "Who's out",
382
+ 'hr.work_email': 'Dienstliche E-Mail',
383
+ 'hr.worked_today': 'Worked today',
384
+ }
385
+
386
+ const fa: Record<string, Message> = {
387
+ 'hr.add_person': 'افزودن فرد',
388
+ 'hr.add_person_desc': 'نام و تاریخ شروع کافی است. اگر شماره پرسنلی نگذارید، خودش ساخته می‌شود.',
389
+ 'hr.approvals_none': 'چیزی منتظر تصمیم شما نیست',
390
+ 'hr.approvals_none_desc': 'درخواست‌هایی که باید تصمیم بگیرید اینجا می‌آیند.',
391
+ 'hr.approvals_title': 'تأییدها',
392
+ 'hr.approve': 'تأیید',
393
+ 'hr.att_overtime': 'اضافه‌کار',
394
+ 'hr.att_scheduled': 'برنامه',
395
+ 'hr.att_status_absent': 'غایب',
396
+ 'hr.att_status_holiday': 'تعطیل',
397
+ 'hr.att_status_leave': 'مرخصی',
398
+ 'hr.att_status_partial': 'ناقص',
399
+ 'hr.att_status_pending': 'نیاز به بررسی',
400
+ 'hr.att_status_present': 'حاضر',
401
+ 'hr.att_status_weekend': 'آخر هفته',
402
+ 'hr.att_worked': 'کارکرد',
403
+ 'hr.attendance_none': 'هنوز چیزی ثبت نشده',
404
+ 'hr.attendance_none_desc': 'برای شروع ثبت روز، ورود بزنید.',
405
+ 'hr.attendance_title': 'حضور',
406
+ 'hr.available': 'قابل استفاده',
407
+ 'hr.break_end': 'پایان استراحت',
408
+ 'hr.break_start': 'شروع استراحت',
409
+ 'hr.cancel_request': 'لغو درخواست',
410
+ 'hr.capabilities_desc':
411
+ 'اگر قابلیتی را خاموش کنید از ناوبری، داشبورد و API ناپدید می‌شود. چیزی حذف نمی‌شود؛ روشن کردنش همان را برمی‌گرداند.',
412
+ 'hr.capability_requires': 'نیاز به {name}',
413
+ 'hr.clock_in': 'ورود',
414
+ 'hr.clock_out': 'خروج',
415
+ 'hr.clocked_in_since': 'از {time} در حال کار',
416
+ 'hr.cmd_approvals': 'باز کردن تأییدها',
417
+ 'hr.cmd_attendance': 'حضور من',
418
+ 'hr.cmd_directory': 'باز کردن فهرست افراد',
419
+ 'hr.cmd_request_leave': 'درخواست مرخصی',
420
+ 'hr.days': 'روز',
421
+ 'hr.department': 'واحد',
422
+ 'hr.display_name': 'نام',
423
+ 'hr.edit_person': 'ویرایش',
424
+ 'hr.employee_no': 'کد',
425
+ 'hr.employment': 'شغل',
426
+ 'hr.employment_contract': 'قراردادی',
427
+ 'hr.employment_freelance': 'فریلنس',
428
+ 'hr.employment_full_time': 'تمام‌وقت',
429
+ 'hr.employment_intern': 'کارآموز',
430
+ 'hr.employment_part_time': 'پاره‌وقت',
431
+ 'hr.employment_temporary': 'موقت',
432
+ 'hr.headcount': '{count} نفر',
433
+ 'hr.hired_on': 'تاریخ شروع',
434
+ 'hr.hours_short': '{n}سا',
435
+ 'hr.leave_after': 'بعد از آن {days} روز می‌ماند',
436
+ 'hr.leave_approved': 'تأیید شده',
437
+ 'hr.leave_blocked': 'این درخواست قابل ثبت نیست.',
438
+ 'hr.leave_cancelled': 'لغو شده',
439
+ 'hr.leave_cancelled_toast': 'درخواست لغو شد',
440
+ 'hr.leave_from': 'از',
441
+ 'hr.leave_none': 'مرخصی ثبت‌شده‌ای نیست',
442
+ 'hr.leave_none_desc': 'وقتی مرخصی بگیرید اینجا دیده می‌شود.',
443
+ 'hr.leave_pending': 'در انتظار تأیید',
444
+ 'hr.leave_reason': 'دلیل',
445
+ 'hr.leave_rejected': 'رد شده',
446
+ 'hr.leave_submitted': 'مرخصی ثبت شد',
447
+ 'hr.leave_title': 'مرخصی',
448
+ 'hr.leave_to': 'تا',
449
+ 'hr.leave_type': 'نوع',
450
+ 'hr.leave_withdrawn': 'پس گرفته شده',
451
+ 'hr.leave_would_cost': '{days} روز کاری',
452
+ 'hr.local_time': 'ساعت محلی',
453
+ 'hr.manager': 'مدیر',
454
+ 'hr.minutes_short': '{n}د',
455
+ 'hr.nav': 'افراد',
456
+ 'hr.no_people': 'هنوز کسی نیست',
457
+ 'hr.no_people_desc': 'اولین نفر را اضافه کنید تا فهرست شروع شود.',
458
+ 'hr.not_clocked_in': 'ورود نزده',
459
+ 'hr.offboard': 'پایان همکاری',
460
+ 'hr.offboard_body': 'سوابق می‌ماند. این کار عضویتشان در کرن را حذف نمی‌کند — فقط خط اشتغال را می‌بندد.',
461
+ 'hr.offboard_date': 'آخرین روز',
462
+ 'hr.offboard_reason': 'دلیل',
463
+ 'hr.offboard_title': 'پایان همکاری {name}',
464
+ 'hr.office': 'دفتر',
465
+ 'hr.office_default': 'پیش‌فرض',
466
+ 'hr.offices_none': 'دفتری نیست',
467
+ 'hr.offices_none_desc': 'دفتری اضافه کنید تا گروه، تعطیلات و منطقهٔ زمانی خودش را داشته باشد.',
468
+ 'hr.offices_title': 'دفاتر',
469
+ 'hr.on_break_since': 'از {time} در استراحت',
470
+ 'hr.people_error': 'فهرست بار نشد',
471
+ 'hr.person_created': '{name} به فهرست اضافه شد',
472
+ 'hr.person_offboarded': '{name} رفته است',
473
+ 'hr.person_updated': 'ذخیره شد',
474
+ 'hr.personal_email': 'ایمیل شخصی',
475
+ 'hr.phone': 'تلفن',
476
+ 'hr.reject': 'رد',
477
+ 'hr.request_leave': 'درخواست مرخصی',
478
+ 'hr.search_people': 'جست‌وجوی افراد',
479
+ 'hr.settings_calendars': 'تعطیلات',
480
+ 'hr.settings_capabilities': 'قابلیت‌ها',
481
+ 'hr.settings_leave': 'مرخصی',
482
+ 'hr.settings_not_built': 'API این بخش کامل است؛ صفحهٔ ویرایش هنوز ساخته نشده.',
483
+ 'hr.settings_offices': 'دفاتر',
484
+ 'hr.settings_schedules': 'شیفت‌ها',
485
+ 'hr.started': 'شروع',
486
+ 'hr.status': 'وضعیت',
487
+ 'hr.status_active': 'فعال',
488
+ 'hr.status_offboarding': 'در حال خروج',
489
+ 'hr.status_on_leave': 'مرخصی',
490
+ 'hr.status_onboarding': 'در حال ورود',
491
+ 'hr.status_terminated': 'رفته',
492
+ 'hr.subtitle': 'همهٔ کسانی که اینجا کار می‌کنند',
493
+ 'hr.title': 'افراد',
494
+ 'hr.widget_approvals_desc': 'درخواست‌هایی که باید تصمیم بگیرید.',
495
+ 'hr.widget_approvals_title': 'منتظر شما',
496
+ 'hr.widget_balance_desc': 'ماندهٔ هر نوع مرخصی.',
497
+ 'hr.widget_balance_title': 'مرخصی من',
498
+ 'hr.widget_clock_desc': 'ورود و خروج، و جمع امروز.',
499
+ 'hr.widget_clock_title': 'ساعت',
500
+ 'hr.widget_headcount_desc': 'چند نفر اینجا کار می‌کنند.',
501
+ 'hr.widget_headcount_title': 'تعداد افراد',
502
+ 'hr.widget_whos_out_desc': 'غایبان دو هفتهٔ آینده.',
503
+ 'hr.widget_whos_out_title': 'چه کسانی نیستند',
504
+ 'hr.work_email': 'ایمیل کاری',
505
+ 'hr.worked_today': 'کارکرد امروز',
506
+ }
507
+
508
+ const tr: Record<string, Message> = {
509
+ 'hr.add_person': 'Kişi ekle',
510
+ 'hr.add_person_desc': 'Ad ve başlangıç tarihi yeter. Personel numarası boş bırakılırsa atanır.',
511
+ 'hr.approvals_none': 'Sizi bekleyen bir şey yok',
512
+ 'hr.approvals_none_desc': 'Kararınızı bekleyen talepler burada görünür.',
513
+ 'hr.approvals_title': 'Onaylar',
514
+ 'hr.approve': 'Onayla',
515
+ 'hr.att_overtime': 'Fazla mesai',
516
+ 'hr.att_scheduled': 'Planlanan',
517
+ 'hr.att_status_absent': 'Yok',
518
+ 'hr.att_status_holiday': 'Tatil',
519
+ 'hr.att_status_leave': 'İzinde',
520
+ 'hr.att_status_partial': 'Kısmi',
521
+ 'hr.att_status_pending': 'İnceleme gerekli',
522
+ 'hr.att_status_present': 'Mevcut',
523
+ 'hr.att_status_weekend': 'Hafta sonu',
524
+ 'hr.att_worked': 'Çalışılan',
525
+ 'hr.attendance_none': 'Henüz kayıt yok',
526
+ 'hr.attendance_none_desc': 'Gününüzü kaydetmeye başlamak için giriş yapın.',
527
+ 'hr.attendance_title': 'Devam',
528
+ 'hr.available': 'Kullanılabilir',
529
+ 'hr.break_end': 'Moladan dön',
530
+ 'hr.break_start': 'Molaya çık',
531
+ 'hr.cancel_request': 'Talebi iptal et',
532
+ 'hr.capabilities_desc':
533
+ "Bir özelliği kapatırsanız kaybolur — gezinme, panolar ve API'den. Hiçbir şey silinmez, tekrar açtığınızda her şey geri gelir.",
534
+ 'hr.capability_requires': '{name} gerekir',
535
+ 'hr.clock_in': 'Giriş yap',
536
+ 'hr.clock_out': 'Çıkış yap',
537
+ 'hr.clocked_in_since': '{time} saatinden beri çalışıyor',
538
+ 'hr.cmd_approvals': 'Onayları aç',
539
+ 'hr.cmd_attendance': 'Devam kaydımı aç',
540
+ 'hr.cmd_directory': 'Kişi rehberini aç',
541
+ 'hr.cmd_request_leave': 'İzin talep et',
542
+ 'hr.days': 'gün',
543
+ 'hr.department': 'Departman',
544
+ 'hr.display_name': 'Ad',
545
+ 'hr.edit_person': 'Düzenle',
546
+ 'hr.employee_no': 'Sicil',
547
+ 'hr.employment': 'İş',
548
+ 'hr.employment_contract': 'Sözleşmeli',
549
+ 'hr.employment_freelance': 'Serbest',
550
+ 'hr.employment_full_time': 'Tam zamanlı',
551
+ 'hr.employment_intern': 'Stajyer',
552
+ 'hr.employment_part_time': 'Yarı zamanlı',
553
+ 'hr.employment_temporary': 'Geçici',
554
+ 'hr.headcount': '{count} kişi',
555
+ 'hr.hired_on': 'Başlangıç',
556
+ 'hr.hours_short': '{n}sa',
557
+ 'hr.leave_after': 'sonrasında {days} gün kalır',
558
+ 'hr.leave_approved': 'Onaylandı',
559
+ 'hr.leave_blocked': 'Bu talep gönderilemez.',
560
+ 'hr.leave_cancelled': 'İptal edildi',
561
+ 'hr.leave_cancelled_toast': 'Talep iptal edildi',
562
+ 'hr.leave_from': 'Başlangıç',
563
+ 'hr.leave_none': 'Kayıtlı izin yok',
564
+ 'hr.leave_none_desc': 'İzin aldığınızda burada görünecek.',
565
+ 'hr.leave_pending': 'Onay bekliyor',
566
+ 'hr.leave_reason': 'Neden',
567
+ 'hr.leave_rejected': 'Reddedildi',
568
+ 'hr.leave_submitted': 'İzin talep edildi',
569
+ 'hr.leave_title': 'İzin',
570
+ 'hr.leave_to': 'Bitiş',
571
+ 'hr.leave_type': 'Tür',
572
+ 'hr.leave_withdrawn': 'Geri çekildi',
573
+ 'hr.leave_would_cost': '{days} iş günü',
574
+ 'hr.local_time': 'Yerel saat',
575
+ 'hr.manager': 'Yönetici',
576
+ 'hr.minutes_short': '{n}dk',
577
+ 'hr.nav': 'Kişiler',
578
+ 'hr.no_people': 'Henüz kimse yok',
579
+ 'hr.no_people_desc': 'Rehberi başlatmak için ilk kişiyi ekleyin.',
580
+ 'hr.not_clocked_in': 'Giriş yapılmadı',
581
+ 'hr.offboard': 'İşi bitir',
582
+ 'hr.offboard_body': 'Kayıt kalır. Bu, Kern üyeliğini silmez — yalnızca iş ilişkisini kapatır.',
583
+ 'hr.offboard_date': 'Son gün',
584
+ 'hr.offboard_reason': 'Neden',
585
+ 'hr.offboard_title': '{name} için işi bitir',
586
+ 'hr.office': 'Ofis',
587
+ 'hr.office_default': 'Varsayılan',
588
+ 'hr.offices_none': 'Henüz ofis yok',
589
+ 'hr.offices_none_desc': 'Bir gruba kendi tatilleri ve saat dilimi için ofis ekleyin.',
590
+ 'hr.offices_title': 'Ofisler',
591
+ 'hr.on_break_since': '{time} saatinden beri molada',
592
+ 'hr.people_error': 'Rehber yüklenemedi',
593
+ 'hr.person_created': '{name} dizine eklendi',
594
+ 'hr.person_offboarded': '{name} ayrıldı',
595
+ 'hr.person_updated': 'Kaydedildi',
596
+ 'hr.personal_email': 'Kişisel e-posta',
597
+ 'hr.phone': 'Telefon',
598
+ 'hr.reject': 'Reddet',
599
+ 'hr.request_leave': 'İzin talep et',
600
+ 'hr.search_people': 'Kişi ara',
601
+ 'hr.settings_calendars': 'Tatiller',
602
+ 'hr.settings_capabilities': 'Özellikler',
603
+ 'hr.settings_leave': 'İzin',
604
+ 'hr.settings_not_built': "Bunun API'si hazır; düzenleme ekranı henüz yapılmadı.",
605
+ 'hr.settings_offices': 'Ofisler',
606
+ 'hr.settings_schedules': 'Vardiyalar',
607
+ 'hr.started': 'Başlangıç',
608
+ 'hr.status': 'Durum',
609
+ 'hr.status_active': 'Aktif',
610
+ 'hr.status_offboarding': 'Ayrılıyor',
611
+ 'hr.status_on_leave': 'İzinde',
612
+ 'hr.status_onboarding': 'İşe alım',
613
+ 'hr.status_terminated': 'Ayrıldı',
614
+ 'hr.subtitle': 'Burada çalışan herkes',
615
+ 'hr.title': 'Kişiler',
616
+ 'hr.widget_approvals_desc': 'Kararınızı bekleyen talepler.',
617
+ 'hr.widget_approvals_title': 'Sizi bekleyenler',
618
+ 'hr.widget_balance_desc': 'Her izin türünden kalan.',
619
+ 'hr.widget_balance_title': 'İznim',
620
+ 'hr.widget_clock_desc': 'Giriş çıkış yapın ve bugünkü toplamı görün.',
621
+ 'hr.widget_clock_title': 'Saat',
622
+ 'hr.widget_headcount_desc': 'Burada kaç kişi çalışıyor.',
623
+ 'hr.widget_headcount_title': 'Çalışan sayısı',
624
+ 'hr.widget_whos_out_desc': 'Önümüzdeki iki hafta izinde olanlar.',
625
+ 'hr.widget_whos_out_title': 'Kimler izinde',
626
+ 'hr.work_email': 'İş e-postası',
627
+ 'hr.worked_today': 'Bugün çalışılan',
628
+ }
629
+
630
+ /** In the shape `defineClientModule().messages` expects. */
631
+ export const hrMessageBundles = {
632
+ ar: async () => ar,
633
+ de: async () => de,
634
+ en: async () => en,
635
+ fa: async () => fa,
636
+ tr: async () => tr,
637
+ }
638
+
639
+ /** `t('settings_nav')` — the module id is implied. */
640
+ export const t = scopedT('hr')
@@ -78,3 +78,6 @@ export const HR_CAPABILITIES = {
78
78
  attendance: 'attendance',
79
79
  overtime: 'overtime',
80
80
  } as const
81
+ export { __setHrApi, getHrApi } from './api-instance.js'
82
+ export { type HrMessageKey, hrMessageBundles, t } from './i18n.js'
83
+ export { hrClientModule, hrClientModule as default } from './module.js'