From 19ab302b5460fff7c0cce759ba50351eb1fa5e88 Mon Sep 17 00:00:00 2001 From: KoloMl Date: Mon, 4 Aug 2025 13:39:48 +0400 Subject: [PATCH] Implemented the bulk import interface --- src/routes/transporting/+page.svelte | 1 + src/routes/transporting/import/+page.svelte | 248 ++++++++++++++++++++ 2 files changed, 249 insertions(+) create mode 100644 src/routes/transporting/import/+page.svelte diff --git a/src/routes/transporting/+page.svelte b/src/routes/transporting/+page.svelte index 5bcb535..769ae5e 100644 --- a/src/routes/transporting/+page.svelte +++ b/src/routes/transporting/+page.svelte @@ -7,4 +7,5 @@ Back
Export + Import diff --git a/src/routes/transporting/import/+page.svelte b/src/routes/transporting/import/+page.svelte new file mode 100644 index 0000000..8020297 --- /dev/null +++ b/src/routes/transporting/import/+page.svelte @@ -0,0 +1,248 @@ + + +{#if !hasImportedEntities} + + Back +
+
+ {#if errorMessage} +

{errorMessage}

+ +
+
+ {/if} + + + + + + +
+ Import & Preview +
+{:else if previewedEntity} + + previewedEntity = null} icon="arrow-left">Back to Selection +
+
+ {#if previewedEntity instanceof MaintenanceProfile} + + {:else if previewedEntity instanceof TagGroup} + + {/if} +{:else} + + Cancel Import +
+ {#if importedProfiles.length} +
+ + Import All Profiles + + {#each importedProfiles as candidateProfile} + + {#if existingProfilesMap.has(candidateProfile.id)} + Update: + {:else} + New: + {/if} + {candidateProfile.settings.name || 'Unnamed Profile'} + + {/each} + {/if} + {#if importedGroups.length} +
+ + Import All Groups + + {#each importedGroups as candidateGroup} + + {#if existingGroupsMap.has(candidateGroup.id)} + Update: + {:else} + New: + {/if} + {candidateGroup.settings.name || 'Unnamed Group'} + + {/each} + {/if} +
+ + Imported Selected + +
+{/if} + +