Skip to content

Commit 3178519

Browse files
authored
fix(App/Service): translate agreement and consent form (#1557)
#1558
1 parent b7bac9f commit 3178519

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/features/appManagement/apiSlice.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,13 @@ export const apiSlice = createApi({
272272
invalidatesTags: [Tags.APP],
273273
}),
274274
fetchAppStatus: builder.query<AppStatusDataState, string>({
275-
query: (appId) => `api/apps/appreleaseprocess/${appId}/appStatus`,
275+
query: (appId) =>
276+
`api/apps/appreleaseprocess/${appId}/appStatus?languageShortName=${i18next.language}`,
276277
providesTags: [Tags.APP],
277278
}),
278279
fetchAgreementData: builder.query<AgreementType[], void>({
279-
query: () => 'api/apps/AppReleaseProcess/agreementData',
280+
query: () =>
281+
`api/apps/appreleaseprocess/agreementData?languageShortName=${i18next.language}`,
280282
}),
281283
fetchConsentData: builder.query<ConsentType, string>({
282284
query: (appId: string) => `/api/apps/AppReleaseProcess/consent/${appId}`,

src/features/serviceManagement/apiSlice.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import type { DocumentTypeId } from 'features/appManagement/apiSlice'
2323
import { apiBaseQuery } from 'utils/rtkUtil'
2424
import type { ServiceStatusDataState } from './types'
2525
import type { PaginFetchArgs } from '@catena-x/portal-shared-components'
26+
import i18next from 'i18next'
2627

2728
export enum ReleaseProcessTypes {
2829
APP_RELEASE = 'appRelease',
@@ -192,7 +193,8 @@ export const apiSlice = createApi({
192193
tagTypes: [Tags.REFETCH_SERVICE],
193194
endpoints: (builder) => ({
194195
fetchServiceStatus: builder.query<ServiceStatusDataState, string>({
195-
query: (id) => `/api/services/servicerelease/${id}/serviceStatus`,
196+
query: (id) =>
197+
`/api/services/servicerelease/${id}/serviceStatus?languageShortName=${i18next.language}`,
196198
}),
197199
createService: builder.mutation<void, createServiceType>({
198200
query: (data) => ({
@@ -222,7 +224,8 @@ export const apiSlice = createApi({
222224
}),
223225
}),
224226
fetchServiceAgreementData: builder.query<AgreementType[], void>({
225-
query: () => 'api/services/servicerelease/agreementData',
227+
query: () =>
228+
`api/services/servicerelease/agreementData?languageShortName=${i18next.language}`,
226229
}),
227230
fetchServiceConsentData: builder.query<ConsentType, string>({
228231
query: (id: string) => `/api/services/servicerelease/consent/${id}`,

0 commit comments

Comments
 (0)