From be6d5e63ea3c76540c1888e969cd3daa6d94ddbd Mon Sep 17 00:00:00 2001 From: "SOUISSI Maissa (Externe)" Date: Mon, 26 Jan 2026 15:39:24 +0100 Subject: [PATCH 1/5] add pcc param for user profile Signed-off-by: SOUISSI Maissa (Externe) --- package-lock.json | 8 ++++---- package.json | 2 +- .../profiles/modification/configuration-selection.tsx | 4 +++- .../profiles/modification/profile-modification-dialog.tsx | 5 +++++ .../profiles/modification/profile-modification-form.tsx | 2 ++ src/services/user-admin.ts | 3 ++- src/translations/en.json | 1 + src/translations/fr.json | 1 + 8 files changed, 19 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 38d7aa1..7386e7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", - "@gridsuite/commons-ui": "0.154.0", + "@gridsuite/commons-ui": "0.157.0", "@hookform/resolvers": "^4.1.3", "@mui/icons-material": "^5.18.0", "@mui/lab": "5.0.0-alpha.175", @@ -3100,9 +3100,9 @@ } }, "node_modules/@gridsuite/commons-ui": { - "version": "0.154.0", - "resolved": "https://registry.npmjs.org/@gridsuite/commons-ui/-/commons-ui-0.154.0.tgz", - "integrity": "sha512-NJXzGsE6kRzvZ9U1rapBeXZU1glUxFjl1blRcCdg9p/5jVrLt23sRQs4XaJFBbq5dPjkr1taviEa/tWW8hX3DA==", + "version": "0.157.0", + "resolved": "https://registry.npmjs.org/@gridsuite/commons-ui/-/commons-ui-0.157.0.tgz", + "integrity": "sha512-zpSWNpBlpM1+A7yKt2G33IT/uVHuwrDy4gTE6U0HQmeLaWbZldRrbT+77RpZgJAFhyFcSX1WCG+Lu4ViNj1coA==", "license": "MPL-2.0", "dependencies": { "@ag-grid-community/locale": "^33.3.2", diff --git a/package.json b/package.json index ee425ac..93ce643 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", - "@gridsuite/commons-ui": "0.154.0", + "@gridsuite/commons-ui": "0.157.0", "@hookform/resolvers": "^4.1.3", "@mui/icons-material": "^5.18.0", "@mui/lab": "5.0.0-alpha.175", diff --git a/src/pages/profiles/modification/configuration-selection.tsx b/src/pages/profiles/modification/configuration-selection.tsx index 074c265..acb56cc 100644 --- a/src/pages/profiles/modification/configuration-selection.tsx +++ b/src/pages/profiles/modification/configuration-selection.tsx @@ -21,6 +21,7 @@ export interface ConfigSelectionProps { | ElementType.SECURITY_ANALYSIS_PARAMETERS | ElementType.SENSITIVITY_PARAMETERS | ElementType.SHORT_CIRCUIT_PARAMETERS + | ElementType.PCC_MIN_PARAMETERS | ElementType.VOLTAGE_INIT_PARAMETERS | ElementType.SPREADSHEET_CONFIG_COLLECTION | ElementType.NETWORK_VISUALIZATIONS_PARAMETERS @@ -30,7 +31,6 @@ export interface ConfigSelectionProps { const ConfigurationSelection: FunctionComponent = (props) => { const intl = useIntl(); - const [openDirectorySelector, setOpenDirectorySelector] = useState(false); const [selectedElementName, setSelectedElementName] = useState(); const [configLinkValid, setConfigLinkValid] = useState(); @@ -93,6 +93,8 @@ const ConfigurationSelection: FunctionComponent = (props) return 'profiles.form.modification.networkVisualizations.name'; case ElementType.DIAGRAM_CONFIG: return 'profiles.form.modification.diagramConfig.name'; + case ElementType.PCC_MIN_PARAMETERS: + return 'profiles.form.modification.pccmin.name'; } }; diff --git a/src/pages/profiles/modification/profile-modification-dialog.tsx b/src/pages/profiles/modification/profile-modification-dialog.tsx index 1ea31d1..d191e41 100644 --- a/src/pages/profiles/modification/profile-modification-dialog.tsx +++ b/src/pages/profiles/modification/profile-modification-dialog.tsx @@ -9,6 +9,7 @@ import ProfileModificationForm, { DIAGRAM_CONFIG_ID, LOADFLOW_PARAM_ID, NETWORK_VISUALIZATION_PARAMETERS_ID, + PCCMIN_PARAM_ID, PROFILE_NAME, SECURITY_ANALYSIS_PARAM_ID, SENSITIVITY_ANALYSIS_PARAM_ID, @@ -50,6 +51,7 @@ const ProfileModificationDialog: FunctionComponent().optional(), [SENSITIVITY_ANALYSIS_PARAM_ID]: yup.string().optional(), [SHORTCIRCUIT_PARAM_ID]: yup.string().optional(), + [PCCMIN_PARAM_ID]: yup.string().optional(), [VOLTAGE_INIT_PARAM_ID]: yup.string().optional(), [USER_QUOTA_CASE_NB]: yup.number().positive('userQuotaPositive').optional(), [USER_QUOTA_BUILD_NB]: yup.number().positive('userQuotaPositive').optional(), @@ -70,6 +72,7 @@ const ProfileModificationDialog: FunctionComponent>( (profileFormData) => { if (profileId) { + console.log('====== SUBMIT ', profileFormData); const profileData: UserProfile = { id: profileId, name: profileFormData[PROFILE_NAME], @@ -77,6 +80,7 @@ const ProfileModificationDialog: FunctionComponent { export function modifyProfile(profileData: UserProfile) { console.debug(`Updating a profile...`); - + console.log("^^^^^^^ ",profileData ) return backendFetch(`${USER_ADMIN_URL}/profiles/${profileData.id}`, { method: 'PUT', headers: { diff --git a/src/translations/en.json b/src/translations/en.json index d6eb53b..129fdea 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -87,6 +87,7 @@ "profiles.form.modification.securityAnalysis.name": "Security analysis", "profiles.form.modification.sensitivityAnalysis.name": "Sensitivity analysis", "profiles.form.modification.shortcircuit.name": "Short-circuit", + "profiles.form.modification.pccmin.name": "Pcc min N-1", "profiles.form.modification.voltageInit.name": "Voltage init", "profiles.form.modification.spreadsheetConfigCollection.name": "Spreadsheet model collection", "profiles.form.modification.networkVisualizations.name": "Network visualizations", diff --git a/src/translations/fr.json b/src/translations/fr.json index f14a11d..837af16 100644 --- a/src/translations/fr.json +++ b/src/translations/fr.json @@ -88,6 +88,7 @@ "profiles.form.modification.securityAnalysis.name": "Analyse de sécurité", "profiles.form.modification.sensitivityAnalysis.name": "Analyse de sensibilités", "profiles.form.modification.shortcircuit.name": "Calcul de court-circuit", + "profiles.form.modification.pccmin.name": "Pcc min N-1", "profiles.form.modification.voltageInit.name": "Initialisation du plan de tension", "profiles.form.modification.spreadsheetConfigCollection.name": "Modèles de tableur", "profiles.form.modification.networkVisualizations.name": "Images réseau", From f7b6b6950a6887e851f1d69ffbc8940a7c6e8868 Mon Sep 17 00:00:00 2001 From: "SOUISSI Maissa (Externe)" Date: Mon, 26 Jan 2026 15:48:50 +0100 Subject: [PATCH 2/5] Revert file Signed-off-by: SOUISSI Maissa (Externe) --- package-lock.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5415e4..3ec2adf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3105,15 +3105,9 @@ } }, "node_modules/@gridsuite/commons-ui": { -<<<<<<< HEAD - "version": "0.157.0", - "resolved": "https://registry.npmjs.org/@gridsuite/commons-ui/-/commons-ui-0.157.0.tgz", - "integrity": "sha512-zpSWNpBlpM1+A7yKt2G33IT/uVHuwrDy4gTE6U0HQmeLaWbZldRrbT+77RpZgJAFhyFcSX1WCG+Lu4ViNj1coA==", -======= "version": "0.160.0", "resolved": "https://registry.npmjs.org/@gridsuite/commons-ui/-/commons-ui-0.160.0.tgz", "integrity": "sha512-RUBJ4CRVfw3A8e6+xcC/MZZcBRf/IjJUd4eYvO6jULUwwSb3BQpk4+K2E9oINpefaxcIZzrJgWsVqsMJUQ9zUw==", ->>>>>>> main "license": "MPL-2.0", "dependencies": { "@ag-grid-community/locale": "^33.3.2", From 0f93933209ac6f579eda2eab241a5659eff451c8 Mon Sep 17 00:00:00 2001 From: "SOUISSI Maissa (Externe)" Date: Mon, 26 Jan 2026 15:50:39 +0100 Subject: [PATCH 3/5] clean code Signed-off-by: SOUISSI Maissa (Externe) --- src/pages/profiles/modification/profile-modification-dialog.tsx | 1 - src/services/user-admin.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/pages/profiles/modification/profile-modification-dialog.tsx b/src/pages/profiles/modification/profile-modification-dialog.tsx index d191e41..c28fb51 100644 --- a/src/pages/profiles/modification/profile-modification-dialog.tsx +++ b/src/pages/profiles/modification/profile-modification-dialog.tsx @@ -72,7 +72,6 @@ const ProfileModificationDialog: FunctionComponent>( (profileFormData) => { if (profileId) { - console.log('====== SUBMIT ', profileFormData); const profileData: UserProfile = { id: profileId, name: profileFormData[PROFILE_NAME], diff --git a/src/services/user-admin.ts b/src/services/user-admin.ts index 5cfa866..2446074 100644 --- a/src/services/user-admin.ts +++ b/src/services/user-admin.ts @@ -153,7 +153,6 @@ export function getProfile(profileId: UUID): Promise { export function modifyProfile(profileData: UserProfile) { console.debug(`Updating a profile...`); - console.log("^^^^^^^ ",profileData ) return backendFetch(`${USER_ADMIN_URL}/profiles/${profileData.id}`, { method: 'PUT', headers: { From 6a402e48f0261e806d87d4c68433219ee90ddd1f Mon Sep 17 00:00:00 2001 From: "SOUISSI Maissa (Externe)" Date: Wed, 28 Jan 2026 16:39:07 +0100 Subject: [PATCH 4/5] renaming Signed-off-by: SOUISSI Maissa (Externe) --- src/pages/profiles/modification/configuration-selection.tsx | 2 +- src/translations/en.json | 2 +- src/translations/fr.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/profiles/modification/configuration-selection.tsx b/src/pages/profiles/modification/configuration-selection.tsx index acb56cc..2c9d2c8 100644 --- a/src/pages/profiles/modification/configuration-selection.tsx +++ b/src/pages/profiles/modification/configuration-selection.tsx @@ -94,7 +94,7 @@ const ConfigurationSelection: FunctionComponent = (props) case ElementType.DIAGRAM_CONFIG: return 'profiles.form.modification.diagramConfig.name'; case ElementType.PCC_MIN_PARAMETERS: - return 'profiles.form.modification.pccmin.name'; + return 'profiles.form.modification.pccMin.name'; } }; diff --git a/src/translations/en.json b/src/translations/en.json index 129fdea..1554376 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -87,7 +87,7 @@ "profiles.form.modification.securityAnalysis.name": "Security analysis", "profiles.form.modification.sensitivityAnalysis.name": "Sensitivity analysis", "profiles.form.modification.shortcircuit.name": "Short-circuit", - "profiles.form.modification.pccmin.name": "Pcc min N-1", + "profiles.form.modification.pccMin.name": "Pcc min N-1", "profiles.form.modification.voltageInit.name": "Voltage init", "profiles.form.modification.spreadsheetConfigCollection.name": "Spreadsheet model collection", "profiles.form.modification.networkVisualizations.name": "Network visualizations", diff --git a/src/translations/fr.json b/src/translations/fr.json index 837af16..f874eea 100644 --- a/src/translations/fr.json +++ b/src/translations/fr.json @@ -88,7 +88,7 @@ "profiles.form.modification.securityAnalysis.name": "Analyse de sécurité", "profiles.form.modification.sensitivityAnalysis.name": "Analyse de sensibilités", "profiles.form.modification.shortcircuit.name": "Calcul de court-circuit", - "profiles.form.modification.pccmin.name": "Pcc min N-1", + "profiles.form.modification.pccMin.name": "Pcc min N-1", "profiles.form.modification.voltageInit.name": "Initialisation du plan de tension", "profiles.form.modification.spreadsheetConfigCollection.name": "Modèles de tableur", "profiles.form.modification.networkVisualizations.name": "Images réseau", From 31a3750069619d4d812fcebe69302fd62d5e70f3 Mon Sep 17 00:00:00 2001 From: "SOUISSI Maissa (Externe)" Date: Wed, 28 Jan 2026 16:54:26 +0100 Subject: [PATCH 5/5] renaming Signed-off-by: SOUISSI Maissa (Externe) --- .../profiles/modification/profile-modification-dialog.tsx | 4 ++-- src/services/user-admin.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/profiles/modification/profile-modification-dialog.tsx b/src/pages/profiles/modification/profile-modification-dialog.tsx index c28fb51..81c1d1e 100644 --- a/src/pages/profiles/modification/profile-modification-dialog.tsx +++ b/src/pages/profiles/modification/profile-modification-dialog.tsx @@ -79,7 +79,7 @@ const ProfileModificationDialog: FunctionComponent