Skip to content

Commit

Permalink
feat(ips): order ipv4 vrack
Browse files Browse the repository at this point in the history
ref: MANAGER-15838

Signed-off-by: Nicolas Pierre-charles <[email protected]>
  • Loading branch information
Nicolas Pierre-charles committed Jan 16, 2025
1 parent aef4bf2 commit 43b9d48
Show file tree
Hide file tree
Showing 306 changed files with 19,459 additions and 35 deletions.
1 change: 0 additions & 1 deletion packages/manager-react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"@ovhcloud/ods-themes": "^18.3.0",
"@ovh-ux/manager-core-api": "^0.9.0",
"@ovh-ux/manager-react-shell-client": "^0.8.1",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
"@ovh-ux/manager-vite-config": "^0.8.1",
"@storybook/addon-docs": "^7.5.3",
"@storybook/addon-essentials": "7.5.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export function Price({
ovhSubsidiary,
locale,
isConvertIntervalUnit,
isStartingPrice,
suffix = '',
}: Readonly<PriceProps>) {
const { t } = useTranslation('price');
const isAsiaFormat = ['ASIA', 'AU', 'IN', 'SG'].includes(ovhSubsidiary);
Expand Down Expand Up @@ -81,6 +83,11 @@ export function Price({
<span className="ml-1 text-[--ods-color-text] text-[16px] leading-[20px] font-semibold">
{intervalUnitText}
</span>
{suffix && (
<span className="ml-1 text-[--ods-color-text] text-[16px] leading-[20px] font-semibold">
{suffix}
</span>
)}
<TextPriceContent>
<span className="text-[--ods-color-neutral-500] text-[14px] leading-[18px] font-semibold">
({priceWithTax}
Expand All @@ -105,6 +112,11 @@ export function Price({
<span className="ml-1 text-[--ods-color-text] text-[16px] leading-[20px] font-semibold">
{intervalUnitText}
</span>
{suffix && (
<span className="ml-1 text-[--ods-color-text] text-[16px] leading-[20px] font-semibold">
{suffix}
</span>
)}
</>
),
},
Expand All @@ -118,6 +130,11 @@ export function Price({
<span className="ml-1 text-[--ods-color-text] text-[16px] leading-[20px] font-semibold">
{intervalUnitText}
</span>
{suffix && (
<span className="ml-1 text-[--ods-color-text] text-[16px] leading-[20px] font-semibold">
{suffix}
</span>
)}
</>
),
},
Expand All @@ -134,6 +151,11 @@ export function Price({
<span className="ml-1 text-[--ods-color-text] text-[16px] leading-[20px] font-semibold">
{intervalUnitText}
</span>
{suffix && (
<span className="ml-1 text-[--ods-color-text] text-[16px] leading-[20px] font-semibold">
{suffix}
</span>
)}
</>
),
},
Expand All @@ -150,6 +172,11 @@ export function Price({
<span className="ml-1 text-[--ods-color-text] text-[16px] leading-[20px] font-semibold">
{intervalUnitText}
</span>
{suffix && (
<span className="ml-1 text-[--ods-color-text] text-[16px] leading-[20px] font-semibold">
{suffix}
</span>
)}
<TextPriceContent>
<span className="text-[--ods-color-neutral-500] text-[14px] leading-[18px] font-semibold">
({priceWithTax}
Expand All @@ -171,6 +198,11 @@ export function Price({
<span className="ml-1 text-[--ods-color-text] text-[16px] leading-[20px] font-semibold">
{intervalUnitText}
</span>
{suffix && (
<span className="ml-1 text-[--ods-color-text] text-[16px] leading-[20px] font-semibold">
{suffix}
</span>
)}
</>
),
},
Expand All @@ -181,7 +213,12 @@ export function Price({
return <></>;
}

return <OdsText>{matchingComponent.component}</OdsText>;
return (
<OdsText>
{isStartingPrice && value > 0 ? t('price_from_label') : ''}
{matchingComponent.component}
</OdsText>
);
}

export default Price;
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export interface PriceProps {
ovhSubsidiary: OvhSubsidiary;
isConvertIntervalUnit?: boolean;
locale: string;
suffix?: string;
isStartingPrice?: boolean;
}

export const getPrice = (value: number, tax?: number): number => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"price_ht_label": "HT",
"price_ttc_label": "TTC",
"price_from_label": "à partir de ",
"price_free": "Inclus",
"price_gst_excl_label": "ex. GST",
"price_gst_incl_label": "incl. GST",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ export const Links: React.FC<LinksProps> = ({
iconAlignment: ODS_LINK_ICON_ALIGNMENT[iconAlignment],
})}
{...props}
{...(type === LinkType.back && { icon: ODS_ICON_NAME.arrowLeft })}
{...(type === LinkType.back && {
icon: ODS_ICON_NAME.arrowLeft,
iconAlignment: IconLinkAlignmentType.left,
})}
{...(type === LinkType.next && { icon: ODS_ICON_NAME.arrowRight })}
{...(type === LinkType.external && { icon: ODS_ICON_NAME.externalLink })}
label={label}
Expand Down
5 changes: 2 additions & 3 deletions packages/manager/apps/ips/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
"@ovh-ux/manager-react-core-application": "*",
"@ovh-ux/manager-react-shell-client": "^0.8.1",
"@ovh-ux/request-tagger": "^0.4.0",
"@ovhcloud/ods-components": "18.4.0",
"@ovhcloud/ods-themes": "^18.4.0",
"flag-icons": "^7.2.3",
"@ovhcloud/ods-components": "18.4.1",
"@ovhcloud/ods-themes": "^18.4.1",
"i18next": "^23.8.2",
"i18next-http-backend": "^2.4.2",
"react": "^18.2.0",
Expand Down
Loading

0 comments on commit 43b9d48

Please sign in to comment.