mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
uniquitous language cleanup (#2564)
This commit is contained in:
parent
0d58371f11
commit
6ae2c9a165
@ -147,15 +147,11 @@ export const ChangeRequest: VFC<IChangeRequestProps> = ({
|
||||
onRefetch,
|
||||
onNavigate,
|
||||
}) => {
|
||||
const { discardChangeRequestEvent } = useChangeRequestApi();
|
||||
const { discardChange } = useChangeRequestApi();
|
||||
const { setToastData, setToastApiError } = useToast();
|
||||
const onDiscard = (id: number) => async () => {
|
||||
try {
|
||||
await discardChangeRequestEvent(
|
||||
changeRequest.project,
|
||||
changeRequest.id,
|
||||
id
|
||||
);
|
||||
await discardChange(changeRequest.project, changeRequest.id, id);
|
||||
setToastData({
|
||||
title: 'Change discarded from change request draft.',
|
||||
type: 'success',
|
||||
|
@ -25,7 +25,7 @@ export interface IChangeRequestEnvironmentConfig {
|
||||
export interface IChangeRequestFeature {
|
||||
name: string;
|
||||
conflict?: string;
|
||||
changes: IChangeRequestEvent[];
|
||||
changes: IChange[];
|
||||
}
|
||||
|
||||
export interface IChangeRequestApproval {
|
||||
@ -82,7 +82,7 @@ export interface IChangeRequestEnabled extends IChangeRequestBase {
|
||||
payload: ChangeRequestEnabled;
|
||||
}
|
||||
|
||||
export type IChangeRequestEvent =
|
||||
export type IChange =
|
||||
| IChangeRequestAddStrategy
|
||||
| IChangeRequestDeleteStrategy
|
||||
| IChangeRequestUpdateStrategy
|
||||
|
@ -7,7 +7,7 @@ import { IFeatureStrategy } from 'interfaces/strategy';
|
||||
import { StrategyItem } from './StrategyItem/StrategyItem';
|
||||
import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
|
||||
import { Badge } from 'component/common/Badge/Badge';
|
||||
import { IChangeRequestEvent } from 'component/changeRequest/changeRequest.types';
|
||||
import { IChange } from 'component/changeRequest/changeRequest.types';
|
||||
import { useStrategyChangeFromRequest } from './StrategyItem/useStrategyChangeFromRequest';
|
||||
|
||||
interface IStrategyDraggableItemProps {
|
||||
@ -74,7 +74,7 @@ export const StrategyDraggableItem = ({
|
||||
const ChangeRequestStatusBadge = ({
|
||||
change,
|
||||
}: {
|
||||
change: IChangeRequestEvent | undefined;
|
||||
change: IChange | undefined;
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm'));
|
||||
|
@ -58,7 +58,7 @@ export const useChangeRequestApi = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const discardChangeRequestEvent = async (
|
||||
const discardChange = async (
|
||||
project: string,
|
||||
changeRequestId: number,
|
||||
changeRequestEventId: number
|
||||
@ -111,10 +111,10 @@ export const useChangeRequestApi = () => {
|
||||
|
||||
const addComment = async (
|
||||
projectId: string,
|
||||
changeSetId: string,
|
||||
changeRequestId: string,
|
||||
text: string
|
||||
) => {
|
||||
const path = `/api/admin/projects/${projectId}/change-requests/${changeSetId}/comments`;
|
||||
const path = `/api/admin/projects/${projectId}/change-requests/${changeRequestId}/comments`;
|
||||
const req = createRequest(path, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ text }),
|
||||
@ -130,7 +130,7 @@ export const useChangeRequestApi = () => {
|
||||
return {
|
||||
addChangeRequest,
|
||||
changeState,
|
||||
discardChangeRequestEvent,
|
||||
discardChange,
|
||||
updateChangeRequestEnvironmentConfig,
|
||||
discardDraft,
|
||||
addComment,
|
||||
|
Loading…
Reference in New Issue
Block a user