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 20, 2025
1 parent 7315459 commit f36c7f9
Show file tree
Hide file tree
Showing 311 changed files with 19,635 additions and 259 deletions.
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
11 changes: 6 additions & 5 deletions packages/manager/apps/ips/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@
"@ovh-ux/manager-config": "*",
"@ovh-ux/manager-core-api": "*",
"@ovh-ux/manager-core-utils": "*",
"@ovh-ux/manager-react-components": "^2.2.0",
"@ovh-ux/manager-react-components": "^2.6.2",
"@ovh-ux/manager-react-core-application": "*",
"@ovh-ux/manager-react-shell-client": "^0.8.1",
"@ovh-ux/manager-react-shell-client": "^0.8.5",
"@ovh-ux/manager-module-order": "0.9.3",
"@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",
"jsurl": "0.1.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^14.0.5",
Expand Down
Loading

0 comments on commit f36c7f9

Please sign in to comment.