Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-ssg committed Jan 8, 2025
1 parent 4be99e7 commit 7b26c74
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
15 changes: 7 additions & 8 deletions frontend/common/services/useFeatureVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ export const getFeatureStateCrud = (
if (!oldFeatureStates) {
return featureStates
}
if (segments?.length) {
// filter out feature states that have no changes
const segmentDiffs = getSegmentOverrideDiff(
featureStates.filter((v) => !!v.feature_segment),
oldFeatureStates.filter((v) => !!v.feature_segment),
segments,
)
: null
const segmentDiffs = getSegmentOverrideDiff(
featureStates.filter((v) => !!v.feature_segment),
oldFeatureStates.filter((v) => !!v.feature_segment),
segments,
)

const featureStateDiffs = featureStates.filter((v) => {
if (!v.feature_segment) return
const diff = segmentDiffs?.diffs?.find(
Expand Down Expand Up @@ -103,6 +101,7 @@ export const getFeatureStateCrud = (
segment_ids_to_delete_overrides,
}
}

export const featureVersionService = service
.enhanceEndpoints({ addTagTypes: ['FeatureVersion'] })
.injectEndpoints({
Expand Down
5 changes: 4 additions & 1 deletion frontend/web/components/pages/ProjectSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ const ProjectSettingsPage = class extends Component {
).then((res) => {
const matchingItems = roles.data.results.filter((item1) =>
res.data.results.some((item2) => item2.role === item1.id),
)
)
this.setState({ roles: matchingItems })
})
})
}

onSave = () => {
Expand Down
11 changes: 10 additions & 1 deletion frontend/web/components/pages/ScheduledChangesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import PlanBasedBanner, {
import PanelSearch from 'components/PanelSearch'
import JSONReference from 'components/JSONReference'
import Icon from 'components/Icon'
import { IonIcon } from '@ionic/react';
import { calendar } from 'ionicons/icons';

type ScheduledChangesPageType = {
router: RouterChildContext['router']
Expand Down Expand Up @@ -96,6 +98,7 @@ const ScheduledChangesPage: FC<ScheduledChangesPageType> = ({ match }) => {
created_at,
id,
title,
live_from,
user: _user,
}: ChangeRequestSummary) => {
const user = users?.find((v) => v.id === _user)
Expand All @@ -105,7 +108,13 @@ const ScheduledChangesPage: FC<ScheduledChangesPageType> = ({ match }) => {
className='flex-row list-item clickable'
>
<Flex className='table-column px-3'>
<div className='font-weight-medium'>{title}</div>
<div className='font-weight-medium'>
<div className="d-flex gap-2">
{title}
<IonIcon name={calendar}/>
{moment(live_from).format("Do MMM HH:mm")}
</div>
</div>
<div className='list-item-subtitle mt-1'>
Created{' '}
{moment(created_at).format('Do MMM YYYY HH:mma')} by{' '}
Expand Down

0 comments on commit 7b26c74

Please sign in to comment.