mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-02 05:57:45 +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}
|
* @returns {*|null}
|
||||||
*/
|
*/
|
||||||
getMainUser(state) {
|
getMainUser(state) {
|
||||||
|
console.log("### getMainUser", state.activity.mainUser);
|
||||||
return state.activity.mainUser || null;
|
return state.activity.mainUser || null;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -39,6 +39,8 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
|
|||||||
'label' => '',
|
'label' => '',
|
||||||
'email' => '',
|
'email' => '',
|
||||||
'isAbsent' => false,
|
'isAbsent' => false,
|
||||||
|
'absenceStart' => null,
|
||||||
|
'absenceEnd' => null,
|
||||||
];
|
];
|
||||||
|
|
||||||
public function __construct(private readonly UserRender $userRender, private readonly ClockInterface $clock) {}
|
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_center' => $this->normalizer->normalize($object->getMainCenter(), $format, $centerContext),
|
||||||
'main_scope' => $this->normalizer->normalize($object->getMainScope($at), $format, $scopeContext),
|
'main_scope' => $this->normalizer->normalize($object->getMainScope($at), $format, $scopeContext),
|
||||||
'isAbsent' => $object->isAbsent(),
|
'isAbsent' => $object->isAbsent(),
|
||||||
|
'absenceStart' => $object->getAbsenceStart(),
|
||||||
|
'absenceEnd' => $object->getAbsenceEnd(),
|
||||||
];
|
];
|
||||||
|
|
||||||
if ('docgen' === $format) {
|
if ('docgen' === $format) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user