mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-12-02 16:38:27 +00:00
Do not suggest a user that is no longer active within the activity form
This commit is contained in:
6
.changes/unreleased/Fixed-20251201-185859.yaml
Normal file
6
.changes/unreleased/Fixed-20251201-185859.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
kind: Fixed
|
||||
body: Do not suggest a user that is no longer active in the activity form.
|
||||
time: 2025-12-01T18:58:59.410998029+01:00
|
||||
custom:
|
||||
Issue: "475"
|
||||
SchemaChange: No schema change
|
||||
@@ -1,8 +1,8 @@
|
||||
import "es6-promise/auto";
|
||||
import { createStore } from "vuex";
|
||||
import { postLocation } from "./api";
|
||||
import {createStore} from "vuex";
|
||||
import {postLocation} from "./api";
|
||||
import prepareLocations from "./store.locations.js";
|
||||
import { fetchResults, makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
||||
import {fetchResults, makeFetch} from "ChillMainAssets/lib/api/apiMethods";
|
||||
|
||||
const debug = process.env.NODE_ENV !== "production";
|
||||
//console.log('window.activity', window.activity);
|
||||
@@ -103,7 +103,7 @@ const store = createStore({
|
||||
}
|
||||
// console.log("suggested users", suggestedUsers);
|
||||
|
||||
return suggestedUsers;
|
||||
return suggestedUsers.filter(u => u.enabled === true);
|
||||
},
|
||||
suggestedResources(state) {
|
||||
// const resources = state.activity.accompanyingPeriod.resources;
|
||||
|
||||
@@ -41,6 +41,7 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
|
||||
'isAbsent' => false,
|
||||
'absenceStart' => null,
|
||||
'absenceEnd' => null,
|
||||
'enabled' => true,
|
||||
];
|
||||
|
||||
public function __construct(private readonly UserRender $userRender, private readonly ClockInterface $clock) {}
|
||||
@@ -108,6 +109,7 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
|
||||
'isAbsent' => $object->isAbsent(),
|
||||
'absenceStart' => $this->normalizer->normalize($object->getAbsenceStart(), $format, $absenceDatesContext),
|
||||
'absenceEnd' => $this->normalizer->normalize($object->getAbsenceEnd(), $format, $absenceDatesContext),
|
||||
'enabled' => $object->isEnabled(),
|
||||
];
|
||||
|
||||
if ('docgen' === $format) {
|
||||
|
||||
Reference in New Issue
Block a user