From 443fb80dc6a2f6ed80a8565a3881e32ff28396bc Mon Sep 17 00:00:00 2001 From: Suchith Krishna S Donni <53624363+sksDonni@users.noreply.github.com> Date: Mon, 20 Nov 2023 18:04:44 +0530 Subject: [PATCH] fix(cohorts): Alerting functionality when user enters wrong details while creating cohort (#18689) Co-authored-by: Sukrutha --- frontend/src/scenes/cohorts/cohortEditLogic.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/scenes/cohorts/cohortEditLogic.ts b/frontend/src/scenes/cohorts/cohortEditLogic.ts index a2e28bd868112..6c836e0a32887 100644 --- a/frontend/src/scenes/cohorts/cohortEditLogic.ts +++ b/frontend/src/scenes/cohorts/cohortEditLogic.ts @@ -316,6 +316,11 @@ export const cohortEditLogic = kea([ cohortsModel.findMounted()?.actions.deleteCohort({ id: values.cohort.id, name: values.cohort.name }) router.actions.push(urls.cohorts()) }, + submitCohort: () => { + if (values.cohortHasErrors) { + lemonToast.error('There was an error submiting this cohort. Make sure the cohort filters are correct.') + } + }, checkIfFinishedCalculating: async ({ cohort }, breakpoint) => { if (cohort.is_calculating) { actions.setPollTimeout(