Skip to content

Commit

Permalink
Merge branch 'eclipse-xpanse:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
WangLiNaruto authored Jun 3, 2024
2 parents b1f467b + 9f544a8 commit 0cc56da
Show file tree
Hide file tree
Showing 13 changed files with 604 additions and 446 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xpanse-ui",
"version": "1.0.12",
"version": "1.0.13",
"private": true,
"type": "module",
"dependencies": {
Expand Down Expand Up @@ -105,7 +105,7 @@
"@testing-library/jest-dom": "^6.4.5",
"@testing-library/react": "^15.0.7",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.13",
"@types/node": "^20.13.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^9.0.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ function ServiceProvider({
key={activeServiceDetail.id}
id={activeServiceDetail.id}
setIsViewDisabled={setIsViewDisabled}
serviceRegistrationState={activeServiceDetail.serviceRegistrationState}
/>
</div>
<h3 className={catalogStyles.catalogDetailsH3}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export function useUnregisterRequest(id: string) {
mutationFn: () => {
return ServiceVendorService.unregister(id);
},
// necessary to clear the mutationCache immediately.
// Otherwise, the mutation state is cached and with retries, it is not possible to get state of the
// latest request using useMutationState method.
gcTime: 0,
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ import { CloseCircleOutlined } from '@ant-design/icons';
import { Button, Popconfirm } from 'antd';
import React from 'react';
import catalogStyles from '../../../../../styles/catalog.module.css';
import { ServiceTemplateDetailVo } from '../../../../../xpanse-api/generated';
import { useUnregisterRequest } from './UnregisterMutation';

function UnregisterService({
id,
setIsViewDisabled,
serviceRegistrationState,
}: {
id: string;
setIsViewDisabled: (isViewDisabled: boolean) => void;
serviceRegistrationState: ServiceTemplateDetailVo.serviceRegistrationState;
}): React.JSX.Element {
const unregisterRequest = useUnregisterRequest(id);

Expand All @@ -38,7 +41,10 @@ function UnregisterService({
icon={<CloseCircleOutlined />}
type='primary'
className={catalogStyles.catalogManageBtnClass}
disabled={unregisterRequest.isSuccess}
disabled={
unregisterRequest.isSuccess ||
serviceRegistrationState === ServiceTemplateDetailVo.serviceRegistrationState.UNREGISTERED
}
>
Unregister
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/content/order/common/FlavorPrice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const FlavorPrice = (): React.JSX.Element => {
<>
<Tag color={'blue'} className={serviceModifyStyles.flavorPriceContent}>
{/* TODO Will be fixed after #1597 is fixed */}
{(20).toString().concat(' ').concat('EUR/').concat('hourly')}
{(20).toString().concat(' ').concat('EUR/').concat('hour')}
</Tag>
</>
);
Expand Down
Loading

0 comments on commit 0cc56da

Please sign in to comment.