Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boreholes table #1440

Merged
merged 46 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
ab66aa7
Rebase improve routing
MiraGeowerkstatt Aug 6, 2024
e8f3aba
Use Datagrid
MiraGeowerkstatt Aug 6, 2024
82fbc26
Fix pagination
MiraGeowerkstatt Aug 7, 2024
6164aad
Get domain values
MiraGeowerkstatt Aug 7, 2024
8a28ebb
Fix bulk edit
MiraGeowerkstatt Aug 7, 2024
ea1abc4
Fix button radius
MiraGeowerkstatt Aug 8, 2024
8a22070
Fix deleting
MiraGeowerkstatt Aug 8, 2024
8437222
Fix navigation
MiraGeowerkstatt Aug 8, 2024
08c6f50
Fix Row hover
MiraGeowerkstatt Aug 8, 2024
b360cdd
Fix Map hover
MiraGeowerkstatt Aug 8, 2024
b090f8f
Remove boreholesEditorTable
MiraGeowerkstatt Aug 8, 2024
77a4274
Add release notes
MiraGeowerkstatt Aug 8, 2024
111ff04
Combine cypress tests
MiraGeowerkstatt Aug 8, 2024
18650c0
Translate pagination
MiraGeowerkstatt Aug 12, 2024
6e2853c
Fix default sorting
MiraGeowerkstatt Aug 12, 2024
b7abf68
Add Borehole copying and fix style
MiraGeowerkstatt Aug 12, 2024
e1c1252
Fix some cypress tests
MiraGeowerkstatt Aug 12, 2024
52d31db
Add borehole lock behaviour
MiraGeowerkstatt Aug 13, 2024
7961642
Fix cy tests
MiraGeowerkstatt Aug 13, 2024
176988b
Fix cy tests
MiraGeowerkstatt Aug 13, 2024
376d5ba
scroll into view
MiraGeowerkstatt Aug 13, 2024
6c94d07
update axios
MiraGeowerkstatt Aug 13, 2024
999df87
Remove sort by borehole type
MiraGeowerkstatt Aug 13, 2024
e2e5cf3
Improve tests
MiraGeowerkstatt Aug 14, 2024
55d62d4
Improve tests
MiraGeowerkstatt Aug 14, 2024
f36a8e6
Merge branch 'main' into boreholes-table
MiraGeowerkstatt Aug 14, 2024
509809f
Remove unused component
MiraGeowerkstatt Aug 14, 2024
c7db3c8
Update axios
MiraGeowerkstatt Aug 14, 2024
f37adc6
Remove unused props
MiraGeowerkstatt Aug 14, 2024
3d29d1d
Fix import
MiraGeowerkstatt Aug 14, 2024
9c2cd7b
Potentially fix source of internal error?
MiraGeowerkstatt Aug 14, 2024
0666d49
Fix expectation
MiraGeowerkstatt Aug 14, 2024
4951ca3
Fix test navigation
MiraGeowerkstatt Aug 14, 2024
34ce9c4
Use mui locales
MiraGeowerkstatt Aug 14, 2024
add9887
Fix test
MiraGeowerkstatt Aug 14, 2024
6a9b744
Fix pagination text verification
MiraGeowerkstatt Aug 14, 2024
40f720a
Use font from theme
MiraGeowerkstatt Aug 14, 2024
21c7d07
Update src/client/src/pages/overview/boreholeTable/boreholeTable.tsx
MiraGeowerkstatt Aug 14, 2024
b3486d6
Center boreholes count
MiraGeowerkstatt Aug 14, 2024
053d311
Fix import
MiraGeowerkstatt Aug 14, 2024
bc5e532
Fix duplicate prompt
MiraGeowerkstatt Aug 14, 2024
80ed219
Undo alternate name
MiraGeowerkstatt Aug 14, 2024
d8edb82
Remove optional dialog width
MiraGeowerkstatt Aug 14, 2024
ab4f25d
Remove argument
MiraGeowerkstatt Aug 14, 2024
9203798
Adapt pagination font size
MiraGeowerkstatt Aug 14, 2024
3d4697b
Replace lock icon
MiraGeowerkstatt Aug 14, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- Removed unused `IsViewer` flag from user.
- Removed unused `UserEvent` from user.
- Migrated `User` API endpoints to .NET API.
- Changed boreholes table design.
- Migrated `Workgroup` API endpoints to .NET API.
- Use `filled` style for form components.

