From 1a6674c81908c162b64de572e1d57e1260c850e7 Mon Sep 17 00:00:00 2001 From: Thomas Hooge Date: Wed, 4 Nov 2026 12:45:16 +0100 Subject: [PATCH] Native gui make almost every data editable --- db/generic.sql | 1 + locale/de.po | 937 ++++++++++++++++---------------- locale/de/LC_MESSAGES/ymsgui.mo | Bin 18255 -> 18869 bytes yms/lookup.py | 1 + yms/model/box.py | 9 +- yms/model/cable.py | 9 +- yms/model/company.py | 9 +- yms/model/document.py | 10 + yms/model/equipment.py | 9 +- yms/model/fuse.py | 11 +- yms/model/inventory.py | 9 +- yms/model/maintenance.py | 14 +- yms/model/measurement.py | 10 + yms/model/project.py | 9 +- yms/model/provision.py | 9 +- yms/model/storage.py | 9 +- yms/model/task.py | 10 + yms/model/vessel.py | 9 +- yms/treeview.py | 22 + yms/ui/boxes.ui | 59 +- yms/ui/cables.ui | 75 ++- yms/ui/companies.ui | 58 +- yms/ui/documents.ui | 58 +- yms/ui/equipment.ui | 57 +- yms/ui/fuses.ui | 211 ++++++- yms/ui/inventory.ui | 57 +- yms/ui/maintenance.ui | 77 ++- yms/ui/measurement.ui | 63 ++- yms/ui/projects.ui | 65 ++- yms/ui/provisions.ui | 57 +- yms/ui/storage.ui | 57 +- yms/ui/tasks.ui | 167 ++++-- yms/view/base.py | 5 +- yms/view/boxes.py | 12 +- yms/view/cables.py | 83 ++- yms/view/documents.py | 29 +- yms/view/equipment.py | 48 +- yms/view/fuses.py | 124 ++++- yms/view/inventory.py | 16 +- yms/view/maintenance.py | 105 +++- yms/view/measurement.py | 108 +++- yms/view/projects.py | 81 ++- yms/view/provisions.py | 12 +- yms/view/status.py | 7 + yms/view/storage.py | 1 - yms/view/tasks.py | 76 ++- yms/view/view.py | 30 +- ymsgui.py | 10 +- 48 files changed, 2168 insertions(+), 737 deletions(-) diff --git a/db/generic.sql b/db/generic.sql index efdbb46..399c22b 100644 --- a/db/generic.sql +++ b/db/generic.sql @@ -13,6 +13,7 @@ INSERT INTO vessel (vid, htype, vesselname, model, loa, lwl, beam, draught, disp (1, 'mono', 'Generic vessel', 'Generic model', 10.0, 9.5, 3.0, 1.8, 4000, 1200, 'generic.svg'); INSERT INTO settings (userid, sno, valint) VALUES +(1, 1, 1), -- Vessel 1 for captain (2, 1, 1), -- Vessel 1 for helmsman (3, 1, 1); -- Vessel 1 for sailor diff --git a/locale/de.po b/locale/de.po index 29771ec..efc0c5a 100644 --- a/locale/de.po +++ b/locale/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: YMS 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-10-24 19:13+0200\n" +"POT-Creation-Date: 2026-11-04 06:46+0100\n" "PO-Revision-Date: 2026-10-21 06:27+0200\n" "Last-Translator: Thomas Hooge \n" "Language-Team: de \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.2.2\n" -#: ymsgui.py:262 +#: ymsgui.py:298 msgid "" "Configuration file '{}' not found.\n" "Default configuration has been created.\n" @@ -31,7 +31,17 @@ msgstr "" "\n" "Anschließend starten Sie dieses Programm neu." -#: ymsgui.py:292 +#: ymsgui.py:324 +msgid "" +"Directory with deck plan files not found.\n" +"\n" +"Please check your configuration file!" +msgstr "" +"Verzeichnis mit Deckslayouts nicht gefunden.\n" +"\n" +"Bitte die Konfigurationsdatei überprügen!" + +#: ymsgui.py:335 msgid "" "Database connection cannot be established.\n" "\n" @@ -51,29 +61,28 @@ msgstr "Basisdaten" #: yms/view/base.py:59 yms/view/base.py:85 yms/view/base.py:89 #: yms/view/base.py:97 yms/view/base.py:166 yms/view/boxes.py:31 -#: yms/view/boxes.py:33 yms/view/cables.py:32 yms/view/cables.py:35 -#: yms/view/cables.py:38 yms/view/companies.py:22 yms/view/companies.py:24 -#: yms/view/equipment.py:36 yms/view/equipment.py:39 yms/view/equipment.py:42 -#: yms/view/fuses.py:47 yms/view/fuses.py:50 yms/view/inventory.py:43 -#: yms/view/inventory.py:46 yms/view/inventory.py:49 yms/view/inventory.py:52 -#: yms/view/inventory.py:55 yms/view/measurement.py:25 -#: yms/view/measurement.py:33 yms/view/measurement.py:37 -#: yms/view/provisions.py:24 yms/view/provisions.py:27 -#: yms/view/provisions.py:30 yms/view/provisions.py:33 yms/view/storage.py:35 -#: yms/view/tasks.py:47 +#: yms/view/boxes.py:33 yms/view/cables.py:30 yms/view/cables.py:33 +#: yms/view/cables.py:36 yms/view/cables.py:39 yms/view/companies.py:22 +#: yms/view/companies.py:24 yms/view/equipment.py:36 yms/view/equipment.py:39 +#: yms/view/equipment.py:42 yms/view/fuses.py:33 yms/view/fuses.py:36 +#: yms/view/inventory.py:43 yms/view/inventory.py:46 yms/view/inventory.py:49 +#: yms/view/inventory.py:52 yms/view/measurement.py:37 +#: yms/view/measurement.py:41 yms/view/provisions.py:24 +#: yms/view/provisions.py:27 yms/view/provisions.py:30 +#: yms/view/provisions.py:33 yms/view/provisions.py:67 yms/view/storage.py:35 +#: yms/view/tasks.py:31 msgid "─── none ───" msgstr "─── keine ───" #: yms/view/base.py:133 yms/view/boxes.py:24 yms/view/cables.py:22 -#: yms/view/companies.py:32 yms/view/documents.py:38 yms/view/equipment.py:25 -#: yms/view/fuses.py:36 yms/view/inventory.py:30 yms/view/maintenance.py:29 -#: yms/view/measurement.py:68 yms/view/projects.py:39 yms/view/provisions.py:38 -#: yms/view/storage.py:25 yms/view/tasks.py:38 +#: yms/view/companies.py:32 yms/view/documents.py:42 yms/view/equipment.py:25 +#: yms/view/fuses.py:22 yms/view/inventory.py:30 yms/view/maintenance.py:21 +#: yms/view/measurement.py:46 yms/view/projects.py:23 yms/view/provisions.py:38 +#: yms/view/storage.py:25 yms/view/tasks.py:22 msgid "ID" msgstr "" #: yms/view/base.py:134 -#, fuzzy msgid "List" msgstr "Liste" @@ -87,8 +96,11 @@ msgid "" "All data on that device will be lost!\n" "Are you really sure?" msgstr "" +"Initialisiere USB-Stick\n" +"Alle Daten auf dem Gerät werden gelöscht!\n" +"Sind Sie wirklich sicher?" -#: yms/view/base.py:336 +#: yms/view/base.py:337 msgid "" "Add new vessel.\n" "Are you sure?" @@ -96,7 +108,7 @@ msgstr "" "Neues Boot hinzufügen.\n" "Sind Sie sicher?" -#: yms/view/base.py:456 +#: yms/view/base.py:458 msgid "" "Delete user!\n" "Are you sure?" @@ -108,38 +120,38 @@ msgstr "" msgid "Boxes" msgstr "Kisten" -#: yms/view/boxes.py:25 yms/ui/boxes.ui:263 yms/ui/boxes.ui:561 +#: yms/view/boxes.py:25 yms/ui/boxes.ui:266 yms/ui/boxes.ui:627 msgid "Label" msgstr "" -#: yms/view/boxes.py:26 yms/ui/boxes.ui:310 yms/ui/boxes.ui:766 +#: yms/view/boxes.py:26 yms/ui/boxes.ui:327 yms/ui/boxes.ui:832 msgid "Content" msgstr "Inhalt" #: yms/view/boxes.py:27 yms/view/companies.py:35 yms/view/equipment.py:31 -#: yms/view/inventory.py:35 yms/view/maintenance.py:32 yms/view/projects.py:44 +#: yms/view/inventory.py:35 yms/view/maintenance.py:24 yms/view/projects.py:28 #: yms/view/storage.py:28 yms/ui/base.ui:513 yms/ui/base.ui:910 -#: yms/ui/boxes.ui:285 yms/ui/boxes.ui:712 yms/ui/cables.ui:113 -#: yms/ui/cables.ui:423 yms/ui/cables.ui:829 yms/ui/companies.ui:423 -#: yms/ui/companies.ui:903 yms/ui/documents.ui:572 yms/ui/documents.ui:766 -#: yms/ui/equipment.ui:455 yms/ui/equipment.ui:929 yms/ui/fuses.ui:98 -#: yms/ui/fuses.ui:353 yms/ui/fuses.ui:639 yms/ui/inventory.ui:378 -#: yms/ui/inventory.ui:801 yms/ui/maintenance.ui:359 yms/ui/maintenance.ui:650 -#: yms/ui/projects.ui:105 yms/ui/projects.ui:349 yms/ui/projects.ui:628 -#: yms/ui/provisions.ui:495 yms/ui/provisions.ui:993 yms/ui/storage.ui:419 -#: yms/ui/storage.ui:827 yms/ui/tasks.ui:507 yms/ui/tasks.ui:716 +#: yms/ui/boxes.ui:295 yms/ui/boxes.ui:778 yms/ui/cables.ui:113 +#: yms/ui/cables.ui:463 yms/ui/cables.ui:908 yms/ui/companies.ui:423 +#: yms/ui/companies.ui:1074 yms/ui/documents.ui:613 yms/ui/documents.ui:819 +#: yms/ui/equipment.ui:493 yms/ui/equipment.ui:1018 yms/ui/fuses.ui:98 +#: yms/ui/fuses.ui:378 yms/ui/fuses.ui:682 yms/ui/inventory.ui:388 +#: yms/ui/inventory.ui:839 yms/ui/maintenance.ui:402 yms/ui/maintenance.ui:717 +#: yms/ui/projects.ui:110 yms/ui/projects.ui:378 yms/ui/projects.ui:688 +#: yms/ui/provisions.ui:489 yms/ui/provisions.ui:1162 yms/ui/storage.ui:471 +#: yms/ui/storage.ui:886 yms/ui/tasks.ui:573 yms/ui/tasks.ui:800 msgid "Remarks" msgstr "Bemerkungen" -#: yms/view/boxes.py:122 +#: yms/view/boxes.py:141 msgid "Add new Box" msgstr "Neue Kiste hinzufügen" -#: yms/view/boxes.py:128 yms/ui/boxes.ui:539 +#: yms/view/boxes.py:147 yms/ui/boxes.ui:605 msgid "Edit Box" msgstr "Kiste bearbeiten" -#: yms/view/boxes.py:159 +#: yms/view/boxes.py:178 msgid "" "Delete box!\n" "Are you sure?" @@ -152,26 +164,34 @@ msgid "Cables" msgstr "Kabel" #: yms/view/cables.py:23 yms/view/companies.py:33 yms/view/equipment.py:26 -#: yms/view/fuses.py:37 yms/view/inventory.py:31 yms/view/projects.py:40 -#: yms/view/storage.py:26 yms/view/tasks.py:39 yms/ui/base.ui:723 -#: yms/ui/boxes.ui:119 yms/ui/cables.ui:91 yms/ui/cables.ui:279 -#: yms/ui/cables.ui:666 yms/ui/companies.ui:234 yms/ui/companies.ui:645 -#: yms/ui/equipment.ui:345 yms/ui/equipment.ui:756 yms/ui/fuses.ui:76 -#: yms/ui/inventory.ui:268 yms/ui/inventory.ui:682 yms/ui/measurement.ui:247 -#: yms/ui/measurement.ui:602 yms/ui/projects.ui:83 yms/ui/projects.ui:272 -#: yms/ui/projects.ui:551 yms/ui/provisions.ui:275 yms/ui/provisions.ui:717 -#: yms/ui/storage.ui:257 yms/ui/storage.ui:544 yms/ui/tasks.ui:346 -#: yms/ui/tasks.ui:677 +#: yms/view/fuses.py:23 yms/view/inventory.py:31 yms/view/projects.py:24 +#: yms/view/storage.py:26 yms/view/tasks.py:23 yms/ui/base.ui:723 +#: yms/ui/boxes.ui:119 yms/ui/cables.ui:91 yms/ui/cables.ui:280 +#: yms/ui/cables.ui:745 yms/ui/companies.ui:234 yms/ui/companies.ui:753 +#: yms/ui/equipment.ui:353 yms/ui/equipment.ui:855 yms/ui/fuses.ui:76 +#: yms/ui/inventory.ui:276 yms/ui/inventory.ui:720 yms/ui/measurement.ui:255 +#: yms/ui/measurement.ui:687 yms/ui/projects.ui:88 yms/ui/projects.ui:280 +#: yms/ui/projects.ui:611 yms/ui/provisions.ui:280 yms/ui/provisions.ui:805 +#: yms/ui/storage.ui:260 yms/ui/storage.ui:603 yms/ui/tasks.ui:370 +#: yms/ui/tasks.ui:761 msgid "Name" msgstr "" -#: yms/view/cables.py:24 yms/view/inventory.py:34 yms/ui/cables.ui:412 -#: yms/ui/cables.ui:818 yms/ui/equipment.ui:624 yms/ui/equipment.ui:1004 -#: yms/ui/inventory.ui:92 yms/ui/inventory.ui:367 yms/ui/inventory.ui:790 +#: yms/view/cables.py:24 yms/view/inventory.py:34 yms/ui/cables.ui:449 +#: yms/ui/cables.ui:897 yms/ui/equipment.ui:716 yms/ui/equipment.ui:1093 +#: yms/ui/inventory.ui:97 yms/ui/inventory.ui:374 yms/ui/inventory.ui:828 msgid "Condition" msgstr "Zustand" -#: yms/view/cables.py:142 +#: yms/view/cables.py:25 yms/ui/cables.ui:337 yms/ui/cables.ui:797 +msgid "Length" +msgstr "Länge" + +#: yms/view/cables.py:166 yms/ui/cables.ui:723 +msgid "Edit Cable" +msgstr "Bearbeite Kabel" + +#: yms/view/cables.py:196 msgid "" "Delete cable!\n" "Are you sure?" @@ -187,23 +207,23 @@ msgstr "Firmen" msgid "─── all ───" msgstr "─── alle ───" -#: yms/view/companies.py:34 yms/view/documents.py:39 yms/ui/boxes.ui:96 -#: yms/ui/boxes.ui:332 yms/ui/boxes.ui:575 yms/ui/cables.ui:301 -#: yms/ui/cables.ui:692 yms/ui/companies.ui:50 yms/ui/companies.ui:220 -#: yms/ui/companies.ui:656 yms/ui/documents.ui:225 yms/ui/fuses.ui:287 -#: yms/ui/fuses.ui:578 yms/ui/inventory.ui:279 yms/ui/storage.ui:280 +#: yms/view/companies.py:34 yms/view/documents.py:43 yms/ui/boxes.ui:96 +#: yms/ui/boxes.ui:356 yms/ui/boxes.ui:641 yms/ui/cables.ui:308 +#: yms/ui/cables.ui:771 yms/ui/companies.ui:50 yms/ui/companies.ui:220 +#: yms/ui/companies.ui:764 yms/ui/documents.ui:224 yms/ui/fuses.ui:294 +#: yms/ui/fuses.ui:624 yms/ui/storage.ui:290 msgid "Type" msgstr "Typ" -#: yms/view/companies.py:129 +#: yms/view/companies.py:137 msgid "Add new Company" msgstr "Neue Firma hinzufügen" -#: yms/view/companies.py:140 +#: yms/view/companies.py:148 msgid "Edit Company" msgstr "Firma bearbeiten" -#: yms/view/companies.py:165 +#: yms/view/companies.py:173 msgid "" "Delete company!\n" "Are you sure?" @@ -211,27 +231,27 @@ msgstr "" "Lösche Firma!\n" "Sind Sie sicher?" -#: yms/view/documents.py:15 +#: yms/view/documents.py:14 msgid "Documents" msgstr "Dokumente" -#: yms/view/documents.py:40 yms/ui/documents.ui:434 yms/ui/documents.ui:755 +#: yms/view/documents.py:44 yms/ui/documents.ui:439 yms/ui/documents.ui:808 msgid "Filename" msgstr "Dateiname" -#: yms/view/documents.py:41 yms/ui/documents.ui:411 yms/ui/documents.ui:733 +#: yms/view/documents.py:45 yms/ui/documents.ui:410 yms/ui/documents.ui:786 msgid "Title" msgstr "Titel" -#: yms/view/documents.py:42 +#: yms/view/documents.py:46 msgid "References" msgstr "Referenzen" -#: yms/view/documents.py:138 +#: yms/view/documents.py:161 msgid "Add new Document" msgstr "Neues Dokument hinzufügen" -#: yms/view/documents.py:174 +#: yms/view/documents.py:197 msgid "" "Delete document!\n" "Are you sure?" @@ -239,21 +259,21 @@ msgstr "" "Lösche Dokument!\n" "Sind Sie sicher?" -#: yms/view/equipment.py:16 yms/view/maintenance.py:31 -#: yms/view/measurement.py:72 yms/ui/fuses.ui:320 yms/ui/fuses.ui:617 -#: yms/ui/inventory.ui:312 yms/ui/inventory.ui:732 yms/ui/maintenance.ui:81 -#: yms/ui/maintenance.ui:270 yms/ui/maintenance.ui:570 yms/ui/measurement.ui:81 -#: yms/ui/measurement.ui:270 yms/ui/measurement.ui:685 +#: yms/view/equipment.py:16 yms/view/maintenance.py:23 +#: yms/view/measurement.py:50 yms/ui/fuses.ui:336 yms/ui/fuses.ui:660 +#: yms/ui/inventory.ui:304 yms/ui/inventory.ui:770 yms/ui/maintenance.ui:91 +#: yms/ui/maintenance.ui:289 yms/ui/maintenance.ui:637 yms/ui/measurement.ui:86 +#: yms/ui/measurement.ui:285 yms/ui/measurement.ui:770 msgid "Equipment" msgstr "Ausrüstung" -#: yms/view/equipment.py:27 yms/ui/cables.ui:401 yms/ui/cables.ui:807 -#: yms/ui/equipment.ui:87 yms/ui/equipment.ui:367 yms/ui/equipment.ui:801 +#: yms/view/equipment.py:27 yms/ui/cables.ui:435 yms/ui/cables.ui:886 +#: yms/ui/equipment.ui:92 yms/ui/equipment.ui:381 yms/ui/equipment.ui:900 msgid "Manufacturer" msgstr "Hersteller" #: yms/view/equipment.py:28 yms/ui/base.ui:91 yms/ui/base.ui:752 -#: yms/ui/base.ui:2004 yms/ui/equipment.ui:378 yms/ui/equipment.ui:812 +#: yms/ui/base.ui:2004 yms/ui/equipment.ui:395 yms/ui/equipment.ui:911 msgid "Model" msgstr "Modell" @@ -265,15 +285,15 @@ msgstr "Seriennummer" msgid "Age" msgstr "Alter" -#: yms/view/equipment.py:148 +#: yms/view/equipment.py:153 msgid "Add new Equipment" msgstr "Neue Ausrüstung hinzufügen" -#: yms/view/equipment.py:158 yms/ui/equipment.ui:736 +#: yms/view/equipment.py:163 yms/ui/equipment.ui:835 msgid "Edit Equipment" msgstr "Ausrüstung bearbeiten" -#: yms/view/equipment.py:186 +#: yms/view/equipment.py:191 msgid "" "Convert equipment to inventory?\n" "Some properties will be lost!\n" @@ -285,7 +305,7 @@ msgstr "" "\n" "Sind Sie sicher?" -#: yms/view/equipment.py:196 +#: yms/view/equipment.py:201 msgid "" "Delete equipment!\n" "Are you sure?" @@ -297,24 +317,28 @@ msgstr "" msgid "Fuses" msgstr "Sicherungen" -#: yms/view/fuses.py:38 yms/ui/fuses.ui:298 yms/ui/fuses.ui:592 +#: yms/view/fuses.py:24 yms/ui/fuses.ui:308 yms/ui/fuses.ui:635 msgid "Current" msgstr "Stromstärke" -#: yms/view/fuses.py:39 yms/view/provisions.py:39 yms/ui/fuses.ui:342 -#: yms/ui/fuses.ui:564 +#: yms/view/fuses.py:25 yms/view/provisions.py:39 yms/ui/fuses.ui:364 +#: yms/ui/fuses.ui:613 msgid "Description" msgstr "Beschreibung" -#: yms/view/fuses.py:96 +#: yms/view/fuses.py:30 +msgid "─── unknown ───" +msgstr "─── unbekannt ───" + +#: yms/view/fuses.py:136 msgid "Add new Fuse" msgstr "Neue Sicherung hinzufügen" -#: yms/view/fuses.py:105 yms/ui/fuses.ui:528 +#: yms/view/fuses.py:145 yms/ui/fuses.ui:577 msgid "Edit Fuse" msgstr "Sicherung bearbeiten" -#: yms/view/fuses.py:133 +#: yms/view/fuses.py:173 msgid "" "Delete fuse!\n" "Are you sure?" @@ -326,21 +350,21 @@ msgstr "" msgid "Inventory" msgstr "Inventar" -#: yms/view/inventory.py:32 yms/ui/inventory.ui:696 +#: yms/view/inventory.py:32 yms/ui/inventory.ui:290 yms/ui/inventory.ui:734 msgid "Container" msgstr "" -#: yms/view/inventory.py:33 yms/view/provisions.py:40 yms/ui/fuses.ui:276 -#: yms/ui/fuses.ui:550 yms/ui/inventory.ui:323 yms/ui/inventory.ui:743 -#: yms/ui/provisions.ui:322 yms/ui/provisions.ui:797 +#: yms/view/inventory.py:33 yms/view/provisions.py:40 yms/ui/fuses.ui:280 +#: yms/ui/fuses.ui:599 yms/ui/inventory.ui:318 yms/ui/inventory.ui:781 +#: yms/ui/provisions.ui:327 yms/ui/provisions.ui:906 msgid "Number" msgstr "" -#: yms/view/inventory.py:166 +#: yms/view/inventory.py:175 msgid "Add new Inventory" msgstr "Neus Inventar hinzufügen" -#: yms/view/inventory.py:177 +#: yms/view/inventory.py:186 msgid "" "Record is locked!\n" "Edit prohibited." @@ -348,11 +372,11 @@ msgstr "" "Datensatz ist gesperrt!\n" "Bearbeiten nicht zulässig." -#: yms/view/inventory.py:183 +#: yms/view/inventory.py:192 msgid "Edit Inventory" msgstr "Inventar bearbeiten" -#: yms/view/inventory.py:211 +#: yms/view/inventory.py:220 msgid "" "Convert inventory to equipment?\n" "Some properties will be lost!\n" @@ -364,7 +388,7 @@ msgstr "" "\n" "Sind Sie sicher?" -#: yms/view/inventory.py:239 +#: yms/view/inventory.py:248 msgid "" "Delete inventory!\n" "Are you sure?" @@ -376,16 +400,16 @@ msgstr "" msgid "Maintenance" msgstr "Wartung" -#: yms/view/maintenance.py:30 yms/ui/maintenance.ui:247 -#: yms/ui/maintenance.ui:556 +#: yms/view/maintenance.py:22 yms/ui/maintenance.ui:260 +#: yms/ui/maintenance.ui:623 msgid "Activities" msgstr "Aktivitäten" -#: yms/view/maintenance.py:87 yms/ui/maintenance.ui:534 +#: yms/view/maintenance.py:98 yms/ui/maintenance.ui:601 msgid "Edit Maintenance" msgstr "Wartung bearbeiten" -#: yms/view/maintenance.py:118 +#: yms/view/maintenance.py:129 msgid "" "Delete maintenance!\n" "Are you sure?" @@ -397,33 +421,33 @@ msgstr "" msgid "Measurements" msgstr "Messungen" -#: yms/view/measurement.py:69 +#: yms/view/measurement.py:47 msgid "Measurement" msgstr "Messung" -#: yms/view/measurement.py:70 +#: yms/view/measurement.py:48 msgid "Value" msgstr "Wert" -#: yms/view/measurement.py:71 yms/ui/measurement.ui:348 -#: yms/ui/measurement.ui:663 +#: yms/view/measurement.py:49 yms/ui/measurement.ui:385 +#: yms/ui/measurement.ui:748 msgid "Accuracy" msgstr "Genauigkeit" -#: yms/view/measurement.py:73 yms/ui/measurement.ui:359 -#: yms/ui/measurement.ui:696 +#: yms/view/measurement.py:51 yms/ui/measurement.ui:399 +#: yms/ui/measurement.ui:781 msgid "Note" msgstr "Notiz" -#: yms/view/measurement.py:134 +#: yms/view/measurement.py:170 msgid "Add new Measurement" msgstr "Maß/Messung hinzufügen" -#: yms/view/measurement.py:140 yms/ui/measurement.ui:580 +#: yms/view/measurement.py:176 yms/ui/measurement.ui:665 msgid "Edit Measurement" msgstr "Maß/Messung bearbeiten" -#: yms/view/measurement.py:171 +#: yms/view/measurement.py:214 msgid "" "Delete measurement!\n" "Are you sure?" @@ -435,31 +459,31 @@ msgstr "" msgid "Projects" msgstr "Projekte" -#: yms/view/projects.py:41 +#: yms/view/projects.py:25 msgid "Start date" msgstr "Startdatum" -#: yms/view/projects.py:42 +#: yms/view/projects.py:26 msgid "Duration" msgstr "Dauer" -#: yms/view/projects.py:43 yms/view/status.py:14 yms/view/tasks.py:41 -#: yms/ui/cables.ui:102 yms/ui/fuses.ui:87 yms/ui/maintenance.ui:348 -#: yms/ui/maintenance.ui:639 yms/ui/projects.ui:94 yms/ui/projects.ui:338 -#: yms/ui/projects.ui:617 yms/ui/status.ui:14 yms/ui/tasks.ui:129 -#: yms/ui/tasks.ui:380 yms/ui/tasks.ui:854 +#: yms/view/projects.py:27 yms/view/status.py:14 yms/view/tasks.py:25 +#: yms/ui/cables.ui:102 yms/ui/fuses.ui:87 yms/ui/maintenance.ui:388 +#: yms/ui/maintenance.ui:706 yms/ui/projects.ui:99 yms/ui/projects.ui:364 +#: yms/ui/projects.ui:677 yms/ui/status.ui:14 yms/ui/tasks.ui:150 +#: yms/ui/tasks.ui:413 yms/ui/tasks.ui:918 msgid "Status" msgstr "" -#: yms/view/projects.py:96 +#: yms/view/projects.py:108 msgid "Add new Project" msgstr "Projekt hinzufügen" -#: yms/view/projects.py:102 yms/ui/projects.ui:529 +#: yms/view/projects.py:114 yms/ui/projects.ui:589 msgid "Edit Project" msgstr "Projekt bearbeiten" -#: yms/view/projects.py:133 +#: yms/view/projects.py:145 msgid "" "Delete project!\n" "Are you sure?" @@ -471,9 +495,9 @@ msgstr "" msgid "Provisions" msgstr "Verpflegung" -#: yms/view/provisions.py:41 yms/ui/measurement.ui:337 -#: yms/ui/measurement.ui:839 yms/ui/provisions.ui:358 yms/ui/provisions.ui:830 -#: yms/ui/storage.ui:868 +#: yms/view/provisions.py:41 yms/ui/measurement.ui:371 +#: yms/ui/measurement.ui:914 yms/ui/provisions.ui:363 yms/ui/provisions.ui:948 +#: yms/ui/storage.ui:927 msgid "Unit" msgstr "Einheit" @@ -485,15 +509,15 @@ msgstr "Gespeichert" msgid "Best before" msgstr "Haltbar bis" -#: yms/view/provisions.py:159 +#: yms/view/provisions.py:165 msgid "Add new Provision" msgstr "Verpflegung hinzufügen" -#: yms/view/provisions.py:165 +#: yms/view/provisions.py:171 msgid "Edit Provision" msgstr "Verpflegung bearbeiten" -#: yms/view/provisions.py:194 +#: yms/view/provisions.py:200 msgid "" "Delete provision!\n" "Are you sure?" @@ -501,9 +525,9 @@ msgstr "" "Lösche Proviant!\n" "Sind Sie sicher?" -#: yms/view/storage.py:14 yms/ui/boxes.ui:442 yms/ui/boxes.ui:864 -#: yms/ui/inventory.ui:81 yms/ui/inventory.ui:290 yms/ui/inventory.ui:710 -#: yms/ui/provisions.ui:300 yms/ui/provisions.ui:739 +#: yms/view/storage.py:14 yms/ui/boxes.ui:501 yms/ui/boxes.ui:931 +#: yms/ui/inventory.ui:86 yms/ui/inventory.ui:748 yms/ui/provisions.ui:305 +#: yms/ui/provisions.ui:830 msgid "Storage" msgstr "Stauraum" @@ -511,15 +535,15 @@ msgstr "Stauraum" msgid "Position" msgstr "" -#: yms/view/storage.py:134 +#: yms/view/storage.py:136 msgid "Add new Storage" msgstr "Stauraum hinzufügen" -#: yms/view/storage.py:143 yms/ui/storage.ui:522 +#: yms/view/storage.py:145 yms/ui/storage.ui:581 msgid "Edit Storage" msgstr "Stauraum bearbeiten" -#: yms/view/storage.py:171 +#: yms/view/storage.py:173 msgid "" "Delete storage!\n" "Are you sure?" @@ -531,25 +555,25 @@ msgstr "" msgid "Tasks" msgstr "Aufgaben" -#: yms/view/tasks.py:40 yms/ui/tasks.ui:77 yms/ui/tasks.ui:369 -#: yms/ui/tasks.ui:788 +#: yms/view/tasks.py:24 yms/ui/tasks.ui:98 yms/ui/tasks.ui:399 +#: yms/ui/tasks.ui:862 msgid "Priority" msgstr "Priorität" -#: yms/view/tasks.py:42 yms/ui/projects.ui:283 yms/ui/projects.ui:562 -#: yms/ui/tasks.ui:556 yms/ui/tasks.ui:702 +#: yms/view/tasks.py:26 yms/ui/projects.ui:294 yms/ui/projects.ui:622 +#: yms/ui/tasks.ui:634 yms/ui/tasks.ui:786 msgid "Responsible" msgstr "Verantwortlich" -#: yms/view/tasks.py:108 +#: yms/view/tasks.py:119 msgid "Add new Task" msgstr "Neue Aufgabe hinzufügen" -#: yms/view/tasks.py:114 yms/ui/tasks.ui:655 +#: yms/view/tasks.py:125 yms/ui/tasks.ui:739 msgid "Edit Task" msgstr "Aufgabe bearbeiten" -#: yms/view/tasks.py:144 +#: yms/view/tasks.py:155 msgid "" "Delete task!\n" "Are you sure?" @@ -613,11 +637,11 @@ msgstr "Standard-Stauraum" msgid "Hull number" msgstr "Rumpfnummer" -#: yms/ui/base.ui:638 yms/ui/base.ui:1299 yms/ui/boxes.ui:474 -#: yms/ui/cables.ui:579 yms/ui/companies.ui:1041 yms/ui/documents.ui:645 -#: yms/ui/equipment.ui:657 yms/ui/fuses.ui:461 yms/ui/inventory.ui:580 -#: yms/ui/maintenance.ui:467 yms/ui/measurement.ui:513 yms/ui/projects.ui:462 -#: yms/ui/provisions.ui:1052 yms/ui/storage.ui:455 yms/ui/tasks.ui:589 +#: yms/ui/base.ui:638 yms/ui/base.ui:1299 yms/ui/boxes.ui:540 +#: yms/ui/cables.ui:658 yms/ui/companies.ui:1243 yms/ui/documents.ui:698 +#: yms/ui/equipment.ui:756 yms/ui/fuses.ui:510 yms/ui/inventory.ui:618 +#: yms/ui/maintenance.ui:534 yms/ui/measurement.ui:598 yms/ui/projects.ui:522 +#: yms/ui/provisions.ui:1235 yms/ui/storage.ui:514 yms/ui/tasks.ui:673 msgid "Delete" msgstr "Löschen" @@ -626,15 +650,15 @@ msgid "Add" msgstr "Hinzufügen" #: yms/ui/base.ui:667 yms/ui/base.ui:1630 yms/ui/boxes.ui:195 -#: yms/ui/boxes.ui:489 yms/ui/cables.ui:209 yms/ui/cables.ui:594 -#: yms/ui/companies.ui:147 yms/ui/companies.ui:1056 yms/ui/documents.ui:343 -#: yms/ui/documents.ui:660 yms/ui/equipment.ui:277 yms/ui/equipment.ui:672 -#: yms/ui/fuses.ui:194 yms/ui/fuses.ui:476 yms/ui/inventory.ui:200 -#: yms/ui/inventory.ui:595 yms/ui/maintenance.ui:179 yms/ui/maintenance.ui:482 -#: yms/ui/measurement.ui:179 yms/ui/measurement.ui:528 yms/ui/projects.ui:203 -#: yms/ui/projects.ui:477 yms/ui/provisions.ui:205 yms/ui/provisions.ui:1067 -#: yms/ui/storage.ui:189 yms/ui/storage.ui:470 yms/ui/tasks.ui:278 -#: yms/ui/tasks.ui:604 +#: yms/ui/boxes.ui:555 yms/ui/cables.ui:209 yms/ui/cables.ui:673 +#: yms/ui/companies.ui:147 yms/ui/companies.ui:1258 yms/ui/documents.ui:342 +#: yms/ui/documents.ui:713 yms/ui/equipment.ui:282 yms/ui/equipment.ui:771 +#: yms/ui/fuses.ui:194 yms/ui/fuses.ui:525 yms/ui/inventory.ui:205 +#: yms/ui/inventory.ui:633 yms/ui/maintenance.ui:189 yms/ui/maintenance.ui:549 +#: yms/ui/measurement.ui:184 yms/ui/measurement.ui:613 yms/ui/projects.ui:208 +#: yms/ui/projects.ui:537 yms/ui/provisions.ui:210 yms/ui/provisions.ui:1250 +#: yms/ui/storage.ui:189 yms/ui/storage.ui:529 yms/ui/tasks.ui:299 +#: yms/ui/tasks.ui:688 msgid "Edit" msgstr "Bearbeiten" @@ -655,10 +679,10 @@ msgid "Draught, min" msgstr "Tiefgang, min" #: yms/ui/base.ui:983 yms/ui/base.ui:1039 yms/ui/base.ui:1053 -#: yms/ui/boxes.ui:647 yms/ui/boxes.ui:662 yms/ui/boxes.ui:677 -#: yms/ui/boxes.ui:788 yms/ui/boxes.ui:801 yms/ui/boxes.ui:814 -#: yms/ui/provisions.ui:577 yms/ui/provisions.ui:601 yms/ui/storage.ui:738 -#: yms/ui/storage.ui:753 yms/ui/storage.ui:768 +#: yms/ui/boxes.ui:713 yms/ui/boxes.ui:728 yms/ui/boxes.ui:743 +#: yms/ui/boxes.ui:854 yms/ui/boxes.ui:867 yms/ui/boxes.ui:880 +#: yms/ui/provisions.ui:571 yms/ui/provisions.ui:595 yms/ui/storage.ui:797 +#: yms/ui/storage.ui:812 yms/ui/storage.ui:827 msgid "0" msgstr "" @@ -670,7 +694,7 @@ msgstr "Gurtposition, vorne" msgid "Hull type" msgstr "Rumpfform" -#: yms/ui/base.ui:1143 yms/ui/provisions.ui:625 +#: yms/ui/base.ui:1143 yms/ui/provisions.ui:619 msgid "0,00" msgstr "" @@ -679,19 +703,19 @@ msgid "Vessel type" msgstr "Bootstyp" #: yms/ui/base.ui:1195 yms/ui/base.ui:1543 yms/ui/base.ui:1818 -#: yms/ui/boxes.ui:938 yms/ui/cables.ui:1011 yms/ui/companies.ui:575 -#: yms/ui/documents.ui:877 yms/ui/equipment.ui:1035 yms/ui/fuses.ui:756 -#: yms/ui/inventory.ui:1030 yms/ui/maintenance.ui:781 yms/ui/measurement.ui:870 -#: yms/ui/projects.ui:744 yms/ui/provisions.ui:648 yms/ui/storage.ui:970 -#: yms/ui/tasks.ui:920 +#: yms/ui/boxes.ui:1061 yms/ui/cables.ui:1148 yms/ui/companies.ui:680 +#: yms/ui/documents.ui:986 yms/ui/equipment.ui:1214 yms/ui/fuses.ui:901 +#: yms/ui/inventory.ui:1148 yms/ui/maintenance.ui:952 +#: yms/ui/measurement.ui:1035 yms/ui/projects.ui:884 yms/ui/provisions.ui:733 +#: yms/ui/storage.ui:1084 yms/ui/tasks.ui:1161 msgid "Save" msgstr "Speichern" -#: yms/ui/base.ui:1209 yms/ui/boxes.ui:952 yms/ui/cables.ui:1025 -#: yms/ui/companies.ui:589 yms/ui/documents.ui:891 yms/ui/equipment.ui:1049 -#: yms/ui/fuses.ui:770 yms/ui/inventory.ui:1044 yms/ui/maintenance.ui:795 -#: yms/ui/measurement.ui:884 yms/ui/projects.ui:758 yms/ui/provisions.ui:662 -#: yms/ui/storage.ui:984 yms/ui/tasks.ui:934 +#: yms/ui/base.ui:1209 yms/ui/boxes.ui:1075 yms/ui/cables.ui:1162 +#: yms/ui/companies.ui:694 yms/ui/documents.ui:1000 yms/ui/equipment.ui:1228 +#: yms/ui/fuses.ui:915 yms/ui/inventory.ui:1162 yms/ui/maintenance.ui:966 +#: yms/ui/measurement.ui:1049 yms/ui/projects.ui:898 yms/ui/provisions.ui:747 +#: yms/ui/storage.ui:1098 yms/ui/tasks.ui:1175 msgid "Cancel" msgstr "Abbruch" @@ -704,10 +728,10 @@ msgid "Vessel" msgstr "Boot" #: yms/ui/base.ui:1285 yms/ui/boxes.ui:181 yms/ui/cables.ui:195 -#: yms/ui/companies.ui:133 yms/ui/documents.ui:329 yms/ui/equipment.ui:263 -#: yms/ui/fuses.ui:180 yms/ui/inventory.ui:186 yms/ui/maintenance.ui:165 -#: yms/ui/measurement.ui:165 yms/ui/projects.ui:188 yms/ui/provisions.ui:191 -#: yms/ui/storage.ui:175 yms/ui/tasks.ui:264 +#: yms/ui/companies.ui:133 yms/ui/documents.ui:328 yms/ui/equipment.ui:268 +#: yms/ui/fuses.ui:180 yms/ui/inventory.ui:191 yms/ui/maintenance.ui:175 +#: yms/ui/measurement.ui:170 yms/ui/projects.ui:193 yms/ui/provisions.ui:196 +#: yms/ui/storage.ui:175 yms/ui/tasks.ui:285 msgid "New" msgstr "Neu" @@ -748,10 +772,10 @@ msgid "User" msgstr "Benutzer" #: yms/ui/base.ui:1617 yms/ui/boxes.ui:209 yms/ui/cables.ui:223 -#: yms/ui/companies.ui:161 yms/ui/documents.ui:357 yms/ui/equipment.ui:291 -#: yms/ui/fuses.ui:208 yms/ui/inventory.ui:214 yms/ui/maintenance.ui:193 -#: yms/ui/measurement.ui:193 yms/ui/projects.ui:218 yms/ui/provisions.ui:219 -#: yms/ui/storage.ui:203 yms/ui/tasks.ui:292 +#: yms/ui/companies.ui:161 yms/ui/documents.ui:356 yms/ui/equipment.ui:296 +#: yms/ui/fuses.ui:208 yms/ui/inventory.ui:219 yms/ui/maintenance.ui:203 +#: yms/ui/measurement.ui:198 yms/ui/projects.ui:223 yms/ui/provisions.ui:224 +#: yms/ui/storage.ui:203 yms/ui/tasks.ui:313 msgid "Details" msgstr "" @@ -832,18 +856,18 @@ msgid "Restore" msgstr "" #: yms/ui/boxes.ui:61 yms/ui/cables.ui:56 yms/ui/companies.ui:24 -#: yms/ui/documents.ui:190 yms/ui/equipment.ui:41 yms/ui/fuses.ui:41 -#: yms/ui/inventory.ui:46 yms/ui/maintenance.ui:46 yms/ui/measurement.ui:46 -#: yms/ui/projects.ui:46 yms/ui/provisions.ui:115 yms/ui/storage.ui:71 -#: yms/ui/tasks.ui:31 +#: yms/ui/documents.ui:189 yms/ui/equipment.ui:46 yms/ui/fuses.ui:41 +#: yms/ui/inventory.ui:51 yms/ui/maintenance.ui:56 yms/ui/measurement.ui:51 +#: yms/ui/projects.ui:51 yms/ui/provisions.ui:120 yms/ui/storage.ui:71 +#: yms/ui/tasks.ui:52 msgid "Clear" msgstr "Löschen" #: yms/ui/boxes.ui:74 yms/ui/cables.ui:69 yms/ui/companies.ui:36 -#: yms/ui/documents.ui:203 yms/ui/equipment.ui:54 yms/ui/fuses.ui:54 -#: yms/ui/inventory.ui:59 yms/ui/maintenance.ui:59 yms/ui/measurement.ui:59 -#: yms/ui/projects.ui:60 yms/ui/provisions.ui:128 yms/ui/storage.ui:84 -#: yms/ui/tasks.ui:44 +#: yms/ui/documents.ui:202 yms/ui/equipment.ui:59 yms/ui/fuses.ui:54 +#: yms/ui/inventory.ui:64 yms/ui/maintenance.ui:69 yms/ui/measurement.ui:64 +#: yms/ui/projects.ui:65 yms/ui/provisions.ui:133 yms/ui/storage.ui:84 +#: yms/ui/tasks.ui:65 msgid "Apply" msgstr "Anwenden" @@ -852,72 +876,73 @@ msgid "Filter Box" msgstr "Filter Kisten" #: yms/ui/boxes.ui:231 yms/ui/cables.ui:245 yms/ui/companies.ui:183 -#: yms/ui/documents.ui:379 yms/ui/equipment.ui:313 yms/ui/fuses.ui:230 -#: yms/ui/inventory.ui:236 yms/ui/maintenance.ui:215 yms/ui/measurement.ui:215 -#: yms/ui/projects.ui:240 yms/ui/provisions.ui:241 yms/ui/storage.ui:225 -#: yms/ui/tasks.ui:314 +#: yms/ui/documents.ui:378 yms/ui/equipment.ui:318 yms/ui/fuses.ui:230 +#: yms/ui/inventory.ui:241 yms/ui/maintenance.ui:225 yms/ui/measurement.ui:220 +#: yms/ui/projects.ui:245 yms/ui/provisions.ui:246 yms/ui/storage.ui:225 +#: yms/ui/tasks.ui:335 msgid "page0" msgstr "" -#: yms/ui/boxes.ui:243 +#: yms/ui/boxes.ui:244 msgid "Box Details" msgstr "Kistendetails" -#: yms/ui/boxes.ui:343 yms/ui/boxes.ui:827 yms/ui/cables.ui:379 -#: yms/ui/cables.ui:785 yms/ui/storage.ui:395 yms/ui/storage.ui:879 +#: yms/ui/boxes.ui:370 yms/ui/boxes.ui:893 yms/ui/cables.ui:407 +#: yms/ui/cables.ui:864 yms/ui/fuses.ui:786 yms/ui/storage.ui:440 +#: yms/ui/storage.ui:938 msgid "Color" -msgstr "" +msgstr "Farbe" -#: yms/ui/boxes.ui:354 yms/ui/boxes.ui:701 yms/ui/cables.ui:368 -#: yms/ui/cables.ui:774 yms/ui/equipment.ui:400 yms/ui/inventory.ui:334 -#: yms/ui/inventory.ui:757 yms/ui/provisions.ui:336 yms/ui/provisions.ui:808 +#: yms/ui/boxes.ui:384 yms/ui/boxes.ui:767 yms/ui/cables.ui:393 +#: yms/ui/cables.ui:853 yms/ui/equipment.ui:423 yms/ui/inventory.ui:332 +#: yms/ui/inventory.ui:795 yms/ui/provisions.ui:341 yms/ui/provisions.ui:920 msgid "Weight" msgstr "Gewicht" -#: yms/ui/boxes.ui:398 yms/ui/boxes.ui:742 yms/ui/provisions.ui:347 -#: yms/ui/provisions.ui:819 +#: yms/ui/boxes.ui:443 yms/ui/boxes.ui:808 yms/ui/provisions.ui:352 +#: yms/ui/provisions.ui:934 msgid "Weight net" msgstr "Nettogewicht" -#: yms/ui/boxes.ui:420 yms/ui/boxes.ui:690 yms/ui/equipment.ui:411 -#: yms/ui/inventory.ui:345 yms/ui/inventory.ui:768 yms/ui/provisions.ui:613 -#: yms/ui/provisions.ui:947 +#: yms/ui/boxes.ui:472 yms/ui/boxes.ui:756 yms/ui/equipment.ui:437 +#: yms/ui/inventory.ui:346 yms/ui/inventory.ui:806 yms/ui/provisions.ui:607 +#: yms/ui/provisions.ui:1102 msgid "Price" msgstr "Preis" -#: yms/ui/boxes.ui:503 yms/ui/cables.ui:608 yms/ui/companies.ui:1070 -#: yms/ui/documents.ui:49 yms/ui/documents.ui:139 yms/ui/documents.ui:674 -#: yms/ui/equipment.ui:686 yms/ui/fuses.ui:490 yms/ui/inventory.ui:609 -#: yms/ui/maintenance.ui:496 yms/ui/measurement.ui:542 yms/ui/projects.ui:491 -#: yms/ui/provisions.ui:1081 yms/ui/storage.ui:484 yms/ui/tasks.ui:618 +#: yms/ui/boxes.ui:569 yms/ui/cables.ui:687 yms/ui/companies.ui:1272 +#: yms/ui/documents.ui:48 yms/ui/documents.ui:138 yms/ui/documents.ui:727 +#: yms/ui/equipment.ui:785 yms/ui/fuses.ui:539 yms/ui/inventory.ui:647 +#: yms/ui/maintenance.ui:563 yms/ui/measurement.ui:627 yms/ui/projects.ui:551 +#: yms/ui/provisions.ui:1264 yms/ui/storage.ui:543 yms/ui/tasks.ui:702 msgid "Close" msgstr "Schließen" -#: yms/ui/boxes.ui:525 yms/ui/cables.ui:630 yms/ui/companies.ui:612 -#: yms/ui/documents.ui:696 yms/ui/equipment.ui:723 yms/ui/fuses.ui:512 -#: yms/ui/inventory.ui:646 yms/ui/maintenance.ui:518 yms/ui/measurement.ui:564 -#: yms/ui/projects.ui:513 yms/ui/provisions.ui:684 yms/ui/storage.ui:506 -#: yms/ui/tasks.ui:640 +#: yms/ui/boxes.ui:591 yms/ui/cables.ui:709 yms/ui/companies.ui:717 +#: yms/ui/documents.ui:749 yms/ui/equipment.ui:822 yms/ui/fuses.ui:561 +#: yms/ui/inventory.ui:684 yms/ui/maintenance.ui:585 yms/ui/measurement.ui:649 +#: yms/ui/projects.ui:573 yms/ui/provisions.ui:769 yms/ui/storage.ui:565 +#: yms/ui/tasks.ui:724 msgid "page1" msgstr "" -#: yms/ui/boxes.ui:608 +#: yms/ui/boxes.ui:674 msgid "Dimensions (L x W x H)" msgstr "Abmessungen (L x B x H)" -#: yms/ui/boxes.ui:621 yms/ui/boxes.ui:634 +#: yms/ui/boxes.ui:687 yms/ui/boxes.ui:700 msgid "x" msgstr "" -#: yms/ui/boxes.ui:755 +#: yms/ui/boxes.ui:821 msgid "mm" msgstr "" -#: yms/ui/boxes.ui:974 yms/ui/cables.ui:1047 yms/ui/companies.ui:1092 -#: yms/ui/documents.ui:943 yms/ui/equipment.ui:1072 yms/ui/fuses.ui:792 -#: yms/ui/inventory.ui:1066 yms/ui/maintenance.ui:817 yms/ui/measurement.ui:906 -#: yms/ui/projects.ui:780 yms/ui/provisions.ui:1103 yms/ui/storage.ui:1006 -#: yms/ui/tasks.ui:956 +#: yms/ui/boxes.ui:1097 yms/ui/cables.ui:1184 yms/ui/companies.ui:1294 +#: yms/ui/documents.ui:1052 yms/ui/equipment.ui:1251 yms/ui/fuses.ui:937 +#: yms/ui/inventory.ui:1184 yms/ui/maintenance.ui:988 +#: yms/ui/measurement.ui:1071 yms/ui/projects.ui:920 yms/ui/provisions.ui:1286 +#: yms/ui/storage.ui:1120 yms/ui/tasks.ui:1197 msgid "page2" msgstr "" @@ -925,42 +950,34 @@ msgstr "" msgid "Filter Cables" msgstr "Filter Kabel" -#: yms/ui/cables.ui:257 +#: yms/ui/cables.ui:258 msgid "Cable Details" msgstr "Kabeldetails" -#: yms/ui/cables.ui:312 yms/ui/cables.ui:707 +#: yms/ui/cables.ui:322 yms/ui/cables.ui:786 msgid "Tech.-name" msgstr "" -#: yms/ui/cables.ui:324 yms/ui/cables.ui:718 -msgid "Length" -msgstr "Länge" - -#: yms/ui/cables.ui:335 yms/ui/cables.ui:733 +#: yms/ui/cables.ui:351 yms/ui/cables.ui:812 msgid "Conductors" msgstr "Leiter" -#: yms/ui/cables.ui:346 yms/ui/cables.ui:748 +#: yms/ui/cables.ui:365 yms/ui/cables.ui:827 msgid "Diameter" msgstr "Durchmesser" -#: yms/ui/cables.ui:357 yms/ui/cables.ui:759 +#: yms/ui/cables.ui:379 yms/ui/cables.ui:838 msgid "Cross section" msgstr "Querschnitt" -#: yms/ui/cables.ui:390 yms/ui/cables.ui:796 yms/ui/equipment.ui:98 -#: yms/ui/equipment.ui:433 yms/ui/equipment.ui:907 +#: yms/ui/cables.ui:421 yms/ui/cables.ui:875 yms/ui/equipment.ui:103 +#: yms/ui/equipment.ui:465 yms/ui/equipment.ui:996 msgid "Supplier" msgstr "Lieferant" -#: yms/ui/cables.ui:644 -msgid "Edit Cable" -msgstr "Bearbeite Kabel" - -#: yms/ui/companies.ui:61 yms/ui/documents.ui:247 yms/ui/equipment.ui:109 -#: yms/ui/inventory.ui:103 yms/ui/maintenance.ui:92 yms/ui/measurement.ui:92 -#: yms/ui/provisions.ui:87 yms/ui/storage.ui:106 yms/ui/tasks.ui:88 +#: yms/ui/companies.ui:61 yms/ui/documents.ui:246 yms/ui/equipment.ui:114 +#: yms/ui/inventory.ui:108 yms/ui/maintenance.ui:102 yms/ui/measurement.ui:97 +#: yms/ui/provisions.ui:92 yms/ui/storage.ui:106 yms/ui/tasks.ui:109 msgid "Text" msgstr "" @@ -976,168 +993,173 @@ msgstr "Bearbeite Firma" msgid "Secondary type" msgstr "Sekundärer Typ" -#: yms/ui/companies.ui:291 yms/ui/companies.ui:678 yms/ui/equipment.ui:356 -#: yms/ui/equipment.ui:770 +#: yms/ui/companies.ui:291 yms/ui/companies.ui:792 yms/ui/equipment.ui:367 +#: yms/ui/equipment.ui:869 msgid "Short name" msgstr "Kurzname" -#: yms/ui/companies.ui:313 yms/ui/companies.ui:689 +#: yms/ui/companies.ui:313 yms/ui/companies.ui:806 msgid "Street" msgstr "Straße" -#: yms/ui/companies.ui:324 yms/ui/companies.ui:700 +#: yms/ui/companies.ui:324 yms/ui/companies.ui:820 msgid "ZIP" msgstr "PLZ" -#: yms/ui/companies.ui:335 yms/ui/companies.ui:711 +#: yms/ui/companies.ui:335 yms/ui/companies.ui:834 msgid "City" msgstr "Stadt" -#: yms/ui/companies.ui:346 yms/ui/companies.ui:722 +#: yms/ui/companies.ui:346 yms/ui/companies.ui:848 msgid "Country" msgstr "Land" -#: yms/ui/companies.ui:357 yms/ui/companies.ui:837 +#: yms/ui/companies.ui:357 yms/ui/companies.ui:990 msgid "Contact" msgstr "Kontakt" -#: yms/ui/companies.ui:368 yms/ui/companies.ui:848 +#: yms/ui/companies.ui:368 yms/ui/companies.ui:1004 msgid "Phone" msgstr "Telefon" -#: yms/ui/companies.ui:379 yms/ui/companies.ui:859 +#: yms/ui/companies.ui:379 yms/ui/companies.ui:1018 msgid "Email" msgstr "" -#: yms/ui/companies.ui:390 yms/ui/companies.ui:870 +#: yms/ui/companies.ui:390 yms/ui/companies.ui:1032 msgid "Web" msgstr "" -#: yms/ui/companies.ui:401 yms/ui/companies.ui:881 +#: yms/ui/companies.ui:401 yms/ui/companies.ui:1046 msgid "Customer no." msgstr "Kundennr." -#: yms/ui/companies.ui:412 yms/ui/companies.ui:892 +#: yms/ui/companies.ui:412 yms/ui/companies.ui:1060 msgid "Contract no." msgstr "Kontraktnr." -#: yms/ui/companies.ui:625 -msgid "Company details" -msgstr "Firmendetails" - -#: yms/ui/companies.ui:667 -msgid "Type secondary" -msgstr "" - -#: yms/ui/companies.ui:1007 yms/ui/equipment.ui:120 yms/ui/equipment.ui:601 -#: yms/ui/inventory.ui:547 yms/ui/inventory.ui:940 +#: yms/ui/companies.ui:565 yms/ui/companies.ui:1203 yms/ui/equipment.ui:125 +#: yms/ui/equipment.ui:686 yms/ui/inventory.ui:578 yms/ui/inventory.ui:968 msgid "Flags" msgstr "" -#: yms/ui/documents.ui:23 -msgid "Preview" -msgstr "Vorschau" +#: yms/ui/companies.ui:578 +msgid "historic" +msgstr "Historisch" -#: yms/ui/documents.ui:36 yms/ui/documents.ui:920 -msgid "Scan" -msgstr "" - -#: yms/ui/documents.ui:236 -msgid "Reference" -msgstr "Referenz" - -#: yms/ui/documents.ui:290 -msgid "Filter Documents" -msgstr "Filter Dokumente" - -#: yms/ui/documents.ui:391 -msgid "Document Details" -msgstr "Dokumentdetails" - -#: yms/ui/documents.ui:445 -msgid "Image extents" -msgstr "Abmaße" - -#: yms/ui/documents.ui:456 -msgid "Mimetype" -msgstr "" - -#: yms/ui/documents.ui:503 -msgid "File size" -msgstr "Dateigröße" - -#: yms/ui/documents.ui:514 -msgid "Upload date" -msgstr "Uploaddatum" - -#: yms/ui/documents.ui:525 yms/ui/documents.ui:807 -msgid "Document type" -msgstr "Dokumentart" - -#: yms/ui/documents.ui:598 -msgid "Role access" -msgstr "" - -#: yms/ui/documents.ui:711 -msgid "Edit Document" -msgstr "Dokument bearbeiten" - -#: yms/ui/documents.ui:831 -msgid "Access level" -msgstr "Zugriffsebene" - -#: yms/ui/documents.ui:905 -msgid "Upload" -msgstr "" - -#: yms/ui/equipment.ui:76 yms/ui/equipment.ui:444 yms/ui/equipment.ui:918 -#: yms/ui/inventory.ui:524 yms/ui/inventory.ui:919 yms/ui/measurement.ui:457 -#: yms/ui/measurement.ui:817 yms/ui/provisions.ui:64 yms/ui/provisions.ui:289 -#: yms/ui/provisions.ui:728 -msgid "Category" -msgstr "Kategorie" - -#: yms/ui/equipment.ui:169 yms/ui/inventory.ui:970 -msgid "ordered" -msgstr "bestellt" - -#: yms/ui/equipment.ui:182 yms/ui/inventory.ui:984 -msgid "removed" -msgstr "entfernt" - -#: yms/ui/equipment.ui:195 yms/ui/inventory.ui:998 yms/ui/tasks.ui:184 +#: yms/ui/companies.ui:592 yms/ui/equipment.ui:200 yms/ui/inventory.ui:1026 +#: yms/ui/tasks.ui:205 msgid "deleted" msgstr "gelöscht" -#: yms/ui/equipment.ui:224 +#: yms/ui/companies.ui:731 +msgid "Company details" +msgstr "Firmendetails" + +#: yms/ui/companies.ui:778 +msgid "Type secondary" +msgstr "" + +#: yms/ui/documents.ui:22 +msgid "Preview" +msgstr "Vorschau" + +#: yms/ui/documents.ui:35 yms/ui/documents.ui:1029 +msgid "Scan" +msgstr "" + +#: yms/ui/documents.ui:235 +msgid "Reference" +msgstr "Referenz" + +#: yms/ui/documents.ui:289 +msgid "Filter Documents" +msgstr "Filter Dokumente" + +#: yms/ui/documents.ui:390 +msgid "Document Details" +msgstr "Dokumentdetails" + +#: yms/ui/documents.ui:453 +msgid "Image extents" +msgstr "Abmaße" + +#: yms/ui/documents.ui:467 +msgid "Mimetype" +msgstr "" + +#: yms/ui/documents.ui:526 +msgid "File size" +msgstr "Dateigröße" + +#: yms/ui/documents.ui:540 +msgid "Upload date" +msgstr "Uploaddatum" + +#: yms/ui/documents.ui:554 yms/ui/documents.ui:860 +msgid "Document type" +msgstr "Dokumentart" + +#: yms/ui/documents.ui:645 +msgid "Role access" +msgstr "" + +#: yms/ui/documents.ui:764 +msgid "Edit Document" +msgstr "Dokument bearbeiten" + +#: yms/ui/documents.ui:884 +msgid "Access level" +msgstr "Zugriffsebene" + +#: yms/ui/documents.ui:1014 +msgid "Upload" +msgstr "" + +#: yms/ui/equipment.ui:81 yms/ui/equipment.ui:479 yms/ui/equipment.ui:1007 +#: yms/ui/inventory.ui:548 yms/ui/inventory.ui:947 yms/ui/measurement.ui:528 +#: yms/ui/measurement.ui:892 yms/ui/provisions.ui:69 yms/ui/provisions.ui:294 +#: yms/ui/provisions.ui:819 +msgid "Category" +msgstr "Kategorie" + +#: yms/ui/equipment.ui:174 yms/ui/inventory.ui:998 +msgid "ordered" +msgstr "bestellt" + +#: yms/ui/equipment.ui:187 yms/ui/inventory.ui:1012 +msgid "removed" +msgstr "entfernt" + +#: yms/ui/equipment.ui:229 msgid "Filter Equipment" msgstr "Filter Ausrüstung" -#: yms/ui/equipment.ui:325 +#: yms/ui/equipment.ui:331 msgid "Equipment details" msgstr "Ausrüstungsdetails" -#: yms/ui/equipment.ui:389 yms/ui/equipment.ui:823 +#: yms/ui/equipment.ui:409 yms/ui/equipment.ui:922 msgid "Serial no." msgstr "Seriennummer" -#: yms/ui/equipment.ui:422 +#: yms/ui/equipment.ui:451 msgid "Date purchase" msgstr "Kaufdatum" -#: yms/ui/equipment.ui:700 yms/ui/inventory.ui:623 +#: yms/ui/equipment.ui:799 yms/ui/inventory.ui:661 msgid "Convert" msgstr "Umwandeln" -#: yms/ui/equipment.ui:834 +#: yms/ui/equipment.ui:933 msgid "Weight, kg" msgstr "Gewicht, kg" -#: yms/ui/equipment.ui:845 +#: yms/ui/equipment.ui:944 msgid "Price, €" msgstr "Preis, €" -#: yms/ui/equipment.ui:856 +#: yms/ui/equipment.ui:955 msgid "Date puchase" msgstr "Kaufdatum" @@ -1145,162 +1167,161 @@ msgstr "Kaufdatum" msgid "Filter Fuses" msgstr "Filter Sicherungen" -#: yms/ui/fuses.ui:242 +#: yms/ui/fuses.ui:243 msgid "Fuse Details" msgstr "Sicherungsdetails" -#: yms/ui/fuses.ui:309 yms/ui/fuses.ui:606 +#: yms/ui/fuses.ui:322 yms/ui/fuses.ui:649 msgid "Cable" msgstr "Kabel" -#: yms/ui/fuses.ui:331 yms/ui/fuses.ui:628 +#: yms/ui/fuses.ui:350 yms/ui/fuses.ui:671 msgid "Location" msgstr "Ort" -#: yms/ui/inventory.ui:146 +#: yms/ui/inventory.ui:151 msgid "Filter Inventory" msgstr "Filter Inventar" -#: yms/ui/inventory.ui:248 +#: yms/ui/inventory.ui:254 msgid "Inventory details" msgstr "Inventardetails" -#: yms/ui/inventory.ui:301 yms/ui/inventory.ui:721 yms/ui/provisions.ui:311 -#: yms/ui/provisions.ui:786 -msgid "Box" -msgstr "Kiste" - -#: yms/ui/inventory.ui:356 +#: yms/ui/inventory.ui:360 msgid "Purchase Date" msgstr "Kaufdatum" -#: yms/ui/inventory.ui:660 +#: yms/ui/inventory.ui:698 msgid "Edit inventory" msgstr "Inventar bearbeiten" -#: yms/ui/inventory.ui:779 +#: yms/ui/inventory.ui:759 yms/ui/provisions.ui:316 yms/ui/provisions.ui:892 +msgid "Box" +msgstr "Kiste" + +#: yms/ui/inventory.ui:817 msgid "Puchase date" msgstr "Kaufdatum" -#: yms/ui/maintenance.ui:126 +#: yms/ui/maintenance.ui:136 msgid "Filter Maintenance" msgstr "Filter Wartung" -#: yms/ui/maintenance.ui:227 +#: yms/ui/maintenance.ui:238 msgid "Maintenance Details" msgstr "Wartungsdetails" -#: yms/ui/maintenance.ui:293 yms/ui/maintenance.ui:584 +#: yms/ui/maintenance.ui:318 yms/ui/maintenance.ui:651 msgid "Series" msgstr "Serie" -#: yms/ui/maintenance.ui:304 +#: yms/ui/maintenance.ui:332 msgid "Interval hours" msgstr "" -#: yms/ui/maintenance.ui:315 yms/ui/maintenance.ui:606 +#: yms/ui/maintenance.ui:346 yms/ui/maintenance.ui:673 msgid "Last hours" msgstr "" -#: yms/ui/maintenance.ui:326 yms/ui/maintenance.ui:617 yms/ui/tasks.ui:438 +#: yms/ui/maintenance.ui:360 yms/ui/maintenance.ui:684 yms/ui/tasks.ui:486 msgid "Plan date" msgstr "Plandatum" -#: yms/ui/maintenance.ui:337 yms/ui/maintenance.ui:628 +#: yms/ui/maintenance.ui:374 yms/ui/maintenance.ui:695 msgid "Completion date" msgstr "Fertigstellungsdatum" -#: yms/ui/maintenance.ui:595 +#: yms/ui/maintenance.ui:662 msgid "Interval" msgstr "Intervall" -#: yms/ui/measurement.ui:126 +#: yms/ui/measurement.ui:131 msgid "Filter Measurement" msgstr "Filter Maß/Messung" -#: yms/ui/measurement.ui:227 +#: yms/ui/measurement.ui:233 msgid "Measurement Details" msgstr "Maß/Messung-Details" -#: yms/ui/measurement.ui:293 +#: yms/ui/measurement.ui:315 msgid "Dimensions" msgstr "Abmessungen" -#: yms/ui/measurement.ui:304 yms/ui/measurement.ui:630 +#: yms/ui/measurement.ui:329 yms/ui/measurement.ui:715 msgid "Value 1" msgstr "Wert 1" -#: yms/ui/measurement.ui:315 yms/ui/measurement.ui:641 +#: yms/ui/measurement.ui:343 yms/ui/measurement.ui:726 msgid "Value 2" msgstr "Wert 2" -#: yms/ui/measurement.ui:326 yms/ui/measurement.ui:652 +#: yms/ui/measurement.ui:357 yms/ui/measurement.ui:737 msgid "Value 3" msgstr "Wert 3" -#: yms/ui/measurement.ui:480 yms/ui/measurement.ui:674 +#: yms/ui/measurement.ui:558 yms/ui/measurement.ui:759 msgid "Date" msgstr "Datum" #. 1 to 3 dimensions -#: yms/ui/measurement.ui:616 +#: yms/ui/measurement.ui:701 msgctxt "measurement" msgid "Dimensions" msgstr "Dimensionen" -#: yms/ui/projects.ui:149 +#: yms/ui/projects.ui:154 msgid "Filter Projects" msgstr "Filter Projekte" -#: yms/ui/projects.ui:252 +#: yms/ui/projects.ui:258 msgid "Project Details" msgstr "Projektdetails" -#: yms/ui/projects.ui:294 yms/ui/projects.ui:573 +#: yms/ui/projects.ui:308 yms/ui/projects.ui:633 msgid "Date start" msgstr "Startdatum" -#: yms/ui/projects.ui:305 +#: yms/ui/projects.ui:322 msgid "Duration, days" msgstr "Dauer, Tage" -#: yms/ui/projects.ui:316 yms/ui/projects.ui:595 +#: yms/ui/projects.ui:336 yms/ui/projects.ui:655 msgid "Costs plan" msgstr "Geplante Kosten" -#: yms/ui/projects.ui:327 yms/ui/projects.ui:606 +#: yms/ui/projects.ui:350 yms/ui/projects.ui:666 msgid "Costs final" msgstr "Tatsächliche Kosten" -#: yms/ui/projects.ui:584 +#: yms/ui/projects.ui:644 msgid "Duration days" msgstr "" -#: yms/ui/provisions.ui:152 +#: yms/ui/provisions.ui:157 msgid "Filter Provisions" msgstr "Filter Verpflegung" -#: yms/ui/provisions.ui:253 +#: yms/ui/provisions.ui:258 msgid "Edit provision" msgstr "Verpflegung bearbeiten" -#: yms/ui/provisions.ui:369 yms/ui/provisions.ui:841 +#: yms/ui/provisions.ui:374 yms/ui/provisions.ui:962 msgid "Storedate" msgstr "Einlagerdatum" -#: yms/ui/provisions.ui:380 yms/ui/provisions.ui:852 +#: yms/ui/provisions.ui:385 yms/ui/provisions.ui:976 msgid "Shelflife" msgstr "Haltbarkeit" -#: yms/ui/provisions.ui:565 yms/ui/provisions.ui:970 +#: yms/ui/provisions.ui:559 yms/ui/provisions.ui:1132 msgid "Target" msgstr "Zielbestand" -#: yms/ui/provisions.ui:589 yms/ui/provisions.ui:1019 +#: yms/ui/provisions.ui:583 yms/ui/provisions.ui:1195 msgid "Calories" msgstr "Kalorien" -#: yms/ui/provisions.ui:697 +#: yms/ui/provisions.ui:783 msgid "View Provision" msgstr "Verpflegung ansehen" @@ -1330,91 +1351,91 @@ msgstr "Konfiguration" msgid "Filter Storage" msgstr "Filter Stauraum" -#: yms/ui/storage.ui:237 +#: yms/ui/storage.ui:238 msgid "Storage Details" msgstr "Stauraumdetails" -#: yms/ui/storage.ui:291 +#: yms/ui/storage.ui:304 msgid "Position (x, y, z)" msgstr "" -#: yms/ui/storage.ui:302 +#: yms/ui/storage.ui:318 msgid "Dimension (x, y, z)" msgstr "Maße (x, y, z)" -#: yms/ui/storage.ui:313 yms/ui/storage.ui:781 +#: yms/ui/storage.ui:332 yms/ui/storage.ui:840 msgid "Angle" msgstr "Winkel" -#: yms/ui/storage.ui:324 yms/ui/storage.ui:804 +#: yms/ui/storage.ui:346 yms/ui/storage.ui:863 msgid "Capacity" msgstr "Kapazität" -#: yms/ui/storage.ui:558 +#: yms/ui/storage.ui:617 msgid "Typ" msgstr "Typ" -#: yms/ui/storage.ui:572 +#: yms/ui/storage.ui:631 msgid "Position, mm" msgstr "" -#: yms/ui/storage.ui:686 +#: yms/ui/storage.ui:745 msgid "Width, mm" msgstr "Breite, mm" -#: yms/ui/storage.ui:916 +#: yms/ui/storage.ui:975 msgid "Deg" msgstr "Grad" -#: yms/ui/tasks.ui:66 yms/ui/tasks.ui:777 +#: yms/ui/tasks.ui:87 yms/ui/tasks.ui:851 msgid "Project" msgstr "Projekt" -#: yms/ui/tasks.ui:142 +#: yms/ui/tasks.ui:163 msgid "pending" msgstr "Ausstehend" -#: yms/ui/tasks.ui:156 +#: yms/ui/tasks.ui:177 msgid "active" msgstr "Aktiv" -#: yms/ui/tasks.ui:170 +#: yms/ui/tasks.ui:191 msgid "waiting" msgstr "Wartend" -#: yms/ui/tasks.ui:198 +#: yms/ui/tasks.ui:219 msgid "completed" msgstr "Abgeschlossen" -#: yms/ui/tasks.ui:225 +#: yms/ui/tasks.ui:246 msgid "Filter Tasks" msgstr "Filter Aufgaben" -#: yms/ui/tasks.ui:326 +#: yms/ui/tasks.ui:348 msgid "Task Details" msgstr "Aufgabendetails" -#: yms/ui/tasks.ui:391 +#: yms/ui/tasks.ui:427 msgid "Timestamp" msgstr "Zeitstempel" -#: yms/ui/tasks.ui:449 +#: yms/ui/tasks.ui:500 msgid "Due date" msgstr "Fälligkeitsdatum" -#: yms/ui/tasks.ui:460 yms/ui/tasks.ui:868 +#: yms/ui/tasks.ui:514 yms/ui/tasks.ui:932 msgid "Started" msgstr "Gestartet" -#: yms/ui/tasks.ui:533 yms/ui/tasks.ui:879 +#: yms/ui/tasks.ui:605 yms/ui/tasks.ui:943 msgid "Finished" msgstr "Beendet" -#: yms/ui/tasks.ui:812 +#: yms/ui/tasks.ui:886 msgid "Plan Date" msgstr "Plandatum" -#: yms/ui/tasks.ui:823 +#: yms/ui/tasks.ui:897 msgid "Due Date" msgstr "Fälligkeitsdatum" @@ -1458,32 +1479,32 @@ msgctxt "cable.cablecond" msgid "unknown" msgstr "Unbekannt" -#: db/mariadb.sql:529 +#: db/mariadb.sql:530 msgctxt "checkitem.checkresult" msgid "checked" msgstr "Markiert" -#: db/mariadb.sql:529 +#: db/mariadb.sql:530 msgctxt "checkitem.checkresult" msgid "unchecked" msgstr "Unmarkiert" -#: db/mariadb.sql:529 +#: db/mariadb.sql:530 msgctxt "checkitem.checkresult" msgid "unused" msgstr "Unbenutzt" -#: db/mariadb.sql:512 +#: db/mariadb.sql:513 msgctxt "checklist.clstate" msgid "closed" msgstr "Geschlossen" -#: db/mariadb.sql:512 +#: db/mariadb.sql:513 msgctxt "checklist.clstate" msgid "new" msgstr "Neu" -#: db/mariadb.sql:512 +#: db/mariadb.sql:513 msgctxt "checklist.clstate" msgid "open" msgstr "Offen" @@ -1498,87 +1519,87 @@ msgctxt "company.flags" msgid "historic" msgstr "Historisch" -#: db/mariadb.sql:397 +#: db/mariadb.sql:398 msgctxt "docref.reftype" msgid "box" msgstr "Kiste" -#: db/mariadb.sql:397 +#: db/mariadb.sql:398 msgctxt "docref.reftype" msgid "company" msgstr "Firma" -#: db/mariadb.sql:397 +#: db/mariadb.sql:398 msgctxt "docref.reftype" msgid "equipment" msgstr "Ausrüstung" -#: db/mariadb.sql:397 +#: db/mariadb.sql:398 msgctxt "docref.reftype" msgid "maint" msgstr "Wartung" -#: db/mariadb.sql:397 +#: db/mariadb.sql:398 msgctxt "docref.reftype" msgid "project" msgstr "Projekt" -#: db/mariadb.sql:397 +#: db/mariadb.sql:398 msgctxt "docref.reftype" msgid "task" msgstr "Aufgabe" -#: db/mariadb.sql:397 +#: db/mariadb.sql:398 msgctxt "docref.reftype" msgid "user" msgstr "Benutzer" -#: db/mariadb.sql:397 +#: db/mariadb.sql:398 msgctxt "docref.reftype" msgid "vessel" msgstr "Boot" -#: db/mariadb.sql:379 +#: db/mariadb.sql:380 msgctxt "document.doctype" msgid "drawing" msgstr "Zeichnung" -#: db/mariadb.sql:379 +#: db/mariadb.sql:380 msgctxt "document.doctype" msgid "generic" msgstr "Allgemein" -#: db/mariadb.sql:379 +#: db/mariadb.sql:380 msgctxt "document.doctype" msgid "invoice" msgstr "Rechnung" -#: db/mariadb.sql:379 +#: db/mariadb.sql:380 msgctxt "document.doctype" msgid "manual" msgstr "Handbuch" -#: db/mariadb.sql:379 +#: db/mariadb.sql:380 msgctxt "document.doctype" msgid "picture" msgstr "Bild" -#: db/mariadb.sql:390 +#: db/mariadb.sql:391 msgctxt "document.roleaccess" msgid "captain" msgstr "Kapitän" -#: db/mariadb.sql:390 +#: db/mariadb.sql:391 msgctxt "document.roleaccess" msgid "helmsman" msgstr "Steuermann" -#: db/mariadb.sql:390 +#: db/mariadb.sql:391 msgctxt "document.roleaccess" msgid "sailor" msgstr "Seemann" -#: db/mariadb.sql:390 +#: db/mariadb.sql:391 msgctxt "document.roleaccess" msgid "unauth" msgstr "Unauthorisiert" @@ -1703,162 +1724,162 @@ msgctxt "inventory.invcond" msgid "unknown" msgstr "Unbekannt" -#: db/mariadb.sql:424 +#: db/mariadb.sql:425 msgctxt "maintenance.maintstate" msgid "done" msgstr "Erledigt" -#: db/mariadb.sql:424 +#: db/mariadb.sql:425 msgctxt "maintenance.maintstate" msgid "missed" msgstr "Verpaßt" -#: db/mariadb.sql:424 +#: db/mariadb.sql:425 msgctxt "maintenance.maintstate" msgid "new" msgstr "Neu" -#: db/mariadb.sql:424 +#: db/mariadb.sql:425 msgctxt "maintenance.maintstate" msgid "ongoing" msgstr "Laufend" -#: db/mariadb.sql:424 +#: db/mariadb.sql:425 msgctxt "maintenance.maintstate" msgid "plan" msgstr "Geplant" -#: db/mariadb.sql:424 +#: db/mariadb.sql:425 msgctxt "maintenance.maintstate" msgid "skipped" msgstr "Übersprungen" -#: db/mariadb.sql:419 +#: db/mariadb.sql:420 msgctxt "maintenance.plan_precision" msgid "day" msgstr "Tag" -#: db/mariadb.sql:419 +#: db/mariadb.sql:420 msgctxt "maintenance.plan_precision" msgid "month" msgstr "Monat" -#: db/mariadb.sql:419 +#: db/mariadb.sql:420 msgctxt "maintenance.plan_precision" msgid "quarter" msgstr "Quartal" -#: db/mariadb.sql:419 +#: db/mariadb.sql:420 msgctxt "maintenance.plan_precision" msgid "week" msgstr "Woche" -#: db/mariadb.sql:334 +#: db/mariadb.sql:335 msgctxt "measurement.accuracy" msgid "estimated" msgstr "Geschätzt" -#: db/mariadb.sql:334 +#: db/mariadb.sql:335 msgctxt "measurement.accuracy" msgid "normal" msgstr "Normal" -#: db/mariadb.sql:334 +#: db/mariadb.sql:335 msgctxt "measurement.accuracy" msgid "precise" msgstr "Genau" -#: db/mariadb.sql:334 +#: db/mariadb.sql:335 msgctxt "measurement.accuracy" msgid "rough" msgstr "Grob" -#: db/mariadb.sql:334 +#: db/mariadb.sql:335 msgctxt "measurement.accuracy" msgid "unknown" msgstr "Unbekannt" -#: db/mariadb.sql:485 +#: db/mariadb.sql:486 msgctxt "note.notetype" msgid "equip" msgstr "Ausrüstung" -#: db/mariadb.sql:485 +#: db/mariadb.sql:486 msgctxt "note.notetype" msgid "maint" msgstr "Wartung" -#: db/mariadb.sql:485 +#: db/mariadb.sql:486 msgctxt "note.notetype" msgid "task" msgstr "Aufgabe" -#: db/mariadb.sql:445 +#: db/mariadb.sql:446 msgctxt "project.projstate" msgid "finished" msgstr "Beendet" -#: db/mariadb.sql:445 +#: db/mariadb.sql:446 msgctxt "project.projstate" msgid "new" msgstr "Neu" -#: db/mariadb.sql:445 +#: db/mariadb.sql:446 msgctxt "project.projstate" msgid "ongoing" msgstr "Laufend" -#: db/mariadb.sql:445 +#: db/mariadb.sql:446 msgctxt "project.projstate" msgid "paused" msgstr "Pausiert" -#: db/mariadb.sql:445 +#: db/mariadb.sql:446 msgctxt "project.projstate" msgid "plan" msgstr "Geplant" -#: db/mariadb.sql:500 +#: db/mariadb.sql:501 msgctxt "property.objtype" msgid "equip" msgstr "Ausrüstung" -#: db/mariadb.sql:500 +#: db/mariadb.sql:501 msgctxt "property.objtype" msgid "inv" msgstr "Inventar" -#: db/mariadb.sql:500 +#: db/mariadb.sql:501 msgctxt "property.objtype" msgid "maint" msgstr "Wartung" -#: db/mariadb.sql:500 +#: db/mariadb.sql:501 msgctxt "property.objtype" msgid "proj" msgstr "Projekt" -#: db/mariadb.sql:500 +#: db/mariadb.sql:501 msgctxt "property.objtype" msgid "vessel" msgstr "Boot" -#: db/mariadb.sql:582 +#: db/mariadb.sql:583 msgctxt "revision.revtype" msgid "dropdown" msgstr "Dropdown" -#: db/mariadb.sql:582 +#: db/mariadb.sql:583 msgctxt "revision.revtype" msgid "table" msgstr "Tabelle" -#: db/mariadb.sql:553 +#: db/mariadb.sql:554 msgctxt "signalk.objtype" msgid "equipment" msgstr "Ausrüstung" -#: db/mariadb.sql:553 +#: db/mariadb.sql:554 msgctxt "signalk.objtype" msgid "storage" msgstr "Stauraum" @@ -1913,42 +1934,42 @@ msgctxt "tagref.objtype" msgid "task" msgstr "Aufgabe" -#: db/mariadb.sql:461 +#: db/mariadb.sql:462 msgctxt "task.priority" msgid "high" msgstr "Hoch" -#: db/mariadb.sql:461 +#: db/mariadb.sql:462 msgctxt "task.priority" msgid "low" msgstr "Niedrig" -#: db/mariadb.sql:461 +#: db/mariadb.sql:462 msgctxt "task.priority" msgid "medium" msgstr "Mittel" -#: db/mariadb.sql:462 +#: db/mariadb.sql:463 msgctxt "task.taskstate" msgid "active" msgstr "Aktiv" -#: db/mariadb.sql:462 +#: db/mariadb.sql:463 msgctxt "task.taskstate" msgid "completed" msgstr "Abgeschlossen" -#: db/mariadb.sql:462 +#: db/mariadb.sql:463 msgctxt "task.taskstate" msgid "deleted" msgstr "Gelöscht" -#: db/mariadb.sql:462 +#: db/mariadb.sql:463 msgctxt "task.taskstate" msgid "pending" msgstr "Ausstehend" -#: db/mariadb.sql:462 +#: db/mariadb.sql:463 msgctxt "task.taskstate" msgid "waiting" msgstr "Wartend" diff --git a/locale/de/LC_MESSAGES/ymsgui.mo b/locale/de/LC_MESSAGES/ymsgui.mo index 65e1b7a47456368649e3a08e827b374f8ef1af66..ed45754655a935adb39d4a08b4681b25a821e3bb 100644 GIT binary patch literal 18869 zcmb`N37A}EnePwK1kyr)5M`GW*&*E|VG9w2PC6S&phhQKb*ep8l}>`V zAnu^fu-+LF2N?yF5yxeK!3#|5Wd;YGLB#7F1qX)_xh{jaA=lyl{@?eWs_N<__qor# z=jpe8-}`?1{+;vnGjn@x3V1HxEeH;W^IjJO&*I+a4YCHo2amuFKLq!NH^W|dJKO`_ z1Bnv+72FR#2=|AN!vo;IK*j&L>3@I+qVMxYA3lT%x6t%uP~kT~f(DmE<#RRM6TZjz z0XQ4|de{SRfpg&}j9-BB(EkpqeBXmg=f|f11S-9kjjzCc(O-kJ;J!!t`p$#Wk1+jc zV;@w$r$eRlX5)Zy6;%1wL$%9hW6A83Q0@30sPwOc>WCZQUhss_a}iW~oN4+>xDNe% zHK=s=n(ym12g-gpRC-6l4R8@uJ+3wThoIWwW~lV;gew0RpxW4zTW<1H}` zLzO>;s_z!4@pui?c=`x*;}UA<-UEl=qfqsod$f;tB-Hpk396oFLG{ylQ0b3ArGE)j zyfRciP2)R_AAobPe;oF}+s%F_R5|X2ihn;;KHq=}{~f6Oo-_StP~~~mxX&>@-VspY zPc;2ZsCX+)A2R<-jTQ613Ti&R&-7cM%KsNo<+=x|JYRvzcgpyb@p-6n|JL+9j`j0u zp7A)S@vsyspYx!~c?nd!aj5*Zn*JWRC;CUB+Vw`La(oJ^KA(fGJn#baDX91d9_R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yIAO+92*dMN@3^Bd_ab`cqRys}=MufsJ!zI5&cJ)u~x$>Wy>tBoHng#hS~9##2_vfuNE0 zOjg=_qS~bi3=kp77YclD_Io90TObat>KIG>%uGz%lt)s2H zO;K1(_(#2sI*4-o*SD3nx1iPGx%zA1ryY}xhUPHjp9|g9*}CkSY%skN+p4Xp&i34D l2TaQ9y2>d3aN!Lld~=s2OSSbGjU_ez8Lj2P3>@cu{vTBSCWZh2 diff --git a/yms/lookup.py b/yms/lookup.py index e8684f4..c986556 100644 --- a/yms/lookup.py +++ b/yms/lookup.py @@ -132,6 +132,7 @@ class Lookup: 'inventory.invcond': ('inventory', 'invcond'), 'inventory.flags': ('inventory', 'flags'), 'maintenance.maintstate': ('maintenance', 'maintstate'), + 'maintenance.plan_precision': ('maintenance', 'plan_precision'), 'measurement.accuracy': ('measurement', 'accuracy'), 'note.notetype': ('note', 'notetype'), 'project.projstate': ('project', 'projstate'), diff --git a/yms/model/box.py b/yms/model/box.py index 5bff792..c7d9152 100644 --- a/yms/model/box.py +++ b/yms/model/box.py @@ -15,6 +15,11 @@ class Box(DbRecord): self.title = _("Box({})") def save(self, commit=True): - super().save(Table.BOXES) + if not super().save(Table.BOXES): + return False if commit: - self.conn.commit() + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True diff --git a/yms/model/cable.py b/yms/model/cable.py index e4522ba..2018e41 100644 --- a/yms/model/cable.py +++ b/yms/model/cable.py @@ -16,6 +16,11 @@ class Cable(DbRecord): self.title = _("Cable({})") def save(self, commit=True): - super().save(Table.CABLES) + if not super().save(Table.CABLES): + return False if commit: - self.conn.commit() + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True diff --git a/yms/model/company.py b/yms/model/company.py index a8a9870..21723c3 100644 --- a/yms/model/company.py +++ b/yms/model/company.py @@ -22,6 +22,11 @@ class Company(DbRecord): self.title = _("Company({})") def save(self, commit=True): - super().save(Table.COMPANIES) + if not super().save(Table.COMPANIES): + return False if commit: - self.conn.commit() + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True diff --git a/yms/model/document.py b/yms/model/document.py index 8b39937..751f5b9 100644 --- a/yms/model/document.py +++ b/yms/model/document.py @@ -13,3 +13,13 @@ class Document(DbRecord): def __init__(self, db, docid=None): super().__init__(db, docid) self.title = _("Document({})") + + def save(self, commit=True): + if not super().save(): + return False + if commit: + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True diff --git a/yms/model/equipment.py b/yms/model/equipment.py index f67858a..11ccd5e 100644 --- a/yms/model/equipment.py +++ b/yms/model/equipment.py @@ -16,6 +16,11 @@ class Equipment(DbRecord): self.title = _("Equipment({})") def save(self, commit=True): - super().save(Table.EQUIPMENT) + if not super().save(Table.EQUIPMENT): + return False if commit: - self.conn.commit() + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True diff --git a/yms/model/fuse.py b/yms/model/fuse.py index d03bf36..369c644 100644 --- a/yms/model/fuse.py +++ b/yms/model/fuse.py @@ -8,13 +8,18 @@ class Fuse(DbRecord): table = "fuse" pk_field = "fuseid" fields = ('fuseid', 'vid', 'fnumber', 'ftype', 'current', 'cableid', - 'eid', 'location', 'description', 'remarks') + 'eid', 'location', 'description', 'color', 'remarks') def __init__(self, db, fuseid=None): super().__init__(db, fuseid) self.title = _("Fuse({})") def save(self, commit=True): - super().save(Table.FUSES) + if not super().save(Table.FUSES): + return False if commit: - self.conn.commit() + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True diff --git a/yms/model/inventory.py b/yms/model/inventory.py index 01b1175..d17e3e5 100644 --- a/yms/model/inventory.py +++ b/yms/model/inventory.py @@ -16,6 +16,11 @@ class Inventory(DbRecord): self.title = _("Inventory({})") def save(self, commit=True): - super().save() + if not super().save(): + return False if commit: - self.conn.commit() + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True diff --git a/yms/model/maintenance.py b/yms/model/maintenance.py index 50ae8b9..a341969 100644 --- a/yms/model/maintenance.py +++ b/yms/model/maintenance.py @@ -7,9 +7,19 @@ class Maintenance(DbRecord): table = "maintenance" pk_field = "maintid" fields = ('maintid', 'vid', 'eid', 'series', 'activities', 'plan_date', - 'completion_date', 'interval_hours', 'last_hours', 'remarks', - 'maintstate') + 'plan_precision', 'completion_date', 'interval_hours', 'last_hours', + 'remarks', 'maintstate') def __init__(self, db, maintid=None): super().__init__(db, maintid) self.title = _("Maintenance({})") + + def save(self, commit=True): + if not super().save(): + return False + if commit: + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True diff --git a/yms/model/measurement.py b/yms/model/measurement.py index d26581c..ca8879e 100644 --- a/yms/model/measurement.py +++ b/yms/model/measurement.py @@ -12,3 +12,13 @@ class Measurement(DbRecord): def __init__(self, db, mid=None): super().__init__(db, mid) self.title = _("Measurement({})") + + def save(self, commit=True): + if not super().save(): + return False + if commit: + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True diff --git a/yms/model/project.py b/yms/model/project.py index 33d6c4c..04d1b87 100644 --- a/yms/model/project.py +++ b/yms/model/project.py @@ -15,6 +15,11 @@ class Project(DbRecord): self.title = _("Project({})") def save(self, commit=True): - super().save(Table.PROJECTS) + if not super().save(Table.PROJECTS): + return False if commit: - self.conn.commit() + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True diff --git a/yms/model/provision.py b/yms/model/provision.py index 3ce660b..eea7686 100644 --- a/yms/model/provision.py +++ b/yms/model/provision.py @@ -15,6 +15,11 @@ class Provision(DbRecord): self.title = _("Provision({})") def save(self, commit=True): - super().save() + if not super().save(): + return False if commit: - self.conn.commit() + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True diff --git a/yms/model/storage.py b/yms/model/storage.py index c8d71a1..5be2415 100644 --- a/yms/model/storage.py +++ b/yms/model/storage.py @@ -20,9 +20,14 @@ class Storage(DbRecord): self.title = _("Storage({})") def save(self, commit=True): - super().save(Table.STORAGE) + if not super().save(Table.STORAGE): + return False if commit: - self.conn.commit() + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True def delete(self): # there must be no associated data! diff --git a/yms/model/task.py b/yms/model/task.py index 01b667d..2d743c6 100644 --- a/yms/model/task.py +++ b/yms/model/task.py @@ -12,3 +12,13 @@ class Task(DbRecord): def __init__(self, db, taskid=None): super().__init__(db, taskid) self.title = _("Task({})") + + def save(self, commit=True): + if not super().save(): + return False + if commit: + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True diff --git a/yms/model/vessel.py b/yms/model/vessel.py index 818edcd..cd5052f 100644 --- a/yms/model/vessel.py +++ b/yms/model/vessel.py @@ -44,9 +44,14 @@ class Vessel(DbRecord): self.conn.commit() def save(self, commit=True): - super().save() + if not super().save(): + return False if commit: - self.conn.commit() + try: + self.conn.commit() + except mariadb.Error as e: + return False + return True def delete(self): # there must be no assiciated data! diff --git a/yms/treeview.py b/yms/treeview.py index 056a86f..b2d36f0 100644 --- a/yms/treeview.py +++ b/yms/treeview.py @@ -43,3 +43,25 @@ def set_value(treeview, column, value): return True else: return False + +def set_row_values(treeview, data): + """ + Set every column in row to new value + """ + try: + selection = treeview.get_selection() + except: + return False + if not selection.get_mode() == Gtk.SelectionMode.SINGLE: + return False + (model, iter) = selection.get_selected() + # check if data count matches treeview columns + if len(data) != model.get_n_columns(): + print("treeview:refresh_row column count mismatch") + return False + column = 0 + for value in data: + # TODO data type checks? + model.set_value(iter, column, value) + column += 1 + return True diff --git a/yms/ui/boxes.ui b/yms/ui/boxes.ui index 2f8e9f8..f374fd4 100644 --- a/yms/ui/boxes.ui +++ b/yms/ui/boxes.ui @@ -915,6 +915,7 @@ True True True + True True @@ -994,6 +995,62 @@ 1 + + + True + False + False + + + False + 6 + end + + + + + + + + + + + + False + False + 0 + + + + + False + 16 + + + + + + + + + + + + False + False + 0 + + + + + + + + False + True + 2 + + True @@ -1031,7 +1088,7 @@ False True - 2 + 3 diff --git a/yms/ui/cables.ui b/yms/ui/cables.ui index 23a5d34..fd3cc18 100644 --- a/yms/ui/cables.ui +++ b/yms/ui/cables.ui @@ -292,6 +292,7 @@ True False True + 0 @@ -476,6 +477,7 @@ True False True + 0 @@ -490,6 +492,7 @@ True False True + 0 @@ -504,6 +507,7 @@ True False True + 0 @@ -518,6 +522,7 @@ True False True + 0 @@ -532,6 +537,7 @@ True False True + 0 @@ -546,6 +552,7 @@ True False False + 0 @@ -560,6 +567,7 @@ True False True + 0 @@ -574,6 +582,7 @@ True False True + 0 @@ -588,6 +597,7 @@ True False True + 0 @@ -602,6 +612,7 @@ True False True + 0 @@ -616,6 +627,7 @@ True False True + 0 @@ -631,6 +643,7 @@ False True True + 0 0 @@ -383,7 +408,7 @@ 0 - 7 + 8 @@ -392,6 +417,7 @@ False True True + 0 @@ -407,6 +433,7 @@ False True True + 0 @@ -422,6 +449,7 @@ False True True + 0 @@ -438,6 +466,7 @@ True True True + 0 0 @@ -469,6 +499,7 @@ False True True + 0 @@ -484,6 +515,7 @@ False True True + 0 @@ -493,6 +525,36 @@ 3 + + + True + False + Color + + + + 0 + 7 + + + + + True + False + True + True + 0 + + + + 1 + 7 + + True @@ -586,7 +648,7 @@ - + True False @@ -611,9 +673,6 @@ True False Description - - - 0 @@ -625,9 +684,6 @@ True False Type - - - 0 @@ -690,7 +746,7 @@ 0 - 7 + 8 @@ -730,6 +786,7 @@ True True adj_current + 1 1 @@ -756,17 +813,6 @@ 5 - - - True - True - True - - - 1 - 6 - - True @@ -777,14 +823,72 @@ True True True + True + + 1 + 8 + + + + + True + False + Color + + + 0 + 7 + + + + + True + False + + + True + True + + + + + False + True + 0 + + + + + True + True + True + + + + False + True + 1 + + + 1 7 + + + True + False + + + 1 + 6 + + False @@ -792,6 +896,61 @@ 1 + + + True + False + + + False + 6 + end + + + + + + + + + + + + False + False + 0 + + + + + False + 16 + + + + + + + + + + + + False + False + 0 + + + + + + + + False + True + 2 + + True @@ -832,7 +991,7 @@ False True - 2 + 3 diff --git a/yms/ui/inventory.ui b/yms/ui/inventory.ui index 7afdc4b..30f7cf7 100644 --- a/yms/ui/inventory.ui +++ b/yms/ui/inventory.ui @@ -1083,6 +1083,61 @@ 1 + + + True + False + + + False + 6 + end + + + + + + + + + + + + False + False + 0 + + + + + False + 16 + + + + + + + + + + + + False + False + 0 + + + + + + + + False + True + 2 + + True @@ -1120,7 +1175,7 @@ False True - 2 + 3 diff --git a/yms/ui/maintenance.ui b/yms/ui/maintenance.ui index 9daa3f4..d469905 100644 --- a/yms/ui/maintenance.ui +++ b/yms/ui/maintenance.ui @@ -715,6 +715,7 @@ True False Remarks + 0 0 @@ -722,7 +723,7 @@ - + True True True @@ -817,7 +818,8 @@ True True - True + 10 + 12 False @@ -839,6 +841,17 @@ 1 + + + True + False + + + False + True + 2 + + 1 @@ -853,7 +866,8 @@ True True - True + 10 + 12 False @@ -887,6 +901,61 @@ 1 + + + True + False + + + False + 6 + end + + + + + + + + + + + + False + False + 0 + + + + + False + 16 + + + + + + + + + + + + False + False + 0 + + + + + + + + False + True + 2 + + True @@ -924,7 +993,7 @@ False True - 2 + 3 diff --git a/yms/ui/measurement.ui b/yms/ui/measurement.ui index 1420539..ccd5b83 100644 --- a/yms/ui/measurement.ui +++ b/yms/ui/measurement.ui @@ -709,7 +709,7 @@ - + True False Value 1 @@ -720,7 +720,7 @@ - + True False Value 2 @@ -731,7 +731,7 @@ - + True False Value 3 @@ -802,6 +802,7 @@ True False True + 1 @@ -970,6 +971,60 @@ 1 + + + True + False + vertical + False + + + False + 6 + end + + + + + + + + + + + + False + False + 0 + + + + + False + 16 + + + + + + + + + + + + False + False + 0 + + + + + False + True + 2 + + True @@ -1007,7 +1062,7 @@ False True - 2 + 3 diff --git a/yms/ui/projects.ui b/yms/ui/projects.ui index 20d6642..bddb975 100644 --- a/yms/ui/projects.ui +++ b/yms/ui/projects.ui @@ -17,6 +17,11 @@ 1 10 + + True + False + x-office-calendar-symbolic + True False @@ -789,10 +794,11 @@ - button True True True + img_startdate + True False @@ -813,6 +819,61 @@ 1 + + + True + False + + + False + 6 + end + + + + + + + + + + + + False + False + 0 + + + + + False + 16 + + + + + + + + + + + + False + False + 0 + + + + + + + + False + True + 2 + + True @@ -850,7 +911,7 @@ False True - 2 + 3 diff --git a/yms/ui/provisions.ui b/yms/ui/provisions.ui index cf401f1..da0ea45 100644 --- a/yms/ui/provisions.ui +++ b/yms/ui/provisions.ui @@ -668,6 +668,61 @@ 1 + + + True + False + + + False + 6 + end + + + + + + + + + + + + False + False + 0 + + + + + False + 16 + + + + + + + + + + + + False + False + 0 + + + + + + + + False + True + 2 + + True @@ -705,7 +760,7 @@ False True - 2 + 3 diff --git a/yms/ui/storage.ui b/yms/ui/storage.ui index b31583e..9a4daa3 100644 --- a/yms/ui/storage.ui +++ b/yms/ui/storage.ui @@ -1019,6 +1019,61 @@ 1 + + + True + False + + + False + 6 + end + + + + + + + + + + + + False + False + 0 + + + + + False + 16 + + + + + + + + + + + + False + False + 0 + + + + + + + + False + True + 2 + + True @@ -1056,7 +1111,7 @@ False True - 2 + 3 diff --git a/yms/ui/tasks.ui b/yms/ui/tasks.ui index 1a21589..99f5749 100644 --- a/yms/ui/tasks.ui +++ b/yms/ui/tasks.ui @@ -6,7 +6,7 @@ True False 16 - stock_calendar + x-office-calendar-symbolic True @@ -357,7 +357,7 @@ - + True False @@ -383,6 +383,7 @@ False True True + 0 @@ -417,7 +418,7 @@ 0 - 2 + 3 @@ -431,7 +432,7 @@ 0 - 3 + 4 @@ -440,6 +441,7 @@ False True True + 0 @@ -455,13 +457,14 @@ False True True + 0 1 - 2 + 3 @@ -470,13 +473,14 @@ False True True + 0 1 - 3 + 4 @@ -490,7 +494,7 @@ 0 - 4 + 5 @@ -504,7 +508,7 @@ 0 - 5 + 6 @@ -518,7 +522,7 @@ 0 - 6 + 7 @@ -527,21 +531,7 @@ False True True - - - - 1 - 4 - - - - - True - False - True - True + 0 @@ -552,11 +542,12 @@ - + True False True True + 0 @@ -566,6 +557,22 @@ 6 + + + True + False + True + True + 0 + + + + 1 + 7 + + True @@ -578,7 +585,7 @@ 0 - 9 + 10 @@ -588,6 +595,7 @@ True True True + 0 0 1 - 7 + 8 @@ -638,7 +647,7 @@ 0 - 8 + 9 @@ -647,13 +656,44 @@ False True True + 0 1 - 8 + 9 + + + + + True + False + Project + + + + 0 + 2 + + + + + True + False + True + True + 0 + + + + 1 + 2 @@ -955,6 +995,8 @@ True True + 10 + 12 False @@ -991,6 +1033,8 @@ True True + 10 + 12 False @@ -1027,6 +1071,8 @@ True True + 16 + 18 False @@ -1062,6 +1108,8 @@ True True + 16 + 18 False @@ -1096,6 +1144,61 @@ 1 + + + True + False + + + False + 6 + end + + + + + + + + + + + + False + False + 0 + + + + + False + 16 + + + + + + + + + + + + False + False + 0 + + + + + + + + False + True + 2 + + True @@ -1133,7 +1236,7 @@ False True - 2 + 3 diff --git a/yms/view/base.py b/yms/view/base.py index bee457e..23478c4 100644 --- a/yms/view/base.py +++ b/yms/view/base.py @@ -1,8 +1,8 @@ # SPDX-License-Identifier: WTFPL """ -Spezial: -Notebook mit Vessel, User, Lists, Settings +Special: +Notebook with Vessel, User, Lists, Settings """ @@ -328,6 +328,7 @@ class BaseView(View): self.db.conn.commit() # Refresh dependent data self.load_dropdowns() + self.context.publish("vessel_changed", (self.context.vessel.pk_value, )) # Show data self.display_vessel(self.context.vessel) diff --git a/yms/view/boxes.py b/yms/view/boxes.py index be775f3..93e7829 100644 --- a/yms/view/boxes.py +++ b/yms/view/boxes.py @@ -126,9 +126,9 @@ class BoxesView(View): self.sbox.sid = combobox.get_list_value(self.combo['storage']) self.sbox.boxtype = combobox.get_list_value(self.combo['type']) self.sbox.content = self.entry['content'].get_text() - self.sbox.wx = int(self.spin['wx'].get_value()) - self.sbox.wy = int(self.spin['wy'].get_value()) - self.sbox.wz = int(self.spin['wz'].get_value()) + self.sbox.wx = self.spin['wx'].get_value_as_int() + self.sbox.wy = self.spin['wy'].get_value_as_int() + self.sbox.wz = self.spin['wz'].get_value_as_int() self.sbox.color = self.entry['color'].get_text().lstrip('#') self.sbox.price = self.spin['price'].get_value() self.sbox.weight = self.spin['weight'].get_value() @@ -203,8 +203,12 @@ class BoxesView(View): r = round(rgba.red * 255) g = round(rgba.green * 255) b = round(rgba.blue * 255) + a = round(rgba.alpha * 255) #self.last_valid_rgb = f"{r:02X}{g:02X}{b:02X}" - self.entry['color'].set_text(f"#{r:02X}{g:02X}{b:02X}") + if a > 0: + self.entry['color'].set_text(f"#{r:02X}{g:02X}{b:02X}") + else: + self.entry['color'].set_text('') def on_ent_color_activate(self, entry): self.set_color_from_entry(entry) diff --git a/yms/view/cables.py b/yms/view/cables.py index 7aa28b2..676aa73 100644 --- a/yms/view/cables.py +++ b/yms/view/cables.py @@ -1,7 +1,7 @@ # SPDX-License-Identifier: WTFPL import os -from gi.repository import Gtk +from gi.repository import Gtk, Gdk from .view import View from yms import gtkutils, combobox, treeview @@ -16,12 +16,13 @@ class CablesView(View): self.cable = cable.Cable(context.db) # current record self.newrecord = False - self.lst_cables = Gtk.ListStore(int, str, str) + self.lst_cables = Gtk.ListStore(int, str, str, str) self.load_list() treeview.add_column(self.tree['cables'], _('ID'), 0) treeview.add_column(self.tree['cables'], _('Name'), 1) treeview.add_column(self.tree['cables'], _('Condition'), 2) + treeview.add_column(self.tree['cables'], _('Length'), 3) self.tree['cables'].set_model(self.lst_cables) # Cable type @@ -41,21 +42,27 @@ class CablesView(View): combobox.load_from_dict(self.combo['condition'], self.dd_condition, 'unknown') def load_list(self): + selected_id = treeview.get_value(self.tree['cables']) self.lst_cables.clear() sql = ( - "SELECT cableid, cablename, cablecond " + "SELECT cableid, cablename, cablecond, length " "FROM cable " "WHERE vid=%s " "ORDER BY cableid" ) self.db.dcur.execute(sql, (self.context.vessel.vid,)) + selection = self.tree['cables'].get_selection() for row in self.db.dcur.fetchall(): data = ( row['cableid'], row['cablename'], - row['cablecond'] + row['cablecond'], + self.format_float(row['length'], suffix='m') ) - self.lst_cables.append(data) + treeiter = self.lst_cables.append(data) + if row['cableid'] == selected_id: + # restore previous selected row + selection.select_iter(treeiter) def display_record(self): self.label['name'].set_text(self.cable.cablename or '') @@ -83,36 +90,69 @@ class CablesView(View): def edit_record(self): # fill UI fields from database record - self.entry['name'].set_text(self.cable.cablename) + self.entry['name'].set_text(self.cable.cablename or '') combobox.activate_row(self.combo['type'], self.cable.cabletype or -1) combobox.activate_row(self.combo['techname'], self.cable.techname or -1) self.spin['length'].set_value(self.cable.length or 0) - self.spin['consuctors'].set_value(self.cable.conductors or 0) + self.spin['conductors'].set_value(self.cable.conductors or 0) self.spin['diameter'].set_value(self.cable.diameter or 0) self.spin['xsection'].set_value(self.cable.xsection or 0) self.spin['weight'].set_value(self.cable.weight or 0) - self.entry['color'].set_text('#' + self.cable.color) - rgba = Gdk.RGBA() - rgba.parse('#' + self.cable.color) + self.entry['color'].set_text(self.format_color(self.cable.color)) + if self.cable.color is None: + rgba = Gdk.RGBA(0, 0, 0, 0) + else: + rgba = Gdk.RGBA() + rgba.parse('#' + self.cable.color) self.button['color'].set_rgba(rgba) combobox.activate_row(self.combo['supplier'], self.cable.supplier or -1) combobox.activate_row(self.combo['manufacturer'], self.cable.manufacturer or -1) - combobox.activate_row(self.combo['consition'], self.cable.cablecond or 'unknown') - self.text['remarks'].get_buffer().set_text(self.sbox.remarks or '') + combobox.activate_row(self.combo['condition'], self.cable.cablecond or 'unknown') + self.text['remarks'].get_buffer().set_text(self.cable.remarks or '') self.entry['name'].grab_focus() def save_record(self): # fields must have been validated beforehand + self.cable.vid = self.context.vessel.vid self.cable.cablename = self.entry['name'].get_text().strip() self.cable.cabletype = combobox.get_list_value(self.combo['type']) + if self.cable.cabletype == -1: + self.cable.cabletype = None self.cable.length = int(self.spin['length'].get_value()) self.cable.conductors = int(self.spin['conductors'].get_value()) self.cable.diameter = self.spin['diameter'].get_value() self.cable.xsection = self.spin['xsection'].get_value() self.cable.weight = int(self.spin['weight'].get_value()) + if self.button['color'].get_rgba().alpha > 0: + self.cable.color = self.entry['color'].get_text().lstrip('#') + else: + self.cable.color = None self.cable.supplier = combobox.get_list_value(self.combo['supplier']) + if self.cable.supplier == -1: + self.cable.supplier = None self.cable.manufacturer = combobox.get_list_value(self.combo['manufacturer']) - self.cable.condition = combobox.get_list_value(self.combo['condition']) + if self.cable.manufacturer == -1: + self.cable.manufacturer = None + self.cable.cablecond = combobox.get_list_value(self.combo['condition']) + self.cable.remarks = gtkutils.get_text_contents(self.text['remarks']) + + def on_but_color_set(self, button): + rgba = button.get_rgba() + r = round(rgba.red * 255) + g = round(rgba.green * 255) + b = round(rgba.blue * 255) + a = round(rgba.alpha * 255) + if a > 0: + self.entry['color'].set_text(f"#{r:02X}{g:02X}{b:02X}") + else: + self.entry['color'].set_text('') + + def on_ent_color_activate(self, entry): + self.set_color_from_entry(entry, self.button['color']) + + def on_ent_color_focus_out_event(self, entry, event): + self.set_color_from_entry(entry, self.button['color']) + return False # buttons on list page def on_but_new_clicked(self, widget): @@ -122,6 +162,13 @@ class CablesView(View): self.topwidget.set_visible_child(self.box['cable_edit']) def on_but_edit_clicked(self, widget): + self.newrecord = False + self.label['title_edit'].set_text(_("Edit Cable")) + cableid = treeview.get_value(self.tree['cables'], 0) + if not cableid: + return + self.cable.load(cableid) + self.edit_record() self.topwidget.set_visible_child(self.box['cable_edit']) def on_but_detail_clicked(self, widget): @@ -163,6 +210,16 @@ class CablesView(View): return self.save_record() print(self.cable) + if not self.cable.save(): + print("ERROR saving cable") + # TODO error in infobox + print(self.context.db.last_error()) + return + if self.newrecord: + self.load_list() + self.newrecord = False + self.display_record() + self.topwidget.set_visible_child(self.box['cable_detail']) def on_but_cancel_clicked(self, widget): self.topwidget.set_visible_child(self.box['cables']) diff --git a/yms/view/documents.py b/yms/view/documents.py index 108dd86..437f28d 100644 --- a/yms/view/documents.py +++ b/yms/view/documents.py @@ -37,21 +37,13 @@ class DocumentsView(View): self.uploaddialog.set_title("Upload new document") self.lst_documents = Gtk.ListStore(int, str, str, str, int) - sql = ( - "SELECT d.docid, d.doctype, d.filename, d.title, COUNT(r.drid) AS refcount " - "FROM document AS d LEFT OUTER JOIN docref AS r USING (docid) " - "GROUP BY d.docid, d.doctype, d.filename, d.title " - "ORDER BY d.docid" - ) - self.db.cur.execute(sql) - for row in self.db.cur.fetchall(): - self.lst_documents.append(row) + self.load_list() treeview.add_column(self.tree['documents'], _('ID'), 0) treeview.add_column(self.tree['documents'], _('Type'), 1) treeview.add_column(self.tree['documents'], _('Filename'), 2) treeview.add_column(self.tree['documents'], _('Title'), 3) - treeview.add_column(self.tree['documents'], _('References'), 3) + treeview.add_column(self.tree['documents'], _('References'), 4) self.tree['documents'].set_model(self.lst_documents) # Status @@ -61,6 +53,23 @@ class DocumentsView(View): self.dd_access = self.context.lookup.enum('document.roleaccess') combobox.load_from_dict(self.combo['accesslevel'], self.dd_access) + def load_list(self): + selected_id = treeview.get_value(self.tree['documents']) + self.lst_documents.clear() + sql = ( + "SELECT d.docid, d.doctype, d.filename, d.title, COUNT(r.drid) AS refcount " + "FROM document AS d LEFT OUTER JOIN docref AS r USING (docid) " + "GROUP BY d.docid, d.doctype, d.filename, d.title " + "ORDER BY d.docid" + ) + self.db.cur.execute(sql) + selection = self.tree['documents'].get_selection() + for row in self.db.cur.fetchall(): + treeiter = self.lst_documents.append(row) + if row['docid'] == selected_id: + # restore previous selected row + selection.select_iter(treeiter) + def clear_record(self): self.doc.clear() combobox.activate_row(self.combo['doctype'], 'generic') diff --git a/yms/view/equipment.py b/yms/view/equipment.py index 04d62b7..c42a2af 100644 --- a/yms/view/equipment.py +++ b/yms/view/equipment.py @@ -5,7 +5,7 @@ from gi.repository import GLib, Gtk, Gdk from dateutil.parser import parse from gettext import pgettext -from .view import View +from .view import View, DatePicker from yms import gtkutils, combobox, treeview from yms.lookup import Dropdown from yms.model import equipment @@ -44,7 +44,29 @@ class EquipmentView(View): self.dd_condition = self.context.lookup.enum('equipment.econd') combobox.load_from_dict(self.combo['condition'], self.dd_condition, 'unknown') + self.entry['purchdate'].set_placeholder_text(context.get_datefmt_placeholder()) + self.dt_purchdate = DatePicker(self.entry['purchdate'], self.button['purchdate'], context.get_datefmt()) + + def get_list_row(self): + return ( + self.equip.eid, + self.equip.ename, + self.dd_manufacturer.get(self.equip.manufacturer, ''), + self.equip.model, + self.equip.serial, + self.format_date(self.equip.purchdate), + self.equip.remarks + ) + + def add_row(self): + treeiter = self.lst_equipment.append(self.get_list_row()) + # TODO self.tree['equipment'].get_selection().select_iter(treeiter) + + def refresh_row(self): + treeview.set_row_values(self.tree['equipment'], self.get_list_row()) + def load_list(self): + selected_id = treeview.get_value(self.tree['equipment']) self.lst_equipment.clear() sql = ( "SELECT e.eid, e.ename, c.compname, e.model, e.serial, " @@ -52,11 +74,17 @@ class EquipmentView(View): "FROM equipment AS e LEFT OUTER JOIN company AS c ON (e.manufacturer=c.compid) " "WHERE e.vid=%s " "ORDER BY e.ename" - ).format(self.context.datefmt.replace('%', '%%')) - # ).format("%%d.%%m.%%Y") # TODO format from settings via mapping + ).format(self.context.get_datefmt().replace('%', '%%')) self.db.cur.execute(sql, (self.context.vessel.vid,)) + selection = self.tree['equipment'].get_selection() for row in self.db.cur.fetchall(): - self.lst_equipment.append(row) + treeiter = self.lst_equipment.append(row) + if row[0] == selected_id: + # restore previous selected row + selection.select_iter(treeiter) + + def on_page_activated(self): + print("Equipment activated") def clear_record(self): self.equip.clear() @@ -208,12 +236,14 @@ class EquipmentView(View): return self.save_record() print(self.equip) - self.equip.save() - if self.newrecord: - self.load_list() - else: + if not self.equip.save(): + # TODO error handling pass - # TODO aktuelle Listenzeile aktualisieren! + if self.newrecord: + self.add_row() + #self.load_list() + else: + self.refresh_row() self.newrecord = False self.display_record() self.topwidget.set_visible_child(self.box['equip_detail']) diff --git a/yms/view/fuses.py b/yms/view/fuses.py index 9050479..e09c252 100644 --- a/yms/view/fuses.py +++ b/yms/view/fuses.py @@ -17,21 +17,7 @@ class FusesView(View): self.newrecord = False self.lst_fuses = Gtk.ListStore(int, str, str, str) - sql = ( - "SELECT fuseid, fnumber, current, description " - "FROM fuse " - "WHERE vid=%s " - "ORDER BY fuseid" - ) - self.db.dcur.execute(sql, (context.vessel.vid,)) - for row in self.db.dcur.fetchall(): - data = ( - row['fuseid'], - 'F{}'.format(row['fnumber']), - '{} A'.format(row['current']), # TODO better formatting - row['description'] - ) - self.lst_fuses.append(data) + self.load_list() treeview.add_column(self.tree['fuses'], _('ID'), 0) treeview.add_column(self.tree['fuses'], _('Name'), 1) @@ -41,13 +27,39 @@ class FusesView(View): # Fuse Type self.dd_ftype = self.context.lookup.dropdown(Dropdown.FUSE_TYPE) - combobox.load_from_dict(self.combo['ftype'], self.dd_ftype) + combobox.load_from_dict(self.combo['ftype'], {-1: _("─── unknown ───")} | self.dd_ftype) # Cables self.dd_cable = self.context.lookup.cable(context.vessel.vid) combobox.load_from_dict(self.combo['cable'], {-1: _("─── none ───")} | self.dd_cable) # Equipment self.dd_equipment = self.context.lookup.equipment(context.vessel.vid) combobox.load_from_dict(self.combo['equipment'], {-1: _("─── none ───")} | self.dd_equipment) + # Location + self.dd_location = self.context.lookup.dropdown(Dropdown.FUSE_BLOCK) + combobox.load_from_dict(self.combo['location'], {-1: _("─── unknown ───")} | self.dd_location) + + def load_list(self): + selected_id = treeview.get_value(self.tree['fuses']) + self.lst_fuses.clear() + sql = ( + "SELECT fuseid, fnumber, current, description " + "FROM fuse " + "WHERE vid=%s " + "ORDER BY fuseid" + ) + self.db.dcur.execute(sql, (self.context.vessel.vid,)) + selection = self.tree['fuses'].get_selection() + for row in self.db.dcur.fetchall(): + data = ( + row['fuseid'], + 'F{}'.format(row['fnumber']), + '{} A'.format(row['current']), # TODO better formatting + row['description'] + ) + treeiter = self.lst_fuses.append(data) + if row['fuseid'] == selected_id: + # restore previous selected row + selection.select_iter(treeiter) def clear_record(self): self.fuse.clear() @@ -57,18 +69,34 @@ class FusesView(View): self.spin['current'].set_value(0) combobox.activate_row(self.combo['cable'], -1) combobox.activate_row(self.combo['equipment'], -1) - self.entry['location'].set_text('') + combobox.activate_row(self.combo['location'], -1) self.text['remarks'].get_buffer().set_text('') self.spin['fnumber'].grab_focus() def display_record(self): self.label['fnumber'].set_text(f"F{self.fuse.fnumber}") - self.label['type'].set_text(self.dd_type[self.fuse.ftype]) + if self.fuse.ftype: + self.label['type'].set_text(self.dd_ftype[self.fuse.ftype] or '') + else: + self.label['type'].set_text('') self.label['current'].set_text(self.format_float(self.fuse.current, 2, suffix="A")) - self.label['cable'].set_text(str(self.fuse.cableid)) - self.label['equipment'].set_text(str(self.fuse.eid)) - self.label['location'].set_text(str(self.fuse.location)) + if self.fuse.cableid: + self.label['cable'].set_text(self.dd_cable[self.fuse.cableid]) + else: + self.label['cable'].set_text('') + if self.fuse.eid: + self.label['equipment'].set_text(self.dd_equipment[self.fuse.eid]) + else: + self.label['equipment'].set_text('') + if self.fuse.location: + self.label['location'].set_text(self.dd_location[self.fuse.location]) + else: + self.label['location'].set_text('') self.label['description'].set_text(str(self.fuse.description or '')) + if self.fuse.color: + self.label['color'].set_markup(f'#{self.cable.color} ●') + else: + self.label['color'].set_text('') self.label['remarks'].set_text(str(self.fuse.remarks or '')) def edit_record(self): @@ -78,20 +106,52 @@ class FusesView(View): self.spin['current'].set_value(self.fuse.current) combobox.activate_row(self.combo['cable'], self.fuse.cableid) combobox.activate_row(self.combo['equipment'], self.fuse.eid) - self.entry['location'].set_text(self.fuse.location) - self.text['remarks'].get_buffer().set_text(self.prov.remarks or '') + combobox.activate_row(self.combo['location'], self.fuse.location) + self.text['remarks'].get_buffer().set_text(self.fuse.remarks or '') self.spin['fnumber'].grab_focus() def save_record(self): # fields must have been validated beforehand - self.fuse.number = int(self.spin['fnumber'].get_value()) + self.fuse.vid = self.context.vessel.vid + self.fuse.fnumber = self.spin['fnumber'].get_value_as_int() + self.fuse.current = self.spin['current'].get_value() self.fuse.description = self.entry['description'].get_text() self.fuse.ftype = combobox.get_list_value(self.combo['ftype']) + if self.fuse.ftype == -1: + self.fuse.ftype = None self.fuse.cableid = combobox.get_list_value(self.combo['cable']) + if self.fuse.cableid == -1: + self.fuse.cableid = None self.fuse.eid = combobox.get_list_value(self.combo['equipment']) - self.fuse.location = self.entry['location'].get_text() + if self.fuse.eid == -1: + self.fuse.eid = None + self.fuse.location = combobox.get_list_value(self.combo['location']) + if self.fuse.location == -1: + self.fuse.location = None + if self.button['color'].get_rgba().alpha > 0: + self.fuse.color = self.entry['color'].get_text().lstrip('#') + else: + self.fuse.color = None self.fuse.remarks = gtkutils.get_text_contents(self.text['remarks']) + def on_but_color_set(self, button): + rgba = button.get_rgba() + r = round(rgba.red * 255) + g = round(rgba.green * 255) + b = round(rgba.blue * 255) + a = round(rgba.alpha * 255) + if a > 0: + self.entry['color'].set_text(f"#{r:02X}{g:02X}{b:02X}") + else: + self.entry['color'].set_text('') + + def on_ent_color_activate(self, entry): + self.set_color_from_entry(entry, self.button['color']) + + def on_ent_color_focus_out_event(self, entry, event): + self.set_color_from_entry(entry, self.button['color']) + return False + # buttons on list page def on_but_new_clicked(self, widget): self.newrecord = True @@ -141,7 +201,19 @@ class FusesView(View): # buttons on edit page def on_but_save_clicked(self, widget): - pass + fnumber = self.spin['fnumber'].get_value_as_int() + current = self.spin['current'].get_value() + # TODO check for duplicate number! + sql = "SELECT COUNT(fnumber) FROM fuse WHERE fnumber=%s" + + if (fnumber == 0) or (current == 0): + # TODO error marker + return + self.save_record() + print(self.fuse) + self.fuse.save() + self.display_record() + self.topwidget.set_visible_child(self.box['fuse_detail']) def on_but_cancel_clicked(self, widget): self.topwidget.set_visible_child(self.box['fuses']) diff --git a/yms/view/inventory.py b/yms/view/inventory.py index 7e9e9ee..22e8396 100644 --- a/yms/view/inventory.py +++ b/yms/view/inventory.py @@ -55,6 +55,7 @@ class InventoryView(View): combobox.load_from_dict(self.combo['condition'], self.dd_condition) def load_list(self): + selected_id = treeview.get_value(self.tree['inventory']) self.lst_inventory.clear() sql = ( "SELECT i.invid, i.invname, s.sname AS container, i.number, i.invcond, i.remarks " @@ -65,9 +66,13 @@ class InventoryView(View): "WHERE s.vid=%s" ) self.db.cur.execute(sql, (self.context.vessel.vid, self.context.vessel.vid)) + selection = self.tree['inventory'].get_selection() for row in self.db.cur.fetchall(): - self.lst_inventory.append(row) - + treeiter = self.lst_inventory.append(row) + if row[0] == selected_id: + # restore previous selected row + selection.select_iter(treeiter) + def lock_timer(self): self.context.db.lock_refresh(self.token) return True # continue timer @@ -96,9 +101,9 @@ class InventoryView(View): self.label['name'].set_text(self.inv.invname) container = pgettext("inventory.conttype", self.inv.conttype) if self.inv.conttype == 'storage': - self.label['conttype'].set_text("{}: {}".format(container, self.dd_storage[self.inv.sid])) + self.label['conttype'].set_text("{}: {}".format(container, self.dd_storage.get(self.inv.sid, ''))) else: - self.label['conttype'].set_text("{}: {}".format(container, self.dd_box[self.inv.boxid])) + self.label['conttype'].set_text("{}: {}".format(container, self.dd_box.get(self.inv.boxid, ''))) self.label['equipment'].set_text(str(self.inv.eid)) self.label['number'].set_text(self.format_int(self.inv.number)) self.label['weight'].set_text(self.format_float(self.inv.weight, suffix='kg')) @@ -255,7 +260,8 @@ class InventoryView(View): return self.save_record() print(self.inv) - self.inv.save() + if not self.inv.save(): + pass if self.newrecord: self.load_list() self.newrecord = False diff --git a/yms/view/maintenance.py b/yms/view/maintenance.py index 46622d1..12cd166 100644 --- a/yms/view/maintenance.py +++ b/yms/view/maintenance.py @@ -2,9 +2,12 @@ import os from gi.repository import Gtk +from dateutil.parser import parse +from datetime import datetime -from .view import View +from .view import View, DatePicker from yms import gtkutils, combobox, treeview +from yms.lookup import Dropdown from yms.model import maintenance class MaintenanceView(View): @@ -16,15 +19,7 @@ class MaintenanceView(View): self.newrecord = False self.lst_maintenance = Gtk.ListStore(int, str, str, str) - sql = ( - "SELECT m.maintid, m.activities, e.ename, m.remarks " - "FROM maintenance AS m LEFT OUTER JOIN equipment AS e USING (eid) " - "WHERE m.vid=%s " - "ORDER BY m.maintid" - ) - self.db.cur.execute(sql, (context.vessel.vid,)) - for row in self.db.cur.fetchall(): - self.lst_maintenance.append(row) + self.load_list() treeview.add_column(self.tree['maintenance'], _('ID'), 0) treeview.add_column(self.tree['maintenance'], _('Activities'), 1) @@ -32,14 +27,49 @@ class MaintenanceView(View): treeview.add_column(self.tree['maintenance'], _('Remarks'), 3) self.tree['maintenance'].set_model(self.lst_maintenance) + # Equipment + self.dd_equipment = self.context.lookup.equipment(context.vessel.vid) + combobox.load_from_dict(self.combo['equipment'], {-1: _("─── none ───")} | self.dd_equipment) + + # Plan date precision + self.dd_precision = self.context.lookup.enum('maintenance.plan_precision') + combobox.load_from_dict(self.combo['plan_precision'], self.dd_precision, 'month') + + # Status + self.dd_status = self.context.lookup.enum('maintenance.maintstate') + combobox.load_from_dict(self.combo['status'], self.dd_status, 'new') + + self.entry['plandate'].set_placeholder_text(context.get_datefmt_placeholder()) + self.dt_plandate = DatePicker(self.entry['plandate'], self.button['plandate'], context.get_datefmt()) + self.entry['completion'].set_placeholder_text(context.get_datefmt_placeholder()) + self.dt_completion = DatePicker(self.entry['completion'], self.button['completion'], context.get_datefmt()) + + def load_list(self): + selected_id = treeview.get_value(self.tree['maintenance']) + self.lst_maintenance.clear() + sql = ( + "SELECT m.maintid, m.activities, e.ename, m.remarks " + "FROM maintenance AS m LEFT OUTER JOIN equipment AS e USING (eid) " + "WHERE m.vid=%s " + "ORDER BY m.maintid" + ) + self.db.cur.execute(sql, (self.context.vessel.vid,)) + selection = self.tree['maintenance'].get_selection() + for row in self.db.cur.fetchall(): + treeiter = self.lst_maintenance.append(row) + if row[0] == selected_id: + # restore previous selected row + selection.select_iter(treeiter) + def clear_record(self): self.maint.clear() self.entry['activities'].set_text('') combobox.activate_row(self.combo['equipment'], -1) - self.spin['series'].set_value(0) - self.spin['interval'].set_value(0) - self.spin['last'].set_value(0) + self.spin['series'].set_text('') + self.spin['interval'].set_text('') + self.spin['last_hours'].set_text('') self.entry['plandate'].set_text('') + combobox.activate_row(self.combo['plan_precision'], 'month') self.entry['completion'].set_text('') combobox.activate_row(self.combo['status'], 'new') self.text['remarks'].get_buffer().set_text('') @@ -57,31 +87,49 @@ class MaintenanceView(View): self.label['remarks'].set_text(self.maint.remarks or '') def edit_record(self): - self.entry['activities'].set_text(self.maint.activities) - combobox.activate_row(self.combo['equipment'], self.maint.eid) + self.entry['activities'].set_text(self.maint.activities or '') + combobox.activate_row(self.combo['equipment'], self.maint.eid or -1) self.spin['series'].set_value(self.maint.series or 0) self.spin['interval'].set_value(self.maint.interval_hours or 0) - self.spin['last'].set_value(self.maint.last_hours or 0) - self.entry['plandate'].set_text(self.maint.plan_date) - self.entry['completion'].set_text(self.maint.completion_date) + self.spin['last_hours'].set_value(self.maint.last_hours or 0) + self.entry['plandate'].set_text(self.format_date(self.maint.plan_date)) + self.entry['completion'].set_text(self.format_date(self.maint.completion_date)) combobox.activate_row(self.combo['status'], self.maint.maintstate) self.text['remarks'].get_buffer().set_text(self.maint.remarks or '') self.entry['activities'].grab_focus() def save_record(self): # fields must have been validated beforehand + self.maint.vid = self.context.vessel.vid self.maint.activities = self.entry['activities'].get_text() self.maint.eid = combobox.get_list_value(self.combo['equipment']) - self.maint.series = int(self.spin['series'].get_value()) - self.maint.interval_hours = int(self.spin['interval'].get_value()) - self.maint.last_hours = int(self.spin['last'].get_value()) - self.maint.plan_date = self.entry['plandate'].get_text() - self.maint.completion_date = self.entry['completion'].get_text() + if self.maint.eid == -1: + self.maint.eid = None + self.maint.series = self.spin['series'].get_value_as_int() + if self.maint.series == -1: + self.maint.series = None + self.maint.interval_hours = self.spin['interval'].get_value_as_int() + if self.maint.interval_hours == 0: + self.maint.interval_hours = None + self.maint.last_hours = self.spin['last_hours'].get_value_as_int() + if self.maint.last_hours == 0: + self.maint.last_hours = None + try: + self.maint.plan_date = parse(self.entry['plandate'].get_text(), dayfirst=True) + except ValueError: + self.maint.plan_date = None + try: + self.maint.completion_date = parse(self.entry['completion'].get_text(), dayfirst=True) + except ValueError: + self.maint.completion_date = None self.maint.maintstate = combobox.get_list_value(self.combo['status']) self.maint.remarks = gtkutils.get_text_contents(self.text['remarks']) # buttons on list page def on_but_new_clicked(self, widget): + self.clear_record() + self.newrecord = True + print("New:Datefmt={}".format(self.context.datefmt)) self.topwidget.set_visible_child(self.box['maint_edit']) def on_but_edit_clicked(self, widget): @@ -132,7 +180,16 @@ class MaintenanceView(View): return self.save_record() print(self.maint) - self.maint.save() + if not self.maint.save(): + print("Save error") + # TODO error in infobox + print(self.context.db.last_error()) + return + if self.newrecord: + self.load_list() + self.newrecord = False + self.display_record() + self.topwidget.set_visible_child(self.box['maint_detail']) def on_but_cancel_clicked(self, widget): self.topwidget.set_visible_child(self.box['maintenance']) diff --git a/yms/view/measurement.py b/yms/view/measurement.py index 494efaf..05ddf7b 100644 --- a/yms/view/measurement.py +++ b/yms/view/measurement.py @@ -12,6 +12,9 @@ class MeasurementView(View): def __init__(self, context): super().__init__(context, _("Measurements"), "measurement.ui") + self.infobar.set_revealed(False) + self.infobar_label = Gtk.Label() + self.infobar.get_content_area().add(self.infobar_label) self.measure = measurement.Measurement(context.db) # current record self.newrecord = False @@ -22,9 +25,10 @@ class MeasurementView(View): # accuracy self.dd_accuracy = self.context.lookup.enum('measurement.accuracy') - combobox.load_from_dict(self.combo['accuracy'], {"-1": _("─── none ───")} | self.dd_accuracy) + combobox.load_from_dict(self.combo['accuracy'], self.dd_accuracy, 'unknown') # measurement units + # ATTENTION: Minimum one element in list has to be defined! self.dd_unit = self.context.lookup.dropdown(Dropdown.UNIT) combobox.load_from_dict(self.combo['unit'], self.dd_unit, 1) @@ -37,6 +41,19 @@ class MeasurementView(View): combobox.load_from_dict(self.combo['category'], {-1: _("─── none ───")} | self.dd_category) self.lst_measurement = Gtk.ListStore(int, str, str, str, str, str) + self.load_list() + + treeview.add_column(self.tree['measurement'], _('ID'), 0) + treeview.add_column(self.tree['measurement'], _('Measurement'), 1) + treeview.add_column(self.tree['measurement'], _('Value'), 2) + treeview.add_column(self.tree['measurement'], _('Accuracy'), 3) + treeview.add_column(self.tree['measurement'], _('Equipment'), 4) + treeview.add_column(self.tree['measurement'], _('Note'), 5) + self.tree['measurement'].set_model(self.lst_measurement) + + def load_list(self): + selected_id = treeview.get_value(self.tree['measurement']) + self.lst_measurement.clear() sql = ( "SELECT m.mid, m.mname, m.nval, m.val1, m.val2, m.val3, m.unit, " "m.accuracy, m.note, e.ename " @@ -44,7 +61,8 @@ class MeasurementView(View): "WHERE m.vid=%s " "ORDER BY m.mid" ) - self.db.dcur.execute(sql, (context.vessel.vid,)) + self.db.dcur.execute(sql, (self.context.vessel.vid,)) + selection = self.tree['measurement'].get_selection() for row in self.db.dcur.fetchall(): if row['nval'] == 1: value = "{} {}".format(row['val1'], row['unit']) @@ -63,23 +81,18 @@ class MeasurementView(View): row['ename'], row['note'] or '' ) - self.lst_measurement.append(data) - - treeview.add_column(self.tree['measurement'], _('ID'), 0) - treeview.add_column(self.tree['measurement'], _('Measurement'), 1) - treeview.add_column(self.tree['measurement'], _('Value'), 2) - treeview.add_column(self.tree['measurement'], _('Accuracy'), 3) - treeview.add_column(self.tree['measurement'], _('Equipment'), 4) - treeview.add_column(self.tree['measurement'], _('Note'), 5) - self.tree['measurement'].set_model(self.lst_measurement) + treeiter = self.lst_measurement.append(data) + if row[0] == selected_id: + # restore previous selected row + selection.select_iter(treeiter) def clear_record(self): self.measure.clear() self.entry['name'].set_text('') - combobox.activate_row(self.combo['dimensions'], -1) - self.spin['val1'].set_value(0) - self.spin['val2'].set_value(0) - self.spin['val3'].set_value(0) + combobox.activate_row(self.combo['dimensions'], 1) + self.spin['val1'].set_text('') + self.spin['val2'].set_text('') + self.spin['val3'].set_text('') combobox.activate_row(self.combo['accuracy'], 'unknown') self.entry['date'].set_text('') combobox.activate_row(self.combo['equipment'], -1) @@ -87,29 +100,45 @@ class MeasurementView(View): self.text['note'].get_buffer().set_text('') self.entry['name'].grab_focus() + self.label['edit_val2'].set_visible(False) + self.spin['val2'].set_visible(False) + self.label['edit_val3'].set_visible(False) + self.spin['val3'].set_visible(False) + def display_record(self): self.label['name'].set_text(self.measure.mname) - self.label['dimensions'].set_text(self.measure.nval) - self.label['val1'].set_text(self.measure.val1) + self.label['dimensions'].set_text(self.dd_dimensions[self.measure.nval]) + self.label['val1'].set_text(self.format_int(self.measure.val1)) if self.measure.nval >= 2: - self.label['val2'].set_text(self.measure.val2 or '') + self.label['val2'].set_text(self.format_int(self.measure.val2)) else: self.label['val2'].set_text('n/a') if self.measure.nval == 3: - self.label['val3'].set_text(self.measure.val3 or '') + self.label['val3'].set_text(self.format_int(self.measure.val3)) else: self.label['val3'].set_text('n/a') - # TODO - # unit - # accuracy - # category + self.label['unit'].set_text(self.dd_unit.get(self.measure.unit, '')) + self.label['accuracy'].set_text(self.dd_accuracy[self.measure.accuracy]) + self.label['date'].set_text(self.format_date(self.measure.mdate)) + self.label['category'].set_text(self.dd_category[self.measure.mcat]) + self.label['note'].set_text(self.measure.note or '') def edit_record(self): self.entry['name'].set_text(self.measure.mname) combobox.activate_row(self.combo['dimensions'], self.measure.nval) - self.spin['val1'].set_value(self.measure.val1) - self.spin['val2'].set_value(self.measure.val2 or 0) - self.spin['val3'].set_value(self.measure.val3 or 0) + if self.measure.val1 is None: + self.spin['val1'].set_text('') + else: + self.spin['val1'].set_value(self.measure.val1) + if self.measure.val2 is None: + self.spin['val2'].set_text('') + else: + self.spin['val2'].set_value(self.measure.val2) + if self.measure.val3 is None: + self.spin['val3'].set_text('') + else: + self.spin['val3'].set_value(self.measure.val3) + combobox.activate_row(self.combo['unit'], self.measure.unit or 1) combobox.activate_row(self.combo['accuracy'], self.measure.accuracy) self.entry['date'].set_text(self.measure.mdate) combobox.activate_row(self.combo['equipment'], self.measure.eid) @@ -117,6 +146,11 @@ class MeasurementView(View): self.text['note'].get_buffer().set_text(self.task.note or '') self.entry['name'].grab_focus() + self.label['edit_val2'].set_visible(self.measure.nval > 1) + self.spin['val2'].set_visible(self.measure.nval > 1) + self.label['edit_val3'].set_visible(self.measure.nval > 2) + self.spin['val3'].set_visible(self.measure.nval > 2) + def save_record(self): # fields must have been validated beforehand self.measure.mname = self.entry['name'].get_text() @@ -124,7 +158,7 @@ class MeasurementView(View): self.measure.val1 = self.spin['val1'].get_value_as_int() self.measure.val2 = self.spin['val2'].get_value_as_int() self.measure.val3 = self.spin['val3'].get_value_as_int() - self.measure.accuracy = combobox.get_list_value(self.combo['accurace']) + self.measure.accuracy = combobox.get_list_value(self.combo['accuracy']) self.measure.mdate = self.entry['date'].get_text() self.measure.eid = combobox.get_list_value(self.combo['equipment']) self.measure.mcat = combobox.get_list_value(self.combo['category']) @@ -163,6 +197,13 @@ class MeasurementView(View): self.topwidget.set_visible_child(self.box['measure_detail']) self.button['close'].grab_focus() + def on_cmb_dimensions_changed(self, widget): + ndim = combobox.get_list_value(widget) + self.label['edit_val2'].set_visible(ndim > 1) + self.spin['val2'].set_visible(ndim > 1) + self.label['edit_val3'].set_visible(ndim > 2) + self.spin['val3'].set_visible(ndim > 2) + # buttons on detail page # edit2 uses edit callback def on_but_close_clicked(self, widget): @@ -180,12 +221,23 @@ class MeasurementView(View): # buttons on edit page def on_but_save_clicked(self, widget): # check mandatory fields - if not self.entry['mname'].get_text().strip(): + if not self.entry['name'].get_text().strip(): # TODO error marker + print("Save error mandatory fields missing") + self.infobar.set_message_type(Gtk.MessageType.WARNING) + self.infobar_label.set_text("Save error mandatory fields missing") + self.infobar.set_revealed(True) return + else: + self.infobar_label.set_text('') + self.infobar.set_revealed(False) self.save_record() print(self.measure) self.measure.save() + if self.newrecord: + self.load_list() + self.newrecord = False + self.display_record() self.topwidget.set_visible_child(self.box['measure_detail']) diff --git a/yms/view/projects.py b/yms/view/projects.py index d63beb8..a4ab99b 100644 --- a/yms/view/projects.py +++ b/yms/view/projects.py @@ -18,23 +18,7 @@ class ProjectsView(View): self.newrecord = False self.lst_projects = Gtk.ListStore(int, str, str, int, str, str) - sql = ( - "SELECT projid, projname, startdate, duration, projstate, remarks " - "FROM project " - "WHERE vid=%s " - "ORDER BY projid" - ) - self.db.dcur.execute(sql, (context.vessel.vid,)) - for row in self.db.dcur.fetchall(): - data = ( - row['projid'], - row['projname'], - self.format_date(row['startdate']), - row['duration'], - row['projstate'], - row['remarks'] - ) - self.lst_projects.append(data) + self.load_list() treeview.add_column(self.tree['projects'], _('ID'), 0) treeview.add_column(self.tree['projects'], _('Name'), 1) @@ -52,13 +36,38 @@ class ProjectsView(View): self.dd_state = self.context.lookup.enum('project.projstate') combobox.load_from_dict(self.combo['status'], self.dd_state) + def load_list(self): + selected_id = treeview.get_value(self.tree['projects']) + self.lst_projects.clear() + sql = ( + "SELECT projid, projname, startdate, duration, projstate, remarks " + "FROM project " + "WHERE vid=%s " + "ORDER BY projid" + ) + self.db.dcur.execute(sql, (self.context.vessel.vid,)) + selection = self.tree['projects'].get_selection() + for row in self.db.dcur.fetchall(): + data = ( + row['projid'], + row['projname'], + self.format_date(row['startdate']), + row['duration'], + row['projstate'], + row['remarks'] + ) + treeiter = self.lst_projects.append(data) + if row['projid'] == selected_id: + # restore previous selected row + selection.select_iter(treeiter) + def clear_record(self): self.project.clear() self.entry['name'].set_text('') combobox.activate_row(self.combo['responsible'], 0) self.entry['date_start'].set_text('') - self.spin['costs_plan'].set_value(0) - self.spin['costs_final'].set_value(0) + self.spin['costs_plan'].set_text('') + self.spin['costs_final'].set_text('') combobox.activate_row(self.combo['status'], 'new') self.text['remarks'].get_buffer().set_text('') self.entry['name'].grab_focus() @@ -76,15 +85,26 @@ class ProjectsView(View): def edit_record(self): self.entry['name'].set_text(self.project.projname) combobox.activate_row(self.combo['responsible'], self.project.responsible) - self.entry['date_start'].set_text(self.project.startdate) - self.spin['costs_plan'].set_value(self.project.costs_plan) - self.spin['costs_final'].set_value(self.project.costs_final) + self.entry['date_start'].set_text(self.format_date(self.project.startdate)) + if self.project.costs_plan: + self.spin['duration'].set_value(self.project.duration) + else: + self.spin['duration'].set_text('') + if self.project.costs_plan: + self.spin['costs_plan'].set_value(self.project.costs_plan) + else: + self.spin['costs_plan'].set_text('') + if self.project.costs_final: + self.spin['costs_final'].set_value(self.project.costs_final) + else: + self.spin['costs_final'].set_text('') combobox.activate_row(self.combo['status'], self.project.projstate) self.text['remarks'].get_buffer().set_text(self.project.remarks or '') self.entry['name'].grab_focus() def save_record(self): # fields must have been validated beforehand + self.project.vid = self.context.vessel.vid self.project.projname = self.entry['name'].get_text() self.project.responsible = combobox.get_list_value(self.combo['responsible']) self.project.costs_plan = int(self.spin['costs_plan'].get_value()) @@ -103,9 +123,9 @@ class ProjectsView(View): self.newrecord = False self.label['title_edit'].set_text(_("Edit Project")) projid = treeview.get_value(self.tree['projects'], 0) - if not projidid: + if not projid: return - self.measure.load(mid) + self.project.load(projid) self.edit_record() self.topwidget.set_visible_child(self.box['proj_edit']) @@ -142,12 +162,21 @@ class ProjectsView(View): # buttons on edit page def on_but_save_clicked(self, widget): # check mandatory fields - if not self.entry['projname'].get_text().strip(): + if not self.entry['name'].get_text().strip(): # TODO error marker return self.save_record() print(self.project) - self.project.save() + if not self.project.save(): + print("Project save error") + # TODO error in infobox + print(self.context.db.last_error()) + return + if self.newrecord: + self.load_list() + self.newrecord = False + self.display_record() + self.topwidget.set_visible_child(self.box['proj_detail']) def on_but_cancel_clicked(self, widget): self.topwidget.set_visible_child(self.box['projects']) diff --git a/yms/view/provisions.py b/yms/view/provisions.py index 43fbd9d..703070b 100644 --- a/yms/view/provisions.py +++ b/yms/view/provisions.py @@ -44,10 +44,10 @@ class ProvisionsView(View): self.tree['provisions'].set_model(self.lst_provisions) # TODO Date format - self.entry['storedate'].set_placeholder_text("TT.MM.JJJJ") - self.dt_storedate = DatePicker(self.entry['storedate'], self.button['storedate'], context.datefmt) - self.entry['shelflife'].set_placeholder_text("TT.MM.JJJJ") - self.dt_shelflife = DatePicker(self.entry['shelflife'], self.button['shelflife'], context.datefmt) + self.entry['storedate'].set_placeholder_text(context.get_datefmt_placeholder()) + self.dt_storedate = DatePicker(self.entry['storedate'], self.button['storedate'], context.get_datefmt()) + self.entry['shelflife'].set_placeholder_text(context.get_datefmt_placeholder()) + self.dt_shelflife = DatePicker(self.entry['shelflife'], self.button['shelflife'], context.get_datefmt()) def load_list(self): selected_id = treeview.get_value(self.tree['provisions']) @@ -58,6 +58,7 @@ class ProvisionsView(View): "WHERE s.vid=%s OR vid IS NULL" ) self.db.dcur.execute(sql, (self.context.vessel.vid,)) + selection = self.tree['provisions'].get_selection() for row in self.db.dcur.fetchall(): data = ( row['provid'], @@ -144,13 +145,14 @@ class ProvisionsView(View): self.prov.unit = combobox.get_list_value(self.combo['unit']) if self.prov.unit == -1: self.prov.unit = None + self.prov.calories = self.spin['calories'].get_value_as_int() # TODO respect configured date format # self.prov.storedate = self.dt_storedate.get_date() # self.prov.shelflife = self.dt_shelflife.get_date() try: self.prov.storedate = parse(self.entry['storedate'].get_text(), dayfirst=True) except ValueError: - self.prov.shelfstoredatelife = None + self.prov.storedate = None try: self.prov.shelflife = parse(self.entry['shelflife'].get_text(), dayfirst=True) except ValueError: diff --git a/yms/view/status.py b/yms/view/status.py index 4ef0d89..605322c 100644 --- a/yms/view/status.py +++ b/yms/view/status.py @@ -52,6 +52,13 @@ class StatusView: self.svg_centerline_y = 0.0 self.load_svg() + # subscribe to data change events + self.context.subscribe("vessel_changed", self.vessel_changed) + + def vessel_changed(self, data): + print(f"Vessel changed. New ID={data[0]}") + self.load_svg() + def load_svg(self): if not self.context.vessel.shapefile: print("No Shapefile defined for current vessel") diff --git a/yms/view/storage.py b/yms/view/storage.py index 70afd73..4b0013b 100644 --- a/yms/view/storage.py +++ b/yms/view/storage.py @@ -38,7 +38,6 @@ class StorageView(View): pass def refresh_row(self): - pass treeview.set_value(self.tree['storage'], 1, self.storage.name) position = f"({self.storage.x}, {self.storage.y}, {self.storage.z})" treeview.set_value(self.tree['storage'], 2, position) diff --git a/yms/view/tasks.py b/yms/view/tasks.py index 9bf394b..8e5c702 100644 --- a/yms/view/tasks.py +++ b/yms/view/tasks.py @@ -2,8 +2,10 @@ import os from gi.repository import Gtk +from dateutil.parser import parse +from datetime import datetime -from .view import View +from .view import View, DatePicker from yms import gtkutils, combobox, treeview from yms.model import task @@ -32,17 +34,24 @@ class TasksView(View): # Priority self.dd_priority = self.context.lookup.enum('task.priority') - combobox.load_from_dict(self.combo['priority'], self.dd_priority) + combobox.load_from_dict(self.combo['priority'], self.dd_priority, 'low') # Status self.dd_state = self.context.lookup.enum('task.taskstate') - combobox.load_from_dict(self.combo['status'], self.dd_state) + combobox.load_from_dict(self.combo['status'], self.dd_state, 'pending') # Responsible self.dd_user = context.lookup.user() - combobox.load_from_dict(self.combo['responsible'], self.dd_user) + combobox.load_from_dict(self.combo['responsible'], self.dd_user, 0) + + self.entry['plandate'].set_placeholder_text(context.get_datefmt_placeholder()) + self.dt_plandate = DatePicker(self.entry['plandate'], self.button['plandate'], context.get_datefmt()) + self.entry['duedate'].set_placeholder_text(context.get_datefmt_placeholder()) + self.dt_duedate = DatePicker(self.entry['duedate'], self.button['duedate'], context.get_datefmt()) def load_list(self): + selected_id = treeview.get_value(self.tree['tasks']) + self.lst_tasks.clear() sql = ( "SELECT t.taskid, t.taskname, t.priority, t.taskstate, " "u.displayname AS responsible " @@ -51,6 +60,7 @@ class TasksView(View): "ORDER BY t.taskid" ) self.db.dcur.execute(sql, (self.context.vessel.vid,)) + selection = self.tree['tasks'].get_selection() for row in self.db.dcur.fetchall(): data = ( row['taskid'], @@ -59,53 +69,77 @@ class TasksView(View): row['taskstate'], row['responsible'] ) - self.lst_tasks.append(data) + treeiter = self.lst_tasks.append(data) + if row['taskid'] == selected_id: + # restore previous selected row + selection.select_iter(treeiter) def clear_record(self): self.task.clear() self.entry['name'].set_text('') combobox.activate_row(self.combo['project'], -1) - combobox.activate_row(self.combo['priority'], -1) + combobox.activate_row(self.combo['priority'], 'low') self.entry['plandate'].set_text('') self.entry['duedate'].set_text('') self.entry['started'].set_text('') self.entry['finished'].set_text('') - combobox.activate_row(self.combo['status'], 'new') + combobox.activate_row(self.combo['status'], 'pending') combobox.activate_row(self.combo['responsible'], 0) self.text['remarks'].get_buffer().set_text('') self.entry['name'].grab_focus() def display_record(self): self.label['name'].set_text(self.task.taskname) - self.label['responsible'].set_text('') + self.label['project'].set_text(self.dd_project.get(self.task.projid, '')) + self.label['priority'].set_text(self.dd_priority[self.task.priority]) + self.label['plandate'].set_text(self.format_date(self.task.plandate)) + self.label['duedate'].set_text(self.format_date(self.task.duedate)) + self.label['started'].set_text(self.format_datetime(self.task.started)) + self.label['finished'].set_text(self.format_datetime(self.task.finished)) self.label['status'].set_text(self.task.taskstate) + self.label['responsible'].set_text('') self.label['remarks'].set_text(self.task.remarks or '') def edit_record(self): self.entry['name'].set_text(self.task.taskname) combobox.activate_row(self.combo['project'], self.task.projid) combobox.activate_row(self.combo['priority'], self.task.priority) - self.entry['plandate'].set_text(self.task.plandate) - self.entry['duedate'].set_text(self.task.duedate) - self.entry['started'].set_text(self.task.started) - self.entry['finished'].set_text(self.task.finsihed) - combobox.activate_row(self.combo['taskstate'], self.task.taskstate) + self.entry['plandate'].set_text(self.format_date(self.task.plandate)) + self.entry['duedate'].set_text(self.format_date(self.task.duedate)) + self.entry['started'].set_text(self.format_datetime(self.task.started)) + self.entry['finished'].set_text(self.format_datetime(self.task.finished)) + combobox.activate_row(self.combo['status'], self.task.taskstate) combobox.activate_row(self.combo['responsible'], self.task.responsible) self.text['remarks'].get_buffer().set_text(self.task.remarks or '') self.entry['name'].grab_focus() def save_record(self): # fields must have been validated beforehand + self.task.vid = self.context.vessel.vid self.task.taskname = self.entry['name'].get_text() self.task.projid = combobox.get_list_value(self.combo['project']) - self.task.priority = combobox.get_list_value(self.combo['project']) - self.task.plandate = self.entry['plandate'].get_text() - self.task.duedate = self.entry['duedate'].get_text() - self.task.started = self.entry['started'].get_text() - self.task.finished = self.entry['finished'].get_text() - self.task.taskstate = combobox.get_list_value(self.combo['taskstate']) - self.task.resposible = combobox.get_list_value(self.combo['responsible']) - self.project.remarks = gtkutils.get_text_contents(self.text['remarks']) + if self.task.projid == -1: + self.task.projid = None + self.task.priority = combobox.get_list_value(self.combo['priority']) + try: + self.task.plandate = parse(self.entry['plandate'].get_text(), dayfirst=True) + except ValueError: + self.task.plandate = None + try: + self.task.duedate = parse(self.entry['plandate'].get_text(), dayfirst=True) + except ValueError: + self.task.duedate = None + try: + self.task.started = parse(self.entry['started'].get_text(), dayfirst=True) + except ValueError: + self.task.started = None + try: + self.task.finished = parse(self.entry['finished'].get_text(), dayfirst=True) + except ValueError: + self.task.finished = None + self.task.taskstate = combobox.get_list_value(self.combo['status']) + self.task.responsible = combobox.get_list_value(self.combo['responsible']) + self.task.remarks = gtkutils.get_text_contents(self.text['remarks']) # buttons on list page def on_but_new_clicked(self, widget): diff --git a/yms/view/view.py b/yms/view/view.py index 76931a0..4f3b81d 100644 --- a/yms/view/view.py +++ b/yms/view/view.py @@ -30,6 +30,10 @@ class View: self.builder.connect_signals(self) self.topwidget = self.builder.get_object("topobject") + self.infobar = self.builder.get_object("infobar") + if self.infobar: + self.infobar.set_revealed(False) + gtkutils.init_named_controls(self, self.builder) def format_int(self, ival, separator=True, suffix=None, default=''): @@ -51,7 +55,23 @@ class View: def format_date(self, dval, default=''): if dval is None: return default - return dval.strftime(self.context.datefmt) + return dval.strftime(self.context.get_datefmt()) + + def format_datetime(self, dtval, default=''): + # we do not use seconds! + if dtval is None: + return default + return dtval.strftime(self.context.get_datefmt() + ' %H:%M') + + def format_color(self, color, default=''): + # alpha only for "no color" + if not color or color.alpha == 0: + return default + else: + r = round(color.red * 255) + g = round(color.green * 255) + b = round(color.blue * 255) + return f"#{r:02X}{g:02X}{b:02X}" def on_textview_keypress(self, widget, event): # Generic limit length function @@ -120,14 +140,18 @@ class View: context.add_class("invalid") def set_color_from_entry(self, entry, colorbutton): - # TODO this was a fast hack! text = entry.get_text().strip() + if len(text) == 6: + text = '#' + text rgba = Gdk.RGBA() if len(text) == 7 and rgba.parse(text): self.last_valid_rgb = text.lstrip('#') - self.entry.set_text(text) + entry.set_text(text.upper()) colorbutton.set_rgba(rgba) self.set_entry_valid(entry, True) + elif len(text) == 0: + # set color to "no color" means: black with alpha=0 + colorbutton.set_rgba(Gdk.RGBA(0, 0, 0, 0)) else: self.set_entry_valid(entry, False) diff --git a/ymsgui.py b/ymsgui.py index 618a9e5..5ce5645 100755 --- a/ymsgui.py +++ b/ymsgui.py @@ -94,7 +94,7 @@ class AppContext: self.ui_path = os.path.join(self.get_sharepath(), "yms", "ui") self.textdomain = "ymsgui" # static here for early initialization self.localedir = "locale" - self.datefmt = '%d.%m.%Y' + self.datefmt = 'Y-m-d' # key into map self.scan_enabled = False # system settings stored in database self.curr_sym = '€' @@ -167,6 +167,12 @@ class AppContext: return "/usr/share" return "" + def get_datefmt(self): + return self.datefmt_map[self.datefmt][0] + + def get_datefmt_placeholder(self): + return self.datefmt_map[self.datefmt][1] + class Frontend: def __init__(self, context): @@ -235,7 +241,7 @@ class Frontend: self.db.cur.execute(sql, (self.db_poll_ts,)) for row in self.db.cur.fetchall(): print(f"refresh table based list #{row[0]}") - # TODO get module name für changes in table + # TODO get module name for changes in table modulemap = { #Table.VESSEL: "base", #Table.USERS: "base",