ublo-lib 1.22.44 → 1.22.46
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.
|
@@ -23,7 +23,7 @@ export default function Elloha({ preset, setPreset, stay, setShowPresetDialog, o
|
|
|
23
23
|
setShowPresetDialog(false);
|
|
24
24
|
};
|
|
25
25
|
const manualSelectedGroupUpdate = (newValue) => {
|
|
26
|
-
const values = newValue.split(";")
|
|
26
|
+
const values = newValue.split(";");
|
|
27
27
|
setSelectedGroups(values);
|
|
28
28
|
};
|
|
29
29
|
console.log(selectedGroups);
|
|
@@ -54,7 +54,7 @@ export default function Elloha({ preset, setPreset, stay, setShowPresetDialog, o
|
|
|
54
54
|
...current,
|
|
55
55
|
presets: {
|
|
56
56
|
...(current?.presets || {}),
|
|
57
|
-
groupNames: selectedGroups,
|
|
57
|
+
groupNames: selectedGroups.map((g) => g.trim()),
|
|
58
58
|
},
|
|
59
59
|
};
|
|
60
60
|
onChange?.(newPreset);
|
|
@@ -64,12 +64,12 @@ export default function Elloha({ preset, setPreset, stay, setShowPresetDialog, o
|
|
|
64
64
|
return (_jsxs(Form, { title: "Presets activit\u00E9s Elloha", width: 420, preset: preset, buttonsActions: {
|
|
65
65
|
testPreset,
|
|
66
66
|
cancelPreset,
|
|
67
|
-
confirmPreset: groupNames.length === 0
|
|
67
|
+
confirmPreset: groupNames.length === 0 && selectedGroups.length === 0
|
|
68
68
|
? undefined
|
|
69
69
|
: confirmPreset,
|
|
70
70
|
}, children: [!stayIsUndefined && (_jsx(MultipleSelect, { label: "Groupes", options: groupNames, values: selectedGroups, onChange: setSelectedGroups, placeholder: "S\u00E9lectionnez un ou plusieurs groupes", loading: loading, disabled: groupNames.length === 0, error: !loading &&
|
|
71
71
|
groupNames.length === 0 &&
|
|
72
|
-
"Aucun groupe disponible à ces dates" })), stayIsUndefined && (_jsxs(_Fragment, { children: [_jsx("div", { className: css.error, children: "Vous devez renseigner des dates de s\u00E9jour pour afficher les groupes" }), _jsx(Input, { label: "Groupe", placeholder: "", value: selectedGroups.join(";
|
|
72
|
+
"Aucun groupe disponible à ces dates" })), stayIsUndefined && (_jsxs(_Fragment, { children: [_jsx("div", { className: css.error, children: "Vous devez renseigner des dates de s\u00E9jour pour afficher les groupes" }), _jsx(Input, { label: "Groupe", placeholder: "", value: selectedGroups.join(";"), onValueChange: manualSelectedGroupUpdate }), _jsx("div", { className: css.helper, children: "Vous pouvez manuellement renseigner un groupe (si plusieurs, les s\u00E9pararer par un \";\"" })] }))] }));
|
|
73
73
|
}
|
|
74
74
|
function getDefaultData(preset) {
|
|
75
75
|
if (!preset?.presets)
|