Compare commits

...

14 Commits

Author SHA1 Message Date
0625937068 Merge pull request 'filter by runner full names + "#<ID>"' (#160) from feature/159-cardsoverview-filter-for-runner-full-names-and-id into dev
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #160
2023-03-15 11:20:05 +00:00
32a9074963 Wow this api is fun
ref #159
2023-03-15 12:14:39 +01:00
b869b5fd2a remodelled for early return
ref #159
2023-03-15 11:39:51 +01:00
3a3e2f7157 add ThFilterRunner
ref #159
2023-03-15 11:10:08 +01:00
bea57aa03a fix styling for table filters th border
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-15 11:08:05 +01:00
30991d5364 UsersOverview: drop pfp
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-14 09:53:16 +01:00
5cc8b0811c UsersOverview: change profilepic scaling
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-14 09:51:40 +01:00
2c73b9862d package dependency fixes, bumps, lockfile update
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-14 09:51:23 +01:00
732b2f061e wip: pnpm + node version 2023-03-14 09:29:27 +01:00
3680533eef 🚀RELEASE v0.16.5
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-14 09:25:11 +01:00
1307d72c9d Merge branch 'dev' of https://git.odit.services/lfk/frontend into dev
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-14 09:24:54 +01:00
405dfa0c34 new license file version [CI SKIP] 2023-03-14 08:24:37 +00:00
5c2d154ad1 🚀RELEASE v0.16.4 2023-03-14 09:24:31 +01:00
f2bf8d9bac fix: OrgDetail: clicking on address will toggle selfservice
All checks were successful
continuous-integration/drone/push Build is passing
close #158
2023-03-14 09:23:55 +01:00
13 changed files with 3838 additions and 69 deletions

8
.gitignore vendored
View File

@@ -1,11 +1,5 @@
node_modules node_modules
package-lock.json
yarn.lock
*.map *.map
public/env.js public/env.js
public/index.html public/index.html
/dist /dist
.yarn
.pnp.js
.yarnrc.yml
pnpm-lock.yaml

View File

@@ -2,8 +2,22 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [0.16.5](https://git.odit.services/lfk/frontend/compare/0.16.4...0.16.5)
- new license file version [CI SKIP] [`405dfa0`](https://git.odit.services/lfk/frontend/commit/405dfa0c34ba87fc450c22e0e9974f92c4cdeffe)
#### [0.16.4](https://git.odit.services/lfk/frontend/compare/0.16.3...0.16.4)
> 14 March 2023
- fix: OrgDetail: clicking on address will toggle selfservice [`#158`](https://git.odit.services/lfk/frontend/issues/158)
- 🚀RELEASE v0.16.4 [`5c2d154`](https://git.odit.services/lfk/frontend/commit/5c2d154ad180ce7916605871c63e2f5ac4428250)
#### [0.16.3](https://git.odit.services/lfk/frontend/compare/0.16.2...0.16.3) #### [0.16.3](https://git.odit.services/lfk/frontend/compare/0.16.2...0.16.3)
> 23 February 2023
- 🚀RELEASE v0.16.3 [`f9cfd6b`](https://git.odit.services/lfk/frontend/commit/f9cfd6bd063b01a584774854d8fb5eab96f99528)
- Bumped vite build targets [`5fe4763`](https://git.odit.services/lfk/frontend/commit/5fe47634e8980e77b65c05f213c475cf49273609) - Bumped vite build targets [`5fe4763`](https://git.odit.services/lfk/frontend/commit/5fe47634e8980e77b65c05f213c475cf49273609)
- new license file version [CI SKIP] [`a659091`](https://git.odit.services/lfk/frontend/commit/a6590910cfdc5e91fba91c1bc9237e407ef15fd2) - new license file version [CI SKIP] [`a659091`](https://git.odit.services/lfk/frontend/commit/a6590910cfdc5e91fba91c1bc9237e407ef15fd2)
- Merge pull request 'feature/156-pdf_names' (#157) from feature/156-pdf_names into dev [`ad454c3`](https://git.odit.services/lfk/frontend/commit/ad454c386cbf11abc59d41d269d1a0ef7442c9ed) - Merge pull request 'feature/156-pdf_names' (#157) from feature/156-pdf_names into dev [`ad454c3`](https://git.odit.services/lfk/frontend/commit/ad454c386cbf11abc59d41d269d1a0ef7442c9ed)

View File

@@ -1,11 +1,11 @@
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16 as build FROM registry.odit.services/hub/library/node:19.7.0-alpine3.16 as build
WORKDIR /app WORKDIR /app
COPY package.json ./ COPY package.json ./
RUN npx pnpm i RUN npx pnpm i
COPY package.json *.config.js postcss.config.cjs tailwind.config.js vite.config.js index.html ./ COPY package.json pnpm-lock.yaml *.config.js postcss.config.cjs tailwind.config.js vite.config.js index.html ./
COPY src ./src COPY src ./src
COPY public ./public COPY public ./public
RUN yarn build RUN pnpm build
# final image # final image
FROM registry.odit.services/library/nginx-brotli:3.15 as final FROM registry.odit.services/library/nginx-brotli:3.15 as final
COPY --from=build /app/dist /usr/share/nginx/html COPY --from=build /app/dist /usr/share/nginx/html

View File

@@ -13,7 +13,7 @@
</head> </head>
<body> <body>
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.16.3-RELEASE_INFO</span> <span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.16.5-RELEASE_INFO</span>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
<script src="/env.js"></script> <script src="/env.js"></script>
<script type="module" src="/src/main.js"></script> <script type="module" src="/src/main.js"></script>

View File

@@ -1,6 +1,6 @@
{ {
"name": "@odit/lfk-frontend", "name": "@odit/lfk-frontend",
"version": "0.16.3", "version": "0.16.5",
"scripts": { "scripts": {
"i18n-order": "node order.js", "i18n-order": "node order.js",
"dev": "vite", "dev": "vite",
@@ -10,32 +10,19 @@
}, },
"license": "CC-BY-NC-SA-4.0", "license": "CC-BY-NC-SA-4.0",
"devDependencies": { "devDependencies": {
"@odit/lfk-client-js": "0.13.1", "@odit/lfk-client-js": "0.13.3",
"@odit/license-exporter": "0.0.11", "@odit/license-exporter": "0.0.12",
"@sveltejs/vite-plugin-svelte": "1.0.0-next.6", "@sveltejs/vite-plugin-svelte": "1.0.0-next.6",
"@types/html-minifier": "4.0.0", "@types/html-minifier": "4.0.2",
"@vincjo/datatables": "^1.1.0", "auto-changelog": "2.4.0",
"auto-changelog": "2.2.1", "autoprefixer": "10.4.14",
"autoprefixer": "10.2.5",
"check-password-strength": "2.0.2",
"csvtojson": "2.0.10",
"gridjs": "3.4.0",
"html-minifier": "4.0.0", "html-minifier": "4.0.0",
"localforage": "1.9.0", "postcss": "8.4.21",
"marked": "2.0.3", "release-it": "15.8.0",
"postcss": "8.2.10", "svelte": "3.56.0",
"release-it": "14.6.1",
"svelte": "3.37.0",
"svelte-focus-trap": "1.2.0",
"svelte-i18n": "3.3.9",
"svelte-preprocess": "4.7.0", "svelte-preprocess": "4.7.0",
"svelte-select": "3.17.0",
"tailwindcss": "3.2.7", "tailwindcss": "3.2.7",
"tinro": "0.6.1", "vite": "2.1.5"
"toastify-js": "1.10.0",
"validator": "13.5.2",
"vite": "2.1.5",
"xlsx": "0.16.9"
}, },
"release-it": { "release-it": {
"git": { "git": {
@@ -55,6 +42,22 @@
} }
}, },
"dependencies": { "dependencies": {
"@paralleldrive/cuid2": "^2.2.0" "@paralleldrive/cuid2": "^2.2.0",
"localforage": "1.10.0",
"tinro": "0.6.12",
"toastify-js": "1.12.0",
"svelte-focus-trap": "1.2.0",
"svelte-i18n": "3.6.0",
"svelte-select": "3.17.0",
"xlsx": "0.18.5",
"validator": "13.9.0",
"marked": "2.0.3",
"check-password-strength": "2.0.2",
"csvtojson": "2.0.10",
"gridjs": "3.4.0",
"@vincjo/datatables": "^1.4.0"
},
"volta": {
"node": "19.7.0"
} }
} }

3692
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -8,6 +8,7 @@
import CardDetailModal from "./CardDetailModal.svelte"; import CardDetailModal from "./CardDetailModal.svelte";
import GenerateRunnerCards from "../pdf_generation/GenerateRunnerCards.svelte"; import GenerateRunnerCards from "../pdf_generation/GenerateRunnerCards.svelte";
import ThFilterStatus from "./ThFilterStatus.svelte"; import ThFilterStatus from "./ThFilterStatus.svelte";
import ThFilterRunner from "./ThFilterRunner.svelte";
export let edit_modal_open = false; export let edit_modal_open = false;
export let runner = {}; export let runner = {};
export let editable = {}; export let editable = {};
@@ -54,7 +55,7 @@
bind:runner bind:runner
bind:editable bind:editable
bind:original_data bind:original_data
on:dataUpdated={(handler.setRows(current_cards))} on:dataUpdated={handler.setRows(current_cards)}
/> />
{/if} {/if}
@@ -78,7 +79,7 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th> <th style="border-bottom: 1px solid #ddd;">
<input <input
type="checkbox" type="checkbox"
class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded" class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded"
@@ -95,14 +96,14 @@
<Th {handler} orderBy="code">{$_("code")}</Th> <Th {handler} orderBy="code">{$_("code")}</Th>
<Th {handler} orderBy="runner">{$_("runner")}</Th> <Th {handler} orderBy="runner">{$_("runner")}</Th>
<Th {handler} orderBy="status">{$_("status")}</Th> <Th {handler} orderBy="status">{$_("status")}</Th>
<th>{$_("action")}</th> <th style="border-bottom: 1px solid #ddd;">{$_("action")}</th>
</tr> </tr>
<tr> <tr>
<th /> <th style="border-bottom: 1px solid #ddd;" />
<ThFilter {handler} filterBy="code" /> <ThFilter {handler} filterBy="code" />
<ThFilter {handler} filterBy="runner" /> <ThFilterRunner {handler} />
<ThFilterStatus {handler} /> <ThFilterStatus {handler} />
<th /> <th style="border-bottom: 1px solid #ddd;" />
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -0,0 +1,57 @@
<script>
export let handler;
let filterValue = "";
</script>
<th>
<input
on:input={() => {
setTimeout(() => {
const v = filterValue.toLowerCase();
handler.filter(v, (c) => {
// if (v === "") {
// return c;
// }
if (!c.runner && v === "blanko") {
return "blanko";
}
if (v.startsWith("#")) {
return `#${c.runner?.id}`;
}
if (c.runner) {
let runnerName = `${c.runner.firstname} ${c.runner.lastname}`;
if (c.runner.middlename) {
runnerName = `${c.runner.firstname} ${c.runner.middlename} ${c.runner.lastname}`;
}
runnerName = runnerName.toLowerCase();
return runnerName;
}
return "";
});
}, 150);
}}
bind:value={filterValue}
type="text"
name="runnerfilter"
id="runnerfilter"
/>
</th>
<style>
th {
border-bottom: 1px solid #e0e0e0;
}
input {
margin: -1px 0 0 0;
padding: 0;
width: 100%;
height: 24px;
border: none;
text-align: center;
background: inherit;
outline: 0;
font-size: 14px;
}
</style>

View File

@@ -9,11 +9,10 @@
on:input={() => { on:input={() => {
setTimeout(() => { setTimeout(() => {
if (`${selected}`.trim()) { if (`${selected}`.trim()) {
if(selected==="all"){ if (selected === "all") {
handler.filter('', 'enabled') handler.filter("", "enabled");
} } else {
else{ handler.filter(selected, "enabled");
handler.filter(selected, 'enabled')
} }
} }
}, 50); }, 50);
@@ -22,8 +21,25 @@
name="statusfilter" name="statusfilter"
id="statusfilter" id="statusfilter"
> >
<option value="all">{$_('all')}</option> <option value="all">{$_("all")}</option>
<option value="true">{$_("enabled")}</option> <option value="true">{$_("enabled")}</option>
<option value="false">{$_("disabled")}</option> <option value="false">{$_("disabled")}</option>
</select> </select>
</th> </th>
<style>
th {
border-bottom: 1px solid #e0e0e0;
}
select {
margin: -1px 0 0 0;
padding: 0;
width: 100%;
height: 24px;
border: none;
text-align: center;
background: inherit;
outline: 0;
font-size: 14px;
}
</style>

View File

@@ -326,14 +326,14 @@
<div class="flex items-center h-5"> <div class="flex items-center h-5">
<input <input
bind:checked={editable.registrationEnabled} bind:checked={editable.registrationEnabled}
id="comments" id="toggle_selfservice_feature"
name="comments" name="toggle_selfservice_feature"
type="checkbox" type="checkbox"
class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded" /> class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded" />
</div> </div>
<div class="ml-3 text-sm"> <div class="ml-3 text-sm">
<label <label
for="comments" for="toggle_selfservice_feature"
class="font-medium text-gray-700">{$_('selfservice-registration')}</label> class="font-medium text-gray-700">{$_('selfservice-registration')}</label>
</div> </div>
</div> </div>
@@ -375,14 +375,14 @@
<div class="flex items-center h-5"> <div class="flex items-center h-5">
<input <input
bind:checked={editable.address_checked} bind:checked={editable.address_checked}
id="comments" id="toggle_address_checkbox"
name="comments" name="toggle_address_checkbox"
type="checkbox" type="checkbox"
class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded" /> class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded" />
</div> </div>
<div class="ml-3 text-sm"> <div class="ml-3 text-sm">
<label <label
for="comments" for="toggle_address_checkbox"
class="font-medium text-gray-700">{$_('address')}</label> class="font-medium text-gray-700">{$_('address')}</label>
</div> </div>
</div> </div>

View File

@@ -73,7 +73,7 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th> <th style="border-bottom: 1px solid #ddd;">
<input <input
type="checkbox" type="checkbox"
class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded" class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded"
@@ -91,19 +91,19 @@
<Th {handler} orderBy="firstname">First Name</Th> <Th {handler} orderBy="firstname">First Name</Th>
<Th {handler} orderBy="middlename">Middle Name</Th> <Th {handler} orderBy="middlename">Middle Name</Th>
<Th {handler} orderBy="lastname">Last Name</Th> <Th {handler} orderBy="lastname">Last Name</Th>
<th>Gruppe</th> <th style="border-bottom: 1px solid #ddd;">Gruppe</th>
<Th {handler} orderBy="distance">Distanz</Th> <Th {handler} orderBy="distance">Distanz</Th>
<th>{$_("action")}</th> <th style="border-bottom: 1px solid #ddd;">{$_("action")}</th>
</tr> </tr>
<tr> <tr>
<th /> <th style="border-bottom: 1px solid #ddd;" />
<ThFilter {handler} filterBy="id" /> <ThFilter {handler} filterBy="id" />
<ThFilter {handler} filterBy="firstname" /> <ThFilter {handler} filterBy="firstname" />
<ThFilter {handler} filterBy="middlename" /> <ThFilter {handler} filterBy="middlename" />
<ThFilter {handler} filterBy="lastname" /> <ThFilter {handler} filterBy="lastname" />
<ThFilterGroup groups={selectgroups} {handler} /> <ThFilterGroup groups={selectgroups} {handler} />
<th /> <th style="border-bottom: 1px solid #ddd;" />
<th /> <th style="border-bottom: 1px solid #ddd;" />
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -82,14 +82,6 @@
<tr data-rowid="user_{u.id}"> <tr data-rowid="user_{u.id}">
<td class="px-6 py-4 whitespace-nowrap"> <td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center"> <div class="flex items-center">
{#if u.profilePic}
<div class="flex-shrink-0 h-10 w-10">
<img
class="h-10 w-10 rounded-full"
src={u.profilePic}
alt="" />
</div>
{/if}
<div class="ml-4"> <div class="ml-4">
<div class="text-sm font-medium text-gray-900"> <div class="text-sm font-medium text-gray-900">
{u.firstname} {u.firstname}