Service Import - general page validation 71/133171/2
authorKrupaNagabhushan <krupa.nagabhushan@est.tech>
Tue, 7 Feb 2023 10:03:36 +0000 (10:03 +0000)
committerMichael Morris <michael.morris@est.tech>
Wed, 15 Feb 2023 09:53:18 +0000 (09:53 +0000)
Issue-ID: SDC-4371
Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech>
Change-Id: Ie7340a012feee413a622a8f6ed131f10be5e15e4

catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts

index 8023cee..f550ccf 100644 (file)
@@ -760,6 +760,12 @@ export class GeneralViewModel {
         });
 
         this.$scope.onCategoryChange = (): void => {
+            if (!this.$scope.component.selectedCategory) {
+                this.$scope.editForm['category'].$setDirty();
+            }
+            if (!this.$scope.component.description) {
+                this.$scope.editForm['description'].$setDirty();
+            }
             this.$scope.component.selectedCategory = this.$scope.componentCategories.selectedCategory;
             if (this.$scope.component.selectedCategory) {
                 this.$scope.component.categories = this.convertCategoryStringToOneArray();