Skip to content

Commit

Permalink
Merge pull request #24 from barbalex/click-listener
Browse files Browse the repository at this point in the history
Click listener
  • Loading branch information
barbalex authored Jun 19, 2024
2 parents 70dbfc5 + b21a6d3 commit 6982db3
Show file tree
Hide file tree
Showing 17 changed files with 620 additions and 81 deletions.
7 changes: 5 additions & 2 deletions db/migrations/01-tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,7 @@ CREATE TABLE app_states(
map_maximized boolean DEFAULT NULL, -- FALSE
map_hide_ui boolean DEFAULT NULL, -- FALSE
map_locate boolean DEFAULT NULL, -- FALSE
map_info jsonb DEFAULT NULL,
tile_layer_sorter text DEFAULT NULL,
vector_layer_sorter text DEFAULT NULL,
editing_place_geometry uuid DEFAULT NULL,
Expand Down Expand Up @@ -1255,6 +1256,8 @@ COMMENT ON TABLE app_states IS 'User interface settings (state saved in db)';

COMMENT ON COLUMN app_states.designing IS 'Whether user is currently designing projects. Preset: false';

COMMENT ON COLUMN app_states.map_info IS 'Information presented, when user clicks on a map. Array of: {label, properties} where properties is an array of [key, value]';

COMMENT ON COLUMN app_states.editing_place_geometry IS 'The id of the place whose geometry is currently being edited';

COMMENT ON COLUMN app_states.editing_check_geometry IS 'The id of the check whose geometry is currently being edited';
Expand Down Expand Up @@ -1434,10 +1437,10 @@ CREATE TABLE vector_layers(
max_zoom integer DEFAULT NULL, -- 19,
min_zoom integer DEFAULT NULL, -- 0,
max_features integer DEFAULT NULL, -- 1000
wfs_url text DEFAULT NULL, -- WFS url, for example https://maps.zh.ch/wfs/OGDZHWFS. TODO: rename wfs_url
wfs_url text DEFAULT NULL, -- WFS url, for example https://maps.zh.ch/wfs/OGDZHWFS.
wfs_layer jsonb DEFAULT NULL, -- a single option
wfs_version text DEFAULT NULL, -- often: 1.1.0 or 2.0.0
wfs_output_format jsonb DEFAULT NULL, -- a single option. TODO: rename wfs_output_format
wfs_output_format jsonb DEFAULT NULL, -- a single option
feature_count integer DEFAULT NULL,
point_count integer DEFAULT NULL,
line_count integer DEFAULT NULL,
Expand Down
120 changes: 68 additions & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
"preview": "vite preview"
},
"dependencies": {
"@atlaskit/pragmatic-drag-and-drop": "1.1.12",
"@corbado/react": "2.9.0",
"@css-hooks/react": "2.0.4",
"@css-hooks/recommended": "2.0.4",
"@cyntler/react-doc-viewer": "1.16.3",
"@fluentui/react-components": "9.54.2",
"@fluentui/react-datepicker-compat": "0.4.41",
"@fluentui/react-icons": "2.0.244",
"@fluentui/react-icons": "2.0.245",
"@fluentui/react-timepicker-compat-preview": "0.2.0",
"@formkit/tempo": "0.1.1",
"@kripod/uuidv7": "0.3.4",
Expand Down Expand Up @@ -80,14 +81,14 @@
"@types/proj4leaflet": "1.0.10",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@typescript-eslint/eslint-plugin": "7.13.0",
"@typescript-eslint/parser": "7.13.0",
"@typescript-eslint/eslint-plugin": "7.13.1",
"@typescript-eslint/parser": "7.13.1",
"@vitejs/plugin-react": "4.3.1",
"eslint": "9.5.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-react-refresh": "0.4.7",
"globals": "15.5.0",
"globals": "15.6.0",
"typescript": "5.4.5",
"vite": "5.3.1",
"vite-plugin-svgr": "4.2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/components/FormHeader/FormMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const FormMenu = memo(
{!!toPrevious && (
<Button
size="medium"
icon={<FaChevronLeft />}
icon={<FaChevronLeft />}
onClick={toPrevious}
title={`Previous ${tableName}`}
/>
Expand Down
8 changes: 6 additions & 2 deletions src/components/FormHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ import { memo } from 'react'

import { FormMenu } from './FormMenu.tsx'

const titleStyle = {
color: 'black',
}

export const FormHeader = memo(
({ title, addRow, deleteRow, toNext, toPrevious, tableName, siblings }) => {
return (
<div className="form-header">
<h1>{title}</h1>
{(addRow || deleteRow || toNext || toPrevious) && (
<h1 style={titleStyle}>{title}</h1>
{(addRow || deleteRow || toNext || toPrevious || siblings) && (
<FormMenu
addRow={addRow}
deleteRow={deleteRow}
Expand Down
Loading

0 comments on commit 6982db3

Please sign in to comment.