💣 process breaking changes for lib v0.3.0
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Philipp Dormann 2021-01-24 20:37:56 +01:00
parent fc21427685
commit dadb80608a
8 changed files with 22 additions and 22 deletions

View File

@ -12,7 +12,7 @@
"licenses:export": "license-exporter --json -o public" "licenses:export": "license-exporter --json -o public"
}, },
"dependencies": { "dependencies": {
"@odit/lfk-client-js": "0.1.1", "@odit/lfk-client-js": "0.3.0",
"filepond": "4.25.1", "filepond": "4.25.1",
"gridjs": "3.2.2", "gridjs": "3.2.2",
"localforage": "1.9.0", "localforage": "1.9.0",

View File

@ -2,7 +2,7 @@
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
import { clickOutside } from "./outsideclick"; import { clickOutside } from "./outsideclick";
import { focusTrap } from "svelte-focus-trap"; import { focusTrap } from "svelte-focus-trap";
import { RunnerOrganisationService } from "@odit/lfk-client-js"; import { RunnerOrganizationService } from "@odit/lfk-client-js";
import Toastify from "toastify-js"; import Toastify from "toastify-js";
export let modal_open; export let modal_open;
export let current_organizations; export let current_organizations;
@ -35,7 +35,7 @@
text: "Organization is being added...", text: "Organization is being added...",
duration: -1, duration: -1,
}).showToast(); }).showToast();
RunnerOrganisationService.runnerOrganisationControllerPost({ RunnerOrganizationService.runnerOrganizationControllerPost({
name, name,
address: undefined, address: undefined,
contact: undefined, contact: undefined,

View File

@ -3,7 +3,7 @@
import { clickOutside } from "./outsideclick"; import { clickOutside } from "./outsideclick";
import { focusTrap } from "svelte-focus-trap"; import { focusTrap } from "svelte-focus-trap";
import { import {
RunnerOrganisationService, RunnerOrganizationService,
RunnerTeamService, RunnerTeamService,
} from "@odit/lfk-client-js"; } from "@odit/lfk-client-js";
import Toastify from "toastify-js"; import Toastify from "toastify-js";
@ -33,7 +33,7 @@
})(); })();
$: parentGroup = undefined; $: parentGroup = undefined;
$: orgs = []; $: orgs = [];
RunnerOrganisationService.runnerOrganisationControllerGetAll().then((val) => { RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => {
orgs = val; orgs = val;
}); });
function submit() { function submit() {

View File

@ -2,7 +2,7 @@
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
import { clickOutside } from "./outsideclick"; import { clickOutside } from "./outsideclick";
import { focusTrap } from "svelte-focus-trap"; import { focusTrap } from "svelte-focus-trap";
import { RunnerOrganisationService } from "@odit/lfk-client-js"; import { RunnerOrganizationService } from "@odit/lfk-client-js";
import Toastify from "toastify-js"; import Toastify from "toastify-js";
import { createEventDispatcher } from "svelte"; import { createEventDispatcher } from "svelte";
export let modal_open; export let modal_open;
@ -13,7 +13,7 @@
dispatch("cancelDelete", { id: delete_org.id }); dispatch("cancelDelete", { id: delete_org.id });
} }
function deleteOrg() { function deleteOrg() {
RunnerOrganisationService.runnerOrganisationControllerRemove( RunnerOrganizationService.runnerOrganizationControllerRemove(
delete_org.id, delete_org.id,
true true
) )

View File

@ -1,5 +1,5 @@
<script> <script>
import { RunnerOrganisationService } from "@odit/lfk-client-js"; import { RunnerOrganizationService } from "@odit/lfk-client-js";
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
import Toastify from "toastify-js"; import Toastify from "toastify-js";
import store from "../store"; import store from "../store";
@ -12,7 +12,7 @@
let original = {}; let original = {};
$: data_loaded = false; $: data_loaded = false;
$: data_changed = JSON.stringify(orgdata) === JSON.stringify(original); $: data_changed = JSON.stringify(orgdata) === JSON.stringify(original);
const promise = RunnerOrganisationService.runnerOrganisationControllerGetOne( const promise = RunnerOrganizationService.runnerOrganizationControllerGetOne(
params.orgid params.orgid
).then((value) => { ).then((value) => {
data_loaded = true; data_loaded = true;
@ -21,8 +21,8 @@
}); });
let modal_open = false; let modal_open = false;
let delete_org = {}; let delete_org = {};
function deleteOrganisation() { function deleteOrganization() {
// RunnerOrganisationService.runnerOrganisationControllerRemove( // RunnerOrganizationService.runnerOrganizationControllerRemove(
// original.id, // original.id,
// false // false
// ) // )
@ -45,7 +45,7 @@
text: "updating organization", text: "updating organization",
duration: 2500, duration: 2500,
}).showToast(); }).showToast();
RunnerOrganisationService.runnerOrganisationControllerPut( RunnerOrganizationService.runnerOrganizationControllerPut(
original.id, original.id,
orgdata orgdata
) )
@ -75,7 +75,7 @@
{#if store.state.jwtinfo.userdetails.permissions.includes('USER:DELETE')} {#if store.state.jwtinfo.userdetails.permissions.includes('USER:DELETE')}
{#if delete_triggered} {#if delete_triggered}
<button <button
on:click={deleteOrganisation} on:click={deleteOrganization}
class="w-full 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')}</button> class="w-full 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')}</button>
<button <button
on:click={() => { on:click={() => {

View File

@ -2,7 +2,7 @@
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
let modal_open = false; let modal_open = false;
let delete_org = {}; let delete_org = {};
import { RunnerOrganisationService } from "@odit/lfk-client-js"; import { RunnerOrganizationService } from "@odit/lfk-client-js";
import store from "../store"; import store from "../store";
import OrgsEmptyState from "./OrgsEmptyState.svelte"; import OrgsEmptyState from "./OrgsEmptyState.svelte";
import Toastify from "toastify-js"; import Toastify from "toastify-js";
@ -11,7 +11,7 @@
$: active_deletes = []; $: active_deletes = [];
export let current_organizations = []; export let current_organizations = [];
const promise = RunnerOrganisationService.runnerOrganisationControllerGetAll().then( const promise = RunnerOrganizationService.runnerOrganizationControllerGetAll().then(
(val) => { (val) => {
current_organizations = val; current_organizations = val;
} }
@ -25,7 +25,7 @@
}} }}
bind:modal_open bind:modal_open
bind:delete_org /> bind:delete_org />
{#if store.state.jwtinfo.userdetails.permissions.includes('ORGANISATION:GET')} {#if store.state.jwtinfo.userdetails.permissions.includes('ORGANIZATION:GET')}
{#await promise} {#await promise}
<div <div
class="bg-teal-lightest border-t-4 border-teal rounded-b text-teal-darkest px-4 py-3 shadow-md my-2" class="bg-teal-lightest border-t-4 border-teal rounded-b text-teal-darkest px-4 py-3 shadow-md my-2"
@ -121,7 +121,7 @@
Delete</button> Delete</button>
<button <button
on:click={() => { on:click={() => {
RunnerOrganisationService.runnerOrganisationControllerRemove(o.id, false) RunnerOrganizationService.runnerOrganizationControllerRemove(o.id, false)
.then((resp) => { .then((resp) => {
current_organizations = current_organizations.filter((obj) => obj.id !== o.id); current_organizations = current_organizations.filter((obj) => obj.id !== o.id);
Toastify({ Toastify({
@ -146,7 +146,7 @@
<a <a
href="./{o.id}" href="./{o.id}"
class="text-indigo-600 hover:text-indigo-900">Edit</a> class="text-indigo-600 hover:text-indigo-900">Edit</a>
{#if store.state.jwtinfo.userdetails.permissions.includes('ORGANISATION:DELETE')} {#if store.state.jwtinfo.userdetails.permissions.includes('ORGANIZATION:DELETE')}
<button <button
on:click={() => { on:click={() => {
active_deletes[o.id] = true; active_deletes[o.id] = true;

View File

@ -11,7 +11,7 @@
<section class="container p-5"> <section class="container p-5">
<span class="mb-1 text-3xl font-extrabold leading-tight"> <span class="mb-1 text-3xl font-extrabold leading-tight">
{$_('organizations')} {$_('organizations')}
{#if store.state.jwtinfo.userdetails.permissions.includes('ORGANISATION:CREATE')} {#if store.state.jwtinfo.userdetails.permissions.includes('ORGANIZATION:CREATE')}
<button <button
on:click={() => { on:click={() => {
modal_open = true; modal_open = true;
@ -26,6 +26,6 @@
<OrgOverview bind:current_organizations /> <OrgOverview bind:current_organizations />
</section> </section>
{#if store.state.jwtinfo.userdetails.permissions.includes('ORGANISATION:CREATE')} {#if store.state.jwtinfo.userdetails.permissions.includes('ORGANIZATION:CREATE')}
<AddOrgModal bind:current_organizations bind:modal_open /> <AddOrgModal bind:current_organizations bind:modal_open />
{/if} {/if}

View File

@ -1,6 +1,6 @@
<script> <script>
import { import {
RunnerOrganisationService, RunnerOrganizationService,
RunnerTeamService, RunnerTeamService,
} from "@odit/lfk-client-js"; } from "@odit/lfk-client-js";
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
@ -28,7 +28,7 @@
teamdata = Object.assign(teamdata, value); teamdata = Object.assign(teamdata, value);
original = Object.assign(original, value); original = Object.assign(original, value);
}); });
RunnerOrganisationService.runnerOrganisationControllerGetAll().then((val) => { RunnerOrganizationService.runnerOrganizationControllerGetAll().then((val) => {
orgs = val; orgs = val;
}); });
function deleteTeam() { function deleteTeam() {