parent
9fec315910
commit
c2bd696bfe
@ -55,6 +55,14 @@
|
|||||||
});
|
});
|
||||||
let modal_open = false;
|
let modal_open = false;
|
||||||
let delete_org = {};
|
let delete_org = {};
|
||||||
|
document.addEventListener("click", function (e) {
|
||||||
|
if (
|
||||||
|
e.target.parentNode.parentNode.id != "sponsoring:dropdown" &&
|
||||||
|
e.target.parentNode.parentNode.id != "sponsoring:dropdown:menu"
|
||||||
|
) {
|
||||||
|
sponsoring_contracts_download_open = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
function deleteOrganization() {
|
function deleteOrganization() {
|
||||||
RunnerOrganizationService.runnerOrganizationControllerRemove(
|
RunnerOrganizationService.runnerOrganizationControllerRemove(
|
||||||
original_object.id,
|
original_object.id,
|
||||||
@ -185,7 +193,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{#if sponsoring_contracts_download_open}
|
{#if sponsoring_contracts_download_open}
|
||||||
<div
|
<div
|
||||||
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5">
|
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5"
|
||||||
|
id="sponsoring:dropdown:menu">
|
||||||
<div
|
<div
|
||||||
class="py-1"
|
class="py-1"
|
||||||
role="menu"
|
role="menu"
|
||||||
|
@ -18,6 +18,15 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
document.addEventListener("click", function (e) {
|
||||||
|
if (
|
||||||
|
e.target.parentNode.parentNode.id != "sponsoring:dropdown" &&
|
||||||
|
e.target.parentNode.parentNode.id != "sponsoring:dropdown:menu"
|
||||||
|
) {
|
||||||
|
sponsoring_contracts_download_open = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
async function generateSponsoringContract(locale) {
|
async function generateSponsoringContract(locale) {
|
||||||
sponsoring_contracts_download_open = false;
|
sponsoring_contracts_download_open = false;
|
||||||
const orgs = current_organizations.filter((r) => r.is_selected === true);
|
const orgs = current_organizations.filter((r) => r.is_selected === true);
|
||||||
@ -120,7 +129,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{#if sponsoring_contracts_download_open}
|
{#if sponsoring_contracts_download_open}
|
||||||
<div
|
<div
|
||||||
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5">
|
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5"
|
||||||
|
id="sponsoring:dropdown:menu">
|
||||||
<div
|
<div
|
||||||
class="py-1"
|
class="py-1"
|
||||||
role="menu"
|
role="menu"
|
||||||
|
@ -33,6 +33,14 @@
|
|||||||
original_data.group = original_data.group.id;
|
original_data.group = original_data.group.id;
|
||||||
editable = Object.assign(editable, original_data);
|
editable = Object.assign(editable, original_data);
|
||||||
});
|
});
|
||||||
|
document.addEventListener("click", function (e) {
|
||||||
|
if (
|
||||||
|
e.target.parentNode.parentNode.id != "sponsoring:dropdown" &&
|
||||||
|
e.target.parentNode.parentNode.id != "sponsoring:dropdown:menu"
|
||||||
|
) {
|
||||||
|
sponsoring_contracts_download_open = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
let orgs = [];
|
let orgs = [];
|
||||||
RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => {
|
RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => {
|
||||||
orgs = val;
|
orgs = val;
|
||||||
@ -203,7 +211,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{#if sponsoring_contracts_download_open}
|
{#if sponsoring_contracts_download_open}
|
||||||
<div
|
<div
|
||||||
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5">
|
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5"
|
||||||
|
id="sponsoring:dropdown:menu">
|
||||||
<div
|
<div
|
||||||
class="py-1"
|
class="py-1"
|
||||||
role="menu"
|
role="menu"
|
||||||
|
@ -31,6 +31,14 @@
|
|||||||
return { value: g.id, label: g.name };
|
return { value: g.id, label: g.name };
|
||||||
})
|
})
|
||||||
.concat(mappedteams);
|
.concat(mappedteams);
|
||||||
|
document.addEventListener("click", function (e) {
|
||||||
|
if (
|
||||||
|
e.target.parentNode.parentNode.id != "sponsoring:dropdown" &&
|
||||||
|
e.target.parentNode.parentNode.id != "sponsoring:dropdown:menu"
|
||||||
|
) {
|
||||||
|
sponsoring_contracts_download_open = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
|
RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
|
||||||
teams = val;
|
teams = val;
|
||||||
});
|
});
|
||||||
@ -129,53 +137,64 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="h-12">
|
<div class="h-12">
|
||||||
{#if current_runners.some((r) => r.is_selected === true)}
|
{#if current_runners.some((r) => r.is_selected === true)}
|
||||||
<div id="sponsoring:dropdown" class="relative inline-block">
|
<div id="sponsoring:dropdown" class="relative inline-block">
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
sponsoring_contracts_download_open = !sponsoring_contracts_download_open;
|
sponsoring_contracts_download_open = !sponsoring_contracts_download_open;
|
||||||
}}
|
}}
|
||||||
type="button"
|
type="button"
|
||||||
class="w-full justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-gray-600 text-base font-medium text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 sm:ml-3 sm:w-auto sm:text-sm inline-flex"
|
class="w-full justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-gray-600 text-base font-medium text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 sm:ml-3 sm:w-auto sm:text-sm inline-flex"
|
||||||
id="options-menu"
|
id="options-menu"
|
||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
aria-expanded="true">
|
aria-expanded="true">
|
||||||
{$_('generate-sponsoring-contracts')}
|
{$_('generate-sponsoring-contracts')}
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="-mr-1 ml-2 h-5 w-5"><path fill="none" d="M0 0h24v24H0z"/><path fill="currentColor" d="M3 19h18v2H3v-2zm10-5.83l6.07-6.07 1.42 1.41L12 17 3.52 8.52l1.4-1.42L11 13.17V2h2v11.17z"/></svg>
|
<svg
|
||||||
</button>
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
</div>
|
width="24"
|
||||||
{#if sponsoring_contracts_download_open}
|
height="24"
|
||||||
<div
|
viewBox="0 0 24 24"
|
||||||
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5">
|
class="-mr-1 ml-2 h-5 w-5"><path
|
||||||
<div
|
fill="none"
|
||||||
class="py-1"
|
d="M0 0h24v24H0z" />
|
||||||
role="menu"
|
<path
|
||||||
aria-orientation="vertical"
|
fill="currentColor"
|
||||||
aria-labelledby="options-menu">
|
d="M3 19h18v2H3v-2zm10-5.83l6.07-6.07 1.42 1.41L12 17 3.52 8.52l1.4-1.42L11 13.17V2h2v11.17z" /></svg>
|
||||||
<span
|
</button>
|
||||||
class="block w-full text-left px-4 py-2 text-sm text-gray-700">{$_('select-language')}</span>
|
|
||||||
<button
|
|
||||||
on:click={() => {
|
|
||||||
generateSponsoringContract('de');
|
|
||||||
}}
|
|
||||||
type="submit"
|
|
||||||
class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900 inline-flex"
|
|
||||||
role="menuitem">
|
|
||||||
{$_('german')}
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
on:click={() => {
|
|
||||||
generateSponsoringContract('en');
|
|
||||||
}}
|
|
||||||
type="submit"
|
|
||||||
class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900 inline-flex"
|
|
||||||
role="menuitem">
|
|
||||||
{$_('english')}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{#if sponsoring_contracts_download_open}
|
||||||
</div>
|
<div
|
||||||
|
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5"
|
||||||
|
id="sponsoring:dropdown:menu">
|
||||||
|
<div
|
||||||
|
class="py-1"
|
||||||
|
role="menu"
|
||||||
|
aria-orientation="vertical"
|
||||||
|
aria-labelledby="options-menu">
|
||||||
|
<span
|
||||||
|
class="block w-full text-left px-4 py-2 text-sm text-gray-700">{$_('select-language')}</span>
|
||||||
|
<button
|
||||||
|
on:click={() => {
|
||||||
|
generateSponsoringContract('de');
|
||||||
|
}}
|
||||||
|
type="submit"
|
||||||
|
class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900 inline-flex"
|
||||||
|
role="menuitem">
|
||||||
|
{$_('german')}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
on:click={() => {
|
||||||
|
generateSponsoringContract('en');
|
||||||
|
}}
|
||||||
|
type="submit"
|
||||||
|
class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900 inline-flex"
|
||||||
|
role="menuitem">
|
||||||
|
{$_('english')}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -44,6 +44,14 @@
|
|||||||
GroupContactService.groupContactControllerGetAll().then((val) => {
|
GroupContactService.groupContactControllerGetAll().then((val) => {
|
||||||
contacts = val;
|
contacts = val;
|
||||||
});
|
});
|
||||||
|
document.addEventListener("click", function (e) {
|
||||||
|
if (
|
||||||
|
e.target.parentNode.parentNode.id != "sponsoring:dropdown" &&
|
||||||
|
e.target.parentNode.parentNode.id != "sponsoring:dropdown:menu"
|
||||||
|
) {
|
||||||
|
sponsoring_contracts_download_open = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
function deleteTeam() {
|
function deleteTeam() {
|
||||||
RunnerTeamService.runnerTeamControllerRemove(original.id, false)
|
RunnerTeamService.runnerTeamControllerRemove(original.id, false)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
@ -167,7 +175,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{#if sponsoring_contracts_download_open}
|
{#if sponsoring_contracts_download_open}
|
||||||
<div
|
<div
|
||||||
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5">
|
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5"
|
||||||
|
id="sponsoring:dropdown:menu">
|
||||||
<div
|
<div
|
||||||
class="py-1"
|
class="py-1"
|
||||||
role="menu"
|
role="menu"
|
||||||
|
@ -18,6 +18,14 @@
|
|||||||
teams_promise.then((data) => {
|
teams_promise.then((data) => {
|
||||||
usersstore.set(data);
|
usersstore.set(data);
|
||||||
});
|
});
|
||||||
|
document.addEventListener("click", function (e) {
|
||||||
|
if (
|
||||||
|
e.target.parentNode.parentNode.id != "sponsoring:dropdown" &&
|
||||||
|
e.target.parentNode.parentNode.id != "sponsoring:dropdown:menu"
|
||||||
|
) {
|
||||||
|
sponsoring_contracts_download_open = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
async function generateSponsoringContract(locale) {
|
async function generateSponsoringContract(locale) {
|
||||||
sponsoring_contracts_download_open = false;
|
sponsoring_contracts_download_open = false;
|
||||||
const teams = current_teams.filter((r) => r.is_selected === true);
|
const teams = current_teams.filter((r) => r.is_selected === true);
|
||||||
@ -120,7 +128,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{#if sponsoring_contracts_download_open}
|
{#if sponsoring_contracts_download_open}
|
||||||
<div
|
<div
|
||||||
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5">
|
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5"
|
||||||
|
id="sponsoring:dropdown:menu">
|
||||||
<div
|
<div
|
||||||
class="py-1"
|
class="py-1"
|
||||||
role="menu"
|
role="menu"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user