💣 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"
},
"dependencies": {
"@odit/lfk-client-js": "0.1.1",
"@odit/lfk-client-js": "0.3.0",
"filepond": "4.25.1",
"gridjs": "3.2.2",
"localforage": "1.9.0",

View File

@ -2,7 +2,7 @@
import { _ } from "svelte-i18n";
import { clickOutside } from "./outsideclick";
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";
export let modal_open;
export let current_organizations;
@ -35,7 +35,7 @@
text: "Organization is being added...",
duration: -1,
}).showToast();
RunnerOrganisationService.runnerOrganisationControllerPost({
RunnerOrganizationService.runnerOrganizationControllerPost({
name,
address: undefined,
contact: undefined,

View File

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

View File

@ -2,7 +2,7 @@
import { _ } from "svelte-i18n";
import { clickOutside } from "./outsideclick";
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 { createEventDispatcher } from "svelte";
export let modal_open;
@ -13,7 +13,7 @@
dispatch("cancelDelete", { id: delete_org.id });
}
function deleteOrg() {
RunnerOrganisationService.runnerOrganisationControllerRemove(
RunnerOrganizationService.runnerOrganizationControllerRemove(
delete_org.id,
true
)

View File

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

View File

@ -2,7 +2,7 @@
import { _ } from "svelte-i18n";
let modal_open = false;
let delete_org = {};
import { RunnerOrganisationService } from "@odit/lfk-client-js";
import { RunnerOrganizationService } from "@odit/lfk-client-js";
import store from "../store";
import OrgsEmptyState from "./OrgsEmptyState.svelte";
import Toastify from "toastify-js";
@ -11,7 +11,7 @@
$: active_deletes = [];
export let current_organizations = [];
const promise = RunnerOrganisationService.runnerOrganisationControllerGetAll().then(
const promise = RunnerOrganizationService.runnerOrganizationControllerGetAll().then(
(val) => {
current_organizations = val;
}
@ -25,7 +25,7 @@
}}
bind:modal_open
bind:delete_org />
{#if store.state.jwtinfo.userdetails.permissions.includes('ORGANISATION:GET')}
{#if store.state.jwtinfo.userdetails.permissions.includes('ORGANIZATION:GET')}
{#await promise}
<div
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>
<button
on:click={() => {
RunnerOrganisationService.runnerOrganisationControllerRemove(o.id, false)
RunnerOrganizationService.runnerOrganizationControllerRemove(o.id, false)
.then((resp) => {
current_organizations = current_organizations.filter((obj) => obj.id !== o.id);
Toastify({
@ -146,7 +146,7 @@
<a
href="./{o.id}"
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
on:click={() => {
active_deletes[o.id] = true;

View File

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

View File

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