Skip to content

Commit

Permalink
sync: master to develop
Browse files Browse the repository at this point in the history
sync: master to develop
  • Loading branch information
ovh-ux-cds authored Nov 4, 2024
2 parents 0aa8181 + 11c884e commit 4778ebe
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,16 @@ export default class PciProjectInstanceService {
catalogEndpoint,
).then((catalog) =>
instance.isLocalZone
? catalog[`snapshot.consumption.${instance.region}`] ??
catalog['snapshot.consumption.LZ']
? this.getProductAvailability(projectId).then(
({ plans }) =>
catalog[
plans.find(
({ code, regions }) =>
code.startsWith('snapshot.consumption') &&
regions.find(({ name }) => name === instance.region),
)?.code
] ?? catalog['snapshot.consumption.LZ'],
)
: get(
catalog,
`snapshot.monthly.postpaid.${instance.region}`,
Expand Down Expand Up @@ -546,7 +554,10 @@ export default class PciProjectInstanceService {
});
}

getProductAvailability(projectId, ovhSubsidiary) {
getProductAvailability(
projectId,
ovhSubsidiary = this.coreConfig.getUser().ovhSubsidiary,
) {
return this.$http
.get(`/cloud/project/${projectId}/capabilities/productAvailability`, {
params: {
Expand Down

0 comments on commit 4778ebe

Please sign in to comment.