Merged in fix/webview-mystay-rewrites (pull request #2329)
fix(webviews) - rewrites for my-stay webviews * fix(webviews) - rewrites for my-stay webviews Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -52,13 +52,22 @@ const refreshUrl = {
|
|||||||
sv: `/sv/webview/refresh`,
|
sv: `/sv/webview/refresh`,
|
||||||
}
|
}
|
||||||
|
|
||||||
const myStay = {
|
export const myStay = {
|
||||||
da: `/da/webview/hotelreservation/my-stay`,
|
da: "/da/webview/hotelreservation/min-ophold",
|
||||||
de: `/de/webview/hotelreservation/my-stay`,
|
de: "/de/webview/hotelreservation/meine-aufenthalte",
|
||||||
en: `/en/webview/hotelreservation/my-stay`,
|
en: "/en/webview/hotelreservation/my-stay",
|
||||||
fi: `/fi/webview/hotelreservation/my-stay`,
|
fi: "/fi/webview/hotelreservation/min-vistelma",
|
||||||
no: `/no/webview/hotelreservation/my-stay`,
|
no: "/no/webview/hotelreservation/min-ophold",
|
||||||
sv: `/sv/webview/hotelreservation/my-stay`,
|
sv: "/sv/webview/hotelreservation/min-vistelse",
|
||||||
|
}
|
||||||
|
|
||||||
|
export const preliminaryReceipt = {
|
||||||
|
da: `${myStay.da}/receipt`,
|
||||||
|
de: `${myStay.de}/receipt`,
|
||||||
|
en: `${myStay.en}/receipt`,
|
||||||
|
fi: `${myStay.fi}/receipt`,
|
||||||
|
no: `${myStay.no}/receipt`,
|
||||||
|
sv: `${myStay.sv}/receipt`,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const webviews = [
|
export const webviews = [
|
||||||
@@ -78,6 +87,9 @@ export const myPagesWebviews = [
|
|||||||
|
|
||||||
export const loyaltyPagesWebviews = [...Object.values(programOverview)]
|
export const loyaltyPagesWebviews = [...Object.values(programOverview)]
|
||||||
|
|
||||||
export const myStayWebviews = [...Object.values(myStay)]
|
export const myStayWebviews = [
|
||||||
|
...Object.values(myStay),
|
||||||
|
...Object.values(preliminaryReceipt),
|
||||||
|
]
|
||||||
|
|
||||||
export const refreshWebviews = [...Object.values(refreshUrl)]
|
export const refreshWebviews = [...Object.values(refreshUrl)]
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import { findMyBooking } from "./constants/routes/findMyBooking.js"
|
|||||||
import { login, logout } from "./constants/routes/handleAuth.js"
|
import { login, logout } from "./constants/routes/handleAuth.js"
|
||||||
import { myPages } from "./constants/routes/myPages.js"
|
import { myPages } from "./constants/routes/myPages.js"
|
||||||
import { myStay, preliminaryReceipt } from "./constants/routes/myStay.js"
|
import { myStay, preliminaryReceipt } from "./constants/routes/myStay.js"
|
||||||
|
import {
|
||||||
|
myStay as myStayWebview,
|
||||||
|
preliminaryReceipt as preliminaryReceiptWebview,
|
||||||
|
} from "./constants/routes/webviews"
|
||||||
|
|
||||||
const jiti = createJiti(fileURLToPath(import.meta.url))
|
const jiti = createJiti(fileURLToPath(import.meta.url))
|
||||||
jiti("./env/server")
|
jiti("./env/server")
|
||||||
@@ -75,7 +79,7 @@ const nextConfig = {
|
|||||||
|
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
|
|
||||||
webpack: function (config) {
|
webpack: function (config: any) {
|
||||||
config.module.rules.push(
|
config.module.rules.push(
|
||||||
{
|
{
|
||||||
test: /\.(graphql|gql)/,
|
test: /\.(graphql|gql)/,
|
||||||
@@ -369,6 +373,57 @@ const nextConfig = {
|
|||||||
source: `${preliminaryReceipt.no}`,
|
source: `${preliminaryReceipt.no}`,
|
||||||
destination: "/no/hotelreservation/my-stay/receipt",
|
destination: "/no/hotelreservation/my-stay/receipt",
|
||||||
},
|
},
|
||||||
|
// Webview My stay
|
||||||
|
{
|
||||||
|
source: `${myStayWebview.en}`,
|
||||||
|
destination: "/en/webview/hotelreservation/my-stay",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: `${myStayWebview.sv}`,
|
||||||
|
destination: "/sv/webview/hotelreservation/my-stay",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: `${myStayWebview.da}`,
|
||||||
|
destination: "/da/webview/hotelreservation/my-stay",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: `${myStayWebview.de}`,
|
||||||
|
destination: "/de/webview/hotelreservation/my-stay",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: `${myStayWebview.fi}`,
|
||||||
|
destination: "/fi/webview/hotelreservation/my-stay",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: `${myStayWebview.no}`,
|
||||||
|
destination: "/no/webview/hotelreservation/my-stay",
|
||||||
|
},
|
||||||
|
// Webview My stay receipt
|
||||||
|
{
|
||||||
|
source: `${preliminaryReceiptWebview.en}`,
|
||||||
|
destination: "/en/webview/hotelreservation/my-stay/receipt",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: `${preliminaryReceiptWebview.sv}`,
|
||||||
|
destination: "/sv/webview/hotelreservation/my-stay/receipt",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: `${preliminaryReceiptWebview.da}`,
|
||||||
|
destination: "/da/webview/hotelreservation/my-stay/receipt",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: `${preliminaryReceiptWebview.de}`,
|
||||||
|
destination: "/de/webview/hotelreservation/my-stay/receipt",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: `${preliminaryReceiptWebview.fi}`,
|
||||||
|
destination: "/fi/webview/hotelreservation/my-stay/receipt",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: `${preliminaryReceiptWebview.no}`,
|
||||||
|
destination: "/no/webview/hotelreservation/my-stay/receipt",
|
||||||
|
},
|
||||||
|
// Sitemap
|
||||||
{
|
{
|
||||||
source: `/sitemap-:id(\\d{1,}).xml`,
|
source: `/sitemap-:id(\\d{1,}).xml`,
|
||||||
destination: `/sitemap/:id`,
|
destination: `/sitemap/:id`,
|
||||||
@@ -385,7 +440,7 @@ const nextConfig = {
|
|||||||
export default Sentry.withSentryConfig(nextConfig, {
|
export default Sentry.withSentryConfig(nextConfig, {
|
||||||
org: "scandic-hotels",
|
org: "scandic-hotels",
|
||||||
project: "scandic-web",
|
project: "scandic-web",
|
||||||
enabled: process.env.NODE_ENV !== "development",
|
|
||||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||||
|
|
||||||
// Only print logs for uploading source maps in CI
|
// Only print logs for uploading source maps in CI
|
||||||
Reference in New Issue
Block a user