reformat files #227
@ -34,7 +34,7 @@ jobs:
|
|||||||
cargo build
|
cargo build
|
||||||
cd frontend && npm install && npm run build
|
cd frontend && npm install && npm run build
|
||||||
- name: Frontend tests
|
- name: Frontend tests
|
||||||
run: cd frontend && npx playwright install && npx playwright test --workers 1
|
run: cd frontend && npx playwright install && npx playwright test --workers 1 --reporter line
|
||||||
- name: Backend tests
|
- name: Backend tests
|
||||||
run: cargo test --verbose
|
run: cargo test --verbose
|
||||||
#- uses: actions/upload-artifact@v3
|
#- uses: actions/upload-artifact@v3
|
||||||
|
@ -16,3 +16,9 @@
|
|||||||
|
|
||||||
## Backend (Unit + Integration)
|
## Backend (Unit + Integration)
|
||||||
`cargo t`
|
`cargo t`
|
||||||
|
|
||||||
|
# Lints
|
||||||
|
|
||||||
|
- Rust: `cargo check`
|
||||||
|
- Tera files: `djlint **.html.tera --profile=jinja --reformat`
|
||||||
|
- Typescript: `prettier -w *.ts`
|
||||||
|
@ -1,77 +1,76 @@
|
|||||||
import * as d3 from 'd3';
|
import * as d3 from "d3";
|
||||||
|
|
||||||
export interface Data {
|
export interface Data {
|
||||||
date: Date;
|
date: Date;
|
||||||
km: number;
|
km: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sessionStorage.getItem('userStats')) {
|
if (sessionStorage.getItem("userStats")) {
|
||||||
const data = JSON.parse(sessionStorage.getItem('userStats') || '{}') as Data[];
|
const data = JSON.parse(
|
||||||
|
sessionStorage.getItem("userStats") || "{}",
|
||||||
|
) as Data[];
|
||||||
|
|
||||||
if(data.length >= 2) {
|
if (data.length >= 2) {
|
||||||
const margin = { top: 20, right: 20, bottom: 50, left: 50 };
|
const margin = { top: 20, right: 20, bottom: 50, left: 50 };
|
||||||
const width: number = 960 - margin.left - margin.right;
|
const width: number = 960 - margin.left - margin.right;
|
||||||
const height: number = 500 - margin.top - margin.bottom;
|
const height: number = 500 - margin.top - margin.bottom;
|
||||||
|
|
||||||
data.forEach((d: Data) => {
|
data.forEach((d: Data) => {
|
||||||
d.date = <Date> new Date(d.date)
|
d.date = <Date>new Date(d.date);
|
||||||
d.km = +d.km;
|
d.km = +d.km;
|
||||||
});
|
});
|
||||||
|
|
||||||
const x = d3.scaleTime()
|
const x = d3
|
||||||
|
.scaleTime()
|
||||||
.domain(<[Date, Date]>d3.extent(data, (d: Data) => d.date))
|
.domain(<[Date, Date]>d3.extent(data, (d: Data) => d.date))
|
||||||
.range([0, width]);
|
.range([0, width]);
|
||||||
|
|
||||||
const y = d3.scaleLinear()
|
const y = d3
|
||||||
|
.scaleLinear()
|
||||||
.domain([0, Number(d3.max(data, (d: Data) => d.km))])
|
.domain([0, Number(d3.max(data, (d: Data) => d.km))])
|
||||||
.range([height, 0]);
|
.range([height, 0]);
|
||||||
|
|
||||||
const line = d3.line<Data>()
|
const line = d3
|
||||||
|
.line<Data>()
|
||||||
.x((d: Data) => x(d.date))
|
.x((d: Data) => x(d.date))
|
||||||
.y((d: Data) => y(d.km));
|
.y((d: Data) => y(d.km));
|
||||||
|
|
||||||
const svg = d3.select('#container')
|
const svg = d3
|
||||||
.append('svg')
|
.select("#container")
|
||||||
.attr('width', width + margin.left + margin.right)
|
.append("svg")
|
||||||
.attr('height', height + margin.top + margin.bottom)
|
.attr("width", width + margin.left + margin.right)
|
||||||
|
.attr("height", height + margin.top + margin.bottom)
|
||||||
.call(responsivefy)
|
.call(responsivefy)
|
||||||
.append('g')
|
.append("g")
|
||||||
.attr('transform', `translate(${margin.left},${margin.top})`);
|
.attr("transform", `translate(${margin.left},${margin.top})`);
|
||||||
|
|
||||||
svg.append('path')
|
svg.append("path").data([data]).attr("class", "line").attr("d", line);
|
||||||
.data([data])
|
|
||||||
.attr('class', 'line')
|
svg
|
||||||
.attr('d', line);
|
.append("g")
|
||||||
|
.attr("transform", `translate(0,${height})`)
|
||||||
svg.append('g')
|
|
||||||
.attr('transform', `translate(0,${height})`)
|
|
||||||
.call(d3.axisBottom(x));
|
.call(d3.axisBottom(x));
|
||||||
|
|
||||||
svg.append('g')
|
svg.append("g").call(d3.axisLeft(y));
|
||||||
.call(d3.axisLeft(y));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function responsivefy(svg: any) {
|
function responsivefy(svg: any) {
|
||||||
const container = d3.select(svg.node().parentNode);
|
const container = d3.select(svg.node().parentNode);
|
||||||
const width = parseInt(svg.style('width'), 10);
|
const width = parseInt(svg.style("width"), 10);
|
||||||
const height = parseInt(svg.style('height'), 10);
|
const height = parseInt(svg.style("height"), 10);
|
||||||
const aspect = width / height;
|
const aspect = width / height;
|
||||||
|
|
||||||
svg.attr('viewBox', `0 0 ${width} ${height}`)
|
svg
|
||||||
.attr('preserveAspectRatio', 'xMinYMid')
|
.attr("viewBox", `0 0 ${width} ${height}`)
|
||||||
|
.attr("preserveAspectRatio", "xMinYMid")
|
||||||
.call(resize);
|
.call(resize);
|
||||||
|
|
||||||
d3.select(window).on(
|
d3.select(window).on("resize." + container.attr("id"), resize);
|
||||||
'resize.' + container.attr('id'),
|
|
||||||
resize
|
|
||||||
);
|
|
||||||
|
|
||||||
function resize() {
|
function resize() {
|
||||||
const w = parseInt(container.style('width'));
|
const w = parseInt(container.style("width"));
|
||||||
svg.attr('width', w);
|
svg.attr("width", w);
|
||||||
svg.attr('height', Math.round(w / aspect));
|
svg.attr("height", Math.round(w / aspect));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
803
frontend/main.ts
@ -1,114 +1,144 @@
|
|||||||
import { test, expect, Page } from '@playwright/test';
|
import { test, expect, Page } from "@playwright/test";
|
||||||
|
|
||||||
test('cox can create and delete trip', async ({ page }) => {
|
test("cox can create and delete trip", async ({ page }) => {
|
||||||
await page.goto('http://localhost:8000/auth');
|
await page.goto("http://localhost:8000/auth");
|
||||||
await page.getByPlaceholder('Name').click();
|
await page.getByPlaceholder("Name").click();
|
||||||
await page.getByPlaceholder('Name').fill('cox');
|
await page.getByPlaceholder("Name").fill("cox");
|
||||||
await page.getByPlaceholder('Name').press('Tab');
|
await page.getByPlaceholder("Name").press("Tab");
|
||||||
await page.getByPlaceholder('Passwort').fill('cox');
|
await page.getByPlaceholder("Passwort").fill("cox");
|
||||||
await page.getByPlaceholder('Passwort').press('Enter');
|
await page.getByPlaceholder("Passwort").press("Enter");
|
||||||
await page.getByRole('link', { name: 'Geplante Ausfahrten' }).click();
|
await page.getByRole("link", { name: "Geplante Ausfahrten" }).click();
|
||||||
await page.locator('.relative').first().click();
|
await page.locator(".relative").first().click();
|
||||||
await page.locator('#sidebar #planned_starting_time').click();
|
await page.locator("#sidebar #planned_starting_time").click();
|
||||||
await page.locator('#sidebar #planned_starting_time').fill('18:00');
|
await page.locator("#sidebar #planned_starting_time").fill("18:00");
|
||||||
await page.locator('#sidebar #planned_starting_time').press('Tab');
|
await page.locator("#sidebar #planned_starting_time").press("Tab");
|
||||||
await page.locator('#sidebar #planned_starting_time').press('Tab');
|
await page.locator("#sidebar #planned_starting_time").press("Tab");
|
||||||
await page.getByRole('spinbutton').fill('5');
|
await page.getByRole("spinbutton").fill("5");
|
||||||
await page.getByRole('button', { name: 'Erstellen', exact: true }).click();
|
await page.getByRole("button", { name: "Erstellen", exact: true }).click();
|
||||||
await expect(page.locator('body')).toContainText('18:00 Uhr (cox) Details');
|
await expect(page.locator("body")).toContainText("18:00 Uhr (cox) Details");
|
||||||
|
|
||||||
await page.goto('http://localhost:8000/planned');
|
await page.goto("http://localhost:8000/planned");
|
||||||
await page.getByRole('link', { name: 'Details' }).click();
|
await page.getByRole("link", { name: "Details" }).click();
|
||||||
await page.getByRole('link', { name: 'Termin löschen' }).click();
|
await page.getByRole("link", { name: "Termin löschen" }).click();
|
||||||
await expect(page.locator('body')).toContainText('Erfolgreich gelöscht!');
|
await expect(page.locator("body")).toContainText("Erfolgreich gelöscht!");
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: group -> cox can create trips
|
// TODO: group -> cox can create trips
|
||||||
// TODO: cox can help/register at trips/events
|
// TODO: cox can help/register at trips/events
|
||||||
|
|
||||||
test.describe('cox can edit trips', () => {
|
test.describe("cox can edit trips", () => {
|
||||||
let sharedPage: Page;
|
let sharedPage: Page;
|
||||||
|
|
||||||
test.beforeEach(async ({ browser }) => {
|
test.beforeEach(async ({ browser }) => {
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
|
|
||||||
await page.goto('http://localhost:8000/auth');
|
await page.goto("http://localhost:8000/auth");
|
||||||
await page.getByPlaceholder('Name').click();
|
await page.getByPlaceholder("Name").click();
|
||||||
await page.getByPlaceholder('Name').fill('cox');
|
await page.getByPlaceholder("Name").fill("cox");
|
||||||
await page.getByPlaceholder('Name').press('Tab');
|
await page.getByPlaceholder("Name").press("Tab");
|
||||||
await page.getByPlaceholder('Passwort').fill('cox');
|
await page.getByPlaceholder("Passwort").fill("cox");
|
||||||
await page.getByPlaceholder('Passwort').press('Enter');
|
await page.getByPlaceholder("Passwort").press("Enter");
|
||||||
await page.getByRole('link', { name: 'Geplante Ausfahrten' }).click();
|
await page.getByRole("link", { name: "Geplante Ausfahrten" }).click();
|
||||||
await page.locator('.relative').first().click();
|
await page.locator(".relative").first().click();
|
||||||
await page.locator('#sidebar #planned_starting_time').click();
|
await page.locator("#sidebar #planned_starting_time").click();
|
||||||
await page.locator('#sidebar #planned_starting_time').fill('18:00');
|
await page.locator("#sidebar #planned_starting_time").fill("18:00");
|
||||||
await page.locator('#sidebar #planned_starting_time').press('Tab');
|
await page.locator("#sidebar #planned_starting_time").press("Tab");
|
||||||
await page.locator('#sidebar #planned_starting_time').press('Tab');
|
await page.locator("#sidebar #planned_starting_time").press("Tab");
|
||||||
await page.getByRole('spinbutton').fill('5');
|
await page.getByRole("spinbutton").fill("5");
|
||||||
await page.getByRole('button', { name: 'Erstellen', exact: true }).click();
|
await page.getByRole("button", { name: "Erstellen", exact: true }).click();
|
||||||
|
|
||||||
sharedPage = page;
|
sharedPage = page;
|
||||||
});
|
});
|
||||||
|
|
||||||
test('edit remarks', async () => {
|
test("edit remarks", async () => {
|
||||||
await sharedPage.goto('http://localhost:8000/planned');
|
await sharedPage.goto("http://localhost:8000/planned");
|
||||||
await sharedPage.getByRole('link', { name: 'Details' }).click();
|
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||||
await sharedPage.locator('#sidebar #notes').click();
|
await sharedPage.locator("#sidebar #notes").click();
|
||||||
await sharedPage.locator('#sidebar #notes').fill('Meine Anmerkung');
|
await sharedPage.locator("#sidebar #notes").fill("Meine Anmerkung");
|
||||||
await sharedPage.getByRole('button', { name: 'Speichern' }).click();
|
await sharedPage.getByRole("button", { name: "Speichern" }).click();
|
||||||
await sharedPage.getByRole('link', { name: 'Details' }).click();
|
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||||
await expect(sharedPage.locator('#sidebar')).toContainText('Meine Anmerkung');
|
await expect(sharedPage.locator("#sidebar")).toContainText(
|
||||||
|
"Meine Anmerkung",
|
||||||
|
);
|
||||||
|
|
||||||
await sharedPage.getByRole('button', { name: 'Ausfahrt erstellen schließen' }).click();
|
await sharedPage
|
||||||
|
.getByRole("button", { name: "Ausfahrt erstellen schließen" })
|
||||||
|
.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('add and remove guest', async () => {
|
test("add and remove guest", async () => {
|
||||||
await sharedPage.goto('http://localhost:8000/planned');
|
await sharedPage.goto("http://localhost:8000/planned");
|
||||||
await sharedPage.getByRole('link', { name: 'Details' }).click();
|
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||||
await sharedPage.locator('#sidebar #user_note').click();
|
await sharedPage.locator("#sidebar #user_note").click();
|
||||||
await sharedPage.locator('#sidebar #user_note').fill('Mein Gast');
|
await sharedPage.locator("#sidebar #user_note").fill("Mein Gast");
|
||||||
await sharedPage.getByRole('button', { name: 'Gast hinzufügen' }).click();
|
await sharedPage.getByRole("button", { name: "Gast hinzufügen" }).click();
|
||||||
await expect(sharedPage.locator('body')).toContainText('Erfolgreich angemeldet!');
|
await expect(sharedPage.locator("body")).toContainText(
|
||||||
await sharedPage.getByRole('link', { name: 'Details' }).click();
|
"Erfolgreich angemeldet!",
|
||||||
await expect(sharedPage.locator('#sidebar')).toContainText('Freie Plätze: 4');
|
);
|
||||||
await expect(sharedPage.locator('#sidebar')).toContainText('Mein Gast (Gast) Abmelden');
|
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||||
await expect(sharedPage.getByRole('link', { name: 'Termin löschen' })).not.toBeVisible();
|
await expect(sharedPage.locator("#sidebar")).toContainText(
|
||||||
|
"Freie Plätze: 4",
|
||||||
|
);
|
||||||
|
await expect(sharedPage.locator("#sidebar")).toContainText(
|
||||||
|
"Mein Gast (Gast) Abmelden",
|
||||||
|
);
|
||||||
|
await expect(
|
||||||
|
sharedPage.getByRole("link", { name: "Termin löschen" }),
|
||||||
|
).not.toBeVisible();
|
||||||
|
|
||||||
await sharedPage.getByRole('link', { name: 'Abmelden' }).click();
|
await sharedPage.getByRole("link", { name: "Abmelden" }).click();
|
||||||
await expect(sharedPage.locator('body')).toContainText('Erfolgreich abgemeldet!');
|
await expect(sharedPage.locator("body")).toContainText(
|
||||||
await sharedPage.getByRole('link', { name: 'Details' }).click();
|
"Erfolgreich abgemeldet!",
|
||||||
await expect(sharedPage.locator('#sidebar')).toContainText('Freie Plätze: 5');
|
);
|
||||||
await expect(sharedPage.locator('#sidebar')).toContainText('Keine Ruderer angemeldet');
|
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||||
await expect(sharedPage.getByRole('link', { name: 'Termin löschen' })).toBeVisible();
|
await expect(sharedPage.locator("#sidebar")).toContainText(
|
||||||
|
"Freie Plätze: 5",
|
||||||
|
);
|
||||||
|
await expect(sharedPage.locator("#sidebar")).toContainText(
|
||||||
|
"Keine Ruderer angemeldet",
|
||||||
|
);
|
||||||
|
await expect(
|
||||||
|
sharedPage.getByRole("link", { name: "Termin löschen" }),
|
||||||
|
).toBeVisible();
|
||||||
|
|
||||||
await sharedPage.getByRole('button', { name: 'Ausfahrt erstellen schließen' }).click();
|
await sharedPage
|
||||||
|
.getByRole("button", { name: "Ausfahrt erstellen schließen" })
|
||||||
|
.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('change amount rower', async () => {
|
test("change amount rower", async () => {
|
||||||
await sharedPage.goto('http://localhost:8000/planned');
|
await sharedPage.goto("http://localhost:8000/planned");
|
||||||
await sharedPage.getByRole('link', { name: 'Details' }).click();
|
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||||
await expect(sharedPage.locator('#sidebar')).toContainText('Freie Plätze: 5');
|
await expect(sharedPage.locator("#sidebar")).toContainText(
|
||||||
await sharedPage.getByRole('spinbutton').click();
|
"Freie Plätze: 5",
|
||||||
await sharedPage.getByRole('spinbutton').fill('3');
|
);
|
||||||
await sharedPage.getByRole('button', { name: 'Speichern' }).click();
|
await sharedPage.getByRole("spinbutton").click();
|
||||||
await expect(sharedPage.locator('body')).toContainText('Ausfahrt erfolgreich aktualisiert.');
|
await sharedPage.getByRole("spinbutton").fill("3");
|
||||||
|
await sharedPage.getByRole("button", { name: "Speichern" }).click();
|
||||||
|
await expect(sharedPage.locator("body")).toContainText(
|
||||||
|
"Ausfahrt erfolgreich aktualisiert.",
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('call off trip', async () => {
|
test("call off trip", async () => {
|
||||||
await sharedPage.goto('http://localhost:8000/planned');
|
await sharedPage.goto("http://localhost:8000/planned");
|
||||||
await sharedPage.getByRole('link', { name: 'Details' }).click();
|
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||||
await expect(sharedPage.locator('#sidebar')).toContainText('Freie Plätze: 5');
|
await expect(sharedPage.locator("#sidebar")).toContainText(
|
||||||
await sharedPage.getByRole('spinbutton').click();
|
"Freie Plätze: 5",
|
||||||
await sharedPage.getByRole('spinbutton').fill('0');
|
);
|
||||||
await sharedPage.getByRole('button', { name: 'Speichern' }).click();
|
await sharedPage.getByRole("spinbutton").click();
|
||||||
await expect(sharedPage.locator('body')).toContainText('Ausfahrt erfolgreich aktualisiert.');
|
await sharedPage.getByRole("spinbutton").fill("0");
|
||||||
await expect(sharedPage.locator('body')).toContainText('(Absage cox )');
|
await sharedPage.getByRole("button", { name: "Speichern" }).click();
|
||||||
|
await expect(sharedPage.locator("body")).toContainText(
|
||||||
|
"Ausfahrt erfolgreich aktualisiert.",
|
||||||
|
);
|
||||||
|
await expect(sharedPage.locator("body")).toContainText("(Absage cox)");
|
||||||
});
|
});
|
||||||
|
|
||||||
test.afterEach(async () => {
|
test.afterEach(async () => {
|
||||||
await sharedPage.goto('http://localhost:8000/planned');
|
await sharedPage.goto("http://localhost:8000/planned");
|
||||||
await sharedPage.getByRole('link', { name: 'Details' }).click();
|
await sharedPage.getByRole("link", { name: "Details" }).click();
|
||||||
await sharedPage.getByRole('link', { name: 'Termin löschen' }).click();
|
await sharedPage.getByRole("link", { name: "Termin löschen" }).click();
|
||||||
await sharedPage.close();
|
await sharedPage.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,69 +1,166 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from "@playwright/test";
|
||||||
|
|
||||||
test('Cox can start and cancel trip', async ({ page }, testInfo) => {
|
test("Cox can start and cancel trip", async ({ page }, testInfo) => {
|
||||||
await page.goto('http://localhost:8000/auth');
|
await page.goto("http://localhost:8000/auth");
|
||||||
await page.getByPlaceholder('Name').click();
|
await page.getByPlaceholder("Name").click();
|
||||||
await page.getByPlaceholder('Name').fill('cox2');
|
await page.getByPlaceholder("Name").fill("cox2");
|
||||||
await page.getByPlaceholder('Name').press('Tab');
|
await page.getByPlaceholder("Name").press("Tab");
|
||||||
await page.getByPlaceholder('Passwort').fill('cox');
|
await page.getByPlaceholder("Passwort").fill("cox");
|
||||||
await page.getByPlaceholder('Passwort').press('Enter');
|
await page.getByPlaceholder("Passwort").press("Enter");
|
||||||
|
|
||||||
await page.goto('http://localhost:8000/');
|
await page.goto("http://localhost:8000/");
|
||||||
await page.getByRole('link', { name: 'Ausfahrt eintragen' }).click();
|
await page.getByRole("link", { name: "Ausfahrt eintragen" }).click();
|
||||||
if (testInfo.project.name.includes('Mobile')) { // No left boat selector on mobile views
|
if (testInfo.project.name.includes("Mobile")) {
|
||||||
await page.getByText('Kaputtes Boot :-( (7 x)').nth(1).click();
|
// No left boat selector on mobile views
|
||||||
await page.getByRole('option', { name: 'Joe' }).click();
|
await page.getByText("Kaputtes Boot :-( (7 x)").nth(1).click();
|
||||||
} else{
|
await page.getByRole("option", { name: "Joe" }).click();
|
||||||
await page.getByText('Joe', { exact: true }).click();
|
} else {
|
||||||
|
await page.getByText("Joe", { exact: true }).click();
|
||||||
}
|
}
|
||||||
await page.getByPlaceholder('Ruderer auswählen').click();
|
await page.getByPlaceholder("Ruderer auswählen").click();
|
||||||
await page.getByRole('option', { name: 'rower2' }).click();
|
await page.getByRole("option", { name: "rower2" }).click();
|
||||||
await page.getByRole('option', { name: 'cox2' }).click();
|
await page.getByRole("option", { name: "cox2" }).click();
|
||||||
await expect(page.getByRole('listbox')).toContainText('Nur 2 Ruderer können hinzugefügt werden');
|
await expect(page.getByRole("listbox")).toContainText(
|
||||||
await expect(page.locator('#shipmaster-newrowerjs')).toContainText('cox');
|
"Nur 2 Ruderer können hinzugefügt werden",
|
||||||
await expect(page.locator('#steering_person-newrowerjs')).toContainText('rower2 cox');
|
);
|
||||||
await page.getByRole('button', { name: 'Ausfahrt eintragen' }).click();
|
await expect(page.locator("#shipmaster-newrowerjs")).toContainText("cox");
|
||||||
await expect(page.locator('body')).toContainText('Ausfahrt erfolgreich hinzugefügt');
|
await expect(page.locator("#steering_person-newrowerjs")).toContainText(
|
||||||
await expect(page.locator('body')).toContainText('Joe');
|
"rower2 cox",
|
||||||
|
);
|
||||||
|
await page.getByRole("button", { name: "Ausfahrt eintragen" }).click();
|
||||||
|
await expect(page.locator("body")).toContainText(
|
||||||
|
"Ausfahrt erfolgreich hinzugefügt",
|
||||||
|
);
|
||||||
|
await expect(page.locator("body")).toContainText("Joe");
|
||||||
|
|
||||||
await page.getByRole('link', { name: 'Joe' }).click();
|
await page.getByRole("link", { name: "Joe" }).click();
|
||||||
page.once('dialog', dialog => {
|
page.once("dialog", (dialog) => {
|
||||||
dialog.accept().catch(() => {});
|
dialog.accept().catch(() => {});
|
||||||
});
|
});
|
||||||
await page.getByRole('link', { name: 'Löschen' }).click();
|
await page.getByRole("link", { name: "Löschen" }).click();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Cox can start and finish trip', async ({ page }, testInfo) => {
|
test("Cox can start and finish trip", async ({ page }, testInfo) => {
|
||||||
await page.goto('http://localhost:8000/auth');
|
await page.goto("http://localhost:8000/auth");
|
||||||
await page.getByPlaceholder('Name').click();
|
await page.getByPlaceholder("Name").click();
|
||||||
await page.getByPlaceholder('Name').fill('cox2');
|
await page.getByPlaceholder("Name").fill("cox2");
|
||||||
await page.getByPlaceholder('Name').press('Tab');
|
await page.getByPlaceholder("Name").press("Tab");
|
||||||
await page.getByPlaceholder('Passwort').fill('cox');
|
await page.getByPlaceholder("Passwort").fill("cox");
|
||||||
await page.getByPlaceholder('Passwort').press('Enter');
|
await page.getByPlaceholder("Passwort").press("Enter");
|
||||||
|
|
||||||
await page.goto('http://localhost:8000/');
|
await page.goto("http://localhost:8000/");
|
||||||
await page.getByRole('link', { name: 'Ausfahrt eintragen' }).click();
|
await page.getByRole("link", { name: "Ausfahrt eintragen" }).click();
|
||||||
if (testInfo.project.name.includes('Mobile')) { // No left boat selector on mobile views
|
if (testInfo.project.name.includes("Mobile")) {
|
||||||
await page.getByText('Kaputtes Boot :-( (7 x)').nth(1).click();
|
// No left boat selector on mobile views
|
||||||
await page.getByRole('option', { name: 'Joe' }).click();
|
await page.getByText("Kaputtes Boot :-( (7 x)").nth(1).click();
|
||||||
} else{
|
await page.getByRole("option", { name: "Joe" }).click();
|
||||||
await page.getByText('Joe', { exact: true }).click();
|
} else {
|
||||||
|
await page.getByText("Joe", { exact: true }).click();
|
||||||
}
|
}
|
||||||
await page.getByPlaceholder('Ruderer auswählen').click();
|
await page.getByPlaceholder("Ruderer auswählen").click();
|
||||||
await page.getByRole('option', { name: 'rower2' }).click();
|
await page.getByRole("option", { name: "rower2" }).click();
|
||||||
await page.getByRole('option', { name: 'cox2' }).click();
|
await page.getByRole("option", { name: "cox2" }).click();
|
||||||
await expect(page.getByRole('listbox')).toContainText('Nur 2 Ruderer können hinzugefügt werden');
|
await expect(page.getByRole("listbox")).toContainText(
|
||||||
await expect(page.locator('#shipmaster-newrowerjs')).toContainText('cox');
|
"Nur 2 Ruderer können hinzugefügt werden",
|
||||||
await expect(page.locator('#steering_person-newrowerjs')).toContainText('rower2 cox');
|
);
|
||||||
await page.getByRole('button', { name: 'Ausfahrt eintragen' }).click();
|
await expect(page.locator("#shipmaster-newrowerjs")).toContainText("cox");
|
||||||
await expect(page.locator('body')).toContainText('Ausfahrt erfolgreich hinzugefügt');
|
await expect(page.locator("#steering_person-newrowerjs")).toContainText(
|
||||||
await expect(page.locator('body')).toContainText('Joe');
|
"rower2 cox",
|
||||||
|
);
|
||||||
|
await page.getByRole("button", { name: "Ausfahrt eintragen" }).click();
|
||||||
|
await expect(page.locator("body")).toContainText(
|
||||||
|
"Ausfahrt erfolgreich hinzugefügt",
|
||||||
|
);
|
||||||
|
await expect(page.locator("body")).toContainText("Joe");
|
||||||
|
|
||||||
await page.goto('http://localhost:8000/log');
|
await page.goto("http://localhost:8000/log");
|
||||||
await page.waitForTimeout(60000);
|
await page.waitForTimeout(60000);
|
||||||
await page.locator('div:nth-child(2) > .border-0').click();
|
await page.locator("div:nth-child(2) > .border-0").click();
|
||||||
await page.getByRole('combobox', { name: 'Destination' }).click();
|
await page.getByRole("combobox", { name: "Destination" }).click();
|
||||||
await page.getByRole('combobox', { name: 'Destination' }).fill('Ottensheim');
|
await page.getByRole("combobox", { name: "Destination" }).fill("Ottensheim");
|
||||||
await page.getByRole('button', { name: 'Ausfahrt beenden' }).click();
|
await page.getByRole("button", { name: "Ausfahrt beenden" }).click();
|
||||||
await expect(page.locator('body')).toContainText('Ausfahrt korrekt eingetragen');
|
await expect(page.locator("body")).toContainText(
|
||||||
|
"Ausfahrt korrekt eingetragen",
|
||||||
|
);
|
||||||
|
|
||||||
|
await page.goto('http://localhost:8000/log/show');
|
||||||
|
await expect(page.locator('body')).toContainText('Joe');
|
||||||
|
await expect(page.locator('body')).toContainText('(cox2)');
|
||||||
|
await expect(page.locator('body')).toContainText('Ottensheim (25 km)');
|
||||||
|
await expect(page.locator('body')).toContainText('Ruderer: cox2, rower2');
|
||||||
|
});
|
||||||
|
|
||||||
|
test("Kiosk can start and cancel trip", async ({ page }, testInfo) => {
|
||||||
|
await page.goto("http://localhost:8000/log/kiosk/ekrv2019/Linz");
|
||||||
|
if (testInfo.project.name.includes("Mobile")) {
|
||||||
|
// No left boat selector on mobile views
|
||||||
|
await page.getByText("Kaputtes Boot :-( (7 x)").nth(1).click();
|
||||||
|
await page.getByRole("option", { name: "Joe" }).click();
|
||||||
|
} else {
|
||||||
|
await page.getByText("Joe", { exact: true }).click();
|
||||||
|
}
|
||||||
|
await page.getByPlaceholder("Ruderer auswählen").click();
|
||||||
|
await page.getByRole("option", { name: "rower2" }).click();
|
||||||
|
await page.getByRole("option", { name: "cox2" }).click();
|
||||||
|
await expect(page.getByRole("listbox")).toContainText(
|
||||||
|
"Nur 2 Ruderer können hinzugefügt werden",
|
||||||
|
);
|
||||||
|
await expect(page.locator("#shipmaster-newrowerjs")).toContainText("cox");
|
||||||
|
await expect(page.locator("#steering_person-newrowerjs")).toContainText(
|
||||||
|
"rower2 cox",
|
||||||
|
);
|
||||||
|
await page.getByRole("button", { name: "Ausfahrt eintragen" }).click();
|
||||||
|
await expect(page.locator("body")).toContainText(
|
||||||
|
"Ausfahrt erfolgreich hinzugefügt",
|
||||||
|
);
|
||||||
|
await expect(page.locator("body")).toContainText("Joe");
|
||||||
|
|
||||||
|
await page.getByRole("link", { name: "Joe" }).click();
|
||||||
|
page.once("dialog", (dialog) => {
|
||||||
|
dialog.accept().catch(() => {});
|
||||||
|
});
|
||||||
|
await page.getByRole("link", { name: "Löschen" }).click();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("Kiosk can start and finish trip", async ({ page }, testInfo) => {
|
||||||
|
await page.goto("http://localhost:8000/log/kiosk/ekrv2019/Linz");
|
||||||
|
|
||||||
|
if (testInfo.project.name.includes("Mobile")) {
|
||||||
|
// No left boat selector on mobile views
|
||||||
|
await page.getByText("Kaputtes Boot :-( (7 x)").nth(1).click();
|
||||||
|
await page.getByRole("option", { name: "Joe" }).click();
|
||||||
|
} else {
|
||||||
|
await page.getByText("Joe", { exact: true }).click();
|
||||||
|
}
|
||||||
|
await page.getByPlaceholder("Ruderer auswählen").click();
|
||||||
|
await page.getByRole("option", { name: "rower2" }).click();
|
||||||
|
await page.getByRole("option", { name: "cox2" }).click();
|
||||||
|
await expect(page.getByRole("listbox")).toContainText(
|
||||||
|
"Nur 2 Ruderer können hinzugefügt werden",
|
||||||
|
);
|
||||||
|
await expect(page.locator("#shipmaster-newrowerjs")).toContainText("cox");
|
||||||
|
await expect(page.locator("#steering_person-newrowerjs")).toContainText(
|
||||||
|
"rower2 cox",
|
||||||
|
);
|
||||||
|
await page.getByRole("button", { name: "Ausfahrt eintragen" }).click();
|
||||||
|
await expect(page.locator("body")).toContainText(
|
||||||
|
"Ausfahrt erfolgreich hinzugefügt",
|
||||||
|
);
|
||||||
|
await expect(page.locator("body")).toContainText("Joe");
|
||||||
|
|
||||||
|
await page.goto("http://localhost:8000/log");
|
||||||
|
await page.waitForTimeout(60000);
|
||||||
|
await page.locator('div:nth-child(2) > .pt-2 > div > div > div:nth-child(2) > .border-0').click(); // 2 trips currently running, try to close second one
|
||||||
|
await page.getByRole("combobox", { name: "Destination" }).click();
|
||||||
|
await page.getByRole("combobox", { name: "Destination" }).fill("Ottensheim");
|
||||||
|
await page.getByRole("button", { name: "Ausfahrt beenden" }).click();
|
||||||
|
await expect(page.locator("body")).toContainText(
|
||||||
|
"Ausfahrt korrekt eingetragen",
|
||||||
|
);
|
||||||
|
|
||||||
|
await page.getByRole('link', { name: 'Logbuch' }).click();
|
||||||
|
await expect(page.locator('body')).toContainText('Joe');
|
||||||
|
await expect(page.locator('body')).toContainText('(cox2)');
|
||||||
|
await expect(page.locator('body')).toContainText('Ottensheim (25 km)');
|
||||||
|
await expect(page.locator('body')).toContainText('Ruderer: cox2, rower2');
|
||||||
});
|
});
|
||||||
|
@ -5,6 +5,7 @@ INSERT INTO "role" (name) VALUES ('tech');
|
|||||||
INSERT INTO "role" (name) VALUES ('Donau Linz');
|
INSERT INTO "role" (name) VALUES ('Donau Linz');
|
||||||
INSERT INTO "role" (name) VALUES ('planned_event');
|
INSERT INTO "role" (name) VALUES ('planned_event');
|
||||||
INSERT INTO "role" (name) VALUES ('Rennrudern');
|
INSERT INTO "role" (name) VALUES ('Rennrudern');
|
||||||
|
INSERT INTO "role" (name) VALUES ('paid');
|
||||||
INSERT INTO "user" (name, pw) VALUES('admin', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$4P4NCw4Ukhv80/eQYTsarHhnw61JuL1KMx/L9dm82YM');
|
INSERT INTO "user" (name, pw) VALUES('admin', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$4P4NCw4Ukhv80/eQYTsarHhnw61JuL1KMx/L9dm82YM');
|
||||||
INSERT INTO "user_role" (user_id, role_id) VALUES(1,1);
|
INSERT INTO "user_role" (user_id, role_id) VALUES(1,1);
|
||||||
INSERT INTO "user_role" (user_id, role_id) VALUES(1,2);
|
INSERT INTO "user_role" (user_id, role_id) VALUES(1,2);
|
||||||
@ -18,6 +19,7 @@ INSERT INTO "user_role" (user_id, role_id) VALUES(3,3);
|
|||||||
INSERT INTO "user" (name, pw) VALUES('cox', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$lnWzHx3DdqS9GQyWYel82kIotZuK2wk9EyfhPFtjNzs');
|
INSERT INTO "user" (name, pw) VALUES('cox', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$lnWzHx3DdqS9GQyWYel82kIotZuK2wk9EyfhPFtjNzs');
|
||||||
INSERT INTO "user_role" (user_id, role_id) VALUES(4,5);
|
INSERT INTO "user_role" (user_id, role_id) VALUES(4,5);
|
||||||
INSERT INTO "user_role" (user_id, role_id) VALUES(4,2);
|
INSERT INTO "user_role" (user_id, role_id) VALUES(4,2);
|
||||||
|
INSERT INTO "user_role" (user_id, role_id) VALUES(4,8);
|
||||||
INSERT INTO "user" (name) VALUES('new');
|
INSERT INTO "user" (name) VALUES('new');
|
||||||
INSERT INTO "user_role" (user_id, role_id) VALUES(5,5);
|
INSERT INTO "user_role" (user_id, role_id) VALUES(5,5);
|
||||||
INSERT INTO "user" (name, pw) VALUES('cox2', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$lnWzHx3DdqS9GQyWYel82kIotZuK2wk9EyfhPFtjNzs');
|
INSERT INTO "user" (name, pw) VALUES('cox2', '$argon2id$v=19$m=19456,t=2,p=1$dS/X5/sPEKTj4Rzs/CuvzQ$lnWzHx3DdqS9GQyWYel82kIotZuK2wk9EyfhPFtjNzs');
|
||||||
|
@ -1,21 +1,11 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
{% import "includes/forms/boat" as boat %}
|
{% import "includes/forms/boat" as boat %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if flash %}
|
{% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
<div class="max-w-screen-lg w-full">
|
||||||
{% endif %}
|
<h1 class="h1">Boats</h1>
|
||||||
|
{{ boat::new() }}
|
||||||
<div class="max-w-screen-lg w-full">
|
{% for boat in boats %}{{ boat::edit(boat=boat, uuid=loop.index) }}{% endfor %}
|
||||||
<h1 class="h1">Boats</h1>
|
</div>
|
||||||
{{ boat::new() }}
|
|
||||||
|
|
||||||
{% for boat in boats %}
|
|
||||||
{{ boat::edit(boat=boat, uuid=loop.index) }}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -1,27 +1,18 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
{% import "includes/forms/boat" as boat %}
|
{% import "includes/forms/boat" as boat %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if flash %}
|
{% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
<div class="max-w-screen-lg w-full">
|
||||||
{% endif %}
|
<h1 class="h1">Mail</h1>
|
||||||
|
<form action="/admin/mail" method="post" enctype="multipart/form-data">
|
||||||
<div class="max-w-screen-lg w-full">
|
<select name="role_id">
|
||||||
<h1 class="h1">Mail</h1>
|
{% for role in roles %}<option value="{{ role.id }}">{{ role.name }}</option>{% endfor %}
|
||||||
<form action="/admin/mail" method="post" enctype="multipart/form-data">
|
</select>
|
||||||
<select name="role_id">
|
<input type="text" name="subject" />
|
||||||
{% for role in roles %}
|
<textarea name="body" rows="4" cols="50"></textarea>
|
||||||
<option value="{{ role.id }}">{{ role.name }}</option>
|
<input type="file" name="files" multiple />
|
||||||
{% endfor %}
|
<input type="submit" />
|
||||||
</select>
|
</form>
|
||||||
<input type="text" name="subject" />
|
</div>
|
||||||
<textarea name="body" rows="4" cols="50"></textarea>
|
|
||||||
<input type="file" name="files" multiple />
|
|
||||||
<input type="submit" />
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -1,47 +1,44 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="max-w-screen-lg w-full bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5">
|
<div class="max-w-screen-lg w-full bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5">
|
||||||
{% if flash %}
|
{% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
<h1 class="h1">Gebühren</h1>
|
||||||
{% endif %}
|
<!-- START filterBar -->
|
||||||
|
<div class="search-wrapper">
|
||||||
<h1 class="h1">Gebühren</h1>
|
<label for="name" class="sr-only">Suche</label>
|
||||||
|
<input type="search"
|
||||||
<!-- START filterBar -->
|
name="name"
|
||||||
<div class="search-wrapper">
|
id="filter-js"
|
||||||
<label for="name" class="sr-only">Suche</label>
|
class="search-bar"
|
||||||
<input type="search" name="name" id="filter-js" class="search-bar" placeholder="Suchen nach Name"/>
|
placeholder="Suchen nach Name" />
|
||||||
</div>
|
</div>
|
||||||
<!-- END filterBar -->
|
<!-- END filterBar -->
|
||||||
|
<div class="bg-primary-100 dark:bg-primary-950 p-3 rounded-b-md grid gap-4">
|
||||||
<div class="bg-primary-100 dark:bg-primary-950 p-3 rounded-b-md grid gap-4">
|
<div id="filter-result-js"
|
||||||
<div id="filter-result-js" class="text-primary-950 dark:text-white text-right"></div>
|
class="text-primary-950 dark:text-white text-right"></div>
|
||||||
|
{% for fee in fees | sort(attribute="name") %}
|
||||||
{% for fee in fees | sort(attribute="name") %}
|
<div {% if fee.paid %}style="background-color: green;"{% endif %}
|
||||||
<div {% if fee.paid %} style="background-color: green;" {% endif %} data-filterable="true" data-filter="{{ fee.name }} {% if fee.paid %} has-already-paid {% else %} has-not-paid {% endif %}" class="bg-white dark:bg-primary-900 p-3 rounded-md w-full">
|
data-filterable="true"
|
||||||
<div class="grid sm:grid-cols-1 gap-3">
|
data-filter="{{ fee.name }} {% if fee.paid %} has-already-paid {% else %} has-not-paid {% endif %}"
|
||||||
<div style="width: 100%" class="col-span-2">
|
class="bg-white dark:bg-primary-900 p-3 rounded-md w-full">
|
||||||
<b>{{ fee.name }}</b>
|
<div class="grid sm:grid-cols-1 gap-3">
|
||||||
</div>
|
<div style="width: 100%" class="col-span-2">
|
||||||
<div style="width: 100%">
|
<b>{{ fee.name }}</b>
|
||||||
{{ fee.sum_in_cents / 100 }}€:
|
</div>
|
||||||
</div>
|
<div style="width: 100%">{{ fee.sum_in_cents / 100 }}€:</div>
|
||||||
<div style="width: 100%">
|
<div style="width: 100%">
|
||||||
{% for p in fee.parts %}
|
{% for p in fee.parts %}
|
||||||
{{ p.0 }} ({{ p.1 / 100 }}€) {% if not loop.last %} + {% endif %}
|
{{ p.0 }} ({{ p.1 / 100 }}€)
|
||||||
{% endfor %}
|
{% if not loop.last %}+{% endif %}
|
||||||
</div>
|
{% endfor %}
|
||||||
{% if "admin" in loggedin_user.roles %}
|
</div>
|
||||||
<a href="/admin/user/fees/paid?{{ fee.user_ids }}">Zahlungsstatus ändern</a>
|
{% if "admin" in loggedin_user.roles %}
|
||||||
{% endif %}
|
<a href="/admin/user/fees/paid?{{ fee.user_ids }}">Zahlungsstatus ändern</a>
|
||||||
</div>
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
</div>
|
||||||
</div>
|
{% endfor %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -1,98 +1,97 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
{% if flash %}
|
{% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
<h1 class="h1">Users</h1>
|
||||||
{% endif %}
|
{% if allowed_to_edit %}
|
||||||
|
<form action="/admin/user/new"
|
||||||
<h1 class="h1">Users</h1>
|
method="post"
|
||||||
|
class="mt-4 bg-primary-900 rounded-md text-white px-3 pb-3 pt-2 sm:flex items-end justify-between">
|
||||||
{% if allowed_to_edit %}
|
<div class="w-full">
|
||||||
<form action="/admin/user/new" method="post" class="mt-4 bg-primary-900 rounded-md text-white px-3 pb-3 pt-2 sm:flex items-end justify-between">
|
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">Neuen User hinzufügen</h2>
|
||||||
<div class="w-full">
|
<div class="grid md:grid-cols-3">
|
||||||
<h2 class="text-md font-bold mb-2 uppercase tracking-wide">Neuen User hinzufügen</h2>
|
<div>
|
||||||
<div class="grid md:grid-cols-3">
|
<label for="name" class="sr-only">Name</label>
|
||||||
<div>
|
<input type="text"
|
||||||
<label for="name" class="sr-only">Name</label>
|
name="name"
|
||||||
<input type="text" name="name" class="relative block rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 mb-2 md:mb-0" placeholder="Name"/>
|
class="relative block rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 mb-2 md:mb-0"
|
||||||
</div>
|
placeholder="Name" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
</div>
|
||||||
<input value="Hinzufügen" type="submit" class="w-28 mt-2 sm:mt-0 rounded-md bg-primary-500 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"/>
|
<div class="text-right">
|
||||||
</div>
|
<input value="Hinzufügen"
|
||||||
</form>
|
type="submit"
|
||||||
{% endif %}
|
class="w-28 mt-2 sm:mt-0 rounded-md bg-primary-500 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer" />
|
||||||
|
</div>
|
||||||
<!-- START filterBar -->
|
</form>
|
||||||
<div class="search-wrapper">
|
{% endif %}
|
||||||
<label for="name" class="sr-only">Suche</label>
|
<!-- START filterBar -->
|
||||||
<input type="search" name="name" id="filter-js" class="search-bar" placeholder="Suchen nach (Name, [yes|no]-role:<name>)"/>
|
<div class="search-wrapper">
|
||||||
</div>
|
<label for="name" class="sr-only">Suche</label>
|
||||||
<!-- END filterBar -->
|
<input type="search"
|
||||||
|
name="name"
|
||||||
<div class="bg-primary-100 dark:bg-primary-950 p-3 rounded-b-md grid gap-4">
|
id="filter-js"
|
||||||
<div id="filter-result-js" class="text-primary-950 dark:text-white text-right"></div>
|
class="search-bar"
|
||||||
{% for user in users %}
|
placeholder="Suchen nach (Name, [yes|no]-role:<name>)" />
|
||||||
<div data-filterable="true" data-filter="{{ user.name }}
|
|
||||||
{% for role in roles %}
|
|
||||||
{% if role.name in user.roles %}
|
|
||||||
yes-role:{{role.name}}
|
|
||||||
{% else %}
|
|
||||||
no-role:{{role.name}}
|
|
||||||
{% endif %}
|
|
||||||
role-{{role}}
|
|
||||||
{% endfor%}
|
|
||||||
|
|
||||||
">
|
|
||||||
<form action="/admin/user" method="post" class="bg-white dark:bg-primary-900 p-3 rounded-md w-full">
|
|
||||||
<div class="w-full grid gap-3">
|
|
||||||
<input type="hidden" name="id" value="{{ user.id }}"/>
|
|
||||||
<div class="font-bold mb-1 text-black dark:text-white">{{ user.name }}
|
|
||||||
{% if user.last_access %}
|
|
||||||
(last access:
|
|
||||||
{{ user.last_access | date }})
|
|
||||||
{% endif %}
|
|
||||||
{% if user.pw %}
|
|
||||||
<a class="block mt-1 font-normal text-primary-600 dark:text-primary-200 hover:text-primary-900 dark:hover:text-primary-300 underline" href="/admin/user/{{ user.id }}/reset-pw">Passwort zurücksetzen</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<div class="grid sm:grid-cols-2 lg:grid-cols-4 gap-3">
|
|
||||||
{% for role in roles %}
|
|
||||||
{{ macros::checkbox(label=role.name, name="roles[" ~ role.id ~ "]", id=loop.index , checked=role.name in user.roles, disabled=allowed_to_edit == false) }}
|
|
||||||
{% endfor%}
|
|
||||||
{{ macros::input(label='DOB', name='dob', id=loop.index, type="text", value=user.dob, readonly=allowed_to_edit == false) }}
|
|
||||||
{{ macros::input(label='Weight (kg)', name='weight', id=loop.index, type="text", value=user.weight, readonly=allowed_to_edit == false) }}
|
|
||||||
{{ macros::input(label='Sex', name='sex', id=loop.index, type="text", value=user.sex, readonly=allowed_to_edit == false) }}
|
|
||||||
{{ macros::input(label='Mitglied seit', name='member_since_date', id=loop.index, type="text", value=user.member_since_date, readonly=allowed_to_edit == false) }}
|
|
||||||
{{ macros::input(label='Geburtsdatum', name='birthdate', id=loop.index, type="text", value=user.birthdate, readonly=allowed_to_edit == false) }}
|
|
||||||
{{ macros::input(label='Mail', name='mail', id=loop.index, type="text", value=user.mail, readonly=allowed_to_edit == false) }}
|
|
||||||
{{ macros::input(label='Nickname', name='nickname', id=loop.index, type="text", value=user.nickname, readonly=allowed_to_edit == false) }}
|
|
||||||
{{ macros::input(label='Notizen', name='notes', id=loop.index, type="text", value=user.notes, readonly=allowed_to_edit == false) }}
|
|
||||||
{{ macros::input(label='Telefon', name='phone', id=loop.index, type="text", value=user.phone, readonly=allowed_to_edit == false) }}
|
|
||||||
{{ macros::input(label='Adresse', name='address', id=loop.index, type="text", value=user.address, readonly=allowed_to_edit == false) }}
|
|
||||||
{% if allowed_to_edit %}
|
|
||||||
{{ macros::select(label="Familie", data=families, name='family_id', selected_id=user.family_id, display=['names'], default="Keine Familie", new_last_entry='Neue Familie anlegen') }}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% if allowed_to_edit %}
|
|
||||||
<div class="mt-3 text-right">
|
|
||||||
<a href="/admin/user/{{ user.id }}/delete" class="w-28 btn btn-alert" onclick="return confirm('Wirklich löschen?');">
|
|
||||||
{% include "includes/delete-icon" %}
|
|
||||||
Löschen
|
|
||||||
</a>
|
|
||||||
<input value="Ändern" type="submit" class="w-28 btn btn-primary ml-1"/>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
<!-- END filterBar -->
|
||||||
</div>
|
<div class="bg-primary-100 dark:bg-primary-950 p-3 rounded-b-md grid gap-4">
|
||||||
|
<div id="filter-result-js"
|
||||||
</div>
|
class="text-primary-950 dark:text-white text-right"></div>
|
||||||
|
{% for user in users %}
|
||||||
|
<div data-filterable="true"
|
||||||
|
data-filter="{{ user.name }} {% for role in roles %} {% if role.name in user.roles %} yes-role:{{ role.name }} {% else %} no-role:{{ role.name }} {% endif %} role-{{ role }} {% endfor %} ">
|
||||||
|
<form action="/admin/user"
|
||||||
|
method="post"
|
||||||
|
class="bg-white dark:bg-primary-900 p-3 rounded-md w-full">
|
||||||
|
<div class="w-full grid gap-3">
|
||||||
|
<input type="hidden" name="id" value="{{ user.id }}" />
|
||||||
|
<div class="font-bold mb-1 text-black dark:text-white">
|
||||||
|
{{ user.name }}
|
||||||
|
{% if user.last_access %}
|
||||||
|
(last access:
|
||||||
|
{{ user.last_access | date }})
|
||||||
|
{% endif %}
|
||||||
|
{% if user.pw %}
|
||||||
|
<a class="block mt-1 font-normal text-primary-600 dark:text-primary-200 hover:text-primary-900 dark:hover:text-primary-300 underline"
|
||||||
|
href="/admin/user/{{ user.id }}/reset-pw">Passwort zurücksetzen</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="grid sm:grid-cols-2 lg:grid-cols-4 gap-3">
|
||||||
|
{% for role in roles %}
|
||||||
|
{{ macros::checkbox(label=role.name, name="roles[" ~ role.id ~ "]", id=loop.index , checked=role.name in user.roles, disabled=allowed_to_edit == false) }}
|
||||||
|
{% endfor %}
|
||||||
|
{{ macros::input(label='DOB', name='dob', id=loop.index, type="text", value=user.dob, readonly=allowed_to_edit == false) }}
|
||||||
|
{{ macros::input(label='Weight (kg)', name='weight', id=loop.index, type="text", value=user.weight, readonly=allowed_to_edit == false) }}
|
||||||
|
{{ macros::input(label='Sex', name='sex', id=loop.index, type="text", value=user.sex, readonly=allowed_to_edit == false) }}
|
||||||
|
{{ macros::input(label='Mitglied seit', name='member_since_date', id=loop.index, type="text", value=user.member_since_date, readonly=allowed_to_edit == false) }}
|
||||||
|
{{ macros::input(label='Geburtsdatum', name='birthdate', id=loop.index, type="text", value=user.birthdate, readonly=allowed_to_edit == false) }}
|
||||||
|
{{ macros::input(label='Mail', name='mail', id=loop.index, type="text", value=user.mail, readonly=allowed_to_edit == false) }}
|
||||||
|
{{ macros::input(label='Nickname', name='nickname', id=loop.index, type="text", value=user.nickname, readonly=allowed_to_edit == false) }}
|
||||||
|
{{ macros::input(label='Notizen', name='notes', id=loop.index, type="text", value=user.notes, readonly=allowed_to_edit == false) }}
|
||||||
|
{{ macros::input(label='Telefon', name='phone', id=loop.index, type="text", value=user.phone, readonly=allowed_to_edit == false) }}
|
||||||
|
{{ macros::input(label='Adresse', name='address', id=loop.index, type="text", value=user.address, readonly=allowed_to_edit == false) }}
|
||||||
|
{% if allowed_to_edit %}
|
||||||
|
{{ macros::select(label="Familie", data=families, name='family_id', selected_id=user.family_id, display=['names'], default="Keine Familie", new_last_entry='Neue Familie anlegen') }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% if allowed_to_edit %}
|
||||||
|
<div class="mt-3 text-right">
|
||||||
|
<a href="/admin/user/{{ user.id }}/delete"
|
||||||
|
class="w-28 btn btn-alert"
|
||||||
|
onclick="return confirm('Wirklich löschen?');">
|
||||||
|
{% include "includes/delete-icon" %}
|
||||||
|
Löschen
|
||||||
|
</a>
|
||||||
|
<input value="Ändern" type="submit" class="w-28 btn btn-primary ml-1" />
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -1,39 +1,34 @@
|
|||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="w-full max-w-md space-y-8">
|
<div class="w-full max-w-md space-y-8">
|
||||||
<div>
|
<div>
|
||||||
<img class="mx-auto h-16 w-auto" src="https://rudernlinz.at/wp-content/uploads/2021/02/cropped-logo.png" alt="Logo Ruderassistent">
|
<img class="mx-auto h-16 w-auto"
|
||||||
<h1 class="mt-6 h1">Ruderassistent</h1>
|
src="https://rudernlinz.at/wp-content/uploads/2021/02/cropped-logo.png"
|
||||||
</div>
|
alt="Logo Ruderassistent">
|
||||||
|
<h1 class="mt-6 h1">Ruderassistent</h1>
|
||||||
{% if flash %}
|
</div>
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
{% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}
|
||||||
{% endif %}
|
<form class="mt-8 space-y-6" method="post" action="/auth">
|
||||||
<form class="mt-8 space-y-6" method="post" action="/auth">
|
<input type="hidden" name="remember" value="true">
|
||||||
<input type="hidden" name="remember" value="true">
|
<div class="-space-y-px rounded-md shadow-sm">
|
||||||
<div class="-space-y-px rounded-md shadow-sm">
|
<div>
|
||||||
<div>
|
{% if name %}
|
||||||
{% if name %}
|
{{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true,value=name, autofocus=true) }}
|
||||||
{{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true,value=name, autofocus=true) }}
|
{% else %}
|
||||||
{% else %}
|
{{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true, autofocus=true) }}
|
||||||
{{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true, autofocus=true) }}
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endif %}
|
<div>
|
||||||
</div>
|
{{ macros::input(label='Passwort', name='password', type='password', class='rounded-b-md',hide_label=true) }}
|
||||||
<div>
|
</div>
|
||||||
{{ macros::input(label='Passwort', name='password', type='password', class='rounded-b-md',hide_label=true) }}
|
</div>
|
||||||
</div>
|
<div>
|
||||||
</div>
|
<button type="submit"
|
||||||
|
class="group relative flex w-full justify-center btn btn-primary">
|
||||||
<div>
|
<span class="absolute inset-y-0 left-0 flex items-center pl-3">{% include "includes/lock-icon" %}</span>
|
||||||
<button type="submit" class="group relative flex w-full justify-center btn btn-primary">
|
Einloggen
|
||||||
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
</button>
|
||||||
{% include "includes/lock-icon" %}
|
</div>
|
||||||
</span>
|
</form>
|
||||||
Einloggen
|
</div>
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -1,30 +1,25 @@
|
|||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="w-full max-w-md space-y-8">
|
<div class="w-full max-w-md space-y-8">
|
||||||
<h1 class="mt-6 h1">Passwort setzen</h1>
|
<h1 class="mt-6 h1">Passwort setzen</h1>
|
||||||
|
<form class="mt-8 space-y-6" action="/auth/set-pw" method="post">
|
||||||
<form class="mt-8 space-y-6" action="/auth/set-pw" method="post">
|
<input type="hidden" name="remember" value="true">
|
||||||
<input type="hidden" name="remember" value="true">
|
<input type="hidden" name="userid" value="{{ userid }}" />
|
||||||
<input type="hidden" name="userid" value="{{ userid }}"/>
|
<div class="-space-y-px rounded-md shadow-sm">
|
||||||
<div class="-space-y-px rounded-md shadow-sm">
|
<div>
|
||||||
<div>
|
{{ macros::input(label='Passwort', name='password', type='password', required=true, class='rounded-t-md',hide_label=true) }}
|
||||||
{{ macros::input(label='Passwort', name='password', type='password', required=true, class='rounded-t-md',hide_label=true) }}
|
</div>
|
||||||
</div>
|
<div>
|
||||||
<div>
|
{{ macros::input(label='Passwort bestätigen', name='password_confirm', type='password', required=true, class='rounded-b-md',hide_label=true) }}
|
||||||
{{ macros::input(label='Passwort bestätigen', name='password_confirm', type='password', required=true, class='rounded-b-md',hide_label=true) }}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div>
|
||||||
|
<button type="submit"
|
||||||
<div>
|
class="group relative flex w-full justify-center btn btn-primary">
|
||||||
<button type="submit" class="group relative flex w-full justify-center btn btn-primary">
|
<span class="absolute inset-y-0 left-0 flex items-center pl-3">{% include "includes/lock-icon" %}</span>
|
||||||
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
Bestätigen
|
||||||
{% include "includes/lock-icon" %}
|
</button>
|
||||||
</span>
|
</div>
|
||||||
Bestätigen
|
</form>
|
||||||
</button>
|
</div>
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -1,46 +1,40 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport"
|
||||||
<link rel="manifest" href="public/manifest.json"/>
|
content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<link rel="stylesheet" href="/public/main.css"/>
|
<link rel="manifest" href="public/manifest.json" />
|
||||||
<link rel="icon" type="image/x-icon" href="/public/images/favicon.ico">
|
<link rel="stylesheet" href="/public/main.css" />
|
||||||
<title>Ruderassistent - ASKÖ Ruderverein Donau Linz</title>
|
<link rel="icon" type="image/x-icon" href="/public/images/favicon.ico">
|
||||||
</head>
|
<title>Ruderassistent - ASKÖ Ruderverein Donau Linz</title>
|
||||||
<body class="bg-gray-100 dark:bg-black">
|
</head>
|
||||||
{% if loggedin_user %}
|
<body class="bg-gray-100 dark:bg-black">
|
||||||
{{ macros::header(loggedin_user=loggedin_user) }}
|
{% if loggedin_user %}{{ macros::header(loggedin_user=loggedin_user) }}{% endif %}
|
||||||
{% endif %}
|
{% if show_kiosk_header %}
|
||||||
{% if show_kiosk_header %}
|
<header class="bg-primary-900 text-white flex justify-between px-4 py-3 w-full z-10 ">
|
||||||
<header class="bg-primary-900 text-white flex justify-between px-4 py-3 w-full z-10 ">
|
<div>
|
||||||
<div>
|
<a href="/log">Hü</a>
|
||||||
<a href="/log">
|
</div>
|
||||||
Hü
|
<div>
|
||||||
</a>
|
<a href="/log" class="px-2">Ausfahrt eintragen</a>
|
||||||
</div>
|
<a href="/log/show" class="px-2">Logbuch</a>
|
||||||
<div>
|
<a href="/stat" class="px-2">Statistik</a>
|
||||||
<a href="/log" class="px-2">Ausfahrt eintragen</a>
|
<a href="/stat/boats" class="px-2">Bootsauswertung</a>
|
||||||
<a href="/log/show" class="px-2">Logbuch</a>
|
<a href="/boatdamage" class="px-2">Bootsschaden</a>
|
||||||
<a href="/stat" class="px-2">Statistik</a>
|
</div>
|
||||||
<a href="/stat/boats" class="px-2">Bootsauswertung</a>
|
</header>
|
||||||
<a href="/boatdamage" class="px-2">Bootsschaden</a>
|
{% endif %}
|
||||||
</div>
|
<div class="flex min-h-screen {% if not loggedin_user and not show_kiosk_header %} items-center dark:bg-primary-900 {% else %} items-start {% endif %} justify-center px-4 py-12 sm:px-6 lg:px-8">
|
||||||
</header>
|
{% block content %}
|
||||||
{% endif %}
|
{% endblock content %}
|
||||||
|
</div>
|
||||||
<div class="flex min-h-screen {%if not loggedin_user and not show_kiosk_header %} items-center dark:bg-primary-900 {% else %} items-start {% endif %} justify-center px-4 py-12 sm:px-6 lg:px-8"> {% block content %}{% endblock content %}
|
{% if loggedin_user %}
|
||||||
</div>
|
{% include "includes/footer" %}
|
||||||
|
|
||||||
{% if loggedin_user %}
|
|
||||||
{% include "includes/footer" %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include "dynamics/sidebar" %}
|
{% include "dynamics/sidebar" %}
|
||||||
|
<script src="/public/main.js"></script>
|
||||||
<script src="/public/main.js"></script>
|
</body>
|
||||||
</body>
|
</html>
|
||||||
</html>
|
</body>
|
||||||
</body>
|
</html>
|
||||||
</html>
|
|
||||||
|
@ -1,87 +1,107 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
{% import "includes/forms/log" as log %}
|
{% import "includes/forms/log" as log %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="max-w-screen-lg w-full">
|
||||||
<div class="max-w-screen-lg w-full">
|
<h1 class="h1">Bootschäden</h1>
|
||||||
<h1 class="h1">Bootschäden</h1>
|
{% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3 mt-3") }}{% endif %}
|
||||||
|
<h2 class="text-md font-bold tracking-wide bg-primary-900 mt-3 p-3 text-white flex justify-between items-center rounded-md">
|
||||||
{% if flash %}
|
Neuen Schaden
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3 mt-3") }}
|
<a href="#"
|
||||||
{% endif %}
|
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
|
||||||
|
data-sidebar="true"
|
||||||
<h2 class="text-md font-bold tracking-wide bg-primary-900 mt-3 p-3 text-white flex justify-between items-center rounded-md">
|
data-trigger="sidebar"
|
||||||
Neuen Schaden
|
data-header="Neuen Schaden anlegen"
|
||||||
|
data-body="#new-damage">
|
||||||
<a href="#" class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
|
{% include "includes/plus-icon" %}
|
||||||
data-sidebar="true" data-trigger="sidebar" data-header="Neuen Schaden anlegen" data-body="#new-damage">
|
<span class="sr-only">Neuen Schaden eintragen</span>
|
||||||
{% include "includes/plus-icon" %}
|
</a>
|
||||||
<span class="sr-only">Neuen Schaden eintragen</span>
|
</h2>
|
||||||
</a>
|
<div class="hidden">
|
||||||
</h2>
|
<div id="new-damage">
|
||||||
|
<form action="/boatdamage" method="post" class="grid gap-3">
|
||||||
<div class="hidden">
|
{{ log::boat_select(only_ones=false, id='boat') }}
|
||||||
<div id="new-damage">
|
{% if not loggedin_user %}{{ macros::select(label='Gemeldet von', data=user, name='user_id') }}{% endif %}
|
||||||
<form action="/boatdamage" method="post" class="grid gap-3">
|
{{ macros::input(label='Beschreibung des Schadens', name='desc', type='text', required=true, wrapper_class='col-span-4') }}
|
||||||
{{ log::boat_select(only_ones=false, id='boat') }}
|
<div class="col-span-4">
|
||||||
{% if not loggedin_user %}
|
{{ macros::checkbox(label='Boot sperren', name='lock_boat', type='text', required=true) }}
|
||||||
{{ macros::select(label='Gemeldet von', data=user, name='user_id') }}
|
</div>
|
||||||
{% endif %}
|
<input type="submit"
|
||||||
{{ macros::input(label='Beschreibung des Schadens', name='desc', type='text', required=true, wrapper_class='col-span-4') }}
|
class="btn btn-primary w-full col-span-4"
|
||||||
<div class="col-span-4">
|
value="Schaden eintragen" />
|
||||||
{{ macros::checkbox(label='Boot sperren', name='lock_boat', type='text', required=true) }}
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="submit" class="btn btn-primary w-full col-span-4" value="Schaden eintragen" />
|
<div class="search-wrapper">
|
||||||
</form>
|
<label for="name" class="sr-only">Suche</label>
|
||||||
|
<input type="search"
|
||||||
|
name="name"
|
||||||
|
id="filter-js"
|
||||||
|
class="search-bar"
|
||||||
|
placeholder="Suchen nach Namen...">
|
||||||
|
</div>
|
||||||
|
<div id="filter-result-js" class="search-result"></div>
|
||||||
|
{% for boatdamage in boatdamages | sort(attribute="verified") %}
|
||||||
|
<div data-filterable="true"
|
||||||
|
data-filter="{{ boatdamage.boat.name }} {{ boatdamage.user_created.name }}"
|
||||||
|
class="w-full border-t bg-white dark:bg-primary-900 text-black dark:text-white p-3 {% if boatdamage.verified_at %}opacity-50{% endif %}">
|
||||||
|
<div class="w-full">
|
||||||
|
<strong>{{ boatdamage.created_at | date(format='%d.%m.%Y') }} <span class="font-normal text-gray-600 dark:text-gray-100">({{ boatdamage.boat.name }})</span></strong>
|
||||||
|
{% if boatdamage.boat.damage %}
|
||||||
|
<small class="block text-gray-600 dark:text-gray-100">(Boot gesperrt)</small>
|
||||||
|
{% endif %}
|
||||||
|
<div>{{ boatdamage.desc }}</div>
|
||||||
|
<small class="block text-gray-600 dark:text-gray-100">
|
||||||
|
Schaden eingetragen von {{ boatdamage.user_created.name }} am/um {{ boatdamage.created_at | date(format='%d.%m.%Y (%H:%M)') }}
|
||||||
|
</small>
|
||||||
|
{% if boatdamage.fixed_at %}
|
||||||
|
<small class="block text-gray-600 dark:text-gray-100">Repariert von {{ boatdamage.user_fixed.name }} am/um {{ boatdamage.fixed_at | date(format='%d.%m.%Y (%H:%M)') }}</small>
|
||||||
|
{% else %}
|
||||||
|
{% if loggedin_user and "cox" in loggedin_user.roles %}
|
||||||
|
<form action="/boatdamage/{{ boatdamage.id }}/fixed"
|
||||||
|
method="post"
|
||||||
|
class="flex justify-between mt-3">
|
||||||
|
<input type="text"
|
||||||
|
name="desc"
|
||||||
|
value="{{ boatdamage.desc }}"
|
||||||
|
class="grow input rounded-s" />
|
||||||
|
{% if loggedin_user and "tech" in loggedin_user.roles %}
|
||||||
|
<input type="submit"
|
||||||
|
class="btn btn-primary"
|
||||||
|
style="border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0"
|
||||||
|
value="Repariert und verifiziert" />
|
||||||
|
{% else %}
|
||||||
|
<input type="submit"
|
||||||
|
class="btn btn-primary"
|
||||||
|
style="border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0"
|
||||||
|
value="Repariert" />
|
||||||
|
{% endif %}
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% if boatdamage.verified_at %}
|
||||||
|
<small class="block text-gray-600 dark:text-gray-100">Verifziert von {{ boatdamage.user_verified.name }} am/um {{ boatdamage.verified_at | date(format='%d.%m.%Y (%H:%M)') }}</small>
|
||||||
|
{% else %}
|
||||||
|
{% if loggedin_user and "tech" in loggedin_user.roles and boatdamage.fixed_at %}
|
||||||
|
<form action="/boatdamage/{{ boatdamage.id }}/verified"
|
||||||
|
method="post"
|
||||||
|
class="flex justify-between mt-3">
|
||||||
|
<input type="text"
|
||||||
|
name="desc"
|
||||||
|
value="{{ boatdamage.desc }}"
|
||||||
|
class="grow input rounded-s" />
|
||||||
|
<input type="submit"
|
||||||
|
class="btn btn-dark"
|
||||||
|
style="border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0"
|
||||||
|
value="Verifiziert" />
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endblock content %}
|
||||||
|
|
||||||
<div class="search-wrapper">
|
|
||||||
<label for="name" class="sr-only">Suche</label>
|
|
||||||
<input type="search" name="name" id="filter-js" class="search-bar" placeholder="Suchen nach Namen...">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="filter-result-js" class="search-result"></div>
|
|
||||||
|
|
||||||
{% for boatdamage in boatdamages | sort(attribute="verified") %}
|
|
||||||
<div data-filterable="true" data-filter="{{ boatdamage.boat.name }} {{ boatdamage.user_created.name }}" class="w-full border-t bg-white dark:bg-primary-900 text-black dark:text-white p-3 {% if boatdamage.verified_at %} opacity-50 {% endif %}">
|
|
||||||
<div class="w-full">
|
|
||||||
<strong>{{ boatdamage.created_at | date(format='%d.%m.%Y') }} <span class="font-normal text-gray-600 dark:text-gray-100">({{ boatdamage.boat.name }})</span></strong>{% if boatdamage.boat.damage %}<small class="block text-gray-600 dark:text-gray-100">(Boot gesperrt)</small>{% endif %}
|
|
||||||
<div>{{ boatdamage.desc }}</div>
|
|
||||||
<small class="block text-gray-600 dark:text-gray-100">
|
|
||||||
Schaden eingetragen von {{ boatdamage.user_created.name }} am/um {{ boatdamage.created_at | date(format='%d.%m.%Y (%H:%M)') }}
|
|
||||||
</small>
|
|
||||||
|
|
||||||
{% if boatdamage.fixed_at %}
|
|
||||||
<small class="block text-gray-600 dark:text-gray-100">Repariert von {{ boatdamage.user_fixed.name }} am/um {{ boatdamage.fixed_at | date(format='%d.%m.%Y (%H:%M)') }}</small>
|
|
||||||
{% else %}
|
|
||||||
{% if loggedin_user and "cox" in loggedin_user.roles %}
|
|
||||||
<form action="/boatdamage/{{ boatdamage.id }}/fixed" method="post" class="flex justify-between mt-3">
|
|
||||||
<input type="text" name="desc" value="{{ boatdamage.desc }}" class="grow input rounded-s" />
|
|
||||||
{% if loggedin_user and "tech" in loggedin_user.roles %}
|
|
||||||
<input type="submit" class="btn btn-primary" style="border-top-left-radius: 0; border-bottom-left-radius: 0;" value="Repariert und verifiziert" />
|
|
||||||
{% else %}
|
|
||||||
<input type="submit" class="btn btn-primary" style="border-top-left-radius: 0; border-bottom-left-radius: 0;" value="Repariert" />
|
|
||||||
{% endif %}
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if boatdamage.verified_at %}
|
|
||||||
<small class="block text-gray-600 dark:text-gray-100">Verifziert von {{ boatdamage.user_verified.name }} am/um {{ boatdamage.verified_at | date(format='%d.%m.%Y (%H:%M)') }}</small>
|
|
||||||
{% else %}
|
|
||||||
{% if loggedin_user and "tech" in loggedin_user.roles and boatdamage.fixed_at %}
|
|
||||||
<form action="/boatdamage/{{ boatdamage.id }}/verified" method="post" class="flex justify-between mt-3">
|
|
||||||
<input type="text" name="desc" value="{{ boatdamage.desc }}" class="grow input rounded-s"/>
|
|
||||||
<input type="submit" class="btn btn-dark" style="border-top-left-radius: 0; border-bottom-left-radius: 0;" value="Verifiziert" />
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock content%}
|
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
<div class="sidebar slide-in from-right bg-white dark:bg-primary-950 dark:text-white" id="sidebar" aria-modal="false">
|
<div class="sidebar slide-in from-right bg-white dark:bg-primary-950 dark:text-white"
|
||||||
<div class="bg-primary-900 text-white px-2 py-3 flex justify-between sidebar-header">
|
id="sidebar"
|
||||||
<div>
|
aria-modal="false">
|
||||||
<span class="ps-1 header-js">
|
<div class="bg-primary-900 text-white px-2 py-3 flex justify-between sidebar-header">
|
||||||
Überschrift (wird ersetzt)
|
<div>
|
||||||
</span>
|
<span class="ps-1 header-js">Überschrift (wird ersetzt)</span>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" title="Ausfahrt erstellen schließen" class="sidebar-close border-0 bg-primary-100 focus:bg-primary-50 text-black flex items-center justify-center transform rotate-45" data-trigger="sidebar">
|
<button type="button"
|
||||||
{% include "includes/plus-icon" %}
|
title="Ausfahrt erstellen schließen"
|
||||||
</button>
|
class="sidebar-close border-0 bg-primary-100 focus:bg-primary-50 text-black flex items-center justify-center transform rotate-45"
|
||||||
</div>
|
data-trigger="sidebar">{% include "includes/plus-icon" %}</button>
|
||||||
<div class="body-js px-2 pt-2">
|
</div>
|
||||||
Formular wird ersetzt
|
<div class="body-js px-2 pt-2">Formular wird ersetzt</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="sidebar-overlay" data-trigger="sidebar"></div>
|
<div class="sidebar-overlay" data-trigger="sidebar"></div>
|
||||||
|
@ -1,36 +1,40 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
{% if flash %}
|
{% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
<h1 class="h1">Aktuelle Woche</h1>
|
||||||
{% endif %}
|
<details>
|
||||||
|
<summary>Dirty Thirty</summary>
|
||||||
<h1 class="h1">Aktuelle Woche</h1>
|
<p>
|
||||||
<details>
|
<div class="border-r border-l">
|
||||||
<summary>Dirty Thirty</summary>
|
{% for stat in thirty %}
|
||||||
<p>
|
{% set names = stat.name | split(pat=" ") %}{% set lastname_index = names | length - 1 %}{% set lastname = names[lastname_index] %}{{ lastname }}	
|
||||||
<div class="border-r border-l">
|
{% for name in names %}
|
||||||
{% for stat in thirty %}{% set names = stat.name | split(pat=" ") %}{% set lastname_index = names | length - 1 %}{% set lastname = names[lastname_index] %}{{ lastname }}	{% for name in names %}{% if loop.index != lastname_index +1 %}{{ name }} {% endif %}{% endfor %}	{{ stat.dob }}	{{ stat.weight }}	{{ stat.sex }}		DLI	{{ stat.result }}
|
{% if loop.index != lastname_index +1 %}{{ name }}{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
	{{ stat.dob }}	{{ stat.weight }}	{{ stat.sex }}		DLI	{{ stat.result }}
|
||||||
</p>
|
{% endfor %}
|
||||||
</details>
|
</div>
|
||||||
|
</p>
|
||||||
<details>
|
</details>
|
||||||
<summary>Dirty Dozen</summary>
|
<details>
|
||||||
<p>
|
<summary>Dirty Dozen</summary>
|
||||||
<div class="border-r border-l">{% for stat in dozen %}
|
<p>
|
||||||
{% set names = stat.name | split(pat=" ") %}
|
<div class="border-r border-l">
|
||||||
{% set lastname_index = names | length - 1 %}
|
{% for stat in dozen %}
|
||||||
{% set lastname = names[lastname_index] %}
|
{% set names = stat.name | split(pat=" ") %}
|
||||||
{{ lastname }};{% for name in names %}{% if loop.index != lastname_index +1 %}{{ name }} {% endif %}{% endfor %};{{ stat.dob }};{{ stat.weight }};{{ stat.sex }};DLI;{{ stat.result }}<br />
|
{% set lastname_index = names | length - 1 %}
|
||||||
{% endfor %}
|
{% set lastname = names[lastname_index] %}
|
||||||
</div>
|
{{ lastname }};
|
||||||
</p>
|
{% for name in names %}
|
||||||
</details>
|
{% if loop.index != lastname_index +1 %}{{ name }}{% endif %}
|
||||||
</div>
|
{% endfor %}
|
||||||
|
;{{ stat.dob }};{{ stat.weight }};{{ stat.sex }};DLI;{{ stat.result }}
|
||||||
{% endblock content%}
|
<br />
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
{% endblock content %}
|
||||||
|
@ -1,174 +1,206 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
<h1 class="h1">Ergo Challenges</h1>
|
<h1 class="h1">Ergo Challenges</h1>
|
||||||
|
{% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="my-3") }}{% endif %}
|
||||||
{% if flash %}
|
<div class="grid gap-3">
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="my-3") }}
|
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
|
||||||
{% endif %}
|
role="alert">
|
||||||
|
<h2 class="h2">Ergo-Challenge?!</h2>
|
||||||
<div class="grid gap-3">
|
<div class="text-sm p-3">
|
||||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" role="alert">
|
<ul class="list-disc ms-2">
|
||||||
<h2 class="h2">Ergo-Challenge?!</h2>
|
<li class="py-1">
|
||||||
<div class="text-sm p-3">
|
<a href="https://rudernlinz.at/termin"
|
||||||
<ul class="list-disc ms-2">
|
target="_blank"
|
||||||
<li class="py-1"><a href="https://rudernlinz.at/termin" target="_blank" class="link-primary">Überblick der Challenges</a></li>
|
class="link-primary">Überblick der Challenges</a>
|
||||||
<li class="py-1">Eintragung ist jederzeit möglich, alle Daten die bis Sonntag 23:59 hier hochgeladen wurden, werden gesammelt an die Ister Ergo Challenge geschickt
|
</li>
|
||||||
<li class="py-1">Dienstag + Donnerstag → gemeinsames Training; bitte um <a href="/" class="link-primary">Anmeldung</a>, damit jeder einen Ergo hat</li>
|
<li class="py-1">
|
||||||
<li class="py-1">Offizielle Ergebnisse: <a href="https://rudernlinz.at/dt" target="_blank" style="text-decoration: underline;">Dirty Thirty (rudernlinz.at/dt)</a> / <a href="https://rudernlinz.at/dd" target="_blank" style="text-decoration: underline;">Dirty Dozen (rudernlinz.at/dd)</a>, bei Fehlern direkt mit <a href="mailto:office@ergochallenge.at" style="text-decoration: underline;">Christian (Ister)</a> Kontakt aufnehmen</li>
|
Eintragung ist jederzeit möglich, alle Daten die bis Sonntag 23:59 hier hochgeladen wurden, werden gesammelt an die Ister Ergo Challenge geschickt
|
||||||
<li class="py-1"><a href="https://cloud.rudernlinz.at/s/m7mPQdwSWscpaXT" target="_blank" class="link-primary">Noch mehr Infos zur Ergo-Challenge findest du hier</a></li>
|
<li class="py-1">
|
||||||
</ul>
|
Dienstag + Donnerstag → gemeinsames Training; bitte um <a href="/" class="link-primary">Anmeldung</a>, damit jeder einen Ergo hat
|
||||||
|
</li>
|
||||||
|
<li class="py-1">
|
||||||
|
Offizielle Ergebnisse: <a href="https://rudernlinz.at/dt"
|
||||||
|
target="_blank"
|
||||||
|
style="text-decoration: underline">Dirty Thirty (rudernlinz.at/dt)</a> / <a href="https://rudernlinz.at/dd"
|
||||||
|
target="_blank"
|
||||||
|
style="text-decoration: underline">Dirty Dozen (rudernlinz.at/dd)</a>, bei Fehlern direkt mit <a href="mailto:office@ergochallenge.at"
|
||||||
|
style="text-decoration: underline">Christian (Ister)</a> Kontakt aufnehmen
|
||||||
|
</li>
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="https://cloud.rudernlinz.at/s/m7mPQdwSWscpaXT"
|
||||||
|
target="_blank"
|
||||||
|
class="link-primary">Noch mehr Infos zur Ergo-Challenge findest du hier</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<details class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md p-2">
|
||||||
|
<summary class="cursor-pointer">Deine Daten</summary>
|
||||||
|
<div class="pt-3">
|
||||||
|
<p>
|
||||||
|
Folgende Daten hat der Ruderassistent von dir. Wenn diese nicht mehr aktuell sind, bitte gewünschte Änderungen an Philipp melden (Tel. nr siehe Signal, oder an <a href="mailto:it@rudernlinz.at"
|
||||||
|
class="text-primary-600 dark:text-primary-200 hover:text-primary-950 hover:dark:text-primary-300 underline"
|
||||||
|
target="_blank">it@rudernlinz.at</a>).
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<ul>
|
||||||
|
<li>Geburtsdatum: {{ loggedin_user.dob }}</li>
|
||||||
|
<li>Gewicht: {{ loggedin_user.weight }} kg</li>
|
||||||
|
<li>Geschlecht: {{ loggedin_user.sex }}</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow grid gap-3">
|
||||||
|
<h2 class="h2">
|
||||||
|
Neuer Eintrag
|
||||||
|
</h1>
|
||||||
|
<details class="p-2">
|
||||||
|
<summary class="cursor-pointer">Dirty Thirty</summary>
|
||||||
|
<div class="mt-3">
|
||||||
|
<form action="/ergo/thirty"
|
||||||
|
class="grid gap-3"
|
||||||
|
method="post"
|
||||||
|
enctype="multipart/form-data">
|
||||||
|
<div>
|
||||||
|
<label for="user-thirty" class="text-sm text-gray-600 dark:text-gray-100">Ergo-Fahrer</label>
|
||||||
|
<select name="user" id="user-thirty" class="input rounded-md">
|
||||||
|
<option disabled="disabled">User auswählen</option>
|
||||||
|
{% for user in users %}
|
||||||
|
{% if user.id == loggedin_user.id %}
|
||||||
|
<option value="{{ user.id }}" selected="selected">{{ user.name }}</option>
|
||||||
|
{% else %}
|
||||||
|
<option value="{{ user.id }}">{{ user.name }}</option>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{{ macros::input(label="Distanz [m]", name="result", required=true, type="number", class="input rounded-md") }}
|
||||||
|
<div>
|
||||||
|
<label for="file-thirty" class="text-sm text-gray-600 dark:text-gray-100">Ergebnis-Foto vom Ergo-Display</label>
|
||||||
|
<input type="file"
|
||||||
|
id="file-thirty"
|
||||||
|
name="proof"
|
||||||
|
class="input rounded-md"
|
||||||
|
accept="image/*">
|
||||||
|
</div>
|
||||||
|
<div class="text-end">
|
||||||
|
<input type="submit" value="Speichern" class="btn btn-primary btn-fw m-auto" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
<details class="p-2">
|
||||||
|
<summary class="cursor-pointer">Dirty Dozen</summary>
|
||||||
|
<div class="mt-3">
|
||||||
|
<form action="/ergo/dozen"
|
||||||
|
class="grid gap-3"
|
||||||
|
method="post"
|
||||||
|
enctype="multipart/form-data">
|
||||||
|
<div>
|
||||||
|
<label for="user-dozen" class="text-sm text-gray-600 dark:text-gray-100">Ergo-Fahrer</label>
|
||||||
|
<select name="user" id="user-dozen" class="input rounded-md">
|
||||||
|
<option disabled="disabled">User auswählen</option>
|
||||||
|
{% for user in users %}
|
||||||
|
{% if user.id == loggedin_user.id %}
|
||||||
|
<option value="{{ user.id }}" selected="selected">{{ user.name }}</option>
|
||||||
|
{% else %}
|
||||||
|
<option value="{{ user.id }}">{{ user.name }}</option>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{{ macros::input(label="Zeit [hh:mm:ss.s] oder Distanz [m]", name="result", required=true, type="text", class="input rounded-md", pattern="(?:\d+:\d{2}:\d{2}\.\d+|\d{1,2}:\d{2}\.\d+|\d+(\.\d+)?)") }}
|
||||||
|
<div>
|
||||||
|
<label for="file-dozen" class="text-sm text-gray-600 dark:text-gray-100">Ergebnis-Foto vom Ergo-Display</label>
|
||||||
|
<input type="file"
|
||||||
|
id="file-dozen"
|
||||||
|
name="proof"
|
||||||
|
class="input rounded-md"
|
||||||
|
accept="image/*">
|
||||||
|
</div>
|
||||||
|
<div class="text-end">
|
||||||
|
<input type="submit" value="Speichern" class="btn btn-primary btn-fw m-auto" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow grid gap-3">
|
||||||
|
<h2 class="h2">Aktuelle Woche</h2>
|
||||||
|
<details class="p-2">
|
||||||
|
<summary class="cursor-pointer">
|
||||||
|
Dirty Thirty <small class="text-gray-600 dark:text-white">({{ thirty | length }})</small>
|
||||||
|
</summary>
|
||||||
|
<div class="mt-3">
|
||||||
|
<ol>
|
||||||
|
{% for stat in thirty %}
|
||||||
|
<li>
|
||||||
|
<strong>{{ stat.name }}:</strong> {{ stat.result }}
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
<details class="p-2">
|
||||||
|
<summary class="cursor-pointer">
|
||||||
|
Dirty Dozen <small class="text-gray-600 dark:text-white">({{ dozen | length }})</small>
|
||||||
|
</summary>
|
||||||
|
<div class="mt-3">
|
||||||
|
<ol>
|
||||||
|
{% for stat in dozen %}
|
||||||
|
<li>
|
||||||
|
<strong>{{ stat.name }}:</strong> {{ stat.result }}
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
{% if "admin" in loggedin_user.roles %}
|
||||||
|
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow grid gap-3">
|
||||||
|
<h2 class="h2">Update</h2>
|
||||||
|
<details class="p-2">
|
||||||
|
<summary class="cursor-pointer">
|
||||||
|
Dirty Thirty <small class="text-gray-600 dark:text-white">({{ thirty | length }})</small>
|
||||||
|
</summary>
|
||||||
|
<div class="mt-3">
|
||||||
|
<ol>
|
||||||
|
{% for stat in thirty %}
|
||||||
|
<li>
|
||||||
|
<form action="/ergo/thirty/user/{{ stat.id }}/new" method="get">
|
||||||
|
{{ stat.name }}:
|
||||||
|
<input type="text" value="{{ stat.result }}" name="new" style="color: black" />
|
||||||
|
<input type="submit" />
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
<details class="p-2">
|
||||||
|
<summary class="cursor-pointer">
|
||||||
|
Dirty Dozen <small class="text-gray-600 dark:text-white">({{ dozen | length }})</small>
|
||||||
|
</summary>
|
||||||
|
<div class="mt-3">
|
||||||
|
<ol>
|
||||||
|
{% for stat in dozen %}
|
||||||
|
<li>
|
||||||
|
<form action="/ergo/dozen/user/{{ stat.id }}/new" method="get">
|
||||||
|
{{ stat.name }}:
|
||||||
|
<input type="text" value="{{ stat.result }}" name="new" style="color: black" />
|
||||||
|
<input type="submit" />
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<details class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md p-2">
|
|
||||||
<summary class="cursor-pointer">Deine Daten</summary>
|
|
||||||
<div class="pt-3">
|
|
||||||
<p>
|
|
||||||
Folgende Daten hat der Ruderassistent von dir. Wenn diese nicht mehr aktuell sind, bitte gewünschte Änderungen an Philipp melden (Tel. nr siehe Signal, oder an <a href="mailto:it@rudernlinz.at" class="text-primary-600 dark:text-primary-200 hover:text-primary-950 hover:dark:text-primary-300 underline" target="_blank">it@rudernlinz.at</a>).
|
|
||||||
<br /><br />
|
|
||||||
<ul>
|
|
||||||
<li>Geburtsdatum: {{ loggedin_user.dob }}</li>
|
|
||||||
<li>Gewicht: {{ loggedin_user.weight}} kg</li>
|
|
||||||
<li>Geschlecht: {{ loggedin_user.sex}}</li>
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow grid gap-3">
|
|
||||||
<h2 class="h2">Neuer Eintrag</h1>
|
|
||||||
|
|
||||||
<details class="p-2">
|
|
||||||
<summary class="cursor-pointer">Dirty Thirty</summary>
|
|
||||||
<div class="mt-3">
|
|
||||||
<form action="/ergo/thirty" class="grid gap-3" method="post" enctype="multipart/form-data">
|
|
||||||
<div>
|
|
||||||
<label for="user-thirty" class="text-sm text-gray-600 dark:text-gray-100">Ergo-Fahrer</label>
|
|
||||||
<select name="user" id="user-thirty" class="input rounded-md">
|
|
||||||
<option disabled="disabled">User auswählen</option>
|
|
||||||
{% for user in users %}
|
|
||||||
{% if user.id == loggedin_user.id %}
|
|
||||||
<option value="{{ user.id }}" selected="selected">{{ user.name }}</option>
|
|
||||||
{% else %}
|
|
||||||
<option value="{{ user.id }}">{{ user.name }}</option>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ macros::input(label="Distanz [m]", name="result", required=true, type="number", class="input rounded-md") }}
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="file-thirty" class="text-sm text-gray-600 dark:text-gray-100">Ergebnis-Foto vom Ergo-Display</label>
|
|
||||||
<input type="file" id="file-thirty" name="proof" class="input rounded-md" accept="image/*">
|
|
||||||
</div>
|
|
||||||
<div class="text-end">
|
|
||||||
<input type="submit" value="Speichern" class="btn btn-primary btn-fw m-auto"/>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details class="p-2">
|
|
||||||
<summary class="cursor-pointer">Dirty Dozen</summary>
|
|
||||||
<div class="mt-3">
|
|
||||||
<form action="/ergo/dozen" class="grid gap-3" method="post" enctype="multipart/form-data">
|
|
||||||
<div>
|
|
||||||
<label for="user-dozen" class="text-sm text-gray-600 dark:text-gray-100">Ergo-Fahrer</label>
|
|
||||||
<select name="user" id="user-dozen" class="input rounded-md">
|
|
||||||
<option disabled="disabled">User auswählen</option>
|
|
||||||
{% for user in users %}
|
|
||||||
{% if user.id == loggedin_user.id %}
|
|
||||||
<option value="{{ user.id }}" selected="selected">{{ user.name }}</option>
|
|
||||||
{% else %}
|
|
||||||
<option value="{{ user.id }}">{{ user.name }}</option>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ macros::input(label="Zeit [hh:mm:ss.s] oder Distanz [m]", name="result", required=true, type="text", class="input rounded-md", pattern="(?:\d+:\d{2}:\d{2}\.\d+|\d{1,2}:\d{2}\.\d+|\d+(\.\d+)?)") }}
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="file-dozen" class="text-sm text-gray-600 dark:text-gray-100">Ergebnis-Foto vom Ergo-Display</label>
|
|
||||||
<input type="file" id="file-dozen" name="proof" class="input rounded-md" accept="image/*">
|
|
||||||
</div>
|
|
||||||
<div class="text-end">
|
|
||||||
<input type="submit" value="Speichern" class="btn btn-primary btn-fw m-auto"/>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endblock content %}
|
||||||
|
|
||||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow grid gap-3">
|
|
||||||
<h2 class="h2">Aktuelle Woche</h2>
|
|
||||||
|
|
||||||
<details class="p-2">
|
|
||||||
<summary class="cursor-pointer">Dirty Thirty <small class="text-gray-600 dark:text-white">({{thirty | length}})</small></summary>
|
|
||||||
<div class="mt-3">
|
|
||||||
<ol>
|
|
||||||
{% for stat in thirty %}
|
|
||||||
<li><strong>{{ stat.name }}:</strong> {{ stat.result }}</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details class="p-2">
|
|
||||||
<summary class="cursor-pointer">Dirty Dozen <small class="text-gray-600 dark:text-white">({{dozen | length}})</small></summary>
|
|
||||||
<div class="mt-3">
|
|
||||||
<ol>
|
|
||||||
{% for stat in dozen %}
|
|
||||||
<li><strong>{{ stat.name }}:</strong> {{ stat.result }}</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if "admin" in loggedin_user.roles %}
|
|
||||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow grid gap-3">
|
|
||||||
<h2 class="h2">Update</h2>
|
|
||||||
|
|
||||||
<details class="p-2">
|
|
||||||
<summary class="cursor-pointer">Dirty Thirty <small class="text-gray-600 dark:text-white">({{thirty | length}})</small></summary>
|
|
||||||
<div class="mt-3">
|
|
||||||
<ol>
|
|
||||||
{% for stat in thirty %}
|
|
||||||
<li>
|
|
||||||
<form action="/ergo/thirty/user/{{ stat.id }}/new" method="get">
|
|
||||||
{{ stat.name }}: <input type="text" value="{{stat.result}}" name="new" style="color: black;"/><input type="submit"/>
|
|
||||||
</form>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details class="p-2">
|
|
||||||
<summary class="cursor-pointer">Dirty Dozen <small class="text-gray-600 dark:text-white">({{dozen | length}})</small></summary>
|
|
||||||
<div class="mt-3">
|
|
||||||
<ol>
|
|
||||||
{% for stat in dozen %}
|
|
||||||
<li>
|
|
||||||
<form action="/ergo/dozen/user/{{ stat.id }}/new" method="get">
|
|
||||||
{{ stat.name }}: <input type="text" value="{{stat.result}}" name="new" style="color: black;"/><input type="submit"/>
|
|
||||||
</form>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock content%}
|
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
|
|
||||||
<div class="hidden">
|
<div class="hidden">
|
||||||
<form action="/admin/planned-event" method="post" class="grid gap-3" id="addEventForm">
|
<form action="/admin/planned-event"
|
||||||
<input class="day-js" type="hidden" name="tripdetails.day" value=""/>
|
method="post"
|
||||||
{{ macros::input(label='Titel (z.B. Firmenrudern)', name='name', type='input', required=true) }}
|
class="grid gap-3"
|
||||||
{{ macros::input(label='Startzeit', name='tripdetails.planned_starting_time', type='time', required=true) }}
|
id="addEventForm">
|
||||||
{{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', required=true, min='0') }}
|
<input class="day-js" type="hidden" name="tripdetails.day" value="" />
|
||||||
{{ macros::input(label='Anzahl Ruderer (ohne Steuerperson)', name='tripdetails.max_people', type='number', required=true, min='0') }}
|
{{ macros::input(label='Titel (z.B. Firmenrudern)', name='name', type='input', required=true) }}
|
||||||
{{ macros::checkbox(label='Gäste erlauben', name='tripdetails.allow_guests') }}
|
{{ macros::input(label='Startzeit', name='tripdetails.planned_starting_time', type='time', required=true) }}
|
||||||
{{ macros::checkbox(label='Immer anzeigen', name='tripdetails.always_show') }}
|
{{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', required=true, min='0') }}
|
||||||
{{ macros::input(label='Anmerkungen', name='tripdetails.notes', type='input') }}
|
{{ macros::input(label='Anzahl Ruderer (ohne Steuerperson)', name='tripdetails.max_people', type='number', required=true, min='0') }}
|
||||||
{{ macros::select(label='Typ', data=trip_types, name='tripdetails.trip_type', default='Reguläre Ausfahrt') }}
|
{{ macros::checkbox(label='Gäste erlauben', name='tripdetails.allow_guests') }}
|
||||||
|
{{ macros::checkbox(label='Immer anzeigen', name='tripdetails.always_show') }}
|
||||||
<input value="Erstellen" class="w-full btn btn-primary" type="submit"/>
|
{{ macros::input(label='Anmerkungen', name='tripdetails.notes', type='input') }}
|
||||||
</form>
|
{{ macros::select(label='Typ', data=trip_types, name='tripdetails.trip_type', default='Reguläre Ausfahrt') }}
|
||||||
|
<input value="Erstellen" class="w-full btn btn-primary" type="submit" />
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
|
|
||||||
<div class="hidden">
|
<div class="hidden">
|
||||||
<form action="/cox/trip" method="post" class="grid gap-3" id="sidebarForm">
|
<form action="/cox/trip" method="post" class="grid gap-3" id="sidebarForm">
|
||||||
<input class="day-js" type="hidden" name="day" value=""/>
|
<input class="day-js" type="hidden" name="day" value="" />
|
||||||
{{ macros::input(label='Startzeit (zB "10:00")', name='planned_starting_time', type='time', required=true) }}
|
{{ macros::input(label='Startzeit (zB "10:00")', name='planned_starting_time', type='time', required=true) }}
|
||||||
{{ macros::input(label='Anzahl Ruderer (ohne Steuerperson)', name='max_people', type='number', required=true, min='0') }}
|
{{ macros::input(label='Anzahl Ruderer (ohne Steuerperson)', name='max_people', type='number', required=true, min='0') }}
|
||||||
{{ macros::checkbox(label='Gäste erlauben', name='allow_guests') }}
|
{{ macros::checkbox(label='Gäste erlauben', name='allow_guests') }}
|
||||||
{{ macros::checkbox(label='Immer anzeigen', name='always_show') }}
|
{{ macros::checkbox(label='Immer anzeigen', name='always_show') }}
|
||||||
{{ macros::input(label='Anmerkungen', name='notes', type='input') }}
|
{{ macros::input(label='Anmerkungen', name='notes', type='input') }}
|
||||||
{{ macros::select(label='Typ', data=trip_types, name='trip_type', default='Reguläre Ausfahrt') }}
|
{{ macros::select(label='Typ', data=trip_types, name='trip_type', default='Reguläre Ausfahrt') }}
|
||||||
|
<input value="Erstellen" class="w-full btn btn-primary" type="submit" />
|
||||||
<input value="Erstellen" class="w-full btn btn-primary" type="submit"/>
|
</form>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-journal" viewBox="0 0 16 16">
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
<path d="M3 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-1h1v1a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v1H1V2a2 2 0 0 1 2-2z"/>
|
width="16"
|
||||||
<path d="M1 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1z"/>
|
height="16"
|
||||||
</svg>
|
fill="currentColor"
|
||||||
|
class="bi bi-journal"
|
||||||
|
viewBox="0 0 16 16">
|
||||||
|
<path d="M3 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-1h1v1a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v1H1V2a2 2 0 0 1 2-2z" />
|
||||||
|
<path d="M1 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1z" />
|
||||||
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 532 B |
@ -1,12 +1,22 @@
|
|||||||
{% if "cox" in loggedin_user.roles %}
|
{% if "cox" in loggedin_user.roles %}
|
||||||
<div class="sm:col-span-2 lg:col-span-3 grid md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3">
|
<div class="sm:col-span-2 lg:col-span-3 grid md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3">
|
||||||
<button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-days" id="filterdays-js" aria-pressed="false">
|
<button type="button"
|
||||||
{% include "includes/funnel-icon" %}
|
title="Toggle View"
|
||||||
Tage mit Ausfahrten
|
class="group btn btn-primary filter-trips-js"
|
||||||
</button>
|
data-action="filter-days"
|
||||||
<button type="button" title="Toggle View" class="group btn btn-primary filter-trips-js" data-action="filter-coxs" id="filtertrips-js" aria-pressed="false">
|
id="filterdays-js"
|
||||||
{% include "includes/funnel-icon" %}
|
aria-pressed="false">
|
||||||
Steuerleute gesucht
|
{% include "includes/funnel-icon" %}
|
||||||
</button>
|
Tage mit Ausfahrten
|
||||||
</div>
|
</button>
|
||||||
|
<button type="button"
|
||||||
|
title="Toggle View"
|
||||||
|
class="group btn btn-primary filter-trips-js"
|
||||||
|
data-action="filter-coxs"
|
||||||
|
id="filtertrips-js"
|
||||||
|
aria-pressed="false">
|
||||||
|
{% include "includes/funnel-icon" %}
|
||||||
|
Steuerleute gesucht
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
<svg width="16" height="16" fill="currentColor" class="inline-block mr-1 h-3 w-3" viewbox="0 0 16 16" style="margin-top: -0.2rem;">
|
<svg width="16"
|
||||||
<path d="M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.777.416L8 13.101l-5.223 2.815A.5.5 0 0 1 2 15.5V2zm2-1a1 1 0 0 0-1 1v12.566l4.723-2.482a.5.5 0 0 1 .554 0L13 14.566V2a1 1 0 0 0-1-1H4z"/>
|
height="16"
|
||||||
|
fill="currentColor"
|
||||||
|
class="inline-block mr-1 h-3 w-3"
|
||||||
|
viewbox="0 0 16 16"
|
||||||
|
style="margin-top: -0.2rem">
|
||||||
|
<path d="M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.777.416L8 13.101l-5.223 2.815A.5.5 0 0 1 2 15.5V2zm2-1a1 1 0 0 0-1 1v12.566l4.723-2.482a.5.5 0 0 1 .554 0L13 14.566V2a1 1 0 0 0-1-1H4z" />
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 339 B After Width: | Height: | Size: 367 B |
@ -1,4 +1,8 @@
|
|||||||
<svg width="16" height="16" fill="currentColor" class="inline h-4 w-4" viewbox="0 0 16 16">
|
<svg width="16"
|
||||||
<path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"/>
|
height="16"
|
||||||
<path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"/>
|
fill="currentColor"
|
||||||
|
class="inline h-4 w-4"
|
||||||
|
viewbox="0 0 16 16">
|
||||||
|
<path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z" />
|
||||||
|
<path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z" />
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 568 B |
@ -1,23 +1,34 @@
|
|||||||
<footer class="bg-primary-950 dark:bg-primary-900 text-white w-full flex justify-center p-3">
|
<footer class="bg-primary-950 dark:bg-primary-900 text-white w-full flex justify-center p-3">
|
||||||
<div class="max-w-screen-xl w-full flex justify-between items-center">
|
<div class="max-w-screen-xl w-full flex justify-between items-center">
|
||||||
<div>
|
<div>
|
||||||
<span class="text-[#ff0000]">♥</span>
|
<span class="text-[#ff0000]">♥</span>
|
||||||
Erstellt vom ASKÖ Ruderverein Donau Linz <a onclick="alert('Wir suchen kreative und motivierte Köpfe, die diesen Ruderassistenten mitgestalten möchten. Das Backend ist in Rust (Rocket), das Frontend in TypeScript und Teraform, wobei wir mit dem Gedanken spielen, zu Svelte(Kit) zu wechseln.\n\nWenn du Lust hast, deine Skills in ein Projekt zu stecken, das Wellen schlagen wird, dann komm an Bord! Wir sind offen für frische Ideen, haben jedoch auch selber noch genügend; langweilig wird uns bestimmt nicht.\n\nWirf den Anker bei uns ausi und melde dich bei Marie oder Philipp oder it@rudernlinz.at – für eine Zukunft ohne optische Kenterung in Form von hässlichen Alerts ;)');" style="text-decoration:underline">... und dir?</a>
|
Erstellt vom ASKÖ Ruderverein Donau Linz <a onclick="alert('Wir suchen kreative und motivierte Köpfe, die diesen Ruderassistenten mitgestalten möchten. Das Backend ist in Rust (Rocket), das Frontend in TypeScript und Teraform, wobei wir mit dem Gedanken spielen, zu Svelte(Kit) zu wechseln.\n\nWenn du Lust hast, deine Skills in ein Projekt zu stecken, das Wellen schlagen wird, dann komm an Bord! Wir sind offen für frische Ideen, haben jedoch auch selber noch genügend; langweilig wird uns bestimmt nicht.\n\nWirf den Anker bei uns ausi und melde dich bei Marie oder Philipp oder it@rudernlinz.at – für eine Zukunft ohne optische Kenterung in Form von hässlichen Alerts ;)');"
|
||||||
</div>
|
style="text-decoration:underline">... und dir?</a>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button id="theme-toggle-js" type="button" data-theme="light" class="btn btn-primary">
|
<button id="theme-toggle-js"
|
||||||
<span class="hidden dark:inline">
|
type="button"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
data-theme="light"
|
||||||
<path d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"/>
|
class="btn btn-primary">
|
||||||
</svg>
|
<span class="hidden dark:inline">
|
||||||
</span>
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
<span class="inline dark:hidden">
|
width="16"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
height="16"
|
||||||
<path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278zM4.858 1.311A7.269 7.269 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.316 7.316 0 0 0 5.205-2.162c-.337.042-.68.063-1.029.063-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286z"/>
|
fill="currentColor"
|
||||||
</svg>
|
viewBox="0 0 16 16">
|
||||||
</span>
|
<path d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z" />
|
||||||
</button>
|
</svg>
|
||||||
|
</span>
|
||||||
|
<span class="inline dark:hidden">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
fill="currentColor"
|
||||||
|
viewBox="0 0 16 16">
|
||||||
|
<path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278zM4.858 1.311A7.269 7.269 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.316 7.316 0 0 0 5.205-2.162c-.337.042-.68.063-1.029.063-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286z" />
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -1,69 +1,85 @@
|
|||||||
{% macro new() %}
|
{% macro new() %}
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<h2 class="text-md font-bold tracking-wide bg-primary-900 mt-3 p-3 text-white flex justify-between items-center rounded-md">
|
<h2 class="text-md font-bold tracking-wide bg-primary-900 mt-3 p-3 text-white flex justify-between items-center rounded-md">
|
||||||
Neues Boot
|
Neues Boot
|
||||||
|
<a href="#"
|
||||||
<a href="#" class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
|
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
|
||||||
data-sidebar="true" data-trigger="sidebar" data-header="Neues Boot anlegen" data-body="#new-boat">
|
data-sidebar="true"
|
||||||
{% include "includes/plus-icon" %}
|
data-trigger="sidebar"
|
||||||
<span class="sr-only">Neues Boot anlegen</span>
|
data-header="Neues Boot anlegen"
|
||||||
</a>
|
data-body="#new-boat">
|
||||||
</h2>
|
{% include "includes/plus-icon" %}
|
||||||
<div class="hidden">
|
<span class="sr-only">Neues Boot anlegen</span>
|
||||||
<div id="new-boat">
|
</a>
|
||||||
<form action="/admin/boat/new" method="post" class="grid gap-3">
|
</h2>
|
||||||
{{ macros::input(label="Name", name="name", type="text", required=true) }}
|
<div class="hidden">
|
||||||
{{ macros::input(label="Anzahl Sitze", name="amount_seats", type="number", required=true, min=1) }}
|
<div id="new-boat">
|
||||||
{{ macros::input(label="Baujahr", name="year_built", type="number", min=1950, max=2050) }}
|
<form action="/admin/boat/new" method="post" class="grid gap-3">
|
||||||
{{ macros::input(label="Bootsbauer", name="boatbuilder", type="text") }}
|
{{ macros::input(label="Name", name="name", type="text", required=true) }}
|
||||||
{{ macros::select(label="Standort", data=locations, name='location_id', selected_id=1) }}
|
{{ macros::input(label="Anzahl Sitze", name="amount_seats", type="number", required=true, min=1) }}
|
||||||
{{ macros::select(label="Besitzer", data=users, name='owner', default="Verein") }}
|
{{ macros::input(label="Baujahr", name="year_built", type="number", min=1950, max=2050) }}
|
||||||
{{ macros::input(label='Default destination', name='default_destination', type='text') }}
|
{{ macros::input(label="Bootsbauer", name="boatbuilder", type="text") }}
|
||||||
<div>
|
{{ macros::select(label="Standort", data=locations, name='location_id', selected_id=1) }}
|
||||||
{{ macros::checkbox(label="handgesteuert", name="default_shipmaster_only_steering")}}
|
{{ macros::select(label="Besitzer", data=users, name='owner', default="Verein") }}
|
||||||
{{ macros::checkbox(label="Skull", name="skull", checked=true)}}
|
{{ macros::input(label='Default destination', name='default_destination', type='text') }}
|
||||||
{{ macros::checkbox(label="Externes Boot (anderer Verein)", name="external")}}
|
<div>
|
||||||
</div>
|
{{ macros::checkbox(label="handgesteuert", name="default_shipmaster_only_steering") }}
|
||||||
<input value="Hinzufügen" type="submit" class="w-full mt-2 rounded-md bg-primary-500 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"/>
|
{{ macros::checkbox(label="Skull", name="skull", checked=true) }}
|
||||||
</form>
|
{{ macros::checkbox(label="Externes Boot (anderer Verein)", name="external") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<input value="Hinzufügen"
|
||||||
</div>
|
type="submit"
|
||||||
<div class="search-wrapper">
|
class="w-full mt-2 rounded-md bg-primary-500 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer" />
|
||||||
<label for="name" class="sr-only">Suche</label>
|
</form>
|
||||||
<input type="search" name="name" id="filter-js" class="search-bar" placeholder="Suchen nach Namen...">
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="filter-result-js" class="search-result"></div>
|
|
||||||
{% endmacro new %}
|
|
||||||
|
|
||||||
|
|
||||||
{% macro edit(boat, uuid) %}
|
|
||||||
<div data-filterable="true" data-filter="{{ boat.name }}" class="w-full border-t">
|
|
||||||
<form action="/admin/boat/{{ boat.id }}" data-filterable="true" method="post" class="bg-white dark:bg-primary-900 p-4 w-full">
|
|
||||||
<div class="w-full">
|
|
||||||
<input type="hidden" name="id" value="{{ boat.id }}"/>
|
|
||||||
<div class="font-bold mb-1 text-black dark:text-white">{{ boat.name }}<br/></div>
|
|
||||||
<div class="grid md:grid-cols-3 gap-3">
|
|
||||||
{{ macros::input(label='Name', name='name', type='text', value=boat.name) }}
|
|
||||||
{{ macros::input(label='Plätze', name='amount_seats', type='number', min=0, value=boat.amount_seats) }}
|
|
||||||
{{ macros::select(data=locations, label='Standort', name='location_id', selected_id=boat.location_id) }}
|
|
||||||
{{ macros::select(data=users, label='Besitzer', name='owner', selected_id=boat.owner, default="Vereinsboot") }}
|
|
||||||
{{ macros::input(label='Baujahr', name='year_built', type='number', min=1950, value=boat.year_built) }}
|
|
||||||
{{ macros::input(label='Bootsbauer', name='boatbuilder', type='text', value=boat.boatbuilder) }}
|
|
||||||
{{ macros::checkbox(label='handgesteuert', name='default_shipmaster_only_steering', id=uuid , checked=boat.default_shipmaster_only_steering) }}
|
|
||||||
{{ macros::input(label='Default destination', name='default_destination', type='text', value=boat.default_destination) }}
|
|
||||||
{{ macros::checkbox(label='Skull', name='skull', id=uuid , checked=boat.skull) }}
|
|
||||||
{{ macros::checkbox(label='Externes Boot', name='external', id=uuid , checked=boat.external) }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right mt-3">
|
<div class="search-wrapper">
|
||||||
<a href="/admin/boat/{{ boat.id }}/delete" class="inline-block btn btn-alert" onclick="return confirm('Wirklich löschen?');">
|
<label for="name" class="sr-only">Suche</label>
|
||||||
{% include "includes/delete-icon" %}
|
<input type="search"
|
||||||
Löschen
|
name="name"
|
||||||
</a>
|
id="filter-js"
|
||||||
<input value="Ändern" type="submit" class="w-28 btn btn-primary"/>
|
class="search-bar"
|
||||||
</div>
|
placeholder="Suchen nach Namen...">
|
||||||
</form>
|
</div>
|
||||||
</div>
|
<div id="filter-result-js" class="search-result"></div>
|
||||||
|
{% endmacro new %}
|
||||||
|
{% macro edit(boat, uuid) %}
|
||||||
|
<div data-filterable="true"
|
||||||
|
data-filter="{{ boat.name }}"
|
||||||
|
class="w-full border-t">
|
||||||
|
<form action="/admin/boat/{{ boat.id }}"
|
||||||
|
data-filterable="true"
|
||||||
|
method="post"
|
||||||
|
class="bg-white dark:bg-primary-900 p-4 w-full">
|
||||||
|
<div class="w-full">
|
||||||
|
<input type="hidden" name="id" value="{{ boat.id }}" />
|
||||||
|
<div class="font-bold mb-1 text-black dark:text-white">
|
||||||
|
{{ boat.name }}
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
<div class="grid md:grid-cols-3 gap-3">
|
||||||
|
{{ macros::input(label='Name', name='name', type='text', value=boat.name) }}
|
||||||
|
{{ macros::input(label='Plätze', name='amount_seats', type='number', min=0, value=boat.amount_seats) }}
|
||||||
|
{{ macros::select(data=locations, label='Standort', name='location_id', selected_id=boat.location_id) }}
|
||||||
|
{{ macros::select(data=users, label='Besitzer', name='owner', selected_id=boat.owner, default="Vereinsboot") }}
|
||||||
|
{{ macros::input(label='Baujahr', name='year_built', type='number', min=1950, value=boat.year_built) }}
|
||||||
|
{{ macros::input(label='Bootsbauer', name='boatbuilder', type='text', value=boat.boatbuilder) }}
|
||||||
|
{{ macros::checkbox(label='handgesteuert', name='default_shipmaster_only_steering', id=uuid , checked=boat.default_shipmaster_only_steering) }}
|
||||||
|
{{ macros::input(label='Default destination', name='default_destination', type='text', value=boat.default_destination) }}
|
||||||
|
{{ macros::checkbox(label='Skull', name='skull', id=uuid , checked=boat.skull) }}
|
||||||
|
{{ macros::checkbox(label='Externes Boot', name='external', id=uuid , checked=boat.external) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="text-right mt-3">
|
||||||
|
<a href="/admin/boat/{{ boat.id }}/delete"
|
||||||
|
class="inline-block btn btn-alert"
|
||||||
|
onclick="return confirm('Wirklich löschen?');">
|
||||||
|
{% include "includes/delete-icon" %}
|
||||||
|
Löschen
|
||||||
|
</a>
|
||||||
|
<input value="Ändern" type="submit" class="w-28 btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
{% endmacro edit %}
|
{% endmacro edit %}
|
||||||
|
@ -3,231 +3,259 @@
|
|||||||
Inputs: boats
|
Inputs: boats
|
||||||
#}
|
#}
|
||||||
{% macro show_boats() %}
|
{% macro show_boats() %}
|
||||||
{% for amount_seats, grouped_boats in boats | group_by(attribute="amount_seats") %}
|
{% for amount_seats, grouped_boats in boats | group_by(attribute="amount_seats") %}
|
||||||
<div class="pb-2">
|
<div class="pb-2">
|
||||||
<div class="bg-gray-100 dark:bg-primary-600 text-primary-950 dark:text-white text-center text-sm mb-2">
|
<div class="bg-gray-100 dark:bg-primary-600 text-primary-950 dark:text-white text-center text-sm mb-2">
|
||||||
<strong>{{ amount_seats }}x</strong>
|
<strong>{{ amount_seats }}x</strong>
|
||||||
</div>
|
</div>
|
||||||
{% for boat in grouped_boats %}
|
{% for boat in grouped_boats %}
|
||||||
<div id="boat-{{ boat.id }}" class="px-3 boats-js text-black dark:text-white {% if boat.damage != 'locked' and not boat.on_water %} cursor-pointer hover:text-primary-900 dark:hover:text-gray-100 {% endif %}" {% if boat.damage != 'locked' and not boat.on_water %} data-seats="{{boat.amount_seats}}" data-default_shipmaster_only_steering="{{boat.default_shipmaster_only_steering}}" data-default-destination="{{boat.default_destination}}" data-onclick="true" {% endif %} data-id="{{ boat.id }}">
|
<div id="boat-{{ boat.id }}"
|
||||||
<span class="status-damage status-damage-{{ boat.damage }}"></span>
|
class="px-3 boats-js text-black dark:text-white {% if boat.damage != 'locked' and not boat.on_water %} cursor-pointer hover:text-primary-900 dark:hover:text-gray-100 {% endif %}"
|
||||||
<span {% if boat.damage == 'locked' or boat.on_water %} class="opacity-50" {% endif %}>{{ boat.name }}
|
{% if boat.damage != 'locked' and not boat.on_water %} data-seats="{{ boat.amount_seats }}" data-default_shipmaster_only_steering="{{ boat.default_shipmaster_only_steering }}" data-default-destination="{{ boat.default_destination }}" data-onclick="true" {% endif %}
|
||||||
{% if boat.owner %}
|
data-id="{{ boat.id }}">
|
||||||
<span class="opacity-50">(privat)</span>
|
<span class="status-damage status-damage-{{ boat.damage }}"></span>
|
||||||
{% endif %}
|
<span {% if boat.damage == 'locked' or boat.on_water %}class="opacity-50"{% endif %}>{{ boat.name }}
|
||||||
</span>
|
{% if boat.owner %}<span class="opacity-50">(privat)</span>{% endif %}
|
||||||
</div>
|
</span>
|
||||||
{% endfor %}
|
</div>
|
||||||
</div>
|
{% endfor %}
|
||||||
{% endfor %}
|
</div>
|
||||||
|
{% endfor %}
|
||||||
{% endmacro show_boats %}
|
{% endmacro show_boats %}
|
||||||
|
|
||||||
{# Shows the form for creating a new logbook entry. #}
|
{# Shows the form for creating a new logbook entry. #}
|
||||||
{% macro new(shipmaster) %}
|
{% macro new(shipmaster) %}
|
||||||
<form action="/log" method="post" id="form" class="grid grid-cols-4 gap-3" onsubmit="Array.from(this.elements).forEach(e=>!e.value.trim()&&(e.disabled=true));">
|
<form action="/log"
|
||||||
{{ log::boat_select() }}
|
method="post"
|
||||||
<div class="col-span-4 md:col-span-1">
|
id="form"
|
||||||
<div class="text-sm text-gray-600 dark:text-gray-100">Bootssteuerung</div>
|
class="grid grid-cols-4 gap-3"
|
||||||
<div class="h-10 flex items-center">
|
onsubmit="Array.from(this.elements).forEach(e=>!e.value.trim()&&(e.disabled=true));">
|
||||||
{{ macros::checkbox(label='handgesteuert', name='shipmaster_only_steering', disabled=true) }}
|
{{ log::boat_select() }}
|
||||||
</div>
|
<div class="col-span-4 md:col-span-1">
|
||||||
</div>
|
<div class="text-sm text-gray-600 dark:text-gray-100">Bootssteuerung</div>
|
||||||
{{ log::rower_select(id="newrower", selected=[], class="col-span-4", init=true) }}
|
<div class="h-10 flex items-center">
|
||||||
{{ macros::select(label="Schiffsführer", data=[], name='shipmaster', id="shipmaster-newrowerjs", wrapper_class="col-span-2") }}
|
{{ macros::checkbox(label='handgesteuert', name='shipmaster_only_steering', disabled=true) }}
|
||||||
{{ macros::select(label="Steuerperson", data=[], name='steering_person', id="steering_person-newrowerjs", wrapper_class="col-span-2") }}
|
|
||||||
{{ macros::input(label='Abfahrtszeit', name='departure', type='datetime-local', required=true, wrapper_class='col-span-2') }}
|
|
||||||
{{ macros::input(label='Ankunftszeit', name='arrival', type='datetime-local', wrapper_class='col-span-2') }}
|
|
||||||
<div class="relative col-span-2">
|
|
||||||
<label for="destination" class="text-sm text-gray-600 dark:text-gray-100">Ziel</label>
|
|
||||||
<input class="input rounded-md set-distance-js" type="search" list="destinations" placeholder="Destination" id="destination" name="destination" value="" data-relation="distance_in_km"/>
|
|
||||||
<datalist id="destinations">
|
|
||||||
{% for distance in distances %}<option value="{{ distance.0 }}" distance="{{ distance.1 }}" />
|
|
||||||
{% endfor %}
|
|
||||||
</datalist>
|
|
||||||
</div>
|
|
||||||
<div class="relative col-span-2">
|
|
||||||
{{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km" , type="number", min=0, value='', class="rounded-md") }}
|
|
||||||
<span class="absolute right-0 bottom-0 py-1.5 px-2 bg-white dark:bg-primary-950 border-0 text-gray-600 dark:text-gray-100 ring-1 ring-inset ring-gray-300 dark:ring-primary-950 rounded-br-md rounded-tr-md">km</span>
|
|
||||||
</div>
|
|
||||||
{{ macros::input(label="Kommentar", name="comments", type="text", wrapper_class="col-span-4") }}
|
|
||||||
{{ macros::select(label="Typ", data=logtypes, name='logtype', default="Normal", wrapper_class="col-span-4") }}
|
|
||||||
<input type="submit" value="Ausfahrt eintragen" class="btn btn-primary w-full col-span-4 m-auto"/>
|
|
||||||
</form>
|
|
||||||
{% endmacro new %}
|
|
||||||
|
|
||||||
|
|
||||||
{% macro boat_select(id="boat_id") %}
|
|
||||||
{{ macros::select(label="Boot", data=boats, name="boat_id", id=id, display=["name", " (","amount_seats", " x)"], extras=["default_shipmaster_only_steering", "amount_seats", "on_water", "default_destination"], wrapper_class="col-span-4", show_seats=true) }}
|
|
||||||
{% endmacro boat_select %}
|
|
||||||
|
|
||||||
{% macro rower_select(id, selected, amount_seats='', class='', init='false', cox_on_boat='', steering_person_id='') %}
|
|
||||||
{#{% if not amount_seats or amount_seats > 1 %}#}
|
|
||||||
<div class="{{ class }}">
|
|
||||||
<label for="{{id}}" class="text-sm text-gray-600 dark:text-gray-100">Ruderer (inkl. Schiffsführer und Steuerperson)</label>
|
|
||||||
<select style="width: 100%;" multiple name="rowers[]" id="{{id}}" class="w-full" data-seats="{{amount_seats}}" data-init={{init}}>
|
|
||||||
{% for user in users %}
|
|
||||||
{% set_global sel = false %}
|
|
||||||
{% for rower in selected %}
|
|
||||||
{% if rower.id == user.id %}
|
|
||||||
{% set_global sel = true %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
<option value="{{ user.id }}" {% if sel %} selected {% endif %} {% if user.on_water %} disabled="disabled" {% endif %} data-custom-properties='{"is_cox": {{ "cox" in user.roles }}, "is_racing": {{ "Rennrudern" in user.roles }}, "steers": {{ user.id == steering_person_id }}, "cox_on_boat": {{ user.id == cox_on_boat}}}'>
|
|
||||||
{{user.name}}
|
|
||||||
{% if user.on_water %}
|
|
||||||
(am Wasser)
|
|
||||||
{% endif %}
|
|
||||||
</option>
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
{#{% endif %}#}
|
|
||||||
{% endmacro rower_select %}
|
|
||||||
|
|
||||||
{% macro show(log, state, allowed_to_close=false) %}
|
|
||||||
<div class="grid grid-cols-1 gap-3 mb-3 w-full">
|
|
||||||
<div class="pt-2 px-3 {% if not loop.first %} border-t {% endif %}">
|
|
||||||
<div class="w-full">
|
|
||||||
<div class="flex justify-between items-center">
|
|
||||||
<div>
|
|
||||||
<strong class="block text-primary-900 dark:text-white">
|
|
||||||
{{ log.departure | date(format="%H:%M") }}
|
|
||||||
Uhr
|
|
||||||
</strong>
|
|
||||||
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>{{ log.departure | date(format="%H:%M") }} Uhr</strong> ({{ log.boat.name }})" data-body="#log{{ log.id }}" class="text-sm link-primary break-all">
|
|
||||||
{{ log.boat.name }}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
{% if allowed_to_close and state == "on_water" %}
|
|
||||||
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>{{ log.departure | date(format="%H:%M") }} Uhr</strong> ({{ log.boat.name }})" data-body="#close{{ log.id }}" class="border-0 btn btn-dark text-white flex items-center justify-center ml-3">
|
|
||||||
{% include "includes/pencil" %}
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="hidden">
|
|
||||||
{% if allowed_to_close and state == "on_water" %}
|
|
||||||
<div id="close{{ log.id }}">
|
|
||||||
{{ log::home(log=log) }}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
LÖSCHEN
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div id="log{{ log.id }}">
|
|
||||||
{% if log.destination %}
|
|
||||||
{{ log.destination }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% for rower in log.rowers %}
|
|
||||||
<p>{{ rower.name }} {% if rower.id == log.shipmaster or rower.id == log.steering_person %}<small class="text-gray-600 dark:text-primary-100">({% if rower.id == log.shipmaster %}Schiffsführer{% endif %}{% if rower.id == log.shipmaster and rower.id == log.steering_person %}/{% endif %}{% if rower.id == log.steering_person%}Steuerperson{% endif %})</small>{% endif %}</p>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% set amount_rowers = log.rowers | length %}
|
|
||||||
{% set amount_guests = log.boat.amount_seats - amount_rowers -1 %}
|
|
||||||
{% if amount_guests > 0 %}
|
|
||||||
Gäste <small class="text-gray-600">(ohne Account)</small>:
|
|
||||||
{{ amount_guests }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if allowed_to_close and state == "on_water" %}
|
|
||||||
<a href="/log/{{ log.id }}/delete" class="btn btn-alert w-full absolute bottom-0 left-0" style="border-radius: 0;" onclick="return confirm('Willst du diesen Eintrag wirklich löschen? Die Daten gehen verloren');">Löschen</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endmacro show %}
|
|
||||||
|
|
||||||
{% macro show_old(log, state, allowed_to_close=false, index) %}
|
|
||||||
<div class="border-t bg-white dark:bg-primary-900 py-3 px-4 relative" data-filterable="true" data-filter="{{ log.boat.name }} {% for rower in log.rowers %} {{ rower.name }} {% endfor %}">
|
|
||||||
{% if log.logtype %}
|
|
||||||
<div class="absolute top-0 right-0 bg-primary-100 rounded-bl-md text-primary-950 text-xs w-32 px-2 py-1 text-center font-bold">
|
|
||||||
{% if log.logtype == 1 %}
|
|
||||||
Wanderfahrt
|
|
||||||
{% else %}
|
|
||||||
{% if log.logtype == 2 %}
|
|
||||||
Regatta
|
|
||||||
{% else %}
|
|
||||||
{{ log.logtype }}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div {% if log.logtype %} class="mt-4 sm:mt-0" {% endif %}>
|
|
||||||
<strong class="text-black dark:text-white">{{ log.boat.name }}</strong> <small class="text-gray-600 dark:text-gray-100">({{ log.shipmaster_user.name }}{% if log.shipmaster_only_steering %} - handgesteuert {% endif %})</small>
|
|
||||||
<small class="block text-gray-600 dark:text-gray-100">
|
|
||||||
|
|
||||||
{% if state == "completed" and log.departure | date(format='%d.%m.%Y') == log.arrival | date(format='%d.%m.%Y') %}
|
|
||||||
{{ log.departure | date(format='%d.%m.%Y')}} ({{ log.departure | date(format='%H:%M')}} - {{ log.arrival | date(format='%H:%M')}})
|
|
||||||
{% else %}
|
|
||||||
{{ log.departure | date(format='%d.%m.%Y (%H:%M)') }} {% if state == "completed" %}- {{ log.arrival | date(format='%d.%m.%Y (%H:%M)') }}{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</small>
|
|
||||||
{% set amount_rowers = log.rowers | length %}
|
|
||||||
{% set amount_guests = log.boat.amount_seats - amount_rowers %}
|
|
||||||
{% if allowed_to_close and state == "on_water" %}
|
|
||||||
{{ log::home(log=log) }}
|
|
||||||
{% else %}
|
|
||||||
<div class="text-black dark:text-white">
|
|
||||||
{{ log.destination }}
|
|
||||||
{% if state == "completed" %}
|
|
||||||
<small class="text-gray-600 dark:text-gray-100">({{ log.distance_in_km }} km)</small>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if log.comments %}
|
|
||||||
<span class="text-sm italic">- "{{ log.comments }}"</span>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% if amount_guests > 0 or log.rowers | length > 0 %}
|
|
||||||
<div class="text-sm text-gray-600 dark:text-gray-100">
|
|
||||||
Ruderer:
|
|
||||||
{% for rower in log.rowers %}
|
|
||||||
{{ rower.name }}{% if not loop.last or amount_guests > 0 and log.boat.name != 'Externes Boot' %}, {% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% if amount_guests > 0 and log.boat.name != 'Externes Boot' %}
|
|
||||||
Gäste <small class="text-gray-600 dark:text-gray-100">(ohne Account)</small>: {{ amount_guests }}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
{% endif %}
|
{{ log::rower_select(id="newrower", selected=[], class="col-span-4", init=true) }}
|
||||||
|
{{ macros::select(label="Schiffsführer", data=[], name='shipmaster', id="shipmaster-newrowerjs", wrapper_class="col-span-2") }}
|
||||||
|
{{ macros::select(label="Steuerperson", data=[], name='steering_person', id="steering_person-newrowerjs", wrapper_class="col-span-2") }}
|
||||||
|
{{ macros::input(label='Abfahrtszeit', name='departure', type='datetime-local', required=true, wrapper_class='col-span-2') }}
|
||||||
|
{{ macros::input(label='Ankunftszeit', name='arrival', type='datetime-local', wrapper_class='col-span-2') }}
|
||||||
|
<div class="relative col-span-2">
|
||||||
|
<label for="destination" class="text-sm text-gray-600 dark:text-gray-100">Ziel</label>
|
||||||
|
<input class="input rounded-md set-distance-js"
|
||||||
|
type="search"
|
||||||
|
list="destinations"
|
||||||
|
placeholder="Destination"
|
||||||
|
id="destination"
|
||||||
|
name="destination"
|
||||||
|
value=""
|
||||||
|
data-relation="distance_in_km" />
|
||||||
|
<datalist id="destinations">
|
||||||
|
{% for distance in distances %}<option value="{{ distance.0 }}" distance="{{ distance.1 }}" />{% endfor %}
|
||||||
|
</datalist>
|
||||||
|
</div>
|
||||||
|
<div class="relative col-span-2">
|
||||||
|
{{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km" , type="number", min=0, value='', class="rounded-md") }}
|
||||||
|
<span class="absolute right-0 bottom-0 py-1.5 px-2 bg-white dark:bg-primary-950 border-0 text-gray-600 dark:text-gray-100 ring-1 ring-inset ring-gray-300 dark:ring-primary-950 rounded-br-md rounded-tr-md">km</span>
|
||||||
|
</div>
|
||||||
|
{{ macros::input(label="Kommentar", name="comments", type="text", wrapper_class="col-span-4") }}
|
||||||
|
{{ macros::select(label="Typ", data=logtypes, name='logtype', default="Normal", wrapper_class="col-span-4") }}
|
||||||
|
<input type="submit"
|
||||||
|
value="Ausfahrt eintragen"
|
||||||
|
class="btn btn-primary w-full col-span-4 m-auto" />
|
||||||
|
</form>
|
||||||
|
{% endmacro new %}
|
||||||
|
{% macro boat_select(id="boat_id") %}
|
||||||
|
{{ macros::select(label="Boot", data=boats, name="boat_id", id=id, display=["name", " (","amount_seats", " x)"], extras=["default_shipmaster_only_steering", "amount_seats", "on_water", "default_destination"], wrapper_class="col-span-4", show_seats=true) }}
|
||||||
|
{% endmacro boat_select %}
|
||||||
|
{% macro rower_select(id, selected, amount_seats='', class='', init='false', cox_on_boat='', steering_person_id='') %}
|
||||||
|
{#{% if not amount_seats or amount_seats > 1 %}#}
|
||||||
|
<div class="{{ class }}">
|
||||||
|
<label for="{{ id }}" class="text-sm text-gray-600 dark:text-gray-100">
|
||||||
|
Ruderer (inkl. Schiffsführer und Steuerperson)
|
||||||
|
</label>
|
||||||
|
<select style="width: 100%;" multiple name="rowers[]" id="{{ id }}" class="w-full" data-seats="{{ amount_seats }}" data-init={{ init }}>
|
||||||
|
{% for user in users %}
|
||||||
|
{% set_global sel = false %}
|
||||||
|
{% for rower in selected %}
|
||||||
|
{% if rower.id == user.id %}
|
||||||
|
{% set_global sel = true %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
<option value="{{ user.id }}"
|
||||||
|
{% if sel %}selected{% endif %}
|
||||||
|
{% if user.on_water %}disabled="disabled"{% endif %}
|
||||||
|
data-custom-properties='{"is_cox": {{ "cox" in user.roles }}, "is_racing": {{ "Rennrudern" in user.roles }}, "steers": {{ user.id == steering_person_id }}, "cox_on_boat": {{ user.id == cox_on_boat }}}'>
|
||||||
|
{{ user.name }}
|
||||||
|
{% if user.on_water %}(am Wasser){% endif %}
|
||||||
|
</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{#{% endif %}#}
|
||||||
|
{% endmacro rower_select %}
|
||||||
|
{% macro show(log, state, allowed_to_close=false) %}
|
||||||
|
<div class="grid grid-cols-1 gap-3 mb-3 w-full">
|
||||||
|
<div class="pt-2 px-3 {% if not loop.first %}border-t{% endif %}">
|
||||||
|
<div class="w-full">
|
||||||
|
<div class="flex justify-between items-center">
|
||||||
|
<div>
|
||||||
|
<strong class="block text-primary-900 dark:text-white">
|
||||||
|
{{ log.departure | date(format="%H:%M") }}
|
||||||
|
Uhr
|
||||||
|
</strong>
|
||||||
|
<a href="#"
|
||||||
|
data-sidebar="true"
|
||||||
|
data-trigger="sidebar"
|
||||||
|
data-header="<strong>{{ log.departure | date(format="%H:%M") }} Uhr</strong> ({{ log.boat.name }})"
|
||||||
|
data-body="#log{{ log.id }}"
|
||||||
|
class="text-sm link-primary break-all">{{ log.boat.name }}</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{% if allowed_to_close and state == "on_water" %}
|
||||||
|
<a href="#"
|
||||||
|
data-sidebar="true"
|
||||||
|
data-trigger="sidebar"
|
||||||
|
data-header="<strong>{{ log.departure | date(format="%H:%M") }} Uhr</strong> ({{ log.boat.name }})"
|
||||||
|
data-body="#close{{ log.id }}"
|
||||||
|
class="border-0 btn btn-dark text-white flex items-center justify-center ml-3">
|
||||||
|
{% include "includes/pencil" %}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hidden">
|
||||||
|
{% if allowed_to_close and state == "on_water" %}
|
||||||
|
<div id="close{{ log.id }}">{{ log::home(log=log) }}</div>
|
||||||
|
<div>LÖSCHEN</div>
|
||||||
|
{% endif %}
|
||||||
|
<div id="log{{ log.id }}">
|
||||||
|
{% if log.destination %}{{ log.destination }}{% endif %}
|
||||||
|
{% for rower in log.rowers %}
|
||||||
|
<p>
|
||||||
|
{{ rower.name }}
|
||||||
|
{% if rower.id == log.shipmaster or rower.id == log.steering_person %}
|
||||||
|
<small class="text-gray-600 dark:text-primary-100">(
|
||||||
|
{% if rower.id == log.shipmaster %}Schiffsführer{% endif %}
|
||||||
|
{% if rower.id == log.shipmaster and rower.id == log.steering_person %}/{% endif %}
|
||||||
|
{% if rower.id == log.steering_person %}Steuerperson{% endif %}
|
||||||
|
)</small>
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
{% endfor %}
|
||||||
|
{% set amount_rowers = log.rowers | length %}
|
||||||
|
{% set amount_guests = log.boat.amount_seats - amount_rowers %}
|
||||||
|
{% if amount_guests > 0 %}
|
||||||
|
Gäste <small class="text-gray-600">(ohne Account)</small>:
|
||||||
|
{{ amount_guests }}
|
||||||
|
{% endif %}
|
||||||
|
{% if allowed_to_close and state == "on_water" %}
|
||||||
|
<a href="/log/{{ log.id }}/delete"
|
||||||
|
class="btn btn-alert w-full absolute bottom-0 left-0"
|
||||||
|
style="border-radius: 0"
|
||||||
|
onclick="return confirm('Willst du diesen Eintrag wirklich löschen? Die Daten gehen verloren');">Löschen</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endmacro show %}
|
||||||
|
{% macro show_old(log, state, allowed_to_close=false, index) %}
|
||||||
|
<div class="border-t bg-white dark:bg-primary-900 py-3 px-4 relative"
|
||||||
|
data-filterable="true"
|
||||||
|
data-filter="{{ log.boat.name }} {% for rower in log.rowers %}{{ rower.name }}{% endfor %}">
|
||||||
|
{% if log.logtype %}
|
||||||
|
<div class="absolute top-0 right-0 bg-primary-100 rounded-bl-md text-primary-950 text-xs w-32 px-2 py-1 text-center font-bold">
|
||||||
|
{% if log.logtype == 1 %}
|
||||||
|
Wanderfahrt
|
||||||
|
{% else %}
|
||||||
|
{% if log.logtype == 2 %}
|
||||||
|
Regatta
|
||||||
|
{% else %}
|
||||||
|
{{ log.logtype }}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div {% if log.logtype %}class="mt-4 sm:mt-0"{% endif %}>
|
||||||
|
<strong class="text-black dark:text-white">{{ log.boat.name }}</strong> <small class="text-gray-600 dark:text-gray-100">({{ log.shipmaster_user.name -}}
|
||||||
|
{% if log.shipmaster_only_steering %}- handgesteuert{% endif -%}
|
||||||
|
)</small>
|
||||||
|
<small class="block text-gray-600 dark:text-gray-100">
|
||||||
|
{% if state == "completed" and log.departure | date(format='%d.%m.%Y') == log.arrival | date(format='%d.%m.%Y') %}
|
||||||
|
{{ log.departure | date(format='%d.%m.%Y') }} ({{ log.departure | date(format='%H:%M') }} - {{ log.arrival | date(format='%H:%M') }})
|
||||||
|
{% else %}
|
||||||
|
{{ log.departure | date(format='%d.%m.%Y (%H:%M)') }}
|
||||||
|
{% if state == "completed" %}
|
||||||
|
- {{ log.arrival | date(format='%d.%m.%Y (%H:%M)') }}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</small>
|
||||||
|
{% set amount_rowers = log.rowers | length %}
|
||||||
|
{% set amount_guests = log.boat.amount_seats - amount_rowers %}
|
||||||
|
{% if allowed_to_close and state == "on_water" %}
|
||||||
|
{{ log::home(log=log) }}
|
||||||
|
{% else %}
|
||||||
|
<div class="text-black dark:text-white">
|
||||||
|
{{ log.destination }}
|
||||||
|
{% if state == "completed" %}
|
||||||
|
<small class="text-gray-600 dark:text-gray-100">({{ log.distance_in_km }} km)</small>
|
||||||
|
{% endif %}
|
||||||
|
{% if log.comments %}<span class="text-sm italic">- "{{ log.comments }}"</span>{% endif %}
|
||||||
|
</div>
|
||||||
|
{% if amount_guests > 0 or log.rowers | length > 0 %}
|
||||||
|
<div class="text-sm text-gray-600 dark:text-gray-100">
|
||||||
|
Ruderer:
|
||||||
|
{% for rower in log.rowers -%}
|
||||||
|
{{ rower.name -}}
|
||||||
|
{% if not loop.last or amount_guests > 0 and log.boat.name != 'Externes Boot' %},{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% if amount_guests > 0 and log.boat.name != 'Externes Boot' %}
|
||||||
|
Gäste <small class="text-gray-600 dark:text-gray-100">(ohne Account)</small>: {{ amount_guests }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{% endmacro show_old %}
|
{% endmacro show_old %}
|
||||||
|
|
||||||
{% macro home(log) %}
|
{% macro home(log) %}
|
||||||
<form class="grid grid-cols-1 gap-3" action="/log/{{log.id}}" method="post">
|
<form class="grid grid-cols-1 gap-3"
|
||||||
{{ macros::input(label='Ankunftszeit', name='arrival', type='datetime-local', required=true, class="change-id-js rounded-md current-date-time") }}
|
action="/log/{{ log.id }}"
|
||||||
|
method="post">
|
||||||
<div>
|
{{ macros::input(label='Ankunftszeit', name='arrival', type='datetime-local', required=true, class="change-id-js rounded-md current-date-time") }}
|
||||||
<label for="destination" class="text-sm text-gray-600 dark:text-gray-100">Ziel</label>
|
<div>
|
||||||
|
<label for="destination" class="text-sm text-gray-600 dark:text-gray-100">Ziel</label>
|
||||||
<input class="input rounded-md set-distance-js change-id-js" type="search" list="destinations" placeholder="Destination" required="required" id="destination{{ log.id }}" name="destination" value="{{log.destination}}" data-relation="distance_in_km{{log.id}}"/>
|
<input class="input rounded-md set-distance-js change-id-js"
|
||||||
</div>
|
type="search"
|
||||||
|
list="destinations"
|
||||||
<div class="relative">
|
placeholder="Destination"
|
||||||
{{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km" ~ log.id , type="number", min=0, value=log.distance_in_km, required=true, class="rounded-md change-id-js") }}
|
required="required"
|
||||||
<span class="absolute right-0 bottom-0 py-1.5 px-2 bg-white dark:bg-primary-950 border-0 text-gray-600 dark:text-gray-100 ring-1 ring-inset ring-gray-300 dark:ring-primary-950 rounded-br-md rounded-tr-md">km</span>
|
id="destination{{ log.id }}"
|
||||||
</div>
|
name="destination"
|
||||||
|
value="{{ log.destination }}"
|
||||||
{{ macros::input(label="Kommentar", name="comments", id="comments" ~ log.id, type="text", value=log.comments, class="rounded-md change-id-js") }}
|
data-relation="distance_in_km{{ log.id }}" />
|
||||||
|
</div>
|
||||||
<details class="bg-gray-200 bg-opacity-80 dark:bg-primary-900 rounded-md p-2">
|
<div class="relative">
|
||||||
<summary class="cursor-pointer">Details ändern</summary>
|
{{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km" ~ log.id , type="number", min=0, value=log.distance_in_km, required=true, class="rounded-md change-id-js") }}
|
||||||
<div class="grid grid-cols-1 gap-3">
|
<span class="absolute right-0 bottom-0 py-1.5 px-2 bg-white dark:bg-primary-950 border-0 text-gray-600 dark:text-gray-100 ring-1 ring-inset ring-gray-300 dark:ring-primary-950 rounded-br-md rounded-tr-md">km</span>
|
||||||
{{ macros::input(label='Abfahrtszeit', name='departure', type='datetime-local', required=true, class="change-id-js rounded-md", value=log.departure) }}
|
</div>
|
||||||
{{ log::rower_select(id="rowers"~log.id, selected=log.rowers, amount_seats=log.boat.amount_seats, steering_person_id=log.steering_user.id, cox_on_boat=log.shipmaster_user.id) }}
|
{{ macros::input(label="Kommentar", name="comments", id="comments" ~ log.id, type="text", value=log.comments, class="rounded-md change-id-js") }}
|
||||||
{{ macros::select(label="Schiffsführer", data=[], name='shipmaster', id="shipmaster-rowers"~log.id, class="change-id-js", selected_id=log.shipmaster_user.id, required=true) }}
|
<details class="bg-gray-200 bg-opacity-80 dark:bg-primary-900 rounded-md p-2">
|
||||||
{{ macros::select(label="Steuerperson", data=[], name='steering_person', id="steering_person-rowers"~log.id, class="change-id-js", selected_id=log.steering_user.id, required=true) }}
|
<summary class="cursor-pointer">Details ändern</summary>
|
||||||
<div>{{ macros::checkbox(label="Handgesteuert", name="shipmaster_only_steering", id="shipmaster_only_steering" ~ log.id , checked=log.shipmaster_only_steering,class="rounded-md change-id-js") }}</div>
|
<div class="grid grid-cols-1 gap-3">
|
||||||
{{ macros::select(label="Typ", data=logtypes, name="logtype", id="logtype" ~ log.id, default="Normal", selected_id=log.logtype, class="rounded-md change-id-js") }}
|
{{ macros::input(label='Abfahrtszeit', name='departure', type='datetime-local', required=true, class="change-id-js rounded-md", value=log.departure) }}
|
||||||
</div>
|
{{ log::rower_select(id="rowers"~log.id, selected=log.rowers, amount_seats=log.boat.amount_seats, steering_person_id=log.steering_user.id, cox_on_boat=log.shipmaster_user.id) }}
|
||||||
</details>
|
{{ macros::select(label="Schiffsführer", data=[], name='shipmaster', id="shipmaster-rowers"~log.id, class="change-id-js", selected_id=log.shipmaster_user.id, required=true) }}
|
||||||
|
{{ macros::select(label="Steuerperson", data=[], name='steering_person', id="steering_person-rowers"~log.id, class="change-id-js", selected_id=log.steering_user.id, required=true) }}
|
||||||
|
<div>
|
||||||
<input class="btn btn-primary" type="submit" value="Ausfahrt beenden"/>
|
{{ macros::checkbox(label="Handgesteuert", name="shipmaster_only_steering", id="shipmaster_only_steering" ~ log.id , checked=log.shipmaster_only_steering,class="rounded-md change-id-js") }}
|
||||||
</form>
|
</div>
|
||||||
|
{{ macros::select(label="Typ", data=logtypes, name="logtype", id="logtype" ~ log.id, default="Normal", selected_id=log.logtype, class="rounded-md change-id-js") }}
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
<input class="btn btn-primary" type="submit" value="Ausfahrt beenden" />
|
||||||
|
</form>
|
||||||
{% endmacro home %}
|
{% endmacro home %}
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
<svg width="16" height="16" fill="currentColor" class="inline h-4 w-4 text-primary-300 group-hover:text-primary-400 mr-2" viewbox="0 0 16 16" style="margin-top: -0.2rem">
|
<svg width="16"
|
||||||
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2z"/>
|
height="16"
|
||||||
|
fill="currentColor"
|
||||||
|
class="inline h-4 w-4 text-primary-300 group-hover:text-primary-400 mr-2"
|
||||||
|
viewbox="0 0 16 16"
|
||||||
|
style="margin-top: -0.2rem">
|
||||||
|
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2z" />
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 383 B |
@ -1,3 +1,6 @@
|
|||||||
<svg class="h-5 w-5 text-primary-300 group-hover:text-primary-400" viewbox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
<svg class="h-5 w-5 text-primary-300 group-hover:text-primary-400"
|
||||||
<path fill-rule="evenodd" d="M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z" clip-rule="evenodd"/>
|
viewbox="0 0 20 20"
|
||||||
|
fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd" d="M10 1a4.5 4.5 0 00-4.5 4.5V9H5a2 2 0 00-2 2v6a2 2 0 002 2h10a2 2 0 002-2v-6a2 2 0 00-2-2h-.5V5.5A4.5 4.5 0 0010 1zm3 8V5.5a3 3 0 10-6 0V9h6z" clip-rule="evenodd" />
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 347 B |
@ -1,237 +1,196 @@
|
|||||||
{% macro header(loggedin_user) %}
|
{% macro header(loggedin_user) %}
|
||||||
<header
|
<header class="bg-primary-900 text-white flex justify-center p-3 fixed w-full z-10">
|
||||||
class="bg-primary-900 text-white flex justify-center p-3 fixed w-full z-10"
|
<div class="max-w-screen-xl w-full flex justify-between items-center">
|
||||||
>
|
<div class="w-1/3 truncate">
|
||||||
<div class="max-w-screen-xl w-full flex justify-between items-center">
|
{% if "Donau Linz" in loggedin_user.roles %}
|
||||||
<div class="w-1/3 truncate">
|
<a href="/planned">
|
||||||
{% if "Donau Linz" in loggedin_user.roles %}
|
{% else %}
|
||||||
<a href="/planned">
|
<a href="/">
|
||||||
{% else %}
|
{% endif %}
|
||||||
<a href="/">
|
Hü
|
||||||
{% endif %}
|
{{ loggedin_user.name }}
|
||||||
Hü
|
</a>
|
||||||
{{ loggedin_user.name }}
|
</div>
|
||||||
</a>
|
<div>
|
||||||
</div>
|
<a href="https://wiki.rudernlinz.at/ruderassistent#faq"
|
||||||
|
target="_blank"
|
||||||
<div>
|
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer">
|
||||||
<a
|
{% include "includes/question-icon" %}
|
||||||
href="https://wiki.rudernlinz.at/ruderassistent#faq"
|
<span class="sr-only">FAQs</span>
|
||||||
target="_blank"
|
</a>
|
||||||
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
|
{% if "scheckbuch" in loggedin_user.roles and loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %}
|
||||||
>
|
<a href="#"
|
||||||
{% include "includes/question-icon" %}
|
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
|
||||||
<span class="sr-only">FAQs</span>
|
data-sidebar="true"
|
||||||
</a>
|
data-trigger="sidebar"
|
||||||
{% if "scheckbuch" in loggedin_user.roles and loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %}
|
data-header="Ergo Challenge"
|
||||||
<a
|
data-body="#mobile-menu-guest">
|
||||||
href="#"
|
{% include "includes/book" %}
|
||||||
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
|
<span class="sr-only">Ergo</span>
|
||||||
data-sidebar="true"
|
</a>
|
||||||
data-trigger="sidebar"
|
<div class="hidden">
|
||||||
data-header="Ergo Challenge"
|
<div id="mobile-menu-guest">
|
||||||
data-body="#mobile-menu-guest"
|
<a href="/ergo" class="block w-100 py-2 hover:text-primary-600 border-t">Ergo</a>
|
||||||
>
|
</div>
|
||||||
{% include "includes/book" %}
|
</div>
|
||||||
<span class="sr-only">Ergo</span>
|
{% endif %}
|
||||||
</a>
|
{% if "scheckbuch" not in loggedin_user.roles %}
|
||||||
<div class="hidden">
|
<a href="#"
|
||||||
<div id="mobile-menu-guest">
|
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
|
||||||
<a
|
data-sidebar="true"
|
||||||
href="/ergo"
|
data-trigger="sidebar"
|
||||||
class="block w-100 py-2 hover:text-primary-600 border-t"
|
data-header="Menü"
|
||||||
>
|
data-body="#mobile-menu">
|
||||||
Ergo
|
{% include "includes/book" %}
|
||||||
</a>
|
<span class="sr-only">Logbuch</span>
|
||||||
|
</a>
|
||||||
|
<div class="hidden">
|
||||||
|
<div id="mobile-menu">
|
||||||
|
<a href="/log" class="block w-100 py-2 hover:text-primary-600">Ausfahrt eintragen</a>
|
||||||
|
<a href="/log/show"
|
||||||
|
class="block w-100 py-2 hover:text-primary-600 border-t">Logbuch</a>
|
||||||
|
{% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %}
|
||||||
|
<a href="/ergo" class="block w-100 py-2 hover:text-primary-600 border-t">Ergo</a>
|
||||||
|
{% endif %}
|
||||||
|
<a href="/stat" class="block w-100 py-2 hover:text-primary-600 border-t">Statistik</a>
|
||||||
|
<a href="/stat/boats"
|
||||||
|
class="block w-100 py-2 hover:text-primary-600 border-t">Bootsauswertung</a>
|
||||||
|
{% if "admin" in loggedin_user.roles %}
|
||||||
|
<a href="/admin/boat"
|
||||||
|
class="block w-100 py-2 hover:text-primary-600 border-t">Boote</a>
|
||||||
|
{% endif %}
|
||||||
|
<a href="/boatdamage"
|
||||||
|
class="block w-100 py-2 hover:text-primary-600 border-t">Bootsschaden</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if "admin" in loggedin_user.roles %}
|
||||||
|
<a href="/admin/user"
|
||||||
|
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer">
|
||||||
|
<svg class="inline h-4"
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
fill="currentColor"
|
||||||
|
class="bi bi-person-lines-fill"
|
||||||
|
viewbox="0 0 16 16">
|
||||||
|
<path d="M6 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-5 6s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zM11 3.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm.5 2.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1h-4zm2 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2zm0 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2z" />
|
||||||
|
</svg>
|
||||||
|
<span class="sr-only">Userverwaltung</span>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
<a href="/auth/logout"
|
||||||
|
class="inline-flex justify-center rounded-md bg-gray-200 ml-1 px-3 py-2 text-sm font-semibold text-primary-950 hover:bg-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer">
|
||||||
|
<svg class="inline h-4"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewbox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
class="feather feather-log-out">
|
||||||
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
|
||||||
|
<polyline points="16 17 21 12 16 7"></polyline>
|
||||||
|
<line x1="21" y1="12" x2="9" y2="12"></line>
|
||||||
|
</svg>
|
||||||
|
<span class="sr-only">Ausloggen</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</header>
|
||||||
{% endif %}
|
<div class="h-8"></div>
|
||||||
{% if "scheckbuch" not in loggedin_user.roles %}
|
{% endmacro header %}
|
||||||
<a
|
{% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='', pattern='', readonly=false) %}
|
||||||
href="#"
|
<div class="{{ wrapper_class }}">
|
||||||
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
|
<label for="{{ name }}"
|
||||||
data-sidebar="true"
|
class="{% if hide_label %} sr-only {% else %} text-sm text-gray-600 dark:text-white {% endif %}">
|
||||||
data-trigger="sidebar"
|
{{ label }}
|
||||||
data-header="Menü"
|
</label>
|
||||||
data-body="#mobile-menu"
|
<input {% if type=='datetime-local' %}onclick='if (!this.value) setCurrentdate(this)'{% endif %}
|
||||||
>
|
{% if id %} id="{{ id }}" {% else %} id="{{ name }}" {% endif %}
|
||||||
{% include "includes/book" %}
|
name="{{ name }}"
|
||||||
<span class="sr-only">Logbuch</span>
|
type="{{ type }}"
|
||||||
</a>
|
{% if required %}required{% endif %}
|
||||||
<div class="hidden">
|
value="{{ value }}"
|
||||||
<div id="mobile-menu">
|
class="input {{ class }}"
|
||||||
<a href="/log" class="block w-100 py-2 hover:text-primary-600">
|
placeholder="{% if hide_label %}{{ label }}{% endif %}"
|
||||||
Ausfahrt eintragen
|
{% if min is defined %}min="{{ min }}"{% endif %}
|
||||||
</a>
|
{% if autofocus %}autofocus{% endif %}
|
||||||
<a
|
{% if pattern %}pattern="{{ pattern }}"{% endif %}
|
||||||
href="/log/show"
|
{% if readonly %}readonly{% endif %}>
|
||||||
class="block w-100 py-2 hover:text-primary-600 border-t"
|
|
||||||
>
|
|
||||||
Logbuch
|
|
||||||
</a>
|
|
||||||
{% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %}
|
|
||||||
<a
|
|
||||||
href="/ergo"
|
|
||||||
class="block w-100 py-2 hover:text-primary-600 border-t"
|
|
||||||
>
|
|
||||||
Ergo
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
<a
|
|
||||||
href="/stat"
|
|
||||||
class="block w-100 py-2 hover:text-primary-600 border-t"
|
|
||||||
>
|
|
||||||
Statistik
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
href="/stat/boats"
|
|
||||||
class="block w-100 py-2 hover:text-primary-600 border-t"
|
|
||||||
>
|
|
||||||
Bootsauswertung
|
|
||||||
</a>
|
|
||||||
{% if "admin" in loggedin_user.roles %}
|
|
||||||
<a
|
|
||||||
href="/admin/boat"
|
|
||||||
class="block w-100 py-2 hover:text-primary-600 border-t"
|
|
||||||
>
|
|
||||||
Boote
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
<a
|
|
||||||
href="/boatdamage"
|
|
||||||
class="block w-100 py-2 hover:text-primary-600 border-t"
|
|
||||||
>
|
|
||||||
Bootsschaden
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endmacro input %}
|
||||||
{% if "admin" in loggedin_user.roles %}
|
{% macro checkbox(label, name, id='', checked=false, class='', disabled=false) %}
|
||||||
<a
|
<label for="{{ name }}{{ id }}"
|
||||||
href="/admin/user"
|
class="flex items-center cursor-pointer text-black dark:text-white hover:text-gray-900 dark:hover:text-gray-100 {{ class }}">
|
||||||
class="inline-flex justify-center rounded-md bg-primary-600 mx-1 px-3 py-2 text-sm font-semibold text-white hover:bg-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
|
<input type="checkbox"
|
||||||
>
|
id="{{ name }}{{ id }}"
|
||||||
<svg
|
name="{{ name }}"
|
||||||
class="inline h-4"
|
{% if checked %}checked{% endif %}
|
||||||
width="16"
|
{% if disabled %}disabled{% endif %}
|
||||||
height="16"
|
class="h-4 w-4 accent-primary-600 dark:accent-primary-200 mr-2" />
|
||||||
fill="currentColor"
|
{{ label }}
|
||||||
class="bi bi-person-lines-fill"
|
</label>
|
||||||
viewbox="0 0 16 16"
|
{% endmacro checkbox %}
|
||||||
>
|
{% macro select(label, data, name='trip_type', default='', id='', selected_id='', display='', extras='', class='', wrapper_class='', required=false, show_seats=false, new_last_entry='') %}
|
||||||
<path
|
<div class="{{ wrapper_class }}">
|
||||||
d="M6 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-5 6s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zM11 3.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm.5 2.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1h-4zm2 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2zm0 3a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2z"
|
<label for="{{ name }}" class="text-sm text-gray-600 dark:text-gray-100">{{ label }}</label>
|
||||||
/>
|
{% if display == '' %}
|
||||||
</svg>
|
{% set display = ["name"] %}
|
||||||
<span class="sr-only">Userverwaltung</span>
|
{% endif %}
|
||||||
</a>
|
<select name="{{ name }}"
|
||||||
{% endif %}
|
{% if id %} id="{{ id }}" {% else %} id="{{ name }}" {% endif %}
|
||||||
<a
|
class="input rounded-md {{ class }}"
|
||||||
href="/auth/logout"
|
{% if required %}required="required"{% endif %}>
|
||||||
class="inline-flex justify-center rounded-md bg-gray-200 ml-1 px-3 py-2 text-sm font-semibold text-primary-950 hover:bg-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 cursor-pointer"
|
{% if default %}<option selected value>{{ default }}</option>{% endif %}
|
||||||
>
|
{% for d in data %}
|
||||||
<svg
|
<option value="{{ d.id }}" {% if d.id == selected_id %}selected{% endif %} {% if extras != '' %} {% for extra in extras %} {% if extra != 'on_water' and d[extra] %} data-{{ extra }}={{ d[extra] }} {% else %} {% if d[extra] %}disabled{% endif %} {% endif %} {% endfor %} {% endif %} {% if show_seats %} data-custom-properties='{"amount_seats": {{ d["amount_seats"] }}, "owner": "{{ d["owner"] }}", "default_destination": "{{ d["default_destination"] }}", "boat_in_ottensheim": {{ d["location_id"] == 2 }}}'{% endif %}>
|
||||||
class="inline h-4"
|
{% for displa in display -%}
|
||||||
width="24"
|
{%- if d[displa] -%}
|
||||||
height="24"
|
{{- d[displa] -}}
|
||||||
viewbox="0 0 24 24"
|
{%- else -%}
|
||||||
fill="none"
|
{{- displa -}}
|
||||||
stroke="currentColor"
|
{%- endif -%}
|
||||||
stroke-width="2"
|
{%- endfor %}
|
||||||
stroke-linecap="round"
|
</option>
|
||||||
stroke-linejoin="round"
|
{% endfor %}
|
||||||
class="feather feather-log-out"
|
{% if new_last_entry %}<option value="-1">{{ new_last_entry }}</option>{% endif %}
|
||||||
>
|
</select>
|
||||||
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
|
</div>
|
||||||
<polyline points="16 17 21 12 16 7"></polyline>
|
{% endmacro select %}
|
||||||
<line x1="21" y1="12" x2="9" y2="12"></line>
|
{% macro alert(message, type, class='') %}
|
||||||
</svg>
|
<div class="{{ class }} alert-{{ type }} text-white px-3 py-1 rounded-md text-center">{{ message }}</div>
|
||||||
<span class="sr-only">Ausloggen</span>
|
{% endmacro alert %}
|
||||||
</a>
|
{% macro box(participants, empty_seats='', header='Freie Plätze:', text='Keine Ruderer angemeldet', bg='primary-600', color='white', trip_details_id='', allow_removing=false) %}
|
||||||
</div>
|
<div class="text-{{ color }} bg-{{ bg }} text-center p-1 mt-1 rounded-t-md">
|
||||||
</div>
|
{{ header }}
|
||||||
</header>
|
{{ empty_seats }}
|
||||||
<div class="h-8"></div>
|
</div>
|
||||||
{% endmacro header %}
|
<div class="p-2 border border-t-0 border-{{ bg }} mb-4 rounded-b-md">
|
||||||
|
{% if participants | length > 0 %}
|
||||||
{% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='', pattern='', readonly=false) %}
|
{% for rower in participants %}
|
||||||
<div class="{{wrapper_class}}">
|
{{ rower.name }}
|
||||||
<label for="{{ name }}" class="{% if hide_label %} sr-only {% else %} text-sm text-gray-600 dark:text-white {% endif %}">{{ label }}</label>
|
{% if rower.is_guest %}<small class="text-gray-600 dark:text-gray-100">(Scheckbuch)</small>{% endif %}
|
||||||
<input {% if type=='datetime-local' %} onclick='if (!this.value) setCurrentdate(this)' {% endif %}{% if id %} id="{{ id }}" {% else %} id="{{ name }}" {% endif %} name="{{ name }}" type="{{ type }}" {% if required %} required {% endif %} value="{{ value }}" class="input {{ class }}" placeholder="{% if hide_label %}{{ label }}{% endif %}" {% if min is defined %} min="{{ min }}" {% endif %} {% if autofocus %} autofocus {% endif %}{% if pattern %}pattern="{{ pattern }}"{% endif %}{% if readonly %}readonly{% endif %}>
|
{% if rower.is_real_guest %}
|
||||||
</div>
|
<small class="text-gray-600 dark:text-gray-100">(Gast)</small>
|
||||||
{% endmacro input %}
|
{% if allow_removing %}
|
||||||
|
<a href="/planned/remove/{{ trip_details_id }}/{{ rower.name }}"
|
||||||
{% macro checkbox(label, name, id='', checked=false, class='', disabled=false) %}
|
class="btn btn-attention btn-fw">Abmelden</a>
|
||||||
<label for="{{ name }}{{ id }}" class="flex items-center cursor-pointer text-black dark:text-white hover:text-gray-900 dark:hover:text-gray-100 {{ class }}">
|
{% endif %}
|
||||||
<input type="checkbox" id="{{ name }}{{ id }}" name="{{ name }}" {% if checked %} checked {% endif %} {% if disabled %} disabled {% endif %} class="h-4 w-4 accent-primary-600 dark:accent-primary-200 mr-2"/>
|
{% endif %}
|
||||||
{{ label }}
|
<span class="hidden">(angemeldet seit
|
||||||
</label>
|
{{ rower.registered_at }})</span>
|
||||||
{% endmacro checkbox %}
|
<br />
|
||||||
|
{% endfor %}
|
||||||
{% macro select(label, data, name='trip_type', default='', id='', selected_id='', display='', extras='', class='', wrapper_class='', required=false, show_seats=false, new_last_entry='') %}
|
{% else %}
|
||||||
<div class="{{wrapper_class}}">
|
{{ text }}
|
||||||
<label for="{{ name }}" class="text-sm text-gray-600 dark:text-gray-100">{{ label }}</label>
|
{% endif %}
|
||||||
{% if display == '' %}
|
</div>
|
||||||
{% set display = ["name"] %}
|
{% endmacro box %}
|
||||||
{% endif %}
|
{% macro faq(question, answer) %}
|
||||||
<select name="{{ name }}" {% if id %} id="{{ id }}" {% else %} id="{{ name }}" {% endif %} class="input rounded-md {{ class }}" {% if required %}required="required"{% endif %}>
|
<div>
|
||||||
{% if default %}
|
<h2 class="flex mb-4 text-lg font-bold text-primary-900">{{ question }}</h2>
|
||||||
<option selected value>{{ default }}</option>
|
<p class="text-primary-950">{{ answer | safe }}</p>
|
||||||
{% endif %}
|
</div>
|
||||||
{% for d in data %}
|
{% endmacro faq %}
|
||||||
<option value="{{ d.id }}" {% if d.id == selected_id %} selected {% endif %} {% if extras != '' %} {% for extra in extras %} {% if extra != 'on_water' and d[extra] %} data-{{extra}}={{d[extra]}} {% else %} {% if d[extra] %} disabled {% endif %} {% endif %} {% endfor %} {% endif %} {% if show_seats %} data-custom-properties='{"amount_seats": {{ d["amount_seats"] }}, "owner": "{{ d["owner"] }}", "default_destination": "{{ d["default_destination"] }}", "boat_in_ottensheim": {{ d["location_id"] == 2 }}}'{% endif %}>
|
|
||||||
{% for displa in display -%}
|
|
||||||
{%- if d[displa] -%}
|
|
||||||
{{- d[displa] -}}
|
|
||||||
{%- else -%}
|
|
||||||
{{- displa -}}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor %}
|
|
||||||
</option>
|
|
||||||
{% endfor %}
|
|
||||||
{% if new_last_entry %}
|
|
||||||
<option value="-1">{{ new_last_entry }}</option>
|
|
||||||
{% endif %}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
{% endmacro select %}
|
|
||||||
|
|
||||||
{% macro alert(message, type, class='') %}
|
|
||||||
<div class="{{ class }} alert-{{ type }} text-white px-3 py-1 rounded-md text-center">
|
|
||||||
{{ message }}
|
|
||||||
</div>
|
|
||||||
{% endmacro alert %}
|
|
||||||
|
|
||||||
{% macro box(participants, empty_seats='', header='Freie Plätze:', text='Keine Ruderer angemeldet', bg='primary-600', color='white', trip_details_id='', allow_removing=false) %}
|
|
||||||
<div class="text-{{ color }} bg-{{ bg }} text-center p-1 mt-1 rounded-t-md">{{ header }}
|
|
||||||
{{ empty_seats }}</div>
|
|
||||||
<div class="p-2 border border-t-0 border-{{ bg }} mb-4 rounded-b-md">
|
|
||||||
{% if participants | length > 0 %}
|
|
||||||
{% for rower in participants %}
|
|
||||||
{{ rower.name }}
|
|
||||||
{% if rower.is_guest %}
|
|
||||||
<small class="text-gray-600 dark:text-gray-100">(Scheckbuch)</small>
|
|
||||||
{% endif %}
|
|
||||||
{% if rower.is_real_guest %}
|
|
||||||
<small class="text-gray-600 dark:text-gray-100">(Gast)</small>
|
|
||||||
{% if allow_removing %}
|
|
||||||
<a href="/planned/remove/{{ trip_details_id }}/{{ rower.name }}" class="btn btn-attention btn-fw">Abmelden</a>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
<span class="hidden">(angemeldet seit
|
|
||||||
{{ rower.registered_at }})</span><br/>
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
{{ text }}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endmacro box %}
|
|
||||||
|
|
||||||
{% macro faq(question, answer) %}
|
|
||||||
<div>
|
|
||||||
<h2 class="flex mb-4 text-lg font-bold text-primary-900">
|
|
||||||
{{ question }}
|
|
||||||
</h2>
|
|
||||||
<p class="text-primary-950">{{ answer | safe }}</p>
|
|
||||||
</div>
|
|
||||||
{% endmacro faq %}
|
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil-square" viewBox="0 0 16 16">
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
|
width="16"
|
||||||
<path fill-rule="evenodd" d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5v11z"/>
|
height="16"
|
||||||
|
fill="currentColor"
|
||||||
|
class="bi bi-pencil-square"
|
||||||
|
viewBox="0 0 16 16">
|
||||||
|
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z" />
|
||||||
|
<path fill-rule="evenodd" d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5v11z" />
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 579 B After Width: | Height: | Size: 610 B |
@ -1,3 +1,8 @@
|
|||||||
<svg class="inline h-5 w-5" width="16" height="16" fill="currentColor" class="bi bi-plus" viewbox="0 0 16 16">
|
<svg class="inline h-5 w-5"
|
||||||
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
|
width="16"
|
||||||
|
height="16"
|
||||||
|
fill="currentColor"
|
||||||
|
class="bi bi-plus"
|
||||||
|
viewbox="0 0 16 16">
|
||||||
|
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z" />
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 262 B |
@ -1,4 +1 @@
|
|||||||
<script>var QRCodep;!function(){function a(a){this.mode=j.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=0,c=this.data.length;c>b;b++){var d=[],e=this.data.charCodeAt(b);e>65536?(d[0]=240|(1835008&e)>>>18,d[1]=128|(258048&e)>>>12,d[2]=128|(4032&e)>>>6,d[3]=128|63&e):e>2048?(d[0]=224|(61440&e)>>>12,d[1]=128|(4032&e)>>>6,d[2]=128|63&e):e>128?(d[0]=192|(1984&e)>>>6,d[1]=128|63&e):d[0]=e,this.parsedData.push(d)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function c(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c<a.length&&0==a[c];)c++;this.num=new Array(a.length-c+b);for(var d=0;d<a.length-c;d++)this.num[d]=a[d+c]}function d(a,b){this.totalCount=a,this.dataCount=b}function e(){this.buffer=[],this.length=0}function f(){return"undefined"!=typeof CanvasRenderingContext2D}function g(){var a=!1,b=navigator.userAgent;if(/android/i.test(b)){a=!0;var c=b.toString().match(/android ([0-9]\.[0-9])/i);c&&c[1]&&(a=parseFloat(c[1]))}return a}function h(a,b){for(var c=1,d=i(a),e=0,f=p.length;f>=e;e++){var g=0;switch(b){case k.L:g=p[e][0];break;case k.M:g=p[e][1];break;case k.Q:g=p[e][2];break;case k.H:g=p[e][3]}if(g>=d)break;c++}if(c>p.length)throw new Error("Too long data");return c}function i(a){var b=encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return b.length+(b.length!=a?3:0)}a.prototype={getLength:function(a){return this.parsedData.length},write:function(a){for(var b=0,c=this.parsedData.length;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype={addData:function(b){var c=new a(b);this.dataList.push(c),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b)throw new Error(a+","+b);return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=new Array(this.moduleCount);for(var e=0;e<this.moduleCount;e++)this.modules[d][e]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(a,c),this.typeNumber>=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,b){for(var c=-1;7>=c;c++)if(!(-1>=a+c||this.moduleCount<=a+c))for(var d=-1;7>=d;d++)-1>=b+d||this.moduleCount<=b+d||(c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?this.modules[a+c][b+d]=!0:this.modules[a+c][b+d]=!1)},getBestMaskPattern:function(){for(var a=0,b=0,c=0;8>c;c++){this.makeImpl(!0,c);var d=m.getLostPoint(this);(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var d=a.createEmptyMovieClip(b,c),e=1;this.make();for(var f=0;f<this.modules.length;f++)for(var g=f*e,h=0;h<this.modules[f].length;h++){var i=h*e,j=this.modules[f][h];j&&(d.beginFill(0,100),d.moveTo(i,g),d.lineTo(i+e,g),d.lineTo(i+e,g+e),d.lineTo(i,g+e),d.endFill())}return d},setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=a%2==0);for(var b=8;b<this.moduleCount-8;b++)null==this.modules[6][b]&&(this.modules[6][b]=b%2==0)},setupPositionAdjustPattern:function(){for(var a=m.getPatternPosition(this.typeNumber),b=0;b<a.length;b++)for(var c=0;c<a.length;c++){var d=a[b],e=a[c];if(null==this.modules[d][e])for(var f=-2;2>=f;f++)for(var g=-2;2>=g;g++)-2==f||2==f||-2==g||2==g||0==f&&0==g?this.modules[d+f][e+g]=!0:this.modules[d+f][e+g]=!1}},setupTypeNumber:function(a){for(var b=m.getBCHTypeNumber(this.typeNumber),c=0;18>c;c++){var d=!a&&1==(b>>c&1);this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(var c=0;18>c;c++){var d=!a&&1==(b>>c&1);this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){for(var c=this.errorCorrectLevel<<3|b,d=m.getBCHTypeInfo(c),e=0;15>e;e++){var f=!a&&1==(d>>e&1);6>e?this.modules[e][8]=f:8>e?this.modules[e+1][8]=f:this.modules[this.moduleCount-15+e][8]=f}for(var e=0;15>e;e++){var f=!a&&1==(d>>e&1);8>e?this.modules[8][this.moduleCount-e-1]=f:9>e?this.modules[8][15-e-1+1]=f:this.modules[8][15-e-1]=f}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){for(var c=-1,d=this.moduleCount-1,e=7,f=0,g=this.moduleCount-1;g>0;g-=2)for(6==g&&g--;;){for(var h=0;2>h;h++)if(null==this.modules[d][g-h]){var i=!1;f<a.length&&(i=1==(a[f]>>>e&1));var j=m.getMask(b,d,g-h);j&&(i=!i),this.modules[d][g-h]=i,e--,-1==e&&(f++,e=7)}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(a,c,f){for(var g=d.getRSBlocks(a,c),h=new e,i=0;i<f.length;i++){var j=f[i];h.put(j.mode,4),h.put(j.getLength(),m.getLengthInBits(j.mode,a)),j.write(h)}for(var k=0,i=0;i<g.length;i++)k+=g[i].dataCount;if(h.getLengthInBits()>8*k)throw new Error("code length overflow. ("+h.getLengthInBits()+">"+8*k+")");for(h.getLengthInBits()+4<=8*k&&h.put(0,4);h.getLengthInBits()%8!=0;)h.putBit(!1);for(;;){if(h.getLengthInBits()>=8*k)break;if(h.put(b.PAD0,8),h.getLengthInBits()>=8*k)break;h.put(b.PAD1,8)}return b.createBytes(h,g)},b.createBytes=function(a,b){for(var d=0,e=0,f=0,g=new Array(b.length),h=new Array(b.length),i=0;i<b.length;i++){var j=b[i].dataCount,k=b[i].totalCount-j;e=Math.max(e,j),f=Math.max(f,k),g[i]=new Array(j);for(var l=0;l<g[i].length;l++)g[i][l]=255&a.buffer[l+d];d+=j;var n=m.getErrorCorrectPolynomial(k),o=new c(g[i],n.getLength()-1),p=o.mod(n);h[i]=new Array(n.getLength()-1);for(var l=0;l<h[i].length;l++){var q=l+p.getLength()-h[i].length;h[i][l]=q>=0?p.get(q):0}}for(var r=0,l=0;l<b.length;l++)r+=b[l].totalCount;for(var s=new Array(r),t=0,l=0;e>l;l++)for(var i=0;i<b.length;i++)l<g[i].length&&(s[t++]=g[i][l]);for(var l=0;f>l;l++)for(var i=0;i<b.length;i++)l<h[i].length&&(s[t++]=h[i][l]);return s};for(var j={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},k={L:1,M:0,Q:3,H:2},l={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},m={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var b=a<<10;m.getBCHDigit(b)-m.getBCHDigit(m.G15)>=0;)b^=m.G15<<m.getBCHDigit(b)-m.getBCHDigit(m.G15);return(a<<10|b)^m.G15_MASK},getBCHTypeNumber:function(a){for(var b=a<<12;m.getBCHDigit(b)-m.getBCHDigit(m.G18)>=0;)b^=m.G18<<m.getBCHDigit(b)-m.getBCHDigit(m.G18);return a<<12|b},getBCHDigit:function(a){for(var b=0;0!=a;)b++,a>>>=1;return b},getPatternPosition:function(a){return m.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case l.PATTERN000:return(b+c)%2==0;case l.PATTERN001:return b%2==0;case l.PATTERN010:return c%3==0;case l.PATTERN011:return(b+c)%3==0;case l.PATTERN100:return(Math.floor(b/2)+Math.floor(c/3))%2==0;case l.PATTERN101:return b*c%2+b*c%3==0;case l.PATTERN110:return(b*c%2+b*c%3)%2==0;case l.PATTERN111:return(b*c%3+(b+c)%2)%2==0;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var b=new c([1],0),d=0;a>d;d++)b=b.multiply(new c([1,n.gexp(d)],0));return b},getLengthInBits:function(a,b){if(b>=1&&10>b)switch(a){case j.MODE_NUMBER:return 10;case j.MODE_ALPHA_NUM:return 9;case j.MODE_8BIT_BYTE:return 8;case j.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(27>b)switch(a){case j.MODE_NUMBER:return 12;case j.MODE_ALPHA_NUM:return 11;case j.MODE_8BIT_BYTE:return 16;case j.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else{if(!(41>b))throw new Error("type:"+b);switch(a){case j.MODE_NUMBER:return 14;case j.MODE_ALPHA_NUM:return 13;case j.MODE_8BIT_BYTE:return 16;case j.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}},getLostPoint:function(a){for(var b=a.getModuleCount(),c=0,d=0;b>d;d++)for(var e=0;b>e;e++){for(var f=0,g=a.isDark(d,e),h=-1;1>=h;h++)if(!(0>d+h||d+h>=b))for(var i=-1;1>=i;i++)0>e+i||e+i>=b||0==h&&0==i||g==a.isDark(d+h,e+i)&&f++;f>5&&(c+=3+f-5)}for(var d=0;b-1>d;d++)for(var e=0;b-1>e;e++){var j=0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,0!=j&&4!=j||(c+=3)}for(var d=0;b>d;d++)for(var e=0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40);for(var e=0;b>e;e++)for(var d=0;b-6>d;d++)a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40);for(var k=0,e=0;b>e;e++)for(var d=0;b>d;d++)a.isDark(d,e)&&k++;var l=Math.abs(100*k/b/b-50)/5;return c+=10*l}},n={glog:function(a){if(1>a)throw new Error("glog("+a+")");return n.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;a>=256;)a-=255;return n.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},o=0;8>o;o++)n.EXP_TABLE[o]=1<<o;for(var o=8;256>o;o++)n.EXP_TABLE[o]=n.EXP_TABLE[o-4]^n.EXP_TABLE[o-5]^n.EXP_TABLE[o-6]^n.EXP_TABLE[o-8];for(var o=0;255>o;o++)n.LOG_TABLE[n.EXP_TABLE[o]]=o;c.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var e=0;e<a.getLength();e++)b[d+e]^=n.gexp(n.glog(this.get(d))+n.glog(a.get(e)));return new c(b,0)},mod:function(a){if(this.getLength()-a.getLength()<0)return this;for(var b=n.glog(this.get(0))-n.glog(a.get(0)),d=new Array(this.getLength()),e=0;e<this.getLength();e++)d[e]=this.get(e);for(var e=0;e<a.getLength();e++)d[e]^=n.gexp(n.glog(a.get(e))+b);return new c(d,0).mod(a)}},d.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],d.getRSBlocks=function(a,b){var c=d.getRsBlockTable(a,b);if(void 0==c)throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+b);for(var e=c.length/3,f=[],g=0;e>g;g++)for(var h=c[3*g+0],i=c[3*g+1],j=c[3*g+2],k=0;h>k;k++)f.push(new d(i,j));return f},d.getRsBlockTable=function(a,b){switch(b){case k.L:return d.RS_BLOCK_TABLE[4*(a-1)+0];case k.M:return d.RS_BLOCK_TABLE[4*(a-1)+1];case k.Q:return d.RS_BLOCK_TABLE[4*(a-1)+2];case k.H:return d.RS_BLOCK_TABLE[4*(a-1)+3];default:return}},e.prototype={get:function(a){var b=Math.floor(a/8);return 1==(this.buffer[b]>>>7-a%8&1)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(a>>>b-c-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer[b]|=128>>>this.length%8),this.length++}};var p=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],q=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function b(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var c=this._htOption,d=this._el,e=a.getModuleCount();Math.floor(c.width/e),Math.floor(c.height/e);this.clear();var f=b("svg",{viewBox:"0 0 "+String(e)+" "+String(e),width:"100%",height:"100%",fill:c.colorLight});f.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),d.appendChild(f),f.appendChild(b("rect",{fill:c.colorLight,width:"100%",height:"100%"})),f.appendChild(b("rect",{fill:c.colorDark,width:"1",height:"1",id:"template"}));for(var g=0;e>g;g++)for(var h=0;e>h;h++)if(a.isDark(g,h)){var i=b("use",{x:String(h),y:String(g)});i.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),f.appendChild(i)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),r="svg"===document.documentElement.tagName.toLowerCase(),s=r?q:f()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function b(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement("img"),e=function(){c._bSupportDataURI=!1,c._fFail&&c._fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,void(d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var c=1/window.devicePixelRatio,d=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,b,e,f,g,h,i,j,k){if("nodeName"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*c;else"undefined"==typeof j&&(arguments[1]*=c,arguments[2]*=c,arguments[3]*=c,arguments[4]*=c);d.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=g(),this._htOption=b,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display="none",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&b.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.clear=function(){this._el.innerHTML=""},a}();QRCodep=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:k.H},"string"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];"string"==typeof a&&(a=document.getElementById(a)),this._htOption.useSVG&&(s=q),this._android=g(),this._el=a,this._oQRCode=null,this._htOption.text&&this.makeCode(this._htOption.text)},QRCodep.prototype.makeCode=function(a){this._oQRCode=new b(h(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,-1!=this._htOption.dpi&&-1!=this._htOption.mmPerDot&&(this._htOption.width=this._oQRCode.moduleCount*this._htOption.dpi/25.4*this._htOption.mmPerDot,this._htOption.height=this._oQRCode.moduleCount*this._htOption.dpi/25.4*this._htOption.mmPerDot),this._oDrawing=new s(this._el,this._htOption),this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCodep.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCodep.prototype.clear=function(){this._oDrawing.clear()},QRCodep.CorrectLevel=k}();var sepaQR;!function(){"use strict";var a={UTF_8:1,ISO8859_1:2,ISO8859_2:3,ISO8859_4:4,ISO8859_5:5,ISO8859_7:6,ISO8859_10:7,ISO8859_15:8};sepaQR=function(b){if(this._sOpt={serviceTag:"BCD",version:"001",charset:a.UTF_8,identificationCode:"SCT",benefBIC:"",benefName:"",benefAccNr:"",amountEuro:"",purpose:"",creditorRef:"",remittanceInf:"",information:""},b)for(var c in b)this._sOpt[c]=b[c]},sepaQR.prototype.validServiceTag=function(){return"BCD"===this._sOpt.serviceTag},sepaQR.prototype.validVersion=function(){return"001"===this._sOpt.version||"002"===this._sOpt.version},sepaQR.prototype.validCharset=function(){return this._sOpt.charset>0&&this._sOpt.charset<=8},sepaQR.prototype.validIdentificationCode=function(){return"SCT"===this._sOpt.identificationCode},sepaQR.prototype.validBenefName=function(){var a="string"==typeof this._sOpt.benefName&&this._sOpt.benefName.length>=1&&this._sOpt.benefName.length<=70;if(!a)throw new Error("benefName not valid!");return a},sepaQR.prototype.validBenefAccNr=function(){var a="string"==typeof this._sOpt.benefAccNr&&this._sOpt.benefAccNr.length>=1&&this._sOpt.benefAccNr.length<=34;if(!a)throw new Error("benefAccNr not valid!");return a},sepaQR.prototype.validAmountEuro=function(){if("string"==typeof this._sOpt.amountEuro)return 0===this._sOpt.amountEuro.length;if("number"==typeof this._sOpt.amountEuro){this._sOpt.amountEuro=Math.round(100*this._sOpt.amountEuro)/100;var a=this._sOpt.amountEuro>.01&&this._sOpt.amountEuro<=999999999.99;if(!a)throw new Error("Amount not valid!");return a}},sepaQR.prototype.validBenefBic=function(){var a="002"==this._sOpt.version||"string"==typeof this._sOpt.benefBIC&&this._sOpt.benefBIC.length>=0&&this._sOpt.benefBIC.length<=11;if(!a)throw new Error("BIC is mandatory in Version 001!");if(a="string"==typeof this._sOpt.benefBIC&&this._sOpt.benefBIC.length>=0&&this._sOpt.benefBIC.length<=11,!a)throw new Error("benefBIC not valid!");return a},sepaQR.prototype.validPurpose=function(){var a="string"==typeof this._sOpt.purpose&&this._sOpt.purpose.length>=0&&this._sOpt.purpose.length<=4;if(!a)throw new Error("Purpose not valid!");return a},sepaQR.prototype.validInformation=function(){var a="string"==typeof this._sOpt.information&&this._sOpt.information.length>=0&&this._sOpt.information.length<=70;if(!a)throw new Error("Information not valid!");return a},sepaQR.prototype.validCreditorRefOrRemittance=function(){var a="string"==typeof this._sOpt.creditorRef&&0===this._sOpt.creditorRef.length,b="string"==typeof this._sOpt.remittanceInf&&0===this._sOpt.remittanceInf.length,c=a&&"string"==typeof this._sOpt.remittanceInf&&this._sOpt.remittanceInf.length<=140||b&&"string"==typeof this._sOpt.creditorRef&&this._sOpt.creditorRef.length<=35;if(!c)throw new Error("creditorRef or Remittance not valid!");return c},sepaQR.prototype.validQRTextLength=function(){for(var a=this.prepareQRText(),b=0,c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b+=e>65536?4:e>2048?3:e>128?2:1}return 328>=b},sepaQR.prototype.valid=function(){var a=this.validServiceTag()&&this.validVersion()&&this.validCharset()&&this.validIdentificationCode()&&this.validBenefName()&&this.validBenefAccNr()&&this.validAmountEuro()&&this.validBenefBic()&&this.validPurpose()&&this.validInformation()&&this.validPurpose()&&this.validCreditorRefOrRemittance()&&this.validQRTextLength();return a},sepaQR.prototype.prepareQRText=function(){return(this._sOpt.serviceTag+"\n"+this._sOpt.version+"\n"+this._sOpt.charset+"\n"+this._sOpt.identificationCode+"\n"+this._sOpt.benefBIC+"\n"+this._sOpt.benefName+"\n"+this._sOpt.benefAccNr+"\nEUR"+this._sOpt.amountEuro+"\n"+this._sOpt.purpose+"\n"+this._sOpt.creditorRef+"\n"+this._sOpt.remittanceInf+"\n"+this._sOpt.information).trim()},sepaQR.prototype.toQRText=function(){return this.valid()?this.prepareQRText():""},sepaQR.prototype.makeCodeInto=function(a,b){var c={width:256,height:256,mmPerDot:.85,dpi:92,correctLevel:QRCodep.CorrectLevel.M,text:this.toQRText()};if(0!==c.text.length){if(b)for(var d in b)c[d]=b[d];return this.qrcode=new QRCodep(a,c),this.drawExplanatoryLink(document.getElementById(a).getElementsByTagName("canvas")[0],document.createElement("canvas")),this.qrcode}},sepaQR.prototype.drawExplanatoryLink=function(a,b){var c=3,d=12,e=8,f=6,g=a;b.width=g.width,b.height=g.height,b.getContext("2d").drawImage(g,0,0),g.width=b.width+2*(e+c+f),g.height=b.height+2*(e+c+f),CanvasRenderingContext2D.prototype.roundRect=function(a,b,c,d,e,f){return 2*e>c&&(e=c/2),2*e>d&&(e=d/2),this.beginPath(),this.moveTo(a+e,b),this.arcTo(a+c,b,a+c,b+d,e),this.arcTo(a+c,b+d,a,b+d,e),this.lineTo(a+c-f,b+d),this.moveTo(a+c-110,b+d),this.arcTo(a,b+d,a,b,e),this.arcTo(a,b,a+c,b,e),this};var h=g.getContext("2d");h.fillStyle="white",h.rect(0,0,g.width,g.height),h.fill(),h.drawImage(b,e+c+f,e+c+f),h.lineWidth=c,h.roundRect(f+c/2,f+c/2,g.width-c-2*f,g.height-c-2*f,d,3*e).stroke(),h.fillStyle="black",h.font=4.5*c+"px Arial",h.fillText("sepaQR.eu",g.width-110,g.height-f/2)},sepaQR.Charset=a}();</script>
|
<script>var QRCodep;!function(){function a(a){this.mode=j.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=0,c=this.data.length;c>b;b++){var d=[],e=this.data.charCodeAt(b);e>65536?(d[0]=240|(1835008&e)>>>18,d[1]=128|(258048&e)>>>12,d[2]=128|(4032&e)>>>6,d[3]=128|63&e):e>2048?(d[0]=224|(61440&e)>>>12,d[1]=128|(4032&e)>>>6,d[2]=128|63&e):e>128?(d[0]=192|(1984&e)>>>6,d[1]=128|63&e):d[0]=e,this.parsedData.push(d)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function c(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c<a.length&&0==a[c];)c++;this.num=new Array(a.length-c+b);for(var d=0;d<a.length-c;d++)this.num[d]=a[d+c]}function d(a,b){this.totalCount=a,this.dataCount=b}function e(){this.buffer=[],this.length=0}function f(){return"undefined"!=typeof CanvasRenderingContext2D}function g(){var a=!1,b=navigator.userAgent;if(/android/i.test(b)){a=!0;var c=b.toString().match(/android ([0-9]\.[0-9])/i);c&&c[1]&&(a=parseFloat(c[1]))}return a}function h(a,b){for(var c=1,d=i(a),e=0,f=p.length;f>=e;e++){var g=0;switch(b){case k.L:g=p[e][0];break;case k.M:g=p[e][1];break;case k.Q:g=p[e][2];break;case k.H:g=p[e][3]}if(g>=d)break;c++}if(c>p.length)throw new Error("Too long data");return c}function i(a){var b=encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return b.length+(b.length!=a?3:0)}a.prototype={getLength:function(a){return this.parsedData.length},write:function(a){for(var b=0,c=this.parsedData.length;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype={addData:function(b){var c=new a(b);this.dataList.push(c),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b)throw new Error(a+","+b);return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=new Array(this.moduleCount);for(var e=0;e<this.moduleCount;e++)this.modules[d][e]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(a,c),this.typeNumber>=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,b){for(var c=-1;7>=c;c++)if(!(-1>=a+c||this.moduleCount<=a+c))for(var d=-1;7>=d;d++)-1>=b+d||this.moduleCount<=b+d||(c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?this.modules[a+c][b+d]=!0:this.modules[a+c][b+d]=!1)},getBestMaskPattern:function(){for(var a=0,b=0,c=0;8>c;c++){this.makeImpl(!0,c);var d=m.getLostPoint(this);(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var d=a.createEmptyMovieClip(b,c),e=1;this.make();for(var f=0;f<this.modules.length;f++)for(var g=f*e,h=0;h<this.modules[f].length;h++){var i=h*e,j=this.modules[f][h];j&&(d.beginFill(0,100),d.moveTo(i,g),d.lineTo(i+e,g),d.lineTo(i+e,g+e),d.lineTo(i,g+e),d.endFill())}return d},setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=a%2==0);for(var b=8;b<this.moduleCount-8;b++)null==this.modules[6][b]&&(this.modules[6][b]=b%2==0)},setupPositionAdjustPattern:function(){for(var a=m.getPatternPosition(this.typeNumber),b=0;b<a.length;b++)for(var c=0;c<a.length;c++){var d=a[b],e=a[c];if(null==this.modules[d][e])for(var f=-2;2>=f;f++)for(var g=-2;2>=g;g++)-2==f||2==f||-2==g||2==g||0==f&&0==g?this.modules[d+f][e+g]=!0:this.modules[d+f][e+g]=!1}},setupTypeNumber:function(a){for(var b=m.getBCHTypeNumber(this.typeNumber),c=0;18>c;c++){var d=!a&&1==(b>>c&1);this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(var c=0;18>c;c++){var d=!a&&1==(b>>c&1);this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){for(var c=this.errorCorrectLevel<<3|b,d=m.getBCHTypeInfo(c),e=0;15>e;e++){var f=!a&&1==(d>>e&1);6>e?this.modules[e][8]=f:8>e?this.modules[e+1][8]=f:this.modules[this.moduleCount-15+e][8]=f}for(var e=0;15>e;e++){var f=!a&&1==(d>>e&1);8>e?this.modules[8][this.moduleCount-e-1]=f:9>e?this.modules[8][15-e-1+1]=f:this.modules[8][15-e-1]=f}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){for(var c=-1,d=this.moduleCount-1,e=7,f=0,g=this.moduleCount-1;g>0;g-=2)for(6==g&&g--;;){for(var h=0;2>h;h++)if(null==this.modules[d][g-h]){var i=!1;f<a.length&&(i=1==(a [f]>>>e&1));var j=m.getMask(b,d,g-h);j&&(i=!i),this.modules[d][g-h]=i,e--,-1==e&&(f++,e=7)}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(a,c,f){for(var g=d.getRSBlocks(a,c),h=new e,i=0;i<f.length;i++){var j=f[i];h.put(j.mode,4),h.put(j.getLength(),m.getLengthInBits(j.mode,a)),j.write(h)}for(var k=0,i=0;i<g.length;i++)k+=g [i].dataCount;if(h.getLengthInBits()>8*k)throw new Error("code length overflow. ("+h.getLengthInBits()+">"+8*k+")");for(h.getLengthInBits()+4<=8*k&&h.put(0,4);h.getLengthInBits()%8!=0;)h.putBit(!1);for(;;){if(h.getLengthInBits()>=8*k)break;if(h.put(b.PAD0,8),h.getLengthInBits()>=8*k)break;h.put(b.PAD1,8)}return b.createBytes(h,g)},b.createBytes=function(a,b){for(var d=0,e=0,f=0,g=new Array(b.length),h=new Array(b.length),i=0;i<b.length;i++){var j=b[i].dataCount,k=b[i].totalCount-j;e=Math.max(e,j),f=Math.max(f,k),g[i]=new Array(j);for(var l=0;l<g[i].length;l++)g[i][l]=255&a.buffer[l+d];d+=j;var n=m.getErrorCorrectPolynomial(k),o=new c(g[i],n.getLength()-1),p=o.mod(n);h[i]=new Array(n.getLength()-1);for(var l=0;l<h[i].length;l++){var q=l+p.getLength()-h[i].length;h[i][l]=q>=0?p.get(q):0}}for(var r=0,l=0;l<b.length;l++)r+=b [l].totalCount;for(var s=new Array(r),t=0,l=0;e>l;l++)for(var i=0;i<b.length;i++)l<g [i].length&&(s[t++]=g[i][l]);for(var l=0;f>l;l++)for(var i=0;i<b.length;i++)l<h[i].length&&(s[t++]=h[i][l]);return s};for(var j={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},k={L:1,M:0,Q:3,H:2},l={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},m={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var b=a<<10;m.getBCHDigit(b)-m.getBCHDigit(m.G15 )>=0;)b^=m.G15<<m.getBCHDigit(b)-m.getBCHDigit(m.G15);return(a<<10|b)^m.G15_MASK},getBCHTypeNumber:function(a){for(var b=a<<12;m.getBCHDigit(b)-m.getBCHDigit(m.G18)>=0;)b^=m.G18<<m.getBCHDigit(b)-m.getBCHDigit(m.G18);return a<<12|b},getBCHDigit:function(a){for(var b=0;0!=a;)b++,a>>>=1;return b},getPatternPosition:function(a){return m.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case l.PATTERN000:return(b+c)%2==0;case l.PATTERN001:return b%2==0;case l.PATTERN010:return c%3==0;case l.PATTERN011:return(b+c)%3==0;case l.PATTERN100:return(Math.floor(b/2)+Math.floor(c/3))%2==0;case l.PATTERN101:return b*c%2+b*c%3==0;case l.PATTERN110:return(b*c%2+b*c%3)%2==0;case l.PATTERN111:return(b*c%3+(b+c)%2)%2==0;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var b=new c([1],0),d=0;a>d;d++)b=b.multiply(new c([1,n.gexp(d)],0));return b},getLengthInBits:function(a,b){if(b>=1&&10>b)switch(a){case j.MODE_NUMBER:return 10;case j.MODE_ALPHA_NUM:return 9;case j.MODE_8BIT_BYTE:return 8;case j.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(27>b)switch(a){case j.MODE_NUMBER:return 12;case j.MODE_ALPHA_NUM:return 11;case j.MODE_8BIT_BYTE:return 16;case j.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else{if(!(41>b))throw new Error("type:"+b);switch(a){case j.MODE_NUMBER:return 14;case j.MODE_ALPHA_NUM:return 13;case j.MODE_8BIT_BYTE:return 16;case j.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}},getLostPoint:function(a){for(var b=a.getModuleCount(),c=0,d=0;b>d;d++)for(var e=0;b>e;e++){for(var f=0,g=a.isDark(d,e),h=-1;1>=h;h++)if(!(0>d+h||d+h>=b))for(var i=-1;1>=i;i++)0>e+i||e+i>=b||0==h&&0==i||g==a.isDark(d+h,e+i)&&f++;f>5&&(c+=3+f-5)}for(var d=0;b-1>d;d++)for(var e=0;b-1>e;e++){var j=0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,0!=j&&4!=j||(c+=3)}for(var d=0;b>d;d++)for(var e=0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40);for(var e=0;b>e;e++)for(var d=0;b-6>d;d++)a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40);for(var k=0,e=0;b>e;e++)for(var d=0;b>d;d++)a.isDark(d,e)&&k++;var l=Math.abs(100*k/b/b-50)/5;return c+=10*l}},n={glog:function(a){if(1>a)throw new Error("glog("+a+")");return n.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;a>=256;)a-=255;return n.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},o=0;8>o;o++)n.EXP_TABLE[o]=1<<o;for(var o=8;256>o;o++)n.EXP_TABLE[o]=n.EXP_TABLE[o-4]^n.EXP_TABLE[o-5]^n.EXP_TABLE[o-6]^n.EXP_TABLE[o-8];for(var o=0;255>o;o++)n.LOG_TABLE[n.EXP_TABLE[o]]=o;c.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var e=0;e<a.getLength();e++)b[d+e]^=n.gexp(n.glog(this.get(d))+n.glog(a.get(e)));return new c(b,0)},mod:function(a){if(this.getLength()-a.getLength()<0)return this;for(var b=n.glog(this.get(0))-n.glog(a.get(0)),d=new Array(this.getLength()),e=0;e<this.getLength();e++)d[e]=this.get(e);for(var e=0;e<a.getLength();e++)d[e]^=n.gexp(n.glog(a.get(e))+b);return new c(d,0).mod(a)}},d.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],d.getRSBlocks=function(a,b){var c=d.getRsBlockTable(a,b);if(void 0==c)throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+b);for(var e=c.length/3,f=[],g=0;e>g;g++)for(var h=c[3*g+0],i=c[3*g+1],j=c[3*g+2],k=0;h>k;k++)f.push(new d(i,j));return f},d.getRsBlockTable=function(a,b){switch(b){case k.L:return d.RS_BLOCK_TABLE[4*(a-1)+0];case k.M:return d.RS_BLOCK_TABLE[4*(a-1)+1];case k.Q:return d.RS_BLOCK_TABLE[4*(a-1)+2];case k.H:return d.RS_BLOCK_TABLE[4*(a-1)+3];default:return}},e.prototype={get:function(a){var b=Math.floor(a/8);return 1==(this.buffer[b]>>>7-a%8&1)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(a>>>b-c-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer [b]|=128>>>this.length%8),this.length++}};var p=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],q=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function b(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var c=this._htOption,d=this._el,e=a.getModuleCount();Math.floor(c.width/e),Math.floor(c.height/e);this.clear();var f=b("svg",{viewBox:"0 0 "+String(e)+" "+String(e),width:"100%",height:"100%",fill:c.colorLight});f.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),d.appendChild(f),f.appendChild(b("rect",{fill:c.colorLight,width:"100%",height:"100%"})),f.appendChild(b("rect",{fill:c.colorDark,width:"1",height:"1",id:"template"}));for(var g=0;e>g;g++)for(var h=0;e>h;h++)if(a.isDark(g,h)){var i=b("use",{x:String(h),y:String(g)});i.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),f.appendChild(i)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),r="svg"===document.documentElement.tagName.toLowerCase(),s=r?q:f()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function b(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement("img"),e=function(){c._bSupportDataURI=!1,c._fFail&&c._fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,void(d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var c=1/window.devicePixelRatio,d=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,b,e,f,g,h,i,j,k){if("nodeName"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*c;else"undefined"==typeof j&&(arguments[1]*=c,arguments[2]*=c,arguments[3]*=c,arguments[4]*=c);d.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=g(),this._htOption=b,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display="none",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&b.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.clear=function(){this._el.innerHTML=""},a}();QRCodep=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:k.H},"string"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];"string"==typeof a&&(a=document.getElementById(a)),this._htOption.useSVG&&(s=q),this._android=g(),this._el=a,this._oQRCode=null,this._htOption.text&&this.makeCode(this._htOption.text)},QRCodep.prototype.makeCode=function(a){this._oQRCode=new b(h(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,-1!=this._htOption.dpi&&-1!=this._htOption.mmPerDot&&(this._htOption.width=this._oQRCode.moduleCount*this._htOption.dpi/25.4*this._htOption.mmPerDot,this._htOption.height=this._oQRCode.moduleCount*this._htOption.dpi/25.4*this._htOption.mmPerDot),this._oDrawing=new s(this._el,this._htOption),this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCodep.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCodep.prototype.clear=function(){this._oDrawing.clear()},QRCodep.CorrectLevel=k}();var sepaQR;!function(){"use strict";var a={UTF_8:1,ISO8859_1:2,ISO8859_2:3,ISO8859_4:4,ISO8859_5:5,ISO8859_7:6,ISO8859_10:7,ISO8859_15:8};sepaQR=function(b){if(this._sOpt={serviceTag:"BCD",version:"001",charset:a.UTF_8,identificationCode:"SCT",benefBIC:"",benefName:"",benefAccNr:"",amountEuro:"",purpose:"",creditorRef:"",remittanceInf:"",information:""},b)for(var c in b)this._sOpt[c]=b[c]},sepaQR.prototype.validServiceTag=function(){return"BCD"===this._sOpt.serviceTag},sepaQR.prototype.validVersion=function(){return"001"===this._sOpt.version||"002"===this._sOpt.version},sepaQR.prototype.validCharset=function(){return this._sOpt.charset>0&&this._sOpt.charset<=8},sepaQR.prototype.validIdentificationCode=function(){return"SCT"===this._sOpt.identificationCode},sepaQR.prototype.validBenefName=function(){var a="string"==typeof this._sOpt.benefName&&this._sOpt.benefName.length>=1&&this._sOpt.benefName.length<=70;if(!a)throw new Error("benefName not valid!");return a},sepaQR.prototype.validBenefAccNr=function(){var a="string"==typeof this._sOpt.benefAccNr&&this._sOpt.benefAccNr.length>=1&&this._sOpt.benefAccNr.length<=34;if(!a)throw new Error("benefAccNr not valid!");return a},sepaQR.prototype.validAmountEuro=function(){if("string"==typeof this._sOpt.amountEuro)return 0===this._sOpt.amountEuro.length;if("number"==typeof this._sOpt.amountEuro){this._sOpt.amountEuro=Math.round(100*this._sOpt.amountEuro)/100;var a=this._sOpt.amountEuro>.01&&this._sOpt.amountEuro<=999999999.99;if(!a)throw new Error("Amount not valid!");return a}},sepaQR.prototype.validBenefBic=function(){var a="002"==this._sOpt.version||"string"==typeof this._sOpt.benefBIC&&this._sOpt.benefBIC.length>=0&&this._sOpt.benefBIC.length<=11;if (!a)throw new Error("BIC is mandatory in Version 001!");if(a="string"==typeof this._sOpt.benefBIC&&this._sOpt.benefBIC.length>=0&&this._sOpt.benefBIC.length<=11,!a)throw new Error("benefBIC not valid!");return a},sepaQR.prototype.validPurpose=function(){var a="string"==typeof this._sOpt.purpose&&this._sOpt.purpose.length>=0&&this._sOpt.purpose.length<=4;if(!a)throw new Error("Purpose not valid!");return a},sepaQR.prototype.validInformation=function(){var a="string"==typeof this._sOpt.information&&this._sOpt.information.length>=0&&this._sOpt.information.length<=70;if(!a)throw new Error("Information not valid!");return a},sepaQR.prototype.validCreditorRefOrRemittance=function(){var a="string"==typeof this._sOpt.creditorRef&&0===this._sOpt.creditorRef.length,b="string"==typeof this._sOpt.remittanceInf&&0===this._sOpt.remittanceInf.length,c=a&&"string"==typeof this._sOpt.remittanceInf&&this._sOpt.remittanceInf.length<=140||b&&"string "==typeof this._sOpt.creditorRef&&this._sOpt.creditorRef.length<=35;if(!c)throw new Error("creditorRef or Remittance not valid!");return c},sepaQR.prototype.validQRTextLength=function(){for(var a=this.prepareQRText(),b=0,c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b+=e>65536?4:e>2048?3:e>128?2:1}return 328>=b},sepaQR.prototype.valid=function(){var a=this.validServiceTag()&&this.validVersion()&&this.validCharset()&&this.validIdentificationCode()&&this.validBenefName()&&this.validBenefAccNr()&&this.validAmountEuro()&&this.validBenefBic()&&this.validPurpose()&&this.validInformation()&&this.validPurpose()&&this.validCreditorRefOrRemittance()&&this.validQRTextLength();return a},sepaQR.prototype.prepareQRText=function(){return(this._sOpt.serviceTag+"\n"+this._sOpt.version+"\n"+this._sOpt.charset+"\n"+this._sOpt.identificationCode+"\n"+this._sOpt.benefBIC+"\n"+this._sOpt.benefName+"\n"+this._sOpt.benefAccNr+"\nEUR"+this._sOpt.amountEuro+"\n"+this._sOpt.purpose+"\n"+this._sOpt.creditorRef+"\n"+this._sOpt.remittanceInf+"\n"+this._sOpt.information).trim()},sepaQR.prototype.toQRText=function(){return this.valid()?this.prepareQRText():""},sepaQR.prototype.makeCodeInto=function(a,b){var c={width:256,height:256,mmPerDot:.85,dpi:92,correctLevel:QRCodep.CorrectLevel.M,text:this.toQRText()};if(0!==c.text.length){if(b)for(var d in b)c[d]=b[d];return this.qrcode=new QRCodep(a,c),this.drawExplanatoryLink(document.getElementById(a).getElementsByTagName("canvas")[0],document.createElement("canvas")),this.qrcode}},sepaQR.prototype.drawExplanatoryLink=function(a,b){var c=3,d=12,e=8,f=6,g=a;b.width=g.width,b.height=g.height,b.getContext("2d").drawImage(g,0,0),g.width=b.width+2*(e+c+f),g.height=b.height+2*(e+c+f),CanvasRenderingContext2D.prototype.roundRect=function(a,b,c,d,e,f){return 2*e>c&&(e=c/2),2*e>d&&(e=d/2),this.beginPath(),this.moveTo(a+e,b),this.arcTo(a+c,b,a+c,b+d,e),this.arcTo(a+c,b+d,a,b+d,e),this.lineTo(a+c-f,b+d),this.moveTo(a+c-110,b+d),this.arcTo(a,b+d,a,b,e),this.arcTo(a,b,a+c,b,e),this};var h=g.getContext("2d");h.fillStyle="white",h.rect(0,0,g.width,g.height),h.fill(),h.drawImage(b,e+c+f,e+c+f),h.lineWidth=c,h.roundRect(f+c/2,f+c/2,g.width-c-2*f,g.height-c-2*f,d,3*e).stroke(),h.fillStyle="black",h.font=4.5*c+"px Arial",h.fillText("sepaQR.eu",g.width-110,g.height-f/2)},sepaQR.Charset=a}();</script> <script>var QRCodep;!function(){function a(a){this.mode=j.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=0,c=this.data.length;c>b;b++){var d=[],e=this.data.charCodeAt(b);e>65536?(d[0]=240|(1835008&e)>>>18,d[1]=128|(258048&e)>>>12,d[2]=128|(4032&e)>>>6,d[3]=128|63&e):e>2048?(d[0]=224|(61440&e)>>>12,d[1]=128|(4032&e)>>>6,d[2]=128|63&e):e>128?(d[0]=192|(1984&e)>>>6,d[1]=128|63&e):d[0]=e,this.parsedData.push(d)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function c(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c<a.length&&0==a[c];)c++;this.num=new Array(a.length-c+b);for(var d=0;d<a.length-c;d++)this.num[d]=a[d+c]}function d(a,b){this.totalCount=a,this.dataCount=b}function e(){this.buffer=[],this.length=0}function f(){return"undefined"!=typeof CanvasRenderingContext2D}function g(){var a=!1,b=navigator.userAgent;if(/android/i.test(b)){a=!0;var c=b.toString().match(/android ([0-9]\.[0-9])/i);c&&c[1]&&(a=parseFloat(c[1]))}return a}function h(a,b){for(var c=1,d=i(a),e=0,f=p.length;f>=e;e++){var g=0;switch(b){case k.L:g=p[e][0];break;case k.M:g=p[e][1];break;case k.Q:g=p[e][2];break;case k.H:g=p[e][3]}if(g>=d)break;c++}if(c>p.length)throw new Error("Too long data");return c}function i(a){var b=encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return b.length+(b.length!=a?3:0)}a.prototype={getLength:function(a){return this.parsedData.length},write:function(a){for(var b=0,c=this.parsedData.length;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype={addData:function(b){var c=new a(b);this.dataList.push(c),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b)throw new Error(a+","+b);return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=new Array(this.moduleCount);for(var e=0;e<this.moduleCount;e++)this.modules[d][e]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(a,c),this.typeNumber>=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,b){for(var c=-1;7>=c;c++)if(!(-1>=a+c||this.moduleCount<=a+c))for(var d=-1;7>=d;d++)-1>=b+d||this.moduleCount<=b+d||(c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?this.modules[a+c][b+d]=!0:this.modules[a+c][b+d]=!1)},getBestMaskPattern:function(){for(var a=0,b=0,c=0;8>c;c++){this.makeImpl(!0,c);var d=m.getLostPoint(this);(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var d=a.createEmptyMovieClip(b,c),e=1;this.make();for(var f=0;f<this.modules.length;f++)for(var g=f*e,h=0;h<this.modules[f].length;h++){var i=h*e,j=this.modules[f][h];j&&(d.beginFill(0,100),d.moveTo(i,g),d.lineTo(i+e,g),d.lineTo(i+e,g+e),d.lineTo(i,g+e),d.endFill())}return d},setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=a%2==0);for(var b=8;b<this.moduleCount-8;b++)null==this.modules[6][b]&&(this.modules[6][b]=b%2==0)},setupPositionAdjustPattern:function(){for(var a=m.getPatternPosition(this.typeNumber),b=0;b<a.length;b++)for(var c=0;c<a.length;c++){var d=a[b],e=a[c];if(null==this.modules[d][e])for(var f=-2;2>=f;f++)for(var g=-2;2>=g;g++)-2==f||2==f||-2==g||2==g||0==f&&0==g?this.modules[d+f][e+g]=!0:this.modules[d+f][e+g]=!1}},setupTypeNumber:function(a){for(var b=m.getBCHTypeNumber(this.typeNumber),c=0;18>c;c++){var d=!a&&1==(b>>c&1);this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(var c=0;18>c;c++){var d=!a&&1==(b>>c&1);this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){for(var c=this.errorCorrectLevel<<3|b,d=m.getBCHTypeInfo(c),e=0;15>e;e++){var f=!a&&1==(d>>e&1);6>e?this.modules[e][8]=f:8>e?this.modules[e+1][8]=f:this.modules[this.moduleCount-15+e][8]=f}for(var e=0;15>e;e++){var f=!a&&1==(d>>e&1);8>e?this.modules[8][this.moduleCount-e-1]=f:9>e?this.modules[8][15-e-1+1]=f:this.modules[8][15-e-1]=f}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){for(var c=-1,d=this.moduleCount-1,e=7,f=0,g=this.moduleCount-1;g>0;g-=2)for(6==g&&g--;;){for(var h=0;2>h;h++)if(null==this.modules[d][g-h]){var i=!1;f<a.length&&(i=1==(a[f]>>>e&1));var j=m.getMask(b,d,g-h);j&&(i=!i),this.modules[d][g-h]=i,e--,-1==e&&(f++,e=7)}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(a,c,f){for(var g=d.getRSBlocks(a,c),h=new e,i=0;i<f.length;i++){var j=f[i];h.put(j.mode,4),h.put(j.getLength(),m.getLengthInBits(j.mode,a)),j.write(h)}for(var k=0,i=0;i<g.length;i++)k+=g[i].dataCount;if(h.getLengthInBits()>8*k)throw new Error("code length overflow. ("+h.getLengthInBits()+">"+8*k+")");for(h.getLengthInBits()+4<=8*k&&h.put(0,4);h.getLengthInBits()%8!=0;)h.putBit(!1);for(;;){if(h.getLengthInBits()>=8*k)break;if(h.put(b.PAD0,8),h.getLengthInBits()>=8*k)break;h.put(b.PAD1,8)}return b.createBytes(h,g)},b.createBytes=function(a,b){for(var d=0,e=0,f=0,g=new Array(b.length),h=new Array(b.length),i=0;i<b.length;i++){var j=b[i].dataCount,k=b[i].totalCount-j;e=Math.max(e,j),f=Math.max(f,k),g[i]=new Array(j);for(var l=0;l<g[i].length;l++)g[i][l]=255&a.buffer[l+d];d+=j;var n=m.getErrorCorrectPolynomial(k),o=new c(g[i],n.getLength()-1),p=o.mod(n);h[i]=new Array(n.getLength()-1);for(var l=0;l<h[i].length;l++){var q=l+p.getLength()-h[i].length;h[i][l]=q>=0?p.get(q):0}}for(var r=0,l=0;l<b.length;l++)r+=b [l].totalCount;for(var s=new Array(r),t=0,l=0;e>l;l++)for(var i=0;i<b.length;i++)l<g [i].length&&(s[t++]=g[i][l]);for(var l=0;f>l;l++)for(var i=0;i<b.length;i++)l<h[i].length&&(s[t++]=h[i][l]);return s};for(var j={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},k={L:1,M:0,Q:3,H:2},l={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},m={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var b=a<<10;m.getBCHDigit(b)-m.getBCHDigit(m.G15 )>=0;)b^=m.G15<<m.getBCHDigit(b)-m.getBCHDigit(m.G15);return(a<<10|b)^m.G15_MASK},getBCHTypeNumber:function(a){for(var b=a<<12;m.getBCHDigit(b)-m.getBCHDigit(m.G18)>=0;)b^=m.G18<<m.getBCHDigit(b)-m.getBCHDigit(m.G18);return a<<12|b},getBCHDigit:function(a){for(var b=0;0!=a;)b++,a>>>=1;return b},getPatternPosition:function(a){return m.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case l.PATTERN000:return(b+c)%2==0;case l.PATTERN001:return b%2==0;case l.PATTERN010:return c%3==0;case l.PATTERN011:return(b+c)%3==0;case l.PATTERN100:return(Math.floor(b/2)+Math.floor(c/3))%2==0;case l.PATTERN101:return b*c%2+b*c%3==0;case l.PATTERN110:return(b*c%2+b*c%3)%2==0;case l.PATTERN111:return(b*c%3+(b+c)%2)%2==0;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var b=new c([1],0),d=0;a>d;d++)b=b.multiply(new c([1,n.gexp(d)],0));return b},getLengthInBits:function(a,b){if(b>=1&&10>b)switch(a){case j.MODE_NUMBER:return 10;case j.MODE_ALPHA_NUM:return 9;case j.MODE_8BIT_BYTE:return 8;case j.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(27>b)switch(a){case j.MODE_NUMBER:return 12;case j.MODE_ALPHA_NUM:return 11;case j.MODE_8BIT_BYTE:return 16;case j.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else{if(!(41>b))throw new Error("type:"+b);switch(a){case j.MODE_NUMBER:return 14;case j.MODE_ALPHA_NUM:return 13;case j.MODE_8BIT_BYTE:return 16;case j.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}},getLostPoint:function(a){for(var b=a.getModuleCount(),c=0,d=0;b>d;d++)for(var e=0;b>e;e++){for(var f=0,g=a.isDark(d,e),h=-1;1>=h;h++)if(!(0>d+h||d+h>=b))for(var i=-1;1>=i;i++)0>e+i||e+i>=b||0==h&&0==i||g==a.isDark(d+h,e+i)&&f++;f>5&&(c+=3+f-5)}for(var d=0;b-1>d;d++)for(var e=0;b-1>e;e++){var j=0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,0!=j&&4!=j||(c+=3)}for(var d=0;b>d;d++)for(var e=0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40);for(var e=0;b>e;e++)for(var d=0;b-6>d;d++)a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40);for(var k=0,e=0;b>e;e++)for(var d=0;b>d;d++)a.isDark(d,e)&&k++;var l=Math.abs(100*k/b/b-50)/5;return c+=10*l}},n={glog:function(a){if(1>a)throw new Error("glog("+a+")");return n.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;a>=256;)a-=255;return n.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},o=0;8>o;o++)n.EXP_TABLE[o]=1<<o;for(var o=8;256>o;o++)n.EXP_TABLE[o]=n.EXP_TABLE[o-4]^n.EXP_TABLE[o-5]^n.EXP_TABLE[o-6]^n.EXP_TABLE[o-8];for(var o=0;255>o;o++)n.LOG_TABLE[n.EXP_TABLE[o]]=o;c.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var e=0;e<a.getLength();e++)b[d+e]^=n.gexp(n.glog(this.get(d))+n.glog(a.get(e)));return new c(b,0)},mod:function(a){if(this.getLength()-a.getLength()<0)return this;for(var b=n.glog(this.get(0))-n.glog(a.get(0)),d=new Array(this.getLength()),e=0;e<this.getLength();e++)d[e]=this.get(e);for(var e=0;e<a.getLength();e++)d[e]^=n.gexp(n.glog(a.get(e))+b);return new c(d,0).mod(a)}},d.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],d.getRSBlocks=function(a,b){var c=d.getRsBlockTable(a,b);if(void 0==c)throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+b);for(var e=c.length/3,f=[],g=0;e>g;g++)for(var h=c[3*g+0],i=c[3*g+1],j=c[3*g+2],k=0;h>k;k++)f.push(new d(i,j));return f},d.getRsBlockTable=function(a,b){switch(b){case k.L:return d.RS_BLOCK_TABLE[4*(a-1)+0];case k.M:return d.RS_BLOCK_TABLE[4*(a-1)+1];case k.Q:return d.RS_BLOCK_TABLE[4*(a-1)+2];case k.H:return d.RS_BLOCK_TABLE[4*(a-1)+3];default:return}},e.prototype={get:function(a){var b=Math.floor(a/8);return 1==(this.buffer[b]>>>7-a%8&1)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(a>>>b-c-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer [b]|=128>>>this.length%8),this.length++}};var p=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],q=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function b(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var c=this._htOption,d=this._el,e=a.getModuleCount();Math.floor(c.width/e),Math.floor(c.height/e);this.clear();var f=b("svg",{viewBox:"0 0 "+String(e)+" "+String(e),width:"100%",height:"100%",fill:c.colorLight});f.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),d.appendChild(f),f.appendChild(b("rect",{fill:c.colorLight,width:"100%",height:"100%"})),f.appendChild(b("rect",{fill:c.colorDark,width:"1",height:"1",id:"template"}));for(var g=0;e>g;g++)for(var h=0;e>h;h++)if(a.isDark(g,h)){var i=b("use",{x:String(h),y:String(g)});i.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),f.appendChild(i)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),r="svg"===document.documentElement.tagName.toLowerCase(),s=r?q:f()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function b(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement("img"),e=function(){c._bSupportDataURI=!1,c._fFail&&c._fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,void(d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var c=1/window.devicePixelRatio,d=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,b,e,f,g,h,i,j,k){if("nodeName"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*c;else"undefined"==typeof j&&(arguments[1]*=c,arguments[2]*=c,arguments[3]*=c,arguments[4]*=c);d.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=g(),this._htOption=b,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display="none",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&b.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.clear=function(){this._el.innerHTML=""},a}();QRCodep=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:k.H},"string"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];"string"==typeof a&&(a=document.getElementById(a)),this._htOption.useSVG&&(s=q),this._android=g(),this._el=a,this._oQRCode=null,this._htOption.text&&this.makeCode(this._htOption.text)},QRCodep.prototype.makeCode=function(a){this._oQRCode=new b(h(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,-1!=this._htOption.dpi&&-1!=this._htOption.mmPerDot&&(this._htOption.width=this._oQRCode.moduleCount*this._htOption.dpi/25.4*this._htOption.mmPerDot,this._htOption.height=this._oQRCode.moduleCount*this._htOption.dpi/25.4*this._htOption.mmPerDot),this._oDrawing=new s(this._el,this._htOption),this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCodep.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCodep.prototype.clear=function(){this._oDrawing.clear()},QRCodep.CorrectLevel=k}();var sepaQR;!function(){"use strict";var a={UTF_8:1,ISO8859_1:2,ISO8859_2:3,ISO8859_4:4,ISO8859_5:5,ISO8859_7:6,ISO8859_10:7,ISO8859_15:8};sepaQR=function(b){if(this._sOpt={serviceTag:"BCD",version:"001",charset:a.UTF_8,identificationCode:"SCT",benefBIC:"",benefName:"",benefAccNr:"",amountEuro:"",purpose:"",creditorRef:"",remittanceInf:"",information:""},b)for(var c in b)this._sOpt[c]=b[c]},sepaQR.prototype.validServiceTag=function(){return"BCD"===this._sOpt.serviceTag},sepaQR.prototype.validVersion=function(){return"001"===this._sOpt.version||"002"===this._sOpt.version},sepaQR.prototype.validCharset=function(){return this._sOpt.charset>0&&this._sOpt.charset<=8},sepaQR.prototype.validIdentificationCode=function(){return"SCT"===this._sOpt.identificationCode},sepaQR.prototype.validBenefName=function(){var a="string"==typeof this._sOpt.benefName&&this._sOpt.benefName.length>=1&&this._sOpt.benefName.length<=70;if(!a)throw new Error("benefName not valid!");return a},sepaQR.prototype.validBenefAccNr=function(){var a="string"==typeof this._sOpt.benefAccNr&&this._sOpt.benefAccNr.length>=1&&this._sOpt.benefAccNr.length<=34;if(!a)throw new Error("benefAccNr not valid!");return a},sepaQR.prototype.validAmountEuro=function(){if("string"==typeof this._sOpt.amountEuro)return 0===this._sOpt.amountEuro.length;if("number"==typeof this._sOpt.amountEuro){this._sOpt.amountEuro=Math.round(100*this._sOpt.amountEuro)/100;var a=this._sOpt.amountEuro>.01&&this._sOpt.amountEuro<=999999999.99;if(!a)throw new Error("Amount not valid!");return a}},sepaQR.prototype.validBenefBic=function(){var a="002"==this._sOpt.version||"string"==typeof this._sOpt.benefBIC&&this._sOpt.benefBIC.length>=0&&this._sOpt.benefBIC.length<=11;if (!a)throw new Error("BIC is mandatory in Version 001!");if(a="string"==typeof this._sOpt.benefBIC&&this._sOpt.benefBIC.length>=0&&this._sOpt.benefBIC.length<=11,!a)throw new Error("benefBIC not valid!");return a},sepaQR.prototype.validPurpose=function(){var a="string"==typeof this._sOpt.purpose&&this._sOpt.purpose.length>=0&&this._sOpt.purpose.length<=4;if(!a)throw new Error("Purpose not valid!");return a},sepaQR.prototype.validInformation=function(){var a="string"==typeof this._sOpt.information&&this._sOpt.information.length>=0&&this._sOpt.information.length<=70;if(!a)throw new Error("Information not valid!");return a},sepaQR.prototype.validCreditorRefOrRemittance=function(){var a="string"==typeof this._sOpt.creditorRef&&0===this._sOpt.creditorRef.length,b="string"==typeof this._sOpt.remittanceInf&&0===this._sOpt.remittanceInf.length,c=a&&"string"==typeof this._sOpt.remittanceInf&&this._sOpt.remittanceInf.length<=140||b&&"string "==typeof this._sOpt.creditorRef&&this._sOpt.creditorRef.length<=35;if(!c)throw new Error("creditorRef or Remittance not valid!");return c},sepaQR.prototype.validQRTextLength=function(){for(var a=this.prepareQRText(),b=0,c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b+=e>65536?4:e>2048?3:e>128?2:1}return 328>=b},sepaQR.prototype.valid=function(){var a=this.validServiceTag()&&this.validVersion()&&this.validCharset()&&this.validIdentificationCode()&&this.validBenefName()&&this.validBenefAccNr()&&this.validAmountEuro()&&this.validBenefBic()&&this.validPurpose()&&this.validInformation()&&this.validPurpose()&&this.validCreditorRefOrRemittance()&&this.validQRTextLength();return a},sepaQR.prototype.prepareQRText=function(){return(this._sOpt.serviceTag+"\n"+this._sOpt.version+"\n"+this._sOpt.charset+"\n"+this._sOpt.identificationCode+"\n"+this._sOpt.benefBIC+"\n"+this._sOpt.benefName+"\n"+this._sOpt.benefAccNr+"\nEUR"+this._sOpt.amountEuro+"\n"+this._sOpt.purpose+"\n"+this._sOpt.creditorRef+"\n"+this._sOpt.remittanceInf+"\n"+this._sOpt.information).trim()},sepaQR.prototype.toQRText=function(){return this.valid()?this.prepareQRText():""},sepaQR.prototype.makeCodeInto=function(a,b){var c={width:256,height:256,mmPerDot:.85,dpi:92,correctLevel:QRCodep.CorrectLevel.M,text:this.toQRText()};if(0!==c.text.length){if(b)for(var d in b)c[d]=b[d];return this.qrcode=new QRCodep(a,c),this.drawExplanatoryLink(document.getElementById(a).getElementsByTagName("canvas")[0],document.createElement("canvas")),this.qrcode}},sepaQR.prototype.drawExplanatoryLink=function(a,b){var c=3,d=12,e=8,f=6,g=a;b.width=g.width,b.height=g.height,b.getContext("2d").drawImage(g,0,0),g.width=b.width+2*(e+c+f),g.height=b.height+2*(e+c+f),CanvasRenderingContext2D.prototype.roundRect=function(a,b,c,d,e,f){return 2*e>c&&(e=c/2),2*e>d&&(e=d/2),this.beginPath(),this.moveTo(a+e,b),this.arcTo(a+c,b,a+c,b+d,e),this.arcTo(a+c,b+d,a,b+d,e),this.lineTo(a+c-f,b+d),this.moveTo(a+c-110,b+d),this.arcTo(a,b+d,a,b,e),this.arcTo(a,b,a+c,b,e),this};var h=g.getContext("2d");h.fillStyle="white",h.rect(0,0,g.width,g.height),h.fill(),h.drawImage(b,e+c+f,e+c+f),h.lineWidth=c,h.roundRect(f+c/2,f+c/2,g.width-c-2*f,g.height-c-2*f,d,3*e).stroke(),h.fillStyle="black",h.font=4.5*c+"px Arial",h.fillText("sepaQR.eu",g.width-110,g.height-f/2)},sepaQR.Charset=a}();</script> <script>var QRCodep;!function(){function a(a){this.mode=j.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=0,c=this.data.length;c>b;b++){var d=[],e=this.data.charCodeAt(b);e>65536?(d[0]=240|(1835008&e)>>>18,d[1]=128|(258048&e)>>>12,d[2]=128|(4032&e)>>>6,d[3]=128|63&e):e>2048?(d[0]=224|(61440&e)>>>12,d[1]=128|(4032&e)>>>6,d[2]=128|63&e):e>128?(d[0]=192|(1984&e)>>>6,d[1]=128|63&e):d[0]=e,this.parsedData.push(d)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function c(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c<a.length&&0==a[c];)c++;this.num=new Array(a.length-c+b);for(var d=0;d<a.length-c;d++)this.num[d]=a[d+c]}function d(a,b){this.totalCount=a,this.dataCount=b}function e(){this.buffer=[],this.length=0}function f(){return"undefined"!=typeof CanvasRenderingContext2D}function g(){var a=!1,b=navigator.userAgent;if(/android/i.test(b)){a=!0;var c=b.toString().match(/android ([0-9]\.[0-9])/i);c&&c[1]&&(a=parseFloat(c[1]))}return a}function h(a,b){for(var c=1,d=i(a),e=0,f=p.length;f>=e;e++){var g=0;switch(b){case k.L:g=p[e][0];break;case k.M:g=p[e][1];break;case k.Q:g=p[e][2];break;case k.H:g=p[e][3]}if(g>=d)break;c++}if(c>p.length)throw new Error("Too long data");return c}function i(a){var b=encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return b.length+(b.length!=a?3:0)}a.prototype={getLength:function(a){return this.parsedData.length},write:function(a){for(var b=0,c=this.parsedData.length;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype={addData:function(b){var c=new a(b);this.dataList.push(c),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b)throw new Error(a+","+b);return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=new Array(this.moduleCount);for(var e=0;e<this.moduleCount;e++)this.modules[d][e]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(a,c),this.typeNumber>=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,b){for(var c=-1;7>=c;c++)if(!(-1>=a+c||this.moduleCount<=a+c))for(var d=-1;7>=d;d++)-1>=b+d||this.moduleCount<=b+d||(c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?this.modules[a+c][b+d]=!0:this.modules[a+c][b+d]=!1)},getBestMaskPattern:function(){for(var a=0,b=0,c=0;8>c;c++){this.makeImpl(!0,c);var d=m.getLostPoint(this);(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var d=a.createEmptyMovieClip(b,c),e=1;this.make();for(var f=0;f<this.modules.length;f++)for(var g=f*e,h=0;h<this.modules[f].length;h++){var i=h*e,j=this.modules[f][h];j&&(d.beginFill(0,100),d.moveTo(i,g),d.lineTo(i+e,g),d.lineTo(i+e,g+e),d.lineTo(i,g+e),d.endFill())}return d},setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=a%2==0);for(var b=8;b<this.moduleCount-8;b++)null==this.modules[6][b]&&(this.modules[6][b]=b%2==0)},setupPositionAdjustPattern:function(){for(var a=m.getPatternPosition(this.typeNumber),b=0;b<a.length;b++)for(var c=0;c<a.length;c++){var d=a[b],e=a[c];if(null==this.modules[d][e])for(var f=-2;2>=f;f++)for(var g=-2;2>=g;g++)-2==f||2==f||-2==g||2==g||0==f&&0==g?this.modules[d+f][e+g]=!0:this.modules[d+f][e+g]=!1}},setupTypeNumber:function(a){for(var b=m.getBCHTypeNumber(this.typeNumber),c=0;18>c;c++){var d=!a&&1==(b>>c&1);this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(var c=0;18>c;c++){var d=!a&&1==(b>>c&1);this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){for(var c=this.errorCorrectLevel<<3|b,d=m.getBCHTypeInfo(c),e=0;15>e;e++){var f=!a&&1==(d>>e&1);6>e?this.modules[e][8]=f:8>e?this.modules[e+1][8]=f:this.modules[this.moduleCount-15+e][8]=f}for(var e=0;15>e;e++){var f=!a&&1==(d>>e&1);8>e?this.modules[8][this.moduleCount-e-1]=f:9>e?this.modules[8][15-e-1+1]=f:this.modules[8][15-e-1]=f}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){for(var c=-1,d=this.moduleCount-1,e=7,f=0,g=this.moduleCount-1;g>0;g-=2)for(6==g&&g--;;){for(var h=0;2>h;h++)if(null==this.modules[d][g-h]){var i=!1;f<a.length&&(i=1==(a[f]>>>e&1));var j=m.getMask(b,d,g-h);j&&(i=!i),this.modules[d][g-h]=i,e--,-1==e&&(f++,e=7)}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(a,c,f){for(var g=d.getRSBlocks(a,c),h=new e,i=0;i<f.length;i++){var j=f[i];h.put(j.mode,4),h.put(j.getLength(),m.getLengthInBits(j.mode,a)),j.write(h)}for(var k=0,i=0;i<g.length;i++)k+=g[i].dataCount;if(h.getLengthInBits()>8*k)throw new Error("code length overflow. ("+h.getLengthInBits()+">"+8*k+")");for(h.getLengthInBits()+4<=8*k&&h.put(0,4);h.getLengthInBits()%8!=0;)h.putBit(!1);for(;;){if(h.getLengthInBits()>=8*k)break;if(h.put(b.PAD0,8),h.getLengthInBits()>=8*k)break;h.put(b.PAD1,8)}return b.createBytes(h,g)},b.createBytes=function(a,b){for(var d=0,e=0,f=0,g=new Array(b.length),h=new Array(b.length),i=0;i<b.length;i++){var j=b[i].dataCount,k=b[i].totalCount-j;e=Math.max(e,j),f=Math.max(f,k),g[i]=new Array(j);for(var l=0;l<g[i].length;l++)g[i][l]=255&a.buffer[l+d];d+=j;var n=m.getErrorCorrectPolynomial(k),o=new c(g[i],n.getLength()-1),p=o.mod(n);h[i]=new Array(n.getLength()-1);for(var l=0;l<h[i].length;l++){var q=l+p.getLength()-h[i].length;h[i][l]=q>=0?p.get(q):0}}for(var r=0,l=0;l<b.length;l++)r+=b [l].totalCount;for(var s=new Array(r),t=0,l=0;e>l;l++)for(var i=0;i<b.length;i++)l<g [i].length&&(s[t++]=g[i][l]);for(var l=0;f>l;l++)for(var i=0;i<b.length;i++)l<h[i].length&&(s[t++]=h[i][l]);return s};for(var j={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},k={L:1,M:0,Q:3,H:2},l={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},m={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var b=a<<10;m.getBCHDigit(b)-m.getBCHDigit(m.G15 )>=0;)b^=m.G15<<m.getBCHDigit(b)-m.getBCHDigit(m.G15);return(a<<10|b)^m.G15_MASK},getBCHTypeNumber:function(a){for(var b=a<<12;m.getBCHDigit(b)-m.getBCHDigit(m.G18)>=0;)b^=m.G18<<m.getBCHDigit(b)-m.getBCHDigit(m.G18);return a<<12|b},getBCHDigit:function(a){for(var b=0;0!=a;)b++,a>>>=1;return b},getPatternPosition:function(a){return m.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case l.PATTERN000:return(b+c)%2==0;case l.PATTERN001:return b%2==0;case l.PATTERN010:return c%3==0;case l.PATTERN011:return(b+c)%3==0;case l.PATTERN100:return(Math.floor(b/2)+Math.floor(c/3))%2==0;case l.PATTERN101:return b*c%2+b*c%3==0;case l.PATTERN110:return(b*c%2+b*c%3)%2==0;case l.PATTERN111:return(b*c%3+(b+c)%2)%2==0;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var b=new c([1],0),d=0;a>d;d++)b=b.multiply(new c([1,n.gexp(d)],0));return b},getLengthInBits:function(a,b){if(b>=1&&10>b)switch(a){case j.MODE_NUMBER:return 10;case j.MODE_ALPHA_NUM:return 9;case j.MODE_8BIT_BYTE:return 8;case j.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(27>b)switch(a){case j.MODE_NUMBER:return 12;case j.MODE_ALPHA_NUM:return 11;case j.MODE_8BIT_BYTE:return 16;case j.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else{if(!(41>b))throw new Error("type:"+b);switch(a){case j.MODE_NUMBER:return 14;case j.MODE_ALPHA_NUM:return 13;case j.MODE_8BIT_BYTE:return 16;case j.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}},getLostPoint:function(a){for(var b=a.getModuleCount(),c=0,d=0;b>d;d++)for(var e=0;b>e;e++){for(var f=0,g=a.isDark(d,e),h=-1;1>=h;h++)if(!(0>d+h||d+h>=b))for(var i=-1;1>=i;i++)0>e+i||e+i>=b||0==h&&0==i||g==a.isDark(d+h,e+i)&&f++;f>5&&(c+=3+f-5)}for(var d=0;b-1>d;d++)for(var e=0;b-1>e;e++){var j=0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,0!=j&&4!=j||(c+=3)}for(var d=0;b>d;d++)for(var e=0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40);for(var e=0;b>e;e++)for(var d=0;b-6>d;d++)a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40);for(var k=0,e=0;b>e;e++)for(var d=0;b>d;d++)a.isDark(d,e)&&k++;var l=Math.abs(100*k/b/b-50)/5;return c+=10*l}},n={glog:function(a){if(1>a)throw new Error("glog("+a+")");return n.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;a>=256;)a-=255;return n.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},o=0;8>o;o++)n.EXP_TABLE[o]=1<<o;for(var o=8;256>o;o++)n.EXP_TABLE[o]=n.EXP_TABLE[o-4]^n.EXP_TABLE[o-5]^n.EXP_TABLE[o-6]^n.EXP_TABLE[o-8];for(var o=0;255>o;o++)n.LOG_TABLE[n.EXP_TABLE[o]]=o;c.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var e=0;e<a.getLength();e++)b[d+e]^=n.gexp(n.glog(this.get(d))+n.glog(a.get(e)));return new c(b,0)},mod:function(a){if(this.getLength()-a.getLength()<0)return this;for(var b=n.glog(this.get(0))-n.glog(a.get(0)),d=new Array(this.getLength()),e=0;e<this.getLength();e++)d[e]=this.get(e);for(var e=0;e<a.getLength();e++)d[e]^=n.gexp(n.glog(a.get(e))+b);return new c(d,0).mod(a)}},d.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],d.getRSBlocks=function(a,b){var c=d.getRsBlockTable(a,b);if(void 0==c)throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+b);for(var e=c.length/3,f=[],g=0;e>g;g++)for(var h=c[3*g+0],i=c[3*g+1],j=c[3*g+2],k=0;h>k;k++)f.push(new d(i,j));return f},d.getRsBlockTable=function(a,b){switch(b){case k.L:return d.RS_BLOCK_TABLE[4*(a-1)+0];case k.M:return d.RS_BLOCK_TABLE[4*(a-1)+1];case k.Q:return d.RS_BLOCK_TABLE[4*(a-1)+2];case k.H:return d.RS_BLOCK_TABLE[4*(a-1)+3];default:return}},e.prototype={get:function(a){var b=Math.floor(a/8);return 1==(this.buffer[b]>>>7-a%8&1)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(a>>>b-c-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer [b]|=128>>>this.length%8),this.length++}};var p=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],q=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function b(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var c=this._htOption,d=this._el,e=a.getModuleCount();Math.floor(c.width/e),Math.floor(c.height/e);this.clear();var f=b("svg",{viewBox:"0 0 "+String(e)+" "+String(e),width:"100%",height:"100%",fill:c.colorLight});f.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),d.appendChild(f),f.appendChild(b("rect",{fill:c.colorLight,width:"100%",height:"100%"})),f.appendChild(b("rect",{fill:c.colorDark,width:"1",height:"1",id:"template"}));for(var g=0;e>g;g++)for(var h=0;e>h;h++)if(a.isDark(g,h)){var i=b("use",{x:String(h),y:String(g)});i.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),f.appendChild(i)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),r="svg"===document.documentElement.tagName.toLowerCase(),s=r?q:f()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function b(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement("img"),e=function(){c._bSupportDataURI=!1,c._fFail&&c._fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,void(d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var c=1/window.devicePixelRatio,d=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,b,e,f,g,h,i,j,k){if("nodeName"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*c;else"undefined"==typeof j&&(arguments[1]*=c,arguments[2]*=c,arguments[3]*=c,arguments[4]*=c);d.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=g(),this._htOption=b,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display="none",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&b.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.clear=function(){this._el.innerHTML=""},a}();QRCodep=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:k.H},"string"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];"string"==typeof a&&(a=document.getElementById(a)),this._htOption.useSVG&&(s=q),this._android=g(),this._el=a,this._oQRCode=null,this._htOption.text&&this.makeCode(this._htOption.text)},QRCodep.prototype.makeCode=function(a){this._oQRCode=new b(h(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,-1!=this._htOption.dpi&&-1!=this._htOption.mmPerDot&&(this._htOption.width=this._oQRCode.moduleCount*this._htOption.dpi/25.4*this._htOption.mmPerDot,this._htOption.height=this._oQRCode.moduleCount*this._htOption.dpi/25.4*this._htOption.mmPerDot),this._oDrawing=new s(this._el,this._htOption),this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCodep.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCodep.prototype.clear=function(){this._oDrawing.clear()},QRCodep.CorrectLevel=k}();var sepaQR;!function(){"use strict";var a={UTF_8:1,ISO8859_1:2,ISO8859_2:3,ISO8859_4:4,ISO8859_5:5,ISO8859_7:6,ISO8859_10:7,ISO8859_15:8};sepaQR=function(b){if(this._sOpt={serviceTag:"BCD",version:"001",charset:a.UTF_8,identificationCode:"SCT",benefBIC:"",benefName:"",benefAccNr:"",amountEuro:"",purpose:"",creditorRef:"",remittanceInf:"",information:""},b)for(var c in b)this._sOpt[c]=b[c]},sepaQR.prototype.validServiceTag=function(){return"BCD"===this._sOpt.serviceTag},sepaQR.prototype.validVersion=function(){return"001"===this._sOpt.version||"002"===this._sOpt.version},sepaQR.prototype.validCharset=function(){return this._sOpt.charset>0&&this._sOpt.charset<=8},sepaQR.prototype.validIdentificationCode=function(){return"SCT"===this._sOpt.identificationCode},sepaQR.prototype.validBenefName=function(){var a="string"==typeof this._sOpt.benefName&&this._sOpt.benefName.length>=1&&this._sOpt.benefName.length<=70;if(!a)throw new Error("benefName not valid!");return a},sepaQR.prototype.validBenefAccNr=function(){var a="string"==typeof this._sOpt.benefAccNr&&this._sOpt.benefAccNr.length>=1&&this._sOpt.benefAccNr.length<=34;if(!a)throw new Error("benefAccNr not valid!");return a},sepaQR.prototype.validAmountEuro=function(){if("string"==typeof this._sOpt.amountEuro)return 0===this._sOpt.amountEuro.length;if("number"==typeof this._sOpt.amountEuro){this._sOpt.amountEuro=Math.round(100*this._sOpt.amountEuro)/100;var a=this._sOpt.amountEuro>.01&&this._sOpt.amountEuro<=999999999.99;if(!a)throw new Error("Amount not valid!");return a}},sepaQR.prototype.validBenefBic=function(){var a="002"==this._sOpt.version||"string"==typeof this._sOpt.benefBIC&&this._sOpt.benefBIC.length>=0&&this._sOpt.benefBIC.length<=11;if (!a)throw new Error("BIC is mandatory in Version 001!");if(a="string"==typeof this._sOpt.benefBIC&&this._sOpt.benefBIC.length>=0&&this._sOpt.benefBIC.length<=11,!a)throw new Error("benefBIC not valid!");return a},sepaQR.prototype.validPurpose=function(){var a="string"==typeof this._sOpt.purpose&&this._sOpt.purpose.length>=0&&this._sOpt.purpose.length<=4;if(!a)throw new Error("Purpose not valid!");return a},sepaQR.prototype.validInformation=function(){var a="string"==typeof this._sOpt.information&&this._sOpt.information.length>=0&&this._sOpt.information.length<=70;if(!a)throw new Error("Information not valid!");return a},sepaQR.prototype.validCreditorRefOrRemittance=function(){var a="string"==typeof this._sOpt.creditorRef&&0===this._sOpt.creditorRef.length,b="string"==typeof this._sOpt.remittanceInf&&0===this._sOpt.remittanceInf.length,c=a&&"string"==typeof this._sOpt.remittanceInf&&this._sOpt.remittanceInf.length<=140||b&&"string"==typeof this._sOpt.creditorRef&&this._sOpt.creditorRef.length<=35;if(!c)throw new Error("creditorRef or Remittance not valid!");return c},sepaQR.prototype.validQRTextLength=function(){for(var a=this.prepareQRText(),b=0,c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b+=e>65536?4:e>2048?3:e>128?2:1}return 328>=b},sepaQR.prototype.valid=function(){var a=this.validServiceTag()&&this.validVersion()&&this.validCharset()&&this.validIdentificationCode()&&this.validBenefName()&&this.validBenefAccNr()&&this.validAmountEuro()&&this.validBenefBic()&&this.validPurpose()&&this.validInformation()&&this.validPurpose()&&this.validCreditorRefOrRemittance()&&this.validQRTextLength();return a},sepaQR.prototype.prepareQRText=function(){return(this._sOpt.serviceTag+"\n"+this._sOpt.version+"\n"+this._sOpt.charset+"\n"+this._sOpt.identificationCode+"\n"+this._sOpt.benefBIC+"\n"+this._sOpt.benefName+"\n"+this._sOpt.benefAccNr+"\nEUR"+this._sOpt.amountEuro+"\n"+this._sOpt.purpose+"\n"+this._sOpt.creditorRef+"\n"+this._sOpt.remittanceInf+"\n"+this._sOpt.information).trim()},sepaQR.prototype.toQRText=function(){return this.valid()?this.prepareQRText():""},sepaQR.prototype.makeCodeInto=function(a,b){var c={width:256,height:256,mmPerDot:.85,dpi:92,correctLevel:QRCodep.CorrectLevel.M,text:this.toQRText()};if(0!==c.text.length){if(b)for(var d in b)c[d]=b[d];return this.qrcode=new QRCodep(a,c),this.drawExplanatoryLink(document.getElementById(a).getElementsByTagName("canvas")[0],document.createElement("canvas")),this.qrcode}},sepaQR.prototype.drawExplanatoryLink=function(a,b){var c=3,d=12,e=8,f=6,g=a;b.width=g.width,b.height=g.height,b.getContext("2d").drawImage(g,0,0),g.width=b.width+2*(e+c+f),g.height=b.height+2*(e+c+f),CanvasRenderingContext2D.prototype.roundRect=function(a,b,c,d,e,f){return 2*e>c&&(e=c/2),2*e>d&&(e=d/2),this.beginPath(),this.moveTo(a+e,b),this.arcTo(a+c,b,a+c,b+d,e),this.arcTo(a+c,b+d,a,b+d,e),this.lineTo(a+c-f,b+d),this.moveTo(a+c-110,b+d),this.arcTo(a,b+d,a,b,e),this.arcTo(a,b,a+c,b,e),this};var h=g.getContext("2d");h.fillStyle="white",h.rect(0,0,g.width,g.height),h.fill(),h.drawImage(b,e+c+f,e+c+f),h.lineWidth=c,h.roundRect(f+c/2,f+c/2,g.width-c-2*f,g.height-c-2*f,d,3*e).stroke(),h.fillStyle="black",h.font=4.5*c+"px Arial",h.fillText("sepaQR.eu",g.width-110,g.height-f/2)},sepaQR.Charset=a}();</script>
|
||||||
<script>var QRCodep;!function(){function a(a){this.mode=j.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=0,c=this.data.length;c>b;b++){var d=[],e=this.data.charCodeAt(b);e>65536?(d[0]=240|(1835008&e)>>>18,d[1]=128|(258048&e)>>>12,d[2]=128|(4032&e)>>>6,d[3]=128|63&e):e>2048?(d[0]=224|(61440&e)>>>12,d[1]=128|(4032&e)>>>6,d[2]=128|63&e):e>128?(d[0]=192|(1984&e)>>>6,d[1]=128|63&e):d[0]=e,this.parsedData.push(d)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function c(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c<a.length&&0==a[c];)c++;this.num=new Array(a.length-c+b);for(var d=0;d<a.length-c;d++)this.num[d]=a[d+c]}function d(a,b){this.totalCount=a,this.dataCount=b}function e(){this.buffer=[],this.length=0}function f(){return"undefined"!=typeof CanvasRenderingContext2D}function g(){var a=!1,b=navigator.userAgent;if(/android/i.test(b)){a=!0;var c=b.toString().match(/android ([0-9]\.[0-9])/i);c&&c[1]&&(a=parseFloat(c[1]))}return a}function h(a,b){for(var c=1,d=i(a),e=0,f=p.length;f>=e;e++){var g=0;switch(b){case k.L:g=p[e][0];break;case k.M:g=p[e][1];break;case k.Q:g=p[e][2];break;case k.H:g=p[e][3]}if(g>=d)break;c++}if(c>p.length)throw new Error("Too long data");return c}function i(a){var b=encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return b.length+(b.length!=a?3:0)}a.prototype={getLength:function(a){return this.parsedData.length},write:function(a){for(var b=0,c=this.parsedData.length;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype={addData:function(b){var c=new a(b);this.dataList.push(c),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b)throw new Error(a+","+b);return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=new Array(this.moduleCount);for(var e=0;e<this.moduleCount;e++)this.modules[d][e]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(a,c),this.typeNumber>=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,b){for(var c=-1;7>=c;c++)if(!(-1>=a+c||this.moduleCount<=a+c))for(var d=-1;7>=d;d++)-1>=b+d||this.moduleCount<=b+d||(c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?this.modules[a+c][b+d]=!0:this.modules[a+c][b+d]=!1)},getBestMaskPattern:function(){for(var a=0,b=0,c=0;8>c;c++){this.makeImpl(!0,c);var d=m.getLostPoint(this);(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var d=a.createEmptyMovieClip(b,c),e=1;this.make();for(var f=0;f<this.modules.length;f++)for(var g=f*e,h=0;h<this.modules[f].length;h++){var i=h*e,j=this.modules[f][h];j&&(d.beginFill(0,100),d.moveTo(i,g),d.lineTo(i+e,g),d.lineTo(i+e,g+e),d.lineTo(i,g+e),d.endFill())}return d},setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=a%2==0);for(var b=8;b<this.moduleCount-8;b++)null==this.modules[6][b]&&(this.modules[6][b]=b%2==0)},setupPositionAdjustPattern:function(){for(var a=m.getPatternPosition(this.typeNumber),b=0;b<a.length;b++)for(var c=0;c<a.length;c++){var d=a[b],e=a[c];if(null==this.modules[d][e])for(var f=-2;2>=f;f++)for(var g=-2;2>=g;g++)-2==f||2==f||-2==g||2==g||0==f&&0==g?this.modules[d+f][e+g]=!0:this.modules[d+f][e+g]=!1}},setupTypeNumber:function(a){for(var b=m.getBCHTypeNumber(this.typeNumber),c=0;18>c;c++){var d=!a&&1==(b>>c&1);this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(var c=0;18>c;c++){var d=!a&&1==(b>>c&1);this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){for(var c=this.errorCorrectLevel<<3|b,d=m.getBCHTypeInfo(c),e=0;15>e;e++){var f=!a&&1==(d>>e&1);6>e?this.modules[e][8]=f:8>e?this.modules[e+1][8]=f:this.modules[this.moduleCount-15+e][8]=f}for(var e=0;15>e;e++){var f=!a&&1==(d>>e&1);8>e?this.modules[8][this.moduleCount-e-1]=f:9>e?this.modules[8][15-e-1+1]=f:this.modules[8][15-e-1]=f}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){for(var c=-1,d=this.moduleCount-1,e=7,f=0,g=this.moduleCount-1;g>0;g-=2)for(6==g&&g--;;){for(var h=0;2>h;h++)if(null==this.modules[d][g-h]){var i=!1;f<a.length&&(i=1==(a[f]>>>e&1));var j=m.getMask(b,d,g-h);j&&(i=!i),this.modules[d][g-h]=i,e--,-1==e&&(f++,e=7)}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(a,c,f){for(var g=d.getRSBlocks(a,c),h=new e,i=0;i<f.length;i++){var j=f[i];h.put(j.mode,4),h.put(j.getLength(),m.getLengthInBits(j.mode,a)),j.write(h)}for(var k=0,i=0;i<g.length;i++)k+=g[i].dataCount;if(h.getLengthInBits()>8*k)throw new Error("code length overflow. ("+h.getLengthInBits()+">"+8*k+")");for(h.getLengthInBits()+4<=8*k&&h.put(0,4);h.getLengthInBits()%8!=0;)h.putBit(!1);for(;;){if(h.getLengthInBits()>=8*k)break;if(h.put(b.PAD0,8),h.getLengthInBits()>=8*k)break;h.put(b.PAD1,8)}return b.createBytes(h,g)},b.createBytes=function(a,b){for(var d=0,e=0,f=0,g=new Array(b.length),h=new Array(b.length),i=0;i<b.length;i++){var j=b[i].dataCount,k=b[i].totalCount-j;e=Math.max(e,j),f=Math.max(f,k),g[i]=new Array(j);for(var l=0;l<g[i].length;l++)g[i][l]=255&a.buffer[l+d];d+=j;var n=m.getErrorCorrectPolynomial(k),o=new c(g[i],n.getLength()-1),p=o.mod(n);h[i]=new Array(n.getLength()-1);for(var l=0;l<h[i].length;l++){var q=l+p.getLength()-h[i].length;h[i][l]=q>=0?p.get(q):0}}for(var r=0,l=0;l<b.length;l++)r+=b[l].totalCount;for(var s=new Array(r),t=0,l=0;e>l;l++)for(var i=0;i<b.length;i++)l<g[i].length&&(s[t++]=g[i][l]);for(var l=0;f>l;l++)for(var i=0;i<b.length;i++)l<h[i].length&&(s[t++]=h[i][l]);return s};for(var j={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},k={L:1,M:0,Q:3,H:2},l={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},m={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var b=a<<10;m.getBCHDigit(b)-m.getBCHDigit(m.G15)>=0;)b^=m.G15<<m.getBCHDigit(b)-m.getBCHDigit(m.G15);return(a<<10|b)^m.G15_MASK},getBCHTypeNumber:function(a){for(var b=a<<12;m.getBCHDigit(b)-m.getBCHDigit(m.G18)>=0;)b^=m.G18<<m.getBCHDigit(b)-m.getBCHDigit(m.G18);return a<<12|b},getBCHDigit:function(a){for(var b=0;0!=a;)b++,a>>>=1;return b},getPatternPosition:function(a){return m.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case l.PATTERN000:return(b+c)%2==0;case l.PATTERN001:return b%2==0;case l.PATTERN010:return c%3==0;case l.PATTERN011:return(b+c)%3==0;case l.PATTERN100:return(Math.floor(b/2)+Math.floor(c/3))%2==0;case l.PATTERN101:return b*c%2+b*c%3==0;case l.PATTERN110:return(b*c%2+b*c%3)%2==0;case l.PATTERN111:return(b*c%3+(b+c)%2)%2==0;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var b=new c([1],0),d=0;a>d;d++)b=b.multiply(new c([1,n.gexp(d)],0));return b},getLengthInBits:function(a,b){if(b>=1&&10>b)switch(a){case j.MODE_NUMBER:return 10;case j.MODE_ALPHA_NUM:return 9;case j.MODE_8BIT_BYTE:return 8;case j.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(27>b)switch(a){case j.MODE_NUMBER:return 12;case j.MODE_ALPHA_NUM:return 11;case j.MODE_8BIT_BYTE:return 16;case j.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else{if(!(41>b))throw new Error("type:"+b);switch(a){case j.MODE_NUMBER:return 14;case j.MODE_ALPHA_NUM:return 13;case j.MODE_8BIT_BYTE:return 16;case j.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}},getLostPoint:function(a){for(var b=a.getModuleCount(),c=0,d=0;b>d;d++)for(var e=0;b>e;e++){for(var f=0,g=a.isDark(d,e),h=-1;1>=h;h++)if(!(0>d+h||d+h>=b))for(var i=-1;1>=i;i++)0>e+i||e+i>=b||0==h&&0==i||g==a.isDark(d+h,e+i)&&f++;f>5&&(c+=3+f-5)}for(var d=0;b-1>d;d++)for(var e=0;b-1>e;e++){var j=0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,0!=j&&4!=j||(c+=3)}for(var d=0;b>d;d++)for(var e=0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40);for(var e=0;b>e;e++)for(var d=0;b-6>d;d++)a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40);for(var k=0,e=0;b>e;e++)for(var d=0;b>d;d++)a.isDark(d,e)&&k++;var l=Math.abs(100*k/b/b-50)/5;return c+=10*l}},n={glog:function(a){if(1>a)throw new Error("glog("+a+")");return n.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;a>=256;)a-=255;return n.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},o=0;8>o;o++)n.EXP_TABLE[o]=1<<o;for(var o=8;256>o;o++)n.EXP_TABLE[o]=n.EXP_TABLE[o-4]^n.EXP_TABLE[o-5]^n.EXP_TABLE[o-6]^n.EXP_TABLE[o-8];for(var o=0;255>o;o++)n.LOG_TABLE[n.EXP_TABLE[o]]=o;c.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var e=0;e<a.getLength();e++)b[d+e]^=n.gexp(n.glog(this.get(d))+n.glog(a.get(e)));return new c(b,0)},mod:function(a){if(this.getLength()-a.getLength()<0)return this;for(var b=n.glog(this.get(0))-n.glog(a.get(0)),d=new Array(this.getLength()),e=0;e<this.getLength();e++)d[e]=this.get(e);for(var e=0;e<a.getLength();e++)d[e]^=n.gexp(n.glog(a.get(e))+b);return new c(d,0).mod(a)}},d.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],d.getRSBlocks=function(a,b){var c=d.getRsBlockTable(a,b);if(void 0==c)throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+b);for(var e=c.length/3,f=[],g=0;e>g;g++)for(var h=c[3*g+0],i=c[3*g+1],j=c[3*g+2],k=0;h>k;k++)f.push(new d(i,j));return f},d.getRsBlockTable=function(a,b){switch(b){case k.L:return d.RS_BLOCK_TABLE[4*(a-1)+0];case k.M:return d.RS_BLOCK_TABLE[4*(a-1)+1];case k.Q:return d.RS_BLOCK_TABLE[4*(a-1)+2];case k.H:return d.RS_BLOCK_TABLE[4*(a-1)+3];default:return}},e.prototype={get:function(a){var b=Math.floor(a/8);return 1==(this.buffer[b]>>>7-a%8&1)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(a>>>b-c-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer[b]|=128>>>this.length%8),this.length++}};var p=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],q=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function b(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var c=this._htOption,d=this._el,e=a.getModuleCount();Math.floor(c.width/e),Math.floor(c.height/e);this.clear();var f=b("svg",{viewBox:"0 0 "+String(e)+" "+String(e),width:"100%",height:"100%",fill:c.colorLight});f.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),d.appendChild(f),f.appendChild(b("rect",{fill:c.colorLight,width:"100%",height:"100%"})),f.appendChild(b("rect",{fill:c.colorDark,width:"1",height:"1",id:"template"}));for(var g=0;e>g;g++)for(var h=0;e>h;h++)if(a.isDark(g,h)){var i=b("use",{x:String(h),y:String(g)});i.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),f.appendChild(i)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),r="svg"===document.documentElement.tagName.toLowerCase(),s=r?q:f()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function b(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement("img"),e=function(){c._bSupportDataURI=!1,c._fFail&&c._fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,void(d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var c=1/window.devicePixelRatio,d=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,b,e,f,g,h,i,j,k){if("nodeName"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*c;else"undefined"==typeof j&&(arguments[1]*=c,arguments[2]*=c,arguments[3]*=c,arguments[4]*=c);d.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=g(),this._htOption=b,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display="none",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&b.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.clear=function(){this._el.innerHTML=""},a}();QRCodep=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:k.H},"string"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];"string"==typeof a&&(a=document.getElementById(a)),this._htOption.useSVG&&(s=q),this._android=g(),this._el=a,this._oQRCode=null,this._htOption.text&&this.makeCode(this._htOption.text)},QRCodep.prototype.makeCode=function(a){this._oQRCode=new b(h(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,-1!=this._htOption.dpi&&-1!=this._htOption.mmPerDot&&(this._htOption.width=this._oQRCode.moduleCount*this._htOption.dpi/25.4*this._htOption.mmPerDot,this._htOption.height=this._oQRCode.moduleCount*this._htOption.dpi/25.4*this._htOption.mmPerDot),this._oDrawing=new s(this._el,this._htOption),this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCodep.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCodep.prototype.clear=function(){this._oDrawing.clear()},QRCodep.CorrectLevel=k}();var sepaQR;!function(){"use strict";var a={UTF_8:1,ISO8859_1:2,ISO8859_2:3,ISO8859_4:4,ISO8859_5:5,ISO8859_7:6,ISO8859_10:7,ISO8859_15:8};sepaQR=function(b){if(this._sOpt={serviceTag:"BCD",version:"001",charset:a.UTF_8,identificationCode:"SCT",benefBIC:"",benefName:"",benefAccNr:"",amountEuro:"",purpose:"",creditorRef:"",remittanceInf:"",information:""},b)for(var c in b)this._sOpt[c]=b[c]},sepaQR.prototype.validServiceTag=function(){return"BCD"===this._sOpt.serviceTag},sepaQR.prototype.validVersion=function(){return"001"===this._sOpt.version||"002"===this._sOpt.version},sepaQR.prototype.validCharset=function(){return this._sOpt.charset>0&&this._sOpt.charset<=8},sepaQR.prototype.validIdentificationCode=function(){return"SCT"===this._sOpt.identificationCode},sepaQR.prototype.validBenefName=function(){var a="string"==typeof this._sOpt.benefName&&this._sOpt.benefName.length>=1&&this._sOpt.benefName.length<=70;if(!a)throw new Error("benefName not valid!");return a},sepaQR.prototype.validBenefAccNr=function(){var a="string"==typeof this._sOpt.benefAccNr&&this._sOpt.benefAccNr.length>=1&&this._sOpt.benefAccNr.length<=34;if(!a)throw new Error("benefAccNr not valid!");return a},sepaQR.prototype.validAmountEuro=function(){if("string"==typeof this._sOpt.amountEuro)return 0===this._sOpt.amountEuro.length;if("number"==typeof this._sOpt.amountEuro){this._sOpt.amountEuro=Math.round(100*this._sOpt.amountEuro)/100;var a=this._sOpt.amountEuro>.01&&this._sOpt.amountEuro<=999999999.99;if(!a)throw new Error("Amount not valid!");return a}},sepaQR.prototype.validBenefBic=function(){var a="002"==this._sOpt.version||"string"==typeof this._sOpt.benefBIC&&this._sOpt.benefBIC.length>=0&&this._sOpt.benefBIC.length<=11;if(!a)throw new Error("BIC is mandatory in Version 001!");if(a="string"==typeof this._sOpt.benefBIC&&this._sOpt.benefBIC.length>=0&&this._sOpt.benefBIC.length<=11,!a)throw new Error("benefBIC not valid!");return a},sepaQR.prototype.validPurpose=function(){var a="string"==typeof this._sOpt.purpose&&this._sOpt.purpose.length>=0&&this._sOpt.purpose.length<=4;if(!a)throw new Error("Purpose not valid!");return a},sepaQR.prototype.validInformation=function(){var a="string"==typeof this._sOpt.information&&this._sOpt.information.length>=0&&this._sOpt.information.length<=70;if(!a)throw new Error("Information not valid!");return a},sepaQR.prototype.validCreditorRefOrRemittance=function(){var a="string"==typeof this._sOpt.creditorRef&&0===this._sOpt.creditorRef.length,b="string"==typeof this._sOpt.remittanceInf&&0===this._sOpt.remittanceInf.length,c=a&&"string"==typeof this._sOpt.remittanceInf&&this._sOpt.remittanceInf.length<=140||b&&"string"==typeof this._sOpt.creditorRef&&this._sOpt.creditorRef.length<=35;if(!c)throw new Error("creditorRef or Remittance not valid!");return c},sepaQR.prototype.validQRTextLength=function(){for(var a=this.prepareQRText(),b=0,c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b+=e>65536?4:e>2048?3:e>128?2:1}return 328>=b},sepaQR.prototype.valid=function(){var a=this.validServiceTag()&&this.validVersion()&&this.validCharset()&&this.validIdentificationCode()&&this.validBenefName()&&this.validBenefAccNr()&&this.validAmountEuro()&&this.validBenefBic()&&this.validPurpose()&&this.validInformation()&&this.validPurpose()&&this.validCreditorRefOrRemittance()&&this.validQRTextLength();return a},sepaQR.prototype.prepareQRText=function(){return(this._sOpt.serviceTag+"\n"+this._sOpt.version+"\n"+this._sOpt.charset+"\n"+this._sOpt.identificationCode+"\n"+this._sOpt.benefBIC+"\n"+this._sOpt.benefName+"\n"+this._sOpt.benefAccNr+"\nEUR"+this._sOpt.amountEuro+"\n"+this._sOpt.purpose+"\n"+this._sOpt.creditorRef+"\n"+this._sOpt.remittanceInf+"\n"+this._sOpt.information).trim()},sepaQR.prototype.toQRText=function(){return this.valid()?this.prepareQRText():""},sepaQR.prototype.makeCodeInto=function(a,b){var c={width:256,height:256,mmPerDot:.85,dpi:92,correctLevel:QRCodep.CorrectLevel.M,text:this.toQRText()};if(0!==c.text.length){if(b)for(var d in b)c[d]=b[d];return this.qrcode=new QRCodep(a,c),this.drawExplanatoryLink(document.getElementById(a).getElementsByTagName("canvas")[0],document.createElement("canvas")),this.qrcode}},sepaQR.prototype.drawExplanatoryLink=function(a,b){var c=3,d=12,e=8,f=6,g=a;b.width=g.width,b.height=g.height,b.getContext("2d").drawImage(g,0,0),g.width=b.width+2*(e+c+f),g.height=b.height+2*(e+c+f),CanvasRenderingContext2D.prototype.roundRect=function(a,b,c,d,e,f){return 2*e>c&&(e=c/2),2*e>d&&(e=d/2),this.beginPath(),this.moveTo(a+e,b),this.arcTo(a+c,b,a+c,b+d,e),this.arcTo(a+c,b+d,a,b+d,e),this.lineTo(a+c-f,b+d),this.moveTo(a+c-110,b+d),this.arcTo(a,b+d,a,b,e),this.arcTo(a,b,a+c,b,e),this};var h=g.getContext("2d");h.fillStyle="white",h.rect(0,0,g.width,g.height),h.fill(),h.drawImage(b,e+c+f,e+c+f),h.lineWidth=c,h.roundRect(f+c/2,f+c/2,g.width-c-2*f,g.height-c-2*f,d,3*e).stroke(),h.fillStyle="black",h.font=4.5*c+"px Arial",h.fillText("sepaQR.eu",g.width-110,g.height-f/2)},sepaQR.Charset=a}();</script>
|
|
||||||
|
|
||||||
<script>var QRCodep;!function(){function a(a){this.mode=j.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=0,c=this.data.length;c>b;b++){var d=[],e=this.data.charCodeAt(b);e>65536?(d[0]=240|(1835008&e)>>>18,d[1]=128|(258048&e)>>>12,d[2]=128|(4032&e)>>>6,d[3]=128|63&e):e>2048?(d[0]=224|(61440&e)>>>12,d[1]=128|(4032&e)>>>6,d[2]=128|63&e):e>128?(d[0]=192|(1984&e)>>>6,d[1]=128|63&e):d[0]=e,this.parsedData.push(d)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function c(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c<a.length&&0==a[c];)c++;this.num=new Array(a.length-c+b);for(var d=0;d<a.length-c;d++)this.num[d]=a[d+c]}function d(a,b){this.totalCount=a,this.dataCount=b}function e(){this.buffer=[],this.length=0}function f(){return"undefined"!=typeof CanvasRenderingContext2D}function g(){var a=!1,b=navigator.userAgent;if(/android/i.test(b)){a=!0;var c=b.toString().match(/android ([0-9]\.[0-9])/i);c&&c[1]&&(a=parseFloat(c[1]))}return a}function h(a,b){for(var c=1,d=i(a),e=0,f=p.length;f>=e;e++){var g=0;switch(b){case k.L:g=p[e][0];break;case k.M:g=p[e][1];break;case k.Q:g=p[e][2];break;case k.H:g=p[e][3]}if(g>=d)break;c++}if(c>p.length)throw new Error("Too long data");return c}function i(a){var b=encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return b.length+(b.length!=a?3:0)}a.prototype={getLength:function(a){return this.parsedData.length},write:function(a){for(var b=0,c=this.parsedData.length;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype={addData:function(b){var c=new a(b);this.dataList.push(c),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b)throw new Error(a+","+b);return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=new Array(this.moduleCount);for(var e=0;e<this.moduleCount;e++)this.modules[d][e]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(a,c),this.typeNumber>=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,b){for(var c=-1;7>=c;c++)if(!(-1>=a+c||this.moduleCount<=a+c))for(var d=-1;7>=d;d++)-1>=b+d||this.moduleCount<=b+d||(c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?this.modules[a+c][b+d]=!0:this.modules[a+c][b+d]=!1)},getBestMaskPattern:function(){for(var a=0,b=0,c=0;8>c;c++){this.makeImpl(!0,c);var d=m.getLostPoint(this);(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var d=a.createEmptyMovieClip(b,c),e=1;this.make();for(var f=0;f<this.modules.length;f++)for(var g=f*e,h=0;h<this.modules[f].length;h++){var i=h*e,j=this.modules[f][h];j&&(d.beginFill(0,100),d.moveTo(i,g),d.lineTo(i+e,g),d.lineTo(i+e,g+e),d.lineTo(i,g+e),d.endFill())}return d},setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=a%2==0);for(var b=8;b<this.moduleCount-8;b++)null==this.modules[6][b]&&(this.modules[6][b]=b%2==0)},setupPositionAdjustPattern:function(){for(var a=m.getPatternPosition(this.typeNumber),b=0;b<a.length;b++)for(var c=0;c<a.length;c++){var d=a[b],e=a[c];if(null==this.modules[d][e])for(var f=-2;2>=f;f++)for(var g=-2;2>=g;g++)-2==f||2==f||-2==g||2==g||0==f&&0==g?this.modules[d+f][e+g]=!0:this.modules[d+f][e+g]=!1}},setupTypeNumber:function(a){for(var b=m.getBCHTypeNumber(this.typeNumber),c=0;18>c;c++){var d=!a&&1==(b>>c&1);this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(var c=0;18>c;c++){var d=!a&&1==(b>>c&1);this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){for(var c=this.errorCorrectLevel<<3|b,d=m.getBCHTypeInfo(c),e=0;15>e;e++){var f=!a&&1==(d>>e&1);6>e?this.modules[e][8]=f:8>e?this.modules[e+1][8]=f:this.modules[this.moduleCount-15+e][8]=f}for(var e=0;15>e;e++){var f=!a&&1==(d>>e&1);8>e?this.modules[8][this.moduleCount-e-1]=f:9>e?this.modules[8][15-e-1+1]=f:this.modules[8][15-e-1]=f}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){for(var c=-1,d=this.moduleCount-1,e=7,f=0,g=this.moduleCount-1;g>0;g-=2)for(6==g&&g--;;){for(var h=0;2>h;h++)if(null==this.modules[d][g-h]){var i=!1;f<a.length&&(i=1==(a[f]>>>e&1));var j=m.getMask(b,d,g-h);j&&(i=!i),this.modules[d][g-h]=i,e--,-1==e&&(f++,e=7)}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(a,c,f){for(var g=d.getRSBlocks(a,c),h=new e,i=0;i<f.length;i++){var j=f[i];h.put(j.mode,4),h.put(j.getLength(),m.getLengthInBits(j.mode,a)),j.write(h)}for(var k=0,i=0;i<g.length;i++)k+=g[i].dataCount;if(h.getLengthInBits()>8*k)throw new Error("code length overflow. ("+h.getLengthInBits()+">"+8*k+")");for(h.getLengthInBits()+4<=8*k&&h.put(0,4);h.getLengthInBits()%8!=0;)h.putBit(!1);for(;;){if(h.getLengthInBits()>=8*k)break;if(h.put(b.PAD0,8),h.getLengthInBits()>=8*k)break;h.put(b.PAD1,8)}return b.createBytes(h,g)},b.createBytes=function(a,b){for(var d=0,e=0,f=0,g=new Array(b.length),h=new Array(b.length),i=0;i<b.length;i++){var j=b[i].dataCount,k=b[i].totalCount-j;e=Math.max(e,j),f=Math.max(f,k),g[i]=new Array(j);for(var l=0;l<g[i].length;l++)g[i][l]=255&a.buffer[l+d];d+=j;var n=m.getErrorCorrectPolynomial(k),o=new c(g[i],n.getLength()-1),p=o.mod(n);h[i]=new Array(n.getLength()-1);for(var l=0;l<h[i].length;l++){var q=l+p.getLength()-h[i].length;h[i][l]=q>=0?p.get(q):0}}for(var r=0,l=0;l<b.length;l++)r+=b[l].totalCount;for(var s=new Array(r),t=0,l=0;e>l;l++)for(var i=0;i<b.length;i++)l<g[i].length&&(s[t++]=g[i][l]);for(var l=0;f>l;l++)for(var i=0;i<b.length;i++)l<h[i].length&&(s[t++]=h[i][l]);return s};for(var j={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},k={L:1,M:0,Q:3,H:2},l={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},m={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var b=a<<10;m.getBCHDigit(b)-m.getBCHDigit(m.G15)>=0;)b^=m.G15<<m.getBCHDigit(b)-m.getBCHDigit(m.G15);return(a<<10|b)^m.G15_MASK},getBCHTypeNumber:function(a){for(var b=a<<12;m.getBCHDigit(b)-m.getBCHDigit(m.G18)>=0;)b^=m.G18<<m.getBCHDigit(b)-m.getBCHDigit(m.G18);return a<<12|b},getBCHDigit:function(a){for(var b=0;0!=a;)b++,a>>>=1;return b},getPatternPosition:function(a){return m.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case l.PATTERN000:return(b+c)%2==0;case l.PATTERN001:return b%2==0;case l.PATTERN010:return c%3==0;case l.PATTERN011:return(b+c)%3==0;case l.PATTERN100:return(Math.floor(b/2)+Math.floor(c/3))%2==0;case l.PATTERN101:return b*c%2+b*c%3==0;case l.PATTERN110:return(b*c%2+b*c%3)%2==0;case l.PATTERN111:return(b*c%3+(b+c)%2)%2==0;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var b=new c([1],0),d=0;a>d;d++)b=b.multiply(new c([1,n.gexp(d)],0));return b},getLengthInBits:function(a,b){if(b>=1&&10>b)switch(a){case j.MODE_NUMBER:return 10;case j.MODE_ALPHA_NUM:return 9;case j.MODE_8BIT_BYTE:return 8;case j.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(27>b)switch(a){case j.MODE_NUMBER:return 12;case j.MODE_ALPHA_NUM:return 11;case j.MODE_8BIT_BYTE:return 16;case j.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else{if(!(41>b))throw new Error("type:"+b);switch(a){case j.MODE_NUMBER:return 14;case j.MODE_ALPHA_NUM:return 13;case j.MODE_8BIT_BYTE:return 16;case j.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}},getLostPoint:function(a){for(var b=a.getModuleCount(),c=0,d=0;b>d;d++)for(var e=0;b>e;e++){for(var f=0,g=a.isDark(d,e),h=-1;1>=h;h++)if(!(0>d+h||d+h>=b))for(var i=-1;1>=i;i++)0>e+i||e+i>=b||0==h&&0==i||g==a.isDark(d+h,e+i)&&f++;f>5&&(c+=3+f-5)}for(var d=0;b-1>d;d++)for(var e=0;b-1>e;e++){var j=0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,0!=j&&4!=j||(c+=3)}for(var d=0;b>d;d++)for(var e=0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40);for(var e=0;b>e;e++)for(var d=0;b-6>d;d++)a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40);for(var k=0,e=0;b>e;e++)for(var d=0;b>d;d++)a.isDark(d,e)&&k++;var l=Math.abs(100*k/b/b-50)/5;return c+=10*l}},n={glog:function(a){if(1>a)throw new Error("glog("+a+")");return n.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;a>=256;)a-=255;return n.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},o=0;8>o;o++)n.EXP_TABLE[o]=1<<o;for(var o=8;256>o;o++)n.EXP_TABLE[o]=n.EXP_TABLE[o-4]^n.EXP_TABLE[o-5]^n.EXP_TABLE[o-6]^n.EXP_TABLE[o-8];for(var o=0;255>o;o++)n.LOG_TABLE[n.EXP_TABLE[o]]=o;c.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var e=0;e<a.getLength();e++)b[d+e]^=n.gexp(n.glog(this.get(d))+n.glog(a.get(e)));return new c(b,0)},mod:function(a){if(this.getLength()-a.getLength()<0)return this;for(var b=n.glog(this.get(0))-n.glog(a.get(0)),d=new Array(this.getLength()),e=0;e<this.getLength();e++)d[e]=this.get(e);for(var e=0;e<a.getLength();e++)d[e]^=n.gexp(n.glog(a.get(e))+b);return new c(d,0).mod(a)}},d.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],d.getRSBlocks=function(a,b){var c=d.getRsBlockTable(a,b);if(void 0==c)throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+b);for(var e=c.length/3,f=[],g=0;e>g;g++)for(var h=c[3*g+0],i=c[3*g+1],j=c[3*g+2],k=0;h>k;k++)f.push(new d(i,j));return f},d.getRsBlockTable=function(a,b){switch(b){case k.L:return d.RS_BLOCK_TABLE[4*(a-1)+0];case k.M:return d.RS_BLOCK_TABLE[4*(a-1)+1];case k.Q:return d.RS_BLOCK_TABLE[4*(a-1)+2];case k.H:return d.RS_BLOCK_TABLE[4*(a-1)+3];default:return}},e.prototype={get:function(a){var b=Math.floor(a/8);return 1==(this.buffer[b]>>>7-a%8&1)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(a>>>b-c-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer[b]|=128>>>this.length%8),this.length++}};var p=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],q=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function b(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var c=this._htOption,d=this._el,e=a.getModuleCount();Math.floor(c.width/e),Math.floor(c.height/e);this.clear();var f=b("svg",{viewBox:"0 0 "+String(e)+" "+String(e),width:"100%",height:"100%",fill:c.colorLight});f.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),d.appendChild(f),f.appendChild(b("rect",{fill:c.colorLight,width:"100%",height:"100%"})),f.appendChild(b("rect",{fill:c.colorDark,width:"1",height:"1",id:"template"}));for(var g=0;e>g;g++)for(var h=0;e>h;h++)if(a.isDark(g,h)){var i=b("use",{x:String(h),y:String(g)});i.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),f.appendChild(i)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),r="svg"===document.documentElement.tagName.toLowerCase(),s=r?q:f()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function b(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement("img"),e=function(){c._bSupportDataURI=!1,c._fFail&&c._fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,void(d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var c=1/window.devicePixelRatio,d=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,b,e,f,g,h,i,j,k){if("nodeName"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*c;else"undefined"==typeof j&&(arguments[1]*=c,arguments[2]*=c,arguments[3]*=c,arguments[4]*=c);d.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=g(),this._htOption=b,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display="none",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&b.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.clear=function(){this._el.innerHTML=""},a}();QRCodep=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:k.H},"string"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];"string"==typeof a&&(a=document.getElementById(a)),this._htOption.useSVG&&(s=q),this._android=g(),this._el=a,this._oQRCode=null,this._htOption.text&&this.makeCode(this._htOption.text)},QRCodep.prototype.makeCode=function(a){this._oQRCode=new b(h(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,-1!=this._htOption.dpi&&-1!=this._htOption.mmPerDot&&(this._htOption.width=this._oQRCode.moduleCount*this._htOption.dpi/25.4*this._htOption.mmPerDot,this._htOption.height=this._oQRCode.moduleCount*this._htOption.dpi/25.4*this._htOption.mmPerDot),this._oDrawing=new s(this._el,this._htOption),this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCodep.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCodep.prototype.clear=function(){this._oDrawing.clear()},QRCodep.CorrectLevel=k}();var sepaQR;!function(){"use strict";var a={UTF_8:1,ISO8859_1:2,ISO8859_2:3,ISO8859_4:4,ISO8859_5:5,ISO8859_7:6,ISO8859_10:7,ISO8859_15:8};sepaQR=function(b){if(this._sOpt={serviceTag:"BCD",version:"001",charset:a.UTF_8,identificationCode:"SCT",benefBIC:"",benefName:"",benefAccNr:"",amountEuro:"",purpose:"",creditorRef:"",remittanceInf:"",information:""},b)for(var c in b)this._sOpt[c]=b[c]},sepaQR.prototype.validServiceTag=function(){return"BCD"===this._sOpt.serviceTag},sepaQR.prototype.validVersion=function(){return"001"===this._sOpt.version||"002"===this._sOpt.version},sepaQR.prototype.validCharset=function(){return this._sOpt.charset>0&&this._sOpt.charset<=8},sepaQR.prototype.validIdentificationCode=function(){return"SCT"===this._sOpt.identificationCode},sepaQR.prototype.validBenefName=function(){var a="string"==typeof this._sOpt.benefName&&this._sOpt.benefName.length>=1&&this._sOpt.benefName.length<=70;if(!a)throw new Error("benefName not valid!");return a},sepaQR.prototype.validBenefAccNr=function(){var a="string"==typeof this._sOpt.benefAccNr&&this._sOpt.benefAccNr.length>=1&&this._sOpt.benefAccNr.length<=34;if(!a)throw new Error("benefAccNr not valid!");return a},sepaQR.prototype.validAmountEuro=function(){if("string"==typeof this._sOpt.amountEuro)return 0===this._sOpt.amountEuro.length;if("number"==typeof this._sOpt.amountEuro){this._sOpt.amountEuro=Math.round(100*this._sOpt.amountEuro)/100;var a=this._sOpt.amountEuro>.01&&this._sOpt.amountEuro<=999999999.99;if(!a)throw new Error("Amount not valid!");return a}},sepaQR.prototype.validBenefBic=function(){var a="002"==this._sOpt.version||"string"==typeof this._sOpt.benefBIC&&this._sOpt.benefBIC.length>=0&&this._sOpt.benefBIC.length<=11;if(!a)throw new Error("BIC is mandatory in Version 001!");if(a="string"==typeof this._sOpt.benefBIC&&this._sOpt.benefBIC.length>=0&&this._sOpt.benefBIC.length<=11,!a)throw new Error("benefBIC not valid!");return a},sepaQR.prototype.validPurpose=function(){var a="string"==typeof this._sOpt.purpose&&this._sOpt.purpose.length>=0&&this._sOpt.purpose.length<=4;if(!a)throw new Error("Purpose not valid!");return a},sepaQR.prototype.validInformation=function(){var a="string"==typeof this._sOpt.information&&this._sOpt.information.length>=0&&this._sOpt.information.length<=70;if(!a)throw new Error("Information not valid!");return a},sepaQR.prototype.validCreditorRefOrRemittance=function(){var a="string"==typeof this._sOpt.creditorRef&&0===this._sOpt.creditorRef.length,b="string"==typeof this._sOpt.remittanceInf&&0===this._sOpt.remittanceInf.length,c=a&&"string"==typeof this._sOpt.remittanceInf&&this._sOpt.remittanceInf.length<=140||b&&"string"==typeof this._sOpt.creditorRef&&this._sOpt.creditorRef.length<=35;if(!c)throw new Error("creditorRef or Remittance not valid!");return c},sepaQR.prototype.validQRTextLength=function(){for(var a=this.prepareQRText(),b=0,c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b+=e>65536?4:e>2048?3:e>128?2:1}return 328>=b},sepaQR.prototype.valid=function(){var a=this.validServiceTag()&&this.validVersion()&&this.validCharset()&&this.validIdentificationCode()&&this.validBenefName()&&this.validBenefAccNr()&&this.validAmountEuro()&&this.validBenefBic()&&this.validPurpose()&&this.validInformation()&&this.validPurpose()&&this.validCreditorRefOrRemittance()&&this.validQRTextLength();return a},sepaQR.prototype.prepareQRText=function(){return(this._sOpt.serviceTag+"\n"+this._sOpt.version+"\n"+this._sOpt.charset+"\n"+this._sOpt.identificationCode+"\n"+this._sOpt.benefBIC+"\n"+this._sOpt.benefName+"\n"+this._sOpt.benefAccNr+"\nEUR"+this._sOpt.amountEuro+"\n"+this._sOpt.purpose+"\n"+this._sOpt.creditorRef+"\n"+this._sOpt.remittanceInf+"\n"+this._sOpt.information).trim()},sepaQR.prototype.toQRText=function(){return this.valid()?this.prepareQRText():""},sepaQR.prototype.makeCodeInto=function(a,b){var c={width:256,height:256,mmPerDot:.85,dpi:92,correctLevel:QRCodep.CorrectLevel.M,text:this.toQRText()};if(0!==c.text.length){if(b)for(var d in b)c[d]=b[d];return this.qrcode=new QRCodep(a,c),this.drawExplanatoryLink(document.getElementById(a).getElementsByTagName("canvas")[0],document.createElement("canvas")),this.qrcode}},sepaQR.prototype.drawExplanatoryLink=function(a,b){var c=3,d=12,e=8,f=6,g=a;b.width=g.width,b.height=g.height,b.getContext("2d").drawImage(g,0,0),g.width=b.width+2*(e+c+f),g.height=b.height+2*(e+c+f),CanvasRenderingContext2D.prototype.roundRect=function(a,b,c,d,e,f){return 2*e>c&&(e=c/2),2*e>d&&(e=d/2),this.beginPath(),this.moveTo(a+e,b),this.arcTo(a+c,b,a+c,b+d,e),this.arcTo(a+c,b+d,a,b+d,e),this.lineTo(a+c-f,b+d),this.moveTo(a+c-110,b+d),this.arcTo(a,b+d,a,b,e),this.arcTo(a,b,a+c,b,e),this};var h=g.getContext("2d");h.fillStyle="white",h.rect(0,0,g.width,g.height),h.fill(),h.drawImage(b,e+c+f,e+c+f),h.lineWidth=c,h.roundRect(f+c/2,f+c/2,g.width-c-2*f,g.height-c-2*f,d,3*e).stroke(),h.fillStyle="black",h.font=4.5*c+"px Arial",h.fillText("sepaQR.eu",g.width-110,g.height-f/2)},sepaQR.Charset=a}();</script>
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
<svg class="flex-shrink-0 w-4 h-4 inline-block" fill="currentColor" viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
<svg class="flex-shrink-0 w-4 h-4 inline-block"
|
||||||
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path>
|
fill="currentColor"
|
||||||
|
viewbox="0 0 20 20"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd">
|
||||||
|
</path>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 396 B |
@ -1,103 +1,125 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
{% if flash %}
|
{% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
<h1 class="h1">Ruderassistent</h1>
|
||||||
{% endif %}
|
<div class="grid gap-3">
|
||||||
<h1 class="h1">Ruderassistent</h1>
|
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
|
||||||
|
role="alert">
|
||||||
|
<h2 class="h2">Allgemein</h2>
|
||||||
<div class="grid gap-3">
|
<div class="text-sm p-3">
|
||||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" role="alert">
|
<ul class="list-disc ms-2">
|
||||||
<h2 class="h2">Allgemein</h2>
|
<li class="py-1">
|
||||||
<div class="text-sm p-3">
|
<a href="https://rudernlinz.at/termin"
|
||||||
<ul class="list-disc ms-2">
|
target="_blank"
|
||||||
<li class="py-1"><a href="https://rudernlinz.at/termin" target="_blank" class="link-primary">FAQ (extern)</a></li>
|
class="link-primary">FAQ (extern)</a>
|
||||||
</ul>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %}
|
||||||
|
<div class="grid gap-3">
|
||||||
|
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
|
||||||
|
role="alert">
|
||||||
|
<h2 class="h2">Ergo</h2>
|
||||||
|
<div class="text-sm p-3">
|
||||||
|
<ul class="list-disc ms-2">
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/ergo" class="link-primary">Ergo</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if "Donau Linz" in loggedin_user.roles and "Unterstützend" not in loggedin_user.roles and "Förderndes Mitglied" not in loggedin_user.roles %}
|
||||||
|
<div class="grid gap-3">
|
||||||
|
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
|
||||||
|
role="alert">
|
||||||
|
<h2 class="h2">Aktives Vereinsmitglied</h2>
|
||||||
|
<div class="text-sm p-3">
|
||||||
|
<ul class="list-disc ms-2">
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/planned" class="link-primary">Geplante Ausfahrten</a>
|
||||||
|
</li>
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/log" class="link-primary">Ausfahrt eintragen</a>
|
||||||
|
</li>
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/log/show" class="link-primary">Logbuch</a>
|
||||||
|
</li>
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/stat" class="link-primary">Statistik</a>
|
||||||
|
</li>
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/stat/boats" class="link-primary">Bootsauswertung</a>
|
||||||
|
</li>
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/boatdamage" class="link-primary">Bootsschaden</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if "scheckbuch" in loggedin_user.roles %}
|
||||||
|
<div class="grid gap-3">
|
||||||
|
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
|
||||||
|
role="alert">
|
||||||
|
<h2 class="h2">Scheckbuch</h2>
|
||||||
|
<div class="text-sm p-3">
|
||||||
|
<ul class="list-disc ms-2">
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/planned" class="link-primary">Geplante Ausfahrten</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if "Vorstand" in loggedin_user.roles %}
|
||||||
|
<div class="grid gap-3">
|
||||||
|
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
|
||||||
|
role="alert">
|
||||||
|
<h2 class="h2">Vorstand</h2>
|
||||||
|
<div class="text-sm p-3">
|
||||||
|
<ul class="list-disc ms-2">
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/admin/user/fees" class="link-primary">Übersicht User Gebühren</a>
|
||||||
|
</li>
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/admin/user" class="link-primary">User</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if "admin" in loggedin_user.roles %}
|
||||||
|
<div class="grid gap-3">
|
||||||
|
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
|
||||||
|
role="alert">
|
||||||
|
<h2 class="h2">Admin</h2>
|
||||||
|
<div class="text-sm p-3">
|
||||||
|
<ul class="list-disc ms-2">
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/admin/boat" class="link-primary">Boote</a>
|
||||||
|
</li>
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/admin/user" class="link-primary">User</a>
|
||||||
|
</li>
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/admin/mail" class="link-primary">Mail (beautifully layouted)</a>
|
||||||
|
</li>
|
||||||
|
<li class="py-1">
|
||||||
|
<a href="/admin/rss" class="link-primary">Logs</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endblock content %}
|
||||||
{% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %}
|
|
||||||
<div class="grid gap-3">
|
|
||||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" role="alert">
|
|
||||||
<h2 class="h2">Ergo</h2>
|
|
||||||
<div class="text-sm p-3">
|
|
||||||
<ul class="list-disc ms-2">
|
|
||||||
<li class="py-1"><a href="/ergo" class="link-primary">Ergo</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if "Donau Linz" in loggedin_user.roles and "Unterstützend" not in loggedin_user.roles and "Förderndes Mitglied" not in loggedin_user.roles %}
|
|
||||||
<div class="grid gap-3">
|
|
||||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" role="alert">
|
|
||||||
<h2 class="h2">Aktives Vereinsmitglied</h2>
|
|
||||||
<div class="text-sm p-3">
|
|
||||||
<ul class="list-disc ms-2">
|
|
||||||
<li class="py-1"><a href="/planned" class="link-primary">Geplante Ausfahrten</a></li>
|
|
||||||
<li class="py-1"><a href="/log" class="link-primary">Ausfahrt eintragen</a></li>
|
|
||||||
<li class="py-1"><a href="/log/show" class="link-primary">Logbuch</a></li>
|
|
||||||
<li class="py-1"><a href="/stat" class="link-primary">Statistik</a></li>
|
|
||||||
<li class="py-1"><a href="/stat/boats" class="link-primary">Bootsauswertung</a></li>
|
|
||||||
<li class="py-1"><a href="/boatdamage" class="link-primary">Bootsschaden</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
{% if "scheckbuch" in loggedin_user.roles %}
|
|
||||||
<div class="grid gap-3">
|
|
||||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" role="alert">
|
|
||||||
<h2 class="h2">Scheckbuch</h2>
|
|
||||||
<div class="text-sm p-3">
|
|
||||||
<ul class="list-disc ms-2">
|
|
||||||
<li class="py-1"><a href="/planned" class="link-primary">Geplante Ausfahrten</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if "Vorstand" in loggedin_user.roles %}
|
|
||||||
<div class="grid gap-3">
|
|
||||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" role="alert">
|
|
||||||
<h2 class="h2">Vorstand</h2>
|
|
||||||
<div class="text-sm p-3">
|
|
||||||
<ul class="list-disc ms-2">
|
|
||||||
<li class="py-1"><a href="/admin/user/fees" class="link-primary">Übersicht User Gebühren</a></li>
|
|
||||||
<li class="py-1"><a href="/admin/user" class="link-primary">User</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if "admin" in loggedin_user.roles %}
|
|
||||||
<div class="grid gap-3">
|
|
||||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" role="alert">
|
|
||||||
<h2 class="h2">Admin</h2>
|
|
||||||
<div class="text-sm p-3">
|
|
||||||
<ul class="list-disc ms-2">
|
|
||||||
<li class="py-1"><a href="/admin/boat" class="link-primary">Boote</a></li>
|
|
||||||
<li class="py-1"><a href="/admin/user" class="link-primary">User</a></li>
|
|
||||||
<li class="py-1"><a href="/admin/mail" class="link-primary">Mail (beautifully layouted)</a></li>
|
|
||||||
<li class="py-1"><a href="/admin/rss" class="link-primary">Logs</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock content%}
|
|
||||||
|
@ -1,48 +1,36 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
{% import "includes/forms/log" as log %}
|
{% import "includes/forms/log" as log %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="w-full">
|
||||||
<div class="w-full">
|
<h1 class="h1">Logbuch</h1>
|
||||||
<h1 class="h1">Logbuch</h1>
|
{% if flash %}
|
||||||
|
<div class="pt-3 max-w-lg m-auto">
|
||||||
{% if flash %}
|
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
||||||
<div class="pt-3 max-w-lg m-auto">
|
</div>
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="w-full grid md:grid-cols-5 gap-3 mt-5">
|
|
||||||
<div class="bg-white dark:bg-primary-900 rounded-md hidden md:block shadow">
|
|
||||||
<h2 class="h2">Boote</h2>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{{ log::show_boats(only_ones=false) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="md:col-span-3 bg-white dark:bg-primary-900 rounded-md shadow">
|
|
||||||
<h2 class="h2">Neue Ausfahrt</h2>
|
|
||||||
<div class="p-3">
|
|
||||||
{{ log::new(only_ones=false, shipmaster=-1) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white dark:bg-primary-900 rounded-md shadow">
|
|
||||||
<h2 class="h2">Am Wasser</h2>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{% if on_water | length > 0 %}
|
|
||||||
{% for log in on_water %}
|
|
||||||
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=false) }}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
<p class="p-3 text-center text-black dark:text-white">Kein Boot am Wasser</p>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
<div class="w-full grid md:grid-cols-5 gap-3 mt-5">
|
||||||
|
<div class="bg-white dark:bg-primary-900 rounded-md hidden md:block shadow">
|
||||||
|
<h2 class="h2">Boote</h2>
|
||||||
|
<div>{{ log::show_boats(only_ones=false) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="md:col-span-3 bg-white dark:bg-primary-900 rounded-md shadow">
|
||||||
|
<h2 class="h2">Neue Ausfahrt</h2>
|
||||||
|
<div class="p-3">{{ log::new(only_ones=false, shipmaster=-1) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="bg-white dark:bg-primary-900 rounded-md shadow">
|
||||||
|
<h2 class="h2">Am Wasser</h2>
|
||||||
|
<div>
|
||||||
|
{% if on_water | length > 0 %}
|
||||||
|
{% for log in on_water %}
|
||||||
|
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=false) }}
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<p class="p-3 text-center text-black dark:text-white">Kein Boot am Wasser</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<script src="/public/logbook.js"></script>
|
||||||
</div>
|
{% endblock content %}
|
||||||
|
|
||||||
<script src="/public/logbook.js"></script>
|
|
||||||
{% endblock content%}
|
|
||||||
|
@ -1,24 +1,20 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
{% import "includes/forms/log" as log %}
|
{% import "includes/forms/log" as log %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="max-w-screen-lg w-full">
|
||||||
<div class="max-w-screen-lg w-full">
|
<h1 class="h1">Logbuch</h1>
|
||||||
<h1 class="h1">Logbuch</h1>
|
<div class="mt-3">
|
||||||
|
<div class="search-wrapper">
|
||||||
<div class="mt-3">
|
<label for="name" class="sr-only">Suche</label>
|
||||||
<div class="search-wrapper">
|
<input type="search"
|
||||||
<label for="name" class="sr-only">Suche</label>
|
name="name"
|
||||||
<input type="search" name="name" id="filter-js" class="search-bar" placeholder="Suchen nach Bootsname oder Ruderer...">
|
id="filter-js"
|
||||||
</div>
|
class="search-bar"
|
||||||
|
placeholder="Suchen nach Bootsname oder Ruderer...">
|
||||||
<div id="filter-result-js" class="search-result"></div>
|
</div>
|
||||||
{% for log in logs %}
|
<div id="filter-result-js" class="search-result"></div>
|
||||||
{{ log::show_old(log=log, state="completed", only_ones=false, index=loop.index) }}
|
{% for log in logs %}{{ log::show_old(log=log, state="completed", only_ones=false, index=loop.index) }}{% endfor %}
|
||||||
{% endfor %}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endblock content %}
|
||||||
|
|
||||||
{% endblock content%}
|
|
||||||
|
@ -1,49 +1,36 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
{% import "includes/forms/log" as log %}
|
{% import "includes/forms/log" as log %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<h1 class="h1">Logbuch</h1>
|
<h1 class="h1">Logbuch</h1>
|
||||||
|
{% if flash %}
|
||||||
{% if flash %}
|
<div class="w-full">{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}</div>
|
||||||
<div class="w-full">
|
{% endif %}
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
<div class="w-full grid md:grid-cols-5 gap-3 mt-5">
|
||||||
</div>
|
<div class="bg-white dark:bg-primary-900 rounded-md hidden md:block shadow">
|
||||||
{% endif %}
|
<h2 class="h2">Boote</h2>
|
||||||
|
<div>{{ log::show_boats(only_ones=false) }}</div>
|
||||||
<div class="w-full grid md:grid-cols-5 gap-3 mt-5">
|
</div>
|
||||||
<div class="bg-white dark:bg-primary-900 rounded-md hidden md:block shadow">
|
<div class="md:col-span-3 bg-white dark:bg-primary-900 rounded-md shadow">
|
||||||
<h2 class="h2">Boote</h2>
|
<h2 class="h2">Neue Ausfahrt</h2>
|
||||||
|
<div class="p-3">{{ log::new(shipmaster=loggedin_user.id) }}</div>
|
||||||
<div>
|
</div>
|
||||||
{{ log::show_boats(only_ones=false) }}
|
<div class="bg-white dark:bg-primary-900 rounded-md shadow">
|
||||||
</div>
|
<h2 class="h2">Am Wasser</h2>
|
||||||
</div>
|
{% if on_water | length > 0 %}
|
||||||
<div class="md:col-span-3 bg-white dark:bg-primary-900 rounded-md shadow">
|
{% for log in on_water %}
|
||||||
<h2 class="h2">Neue Ausfahrt</h2>
|
{% if log.shipmaster == loggedin_user.id %}
|
||||||
<div class="p-3">
|
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones="cox" not in loggedin_user.roles) }}
|
||||||
{{ log::new(shipmaster=loggedin_user.id) }}
|
{% else %}
|
||||||
</div>
|
{{ log::show(log=log, state="on_water", only_ones=true) }}
|
||||||
</div>
|
{% endif %}
|
||||||
<div class="bg-white dark:bg-primary-900 rounded-md shadow">
|
{% endfor %}
|
||||||
<h2 class="h2">Am Wasser</h2>
|
{% else %}
|
||||||
|
<p class="p-3 text-center text-black dark:text-white">Kein Boot am Wasser</p>
|
||||||
{% if on_water | length > 0 %}
|
{% endif %}
|
||||||
{% for log in on_water %}
|
</div>
|
||||||
{% if log.shipmaster == loggedin_user.id %}
|
</div>
|
||||||
{{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones="cox" not in loggedin_user.roles) }}
|
</div>
|
||||||
{% else %}
|
<script src="/public/logbook.js"></script>
|
||||||
{{ log::show(log=log, state="on_water", only_ones=true) }}
|
{% endblock content %}
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
<p class="p-3 text-center text-black dark:text-white">Kein Boot am Wasser</p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="/public/logbook.js"></script>
|
|
||||||
{% endblock content%}
|
|
||||||
|
@ -1,24 +1,21 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="max-w-screen-xl w-full grid sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
<div class="max-w-screen-xl w-full grid sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||||
{% if flash %}
|
{% if flash %}{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}{% endif %}
|
||||||
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
|
{% if "paid" not in loggedin_user.roles %}
|
||||||
{% endif %}
|
<div class="grid gap-3 sm:col-span-2 lg:col-span-3">
|
||||||
|
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
|
||||||
|
role="alert">
|
||||||
|
<h2 class="h2">Vereinsgebühren</h2>
|
||||||
{% if "paid" not in loggedin_user.roles %}
|
<div class="text-sm p-3">
|
||||||
<div class="grid gap-3 sm:col-span-2 lg:col-span-3">
|
{% include "includes/qrcode" %}
|
||||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" role="alert">
|
<div id="qrcode"
|
||||||
<h2 class="h2">Vereinsgebühren</h2>
|
style="float: left;
|
||||||
<div class="text-sm p-3">
|
padding-top: 10 pt;
|
||||||
{% include "includes/qrcode" %}
|
padding-right: 10pt;
|
||||||
<div id="qrcode" style="float: left; padding-top: 10 pt; padding-right: 10pt; padding-bottom: 10pt;"></div>
|
padding-bottom: 10pt"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var sepaqr = new sepaQR({
|
var sepaqr = new sepaQR({
|
||||||
benefName: 'ASKÖ Ruderverein Donau Linz',
|
benefName: 'ASKÖ Ruderverein Donau Linz',
|
||||||
benefBIC: 'BKAUATWWXXX',
|
benefBIC: 'BKAUATWWXXX',
|
||||||
@ -28,316 +25,340 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
var code = sepaqr.makeCodeInto("qrcode");
|
var code = sepaqr.makeCodeInto("qrcode");
|
||||||
</script>
|
|
||||||
|
</script>
|
||||||
<b>Dein Vereinsbeitrag ({{ fee.name }}): {{ fee.sum_in_cents / 100 }}€ {% if fee.parts | length == 1 %} ({{ fee.parts[0].0 }}) {% endif %}</b><br />
|
<b>Dein Vereinsbeitrag ({{ fee.name }}): {{ fee.sum_in_cents / 100 }}€
|
||||||
{% if fee.parts | length > 1 %}
|
{% if fee.parts | length == 1 %}({{ fee.parts[0].0 }}){% endif %}
|
||||||
<small>
|
</b>
|
||||||
Setzt sich zusammen aus:
|
<br />
|
||||||
<ul style="list-style: circle; padding-left: 1em;">
|
{% if fee.parts | length > 1 %}
|
||||||
{% for p in fee.parts %}
|
<small>
|
||||||
<li>{{ p.0 }} ({{ p.1 / 100 }}€) {% if not loop.last %} + {% endif %}</li>
|
Setzt sich zusammen aus:
|
||||||
{% endfor %}
|
<ul style="list-style: circle; padding-left: 1em;">
|
||||||
</ul>
|
{% for p in fee.parts %}
|
||||||
</small>
|
<li>
|
||||||
{% endif %}
|
{{ p.0 }} ({{ p.1 / 100 }}€)
|
||||||
|
{% if not loop.last %}+{% endif %}
|
||||||
Bitte auf folgendes Konto überweisen: IBAN AT13 1200 0804 1300 1200. Alternativ kannst du auch mit deiner Bankapp den QR Code scannen, damit sollten alle Daten vorausgefüllt sein.<br />
|
</li>
|
||||||
|
{% endfor %}
|
||||||
Falls die Berechnung nicht stimmt (korrekte Preise findest du <a href="https://rudernlinz.at/unser-verein/gebuhren/" target="_blank" rel="noopener noreferrer">hier</a>) melde dich bitte bei it@rudernlinz.at. @Studenten: Bitte die aktuelle Studienbestätigung an it@rudernlinz.at schicken.<br />
|
</ul>
|
||||||
|
</small>
|
||||||
<small>Wir aktualisieren den Ruderassistent unregelmäßig mit unserem Bankkonto. Falls du schon bezahlt hast, kannst du diese Nachricht getrost ignorieren :^)</small>
|
{% endif %}
|
||||||
|
Bitte auf folgendes Konto überweisen: IBAN AT13 1200 0804 1300 1200. Alternativ kannst du auch mit deiner Bankapp den QR Code scannen, damit sollten alle Daten vorausgefüllt sein.
|
||||||
|
<br />
|
||||||
|
Falls die Berechnung nicht stimmt (korrekte Preise findest du <a href="https://rudernlinz.at/unser-verein/gebuhren/"
|
||||||
|
target="_blank"
|
||||||
</div>
|
rel="noopener noreferrer">hier</a>) melde dich bitte bei it@rudernlinz.at. @Studenten: Bitte die aktuelle Studienbestätigung an it@rudernlinz.at schicken.
|
||||||
</div>
|
<br />
|
||||||
</div>
|
<small>Wir aktualisieren den Ruderassistent unregelmäßig mit unserem Bankkonto. Falls du schon bezahlt hast, kannst du diese Nachricht getrost ignorieren :^)</small>
|
||||||
{% endif %}
|
</div>
|
||||||
|
</div>
|
||||||
<h1 class="h1 sm:col-span-2 lg:col-span-3">Ausfahrten</h1>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% include "includes/buttons" %}
|
<h1 class="h1 sm:col-span-2 lg:col-span-3">Ausfahrten</h1>
|
||||||
|
{% include "includes/buttons" %}
|
||||||
{% for day in days %}
|
{% for day in days %}
|
||||||
{% set amount_trips = day.planned_events | length + day.trips | length %}
|
{% set amount_trips = day.planned_events | length + day.trips | length %}
|
||||||
{% set_global day_cox_needed = false %}
|
{% set_global day_cox_needed = false %}
|
||||||
{% if day.planned_events | length > 0 %}
|
{% if day.planned_events | length > 0 %}
|
||||||
{% for planned_event in day.planned_events %}
|
{% for planned_event in day.planned_events %}
|
||||||
{% if planned_event.cox_needed %}
|
{% if planned_event.cox_needed %}
|
||||||
{% set_global day_cox_needed = true %}
|
{% set_global day_cox_needed = true %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<div class="bg-white dark:bg-primary-900 rounded-md flex justify-between flex-col shadow reset-js"
|
||||||
<div class="bg-white dark:bg-primary-900 rounded-md flex justify-between flex-col shadow reset-js" style="min-height: 10rem;" data-trips="{{ amount_trips }}" data-month="{{ day.day| date(format='%m') }}" data-coxneeded="{{ day_cox_needed }}">
|
style="min-height: 10rem"
|
||||||
<div>
|
data-trips="{{ amount_trips }}"
|
||||||
<h2 class="font-bold uppercase tracking-wide text-center rounded-t-md {% if day.is_pinned %} text-white bg-primary-950 {% else %} text-primary-950 dark:text-white bg-gray-200 dark:bg-primary-950 bg-opacity-80 {% endif %} text-lg px-3 py-3 ">{{ day.day| date(format="%d.%m.%Y") }}
|
data-month="{{ day.day| date(format='%m') }}"
|
||||||
<small class="inline-block ml-1 text-xs {% if day.is_pinned %} text-gray-200 {% else %} text-gray-500 dark:text-gray-100 {% endif %}">{{ day.day | date(format="%A", locale="de_AT") }}</small>
|
data-coxneeded="{{ day_cox_needed }}">
|
||||||
</h2>
|
<div>
|
||||||
|
<h2 class="font-bold uppercase tracking-wide text-center rounded-t-md {% if day.is_pinned %} text-white bg-primary-950 {% else %} text-primary-950 dark:text-white bg-gray-200 dark:bg-primary-950 bg-opacity-80 {% endif %} text-lg px-3 py-3 ">
|
||||||
{% if day.planned_events | length > 0 or day.trips | length > 0 %}
|
{{ day.day| date(format="%d.%m.%Y") }}
|
||||||
<div
|
<small class="inline-block ml-1 text-xs {% if day.is_pinned %} text-gray-200 {% else %} text-gray-500 dark:text-gray-100 {% endif %}">{{ day.day | date(format="%A", locale="de_AT") }}</small>
|
||||||
class="grid grid-cols-1 gap-3 mb-3">
|
</h2>
|
||||||
|
{% if day.planned_events | length > 0 or day.trips | length > 0 %}
|
||||||
{# --- START Events --- #}
|
<div class="grid grid-cols-1 gap-3 mb-3">
|
||||||
{% if day.planned_events | length > 0 %}
|
{# --- START Events --- #}
|
||||||
{% for planned_event in day.planned_events | sort(attribute="planned_starting_time") %}
|
{% if day.planned_events | length > 0 %}
|
||||||
{% set amount_cur_cox = planned_event.cox | length %}
|
{% for planned_event in day.planned_events | sort(attribute="planned_starting_time") %}
|
||||||
{% set amount_cox_missing = planned_event.planned_amount_cox - amount_cur_cox %}
|
{% set amount_cur_cox = planned_event.cox | length %}
|
||||||
<div class="pt-2 px-3 border-t border-gray-200" style="order: {{ planned_event.planned_starting_time | replace(from=":", to="") }}">
|
{% set amount_cox_missing = planned_event.planned_amount_cox - amount_cur_cox %}
|
||||||
<div class="flex justify-between items-center">
|
<div class="pt-2 px-3 border-t border-gray-200"
|
||||||
<div class="mr-1">
|
style="order: {{ planned_event.planned_starting_time | replace(from=":", to="") }}">
|
||||||
<strong class="text-primary-900 dark:text-white">
|
<div class="flex justify-between items-center">
|
||||||
{{ planned_event.planned_starting_time }}
|
<div class="mr-1">
|
||||||
Uhr
|
<strong class="text-primary-900 dark:text-white">
|
||||||
</strong>
|
{{ planned_event.planned_starting_time }}
|
||||||
<small class="text-gray-600 dark:text-gray-100">({{ planned_event.name }}{% if planned_event.trip_type %} - {{ planned_event.trip_type.icon | safe }} {{ planned_event.trip_type.name }}{% endif %})</small><br/>
|
Uhr
|
||||||
|
</strong>
|
||||||
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>{{ planned_event.planned_starting_time }} Uhr</strong> ({{ planned_event.name }}){% if planned_event.trip_type %}<small class='block'>{{ planned_event.trip_type.desc }}</small>{% endif %}{% if planned_event.notes %}<small class='block'>{{ planned_event.notes }}</small>{% endif %}" data-body="#event{{ planned_event.trip_details_id }}" class="inline-block link-primary mr-3">
|
<small class="text-gray-600 dark:text-gray-100">({{ planned_event.name }}
|
||||||
Details
|
{% if planned_event.trip_type %}
|
||||||
</a>
|
- {{ planned_event.trip_type.icon | safe }} {{ planned_event.trip_type.name }}
|
||||||
</div>
|
{% endif %}
|
||||||
<div
|
)</small>
|
||||||
class="text-right grid gap-2">
|
<br />
|
||||||
{# --- START Row Buttons --- #}
|
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>{{ planned_event.planned_starting_time }} Uhr</strong> ({{ planned_event.name }})
|
||||||
{% set_global cur_user_participates = false %}
|
{% if planned_event.trip_type %}<small class='block'>{{ planned_event.trip_type.desc }}</small>{% endif %}
|
||||||
{% for rower in planned_event.rower%}
|
{% if planned_event.notes %}<small class='block'>{{ planned_event.notes }}</small>{% endif %}
|
||||||
{% if rower.name == loggedin_user.name %}
|
" data-body="#event{{ planned_event.trip_details_id }}" class="inline-block link-primary mr-3">
|
||||||
{% set_global cur_user_participates = true %}
|
Details
|
||||||
{% endif %}
|
</a>
|
||||||
{% endfor %}
|
</div>
|
||||||
{% if cur_user_participates %}
|
<div class="text-right grid gap-2">
|
||||||
<a href="/planned/remove/{{ planned_event.trip_details_id }}" class="btn btn-attention btn-fw">Abmelden</a>
|
{# --- START Row Buttons --- #}
|
||||||
{% endif %}
|
{% set_global cur_user_participates = false %}
|
||||||
{% if planned_event.max_people > planned_event.rower | length %}
|
{% for rower in planned_event.rower %}
|
||||||
{% if cur_user_participates == false %}
|
{% if rower.name == loggedin_user.name %}
|
||||||
<a href="/planned/join/{{ planned_event.trip_details_id }}" class="btn btn-primary btn-fw" {% if planned_event.trip_type %} onclick="return confirm('{{ planned_event.trip_type.question }}');" {% endif %}>Mitrudern</a>
|
{% set_global cur_user_participates = true %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endfor %}
|
||||||
{# --- END Row Buttons --- #}
|
{% if cur_user_participates %}
|
||||||
|
<a href="/planned/remove/{{ planned_event.trip_details_id }}"
|
||||||
{# --- START Cox Buttons --- #}
|
class="btn btn-attention btn-fw">Abmelden</a>
|
||||||
{% if "cox" in loggedin_user.roles %}
|
{% endif %}
|
||||||
{% set_global cur_user_participates = false %}
|
{% if planned_event.max_people > planned_event.rower | length %}
|
||||||
{% for cox in planned_event.cox %}
|
{% if cur_user_participates == false %}
|
||||||
{% if cox.name == loggedin_user.name %}
|
<a href="/planned/join/{{ planned_event.trip_details_id }}"
|
||||||
{% set_global cur_user_participates = true %}
|
class="btn btn-primary btn-fw"
|
||||||
{% endif %}
|
{% if planned_event.trip_type %}onclick="return confirm('{{ planned_event.trip_type.question }}');"{% endif %}>Mitrudern</a>
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
{% if cur_user_participates %}
|
{% endif %}
|
||||||
<a href="/cox/remove/{{ planned_event.id }}" class="block btn btn-attention btn-fw">
|
{# --- END Row Buttons --- #}
|
||||||
{% include "includes/cox-icon" %}
|
{# --- START Cox Buttons --- #}
|
||||||
Abmelden
|
{% if "cox" in loggedin_user.roles %}
|
||||||
</a>
|
{% set_global cur_user_participates = false %}
|
||||||
{% else %}
|
{% for cox in planned_event.cox %}
|
||||||
<a href="/cox/join/{{ planned_event.id }}" class="block btn {% if amount_cox_missing > 0 %} btn-dark {% else %} btn-gray {% endif %} btn-fw" {% if planned_event.trip_type %} onclick="return confirm('{{ planned_event.trip_type.question }}');" {% endif %}>
|
{% if cox.name == loggedin_user.name %}
|
||||||
{% include "includes/cox-icon" %}
|
{% set_global cur_user_participates = true %}
|
||||||
Steuern
|
{% endif %}
|
||||||
</a>
|
{% endfor %}
|
||||||
{% endif %}
|
{% if cur_user_participates %}
|
||||||
{% endif %}
|
<a href="/cox/remove/{{ planned_event.id }}"
|
||||||
{# --- END Cox Buttons --- #}
|
class="block btn btn-attention btn-fw">
|
||||||
</div>
|
{% include "includes/cox-icon" %}
|
||||||
</div>
|
Abmelden
|
||||||
|
</a>
|
||||||
{# --- START Sidebar Content --- #}
|
{% else %}
|
||||||
<div class="hidden">
|
<a href="/cox/join/{{ planned_event.id }}"
|
||||||
<div
|
class="block btn {% if amount_cox_missing > 0 %} btn-dark {% else %} btn-gray {% endif %} btn-fw"
|
||||||
id="event{{ planned_event.trip_details_id }}">
|
{% if planned_event.trip_type %}onclick="return confirm('{{ planned_event.trip_type.question }}');"{% endif %}>
|
||||||
{# --- START List Coxes --- #}
|
{% include "includes/cox-icon" %}
|
||||||
{% if planned_event.planned_amount_cox > 0 %}
|
Steuern
|
||||||
{% if amount_cox_missing > 0 %}
|
</a>
|
||||||
{{ macros::box(participants=planned_event.cox, empty_seats=planned_event.planned_amount_cox - amount_cur_cox, header='Noch benötigte Steuerleute:', text='Keine Steuerleute angemeldet') }}
|
{% endif %}
|
||||||
{% else %}
|
{% endif %}
|
||||||
{{ macros::box(participants=planned_event.cox, empty_seats="", header='Genügend Steuerleute haben sich angemeldet :-)', text='Keine Steuerleute angemeldet') }}
|
{# --- END Cox Buttons --- #}
|
||||||
{% endif %}
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
{# --- END List Coxes --- #}
|
{# --- START Sidebar Content --- #}
|
||||||
|
<div class="hidden">
|
||||||
{# --- START List Rowers --- #}
|
<div id="event{{ planned_event.trip_details_id }}">
|
||||||
{% if planned_event.max_people > 0 %}
|
{# --- START List Coxes --- #}
|
||||||
{% set amount_cur_rower = planned_event.rower | length %}
|
{% if planned_event.planned_amount_cox > 0 %}
|
||||||
{{ macros::box(participants=planned_event.rower, empty_seats=planned_event.max_people - amount_cur_rower, bg='primary-100', color='black', trip_details_id=planned_event.trip_details_id, allow_removing="planned_event" in loggedin_user.roles) }}
|
{% if amount_cox_missing > 0 %}
|
||||||
{% endif %}
|
{{ macros::box(participants=planned_event.cox, empty_seats=planned_event.planned_amount_cox - amount_cur_cox, header='Noch benötigte Steuerleute:', text='Keine Steuerleute angemeldet') }}
|
||||||
{# --- END List Rowers --- #}
|
{% else %}
|
||||||
|
{{ macros::box(participants=planned_event.cox, empty_seats="", header='Genügend Steuerleute haben sich angemeldet :-)', text='Keine Steuerleute angemeldet') }}
|
||||||
{% if "planned_event" in loggedin_user.roles %}
|
{% endif %}
|
||||||
<form action="/planned/join/{{ planned_event.trip_details_id }}" method="get" />
|
{% endif %}
|
||||||
{{ macros::input(label='Gast', class="input rounded-t", name='user_note', type='text', required=true) }}
|
{# --- END List Coxes --- #}
|
||||||
<input value="Gast hinzufügen" class="btn btn-primary w-full rounded-t-none-important" type="submit"/>
|
{# --- START List Rowers --- #}
|
||||||
</form>
|
{% if planned_event.max_people > 0 %}
|
||||||
{% endif %}
|
{% set amount_cur_rower = planned_event.rower | length %}
|
||||||
|
{{ macros::box(participants=planned_event.rower, empty_seats=planned_event.max_people - amount_cur_rower, bg='primary-100', color='black', trip_details_id=planned_event.trip_details_id, allow_removing="planned_event" in loggedin_user.roles) }}
|
||||||
|
{% endif %}
|
||||||
{% if planned_event.allow_guests %}
|
{# --- END List Rowers --- #}
|
||||||
<div class="text-primary-900 bg-primary-50 text-center p-1 mb-4">Gäste willkommen!</div>
|
{% if "planned_event" in loggedin_user.roles %}
|
||||||
{% endif %}
|
<form action="/planned/join/{{ planned_event.trip_details_id }}"
|
||||||
|
method="get" />
|
||||||
{% if "planned_event" in loggedin_user.roles %}
|
{{ macros::input(label='Gast', class="input rounded-t", name='user_note', type='text', required=true) }}
|
||||||
|
<input value="Gast hinzufügen"
|
||||||
{# --- START Edit Form --- #}
|
class="btn btn-primary w-full rounded-t-none-important"
|
||||||
<div class="bg-gray-100 dark:bg-primary-900 p-3 mt-4 rounded-md">
|
type="submit" />
|
||||||
<h3 class="text-primary-950 dark:text-white font-bold uppercase tracking-wide mb-2">Ausfahrt bearbeiten</h3>
|
</form>
|
||||||
<form action="/admin/planned-event" method="post" class="grid gap-3">
|
{% endif %}
|
||||||
<input type="hidden" name="_method" value="put"/>
|
{% if planned_event.allow_guests %}
|
||||||
<input type="hidden" name="id" value="{{ planned_event.id }}"/>
|
<div class="text-primary-900 bg-primary-50 text-center p-1 mb-4">Gäste willkommen!</div>
|
||||||
{{ macros::input(label='Titel', name='name', type='input', value=planned_event.name) }}
|
{% endif %}
|
||||||
{{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=planned_event.max_people, min='0') }}
|
{% if "planned_event" in loggedin_user.roles %}
|
||||||
{{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', value=planned_event.planned_amount_cox, required=true, min='0') }}
|
{# --- START Edit Form --- #}
|
||||||
{{ macros::checkbox(label='Immer anzeigen', name='always_show', id=planned_event.id,checked=planned_event.always_show) }}
|
<div class="bg-gray-100 dark:bg-primary-900 p-3 mt-4 rounded-md">
|
||||||
{{ macros::checkbox(label='Gesperrt', name='is_locked', id=planned_event.id,checked=planned_event.is_locked) }}
|
<h3 class="text-primary-950 dark:text-white font-bold uppercase tracking-wide mb-2">Ausfahrt bearbeiten</h3>
|
||||||
{{ macros::input(label='Anmerkungen', name='notes', type='input', value=planned_event.notes) }}
|
<form action="/admin/planned-event" method="post" class="grid gap-3">
|
||||||
|
<input type="hidden" name="_method" value="put" />
|
||||||
<input value="Speichern" class="btn btn-primary" type="submit"/>
|
<input type="hidden" name="id" value="{{ planned_event.id }}" />
|
||||||
</form>
|
{{ macros::input(label='Titel', name='name', type='input', value=planned_event.name) }}
|
||||||
</div>
|
{{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=planned_event.max_people, min='0') }}
|
||||||
{# --- END Edit Form --- #}
|
{{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', value=planned_event.planned_amount_cox, required=true, min='0') }}
|
||||||
|
{{ macros::checkbox(label='Immer anzeigen', name='always_show', id=planned_event.id,checked=planned_event.always_show) }}
|
||||||
{# --- START Delete Btn --- #}
|
{{ macros::checkbox(label='Gesperrt', name='is_locked', id=planned_event.id,checked=planned_event.is_locked) }}
|
||||||
<div class="text-right">
|
{{ macros::input(label='Anmerkungen', name='notes', type='input', value=planned_event.notes) }}
|
||||||
<a href="/admin/planned-event/{{ planned_event.id }}/delete" class="inline-block btn btn-alert">
|
<input value="Speichern" class="btn btn-primary" type="submit" />
|
||||||
{% include "includes/delete-icon" %}
|
</form>
|
||||||
Termin löschen
|
</div>
|
||||||
</a>
|
{# --- END Edit Form --- #}
|
||||||
</div>
|
{# --- START Delete Btn --- #}
|
||||||
{% endif %}
|
<div class="text-right">
|
||||||
{# --- END Delete Btn --- #}
|
<a href="/admin/planned-event/{{ planned_event.id }}/delete"
|
||||||
</div>
|
class="inline-block btn btn-alert">
|
||||||
</div>
|
{% include "includes/delete-icon" %}
|
||||||
{# --- END Sidebar Content --- #}
|
Termin löschen
|
||||||
</div>
|
</a>
|
||||||
{% endfor %}
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# --- END Events --- #}
|
{# --- END Delete Btn --- #}
|
||||||
|
</div>
|
||||||
{# --- START Trips --- #}
|
</div>
|
||||||
{% if day.trips | length > 0 %}
|
{# --- END Sidebar Content --- #}
|
||||||
{% for trip in day.trips | sort(attribute="planned_starting_time") %}
|
</div>
|
||||||
<div class="pt-2 px-3 reset-js border-t border-gray-200" style="order: {{ trip.planned_starting_time | replace(from=":", to="") }}" data-coxneeded="false">
|
{% endfor %}
|
||||||
<div class="flex justify-between items-center">
|
{% endif %}
|
||||||
<div class="mr-1">
|
{# --- END Events --- #}
|
||||||
{% if trip.max_people == 0 %}
|
{# --- START Trips --- #}
|
||||||
<strong class="text-[#f43f5e]">⚠
|
{% if day.trips | length > 0 %}
|
||||||
{{ trip.planned_starting_time }}
|
{% for trip in day.trips | sort(attribute="planned_starting_time") %}
|
||||||
Uhr</strong>
|
<div class="pt-2 px-3 reset-js border-t border-gray-200"
|
||||||
<small class="text-[#f43f5e]">(Absage
|
style="order: {{ trip.planned_starting_time | replace(from=":", to="") }}"
|
||||||
{{ trip.cox_name }}
|
data-coxneeded="false">
|
||||||
{% if trip.trip_type %}
|
<div class="flex justify-between items-center">
|
||||||
-
|
<div class="mr-1">
|
||||||
{{ trip.trip_type.icon | safe }}{{ trip.trip_type.name }}
|
{% if trip.max_people == 0 %}
|
||||||
{% endif %})</small>
|
<strong class="text-[#f43f5e]">⚠
|
||||||
{% else %}
|
{{ trip.planned_starting_time }}
|
||||||
<strong class="text-primary-900 dark:text-white">{{ trip.planned_starting_time }}
|
Uhr</strong>
|
||||||
Uhr</strong>
|
<small class="text-[#f43f5e]">(Absage
|
||||||
<small class="text-gray-600 dark:text-gray-100">({{ trip.cox_name }}{% if trip.trip_type %} - {{ trip.trip_type.icon | safe }} {{ trip.trip_type.name }}{% endif %})</small>
|
{{ trip.cox_name -}}
|
||||||
{% endif %}
|
{% if trip.trip_type %}
|
||||||
<br/>
|
-
|
||||||
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>{% if trip.max_people == 0 %}⚠ {% endif %}{{ trip.planned_starting_time }} Uhr</strong> ({{ trip.cox_name }}){% if trip.trip_type %}<small class='block'>{{ trip.trip_type.desc }}</small>{% endif %}{% if trip.notes %}<small class='block'>{{ trip.notes }}</small>{% endif %}" data-body="#trip{{ trip.trip_details_id }}" class="inline-block link-primary mr-3">
|
{{ trip.trip_type.icon | safe }}{{ trip.trip_type.name }}
|
||||||
Details
|
{% endif -%}
|
||||||
</a>
|
)</small>
|
||||||
</div>
|
{% else %}
|
||||||
|
<strong class="text-primary-900 dark:text-white">{{ trip.planned_starting_time }}
|
||||||
<div>
|
Uhr</strong>
|
||||||
{% set_global cur_user_participates = false %}
|
<small class="text-gray-600 dark:text-gray-100">({{ trip.cox_name -}}
|
||||||
{% for rower in trip.rower %}
|
{% if trip.trip_type %}- {{ trip.trip_type.icon | safe }} {{ trip.trip_type.name }}{% endif -%}
|
||||||
{% if rower.name == loggedin_user.name %}
|
)</small>
|
||||||
{% set_global cur_user_participates = true %}
|
{% endif %}
|
||||||
{% endif %}
|
<br />
|
||||||
{% endfor %}
|
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>
|
||||||
{% if cur_user_participates %}
|
{% if trip.max_people == 0 %}⚠{% endif %}
|
||||||
<a href="/planned/remove/{{ trip.trip_details_id }}" class="btn btn-attention btn-fw">Abmelden</a>
|
{{ trip.planned_starting_time }} Uhr</strong> ({{ trip.cox_name }})
|
||||||
{% endif %}
|
{% if trip.trip_type %}<small class='block'>{{ trip.trip_type.desc }}</small>{% endif %}
|
||||||
{% if trip.max_people > trip.rower | length and trip.cox_id != loggedin_user.id and cur_user_participates == false%}
|
{% if trip.notes %}<small class='block'>{{ trip.notes }}</small>{% endif %}
|
||||||
<a href="/planned/join/{{ trip.trip_details_id }}" class="btn btn-primary btn-fw" {% if trip.trip_type %} onclick="return confirm('{{ trip.trip_type.question }}');" {% endif %}>Mitrudern</a>
|
" data-body="#trip{{ trip.trip_details_id }}" class="inline-block link-primary mr-3">
|
||||||
{% endif %}
|
Details
|
||||||
</div>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{# --- START Sidebar Content --- #}
|
<div>
|
||||||
<div class="hidden">
|
{% set_global cur_user_participates = false %}
|
||||||
<div id="trip{{ trip.trip_details_id }}">
|
{% for rower in trip.rower %}
|
||||||
{% if trip.max_people == 0 %}
|
{% if rower.name == loggedin_user.name %}
|
||||||
{# --- border-[#f43f5e] bg-[#f43f5e] --- #}
|
{% set_global cur_user_participates = true %}
|
||||||
{{ macros::box(participants=trip.rower,bg='[#f43f5e]',header='Absage') }}
|
{% endif %}
|
||||||
{% else %}
|
{% endfor %}
|
||||||
{% set amount_cur_rower = trip.rower | length %}
|
{% if cur_user_participates %}
|
||||||
{{ macros::box(participants=trip.rower, empty_seats=trip.max_people - amount_cur_rower, bg='primary-100', color='black', trip_details_id=trip.trip_details_id, allow_removing=loggedin_user.id == trip.cox_id) }}
|
<a href="/planned/remove/{{ trip.trip_details_id }}"
|
||||||
{% if trip.cox_id == loggedin_user.id %}
|
class="btn btn-attention btn-fw">Abmelden</a>
|
||||||
<form action="/planned/join/{{ trip.trip_details_id }}" method="get" />
|
{% endif %}
|
||||||
{{ macros::input(label='Gast', class="input rounded-t", name='user_note', type='text', required=true) }}
|
{% if trip.max_people > trip.rower | length and trip.cox_id != loggedin_user.id and cur_user_participates == false %}
|
||||||
<input value="Gast hinzufügen" class="btn btn-primary w-full rounded-t-none-important" type="submit"/>
|
<a href="/planned/join/{{ trip.trip_details_id }}"
|
||||||
</form>
|
class="btn btn-primary btn-fw"
|
||||||
{% endif %}
|
{% if trip.trip_type %}onclick="return confirm('{{ trip.trip_type.question }}');"{% endif %}>Mitrudern</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
{# --- START Edit Form --- #}
|
</div>
|
||||||
{% if trip.cox_id == loggedin_user.id %}
|
{# --- START Sidebar Content --- #}
|
||||||
<div class="bg-gray-100 dark:bg-primary-900 p-3 mt-4 rounded-md">
|
<div class="hidden">
|
||||||
<h3 class="text-primary-950 dark:text-white font-bold uppercase tracking-wide mb-2">Ausfahrt bearbeiten</h3>
|
<div id="trip{{ trip.trip_details_id }}">
|
||||||
<form action="/cox/trip/{{ trip.id }}" method="post" class="grid gap-3">
|
{% if trip.max_people == 0 %}
|
||||||
{{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=trip.max_people, min='0') }}
|
{# --- border-[#f43f5e] bg-[#f43f5e] --- #}
|
||||||
{{ macros::input(label='Anmerkungen', name='notes', type='input', value=trip.notes) }}
|
{{ macros::box(participants=trip.rower,bg='[#f43f5e]',header='Absage') }}
|
||||||
{{ macros::checkbox(label='Immer anzeigen', name='always_show', id=trip.id,checked=trip.always_show) }}
|
{% else %}
|
||||||
{{ macros::checkbox(label='Gesperrt', name='is_locked', id=trip.id,checked=trip.is_locked) }}
|
{% set amount_cur_rower = trip.rower | length %}
|
||||||
{{ macros::select(label='Typ', name='trip_type', data=trip_types, default='Reguläre Ausfahrt', selected_id=trip.trip_type_id) }}
|
{{ macros::box(participants=trip.rower, empty_seats=trip.max_people - amount_cur_rower, bg='primary-100', color='black', trip_details_id=trip.trip_details_id, allow_removing=loggedin_user.id == trip.cox_id) }}
|
||||||
|
{% if trip.cox_id == loggedin_user.id %}
|
||||||
<input value="Speichern" class="btn btn-primary" type="submit"/>
|
<form action="/planned/join/{{ trip.trip_details_id }}" method="get" />
|
||||||
</form>
|
{{ macros::input(label='Gast', class="input rounded-t", name='user_note', type='text', required=true) }}
|
||||||
</div>
|
<input value="Gast hinzufügen"
|
||||||
{% if trip.rower | length == 0 %}
|
class="btn btn-primary w-full rounded-t-none-important"
|
||||||
<div class="text-right mt-6">
|
type="submit" />
|
||||||
<a href="/cox/remove/trip/{{ trip.id }}" class="inline-block btn btn-alert">
|
</form>
|
||||||
{% include "includes/delete-icon" %}
|
{% endif %}
|
||||||
Termin löschen
|
{% endif %}
|
||||||
</a>
|
{# --- START Edit Form --- #}
|
||||||
</div>
|
{% if trip.cox_id == loggedin_user.id %}
|
||||||
{% endif %}
|
<div class="bg-gray-100 dark:bg-primary-900 p-3 mt-4 rounded-md">
|
||||||
{% endif %}
|
<h3 class="text-primary-950 dark:text-white font-bold uppercase tracking-wide mb-2">Ausfahrt bearbeiten</h3>
|
||||||
{# --- END Edit Form --- #}
|
<form action="/cox/trip/{{ trip.id }}" method="post" class="grid gap-3">
|
||||||
</div>
|
{{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=trip.max_people, min='0') }}
|
||||||
</div>
|
{{ macros::input(label='Anmerkungen', name='notes', type='input', value=trip.notes) }}
|
||||||
{# --- END Sidebar Content --- #}
|
{{ macros::checkbox(label='Immer anzeigen', name='always_show', id=trip.id,checked=trip.always_show) }}
|
||||||
</div>
|
{{ macros::checkbox(label='Gesperrt', name='is_locked', id=trip.id,checked=trip.is_locked) }}
|
||||||
{% endfor %}
|
{{ macros::select(label='Typ', name='trip_type', data=trip_types, default='Reguläre Ausfahrt', selected_id=trip.trip_type_id) }}
|
||||||
{% endif %}
|
<input value="Speichern" class="btn btn-primary" type="submit" />
|
||||||
{# --- END Trips --- #}
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% if trip.rower | length == 0 %}
|
||||||
</div>
|
<div class="text-right mt-6">
|
||||||
|
<a href="/cox/remove/trip/{{ trip.id }}"
|
||||||
{# --- START Add Buttons --- #}
|
class="inline-block btn btn-alert">
|
||||||
{% if "planned_event" in loggedin_user.roles or "cox" in loggedin_user.roles %}
|
{% include "includes/delete-icon" %}
|
||||||
<div class="grid {% if "planned_event" in loggedin_user.roles %} grid-cols-2 {% endif %} text-center">
|
Termin löschen
|
||||||
{% if "planned_event" in loggedin_user.roles %}
|
</a>
|
||||||
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>Event</strong> am {{ day.day| date(format='%d.%m.%Y') }} erstellen" data-day="{{ day.day }}" data-body="#addEventForm" class="relative inline-block w-full bg-primary-900 hover:bg-primary-950 focus:bg-primary-950 dark:bg-primary-950 text-white py-2 rounded-bl-md text-sm font-semibold">
|
</div>
|
||||||
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
{% endif %}
|
||||||
{% include "includes/plus-icon" %}
|
{% endif %}
|
||||||
</span>
|
{# --- END Edit Form --- #}
|
||||||
Event
|
</div>
|
||||||
</a>
|
</div>
|
||||||
{% endif %}
|
{# --- END Sidebar Content --- #}
|
||||||
|
</div>
|
||||||
{% if "cox" in loggedin_user.roles %}
|
{% endfor %}
|
||||||
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>Ausfahrt</strong> am {{ day.day| date(format='%d.%m.%Y') }} erstellen" data-day="{{ day.day }}" data-body="#sidebarForm" class="relative inline-block w-full py-2 text-primary-900 hover:text-primary-950 dark:bg-primary-600 dark:text-white dark:hover:bg-primary-500 dark:hover:text-white focus:text-primary-950 text-sm font-semibold bg-gray-100 hover:bg-gray-200 focus:bg-gray-200 {% if "planned_event" in loggedin_user.roles %} rounded-br-md {% else %} rounded-b-md {% endif %}">
|
{% endif %}
|
||||||
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
|
{# --- END Trips --- #}
|
||||||
{% include "includes/plus-icon" %}
|
</div>
|
||||||
</span>
|
{% endif %}
|
||||||
Ausfahrt
|
</div>
|
||||||
</a>
|
{# --- START Add Buttons --- #}
|
||||||
{% endif %}
|
{% if "planned_event" in loggedin_user.roles or "cox" in loggedin_user.roles %}
|
||||||
</div>
|
<div class="grid {% if "planned_event" in loggedin_user.roles %}grid-cols-2{% endif %} text-center">
|
||||||
{% endif %}
|
{% if "planned_event" in loggedin_user.roles %}
|
||||||
{# --- END Add Buttons --- #}
|
<a href="#"
|
||||||
</div>
|
data-sidebar="true"
|
||||||
{% endfor %}
|
data-trigger="sidebar"
|
||||||
</div>
|
data-header="<strong>Event</strong> am {{ day.day| date(format='%d.%m.%Y') }} erstellen"
|
||||||
|
data-day="{{ day.day }}"
|
||||||
|
data-body="#addEventForm"
|
||||||
|
class="relative inline-block w-full bg-primary-900 hover:bg-primary-950 focus:bg-primary-950 dark:bg-primary-950 text-white py-2 rounded-bl-md text-sm font-semibold">
|
||||||
|
<span class="absolute inset-y-0 left-0 flex items-center pl-3">{% include "includes/plus-icon" %}</span>
|
||||||
|
Event
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if "cox" in loggedin_user.roles %}
|
||||||
|
<a href="#" data-sidebar="true" data-trigger="sidebar" data-header="<strong>Ausfahrt</strong> am {{ day.day| date(format='%d.%m.%Y') }} erstellen" data-day="{{ day.day }}" data-body="#sidebarForm" class="relative inline-block w-full py-2 text-primary-900 hover:text-primary-950 dark:bg-primary-600 dark:text-white dark:hover:bg-primary-500 dark:hover:text-white focus:text-primary-950 text-sm font-semibold bg-gray-100 hover:bg-gray-200 focus:bg-gray-200
|
||||||
|
{% if "planned_event" in loggedin_user.roles %}
|
||||||
|
rounded-br-md
|
||||||
|
{% else %}
|
||||||
|
rounded-b-md
|
||||||
|
{% endif %}
|
||||||
|
">
|
||||||
|
<span class="absolute inset-y-0 left-0 flex items-center pl-3">{% include "includes/plus-icon" %}</span>
|
||||||
|
Ausfahrt
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{# --- END Add Buttons --- #}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if "cox" in loggedin_user.roles %}
|
{% if "cox" in loggedin_user.roles %}
|
||||||
{% include "forms/trip" %}
|
{% include "forms/trip" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if "planned_event" in loggedin_user.roles %}
|
{% if "planned_event" in loggedin_user.roles %}
|
||||||
{% include "forms/event" %}
|
{% include "forms/event" %}
|
||||||
{% endif %}{% endblock content %}
|
{% endif %}
|
||||||
|
{% endblock content %}
|
||||||
|
@ -1,40 +1,40 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
<h1 class="h1">Bootsauswertung</h1>
|
<h1 class="h1">Bootsauswertung</h1>
|
||||||
<div class="search-wrapper">
|
<div class="search-wrapper">
|
||||||
<label for="name" class="sr-only">Suche</label>
|
<label for="name" class="sr-only">Suche</label>
|
||||||
<input type="search" name="name" id="filter-js" class="search-bar" placeholder="Suchen nach Bootsnamen...">
|
<input type="search"
|
||||||
</div>
|
name="name"
|
||||||
|
id="filter-js"
|
||||||
<div id="filter-result-js" class="search-result"></div>
|
class="search-bar"
|
||||||
|
placeholder="Suchen nach Bootsnamen...">
|
||||||
<div class="border-r border-l border-gray-200 dark:border-primary-600">
|
</div>
|
||||||
{% set_global km = 0 %}
|
<div id="filter-result-js" class="search-result"></div>
|
||||||
{% set_global index = 1 %}
|
<div class="border-r border-l border-gray-200 dark:border-primary-600">
|
||||||
{% for s in stat %}
|
{% set_global km = 0 %}
|
||||||
<div class="border-t border-gray-200 dark:border-primary-600 {% if loop.last %} border-b {% endif %} bg-white dark:bg-primary-900 text-black dark:text-white flex justify-between items-center px-3 py-1" data-filterable="true" data-filter="{{ s.name }}">
|
{% set_global index = 1 %}
|
||||||
<span class="text-sm text-gray-600 dark:text-gray-100 w-10">
|
{% for s in stat %}
|
||||||
{% if km != s.rowed_km %}
|
<div class="border-t border-gray-200 dark:border-primary-600 {% if loop.last %}border-b{% endif %} bg-white dark:bg-primary-900 text-black dark:text-white flex justify-between items-center px-3 py-1"
|
||||||
{{loop.index}}
|
data-filterable="true"
|
||||||
{% set_global index = loop.index %}
|
data-filter="{{ s.name }}">
|
||||||
{% else %}
|
<span class="text-sm text-gray-600 dark:text-gray-100 w-10">
|
||||||
{{ index }}
|
{% if km != s.rowed_km %}
|
||||||
{% endif %}
|
{{ loop.index }}
|
||||||
</span>
|
{% set_global index = loop.index %}
|
||||||
<span class="grow">{{s.name}}</span>
|
{% else %}
|
||||||
<span>{{s.rowed_km}}
|
{{ index }}
|
||||||
km</span>
|
{% endif %}
|
||||||
|
</span>
|
||||||
{% set_global km = s.rowed_km %}
|
<span class="grow">{{ s.name }}</span>
|
||||||
</div>
|
<span>{{ s.rowed_km }}
|
||||||
{% endfor %}
|
km</span>
|
||||||
</div>
|
{% set_global km = s.rowed_km %}
|
||||||
<div id="container" class="w-full"></div>
|
</div>
|
||||||
</div>
|
{% endfor %}
|
||||||
|
</div>
|
||||||
<script src="/public/logbook.js"></script>
|
<div id="container" class="w-full"></div>
|
||||||
{% endblock content%}
|
</div>
|
||||||
|
<script src="/public/logbook.js"></script>
|
||||||
|
{% endblock content %}
|
||||||
|
@ -1,77 +1,57 @@
|
|||||||
{% import "includes/macros" as macros %}
|
{% import "includes/macros" as macros %}
|
||||||
|
|
||||||
{% extends "base" %}
|
{% extends "base" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="max-w-screen-lg w-full">
|
||||||
|
<h1 class="h1">
|
||||||
<div class="max-w-screen-lg w-full">
|
Statistik
|
||||||
<h1 class="h1">
|
<select id="yearSelect"
|
||||||
Statistik
|
onchange="changeYear()"
|
||||||
<select
|
style="background: transparent;
|
||||||
id="yearSelect"
|
background-image: none;
|
||||||
onchange="changeYear()"
|
text-decoration: underline"></select>
|
||||||
style="
|
</h1>
|
||||||
background: transparent;
|
<div class="search-wrapper">
|
||||||
background-image: none;
|
<label for="name" class="sr-only">Suche</label>
|
||||||
text-decoration: underline;
|
<input type="search"
|
||||||
"
|
name="name"
|
||||||
></select>
|
id="filter-js"
|
||||||
</h1>
|
class="search-bar"
|
||||||
<div class="search-wrapper">
|
placeholder="Suchen nach Namen..." />
|
||||||
<label for="name" class="sr-only">Suche</label>
|
</div>
|
||||||
<input
|
<div id="filter-result-js" class="search-result"></div>
|
||||||
type="search"
|
<div class="border-r border-l border-gray-200 dark:border-primary-600">
|
||||||
name="name"
|
{% set_global km = 0 %} {% set_global index = 1 %}
|
||||||
id="filter-js"
|
{% for s in stat %}
|
||||||
class="search-bar"
|
<div class="border-t border-gray-200 dark:border-primary-600 {% if loop.last %}border-b{% endif %} bg-white dark:bg-primary-900 text-black dark:text-white flex justify-between items-center px-3 py-1"
|
||||||
placeholder="Suchen nach Namen..."
|
data-filterable="true"
|
||||||
/>
|
data-filter="{{ s.name }}">
|
||||||
</div>
|
<span class="text-sm text-gray-600 dark:text-gray-100 w-10">
|
||||||
|
{% if km != s.rowed_km %}
|
||||||
<div id="filter-result-js" class="search-result"></div>
|
{{ loop.index }}
|
||||||
|
{% set_global index = loop.index %}
|
||||||
<div class="border-r border-l border-gray-200 dark:border-primary-600">
|
{% else %}
|
||||||
{% set_global km = 0 %} {% set_global index = 1 %} {% for s in stat %}
|
{{ index }}
|
||||||
<div
|
{% endif %}
|
||||||
class="border-t border-gray-200 dark:border-primary-600 {% if loop.last %} border-b {% endif %} bg-white dark:bg-primary-900 text-black dark:text-white flex justify-between items-center px-3 py-1"
|
</span>
|
||||||
data-filterable="true"
|
<span class="grow">{{ s.name }}</span>
|
||||||
data-filter="{{ s.name }}"
|
<span>{{ s.rowed_km }} km</span>
|
||||||
>
|
{% set_global km = s.rowed_km %}
|
||||||
<span class="text-sm text-gray-600 dark:text-gray-100 w-10">
|
</div>
|
||||||
{% if km != s.rowed_km %}
|
{% endfor %}
|
||||||
{{ loop.index }}
|
<div class="border-t border-gray-200 dark:border-primary-600 {% if loop.last %}border-b{% endif %} bg-white dark:bg-primary-900 text-black dark:text-white flex justify-between items-center px-3 py-1"
|
||||||
{% set_global index = loop.index %} {% else %}
|
data-filterable="true"
|
||||||
{{ index }}
|
data-filter="{{ guest_km.name }}">
|
||||||
{% endif %}
|
<span class="text-sm text-gray-600 dark:text-gray-100 w-10"></span>
|
||||||
</span>
|
<span class="grow">{{ guest_km.name }}</span>
|
||||||
<span class="grow">{{ s.name }}</span>
|
<span>{{ guest_km.rowed_km }} km</span>
|
||||||
<span>{{ s.rowed_km }} km</span>
|
</div>
|
||||||
|
</div>
|
||||||
{% set_global km = s.rowed_km %}
|
<div id="container" class="w-full"></div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
<script>
|
||||||
<div
|
|
||||||
class="border-t border-gray-200 dark:border-primary-600 {% if loop.last %} border-b {% endif %} bg-white dark:bg-primary-900 text-black dark:text-white flex justify-between items-center px-3 py-1"
|
|
||||||
data-filterable="true"
|
|
||||||
data-filter="{{ guest_km.name }}"
|
|
||||||
>
|
|
||||||
<span class="text-sm text-gray-600 dark:text-gray-100 w-10">
|
|
||||||
</span>
|
|
||||||
<span class="grow">{{ guest_km.name }}</span>
|
|
||||||
<span>{{ guest_km.rowed_km }} km</span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="container" class="w-full"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
{% if personal %}
|
{% if personal %}
|
||||||
const data = [
|
const data = [
|
||||||
{%- for p in personal %}
|
{%- for p in personal %}{ date: '{{p.date}}', km: {{p.km}} },{%- endfor %}
|
||||||
{ date: '{{p.date}}', km: {{p.km}} },
|
|
||||||
{%- endfor %}
|
|
||||||
]
|
]
|
||||||
sessionStorage.setItem('userStats', JSON.stringify(data));
|
sessionStorage.setItem('userStats', JSON.stringify(data));
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -102,7 +82,6 @@ function changeYear() {
|
|||||||
|
|
||||||
// Call this function when the page loads
|
// Call this function when the page loads
|
||||||
populateYears();
|
populateYears();
|
||||||
</script>
|
</script>
|
||||||
|
<script src="/public/logbook.js"></script>
|
||||||
<script src="/public/logbook.js"></script>
|
{% endblock content %}
|
||||||
{% endblock content%}
|
|
||||||
|