Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 11fca75a

Přidáno uživatelem Václav Honzík před asi 2 roky(ů)

autozoom + file upload

re #9741

Zobrazit rozdíly:

frontend/src/features/TrackingTool/MapPath.tsx
6 6
import { setPrimaryIdx, updateMapMarker } from "./trackingToolSlice"
7 7
import MapMarker from "./MapMarker"
8 8
import { LatLngTuple } from "leaflet"
9
import { Popup } from "react-leaflet"
9
import { Popup, Tooltip } from "react-leaflet"
10 10
import { Checkbox, FormControlLabel, Stack, Typography } from "@mui/material"
11 11
import { formatHtmlStringToReactDom } from "../../utils/formatting/HtmlUtils"
12 12
import { DialogCatalogItemDetail as CatalogItemDetailDialog } from "../Catalog/CatalogItemDetail"
......
123 123
                        )
124 124
                    }}
125 125
                >
126
                    <Popup>
127
                        <Fragment>
128
                            <Stack direction="column" sx={{ m: 0 }}>
129
                                <Typography
130
                                    variant="h6"
131
                                    fontWeight="bold"
132
                                    fontSize={16}
133
                                >
134
                                    {formatHtmlStringToReactDom(
135
                                        item.catalogItem.name as string
136
                                    )}
137
                                </Typography>
138
                                <FormControlLabel
139
                                    control={
140
                                        <Checkbox
141
                                            checked={item.active}
142
                                            onChange={() => {
143
                                                dispatch(
144
                                                    updateMapMarker({
145
                                                        idx,
146
                                                        item: new MapPoint(
147
                                                            item.idx,
148
                                                            !item.active,
149
                                                            item.catalogItem
150
                                                        ),
151
                                                    })
152
                                                )
153
                                            }}
154
                                        />
155
                                    }
156
                                    labelPlacement="end"
157
                                    label="Active"
158
                                />
159
                                <CatalogItemDetailDialog
160
                                    itemId={item.catalogItem.id ?? ""}
161
                                />
162
                            </Stack>
163
                        </Fragment>
164
                    </Popup>
126
                    <Fragment>
127
                        <Tooltip>
128
                            {/* <Typography> */}
129
                                {item.catalogItem.name ?? ""}
130
                            {/* </Typography> */}
131
                        </Tooltip>
132
                        <Popup>
133
                            <Fragment>
134
                                <Stack direction="column" sx={{ m: 0 }}>
135
                                    <Typography
136
                                        variant="h6"
137
                                        fontWeight="bold"
138
                                        fontSize={16}
139
                                    >
140
                                        {formatHtmlStringToReactDom(
141
                                            item.catalogItem.name as string
142
                                        )}
143
                                    </Typography>
144
                                    <FormControlLabel
145
                                        control={
146
                                            <Checkbox
147
                                                checked={item.active}
148
                                                onChange={() => {
149
                                                    dispatch(
150
                                                        updateMapMarker({
151
                                                            idx,
152
                                                            item: new MapPoint(
153
                                                                item.idx,
154
                                                                !item.active,
155
                                                                item.catalogItem
156
                                                            ),
157
                                                        })
158
                                                    )
159
                                                }}
160
                                            />
161
                                        }
162
                                        labelPlacement="end"
163
                                        label="Active"
164
                                    />
165
                                    <CatalogItemDetailDialog
166
                                        itemId={item.catalogItem.id ?? ""}
167
                                    />
168
                                </Stack>
169
                            </Fragment>
170
                        </Popup>
171
                    </Fragment>
165 172
                </MapMarker>
166 173
            ))
167 174
        )

Také k dispozici: Unified diff