Expand Down
2 changes: 1 addition & 1 deletion config/create-user.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ INSERT INTO bdms.users
VALUES
(
NOW(), true, 'GeoWerkstatt',
'{"filter": {"custom": {"borehole_identifier": true, "project_name": true, "landuse": true, "alternate_name": true, "canton": true, "city": true}, "restriction": true, "restriction_until": true, "extended": {"original_name": true, "method": true, "status": true}, "kind": true, "elevation_z": true, "length": true, "drilling_date": true, "zoom2selected": true}, "boreholetable": {"orderby": "original_name", "direction": "ASC"}, "eboreholetable": {"orderby": "creation", "direction": "DESC"}, "map": {"explorer": {}, "editor": {}}, "appearance": {"explorer": 1}}',
'{"filter": {"custom": {"borehole_identifier": true, "project_name": true, "landuse": true, "alternate_name": true, "canton": true, "city": true}, "restriction": true, "restriction_until": true, "extended": {"original_name": true, "method": true, "status": true}, "kind": true, "elevation_z": true, "length": true, "drilling_date": true, "zoom2selected": true}, "boreholetable": {"orderby": "original_name", "direction": "ASC"}, "eboreholetable": {"orderby": "original_name", "direction": "ASC"}, "map": {"explorer": {}, "editor": {}}, "appearance": {"explorer": 1}}',
'GeoWerkstatt', 'user');
6 changes: 3 additions & 3 deletions db/03-data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ VALUES
' "direction": "ASC"'
' },'
' "eboreholetable": {'
' "orderby": "creation",'
' "direction": "DESC"'
' "orderby": "original_name",'
' "direction": "ASC"'
' },'
' "map": {'
' "explorer": {},'
Expand Down Expand Up @@ -66,7 +66,7 @@ SELECT pg_catalog.setval('bdms.workgroups_id_wgp_seq', 2, false);

INSERT INTO bdms.users VALUES (
1, NULL, true, true, 'admin', crypt('swissforages', gen_salt('md5')),
'{"filter": {"custom": {"borehole_identifier": true, "project_name": true, "landuse": true, "alternate_name": true, "canton": true, "city": true}, "restriction": true, "restriction_until": true, "extended": {"original_name": true, "method": true, "status": true}, "kind": true, "elevation_z": true, "length": true, "drilling_date": true, "zoom2selected": true}, "boreholetable": {"orderby": "original_name", "direction": "ASC"}, "eboreholetable": {"orderby": "creation", "direction": "DESC"}, "map": {"explorer": {}, "editor": {}}, "appearance": {"explorer": 1}}',
'{"filter": {"custom": {"borehole_identifier": true, "project_name": true, "landuse": true, "alternate_name": true, "canton": true, "city": true}, "restriction": true, "restriction_until": true, "extended": {"original_name": true, "method": true, "status": true}, "kind": true, "elevation_z": true, "length": true, "drilling_date": true, "zoom2selected": true}, "boreholetable": {"orderby": "original_name", "direction": "ASC"}, "eboreholetable": {"orderby": "original_name", "direction": "ASC"}, "map": {"explorer": {}, "editor": {}}, "appearance": {"explorer": 1}}',
'admin', NULL, 'user');

