diff --git a/src/mapper/src/lib/components/dialog-entities-actions.svelte b/src/mapper/src/lib/components/dialog-entities-actions.svelte
index 51d3d5e39e..93701eb5b4 100644
--- a/src/mapper/src/lib/components/dialog-entities-actions.svelte
+++ b/src/mapper/src/lib/components/dialog-entities-actions.svelte
@@ -30,11 +30,13 @@
const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
if (isMobile) {
- entitiesStore.updateEntityStatus(projectData.id, {
- entity_id: entityUuid,
- status: 1,
- label: `Task ${selectedEntity?.task_id} Feature ${selectedEntity?.osmid}`,
- });
+ if (selectedEntity?.status === 'READY') {
+ entitiesStore.updateEntityStatus(projectData.id, {
+ entity_id: entityUuid,
+ status: 1,
+ label: `Task ${selectedEntity?.task_id} Feature ${selectedEntity?.osmid}`,
+ });
+ }
// Load entity in ODK Collect by intent
document.location.href = `odkcollect://form/${xformId}?feature=${entityUuid}`;
} else {
diff --git a/src/mapper/src/lib/components/header.svelte b/src/mapper/src/lib/components/header.svelte
index de77ac3c7f..597ab86579 100644
--- a/src/mapper/src/lib/components/header.svelte
+++ b/src/mapper/src/lib/components/header.svelte
@@ -32,8 +32,8 @@
@@ -55,7 +55,11 @@
class="w-[1.8rem] h-[1.8rem] min-w-[1.8rem] min-h-[1.8rem] max-w-[1.8rem] max-h-[1.8rem] rounded-full"
/>
{/if}
-
{loginStore?.getAuthDetails?.username}
+
+ {loginStore?.getAuthDetails?.username}
+
{:else}
{menu.name}
{/each}
- {
- if (e.key === 'Enter') {
- handleSignOut();
- }
- }}
- role="button"
- tabindex="0"
- >
- SIGN OUT
-
+ {#if loginStore?.getAuthDetails}
+ {
+ if (e.key === 'Enter') {
+ handleSignOut();
+ }
+ }}
+ role="button"
+ tabindex="0"
+ >
+ SIGN OUT
+
+ {/if}
diff --git a/src/mapper/src/lib/components/map/main.svelte b/src/mapper/src/lib/components/map/main.svelte
index 59aa05b641..9a72a857dd 100644
--- a/src/mapper/src/lib/components/map/main.svelte
+++ b/src/mapper/src/lib/components/map/main.svelte
@@ -67,21 +67,21 @@
let projectSetupStep = $state(null);
// Trigger adding the PMTiles layer to baselayers, if PmtilesUrl is set
let allBaseLayers: maplibregl.StyleSpecification[] = $derived(
- projectBasemapStore.projectPmtilesUrl ?
- [
- ...baseLayers,
- {
- ...pmtilesStyle,
- sources: {
- ...pmtilesStyle.sources,
- pmtiles: {
- ...pmtilesStyle.sources.pmtiles,
- url: projectBasemapStore.projectPmtilesUrl,
+ projectBasemapStore.projectPmtilesUrl
+ ? [
+ ...baseLayers,
+ {
+ ...pmtilesStyle,
+ sources: {
+ ...pmtilesStyle.sources,
+ pmtiles: {
+ ...pmtilesStyle.sources.pmtiles,
+ url: projectBasemapStore.projectPmtilesUrl,
+ },
},
},
- },
- ]
- : baseLayers
+ ]
+ : baseLayers,
);
// // This does not work! Infinite looping
// // Trigger adding the PMTiles layer to baselayers, if PmtilesUrl is set
diff --git a/src/mapper/src/routes/[projectId]/+page.svelte b/src/mapper/src/routes/[projectId]/+page.svelte
index 481d54143b..29da5f548b 100644
--- a/src/mapper/src/routes/[projectId]/+page.svelte
+++ b/src/mapper/src/routes/[projectId]/+page.svelte
@@ -17,8 +17,7 @@
import BasemapComponent from '$lib/components/offline/basemaps.svelte';
import DialogTaskActions from '$lib/components/dialog-task-actions.svelte';
import DialogEntityActions from '$lib/components/dialog-entities-actions.svelte';
- import { generateQrCode, downloadQrCode } from '$lib/utils/qrcode';
- import type { ProjectTask, ZoomToTaskEventDetail } from '$lib/types';
+ import type { ProjectTask } from '$lib/types';
import { convertDateToTimeAgo } from '$lib/utils/datetime';
import { getTaskStore, getTaskEventStream } from '$store/tasks.svelte.ts';
import { getEntitiesStatusStore, getEntityStatusStream } from '$store/entities.svelte.ts';
@@ -31,7 +30,6 @@
}
let { data }: Props = $props();
- // $effect: ({ electric, project } = data)
let mapComponent: maplibregl.Map | undefined = $state(undefined);
let tabGroup: SlTabGroup;
@@ -113,7 +111,7 @@
{/if}
-
+
{
mapComponent = map;
@@ -181,9 +179,9 @@
class="h-[70vh]"
/>
infoDialogRef?.close()}
+ onclick={() => infoDialogRef?.hide()}
onkeydown={(e: KeyboardEvent) => {
- e.key === 'Enter' && infoDialogRef?.close();
+ e.key === 'Enter' && infoDialogRef?.hide();
}}
role="button"
tabindex="0"