-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(zimbra): add account express order cta & page
note that the handling of form field validation is also modified to make it more convenient to test validity of field ref: MANAGER-13960 Signed-off-by: Tristan WAGNER <[email protected]>
- Loading branch information
1 parent
d01dac2
commit 1e25410
Showing
30 changed files
with
1,567 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/manager/apps/zimbra/public/translations/accounts/order/Messages_fr_FR.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"zimbra_account_order": "Commander un compte", | ||
"zimbra_account_order_cta_back": "Retour vers mes comptes email", | ||
"zimbra_account_order_title": "Commander vos comptes Zimbra", | ||
"zimbra_account_order_subtitle": "Choisissez vos comptes Zimbra", | ||
"zimbra_account_order_subtitle_commitment": "Durée de l'engagement", | ||
"zimbra_account_order_legal_checkbox": "J’accepte qu’OVH mette en place le service immédiatement après validation de ma commande, et je renonce donc expressément à mon droit d’annulation au titre des dispositions de l’article L.121-21-8 du code de la consommation.", | ||
"zimbra_account_order_no_product_error_message": "Il y a eu un problème lors du chargement du produit lié à votre commande, veuillez nous excuser et réessayer ultérieurement.", | ||
"zimbra_account_order_commitment_month": "mois", | ||
"zimbra_account_order_commitment_months": "mois", | ||
"zimbra_account_order_commitment_available_soon": "Disponible prochainement", | ||
"zimbra_account_order_cta_confirm": "Payer", | ||
"zimbra_account_order_cta_done": "Retour", | ||
"zimbra_account_order_initiated_title": "Commande de vos comptes Zimbra initiée !", | ||
"zimbra_account_order_initiated_subtitle": "Si vous n'avez pas pu finaliser votre commande, merci de la compléter en cliquant sur le lien suivant :", | ||
"zimbra_account_order_initiated_info": "Nous vous informerons de la disponibilité de vos comptes par e-mail." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import { | ||
CurrencyCode, | ||
IntervalUnitType, | ||
OvhSubsidiary, | ||
} from '@ovh-ux/manager-react-components'; | ||
import { order } from '@/api/order'; | ||
|
||
export const orderCatalogMock: order.publicOrder.Catalog = { | ||
catalogId: 2464, | ||
locale: { | ||
currencyCode: CurrencyCode.EUR, | ||
subsidiary: OvhSubsidiary.FR, | ||
taxRate: 20, | ||
}, | ||
plans: [ | ||
{ | ||
planCode: 'zimbra-account-pp-starter', | ||
invoiceName: 'Zimbra account', | ||
addonFamilies: [], | ||
product: 'zimbra-account', | ||
pricingType: order.cart.GenericProductPricingTypeEnum.RENTAL, | ||
consumptionConfiguration: null, | ||
pricings: [ | ||
{ | ||
phase: 0, | ||
capacities: [ | ||
order.cart.GenericProductPricingCapacitiesEnum.INSTALLATION, | ||
order.cart.GenericProductPricingCapacitiesEnum.RENEW, | ||
], | ||
commitment: 0, | ||
description: 'monthly pricing', | ||
interval: 1, | ||
intervalUnit: IntervalUnitType.month, | ||
quantity: { | ||
min: 1, | ||
max: null, | ||
}, | ||
repeat: { | ||
min: 1, | ||
max: null, | ||
}, | ||
price: 0, | ||
tax: 0, | ||
mode: 'default', | ||
strategy: order.cart.GenericProductPricingStrategyEnum.VOLUME, | ||
mustBeCompleted: false, | ||
type: order.cart.GenericProductPricingTypeEnum.RENTAL, | ||
promotions: [], | ||
engagementConfiguration: null, | ||
}, | ||
], | ||
configurations: [], | ||
family: null, | ||
blobs: { | ||
commercial: { | ||
name: 'Zimbra Starter', | ||
price: { | ||
precision: 2, | ||
interval: 'P1M', | ||
unit: 'M/account', | ||
}, | ||
}, | ||
meta: { | ||
configurations: [ | ||
{ | ||
name: 'domain_choices', | ||
values: [ | ||
{ | ||
value: 'new_or_transfer', | ||
}, | ||
{ | ||
value: 'use_mine', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
], | ||
products: [ | ||
{ | ||
name: 'zimbra-account', | ||
description: 'A zimbra account', | ||
blobs: null, | ||
configurations: [], | ||
}, | ||
], | ||
addons: [], | ||
planFamilies: [], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { v6 } from '@ovh-ux/manager-core-api'; | ||
import { OvhSubsidiary } from '@ovh-ux/manager-react-components'; | ||
import { order } from './type'; | ||
|
||
// GET | ||
|
||
export const getOrderCatalog = async ({ | ||
ovhSubsidiary, | ||
productName, | ||
}: { | ||
ovhSubsidiary: OvhSubsidiary; | ||
productName: string; | ||
}) => { | ||
const { data } = await v6.get<order.publicOrder.Catalog>( | ||
`/order/catalog/public/${productName}?ovhSubsidiary=${ovhSubsidiary}`, | ||
); | ||
return data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from './api'; | ||
export * from './key'; | ||
export * from './type'; | ||
export * from './utils'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { OvhSubsidiary } from '@ovh-ux/manager-react-components'; | ||
|
||
export const getOrderCatalogQueryKey = ({ | ||
ovhSubsidiary, | ||
productName, | ||
}: { | ||
ovhSubsidiary: OvhSubsidiary; | ||
productName: string; | ||
}) => [`get/order/catalog/${productName}/${ovhSubsidiary}`]; |
Oops, something went wrong.