Compare commits
11 Commits
83f19a7572
...
0.3.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 64ade901de | |||
| eb0dd3f781 | |||
| 66e6cd80d3 | |||
| 42851686ca | |||
| e3943d868a | |||
| 7654b795c7 | |||
| 489244f1a9 | |||
| cbcce336d6 | |||
| 52a96b2a4f | |||
| ce6002a631 | |||
| 84a9cf069a |
29
CHANGELOG.md
29
CHANGELOG.md
@@ -2,11 +2,40 @@
|
|||||||
|
|
||||||
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.3.1](https://git.odit.services/lfk/frontend/compare/0.3.0...0.3.1)
|
||||||
|
|
||||||
|
- Merge pull request 'feature/16-org-management' (#35) from feature/16-org-management into dev [`#16`](https://git.odit.services/lfk/frontend/issues/16)
|
||||||
|
- 🏃♂️🏃♂️🏃♂️ basic UI components for team management [`d87b879`](https://git.odit.services/lfk/frontend/commit/d87b879cc3d6c771a8a9932409e39068e1b2acdb)
|
||||||
|
- ✨ TeamDetail with edit,delete [`ccf09f9`](https://git.odit.services/lfk/frontend/commit/ccf09f97d5fb476113f24a9559a48bccd75fd0a5)
|
||||||
|
- 🔒 ConfirmTeamDeletion in TeamsOverview [`cbcce33`](https://git.odit.services/lfk/frontend/commit/cbcce336d68b0752daeaf4b5608c43ff6fa11c0d)
|
||||||
|
- 🔒 ConfirmOrgDeletion in OrgDetail [`d890112`](https://git.odit.services/lfk/frontend/commit/d8901126d0cc91cabe3b94a30a83f36e6288126d)
|
||||||
|
- ✨ basic TeamsOverview [`597e9e1`](https://git.odit.services/lfk/frontend/commit/597e9e1ea9da7c73bdcb8ef1ae1a13dfa68ff5a3)
|
||||||
|
- ✨ UX - ConfirmOrgDeletion cancel event reflection in datatable [`84a9cf0`](https://git.odit.services/lfk/frontend/commit/84a9cf069a4aa0940eaacc87ea67e745deabe939)
|
||||||
|
- 🧹 Dashboard - drop header bar [`f1833f1`](https://git.odit.services/lfk/frontend/commit/f1833f13d57595c23abf29bce1a2795cbb05a116)
|
||||||
|
- 🤝 attribution/ credits for icons and illustrations [`eb0dd3f`](https://git.odit.services/lfk/frontend/commit/eb0dd3f781f739c6511588a8e153c14a39096025)
|
||||||
|
- ✨ added new empty states [`66e6cd8`](https://git.odit.services/lfk/frontend/commit/66e6cd80d39ef18a29fd8ac80fbac929bd0c4f8c)
|
||||||
|
- Merge pull request 'feature/14-team-management' (#36) from feature/14-team-management into dev [`4285168`](https://git.odit.services/lfk/frontend/commit/42851686caae69e6672f48cd7df77ee4c2e49092)
|
||||||
|
- 🐞 fix Dashboard sidebar responsiveness [`6a81e36`](https://git.odit.services/lfk/frontend/commit/6a81e369fa20f0bb2846365a45f96e91e95fe2e7)
|
||||||
|
- ✨ AddTeamModal working [`9bb027e`](https://git.odit.services/lfk/frontend/commit/9bb027ec4c73483907d396180f739dc3a11b2404)
|
||||||
|
- 🧹 TeamDetail cleanup [`7654b79`](https://git.odit.services/lfk/frontend/commit/7654b795c756ca198bad77068823032714408535)
|
||||||
|
- 🔒 re-enable confirmation in OrgOverview [`ce6002a`](https://git.odit.services/lfk/frontend/commit/ce6002a631dd3c140f3892c750d052e89c135653)
|
||||||
|
- 🧹 TeamsOverview - formatting [`6870a7f`](https://git.odit.services/lfk/frontend/commit/6870a7f9b1fce2f06182dafa502f6dc4bb818bd3)
|
||||||
|
- 🔒 ConfirmOrgDeletion in OrgOverview [`83f19a7`](https://git.odit.services/lfk/frontend/commit/83f19a7572255b5c095c68d688a963dbe3cf4a75)
|
||||||
|
- 🧹 Team cleanups [`07f2e65`](https://git.odit.services/lfk/frontend/commit/07f2e65fc722c0328ee5a8dc4d01fc89c906fa86)
|
||||||
|
- 🔒 ConfirmTeamDeletion in TeamDetail [`489244f`](https://git.odit.services/lfk/frontend/commit/489244f1a9636b9807e751073443f1c767f7b8ca)
|
||||||
|
- 🐞 fix deletion in TeamDetail + TeamsOverview [`e3943d8`](https://git.odit.services/lfk/frontend/commit/e3943d868a6131ea561c4000159b77ff70a4af8b)
|
||||||
|
- 🐞 fix component mount in TeamsEmptyState [`ace1a1b`](https://git.odit.services/lfk/frontend/commit/ace1a1b06379d922df2593c3a7aec77d5f958512)
|
||||||
|
- new license file version [CI SKIP] [`aaec5a3`](https://git.odit.services/lfk/frontend/commit/aaec5a3fc94e13c6d29ea16ab110151aa6dc1156)
|
||||||
|
- 🧹 drop tmp modification from UsersOverview [`854db4e`](https://git.odit.services/lfk/frontend/commit/854db4ece8388a70b8a50c5b4c7ce9be974a2616)
|
||||||
|
|
||||||
#### [0.3.0](https://git.odit.services/lfk/frontend/compare/0.2.1...0.3.0)
|
#### [0.3.0](https://git.odit.services/lfk/frontend/compare/0.2.1...0.3.0)
|
||||||
|
|
||||||
|
> 15 January 2021
|
||||||
|
|
||||||
- Merge pull request 'feature/16-org-management' (#32) from feature/16-org-management into dev [`#16`](https://git.odit.services/lfk/frontend/issues/16)
|
- Merge pull request 'feature/16-org-management' (#32) from feature/16-org-management into dev [`#16`](https://git.odit.services/lfk/frontend/issues/16)
|
||||||
- Merge commit 'fcd657c10ea14290455cfb0bf2de89375a664143' into dev [`#31`](https://git.odit.services/lfk/frontend/issues/31)
|
- Merge commit 'fcd657c10ea14290455cfb0bf2de89375a664143' into dev [`#31`](https://git.odit.services/lfk/frontend/issues/31)
|
||||||
- ✨ added Org base components [`bdc0de6`](https://git.odit.services/lfk/frontend/commit/bdc0de6adab2db95e6075a993bd50317e9e36eb5)
|
- ✨ added Org base components [`bdc0de6`](https://git.odit.services/lfk/frontend/commit/bdc0de6adab2db95e6075a993bd50317e9e36eb5)
|
||||||
|
- 🚀RELEASE v0.3.0 [`7cd24cd`](https://git.odit.services/lfk/frontend/commit/7cd24cd51d52efff22f4ee0817f2d89f6efb35ed)
|
||||||
- 🏬 OrgDetail ui [`7a09869`](https://git.odit.services/lfk/frontend/commit/7a09869b0ca9d5dd38cf0c0010b71ab9ce6c6f40)
|
- 🏬 OrgDetail ui [`7a09869`](https://git.odit.services/lfk/frontend/commit/7a09869b0ca9d5dd38cf0c0010b71ab9ce6c6f40)
|
||||||
- 🏁 finish basic functionality of AddOrgModal + OrgDetail [`9324925`](https://git.odit.services/lfk/frontend/commit/93249258c6b0f34da22f0ed5d290b437d221a8fd)
|
- 🏁 finish basic functionality of AddOrgModal + OrgDetail [`9324925`](https://git.odit.services/lfk/frontend/commit/93249258c6b0f34da22f0ed5d290b437d221a8fd)
|
||||||
- ✨ basic functionality in OrgDetail [`0e2a10f`](https://git.odit.services/lfk/frontend/commit/0e2a10fe94075b3cda8ef3ebae6a6159a2e6bbf9)
|
- ✨ basic functionality in OrgDetail [`0e2a10f`](https://git.odit.services/lfk/frontend/commit/0e2a10fe94075b3cda8ef3ebae6a6159a2e6bbf9)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@odit/lfk-frontend",
|
"name": "@odit/lfk-frontend",
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"i18n-order": "node order.js",
|
"i18n-order": "node order.js",
|
||||||
"dev": "snowpack dev",
|
"dev": "snowpack dev",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.3.0-RELEASE_INFO</span>
|
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.3.1-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 defer type="module" src="/_dist_/index.js"></script>
|
<script defer type="module" src="/_dist_/index.js"></script>
|
||||||
|
|||||||
@@ -163,7 +163,35 @@
|
|||||||
</div>
|
</div>
|
||||||
{/await}
|
{/await}
|
||||||
</div>
|
</div>
|
||||||
<h2 class="text-4xl font-display font-semibold md:text-5xl">{$_('faq')}</h2>
|
<div class="w-full leading-8 mt-8">
|
||||||
|
<p class="text-xl font-medium">{$_('icon-image-credits')}</p>
|
||||||
|
<ul class="list-disc">
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
class="underline"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
href="https://storyset.com">https://storyset.com</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
class="underline"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
href="https://undraw.co">https://undraw.co</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
class="underline"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
href="https://remixicon.com">https://remixicon.com</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<h2 class="mt-4 text-4xl font-display font-semibold md:text-5xl">
|
||||||
|
{$_('faq')}
|
||||||
|
</h2>
|
||||||
<div class="mt-6 border-t-2 border-gray-100 pt-10">
|
<div class="mt-6 border-t-2 border-gray-100 pt-10">
|
||||||
<dl class="md:grid md:grid-cols-2 md:gap-8">
|
<dl class="md:grid md:grid-cols-2 md:gap-8">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -4,8 +4,14 @@
|
|||||||
import { focusTrap } from "svelte-focus-trap";
|
import { focusTrap } from "svelte-focus-trap";
|
||||||
import { RunnerOrganisationService } from "@odit/lfk-client-js";
|
import { RunnerOrganisationService } from "@odit/lfk-client-js";
|
||||||
import Toastify from "toastify-js";
|
import Toastify from "toastify-js";
|
||||||
|
import { createEventDispatcher } from "svelte";
|
||||||
export let modal_open;
|
export let modal_open;
|
||||||
export let delete_org;
|
export let delete_org;
|
||||||
|
const dispatch = createEventDispatcher();
|
||||||
|
function cancelDelete() {
|
||||||
|
modal_open = false;
|
||||||
|
dispatch("cancelDelete", { id: delete_org.id });
|
||||||
|
}
|
||||||
function deleteOrg() {
|
function deleteOrg() {
|
||||||
RunnerOrganisationService.runnerOrganisationControllerRemove(
|
RunnerOrganisationService.runnerOrganisationControllerRemove(
|
||||||
delete_org.id,
|
delete_org.id,
|
||||||
@@ -30,9 +36,7 @@
|
|||||||
class="fixed z-10 inset-0 overflow-y-auto"
|
class="fixed z-10 inset-0 overflow-y-auto"
|
||||||
use:focusTrap
|
use:focusTrap
|
||||||
use:clickOutside
|
use:clickOutside
|
||||||
on:click_outside={() => {
|
on:click_outside={cancelDelete}>
|
||||||
modal_open = false;
|
|
||||||
}}>
|
|
||||||
<div
|
<div
|
||||||
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
|
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
|
||||||
@@ -84,9 +88,7 @@
|
|||||||
Confirm, delete organization and associated teams+runners.
|
Confirm, delete organization and associated teams+runners.
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={cancelDelete}
|
||||||
modal_open = false;
|
|
||||||
}}
|
|
||||||
type="button"
|
type="button"
|
||||||
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
|
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
|
||||||
Cancel, keep organization
|
Cancel, keep organization
|
||||||
|
|||||||
97
src/components/ConfirmTeamDeletion.svelte
Normal file
97
src/components/ConfirmTeamDeletion.svelte
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
<script>
|
||||||
|
import { _ } from "svelte-i18n";
|
||||||
|
import { clickOutside } from "./outsideclick";
|
||||||
|
import { focusTrap } from "svelte-focus-trap";
|
||||||
|
import { RunnerTeamService } from "@odit/lfk-client-js";
|
||||||
|
import Toastify from "toastify-js";
|
||||||
|
import { createEventDispatcher } from "svelte";
|
||||||
|
export let modal_open;
|
||||||
|
export let delete_team;
|
||||||
|
const dispatch = createEventDispatcher();
|
||||||
|
function cancelDelete() {
|
||||||
|
modal_open = false;
|
||||||
|
dispatch("cancelDelete", { id: delete_team.id });
|
||||||
|
}
|
||||||
|
function deleteTeam() {
|
||||||
|
RunnerTeamService.runnerTeamControllerRemove(delete_team.id, true)
|
||||||
|
.then((resp) => {
|
||||||
|
Toastify({
|
||||||
|
text: "Team deleted",
|
||||||
|
duration: 500,
|
||||||
|
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||||
|
}).showToast();
|
||||||
|
location.replace("./");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
//
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if modal_open}
|
||||||
|
<div
|
||||||
|
class="fixed z-10 inset-0 overflow-y-auto"
|
||||||
|
use:focusTrap
|
||||||
|
use:clickOutside
|
||||||
|
on:click_outside={cancelDelete}>
|
||||||
|
<div
|
||||||
|
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
|
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
|
||||||
|
<div
|
||||||
|
class="absolute inset-0 bg-gray-500 opacity-75"
|
||||||
|
data-id="modal_backdrop" />
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="hidden sm:inline-block sm:align-middle sm:h-screen"
|
||||||
|
aria-hidden="true">​</span>
|
||||||
|
<div
|
||||||
|
class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"
|
||||||
|
role="dialog"
|
||||||
|
aria-modal="true"
|
||||||
|
aria-labelledby="modal-headline">
|
||||||
|
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
|
||||||
|
<div class="sm:flex sm:items-start">
|
||||||
|
<div
|
||||||
|
class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-100 sm:mx-0 sm:h-10 sm:w-10">
|
||||||
|
<svg
|
||||||
|
class="h-6 w-6 text-blue-600"
|
||||||
|
fill="currentColor"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 640 512"><path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z" /></svg>
|
||||||
|
</div>
|
||||||
|
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
|
||||||
|
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
||||||
|
Attention!
|
||||||
|
</h3>
|
||||||
|
<div class="mt-2 mb-6">
|
||||||
|
<p class="text-sm text-gray-500">
|
||||||
|
Do you want to delete the team
|
||||||
|
{delete_team.name}?<br />All associated runners will be
|
||||||
|
deleted too!
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
|
||||||
|
<button
|
||||||
|
on:click={deleteTeam}
|
||||||
|
type="button"
|
||||||
|
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm">
|
||||||
|
Confirm, delete team and associated runners.
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
on:click={cancelDelete}
|
||||||
|
type="button"
|
||||||
|
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
|
||||||
|
Cancel, keep team
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
@@ -22,22 +22,22 @@
|
|||||||
let modal_open = false;
|
let modal_open = false;
|
||||||
let delete_org = {};
|
let delete_org = {};
|
||||||
function deleteOrganisation() {
|
function deleteOrganisation() {
|
||||||
RunnerOrganisationService.runnerOrganisationControllerRemove(
|
// RunnerOrganisationService.runnerOrganisationControllerRemove(
|
||||||
original.id,
|
// original.id,
|
||||||
false
|
// false
|
||||||
)
|
// )
|
||||||
.then((resp) => {
|
// .then((resp) => {
|
||||||
Toastify({
|
// Toastify({
|
||||||
text: "Organization deleted",
|
// text: "Organization deleted",
|
||||||
duration: 500,
|
// duration: 500,
|
||||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
// backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||||
}).showToast();
|
// }).showToast();
|
||||||
location.replace("./");
|
// location.replace("./");
|
||||||
})
|
// })
|
||||||
.catch((err) => {
|
// .catch((err) => {
|
||||||
modal_open = true;
|
modal_open = true;
|
||||||
delete_org = original;
|
delete_org = original;
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
function submit() {
|
function submit() {
|
||||||
if (data_loaded === true && save_enabled) {
|
if (data_loaded === true && save_enabled) {
|
||||||
|
|||||||
@@ -19,7 +19,13 @@
|
|||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ConfirmOrgDeletion bind:modal_open bind:delete_org />
|
<ConfirmOrgDeletion
|
||||||
|
on:cancelDelete={(event) => {
|
||||||
|
modal_open = false;
|
||||||
|
active_deletes[event.detail.id] = false;
|
||||||
|
}}
|
||||||
|
bind:modal_open
|
||||||
|
bind:delete_org />
|
||||||
{#if store.state.jwtinfo.userdetails.permissions.includes('ORGANISATION:GET')}
|
{#if store.state.jwtinfo.userdetails.permissions.includes('ORGANISATION:GET')}
|
||||||
{#await promise}
|
{#await promise}
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import { _ } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
import AddOrgModal from "./AddOrgModal.svelte";
|
import AddOrgModal from "./AddOrgModal.svelte";
|
||||||
|
import org_empty from "./org_empty.svg";
|
||||||
let modal_open = false;
|
let modal_open = false;
|
||||||
let current_organizations = [];
|
let current_organizations = [];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="text-center items-center justify-center">
|
<div class="text-center items-center justify-center">
|
||||||
<p class="mb-16 text-lg text-gray-500">
|
<p class="mb-16 text-lg text-gray-500">
|
||||||
|
<img class="w-full h-44" src={org_empty} alt="" />
|
||||||
<span class="font-bold">There are no organizations added yet.</span><br />
|
<span class="font-bold">There are no organizations added yet.</span><br />
|
||||||
<span>Add your first organization</span>
|
<span>Add your first organization</span>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { _ } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
|
import RunnersEmptyState from "./RunnersEmptyState.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section class="container p-5">
|
<section class="container p-5">
|
||||||
@@ -8,3 +9,4 @@
|
|||||||
</span>
|
</span>
|
||||||
<p class="mb-8 text-lg text-gray-500">läuft bei ihnen</p>
|
<p class="mb-8 text-lg text-gray-500">läuft bei ihnen</p>
|
||||||
</section>
|
</section>
|
||||||
|
<RunnersEmptyState />
|
||||||
|
|||||||
16
src/components/RunnersEmptyState.svelte
Normal file
16
src/components/RunnersEmptyState.svelte
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<script>
|
||||||
|
import { _ } from "svelte-i18n";
|
||||||
|
// import AddUserModal from "./AddUserModal.svelte";
|
||||||
|
import runners_empty from "./runners_empty.svg";
|
||||||
|
// let modal_open = false;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="text-center items-center justify-center">
|
||||||
|
<p class="mb-16 text-lg text-gray-500">
|
||||||
|
<img class="w-full h-44" src={runners_empty} alt="" />
|
||||||
|
<span class="font-bold">There are no runners added yet.</span><br />
|
||||||
|
<span>Add your first runner</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <AddUserModal bind:modal_open /> -->
|
||||||
@@ -7,13 +7,20 @@
|
|||||||
import Toastify from "toastify-js";
|
import Toastify from "toastify-js";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
import PromiseError from "./PromiseError.svelte";
|
import PromiseError from "./PromiseError.svelte";
|
||||||
|
import ConfirmTeamDeletion from "./ConfirmTeamDeletion.svelte";
|
||||||
|
export let params;
|
||||||
|
let [teamdata, original, delete_team, orgs, modal_open] = [
|
||||||
|
{},
|
||||||
|
{},
|
||||||
|
{},
|
||||||
|
[],
|
||||||
|
false,
|
||||||
|
];
|
||||||
$: delete_triggered = false;
|
$: delete_triggered = false;
|
||||||
$: save_enabled = !data_changed;
|
$: save_enabled = !data_changed;
|
||||||
export let params;
|
|
||||||
let teamdata = {};
|
|
||||||
let original = {};
|
|
||||||
$: data_loaded = false;
|
$: data_loaded = false;
|
||||||
$: data_changed = JSON.stringify(teamdata) === JSON.stringify(original);
|
$: data_changed = JSON.stringify(teamdata) === JSON.stringify(original);
|
||||||
|
//
|
||||||
const promise = RunnerTeamService.runnerTeamControllerGetOne(
|
const promise = RunnerTeamService.runnerTeamControllerGetOne(
|
||||||
params.teamid
|
params.teamid
|
||||||
).then((value) => {
|
).then((value) => {
|
||||||
@@ -21,22 +28,23 @@
|
|||||||
teamdata = Object.assign(teamdata, value);
|
teamdata = Object.assign(teamdata, value);
|
||||||
original = Object.assign(original, value);
|
original = Object.assign(original, value);
|
||||||
});
|
});
|
||||||
$: orgs = [];
|
RunnerOrganisationService.runnerOrganisationControllerGetAll().then((val) => {
|
||||||
const orgs_promise = RunnerOrganisationService.runnerOrganisationControllerGetAll().then(
|
orgs = val;
|
||||||
(val) => {
|
});
|
||||||
console.log(val);
|
|
||||||
orgs = val;
|
|
||||||
val.forEach((t) => {
|
|
||||||
console.log(t.name);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
function deleteTeam() {
|
function deleteTeam() {
|
||||||
RunnerTeamService.runnerTeamControllerRemove(original.id, true)
|
RunnerTeamService.runnerTeamControllerRemove(original.id, false)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
|
Toastify({
|
||||||
|
text: "Organization deleted",
|
||||||
|
duration: 500,
|
||||||
|
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||||
|
}).showToast();
|
||||||
location.replace("./");
|
location.replace("./");
|
||||||
})
|
})
|
||||||
.catch((err) => {});
|
.catch((err) => {
|
||||||
|
modal_open = true;
|
||||||
|
delete_team = original;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
function submit() {
|
function submit() {
|
||||||
if (data_loaded === true && save_enabled) {
|
if (data_loaded === true && save_enabled) {
|
||||||
@@ -63,6 +71,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<ConfirmTeamDeletion bind:modal_open bind:delete_team />
|
||||||
{#if data_loaded}
|
{#if data_loaded}
|
||||||
<section class="container p-5">
|
<section class="container p-5">
|
||||||
<div class="mb-8 text-3xl font-extrabold leading-tight">
|
<div class="mb-8 text-3xl font-extrabold leading-tight">
|
||||||
@@ -193,13 +202,17 @@
|
|||||||
name="contact"
|
name="contact"
|
||||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 dark:bg-gray-900 dark:text-gray-100 rounded-md p-2" />
|
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 dark:bg-gray-900 dark:text-gray-100 rounded-md p-2" />
|
||||||
</div>
|
</div>
|
||||||
<select
|
<div class="text-sm w-full">
|
||||||
bind:value={teamdata.parentGroup}
|
<label for="org" class="font-medium text-gray-700">Parent Organization</label>
|
||||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 dark:bg-gray-900 dark:text-gray-100 rounded-md p-2">
|
<select
|
||||||
{#each orgs as o}
|
name="org"
|
||||||
<option value={o.id}>{o.name}</option>
|
bind:value={teamdata.parentGroup}
|
||||||
{/each}
|
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 dark:bg-gray-900 dark:text-gray-100 rounded-md p-2">
|
||||||
</select>
|
{#each orgs as o}
|
||||||
|
<option value={o.id}>{o.name}</option>
|
||||||
|
{/each}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{:else}
|
{:else}
|
||||||
{#await promise}
|
{#await promise}
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import { _ } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
import AddTeamModal from "./AddTeamModal.svelte";
|
import AddTeamModal from "./AddTeamModal.svelte";
|
||||||
|
import team_empty from "./team_empty.svg";
|
||||||
let modal_open = false;
|
let modal_open = false;
|
||||||
let current_teams = [];
|
let current_teams = [];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="text-center items-center justify-center">
|
<div class="text-center items-center justify-center">
|
||||||
<p class="mb-16 text-lg text-gray-500">
|
<p class="mb-16 text-lg text-gray-500">
|
||||||
|
<img class="w-full h-44" src={team_empty} alt="" />
|
||||||
<span class="font-bold">There are no teams added yet.</span><br />
|
<span class="font-bold">There are no teams added yet.</span><br />
|
||||||
<span>Add your first team</span>
|
<span>Add your first team</span>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -7,9 +7,12 @@
|
|||||||
import { users as usersstore } from "../store.js";
|
import { users as usersstore } from "../store.js";
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
import TeamsEmptyState from "./TeamsEmptyState.svelte";
|
import TeamsEmptyState from "./TeamsEmptyState.svelte";
|
||||||
|
import ConfirmTeamDeletion from "./ConfirmTeamDeletion.svelte";
|
||||||
$: searchvalue = "";
|
$: searchvalue = "";
|
||||||
$: active_deletes = [];
|
$: active_deletes = [];
|
||||||
export let current_teams = [];
|
export let current_teams = [];
|
||||||
|
let modal_open = false;
|
||||||
|
let delete_team = {};
|
||||||
usersstore.subscribe((val) => {
|
usersstore.subscribe((val) => {
|
||||||
current_teams = val;
|
current_teams = val;
|
||||||
});
|
});
|
||||||
@@ -18,6 +21,13 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<ConfirmTeamDeletion
|
||||||
|
on:cancelDelete={(event) => {
|
||||||
|
modal_open = false;
|
||||||
|
active_deletes[event.detail.id] = false;
|
||||||
|
}}
|
||||||
|
bind:modal_open
|
||||||
|
bind:delete_team />
|
||||||
{#if store.state.jwtinfo.userdetails.permissions.includes('TEAM:GET')}
|
{#if store.state.jwtinfo.userdetails.permissions.includes('TEAM:GET')}
|
||||||
{#await teams_promise}
|
{#await teams_promise}
|
||||||
<div
|
<div
|
||||||
@@ -114,12 +124,19 @@
|
|||||||
Delete</button>
|
Delete</button>
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
RunnerTeamService.runnerTeamControllerRemove(t.id, true)
|
RunnerTeamService.runnerTeamControllerRemove(t.id, false)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
current_teams = current_teams.filter((obj) => obj.id !== t.id);
|
current_teams = current_teams.filter((obj) => obj.id !== t.id);
|
||||||
|
Toastify({
|
||||||
|
text: 'Organization deleted',
|
||||||
|
duration: 500,
|
||||||
|
backgroundColor:
|
||||||
|
'linear-gradient(to right, #00b09b, #96c93d)',
|
||||||
|
}).showToast();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
// error deleting user
|
modal_open = true;
|
||||||
|
delete_team = t;
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
|||||||
1
src/components/org_empty.svg
Normal file
1
src/components/org_empty.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 25 KiB |
1
src/components/runners_empty.svg
Normal file
1
src/components/runners_empty.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 854.63 686"><path fill="#3f3d56" d="M0 600h821v9.053H0zM0 676.947h821V686H0z"/><path d="M750.178 608.328c-.49-.802-12.06-20.12-16.071-60.234-3.68-36.802-1.313-98.836 30.858-185.367 60.947-163.928-14.046-296.194-14.812-297.512l3.7-2.146c.194.334 19.545 34.057 30.977 87.755a382.846 382.846 0 01-15.856 213.394c-60.844 163.648-15.61 241.118-15.146 241.882z" fill="#3f3d56"/><circle cx="726.346" cy="27.795" r="27.795" fill="#3f3d56"/><circle cx="814.007" cy="130.422" r="27.795" fill="#3f3d56"/><circle cx="754.141" cy="198.841" r="27.795" fill="#dfe5ee"/><circle cx="826.835" cy="256.569" r="27.795" fill="#dfe5ee"/><circle cx="732.76" cy="346.368" r="27.795" fill="#3f3d56"/><path d="M766.97 609.35s-27.796-68.418 55.59-119.731zM732.786 608.11s-12.65-72.758-110.557-72.134z" fill="#3f3d56"/><circle cx="136.5" cy="387.5" r="41" fill="#a0616a"/><path d="M143.928 336.504c-7.84-1.925-16.272-2.247-23.868.49-7.824 2.817-14.263 8.708-19 15.542s-7.918 14.613-10.767 22.425a78.442 78.442 0 00-3.845 13.14 44.992 44.992 0 008.167 34.325c-1.2-3.166 1.822-6.617 5.138-7.303s6.693.474 9.963 1.353a61.559 61.559 0 0017.68 2.078c2.284-.065 4.679-.295 6.578-1.565 5.952-3.98 2.802-14.263 7.754-19.434 1.767-1.845 4.29-2.708 6.567-3.865 8.2-4.167 13.604-12.576 16.156-21.413 1.599-5.54 5.567-21.45 2.185-26.598-3.057-4.653-17.516-7.9-22.708-9.175z" fill="#2f2e41"/><path d="M248.066 342.291a24.396 24.396 0 00-18.677 1.041c-10.695 5.016-29.608 17.167-28.889 40.168 1 32 12 53 12 53l-2 65-10 118s-49 40-30 50 51-48 51-48l25-67 9-65s15-68 0-98c0 0 17.328-40.17-7.434-49.209zM367.5 445.5s-17 72 43 92 139 54 139 54l10 17 23-31-4-24-39-11s-73-56-105-60l4-37zM527.307 387.717L548.5 422.5s70 40 88 67 61 56 61 56l-19 45s-54-63-77-69-125-88-125-88z" fill="#a0616a"/><path d="M338.568 265.819c-7.805 1.226-15.617 2.454-23.33 4.174-17.917 3.995-35.147 10.616-51.966 17.974a608.405 608.405 0 00-68.447 35.267 132.255 132.255 0 00-16.97 11.523c-3.559 2.964-6.91 6.363-8.82 10.584a33.406 33.406 0 00-2.33 9.221c-1.55 11.12-1.477 22.595 1.535 33.41s9.124 20.955 18.119 27.674a29.88 29.88 0 007.84 4.348 45.675 45.675 0 0011.675 1.957c12.617 1.003 25.798 1.923 37.474-2.964 7.42-3.105 13.701-8.354 20.528-12.607 28.913-18.008 65.646-17.241 97.26-29.92 3.074-1.233 6.204-2.67 8.354-5.189a22.578 22.578 0 003.62-7.187l11.99-33.188c2.533-7.01 5.067-14.023 7.193-21.167 2.224-7.472 3.996-15.07 5.766-22.661 1.524-6.534 3.093-13.376 2.507-20.13-.864-9.962-3.166-10.367-12.316-8.925q-24.839 3.915-49.682 7.806z" fill="#dfe5ee"/><path d="M218.066 342.291a24.396 24.396 0 00-18.677 1.041c-10.695 5.016-29.608 17.167-28.889 40.168 1 32 12 53 12 53l-2 65-10 118s-49 40-30 50 51-48 51-48l25-67 9-65s15-68 0-98c0 0 17.328-40.17-7.434-49.209z" fill="#a0616a"/><path d="M391.66 257.544S480.5 249.5 476.5 304.5s-34 150-34 150l-77 4s-10-65 4-87z" fill="#2f2e41"/><path d="M453.5 275.5s22 14 34 42 48 83 48 83l-59 42-44-45zM559.5 587.5s-19 7-6 21a126.61 126.61 0 0120 29s-4 26 13 25 24-36 20-48-9-69-9-69-35 3-34 8 6 30-4 34zM678.5 567.5s-18 9-13 17 21 31 21 31-6 30 11 33 27-36 24-44-3-39-3-39 1-31-9-31-27 4-27 4 4 28-4 29z" fill="#2f2e41"/><path fill="#dfe5ee" d="M96 617.871h29v50.612H96z"/></svg>
|
||||||
|
After Width: | Height: | Size: 3.2 KiB |
1
src/components/team_empty.svg
Normal file
1
src/components/team_empty.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 52 KiB |
@@ -26,6 +26,7 @@
|
|||||||
"general-stats": "Allgemeine Statistiken",
|
"general-stats": "Allgemeine Statistiken",
|
||||||
"goback": "Zur Startseite",
|
"goback": "Zur Startseite",
|
||||||
"hallo": "hallo",
|
"hallo": "hallo",
|
||||||
|
"icon-image-credits": "Wir möchten uns außerdem für die verwendeten Icons und Bilder bedanken bei:",
|
||||||
"invalid-mail-reset": "Das ist keine gültige E-Mail",
|
"invalid-mail-reset": "Das ist keine gültige E-Mail",
|
||||||
"lfk-is-os": "Das \"Lauf für Kaya!\" Frontend ist (wie alle anderen Projekte für den \"LfK!\" auch) ein OpenSource Projekt.",
|
"lfk-is-os": "Das \"Lauf für Kaya!\" Frontend ist (wie alle anderen Projekte für den \"LfK!\" auch) ein OpenSource Projekt.",
|
||||||
"log_in": "Anmelden",
|
"log_in": "Anmelden",
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
"goback": "Go Home",
|
"goback": "Go Home",
|
||||||
"groups": "Groups",
|
"groups": "Groups",
|
||||||
"hallo": "hello",
|
"hallo": "hello",
|
||||||
|
"icon-image-credits": "We also want to thank these projects for illustrations and icons:",
|
||||||
"installed-version": "Installed version",
|
"installed-version": "Installed version",
|
||||||
"invalid-mail-reset": "the provided email is invalid",
|
"invalid-mail-reset": "the provided email is invalid",
|
||||||
"last-name": "Last name",
|
"last-name": "Last name",
|
||||||
|
|||||||
Reference in New Issue
Block a user