forked from gooddata/gooddata-ui-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request gooddata#5123 from gooddata/jsc/f1
fix: scheduling filters title style
- Loading branch information
Showing
7 changed files
with
62 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...rd/src/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/automationFilters.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// (C) 2024 GoodData Corporation | ||
|
||
import { | ||
FilterContextItem, | ||
IAutomationMetadataObject, | ||
IAutomationMetadataObjectDefinition, | ||
IFilter, | ||
isExportDefinitionDashboardContent, | ||
isExportDefinitionVisualizationObjectContent, | ||
isFilter, | ||
isFilterContextItem, | ||
} from "@gooddata/sdk-model"; | ||
|
||
export const isDashboardAutomation = ( | ||
automation: IAutomationMetadataObject | IAutomationMetadataObjectDefinition | undefined, | ||
) => { | ||
if (!automation) { | ||
return false; | ||
} | ||
|
||
return automation?.exportDefinitions?.some((exportDefinition) => { | ||
return isExportDefinitionDashboardContent(exportDefinition.requestPayload.content); | ||
}); | ||
}; | ||
|
||
export const getAutomationDashboardFilters = ( | ||
automation: IAutomationMetadataObject | IAutomationMetadataObjectDefinition | undefined, | ||
): FilterContextItem[] | undefined => { | ||
if (!automation) { | ||
return undefined; | ||
} | ||
|
||
return automation.exportDefinitions | ||
?.find((exportDefinition) => { | ||
return isExportDefinitionDashboardContent(exportDefinition.requestPayload.content); | ||
}) | ||
?.requestPayload?.content.filters?.filter(isFilterContextItem); | ||
}; | ||
|
||
export const getAutomationVisualizationFilters = ( | ||
automation: IAutomationMetadataObject | IAutomationMetadataObjectDefinition | undefined, | ||
): IFilter[] | undefined => { | ||
if (!automation) { | ||
return undefined; | ||
} | ||
|
||
return automation.exportDefinitions | ||
?.find((exportDefinition) => { | ||
return isExportDefinitionVisualizationObjectContent(exportDefinition.requestPayload.content); | ||
}) | ||
?.requestPayload?.content.filters?.filter(isFilter); | ||
}; |
22 changes: 0 additions & 22 deletions
22
...src/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/getAutomationFilters.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters