-
Notifications
You must be signed in to change notification settings - Fork 4
Shunt compensator modification dialog migration ts #3622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Shunt compensator modification dialog migration ts #3622
Conversation
|
Mathieu-Deharbe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests ok. I didn't finish, juste some small remarks to be discussed when I come back. If someone else reviews this in the meantime you can merge without me.
| export const getCharacteristicsCreateFormDataFromSearchCopy = ({ | ||
| bperSection, | ||
| bPerSection, | ||
| qAtNominalV, | ||
| sectionCount, | ||
| maximumSectionCount, | ||
| }: { | ||
| bPerSection: number; | ||
| qAtNominalV: number; | ||
| sectionCount: number; | ||
| maximumSectionCount: number; | ||
| }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the recommended format for gridsuite ? (to keep those grouped parameters as an objet)
Not like this : ?
export const getCharacteristicsCreateFormDataFromSearchCopy = (
bPerSection: number;
qAtNominalV: number;
sectionCount: number;
maximumSectionCount: number;
) => {
Is there a generic rule for the project @etiennehomer ?
| voltageLevelId: string; | ||
| terminalConnected?: boolean | null; | ||
| busOrBusbarSectionId: string; | ||
| connectablePosition: ConnectablePositionFormInfos; | ||
| q: number; | ||
| targetV: number; | ||
| targetDeadband: number; | ||
| sectionCount: number; | ||
| bPerSection: number; | ||
| qAtNominalV: number; | ||
| maximumSectionCount: number; | ||
| isLinear?: boolean | null; | ||
| properties: Record<string, string> | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use the same static values that you used in the previous type; Like :
export const MAXIMUM_SECTION_COUNT = 'maximumSectionCount';
etc
| import { Property } from '../common/properties/property-utils'; | ||
| import { ConnectablePositionFormInfos } from '../../connectivity/connectivity.type'; | ||
|
|
||
| export type ShuntCompensatorDialogSchemaBaseForm = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| export type ShuntCompensatorDialogSchemaBaseForm = { | |
| export type ShuntCompensatorSchemaBaseForm = { |
I don't think we need to have "Dialog" in the type name. A bit like LoadModificationSchemaForm in load-modification.type.ts
Same for the Form in ShuntCompensatorFormInfos. It is not included in LoadModificationInfos in load-modification.type.ts
| id: string; | ||
| name: string; | ||
| voltageLevelId: string; | ||
| terminalConnected?: boolean | null; | ||
| busOrBusbarSectionId: string; | ||
| connectablePosition: ConnectablePositionFormInfos; | ||
| q: number; | ||
| targetV: number; | ||
| targetDeadband: number; | ||
| sectionCount: number; | ||
| bPerSection: number; | ||
| qAtNominalV: number; | ||
| maximumSectionCount: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost all those data are AttributeModification in the database. It may be better to consider them AttributeModification in the front as well. Especially for the non mandatory attributes which may be set to UNSET in order to remove them.
For now I don't think that this would be used but this is done like this in LoadModificationInfos and I think this is more cautious.
flomillot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same remarks as #3619
(I will read the rest after the fixes)




PR Summary
Shunt compensator modification dialog migration ts