-
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(web-office): add modal order licenses
ref:MANAGER-16712 Signed-off-by: stif59100 <steeve.vanderstocken@ovhcloud.com>
- Loading branch information
Showing
29 changed files
with
1,254 additions
and
43 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
10 changes: 0 additions & 10 deletions
10
packages/manager/apps/web-office/public/translations/dashboard/Messages_fr_FR.json
This file was deleted.
Oops, something went wrong.
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
6 changes: 6 additions & 0 deletions
6
...er/apps/web-office/public/translations/dashboard/users/order-licenses/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,6 @@ | ||
{ | ||
"dashboard_users_order_licences_quantity": "Nombre", | ||
"dashboard_users_order_licences_type": "Type de licence", | ||
"dashboard_users_order_licences_message_1": "En validant vous serez redirigé vers le bon de commande.", | ||
"dashboard_users_order_licences_message_2": "Revenez ici une fois le paiement effectué pour configurer vos nouveaux utilisateurs" | ||
} |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './license'; | ||
export * from './user'; | ||
export * from './order'; |
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,99 @@ | ||
import { | ||
CurrencyCode, | ||
IntervalUnitType, | ||
OvhSubsidiary, | ||
} from '@ovh-ux/manager-react-components'; | ||
import { order } from '@/api/order'; | ||
|
||
export const orderCatalogMock: order.publicOrder.Catalog = { | ||
catalogId: 6185, | ||
locale: { | ||
currencyCode: CurrencyCode.EUR, | ||
subsidiary: OvhSubsidiary.FR, | ||
taxRate: 20, | ||
}, | ||
plans: [ | ||
{ | ||
planCode: 'microsoft-365-apps-for-enterprise-pp-nce', | ||
invoiceName: 'Microsoft 365 Apps for Enterprise', | ||
addonFamilies: [], | ||
product: 'officePrepaid', | ||
pricingType: order.cart.GenericProductPricingTypeEnum.RENTAL, | ||
consumptionConfiguration: null, | ||
pricings: [ | ||
{ | ||
phase: 0, | ||
capacities: [ | ||
order.cart.GenericProductPricingCapacitiesEnum.INSTALLATION, | ||
order.cart.GenericProductPricingCapacitiesEnum.RENEW, | ||
], | ||
commitment: 0, | ||
description: 'Microsoft 365 Apps for Enterprise', | ||
interval: 1, | ||
intervalUnit: IntervalUnitType.month, | ||
quantity: { | ||
min: 1, | ||
max: null, | ||
}, | ||
repeat: { | ||
min: 1, | ||
max: null, | ||
}, | ||
price: 1705000000, | ||
tax: 341000000, | ||
mode: 'default', | ||
strategy: order.cart.GenericProductPricingStrategyEnum.TIERED, | ||
mustBeCompleted: false, | ||
type: order.cart.GenericProductPricingTypeEnum.RENTAL, | ||
promotions: [], | ||
engagementConfiguration: null, | ||
}, | ||
], | ||
configurations: [], | ||
family: null, | ||
blobs: { | ||
commercial: { | ||
name: 'Microsoft 365', | ||
price: { | ||
precision: 2, | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
products: [ | ||
{ | ||
name: 'microsoft-365-apps-for-enterprise-pp-nce', | ||
description: 'Microsoft 365 Apps for enterprise prepaid under NCE', | ||
blobs: null, | ||
configurations: [ | ||
{ | ||
name: 'zip_code', | ||
isCustom: true, | ||
isMandatory: false, | ||
values: null, | ||
}, | ||
{ | ||
name: 'country', | ||
isCustom: true, | ||
isMandatory: false, | ||
values: null, | ||
}, | ||
{ | ||
name: 'vat_number', | ||
isCustom: true, | ||
isMandatory: false, | ||
values: null, | ||
}, | ||
{ | ||
name: 'existing_tenant_service_name', | ||
isCustom: true, | ||
isMandatory: false, | ||
values: null, | ||
}, | ||
], | ||
}, | ||
], | ||
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,6 @@ | ||
import { OvhSubsidiary } from '@ovh-ux/manager-react-components'; | ||
|
||
export const getOrderCatalogQueryKey = ( | ||
ovhSubsidiary: OvhSubsidiary, | ||
productName: string, | ||
) => ['get', 'order', 'catalog', productName, ovhSubsidiary]; |
Oops, something went wrong.