diff --git a/package-lock.json b/package-lock.json index 2ea5a675d..3f6a7e0e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "name-request", - "version": "5.2.15", + "version": "5.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "name-request", - "version": "5.2.15", + "version": "5.3.0", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/breadcrumb": "2.1.24", diff --git a/package.json b/package.json index ff73c9da2..3a82c8d41 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "name-request", - "version": "5.2.15", + "version": "5.3.0", "private": true, "appName": "Name Request UI", "sbcName": "SBC Common Components", diff --git a/src/components/dialogs/error.vue b/src/components/dialogs/error.vue index 94a447c61..aa9729587 100644 --- a/src/components/dialogs/error.vue +++ b/src/components/dialogs/error.vue @@ -25,6 +25,14 @@ For assistance, please contact BC Registries staff: +
+ + You have already created an identical name request. To request a different name, please go back and change the name to request and try again. +
+
+ For assistance, please contact BC Registries staff: +
+
If you have paid for a new NR, please do not try submitting your payment again. @@ -70,6 +78,11 @@ export default class ErrorDialog extends Vue { await ErrorModule.clearAppErrors() } + get isExists () { + const errors = ErrorModule[ErrorTypes.GET_ERRORS] + return errors[0] && errors[0].id === 'entry-already-exists' + } + get isEditLockError () { const errors = ErrorModule[ErrorTypes.GET_ERRORS] return errors[0] && errors[0].id === 'edit-lock-error' diff --git a/src/services/namex-services.ts b/src/services/namex-services.ts index f48b4303a..5f17a8ac9 100644 --- a/src/services/namex-services.ts +++ b/src/services/namex-services.ts @@ -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 } }