-
Notifications
You must be signed in to change notification settings - Fork 1
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
change the way we get case base name #579
base: main
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
@@ -788,3 +788,11 @@ export function searchElementsInfos(searchTerm: string, currentDirectoryUuid: UU | |||
} | |||
); | |||
} | |||
|
|||
export const getBaseName = (caseName: string) => { | |||
const caseNameUrl = `${PREFIX_CASE_QUERIES}/v1/cases/caseBaseName?caseName=${caseName}`; |
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.
encodeURIComponent(caseName)
@@ -788,3 +788,11 @@ export function searchElementsInfos(searchTerm: string, currentDirectoryUuid: UU | |||
} | |||
); | |||
} | |||
|
|||
export const getBaseName = (caseName: string) => { |
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.
add console.info('Get base name for case', caseName);
or something else
setValue(name, caseName?.substring(0, caseName.indexOf('.')), { | ||
shouldDirty: true, | ||
}); | ||
if (caseName.length > 0) { |
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 have to check the caseName trimming maybe
if (caseName.trim().length > 0) {
setValue(name, response, { | ||
shouldDirty: true, | ||
}); | ||
}); |
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.
Add error handling
.catch((error) => { console.error('Error fetching base name:', error); });
to work this evolution must take use powsybl-case-server version : //TODO put version