Conversation
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
|
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
| }); | ||
| fetchStudyMetadata().then((studyMetadata) => { | ||
| // metadata order makes order of temporary limits columns | ||
| studyMetadata?.temporaryLimitsNamesForCatalog.forEach((limitName) => { |
There was a problem hiding this comment.
temporaryLimitsNamesForCatalog may be undefined. It definitely will be in the default config.
There was a problem hiding this comment.
'?' is missing no ?
There was a problem hiding this comment.
I didn't test but you should have to do that part out of the metadata loop :
base.push({
headerName: `${limitName} [A]`,
field: limitName,
cellRenderer: DefaultCellRenderer,
});
There was a problem hiding this comment.
Because of this the data can't be seen from this interface if temporaryLimitsNamesForCatalog is undefined :

Which could be a fine design (if the POs agree) but then when I validate I have data :
I think we should ignore the data that are not defined in temporaryLimitsNamesForCatalog OR still load the data and display it.
| }); | ||
| fetchStudyMetadata().then((studyMetadata) => { | ||
| // metadata order makes order of temporary limits columns | ||
| studyMetadata?.temporaryLimitsNamesForCatalog.forEach((limitName) => { |
There was a problem hiding this comment.
I didn't test but you should have to do that part out of the metadata loop :
base.push({
headerName: `${limitName} [A]`,
field: limitName,
cellRenderer: DefaultCellRenderer,
});
src/components/dialogs/line-types-catalog/line-type-segment-form.tsx
Outdated
Show resolved
Hide resolved
|
|
||
| export type LimitSelectedRowData = CurrentLimitHeader & TemporaryLimitSelectedRowData; | ||
|
|
||
| export type TemporaryLimitSelectedRowData = Record<string, number | string> |
There was a problem hiding this comment.
| export type TemporaryLimitSelectedRowData = Record<string, number | string> | |
| export type TemporaryLimitSelectedRowData = Record<string, number | string>; |
| }); | ||
| fetchStudyMetadata().then((studyMetadata) => { | ||
| // metadata order makes order of temporary limits columns | ||
| studyMetadata?.temporaryLimitsNamesForCatalog.forEach((limitName) => { |
There was a problem hiding this comment.
Because of this the data can't be seen from this interface if temporaryLimitsNamesForCatalog is undefined :

Which could be a fine design (if the POs agree) but then when I validate I have data :
I think we should ignore the data that are not defined in temporaryLimitsNamesForCatalog OR still load the data and display it.



PR Summary