Merge branch 'release/0.6'

This commit is contained in:
Daniel Schick 2023-09-21 10:51:37 +02:00
commit 2917fb5b2a
55 changed files with 2428 additions and 800 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
docs/Usertreffen.pptx Normal file

Binary file not shown.

View File

@ -1,8 +1,8 @@
//---------------------- //----------------------
// <auto-generated> // <auto-generated>
// Generated REST API Client Code Generator v1.7.17.0 on 24.08.2023 08:00:37 // Generated REST API Client Code Generator v1.8.4.0 on 21.09.2023 07:07:32
// Using the tool OpenAPI Generator v6.6.0 // Using the tool OpenAPI Generator v7.0.0
// </auto-generated> // </auto-generated>
//---------------------- //----------------------
@ -29,7 +29,8 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Net.Http; using System.Net.Http;
using System.Net.Mime;
using System.Net.Security;
using System.Reflection; using System.Reflection;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters; using System.Runtime.Serialization.Formatters;
@ -44,12 +45,13 @@ using System.Threading.Tasks;
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
namespace BreCalClient.misc.Api namespace BreCalClient.misc.Api
{ {
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
/// <summary> /// <summary>
/// Represents a collection of functions to interact with the API endpoints /// Represents a collection of functions to interact with the API endpoints
/// </summary> /// </summary>
@ -2322,7 +2324,7 @@ namespace BreCalClient.misc.Api
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -2334,7 +2336,6 @@ namespace BreCalClient.misc.Client
internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer
{ {
private readonly IReadableConfiguration _configuration; private readonly IReadableConfiguration _configuration;
private static readonly string _contentType = "application/json";
private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings
{ {
// OpenAPI generated types generally hide default constructors. // OpenAPI generated types generally hide default constructors.
@ -2435,15 +2436,11 @@ namespace BreCalClient.misc.Client
} }
public ISerializer Serializer => this; public ISerializer Serializer => this;
public IDeserializer Deserializer => this; public IDeserializer Deserializer => this;
public string[] AcceptedContentTypes => RestSharp.Serializers.ContentType.JsonAccept; public string[] AcceptedContentTypes => RestSharp.ContentType.JsonAccept;
public SupportsContentType SupportsContentType => contentType => public SupportsContentType SupportsContentType => contentType =>
contentType.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) ||
contentType.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase);
public string ContentType public ContentType ContentType { get; set; } = RestSharp.ContentType.Json;
{
get { return _contentType; }
set { throw new InvalidOperationException("Not allowed to set content type."); }
}
public DataFormat DataFormat => DataFormat.Json; public DataFormat DataFormat => DataFormat.Json;
} }
/// <summary> /// <summary>
@ -2688,7 +2685,7 @@ namespace BreCalClient.misc.Client
} }
return transformed; return transformed;
} }
private ApiResponse<T> Exec<T>(RestRequest req, RequestOptions options, IReadableConfiguration configuration) private ApiResponse<T> Exec<T>(RestRequest request, RequestOptions options, IReadableConfiguration configuration)
{ {
var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl;
var cookies = new CookieContainer(); var cookies = new CookieContainer();
@ -2705,25 +2702,27 @@ namespace BreCalClient.misc.Client
CookieContainer = cookies, CookieContainer = cookies,
MaxTimeout = configuration.Timeout, MaxTimeout = configuration.Timeout,
Proxy = configuration.Proxy, Proxy = configuration.Proxy,
UserAgent = configuration.UserAgent UserAgent = configuration.UserAgent,
UseDefaultCredentials = configuration.UseDefaultCredentials,
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
}; };
RestClient client = new RestClient(clientOptions) using (RestClient client = new RestClient(clientOptions,
.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)); configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration))))
InterceptRequest(req); {
InterceptRequest(request);
RestResponse<T> response; RestResponse<T> response;
if (RetryConfiguration.RetryPolicy != null) if (RetryConfiguration.RetryPolicy != null)
{ {
var policy = RetryConfiguration.RetryPolicy; var policy = RetryConfiguration.RetryPolicy;
var policyResult = policy.ExecuteAndCapture(() => client.Execute(req)); var policyResult = policy.ExecuteAndCapture(() => client.Execute(request));
response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize<T>(policyResult.Result) : new RestResponse<T> response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize<T>(policyResult.Result) : new RestResponse<T>(request)
{ {
Request = req,
ErrorException = policyResult.FinalException ErrorException = policyResult.FinalException
}; };
} }
else else
{ {
response = client.Execute<T>(req); response = client.Execute<T>(request);
} }
// if the response type is oneOf/anyOf, call FromJSON to deserialize the data // if the response type is oneOf/anyOf, call FromJSON to deserialize the data
if (typeof(BreCalClient.misc.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) if (typeof(BreCalClient.misc.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T)))
@ -2749,7 +2748,7 @@ namespace BreCalClient.misc.Client
{ {
response.Data = (T)(object)response.Content; response.Data = (T)(object)response.Content;
} }
InterceptResponse(req, response); InterceptResponse(request, response);
var result = ToApiResponse(response); var result = ToApiResponse(response);
if (response.ErrorMessage != null) if (response.ErrorMessage != null)
{ {
@ -2782,7 +2781,8 @@ namespace BreCalClient.misc.Client
} }
return result; return result;
} }
private async Task<ApiResponse<T>> ExecAsync<T>(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) }
private async Task<ApiResponse<T>> ExecAsync<T>(RestRequest request, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{ {
var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl;
var clientOptions = new RestClientOptions(baseUrl) var clientOptions = new RestClientOptions(baseUrl)
@ -2790,25 +2790,26 @@ namespace BreCalClient.misc.Client
ClientCertificates = configuration.ClientCertificates, ClientCertificates = configuration.ClientCertificates,
MaxTimeout = configuration.Timeout, MaxTimeout = configuration.Timeout,
Proxy = configuration.Proxy, Proxy = configuration.Proxy,
UserAgent = configuration.UserAgent UserAgent = configuration.UserAgent,
UseDefaultCredentials = configuration.UseDefaultCredentials
}; };
RestClient client = new RestClient(clientOptions) using (RestClient client = new RestClient(clientOptions,
.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)); configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration))))
InterceptRequest(req); {
InterceptRequest(request);
RestResponse<T> response; RestResponse<T> response;
if (RetryConfiguration.AsyncRetryPolicy != null) if (RetryConfiguration.AsyncRetryPolicy != null)
{ {
var policy = RetryConfiguration.AsyncRetryPolicy; var policy = RetryConfiguration.AsyncRetryPolicy;
var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(req, ct), cancellationToken).ConfigureAwait(false); var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false);
response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize<T>(policyResult.Result) : new RestResponse<T> response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize<T>(policyResult.Result) : new RestResponse<T>(request)
{ {
Request = req,
ErrorException = policyResult.FinalException ErrorException = policyResult.FinalException
}; };
} }
else else
{ {
response = await client.ExecuteAsync<T>(req, cancellationToken).ConfigureAwait(false); response = await client.ExecuteAsync<T>(request, cancellationToken).ConfigureAwait(false);
} }
// if the response type is oneOf/anyOf, call FromJSON to deserialize the data // if the response type is oneOf/anyOf, call FromJSON to deserialize the data
if (typeof(BreCalClient.misc.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) if (typeof(BreCalClient.misc.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T)))
@ -2823,7 +2824,7 @@ namespace BreCalClient.misc.Client
{ {
response.Data = (T)(object)response.RawBytes; response.Data = (T)(object)response.RawBytes;
} }
InterceptResponse(req, response); InterceptResponse(request, response);
var result = ToApiResponse(response); var result = ToApiResponse(response);
if (response.ErrorMessage != null) if (response.ErrorMessage != null)
{ {
@ -2856,6 +2857,7 @@ namespace BreCalClient.misc.Client
} }
return result; return result;
} }
}
#region IAsynchronousClient #region IAsynchronousClient
/// <summary> /// <summary>
/// Make a HTTP GET request (async). /// Make a HTTP GET request (async).
@ -3057,7 +3059,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -3117,7 +3119,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -3257,7 +3259,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -3475,7 +3477,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -3521,6 +3523,7 @@ namespace BreCalClient.misc.Client
/// Example: http://localhost:3000/v1/ /// Example: http://localhost:3000/v1/
/// </summary> /// </summary>
private string _basePath; private string _basePath;
private bool _useDefaultCredentials = false;
/// <summary> /// <summary>
/// Gets or sets the API key based on the authentication name. /// Gets or sets the API key based on the authentication name.
/// This is the key and value comprising the "secret" for accessing an API. /// This is the key and value comprising the "secret" for accessing an API.
@ -3554,7 +3557,7 @@ namespace BreCalClient.misc.Client
{ {
Proxy = null; Proxy = null;
UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.0.0/csharp"); UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.0.0/csharp");
BasePath = "https://brecal.bsmd-emswe.eu"; BasePath = "https://brecaltest.bsmd-emswe.eu";
DefaultHeaders = new ConcurrentDictionary<string, string>(); DefaultHeaders = new ConcurrentDictionary<string, string>();
ApiKey = new ConcurrentDictionary<string, string>(); ApiKey = new ConcurrentDictionary<string, string>();
ApiKeyPrefix = new ConcurrentDictionary<string, string>(); ApiKeyPrefix = new ConcurrentDictionary<string, string>();
@ -3562,7 +3565,7 @@ namespace BreCalClient.misc.Client
{ {
{ {
new Dictionary<string, object> { new Dictionary<string, object> {
{"url", "https://brecal.bsmd-emswe.eu"}, {"url", "https://brecaltest.bsmd-emswe.eu"},
{"description", "Test server hosted on vcup"}, {"description", "Test server hosted on vcup"},
} }
} }
@ -3581,7 +3584,7 @@ namespace BreCalClient.misc.Client
IDictionary<string, string> defaultHeaders, IDictionary<string, string> defaultHeaders,
IDictionary<string, string> apiKey, IDictionary<string, string> apiKey,
IDictionary<string, string> apiKeyPrefix, IDictionary<string, string> apiKeyPrefix,
string basePath = "https://brecal.bsmd-emswe.eu") : this() string basePath = "https://brecaltest.bsmd-emswe.eu") : this()
{ {
if (string.IsNullOrWhiteSpace(basePath)) if (string.IsNullOrWhiteSpace(basePath))
throw new ArgumentException("The provided basePath is invalid.", "basePath"); throw new ArgumentException("The provided basePath is invalid.", "basePath");
@ -3610,11 +3613,20 @@ namespace BreCalClient.misc.Client
/// <summary> /// <summary>
/// Gets or sets the base path for API access. /// Gets or sets the base path for API access.
/// </summary> /// </summary>
public virtual string BasePath { public virtual string BasePath
{
get { return _basePath; } get { return _basePath; }
set { _basePath = value; } set { _basePath = value; }
} }
/// <summary> /// <summary>
/// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false.
/// </summary>
public virtual bool UseDefaultCredentials
{
get { return _useDefaultCredentials; }
set { _useDefaultCredentials = value; }
}
/// <summary>
/// Gets or sets the default header. /// Gets or sets the default header.
/// </summary> /// </summary>
[Obsolete("Use DefaultHeaders instead.")] [Obsolete("Use DefaultHeaders instead.")]
@ -3854,7 +3866,7 @@ namespace BreCalClient.misc.Client
/// <return>The operation server URL.</return> /// <return>The operation server URL.</return>
public string GetOperationServerUrl(string operation, int index, Dictionary<string, string> inputVariables) public string GetOperationServerUrl(string operation, int index, Dictionary<string, string> inputVariables)
{ {
if (OperationServers.TryGetValue(operation, out var operationServer)) if (operation != null && OperationServers.TryGetValue(operation, out var operationServer))
{ {
return GetServerUrl(operationServer, index, inputVariables); return GetServerUrl(operationServer, index, inputVariables);
} }
@ -3905,6 +3917,10 @@ namespace BreCalClient.misc.Client
} }
return url; return url;
} }
/// <summary>
/// Gets and Sets the RemoteCertificateValidationCallback
/// </summary>
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
#endregion Properties #endregion Properties
#region Methods #region Methods
/// <summary> /// <summary>
@ -3915,7 +3931,7 @@ namespace BreCalClient.misc.Client
string report = "C# SDK (BreCalClient.misc) Debug Report:\n"; string report = "C# SDK (BreCalClient.misc) Debug Report:\n";
report += " OS: " + System.Environment.OSVersion + "\n"; report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n";
report += " Version of the API: 0.5.0\n"; report += " Version of the API: 0.6.0\n";
report += " SDK Package Version: 1.0.0\n"; report += " SDK Package Version: 1.0.0\n";
return report; return report;
} }
@ -3970,6 +3986,8 @@ namespace BreCalClient.misc.Client
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
UseDefaultCredentials = second.UseDefaultCredentials,
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
}; };
return config; return config;
} }
@ -3982,7 +4000,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4002,7 +4020,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4059,7 +4077,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4092,7 +4110,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4125,7 +4143,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4216,7 +4234,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4294,6 +4312,10 @@ namespace BreCalClient.misc.Client
/// <value>Password.</value> /// <value>Password.</value>
string Password { get; } string Password { get; }
/// <summary> /// <summary>
/// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false.
/// </summary>
bool UseDefaultCredentials { get; }
/// <summary>
/// Get the servers associated with the operation. /// Get the servers associated with the operation.
/// </summary> /// </summary>
/// <value>Operation servers.</value> /// <value>Operation servers.</value>
@ -4316,6 +4338,11 @@ namespace BreCalClient.misc.Client
/// </summary> /// </summary>
/// <value>X509 Certificate collection.</value> /// <value>X509 Certificate collection.</value>
X509CertificateCollection ClientCertificates { get; } X509CertificateCollection ClientCertificates { get; }
/// <summary>
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
/// overriding certificate errors in the scope of a request.
/// </summary>
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
} }
} }
@ -4324,7 +4351,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4408,7 +4435,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4667,7 +4694,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4695,7 +4722,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4765,7 +4792,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4792,7 +4819,7 @@ namespace BreCalClient.misc.Client
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4859,7 +4886,7 @@ namespace BreCalClient.misc.Model
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -4877,16 +4904,16 @@ namespace BreCalClient.misc.Model
/// <param name="id">id.</param> /// <param name="id">id.</param>
/// <param name="name">name.</param> /// <param name="name">name.</param>
/// <param name="participantId">participantId.</param> /// <param name="participantId">participantId.</param>
/// <param name="_lock">_lock.</param> /// <param name="varLock">varLock.</param>
/// <param name="created">created.</param> /// <param name="created">created.</param>
/// <param name="modified">modified.</param> /// <param name="modified">modified.</param>
/// <param name="deleted">deleted (default to false).</param> /// <param name="deleted">deleted (default to false).</param>
public Berth(int id = default(int), string name = default(string), int? participantId = default(int?), bool? _lock = default(bool?), DateTime created = default(DateTime), DateTime? modified = default(DateTime?), bool deleted = false) public Berth(int id = default(int), string name = default(string), int? participantId = default(int?), bool? varLock = default(bool?), DateTime created = default(DateTime), DateTime? modified = default(DateTime?), bool deleted = false)
{ {
this.Id = id; this.Id = id;
this.Name = name; this.Name = name;
this.ParticipantId = participantId; this.ParticipantId = participantId;
this.Lock = _lock; this.VarLock = varLock;
this.Created = created; this.Created = created;
this.Modified = modified; this.Modified = modified;
this.Deleted = deleted; this.Deleted = deleted;
@ -4907,10 +4934,10 @@ namespace BreCalClient.misc.Model
[DataMember(Name = "participant_id", EmitDefaultValue = true)] [DataMember(Name = "participant_id", EmitDefaultValue = true)]
public int? ParticipantId { get; set; } public int? ParticipantId { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Lock /// Gets or Sets VarLock
/// </summary> /// </summary>
[DataMember(Name = "lock", EmitDefaultValue = true)] [DataMember(Name = "lock", EmitDefaultValue = true)]
public bool? Lock { get; set; } public bool? VarLock { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Created /// Gets or Sets Created
/// </summary> /// </summary>
@ -4937,7 +4964,7 @@ namespace BreCalClient.misc.Model
sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" ParticipantId: ").Append(ParticipantId).Append("\n"); sb.Append(" ParticipantId: ").Append(ParticipantId).Append("\n");
sb.Append(" Lock: ").Append(Lock).Append("\n"); sb.Append(" VarLock: ").Append(VarLock).Append("\n");
sb.Append(" Created: ").Append(Created).Append("\n"); sb.Append(" Created: ").Append(Created).Append("\n");
sb.Append(" Modified: ").Append(Modified).Append("\n"); sb.Append(" Modified: ").Append(Modified).Append("\n");
sb.Append(" Deleted: ").Append(Deleted).Append("\n"); sb.Append(" Deleted: ").Append(Deleted).Append("\n");
@ -4989,9 +5016,9 @@ namespace BreCalClient.misc.Model
this.ParticipantId.Equals(input.ParticipantId)) this.ParticipantId.Equals(input.ParticipantId))
) && ) &&
( (
this.Lock == input.Lock || this.VarLock == input.VarLock ||
(this.Lock != null && (this.VarLock != null &&
this.Lock.Equals(input.Lock)) this.VarLock.Equals(input.VarLock))
) && ) &&
( (
this.Created == input.Created || this.Created == input.Created ||
@ -5027,9 +5054,9 @@ namespace BreCalClient.misc.Model
{ {
hashCode = (hashCode * 59) + this.ParticipantId.GetHashCode(); hashCode = (hashCode * 59) + this.ParticipantId.GetHashCode();
} }
if (this.Lock != null) if (this.VarLock != null)
{ {
hashCode = (hashCode * 59) + this.Lock.GetHashCode(); hashCode = (hashCode * 59) + this.VarLock.GetHashCode();
} }
if (this.Created != null) if (this.Created != null)
{ {
@ -5065,7 +5092,7 @@ namespace BreCalClient.misc.Model
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -5202,7 +5229,7 @@ namespace BreCalClient.misc.Model
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -5318,7 +5345,7 @@ namespace BreCalClient.misc.Model
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -5530,7 +5557,7 @@ namespace BreCalClient.misc.Model
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -5756,7 +5783,7 @@ namespace BreCalClient.misc.Model
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -5777,10 +5804,11 @@ namespace BreCalClient.misc.Model
/// <param name="postalCode">postalCode.</param> /// <param name="postalCode">postalCode.</param>
/// <param name="city">city.</param> /// <param name="city">city.</param>
/// <param name="type">type.</param> /// <param name="type">type.</param>
/// <param name="flags">flags.</param>
/// <param name="created">created.</param> /// <param name="created">created.</param>
/// <param name="modified">modified.</param> /// <param name="modified">modified.</param>
/// <param name="deleted">deleted (default to false).</param> /// <param name="deleted">deleted (default to false).</param>
public Participant(int id = default(int), string name = default(string), string street = default(string), string postalCode = default(string), string city = default(string), int type = default(int), DateTime created = default(DateTime), DateTime? modified = default(DateTime?), bool deleted = false) public Participant(int id = default(int), string name = default(string), string street = default(string), string postalCode = default(string), string city = default(string), int type = default(int), int? flags = default(int?), DateTime created = default(DateTime), DateTime? modified = default(DateTime?), bool deleted = false)
{ {
this.Id = id; this.Id = id;
this.Name = name; this.Name = name;
@ -5788,6 +5816,7 @@ namespace BreCalClient.misc.Model
this.PostalCode = postalCode; this.PostalCode = postalCode;
this.City = city; this.City = city;
this.Type = type; this.Type = type;
this.Flags = flags;
this.Created = created; this.Created = created;
this.Modified = modified; this.Modified = modified;
this.Deleted = deleted; this.Deleted = deleted;
@ -5823,6 +5852,11 @@ namespace BreCalClient.misc.Model
[DataMember(Name = "type", EmitDefaultValue = true)] [DataMember(Name = "type", EmitDefaultValue = true)]
public int Type { get; set; } public int Type { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Flags
/// </summary>
[DataMember(Name = "flags", EmitDefaultValue = true)]
public int? Flags { get; set; }
/// <summary>
/// Gets or Sets Created /// Gets or Sets Created
/// </summary> /// </summary>
[DataMember(Name = "created", EmitDefaultValue = true)] [DataMember(Name = "created", EmitDefaultValue = true)]
@ -5851,6 +5885,7 @@ namespace BreCalClient.misc.Model
sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); sb.Append(" PostalCode: ").Append(PostalCode).Append("\n");
sb.Append(" City: ").Append(City).Append("\n"); sb.Append(" City: ").Append(City).Append("\n");
sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n");
sb.Append(" Flags: ").Append(Flags).Append("\n");
sb.Append(" Created: ").Append(Created).Append("\n"); sb.Append(" Created: ").Append(Created).Append("\n");
sb.Append(" Modified: ").Append(Modified).Append("\n"); sb.Append(" Modified: ").Append(Modified).Append("\n");
sb.Append(" Deleted: ").Append(Deleted).Append("\n"); sb.Append(" Deleted: ").Append(Deleted).Append("\n");
@ -5914,6 +5949,11 @@ namespace BreCalClient.misc.Model
this.Type == input.Type || this.Type == input.Type ||
this.Type.Equals(input.Type) this.Type.Equals(input.Type)
) && ) &&
(
this.Flags == input.Flags ||
(this.Flags != null &&
this.Flags.Equals(input.Flags))
) &&
( (
this.Created == input.Created || this.Created == input.Created ||
(this.Created != null && (this.Created != null &&
@ -5956,6 +5996,10 @@ namespace BreCalClient.misc.Model
hashCode = (hashCode * 59) + this.City.GetHashCode(); hashCode = (hashCode * 59) + this.City.GetHashCode();
} }
hashCode = (hashCode * 59) + this.Type.GetHashCode(); hashCode = (hashCode * 59) + this.Type.GetHashCode();
if (this.Flags != null)
{
hashCode = (hashCode * 59) + this.Flags.GetHashCode();
}
if (this.Created != null) if (this.Created != null)
{ {
hashCode = (hashCode * 59) + this.Created.GetHashCode(); hashCode = (hashCode * 59) + this.Created.GetHashCode();
@ -6005,7 +6049,7 @@ namespace BreCalClient.misc.Model
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -6312,7 +6356,7 @@ namespace BreCalClient.misc.Model
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -6506,6 +6550,7 @@ namespace BreCalClient.misc.Model
/// <summary> /// <summary>
/// Gets or Sets Participants /// Gets or Sets Participants
/// </summary> /// </summary>
/// <example>[1,5,7]</example>
[DataMember(Name = "participants", EmitDefaultValue = true)] [DataMember(Name = "participants", EmitDefaultValue = true)]
public List<int> Participants { get; set; } public List<int> Participants { get; set; }
/// <summary> /// <summary>
@ -6842,7 +6887,7 @@ namespace BreCalClient.misc.Model
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -6876,9 +6921,13 @@ namespace BreCalClient.misc.Model
/// <param name="remarks">remarks.</param> /// <param name="remarks">remarks.</param>
/// <param name="shipcallId">shipcallId (required).</param> /// <param name="shipcallId">shipcallId (required).</param>
/// <param name="participantId">participantId (required).</param> /// <param name="participantId">participantId (required).</param>
/// <param name="berthId">berthId.</param>
/// <param name="berthInfo">berthInfo.</param>
/// <param name="pierSide">pierSide.</param>
/// <param name="participantType">participantType.</param>
/// <param name="created">created.</param> /// <param name="created">created.</param>
/// <param name="modified">modified.</param> /// <param name="modified">modified.</param>
public Times(int id = default(int), DateTime? etaBerth = default(DateTime?), bool? etaBerthFixed = default(bool?), DateTime? etdBerth = default(DateTime?), bool? etdBerthFixed = default(bool?), DateTime? lockTime = default(DateTime?), bool? lockTimeFixed = default(bool?), DateTime? zoneEntry = default(DateTime?), bool? zoneEntryFixed = default(bool?), DateTime? operationsStart = default(DateTime?), DateTime? operationsEnd = default(DateTime?), string remarks = default(string), int shipcallId = default(int), int participantId = default(int), DateTime created = default(DateTime), DateTime? modified = default(DateTime?)) public Times(int id = default(int), DateTime? etaBerth = default(DateTime?), bool? etaBerthFixed = default(bool?), DateTime? etdBerth = default(DateTime?), bool? etdBerthFixed = default(bool?), DateTime? lockTime = default(DateTime?), bool? lockTimeFixed = default(bool?), DateTime? zoneEntry = default(DateTime?), bool? zoneEntryFixed = default(bool?), DateTime? operationsStart = default(DateTime?), DateTime? operationsEnd = default(DateTime?), string remarks = default(string), int shipcallId = default(int), int participantId = default(int), int? berthId = default(int?), string berthInfo = default(string), bool? pierSide = default(bool?), int? participantType = default(int?), DateTime created = default(DateTime), DateTime? modified = default(DateTime?))
{ {
this.ShipcallId = shipcallId; this.ShipcallId = shipcallId;
this.ParticipantId = participantId; this.ParticipantId = participantId;
@ -6894,6 +6943,10 @@ namespace BreCalClient.misc.Model
this.OperationsStart = operationsStart; this.OperationsStart = operationsStart;
this.OperationsEnd = operationsEnd; this.OperationsEnd = operationsEnd;
this.Remarks = remarks; this.Remarks = remarks;
this.BerthId = berthId;
this.BerthInfo = berthInfo;
this.PierSide = pierSide;
this.ParticipantType = participantType;
this.Created = created; this.Created = created;
this.Modified = modified; this.Modified = modified;
} }
@ -6968,6 +7021,26 @@ namespace BreCalClient.misc.Model
[DataMember(Name = "participant_id", IsRequired = true, EmitDefaultValue = true)] [DataMember(Name = "participant_id", IsRequired = true, EmitDefaultValue = true)]
public int ParticipantId { get; set; } public int ParticipantId { get; set; }
/// <summary> /// <summary>
/// Gets or Sets BerthId
/// </summary>
[DataMember(Name = "berth_id", EmitDefaultValue = true)]
public int? BerthId { get; set; }
/// <summary>
/// Gets or Sets BerthInfo
/// </summary>
[DataMember(Name = "berth_info", EmitDefaultValue = true)]
public string BerthInfo { get; set; }
/// <summary>
/// Gets or Sets PierSide
/// </summary>
[DataMember(Name = "pier_side", EmitDefaultValue = true)]
public bool? PierSide { get; set; }
/// <summary>
/// Gets or Sets ParticipantType
/// </summary>
[DataMember(Name = "participant_type", EmitDefaultValue = true)]
public int? ParticipantType { get; set; }
/// <summary>
/// Gets or Sets Created /// Gets or Sets Created
/// </summary> /// </summary>
[DataMember(Name = "created", EmitDefaultValue = true)] [DataMember(Name = "created", EmitDefaultValue = true)]
@ -6999,6 +7072,10 @@ namespace BreCalClient.misc.Model
sb.Append(" Remarks: ").Append(Remarks).Append("\n"); sb.Append(" Remarks: ").Append(Remarks).Append("\n");
sb.Append(" ShipcallId: ").Append(ShipcallId).Append("\n"); sb.Append(" ShipcallId: ").Append(ShipcallId).Append("\n");
sb.Append(" ParticipantId: ").Append(ParticipantId).Append("\n"); sb.Append(" ParticipantId: ").Append(ParticipantId).Append("\n");
sb.Append(" BerthId: ").Append(BerthId).Append("\n");
sb.Append(" BerthInfo: ").Append(BerthInfo).Append("\n");
sb.Append(" PierSide: ").Append(PierSide).Append("\n");
sb.Append(" ParticipantType: ").Append(ParticipantType).Append("\n");
sb.Append(" Created: ").Append(Created).Append("\n"); sb.Append(" Created: ").Append(Created).Append("\n");
sb.Append(" Modified: ").Append(Modified).Append("\n"); sb.Append(" Modified: ").Append(Modified).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
@ -7100,6 +7177,26 @@ namespace BreCalClient.misc.Model
this.ParticipantId == input.ParticipantId || this.ParticipantId == input.ParticipantId ||
this.ParticipantId.Equals(input.ParticipantId) this.ParticipantId.Equals(input.ParticipantId)
) && ) &&
(
this.BerthId == input.BerthId ||
(this.BerthId != null &&
this.BerthId.Equals(input.BerthId))
) &&
(
this.BerthInfo == input.BerthInfo ||
(this.BerthInfo != null &&
this.BerthInfo.Equals(input.BerthInfo))
) &&
(
this.PierSide == input.PierSide ||
(this.PierSide != null &&
this.PierSide.Equals(input.PierSide))
) &&
(
this.ParticipantType == input.ParticipantType ||
(this.ParticipantType != null &&
this.ParticipantType.Equals(input.ParticipantType))
) &&
( (
this.Created == input.Created || this.Created == input.Created ||
(this.Created != null && (this.Created != null &&
@ -7167,6 +7264,22 @@ namespace BreCalClient.misc.Model
} }
hashCode = (hashCode * 59) + this.ShipcallId.GetHashCode(); hashCode = (hashCode * 59) + this.ShipcallId.GetHashCode();
hashCode = (hashCode * 59) + this.ParticipantId.GetHashCode(); hashCode = (hashCode * 59) + this.ParticipantId.GetHashCode();
if (this.BerthId != null)
{
hashCode = (hashCode * 59) + this.BerthId.GetHashCode();
}
if (this.BerthInfo != null)
{
hashCode = (hashCode * 59) + this.BerthInfo.GetHashCode();
}
if (this.PierSide != null)
{
hashCode = (hashCode * 59) + this.PierSide.GetHashCode();
}
if (this.ParticipantType != null)
{
hashCode = (hashCode * 59) + this.ParticipantType.GetHashCode();
}
if (this.Created != null) if (this.Created != null)
{ {
hashCode = (hashCode * 59) + this.Created.GetHashCode(); hashCode = (hashCode * 59) + this.Created.GetHashCode();
@ -7200,7 +7313,7 @@ namespace BreCalClient.misc.Model
* *
* Administer DEBRE ship calls, times and notifications * Administer DEBRE ship calls, times and notifications
* *
* The version of the OpenAPI document: 0.5.0 * The version of the OpenAPI document: 0.6.0
* Contact: info@textbausteine.net * Contact: info@textbausteine.net
* Generated by: https://github.com/openapitools/openapi-generator.git * Generated by: https://github.com/openapitools/openapi-generator.git
*/ */
@ -7379,5 +7492,6 @@ namespace BreCalClient.misc.Model
yield break; yield break;
} }
} }
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
} }

View File

@ -1,6 +1,6 @@
openapi: "3.0.0" openapi: "3.0.0"
info: info:
version: "0.5.0" version: "0.6.0"
title: "Bremen calling API" title: "Bremen calling API"
description: Administer DEBRE ship calls, times and notifications description: Administer DEBRE ship calls, times and notifications
termsOfService: "https://www.bsmd.de/" # url to terms page termsOfService: "https://www.bsmd.de/" # url to terms page
@ -14,7 +14,7 @@ info:
servers: servers:
# tutorial: https://idratherbewriting.com/learnapidoc/pubapis_openapi_step3_servers_object.html # tutorial: https://idratherbewriting.com/learnapidoc/pubapis_openapi_step3_servers_object.html
- url: "https://brecal.bsmd-emswe.eu/" - url: "https://brecaltest.bsmd-emswe.eu/"
description: "Test server hosted on vcup" description: "Test server hosted on vcup"
paths: paths:
@ -475,6 +475,18 @@ components:
type: integer type: integer
participant_id: participant_id:
type: integer type: integer
berth_id:
type: integer
nullable: true
berth_info:
type: string
nullable: true
pier_side:
type: boolean
nullable: true
participant_type:
type: integer
nullable: true
created: created:
type: string type: string
format: date-time format: date-time
@ -622,6 +634,9 @@ components:
maxLength: 64 maxLength: 64
type: type:
type: integer type: integer
flags:
type: integer
nullable: true
created: created:
type: string type: string
format: date-time format: date-time

View File

@ -1,18 +1,30 @@
-- -------------------------------------------------------- CREATE DATABASE IF NOT EXISTS `bremen_calling` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
-- Host: 127.0.0.1 USE `bremen_calling`;
-- Server Version: 8.0.34-0ubuntu0.22.04.1 - (Ubuntu) -- MySQL dump 10.13 Distrib 8.0.33, for Win64 (x86_64)
-- Server Betriebssystem: Linux --
-- HeidiSQL Version: 10.2.0.5599 -- Host: localhost Database: bremen_calling
-- -------------------------------------------------------- -- ------------------------------------------------------
-- Server version 8.0.34-0ubuntu0.22.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!50503 SET NAMES utf8mb4 */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-- Exportiere Struktur von Tabelle bremen_calling.berth --
CREATE TABLE IF NOT EXISTS `berth` ( -- Table structure for table `berth`
--
DROP TABLE IF EXISTS `berth`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `berth` (
`id` int unsigned NOT NULL AUTO_INCREMENT, `id` int unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(128) DEFAULT NULL COMMENT 'Descriptive name', `name` varchar(128) DEFAULT NULL COMMENT 'Descriptive name',
`participant_id` int unsigned DEFAULT NULL COMMENT 'If berth belongs to a participant, reference it here', `participant_id` int unsigned DEFAULT NULL COMMENT 'If berth belongs to a participant, reference it here',
@ -23,12 +35,17 @@ CREATE TABLE IF NOT EXISTS `berth` (
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `FK_BERTH_PART` (`participant_id`), KEY `FK_BERTH_PART` (`participant_id`),
CONSTRAINT `FK_BERTH_PART` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`) CONSTRAINT `FK_BERTH_PART` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Berth of ship for a ship call'; ) ENGINE=InnoDB AUTO_INCREMENT=195 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Berth of ship for a ship call';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Daten Export vom Benutzer nicht ausgewählt --
-- Table structure for table `notification`
--
-- Exportiere Struktur von Tabelle bremen_calling.notification DROP TABLE IF EXISTS `notification`;
CREATE TABLE IF NOT EXISTS `notification` ( /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `notification` (
`id` int unsigned NOT NULL AUTO_INCREMENT, `id` int unsigned NOT NULL AUTO_INCREMENT,
`times_id` int unsigned NOT NULL COMMENT 'times record that caused the notification', `times_id` int unsigned NOT NULL COMMENT 'times record that caused the notification',
`participant_id` int unsigned NOT NULL COMMENT 'participant ref', `participant_id` int unsigned NOT NULL COMMENT 'participant ref',
@ -44,11 +61,16 @@ CREATE TABLE IF NOT EXISTS `notification` (
CONSTRAINT `FK_NOT_PART` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`), CONSTRAINT `FK_NOT_PART` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`),
CONSTRAINT `FK_NOT_TIMES` FOREIGN KEY (`times_id`) REFERENCES `times` (`id`) CONSTRAINT `FK_NOT_TIMES` FOREIGN KEY (`times_id`) REFERENCES `times` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='An entry corresponds to an alarm given by a violated rule during times update'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='An entry corresponds to an alarm given by a violated rule during times update';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Daten Export vom Benutzer nicht ausgewählt --
-- Table structure for table `participant`
--
-- Exportiere Struktur von Tabelle bremen_calling.participant DROP TABLE IF EXISTS `participant`;
CREATE TABLE IF NOT EXISTS `participant` ( /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `participant` (
`id` int unsigned NOT NULL AUTO_INCREMENT, `id` int unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(128) DEFAULT NULL, `name` varchar(128) DEFAULT NULL,
`street` varchar(128) DEFAULT NULL, `street` varchar(128) DEFAULT NULL,
@ -60,12 +82,17 @@ CREATE TABLE IF NOT EXISTS `participant` (
`modified` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, `modified` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`deleted` bit(1) DEFAULT b'0', `deleted` bit(1) DEFAULT b'0',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='An organization taking part'; ) ENGINE=InnoDB AUTO_INCREMENT=136 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='An organization taking part';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Daten Export vom Benutzer nicht ausgewählt --
-- Table structure for table `role`
--
-- Exportiere Struktur von Tabelle bremen_calling.role DROP TABLE IF EXISTS `role`;
CREATE TABLE IF NOT EXISTS `role` ( /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `role` (
`id` int unsigned NOT NULL AUTO_INCREMENT, `id` int unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT '0' COMMENT 'unique role name', `name` varchar(50) NOT NULL DEFAULT '0' COMMENT 'unique role name',
`description` varchar(255) DEFAULT '0' COMMENT 'role description', `description` varchar(255) DEFAULT '0' COMMENT 'role description',
@ -74,11 +101,16 @@ CREATE TABLE IF NOT EXISTS `role` (
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`) UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='logical group of securables for one or more user'; ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='logical group of securables for one or more user';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Daten Export vom Benutzer nicht ausgewählt --
-- Table structure for table `role_securable_map`
--
-- Exportiere Struktur von Tabelle bremen_calling.role_securable_map DROP TABLE IF EXISTS `role_securable_map`;
CREATE TABLE IF NOT EXISTS `role_securable_map` ( /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `role_securable_map` (
`id` int unsigned NOT NULL AUTO_INCREMENT, `id` int unsigned NOT NULL AUTO_INCREMENT,
`role_id` int unsigned NOT NULL, `role_id` int unsigned NOT NULL,
`securable_id` int unsigned NOT NULL, `securable_id` int unsigned NOT NULL,
@ -90,11 +122,16 @@ CREATE TABLE IF NOT EXISTS `role_securable_map` (
CONSTRAINT `FK_ROLE_SECURABLE` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`), CONSTRAINT `FK_ROLE_SECURABLE` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`),
CONSTRAINT `FK_SECURABLE_ROLE` FOREIGN KEY (`securable_id`) REFERENCES `securable` (`id`) CONSTRAINT `FK_SECURABLE_ROLE` FOREIGN KEY (`securable_id`) REFERENCES `securable` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Assigns securables to roles'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Assigns securables to roles';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Daten Export vom Benutzer nicht ausgewählt --
-- Table structure for table `securable`
--
-- Exportiere Struktur von Tabelle bremen_calling.securable DROP TABLE IF EXISTS `securable`;
CREATE TABLE IF NOT EXISTS `securable` ( /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `securable` (
`id` int unsigned NOT NULL AUTO_INCREMENT, `id` int unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT '', `name` varchar(50) NOT NULL DEFAULT '',
`created` datetime DEFAULT CURRENT_TIMESTAMP, `created` datetime DEFAULT CURRENT_TIMESTAMP,
@ -102,11 +139,16 @@ CREATE TABLE IF NOT EXISTS `securable` (
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`) UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Actual permission on a single(!) feature or operation'; ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Actual permission on a single(!) feature or operation';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Daten Export vom Benutzer nicht ausgewählt --
-- Table structure for table `ship`
--
-- Exportiere Struktur von Tabelle bremen_calling.ship DROP TABLE IF EXISTS `ship`;
CREATE TABLE IF NOT EXISTS `ship` ( /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `ship` (
`id` int unsigned NOT NULL AUTO_INCREMENT, `id` int unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) DEFAULT NULL, `name` varchar(64) DEFAULT NULL,
`imo` int DEFAULT NULL, `imo` int DEFAULT NULL,
@ -123,12 +165,17 @@ CREATE TABLE IF NOT EXISTS `ship` (
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `FK_SHIP_PARTICIPANT` (`participant_id`), KEY `FK_SHIP_PARTICIPANT` (`participant_id`),
CONSTRAINT `FK_SHIP_PARTICIPANT` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`) CONSTRAINT `FK_SHIP_PARTICIPANT` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-- Daten Export vom Benutzer nicht ausgewählt --
-- Table structure for table `shipcall`
--
-- Exportiere Struktur von Tabelle bremen_calling.shipcall DROP TABLE IF EXISTS `shipcall`;
CREATE TABLE IF NOT EXISTS `shipcall` ( /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `shipcall` (
`id` int unsigned NOT NULL AUTO_INCREMENT, `id` int unsigned NOT NULL AUTO_INCREMENT,
`ship_id` int unsigned DEFAULT NULL, `ship_id` int unsigned DEFAULT NULL,
`type` tinyint DEFAULT NULL, `type` tinyint DEFAULT NULL,
@ -161,12 +208,17 @@ CREATE TABLE IF NOT EXISTS `shipcall` (
CONSTRAINT `FK_SHIPCALL_BERTH_ARRIVAL` FOREIGN KEY (`arrival_berth_id`) REFERENCES `berth` (`id`), CONSTRAINT `FK_SHIPCALL_BERTH_ARRIVAL` FOREIGN KEY (`arrival_berth_id`) REFERENCES `berth` (`id`),
CONSTRAINT `FK_SHIPCALL_BERTH_DEPARTURE` FOREIGN KEY (`departure_berth_id`) REFERENCES `berth` (`id`), CONSTRAINT `FK_SHIPCALL_BERTH_DEPARTURE` FOREIGN KEY (`departure_berth_id`) REFERENCES `berth` (`id`),
CONSTRAINT `FK_SHIPCALL_SHIP` FOREIGN KEY (`ship_id`) REFERENCES `ship` (`id`) CONSTRAINT `FK_SHIPCALL_SHIP` FOREIGN KEY (`ship_id`) REFERENCES `ship` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Incoming, outgoing or moving to another berth'; ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Incoming, outgoing or moving to another berth';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Daten Export vom Benutzer nicht ausgewählt --
-- Table structure for table `shipcall_participant_map`
--
-- Exportiere Struktur von Tabelle bremen_calling.shipcall_participant_map DROP TABLE IF EXISTS `shipcall_participant_map`;
CREATE TABLE IF NOT EXISTS `shipcall_participant_map` ( /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `shipcall_participant_map` (
`id` int NOT NULL AUTO_INCREMENT, `id` int NOT NULL AUTO_INCREMENT,
`shipcall_id` int unsigned DEFAULT NULL, `shipcall_id` int unsigned DEFAULT NULL,
`participant_id` int unsigned DEFAULT NULL, `participant_id` int unsigned DEFAULT NULL,
@ -177,12 +229,17 @@ CREATE TABLE IF NOT EXISTS `shipcall_participant_map` (
KEY `FK_MAP_SHIPCALL_PARTICIPANT` (`participant_id`), KEY `FK_MAP_SHIPCALL_PARTICIPANT` (`participant_id`),
CONSTRAINT `FK_MAP_PARTICIPANT_SHIPCALL` FOREIGN KEY (`shipcall_id`) REFERENCES `shipcall` (`id`), CONSTRAINT `FK_MAP_PARTICIPANT_SHIPCALL` FOREIGN KEY (`shipcall_id`) REFERENCES `shipcall` (`id`),
CONSTRAINT `FK_MAP_SHIPCALL_PARTICIPANT` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`) CONSTRAINT `FK_MAP_SHIPCALL_PARTICIPANT` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Associates a participant with a shipcall'; ) ENGINE=InnoDB AUTO_INCREMENT=82 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Associates a participant with a shipcall';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Daten Export vom Benutzer nicht ausgewählt --
-- Table structure for table `shipcall_tug_map`
--
-- Exportiere Struktur von Tabelle bremen_calling.shipcall_tug_map DROP TABLE IF EXISTS `shipcall_tug_map`;
CREATE TABLE IF NOT EXISTS `shipcall_tug_map` ( /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `shipcall_tug_map` (
`id` int NOT NULL AUTO_INCREMENT, `id` int NOT NULL AUTO_INCREMENT,
`shipcall_id` int unsigned NOT NULL COMMENT 'Ref to ship call', `shipcall_id` int unsigned NOT NULL COMMENT 'Ref to ship call',
`ship_id` int unsigned NOT NULL COMMENT 'Ref to ship (that is a tug)', `ship_id` int unsigned NOT NULL COMMENT 'Ref to ship (that is a tug)',
@ -194,11 +251,16 @@ CREATE TABLE IF NOT EXISTS `shipcall_tug_map` (
CONSTRAINT `FK_SCT_SHIP` FOREIGN KEY (`ship_id`) REFERENCES `ship` (`id`), CONSTRAINT `FK_SCT_SHIP` FOREIGN KEY (`ship_id`) REFERENCES `ship` (`id`),
CONSTRAINT `FK_SCT_SHIPCALL` FOREIGN KEY (`shipcall_id`) REFERENCES `shipcall` (`id`) CONSTRAINT `FK_SCT_SHIPCALL` FOREIGN KEY (`shipcall_id`) REFERENCES `shipcall` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Mapping table that assigns tugs to a ship call'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Mapping table that assigns tugs to a ship call';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Daten Export vom Benutzer nicht ausgewählt --
-- Table structure for table `times`
--
-- Exportiere Struktur von Tabelle bremen_calling.times DROP TABLE IF EXISTS `times`;
CREATE TABLE IF NOT EXISTS `times` ( /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `times` (
`id` int unsigned NOT NULL AUTO_INCREMENT, `id` int unsigned NOT NULL AUTO_INCREMENT,
`eta_berth` datetime DEFAULT NULL, `eta_berth` datetime DEFAULT NULL,
`eta_berth_fixed` bit(1) DEFAULT NULL, `eta_berth_fixed` bit(1) DEFAULT NULL,
@ -215,16 +277,27 @@ CREATE TABLE IF NOT EXISTS `times` (
`participant_id` int unsigned NOT NULL, `participant_id` int unsigned NOT NULL,
`created` datetime DEFAULT CURRENT_TIMESTAMP, `created` datetime DEFAULT CURRENT_TIMESTAMP,
`modified` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, `modified` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`berth_id` int unsigned DEFAULT NULL,
`berth_info` varchar(512) DEFAULT NULL,
`pier_side` bit(1) DEFAULT NULL,
`participant_type` int unsigned DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `FK_TIME_SHIPCALL` (`shipcall_id`), KEY `FK_TIME_SHIPCALL` (`shipcall_id`),
KEY `FK_TIME_PART` (`participant_id`), KEY `FK_TIME_PART` (`participant_id`) /*!80000 INVISIBLE */,
KEY `FK_TIME_BERTH` (`berth_id`) /*!80000 INVISIBLE */,
CONSTRAINT `FK_TIME_BERTH` FOREIGN KEY (`berth_id`) REFERENCES `berth` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `FK_TIME_PART` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`) CONSTRAINT `FK_TIME_PART` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='the planned time for the participants work'; ) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='the planned time for the participants work';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Daten Export vom Benutzer nicht ausgewählt --
-- Table structure for table `user`
--
-- Exportiere Struktur von Tabelle bremen_calling.user DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` ( /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user` (
`id` int unsigned NOT NULL AUTO_INCREMENT, `id` int unsigned NOT NULL AUTO_INCREMENT,
`participant_id` int unsigned DEFAULT NULL, `participant_id` int unsigned DEFAULT NULL,
`first_name` varchar(45) DEFAULT NULL, `first_name` varchar(45) DEFAULT NULL,
@ -239,12 +312,17 @@ CREATE TABLE IF NOT EXISTS `user` (
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `FK_USER_PART` (`participant_id`), KEY `FK_USER_PART` (`participant_id`),
CONSTRAINT `FK_USER_PART` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`) CONSTRAINT `FK_USER_PART` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='member of a participant'; ) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='member of a participant';
/*!40101 SET character_set_client = @saved_cs_client */;
-- Daten Export vom Benutzer nicht ausgewählt --
-- Table structure for table `user_role_map`
--
-- Exportiere Struktur von Tabelle bremen_calling.user_role_map DROP TABLE IF EXISTS `user_role_map`;
CREATE TABLE IF NOT EXISTS `user_role_map` ( /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_role_map` (
`id` int unsigned NOT NULL AUTO_INCREMENT, `id` int unsigned NOT NULL AUTO_INCREMENT,
`user_id` int unsigned NOT NULL DEFAULT '0', `user_id` int unsigned NOT NULL DEFAULT '0',
`role_id` int unsigned NOT NULL DEFAULT '0', `role_id` int unsigned NOT NULL DEFAULT '0',
@ -256,9 +334,15 @@ CREATE TABLE IF NOT EXISTS `user_role_map` (
CONSTRAINT `FK_ROLE_USER` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`), CONSTRAINT `FK_ROLE_USER` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`),
CONSTRAINT `FK_USER_ROLE` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) CONSTRAINT `FK_USER_ROLE` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Assigns a user to a role'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Assigns a user to a role';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-- Daten Export vom Benutzer nicht ausgewählt /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-09-05 10:36:12

View File

@ -1,136 +1,155 @@
-- -------------------------------------------------------- CREATE DATABASE IF NOT EXISTS `bremen_calling` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
-- Host: 127.0.0.1 USE `bremen_calling`;
-- Server Version: 8.0.34-0ubuntu0.22.04.1 - (Ubuntu) -- MySQL dump 10.13 Distrib 8.0.33, for Win64 (x86_64)
-- Server Betriebssystem: Linux --
-- HeidiSQL Version: 10.2.0.5599 -- Host: localhost Database: bremen_calling
-- -------------------------------------------------------- -- ------------------------------------------------------
-- Server version 8.0.34-0ubuntu0.22.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!50503 SET NAMES utf8mb4 */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-- Exportiere Daten aus Tabelle bremen_calling.berth: ~3 rows (ungefähr) --
-- Dumping data for table `berth`
--
LOCK TABLES `berth` WRITE;
/*!40000 ALTER TABLE `berth` DISABLE KEYS */; /*!40000 ALTER TABLE `berth` DISABLE KEYS */;
INSERT INTO `berth` (`id`, `name`, `participant_id`, `lock`, `created`, `modified`, `deleted`) VALUES INSERT INTO `berth` VALUES (1,'Roland Mühle',NULL,NULL,'2023-06-26 14:01:40',NULL,_binary '\0'),(2,'Stahlwerk',NULL,NULL,'2023-06-26 14:01:40',NULL,_binary '\0'),(3,'Kellogs',NULL,NULL,'2023-06-26 14:01:40',NULL,_binary '\0'),(139,'Avangard Dalben',110,NULL,'2023-08-21 08:23:35',NULL,_binary '\0'),(140,'Avangard Kaje',110,NULL,'2023-08-21 08:23:35',NULL,_binary '\0'),(141,'Baustelle 2',111,NULL,'2023-08-21 08:23:35',NULL,_binary '\0'),(142,'BHW',112,NULL,'2023-08-21 08:23:36',NULL,_binary '\0'),(143,'Dalben 2',111,NULL,'2023-08-21 08:23:36',NULL,_binary '\0'),(144,'Dalben 3',111,NULL,'2023-08-21 08:23:36',NULL,_binary '\0'),(145,'Egerland Kaje',113,NULL,'2023-08-21 08:23:36',NULL,_binary '\0'),(146,'Getreideanlage Pier A',114,NULL,'2023-08-21 08:23:37',NULL,_binary '\0'),(147,'Getreideanlage Pier D',114,NULL,'2023-08-21 08:23:37',NULL,_binary '\0'),(148,'Griepe, Bnp Paribas',115,NULL,'2023-08-21 08:23:37',NULL,_binary '\0'),(149,'Hafen F',116,NULL,'2023-08-21 08:23:37',NULL,_binary '\0'),(150,'Hansa Landhandel',117,NULL,'2023-08-21 08:23:38',NULL,_binary '\0'),(151,'Hansa Melasse',118,NULL,'2023-08-21 08:23:38',NULL,_binary '\0'),(152,'Hansa-Mühle',119,NULL,'2023-08-21 08:23:38',NULL,_binary '\0'),(153,'Heidelberger Sand',120,NULL,'2023-08-21 08:23:38',NULL,_binary '\0'),(154,'HGM Bunkerstation',121,NULL,'2023-08-21 08:23:39',NULL,_binary '\0'),(155,'HGM Tanklager',121,NULL,'2023-08-21 08:23:39',NULL,_binary '\0'),(156,'Kap Horn Innen',122,NULL,'2023-08-21 08:23:39',NULL,_binary '\0'),(157,'Kap Horn Weser',122,NULL,'2023-08-21 08:23:39',NULL,_binary '\0'),(158,'Kap Horn Weser Bremer Recycling',123,NULL,'2023-08-21 08:23:40',NULL,_binary '\0'),(159,'Kap Horn Weser -GHK-',124,NULL,'2023-08-21 08:23:40',NULL,_binary '\0'),(160,'Kohlenhafen 2',111,NULL,'2023-08-21 08:23:40',NULL,_binary '\0'),(161,'Kraftwerk Farge',125,NULL,'2023-08-21 08:23:40',NULL,_binary '\0'),(162,'Kraftwerk Industriehafen',126,NULL,'2023-08-21 08:23:41',NULL,_binary '\0'),(163,'Lankenau B',111,NULL,'2023-08-21 08:23:41',NULL,_binary '\0'),(164,'Mibau, Bnp Paribas',127,NULL,'2023-08-21 08:23:41',NULL,_binary '\0'),(165,'Müller Weser',114,NULL,'2023-08-21 08:23:41',NULL,_binary '\0'),(166,'Osterort 5 Aussen',111,NULL,'2023-08-21 08:23:41',NULL,_binary '\0'),(167,'Pier 2 Anleger',128,NULL,'2023-08-21 08:23:42',NULL,_binary '\0'),(168,'Pier III',129,NULL,'2023-08-21 08:23:42',NULL,_binary '\0'),(169,'Plump',130,NULL,'2023-08-21 08:23:42',NULL,_binary '\0'),(170,'Rolandmühle',131,NULL,'2023-08-21 08:23:42',NULL,_binary '\0'),(171,'Schleusenvorhafen Nord',111,NULL,'2023-08-21 08:23:43',NULL,_binary '\0'),(172,'Schrägpier',4,NULL,'2023-08-21 08:23:43',NULL,_binary '\0'),(173,'Schuppen 19',132,NULL,'2023-08-21 08:23:43',NULL,_binary '\0'),(174,'Schuppen 20',4,NULL,'2023-08-21 08:23:43',NULL,_binary '\0'),(175,'Schuppen 21',4,NULL,'2023-08-21 08:23:43',NULL,_binary '\0'),(176,'Schuppen 22',4,NULL,'2023-08-21 08:23:43',NULL,_binary '\0'),(177,'Schuppen 23',4,NULL,'2023-08-21 08:23:44',NULL,_binary '\0'),(178,'Schuppen 24',4,NULL,'2023-08-21 08:23:44',NULL,_binary '\0'),(179,'Seedalben Dlg-Seite',111,NULL,'2023-08-21 08:23:44',NULL,_binary '\0'),(180,'Seedalben Kw-Seite',111,NULL,'2023-08-21 08:23:44',NULL,_binary '\0'),(181,'Seehausen Spüler',111,NULL,'2023-08-21 08:23:44',NULL,_binary '\0'),(182,'Tankschiffliegeplatz 1',111,NULL,'2023-08-21 08:23:44',NULL,_binary '\0'),(183,'Tankschiffliegeplatz 2',111,NULL,'2023-08-21 08:23:44',NULL,_binary '\0'),(184,'Terminal 1',10,NULL,'2023-08-21 08:23:44',NULL,_binary '\0'),(185,'Terminal 2',10,NULL,'2023-08-21 08:23:45',NULL,_binary '\0'),(186,'Terminal 3',10,NULL,'2023-08-21 08:23:45',NULL,_binary '\0'),(187,'Terminal 4',10,NULL,'2023-08-21 08:23:45',NULL,_binary '\0'),(188,'TSR Recycling',133,NULL,'2023-08-21 08:23:45',NULL,_binary '\0'),(189,'Viehbrücke',111,NULL,'2023-08-21 08:23:45',NULL,_binary '\0'),(190,'Vulkan Industriegebiet',120,NULL,'2023-08-21 08:23:46',NULL,_binary '\0'),(191,'Weserbahnhof',132,NULL,'2023-08-21 08:23:46',NULL,_binary '\0'),(192,'Weser-Petrol Holzhafen',134,NULL,'2023-08-21 08:23:46',NULL,_binary '\0'),(193,'Weser-Petrol Kalihafen',134,NULL,'2023-08-21 08:23:46',NULL,_binary '\0'),(194,'Wesertanking',135,NULL,'2023-08-21 08:23:46',NULL,_binary '\0');
(1, 'Roland Mühle', NULL, NULL, '2023-06-26 14:01:40', NULL, b'0'),
(2, 'Stahlwerk', NULL, NULL, '2023-06-26 14:01:40', NULL, b'0'),
(3, 'Kellogs', NULL, NULL, '2023-06-26 14:01:40', NULL, b'0');
/*!40000 ALTER TABLE `berth` ENABLE KEYS */; /*!40000 ALTER TABLE `berth` ENABLE KEYS */;
UNLOCK TABLES;
-- Exportiere Daten aus Tabelle bremen_calling.notification: ~0 rows (ungefähr) --
-- Dumping data for table `notification`
--
LOCK TABLES `notification` WRITE;
/*!40000 ALTER TABLE `notification` DISABLE KEYS */; /*!40000 ALTER TABLE `notification` DISABLE KEYS */;
/*!40000 ALTER TABLE `notification` ENABLE KEYS */; /*!40000 ALTER TABLE `notification` ENABLE KEYS */;
UNLOCK TABLES;
-- Exportiere Daten aus Tabelle bremen_calling.participant: ~11 rows (ungefähr) --
-- Dumping data for table `participant`
--
LOCK TABLES `participant` WRITE;
/*!40000 ALTER TABLE `participant` DISABLE KEYS */; /*!40000 ALTER TABLE `participant` DISABLE KEYS */;
INSERT INTO `participant` (`id`, `name`, `street`, `postal_code`, `city`, `type`, `flags`, `created`, `modified`, `deleted`) VALUES INSERT INTO `participant` VALUES (1,'Schick Informatik','Gottlieb-Daimler-Str. 8','73614','Schorndorf',1,42,'2023-04-17 07:18:19','2023-08-24 07:07:02',_binary '\0'),(2,'Lotsenbrüderschaft Weser 1','','','',4,0,'2023-08-10 07:07:41',NULL,_binary '\0'),(3,'Bremer Schiffsmeldedienst','Hafenkopf II / Überseetor 20','28217','Bremen',1,0,'2023-08-10 07:11:10',NULL,_binary '\0'),(4,'BLG Cargo Logistics GmbH','','','',2,0,'2023-08-10 07:14:40',NULL,_binary '\0'),(5,'Schiffsmakler-Verband für Küsten und Seeschiffsbefrachter e.V.','','','',8,0,'2023-08-10 07:15:56',NULL,_binary '\0'),(6,'RMS Rhenus Maritime Services GmbH','','','',8,0,'2023-08-10 07:19:29',NULL,_binary '\0'),(7,'J.MÜLLER Weser GmbH & Co. KG','','','',10,0,'2023-08-10 07:21:43','2023-08-10 08:47:59',_binary '\0'),(8,'Schiffahrtskontor Detra GmbH & Co.KG','','','',8,0,'2023-08-10 07:23:04',NULL,_binary '\0'),(9,'Boluda Deutschland GmbH','','','',64,0,'2023-08-10 07:24:18',NULL,_binary '\0'),(10,'Weserport GmbH','','','',10,0,'2023-08-10 07:26:42','2023-08-10 08:48:19',_binary '\0'),(11,'Port Authority Bremen','','','',32,0,'2023-08-10 07:28:11',NULL,_binary '\0'),(12,'Nordenia Frachtkontor GmbH','','','',8,0,'2023-08-21 06:52:04',NULL,_binary '\0'),(15,'Extern','','','',0,0,'2023-08-21 06:55:18',NULL,_binary '\0'),(16,'FESTMA Vertäugesellschaft mbH','','','',16,0,'2023-08-21 06:57:23',NULL,_binary '\0'),(110,'Avangard',NULL,NULL,NULL,2,0,'2023-08-21 08:23:35','2023-08-21 10:04:21',_binary '\0'),(111,'Bremenports',NULL,NULL,NULL,2,0,'2023-08-21 08:23:35','2023-08-21 10:04:21',_binary '\0'),(112,'Bremer Holzwerke',NULL,NULL,NULL,2,0,'2023-08-21 08:23:36','2023-08-21 10:04:21',_binary '\0'),(113,'Egerland',NULL,NULL,NULL,2,0,'2023-08-21 08:23:36','2023-08-21 10:04:21',_binary '\0'),(114,'Müller J. Bremen',NULL,NULL,NULL,2,0,'2023-08-21 08:23:37','2023-08-21 10:04:21',_binary '\0'),(115,'Griepe',NULL,NULL,NULL,2,0,'2023-08-21 08:23:37','2023-08-21 10:04:21',_binary '\0'),(116,'Mseven Real Estate',NULL,NULL,NULL,2,0,'2023-08-21 08:23:37','2023-08-21 10:04:21',_binary '\0'),(117,'Hansa Landhandel',NULL,NULL,NULL,2,0,'2023-08-21 08:23:38','2023-08-21 10:04:21',_binary '\0'),(118,'Hansa Melasse',NULL,NULL,NULL,2,0,'2023-08-21 08:23:38','2023-08-21 10:04:21',_binary '\0'),(119,'Hansa-Mühle',NULL,NULL,NULL,2,0,'2023-08-21 08:23:38','2023-08-21 10:04:21',_binary '\0'),(120,'Heidelberger Sand Und Kies Gmbh',NULL,NULL,NULL,2,0,'2023-08-21 08:23:38','2023-08-21 10:04:21',_binary '\0'),(121,'HGM',NULL,NULL,NULL,2,0,'2023-08-21 08:23:39','2023-08-21 10:04:21',_binary '\0'),(122,'Kap-Horn Logistics Gmbh',NULL,NULL,NULL,2,0,'2023-08-21 08:23:39','2023-08-21 10:04:21',_binary '\0'),(123,'Bremer Recycling Kontor',NULL,NULL,NULL,2,0,'2023-08-21 08:23:39','2023-08-21 10:04:21',_binary '\0'),(124,'GHK',NULL,NULL,NULL,2,0,'2023-08-21 08:23:40','2023-08-21 10:04:21',_binary '\0'),(125,'Kraftwerk Farge Engie Gmbh & Co. KG',NULL,NULL,NULL,2,0,'2023-08-21 08:23:40','2023-08-21 10:04:21',_binary '\0'),(126,'Swb Erzeugung',NULL,NULL,NULL,2,0,'2023-08-21 08:23:40','2023-08-21 10:04:21',_binary '\0'),(127,'Mibau',NULL,NULL,NULL,2,0,'2023-08-21 08:23:41','2023-08-21 10:04:21',_binary '\0'),(128,'SWG',NULL,NULL,NULL,2,0,'2023-08-21 08:23:41','2023-08-21 10:04:21',_binary '\0'),(129,'Umweltschutz Nord Ganderkesee',NULL,NULL,NULL,2,0,'2023-08-21 08:23:42','2023-08-21 10:04:21',_binary '\0'),(130,'Nehlsen Industrieservice Gmbh & Co. KG',NULL,NULL,NULL,2,0,'2023-08-21 08:23:42','2023-08-21 10:04:21',_binary '\0'),(131,'Rolandmühle',NULL,NULL,NULL,2,0,'2023-08-21 08:23:42','2023-08-21 10:04:21',_binary '\0'),(132,'Wfb',NULL,NULL,NULL,2,0,'2023-08-21 08:23:43','2023-08-21 10:04:21',_binary '\0'),(133,'TSR',NULL,NULL,NULL,2,0,'2023-08-21 08:23:45','2023-08-21 10:04:21',_binary '\0'),(134,'Weser-Petrol',NULL,NULL,NULL,2,0,'2023-08-21 08:23:46','2023-08-21 10:04:21',_binary '\0'),(135,'Wesertanking',NULL,NULL,NULL,2,0,'2023-08-21 08:23:46','2023-08-21 10:04:21',_binary '\0');
(1, 'Schick Informatik', 'Gottlieb-Daimler-Str. 8', '73614', 'Schorndorf', 1, 42, '2023-04-17 07:18:19', '2023-08-07 11:35:37', b'0'),
(2, 'Lotsenbrüderschaft Weser 1', '', '', '', 4, 0, '2023-08-10 07:07:41', NULL, b'0'),
(3, 'Bremer Schiffsmeldedienst', 'Hafenkopf II / Überseetor 20', '28217', 'Bremen', 1, 0, '2023-08-10 07:11:10', NULL, b'0'),
(4, 'BLG Cargo Logistics GmbH', '', '', '', 2, 0, '2023-08-10 07:14:40', NULL, b'0'),
(5, 'Schiffsmakler-Verband für Küsten und Seeschiffsbefrachter e.V.', '', '', '', 8, 0, '2023-08-10 07:15:56', NULL, b'0'),
(6, 'RMS Rhenus Maritime Services GmbH', '', '', '', 8, 0, '2023-08-10 07:19:29', NULL, b'0'),
(7, 'J.MÜLLER Weser GmbH & Co. KG', '', '', '', 10, 0, '2023-08-10 07:21:43', '2023-08-10 08:47:59', b'0'),
(8, 'Schiffahrtskontor Detra GmbH & Co.KG', '', '', '', 8, 0, '2023-08-10 07:23:04', NULL, b'0'),
(9, 'Boluda Deutschland GmbH', '', '', '', 64, 0, '2023-08-10 07:24:18', NULL, b'0'),
(10, 'Weserport GmbH', '', '', '', 10, 0, '2023-08-10 07:26:42', '2023-08-10 08:48:19', b'0'),
(11, 'Port Authority Bremen', '', '', '', 32, 0, '2023-08-10 07:28:11', NULL, b'0');
/*!40000 ALTER TABLE `participant` ENABLE KEYS */; /*!40000 ALTER TABLE `participant` ENABLE KEYS */;
UNLOCK TABLES;
-- Exportiere Daten aus Tabelle bremen_calling.role: ~2 rows (ungefähr) --
-- Dumping data for table `role`
--
LOCK TABLES `role` WRITE;
/*!40000 ALTER TABLE `role` DISABLE KEYS */; /*!40000 ALTER TABLE `role` DISABLE KEYS */;
INSERT INTO `role` (`id`, `name`, `description`, `created`, `modified`) VALUES INSERT INTO `role` VALUES (1,'My first role','A very good description','2023-04-17 07:31:57',NULL),(2,'Another role','This role is very nice as well','2023-04-17 07:32:12',NULL);
(1, 'My first role', 'A very good description', '2023-04-17 07:31:57', NULL),
(2, 'Another role', 'This role is very nice as well', '2023-04-17 07:32:12', NULL);
/*!40000 ALTER TABLE `role` ENABLE KEYS */; /*!40000 ALTER TABLE `role` ENABLE KEYS */;
UNLOCK TABLES;
-- Exportiere Daten aus Tabelle bremen_calling.role_securable_map: ~0 rows (ungefähr) --
-- Dumping data for table `role_securable_map`
--
LOCK TABLES `role_securable_map` WRITE;
/*!40000 ALTER TABLE `role_securable_map` DISABLE KEYS */; /*!40000 ALTER TABLE `role_securable_map` DISABLE KEYS */;
/*!40000 ALTER TABLE `role_securable_map` ENABLE KEYS */; /*!40000 ALTER TABLE `role_securable_map` ENABLE KEYS */;
UNLOCK TABLES;
-- Exportiere Daten aus Tabelle bremen_calling.securable: ~2 rows (ungefähr) --
-- Dumping data for table `securable`
--
LOCK TABLES `securable` WRITE;
/*!40000 ALTER TABLE `securable` DISABLE KEYS */; /*!40000 ALTER TABLE `securable` DISABLE KEYS */;
INSERT INTO `securable` (`id`, `name`, `created`, `modified`) VALUES INSERT INTO `securable` VALUES (1,'First secure thing','2023-04-17 07:38:12',NULL),(2,'Another secure thing','2023-04-17 07:38:22',NULL);
(1, 'First secure thing', '2023-04-17 07:38:12', NULL),
(2, 'Another secure thing', '2023-04-17 07:38:22', NULL);
/*!40000 ALTER TABLE `securable` ENABLE KEYS */; /*!40000 ALTER TABLE `securable` ENABLE KEYS */;
UNLOCK TABLES;
-- Exportiere Daten aus Tabelle bremen_calling.ship: ~2 rows (ungefähr) --
-- Dumping data for table `ship`
--
LOCK TABLES `ship` WRITE;
/*!40000 ALTER TABLE `ship` DISABLE KEYS */; /*!40000 ALTER TABLE `ship` DISABLE KEYS */;
INSERT INTO `ship` (`id`, `name`, `imo`, `callsign`, `participant_id`, `length`, `width`, `is_tug`, `bollard_pull`, `eni`, `created`, `modified`, `deleted`) VALUES INSERT INTO `ship` VALUES (1,'Dicke Berta',1234567,'DEBE',1,100,20,_binary '\0',NULL,NULL,'2023-06-27 10:43:02',NULL,_binary '\0'),(2,'Maersk Neston',9632167,'9V3532',1,210.07,30.2,_binary '\0',NULL,NULL,'2023-07-27 12:34:13',NULL,_binary '\0'),(3,'AFRICAN HALCYON',9343613,NULL,NULL,177.13,28.4,_binary '\0',NULL,NULL,'2023-08-24 10:41:56',NULL,_binary '\0'),(4,'AMIKO',9125669,NULL,NULL,99.98,16.5,_binary '\0',NULL,NULL,'2023-08-24 10:42:17',NULL,_binary '\0'),(5,'ARKLOW BEACON',9638795,NULL,NULL,119.49,14.99,_binary '\0',NULL,NULL,'2023-08-24 10:42:17',NULL,_binary '\0'),(6,'FWN ATLANTIDE',9535620,NULL,NULL,145.65,18.25,_binary '\0',NULL,NULL,'2023-08-24 10:42:17',NULL,_binary '\0'),(7,'IONIAN SPIRIT',9747235,NULL,NULL,179.9,30,_binary '\0',NULL,NULL,'2023-08-24 10:42:17',NULL,_binary '\0'),(8,'IRMA',9180396,NULL,NULL,199.9,23.6,_binary '\0',NULL,NULL,'2023-08-24 10:42:17',NULL,_binary '\0'),(9,'JANA',9330185,NULL,NULL,69.34,12,_binary '\0',NULL,NULL,'2023-08-24 10:42:18',NULL,_binary '\0'),(10,'MEDI PERTH',9804552,NULL,NULL,199.99,32.24,_binary '\0',NULL,NULL,'2023-08-24 10:42:18',NULL,_binary '\0'),(11,'S NEPTUNE',9634892,NULL,NULL,169.99,27,_binary '\0',NULL,NULL,'2023-08-24 10:42:18',NULL,_binary '\0'),(12,'WESER STAHL',9186687,NULL,NULL,192,32.26,_binary '\0',NULL,NULL,'2023-08-24 10:42:18',NULL,_binary '\0');
(1, 'Dicke Berta', 1234567, 'DEBE', 1, 100, 20, b'0', NULL, NULL, '2023-06-27 10:43:02', NULL, b'0'),
(2, 'Maersk Neston', 9632167, '9V3532', 1, 210.07, 30.2, b'0', NULL, NULL, '2023-07-27 12:34:13', NULL, b'0');
/*!40000 ALTER TABLE `ship` ENABLE KEYS */; /*!40000 ALTER TABLE `ship` ENABLE KEYS */;
UNLOCK TABLES;
-- Exportiere Daten aus Tabelle bremen_calling.shipcall: ~8 rows (ungefähr) --
-- Dumping data for table `shipcall`
--
LOCK TABLES `shipcall` WRITE;
/*!40000 ALTER TABLE `shipcall` DISABLE KEYS */; /*!40000 ALTER TABLE `shipcall` DISABLE KEYS */;
INSERT INTO `shipcall` (`id`, `ship_id`, `type`, `eta`, `voyage`, `etd`, `arrival_berth_id`, `departure_berth_id`, `tug_required`, `pilot_required`, `flags`, `pier_side`, `bunkering`, `replenishing_terminal`, `replenishing_lock`, `draft`, `tidal_window_from`, `tidal_window_to`, `rain_sensitive_cargo`, `recommended_tugs`, `anchored`, `moored_lock`, `canceled`, `created`, `modified`) VALUES INSERT INTO `shipcall` VALUES (3,7,1,'2023-09-21 03:00:00','43B','2023-08-25 12:17:16',177,177,_binary '',_binary '',0,_binary '\0',_binary '',_binary '',_binary '',7.5,NULL,NULL,_binary '\0',3,_binary '',_binary '\0',_binary '\0','2023-06-27 11:03:28','2023-09-04 08:13:15'),(4,3,2,'2023-09-24 12:22:20','43','2023-09-01 02:00:00',184,184,_binary '',_binary '',2,_binary '\0',_binary '\0',_binary '\0',_binary '\0',6.35,NULL,NULL,_binary '\0',1,_binary '\0',_binary '',_binary '\0','2023-07-27 12:36:49','2023-09-04 08:13:15'),(5,1,1,'2023-07-23 07:18:19','43B',NULL,NULL,NULL,_binary '\0',_binary '',0,_binary '\0',_binary '',NULL,NULL,NULL,NULL,NULL,_binary '\0',2,NULL,NULL,NULL,'2023-08-11 15:11:50',NULL),(6,1,1,'2023-07-23 07:18:19','43B',NULL,NULL,NULL,_binary '\0',_binary '',0,_binary '\0',_binary '',NULL,NULL,NULL,NULL,NULL,_binary '\0',2,NULL,NULL,NULL,'2023-08-11 15:11:53',NULL),(7,1,1,'2023-07-23 07:18:19','43B',NULL,NULL,NULL,_binary '\0',_binary '',0,_binary '\0',_binary '',NULL,NULL,NULL,NULL,NULL,_binary '\0',2,NULL,NULL,NULL,'2023-08-13 12:12:34',NULL),(8,1,1,'2023-07-23 07:18:19','43B',NULL,NULL,NULL,_binary '\0',_binary '',0,_binary '\0',_binary '',NULL,NULL,NULL,NULL,NULL,_binary '\0',2,NULL,NULL,NULL,'2023-08-13 12:14:52',NULL),(9,1,1,'2023-07-23 07:18:19','43B',NULL,NULL,NULL,_binary '\0',_binary '',0,_binary '\0',_binary '',NULL,NULL,NULL,NULL,NULL,_binary '\0',2,NULL,NULL,NULL,'2023-08-13 12:17:09',NULL),(10,4,1,'2023-09-11 10:00:00','43B','2023-08-25 12:26:14',146,146,_binary '\0',_binary '',0,_binary '\0',_binary '\0',_binary '',_binary '\0',4.4,NULL,NULL,_binary '',3,_binary '\0',_binary '\0',_binary '\0','2023-08-14 07:55:48','2023-09-04 08:14:36'),(11,1,1,'2023-07-23 07:18:19','43B',NULL,NULL,NULL,_binary '\0',_binary '',0,_binary '\0',_binary '',NULL,NULL,NULL,NULL,NULL,_binary '\0',2,NULL,NULL,NULL,'2023-08-18 09:14:13',NULL),(12,1,1,'2023-07-23 07:18:19','43B',NULL,NULL,NULL,_binary '\0',_binary '',0,_binary '\0',_binary '',NULL,NULL,NULL,NULL,NULL,_binary '\0',2,NULL,NULL,NULL,'2023-08-18 09:14:20',NULL),(13,1,1,'2023-07-23 07:18:19','43B',NULL,NULL,NULL,_binary '\0',_binary '',0,_binary '\0',_binary '',NULL,NULL,NULL,NULL,NULL,_binary '\0',2,NULL,NULL,NULL,'2023-08-18 09:14:45',NULL),(14,1,1,'2023-07-23 07:18:19','43B',NULL,NULL,NULL,_binary '\0',_binary '',0,_binary '\0',_binary '',NULL,NULL,NULL,NULL,NULL,_binary '\0',2,NULL,NULL,NULL,'2023-08-18 09:17:42',NULL),(15,1,1,'2023-07-23 07:18:19','43B',NULL,NULL,NULL,_binary '\0',_binary '',0,_binary '\0',_binary '',NULL,NULL,NULL,NULL,NULL,_binary '\0',2,NULL,NULL,NULL,'2023-08-18 09:17:51',NULL),(16,1,3,'2023-09-21 16:19:14','Test','2023-08-26 16:18:54',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0001-01-01 00:00:00','2023-09-04 13:05:33'),(17,7,1,'2023-09-01 03:00:01','','2023-08-25 12:20:05',177,177,_binary '',_binary '',NULL,_binary '',_binary '\0',_binary '\0',_binary '\0',7.5,'2023-08-31 23:00:01','2023-09-01 05:00:01',_binary '\0',2,_binary '\0',_binary '\0',_binary '\0','2023-08-24 12:20:04',NULL),(18,3,2,'2023-09-25 20:44:21','','2023-09-01 03:00:28',184,184,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2023-08-27 20:45:06','2023-09-04 08:14:35');
(3, 1, 1, '2023-08-13 07:18:19', '43B', NULL, NULL, NULL, b'0', b'1', 0, b'0', b'1', NULL, NULL, NULL, NULL, NULL, b'0', 3, NULL, NULL, NULL, '2023-06-27 11:03:28', '2023-08-07 15:19:56'),
(4, 2, 1, '2023-08-14 10:43:02', '43', NULL, NULL, NULL, NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, b'0', 0, NULL, NULL, NULL, '2023-07-27 12:36:49', '2023-08-07 15:19:56'),
(5, 1, 1, '2023-07-23 07:18:19', '43B', NULL, NULL, NULL, b'0', b'1', 0, b'0', b'1', NULL, NULL, NULL, NULL, NULL, b'0', 2, NULL, NULL, NULL, '2023-08-11 15:11:50', NULL),
(6, 1, 1, '2023-07-23 07:18:19', '43B', NULL, NULL, NULL, b'0', b'1', 0, b'0', b'1', NULL, NULL, NULL, NULL, NULL, b'0', 2, NULL, NULL, NULL, '2023-08-11 15:11:53', NULL),
(7, 1, 1, '2023-07-23 07:18:19', '43B', NULL, NULL, NULL, b'0', b'1', 0, b'0', b'1', NULL, NULL, NULL, NULL, NULL, b'0', 2, NULL, NULL, NULL, '2023-08-13 12:12:34', NULL),
(8, 1, 1, '2023-07-23 07:18:19', '43B', NULL, NULL, NULL, b'0', b'1', 0, b'0', b'1', NULL, NULL, NULL, NULL, NULL, b'0', 2, NULL, NULL, NULL, '2023-08-13 12:14:52', NULL),
(9, 1, 1, '2023-07-23 07:18:19', '43B', NULL, NULL, NULL, b'0', b'1', 0, b'0', b'1', NULL, NULL, NULL, NULL, NULL, b'0', 2, NULL, NULL, NULL, '2023-08-13 12:17:09', NULL),
(10, 1, 1, '2023-08-23 07:18:19', '43B', NULL, NULL, NULL, b'0', b'1', 0, b'0', b'1', NULL, NULL, NULL, NULL, NULL, b'0', 3, NULL, NULL, NULL, '2023-08-14 07:55:48', '2023-08-14 07:56:52');
/*!40000 ALTER TABLE `shipcall` ENABLE KEYS */; /*!40000 ALTER TABLE `shipcall` ENABLE KEYS */;
UNLOCK TABLES;
-- Exportiere Daten aus Tabelle bremen_calling.shipcall_participant_map: ~6 rows (ungefähr) --
-- Dumping data for table `shipcall_participant_map`
--
LOCK TABLES `shipcall_participant_map` WRITE;
/*!40000 ALTER TABLE `shipcall_participant_map` DISABLE KEYS */; /*!40000 ALTER TABLE `shipcall_participant_map` DISABLE KEYS */;
INSERT INTO `shipcall_participant_map` (`id`, `shipcall_id`, `participant_id`, `created`, `modified`) VALUES INSERT INTO `shipcall_participant_map` VALUES (1,3,2,'2023-08-11 15:01:23',NULL),(3,9,2,'2023-08-13 12:17:17',NULL),(4,9,4,'2023-08-13 12:17:18',NULL),(24,10,3,'2023-08-14 08:48:30',NULL),(26,10,9,'2023-08-14 09:03:29',NULL),(28,10,7,'2023-08-21 14:36:44',NULL),(29,10,16,'2023-08-21 14:36:44',NULL),(30,10,2,'2023-08-21 14:36:44',NULL),(32,10,11,'2023-08-21 14:36:44',NULL),(33,10,1,'2023-08-21 14:36:44',NULL),(34,3,3,'2023-08-21 14:45:52',NULL),(35,3,11,'2023-08-21 14:45:52',NULL),(43,16,3,'2023-08-21 16:19:13',NULL),(44,16,11,'2023-08-21 16:19:13',NULL),(45,16,1,'2023-08-21 16:19:13',NULL),(48,3,16,'2023-08-23 16:58:54',NULL),(49,3,9,'2023-08-23 16:58:54',NULL),(50,4,10,'2023-08-24 10:01:40',NULL),(51,4,16,'2023-08-24 10:01:40',NULL),(52,4,2,'2023-08-24 10:01:40',NULL),(53,4,10,'2023-08-24 10:01:40',NULL),(54,4,9,'2023-08-24 10:01:40',NULL),(55,4,3,'2023-08-24 10:01:40',NULL),(56,4,11,'2023-08-24 10:01:40',NULL),(57,4,1,'2023-08-24 10:01:40',NULL),(58,3,1,'2023-08-24 10:42:56',NULL),(59,3,4,'2023-08-24 12:17:16',NULL),(60,17,12,'2023-08-24 12:20:04',NULL),(61,17,16,'2023-08-24 12:20:04',NULL),(62,17,2,'2023-08-24 12:20:04',NULL),(63,17,4,'2023-08-24 12:20:04',NULL),(64,17,9,'2023-08-24 12:20:04',NULL),(65,17,3,'2023-08-24 12:20:04',NULL),(66,17,11,'2023-08-24 12:20:04',NULL),(67,17,1,'2023-08-24 12:20:04',NULL),(68,18,10,'2023-08-27 20:45:06',NULL),(69,18,16,'2023-08-27 20:45:06',NULL),(70,18,2,'2023-08-27 20:45:06',NULL),(71,18,10,'2023-08-27 20:45:06',NULL),(72,18,9,'2023-08-27 20:45:06',NULL),(73,18,3,'2023-08-27 20:45:06',NULL),(74,18,11,'2023-08-27 20:45:06',NULL),(75,18,1,'2023-08-27 20:45:06',NULL),(79,16,2,'2023-09-04 10:31:45',NULL),(81,3,7,'2023-09-04 11:45:26',NULL);
(1, 3, 2, '2023-08-11 15:01:23', NULL),
(2, 3, 4, '2023-08-11 15:01:29', NULL),
(3, 9, 2, '2023-08-13 12:17:17', NULL),
(4, 9, 4, '2023-08-13 12:17:18', NULL),
(24, 10, 3, '2023-08-14 08:48:30', NULL),
(26, 10, 9, '2023-08-14 09:03:29', NULL);
/*!40000 ALTER TABLE `shipcall_participant_map` ENABLE KEYS */; /*!40000 ALTER TABLE `shipcall_participant_map` ENABLE KEYS */;
UNLOCK TABLES;
-- Exportiere Daten aus Tabelle bremen_calling.shipcall_tug_map: ~0 rows (ungefähr) --
-- Dumping data for table `shipcall_tug_map`
--
LOCK TABLES `shipcall_tug_map` WRITE;
/*!40000 ALTER TABLE `shipcall_tug_map` DISABLE KEYS */; /*!40000 ALTER TABLE `shipcall_tug_map` DISABLE KEYS */;
/*!40000 ALTER TABLE `shipcall_tug_map` ENABLE KEYS */; /*!40000 ALTER TABLE `shipcall_tug_map` ENABLE KEYS */;
UNLOCK TABLES;
-- Exportiere Daten aus Tabelle bremen_calling.times: ~0 rows (ungefähr) --
-- Dumping data for table `times`
--
LOCK TABLES `times` WRITE;
/*!40000 ALTER TABLE `times` DISABLE KEYS */; /*!40000 ALTER TABLE `times` DISABLE KEYS */;
INSERT INTO `times` (`id`, `eta_berth`, `eta_berth_fixed`, `etd_berth`, `etd_berth_fixed`, `lock_time`, `lock_time_fixed`, `zone_entry`, `zone_entry_fixed`, `operations_start`, `operations_end`, `remarks`, `shipcall_id`, `participant_id`, `created`, `modified`) VALUES INSERT INTO `times` VALUES (1,'2023-05-18 07:18:19',NULL,'2023-05-18 09:18:19',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,1,'2023-06-27 11:05:01','2023-06-27 11:05:30',NULL,NULL,NULL),(2,'2023-08-23 09:26:22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'test',16,1,'0001-01-01 00:00:00',NULL,NULL,NULL,NULL),(3,NULL,NULL,NULL,NULL,'2023-08-24 09:32:18',NULL,NULL,NULL,NULL,NULL,'',16,1,'2023-08-23 09:32:21',NULL,NULL,NULL,NULL),(4,'2023-08-19 07:05:29',NULL,'2023-09-07 09:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Lotsenbemerkung von M.B.',3,2,'2023-08-24 07:05:39','2023-09-04 10:30:58',NULL,NULL,NULL),(5,'2023-08-19 08:30:30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'früher wird das nichts',3,16,'2023-08-24 07:10:43','2023-08-24 07:11:04',NULL,NULL,NULL),(6,NULL,NULL,'2023-09-01 02:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'VB Blumenthal',4,9,'2023-08-24 12:29:48','2023-08-24 12:52:43',NULL,NULL,NULL),(7,'2023-09-01 03:30:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'VB Blexen, VB Blumenthal, \r\nFrüher geht es nicht',17,9,'2023-08-24 12:53:40','2023-08-24 12:55:20',NULL,NULL,NULL),(8,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Keine Schlepporder',10,9,'2023-08-24 12:58:18',NULL,NULL,NULL,NULL),(9,NULL,NULL,'2023-09-01 02:00:01',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',4,16,'2023-08-24 13:00:16',NULL,NULL,NULL,NULL),(10,'2023-09-01 10:00:32',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',10,16,'2023-08-24 13:00:39',NULL,NULL,NULL,NULL),(11,NULL,NULL,'2023-09-01 02:00:39',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',4,2,'2023-08-24 13:01:45',NULL,NULL,NULL,NULL),(12,'2023-09-01 03:00:52',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',17,2,'2023-08-24 13:01:59',NULL,NULL,NULL,NULL),(13,'2023-09-01 10:00:10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',10,2,'2023-08-24 13:02:16','2023-09-04 09:11:45',NULL,NULL,NULL),(14,NULL,NULL,'2023-09-01 02:00:07',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',4,11,'2023-08-24 13:03:14',NULL,NULL,NULL,NULL),(15,'2023-09-01 03:00:20',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',17,11,'2023-08-24 13:03:27',NULL,NULL,NULL,NULL),(16,'2023-09-01 10:00:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',10,11,'2023-08-24 13:03:39',NULL,NULL,NULL,NULL),(17,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',17,4,'2023-08-24 13:05:11','2023-08-24 13:05:57',NULL,NULL,NULL),(18,'2023-09-01 02:00:35',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',4,10,'2023-08-24 13:06:45',NULL,NULL,NULL,NULL),(19,'2023-09-01 03:00:41',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',17,10,'2023-08-24 13:07:48',NULL,NULL,NULL,NULL),(20,NULL,NULL,'2023-09-01 02:00:02',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',4,10,'2023-08-24 13:08:10',NULL,NULL,NULL,NULL),(21,'2023-09-01 10:00:17',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',10,10,'2023-08-24 13:08:24',NULL,NULL,NULL,NULL),(22,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Klärung abwarten => 0300/0330?',17,16,'2023-08-24 13:08:53','2023-08-24 13:09:33',NULL,NULL,NULL),(23,NULL,NULL,'2023-09-01 03:00:43',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',18,11,'2023-08-27 20:45:49',NULL,NULL,NULL,NULL),(24,NULL,NULL,'2023-09-01 03:00:21',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',18,10,'2023-08-27 20:46:25',NULL,NULL,NULL,NULL),(25,'2023-09-01 13:23:12',_binary '','2023-09-03 03:00:51',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'es geht nicht früher!',18,2,'2023-08-27 20:46:54','2023-09-01 13:25:39',NULL,NULL,NULL),(26,NULL,NULL,'2023-09-01 03:00:34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',18,9,'2023-08-27 20:47:40',NULL,NULL,NULL,NULL),(27,NULL,NULL,'2023-09-01 03:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',18,16,'2023-08-27 20:48:05',NULL,NULL,NULL,NULL);
(1, '2023-05-18 07:18:19', NULL, '2023-05-18 09:18:19', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 3, 1, '2023-06-27 11:05:01', '2023-06-27 11:05:30');
/*!40000 ALTER TABLE `times` ENABLE KEYS */; /*!40000 ALTER TABLE `times` ENABLE KEYS */;
UNLOCK TABLES;
-- Exportiere Daten aus Tabelle bremen_calling.user: ~21 rows (ungefähr) --
-- Dumping data for table `user`
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */; /*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` (`id`, `participant_id`, `first_name`, `last_name`, `user_name`, `user_email`, `user_phone`, `password_hash`, `api_key`, `created`, `modified`) VALUES INSERT INTO `user` VALUES (1,1,'Daniel','Schick','dani',NULL,NULL,'$2b$12$qfjw4b3XvGuu0t6HR8OYGOzF5b8gmC6PyIIBNbIXMXEayJunEEKmi','0815','2023-04-17 07:15:41','2023-08-11 11:11:34'),(2,1,'Londo','Mollari','Londo','l.mollari@centauri.gov','+01 555 324 2313','$2b$12$P7MkcbOzmp7Wxsl8Ip5tg.KvMlvQEdFZN6AoM1Ze54.kvjYZxSizy',NULL,'2023-06-27 08:34:55','2023-09-04 13:36:34'),(3,2,'Maik','Baudeck','maikb',NULL,NULL,'$2b$12$4SxGRlinOrpEVvqDZcE.wOusMZYsepdc6vj1vDpNhbPtApxU8VGPi','','2023-08-10 07:09:35','2023-08-11 11:11:55'),(4,3,'Christin','Hollmann','christinh',NULL,NULL,'$2b$12$ul0QJmcuUhktDYDjcyEpx.6yY1ieLdaCxZ6a3SFSuTq94IqK4Y/re','','2023-08-10 07:12:05','2023-08-11 11:10:33'),(5,3,'Bastian','Güttner','bastiang',NULL,NULL,'$2b$12$0oCX3c2WyMykmxMoLqmpNubke713xhYlEEQgnxBV6Fj/TaUn.3/U6','','2023-08-10 07:12:26','2023-08-11 11:11:13'),(6,3,'Benjamin','Wiese','benjaminw',NULL,NULL,'$2b$12$RRj32KdLIf3D7z7cVWFqa.yZM5.ODOS0HqU3rdCuFrJS8HJ/rtqwy','','2023-08-10 07:13:01','2023-08-11 11:11:16'),(7,1,'Sladjan','Veselinovic','sladjanv',NULL,NULL,'$2b$12$4DctoCbZwxTvE39lXNRzneQ2kb/lXlJ5wEZ1CGbbw.rGM3nuAYjpa','','2023-08-10 07:13:39','2023-08-11 11:11:45'),(8,1,'Kersten','Gevers','kersteng',NULL,NULL,'$2b$12$zKX8iLPnXRmp5wD1Yp8P7e..U9R0A4ytbiMjd.l.IGkMzahcHPNWq','','2023-08-10 07:13:59','2023-08-11 11:11:49'),(9,4,'Dirk','Brunnert','dirkb',NULL,NULL,'$2b$12$HTeq/Fdfse6oElk7DLsQae5dtvWJloee.VtBH.THsj2kdcxxBkCDW','','2023-08-10 07:15:01','2023-08-11 11:12:01'),(10,5,'Thorsten','Fischer','thorstenf',NULL,NULL,'$2b$12$NHEpTNHuKU4ruPRIfd9yc.yv5faHGemFfRI3TISniqM7QNqHiyZpK','','2023-08-10 07:16:20','2023-08-11 11:12:07'),(11,6,'Lisa','Friedhoff','lisaf',NULL,NULL,'$2b$12$DJKJHGrQwfY9pwzgFfPds.DHGsygHyV3KDs38Hq4AUHPPs3jBPH3y','','2023-08-10 07:19:52','2023-08-11 11:12:12'),(12,6,'Dario','Fritschi','dariof',NULL,NULL,'$2b$12$MwCVTMQkN6zCAzCsE572Ye.M0nRDQNld4AgorLVyWq.DcQEmAy5lu','','2023-08-10 07:20:11','2023-08-11 11:12:15'),(13,7,'Hergen','Hanke','hergenh',NULL,NULL,'$2b$12$MKb6BDRrTbNd0qg5BdAS.upzlqxcWOgU/VEafJKSuzE9JLIWCimq6','','2023-08-10 07:22:09','2023-08-11 11:12:24'),(14,8,'Hardy','Paasch','hardyp',NULL,NULL,'$2b$12$l1lE/UqnYnOvci.N4j3zBOz6HC0z87ovnO0n6BIZYO7VN8gj.qGey','','2023-08-10 07:23:25','2023-08-11 11:12:28'),(15,8,'Marc','Pagel','marcp',NULL,NULL,'$2b$12$UCVJKzqX92Z8xZJ4kK0BRuFXMRdqcaXaGmBrqnYWARdKlPvZvLUZq','','2023-08-10 07:23:41','2023-08-11 11:12:30'),(16,9,'Andreas','Peukert','andreasp',NULL,NULL,'$2b$12$jNmciJAVR6p0IflvAthmk.j0SoOBvFHwDiEDKUHfwJq7baRsKg/LG','','2023-08-10 07:24:37','2023-08-11 11:12:45'),(17,8,'Christina','Rachiele','christinar',NULL,NULL,'$2b$12$BCsVgPRuIWPuuor07lprF.klQxvF901O3AXUhRrBJoEvYIjNQ.HKS','','2023-08-10 07:25:05','2023-08-11 11:12:33'),(18,9,'Sonia','Rekawek','soniar',NULL,NULL,'$2b$12$uHCkH6gu13yqllXBibLFIOWOpvctMC7NmojtXqDd6xsLq7bmvNOMu','','2023-08-10 07:25:27','2023-08-11 11:12:48'),(19,6,'Frank','Roelfs','frankr',NULL,NULL,'$2b$12$cEQAhUe9VJV6uTkfOY6/R.oAVfmFZQ4vS5G6BqoNEyaVHtFRDtB56','','2023-08-10 07:26:04','2023-08-11 11:12:19'),(20,10,'Vera','Schliedermann','veras',NULL,NULL,'$2b$12$FKcitW6W1HPwd.cdkZLGLeTFuzjsEIrbiKInysAKN.RibZ4gVLZHi','','2023-08-10 07:27:01','2023-08-11 11:12:54'),(21,8,'Michael','Strudthoff','michaels',NULL,NULL,'$2b$12$doTiywWpkso1UWB5eiAW1eoACP6rN4UDVt7qFFdRFvhhWUXikCmS2','','2023-08-10 07:27:27','2023-08-11 11:12:37'),(22,4,'Volker','Viohl','volkerv',NULL,NULL,'$2b$12$.YavQbWNE4eJDQA.ZNSKROYvMPWifBXyMX0IL0H2z50M720fpfTJW','','2023-08-10 07:27:50','2023-08-11 11:12:04'),(23,11,'Frauke','Zabel','fraukez',NULL,NULL,'$2b$12$rawQg6Cjl1yECGm9DOG8degdWdD.nZjEgGp8eXO98nh11QV1sEEEO','','2023-08-10 07:28:33','2023-08-11 11:12:58'),(24,8,'Jan','Zierow','janz',NULL,NULL,'$2b$12$CbnjUT42cf0mkIAqAURg3OksP9G3brmsE2GQTECTZ4.cVuhPn5D2G','','2023-08-10 07:28:55','2023-08-11 11:12:39'),(25,12,'Berit','Güstrau','beritg',NULL,NULL,'$2b$12$g8WJTEWwsrtMyqpVW/GFVuzyRjB2/n0YJJyvBx.3l51YiVEUjEQYy','','2023-08-21 06:52:35',NULL),(26,15,'Ilknur','Colmorn','ilknurc',NULL,NULL,'$2b$12$tpEb0JQ8Li4YkPH28FeYk.1Jt2vK.TFn9SyhBKJ08gn7S5d8WYRlO','','2023-08-21 06:56:42',NULL),(27,16,'Horst','Imgram','horsti',NULL,NULL,'$2b$12$05NFPSaP78puAa8pL39KrOKTafs/TzWwr4YfV4/Vrdu90assvNFZa','','2023-08-21 06:57:58',NULL);
(1, 1, 'Daniel', 'Schick', 'dani', NULL, NULL, '$2b$12$qfjw4b3XvGuu0t6HR8OYGOzF5b8gmC6PyIIBNbIXMXEayJunEEKmi', '0815', '2023-04-17 07:15:41', '2023-08-11 11:11:34'),
(2, 1, 'Londo', 'Mollari', 'Londo', 'l.mollari@centauri.gov', '+01 555 324 2313', '$2b$12$VwmwvO2dxlOixWc1HjX3j.753SDJTMR.o7av/bVGTM2tLW2jQT0yy', NULL, '2023-06-27 08:34:55', NULL),
(3, 2, 'Maik', 'Baudeck', 'maikb', NULL, NULL, '$2b$12$4SxGRlinOrpEVvqDZcE.wOusMZYsepdc6vj1vDpNhbPtApxU8VGPi', '', '2023-08-10 07:09:35', '2023-08-11 11:11:55'),
(4, 3, 'Christin', 'Hollmann', 'christinh', NULL, NULL, '$2b$12$ul0QJmcuUhktDYDjcyEpx.6yY1ieLdaCxZ6a3SFSuTq94IqK4Y/re', '', '2023-08-10 07:12:05', '2023-08-11 11:10:33'),
(5, 3, 'Bastian', 'Güttner', 'bastiang', NULL, NULL, '$2b$12$0oCX3c2WyMykmxMoLqmpNubke713xhYlEEQgnxBV6Fj/TaUn.3/U6', '', '2023-08-10 07:12:26', '2023-08-11 11:11:13'),
(6, 3, 'Benjamin', 'Wiese', 'benjaminw', NULL, NULL, '$2b$12$RRj32KdLIf3D7z7cVWFqa.yZM5.ODOS0HqU3rdCuFrJS8HJ/rtqwy', '', '2023-08-10 07:13:01', '2023-08-11 11:11:16'),
(7, 1, 'Sladjan', 'Veselinovic', 'sladjanv', NULL, NULL, '$2b$12$4DctoCbZwxTvE39lXNRzneQ2kb/lXlJ5wEZ1CGbbw.rGM3nuAYjpa', '', '2023-08-10 07:13:39', '2023-08-11 11:11:45'),
(8, 1, 'Kersten', 'Gevers', 'kersteng', NULL, NULL, '$2b$12$zKX8iLPnXRmp5wD1Yp8P7e..U9R0A4ytbiMjd.l.IGkMzahcHPNWq', '', '2023-08-10 07:13:59', '2023-08-11 11:11:49'),
(9, 4, 'Dirk', 'Brunnert', 'dirkb', NULL, NULL, '$2b$12$HTeq/Fdfse6oElk7DLsQae5dtvWJloee.VtBH.THsj2kdcxxBkCDW', '', '2023-08-10 07:15:01', '2023-08-11 11:12:01'),
(10, 5, 'Thorsten', 'Fischer', 'thorstenf', NULL, NULL, '$2b$12$NHEpTNHuKU4ruPRIfd9yc.yv5faHGemFfRI3TISniqM7QNqHiyZpK', '', '2023-08-10 07:16:20', '2023-08-11 11:12:07'),
(11, 6, 'Lisa', 'Friedhoff', 'lisaf', NULL, NULL, '$2b$12$DJKJHGrQwfY9pwzgFfPds.DHGsygHyV3KDs38Hq4AUHPPs3jBPH3y', '', '2023-08-10 07:19:52', '2023-08-11 11:12:12'),
(12, 6, 'Dario', 'Fritschi', 'dariof', NULL, NULL, '$2b$12$MwCVTMQkN6zCAzCsE572Ye.M0nRDQNld4AgorLVyWq.DcQEmAy5lu', '', '2023-08-10 07:20:11', '2023-08-11 11:12:15'),
(13, 7, 'Hergen', 'Hanke', 'hergenh', NULL, NULL, '$2b$12$MKb6BDRrTbNd0qg5BdAS.upzlqxcWOgU/VEafJKSuzE9JLIWCimq6', '', '2023-08-10 07:22:09', '2023-08-11 11:12:24'),
(14, 8, 'Hardy', 'Paasch', 'hardyp', NULL, NULL, '$2b$12$l1lE/UqnYnOvci.N4j3zBOz6HC0z87ovnO0n6BIZYO7VN8gj.qGey', '', '2023-08-10 07:23:25', '2023-08-11 11:12:28'),
(15, 8, 'Marc', 'Pagel', 'marcp', NULL, NULL, '$2b$12$UCVJKzqX92Z8xZJ4kK0BRuFXMRdqcaXaGmBrqnYWARdKlPvZvLUZq', '', '2023-08-10 07:23:41', '2023-08-11 11:12:30'),
(16, 9, 'Andreas', 'Peukert', 'andreasp', NULL, NULL, '$2b$12$jNmciJAVR6p0IflvAthmk.j0SoOBvFHwDiEDKUHfwJq7baRsKg/LG', '', '2023-08-10 07:24:37', '2023-08-11 11:12:45'),
(17, 8, 'Christina', 'Rachiele', 'christinar', NULL, NULL, '$2b$12$BCsVgPRuIWPuuor07lprF.klQxvF901O3AXUhRrBJoEvYIjNQ.HKS', '', '2023-08-10 07:25:05', '2023-08-11 11:12:33'),
(18, 9, 'Sonia', 'Rekawek', 'soniar', NULL, NULL, '$2b$12$uHCkH6gu13yqllXBibLFIOWOpvctMC7NmojtXqDd6xsLq7bmvNOMu', '', '2023-08-10 07:25:27', '2023-08-11 11:12:48'),
(19, 6, 'Frank', 'Roelfs', 'frankr', NULL, NULL, '$2b$12$cEQAhUe9VJV6uTkfOY6/R.oAVfmFZQ4vS5G6BqoNEyaVHtFRDtB56', '', '2023-08-10 07:26:04', '2023-08-11 11:12:19'),
(20, 10, 'Vera', 'Schliedermann', 'veras', NULL, NULL, '$2b$12$FKcitW6W1HPwd.cdkZLGLeTFuzjsEIrbiKInysAKN.RibZ4gVLZHi', '', '2023-08-10 07:27:01', '2023-08-11 11:12:54'),
(21, 8, 'Michael', 'Strudthoff', 'michaels', NULL, NULL, '$2b$12$doTiywWpkso1UWB5eiAW1eoACP6rN4UDVt7qFFdRFvhhWUXikCmS2', '', '2023-08-10 07:27:27', '2023-08-11 11:12:37'),
(22, 4, 'Volker', 'Viohl', 'volkerv', NULL, NULL, '$2b$12$.YavQbWNE4eJDQA.ZNSKROYvMPWifBXyMX0IL0H2z50M720fpfTJW', '', '2023-08-10 07:27:50', '2023-08-11 11:12:04'),
(23, 11, 'Frauke', 'Zabel', 'fraukez', NULL, NULL, '$2b$12$rawQg6Cjl1yECGm9DOG8degdWdD.nZjEgGp8eXO98nh11QV1sEEEO', '', '2023-08-10 07:28:33', '2023-08-11 11:12:58'),
(24, 8, 'Jan', 'Zierow', 'janz', NULL, NULL, '$2b$12$CbnjUT42cf0mkIAqAURg3OksP9G3brmsE2GQTECTZ4.cVuhPn5D2G', '', '2023-08-10 07:28:55', '2023-08-11 11:12:39');
/*!40000 ALTER TABLE `user` ENABLE KEYS */; /*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
-- Exportiere Daten aus Tabelle bremen_calling.user_role_map: ~0 rows (ungefähr) --
-- Dumping data for table `user_role_map`
--
LOCK TABLES `user_role_map` WRITE;
/*!40000 ALTER TABLE `user_role_map` DISABLE KEYS */; /*!40000 ALTER TABLE `user_role_map` DISABLE KEYS */;
/*!40000 ALTER TABLE `user_role_map` ENABLE KEYS */; /*!40000 ALTER TABLE `user_role_map` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-09-05 10:38:13

View File

@ -7,7 +7,7 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p = "clr-namespace:BreCalClient.Resources" xmlns:p = "clr-namespace:BreCalClient.Resources"
mc:Ignorable="d" mc:Ignorable="d"
Title="Help" Height="270" Width="500"> Title="Help" Height="280" Width="500">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="180" /> <ColumnDefinition Width="180" />

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="BreCalClient.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="BreCalClient.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<BreCalClient.Properties.Settings>
<setting name="API_URL" serializeAs="String">
<value>https://brecal.bsmd-emswe.eu</value>
</setting>
<setting name="BG_COLOR" serializeAs="String">
<value>#751D1F</value>
</setting>
<setting name="APP_TITLE" serializeAs="String">
<value>!!Bremen calling Testversion!!</value>
</setting>
<setting name="LOGO_IMAGE_URL" serializeAs="String">
<value>https://www.textbausteine.net/</value>
</setting>
</BreCalClient.Properties.Settings>
</applicationSettings>
<userSettings>
<BreCalClient.Properties.Settings>
<setting name="FilterCriteria" serializeAs="String">
<value />
</setting>
</BreCalClient.Properties.Settings>
</userSettings>
</configuration>

View File

@ -7,24 +7,28 @@
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<SignAssembly>True</SignAssembly> <SignAssembly>True</SignAssembly>
<StartupObject>BreCalClient.App</StartupObject> <StartupObject>BreCalClient.App</StartupObject>
<AssemblyOriginatorKeyFile>E:\gitlager\git_brcal\misc\brecal.snk</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>..\..\misc\brecal.snk</AssemblyOriginatorKeyFile>
<AssemblyVersion>0.5.0.0</AssemblyVersion> <AssemblyVersion>0.6.0.0</AssemblyVersion>
<FileVersion>0.5.0.0</FileVersion> <FileVersion>0.6.0.0</FileVersion>
<Title>Bremen calling client</Title> <Title>Bremen calling client</Title>
<Description>A Windows WPF client for the Bremen calling API.</Description> <Description>A Windows WPF client for the Bremen calling API.</Description>
<ApplicationIcon>containership.ico</ApplicationIcon> <ApplicationIcon>containership.ico</ApplicationIcon>
<AssemblyName>BreCalTestClient</AssemblyName>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Remove="Resources\arrow_down_green.png" /> <None Remove="Resources\arrow_down_green.png" />
<None Remove="Resources\arrow_down_red.png" /> <None Remove="Resources\arrow_down_red.png" />
<None Remove="Resources\arrow_right_blue.png" /> <None Remove="Resources\arrow_right_blue.png" />
<None Remove="Resources\arrow_right_green.png" />
<None Remove="Resources\arrow_up_blue.png" />
<None Remove="Resources\arrow_up_green.png" /> <None Remove="Resources\arrow_up_green.png" />
<None Remove="Resources\arrow_up_red.png" /> <None Remove="Resources\arrow_up_red.png" />
<None Remove="Resources\clipboard.png" /> <None Remove="Resources\clipboard.png" />
<None Remove="Resources\clock.png" /> <None Remove="Resources\clock.png" />
<None Remove="Resources\containership.ico" /> <None Remove="Resources\containership.ico" />
<None Remove="Resources\containership.png" /> <None Remove="Resources\containership.png" />
<None Remove="Resources\delete.png" />
<None Remove="Resources\emergency_stop_button.png" /> <None Remove="Resources\emergency_stop_button.png" />
<None Remove="Resources\logo_bremen_calling.png" /> <None Remove="Resources\logo_bremen_calling.png" />
<None Remove="Resources\ship2.png" /> <None Remove="Resources\ship2.png" />
@ -64,12 +68,15 @@
<Resource Include="Resources\arrow_down_green.png" /> <Resource Include="Resources\arrow_down_green.png" />
<Resource Include="Resources\arrow_down_red.png" /> <Resource Include="Resources\arrow_down_red.png" />
<Resource Include="Resources\arrow_right_blue.png" /> <Resource Include="Resources\arrow_right_blue.png" />
<Resource Include="Resources\arrow_right_green.png" />
<Resource Include="Resources\arrow_up_blue.png" />
<Resource Include="Resources\arrow_up_green.png" /> <Resource Include="Resources\arrow_up_green.png" />
<Resource Include="Resources\arrow_up_red.png" /> <Resource Include="Resources\arrow_up_red.png" />
<Resource Include="Resources\clipboard.png" /> <Resource Include="Resources\clipboard.png" />
<Resource Include="Resources\clock.png" /> <Resource Include="Resources\clock.png" />
<Resource Include="Resources\containership.ico" /> <Resource Include="Resources\containership.ico" />
<Resource Include="Resources\containership.png" /> <Resource Include="Resources\containership.png" />
<Resource Include="Resources\delete.png" />
<Resource Include="Resources\emergency_stop_button.png" /> <Resource Include="Resources\emergency_stop_button.png" />
<Resource Include="Resources\logo_bremen_calling.png" /> <Resource Include="Resources\logo_bremen_calling.png" />
<Resource Include="Resources\ship2.png" /> <Resource Include="Resources\ship2.png" />
@ -89,15 +96,20 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Extended.Wpf.Toolkit" Version="4.5.0" /> <PackageReference Include="Extended.Wpf.Toolkit" Version="4.5.1" />
<PackageReference Include="JsonSubTypes" Version="2.0.1" /> <PackageReference Include="JsonSubTypes" Version="2.0.1" />
<PackageReference Include="log4net" Version="2.0.15" /> <PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Polly" Version="7.2.3" /> <PackageReference Include="Polly" Version="7.2.4" />
<PackageReference Include="RestSharp" Version="108.0.2" /> <PackageReference Include="RestSharp" Version="110.2.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Update="Resources\Resources.Designer.cs"> <Compile Update="Resources\Resources.Designer.cs">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
@ -112,4 +124,11 @@
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
</Project> </Project>

View File

@ -69,11 +69,23 @@
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>
</ComboBox> </ComboBox>
<ComboBox x:Name="comboBoxCategories" Grid.Column="1" Margin="2" Grid.Row="1" SelectedValuePath="Key"/> <ComboBox x:Name="comboBoxCategories" Grid.Column="1" Margin="2" Grid.Row="1" SelectedValuePath="Key"/>
<xctk:DateTimePicker x:Name="datePickerETA" Grid.Column="1" Grid.Row="2" Margin="2" /> <xctk:DateTimePicker x:Name="datePickerETA" Grid.Column="1" Grid.Row="2" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm"/>
<TextBox x:Name="textBoxVoyage" Grid.Column="1" Grid.Row="3" Margin="2" VerticalContentAlignment="Center" /> <TextBox x:Name="textBoxVoyage" Grid.Column="1" Grid.Row="3" Margin="2" VerticalContentAlignment="Center" />
<xctk:DateTimePicker x:Name="datePickerETD" Grid.Column="1" Grid.Row="4" Margin="2" /> <xctk:DateTimePicker x:Name="datePickerETD" Grid.Column="1" Grid.Row="4" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm"/>
<ComboBox Name="comboBoxArrivalBerth" Grid.Column="1" Grid.Row="5" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id" /> <ComboBox Name="comboBoxArrivalBerth" Grid.Column="1" Grid.Row="5" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id">
<ComboBox Name="comboBoxDepartureBerth" Grid.Column="1" Grid.Row="6" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id" /> <ComboBox.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemArrivalBerth" Click="contextMenuItemArrivalBerth_Click" />
</ContextMenu>
</ComboBox.ContextMenu>
</ComboBox>
<ComboBox Name="comboBoxDepartureBerth" Grid.Column="1" Grid.Row="6" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id">
<ComboBox.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemDepartureBerth" Click="contextMenuItemDepartureBerth_Click" />
</ContextMenu>
</ComboBox.ContextMenu>
</ComboBox>
<CheckBox x:Name="checkBoxTugRequired" Grid.Column="0" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" /> <CheckBox x:Name="checkBoxTugRequired" Grid.Column="0" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" />
<CheckBox x:Name="checkBoxPilotRequired" Grid.Column="0" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" /> <CheckBox x:Name="checkBoxPilotRequired" Grid.Column="0" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" />
<ComboBox x:Name="comboBoxPierside" Grid.Column="1" Grid.Row="9" Margin="2" > <ComboBox x:Name="comboBoxPierside" Grid.Column="1" Grid.Row="9" Margin="2" >
@ -100,20 +112,51 @@
<Label Content="{x:Static p:Resources.textMooredLock}" Grid.Column="3" Grid.Row="12" /> <Label Content="{x:Static p:Resources.textMooredLock}" Grid.Column="3" Grid.Row="12" />
<Label Content="{x:Static p:Resources.textCancelled}" Grid.Column="3" Grid.Row="13" /> <Label Content="{x:Static p:Resources.textCancelled}" Grid.Column="3" Grid.Row="13" />
<ComboBox Name="comboBoxAgency" Grid.Column="3" Grid.Row="1" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id"/> <ComboBox Name="comboBoxAgency" Grid.Column="3" Grid.Row="1" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id" SelectionChanged="comboBoxAgency_SelectionChanged">
<ComboBox Name="comboBoxMooring" Grid.Column="3" Grid.Row="2" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id"/> <ComboBox.ContextMenu>
<ComboBox Name="comboBoxPilot" Grid.Column="3" Grid.Row="3" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id"/> <ContextMenu>
<ComboBox Name="comboBoxTug" Grid.Column="3" Grid.Row="4" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id"/> <MenuItem Header="{x:Static p:Resources.textClearAssignment}" Name="contextMenuItemClearAgency" Click="contextMenuItemClearAgency_Click" />
<ComboBox Name="comboBoxTerminal" Grid.Column="3" Grid.Row="5" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id"/> </ContextMenu>
</ComboBox.ContextMenu>
</ComboBox>
<ComboBox Name="comboBoxMooring" Grid.Column="3" Grid.Row="2" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id">
<ComboBox.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearAssignment}" Name="contextMenuItemClearMooring" Click="contextMenuItemClearMooring_Click" />
</ContextMenu>
</ComboBox.ContextMenu>
</ComboBox>
<ComboBox Name="comboBoxPilot" Grid.Column="3" Grid.Row="3" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id">
<ComboBox.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearAssignment}" Name="contextMenuItemClearPilot" Click="contextMenuItemClearPilot_Click" />
</ContextMenu>
</ComboBox.ContextMenu>
</ComboBox>
<ComboBox Name="comboBoxTug" Grid.Column="3" Grid.Row="4" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id">
<ComboBox.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearAssignment}" Name="contextMenuItemClearTug" Click="contextMenuItemClearTug_Click" />
</ContextMenu>
</ComboBox.ContextMenu>
</ComboBox>
<ComboBox Name="comboBoxTerminal" Grid.Column="3" Grid.Row="5" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id">
<ComboBox.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearAssignment}" Name="contextMenuItemClearTerminal" Click="contextMenuItemClearTerminal_Click" />
</ContextMenu>
</ComboBox.ContextMenu>
</ComboBox>
<xctk:DateTimePicker Name="datePickerTidalWindowFrom" Grid.Column="3" Grid.Row="7" Margin="2" /> <xctk:DateTimePicker Name="datePickerTidalWindowFrom" Grid.Column="3" Grid.Row="7" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm"/>
<xctk:DateTimePicker Name="datePickerTidalWindowTo" Grid.Column="3" Grid.Row="8" Margin="2" /> <xctk:DateTimePicker Name="datePickerTidalWindowTo" Grid.Column="3" Grid.Row="8" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm"/>
<CheckBox x:Name="checkBoxRainsensitiveCargo" Grid.Column="2" Grid.Row="9" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" /> <CheckBox x:Name="checkBoxRainsensitiveCargo" Grid.Column="2" Grid.Row="9" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" />
<xctk:IntegerUpDown x:Name="integerUpDownRecommendedTugs" Grid.Column="3" Grid.Row="10" Minimum="0" Margin="2" /> <xctk:IntegerUpDown x:Name="integerUpDownRecommendedTugs" Grid.Column="3" Grid.Row="10" Minimum="0" Margin="2" />
<CheckBox x:Name="checkBoxAnchored" Grid.Column="2" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" /> <CheckBox x:Name="checkBoxAnchored" Grid.Column="2" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" />
<CheckBox x:Name="checkBoxMooredLock" Grid.Column="2" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" /> <CheckBox x:Name="checkBoxMooredLock" Grid.Column="2" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" />
<CheckBox x:Name="checkBoxCanceled" Grid.Column="2" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" /> <CheckBox x:Name="checkBoxCanceled" Grid.Column="2" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" />
<Label x:Name="labelBSMDGranted" Grid.Row="14" Grid.Column="1" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textBSMDGranted}" Visibility="Hidden" FontWeight="DemiBold" />
<StackPanel Grid.Row="14" Grid.Column="3" Orientation="Horizontal" HorizontalAlignment="Right"> <StackPanel Grid.Row="14" 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" /> <Button Width= "80" Margin="2" Content="{x:Static p:Resources.textOK}" x:Name="buttonOK" Click="buttonOK_Click" IsEnabled="False" />
<Button Width="80" Margin="2" Content="{x:Static p:Resources.textCancel}" x:Name="buttonCancel" Click="buttonCancel_Click"/> <Button Width="80" Margin="2" Content="{x:Static p:Resources.textCancel}" x:Name="buttonCancel" Click="buttonCancel_Click"/>

View File

@ -9,6 +9,7 @@ using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using static BreCalClient.Extensions;
namespace BreCalClient namespace BreCalClient
{ {
@ -24,12 +25,21 @@ namespace BreCalClient
#region Properties #region Properties
public Shipcall Shipcall { get; set; } = new (); public ShipcallControlModel ShipcallModel { get; set; } = new ();
/// <summary>
/// All participants
/// </summary>
public List<Participant> Participants { get; set; } = new(); public List<Participant> Participants { get; set; } = new();
/// <summary>
/// All berths
/// </summary>
public List<Berth> Berths { get; set; } = new(); public List<Berth> Berths { get; set; } = new();
/// <summary>
/// All ships
/// </summary>
public List<Ship> Ships { get; set; } = new(); public List<Ship> Ships { get; set; } = new();
public Ship? SelectedShip { public Ship? SelectedShip {
@ -53,11 +63,11 @@ namespace BreCalClient
foreach(Participant p in Participants) foreach(Participant p in Participants)
{ {
if (p.IsFlagSet(Extensions.ParticipantType.AGENCY)) aList.Add(p); if (p.IsTypeFlagSet(Extensions.ParticipantType.AGENCY)) aList.Add(p);
if (p.IsFlagSet(Extensions.ParticipantType.MOORING)) mList.Add(p); if (p.IsTypeFlagSet(Extensions.ParticipantType.MOORING)) mList.Add(p);
if (p.IsFlagSet(Extensions.ParticipantType.PILOT)) pList.Add(p); if (p.IsTypeFlagSet(Extensions.ParticipantType.PILOT)) pList.Add(p);
if (p.IsFlagSet(Extensions.ParticipantType.TUG)) tList.Add(p); if (p.IsTypeFlagSet(Extensions.ParticipantType.TUG)) tList.Add(p);
if (p.IsFlagSet(Extensions.ParticipantType.TERMINAL)) terList.Add(p); if (p.IsTypeFlagSet(Extensions.ParticipantType.TERMINAL)) terList.Add(p);
} }
this.comboBoxAgency.ItemsSource = aList; this.comboBoxAgency.ItemsSource = aList;
@ -72,6 +82,8 @@ namespace BreCalClient
this.comboBoxDepartureBerth.ItemsSource = this.Berths; this.comboBoxDepartureBerth.ItemsSource = this.Berths;
this.CopyToControls(); this.CopyToControls();
this.EnableControls();
} }
private void buttonOK_Click(object sender, RoutedEventArgs e) private void buttonOK_Click(object sender, RoutedEventArgs e)
@ -92,94 +104,179 @@ namespace BreCalClient
this.buttonOK.IsEnabled = this.comboBoxShip.SelectedItem != null; this.buttonOK.IsEnabled = this.comboBoxShip.SelectedItem != null;
} }
private void comboBoxAgency_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
this.EnableControls();
}
#endregion
#region Context menu handlers
private void contextMenuItemClearAgency_Click(object sender, RoutedEventArgs e)
{
this.comboBoxAgency.SelectedIndex = -1;
this.ShipcallModel.AssignedParticipants.Remove(Extensions.ParticipantType.AGENCY);
}
private void contextMenuItemClearMooring_Click(object sender, RoutedEventArgs e)
{
this.comboBoxMooring.SelectedIndex = -1;
this.ShipcallModel.AssignedParticipants.Remove(Extensions.ParticipantType.MOORING);
}
private void contextMenuItemClearPilot_Click(object sender, RoutedEventArgs e)
{
this.comboBoxPilot.SelectedIndex = -1;
this.ShipcallModel.AssignedParticipants.Remove(Extensions.ParticipantType.PILOT);
}
private void contextMenuItemClearTug_Click(object sender, RoutedEventArgs e)
{
this.comboBoxTug.SelectedIndex = -1;
this.ShipcallModel.AssignedParticipants.Remove(Extensions.ParticipantType.TUG);
}
private void contextMenuItemClearTerminal_Click(object sender, RoutedEventArgs e)
{
this.comboBoxTerminal.SelectedIndex = -1;
this.ShipcallModel.AssignedParticipants.Remove(Extensions.ParticipantType.TERMINAL);
}
private void contextMenuItemArrivalBerth_Click(object sender, RoutedEventArgs e)
{
this.comboBoxArrivalBerth.SelectedIndex = -1;
this.ShipcallModel.Berth = "";
}
private void contextMenuItemDepartureBerth_Click(object sender, RoutedEventArgs e)
{
this.comboBoxDepartureBerth.SelectedIndex -= 1;
}
#endregion #endregion
#region private methods #region private methods
private void CopyToModel() private void CopyToModel()
{ {
this.Shipcall.Type = (int) this.comboBoxCategories.SelectedItem; if (this.ShipcallModel.Shipcall != null)
this.Shipcall.Eta = this.datePickerETA.Value ?? DateTime.Now;
this.Shipcall.Voyage = this.textBoxVoyage.Text.Trim();
this.Shipcall.Etd = this.datePickerETD.Value ?? DateTime.Now.AddDays(1);
this.Shipcall.Anchored = this.checkBoxAnchored.IsChecked;
this.Shipcall.ShipId = ((Ship)this.comboBoxShip.SelectedItem).Id;
this.Shipcall.ArrivalBerthId = (this.comboBoxArrivalBerth.SelectedItem != null) ? ((Berth)this.comboBoxArrivalBerth.SelectedItem).Id : null;
this.Shipcall.DepartureBerthId = (this.comboBoxDepartureBerth.SelectedItem != null) ? ((Berth)this.comboBoxDepartureBerth.SelectedItem).Id : null;
this.Shipcall.Bunkering = this.checkBoxBunkering.IsChecked;
this.Shipcall.Canceled = this.checkBoxCanceled.IsChecked;
this.Shipcall.Draft = (float?) this.doubleUpDownDraft.Value;
this.Shipcall.MooredLock = this.checkBoxMooredLock.IsChecked;
this.Shipcall.RainSensitiveCargo = this.checkBoxRainsensitiveCargo.IsChecked;
this.Shipcall.PilotRequired = this.checkBoxPilotRequired.IsChecked;
this.Shipcall.ReplenishingLock = this.checkBoxReplenishingLock.IsChecked;
this.Shipcall.ReplenishingTerminal = this.checkBoxReplenishingTerminal.IsChecked;
this.Shipcall.RecommendedTugs = this.integerUpDownRecommendedTugs.Value;
this.Shipcall.TidalWindowFrom = this.datePickerTidalWindowFrom.Value;
this.Shipcall.TidalWindowTo = this.datePickerTidalWindowTo.Value;
this.Shipcall.TugRequired = this.checkBoxTugRequired.IsChecked;
if(this.comboBoxPierside.SelectedIndex >= 0)
{ {
this.Shipcall.PierSide = (this.comboBoxPierside.SelectedIndex == 0) ? true : false; this.ShipcallModel.Shipcall.Type = (int)this.comboBoxCategories.SelectedItem;
this.ShipcallModel.Shipcall.Eta = this.datePickerETA.Value ?? DateTime.Now;
this.ShipcallModel.Shipcall.Voyage = this.textBoxVoyage.Text.Trim();
this.ShipcallModel.Shipcall.Etd = this.datePickerETD.Value ?? DateTime.Now.AddDays(1);
this.ShipcallModel.Shipcall.Anchored = this.checkBoxAnchored.IsChecked;
this.ShipcallModel.Shipcall.ShipId = ((Ship)this.comboBoxShip.SelectedItem).Id;
this.ShipcallModel.Shipcall.ArrivalBerthId = (this.comboBoxArrivalBerth.SelectedItem != null) ? ((Berth)this.comboBoxArrivalBerth.SelectedItem).Id : null;
this.ShipcallModel.Shipcall.DepartureBerthId = (this.comboBoxDepartureBerth.SelectedItem != null) ? ((Berth)this.comboBoxDepartureBerth.SelectedItem).Id : null;
this.ShipcallModel.Shipcall.Bunkering = this.checkBoxBunkering.IsChecked;
this.ShipcallModel.Shipcall.Canceled = this.checkBoxCanceled.IsChecked;
this.ShipcallModel.Shipcall.Draft = (float?)this.doubleUpDownDraft.Value;
this.ShipcallModel.Shipcall.MooredLock = this.checkBoxMooredLock.IsChecked;
this.ShipcallModel.Shipcall.RainSensitiveCargo = this.checkBoxRainsensitiveCargo.IsChecked;
this.ShipcallModel.Shipcall.PilotRequired = this.checkBoxPilotRequired.IsChecked;
this.ShipcallModel.Shipcall.ReplenishingLock = this.checkBoxReplenishingLock.IsChecked;
this.ShipcallModel.Shipcall.ReplenishingTerminal = this.checkBoxReplenishingTerminal.IsChecked;
this.ShipcallModel.Shipcall.RecommendedTugs = this.integerUpDownRecommendedTugs.Value;
this.ShipcallModel.Shipcall.TidalWindowFrom = this.datePickerTidalWindowFrom.Value;
this.ShipcallModel.Shipcall.TidalWindowTo = this.datePickerTidalWindowTo.Value;
this.ShipcallModel.Shipcall.TugRequired = this.checkBoxTugRequired.IsChecked;
if (this.comboBoxPierside.SelectedIndex >= 0)
{
this.ShipcallModel.Shipcall.PierSide = (this.comboBoxPierside.SelectedIndex == 0) ? true : false;
} }
// remove all and add selected participants // remove all and add selected participants
this.Shipcall.Participants.Clear(); this.ShipcallModel.Shipcall.Participants.Clear();
Participant? participant; this.ShipcallModel.AssignedParticipants.Clear();
participant = (Participant?) this.comboBoxAgency.SelectedItem;
if (participant != null) this.Shipcall.Participants.Add(participant.Id);
participant = (Participant?) this.comboBoxMooring.SelectedItem;
if (participant != null) this.Shipcall.Participants.Add(participant.Id);
participant = (Participant?) this.comboBoxPilot.SelectedItem;
if (participant != null) this.Shipcall.Participants.Add(participant.Id);
participant = (Participant?) this.comboBoxTerminal.SelectedItem;
if (participant != null) this.Shipcall.Participants.Add(participant.Id);
participant = (Participant?) this.comboBoxTug.SelectedItem;
if (participant != null) this.Shipcall.Participants.Add(participant.Id);
// BSMD and port authority are always added Participant? participant;
foreach(Participant p in Participants) participant = (Participant?)this.comboBoxAgency.SelectedItem;
if (participant != null)
{ {
if(p.Type == (int) Extensions.ParticipantType.PORT_ADMINISTRATION) this.Shipcall.Participants.Add(p.Id); this.ShipcallModel.Shipcall.Participants.Add(participant.Id);
if (p.Type == (int)Extensions.ParticipantType.BSMD) this.Shipcall.Participants.Add(p.Id); this.ShipcallModel.AssignedParticipants[Extensions.ParticipantType.AGENCY] = participant;
}
participant = (Participant?)this.comboBoxMooring.SelectedItem;
if (participant != null)
{
this.ShipcallModel.Shipcall.Participants.Add(participant.Id);
this.ShipcallModel.AssignedParticipants[Extensions.ParticipantType.MOORING] = participant;
}
participant = (Participant?)this.comboBoxPilot.SelectedItem;
if (participant != null)
{
this.ShipcallModel.Shipcall.Participants.Add(participant.Id);
this.ShipcallModel.AssignedParticipants[Extensions.ParticipantType.PILOT] = participant;
}
participant = (Participant?)this.comboBoxTerminal.SelectedItem;
if (participant != null) {
this.ShipcallModel.Shipcall.Participants.Add(participant.Id);
this.ShipcallModel.AssignedParticipants[Extensions.ParticipantType.TERMINAL] = participant;
}
participant = (Participant?)this.comboBoxTug.SelectedItem;
if (participant != null) {
this.ShipcallModel.Shipcall.Participants.Add(participant.Id);
this.ShipcallModel.AssignedParticipants[Extensions.ParticipantType.TUG] = participant;
} }
// BSMD and port authority are always added
foreach (Participant p in Participants)
{
if (p.Type == (int)Extensions.ParticipantType.PORT_ADMINISTRATION)
{
this.ShipcallModel.Shipcall.Participants.Add(p.Id);
this.ShipcallModel.AssignedParticipants[Extensions.ParticipantType.PORT_ADMINISTRATION] = p;
}
if (p.Type == (int)Extensions.ParticipantType.BSMD)
{
this.ShipcallModel.Shipcall.Participants.Add(p.Id);
this.ShipcallModel.AssignedParticipants[Extensions.ParticipantType.BSMD] = p;
}
}
}
} }
private void CopyToControls() private void CopyToControls()
{ {
if (this.Shipcall == null) return; if (this.ShipcallModel == null) return;
this.comboBoxCategories.SelectedItem = (Extensions.TypeEnum) this.Shipcall.Type; if (this.ShipcallModel.Shipcall != null)
if(this.Shipcall.Eta != DateTime.MinValue)
this.datePickerETA.Value = this.Shipcall.Eta;
this.textBoxVoyage.Text = this.Shipcall.Voyage;
this.datePickerETD.Value = this.Shipcall.Etd;
this.checkBoxAnchored.IsChecked = this.Shipcall.Anchored;
this.comboBoxShip.SelectedValue = this.Shipcall.ShipId;
this.comboBoxArrivalBerth.SelectedValue = this.Shipcall.ArrivalBerthId;
this.comboBoxDepartureBerth.SelectedValue = this.Shipcall.DepartureBerthId;
this.checkBoxBunkering.IsChecked = this.Shipcall.Bunkering;
this.checkBoxCanceled.IsChecked = this.Shipcall.Canceled;
this.doubleUpDownDraft.Value = this.Shipcall.Draft;
this.checkBoxMooredLock.IsChecked = this.Shipcall.MooredLock;
this.checkBoxRainsensitiveCargo.IsChecked = this.Shipcall.RainSensitiveCargo;
this.checkBoxPilotRequired.IsChecked = this.Shipcall.PilotRequired;
this.checkBoxReplenishingLock.IsChecked = this.Shipcall.ReplenishingLock;
this.checkBoxReplenishingTerminal.IsChecked = this.Shipcall.ReplenishingTerminal;
this.integerUpDownRecommendedTugs.Value = this.Shipcall.RecommendedTugs;
this.datePickerTidalWindowFrom.Value = this.Shipcall.TidalWindowFrom;
this.datePickerTidalWindowTo.Value = this.Shipcall.TidalWindowTo;
this.checkBoxTugRequired.IsChecked = this.Shipcall.TugRequired;
if(this.Shipcall.PierSide.HasValue)
{ {
if (this.Shipcall.PierSide.Value) this.comboBoxPierside.SelectedIndex = 0; this.comboBoxCategories.SelectedItem = (Extensions.TypeEnum)this.ShipcallModel.Shipcall.Type;
if (this.ShipcallModel.Shipcall.Eta != DateTime.MinValue)
this.datePickerETA.Value = this.ShipcallModel.Shipcall.Eta;
this.textBoxVoyage.Text = this.ShipcallModel.Shipcall.Voyage;
this.datePickerETD.Value = this.ShipcallModel.Shipcall.Etd;
this.checkBoxAnchored.IsChecked = this.ShipcallModel.Shipcall.Anchored;
this.comboBoxShip.SelectedValue = this.ShipcallModel.Shipcall.ShipId;
this.comboBoxArrivalBerth.SelectedValue = this.ShipcallModel.Shipcall.ArrivalBerthId;
this.comboBoxDepartureBerth.SelectedValue = this.ShipcallModel.Shipcall.DepartureBerthId;
this.checkBoxBunkering.IsChecked = this.ShipcallModel.Shipcall.Bunkering;
this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled;
this.doubleUpDownDraft.Value = this.ShipcallModel.Shipcall.Draft;
this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock;
this.checkBoxRainsensitiveCargo.IsChecked = this.ShipcallModel.Shipcall.RainSensitiveCargo;
this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired;
this.checkBoxReplenishingLock.IsChecked = this.ShipcallModel.Shipcall.ReplenishingLock;
this.checkBoxReplenishingTerminal.IsChecked = this.ShipcallModel.Shipcall.ReplenishingTerminal;
this.integerUpDownRecommendedTugs.Value = this.ShipcallModel.Shipcall.RecommendedTugs;
this.datePickerTidalWindowFrom.Value = this.ShipcallModel.Shipcall.TidalWindowFrom;
this.datePickerTidalWindowTo.Value = this.ShipcallModel.Shipcall.TidalWindowTo;
this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired;
if (this.ShipcallModel.Shipcall.PierSide.HasValue)
{
if (this.ShipcallModel.Shipcall.PierSide.Value) this.comboBoxPierside.SelectedIndex = 0;
else this.comboBoxPierside.SelectedIndex = 1; else this.comboBoxPierside.SelectedIndex = 1;
} }
if (this.Shipcall.Participants == null) this.Shipcall.Participants = new(); if (this.ShipcallModel.Shipcall.Participants == null) this.ShipcallModel.Shipcall.Participants = new();
foreach(int participant_id in this.Shipcall.Participants) // Hier wird noch ein Problem vergessen: Wenn ein Participant mehrere Types gleichzeitig ist und es einen weitere Participant mit diesem Type gibt
// müsste der "einzelne" Participant für die Rolle ausgewählt werden. (Angenommen ein Test-Teilnehmer hat "alle" Rollen..)
foreach (int participant_id in this.ShipcallModel.Shipcall.Participants)
{ {
if (((List<Participant>)this.comboBoxAgency.ItemsSource).Any(x => x.Id == participant_id)) this.comboBoxAgency.SelectedValue = participant_id; if (((List<Participant>)this.comboBoxAgency.ItemsSource).Any(x => x.Id == participant_id)) this.comboBoxAgency.SelectedValue = participant_id;
if (((List<Participant>)this.comboBoxMooring.ItemsSource).Any(x => x.Id == participant_id)) this.comboBoxMooring.SelectedValue = participant_id; if (((List<Participant>)this.comboBoxMooring.ItemsSource).Any(x => x.Id == participant_id)) this.comboBoxMooring.SelectedValue = participant_id;
@ -187,7 +284,59 @@ namespace BreCalClient
if (((List<Participant>)this.comboBoxTerminal.ItemsSource).Any(x => x.Id == participant_id)) this.comboBoxTerminal.SelectedValue = participant_id; if (((List<Participant>)this.comboBoxTerminal.ItemsSource).Any(x => x.Id == participant_id)) this.comboBoxTerminal.SelectedValue = participant_id;
if (((List<Participant>)this.comboBoxTug.ItemsSource).Any(x => x.Id == participant_id)) this.comboBoxTug.SelectedValue = participant_id; if (((List<Participant>)this.comboBoxTug.ItemsSource).Any(x => x.Id == participant_id)) this.comboBoxTug.SelectedValue = participant_id;
} }
}
}
private void EnableControls()
{
bool isBsmd = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD);
bool isAgency = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY);
bool editRightGrantedForBSMD = false;
// Special case: Selected Agency allows BSMD to edit their fields
if (this.comboBoxAgency.SelectedIndex >= 0)
{
int agencyParticipantId = (int)this.comboBoxAgency.SelectedValue;
Participant? p = this.Participants.Find(x => x.Id == agencyParticipantId);
if (p != null)
{
if(p.IsFlagSet(ParticipantFlag.ALLOW_BSMD) && isBsmd)
isAgency = true;
if(p.IsFlagSet(ParticipantFlag.ALLOW_BSMD))
editRightGrantedForBSMD = true;
}
}
this.comboBoxAgency.IsEnabled = isBsmd;
this.comboBoxArrivalBerth.IsEnabled = isBsmd || isAgency;
this.comboBoxCategories.IsEnabled = isBsmd;
this.comboBoxDepartureBerth.IsEnabled = isBsmd || isAgency;
this.checkBoxAnchored.IsEnabled = isAgency;
this.checkBoxBunkering.IsEnabled = isAgency;
this.checkBoxCanceled.IsEnabled = isBsmd || isAgency;
this.checkBoxMooredLock.IsEnabled = isAgency;
this.checkBoxPilotRequired.IsEnabled = isAgency;
this.checkBoxRainsensitiveCargo.IsEnabled = isAgency;
this.checkBoxReplenishingLock.IsEnabled = isAgency;
this.checkBoxReplenishingTerminal.IsEnabled = isAgency;
this.checkBoxTugRequired.IsEnabled = isAgency;
this.comboBoxMooring.IsEnabled = isBsmd;
this.comboBoxPierside.IsEnabled = isAgency;
this.comboBoxPilot.IsEnabled = isAgency;
this.comboBoxShip.IsEnabled = isBsmd;
this.comboBoxMooring.IsEnabled = isAgency;
this.comboBoxTerminal.IsEnabled = isAgency;
this.comboBoxTug.IsEnabled = isAgency;
this.datePickerETA.IsEnabled = isAgency || isBsmd;
this.datePickerETD.IsEnabled = isAgency;
this.textBoxVoyage.IsEnabled = isAgency;
this.datePickerTidalWindowFrom.IsEnabled = isAgency;
this.datePickerTidalWindowTo.IsEnabled = isAgency;
this.integerUpDownRecommendedTugs.IsEnabled = isAgency;
this.doubleUpDownDraft.IsEnabled = isAgency || isBsmd;
this.labelBSMDGranted.Visibility = editRightGrantedForBSMD ? Visibility.Visible : Visibility.Hidden;
} }
#endregion #endregion

View File

@ -8,7 +8,7 @@
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient" xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d" mc:Ignorable="d"
Title="{x:Static p:Resources.textEditTimes}" Height="320" Width="400" Loaded="Window_Loaded" ResizeMode="NoResize" Icon="Resources/containership.ico"> Title="{x:Static p:Resources.textEditTimes}" Height="265" Width="400" Loaded="Window_Loaded" ResizeMode="NoResize" Icon="Resources/containership.ico">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width=".25*" /> <ColumnDefinition Width=".25*" />
@ -21,8 +21,6 @@
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="56" /> <RowDefinition Height="56" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
@ -31,22 +29,60 @@
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textETDBerth}" HorizontalContentAlignment="Right" /> <Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textETDBerth}" HorizontalContentAlignment="Right" />
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textLockTime}" HorizontalContentAlignment="Right" /> <Label Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textLockTime}" HorizontalContentAlignment="Right" />
<Label Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textZoneEntryTime}" HorizontalContentAlignment="Right" /> <Label Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textZoneEntryTime}" HorizontalContentAlignment="Right" />
<Label Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textOperationsStart}" HorizontalContentAlignment="Right" />
<Label Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textOperationsEnd}" HorizontalContentAlignment="Right" />
<Label Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" HorizontalContentAlignment="Right" />
<xctk:DateTimePicker IsEnabled="False" Grid.Row="1" Grid.Column="1" Margin="2" Name="datePickerETABerth" /> <Label Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" HorizontalContentAlignment="Right" />
<xctk:DateTimePicker IsEnabled="False" Grid.Row="1" Grid.Column="1" Margin="2" Name="datePickerETABerth" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
<xctk:DateTimePicker.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearETA" Click="contextMenuItemClearETA_Click" >
<MenuItem.Icon>
<Image Source="Resources\delete.png" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</xctk:DateTimePicker.ContextMenu>
</xctk:DateTimePicker>
<CheckBox IsEnabled="False" Grid.Row="1" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxEtaBerthFixed" VerticalAlignment="Center" /> <CheckBox IsEnabled="False" Grid.Row="1" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxEtaBerthFixed" VerticalAlignment="Center" />
<xctk:DateTimePicker IsEnabled="False" Grid.Row="2" Grid.Column="1" Margin="2" Name="datePickerETDBerth" /> <xctk:DateTimePicker IsEnabled="False" Grid.Row="2" Grid.Column="1" Margin="2" Name="datePickerETDBerth" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
<xctk:DateTimePicker.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearETD" Click="contextMenuItemClearETD_Click" >
<MenuItem.Icon>
<Image Source="Resources\delete.png" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</xctk:DateTimePicker.ContextMenu>
</xctk:DateTimePicker>
<CheckBox IsEnabled="False" Grid.Row="2" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxEtDBerthFixed" VerticalAlignment="Center" /> <CheckBox IsEnabled="False" Grid.Row="2" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxEtDBerthFixed" VerticalAlignment="Center" />
<xctk:DateTimePicker IsEnabled="False" Grid.Row="3" Grid.Column="1" Margin="2" Name="datePickerLockTime" /> <xctk:DateTimePicker IsEnabled="False" Grid.Row="3" Grid.Column="1" Margin="2" Name="datePickerLockTime" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
<xctk:DateTimePicker.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearLockTime" Click="contextMenuItemClearLockTime_Click" >
<MenuItem.Icon>
<Image Source="Resources\delete.png" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</xctk:DateTimePicker.ContextMenu>
</xctk:DateTimePicker>
<CheckBox IsEnabled="False" Grid.Row="3" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxLockTimeFixed" VerticalAlignment="Center" /> <CheckBox IsEnabled="False" Grid.Row="3" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxLockTimeFixed" VerticalAlignment="Center" />
<xctk:DateTimePicker IsEnabled="False" Grid.Row="4" Grid.Column="1" Margin="2" Name="datePickerZoneEntry" /> <xctk:DateTimePicker IsEnabled="False" Grid.Row="4" Grid.Column="1" Margin="2" Name="datePickerZoneEntry" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
<xctk:DateTimePicker.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearZoneEntry" Click="contextMenuItemClearZoneEntry_Click" >
<MenuItem.Icon>
<Image Source="Resources\delete.png" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</xctk:DateTimePicker.ContextMenu>
</xctk:DateTimePicker>
<CheckBox IsEnabled="False" Grid.Row="4" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxZoneEntryFixed" VerticalAlignment="Center" /> <CheckBox IsEnabled="False" Grid.Row="4" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxZoneEntryFixed" VerticalAlignment="Center" />
<xctk:DateTimePicker IsEnabled="False" Grid.Row="5" Grid.Column="1" Margin="2" Name="datePickerOperationStart" />
<xctk:DateTimePicker IsEnabled="False" Grid.Row="6" Grid.Column="1" Margin="2" Name="datePickerOperationEnd" /> <TextBox Grid.Row="5" Grid.Column="1" Margin="2" Name="textBoxRemarks" TextWrapping="Wrap" AcceptsReturn="True" SpellCheck.IsEnabled="True" AcceptsTab="True" />
<TextBox Grid.Row="7" Grid.Column="1" Margin="2" Name="textBoxRemarks" TextWrapping="Wrap" AcceptsReturn="True" SpellCheck.IsEnabled="True" AcceptsTab="True" /> <StackPanel Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
<StackPanel Grid.Row="8" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Width= "80" Margin="2" Content="{x:Static p:Resources.textOK}" x:Name="buttonOK" Click="buttonOK_Click" /> <Button Width= "80" Margin="2" Content="{x:Static p:Resources.textOK}" x:Name="buttonOK" Click="buttonOK_Click" />
<Button Width="80" Margin="2" Content="{x:Static p:Resources.textCancel}" x:Name="buttonCancel" Click="buttonCancel_Click"/> <Button Width="80" Margin="2" Content="{x:Static p:Resources.textCancel}" x:Name="buttonCancel" Click="buttonCancel_Click"/>
</StackPanel> </StackPanel>

View File

@ -11,7 +11,7 @@ namespace BreCalClient
/// <summary> /// <summary>
/// Interaction logic for EditTimesControl.xaml /// Interaction logic for EditTimesControl.xaml
/// </summary> /// </summary>
public partial class EditTimesControl : Window public partial class EditTimesControl : Window, IEditTimesControl
{ {
#region Construction #region Construction
@ -37,28 +37,25 @@ namespace BreCalClient
{ {
this.CopyToControls(); this.CopyToControls();
// enable controls according to participant type // enable controls according to participant type
this.datePickerETABerth.IsEnabled = App.Participant.IsFlagSet(Extensions.ParticipantType.AGENCY) || this.datePickerETABerth.IsEnabled = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY) ||
App.Participant.IsFlagSet(Extensions.ParticipantType.MOORING) || App.Participant.IsTypeFlagSet(Extensions.ParticipantType.MOORING) ||
App.Participant.IsFlagSet(Extensions.ParticipantType.PILOT) || App.Participant.IsTypeFlagSet(Extensions.ParticipantType.PILOT) ||
App.Participant.IsFlagSet(Extensions.ParticipantType.PORT_ADMINISTRATION) || App.Participant.IsTypeFlagSet(Extensions.ParticipantType.PORT_ADMINISTRATION) ||
App.Participant.IsFlagSet(Extensions.ParticipantType.TUG); App.Participant.IsTypeFlagSet(Extensions.ParticipantType.TUG);
this.checkBoxEtaBerthFixed.IsEnabled = this.datePickerETABerth.IsEnabled; this.checkBoxEtaBerthFixed.IsEnabled = this.datePickerETABerth.IsEnabled;
this.datePickerETDBerth.IsEnabled = this.datePickerETABerth.IsEnabled; this.datePickerETDBerth.IsEnabled = this.datePickerETABerth.IsEnabled;
this.checkBoxEtDBerthFixed.IsEnabled = this.datePickerETABerth.IsEnabled; this.checkBoxEtDBerthFixed.IsEnabled = this.datePickerETABerth.IsEnabled;
this.datePickerLockTime.IsEnabled = App.Participant.IsFlagSet(Extensions.ParticipantType.AGENCY) || this.datePickerLockTime.IsEnabled = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY) ||
App.Participant.IsFlagSet(Extensions.ParticipantType.MOORING) || App.Participant.IsTypeFlagSet(Extensions.ParticipantType.MOORING) ||
App.Participant.IsFlagSet(Extensions.ParticipantType.PORT_ADMINISTRATION); App.Participant.IsTypeFlagSet(Extensions.ParticipantType.PORT_ADMINISTRATION);
this.checkBoxLockTimeFixed.IsEnabled = this.datePickerLockTime.IsEnabled; this.checkBoxLockTimeFixed.IsEnabled = this.datePickerLockTime.IsEnabled;
this.datePickerZoneEntry.IsEnabled = App.Participant.IsFlagSet(Extensions.ParticipantType.AGENCY) || this.datePickerZoneEntry.IsEnabled = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY) ||
App.Participant.IsFlagSet(Extensions.ParticipantType.PILOT); App.Participant.IsTypeFlagSet(Extensions.ParticipantType.PILOT);
this.checkBoxZoneEntryFixed.IsEnabled = this.datePickerZoneEntry.IsEnabled; this.checkBoxZoneEntryFixed.IsEnabled = this.datePickerZoneEntry.IsEnabled;
this.datePickerOperationStart.IsEnabled = App.Participant.IsFlagSet(Extensions.ParticipantType.TERMINAL);
this.datePickerOperationEnd.IsEnabled = App.Participant.IsFlagSet(Extensions.ParticipantType.TERMINAL);
} }
private void buttonOK_Click(object sender, RoutedEventArgs e) private void buttonOK_Click(object sender, RoutedEventArgs e)
@ -85,8 +82,7 @@ namespace BreCalClient
this.Times.EtdBerth = this.datePickerETDBerth.Value; this.Times.EtdBerth = this.datePickerETDBerth.Value;
this.Times.LockTime = this.datePickerLockTime.Value; this.Times.LockTime = this.datePickerLockTime.Value;
this.Times.ZoneEntry = this.datePickerZoneEntry.Value; this.Times.ZoneEntry = this.datePickerZoneEntry.Value;
this.Times.OperationsStart = this.datePickerOperationStart.Value;
this.Times.OperationsEnd = this.datePickerOperationEnd.Value;
this.Times.EtaBerthFixed = this.checkBoxEtaBerthFixed.IsChecked; this.Times.EtaBerthFixed = this.checkBoxEtaBerthFixed.IsChecked;
this.Times.EtdBerthFixed = this.checkBoxEtDBerthFixed.IsChecked; this.Times.EtdBerthFixed = this.checkBoxEtDBerthFixed.IsChecked;
this.Times.LockTimeFixed = this.checkBoxLockTimeFixed.IsChecked; this.Times.LockTimeFixed = this.checkBoxLockTimeFixed.IsChecked;
@ -100,8 +96,7 @@ namespace BreCalClient
this.datePickerETDBerth.Value = this.Times.EtdBerth; this.datePickerETDBerth.Value = this.Times.EtdBerth;
this.datePickerLockTime.Value = this.Times.LockTime; this.datePickerLockTime.Value = this.Times.LockTime;
this.datePickerZoneEntry.Value = this.Times.ZoneEntry; this.datePickerZoneEntry.Value = this.Times.ZoneEntry;
this.datePickerOperationStart.Value = this.Times.OperationsStart;
this.datePickerOperationEnd.Value = this.Times.OperationsEnd;
this.checkBoxEtaBerthFixed.IsChecked = this.Times.EtaBerthFixed; this.checkBoxEtaBerthFixed.IsChecked = this.Times.EtaBerthFixed;
this.checkBoxEtDBerthFixed.IsChecked = this.Times.EtdBerthFixed; this.checkBoxEtDBerthFixed.IsChecked = this.Times.EtdBerthFixed;
this.checkBoxLockTimeFixed.IsChecked = this.Times.LockTimeFixed; this.checkBoxLockTimeFixed.IsChecked = this.Times.LockTimeFixed;
@ -110,5 +105,29 @@ namespace BreCalClient
#endregion #endregion
#region clear value event handler
private void contextMenuItemClearETA_Click(object sender, RoutedEventArgs e)
{
this.datePickerETABerth.Value = null;
}
private void contextMenuItemClearETD_Click(object sender, RoutedEventArgs e)
{
this.datePickerETDBerth.Value = null;
}
private void contextMenuItemClearLockTime_Click(object sender, RoutedEventArgs e)
{
this.datePickerLockTime.Value = null;
}
private void contextMenuItemClearZoneEntry_Click(object sender, RoutedEventArgs e)
{
this.datePickerZoneEntry.Value = null;
}
#endregion
} }
} }

View File

@ -0,0 +1,76 @@
<Window x:Class="BreCalClient.EditTimesTerminalControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:p = "clr-namespace:BreCalClient.Resources"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:BreCalClient"
mc:Ignorable="d"
Title="{x:Static p:Resources.textEditTimes}" Loaded="Window_Loaded" Height="295" Width="400" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=".4*" />
<ColumnDefinition Width=".6*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="56" />
<RowDefinition Height="56" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textOperationsStart}" HorizontalContentAlignment="Right" />
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textOperationsEnd}" HorizontalContentAlignment="Right" />
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textBerth}" HorizontalAlignment="Right" />
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textRotated}" HorizontalContentAlignment="Right" />
<Label Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textBerthRemarks}" HorizontalContentAlignment="Right" />
<Label Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" HorizontalContentAlignment="Right" />
<xctk:DateTimePicker Grid.Row="0" Grid.Column="1" Margin="2" Name="datePickerOperationStart" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
<xctk:DateTimePicker.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearOperationStart" Click="contextMenuItemClearOperationStart_Click" >
<MenuItem.Icon>
<Image Source="Resources\delete.png" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</xctk:DateTimePicker.ContextMenu>
</xctk:DateTimePicker>
<xctk:DateTimePicker Grid.Row="1" Grid.Column="1" Margin="2" Name="datePickerOperationEnd" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
<xctk:DateTimePicker.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearOperationEnd" Click="contextMenuItemClearOperationEnd_Click" >
<MenuItem.Icon>
<Image Source="Resources\delete.png" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</xctk:DateTimePicker.ContextMenu>
</xctk:DateTimePicker>
<ComboBox Name="comboBoxBerth" Grid.Column="1" Grid.Row="2" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id">
<ComboBox.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemBerth" Click="contextMenuItemBerth_Click" />
</ContextMenu>
</ComboBox.ContextMenu>
</ComboBox>
<ComboBox x:Name="comboBoxPierside" Grid.Column="1" Grid.Row="3" Margin="2" >
<ComboBoxItem Content="{x:Static p:Resources.textNotRotated}" />
<ComboBoxItem Content="{x:Static p:Resources.textRotated}" />
</ComboBox>
<TextBox Grid.Row="4" Grid.Column="1" Margin="2" Name="textBoxBerthRemarks" TextWrapping="Wrap" AcceptsReturn="True" SpellCheck.IsEnabled="True" AcceptsTab="True" />
<TextBox Grid.Row="5" Grid.Column="1" Margin="2" Name="textBoxRemarks" TextWrapping="Wrap" AcceptsReturn="True" SpellCheck.IsEnabled="True" AcceptsTab="True" />
<StackPanel Grid.Row="6" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Width= "80" Margin="2" Content="{x:Static p:Resources.textOK}" x:Name="buttonOK" Click="buttonOK_Click" />
<Button Width="80" Margin="2" Content="{x:Static p:Resources.textCancel}" x:Name="buttonCancel" Click="buttonCancel_Click"/>
</StackPanel>
</Grid>
</Window>

View File

@ -0,0 +1,110 @@
// Copyright (c) 2023 schick Informatik
// Description: Terminals have all different fields so a different dialog
//
using BreCalClient.misc.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace BreCalClient
{
/// <summary>
/// Interaction logic for EditTimesTerminalControl.xaml
/// </summary>
public partial class EditTimesTerminalControl : Window, IEditTimesControl
{
public EditTimesTerminalControl()
{
InitializeComponent();
}
#region Properties
public Times Times { get; set; } = new();
public List<Berth> Berths { get; set; }
#endregion
#region event handler
private void Window_Loaded(object sender, RoutedEventArgs e)
{
this.comboBoxBerth.ItemsSource = this.Berths;
this.CopyToControls();
}
private void contextMenuItemClearOperationStart_Click(object sender, RoutedEventArgs e)
{
this.datePickerOperationStart.Value = null;
}
private void contextMenuItemClearOperationEnd_Click(object sender, RoutedEventArgs e)
{
this.datePickerOperationEnd.Value = null;
}
private void contextMenuItemBerth_Click(object sender, RoutedEventArgs e)
{
this.comboBoxBerth.SelectedIndex -= 1;
}
private void buttonOK_Click(object sender, RoutedEventArgs e)
{
this.CopyToModel();
this.DialogResult = true;
this.Close();
}
private void buttonCancel_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = false;
this.Close();
}
#endregion
#region private methods
private void CopyToModel()
{
switch(this.comboBoxPierside.SelectedIndex)
{
case 0: this.Times.PierSide = true; break;
case 1: this.Times.PierSide= false; break;
default: this.Times.PierSide = null; break;
}
this.Times.OperationsStart = this.datePickerOperationStart.Value;
this.Times.OperationsEnd = this.datePickerOperationEnd.Value;
this.Times.BerthId = (this.comboBoxBerth.SelectedItem != null) ? ((Berth)this.comboBoxBerth.SelectedItem).Id : null;
this.Times.Remarks = this.textBoxRemarks.Text.Trim();
this.Times.BerthInfo = this.textBoxBerthRemarks.Text.Trim();
}
private void CopyToControls()
{
this.datePickerOperationStart.Value = this.Times.OperationsStart;
this.datePickerOperationEnd.Value = this.Times.OperationsEnd;
if(this.Times.PierSide == null) { this.comboBoxPierside.SelectedIndex = -1; }
else this.comboBoxPierside.SelectedIndex = (this.Times.PierSide ?? false) ? 0 : 1;
this.comboBoxBerth.SelectedValue = this.Times.BerthId;
this.textBoxRemarks.Text = this.Times.Remarks;
this.textBoxBerthRemarks.Text = this.Times.BerthInfo;
}
#endregion
}
}

View File

@ -41,6 +41,16 @@ namespace BreCalClient
TUG = 64, TUG = 64,
} }
/// <summary>
/// Custom participant flags
/// </summary>
[Flags]
public enum ParticipantFlag
{
[Description("allow BSMD initial info")]
ALLOW_BSMD = 1,
}
/// <summary> /// <summary>
/// Should actually be defined in yaml /// Should actually be defined in yaml
/// </summary> /// </summary>
@ -51,19 +61,25 @@ namespace BreCalClient
Shifting = 3 Shifting = 3
} }
public enum SortOrder
{
SHIP_NAME,
ETA_ETD,
MODIFIED
}
#endregion #endregion
#region public helper #region public helper
public static bool IsFlagSet(this Participant participant, ParticipantType flag) public static bool IsTypeFlagSet(this Participant participant, ParticipantType flag)
{ {
return (participant.Type & (uint)flag) != 0; return (participant.Type & (uint)flag) != 0;
} }
public static void SetFlag(this Participant participant, bool value, ParticipantType flag) public static bool IsFlagSet(this Participant participant, ParticipantFlag flag)
{ {
if (value) participant.Type |= (int)flag; return (participant.Flags & (uint)flag) != 0;
else participant.Type &= (int)~flag;
} }
public static string Truncate(this string value, int maxLength) public static string Truncate(this string value, int maxLength)

View File

@ -0,0 +1,17 @@
using BreCalClient.misc.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BreCalClient
{
internal interface IEditTimesControl
{
Times Times { get; set; }
bool? ShowDialog();
}
}

View File

@ -5,6 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BreCalClient" xmlns:local="clr-namespace:BreCalClient"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:sets="clr-namespace:BreCalClient.Properties"
xmlns:p = "clr-namespace:BreCalClient.Resources" xmlns:p = "clr-namespace:BreCalClient.Resources"
mc:Ignorable="d" mc:Ignorable="d"
Title="{DynamicResource textApplicationTitle}" Height="450" Width="800" Loaded="Window_Loaded" Closing="Window_Closing" Icon="Resources/containership.ico"> Title="{DynamicResource textApplicationTitle}" Height="450" Width="800" Loaded="Window_Loaded" Closing="Window_Closing" Icon="Resources/containership.ico">
@ -57,11 +58,17 @@
<ColumnDefinition Width="60" /> <ColumnDefinition Width="60" />
<ColumnDefinition Width=".1*" /> <ColumnDefinition Width=".1*" />
<ColumnDefinition Width=".2*" /> <ColumnDefinition Width=".2*" />
<ColumnDefinition Width=".6*" /> <ColumnDefinition Width=".1*" />
<ColumnDefinition Width=".2*" />
<ColumnDefinition Width=".1*" />
<ColumnDefinition Width=".2*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Margin="2" Grid.Column="0" Content="{x:Static p:Resources.textNewDots}" x:Name="buttonNew" Visibility="Hidden" Click="buttonNew_Click" Background="Transparent"/> <Button Margin="2" Grid.Column="0" Content="{x:Static p:Resources.textNewDots}" x:Name="buttonNew" Visibility="Hidden" Click="buttonNew_Click" Background="Transparent"/>
<Label Content="{x:Static p:Resources.textSortOrder}" Grid.Column="1" HorizontalContentAlignment="Right"/> <Label Content="{x:Static p:Resources.textSortOrder}" Grid.Column="1" HorizontalContentAlignment="Right"/>
<ComboBox x:Name="comboBoxSortOrder" Margin="2" Grid.Column="2" /> <ComboBox x:Name="comboBoxSortOrder" Margin="2" Grid.Column="2" SelectionChanged="comboBoxSortOrder_SelectionChanged" />
<CheckBox x:Name="checkboxShowCancelledCalls" Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="2" Checked="checkboxShowCancelledCalls_Checked" Unchecked="checkboxShowCancelledCalls_Checked" />
<Label Content="{x:Static p:Resources.textShowCancelledShipcalls}" Grid.Column="4" />
<Button Margin="2" Grid.Column="6" Content="{x:Static p:Resources.textClearFilters}" x:Name="buttonClearFilter" Click="buttonClearFilter_Click" Background="Transparent" />
</Grid> </Grid>
<Grid Grid.Row="2"> <Grid Grid.Row="2">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -73,13 +80,13 @@
<ColumnDefinition Width=".15*" /> <ColumnDefinition Width=".15*" />
<ColumnDefinition Width=".15*" /> <ColumnDefinition Width=".15*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Grid.Column="0" Background="#203864" Foreground="White" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label> <Label Grid.Column="0" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Foreground="White" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label>
<Label Grid.Column="1" Background="#203864" Foreground="White" Content="Agent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label> <Label Grid.Column="1" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Foreground="White" Content="Agent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label>
<Label Grid.Column="2" Background="#203864" Foreground="White" Content="Festmacher" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label> <Label Grid.Column="2" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Foreground="White" Content="Festmacher" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label>
<Label Grid.Column="3" Background="#203864" Foreground="White" Content="Hafenamt" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label> <Label Grid.Column="3" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Foreground="White" Content="Hafenamt" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label>
<Label Grid.Column="4" Background="#203864" Foreground="White" Content="Lotsen" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label> <Label Grid.Column="4" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Foreground="White" Content="Lotsen" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label>
<Label Grid.Column="5" Background="#203864" Foreground="White" Content="Schlepper" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label> <Label Grid.Column="5" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Foreground="White" Content="Schlepper" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label>
<Label Grid.Column="6" Background="#203864" Foreground="White" Content="Terminal" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label> <Label Grid.Column="6" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Foreground="White" Content="Terminal" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"></Label>
</Grid> </Grid>
<ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Auto"> <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Auto">
<StackPanel x:Name="stackPanel"/> <StackPanel x:Name="stackPanel"/>

View File

@ -9,10 +9,12 @@ using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
using static BreCalClient.Extensions;
namespace BreCalClient namespace BreCalClient
{ {
@ -22,20 +24,34 @@ namespace BreCalClient
public partial class MainWindow : Window public partial class MainWindow : Window
{ {
private const int SHIPCALL_UPDATE_INTERVAL_SECONDS = 30;
#region Fields #region Fields
private const int SHIPCALL_UPDATE_INTERVAL_SECONDS = 30;
private readonly DefaultApi _api;
private readonly ObservableCollection<ShipcallControlModel> _controlModels = new(); private readonly Dictionary<int, ShipcallControlModel> _allShipcallsDict = new();
private readonly Dictionary<int, ShipcallControl> _allShipCallsControlDict = new();
private readonly List<ShipcallControlModel> _visibleControlModels = new();
private List<Ship> _ships = new(); private List<Ship> _ships = new();
private readonly ConcurrentDictionary<int, Ship> _shipLookupDict = new(); private readonly ConcurrentDictionary<int, Ship> _shipLookupDict = new();
private List<Berth> _berths = new(); private List<Berth> _berths = new();
private readonly ConcurrentDictionary<int, Berth> _berthLookupDict = new(); private readonly ConcurrentDictionary<int, Berth> _berthLookupDict = new();
private List<Participant> _participants = new(); private List<Participant> _participants = new();
private readonly Dictionary<int, Participant> _participantLookupDict = new(); private readonly Dictionary<int, Participant> _participantLookupDict = new();
private readonly Dictionary<int, ShipcallControl> _shipCallControlDict = new();
private readonly DefaultApi _api;
private readonly CancellationTokenSource _tokenSource = new(); private readonly CancellationTokenSource _tokenSource = new();
private LoginResult? _loginResult; private LoginResult? _loginResult;
private bool _refreshImmediately = false;
private bool? _showCanceled = null;
private Extensions.SortOrder? _sortOrder;
// private bool _filterChanged = false;
// private bool _sequenceChanged = false;
#endregion #endregion
@ -67,10 +83,21 @@ namespace BreCalClient
{ {
labelGeneralStatus.Text = $"Connection {ConnectionStatus.UNDEFINED}"; labelGeneralStatus.Text = $"Connection {ConnectionStatus.UNDEFINED}";
labelVersion.Text = "V. " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; labelVersion.Text = "V. " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
if (!string.IsNullOrEmpty(Properties.Settings.Default.APP_TITLE))
this.Title = Properties.Settings.Default.APP_TITLE;
searchFilterControl.SearchFilterChanged += SearchFilterControl_SearchFilterChanged;
searchFilterControl.LogoImageClicked += () =>
{
Process.Start("explorer", Properties.Settings.Default.LOGO_IMAGE_URL);
};
this.comboBoxSortOrder.ItemsSource = Enum.GetValues(typeof(Extensions.SortOrder));
} }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{ {
// serialize filter settings
Properties.Settings.Default.FilterCriteria = this.searchFilterControl.SearchFilter.Serialize();
Properties.Settings.Default.Save();
_tokenSource.Cancel(); _tokenSource.Cancel();
} }
@ -129,8 +156,16 @@ namespace BreCalClient
if (esc.ShowDialog() ?? false) if (esc.ShowDialog() ?? false)
{ {
// create UI & save new dialog model // create UI & save new dialog model
this.UpdateShipcallUI(esc.Shipcall, new List<Times>()); if (esc.ShipcallModel.Shipcall != null)
this._api.ShipcallsPost(esc.Shipcall); {
this.UpdateUI();
this._api.ShipcallsPost(esc.ShipcallModel.Shipcall); // save new ship call
this.AddShipcall(esc.ShipcallModel);
_refreshImmediately = true; // set flag to avoid timer loop termination
_tokenSource.Cancel(); // force timer loop end
}
} }
} }
@ -153,6 +188,7 @@ namespace BreCalClient
try try
{ {
await _api.UserPutAsync(ud); await _api.UserPutAsync(ud);
MessageBox.Show(BreCalClient.Resources.Resources.textPasswordChanged, BreCalClient.Resources.Resources.textConfirmation, MessageBoxButton.OK, MessageBoxImage.Information);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -166,9 +202,35 @@ namespace BreCalClient
ad.ShowDialog(); ad.ShowDialog();
} }
private void buttonClearFilter_Click(object sender, RoutedEventArgs e)
{
this.searchFilterControl.ClearFilters();
this.checkboxShowCancelledCalls.IsChecked = false;
this.FilterShipcalls();
}
private void SearchFilterControl_SearchFilterChanged()
{
this.FilterShipcalls();
this.UpdateUI();
}
private void checkboxShowCancelledCalls_Checked(object sender, RoutedEventArgs e)
{
this._showCanceled = this.checkboxShowCancelledCalls.IsChecked;
this.SearchFilterControl_SearchFilterChanged();
}
private void comboBoxSortOrder_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
_sortOrder = (Extensions.SortOrder) this.comboBoxSortOrder.SelectedIndex;
this.FilterShipcalls();
this.UpdateUI();
}
#endregion #endregion
#region private methods #region network operations
private async void LoadStaticLists() private async void LoadStaticLists()
{ {
@ -190,24 +252,26 @@ namespace BreCalClient
App.Participant = participant; App.Participant = participant;
EnableControlsForParticipant(); EnableControlsForParticipant();
} }
if(participant.IsFlagSet(Extensions.ParticipantType.AGENCY)) if(participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY))
agencies.Add(participant); agencies.Add(participant);
} }
this.searchFilterControl.SetAgencies(agencies); this.searchFilterControl.SetAgencies(agencies);
_ = Task.Run(() => RefreshShipcalls()); if (!string.IsNullOrEmpty(Properties.Settings.Default.FilterCriteria))
{
SearchFilterModel? sfm = SearchFilterModel.Deserialize(Properties.Settings.Default.FilterCriteria);
if (sfm != null)
this.searchFilterControl.SetFilterFromModel(sfm);
} }
private void EnableControlsForParticipant() _ = Task.Run(() => RefreshShipcalls());
{
if (App.Participant.IsFlagSet(Extensions.ParticipantType.BSMD))
this.buttonNew.Visibility = Visibility.Visible;
} }
public async Task RefreshShipcalls() public async Task RefreshShipcalls()
{ {
while (!_tokenSource.Token.IsCancellationRequested) while (!_tokenSource.Token.IsCancellationRequested || _refreshImmediately)
{ {
_refreshImmediately = false;
List<Shipcall>? shipcalls = null; List<Shipcall>? shipcalls = null;
try try
{ {
@ -226,98 +290,224 @@ namespace BreCalClient
labelStatusBar.Text = ex.Message; labelStatusBar.Text = ex.Message;
})); }));
} }
if (shipcalls != null) if (shipcalls != null)
{ {
foreach (Shipcall shipcall in shipcalls) foreach (Shipcall shipcall in shipcalls)
{ {
// load times for each shipcall
List<Times> currentTimes = await _api.TimesGetAsync(shipcall.Id); List<Times> currentTimes = await _api.TimesGetAsync(shipcall.Id);
this.UpdateShipcallUI(shipcall, currentTimes); if(!_allShipcallsDict.ContainsKey(shipcall.Id))
}
List<ShipcallControl> removeList = new();
foreach (ShipcallControlModel scm in this._controlModels)
{ {
if (shipcalls.Find(s => s.Id == scm.Shipcall?.Id) == null) // the model is no longer in the search result // add entry
ShipcallControlModel scm = new()
{ {
if((scm.Shipcall != null) && this._shipCallControlDict.ContainsKey(scm.Shipcall.Id)) Shipcall = shipcall,
{ Times = currentTimes
this.Dispatcher.Invoke((Action)(() => };
{ this.AddShipcall(scm);
this.stackPanel.Children.Remove(this._shipCallControlDict[scm.Shipcall.Id]);
}));
this._shipCallControlDict.Remove(scm.Shipcall.Id);
}
}
}
}
await Task.Delay(TimeSpan.FromSeconds(SHIPCALL_UPDATE_INTERVAL_SECONDS), _tokenSource.Token);
}
}
private void UpdateShipcallUI(Shipcall shipcall, List<Times> times)
{
ShipcallControlModel? selectedSCMModel = null;
foreach (ShipcallControlModel scm in this._controlModels)
{
if (scm.Shipcall?.Id == shipcall.Id)
{
selectedSCMModel = scm;
break;
}
}
if (selectedSCMModel != null)
{
selectedSCMModel.Shipcall = shipcall;
selectedSCMModel.Times = times;
} }
else else
{ {
// no: create new entry // update entry
selectedSCMModel = new() _allShipcallsDict[shipcall.Id].Shipcall = shipcall;
{ _allShipcallsDict[shipcall.Id].Times = currentTimes;
Shipcall = shipcall, this.UpdateShipcall(_allShipcallsDict[shipcall.Id]);
Times = times }
}; }
if (this._shipLookupDict.ContainsKey(shipcall.ShipId))
selectedSCMModel.Ship = this._shipLookupDict[shipcall.ShipId];
if (this._berthLookupDict.ContainsKey(shipcall.ArrivalBerthId ?? 0))
selectedSCMModel.Berth = this._berthLookupDict[shipcall.ArrivalBerthId ?? 0].Name;
_controlModels.Add(selectedSCMModel); List<int> existingIds = new(this._allShipcallsDict.Keys);
this.Dispatcher.Invoke(new Action(() =>
foreach (int existingId in existingIds)
{
if (shipcalls.Find(s => s.Id == existingId) == null) // the model is no longer in the search result
{
this.RemoveShipcall(existingId);
}
}
this.FilterShipcalls();
this.UpdateUI();
}
try
{
await Task.Delay(TimeSpan.FromSeconds(SHIPCALL_UPDATE_INTERVAL_SECONDS), _tokenSource.Token);
}
catch(TaskCanceledException) { }
}
}
#endregion
#region basic operations
private void AddShipcall(ShipcallControlModel scm)
{
if (scm.Shipcall == null) return;
_allShipcallsDict[scm.Shipcall.Id] = scm;
Shipcall shipcall = scm.Shipcall;
if (this._shipLookupDict.ContainsKey(shipcall.ShipId))
scm.Ship = this._shipLookupDict[shipcall.ShipId];
if (this._berthLookupDict.ContainsKey(shipcall.ArrivalBerthId ?? 0))
scm.Berth = this._berthLookupDict[shipcall.ArrivalBerthId ?? 0].Name;
scm.AssignParticipants(this._participants);
this.Dispatcher.Invoke(() =>
{ {
ShipcallControl sc = new() ShipcallControl sc = new()
{ {
Height = 120, Height = 120,
ShipcallControlModel = selectedSCMModel, ShipcallControlModel = scm,
ParticipantDict = _participantLookupDict ParticipantDict = _participantLookupDict,
Berths = _berths
}; };
sc.EditTimesRequested += Sc_EditTimesRequested; sc.EditTimesRequested += Sc_EditTimesRequested;
sc.EditRequested += Sc_EditRequested; sc.EditRequested += Sc_EditRequested;
this.stackPanel.Children.Add(sc); sc.RefreshData();
this._shipCallControlDict[shipcall.Id] = sc; this._allShipCallsControlDict[scm.Shipcall.Id] = sc;
});
}
private void UpdateShipcall(ShipcallControlModel scm)
{
if(scm.Shipcall == null) return;
Shipcall shipcall = scm.Shipcall;
if (this._shipLookupDict.ContainsKey(shipcall.ShipId))
scm.Ship = this._shipLookupDict[shipcall.ShipId];
if (this._berthLookupDict.ContainsKey(shipcall.ArrivalBerthId ?? 0))
scm.Berth = this._berthLookupDict[shipcall.ArrivalBerthId ?? 0].Name;
scm.AssignParticipants(this._participants);
}
private void RemoveShipcall(int shipcallId)
{
this.Dispatcher.Invoke(() =>
{
this.stackPanel.Children.Remove(this._allShipCallsControlDict[shipcallId]);
});
ShipcallControlModel removeModel = this._allShipcallsDict[shipcallId];
_visibleControlModels.Remove(removeModel);
this._allShipCallsControlDict.Remove(shipcallId);
this._allShipcallsDict.Remove(shipcallId);
}
private void FilterShipcalls()
{
SearchFilterModel sfm = this.searchFilterControl.SearchFilter;
this._visibleControlModels.Clear();
// first add everything
this._visibleControlModels.AddRange(_allShipcallsDict.Values);
// now remove elements whose filter criteria are met
if(sfm.Berths.Count > 0 )
{
this._visibleControlModels.RemoveAll(x => !sfm.Berths.Contains((x.Shipcall?.ArrivalBerthId) ?? -1));
}
if(sfm.Agencies.Count > 0 )
{
this._visibleControlModels.RemoveAll(x => !sfm.Agencies.Contains((x.GetParticipantIdForType(Extensions.ParticipantType.AGENCY)) ?? -1));
}
if(sfm.Categories.Count > 0 )
{
this._visibleControlModels.RemoveAll(x => !sfm.Categories.Contains((x.Shipcall?.Type) ?? -1));
}
if(!string.IsNullOrEmpty(sfm.SearchString))
{
this._visibleControlModels.RemoveAll(x => !x.ContainsRemarkText(sfm.SearchString));
}
if(sfm.ShipLengthTo != null)
{
this._visibleControlModels.RemoveAll(x => x.Ship?.Length > sfm.ShipLengthTo);
}
if(sfm.ShipLengthFrom != null)
{
this._visibleControlModels.RemoveAll(x => x.Ship?.Length < sfm.ShipLengthFrom);
}
if(sfm.EtaFrom != null)
{
this._visibleControlModels.RemoveAll(x => x.Shipcall?.Eta < sfm.EtaFrom);
}
if(sfm.EtaTo != null)
{
this._visibleControlModels.RemoveAll(x => x.Shipcall?.Eta > sfm.EtaTo);
}
if(!_showCanceled ?? true) // canceled calls are filtered by default
{
this._visibleControlModels.RemoveAll(x => x.Shipcall?.Canceled ?? true);
}
if (this._sortOrder != null)
{
switch(this._sortOrder)
{
case Extensions.SortOrder.SHIP_NAME:
this._visibleControlModels.Sort((x, y) => { if (x.Ship == null) return 0; if (y.Ship == null) return 0; return x.Ship.Name.CompareTo(y.Ship.Name); });
break;
case Extensions.SortOrder.MODIFIED:
this._visibleControlModels.Sort((x, y) => { if (x.Shipcall == null) return 0; if (y.Shipcall == null) return 0; return DateTime.Compare(x.Shipcall.Modified ?? x.Shipcall.Created, y.Shipcall.Modified ?? x.Shipcall.Created); });
break;
case Extensions.SortOrder.ETA_ETD:
this._visibleControlModels.Sort((x, y) =>
{
if (x.Shipcall == null) return 0;
if (y.Shipcall == null) return 0;
DateTime xDate = (x.Shipcall.Type == (int) Extensions.TypeEnum.Incoming) ? x.Shipcall.Eta : x.Shipcall.Etd ?? x.Shipcall.Eta;
DateTime yDate = (y.Shipcall.Type == (int) Extensions.TypeEnum.Incoming) ? y.Shipcall.Eta : y.Shipcall.Etd ?? y.Shipcall.Eta;
return DateTime.Compare(xDate, yDate);
});
break;
default:
break;
}
}
}
#endregion
private void UpdateUI()
{
this.Dispatcher.Invoke(new Action(() =>
{
this.stackPanel.Children.Clear();
foreach(ShipcallControlModel visibleModel in this._visibleControlModels)
{
if (visibleModel.Shipcall == null) continue; // should not happen
if(this._allShipCallsControlDict.ContainsKey(visibleModel.Shipcall.Id))
{
this._allShipCallsControlDict[visibleModel.Shipcall.Id].RefreshData();
this.stackPanel.Children.Add(this._allShipCallsControlDict[visibleModel.Shipcall.Id]);
}
}
})); }));
} }
selectedSCMModel.AssignParticipants(this._participants); #region control event handler
this.Dispatcher.Invoke((Action)(() =>
{
this._shipCallControlDict[shipcall.Id].RefreshData();
}));
}
private async void Sc_EditRequested(ShipcallControl obj) private async void Sc_EditRequested(ShipcallControl obj)
{ {
Shipcall? sc = obj.ShipcallControlModel?.Shipcall; if (obj.ShipcallControlModel != null)
if (sc != null)
{ {
EditShipcallControl esc = new() EditShipcallControl esc = new()
{ {
Shipcall = sc, ShipcallModel = obj.ShipcallControlModel,
Ships = _ships, Ships = _ships,
Participants = _participants, Participants = _participants,
Berths = _berths Berths = _berths
@ -327,8 +517,10 @@ namespace BreCalClient
{ {
try try
{ {
await _api.ShipcallsPutAsync(sc); await _api.ShipcallsPutAsync(obj.ShipcallControlModel.Shipcall);
obj.RefreshData(); obj.RefreshData();
_refreshImmediately = true;
_tokenSource.Cancel();
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -338,16 +530,23 @@ namespace BreCalClient
} }
} }
private async void Sc_EditTimesRequested(ShipcallControl obj, Times? times) private async void Sc_EditTimesRequested(ShipcallControl obj, Times? times, Extensions.ParticipantType participantType)
{ {
// show a dialog that lets the user create / update times for the given shipcall // show a dialog that lets the user create / update times for the given shipcall
EditTimesControl etc = new(); IEditTimesControl etc = (participantType == ParticipantType.TERMINAL) ? new EditTimesTerminalControl() : new EditTimesControl();
if (etc is EditTimesTerminalControl ettc)
ettc.Berths = this._berths;
bool wasEdit = false; bool wasEdit = false;
if (times != null) if (times != null)
{ {
etc.Times = times; etc.Times = times;
wasEdit = true; wasEdit = true;
} }
// actually we should only do this on create but we have existing data
etc.Times.ParticipantType = (int) participantType;
if(etc.ShowDialog() ?? false) if(etc.ShowDialog() ?? false)
{ {
try try
@ -366,7 +565,8 @@ namespace BreCalClient
await _api.TimesPostAsync(etc.Times); await _api.TimesPostAsync(etc.Times);
obj.ShipcallControlModel?.Times.Add(etc.Times); obj.ShipcallControlModel?.Times.Add(etc.Times);
} }
obj.RefreshData(); _refreshImmediately = true;
_tokenSource.Cancel();
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -375,6 +575,10 @@ namespace BreCalClient
} }
} }
#endregion
#region helper
private void ShowErrorDialog(string message, string caption) private void ShowErrorDialog(string message, string caption)
{ {
Dispatcher.Invoke(new Action(() => Dispatcher.Invoke(new Action(() =>
@ -383,6 +587,12 @@ namespace BreCalClient
})); }));
} }
private void EnableControlsForParticipant()
{
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD))
this.buttonNew.Visibility = Visibility.Visible;
}
#endregion #endregion
} }

View File

@ -5,10 +5,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<ApplicationRevision>0</ApplicationRevision> <ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>0.5.0.0</ApplicationVersion> <ApplicationVersion>0.6.0.0</ApplicationVersion>
<BootstrapperEnabled>False</BootstrapperEnabled> <BootstrapperEnabled>False</BootstrapperEnabled>
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<CreateWebPageOnPublish>True</CreateWebPageOnPublish> <CreateWebPageOnPublish>True</CreateWebPageOnPublish>
<ErrorReportUrl>http://www.textbausteine.net</ErrorReportUrl>
<GenerateManifests>true</GenerateManifests> <GenerateManifests>true</GenerateManifests>
<Install>True</Install> <Install>True</Install>
<InstallFrom>Web</InstallFrom> <InstallFrom>Web</InstallFrom>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>0.6.2.0</ApplicationVersion>
<BootstrapperEnabled>False</BootstrapperEnabled>
<Configuration>Debug</Configuration>
<CreateWebPageOnPublish>True</CreateWebPageOnPublish>
<ErrorReportUrl>http://www.textbausteine.net</ErrorReportUrl>
<GenerateManifests>true</GenerateManifests>
<Install>True</Install>
<InstallFrom>Web</InstallFrom>
<InstallUrl>https://www.bsmd-emswe.eu/testclient/</InstallUrl>
<IsRevisionIncremented>False</IsRevisionIncremented>
<IsWebBootstrapper>True</IsWebBootstrapper>
<MapFileExtensions>True</MapFileExtensions>
<OpenBrowserOnPublish>False</OpenBrowserOnPublish>
<Platform>Any CPU</Platform>
<PublishUrl>bin\publish.test\</PublishUrl>
<PublishProtocol>ClickOnce</PublishProtocol>
<PublishReadyToRun>True</PublishReadyToRun>
<PublishSingleFile>True</PublishSingleFile>
<SelfContained>True</SelfContained>
<SignatureAlgorithm>(none)</SignatureAlgorithm>
<SignManifests>False</SignManifests>
<TargetFramework>net6.0-windows</TargetFramework>
<UpdateEnabled>True</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateRequired>False</UpdateRequired>
<WebPageFileName>Publish.html</WebPageFileName>
<CreateDesktopShortcut>True</CreateDesktopShortcut>
<ErrorReportUrl>https://www.bsmd-emswe.eu/</ErrorReportUrl>
<ProductName>Bremen Calling Testclient</ProductName>
<PublisherName>Informatikbüro Daniel Schick</PublisherName>
<SuiteName>Bremen Calling</SuiteName>
<SupportUrl>http://www.textbausteine.net/</SupportUrl>
<PublishDir>bin\Debug\net6.0-windows\win-x64\app.publish\</PublishDir>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
<PublishFile Include="containership.ico">
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>true</IncludeHash>
<FileType>File</FileType>
</PublishFile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,74 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BreCalClient.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.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("https://brecal.bsmd-emswe.eu")]
public string API_URL {
get {
return ((string)(this["API_URL"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("#751D1F")]
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!!")]
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/")]
public string LOGO_IMAGE_URL {
get {
return ((string)(this["LOGO_IMAGE_URL"]));
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string FilterCriteria {
get {
return ((string)(this["FilterCriteria"]));
}
set {
this["FilterCriteria"] = value;
}
}
}
}

View File

@ -0,0 +1,21 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="BreCalClient.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="API_URL" Type="System.String" Scope="Application">
<Value Profile="(Default)">https://brecal.bsmd-emswe.eu</Value>
</Setting>
<Setting Name="BG_COLOR" Type="System.String" Scope="Application">
<Value Profile="(Default)">#751D1F</Value>
</Setting>
<Setting Name="APP_TITLE" Type="System.String" Scope="Application">
<Value Profile="(Default)">!!Bremen calling Testversion!!</Value>
</Setting>
<Setting Name="LOGO_IMAGE_URL" Type="System.String" Scope="Application">
<Value Profile="(Default)">https://www.textbausteine.net/</Value>
</Setting>
<Setting Name="FilterCriteria" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>

View File

@ -0,0 +1,40 @@
# Bremen calling WPF client
## Introduction
## API / code generation
The Rest API client is generated from the OpenAPI specification [BreCalApi.yaml](../../misc/BreCalApiyaml) into the C# file [BreCalApi.cs](../../misc/BreCalApi.cs).
In order to do so an extension for Visual Studio needs to be installed: REST API Client Code Generator for VS 2022.
https://marketplace.visualstudio.com/items?itemName=ChristianResmaHelle.ApiClientCodeGenerator2022
This extension has multiple generators, for this project OpenApiCodeGenerator is used (must be set on the yaml file in the project settings).
Internally this uses Java, currently > 55 which translates into Java JDK 17 LTS.
If code generation is not working please have a look in the output pane and select appropriate output source.
## Installation
The client is deployed via ClickOnce.
To deploy the test client, leave everything as it is in develop branch and publish using the profile [ClickOnceTestProfile.pubxml](./Properties/PublishProfiles/ClickOnceTestProfile.pubxml).
To deploy the productive version, use the profile [ClickOnceProfile.pubxml](./Properties/PublishProfiles/ClickOnceProfile.pubxml).
You will also need to change the AssemblyName in BreCalClient.csproj back to BreCalClient.
```xml
<AssemblyName>BreCalClient</AssemblyName>
```
Resources are embedded in the assembly. Therefore wherever Resources are referenced via assembly name this name has to be adjusted as well. For example:
```C++
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_right_green.png"));
```
It is debatable if the single contained file deployment makes sense at this point. Installation file size
is at about 150MB which takes a long time to upload however it should run on any current windows installation.
Theoretically it should also work on Linux.
### Signing
Currently neither assemblies nor the installation is signed. This probably only makes sense with a paid public code signing certificate.

View File

@ -83,9 +83,9 @@ namespace BreCalClient.Resources {
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Byte[]. /// Looks up a localized resource of type System.Byte[].
/// </summary> /// </summary>
public static byte[] arrow_right_blue { public static byte[] arrow_right_green {
get { get {
object obj = ResourceManager.GetObject("arrow_right_blue", resourceCulture); object obj = ResourceManager.GetObject("arrow_right_green", resourceCulture);
return ((byte[])(obj)); return ((byte[])(obj));
} }
} }
@ -93,9 +93,9 @@ namespace BreCalClient.Resources {
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Byte[]. /// Looks up a localized resource of type System.Byte[].
/// </summary> /// </summary>
public static byte[] arrow_up_green { public static byte[] arrow_up_blue {
get { get {
object obj = ResourceManager.GetObject("arrow_up_green", resourceCulture); object obj = ResourceManager.GetObject("arrow_up_blue", resourceCulture);
return ((byte[])(obj)); return ((byte[])(obj));
} }
} }
@ -150,6 +150,16 @@ namespace BreCalClient.Resources {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] delete {
get {
object obj = ResourceManager.GetObject("delete", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Byte[]. /// Looks up a localized resource of type System.Byte[].
/// </summary> /// </summary>
@ -225,6 +235,15 @@ namespace BreCalClient.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Berth remarks.
/// </summary>
public static string textBerthRemarks {
get {
return ResourceManager.GetString("textBerthRemarks", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Berths. /// Looks up a localized string similar to Berths.
/// </summary> /// </summary>
@ -234,6 +253,15 @@ namespace BreCalClient.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to BSMD right to edit granted.
/// </summary>
public static string textBSMDGranted {
get {
return ResourceManager.GetString("textBSMDGranted", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Bunkering. /// Looks up a localized string similar to Bunkering.
/// </summary> /// </summary>
@ -297,6 +325,33 @@ namespace BreCalClient.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Clear assignment.
/// </summary>
public static string textClearAssignment {
get {
return ResourceManager.GetString("textClearAssignment", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Clear filters.
/// </summary>
public static string textClearFilters {
get {
return ResourceManager.GetString("textClearFilters", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Clear value.
/// </summary>
public static string textClearValue {
get {
return ResourceManager.GetString("textClearValue", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Close. /// Looks up a localized string similar to Close.
/// </summary> /// </summary>
@ -306,6 +361,15 @@ namespace BreCalClient.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Confirmation.
/// </summary>
public static string textConfirmation {
get {
return ResourceManager.GetString("textConfirmation", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Departure terminal. /// Looks up a localized string similar to Departure terminal.
/// </summary> /// </summary>
@ -531,6 +595,15 @@ namespace BreCalClient.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Password changed..
/// </summary>
public static string textPasswordChanged {
get {
return ResourceManager.GetString("textPasswordChanged", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Pier side. /// Looks up a localized string similar to Pier side.
/// </summary> /// </summary>
@ -648,6 +721,15 @@ namespace BreCalClient.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Show cancelled calls.
/// </summary>
public static string textShowCancelledShipcalls {
get {
return ResourceManager.GetString("textShowCancelledShipcalls", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Sort order. /// Looks up a localized string similar to Sort order.
/// </summary> /// </summary>

View File

@ -358,4 +358,31 @@
<data name="worker2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="worker2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>worker2.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>worker2.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="textClearAssignment" xml:space="preserve">
<value>Zuordnung entfernen</value>
</data>
<data name="textClearValue" xml:space="preserve">
<value>Eingabe löschen</value>
</data>
<data name="textConfirmation" xml:space="preserve">
<value>Bestätigung</value>
</data>
<data name="textPasswordChanged" xml:space="preserve">
<value>Passwort geändert.</value>
</data>
<data name="textClearFilters" xml:space="preserve">
<value>Filter löschen</value>
</data>
<data name="textShowCancelledShipcalls" xml:space="preserve">
<value>Stornierte anzeigen</value>
</data>
<data name="textBerthRemarks" xml:space="preserve">
<value>Liegeplatz Informationen</value>
</data>
<data name="textBSMDGranted" xml:space="preserve">
<value>Freigabe zur Bearb. f. BSMD erteilt</value>
</data>
<data name="textRemarks" xml:space="preserve">
<value>Info</value>
</data>
</root> </root>

View File

@ -124,11 +124,11 @@
<data name="arrow_down_red" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="arrow_down_red" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>arrow_down_red.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>arrow_down_red.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="arrow_right_blue" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="arrow_right_green" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>arrow_right_blue.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>arrow_right_green.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="arrow_up_green" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="arrow_up_blue" 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> <value>arrow_up_blue.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="arrow_up_red" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="arrow_up_red" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>arrow_up_red.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>arrow_up_red.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
@ -145,6 +145,9 @@
<data name="containership1" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="containership1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>containership.ico;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>containership.ico;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>delete.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="emergency_stop_button" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="emergency_stop_button" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>emergency_stop_button.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>emergency_stop_button.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
@ -169,9 +172,15 @@
<data name="textBerth" xml:space="preserve"> <data name="textBerth" xml:space="preserve">
<value>Berth</value> <value>Berth</value>
</data> </data>
<data name="textBerthRemarks" xml:space="preserve">
<value>Berth remarks</value>
</data>
<data name="textBerths" xml:space="preserve"> <data name="textBerths" xml:space="preserve">
<value>Berths</value> <value>Berths</value>
</data> </data>
<data name="textBSMDGranted" xml:space="preserve">
<value>BSMD right to edit granted</value>
</data>
<data name="textBunkering" xml:space="preserve"> <data name="textBunkering" xml:space="preserve">
<value>Bunkering</value> <value>Bunkering</value>
</data> </data>
@ -193,9 +202,21 @@
<data name="textChangePassword" xml:space="preserve"> <data name="textChangePassword" xml:space="preserve">
<value>Change password</value> <value>Change password</value>
</data> </data>
<data name="textClearAssignment" xml:space="preserve">
<value>Clear assignment</value>
</data>
<data name="textClearFilters" xml:space="preserve">
<value>Clear filters</value>
</data>
<data name="textClearValue" xml:space="preserve">
<value>Clear value</value>
</data>
<data name="textClose" xml:space="preserve"> <data name="textClose" xml:space="preserve">
<value>Close</value> <value>Close</value>
</data> </data>
<data name="textConfirmation" xml:space="preserve">
<value>Confirmation</value>
</data>
<data name="textDepartureTerminal" xml:space="preserve"> <data name="textDepartureTerminal" xml:space="preserve">
<value>Departure terminal</value> <value>Departure terminal</value>
</data> </data>
@ -271,6 +292,9 @@
<data name="textPassword" xml:space="preserve"> <data name="textPassword" xml:space="preserve">
<value>Password</value> <value>Password</value>
</data> </data>
<data name="textPasswordChanged" xml:space="preserve">
<value>Password changed.</value>
</data>
<data name="textPierside" xml:space="preserve"> <data name="textPierside" xml:space="preserve">
<value>Pier side</value> <value>Pier side</value>
</data> </data>
@ -310,6 +334,9 @@
<data name="textShipLength" xml:space="preserve"> <data name="textShipLength" xml:space="preserve">
<value>Ship length</value> <value>Ship length</value>
</data> </data>
<data name="textShowCancelledShipcalls" xml:space="preserve">
<value>Show cancelled calls</value>
</data>
<data name="textSortOrder" xml:space="preserve"> <data name="textSortOrder" xml:space="preserve">
<value>Sort order</value> <value>Sort order</value>
</data> </data>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -59,23 +59,23 @@
<ColumnDefinition Width="30" /> <ColumnDefinition Width="30" />
<ColumnDefinition Width=".5*" /> <ColumnDefinition Width=".5*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<DatePicker x:Name="datePickerETAFrom" Grid.Column="0" Margin="2" /> <DatePicker x:Name="datePickerETAFrom" Grid.Column="0" Margin="2" SelectedDateChanged="datePickerETAFrom_SelectedDateChanged" SelectedDate="{Binding Path=EtaFrom}"/>
<Label Grid.Column="1" Content="{x:Static p:Resources.textTo}" /> <Label Grid.Column="1" Content="{x:Static p:Resources.textTo}" />
<DatePicker x:Name="datePickerETATo" Grid.Column="2" Margin="2" /> <DatePicker x:Name="datePickerETATo" Grid.Column="2" Margin="2" SelectedDateChanged="datePickerETATo_SelectedDateChanged" SelectedDate="{Binding Path=EtaTo}"/>
</Grid> </Grid>
<xctk:CheckComboBox x:Name="comboBoxCategories" Grid.Column="4" Margin="2" /> <xctk:CheckComboBox x:Name="comboBoxCategories" Grid.Column="4" Margin="2" ItemSelectionChanged="comboBoxCategories_ItemSelectionChanged" />
<Grid Grid.Column="6" Grid.Row="0"> <Grid Grid.Column="6" Grid.Row="0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width=".5*" /> <ColumnDefinition Width=".5*" />
<ColumnDefinition Width="30" /> <ColumnDefinition Width="30" />
<ColumnDefinition Width=".5*" /> <ColumnDefinition Width=".5*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<xctk:DoubleUpDown x:Name="upDownShiplengthFrom" Grid.Column="0" Margin="2" Minimum="0" Maximum="1000" /> <xctk:DoubleUpDown x:Name="upDownShiplengthFrom" Grid.Column="0" Margin="2" Minimum="0" Maximum="1000" ValueChanged="upDownShiplengthFrom_ValueChanged" Value="{Binding Path=ShipLengthFrom}" />
<Label Grid.Column="1" Content="{x:Static p:Resources.textTo}" /> <Label Grid.Column="1" Content="{x:Static p:Resources.textTo}" />
<xctk:DoubleUpDown x:Name="upDownShiplengthTo" Grid.Column="2" Margin="2" Minimum="0" Maximum="1000"/> <xctk:DoubleUpDown x:Name="upDownShiplengthTo" Grid.Column="2" Margin="2" Minimum="0" Maximum="1000" ValueChanged="upDownShiplengthTo_ValueChanged" Value="{Binding Path=ShipLengthTo}"/>
</Grid> </Grid>
<xctk:WatermarkTextBox x:Name="textBoxSearch" Grid.Column="2" Grid.Row="1" Margin="2" Watermark="{x:Static p:Resources.textEnterKeyword}" /> <xctk:WatermarkTextBox x:Name="textBoxSearch" Grid.Column="2" Grid.Row="1" Margin="2" Watermark="{x:Static p:Resources.textEnterKeyword}" PreviewTextInput="textBoxSearch_PreviewTextInput" DataObject.Pasting="textBoxSearch_Pasting" TextChanged="textBoxSearch_TextChanged" />
<xctk:CheckComboBox x:Name="comboBoxBerths" DisplayMemberPath="Name" Grid.Column="4" Grid.Row="1" Margin="2" /> <xctk:CheckComboBox x:Name="comboBoxBerths" DisplayMemberPath="Name" Grid.Column="4" Grid.Row="1" Margin="2" ItemSelectionChanged="comboBoxBerths_ItemSelectionChanged" />
<xctk:CheckComboBox x:Name="comboBoxAgencies" DisplayMemberPath="Name" Grid.Column="6" Grid.Row="1" Margin="2" /> <xctk:CheckComboBox x:Name="comboBoxAgencies" DisplayMemberPath="Name" Grid.Column="6" Grid.Row="1" Margin="2" ItemSelectionChanged="comboBoxAgencies_ItemSelectionChanged" />
</Grid> </Grid>
</UserControl> </UserControl>

View File

@ -16,23 +16,41 @@ namespace BreCalClient
public partial class SearchFilterControl : UserControl public partial class SearchFilterControl : UserControl
{ {
#region private fields
private SearchFilterModel _model = new();
#endregion
#region Construction #region Construction
public SearchFilterControl() public SearchFilterControl()
{ {
InitializeComponent(); InitializeComponent();
this.DataContext = this._model;
} }
#endregion #endregion
#region events #region events
/// <summary>
/// historically we love a clickable logo and see what will happen
/// </summary>
public event Action? LogoImageClicked; public event Action? LogoImageClicked;
/// <summary>
/// if the user somewhat changes the filters trigger this
/// </summary>
internal event Action? SearchFilterChanged;
#endregion #endregion
#region Properties #region Properties
public string FilterAsJson { get; set; } = "";
internal SearchFilterModel SearchFilter { get { return _model; } }
#endregion #endregion
@ -48,6 +66,53 @@ namespace BreCalClient
this.comboBoxAgencies.ItemsSource = agencies; this.comboBoxAgencies.ItemsSource = agencies;
} }
public void ClearFilters()
{
this._model = new SearchFilterModel();
this.comboBoxAgencies.UnSelectAll();
this.comboBoxBerths.UnSelectAll();
this.comboBoxCategories.UnSelectAll();
this.datePickerETAFrom.SelectedDate = null;
this.datePickerETATo.SelectedDate = null;
this.textBoxSearch.Clear();
this.upDownShiplengthFrom.Value = null;
this.upDownShiplengthTo.Value = null;
}
internal void SetFilterFromModel(SearchFilterModel sfm)
{
this.ClearFilters();
if(sfm.Berths != null)
{
foreach(Berth berth in this.comboBoxBerths.ItemsSource)
{
if (sfm.Berths.Contains(berth.Id)) this.comboBoxBerths.SelectedItems.Add(berth);
}
}
if(sfm.Agencies != null)
{
foreach(Participant p in this.comboBoxAgencies.ItemsSource)
{
if(sfm.Agencies.Contains(p.Id)) this.comboBoxAgencies.SelectedItems.Add(p);
}
}
if(sfm.Categories != null)
{
foreach(int category in sfm.Categories)
this.comboBoxCategories.SelectedItems.Add((Extensions.TypeEnum)category);
}
if (sfm.SearchString != null) this.textBoxSearch.Text = sfm.SearchString;
this.upDownShiplengthFrom.Value = sfm.ShipLengthFrom;
this.upDownShiplengthTo.Value = sfm.ShipLengthTo;
this.datePickerETAFrom.SelectedDate = sfm.EtaFrom;
this.datePickerETATo.SelectedDate = sfm.EtaTo;
this._model = sfm;
SearchFilterChanged?.Invoke();
}
#endregion #endregion
#region event handler #region event handler
@ -62,6 +127,73 @@ namespace BreCalClient
this.comboBoxCategories.ItemsSource = Enum.GetValues(typeof(Extensions.TypeEnum)); this.comboBoxCategories.ItemsSource = Enum.GetValues(typeof(Extensions.TypeEnum));
} }
private void datePickerETAFrom_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
{
this._model.EtaFrom = this.datePickerETAFrom.SelectedDate;
SearchFilterChanged?.Invoke();
}
private void datePickerETATo_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
{
this._model.EtaTo = datePickerETATo.SelectedDate;
SearchFilterChanged?.Invoke();
}
private void comboBoxCategories_ItemSelectionChanged(object sender, Xceed.Wpf.Toolkit.Primitives.ItemSelectionChangedEventArgs e)
{
_model.Categories.Clear();
foreach(int category in comboBoxCategories.SelectedItems)
_model.Categories.Add(category);
SearchFilterChanged?.Invoke();
}
private void upDownShiplengthFrom_ValueChanged(object sender, System.Windows.RoutedPropertyChangedEventArgs<object> e)
{
this._model.ShipLengthFrom = this.upDownShiplengthFrom.Value;
SearchFilterChanged?.Invoke();
}
private void upDownShiplengthTo_ValueChanged(object sender, System.Windows.RoutedPropertyChangedEventArgs<object> e)
{
this._model.ShipLengthTo = this.upDownShiplengthTo.Value;
SearchFilterChanged?.Invoke();
}
private void comboBoxBerths_ItemSelectionChanged(object sender, Xceed.Wpf.Toolkit.Primitives.ItemSelectionChangedEventArgs e)
{
_model.Berths.Clear();
foreach(Berth berth in comboBoxBerths.SelectedItems)
_model.Berths.Add(berth.Id);
SearchFilterChanged?.Invoke();
}
private void comboBoxAgencies_ItemSelectionChanged(object sender, Xceed.Wpf.Toolkit.Primitives.ItemSelectionChangedEventArgs e)
{
_model.Agencies.Clear();
foreach (Participant agency in comboBoxAgencies.SelectedItems)
_model.Agencies.Add(agency.Id);
SearchFilterChanged?.Invoke();
}
private void textBoxSearch_Pasting(object sender, System.Windows.DataObjectPastingEventArgs e)
{
this.SearchFilter.SearchString = e.SourceDataObject.ToString();
SearchFilterChanged?.Invoke();
}
private void textBoxSearch_PreviewTextInput(object sender, TextCompositionEventArgs e)
{
this.SearchFilter.SearchString = this.textBoxSearch.Text + e.Text;
SearchFilterChanged?.Invoke();
}
private void textBoxSearch_TextChanged(object sender, TextChangedEventArgs e)
{
this.SearchFilter.SearchString = this.textBoxSearch.Text;
SearchFilterChanged?.Invoke();
}
#endregion #endregion
} }

View File

@ -5,6 +5,7 @@
using BreCalClient.misc.Model; using BreCalClient.misc.Model;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Newtonsoft.Json;
namespace BreCalClient namespace BreCalClient
{ {
@ -18,11 +19,11 @@ namespace BreCalClient
public DateTime? EtaTo { get; set; } public DateTime? EtaTo { get; set; }
public IEnumerable<int>? Categories { get; set; } public List<int> Categories { get; set; } = new();
public IEnumerable<Participant>? Agencies { get; set; } public List<int> Agencies { get; set; } = new();
public IEnumerable<Berth>? Berths { get; set; } public List<int> Berths { get; set; } = new();
public string? SearchString { get; set; } public string? SearchString { get; set; }
@ -32,5 +33,15 @@ namespace BreCalClient
#endregion #endregion
public static SearchFilterModel? Deserialize(string json)
{
return (SearchFilterModel?) JsonConvert.DeserializeObject(json, typeof(SearchFilterModel));
}
public string Serialize()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
} }
} }

View File

@ -5,6 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BreCalClient" xmlns:local="clr-namespace:BreCalClient"
xmlns:p = "clr-namespace:BreCalClient.Resources" xmlns:p = "clr-namespace:BreCalClient.Resources"
xmlns:sets="clr-namespace:BreCalClient.Properties"
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient" xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient"
xmlns:db2="clr-namespace:BreCalClient.misc.Model;assembly=BreCalClient" xmlns:db2="clr-namespace:BreCalClient.misc.Model;assembly=BreCalClient"
mc:Ignorable="d" mc:Ignorable="d"
@ -46,7 +47,7 @@
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Margin="2" Grid.Column="0" PreviewMouseUp="Image_PreviewMouseUp" x:Name="imageShipcallType" /> <Image Margin="2" Grid.Column="0" PreviewMouseUp="Image_PreviewMouseUp" x:Name="imageShipcallType" />
<Label Grid.Column="1" FontSize="12" x:Name="labelShipName" Foreground="White" Background="#203864" VerticalAlignment="Stretch" <Label Grid.Column="1" 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"/> HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" PreviewMouseUp="Image_PreviewMouseUp"/>
</Grid> </Grid>
<Viewbox Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left"> <Viewbox Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left">
@ -88,17 +89,17 @@
</Grid> </Grid>
<Label Grid.Row="0" Grid.Column="1" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="#203864" VerticalAlignment="Stretch" <Label Grid.Row="0" Grid.Column="1" Grid.RowSpan="1" FontSize="12" 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"/> HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelAgent" PreviewMouseUp="labelAgent_PreviewMouseUp"/>
<Label Grid.Row="0" Grid.Column="2" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="#203864" VerticalAlignment="Stretch" <Label Grid.Row="0" Grid.Column="2" Grid.RowSpan="1" FontSize="12" 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"/> HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelMooring" PreviewMouseUp="labelMooring_PreviewMouseUp"/>
<Label Grid.Row="0" Grid.Column="3" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="#203864" VerticalAlignment="Stretch" <Label Grid.Row="0" Grid.Column="3" Grid.RowSpan="1" FontSize="12" 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" /> HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelPortAuthority" PreviewMouseUp="labelPortAuthority_PreviewMouseUp" />
<Label Grid.Row="0" Grid.Column="4" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="#203864" VerticalAlignment="Stretch" <Label Grid.Row="0" Grid.Column="4" Grid.RowSpan="1" FontSize="12" 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"/> HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelPilot" PreviewMouseUp="labelPilot_PreviewMouseUp"/>
<Label Grid.Row="0" Grid.Column="5" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="#203864" VerticalAlignment="Stretch" <Label Grid.Row="0" Grid.Column="5" Grid.RowSpan="1" FontSize="12" 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"/> HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelTug" PreviewMouseUp="labelTug_PreviewMouseUp"/>
<Label Grid.Row="0" Grid.Column="6" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="#203864" VerticalAlignment="Stretch" <Label Grid.Row="0" Grid.Column="6" Grid.RowSpan="1" FontSize="12" 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" /> HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelTerminal" PreviewMouseUp="labelTerminal_PreviewMouseUp" />
<Grid Grid.Row="2" Grid.Column="1"> <Grid Grid.Row="2" Grid.Column="1">
@ -218,12 +219,12 @@
<RowDefinition Height="14" /> <RowDefinition Height="14" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/> <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" x:Name="labelTerminalBerth" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
<Label Grid.Row="1" Grid.Column="0" Content="ETA" Padding="0" VerticalContentAlignment="Center" /> <Label Grid.Row="1" Grid.Column="0" Content="Start" Padding="0" VerticalContentAlignment="Center" />
<Label Grid.Row="2" Grid.Column="0" Content="ETD" Padding="0" VerticalContentAlignment="Center" /> <Label Grid.Row="2" Grid.Column="0" Content="End" Padding="0" VerticalContentAlignment="Center" />
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/> <Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
<Label Grid.Row="1" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelTerminalETA" FontWeight="DemiBold"/> <Label Grid.Row="1" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelOperationsStart" FontWeight="DemiBold"/>
<Label Grid.Row="2" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelTerminalETD" FontWeight="DemiBold"/> <Label Grid.Row="2" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelOperationsEnd" FontWeight="DemiBold"/>
<TextBlock Grid.Row="3" Grid.Column="1" Grid.RowSpan="2" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockTerminalRemarks" /> <TextBlock Grid.Row="3" Grid.Column="1" Grid.RowSpan="2" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockTerminalRemarks" />
</Grid> </Grid>

View File

@ -5,11 +5,13 @@
using BreCalClient.misc.Model; using BreCalClient.misc.Model;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
namespace BreCalClient namespace BreCalClient
{ {
/// <summary> /// <summary>
@ -31,9 +33,7 @@ namespace BreCalClient
public event Action<ShipcallControl>? EditRequested; public event Action<ShipcallControl>? EditRequested;
public event Action<ShipcallControl, Times?>? EditTimesRequested; internal event Action<ShipcallControl, Times?, Extensions.ParticipantType>? EditTimesRequested;
public event Action<ShipcallControl>? OpenExtraRequested;
#endregion #endregion
@ -49,6 +49,11 @@ namespace BreCalClient
/// </summary> /// </summary>
public Dictionary<int, Participant>? ParticipantDict { get; set; } public Dictionary<int, Participant>? ParticipantDict { get; set; }
/// <summary>
/// For berth name lookup
/// </summary>
public List<Berth>? Berths {get; set;}
#endregion #endregion
#region public methods #region public methods
@ -59,73 +64,77 @@ namespace BreCalClient
string agentName = ""; string agentName = "";
string? name; string? name;
name = this.ShipcallControlModel.GetParticipantNameForType(Extensions.ParticipantType.AGENCY); name = this.ShipcallControlModel.GetParticipantNameForType(Extensions.ParticipantType.AGENCY);
if (name != null) if (name != null) agentName = name;
{ this.labelAgent.Content = name ?? "- / -";
this.labelAgent.Content = name;
agentName = name;
}
name = this.ShipcallControlModel.GetParticipantNameForType(Extensions.ParticipantType.MOORING);
if (name != null)
this.labelMooring.Content = name;
name = this.ShipcallControlModel.GetParticipantNameForType(Extensions.ParticipantType.PILOT);
if (name != null)
this.labelPilot.Content = name;
name = this.ShipcallControlModel.GetParticipantNameForType(Extensions.ParticipantType.TUG);
if (name != null)
this.labelTug.Content = name;
name = this.ShipcallControlModel.GetParticipantNameForType(Extensions.ParticipantType.PORT_ADMINISTRATION);
if (name != null)
this.labelPortAuthority.Content = name;
name = this.ShipcallControlModel.GetParticipantNameForType(Extensions.ParticipantType.TERMINAL);
if (name != null)
this.labelTerminal.Content = name;
if(App.Participant.IsFlagSet(Extensions.ParticipantType.TERMINAL)) { name = this.ShipcallControlModel.GetParticipantNameForType(Extensions.ParticipantType.MOORING);
this.labelMooring.Content = name ?? "- / -";
name = this.ShipcallControlModel.GetParticipantNameForType(Extensions.ParticipantType.PILOT);
this.labelPilot.Content = name ?? "- / - ";
name = this.ShipcallControlModel.GetParticipantNameForType(Extensions.ParticipantType.TUG);
this.labelTug.Content = name ?? "- / - ";
name = this.ShipcallControlModel.GetParticipantNameForType(Extensions.ParticipantType.PORT_ADMINISTRATION);
this.labelPortAuthority.Content = name ?? "- / - ";
name = this.ShipcallControlModel.GetParticipantNameForType(Extensions.ParticipantType.TERMINAL);
this.labelTerminal.Content = name ?? "- / - ";
if(App.Participant.IsTypeFlagSet(Extensions.ParticipantType.TERMINAL) && (App.Participant.Id == this.ShipcallControlModel.GetParticipantIdForType(Extensions.ParticipantType.TERMINAL)))
{
this.labelTerminal.FontWeight = FontWeights.Bold; this.labelTerminal.FontWeight = FontWeights.Bold;
this.labelTerminal.Foreground = Brushes.LightYellow; this.labelTerminal.Foreground = Brushes.LightYellow;
} }
if(App.Participant.IsFlagSet(Extensions.ParticipantType.PILOT)) if(App.Participant.IsTypeFlagSet(Extensions.ParticipantType.PILOT) && (App.Participant.Id == this.ShipcallControlModel.GetParticipantIdForType(Extensions.ParticipantType.PILOT)))
{ {
this.labelPilot.FontWeight = FontWeights.Bold; this.labelPilot.FontWeight = FontWeights.Bold;
this.labelPilot.Foreground = Brushes.LightYellow; this.labelPilot.Foreground = Brushes.LightYellow;
} }
if(App.Participant.IsFlagSet(Extensions.ParticipantType.AGENCY)) if(App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY) && (App.Participant.Id == this.ShipcallControlModel.GetParticipantIdForType(Extensions.ParticipantType.AGENCY)))
{ {
this.labelAgent.FontWeight = FontWeights.Bold; this.labelAgent.FontWeight = FontWeights.Bold;
this.labelAgent.Foreground = Brushes.LightYellow; this.labelAgent.Foreground = Brushes.LightYellow;
} }
if(App.Participant.IsFlagSet(Extensions.ParticipantType.MOORING)) if(App.Participant.IsTypeFlagSet(Extensions.ParticipantType.MOORING) && (App.Participant.Id == this.ShipcallControlModel.GetParticipantIdForType(Extensions.ParticipantType.MOORING)))
{ {
this.labelMooring.FontWeight = FontWeights.Bold; this.labelMooring.FontWeight = FontWeights.Bold;
this.labelMooring.Foreground = Brushes.LightYellow; this.labelMooring.Foreground = Brushes.LightYellow;
} }
if(App.Participant.IsFlagSet(Extensions.ParticipantType.PORT_ADMINISTRATION)) if(App.Participant.IsTypeFlagSet(Extensions.ParticipantType.PORT_ADMINISTRATION) && (App.Participant.Id == this.ShipcallControlModel.GetParticipantIdForType(Extensions.ParticipantType.PORT_ADMINISTRATION)))
{ {
this.labelPortAuthority.FontWeight = FontWeights.Bold; this.labelPortAuthority.FontWeight = FontWeights.Bold;
this.labelPortAuthority.Foreground = Brushes.LightYellow; this.labelPortAuthority.Foreground = Brushes.LightYellow;
} }
if (App.Participant.IsFlagSet(Extensions.ParticipantType.TUG)) if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.TUG) && (App.Participant.Id == this.ShipcallControlModel.GetParticipantIdForType(Extensions.ParticipantType.TUG)))
{ {
this.labelTug.FontWeight = FontWeights.Bold; this.labelTug.FontWeight = FontWeights.Bold;
this.labelTug.Foreground = Brushes.LightYellow; this.labelTug.Foreground = Brushes.LightYellow;
} }
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD) ||
(App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY) && (App.Participant.Id == this.ShipcallControlModel.GetParticipantIdForType(Extensions.ParticipantType.AGENCY))))
{
this.labelShipName.FontWeight = FontWeights.Bold;
this.labelShipName.Foreground = Brushes.LightYellow;
}
this.labelShipName.Content = this.ShipcallControlModel?.Ship?.Name; this.labelShipName.Content = this.ShipcallControlModel?.Ship?.Name;
switch(this.ShipcallControlModel?.Shipcall?.Type) switch(this.ShipcallControlModel?.Shipcall?.Type)
{ {
case 1: // incoming case 1: // incoming
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_down_red.png")); this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalTestClient;component/Resources/arrow_down_red.png"));
break; break;
case 2: // outgoing case 2: // outgoing
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_up_green.png")); this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalTestClient;component/Resources/arrow_up_blue.png"));
break; break;
case 3: // shifting case 3: // shifting
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_right_blue.png")); this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalTestClient;component/Resources/arrow_right_green.png"));
break; break;
default: default:
break; break;
} }
this.textBlockAgency.Text = this.ShipcallControlModel?.Agency;
this.textBlockBerth.Text = this.ShipcallControlModel?.Berth; this.textBlockBerth.Text = this.ShipcallControlModel?.Berth;
this.textBlockCallsign.Text = this.ShipcallControlModel?.Ship?.Callsign; this.textBlockCallsign.Text = this.ShipcallControlModel?.Ship?.Callsign;
if ((this.ShipcallControlModel?.Shipcall?.Type == 1) || (this.ShipcallControlModel?.Shipcall?.Type == 3)) if ((this.ShipcallControlModel?.Shipcall?.Type == 1) || (this.ShipcallControlModel?.Shipcall?.Type == 3))
@ -148,44 +157,46 @@ namespace BreCalClient
{ {
foreach (Times times in this.ShipcallControlModel.Times) foreach (Times times in this.ShipcallControlModel.Times)
{ {
if(this.ParticipantDict.ContainsKey(times.ParticipantId)) if (times.ParticipantType == (int)Extensions.ParticipantType.AGENCY)
{
if (this.ParticipantDict[times.ParticipantId].IsFlagSet(Extensions.ParticipantType.AGENCY))
{ {
this.labelAgencyETA.Content = times.EtaBerth.HasValue ? times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -"; this.labelAgencyETA.Content = times.EtaBerth.HasValue ? times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
this.labelAgencyETD.Content = times.EtdBerth.HasValue ? times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -"; this.labelAgencyETD.Content = times.EtdBerth.HasValue ? times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
this.textBlockAgency.Text = times.Remarks; this.textBlockAgencyRemarks.Text = times.Remarks;
} }
if (this.ParticipantDict[times.ParticipantId].IsFlagSet(Extensions.ParticipantType.MOORING)) if (times.ParticipantType == (int) Extensions.ParticipantType.MOORING)
{ {
this.labelMooringETA.Content = times.EtaBerth.HasValue ? times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -"; this.labelMooringETA.Content = times.EtaBerth.HasValue ? times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
this.labelMooringETD.Content = times.EtdBerth.HasValue ? times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -"; this.labelMooringETD.Content = times.EtdBerth.HasValue ? times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
this.textBlockMooringRemarks.Text = times.Remarks; this.textBlockMooringRemarks.Text = times.Remarks;
} }
if (this.ParticipantDict[times.ParticipantId].IsFlagSet(Extensions.ParticipantType.PORT_ADMINISTRATION)) if (times.ParticipantType == (int)Extensions.ParticipantType.PORT_ADMINISTRATION)
{ {
this.labelPortAuthorityETA.Content = times.EtaBerth.HasValue ? times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -"; this.labelPortAuthorityETA.Content = times.EtaBerth.HasValue ? times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
this.labelPortAuthorityETD.Content = times.EtdBerth.HasValue ? times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -"; this.labelPortAuthorityETD.Content = times.EtdBerth.HasValue ? times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
this.textBlockPortAuthorityRemarks.Text = times.Remarks; this.textBlockPortAuthorityRemarks.Text = times.Remarks;
} }
if (this.ParticipantDict[times.ParticipantId].IsFlagSet(Extensions.ParticipantType.PILOT)) if (times.ParticipantType == (int)Extensions.ParticipantType.PILOT)
{ {
this.labelPilotETA.Content = times.EtaBerth.HasValue ? times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -"; this.labelPilotETA.Content = times.EtaBerth.HasValue ? times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
this.labelPilotETD.Content = times.EtdBerth.HasValue ? times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -"; this.labelPilotETD.Content = times.EtdBerth.HasValue ? times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
this.textBlockPilotRemarks.Text = times.Remarks; this.textBlockPilotRemarks.Text = times.Remarks;
} }
if (this.ParticipantDict[times.ParticipantId].IsFlagSet(Extensions.ParticipantType.TUG)) if (times.ParticipantType == (int)Extensions.ParticipantType.TUG)
{ {
this.labelTugETA.Content = times.EtaBerth.HasValue ? times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -"; this.labelTugETA.Content = times.EtaBerth.HasValue ? times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
this.labelTugETD.Content = times.EtdBerth.HasValue ? times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -"; this.labelTugETD.Content = times.EtdBerth.HasValue ? times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
this.textBlockTugRemarks.Text = times.Remarks; this.textBlockTugRemarks.Text = times.Remarks;
} }
if (this.ParticipantDict[times.ParticipantId].IsFlagSet(Extensions.ParticipantType.TERMINAL)) if (times.ParticipantType == (int)Extensions.ParticipantType.TERMINAL)
{ {
this.labelTerminalETA.Content = times.EtaBerth.HasValue ? times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -"; if (this.Berths != null)
this.labelTerminalETD.Content = times.EtdBerth.HasValue ? times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -"; {
this.textBlockTerminalRemarks.Text = times.Remarks; Berth? berth = this.Berths.Find((x) => x.Id == times.BerthId);
this.labelTerminalBerth.Content = (berth != null) ? berth.Name : "";
} }
this.labelOperationsStart.Content = times.OperationsStart.HasValue ? times.OperationsStart.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
this.labelOperationsEnd.Content = times.OperationsEnd.HasValue ? times.OperationsEnd.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
this.textBlockTerminalRemarks.Text = times.Remarks;
} }
} }
} }
@ -201,72 +212,68 @@ namespace BreCalClient
} }
private void buttonEditShipcall_Click(object sender, RoutedEventArgs e) private void buttonEditShipcall_Click(object? sender, RoutedEventArgs? e)
{ {
if(App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD) ||
(App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY) && (App.Participant.Id == this.ShipcallControlModel?.GetParticipantIdForType(Extensions.ParticipantType.AGENCY))))
this.EditRequested?.Invoke(this); this.EditRequested?.Invoke(this);
} }
private void buttonOpenDropDown_Click(object sender, RoutedEventArgs e)
{
this.OpenExtraRequested?.Invoke(this);
}
private void Image_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) private void Image_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{ {
this.EditRequested?.Invoke(this); this.buttonEditShipcall_Click(null, null);
} }
private void labelAgent_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) private void labelAgent_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{ {
if (App.Participant.IsFlagSet(Extensions.ParticipantType.AGENCY)) if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY) && (App.Participant.Id == this.ShipcallControlModel?.GetParticipantIdForType(Extensions.ParticipantType.AGENCY)))
{ {
Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.AGENCY); this.EditRequested?.Invoke(this);
this.EditTimesRequested?.Invoke(this, times);
} }
} }
private void labelMooring_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) private void labelMooring_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{ {
if (App.Participant.IsFlagSet(Extensions.ParticipantType.MOORING)) if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.MOORING) && (App.Participant.Id == this.ShipcallControlModel?.GetParticipantIdForType(Extensions.ParticipantType.MOORING)))
{ {
Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.MOORING); Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.MOORING);
this.EditTimesRequested?.Invoke(this, times); this.EditTimesRequested?.Invoke(this, times, Extensions.ParticipantType.MOORING);
} }
} }
private void labelPortAuthority_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) private void labelPortAuthority_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{ {
if (App.Participant.IsFlagSet(Extensions.ParticipantType.PORT_ADMINISTRATION)) if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.PORT_ADMINISTRATION) && (App.Participant.Id == this.ShipcallControlModel?.GetParticipantIdForType(Extensions.ParticipantType.PORT_ADMINISTRATION)))
{ {
Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.PORT_ADMINISTRATION); Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.PORT_ADMINISTRATION);
this.EditTimesRequested?.Invoke(this, times); this.EditTimesRequested?.Invoke(this, times, Extensions.ParticipantType.PORT_ADMINISTRATION);
} }
} }
private void labelPilot_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) private void labelPilot_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{ {
if (App.Participant.IsFlagSet(Extensions.ParticipantType.PILOT)) if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.PILOT) && (App.Participant.Id == this.ShipcallControlModel?.GetParticipantIdForType(Extensions.ParticipantType.PILOT)))
{ {
Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.PILOT); Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.PILOT);
this.EditTimesRequested?.Invoke(this, times); this.EditTimesRequested?.Invoke(this, times, Extensions.ParticipantType.PILOT);
} }
} }
private void labelTug_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) private void labelTug_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{ {
if (App.Participant.IsFlagSet(Extensions.ParticipantType.TUG)) if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.TUG) && (App.Participant.Id == this.ShipcallControlModel?.GetParticipantIdForType(Extensions.ParticipantType.TUG)))
{ {
Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.TUG); Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.TUG);
this.EditTimesRequested?.Invoke(this, times); this.EditTimesRequested?.Invoke(this, times, Extensions.ParticipantType.TUG);
} }
} }
private void labelTerminal_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) private void labelTerminal_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{ {
if (App.Participant.IsFlagSet(Extensions.ParticipantType.TERMINAL)) if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.TERMINAL) && (App.Participant.Id == this.ShipcallControlModel?.GetParticipantIdForType(Extensions.ParticipantType.TERMINAL)))
{ {
Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.TERMINAL); Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.TERMINAL);
this.EditTimesRequested?.Invoke(this, times); this.EditTimesRequested?.Invoke(this, times, Extensions.ParticipantType.TERMINAL);
} }
} }

View File

@ -42,13 +42,12 @@ namespace BreCalClient
#region Properties #region Properties
public Shipcall? Shipcall { get; set; } public Shipcall? Shipcall { get; set; }
public Ship? Ship { get; set; }
public string? Agency { get; set; } public Ship? Ship { get; set; }
public string? Berth { get; set; } public string? Berth { get; set; }
public Dictionary<int, Participant> AssignedParticipants { get; } = new(); internal Dictionary<Extensions.ParticipantType, Participant> AssignedParticipants { get; } = new();
public List<Times> Times { get; set; } = new(); public List<Times> Times { get; set; } = new();
@ -87,10 +86,14 @@ namespace BreCalClient
{ {
foreach (int participantId in Shipcall.Participants) foreach (int participantId in Shipcall.Participants)
{ {
foreach(Participant participant in participants) Participant? participant = participants.Find((x) => x.Id == participantId);
if (participant != null)
{ {
if(participant.Id == participantId) foreach(Extensions.ParticipantType participantType in Enum.GetValues(typeof(Extensions.ParticipantType)))
AssignedParticipants[participant.Type] = participant; {
if(participant.IsTypeFlagSet(participantType))
AssignedParticipants[participantType] = participant;
}
} }
} }
} }
@ -99,17 +102,31 @@ namespace BreCalClient
internal Times? GetTimesForParticipantType(Extensions.ParticipantType type) internal Times? GetTimesForParticipantType(Extensions.ParticipantType type)
{ {
if (AssignedParticipants.ContainsKey((int)type)) { if (AssignedParticipants.ContainsKey(type)) {
int participantId = AssignedParticipants[(int)type].Id; int participantId = AssignedParticipants[type].Id;
foreach (Times times in this.Times) foreach (Times times in this.Times)
{ {
if (times.ParticipantId == participantId) if ((times.ParticipantId == participantId) && (times.ParticipantType == (int) type))
return times; return times;
} }
} }
return null; return null;
} }
public bool ContainsRemarkText(string text)
{
if(Shipcall != null)
{
foreach(Times times in this.Times)
{
if (times.Remarks == null) continue;
if(times.Remarks.Contains(text)) return true;
}
}
return false;
}
#endregion #endregion
#region helper #region helper
@ -118,12 +135,22 @@ namespace BreCalClient
{ {
foreach(Participant p in AssignedParticipants.Values) foreach(Participant p in AssignedParticipants.Values)
{ {
if (p.IsFlagSet(participantType)) if (p.IsTypeFlagSet(participantType))
return p.Name; return p.Name;
} }
return null; return null;
} }
internal int? GetParticipantIdForType(Extensions.ParticipantType participantType)
{
foreach(Participant p in AssignedParticipants.Values)
{
if(p.IsTypeFlagSet(participantType))
return p.Id;
}
return null;
}
private bool IsFlagSet(StatusFlags flag) private bool IsFlagSet(StatusFlags flag)
{ {
if(this.Shipcall == null) return false; if(this.Shipcall == null) return false;

View File

@ -1,14 +0,0 @@
<UserControl x:Class="BreCalClient.ShipcallExtraControl"
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:local="clr-namespace:BreCalClient"
mc:Ignorable="d"
d:DesignHeight="100" d:DesignWidth="800">
<Grid>
<Button x:Name="buttonCloseDropDown" Click="buttonCloseDropDown_Click" Grid.Column="2" Background="Transparent" ToolTip="Close extra info" Margin="1" BorderThickness="0" HorizontalAlignment="Left">
<Image Source="./Resources/arrow_up_red.png" />
</Button>
</Grid>
</UserControl>

View File

@ -1,55 +0,0 @@
// Copyright (c) 2023 schick Informatik
// Description: Extra shipcall info shown in drop down
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BreCalClient
{
/// <summary>
/// Interaction logic for ShipcallExtraControl.xaml
/// </summary>
public partial class ShipcallExtraControl : UserControl
{
public ShipcallExtraControl()
{
InitializeComponent();
}
#region events
public event Action<ShipcallExtraControl>? CloseExtraRequested;
#endregion
#region Properties
/// <summary>
/// this is our datasource
/// </summary>
public ShipcallControlModel? ShipcallControlModel { get; set; }
#endregion
private void buttonCloseDropDown_Click(object sender, RoutedEventArgs e)
{
if (this.CloseExtraRequested != null)
{
this.CloseExtraRequested(this);
}
}
}
}

View File

@ -1,3 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<configuration> <configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="RoleEditor.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<RoleEditor.Properties.Settings>
<setting name="ConnectionString" serializeAs="String">
<value>Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling;Port=33306</value>
</setting>
</RoleEditor.Properties.Settings>
</applicationSettings>
</configuration> </configuration>

View File

@ -69,6 +69,10 @@
<CheckBox x:Name="checkboxParticipantActive" Grid.Row="4" Grid.Column="2" VerticalAlignment="Center" /> <CheckBox x:Name="checkboxParticipantActive" Grid.Row="4" Grid.Column="2" VerticalAlignment="Center" />
<xctk:CheckComboBox x:Name="comboBoxParticipantType" Grid.Row="5" Grid.Column="2" Margin="2" SelectedValue="Key" DisplayMemberPath="Value" /> <xctk:CheckComboBox x:Name="comboBoxParticipantType" Grid.Row="5" Grid.Column="2" Margin="2" SelectedValue="Key" DisplayMemberPath="Value" />
<TextBox x:Name="textBoxParticipantCreated" Grid.Row="6" IsReadOnly="True" IsEnabled="False" Grid.Column="2" Margin="2" VerticalContentAlignment="Center" /> <TextBox x:Name="textBoxParticipantCreated" Grid.Row="6" IsReadOnly="True" IsEnabled="False" Grid.Column="2" Margin="2" VerticalContentAlignment="Center" />
<StackPanel Orientation="Horizontal" Grid.Row="7" Grid.Column="0">
<CheckBox x:Name="checkBoxParticipantAllowBSMD" VerticalAlignment="Center" />
<Label Content="Allow BSMD entries" />
</StackPanel>
<TextBox x:Name="textBoxParticipantModified" Grid.Row="7" IsReadOnly="True" IsEnabled="False" Grid.Column="2" Margin="2" VerticalContentAlignment="Center" /> <TextBox x:Name="textBoxParticipantModified" Grid.Row="7" IsReadOnly="True" IsEnabled="False" Grid.Column="2" Margin="2" VerticalContentAlignment="Center" />
<Button x:Name="buttonParticipantSave" Grid.Row="8" Grid.Column="2" Click="buttonParticipantSave_Click" Margin="2"> <Button x:Name="buttonParticipantSave" Grid.Row="8" Grid.Column="2" Click="buttonParticipantSave_Click" Margin="2">
<DockPanel> <DockPanel>

View File

@ -50,10 +50,10 @@ namespace RoleEditor
private async void Window_Loaded(object sender, RoutedEventArgs e) private async void Window_Loaded(object sender, RoutedEventArgs e)
{ {
// try database connection
try try
{ {
DBManager.SetConnectionString(Properties.Settings.Default.ConnectionString);
// load all participants // load all participants
List<Participant> participants = await Participant.LoadAll(_dbManager); List<Participant> participants = await Participant.LoadAll(_dbManager);
foreach(Participant p in participants) foreach(Participant p in participants)
@ -213,7 +213,7 @@ namespace RoleEditor
p.Street = this.textBoxParticipantStreet.Text.Trim(); p.Street = this.textBoxParticipantStreet.Text.Trim();
p.PostalCode = this.textBoxParticipantPostalCode.Text.Trim(); p.PostalCode = this.textBoxParticipantPostalCode.Text.Trim();
p.City = this.textBoxParticipantCity.Text.Trim(); p.City = this.textBoxParticipantCity.Text.Trim();
p.SetFlag(this.checkBoxParticipantAllowBSMD.IsChecked ?? false, Participant.ParticipantFlags.ALLOW_BSMD);
p.Type = 0; p.Type = 0;
for(int i = 0; i < this.comboBoxParticipantType?.SelectedItems.Count; i++) for(int i = 0; i < this.comboBoxParticipantType?.SelectedItems.Count; i++)
{ {
@ -222,7 +222,7 @@ namespace RoleEditor
{ {
KeyValuePair<string, string> kvp = (KeyValuePair<string, string>)v; KeyValuePair<string, string> kvp = (KeyValuePair<string, string>)v;
Participant.ParticipantType pType = (Participant.ParticipantType)Enum.Parse(typeof(Participant.ParticipantType), kvp.Key); Participant.ParticipantType pType = (Participant.ParticipantType)Enum.Parse(typeof(Participant.ParticipantType), kvp.Key);
p.SetFlag(true, pType); p.SetTypeFlag(true, pType);
} }
} }
await p.Save(_dbManager); await p.Save(_dbManager);
@ -380,14 +380,16 @@ namespace RoleEditor
// this.checkboxParticipantActive.Checked = (p != null) ? p. // this.checkboxParticipantActive.Checked = (p != null) ? p.
this.textBoxParticipantCreated.Text = (p != null) ? p.Created.ToString() : string.Empty; this.textBoxParticipantCreated.Text = (p != null) ? p.Created.ToString() : string.Empty;
this.textBoxParticipantModified.Text = (p != null) ? p.Modified.ToString() : string.Empty; this.textBoxParticipantModified.Text = (p != null) ? p.Modified.ToString() : string.Empty;
this.checkBoxParticipantAllowBSMD.IsChecked = (p != null) ? p.IsFlagSet(Participant.ParticipantFlags.ALLOW_BSMD) : null;
this.comboBoxParticipantType.SelectedItems.Clear(); this.comboBoxParticipantType.SelectedItems.Clear();
bool hasAgencyType = false;
if (p != null) if (p != null)
{ {
foreach (Participant.ParticipantType pType in Enum.GetValues(typeof(Participant.ParticipantType))) foreach (Participant.ParticipantType pType in Enum.GetValues(typeof(Participant.ParticipantType)))
{ {
if (p.IsFlagSet(pType)) if (p.IsTypeFlagSet(pType))
{ {
if(pType == Participant.ParticipantType.AGENCY) hasAgencyType = true;
foreach (KeyValuePair<string, string> kvp in this.comboBoxParticipantType.Items) foreach (KeyValuePair<string, string> kvp in this.comboBoxParticipantType.Items)
{ {
if (kvp.Key.Equals(pType.ToString())) if (kvp.Key.Equals(pType.ToString()))
@ -398,6 +400,8 @@ namespace RoleEditor
} }
} }
} }
this.checkBoxParticipantAllowBSMD.IsEnabled = hasAgencyType;
// -> load users for this participant selection // -> load users for this participant selection
this._users.Clear(); this._users.Clear();
if (p != null) if (p != null)
@ -672,9 +676,83 @@ namespace RoleEditor
} }
} }
private void buttonImportShipss_Click(object sender, RoutedEventArgs e) private async void buttonImportShipss_Click(object sender, RoutedEventArgs e)
{ {
OpenFileDialog ofd = new OpenFileDialog
{
Filter = "Excel Files|*.xls;*.xlsx"
};
if (ofd.ShowDialog() ?? false)
{
FileStream stream;
try
{
stream = File.Open(ofd.FileName, FileMode.Open, FileAccess.Read);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
using (var reader = ExcelReaderFactory.CreateReader(stream))
{
List<Ship> importShipList = new();
int bCounter = 0;
int pCounter = 0;
try
{
do
{
while (reader.Read())
{
if (reader.FieldCount < 4)
{
throw new InvalidDataException("Sheet must have at least 4 Columns of data");
}
if (reader.IsDBNull(0) && reader.IsDBNull(1)) continue;
string ship_name = "";
if (!reader.IsDBNull(0)) ship_name = reader.GetString(0);
if (ship_name.Equals("Name", StringComparison.OrdinalIgnoreCase)) continue;
// find ship in existing list
if (_ships.Any(predicate: x => (x.Name != null) && x.Name.Equals(ship_name, StringComparison.OrdinalIgnoreCase)))
continue;
Ship s = new();
s.Name = ship_name;
if (!reader.IsDBNull(1))
s.IMO = (int) reader.GetDouble(1);
if (!reader.IsDBNull(2))
s.Length = reader.GetDouble(2);
if(!reader.IsDBNull(3))
s.Width = reader.GetDouble(3);
await s.Save(_dbManager);
_ships.Add(s);
bCounter++;
}
} while (reader.NextResult());
if ((pCounter > 0) || (bCounter > 0))
{
MessageBox.Show($"Imported {bCounter} ships");
}
}
catch (Exception ex)
{
MessageBox.Show("Error reading Excel: " + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
stream.Close();
}
} }
#endregion #endregion

View File

@ -0,0 +1,36 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace RoleEditor.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.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("Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling;" +
"Port=33306")]
public string ConnectionString {
get {
return ((string)(this["ConnectionString"]));
}
}
}
}

View File

@ -0,0 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="RoleEditor.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="ConnectionString" Type="System.String" Scope="Application">
<Value Profile="(Default)">Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling;Port=33306</Value>
</Setting>
</Settings>
</SettingsFile>

43
src/RoleEditor/ReadMe.md Normal file
View File

@ -0,0 +1,43 @@
# Role Editor (Administration tool)
![logo](../../misc/logo_bremen_calling.png)
___
## Purpose
### Users and participants
* Create and administrate participants (companies) in the system
* Create users and assign them to participants
* Create securables
* Create mappings between users and securables (role management)
### Berths
* Create / edit / set mark deleted of berths (Liegeplätze)
* Excel mass import for berths
### Ships
* Create / edit / set mark deleted of ships
* Excel mass import for ships
## Prerequisites
### Installation
### SSH tunnel for database access
The database access works directly for everyone working with the tool. This means no remote access is possible since the server is configured to allow only local clients. Therefore a SSH tunnel must be used that maps the remote database server port to a local port.
[Setup of a ssh tunnel via putty](https://www.heise.de/tipps-tricks/SSH-Tunnel-nutzen-so-geht-s-4320041.html.)
For credentials please contact me directly.
### RoleEditor client
There will be no ClickOnce deployment for the role editor, since it is only intended for internal use by a few individuals.
For each release a ZIP file will be prepared that will be hosted on the site.

View File

@ -60,6 +60,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Update="Resources.Designer.cs"> <Compile Update="Resources.Designer.cs">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
@ -74,4 +79,11 @@
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
</Project> </Project>

View File

@ -31,6 +31,13 @@ namespace brecal.model
TUG = 64, TUG = 64,
} }
[Flags]
public enum ParticipantFlags
{
[Description("allow BSMD initial info")]
ALLOW_BSMD = 1,
}
#endregion #endregion
#region Properties #region Properties
@ -166,17 +173,28 @@ namespace brecal.model
#region public type flag funcs #region public type flag funcs
public bool IsFlagSet(ParticipantType flag) public bool IsTypeFlagSet(ParticipantType flag)
{ {
return (this.Type & (uint)flag) != 0; return (this.Type & (uint)flag) != 0;
} }
public void SetFlag(bool value, ParticipantType flag) public void SetTypeFlag(bool value, ParticipantType flag)
{ {
if (value) this.Type |= (uint)flag; if (value) this.Type |= (uint)flag;
else this.Type &= (uint)~flag; else this.Type &= (uint)~flag;
} }
public bool IsFlagSet(ParticipantFlags flag)
{
return (this.Flags & (uint)flag) != 0;
}
public void SetFlag(bool value, ParticipantFlags flag)
{
if (value) this.Flags |= (uint)flag;
else this.Flags &= (uint)~flag;
}
#endregion #endregion
} }

View File

@ -1,15 +1,19 @@
using brecal.model; using brecal.model;
using MySqlConnector; using MySqlConnector;
using System.Data; using System.Data;
using System.Runtime.CompilerServices;
using static brecal.model.IDBManager; using static brecal.model.IDBManager;
namespace brecal.mysql namespace brecal.mysql
{ {
public class DBManager : IDBManager public class DBManager : IDBManager
{ {
// TODO: remove this and use external configuration
private static readonly string _connectionString = "Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling;Port=33306"; private static string _connectionString = "";
public static void SetConnectionString(string connectionString)
{
_connectionString = connectionString;
}
public async Task<List<DbEntity>> Load(QueryFunc prepareAction, LoadFunc<IDataReader> loadAction, params object?[] args) public async Task<List<DbEntity>> Load(QueryFunc prepareAction, LoadFunc<IDataReader> loadAction, params object?[] args)
{ {

View File

@ -19,7 +19,8 @@ def GetTimes(options):
pooledConnection = local_db.getPoolConnection() pooledConnection = local_db.getPoolConnection()
commands = pydapper.using(pooledConnection) commands = pydapper.using(pooledConnection)
data = commands.query("SELECT id, eta_berth, eta_berth_fixed, etd_berth, etd_berth_fixed, lock_time, lock_time_fixed, " + data = commands.query("SELECT id, eta_berth, eta_berth_fixed, etd_berth, etd_berth_fixed, lock_time, lock_time_fixed, " +
"zone_entry, zone_entry_fixed, operations_start, operations_end, remarks, shipcall_id, participant_id, created, modified FROM times " + "zone_entry, zone_entry_fixed, operations_start, operations_end, remarks, shipcall_id, participant_id, " +
"berth_id, berth_info, pier_side, participant_type, created, modified FROM times " +
"WHERE times.shipcall_id = ?scid?", model=model.Times, param={"scid" : options["shipcall_id"]}) "WHERE times.shipcall_id = ?scid?", model=model.Times, param={"scid" : options["shipcall_id"]})
pooledConnection.close() pooledConnection.close()

View File

@ -142,7 +142,11 @@ class TimesSchema(Schema):
operations_end = fields.DateTime(Required = False, allow_none=True) operations_end = fields.DateTime(Required = False, allow_none=True)
remarks = fields.String(Required = False, allow_none=True) remarks = fields.String(Required = False, allow_none=True)
participant_id = fields.Int(Required = True) participant_id = fields.Int(Required = True)
berth_id = fields.Int(Required = False, allow_none = True)
berth_info = fields.String(Required = False, allow_none=True)
pier_side = fields.Bool(Required = False, allow_none = True)
shipcall_id = fields.Int(Required = True) shipcall_id = fields.Int(Required = True)
participant_type = fields.Int(Required = False, allow_none=True)
created = fields.DateTime(Required = False, allow_none=True) created = fields.DateTime(Required = False, allow_none=True)
modified = fields.DateTime(Required = False, allow_none=True) modified = fields.DateTime(Required = False, allow_none=True)
@ -175,6 +179,10 @@ class Times:
operations_end: datetime operations_end: datetime
remarks: str remarks: str
participant_id: int participant_id: int
berth_id: int
berth_info: str
pier_side: bool
participant_type: int
shipcall_id: int shipcall_id: int
created: datetime created: datetime
modified: datetime modified: datetime