mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-01 21:47:44 +00:00
Add absence start- and enddate to user serialization
This commit is contained in:
parent
48bd40d2ea
commit
0624cf2c1e
@ -6,6 +6,7 @@ export default {
|
||||
* @returns {*|null}
|
||||
*/
|
||||
getMainUser(state) {
|
||||
console.log("### getMainUser", state.activity.mainUser);
|
||||
return state.activity.mainUser || null;
|
||||
},
|
||||
/**
|
||||
|
@ -39,6 +39,8 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
|
||||
'label' => '',
|
||||
'email' => '',
|
||||
'isAbsent' => false,
|
||||
'absenceStart' => null,
|
||||
'absenceEnd' => null,
|
||||
];
|
||||
|
||||
public function __construct(private readonly UserRender $userRender, private readonly ClockInterface $clock) {}
|
||||
@ -99,6 +101,8 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
|
||||
'main_center' => $this->normalizer->normalize($object->getMainCenter(), $format, $centerContext),
|
||||
'main_scope' => $this->normalizer->normalize($object->getMainScope($at), $format, $scopeContext),
|
||||
'isAbsent' => $object->isAbsent(),
|
||||
'absenceStart' => $object->getAbsenceStart(),
|
||||
'absenceEnd' => $object->getAbsenceEnd(),
|
||||
];
|
||||
|
||||
if ('docgen' === $format) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user