first merge to main 🚀 #71
@ -7,6 +7,8 @@
|
|||||||
import Toastify from "toastify-js";
|
import Toastify from "toastify-js";
|
||||||
import { ImportService } from "@odit/lfk-client-js";
|
import { ImportService } from "@odit/lfk-client-js";
|
||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
|
export let opened_from;
|
||||||
|
export let passed_orgs;
|
||||||
export let import_modal_open;
|
export let import_modal_open;
|
||||||
$: searchvalue = "";
|
$: searchvalue = "";
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
@ -25,6 +27,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
let selected_org;
|
||||||
let files;
|
let files;
|
||||||
let recent_processed = true;
|
let recent_processed = true;
|
||||||
$: json_output = [];
|
$: json_output = [];
|
||||||
@ -74,18 +77,28 @@
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
console.log(mapped);
|
console.log(mapped);
|
||||||
ImportService.importControllerPostOrgsJson(1, mapped)
|
ImportService.importControllerPostOrgsJson(parseInt(selected_org), mapped)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log("demo passed");
|
// console.log("demo passed");
|
||||||
console.log(resp);
|
// console.log(resp);
|
||||||
|
setTimeout(() => {
|
||||||
|
toast.hideToast();
|
||||||
|
recent_processed = true;
|
||||||
|
}, 500);
|
||||||
|
Toastify({
|
||||||
|
text: "Import finished",
|
||||||
|
duration: 500,
|
||||||
|
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||||
|
}).showToast();
|
||||||
|
cancelModal();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
setTimeout(() => {
|
||||||
|
toast.hideToast();
|
||||||
|
recent_processed = true;
|
||||||
|
}, 500);
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
|
||||||
toast.hideToast();
|
|
||||||
recent_processed = true;
|
|
||||||
}, 500);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -145,6 +158,17 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#if json_output.length > 0}
|
{#if json_output.length > 0}
|
||||||
|
{#if opened_from === 'OrgOverview'}
|
||||||
|
<p>{$_('import__target-organization')}</p>
|
||||||
|
<select
|
||||||
|
name="team"
|
||||||
|
bind:value={selected_org}
|
||||||
|
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 rounded-md p-2">
|
||||||
|
{#each passed_orgs as o}
|
||||||
|
<option value={o.id}>{o.name}</option>
|
||||||
|
{/each}
|
||||||
|
</select>
|
||||||
|
{/if}
|
||||||
<p>Bitte bestätige diese Läufer für den Import</p>
|
<p>Bitte bestätige diese Läufer für den Import</p>
|
||||||
<input
|
<input
|
||||||
type="search"
|
type="search"
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
}}
|
}}
|
||||||
type="button"
|
type="button"
|
||||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
|
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
|
||||||
Läufer importieren
|
{$_('import-runners')}
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
@ -43,5 +43,7 @@
|
|||||||
on:cancelDelete={(event) => {
|
on:cancelDelete={(event) => {
|
||||||
import_modal_open = false;
|
import_modal_open = false;
|
||||||
}}
|
}}
|
||||||
|
passed_orgs={current_organizations}
|
||||||
|
opened_from="OrgOverview"
|
||||||
bind:import_modal_open />
|
bind:import_modal_open />
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -85,6 +85,7 @@
|
|||||||
"hallo": "hello",
|
"hallo": "hello",
|
||||||
"icon-image-credits": "We also want to thank these projects for illustrations and icons:",
|
"icon-image-credits": "We also want to thank these projects for illustrations and icons:",
|
||||||
"import-runners": "Import runners",
|
"import-runners": "Import runners",
|
||||||
|
"import__target-organization": "Target Organization",
|
||||||
"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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user