fix ApplyDomainTypes dialog
@@ -13,7 +13,12 @@ import {Feed} from "../../model/feed/feed.model";
import {TableColumnDefinition} from "../../model/TableColumnDefinition"
import {DomainType, DomainTypesService} from "../../services/DomainTypesService";
import {FeedService} from '../../services/FeedService';
-import {ApplyTableDomainTypesDialog} from "../../shared/apply-domain-type/apply-table-domain-types.component";
+import {
+ ApplyDomainTypesDialogComponent,
+ ApplyDomainTypesResponse,
+ ApplyDomainTypesResponseStatus,
+ ApplyDomainTypesRow
+} from "../../shared/domain-type/apply-domain-types/apply-domain-types-dialog.component";
import {ColumnProfile, ColumnProfileHelper} from "../wrangler/api/column-profile";
import {ColumnController} from "../wrangler/column-controller";
import {ChainedOperation, ColumnDelegate, DataCategory} from "../wrangler/column-delegate";
@@ -420,9 +425,11 @@ export class TransformDataComponent implements AfterViewInit, ColumnController,
// Get user confirmation for domain type changes to field data types
if (fields.length > 0) {
- this.$mdDialog.open(ApplyTableDomainTypesDialog, {data: {domainTypes: domainTypes, fields: fields}, panelClass: "full-screen-dialog"})
- .afterClosed().subscribe((selected: any) => {
- selected.forEach((selection: any) => {
+ this.$mdDialog.open(ApplyDomainTypesDialogComponent, {data: {domainTypes: domainTypes, fields: fields}, panelClass: "full-screen-dialog"})
+ .afterClosed().subscribe((response: ApplyDomainTypesResponse) => {
+ if(response.status ==ApplyDomainTypesResponseStatus.APPLY ) {
+ let selected = response.appliedRows;
+ selected.forEach((selection: ApplyDomainTypesRow) => {
var fieldIndex = fields.findIndex((element: WranglerColumn) => {
return element.name === selection.name;
});
@@ -434,6 +441,7 @@ export class TransformDataComponent implements AfterViewInit, ColumnController,
const formula = `withColumn("${fields[0].name}", ${fields[0].name})`
this.pushFormula(formula, {formula: formula, icon: 'functions', name: 'Change domain type'}, true);
}
+ }
}, () => {
// ignore cancel
});
