Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion frontend/src/lib/components/MapComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
export let controlFactories: Array<ControlFactory> = [];
export let controlOps: L.ControlOptions = { position: 'topleft' };
export let keyboardPanDelta: number = KEYBOARD_PAN_DELTA_FINE;
export let mapDescription: string | undefined = undefined;
export let descriptionLocation: string = 'top';

// Configuration for animated flyTo when selecting a marker
export let flyToTarget: { latLng: L.LatLngExpression; zoom: number } | undefined = undefined;
Expand Down Expand Up @@ -101,6 +103,15 @@

<div class="z-0 h-full w-full" bind:this={mapElement}>
{#if map}
<slot />
<div
class="absolute left-1/2 z-[1] -translate-x-1/2"
class:top-1={descriptionLocation === 'top'}
class:bottom-1={descriptionLocation === 'bottom'}
>
{#if mapDescription}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine the indentation change here was accidental.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that all the code changes in this PR are just code formatting changes, not any logic changes.

<h3 class="text-base">{mapDescription}</h3>
{/if}
<slot />
</div>
{/if}
</div>
7 changes: 7 additions & 0 deletions frontend/src/lib/components/ServiceRequest.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@
<div class="flex h-full">
<Card class="m-2 w-full overflow-y-auto">
<div class="flex h-full w-full flex-col" slot="content">
<h3 class="ml-4 text-base">
{#if isUpdateButtonClicked}
{messages['serviceRequest']['update']}
{:else}
{messages['serviceRequest']['detail']}
{/if}
</h3>
<div class="m-2 flex-grow">
<!-- ID & STATUS -->
<div class="flow-root">
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lib/components/ServiceRequestDetails.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<div class="flex h-full">
<Card class="m-2 w-full overflow-y-auto">
<div class="flex h-full w-full flex-col" slot="content">
<h3 class="ml-4 text-base">{messages['serviceRequest']['detail']}</h3>
<div class="m-2 flex-grow">
<div class="flow-root">
<h2 class="float-left text-base tracking-wide">
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/media/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@
"citizen_comments": "Citizen Comments"
},
"sidebar": {
"title": "Requests"
"title": "Service Requests"
},
"serviceRequest": {
"description": "Description:",
"detail": "Details:",
"detail": "Service Request Detail",
"update": "Service Request Update",
"create": "Service Request Create",
"attributes": "Attributes:",
"agency_contact": "Agency Contact:",
"agency_contact_email": "Agency Contact Email:",
"agency_name": "agency name",
"citizen_contact": "Citizen Contact:",
"description": "Description",
"expected_datetime": "Estimated Fix:",
"request_type": "Request Type",
"service_notice": "Recommended Solution:",
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/routes/issue/create/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import ServiceRequestDetailsForm from '$lib/components/CreateServiceRequest/ServiceRequestDetailsForm.svelte';
import CreateServiceRequestLayout from '$lib/components/CreateServiceRequest/CreateServiceRequestLayout.svelte';
import { mapCenterControlFactory } from '$lib/components/MapCenterControl';
import messages from '$media/messages.json';

const libre311 = useLibre311Service();
const linkResolver = useLibre311Context().linkResolver;
Expand Down Expand Up @@ -105,6 +106,7 @@

<CreateServiceRequestLayout {step}>
<div slot="side-bar" class="mx-4 h-full">
<h3 class="ml-4 text-base">{messages['serviceRequest']['create']}</h3>
{#if step == CreateServiceRequestSteps.LOCATION}
<SelectLocation loading={loadingLocation} on:confirmLocation={confirmLocation} />
{:else if step == CreateServiceRequestSteps.REVIEW && isCreateServiceRequestUIParams(params)}
Expand All @@ -115,6 +117,8 @@
</div>
<div slot="main-content" class="relative h-full">
<MapComponent
mapDescription="Request Location"
descriptionLocation="bottom"
keyboardPanDelta={KEYBOARD_PAN_DELTA_FINE}
controlFactories={[mapCenterControlFactory]}
disabled={step != 0}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/routes/issues/map/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
</div>
</Breakpoint>
<MapComponent
mapDescription="Request Map"
keyboardPanDelta={KEYBOARD_PAN_DELTA_COARSE}
controlFactories={[mapCenterControlFactory]}
bounds={mapBounds}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/routes/issues/table/+layout.svelte
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wait on this. We are going to rework the table view. I have a PR for this new view. We can work on how to label the table then.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged the changes to ensure correct behavior.

Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@
<div slot="detail-pane">
<slot />
</div>
<div slot="table" class="relative flex h-full flex-col">
<div slot="table" class="relative flex h-full flex-col text-center">
<h3 class="text-base">Service Requests</h3>
<div
class="m-3 flex items-center justify-between rounded-md border-t-[1px] border-border shadow-md"
>
Expand Down