ublo-lib 1.38.17 → 1.38.19
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esf.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/msem-preset-editor/editors/esf.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,KAAK,KAAK,GAAG;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5E,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAeF,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAC1B,eAAe,EACf,MAAM,EACN,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,UAAU,GACX,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"esf.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/msem-preset-editor/editors/esf.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,KAAK,KAAK,GAAG;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5E,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAeF,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAC1B,eAAe,EACf,MAAM,EACN,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,UAAU,GACX,EAAE,KAAK,2CA6HP"}
|
|
@@ -43,7 +43,7 @@ export default function Esf({ msemServicesUrl, preset, setPreset, setShowPresetD
|
|
|
43
43
|
setShowPresetDialog(false);
|
|
44
44
|
};
|
|
45
45
|
React.useEffect(() => {
|
|
46
|
-
if (year && stay) {
|
|
46
|
+
if (year && stay && !kindList.length) {
|
|
47
47
|
const runEffect = async () => {
|
|
48
48
|
try {
|
|
49
49
|
setLoading(true);
|
|
@@ -64,16 +64,19 @@ export default function Esf({ msemServicesUrl, preset, setPreset, setShowPresetD
|
|
|
64
64
|
};
|
|
65
65
|
runEffect();
|
|
66
66
|
}
|
|
67
|
-
}, []);
|
|
67
|
+
}, [channel, lang, msemServicesUrl, resort, season, stay, year]);
|
|
68
68
|
React.useEffect(() => {
|
|
69
69
|
setPreset((current = {}) => {
|
|
70
70
|
const kind = selectedKind?.code;
|
|
71
71
|
const engagement = selectedKind?.engagement ? true : undefined;
|
|
72
72
|
const newPreset = {
|
|
73
73
|
...current,
|
|
74
|
+
options: {
|
|
75
|
+
...(current?.options || {}),
|
|
76
|
+
intermediary: data.intermediary || undefined,
|
|
77
|
+
},
|
|
74
78
|
presets: {
|
|
75
79
|
...(current?.presets || {}),
|
|
76
|
-
intermediary: data.intermediary || undefined,
|
|
77
80
|
kind,
|
|
78
81
|
engagement,
|
|
79
82
|
},
|
|
@@ -81,7 +84,7 @@ export default function Esf({ msemServicesUrl, preset, setPreset, setShowPresetD
|
|
|
81
84
|
onChange?.(newPreset);
|
|
82
85
|
return newPreset;
|
|
83
86
|
});
|
|
84
|
-
}, [data, onChange, setPreset]);
|
|
87
|
+
}, [data, onChange, selectedKind, setPreset]);
|
|
85
88
|
return (_jsxs(Form, { title: "Presets cours de ski esf", width: 420, preset: preset, buttonsActions: {
|
|
86
89
|
testPreset,
|
|
87
90
|
cancelPreset,
|
|
@@ -89,9 +92,10 @@ export default function Esf({ msemServicesUrl, preset, setPreset, setShowPresetD
|
|
|
89
92
|
}, children: [_jsx(Input, { label: "Code interm\u00E9diaire", value: data.intermediary, onValueChange: updateField("intermediary") }), (loading || formattedKindList.length > 0) && (_jsx(Select, { label: "Type de cours", placeholder: "S\u00E9lectionnez un type de cours", value: data.kind, options: formattedKindList, onValueChange: updateField("kind"), loading: loading }))] }));
|
|
90
93
|
}
|
|
91
94
|
function getDefaultData(preset) {
|
|
92
|
-
if (!preset?.presets)
|
|
95
|
+
if (!preset?.presets && !preset?.options)
|
|
93
96
|
return DEFAULT_DATA;
|
|
94
|
-
const { intermediary
|
|
97
|
+
const { intermediary } = preset.options;
|
|
98
|
+
const { kind, engagement } = preset.presets;
|
|
95
99
|
return {
|
|
96
100
|
intermediary: intermediary || DEFAULT_DATA.intermediary,
|
|
97
101
|
kind: kind ? `${kind}|${engagement}` : DEFAULT_DATA.kind,
|