AbsaOSS / cps-shared-ui

Angular shared components library
https://absaoss.github.io/cps-shared-ui/
Apache License 2.0
2 stars 2 forks source link

Fix: Refactor CpsSchedulerComponent initialization #389

Closed TerranceKhumalo-absa closed 1 month ago

TerranceKhumalo-absa commented 1 month ago

Title: Fix Uninitialized Form Control Error in CpsSchedulerComponent

Problem

In the CpsSchedulerComponent, we encountered an issue where the form control was being accessed before it was initialized. This was happening when we set to 'Advanced'. The code was trying to set a value to the 'advanced' form control, but the form was not yet initialized, leading to a "Cannot read property of undefined" error.

image

Error

To reproduce the error, change the cron expression value in the SchedulerPageComponent image