diff --git a/apps/web/Components/Calculation/Form/ELT/Components/PolicyTable.tsx b/apps/web/Components/Calculation/Form/ELT/Components/PolicyTable.tsx index 0b90bf4..dbfde3c 100644 --- a/apps/web/Components/Calculation/Form/ELT/Components/PolicyTable.tsx +++ b/apps/web/Components/Calculation/Form/ELT/Components/PolicyTable.tsx @@ -41,6 +41,7 @@ export const PolicyTable = observer( content: 'Выбранный расчет ЭЛТ применен', duration: 1, key: record.key, + onClick: () => message.destroy(record.key), }); $process.delete('ELT'); } diff --git a/apps/web/apollo/link.js b/apps/web/apollo/link.js index fa56d00..7f17dec 100644 --- a/apps/web/apollo/link.js +++ b/apps/web/apollo/link.js @@ -61,6 +61,8 @@ const httpLink = new HttpLink({ uri: URL_CRM_GRAPHQL, }); +const key = 'APOLLO_GRAPHQL'; + const errorLink = onError(({ graphQLErrors, networkError, operation, response }) => { const scope = getCurrentScope(); scope.setTag('operationName', operation.operationName); @@ -68,7 +70,8 @@ const errorLink = onError(({ graphQLErrors, networkError, operation, response }) if (!isServer()) { message.error({ content: `Ошибка во время загрузки данных из CRM`, - key: 'APOLLO_GRAPHQL', + key, + onClick: () => message.destroy(key), }); } diff --git a/apps/web/process/load-kp/reactions.ts b/apps/web/process/load-kp/reactions.ts index 435a865..c0ea19a 100644 --- a/apps/web/process/load-kp/reactions.ts +++ b/apps/web/process/load-kp/reactions.ts @@ -26,6 +26,7 @@ export function common({ store, trpcClient, apolloClient }: ProcessContext) { message.loading({ content: `Загружаем КП ${quote?.label}...`, key, + onClick: () => message.destroy(key), }); const eltInitialValues = await initElt(); @@ -90,12 +91,14 @@ export function common({ store, trpcClient, apolloClient }: ProcessContext) { message.success({ content: `КП ${quote.label} загружено`, key, + onClick: () => message.destroy(key), }); }) .catch(() => { message.error({ content: `Ошибка во время загрузки КП ${quote.label}`, key, + onClick: () => message.destroy(key), }); $calculation.element('selectQuote').resetValue(); })