Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 29 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
config/
node_modules/
exposedfiles/
!/exposedfiles/**/.gitkeep
/application/backend/static/stylesheets
/application/backend/static/upload
/application/backend/static/vue/
*.log
workspace.xml
jazzclubmongo.dump/jazzclub
mongodump_jc.sh
dump.zip
mongorestore_jc.sh
jazzclubmongo*
*.gz
/application/backend/sass/out/jc-backoffice.css
/application/backend/**/*.js
/application/shared/**/*.js
/application/batchjobs/**/*.js
*.log
*.map
.idea/dataSources
.idea/dataSources.*
.tscache/
/frontendtests/output/
/mongocollections
mongoimport_jc.sh
/application/backend/static/rider/
/pdfs/*
/*.tgz
/application/backend/**/*.js
/application/backend/sass/out/jc-backoffice.css
/application/backend/static/assets/
/application/backend/static/img/
/application/backend/static/rider/
/application/backend/static/stylesheets
/application/backend/static/upload
/application/backend/static/index.html
/application/backend/static/manifest.webmanifest
/application/backend/static/sw.js
/application/backend/static/workbox-*
/application/batchjobs/**/*.js
/application/shared/**/*.js
/application/test-globals.js
/application/vitest.config.js
/frontendtests/output/
/mongocollections
/pdfs and more/*
/pdfs/*
config/
dump.zip
exposedfiles/
jazzclubmongo*
jazzclubmongo.dump/jazzclub
mongodump_jc.sh
mongoimport_jc.sh
mongorestore_jc.sh
node_modules/
vite.config.d.ts
vite.config.js
.idea/dataSources
.idea/dataSources.*
workspace.xml
2 changes: 1 addition & 1 deletion application/backend/batches/sendMailsKasseFehlt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function toFullQualifiedUrl(prefix: string, localUrl: string): string {
return string.replace(/(^\/)|(\/$)/g, "");
}

return conf.publicUrlPrefix + "/vue/" + trimLeadingAndTrailingSlash(prefix) + "/" + trimLeadingAndTrailingSlash(localUrl);
return conf.publicUrlPrefix + "/" + trimLeadingAndTrailingSlash(prefix) + "/" + trimLeadingAndTrailingSlash(localUrl);
}

function kasseFehlt(konzert: Konzert): boolean {
Expand Down
2 changes: 1 addition & 1 deletion application/backend/batches/sendMailsMasterFehlt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function toFullQualifiedUrl(prefix: string, localUrl: string): string {
return string.replace(/(^\/)|(\/$)/g, "");
}

return conf.publicUrlPrefix + "/vue/" + trimLeadingAndTrailingSlash(prefix) + "/" + trimLeadingAndTrailingSlash(localUrl);
return conf.publicUrlPrefix + "/" + trimLeadingAndTrailingSlash(prefix) + "/" + trimLeadingAndTrailingSlash(localUrl);
}

function masterFehlt(konzert: Konzert): boolean {
Expand Down
2 changes: 1 addition & 1 deletion application/backend/batches/sendMailsPressetextFehlt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function sendMail(kaputte: Veranstaltung[]) {
const prefix = conf.publicUrlPrefix;
function presseTemplateInternal(ver: Veranstaltung): string {
// für interne Mails
return `### [${ver.kopf.titelMitPrefix}](${prefix}/vue${ver.fullyQualifiedUrl}?page=presse)
return `### [${ver.kopf.titelMitPrefix}](${prefix}${ver.fullyQualifiedUrl}?page=presse)
#### ${ver.startDatumUhrzeit.fuerPresse} ${ver.kopf.presseInEcht}

`;
Expand Down
4 changes: 2 additions & 2 deletions application/backend/batches/sendMailsStaffReminder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function toFullQualifiedUrl(prefix: string, localUrl: string): string {
return string.replace(/(^\/)|(\/$)/g, "");
}

return conf.publicUrlPrefix + "/vue/" + trimLeadingAndTrailingSlash(prefix) + "/" + trimLeadingAndTrailingSlash(localUrl);
return conf.publicUrlPrefix + "/" + trimLeadingAndTrailingSlash(prefix) + "/" + trimLeadingAndTrailingSlash(localUrl);
}

async function sendMail(verMitUser: VerMitUser) {
Expand All @@ -26,7 +26,7 @@ async function sendMail(verMitUser: VerMitUser) {

const markdownToSend = `## Hallo ${user.name}! Bei folgender Veranstaltung bist Du im Staff eingetragen!:

[${veranstaltung.kopf.titelMitPrefix} am ${veranstaltung.datumForDisplayShort} ${veranstaltung.kopf.presseInEcht}](${prefix}/vue${
[${veranstaltung.kopf.titelMitPrefix} am ${veranstaltung.datumForDisplayShort} ${veranstaltung.kopf.presseInEcht}](${prefix}${
veranstaltung.fullyQualifiedUrl
}?page=allgemeines)

Expand Down
6 changes: 4 additions & 2 deletions application/backend/configureApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import passportInitializer from "./lib/middleware/passportInitializer.js";
import passportApiKeyInitializer from "./lib/middleware/passportApiKeyInitializer.js";
import { fileURLToPath } from "url";
import conf from "./simpleConfigure.js";
import { ServeStaticOptions } from "serve-static";

const __dirname = dirname(fileURLToPath(import.meta.url));

Expand Down Expand Up @@ -45,7 +46,8 @@ export default function (app: express.Express, forDev?: boolean): void {
app.use(express.json());
app.use(compress());
if (!forDev) {
app.use("/vue", history());
app.use("/", history());
//app.use("/vue", history());
app.use("/rider", history());
}
app.use(
Expand All @@ -56,7 +58,7 @@ export default function (app: express.Express, forDev?: boolean): void {
res.setHeader("Cache-Control", "public, max-age=0");
}
},
}),
} as ServeStaticOptions),
);
app.use(express.static(conf.additionalstatic, { maxAge: "10h" }));

Expand Down
2 changes: 1 addition & 1 deletion application/backend/lib/site/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const refreshTTL = conf.refreshTTL || 7 * 24 * 60 * 60 * 1000; // days*hours*min
const jwtTTL = conf.jwtTTL || 15 * 60; // 15 minutes

app.get("/", (req, res) => {
return res.redirect("/vue/veranstaltungen");
return res.redirect("/veranstaltungen");
});

function createToken(req: Request, res: Response, name: string) {
Expand Down
8 changes: 4 additions & 4 deletions application/backend/static/fonts/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
font-weight: 400;
src: url("../fonts/montserrat-v14-latin-regular.eot"); /* IE9 Compat Modes */
src: local("Montserrat Regular"), local("Montserrat-Regular"),
url("../fonts/montserrat-v14-latin-regular.eot?#iefix") format("embedded-opentype"),
url("../fonts/montserrat-v14-latin-regular.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/montserrat-v14-latin-regular.woff2") format("woff2"),
/* Super Modern Browsers */ url("../fonts/montserrat-v14-latin-regular.woff") format("woff"),
/* Modern Browsers */ url("../fonts/montserrat-v14-latin-regular.ttf") format("truetype"),
Expand All @@ -18,7 +18,7 @@
font-weight: 400;
src: url("../fonts/montserrat-v14-latin-italic.eot"); /* IE9 Compat Modes */
src: local("Montserrat Italic"), local("Montserrat-Italic"),
url("../fonts/montserrat-v14-latin-italic.eot?#iefix") format("embedded-opentype"),
url("../fonts/montserrat-v14-latin-italic.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/montserrat-v14-latin-italic.woff2") format("woff2"),
/* Super Modern Browsers */ url("../fonts/montserrat-v14-latin-italic.woff") format("woff"),
/* Modern Browsers */ url("../fonts/montserrat-v14-latin-italic.ttf") format("truetype"),
Expand All @@ -31,7 +31,7 @@
font-weight: 600;
src: url("../fonts/montserrat-v14-latin-600.eot"); /* IE9 Compat Modes */
src: local("Montserrat SemiBold"), local("Montserrat-SemiBold"),
url("../fonts/montserrat-v14-latin-600.eot?#iefix") format("embedded-opentype"),
url("../fonts/montserrat-v14-latin-600.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/montserrat-v14-latin-600.woff2") format("woff2"),
/* Super Modern Browsers */ url("../fonts/montserrat-v14-latin-600.woff") format("woff"),
/* Modern Browsers */ url("../fonts/montserrat-v14-latin-600.ttf") format("truetype"),
Expand All @@ -44,7 +44,7 @@
font-weight: 600;
src: url("../fonts/montserrat-v14-latin-600italic.eot"); /* IE9 Compat Modes */
src: local("Montserrat SemiBold Italic"), local("Montserrat-SemiBoldItalic"),
url("../fonts/montserrat-v14-latin-600italic.eot?#iefix") format("embedded-opentype"),
url("../fonts/montserrat-v14-latin-600italic.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/montserrat-v14-latin-600italic.woff2") format("woff2"),
/* Super Modern Browsers */ url("../fonts/montserrat-v14-latin-600italic.woff") format("woff"),
/* Modern Browsers */ url("../fonts/montserrat-v14-latin-600italic.ttf") format("truetype"),
Expand Down
4 changes: 2 additions & 2 deletions application/backend/test/mailsender/sendKasseFehlt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ describe("Check Kasse Mailsender", () => {
]);
expect(message.body).to.include("## Bei folgenden Veranstaltungen der nächsten 8 Tage fehlt noch jemand an der Kasse:");
expect(message.body).to.include(
'<a href="http://localhost:1970/vue/veranstaltung/konzert1">Konzert 1 am Mo., 29. Apr. 2019 22:00 im Jazzclub Karlsruhe</a>',
'<a href="http://localhost:1970/veranstaltung/konzert1">Konzert 1 am Mo., 29. Apr. 2019 22:00 im Jazzclub Karlsruhe</a>',
);
expect(message.body).to.include(
'<a href="http://localhost:1970/vue/veranstaltung/konzert2">Konzert 2 am Mi., 29. Mai 2019 22:00 im Jazzclub Karlsruhe</a>',
'<a href="http://localhost:1970/veranstaltung/konzert2">Konzert 2 am Mi., 29. Mai 2019 22:00 im Jazzclub Karlsruhe</a>',
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe("Check Kasse Mailsender", () => {
]);
expect(message.body).to.include("## Bei folgenden Veranstaltungen der nächsten 14 Tage fehlt ein Abendverantwortlicher:");
expect(message.body).to.include(
'<a href="http://localhost:1970/vue/veranstaltung/konzert1">Konzert 1 am Mo., 29. Apr. 2019 22:00 im Jazzclub Karlsruhe</a>',
'<a href="http://localhost:1970/veranstaltung/konzert1">Konzert 1 am Mo., 29. Apr. 2019 22:00 im Jazzclub Karlsruhe</a>',
);
});
});
6 changes: 3 additions & 3 deletions application/backend/test/mailsender/sendPresseFehlt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ describe("Rules Mailsender", () => {
"## Folgende Veranstaltungen oder Vermietungen haben noch keinen Pressetext und werden im Laufe der nächsten Woche der Presse angekündigt:",
);

expect(message.body).to.include(`### [Vermietung 2](http://localhost:1970/vue/vermietung/?page=presse)
expect(message.body).to.include(`### [Vermietung 2](http://localhost:1970/vermietung/?page=presse)
#### Dienstag, 28. Mai 2019 um 22:00 im Jazzclub Karlsruhe`);

expect(message.body).to.include(`### [Konzert 2](http://localhost:1970/vue/konzert/konzert2?page=presse)
expect(message.body).to.include(`### [Konzert 2](http://localhost:1970/konzert/konzert2?page=presse)
#### Mittwoch, 29. Mai 2019 um 22:00 im Jazzclub Karlsruhe`);

expect(message.body).to.include(`### [Konzert 3](http://localhost:1970/vue/konzert/?page=presse)
expect(message.body).to.include(`### [Konzert 3](http://localhost:1970/konzert/?page=presse)
#### Samstag, 29. Juni 2019 um 22:00 im Jazzclub Karlsruhe`);

expect(message.body, "Konzert 4 braucht keine Presse").to.not.include(`### [Konzert 4]`);
Expand Down
2 changes: 1 addition & 1 deletion application/vue/src/components/content/menu/JazzHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function JazzHeader({ activeElement }: { readonly activeElement: string }
}}
to="/"
>
<img alt="Jazzclub Logo" src="/vue/img/logo_weiss.png" />
<img alt="Jazzclub Logo" src="/img/logo_weiss.png" />
</Link>
<div style={{ display: "flex", alignItems: "center", justifyContent: "space-between", width: "calc(100% - 64px)" }}>
<ConfigProvider theme={{ components: { Menu: { subMenuItemSelectedColor: "white" } } }}>
Expand Down
4 changes: 2 additions & 2 deletions application/vue/src/rest/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,14 +387,14 @@ export async function openAngebotRechnung(vermietung: Vermietung) {
}

export async function imgFullsize(url: string) {
const img = await get({ contentType: "other", url: `/upload/${url}`, resType: new Blob() });
const img = await get({ contentType: "other", url: `/${url}`, urlPrefix: "/upload", resType: new Blob() });
if (img) {
showFile(img, url);
}
}

export async function imgzipForVeranstaltung(konzert: Konzert) {
const zip = await get({ contentType: "zip", url: `/imgzipForVeranstaltung/${konzert.url}`, resType: new Blob() });
const zip = await get({ contentType: "zip", url: `/${konzert.url}`, urlPrefix: "/imgzipForVeranstaltung", resType: new Blob() });
if (zip) {
showFile(zip, `JazzClub_Bilder_${konzert.kopf.titel}.zip`);
}
Expand Down
2 changes: 1 addition & 1 deletion application/vue/src/router/JazzRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ const routes = [
];

export function JazzRouter() {
const router = useMemo(() => createBrowserRouter(routes, { basename: "/vue" }), []);
const router = useMemo(() => createBrowserRouter(routes), []);
return <RouterProvider router={router} />;
}
4 changes: 2 additions & 2 deletions application/vue/test/PlayAround.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe("Playing Around", () => {

it("should first", async () => {
//const user = userEvent.setup();
window.history.pushState({}, "Test page", "/vue");
//window.history.pushState({}, "Test page", "/vue");

const { getByText } = render(<JazzclubApp />, { wrapper: JazzRouter });
await waitFor(() => {
Expand All @@ -34,7 +34,7 @@ describe("Playing Around", () => {

it("should second", async () => {
//const user = userEvent.setup();
window.history.pushState({}, "Test page", "/vue/konzert/new");
window.history.pushState({}, "Test page", "/konzert/new");

const { getByText } = render(<JazzclubApp />, { wrapper: JazzRouter });
await waitFor(() => {
Expand Down
8 changes: 4 additions & 4 deletions application/vue/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import express from "express";
export default defineConfig(() => {
return {
root: __dirname,
base: "/vue/",
base: "/",
build: {
outDir: "../backend/static/vue",
outDir: "../backend/static/",
emptyOutDir: false,
sourcemap: false,
chunkSizeWarningLimit: 5000,
Expand Down Expand Up @@ -59,12 +59,12 @@ export default defineConfig(() => {
theme_color: "#000000",
icons: [
{
src: "/vue/img/logo-square-192.png",
src: "/img/logo-square-192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "/vue/img/logo-square-512.png",
src: "/img/logo-square-512.png",
sizes: "512x512",
type: "image/png",
},
Expand Down
4 changes: 2 additions & 2 deletions frontendtests/tests/01_optionen_anlegen_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Before(({ login }) => {
Scenario("Erzeuge Typen und Orte", ({ I }) => {
I.deleteObjectInCollection("optionenstore", "instance");
I.deleteObjectInCollection("optionenstore", "orte");
I.amOnPage("/vue/optionen");
I.amOnPage("/optionen");
I.fillField("Kooperationen", "UI Test\n");
I.click("Speichern");

I.amOnPage("/vue/orte");
I.amOnPage("/orte");
I.click(`(//button[@data-testid="add-in-table"])`);
I.click('div[data-testid="name0"]');
I.fillField("#name", "Jazzclub");
Expand Down
4 changes: 2 additions & 2 deletions frontendtests/tests/02_konzert_anlegen_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Before(({ I, login }) => {
});

Scenario("Erzeuge neues Konzert", async ({ I }) => {
I.amOnPage("/vue/konzert/new");
I.amOnPage("/konzert/new");
I.wait(0.5);
I.see("Typ");
I.fillField('//input[@placeholder="Startdatum"]', "200320 18:30\t");
Expand Down Expand Up @@ -42,7 +42,7 @@ Scenario("Erzeuge neues Konzert", async ({ I }) => {
I.assertDeepEqual(res.startDate, "2020-03-20T17:30:00.000Z");
I.assertDeepEqual(res.endDate, "2020-03-20T19:00:00.000Z");

I.amOnPage("/vue/veranstaltungen");
I.amOnPage("/veranstaltungen");
I.wait(0.5);
I.see("Konzert #1");
});
4 changes: 2 additions & 2 deletions frontendtests/tests/03_vermietung_anlegen_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Before(({ I, login }) => {
});

Scenario("Erzeuge neue Vermietung", async ({ I }) => {
I.amOnPage("/vue/vermietung/new");
I.amOnPage("/vermietung/new");
I.fillField("Saalmiete", "100");
I.fillField('//input[@placeholder="Startdatum"]', "200320 18:30\t");
I.click("OK");
Expand Down Expand Up @@ -40,7 +40,7 @@ Scenario("Erzeuge neue Vermietung", async ({ I }) => {
I.assertEqual(res.startDate, "2020-03-20T17:30:00.000Z");
I.assertEqual(res.endDate, "2020-03-20T19:00:00.000Z");

I.amOnPage("/vue/veranstaltungen");
I.amOnPage("/veranstaltungen");
I.wait(0.5);
I.see("Vermietung #1");
});
2 changes: 1 addition & 1 deletion frontendtests/tests/04_konzert_kopieren_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Before(({ I, login }) => {
});

Scenario("Kopiere Konzert", async ({ I }) => {
I.amOnPage("/vue/konzert/copy-of-Kopiervorlage?page=allgemeines");
I.amOnPage("/konzert/copy-of-Kopiervorlage?page=allgemeines");
I.wait(0.5);
I.click("Weiter");
I.fillField("Titel", "Kopiertes Konzert");
Expand Down