diff --git a/misc/BreCal.postman_collection.json b/misc/BreCal.postman_collection.json index f1ef9ad..23307fb 100644 --- a/misc/BreCal.postman_collection.json +++ b/misc/BreCal.postman_collection.json @@ -18,7 +18,8 @@ "pm.environment.set(\"LOGON_TOKEN\", responseData.token)\r", "console.log(\"Id: \" + responseData.id)" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -76,6 +77,39 @@ }, "response": [] }, + { + "name": "History GET", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{LOGON_TOKEN}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{SCHEMA}}{{PATH}}/history?shipcall_id=79", + "host": [ + "{{SCHEMA}}{{PATH}}" + ], + "path": [ + "history" + ], + "query": [ + { + "key": "shipcall_id", + "value": "79" + } + ] + } + }, + "response": [] + }, { "name": "Shipcalls GET", "request": { @@ -120,7 +154,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"ship_id\" : 1,\r\n \"type\" : 1,\r\n \"eta\" : \"2023-07-23T07:18:19\",\r\n \"voyage\" : \"43B\",\r\n \"tug_required\" : false,\r\n \"pilot_required\" : true,\r\n \"flags\" : 0,\r\n \"pier_side\" : false,\r\n \"bunkering\" : true,\r\n \"recommended_tugs\" : 2\r\n}", + "raw": "{\r\n \"anchored\": null,\r\n \"arrival_berth_id\": 144,\r\n \"bunkering\": null,\r\n \"canceled\": false,\r\n \"created\": \"0001-01-01T00:00:00\",\r\n \"departure_berth_id\": null,\r\n \"draft\": null,\r\n \"eta\": \"2024-04-10T12:29:09.174\",\r\n \"etd\": null,\r\n \"evaluation\": null,\r\n \"evaluation_message\": null,\r\n \"flags\": null,\r\n \"id\": 0,\r\n \"modified\": null,\r\n \"moored_lock\": null,\r\n \"participants\": [\r\n {\r\n \"participant_id\": 136,\r\n \"type\": 8\r\n },\r\n {\r\n \"participant_id\": 11,\r\n \"type\": 32\r\n },\r\n {\r\n \"participant_id\": 1,\r\n \"type\": 1\r\n }\r\n ],\r\n \"pier_side\": null,\r\n \"pilot_required\": null,\r\n \"rain_sensitive_cargo\": null,\r\n \"recommended_tugs\": null,\r\n \"replenishing_lock\": null,\r\n \"replenishing_terminal\": null,\r\n \"ship_id\": 14,\r\n \"tidal_window_from\": null,\r\n \"tidal_window_to\": null,\r\n \"time_ref_point\": 0,\r\n \"tug_required\": null,\r\n \"type\": \"arrival\",\r\n \"voyage\": null\r\n}", "options": { "raw": { "language": "json" @@ -156,7 +190,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"id\" : 2, \r\n \"recommended_tugs\" : 3\r\n}", + "raw": "{\"type\": \"shifting\", \"evaluation\": \"green\", \"id\": 33, \"ship_id\": 2, \"eta\": \"2024-01-27T18:00:21\", \"etd\": \"2024-01-25T17:00:45\", \"arrival_berth_id\": 168, \"departure_berth_id\": 184, \"rain_sensitive_cargo\": \"False\", \"time_ref_point\": 1, \"participants\": [{\"participant_id\": 6, \"type\": 8}, {\"participant_id\": 11, \"type\": 32}, {\"participant_id\": 9, \"type\": 64}, {\"participant_id\": 1, \"type\": 1}], \"created\": \"2023-10-24T11:41:16\", \"modified\": \"2024-02-23T14:50:07\"}", "options": { "raw": { "language": "json" @@ -218,7 +252,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{SCHEMA}}{{PATH}}/notifications?participant_id=1", + "raw": "{{SCHEMA}}{{PATH}}/notifications?shipcall_id=4", "host": [ "{{SCHEMA}}{{PATH}}" ], @@ -227,8 +261,8 @@ ], "query": [ { - "key": "participant_id", - "value": "1" + "key": "shipcall_id", + "value": "4" } ] } @@ -262,6 +296,99 @@ }, "response": [] }, + { + "name": "Ships PUT", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{LOGON_TOKEN}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"id\": 17,\r\n \"name\": \"Testschiff 1\",\r\n \"imo\": 1231231,\r\n \"callsign\": \"TEST1\",\r\n \"participant_id\": null,\r\n \"length\": 202.0,\r\n \"width\": 25.0,\r\n \"is_tug\": 0,\r\n \"bollard_pull\": null,\r\n \"eni\": null,\r\n \"created\": \"2024-04-03T07:49:29\",\r\n \"modified\": null,\r\n \"deleted\": 0\r\n}" + }, + "url": { + "raw": "{{SCHEMA}}{{PATH}}/ships", + "host": [ + "{{SCHEMA}}{{PATH}}" + ], + "path": [ + "ships" + ] + } + }, + "response": [] + }, + { + "name": "Ships POST", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{LOGON_TOKEN}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"name\": \"Testschiff 02\",\r\n \"imo\": 9999992,\r\n \"length\": 100.2,\r\n \"width\": 16.5,\r\n \"is_tug\": 0,\r\n \"bollard_pull\": 42,\r\n \"callsign\": \"9992\",\r\n \"participant_id\": null,\r\n \"eni\": 1\r\n }" + }, + "url": { + "raw": "{{SCHEMA}}{{PATH}}/ships", + "host": [ + "{{SCHEMA}}{{PATH}}" + ], + "path": [ + "ships" + ] + } + }, + "response": [] + }, + { + "name": "Ships DELETE", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{LOGON_TOKEN}}", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"id\": 15,\r\n \"name\": \"Testschiff 01\",\r\n \"imo\": 9999991\r\n }" + }, + "url": { + "raw": "{{SCHEMA}}{{PATH}}/ships", + "host": [ + "{{SCHEMA}}{{PATH}}" + ], + "path": [ + "ships" + ] + } + }, + "response": [] + }, { "name": "Times GET", "request": { @@ -278,7 +405,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{SCHEMA}}{{PATH}}/times?shipcall_id=3", + "raw": "{{SCHEMA}}{{PATH}}/times?shipcall_id=112", "host": [ "{{SCHEMA}}{{PATH}}" ], @@ -288,7 +415,7 @@ "query": [ { "key": "shipcall_id", - "value": "3" + "value": "112" } ] } @@ -348,7 +475,12 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"start_planned\" : \"2023-05-18T07:18:19\",\r\n \"end_planned\" : \"2023-05-18T09:18:19\", \r\n \"id\" : 1\r\n}" + "raw": "{\r\n \"etd_berth\" : \"2023-01-09T05:00:39\", \r\n \"id\" : 11,\r\n \"participant_id\": 2,\r\n \"remarks\": \"test 23\",\r\n \"shipcall_id\" : 4,\r\n \"pier_side\" : 0\r\n \r\n}\r\n\r\n", + "options": { + "raw": { + "language": "json" + } + } }, "url": { "raw": "{{SCHEMA}}{{PATH}}/times", @@ -378,7 +510,7 @@ "method": "DELETE", "header": [], "url": { - "raw": "{{SCHEMA}}{{PATH}}/times?id=3", + "raw": "{{SCHEMA}}{{PATH}}/times?id=118", "host": [ "{{SCHEMA}}{{PATH}}" ], @@ -388,12 +520,43 @@ "query": [ { "key": "id", - "value": "3" + "value": "118" } ] } }, "response": [] + }, + { + "name": "User PUT", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{LOGON_TOKEN}}", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"id\": 2, \r\n \"old_password\" : \"Gurkensalat\",\r\n \"new_password\" : \"Hallowach\"\r\n}" + }, + "url": { + "raw": "{{SCHEMA}}{{PATH}}/user", + "host": [ + "{{SCHEMA}}{{PATH}}" + ], + "path": [ + "user" + ] + } + }, + "response": [] } ], "auth": { diff --git a/misc/BreCalApi.cs b/misc/BreCalApi.cs index f094063..9e94162 100644 --- a/misc/BreCalApi.cs +++ b/misc/BreCalApi.cs @@ -46,7 +46,7 @@ using System.Web; * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -850,7 +850,7 @@ namespace BreCalClient.misc.Api * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -1505,7 +1505,7 @@ namespace BreCalClient.misc.Api * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -2290,7 +2290,7 @@ namespace BreCalClient.misc.Api * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -3109,7 +3109,7 @@ namespace BreCalClient.misc.Api * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -3594,7 +3594,7 @@ namespace BreCalClient.misc.Api * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -4330,7 +4330,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -4390,7 +4390,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -4530,7 +4530,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -4748,7 +4748,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -4842,7 +4842,7 @@ namespace BreCalClient.misc.Client { new Dictionary { {"url", "https://brecal.bsmd-emswe.eu"}, - {"description", "Server hosted on vcup"}, + {"description", "Prod server hosted on vcup"}, } } }; @@ -5207,7 +5207,7 @@ namespace BreCalClient.misc.Client string report = "C# SDK (BreCalClient.misc) Debug Report:\n"; report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.3.0\n"; + report += " Version of the API: 1.4.0\n"; report += " SDK Package Version: 1.0.0\n"; return report; } @@ -5276,7 +5276,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -5296,7 +5296,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -5353,7 +5353,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -5386,7 +5386,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -5419,7 +5419,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -5510,7 +5510,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -5627,7 +5627,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -5711,7 +5711,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -5970,7 +5970,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -5998,7 +5998,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6068,7 +6068,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6095,7 +6095,7 @@ namespace BreCalClient.misc.Client * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6162,7 +6162,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6288,7 +6288,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6373,7 +6373,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6446,7 +6446,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6486,7 +6486,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6596,7 +6596,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6658,7 +6658,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6784,7 +6784,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6888,7 +6888,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6923,7 +6923,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6953,7 +6953,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -6993,7 +6993,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -7150,7 +7150,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -7226,7 +7226,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -7396,7 +7396,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -7701,7 +7701,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -7741,7 +7741,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -8023,7 +8023,7 @@ namespace BreCalClient.misc.Model * * Administer DEBRE ship calls, times and notifications * - * The version of the OpenAPI document: 1.3.0 + * The version of the OpenAPI document: 1.4.0 * Contact: info@textbausteine.net * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/misc/BreCalApi.yaml b/misc/BreCalApi.yaml index d44b28d..900b7e1 100644 --- a/misc/BreCalApi.yaml +++ b/misc/BreCalApi.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 x-stoplight: id: mwv4y8vcnopwr info: - version: 1.3.0 + version: 1.4.0 title: Bremen calling API description: 'Administer DEBRE ship calls, times and notifications' termsOfService: 'https://www.bsmd.de/' @@ -15,7 +15,7 @@ info: url: 'https://www.bsmd.de/license' servers: - url: 'https://brecal.bsmd-emswe.eu' - description: Server hosted on vcup + description: Prod server hosted on vcup tags: - name: user - name: shipcall diff --git a/misc/version.txt b/misc/version.txt index fd76c73..77d55b2 100644 --- a/misc/version.txt +++ b/misc/version.txt @@ -1 +1 @@ -1.3.0.0 \ No newline at end of file +1.4.0.0 \ No newline at end of file diff --git a/src/BreCalClient/BreCalClient.csproj b/src/BreCalClient/BreCalClient.csproj index bfe54c5..108b004 100644 --- a/src/BreCalClient/BreCalClient.csproj +++ b/src/BreCalClient/BreCalClient.csproj @@ -8,8 +8,8 @@ True BreCalClient.App ..\..\misc\brecal.snk - 1.3.0.4 - 1.3.0.4 + 1.4.0.0 + 1.4.0.0 Bremen calling client A Windows WPF client for the Bremen calling API. containership.ico @@ -39,6 +39,7 @@ + @@ -96,6 +97,7 @@ + diff --git a/src/BreCalClient/EditShipcallControl.xaml.cs b/src/BreCalClient/EditShipcallControl.xaml.cs index 74dd3d5..322b534 100644 --- a/src/BreCalClient/EditShipcallControl.xaml.cs +++ b/src/BreCalClient/EditShipcallControl.xaml.cs @@ -373,7 +373,7 @@ namespace BreCalClient this.comboBoxDepartureBerth.IsEnabled = isBsmd || isAgency; this.comboBoxShip.IsEnabled = isBsmd; this.datePickerETA.IsEnabled = isAgency || isBsmd; - this.datePickerETD.IsEnabled = isAgency; + this.datePickerETD.IsEnabled = isAgency || isBsmd; this.labelBSMDGranted.Visibility = editRightGrantedForBSMD ? Visibility.Visible : Visibility.Hidden; diff --git a/src/BreCalClient/EditTimesControl.xaml b/src/BreCalClient/EditTimesControl.xaml index bf5ce84..ad03ed9 100644 --- a/src/BreCalClient/EditTimesControl.xaml +++ b/src/BreCalClient/EditTimesControl.xaml @@ -44,7 +44,7 @@ - + @@ -76,7 +76,7 @@ - + @@ -153,8 +153,11 @@ - diff --git a/src/BreCalClient/EditTimesControl.xaml.cs b/src/BreCalClient/EditTimesControl.xaml.cs index b5d46be..dfd841d 100644 --- a/src/BreCalClient/EditTimesControl.xaml.cs +++ b/src/BreCalClient/EditTimesControl.xaml.cs @@ -65,14 +65,20 @@ namespace BreCalClient SetLockButton(newValue); } - private void datePickerETABerth_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) + private void buttonClearAll_Click(object sender, RoutedEventArgs e) { - CheckOKButton(); - } - - private void datePickerETDBerth_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) - { - CheckOKButton(); + if (System.Windows.MessageBox.Show(BreCalClient.Resources.Resources.textClearAll, BreCalClient.Resources.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes) + { + this.datePickerETABerth.Value = null; + this.datePickerETABerth_End.Value = null; + this.datePickerETDBerth.Value = null; + this.datePickerETDBerth_End.Value = null; + this.datePickerATA.Value = null; + this.datePickerATD.Value = null; + this.datePickerLockTime.Value = null; + this.datePickerZoneEntry.Value = null; + this.textBoxRemarks.Text = null; + } } #endregion @@ -99,15 +105,13 @@ namespace BreCalClient if(this.datePickerETABerth.IsEnabled && (this.Times.EtaBerth == null) && (this.AgencyTimes?.EtaBerth != null) && (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival)) { this.datePickerETABerth.Value = this.AgencyTimes.EtaBerth; - WatermarkTextBox? tb = this.datePickerETABerth.Template.FindName("PART_TextBox", this.datePickerETABerth) as WatermarkTextBox; - if (tb != null) { tb.Focus(); tb.SelectAll(); } + 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.datePickerETDBerth.Value = this.AgencyTimes.EtdBerth; - WatermarkTextBox? tb = this.datePickerETDBerth.Template.FindName("PART_TextBox", this.datePickerETDBerth) as WatermarkTextBox; - if (tb != null) tb.SelectAll(); + if (this.datePickerETDBerth.Template.FindName("PART_TextBox", this.datePickerETDBerth) is WatermarkTextBox tb) tb.SelectAll(); } this.datePickerLockTime.Value = this.Times.LockTime; @@ -141,20 +145,7 @@ namespace BreCalClient this.labelETA.Content = BreCalClient.Resources.Resources.textETABerth; this.labelETD.Content = BreCalClient.Resources.Resources.textETDBerth; } - } - - switch (ShipcallModel.Shipcall?.Type) - { - case ShipcallType.Arrival: - this.labelETA.FontWeight = FontWeights.Bold; - this.datePickerETABerth.ContextMenu.IsEnabled = false; - break; - case ShipcallType.Departure: - case ShipcallType.Shifting: - this.labelETD.FontWeight = FontWeights.Bold; - this.datePickerETDBerth.ContextMenu.IsEnabled = false; - break; - } + } this.SetLockButton(this.Times.EtaBerthFixed ?? false); } @@ -208,6 +199,7 @@ namespace BreCalClient this.datePickerETDBerth.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Departure || ShipcallModel.Shipcall?.Type == ShipcallType.Shifting); this.datePickerETDBerth_End.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Departure || ShipcallModel.Shipcall?.Type == ShipcallType.Shifting); this.textBoxRemarks.IsReadOnly = false; + this.buttonClearAll.IsEnabled = true; switch (pType) { @@ -222,10 +214,7 @@ namespace BreCalClient case Extensions.ParticipantType.PILOT: this.datePickerZoneEntry.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival); break; - } - - CheckOKButton(); - + } } private void SetLockButton(bool newValue) @@ -242,17 +231,7 @@ namespace BreCalClient this.imageFixedOrder.Source = new BitmapImage(new Uri(@"pack://application:,,,/Resources/lock_open.png", UriKind.RelativeOrAbsolute)); this.buttonFixedOrder.ToolTip = BreCalClient.Resources.Resources.textTooltipSetFixedOrder; } - } - - private void CheckOKButton() - { - Extensions.ParticipantType pType = (Extensions.ParticipantType)this.Times.ParticipantType; - if (pType != Extensions.ParticipantType.PORT_ADMINISTRATION) - this.buttonOK.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival) ? - this.datePickerETABerth.Value.HasValue : this.datePickerETDBerth.Value.HasValue; - else - this.buttonOK.IsEnabled = true; - } + } #endregion diff --git a/src/BreCalClient/EditTimesTerminalControl.xaml b/src/BreCalClient/EditTimesTerminalControl.xaml index e1b96ad..6875bca 100644 --- a/src/BreCalClient/EditTimesTerminalControl.xaml +++ b/src/BreCalClient/EditTimesTerminalControl.xaml @@ -38,7 +38,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -115,8 +115,11 @@ - diff --git a/src/BreCalClient/EditTimesTerminalControl.xaml.cs b/src/BreCalClient/EditTimesTerminalControl.xaml.cs index a80a1a6..6071ba9 100644 --- a/src/BreCalClient/EditTimesTerminalControl.xaml.cs +++ b/src/BreCalClient/EditTimesTerminalControl.xaml.cs @@ -76,14 +76,19 @@ namespace BreCalClient this.comboBoxPierside.SelectedIndex = -1; } - private void datePickerOperationStart_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) + private void buttonClearAll_Click(object sender, RoutedEventArgs e) { - this.CheckOKButton(); - } - - private void datePickerOperationEnd_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) - { - this.CheckOKButton(); + if (MessageBox.Show(BreCalClient.Resources.Resources.textClearAll, BreCalClient.Resources.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes) + { + this.datePickerOperationStart.Value = null; + this.datePickerOperationStart_End.Value = null; + this.datePickerOperationEnd.Value = null; + this.datePickerOperationEnd_End.Value = null; + this.comboBoxBerth.SelectedIndex = -1; + this.comboBoxPierside.SelectedIndex = -1; + this.textBoxRemarks.Text = null; + this.textBoxBerthRemarks.Text = null; + } } #endregion @@ -122,8 +127,6 @@ namespace BreCalClient switch (ShipcallModel.Shipcall?.Type) { case ShipcallType.Arrival: - this.labelStart.FontWeight = FontWeights.Bold; - this.datePickerOperationStart.ContextMenu.IsEnabled = false; this.labelEnd.Visibility = Visibility.Hidden; this.datePickerOperationEnd.Visibility = Visibility.Hidden; this.datePickerOperationEnd_End.Visibility = Visibility.Hidden; @@ -131,7 +134,6 @@ namespace BreCalClient break; case ShipcallType.Departure: this.rowStart.Height = new(0); - this.labelEnd.FontWeight = FontWeights.Bold; this.labelBerth.Visibility = Visibility.Hidden; this.comboBoxBerth.Visibility= Visibility.Hidden; this.labelPierside.Visibility = Visibility.Hidden; @@ -140,9 +142,7 @@ namespace BreCalClient this.textBoxBerthRemarks.Visibility = Visibility.Hidden; break; case ShipcallType.Shifting: - this.rowStart.Height = new(0); - this.labelEnd.FontWeight = FontWeights.Bold; - this.datePickerOperationEnd.ContextMenu.IsEnabled = false; + this.rowStart.Height = new(0); this.labelBerth.Visibility = Visibility.Hidden; this.comboBoxBerth.Visibility = Visibility.Hidden; this.labelPierside.Visibility = Visibility.Hidden; @@ -166,14 +166,8 @@ namespace BreCalClient this.comboBoxPierside.IsEnabled = ShipcallModel.Shipcall?.Type == ShipcallType.Arrival; this.textBoxBerthRemarks.IsReadOnly = ShipcallModel.Shipcall?.Type != ShipcallType.Arrival; this.textBoxRemarks.IsReadOnly = false; - - this.CheckOKButton(); - } - - private void CheckOKButton() - { - this.buttonOK.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival) ? this.datePickerOperationStart.Value.HasValue : - this.datePickerOperationEnd.Value.HasValue; + this.buttonClearAll.IsEnabled = true; + } #endregion diff --git a/src/BreCalClient/MainWindow.xaml.cs b/src/BreCalClient/MainWindow.xaml.cs index 734408d..475c8ac 100644 --- a/src/BreCalClient/MainWindow.xaml.cs +++ b/src/BreCalClient/MainWindow.xaml.cs @@ -817,14 +817,20 @@ namespace BreCalClient { if (x.Shipcall == null) return 0; if (y.Shipcall == null) return 0; - DateTime xDate = (x.Shipcall.Type == ShipcallType.Arrival) ? x.Eta ?? DateTime.Now : x.Etd ?? DateTime.Now; + DateTime now = DateTime.Now; + + DateTime xDate = (x.Shipcall.Type == ShipcallType.Arrival) ? (x.Eta ?? now) : (x.Etd ?? now); + Times? xTimes = x.GetTimesForParticipantType(ParticipantType.AGENCY); if(xTimes != null) - xDate = (x.Shipcall.Type == ShipcallType.Arrival) ? xTimes.EtaBerth ?? DateTime.Now : xTimes.EtdBerth ?? DateTime.Now; - DateTime yDate = (y.Shipcall.Type == ShipcallType.Arrival) ? y.Eta ?? DateTime.Now : y.Etd ?? DateTime.Now; + xDate = (x.Shipcall.Type == ShipcallType.Arrival) ? (xTimes.EtaBerth ?? now) : (xTimes.EtdBerth ?? now); + + DateTime yDate = (y.Shipcall.Type == ShipcallType.Arrival) ? (y.Eta ?? now) : (y.Etd ?? now); + Times? yTimes = y.GetTimesForParticipantType(ParticipantType.AGENCY); if (yTimes != null) - yDate = (y.Shipcall.Type == ShipcallType.Arrival) ? yTimes.EtaBerth ?? DateTime.Now : yTimes.EtdBerth ?? DateTime.Now; + yDate = (y.Shipcall.Type == ShipcallType.Arrival) ? (yTimes.EtaBerth ?? now) : (yTimes.EtdBerth ?? now); + return DateTime.Compare(xDate, yDate); }); break; diff --git a/src/BreCalClient/Properties/PublishProfiles/ClickOnceDevelProfile.pubxml b/src/BreCalClient/Properties/PublishProfiles/ClickOnceDevelProfile.pubxml index a6aaa3c..0c88dd3 100644 --- a/src/BreCalClient/Properties/PublishProfiles/ClickOnceDevelProfile.pubxml +++ b/src/BreCalClient/Properties/PublishProfiles/ClickOnceDevelProfile.pubxml @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 1 - 1.3.0.4 + 1.4.0.0 True Debug True diff --git a/src/BreCalClient/Properties/PublishProfiles/ClickOnceProfile.pubxml b/src/BreCalClient/Properties/PublishProfiles/ClickOnceProfile.pubxml index 9799ca8..21ecd41 100644 --- a/src/BreCalClient/Properties/PublishProfiles/ClickOnceProfile.pubxml +++ b/src/BreCalClient/Properties/PublishProfiles/ClickOnceProfile.pubxml @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 0 - 1.3.0.4 + 1.4.0.0 False Release True diff --git a/src/BreCalClient/Properties/PublishProfiles/ClickOnceTestProfile.pubxml b/src/BreCalClient/Properties/PublishProfiles/ClickOnceTestProfile.pubxml index b4478a3..059b55a 100644 --- a/src/BreCalClient/Properties/PublishProfiles/ClickOnceTestProfile.pubxml +++ b/src/BreCalClient/Properties/PublishProfiles/ClickOnceTestProfile.pubxml @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 0 - 1.3.0.4 + 1.4.0.0 True Debug True diff --git a/src/BreCalClient/Resources/Resources.Designer.cs b/src/BreCalClient/Resources/Resources.Designer.cs index 679e66a..492ef15 100644 --- a/src/BreCalClient/Resources/Resources.Designer.cs +++ b/src/BreCalClient/Resources/Resources.Designer.cs @@ -278,6 +278,16 @@ namespace BreCalClient.Resources { } } + /// + /// Looks up a localized resource of type System.Byte[]. + /// + public static byte[] nav_undo_red { + get { + object obj = ResourceManager.GetObject("nav_undo_red", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Looks up a localized string similar to Shifting. /// @@ -469,6 +479,15 @@ namespace BreCalClient.Resources { } } + /// + /// Looks up a localized string similar to Clear all entries?. + /// + public static string textClearAll { + get { + return ResourceManager.GetString("textClearAll", resourceCulture); + } + } + /// /// Looks up a localized string similar to Clear assignment. /// diff --git a/src/BreCalClient/Resources/Resources.de.resx b/src/BreCalClient/Resources/Resources.de.resx index 1d95aef..a681ad9 100644 --- a/src/BreCalClient/Resources/Resources.de.resx +++ b/src/BreCalClient/Resources/Resources.de.resx @@ -505,4 +505,7 @@ Verhol. Nr. + + Alle Eintragungen zurücksetzen? + \ No newline at end of file diff --git a/src/BreCalClient/Resources/Resources.resx b/src/BreCalClient/Resources/Resources.resx index a6d08f6..1cf2a78 100644 --- a/src/BreCalClient/Resources/Resources.resx +++ b/src/BreCalClient/Resources/Resources.resx @@ -178,6 +178,9 @@ nav_refresh_green.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + nav_undo_red.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + Shifting @@ -241,6 +244,9 @@ Change password + + Clear all entries? + Clear assignment diff --git a/src/BreCalClient/Resources/nav_undo_red.png b/src/BreCalClient/Resources/nav_undo_red.png new file mode 100644 index 0000000..692f6db Binary files /dev/null and b/src/BreCalClient/Resources/nav_undo_red.png differ diff --git a/src/BreCalClient/ShipcallControl.xaml.cs b/src/BreCalClient/ShipcallControl.xaml.cs index 32fef5e..d6df2cc 100644 --- a/src/BreCalClient/ShipcallControl.xaml.cs +++ b/src/BreCalClient/ShipcallControl.xaml.cs @@ -26,9 +26,6 @@ namespace BreCalClient Participant? _tug; Participant? _port_administration; private static readonly ILog _log = LogManager.GetLogger(typeof(ShipcallControl)); - bool ataAdded = false; - bool atdAdded = false; - bool lockTimeAdded = false; #endregion @@ -346,26 +343,17 @@ namespace BreCalClient this.labelMooringETAETDValue.Content = mooringTimes.DisplayTime(this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival); this.textBlockMooringRemarks.Text = mooringTimes.Remarks.TruncateDots(50); this.imageMooringLocked.Visibility = (mooringTimes.EtaBerthFixed ?? false) ? Visibility.Visible : Visibility.Hidden; + ataRowDefinition.Height = mooringTimes.Ata.HasValue ? new(15) : new(0); + atdRowDefinition.Height = mooringTimes.Atd.HasValue ? new(15) : new(0); if(mooringTimes.Ata.HasValue) { - if(!ataAdded) - { - - ataRowDefinition.Height = new GridLength(15); - labelTimesMooringATA.Content = mooringTimes.Ata.Value.ToString("dd.MM.yyyy HH:mm"); - ataAdded = true; - } + labelTimesMooringATA.Content = mooringTimes.Ata.Value.ToString("dd.MM.yyyy HH:mm"); } if (mooringTimes.Atd.HasValue) { - if (!atdAdded) - { - atdRowDefinition.Height = new GridLength(15); - labelTimesMooringATD.Content = mooringTimes.Atd.Value.ToString("dd.MM.yyyy HH:mm"); - atdAdded = true; - } + labelTimesMooringATD.Content = mooringTimes.Atd.Value.ToString("dd.MM.yyyy HH:mm"); } } @@ -382,13 +370,9 @@ namespace BreCalClient this.labelPortAuthorityETAETDValue.Content = portAuthorityTimes.DisplayTime(this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival); this.textBlockPortAuthorityRemarks.Text = portAuthorityTimes.Remarks.TruncateDots(50); this.imagePortAuthorityLocked.Visibility = (portAuthorityTimes.EtaBerthFixed ?? false) ? Visibility.Visible : Visibility.Hidden; + lockTimeRowDefinition.Height = portAuthorityTimes.LockTime.HasValue ? new(15) : new(0); if(portAuthorityTimes.LockTime.HasValue) { - if(!lockTimeAdded) - { - lockTimeRowDefinition.Height = new GridLength(15); - lockTimeAdded = true; - } labelPortAuthorityLockTime.Content = portAuthorityTimes.LockTime.Value.ToString("dd.MM.yyyy HH:mm"); } } diff --git a/src/Setup/Setup.vdproj b/src/Setup/Setup.vdproj index 5559e57..d07d8a8 100644 --- a/src/Setup/Setup.vdproj +++ b/src/Setup/Setup.vdproj @@ -182,15 +182,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Bremen calling" - "ProductCode" = "8:{D83D737A-BDC1-4D36-9D23-71EF58C7137B}" - "PackageCode" = "8:{D7E747A8-7492-47E9-9D4F-B7F955AD8313}" + "ProductCode" = "8:{79B2385A-EA5E-4008-A190-7374F18BBA5E}" + "PackageCode" = "8:{084F8E83-0A68-4410-B23D-614BBA59227E}" "UpgradeCode" = "8:{1C7FA3E4-BAB9-4911-9348-73094357FC7C}" "AspNetVersion" = "8:" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.3.0" + "ProductVersion" = "8:1.4.0" "Manufacturer" = "8:Informatikbüro Daniel Schick" "ARPHELPTELEPHONE" = "8:+49 (0) 421 - 38 48 27" "ARPHELPLINK" = "8:https://www.bsmd.de/" diff --git a/src/server/setup.py b/src/server/setup.py index f3e2f1c..44750aa 100644 --- a/src/server/setup.py +++ b/src/server/setup.py @@ -2,7 +2,7 @@ from setuptools import find_packages, setup setup( name='BreCal', - version='1.2.2', + version='1.4.0', packages=find_packages(), include_package_data=True, zip_safe=False,