Skip to content
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

#17144: Duplicate name request issue. #716

Merged
merged 11 commits into from
Oct 20, 2023
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "name-request",
"version": "5.2.2",
"version": "5.2.3",
"private": true,
"appName": "Name Request UI",
"sbcName": "SBC Common Components",
Expand Down
13 changes: 13 additions & 0 deletions src/components/dialogs/error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
For assistance, please contact BC Registries staff:
</v-card-text>
</div>
<div v-if="isExists">
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
<v-card-text class="copy-normal pt-8">
You Have Already created a request with same name.
Please go back and change the names , or in order to edit please use manage my request tab.
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
<br>
<br>
For assistance, please contact BC Registries staff:
</v-card-text>
</div>
<div v-else>
<v-card-text class="copy-normal pt-8">
If you have paid for a new NR, please do not try submitting your payment again.
Expand Down Expand Up @@ -58,6 +67,10 @@ export default class ErrorDialog extends Vue {
async hideModal () {
await ErrorModule.clearAppErrors()
}
get isExists () {
const errors = ErrorModule[ErrorTypes.GET_ERRORS]
return errors[0] && errors[0].id === 'entry-already-exists'
}
Rajandeep98 marked this conversation as resolved.
Show resolved Hide resolved

get isEditLockError () {
const errors = ErrorModule[ErrorTypes.GET_ERRORS]
Expand Down
6 changes: 5 additions & 1 deletion src/services/namex-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,11 @@ export default class NamexServices {
err?.response && console.log('postNameRequest(), response =', err.response) // eslint-disable-line no-console
const msg = await this.handleApiError(err, 'Could not post name requests')
console.error('postNameRequest() =', msg) // eslint-disable-line no-console
await errorModule.setAppError({ id: 'post-name-requests-error', error: msg } as ErrorI)
let error_id = 'post-name-requests-error'
if (err instanceof AxiosError && err.response.data.message === 'The request with same name is already submitted.') {
error_id = 'entry-already-exists'
}
await errorModule.setAppError({ id: error_id, error: msg } as ErrorI)
return null
}
}
Expand Down