From e97a56aeb6359d5150bf076ca3d2db506388b1db Mon Sep 17 00:00:00 2001 From: Alexander Rind <1217527+alex-rind@users.noreply.github.com> Date: Mon, 26 Feb 2024 12:56:51 +0100 Subject: [PATCH] minor changes * demo file with fixed date of first map * hide comparison button (instead of only disable) * JSON filename without version info because it includes all maps * wording "Version" to "Karte" * remove unneeded code --- public/Rosa_Braunsteigl-Mueller.json | 314 +++++++++++----------- src/components/ComparisonOptionsPanel.vue | 7 +- src/components/SideMenu.vue | 11 +- src/views/PdfView.vue | 2 +- 4 files changed, 167 insertions(+), 167 deletions(-) diff --git a/public/Rosa_Braunsteigl-Mueller.json b/public/Rosa_Braunsteigl-Mueller.json index 960a4b3..45d005c 100644 --- a/public/Rosa_Braunsteigl-Mueller.json +++ b/public/Rosa_Braunsteigl-Mueller.json @@ -1,157 +1,167 @@ -{ - "ego": { - "name": "Rosa Braunsteigl-Müller", - "currentGender": "weiblich", - "age": "45", - "note": "lorem ipsum" - }, - "alteri": [ - { - "id": 11, - "name": "Ewald", - "role": "Familienangehörige*r", - "roleDefault": true, - "human": true, - "currentGender": "nicht festgelegt", - "genderDefault": true, - "age": "", - "note": "", - "deceased": false, - "edgeType": 1, - "edgeTypeByUser": -1, - "angle": 82.59647651462154, - "distance": 61.56025977017402 - }, - { - "id": 10, - "name": "Josefine", - "role": "Großtante", - "roleDefault": false, - "human": true, - "currentGender": "weiblich", - "genderDefault": false, - "age": "86", - "note": "", - "deceased": false, - "edgeType": "0", - "edgeTypeByUser": "0", - "angle": 63.66630822906832, - "distance": 78.41498418743308 - }, - { - "id": 9, - "name": "Strolchi", - "role": "Hund", - "roleDefault": false, - "human": false, - "currentGender": "nicht festgelegt", - "genderDefault": true, - "age": "", - "note": "", - "deceased": false, - "edgeType": 0, - "edgeTypeByUser": -1, - "angle": 32.91800440620509, - "distance": 49.93474976494444 - }, - { - "id": 8, - "name": "Susi", - "role": "Studienkolleg*in", - "contactOfPartner": false, - "human": true, - "currentGender": "weiblich", - "age": "27", - "note": "", - "edgeType": 1, - "angle": -131.1060924804431, - "distance": 42.31366368839073 - }, - { - "id": 7, - "name": "Dr. Maier", - "role": "Ärzt*in", - "contactOfPartner": false, - "human": true, - "currentGender": "nicht festgelegt", - "age": "", - "note": "", - "edgeType": 1, - "angle": -50.92234207573893, - "distance": 93.73453583270009 - }, - { - "id": 5, - "name": "Hubert", - "role": "Vater", - "contactOfPartner": false, - "human": true, - "currentGender": "männlich", - "age": "", - "note": "", - "deceased": true, - "edgeType": 0, - "angle": 70, - "distance": 103 - }, - { - "id": 4, - "name": "Lara", - "role": "Freund*in", - "contactOfPartner": false, - "human": true, - "currentGender": "divers", - "age": "34", - "note": "", - "edgeType": 2, - "angle": 137.52753497925326, - "distance": 75.01518991342189 - }, - { - "id": 3, - "name": "Max", - "role": "Studienkolleg*in", - "contactOfPartner": false, - "human": true, - "currentGender": "nicht festgelegt", - "age": "", - "note": "", - "edgeType": 1, - "angle": -114.86833156298106, - "distance": 71.90407620902847 - }, - { - "id": 2, - "name": "Richard", - "role": "Lebensgefährt*in", - "contactOfPartner": false, - "human": true, - "currentGender": "männlich", - "age": "", - "note": "", - "edgeType": 1, - "angle": 15.195768445698295, - "distance": 19.709025754817713 - }, +{ + "versions": [ { "id": 1, - "name": "Maria", - "role": "Mutter", - "contactOfPartner": false, - "human": true, - "currentGender": "weiblich", - "age": "", - "note": "", - "edgeType": 1, - "angle": 30.051411748698495, - "distance": 27.853551485665644 + "title": "Erstgespräch", + "date": "2024-02-26", + "nwk": { + "ego": { + "name": "Rosa Braunsteigl-Müller", + "currentGender": "weiblich", + "age": "45", + "note": "lorem ipsum" + }, + "alteri": [ + { + "id": 11, + "name": "Ewald", + "role": "Familienangehörige*r", + "roleDefault": true, + "human": true, + "currentGender": "nicht festgelegt", + "genderDefault": true, + "age": "", + "note": "", + "deceased": false, + "edgeType": 1, + "edgeTypeByUser": -1, + "angle": 82.59647651462154, + "distance": 61.56025977017402 + }, + { + "id": 10, + "name": "Josefine", + "role": "Großtante", + "roleDefault": false, + "human": true, + "currentGender": "weiblich", + "genderDefault": false, + "age": "86", + "note": "", + "deceased": false, + "edgeType": "0", + "edgeTypeByUser": "0", + "angle": 63.66630822906832, + "distance": 78.41498418743308 + }, + { + "id": 9, + "name": "Strolchi", + "role": "Hund", + "roleDefault": false, + "human": false, + "currentGender": "nicht festgelegt", + "genderDefault": true, + "age": "", + "note": "", + "deceased": false, + "edgeType": 0, + "edgeTypeByUser": -1, + "angle": 32.91800440620509, + "distance": 49.93474976494444 + }, + { + "id": 8, + "name": "Susi", + "role": "Studienkolleg*in", + "contactOfPartner": false, + "human": true, + "currentGender": "weiblich", + "age": "27", + "note": "", + "edgeType": 1, + "angle": -131.1060924804431, + "distance": 42.31366368839073 + }, + { + "id": 7, + "name": "Dr. Maier", + "role": "Ärzt*in", + "contactOfPartner": false, + "human": true, + "currentGender": "nicht festgelegt", + "age": "", + "note": "", + "edgeType": 1, + "angle": -50.92234207573893, + "distance": 93.73453583270009 + }, + { + "id": 5, + "name": "Hubert", + "role": "Vater", + "contactOfPartner": false, + "human": true, + "currentGender": "männlich", + "age": "", + "note": "", + "deceased": true, + "edgeType": 0, + "angle": 70, + "distance": 103 + }, + { + "id": 4, + "name": "Lara", + "role": "Freund*in", + "contactOfPartner": false, + "human": true, + "currentGender": "divers", + "age": "34", + "note": "", + "edgeType": 2, + "angle": 137.52753497925326, + "distance": 75.01518991342189 + }, + { + "id": 3, + "name": "Max", + "role": "Studienkolleg*in", + "contactOfPartner": false, + "human": true, + "currentGender": "nicht festgelegt", + "age": "", + "note": "", + "edgeType": 1, + "angle": -114.86833156298106, + "distance": 71.90407620902847 + }, + { + "id": 2, + "name": "Richard", + "role": "Lebensgefährt*in", + "contactOfPartner": false, + "human": true, + "currentGender": "männlich", + "age": "", + "note": "", + "edgeType": 1, + "angle": 15.195768445698295, + "distance": 19.709025754817713 + }, + { + "id": 1, + "name": "Maria", + "role": "Mutter", + "contactOfPartner": false, + "human": true, + "currentGender": "weiblich", + "age": "", + "note": "", + "edgeType": 1, + "angle": 30.051411748698495, + "distance": 27.853551485665644 + } + ], + "connections": [ + { "id1": 1, "id2": 4 }, + { "id1": 1, "id2": 2 }, + { "id1": 1, "id2": 10 }, + { "id1": 11, "id2": 10 }, + { "id1": 11, "id2": 1 } + ] + } } ], - "connections": [ - { "id1": 1, "id2": 4 }, - { "id1": 1, "id2": 2 }, - { "id1": 1, "id2": 10 }, - { "id1": 11, "id2": 10 }, - { "id1": 11, "id2": 1 } - ] + "currentVersion": 1 } diff --git a/src/components/ComparisonOptionsPanel.vue b/src/components/ComparisonOptionsPanel.vue index 001a9a8..e11ac57 100644 --- a/src/components/ComparisonOptionsPanel.vue +++ b/src/components/ComparisonOptionsPanel.vue @@ -77,14 +77,14 @@ Karte wechseln - +
@@ -233,8 +233,7 @@ export default defineComponent({ }; const deleteVersion = () => { - const index: number = currentVersion.value - 1; // TODO AR 29 Aug 2023 bad smell, check! - store.commit("removeCurrentVersion", index); + store.commit("removeCurrentVersion"); }; return { diff --git a/src/components/SideMenu.vue b/src/components/SideMenu.vue index b6b8fa8..ca0eb73 100644 --- a/src/components/SideMenu.vue +++ b/src/components/SideMenu.vue @@ -174,16 +174,7 @@ export default defineComponent({ store.commit("prepareToSaveJSON"); let nwkJSON = JSON.stringify(store.state.record); - let filename = - store.state.nwk.ego.name + - " " + - visibleNWKVersion.value?.title + - " " + - visibleNWKVersion.value?.date?.substring(8, 10) + - "." + - visibleNWKVersion.value?.date?.substring(5, 7) + - "." + - visibleNWKVersion.value?.date?.substring(0, 4); + let filename = store.state.nwk.ego.name; if (store.state.pseudonym.active) { const tempNWK = JSON.parse(nwkJSON) as NWK; diff --git a/src/views/PdfView.vue b/src/views/PdfView.vue index d86f68e..42bbcbc 100644 --- a/src/views/PdfView.vue +++ b/src/views/PdfView.vue @@ -33,7 +33,7 @@

{{ "Ankerperson: " + ego.name }}

- Gedruckte Version: {{ visibleNWKVersion?.title || "" }} + Gedruckte Karte: {{ visibleNWKVersion?.title || "" }} vom {{