INSERT INTO bdms.users_roles(
Expand Down
6 changes: 6 additions & 0 deletions src/api-legacy/v1/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ def getordering(self, orderby, direction):
elif orderby == 'totaldepth':
_orderby = 'total_depth'

elif orderby == 'total_depth':
_orderby = 'total_depth'

elif orderby == 'reference_elevation':
_orderby = 'reference_elevation_bho'

elif orderby == 'top_bedrock_fresh_md':
_orderby = 'top_bedrock_fresh_md'

Expand Down
5 changes: 4 additions & 1 deletion src/api-legacy/v1/borehole/editinglist.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,18 @@ async def execute(
precision_location_y,
precision_location_x_lv03,
precision_location_y_lv03,
reference_elevation_bho as reference_elevation,
srs_id_cli as spatial_reference_system,
elevation_z_bho as elevation_z,
hrs_id_cli as height_reference_system,
total_depth_bho as total_depth,

(
select row_to_json(t)
FROM (
SELECT
status_id_cli as status
status_id_cli as status,
purpose_id_cli as purpose
) t
) as extended,
stratigraphy as stratigraphy,
Expand Down
17 changes: 8 additions & 9 deletions src/api-legacy/v1/borehole/producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,26 +191,25 @@ async def execute(self, request):
request['orderby'] is not None
) and (
'orderby' in self.user['setting']['eboreholetable'] and
self.user[
'setting'
]['eboreholetable']['orderby'] != request['orderby']
('orderby' not in self.user['setting']['eboreholetable'] or
self.user['setting']['eboreholetable']['orderby'] != request['orderby'])
):
await (PatchSetting(conn)).execute(
self.user['id'],
'eboreholetable.orderby',
request['orderby']
)
else:
request['orderby'] = self.user[
'setting'
]['eboreholetable']['orderby']
if 'orderby' in self.user['setting']['eboreholetable']:
request['orderby'] = self.user[
'setting'
]['eboreholetable']['orderby']

if 'direction' in request and (
request['direction'] is not None
) and (
self.user[
'setting'
]['eboreholetable']['direction'] != request['direction']
('direction' not in self.user['setting']['eboreholetable'] or
self.user['setting']['eboreholetable']['direction'] != request['direction'])
):
await (PatchSetting(conn)).execute(
self.user['id'],
Expand Down
4 changes: 2 additions & 2 deletions src/api-legacy/v1/setting/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ async def execute(self, user_id, tree, value, key=None):
"direction": "ASC"
},
"eboreholetable": {
"orderby": "creation",
"direction": "DESC"
"orderby": "original_name",
"direction": "ASC"
},
"map": {
"explorer": {},
Expand Down
2 changes: 1 addition & 1 deletion src/api/Controllers/UserController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public ActionResult ResetAllSettings()
{
// Reset admin settings to initial state
context.Database.ExecuteSqlRaw("UPDATE bdms.users SET settings_usr = null;");
context.Database.ExecuteSqlRaw("UPDATE bdms.users SET settings_usr = '{{\"filter\": {{\"custom\": {{\"borehole_identifier\": true, \"project_name\": true, \"landuse\": true, \"alternate_name\": true, \"canton\": true, \"city\": true}}, \"restriction\": true, \"restriction_until\": true, \"extended\": {{ \"original_name\": true, \"method\": true, \"status\": true}}, \"kind\": true, \"elevation_z\": true, \"length\": true, \"drilling_date\": true, \"zoom2selected\": true}}, \"boreholetable\": {{ \"orderby\": \"original_name\", \"direction\": \"ASC\"}}, \"eboreholetable\": {{ \"orderby\": \"creation\", \"direction\": \"DESC\"}}, \"map\": {{ \"explorer\": {{ }}, \"editor\": {{ }} }}, \"appearance\": {{ \"explorer\": 1}}}}' WHERE username = 'admin';");
context.Database.ExecuteSqlRaw("UPDATE bdms.users SET settings_usr = '{{\"filter\": {{\"custom\": {{\"borehole_identifier\": true, \"project_name\": true, \"landuse\": true, \"alternate_name\": true, \"canton\": true, \"city\": true}}, \"restriction\": true, \"restriction_until\": true, \"extended\": {{ \"original_name\": true, \"method\": true, \"status\": true}}, \"kind\": true, \"elevation_z\": true, \"length\": true, \"drilling_date\": true, \"zoom2selected\": true}}, \"boreholetable\": {{ \"orderby\": \"original_name\", \"direction\": \"ASC\"}}, \"eboreholetable\": {{ \"orderby\": \"original_name\", \"direction\": \"ASC\"}}, \"map\": {{ \"explorer\": {{ }}, \"editor\": {{ }} }}, \"appearance\": {{ \"explorer\": 1}}}}' WHERE username = 'admin';");

// Reset codelist settings to initial state
context.Database.ExecuteSqlRaw("UPDATE bdms.codelist SET conf_cli = '{{\"text\": \"lithology_id_cli\", \"color\": \"lithostratigraphy\", \"title\": \"lithostratigraphy_id_cli\", \"fields\": {{\"color\": true, \"notes\": true, \"debris\": true, \"striae\": true, \"uscs_1\": true, \"uscs_2\": true, \"uscs_3\": true, \"geology\": true, \"cohesion\": true, \"humidity\": true, \"jointing\": true, \"lithology\": true, \"alteration\": true, \"plasticity\": true, \"soil_state\": true, \"compactness\": true, \"consistance\": true, \"description\": true, \"grain_shape\": true, \"lit_pet_deb\": true, \"grain_size_1\": true, \"grain_size_2\": true, \"tectonic_unit\": true, \"uscs_original\": true, \"description_quality\": true, \"grain_granularity\": true, \"lithostratigraphy\": true, \"organic_component\": true, \"chronostratigraphy\": true, \"further_properties\": true, \"uscs_determination\": true}}, \"textNS\": \"custom.lithology_top_bedrock\", \"colorNS\": \"custom.lithostratigraphy_top_bedrock\", \"pattern\": \"lithology\", \"titleNS\": \"custom.chro_str_top_bedrock\", \"patternNS\": \"custom.lithology_top_bedrock\"}}' WHERE conf_cli IS NOT NULL and schema_cli = 'layer_kind';");
Expand Down
148 changes: 0 additions & 148 deletions src/client/cypress/e2e/boreholeList.cy.js

This file was deleted.

Loading
Loading