Compare commits

...

194 Commits

Author SHA1 Message Date
15f4d65faa Merge branch 'release/1.6.0' 2025-05-26 17:07:19 +02:00
33dd7518ef Zwei Nachkommastellen für den Tiefgang in der Übersicht 2025-05-22 07:40:34 +02:00
5459e1dd78 Moved draft up and put unit behind the value 2025-05-20 08:31:54 +02:00
f7fed255d5 Added german satellite assemblies to setup project 2025-05-20 08:26:18 +02:00
c3d8e901c4 Version bump and updated setup project 2025-04-29 10:57:16 +02:00
be08ad6a3a Draft instead of callsign in BSMD cell 2025-04-28 15:43:31 +02:00
3f37ee67e5 Merge branch 'release/1.6.0' 2024-12-11 12:09:38 +01:00
4f96ff066c fixed serverside path 2024-12-11 11:36:16 +01:00
2600b6ebc3 Switched to PROD version 2024-12-11 11:32:44 +01:00
27e20e15f7 fixed bug in participant API GET with user_id parameter 2024-12-11 09:39:26 +01:00
864e023495 Merge branch 'release/1.6.0' of ssh://lager/mnt/ext/git/git_brcal into release/1.6.0 2024-12-10 10:47:35 +01:00
70977e9abd Version bump to 1.6.0.8 2024-12-07 15:12:16 +01:00
d536d9479e Do not allow editing on cancelled shipcalls 2024-12-07 14:50:40 +01:00
c253de0ba8 fixed missing shipcall id in backend result 2024-12-07 14:49:58 +01:00
e28a5c1560 Throw sensible error if user without port assignment logs on 2024-12-06 11:40:00 +01:00
2df14d957b Suggested times may be up to 1 day in the past, interval from which is older than one day leads to end time not being suggested 2024-12-06 11:07:30 +01:00
c322564996 Fixed ship add in backend 2024-12-05 08:51:02 +01:00
f035f2427f Version bump to 1.6.0.6 2024-12-04 10:27:01 +01:00
2ff4b45a52 Fixed small bug regarding read only of port combobox 2024-12-04 09:44:16 +01:00
7f011d7dc9 fixed init when Port has been preselected but no berth 2024-12-04 09:34:36 +01:00
f0c33868d2 Do not run change port event handler during iinit 2024-12-04 09:14:04 +01:00
86408adb7c Version bumpt to 1.6.0.5 2024-12-02 14:07:35 +01:00
17ca43646f Do port dependencies for comboboxes also when loading existing shipcall 2024-12-02 08:52:47 +01:00
b5c100294c Make pier filter combobox dependent on selected harbour 2024-12-02 08:24:37 +01:00
ddd2efa86d Port may only be changed if the shipcall is created 2024-12-02 08:15:23 +01:00
05d02773fd Updated publish version 2024-11-19 14:37:25 +01:00
8e2adb3daa Changed settings and colors for test version 2024-11-19 14:06:11 +01:00
c49953bf8e Merge branch 'release/1.5.0' 2024-11-18 15:10:19 +01:00
1cc029f237 Updated release profile 2024-11-18 15:04:26 +01:00
4870c81783 Merge branch 'feature/extra_time_logic' into release/1.5.0 2024-11-14 11:58:30 +01:00
afd5935cf5 Bumbed Version to 1.5.0.12 2024-11-13 08:08:09 +01:00
1e9835cded fixed comparison typo 2024-11-13 08:07:22 +01:00
d4e273279b adding missing defaults when shipcall is not yet created 2024-11-12 08:19:04 +01:00
1150688731 Bumped version to 1.5.0.11 2024-11-11 11:02:38 +01:00
9ad882c2ef Fixed situation where end time was reset after from time left 24h window 2024-11-11 11:01:31 +01:00
1770c604b2 serverside fixes for detecting unchanged time values 2024-11-10 15:08:41 +01:00
7ba5633463 Merge branch 'feature/test_server_1.5' into feature/extra_time_logic 2024-11-09 18:14:14 +01:00
529872b590 Allow new shipcalls up to 1 day in the past for serverside validation 2024-11-07 09:26:23 +01:00
904dc629e2 Version bump to 1.5.0.10 2024-11-07 09:19:29 +01:00
61707d8fde Apply 1 day past rule to both from and to times on eta / etd to avoid loophole 2024-11-07 08:33:22 +01:00
83e538a58b Allow new shipcalls up to 1 day in the past for serverside validation 2024-11-06 16:22:34 +01:00
7f51842ccc Version bump to 1.5.0.9 2024-11-05 14:12:04 +01:00
6b5d876cd5 added -1 day time logic to client 2024-11-05 13:26:53 +01:00
7095a2cf2a Bump version to 1.5.0.8 2024-11-05 09:07:17 +01:00
0d9f5be80b allow ATA changes in the past, allow OK click if time values have not been changed 2024-11-05 09:06:59 +01:00
7988a04562 fixed connection data path 2024-10-29 11:47:11 +01:00
ae6ca1bb05 fixed flask path 2024-10-29 11:44:15 +01:00
158b61c281 Prepared deployment version for 1.5.0 (blue) 2024-10-29 10:00:45 +01:00
f1e1355986 more validation input fixes 2024-10-18 11:49:18 +02:00
e911da20ef Fixed tidal window validation and description output 2024-10-18 09:51:29 +02:00
2ee9af4b9d Version bump to 1.5.0.7 2024-10-17 15:41:50 +02:00
5e2cb3f745 Fixed some more small bugs in validation when only a partial times dataset is put 2024-10-17 14:49:51 +02:00
704c58222c Fix text filter if there is whitespace in the text, simplified some events 2024-10-17 07:42:36 +02:00
401e0d4ae8 bugfix for shipcall PUT validation 2024-10-16 16:16:54 +02:00
scopesorting
c0902c65ee
regardless of the BSMD flag, BSMD users are now able to perform shipc… (#51)
* regardless of the BSMD flag, BSMD users are now able to perform shipcall PUT-requests

* regardless of the BSMD flag, BSMD users are now able to perform shipcall PUT-requests

* docstrings and BSMD-flag handling
2024-10-15 15:19:08 +02:00
8fe2a9ebca Fixed error in validation when times data was updated for operations 2024-09-26 15:00:41 +02:00
d62250fb4f Limit shifting number to 127 to avoid int -> uint overflow on insert 2024-09-25 07:57:58 +02:00
28404fb8b6 Version bump to 1.5.0.6 2024-09-23 08:56:55 +02:00
40e1c91755 Merge branch 'feature/extra_warnings' into release/1.5.0 2024-09-23 08:52:39 +02:00
7921a138d4 fixed bug in ship create 2024-09-23 08:39:25 +02:00
0c8a5cfc2c fixed site module include path 2024-09-23 08:24:39 +02:00
27179da2a2 fixed some missing client warnings 2024-09-22 14:43:52 +02:00
df050cb83b
Merge pull request #50 from puls200/hotfix/20240912
Hotfix/20240912
2024-09-18 08:27:36 +02:00
Max Metz
5e50e09966 when a ship is deleted, the IMO is no longer considered to exist 2024-09-17 15:33:48 +02:00
0bd526e08e Version bump to 1.5.0.5 2024-09-17 10:12:11 +02:00
Max Metz
8df9034574 BSMD-flag check was executed on the wrong ID. Now, it correctly uses the assigned agency's ID to determine the presence of a BSMD flag 2024-09-12 11:07:45 +02:00
030e2d2c5e Merge branch 'release/1.4.0' 2024-07-25 13:06:37 +02:00
ec75d2c0a8 Updated settings for production version 2024-07-25 09:59:49 +02:00
1c478d3515 Bugfix for comparer when times value is null and DateTime.Now is inconsistent 2024-07-25 09:38:10 +02:00
e687ca591c Settings updated for test version 2024-07-25 09:37:36 +02:00
a2eeacde5a Merge branch 'release/1.3.0' 2024-07-18 06:58:46 +02:00
be375b67e3 some weird changes to setup automatically made 2024-07-18 06:56:56 +02:00
7f1923b6c8 Release version 1.3.0.4 2024-07-15 08:09:01 +02:00
244d9fd962 Test version 1.3.0.4 2024-07-15 07:35:32 +02:00
ed82d4fb4a Merge branch 'release/1.2.2' 2024-07-09 07:59:56 +02:00
b3d895093a Versionsänderungen für 1.2.2.3 produktiv 2024-07-02 09:59:03 +02:00
a91a31a8e1 Updated product code to be able to update the package 2024-07-01 13:18:42 +02:00
b3d6da4769 Updated version for test version 1.2.2.3 2024-06-30 13:09:18 +02:00
a31d58ae9b Only user Interval end if interval start is also unset (as suggestion in terminal control) 2024-06-30 13:02:37 +02:00
8e842fbd5d Fixed 4 digit time entry 2024-06-30 12:42:41 +02:00
a02b483932 Increased version to 1.2.2.2 for next test release 2024-06-28 11:40:00 +02:00
39f6e93576 Changed interval date formatting so intervals spanning multiple days show ok 2024-06-28 11:13:00 +02:00
c1b4affb20 Filter shipcalls that have ata set and ata is more than 2 hours in the past 2024-06-28 10:47:27 +02:00
30c8069a9b For the interval, the end date is also set in the control 2024-06-28 10:46:45 +02:00
3fa35bb14a Simplified input text filtering:
If user enters 10 digits, then these are split up for the date
2024-06-28 10:46:15 +02:00
8535608e07 Fixed cosmetic and increased (test) version to 1.2.2.1 2024-06-27 17:27:17 +02:00
f9ea6b45fe include last minute for day filter 2024-06-27 16:47:09 +02:00
57c0268b79 fixed bug in search filter where time component wasnt cut of (as expected) 2024-06-27 16:41:33 +02:00
d768288f4e Enter Agency Time as highlighted suggestion for other participants (not terminal) 2024-06-25 08:22:25 +02:00
9a6c51c0b3 Improved date recognition somewhat 2024-06-24 16:01:02 +02:00
fb40455aa6 More version changes 2024-06-24 16:00:42 +02:00
a7a147a123 Set to red Test version 1.2.2 2024-06-24 15:43:09 +02:00
35765b97b1 Merge branch 'release/1.2.0' 2024-05-06 13:38:39 +02:00
fe2499707d fixed database connection reference 2024-05-06 11:25:35 +02:00
ccef84e119 Increased version to 1.2.0.10 in prod. version 2024-05-06 09:21:11 +02:00
1f9a3876ad Bugfix mixup enabled/readonly 2024-05-05 11:38:15 +02:00
4007459e93 increased 1 hour comparison by 60 seconds to avoid seconds deviation 2024-05-05 11:37:53 +02:00
c5a88cb8f2 created release (blue) version from test version 2024-05-02 14:26:49 +02:00
5edfa0522f created release (blue) version from test version 2024-05-02 14:26:24 +02:00
1164c8055d fixed another SQL typo 2024-05-02 13:19:38 +02:00
dc62bd005a fixed schedule sql 2024-05-02 10:49:01 +02:00
70d8f053bb Maximum threshold should still be allowed (e.g. 1 hour) 2024-05-02 10:43:09 +02:00
4cacc4809c increased version 2024-05-02 09:41:08 +02:00
3734e672fc set schedule logging to INFO and using correct query for schedule test calls 2024-05-02 09:10:37 +02:00
db0bcea485 fixed wrong offset of evaluation lights (traffic) due to erroneous cast to int 2024-05-02 09:09:24 +02:00
Max Metz
29618fbf93 fixing: generator didn't stop after throw() 2024-04-30 07:01:13 +02:00
e28739561f fixed labels for test version 1.2.0.8 2024-04-30 06:56:32 +02:00
Max Metz
a92338c92e adapting validation rules for version 1.2. Rules 0002: the time-difference threshold for 'disagreement' is expanded to 1 hour. There is now element-wise comparison of elements to circumvent instabilities from rounding pd.Timestamp objects. Rules 0001 L&M and 0003: created a feature flag, which skips the evaluation of Terminal times altogether. For version 1.2, this feature flag is enabled. 2024-04-29 13:45:27 +02:00
f690387be8 improved sorting and using COALESCE instead of not null 2024-04-29 11:32:45 +02:00
3579d779e8 Catch exceptions on history updates 2024-04-29 07:56:57 +02:00
c705b4396f fixed display of remarks text fields across all input editors 2024-04-28 13:36:40 +02:00
3e4eebfb7b Created DELETE script for old data used in a stored procedure 2024-04-28 13:34:36 +02:00
032f0ebba8 Increased labels for test version 1.2.0.7 2024-04-25 10:33:35 +02:00
7abbd190b5 Calling dialog for outgoing shipcall async to show incoming call asap 2024-04-25 09:07:39 +02:00
afac489299 Optics adjustment: Scrollbar width, text cutoff with ... and set textareas to readonly but enabled for better viewing 2024-04-25 08:11:14 +02:00
8e5b20995d Fixed bug where app was accidentally switched to en-us locale by old ENI code 2024-04-24 11:21:59 +02:00
f2328fb18c Increased labels for test version 1.2.0.6 2024-04-23 17:35:48 +02:00
212e76f7cb Make lock time editable only for port authority and show it in the overview grid 2024-04-23 12:01:50 +02:00
f58688499a Added history filter for own shipcalls only, added wait cursor for longer reloading ops 2024-04-22 10:46:34 +02:00
9f80f2cf5f Removed seconds from ATA/ATD display 2024-04-22 09:26:39 +02:00
f87901e432 Fixed a bug where complete shiplist was selectable instead of only non-deleted ships after closing the shiplist editor 2024-04-22 09:18:54 +02:00
ec65355473 localized the shipcall type combobox selection 2024-04-22 09:11:02 +02:00
f232285e76 intermediate client version 1.2.0.5 2024-04-20 08:37:43 +02:00
b0c6b639be Fixed bug where ship was not initially shown in overview 2024-04-19 16:55:29 +02:00
634c638e27 pimped up the optics of a shipcall cell (a bit) 2024-04-19 16:07:00 +02:00
829b7d9c3c Resized agent controls to not cut off a label 2024-04-18 15:45:29 +02:00
56d9346f9d Avoid crash if delete is tried on deleted object 2024-04-18 15:36:15 +02:00
8b2b454f97 increased version for test system 2024-04-13 15:55:42 +02:00
7147b92c75 Added a manual refresh button because.. well.. they asked for it 2024-04-13 12:55:47 +02:00
f0cc749026 Bugfix for creating new shipcalls 2024-04-13 12:32:28 +02:00
1cf2f3b8de Remove old shipcalls if time filter ETA FROM is cleared again 2024-04-12 09:44:56 +02:00
16e244e757 Only allow non deleted ships to be selected and safeguard the create ship dialog 2024-04-12 09:17:59 +02:00
3455139c74 fix for ship logical delete server-side 2024-04-12 08:40:36 +02:00
1a3146cf85 Set a default value for time range filter minimum 2024-04-10 14:57:49 +02:00
7432e58b6a increased test version in pub. profile 2024-04-10 14:55:48 +02:00
16b8b6366b Improved on history display, showing type and eta/etd.
Also using a link label style to allow to move overview grid by clicking on the element
2024-04-10 13:46:10 +02:00
d25eea2f92 Make sorting take agency times as more important into account if they are set 2024-04-10 12:04:29 +02:00
004908e9c0 Allow other time ref points only when shipcall is an arrival 2024-04-10 11:51:49 +02:00
dc39a62293 log shipcall post query 2024-04-10 11:02:40 +02:00
504e36d97b Fixed small issues when creating a new ship 2024-04-10 10:21:34 +02:00
32a1d93840 Made all edit dialogs resizable and added scrollviewers to text inputs 2024-04-09 15:44:06 +02:00
7d196957d3 fixed POST when a null evaluation enum is sent 2024-04-08 13:49:52 +02:00
28767fb4c3 fixed conn. data 2024-04-08 13:31:00 +02:00
0a8e78e6d2 fixed serialization in case of null values read 2024-04-08 13:27:33 +02:00
6a05e7494b log incoming data on shipcall POST 2024-04-08 13:12:30 +02:00
e7586b9747 do not show undefined entry in shipcall type combobox 2024-04-08 12:38:37 +02:00
7056f1f4d2 Prevent adding of empty records by checking if required fields have been set 2024-04-08 11:26:36 +02:00
931b81d5e4 Added Tooltip for fixed order button in edit dialog 2024-04-08 10:43:53 +02:00
79ff161b4e Changed paths and colors for Test version 2024-04-03 20:05:22 +02:00
f9c664fbc0 Merge branch 'release/1.1.6' 2024-03-13 18:15:59 +01:00
754d6a78f4 Changed names for prod version 2024-03-13 18:04:45 +01:00
9fd54f17f2 increased deployment version 2024-02-09 12:57:41 +01:00
d9b785982f Creating intermediate test (red) release 2024-02-09 12:42:59 +01:00
4c73145857 Merge branch 'master' into release/1.1.1 2024-01-16 07:20:06 +01:00
a9f1de2637 Changes for (blue) release version 2024-01-15 18:13:04 +01:00
e659203364 Version bump 1.1.4 -> 1.1.5 2024-01-12 11:33:35 +01:00
3727bf266d Merge branch 'bugfix/tug_times_trouble' into release/1.1.1 2024-01-12 11:27:57 +01:00
3e17983f2d Removed spinner from IMO integerUpDown 2024-01-12 11:26:12 +01:00
126d74ec48 Changed validation rule 002 A-C so that the agency time is set as reference time allowing 15 minute deviation 2024-01-12 11:22:20 +01:00
b44620b0ad Version bump 1.1.3 -> 1.1.4 2024-01-05 10:55:48 +01:00
df5f88d3cf Fixed time comparison validation func. Now compares min/max value of array. 2024-01-05 10:51:13 +01:00
e5f5694d52 fixed filtering by berth id, also including outgoing and shifting moves 2024-01-05 08:09:54 +01:00
96b0d7aecf set appsettings correctly 2023-12-29 15:01:35 +01:00
6952fadbcb Version bump 1.1.2 -> 1.1.3 2023-12-29 14:51:38 +01:00
0f313e2c21 Merge branch 'bugfix/ui_fixes_1.1.2' into release/1.1.1 2023-12-29 14:49:58 +01:00
8d1415e33d Version bump 1.1.1 -> 1.1.2 2023-12-28 11:59:58 +01:00
5f01188541 merged fixes from correction branch 2023-12-28 11:55:03 +01:00
e7936b679c remaining stuff 2023-12-26 17:46:58 +01:00
f76bcf3cbb Changed strings labels and colors for test version 2023-12-26 17:43:54 +01:00
956ba2832a Merge branch 'bugfix/empty_times' 2023-12-01 10:02:40 +02:00
scopesorting
377ec85ce9 more concise evaluation messages for 0001. Adding newlines (works on Windows) when multiple evaluation messages are shown. Properly adding the ShipcallType filters for each rule (whether incoming, outgoing or shifting). Added a regular expression to abbreviate an evaluation message when 512 characters are exceeded. 2023-12-01 09:29:20 +02:00
scopesorting
a0785d012c changing the ParticipantType to an IntFlag, so multiple roles are possible. Adapting every validation rule (0001, 0003, 0004, 0005), which may be affected by this change. Changing the filter for a participant type to properly include the change. Changing the pier_side rule (0006B), which uses the shipcall and times_terminal. New shipcalls should now be evaluated properly, unless no participant is assigned at all. If the ladder case can occur, the validation rules 0001N+0001O will be added (held back for now). 2023-12-01 09:29:01 +02:00
scopesorting
efff2fdf82 removing verbosity in validation rule functions, and returning 'None', when a selected times dataframe is empty. In case of empty results, the function now properly computes the delta towards a query time and returns YELLOW, when a violation is observed. This should finally fix the bugs for 0001 A-M 2023-12-01 09:28:36 +02:00
scopesorting
d6a6cc00ff updating validation rules 0001 A-M. Instead of filtering by times_df (which may not exist), the rules make use of the shipcall_participant_map. When one of the participants in a rule is not assigned, no violation is observed. When there are multiple entries of a participant (due to an input bug), the function still verifies properly. When critical time is observed, and there is not yet an entry for the respective key time, there will be a 'yellow' state. 2023-12-01 09:28:11 +02:00
scopesorting
ecdf66bff2 updating check_time_delta_violation_query_time_to_now: no longer ignoring events of the past (delta<=0) 2023-11-28 16:48:20 +01:00
scopesorting
287224eeb4 ensuring that len(df_times) always works. Preventing 'None' from occuring 2023-11-28 14:49:40 +01:00
scopesorting
210252df22 minot adjustments & refactoring 2023-11-28 14:26:38 +01:00
scopesorting
c064556668 fixing the 'KeyError' when using an empty times dataframe. Returning 'green' 2023-11-28 14:17:07 +01:00
adaef94854 added trace output and fixed a bug when saving shipcalls without times 2023-11-28 11:23:46 +01:00
c3f8759c70 fixed error in publish xml 2023-11-26 18:08:38 +01:00
131528021d set everything to blue, meaning prod version 1.0.0 2023-11-26 17:37:31 +01:00
5b2d6db5d3 set everything to red, meaning test version 1.0.0 2023-11-26 17:05:32 +01:00
902cb9d90d Updated to Version 0.9.6 for public version 2023-11-15 14:59:23 +01:00
e77c9264b9 Merge branch 'release/pub_0.9.4' 2023-10-27 09:05:08 +02:00
79f6f26293 setup client to produce a producion release 2023-10-27 08:45:10 +02:00
1f355203f0 Version bump to 0.9.4.0 2023-10-27 07:41:06 +02:00
2917fb5b2a Merge branch 'release/0.6' 2023-09-21 10:51:37 +02:00
c104fcf9c0 updated test profile 2023-09-21 10:48:16 +02:00
ccf4ed0565 Merge branch 'release/0.5.0' 2023-09-04 07:55:29 +02:00
d0c0a62cfe Merge branch 'release/0.4.0' 2023-09-04 07:55:06 +02:00
ed0a337929 Increased version for release 2023-08-24 08:15:46 +02:00
4dd07da09b Release 0.4.0. 2023-08-21 19:27:14 +02:00
699552e23c Version 0.3.0 Client release 2023-08-18 16:44:06 +02:00
d09ca5bb8a updated version info 2023-08-16 10:27:13 +02:00
37 changed files with 490 additions and 246 deletions

View File

@ -4971,7 +4971,7 @@ namespace BreCalClient.misc.Client
{
Proxy = null;
UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.0.0/csharp");
BasePath = "https://brecaldevel.bsmd-emswe.eu";
BasePath = "https://brecal.bsmd-emswe.eu";
DefaultHeaders = new ConcurrentDictionary<string, string>();
ApiKey = new ConcurrentDictionary<string, string>();
ApiKeyPrefix = new ConcurrentDictionary<string, string>();
@ -4979,7 +4979,7 @@ namespace BreCalClient.misc.Client
{
{
new Dictionary<string, object> {
{"url", "https://brecaldevel.bsmd-emswe.eu"},
{"url", "https://brecal.bsmd-emswe.eu"},
{"description", "Development server hosted on vcup"},
}
}
@ -4998,7 +4998,7 @@ namespace BreCalClient.misc.Client
IDictionary<string, string> defaultHeaders,
IDictionary<string, string> apiKey,
IDictionary<string, string> apiKeyPrefix,
string basePath = "https://brecaldevel.bsmd-emswe.eu") : this()
string basePath = "https://brecal.bsmd-emswe.eu") : this()
{
if (string.IsNullOrWhiteSpace(basePath))
throw new ArgumentException("The provided basePath is invalid.", "basePath");

View File

@ -14,8 +14,8 @@ info:
name: Use at your own risk
url: 'https://www.bsmd.de/license'
servers:
- url: 'https://brecaldevel.bsmd-emswe.eu'
description: Development server hosted on vcup
- url: 'https://brecal.bsmd-emswe.eu'
description: Test server hosted on vcup
tags:
- name: user
- name: shipcall

31
misc/delete_data.sql Normal file
View File

@ -0,0 +1,31 @@
CREATE DEFINER=`ds`@`localhost` PROCEDURE `delete_data`()
BEGIN
DECLARE shipcall_id_var int;
DECLARE done INT DEFAULT FALSE;
DECLARE shipcall_iter CURSOR FOR
SELECT shipcall.id FROM shipcall
LEFT JOIN times ON
times.shipcall_id = shipcall.id AND times.participant_type = 8
WHERE
-- ARRIVAL
(type = 1 AND GREATEST(shipcall.eta, COALESCE(times.eta_berth, 0)) <= CURRENT_DATE() - INTERVAL 1 MONTH) OR
-- DEPARTURE / SHIFTING
(type != 1 AND GREATEST(shipcall.etd, COALESCE(times.etd_berth, 0)) <= CURRENT_DATE() - INTERVAL 1 MONTH);
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
OPEN shipcall_iter;
delete_loop: LOOP
FETCH shipcall_iter INTO shipcall_id_var;
IF done THEN
LEAVE delete_loop;
END IF;
DELETE FROM shipcall_participant_map WHERE shipcall_id = shipcall_id_var;
DELETE FROM shipcall_tug_map WHERE shipcall_id = shipcall_id_var;
DELETE FROM times WHERE shipcall_id = shipcall_id_var;
DELETE FROM shipcall WHERE id = shipcall_id_var;
END LOOP;
CLOSE shipcall_iter;
END

View File

@ -2,7 +2,7 @@
-- evaluation_time: Time when the "traffic light" was last changed
-- evaluation_notifications_sent: Flag to indicate if notifications were sent for the current evaluation
ALTER TABLE `bremen_calling_devel`.`shipcall`
ALTER TABLE `bremen_calling_test`.`shipcall`
ADD COLUMN `evaluation_time` DATETIME NULL DEFAULT NULL AFTER `evaluation_message`,
ADD COLUMN `evaluation_notifications_sent` BIT NULL AFTER `evaluation_time`,
ADD COLUMN `time_ref_point` INT NULL DEFAULT 0 COMMENT 'Index of a location which is the reference point for all time value entries, e.g. berth or Geeste' AFTER `modified`;
@ -12,10 +12,10 @@ ADD COLUMN `time_ref_point` INT NULL DEFAULT 0 COMMENT 'Index of a location whic
-- removed reference to participant and times and dropped unnecessary columns
-- added reference to shipcall
ALTER TABLE `bremen_calling_devel`.`notification`
ALTER TABLE `bremen_calling_test`.`notification`
DROP FOREIGN KEY `FK_NOT_TIMES`,
DROP FOREIGN KEY `FK_NOT_PART`;
ALTER TABLE `bremen_calling_devel`.`notification`
ALTER TABLE `bremen_calling_test`.`notification`
DROP COLUMN `deleted`,
DROP COLUMN `acknowledged`,
DROP COLUMN `participant_id`,
@ -25,10 +25,10 @@ ADD INDEX `FK_NOTIFICATION_SHIPCALL_idx` (`shipcall_id` ASC) VISIBLE,
DROP INDEX `FK_NOT_PART` ,
DROP INDEX `FK_NOT_TIMES` ;
;
ALTER TABLE `bremen_calling_devel`.`notification`
ALTER TABLE `bremen_calling_test`.`notification`
ADD CONSTRAINT `FK_NOTIFICATION_SHIPCALL`
FOREIGN KEY (`shipcall_id`)
REFERENCES `bremen_calling_devel`.`shipcall` (`id`)
REFERENCES `bremen_calling_test`.`shipcall` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION;
@ -36,22 +36,22 @@ ADD CONSTRAINT `FK_NOTIFICATION_SHIPCALL`
-- added notification flags
-- participant reference is now mandatory
ALTER TABLE `bremen_calling_devel`.`user`
ALTER TABLE `bremen_calling_test`.`user`
DROP FOREIGN KEY `FK_USER_PART`;
ALTER TABLE `bremen_calling_devel`.`user`
ALTER TABLE `bremen_calling_test`.`user`
ADD COLUMN `notify_email` BIT NULL DEFAULT NULL AFTER `api_key`,
ADD COLUMN `notify_whatsapp` BIT NULL DEFAULT NULL AFTER `notify_email`,
ADD COLUMN `notify_signal` BIT NULL DEFAULT NULL AFTER `notify_whatsapp`,
ADD COLUMN `notify_popup` BIT NULL DEFAULT NULL AFTER `notify_signal`,
CHANGE COLUMN `participant_id` `participant_id` INT UNSIGNED NOT NULL ;
ALTER TABLE `bremen_calling_devel`.`user`
ALTER TABLE `bremen_calling_test`.`user`
ADD CONSTRAINT `FK_USER_PART`
FOREIGN KEY (`participant_id`)
REFERENCES `bremen_calling_devel`.`participant` (`id`);
REFERENCES `bremen_calling_test`.`participant` (`id`);
-- History table for change tracking
CREATE TABLE `bremen_calling_devel`.`history` (
CREATE TABLE `bremen_calling_test`.`history` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`participant_id` INT UNSIGNED NOT NULL,
`user_id` INT UNSIGNED NOT NULL,
@ -65,31 +65,31 @@ COMMENT = 'This table stores a history of changes made to shipcalls so that ever
-- and foreign keys
ALTER TABLE `bremen_calling_devel`.`history`
ALTER TABLE `bremen_calling_test`.`history`
ADD INDEX `FK_HISTORY_PARTICIPANT_idx` (`participant_id` ASC) VISIBLE,
ADD INDEX `FK_HISTORY_SHIPCALL_idx` (`shipcall_id` ASC) VISIBLE;
;
ALTER TABLE `bremen_calling_devel`.`history`
ALTER TABLE `bremen_calling_test`.`history`
ADD CONSTRAINT `FK_HISTORY_PARTICIPANT`
FOREIGN KEY (`participant_id`)
REFERENCES `bremen_calling_devel`.`participant` (`id`)
REFERENCES `bremen_calling_test`.`participant` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
ADD CONSTRAINT `FK_HISTORY_SHIPCALL`
FOREIGN KEY (`shipcall_id`)
REFERENCES `bremen_calling_devel`.`shipcall` (`id`)
REFERENCES `bremen_calling_test`.`shipcall` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
ADD CONSTRAINT `FK_HISTORY_USER`
FOREIGN KEY (`user_id`)
REFERENCES `bremen_calling_devel`.`user` (`id`)
REFERENCES `bremen_calling_test`.`user` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION;
-- add additional fields to times
ALTER TABLE `bremen_calling_devel`.`times`
ALTER TABLE `bremen_calling_test`.`times`
ADD COLUMN `ata` DATETIME NULL DEFAULT NULL COMMENT 'Relevant only for mooring, this field can be used to record actual ATA' AFTER `participant_type`,
ADD COLUMN `atd` DATETIME NULL DEFAULT NULL COMMENT 'Relevant only for mooring, this field can be used to record actual ATD' AFTER `ata`,
ADD COLUMN `eta_interval_end` DATETIME NULL DEFAULT NULL COMMENT 'If this value is set the times are given as interval instead of a single point in time. The start time value depends on the participant type.' AFTER `atd`;
ADD COLUMN `eta_interval_end` DATETIME NULL DEFAULT NULL COMMENT 'If this value is set the times are given as interval instead of a single point in time. The start time value depends on the participant type.' AFTER `atd`,
ADD COLUMN `etd_interval_end` DATETIME NULL DEFAULT NULL COMMENT 'If this value is set the times are given as interval instead of a single point in time. The start time value depends on the participant type.' AFTER `eta_interval_end`;

View File

@ -1 +1 @@
1.6.0.4
1.6.0.8

View File

@ -29,16 +29,16 @@
<applicationSettings>
<BreCalClient.Properties.Settings>
<setting name="BG_COLOR" serializeAs="String">
<value>#1D751F</value>
<value>#203864</value>
</setting>
<setting name="APP_TITLE" serializeAs="String">
<value>!!Bremen calling Testversion!!</value>
<value>Bremen calling</value>
</setting>
<setting name="LOGO_IMAGE_URL" serializeAs="String">
<value>https://www.textbausteine.net/</value>
</setting>
<setting name="API_URL" serializeAs="String">
<value>https://brecaldevel.bsmd-emswe.eu</value>
<value>https://brecal.bsmd-emswe.eu</value>
</setting>
</BreCalClient.Properties.Settings>
</applicationSettings>

View File

@ -8,12 +8,12 @@
<SignAssembly>True</SignAssembly>
<StartupObject>BreCalClient.App</StartupObject>
<AssemblyOriginatorKeyFile>..\..\misc\brecal.snk</AssemblyOriginatorKeyFile>
<AssemblyVersion>1.6.0.4</AssemblyVersion>
<FileVersion>1.6.0.4</FileVersion>
<AssemblyVersion>1.6.1.0</AssemblyVersion>
<FileVersion>1.6.1.0</FileVersion>
<Title>Bremen calling client</Title>
<Description>A Windows WPF client for the Bremen calling API.</Description>
<ApplicationIcon>containership.ico</ApplicationIcon>
<AssemblyName>BreCalDevelClient</AssemblyName>
<AssemblyName>BreCalClient</AssemblyName>
</PropertyGroup>
<ItemGroup>

View File

@ -42,13 +42,14 @@ namespace BreCalClient
public ShipApi? ShipApi { get; set; }
public bool IsCreate { get; set; } = false;
#endregion
#region Event handler
private void Window_Loaded(object sender, RoutedEventArgs e)
{
this.comboBoxAgency.ItemsSource = BreCalLists.Participants_Agent;
{
this.comboBoxShip.ItemsSource = BreCalLists.Ships;
Array types = Enum.GetValues(typeof(ShipcallType));
@ -58,10 +59,7 @@ namespace BreCalClient
{
if (!first) shipcallTypes.Add(shipcallType);
else first = false;
}
this.comboBoxArrivalBerth.ItemsSource = BreCalLists.Berths;
this.comboBoxDepartureBerth.ItemsSource = BreCalLists.Berths;
}
this.comboBoxTimeRef.ItemsSource = BreCalLists.TimeRefs;
this.comboBoxHarbour.ItemsSource = BreCalLists.Ports.Where(x => App.Participant.Ports.Contains(x.Id));
@ -190,6 +188,8 @@ namespace BreCalClient
void CheckForCompletion()
{
if (this.ShipcallModel.Shipcall?.Canceled ?? false) return; // Cancelled shipcall never clicks ok
bool isEnabled = true;
isEnabled &= this.comboBoxShip.SelectedItem != null;
@ -324,8 +324,8 @@ namespace BreCalClient
this.comboBoxTimeRef.SelectedIndex = this.ShipcallModel.Shipcall.TimeRefPoint ?? 1;
this.comboBoxCategories.SelectedItem = new EnumToStringConverter().Convert(this.ShipcallModel.Shipcall.Type, typeof(ShipcallType), new object(), System.Globalization.CultureInfo.CurrentCulture);
if (this.ShipcallModel.Shipcall.Eta != DateTime.MinValue)
this.datePickerETA.Value = this.ShipcallModel.Shipcall.Eta;
// this.textBoxVoyage.Text = this.ShipcallModel.Shipcall.Voyage;
this.datePickerETA.Value = this.ShipcallModel.Shipcall.Eta;
this.datePickerETD.Value = this.ShipcallModel.Shipcall.Etd;
if (BreCalLists.Ships.Find(x => x.Ship.Id == this.ShipcallModel.Shipcall.ShipId) != null)
{
@ -336,6 +336,16 @@ namespace BreCalClient
}
this.checkBoxCancelled.IsChecked = this.ShipcallModel.Shipcall.Canceled ?? false;
if (BreCalLists.PortLookupDict.ContainsKey(this.ShipcallModel.Shipcall.PortId))
this.comboBoxHarbour.SelectedValue = this.ShipcallModel.Shipcall.PortId;
List<Berth> availableBerths = BreCalLists.GetBerthsByPort(this.ShipcallModel.Shipcall.PortId);
this.comboBoxArrivalBerth.ItemsSource = availableBerths;
this.comboBoxDepartureBerth.ItemsSource = availableBerths;
// Filter agency combobox by port
List<Participant> availableAgencies = BreCalLists.GetParticipants(this.ShipcallModel.Shipcall.PortId, ParticipantType.AGENCY);
this.comboBoxAgency.ItemsSource = availableAgencies;
if (this.ShipcallModel.Shipcall.Type != ShipcallType.Shifting) // incoming, outgoing
{
this.comboBoxArrivalBerth.SelectedValue = this.ShipcallModel.Shipcall.ArrivalBerthId;
@ -356,9 +366,7 @@ namespace BreCalClient
this.comboBoxAgency.SelectedValue = this.ShipcallModel.AssignedParticipants[ParticipantType.AGENCY].ParticipantId;
}
}
if (BreCalLists.PortLookupDict.ContainsKey(this.ShipcallModel.Shipcall.PortId))
this.comboBoxHarbour.SelectedValue = this.ShipcallModel.Shipcall.PortId;
this.comboBoxHarbour.SelectionChanged += this.comboBoxHarbour_SelectionChanged;
this.comboBoxHarbour.IsEnabled = this.ShipcallModel.AllowPortChange;
@ -372,6 +380,8 @@ namespace BreCalClient
bool editRightGrantedForBSMD = false;
if (this.ShipcallModel.Shipcall?.Canceled ?? false) return; // do not allow edit on canceled shipcall
// Special case: Selected Agency allows BSMD to edit their fields
if (this.comboBoxAgency.SelectedIndex >= 0)
{
@ -395,6 +405,7 @@ namespace BreCalClient
this.datePickerETD.IsEnabled = isAgency || isBsmd;
this.labelBSMDGranted.Visibility = editRightGrantedForBSMD ? Visibility.Visible : Visibility.Hidden;
this.comboBoxHarbour.IsEnabled = this.IsCreate && this.ShipcallModel.AllowPortChange;
this.comboBoxCategories_SelectionChanged(null, null);
}

View File

@ -366,7 +366,7 @@ namespace BreCalClient
private void CheckOKButton()
{
this.buttonOK.IsEnabled = _editing && RequiredFieldsSet();
this.buttonOK.IsEnabled = _editing && RequiredFieldsSet() && !(this.ShipcallModel.Shipcall?.Canceled ?? false);
}
#endregion

View File

@ -61,7 +61,7 @@
</ComboBox.ContextMenu>
</ComboBox>
<Label Content="{x:Static p:Resources.textBerthRemarks}" Grid.Column="0" Grid.Row="4" HorizontalContentAlignment="Right" />
<TextBox x:Name="textBoxBerthRemarks" Grid.Column="1" Grid.Row="4" Margin="2" Grid.RowSpan="2" VerticalContentAlignment="Top" AcceptsReturn="True" MaxLength="512"/>
<TextBox x:Name="textBoxBerthRemarks" Grid.Column="1" Grid.Row="4" Margin="2" Grid.RowSpan="2" VerticalContentAlignment="Top" TextWrapping="Wrap" AcceptsReturn="True" SpellCheck.IsEnabled="True" AcceptsTab="False" MaxLength="512" ScrollViewer.VerticalScrollBarVisibility="Auto"/>
<Label Content="{x:Static p:Resources.textDraft}" Grid.Column="0" Grid.Row="6" HorizontalContentAlignment="Right" FontWeight="Bold"/>
<xctk:DoubleUpDown x:Name="doubleUpDownDraft" Grid.Column="1" Grid.Row="6" Margin="2" FormatString="N2" Minimum="0" Maximum="50" MaxLength="5" ValueChanged="doubleUpDownDraft_ValueChanged"/>
<Label Content="{x:Static p:Resources.textTidalWindow}" FontWeight="DemiBold" Grid.Column="0" Grid.Row="7" HorizontalContentAlignment="Right"/>

View File

@ -356,7 +356,7 @@ namespace BreCalClient
private void CheckOKButton()
{
this.buttonOK.IsEnabled = _editing && RequiredFieldsSet();
this.buttonOK.IsEnabled = _editing && RequiredFieldsSet() && !(this.ShipcallModel.Shipcall?.Canceled ?? false);
}
#endregion

View File

@ -105,7 +105,7 @@
</ComboBox.ContextMenu>
</ComboBox>
<Label Content="{x:Static p:Resources.textBerthRemarks}" Grid.Column="0" Grid.Row="12" HorizontalContentAlignment="Right" />
<TextBox x:Name="textBoxBerthRemarksArrival" Grid.Column="1" Grid.Row="12" Margin="2,1,2,3" Grid.RowSpan="2" VerticalContentAlignment="Top" AcceptsReturn="True" MaxLength="512"/>
<TextBox x:Name="textBoxBerthRemarksArrival" Grid.Column="1" Grid.Row="12" Margin="2,1,2,3" Grid.RowSpan="2" VerticalContentAlignment="Top" TextWrapping="Wrap" AcceptsReturn="True" SpellCheck.IsEnabled="True" AcceptsTab="False" MaxLength="512" ScrollViewer.VerticalScrollBarVisibility="Auto"/>
<Label Content="{x:Static p:Resources.textCancelled}" Grid.Column="0" Grid.Row="14" HorizontalContentAlignment="Right" />
<CheckBox x:Name="checkBoxCanceled" Grid.Column="1" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,4,0" />
@ -146,7 +146,7 @@
<Label Content="{x:Static p:Resources.textRainSensitiveCargo}" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="6" HorizontalAlignment="Right" />
<CheckBox x:Name="checkBoxRainsensitiveCargo" Grid.Column="3" Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,4,0" />
<Label Content="{x:Static p:Resources.textRemarks}" Grid.Column="2" Grid.Row="7" HorizontalContentAlignment="Right" />
<TextBox x:Name="textBoxRemarks" Grid.Column="3" Grid.Row="7" Margin="2,1,2,3" Grid.RowSpan="7" VerticalContentAlignment="Top" AcceptsReturn="True" MaxLength="512"/>
<TextBox x:Name="textBoxRemarks" Grid.Column="3" Grid.Row="7" Margin="2,1,2,3" Grid.RowSpan="7" VerticalContentAlignment="Top" TextWrapping="Wrap" AcceptsReturn="True" SpellCheck.IsEnabled="True" AcceptsTab="False" MaxLength="512" ScrollViewer.VerticalScrollBarVisibility="Auto"/>
<StackPanel Grid.Row="15" Grid.Column="3" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Width= "80" Margin="2" Content="{x:Static p:Resources.textOK}" x:Name="buttonOK" Click="buttonOK_Click" IsEnabled="False"/>

View File

@ -394,7 +394,7 @@ namespace BreCalClient
private void CheckOKButton()
{
this.buttonOK.IsEnabled = _editing && RequiredFieldsSet();
this.buttonOK.IsEnabled = _editing && RequiredFieldsSet() && !(this.ShipcallModel.Shipcall?.Canceled ?? false);
}
#endregion

View File

@ -173,13 +173,13 @@ namespace BreCalClient
{
this.textBoxRemarks.Text = this.Times.Remarks;
this.datePickerETABerth.Value = this.Times.EtaBerth;
if(this.datePickerETABerth.IsEnabled && (this.Times.EtaBerth == null) && (this.AgencyTimes?.EtaBerth != null) && (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival) && (this.AgencyTimes?.EtaBerth > DateTime.Now))
if(this.datePickerETABerth.IsEnabled && (this.Times.EtaBerth == null) && (this.AgencyTimes?.EtaBerth != null) && (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival) && (this.AgencyTimes?.EtaBerth > DateTime.Now.AddDays(-1)))
{
this.datePickerETABerth.Value = this.AgencyTimes.EtaBerth;
if (this.datePickerETABerth.Template.FindName("PART_TextBox", this.datePickerETABerth) is WatermarkTextBox tb) { tb.Focus(); tb.SelectAll(); }
}
this.datePickerETDBerth.Value = this.Times.EtdBerth;
if(this.datePickerETDBerth.IsEnabled && (this.Times.EtdBerth == null) && (this.AgencyTimes?.EtdBerth != null) && ((ShipcallModel.Shipcall?.Type == ShipcallType.Departure) || (ShipcallModel.Shipcall?.Type == ShipcallType.Shifting)) && (this.AgencyTimes?.EtdBerth > DateTime.Now))
if(this.datePickerETDBerth.IsEnabled && (this.Times.EtdBerth == null) && (this.AgencyTimes?.EtdBerth != null) && ((ShipcallModel.Shipcall?.Type == ShipcallType.Departure) || (ShipcallModel.Shipcall?.Type == ShipcallType.Shifting)) && (this.AgencyTimes?.EtdBerth > DateTime.Now.AddDays(-1)))
{
this.datePickerETDBerth.Value = this.AgencyTimes.EtdBerth;
if (this.datePickerETDBerth.Template.FindName("PART_TextBox", this.datePickerETDBerth) is WatermarkTextBox tb) tb.SelectAll();
@ -190,14 +190,14 @@ namespace BreCalClient
this.datePickerATA.Value = this.Times.Ata;
this.datePickerATD.Value = this.Times.Atd;
this.datePickerETABerth_End.Value = this.Times.EtaIntervalEnd;
if (this.datePickerETABerth_End.IsEnabled && (this.Times.EtaIntervalEnd == null) && (this.Times.EtaBerth == null) && (this.AgencyTimes?.EtaIntervalEnd != null) && (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival))
if (this.datePickerETABerth_End.IsEnabled && (this.Times.EtaIntervalEnd == null) && (this.Times.EtaBerth == null) && (this.AgencyTimes?.EtaIntervalEnd != null) && (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival) && (this.AgencyTimes?.EtaBerth > DateTime.Now.AddDays(-1)))
{
this.datePickerETABerth_End.Value = this.AgencyTimes.EtaIntervalEnd;
//if (this.datePickerETABerth_End.Template.FindName("PART_TextBox", this.datePickerETABerth_End) is WatermarkTextBox tb) { tb.Focus(); tb.SelectAll(); }
}
this.datePickerETDBerth_End.Value = this.Times.EtdIntervalEnd;
if (this.datePickerETDBerth_End.IsEnabled && (this.Times.EtdIntervalEnd == null) && (this.Times.EtdBerth == null) && (this.AgencyTimes?.EtdIntervalEnd != null) && ((ShipcallModel.Shipcall?.Type == ShipcallType.Departure) || (ShipcallModel.Shipcall?.Type == ShipcallType.Shifting)))
if (this.datePickerETDBerth_End.IsEnabled && (this.Times.EtdIntervalEnd == null) && (this.Times.EtdBerth == null) && (this.AgencyTimes?.EtdIntervalEnd != null) && ((ShipcallModel.Shipcall?.Type == ShipcallType.Departure) || (ShipcallModel.Shipcall?.Type == ShipcallType.Shifting)) && (this.AgencyTimes?.EtdBerth > DateTime.Now.AddDays(-1)))
{
this.datePickerETDBerth_End.Value = this.AgencyTimes.EtdIntervalEnd;
//if (this.datePickerETDBerth_End.Template.FindName("PART_TextBox", this.datePickerETDBerth_End) is WatermarkTextBox tb) { tb.Focus(); tb.SelectAll(); }
@ -259,7 +259,7 @@ namespace BreCalClient
// setting en/dis-abled
if (this.Times.ParticipantId != App.Participant.Id)
if ((this.Times.ParticipantId != App.Participant.Id) || (this.ShipcallModel.Shipcall?.Canceled ?? false))
{
this.buttonFixedOrder.IsEnabled = false;
this.buttonOK.IsEnabled = false;

View File

@ -217,7 +217,7 @@ namespace BreCalClient
private void EnableControls()
{
if (this.Times.ParticipantId != App.Participant.Id)
if ((this.Times.ParticipantId != App.Participant.Id) || (this.ShipcallModel.Shipcall?.Canceled ?? false))
{
this.buttonOK.IsEnabled = false;
return;

View File

@ -22,6 +22,13 @@ namespace BreCalClient
private readonly ConcurrentDictionary<int, ShipcallControlModel> _shipcalls;
private readonly StaticApi _staticApi;
private readonly static ILog _log = LogManager.GetLogger(typeof(HistoryDialog));
#endregion
#region delegate/event to react to history item selection
public event Action<int>? HistoryItemSelected;
#endregion
@ -72,13 +79,54 @@ namespace BreCalClient
foreach (int shipcall_id in _shipcalls.Keys)
{
List<History> shipcallHistory = await _staticApi.HistoryGetAsync(shipcall_id);
System.Diagnostics.Trace.WriteLine($"{shipcallHistory.Count} history elements loaded for shipcall {shipcall_id}");
allHistories.AddRange( shipcallHistory );
foreach (int shipcall_id in _shipcalls.Keys)
{
List<History> shipcallHistory = await _staticApi.HistoryGetAsync(shipcall_id);
System.Diagnostics.Trace.WriteLine($"{shipcallHistory.Count} history elements loaded for shipcall {shipcall_id}");
allHistories.AddRange(shipcallHistory);
}
this.stackPanel.Children.Clear();
// sort all entries
allHistories.Sort((x, y) => { return y.Timestamp.CompareTo(x.Timestamp); });
EnumToStringConverter enumToStringConverter = new();
// create controls for all entries
foreach (History history in allHistories)
{
if (FilterShipcall(history.ShipcallId)) continue;
string shipname = "";
Ship? ship = this._shipcalls[history.ShipcallId].Ship;
if (ship != null)
shipname = ship.Name;
string etaetd = "", calltype = "";
if (_shipcalls.ContainsKey(history.ShipcallId))
{
etaetd = _shipcalls[history.ShipcallId].GetETAETD();
if (_shipcalls[history.ShipcallId].Shipcall != null)
{
ShipcallType? type = _shipcalls[history.ShipcallId].Shipcall?.Type;
if (type != null) calltype = (string)(enumToStringConverter.Convert(type ?? ShipcallType.Undefined, typeof(ShipcallType), new(), System.Globalization.CultureInfo.CurrentCulture) ?? "");
}
}
HistoryControl hc = new(shipname, history, calltype, etaetd);
hc.HistorySelected += (x) => { HistoryItemSelected?.Invoke(x); }; // bubble event
this.stackPanel.Children.Add(hc);
}
Mouse.OverrideCursor = null;
}
catch (Exception e)
{
// Here we rather not show a dialog box since it may confuse the user
_log.Error(e.ToString());
}
// sort all entries
allHistories.Sort((x, y) => { return y.Timestamp.CompareTo(x.Timestamp); });
}
EnumToStringConverter enumToStringConverter = new();

View File

@ -168,15 +168,25 @@ namespace BreCalClient
{
if (_loginResult.Id > 0)
{
Mouse.OverrideCursor = Cursors.Wait;
this.busyIndicator.IsBusy = false;
Mouse.OverrideCursor = Cursors.Wait;
this._userApi.Configuration.ApiKey["Authorization"] = _loginResult.Token;
this._shipcallApi.Configuration.ApiKey["Authorization"] = _loginResult.Token;
this._timesApi.Configuration.ApiKey["Authorization"] = _loginResult.Token;
this._staticApi.Configuration.ApiKey["Authorization"] = _loginResult.Token;
this._shipApi.Configuration.ApiKey["Authorization"] = _loginResult.Token;
this.LoadStaticLists();
this.labelUsername.Text = $"{_loginResult.FirstName} {_loginResult.LastName}";
bool loadingSuccessful = await this.LoadStaticLists();
if (loadingSuccessful)
{
this.labelUsername.Text = $"{_loginResult.FirstName} {_loginResult.LastName}";
this.busyIndicator.IsBusy = false;
}
else
{
Mouse.OverrideCursor = null;
textUsername.Text = "";
textPassword.Password = "";
textUsername.Focus();
}
}
}
labelGeneralStatus.Text = $"Connection {ConnectionStatus.SUCCESSFUL}";
@ -247,7 +257,8 @@ namespace BreCalClient
EditShipcallControl esc = new()
{
ShipEditingEnabled = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD),
ShipApi = _shipApi
ShipApi = _shipApi,
IsCreate = true
};
if (model != null)
esc.ShipcallModel = model;
@ -340,7 +351,7 @@ namespace BreCalClient
{
this.Dispatcher.Invoke(new Action(() =>
{
ShowErrorDialog(ex.Message, "Error saving user information");
ShowErrorDialog(ex.Message, "Error saving user information");
}));
}
}
@ -373,10 +384,20 @@ namespace BreCalClient
private void comboBoxPorts_ItemSelectionChanged(object sender, Xceed.Wpf.Toolkit.Primitives.ItemSelectionChangedEventArgs e)
{
this.searchFilterControl.SearchFilter.Ports.Clear();
List<Berth> berths = new List<Berth>();
foreach (Port port in comboBoxPorts.SelectedItems)
{
this.searchFilterControl.SearchFilter.Ports.Add(port.Id);
berths.AddRange(BreCalLists.GetBerthsByPort(port.Id));
}
// create list of berths from selected port(s) or return all berths
if (berths.Count == 0)
berths = BreCalLists.AllBerths;
this.searchFilterControl.SetBerths(berths);
this.SearchFilterControl_SearchFilterChanged();
}
}
private async void comboBoxSortOrder_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
@ -417,16 +438,23 @@ namespace BreCalClient
#region network operations
private async void LoadStaticLists()
private async Task<bool> LoadStaticLists()
{
if (_loginResult == null) return;
if (_loginResult == null) return false;
BreCalLists.InitializePorts(await _staticApi.GetPortsAsync());
BreCalLists.InitializeBerths(await _staticApi.BerthsGetAsync());
BreCalLists.InitializeShips(await _shipApi.ShipsGetAsync());
BreCalLists.InitializeParticipants(await _staticApi.ParticipantsGetAsync());
this.searchFilterControl.SetBerths(BreCalLists.Berths);
if(BreCalLists.Participants.Count == 0)
{
MessageBox.Show(BreCalClient.Resources.Resources.textNoPortAssigned, BreCalClient.Resources.Resources.textError, MessageBoxButton.OK, MessageBoxImage.Error);
Mouse.OverrideCursor = Cursors.Wait;
return false;
}
this.searchFilterControl.SetBerths(BreCalLists.Berths);
foreach (Participant participant in BreCalLists.Participants)
{
@ -461,8 +489,8 @@ namespace BreCalClient
SearchFilterModel.filterMap[_loginResult.Id] = currentFilter;
}
this.searchFilterControl.SetFilterFromModel(currentFilter);
if (currentFilter.Ports != null)
if ((currentFilter.Ports != null) && (this.comboBoxPorts.ItemsSource != null))
{
foreach (Port p in this.comboBoxPorts.ItemsSource)
{
@ -474,13 +502,14 @@ namespace BreCalClient
_ = Task.Run(() => RefreshShipcalls());
_ = Task.Run(() => RefreshShips());
return true;
}
public async Task RefreshShips()
{
while (true)
{
{
Thread.Sleep(SHIPS_UPDATE_INTERVAL_SECONDS * 1000);
BreCalLists.InitializeShips(await _shipApi.ShipsGetAsync());
}
@ -695,7 +724,7 @@ namespace BreCalClient
// first add everything
this._visibleControlModels.AddRange(_allShipcallsDict.Values);
// now remove elements whose filter criteria are met
// now remove elements whose filter criteria are met
if(sfm.Berths.Count > 0 )
{
@ -1111,24 +1140,24 @@ namespace BreCalClient
if (msg.error_field != null)
{
caption = $"{caption}: {msg.error_field}";
}
}
if(msg.error_description != null)
{
message = msg.error_description;
}
message = msg.error_description;
}
}
}
catch (Exception) { }
}
}
_log.ErrorFormat("{0} - {1}", caption, message);
Dispatcher.Invoke(new Action(() =>
{
MessageBox.Show(message, caption, MessageBoxButton.OK, MessageBoxImage.Error);
}));
}
private void EnableControlsForParticipant()
@ -1146,6 +1175,6 @@ namespace BreCalClient
}
#endregion
}
}

View File

@ -4,8 +4,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>6.0</ApplicationVersion>
<ApplicationRevision>8</ApplicationRevision>
<ApplicationVersion>1.6.1.0</ApplicationVersion>
<BootstrapperEnabled>False</BootstrapperEnabled>
<Configuration>Release</Configuration>
<CreateWebPageOnPublish>True</CreateWebPageOnPublish>
@ -30,7 +30,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<TargetFramework>net6.0-windows</TargetFramework>
<UpdateEnabled>True</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateRequired>False</UpdateRequired>
<UpdateRequired>True</UpdateRequired>
<WebPageFileName>Publish.html</WebPageFileName>
<CreateDesktopShortcut>True</CreateDesktopShortcut>
<ErrorReportUrl>https://www.bsmd-emswe.eu/</ErrorReportUrl>
@ -40,6 +40,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<SupportUrl>https://www.bsmd-emswe.eu/</SupportUrl>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SkipPublishVerification>false</SkipPublishVerification>
<MinimumRequiredVersion>1.6.1.0</MinimumRequiredVersion>
</PropertyGroup>
<ItemGroup>
<PublishFile Include="containership.ico">

View File

@ -4,8 +4,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.6.0.3</ApplicationVersion>
<ApplicationRevision>6</ApplicationRevision>
<ApplicationVersion>1.6.0.8</ApplicationVersion>
<BootstrapperEnabled>True</BootstrapperEnabled>
<Configuration>Debug</Configuration>
<CreateDesktopShortcut>True</CreateDesktopShortcut>
@ -30,7 +30,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<TargetFramework>net6.0-windows</TargetFramework>
<UpdateEnabled>True</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateRequired>False</UpdateRequired>
<UpdateRequired>True</UpdateRequired>
<WebPageFileName>Publish.html</WebPageFileName>
<CreateDesktopShortcut>True</CreateDesktopShortcut>
<ErrorReportUrl>https://www.bsmd-emswe.eu/</ErrorReportUrl>
@ -40,6 +40,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<SupportUrl>http://www.textbausteine.net/</SupportUrl>
<PublishDir>bin\Debug\net6.0-windows\win-x64\app.publish\</PublishDir>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SkipPublishVerification>false</SkipPublishVerification>
<MinimumRequiredVersion>1.6.0.8</MinimumRequiredVersion>
</PropertyGroup>
<ItemGroup>
<PublishFile Include="containership.ico">

View File

@ -9,38 +9,38 @@
//------------------------------------------------------------------------------
namespace BreCalClient.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("#1D751F")]
[global::System.Configuration.DefaultSettingValueAttribute("#203864")]
public string BG_COLOR {
get {
return ((string)(this["BG_COLOR"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("!!Bremen calling Testversion!!")]
[global::System.Configuration.DefaultSettingValueAttribute("Bremen calling")]
public string APP_TITLE {
get {
return ((string)(this["APP_TITLE"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("https://www.textbausteine.net/")]
@ -49,7 +49,7 @@ namespace BreCalClient.Properties {
return ((string)(this["LOGO_IMAGE_URL"]));
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
@ -61,16 +61,16 @@ namespace BreCalClient.Properties {
this["FilterCriteria"] = value;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("https://brecaldevel.bsmd-emswe.eu")]
[global::System.Configuration.DefaultSettingValueAttribute("https://brecal.bsmd-emswe.eu")]
public string API_URL {
get {
return ((string)(this["API_URL"]));
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("800")]
@ -82,7 +82,7 @@ namespace BreCalClient.Properties {
this["Width"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("450")]
@ -94,7 +94,7 @@ namespace BreCalClient.Properties {
this["Height"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
@ -106,7 +106,7 @@ namespace BreCalClient.Properties {
this["Left"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
@ -118,7 +118,7 @@ namespace BreCalClient.Properties {
this["Top"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
@ -130,7 +130,7 @@ namespace BreCalClient.Properties {
this["W1Left"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
@ -142,7 +142,7 @@ namespace BreCalClient.Properties {
this["W1Top"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
@ -154,7 +154,7 @@ namespace BreCalClient.Properties {
this["W2Left"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
@ -166,7 +166,7 @@ namespace BreCalClient.Properties {
this["W2Top"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
@ -178,7 +178,7 @@ namespace BreCalClient.Properties {
this["W3Left"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
@ -190,7 +190,7 @@ namespace BreCalClient.Properties {
this["W3Top"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
@ -202,7 +202,7 @@ namespace BreCalClient.Properties {
this["W4Left"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
@ -214,7 +214,7 @@ namespace BreCalClient.Properties {
this["W4Top"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]

View File

@ -3,10 +3,10 @@
<Profiles />
<Settings>
<Setting Name="BG_COLOR" Type="System.String" Scope="Application">
<Value Profile="(Default)">#1D751F</Value>
<Value Profile="(Default)">#203864</Value>
</Setting>
<Setting Name="APP_TITLE" Type="System.String" Scope="Application">
<Value Profile="(Default)">!!Bremen calling Testversion!!</Value>
<Value Profile="(Default)">Bremen calling</Value>
</Setting>
<Setting Name="LOGO_IMAGE_URL" Type="System.String" Scope="Application">
<Value Profile="(Default)">https://www.textbausteine.net/</Value>
@ -15,7 +15,7 @@
<Value Profile="(Default)" />
</Setting>
<Setting Name="API_URL" Type="System.String" Scope="Application">
<Value Profile="(Default)">https://brecaldevel.bsmd-emswe.eu</Value>
<Value Profile="(Default)">https://brecal.bsmd-emswe.eu</Value>
</Setting>
<Setting Name="Width" Type="System.Double" Scope="User">
<Value Profile="(Default)">800</Value>

View File

@ -596,6 +596,15 @@ namespace BreCalClient.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Draft.
/// </summary>
public static string textDraftNoUnit {
get {
return ResourceManager.GetString("textDraftNoUnit", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Edit.
/// </summary>
@ -875,6 +884,15 @@ namespace BreCalClient.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to No port assigned to this participant.
/// </summary>
public static string textNoPortAssigned {
get {
return ResourceManager.GetString("textNoPortAssigned", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Not rotated.
/// </summary>
@ -1055,6 +1073,15 @@ namespace BreCalClient.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Position.
/// </summary>
public static string textPosition {
get {
return ResourceManager.GetString("textPosition", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Rain sensitive cargo.
/// </summary>

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
@ -235,6 +235,9 @@
<data name="textDraft" xml:space="preserve">
<value>Tiefgang (m)</value>
</data>
<data name="textDraftNoUnit" xml:space="preserve">
<value>Tiefgang</value>
</data>
<data name="textEdit" xml:space="preserve">
<value>Bearbeiten</value>
</data>
@ -286,6 +289,9 @@
<data name="textFrom" xml:space="preserve">
<value>von</value>
</data>
<data name="textHarbour" xml:space="preserve">
<value>Hafen</value>
</data>
<data name="textIncoming" xml:space="preserve">
<value>Einkommend</value>
</data>
@ -547,55 +553,10 @@
<data name="arrow_up_green" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>arrow_up_green.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="textShiftingSequence" xml:space="preserve">
<value>Verhol. Nr.</value>
</data>
<data name="textClearAll" xml:space="preserve">
<value>Alle Eintragungen zurücksetzen?</value>
</data>
<data name="textBothTideTimesNecessary" xml:space="preserve">
<value>Beide Tidenzeiten sollten angegeben werden (von - bis)</value>
</data>
<data name="textEndValueBeforeStartValue" xml:space="preserve">
<value>Endzeit liegt vor Startzeit</value>
</data>
<data name="textError" xml:space="preserve">
<value>Error</value>
</data>
<data name="textETAInThePast" xml:space="preserve">
<value>Zeitpunkt ETA liegt in der Vergangenheit</value>
</data>
<data name="textETDInThePast" xml:space="preserve">
<value>Zeitpunkt ETD liegt in der Vergangenheit</value>
</data>
<data name="textLockTimeInThePast" xml:space="preserve">
<value>Schleusenzeit liegt in der Vergangenheit</value>
</data>
<data name="textOperationEndInThePast" xml:space="preserve">
<value>Operation Endzeit liegt in der Vergangenheit</value>
</data>
<data name="textOperationStartInThePast" xml:space="preserve">
<value>Operation Startzeit liegt in der Vergangenheit</value>
</data>
<data name="textTideTimesInThePast" xml:space="preserve">
<value>Tidenzeit liegt in der Vergangenheit</value>
</data>
<data name="textWarning" xml:space="preserve">
<value>Warnung</value>
</data>
<data name="textZoneEntryInThePast" xml:space="preserve">
<value>Zeit Reviereintritt liegt in der Vergangenheit</value>
</data>
<data name="textTidalBothValues" xml:space="preserve">
<value>Für das Tidenfenster müssen beide Zeiten angegeben werden</value>
</data>
<data name="textTooFarInTheFuture" xml:space="preserve">
<value>Eine Zeiteingabe ist zu weit in der Zukunft</value>
</data>
<data name="textStartTimeMissing" xml:space="preserve">
<value>Wenn eine Ende-Zeit angegeben wird, muss auch eine Start-Zeit angegeben werden</value>
</data>
<data name="textHarbour" xml:space="preserve">
<value>Hafen</value>
<data name="textNoPortAssigned" xml:space="preserve">
<value>Es ist keine Hafenzuordnung vorhanden</value>
</data>
</root>

View File

@ -601,4 +601,13 @@
<data name="textStartTimeMissing" xml:space="preserve">
<value>If an end time is set, a start time is also required</value>
</data>
<data name="textNoPortAssigned" xml:space="preserve">
<value>No port assigned to this participant</value>
</data>
<data name="textPosition" xml:space="preserve">
<value>Position</value>
</data>
<data name="textDraftNoUnit" xml:space="preserve">
<value>Draft</value>
</data>
</root>

View File

@ -1,12 +1,12 @@
<UserControl x:Class="BreCalClient.ShipcallControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:p = "clr-namespace:BreCalClient.Resources"
xmlns:sets="clr-namespace:BreCalClient.Properties"
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalDevelClient"
mc:Ignorable="d"
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient"
mc:Ignorable="d"
d:DesignHeight="135" d:DesignWidth="800">
<Border BorderBrush="LightGray" Margin="1" BorderThickness="1">
<Grid>
@ -29,7 +29,6 @@
<RowDefinition Height=".125*"/>
<RowDefinition Height=".125*"/>
<RowDefinition Height=".125*"/>
<RowDefinition Height=".125*"/>
<RowDefinition Height=".125*"/>
<RowDefinition Height=".125*"/>
@ -49,7 +48,7 @@
<Viewbox Grid.Column="1">
<TextBlock x:Name="textBlockShiftingSequence"></TextBlock>
</Viewbox>
<Label Grid.Column="2" FontSize="12" x:Name="labelShipName" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
<Label Grid.Column="2" FontSize="12" x:Name="labelShipName" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" PreviewMouseUp="Image_PreviewMouseUp">
<TextBlock Name="textBlockShipName" />
</Label>
@ -64,17 +63,17 @@
<TextBlock x:Name="textBlockIMO" Padding="0" FontWeight="DemiBold" />
</Viewbox>
<Viewbox Grid.Row="2" Grid.Column="0" HorizontalAlignment="Left">
<TextBlock Text="{x:Static p:Resources.textCallsign}" />
</Viewbox>
<Viewbox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left">
<TextBlock x:Name="textBlockCallsign" Padding="0"/>
</Viewbox>
<Viewbox Grid.Row="3" Grid.Column="0" HorizontalAlignment="Left">
<TextBlock Text="{x:Static p:Resources.textLengthWidth}" Padding="0" />
</Viewbox>
<Viewbox Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left">
<Viewbox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left">
<TextBlock x:Name="textBlockLengthWidth" Padding="0"/>
</Viewbox>
<Viewbox Grid.Row="3" Grid.Column="0" HorizontalAlignment="Left">
<TextBlock Text="{x:Static p:Resources.textDraftNoUnit}" />
</Viewbox>
<Viewbox Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left">
<TextBlock x:Name="textBlockDraft" Padding="0"/>
</Viewbox>
<Viewbox Grid.Row="4" Grid.Column="0" HorizontalAlignment="Left">
<TextBlock Text="ETA" x:Name="labelETA"/>
</Viewbox>
@ -90,14 +89,13 @@
<Viewbox Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Left">
<TextBlock x:Name="textBlockHarbour" Padding="0" FontWeight="DemiBold" />
</Viewbox>
</Grid>
<Grid Grid.Row="0" Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="14" />
</Grid.RowDefinitions>
<Label Padding="0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" FontSize="13" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
<Label Padding="0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" FontSize="13" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelAgent" PreviewMouseUp="labelAgent_PreviewMouseUp"/>
<Label Name="labelLastChangeAgency" FontSize="9" Padding="0" VerticalContentAlignment="Center" Grid.Row="1" Foreground="WhiteSmoke" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" HorizontalContentAlignment="Center" />
</Grid>
@ -106,7 +104,7 @@
<RowDefinition Height="*" />
<RowDefinition Height="14" />
</Grid.RowDefinitions>
<Label Padding="0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" FontSize="13" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
<Label Padding="0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" FontSize="13" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelMooring" PreviewMouseUp="labelMooring_PreviewMouseUp"/>
<Label Name="labelLastChangeMooring" FontSize="9" Padding="0" VerticalContentAlignment="Center" Grid.Row="1" Foreground="WhiteSmoke" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" HorizontalContentAlignment="Center" />
</Grid>
@ -115,7 +113,7 @@
<RowDefinition Height="*" />
<RowDefinition Height="14" />
</Grid.RowDefinitions>
<Label Padding="0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" FontSize="13" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
<Label Padding="0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" FontSize="13" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelPortAuthority" PreviewMouseUp="labelPortAuthority_PreviewMouseUp"/>
<Label Name="labelLastChangePortAuthority" FontSize="9" Padding="0" VerticalContentAlignment="Center" Grid.Row="1" Foreground="WhiteSmoke" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" HorizontalContentAlignment="Center" />
</Grid>
@ -124,7 +122,7 @@
<RowDefinition Height="*" />
<RowDefinition Height="14" />
</Grid.RowDefinitions>
<Label Padding="0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" FontSize="13" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
<Label Padding="0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" FontSize="13" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelPilot" PreviewMouseUp="labelPilot_PreviewMouseUp"/>
<Label Name="labelLastChangePilot" FontSize="9" Padding="0" VerticalContentAlignment="Center" Grid.Row="1" Foreground="WhiteSmoke" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" HorizontalContentAlignment="Center" />
</Grid>
@ -133,7 +131,7 @@
<RowDefinition Height="*" />
<RowDefinition Height="14" />
</Grid.RowDefinitions>
<Label Padding="0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" FontSize="13" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
<Label Padding="0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" FontSize="13" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelTug" PreviewMouseUp="labelTug_PreviewMouseUp"/>
<Label Name="labelLastChangeTug" FontSize="9" Padding="0" VerticalContentAlignment="Center" Grid.Row="1" Foreground="WhiteSmoke" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" HorizontalContentAlignment="Center" />
</Grid>
@ -142,11 +140,11 @@
<RowDefinition Height="*" />
<RowDefinition Height="14" />
</Grid.RowDefinitions>
<Label Padding="0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" FontSize="13" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
<Label Padding="0" Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" FontSize="13" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelTerminal" PreviewMouseUp="labelTerminal_PreviewMouseUp"/>
<Label Name="labelLastChangeTerminal" FontSize="9" Padding="0" VerticalContentAlignment="Center" Grid.Row="1" Foreground="WhiteSmoke" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" HorizontalContentAlignment="Center" />
</Grid>
<!-- AGENCY -->
<Border Grid.Row="2" Grid.Column="1" BorderThickness="1, 0, 0, 0" BorderBrush="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Padding="3,0,0,0">
<Grid Grid.Row="2" Grid.Column="1">
@ -160,16 +158,16 @@
<RowDefinition Height="14" />
<RowDefinition Height=".5*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content = "ETA" x:Name="labelETAETDAgent" Padding="0" VerticalContentAlignment="Center" />
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" BorderThickness="0,1,0,0" BorderBrush="Gray" >
<Label Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
<Label Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
</Border>
<Label Grid.Row="0" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelAgencyETAETDValue" FontWeight="DemiBold"/>
<TextBlock Grid.Row="1" Grid.Column="1" Grid.RowSpan="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockAgencyRemarks" FontSize="10"/>
<Label Grid.Row="2" Grid.Column="1" HorizontalContentAlignment="Left" x:Name="labelAgencyBerth" Padding="0" VerticalContentAlignment="Center" FontSize="11" FontWeight="SemiBold" />
<TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static p:Resources.textRemarks}" Padding="0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="9"/>
<TextBlock Grid.Row="3" Grid.Column="1" Grid.RowSpan="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockAgencyBerthRemarks" FontSize="10"/>

View File

@ -25,7 +25,7 @@ namespace BreCalClient
Participant? _terminal;
Participant? _tug;
Participant? _port_administration;
private static readonly ILog _log = LogManager.GetLogger(typeof(ShipcallControl));
private static readonly ILog _log = LogManager.GetLogger(typeof(ShipcallControl));
#endregion
@ -82,7 +82,7 @@ namespace BreCalClient
this.labelAgencyBerth.Content = "";
this.labelAgencyETAETDValue.Content = "";
this.textBlockAgencyRemarks.Text = "";
this.textBlockAgencyBerthRemarks.Text = "";
this.textBlockAgencyBerthRemarks.Text = "";
}
_mooring = this.ShipcallControlModel?.GetParticipantForType(Extensions.ParticipantType.MOORING);
@ -215,13 +215,13 @@ namespace BreCalClient
switch (this.ShipcallControlModel?.Shipcall?.Type)
{
case ShipcallType.Arrival: // incoming
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/arrow_down_red.png"));
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_down_red.png"));
break;
case ShipcallType.Departure: // outgoing
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/arrow_up_blue.png"));
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_up_blue.png"));
break;
case ShipcallType.Shifting: // shifting
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/arrow_right_green.png"));
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_right_green.png"));
break;
default:
break;
@ -230,13 +230,13 @@ namespace BreCalClient
switch(this.ShipcallControlModel?.LightMode)
{
case EvaluationType.Green:
this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/check.png"));
this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/check.png"));
break;
case EvaluationType.Yellow:
this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/sign_warning.png"));
this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/sign_warning.png"));
break;
case EvaluationType.Red:
this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/delete2.png"));
this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/delete2.png"));
break;
default:
break;
@ -267,10 +267,10 @@ namespace BreCalClient
this.imageEvaluation.ToolTip = this.ShipcallControlModel?.Shipcall?.EvaluationMessage;
else
this.imageEvaluation.ToolTip = null;
this.textBlockBerth.Text = this.ShipcallControlModel?.GetBerthText(null);
this.textBlockCallsign.Text = this.ShipcallControlModel?.Ship?.Callsign;
this.textBlockETA.Text = this.ShipcallControlModel?.GetETAETD(true);
this.textBlockBerth.Text = this.ShipcallControlModel?.GetBerthText(null);
this.textBlockDraft.Text = (this.ShipcallControlModel?.Shipcall?.Draft != null) ? $"{this.ShipcallControlModel?.Shipcall?.Draft.Value.ToString("N2")} m" : "-";
this.textBlockETA.Text = this.ShipcallControlModel?.GetETAETD(true);
this.textBlockIMO.Text = this.ShipcallControlModel?.Ship?.Imo.ToString();
this.textBlockLengthWidth.Text = $"{this.ShipcallControlModel?.Ship?.Length} / {this.ShipcallControlModel?.Ship?.Width}";
@ -320,7 +320,7 @@ namespace BreCalClient
{
this.labelLastChangeAgency.Foreground = Brushes.White;
this.labelLastChangeAgency.FontWeight = FontWeights.DemiBold;
}
}
else
{
this.labelLastChangeAgency.Foreground = Brushes.LightGray;
@ -349,13 +349,13 @@ namespace BreCalClient
atdRowDefinition.Height = mooringTimes.Atd.HasValue ? new(15) : new(0);
if(mooringTimes.Ata.HasValue)
{
labelTimesMooringATA.Content = mooringTimes.Ata.Value.ToString("dd.MM.yyyy HH:mm");
{
labelTimesMooringATA.Content = mooringTimes.Ata.Value.ToString("dd.MM.yyyy HH:mm");
}
if (mooringTimes.Atd.HasValue)
{
labelTimesMooringATD.Content = mooringTimes.Atd.Value.ToString("dd.MM.yyyy HH:mm");
{
labelTimesMooringATD.Content = mooringTimes.Atd.Value.ToString("dd.MM.yyyy HH:mm");
}
DateTime? lc = this.ShipcallControlModel?.GetLastChangeForType(Extensions.ParticipantType.MOORING);
@ -388,7 +388,7 @@ namespace BreCalClient
this.imagePortAuthorityLocked.Visibility = (portAuthorityTimes.EtaBerthFixed ?? false) ? Visibility.Visible : Visibility.Hidden;
lockTimeRowDefinition.Height = portAuthorityTimes.LockTime.HasValue ? new(15) : new(0);
if(portAuthorityTimes.LockTime.HasValue)
{
{
labelPortAuthorityLockTime.Content = portAuthorityTimes.LockTime.Value.ToString("dd.MM.yyyy HH:mm");
}

View File

@ -8,7 +8,7 @@
<applicationSettings>
<RoleEditor.Properties.Settings>
<setting name="ConnectionString" serializeAs="String">
<value>Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling_devel;Port=33306</value>
<value>Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling_test;Port=33306</value>
</setting>
</RoleEditor.Properties.Settings>
</applicationSettings>

View File

@ -26,7 +26,7 @@ namespace RoleEditor.Properties {
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling_" +
"devel;Port=33306")]
"test;Port=33306")]
public string ConnectionString {
get {
return ((string)(this["ConnectionString"]));

View File

@ -3,7 +3,7 @@
<Profiles />
<Settings>
<Setting Name="ConnectionString" Type="System.String" Scope="Application">
<Value Profile="(Default)">Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling_devel;Port=33306</Value>
<Value Profile="(Default)">Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling_test;Port=33306</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -13,6 +13,12 @@
"SccProvider" = "8:"
"Hierarchy"
{
"Entry"
{
"MsmKey" = "8:_1E7663DCE02A4D848349229A724E961A"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_3E48B6E716164CC1826E094025517B3F"
@ -25,6 +31,24 @@
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_CD20A468610C42B89F66B4D3367A5A6A"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_CD20A468610C42B89F66B4D3367A5A6A"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_1E7663DCE02A4D848349229A724E961A"
"MsmSig" = "8:_UNDEFINED"
}
}
"Configurations"
{
@ -43,6 +67,14 @@
"PrivateKeyFile" = "8:"
"TimeStampServer" = "8:"
"InstallerBootstrapper" = "3:2"
"BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
{
"Enabled" = "11:TRUE"
"PromptEnabled" = "11:TRUE"
"PrerequisitesLocation" = "2:1"
"Url" = "8:"
"ComponentsUrl" = "8:"
}
}
"Release"
{
@ -59,6 +91,14 @@
"PrivateKeyFile" = "8:"
"TimeStampServer" = "8:"
"InstallerBootstrapper" = "3:2"
"BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
{
"Enabled" = "11:TRUE"
"PromptEnabled" = "11:TRUE"
"PrerequisitesLocation" = "2:1"
"Url" = "8:"
"ComponentsUrl" = "8:"
}
}
}
"Deployable"
@ -76,6 +116,14 @@
{
"LaunchCondition"
{
"{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_3415D375792A4611BF998D78F56CD22C"
{
"Name" = "8:.NET Framework"
"Message" = "8:[VSDNETMSG]"
"FrameworkVersion" = "8:.NETFramework,Version=v4.7.2"
"AllowLaterVersions" = "11:FALSE"
"InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=863262"
}
"{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_7C5ED856EDF94532A041DBACD5D5C09E"
{
"Name" = "8:.NET Core"
@ -90,6 +138,37 @@
}
"File"
{
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_1E7663DCE02A4D848349229A724E961A"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:Xceed.Wpf.AvalonDock.resources, Version=4.6.0.0, Culture=de, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_1E7663DCE02A4D848349229A724E961A"
{
"Name" = "8:Xceed.Wpf.AvalonDock.resources.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:..\\BreCalClient\\bin\\Debug\\net6.0-windows\\de\\Xceed.Wpf.AvalonDock.resources.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_F64284776BC0480CBF6C33B1FE00C374"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_4EE484EAA4A246CBBB283030A6054BC0"
{
"SourcePath" = "8:..\\BreCalClient\\Resources\\containership.ico"
@ -110,6 +189,37 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_CD20A468610C42B89F66B4D3367A5A6A"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:BreCalClient.resources, Version=1.6.2.0, Culture=de, PublicKeyToken=9ce7b6b354e08ac9, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_CD20A468610C42B89F66B4D3367A5A6A"
{
"Name" = "8:BreCalClient.resources.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:..\\BreCalClient\\bin\\Debug\\net6.0-windows\\de\\BreCalClient.resources.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_F64284776BC0480CBF6C33B1FE00C374"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
}
"FileType"
{
@ -137,6 +247,17 @@
"Property" = "8:TARGETDIR"
"Folders"
{
"{9EF0B969-E518-4E46-987F-47570745A589}:_F64284776BC0480CBF6C33B1FE00C374"
{
"Name" = "8:de"
"AlwaysCreate" = "11:FALSE"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Property" = "8:_319F0FD8E72443BFA3AE5E1F3F42523B"
"Folders"
{
}
}
}
}
"{1525181F-901A-416C-8A58-119130FE478E}:_8BBC7FE2F38E4B41A71D26CCED7D0BCB"
@ -166,15 +287,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Bremen calling"
"ProductCode" = "8:{6EF71F76-3E55-483B-A032-4B29FDAFE6A4}"
"PackageCode" = "8:{8E55F30F-A9C8-41E9-BCE8-431770A951ED}"
"ProductCode" = "8:{0AD2A791-5208-4D6F-8601-598EE8FE9BF7}"
"PackageCode" = "8:{FE992D07-0C79-4C5A-9D71-66C8F3EAFB55}"
"UpgradeCode" = "8:{1C7FA3E4-BAB9-4911-9348-73094357FC7C}"
"AspNetVersion" = "8:"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.2.2"
"ProductVersion" = "8:1.6.1"
"Manufacturer" = "8:Informatikbüro Daniel Schick"
"ARPHELPTELEPHONE" = "8:+49 (0) 421 - 38 48 27"
"ARPHELPLINK" = "8:https://www.bsmd.de/"
@ -716,7 +837,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_3E48B6E716164CC1826E094025517B3F"
{
"SourcePath" = "8:..\\BreCalClient\\obj\\Release\\net6.0-windows\\apphost.exe"
"SourcePath" = "8:..\\BreCalClient\\obj\\Debug\\net6.0-windows\\apphost.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_7C8F7547CED64B3CAE7D0296A8BCE23F"

View File

@ -69,7 +69,7 @@ def create_app(test_config=None, instance_path=None):
app.register_blueprint(history.bp)
app.register_blueprint(ports.bp)
logging.basicConfig(filename='brecaldevel.log', level=logging.DEBUG, format='%(asctime)s | %(name)s | %(levelname)s | %(message)s')
logging.basicConfig(filename='brecal.log', level=logging.DEBUG, format='%(asctime)s | %(name)s | %(levelname)s | %(message)s')
local_db.initPool(os.path.dirname(app.instance_path))
logging.info('App started')

View File

@ -54,6 +54,7 @@ def PostShipcalls():
verify_if_request_is_json(request)
content = request.get_json(force=True)
logging.info(content)
loadedModel = model.ShipcallSchema().load(data=content, many=False, partial=True)
# read the user data from the JWT token (set when login is performed)

View File

@ -19,8 +19,13 @@ def GetParticipant(options):
# query = SQLQuery.get_participant_by_user_id()
query = ("SELECT p.id as id, p.name as name, p.street as street, p.postal_code as postal_code, p.city as city, p.type as type, p.flags as flags, " +
"p.created as created, p.modified as modified, p.deleted as deleted FROM participant p " +
"INNER JOIN user u WHERE u.participant_id = p.id and u.id = %d") % options["user_id"]
"INNER JOIN user u WHERE u.participant_id = p.id and u.id = %s") % options["user_id"]
data = commands.query(query, model=model.Participant)
for participant in data:
port_query = "SELECT port_id FROM participant_port_map WHERE participant_id=?id?"
for record in commands.query(port_query, model=model.Port_Assignment, param={"id" : participant.id}, buffered=False):
pa = model.Port_Assignment(record.port_id)
participant.ports.append(pa.port_id)
else:
# query = SQLQuery.get_participants()
if "participant_id" in options:
@ -29,7 +34,7 @@ def GetParticipant(options):
"FROM participant p " +
"JOIN participant_port_map ON p.id = participant_port_map.participant_id " +
"WHERE participant_port_map.port_id IN " +
"(SELECT port_id FROM participant_port_map where participant_id = %d) " +
"(SELECT port_id FROM participant_port_map where participant_id = %s) " +
"GROUP BY id " +
"ORDER BY p.name") % options["participant_id"]
else:
@ -41,7 +46,7 @@ def GetParticipant(options):
data = commands.query(query, model=model.Participant)
for participant in data:
port_query = "SELECT port_id FROM participant_port_map WHERE participant_id=?id?";
port_query = "SELECT port_id FROM participant_port_map WHERE participant_id=?id?"
for record in commands.query(port_query, model=model.Port_Assignment, param={"id" : participant.id}, buffered=False):
pa = model.Port_Assignment(record.port_id)
participant.ports.append(pa.port_id)

View File

@ -7,11 +7,11 @@ import sys
config_path = None
def initPool(instancePath, connection_filename="connection_data_devel.json"):
def initPool(instancePath, connection_filename="connection_data_prod.json"):
try:
global config_path
if(config_path == None):
config_path = os.path.join(instancePath,f'../../../secure/{connection_filename}') #connection_data_devel.json');
config_path = os.path.join(instancePath,f'../../../secure/{connection_filename}') #connection_data_prod.json');
print (config_path)

View File

@ -110,7 +110,7 @@ class InputValidationShip():
ships = json.loads(response)
# extract only the 'imo' values
ship_imos = [ship.get("imo") for ship in ships if not ship.deleted]
ship_imos = [ship.get("imo") for ship in ships if not ship.get("deleted")]
# check, if the imo in the POST-request already exists in the list
imo_already_exists = loadedModel.get("imo") in ship_imos

View File

@ -498,7 +498,7 @@ class InputValidationShipcall():
# if the *existing* shipcall in the database is canceled, it may not be changed
if shipcall.get("canceled", False):
raise ValidationError({"canceled":f"The shipcall with id 'shipcall_id' is canceled. A canceled shipcall may not be changed."})
raise ValidationError({"canceled":f"The shipcall with id {shipcall_id} is canceled. A canceled shipcall may not be changed."})
return
@staticmethod

View File

@ -2,7 +2,7 @@ import os
import sys
import logging
sys.path.insert(0, '/var/www/brecal_devel/src/server')
sys.path.insert(0, '/var/www/brecal/src/server')
sys.path.insert(0, '/var/www/venv/lib/python3.12/site-packages/')
import schedule