From 591238199e5c4f4e721764a1dcb1a128479543aa Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 9 Dec 2024 17:41:32 +0100 Subject: [PATCH] wip edit / new component --- angular/openapi.json | 2 +- angular/openapi.yaml | 125 ++++++++++++++++++ .../_abstract/abstract-data-form-component.ts | 64 +++++++++ .../app/_components/list/list.component.html | 15 ++- .../app/_components/list/list.component.ts | 11 +- .../simple-paging/paging-get-data-function.ts | 3 + .../simple-paging.component.html | 39 ++++++ .../simple-paging.component.scss} | 0 .../simple-paging.component.spec.ts | 23 ++++ .../simple-paging/simple-paging.component.ts | 82 ++++++++++++ .../_guards/game-account-owner.guard.spec.ts | 17 --- .../app/_guards/game-account-owner.guard.ts | 27 ---- .../app/_helpers/price-calculator.service.ts | 116 ---------------- .../AbstractCreateDataComponent.ts | 20 --- ...entInterface.ts => data-form-component.ts} | 10 +- .../src/app/_services/data-import.service.ts | 65 --------- .../app/_services/ea-data-connect.service.ts | 35 ----- angular/src/app/_services/sniping.service.ts | 100 -------------- .../location-detail.component.html | 16 +++ .../location-detail.component.scss} | 0 .../location-detail.component.spec.ts | 23 ++++ .../location-detail.component.ts | 55 ++++++++ .../location-form.component.html} | 19 +-- .../location-form.component.scss} | 0 .../location-form.component.spec.ts | 23 ++++ .../location-form/location-form.component.ts | 37 ++++++ .../location-list.component.html | 4 +- .../location-list/location-list.component.ts | 18 +-- .../location-new/location-new.component.ts | 66 --------- .../shipping-company-detail.component.html | 1 + .../shipping-company-detail.component.scss} | 0 .../shipping-company-detail.component.spec.ts | 23 ++++ .../shipping-company-detail.component.ts | 10 ++ .../shipping-company-form.component.html | 25 ++++ .../shipping-company-form.component.scss | 0 .../shipping-company-form.component.spec.ts | 23 ++++ .../shipping-company-form.component.ts | 24 ++++ .../shipping-company-list.component.html | 2 +- .../shipping-company-list.component.ts | 8 +- .../shipping-company-new.component.spec.ts | 23 ---- .../shipping-company-new.component.ts | 41 ------ .../vessel-detail.component.html | 1 + .../vessel-detail.component.scss | 0 .../vessel-detail.component.spec.ts | 23 ++++ .../vessel-detail/vessel-detail.component.ts | 10 ++ .../vessel-form/vessel-form.component.html | 37 ++++++ .../vessel-form/vessel-form.component.scss | 0 .../vessel-form.component.spec.ts} | 12 +- .../vessel-form/vessel-form.component.ts | 41 ++++++ .../vessel-list/vessel-list.component.html | 2 +- .../vessel-list/vessel-list.component.ts | 5 +- .../vessel-new/vessel-new.component.html | 29 ---- .../vessel/vessel-new/vessel-new.component.ts | 66 --------- .../zone-detail/zone-detail.component.html | 1 + .../zone-detail/zone-detail.component.scss | 0 .../zone-detail.component.spec.ts} | 12 +- .../zone/zone-detail/zone-detail.component.ts | 59 +++++++++ .../zone-form/zone-form.component.html} | 5 +- .../zone/zone-form/zone-form.component.scss | 0 .../zone-form.component.spec.ts} | 12 +- .../zone/zone-form/zone-form.component.ts | 29 ++++ .../zone/zone-list/zone-list.component.html | 2 +- .../zone/zone-list/zone-list.component.ts | 5 +- .../zone/zone-new/zone-new.component.html | 11 -- .../zone/zone-new/zone-new.component.ts | 41 ------ angular/src/app/app-routing.module.ts | 38 ++++++ angular/src/app/app.module.ts | 24 ++-- .../app/core/api/v1/api/location.service.ts | 71 ++++++++++ .../api/v1/api/shippingCompany.service.ts | 71 ++++++++++ .../src/app/core/api/v1/api/user.service.ts | 71 ++++++++++ .../src/app/core/api/v1/api/vessel.service.ts | 71 ++++++++++ .../src/app/core/api/v1/api/zone.service.ts | 71 ++++++++++ angular/src/assets/i18n/en.json | 6 +- httpdocs/src/ApiResource/LocationApi.php | 4 + .../src/ApiResource/ShippingCompanyApi.php | 4 + httpdocs/src/ApiResource/UserApi.php | 4 + httpdocs/src/ApiResource/VesselApi.php | 4 + httpdocs/src/ApiResource/ZoneApi.php | 4 + .../src/Mapper/LocationApiToEntityMapper.php | 1 - 79 files changed, 1308 insertions(+), 734 deletions(-) create mode 100644 angular/src/app/_components/_abstract/abstract-data-form-component.ts create mode 100644 angular/src/app/_components/simple-paging/paging-get-data-function.ts create mode 100644 angular/src/app/_components/simple-paging/simple-paging.component.html rename angular/src/app/{_views/location/location-new/location-new.component.scss => _components/simple-paging/simple-paging.component.scss} (100%) create mode 100644 angular/src/app/_components/simple-paging/simple-paging.component.spec.ts create mode 100644 angular/src/app/_components/simple-paging/simple-paging.component.ts delete mode 100644 angular/src/app/_guards/game-account-owner.guard.spec.ts delete mode 100644 angular/src/app/_guards/game-account-owner.guard.ts delete mode 100644 angular/src/app/_helpers/price-calculator.service.ts delete mode 100644 angular/src/app/_interfaces/AbstractCreateDataComponent.ts rename angular/src/app/_interfaces/{CreateDataComponentInterface.ts => data-form-component.ts} (56%) delete mode 100644 angular/src/app/_services/data-import.service.ts delete mode 100644 angular/src/app/_services/ea-data-connect.service.ts delete mode 100644 angular/src/app/_services/sniping.service.ts create mode 100644 angular/src/app/_views/location/location-detail/location-detail.component.html rename angular/src/app/_views/{shipping-company/shipping-company-new/shipping-company-new.component.scss => location/location-detail/location-detail.component.scss} (100%) create mode 100644 angular/src/app/_views/location/location-detail/location-detail.component.spec.ts create mode 100644 angular/src/app/_views/location/location-detail/location-detail.component.ts rename angular/src/app/_views/location/{location-new/location-new.component.html => location-form/location-form.component.html} (57%) rename angular/src/app/_views/{vessel/vessel-new/vessel-new.component.scss => location/location-form/location-form.component.scss} (100%) create mode 100644 angular/src/app/_views/location/location-form/location-form.component.spec.ts create mode 100644 angular/src/app/_views/location/location-form/location-form.component.ts delete mode 100644 angular/src/app/_views/location/location-new/location-new.component.ts create mode 100644 angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.html rename angular/src/app/_views/{zone/zone-new/zone-new.component.scss => shipping-company/shipping-company-detail/shipping-company-detail.component.scss} (100%) create mode 100644 angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.spec.ts create mode 100644 angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.ts create mode 100644 angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.html create mode 100644 angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.scss create mode 100644 angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.spec.ts create mode 100644 angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.ts delete mode 100644 angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.spec.ts delete mode 100644 angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.ts create mode 100644 angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.html create mode 100644 angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.scss create mode 100644 angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.spec.ts create mode 100644 angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.ts create mode 100644 angular/src/app/_views/vessel/vessel-form/vessel-form.component.html create mode 100644 angular/src/app/_views/vessel/vessel-form/vessel-form.component.scss rename angular/src/app/_views/vessel/{vessel-new/vessel-new.component.spec.ts => vessel-form/vessel-form.component.spec.ts} (52%) create mode 100644 angular/src/app/_views/vessel/vessel-form/vessel-form.component.ts delete mode 100644 angular/src/app/_views/vessel/vessel-new/vessel-new.component.html delete mode 100644 angular/src/app/_views/vessel/vessel-new/vessel-new.component.ts create mode 100644 angular/src/app/_views/zone/zone-detail/zone-detail.component.html create mode 100644 angular/src/app/_views/zone/zone-detail/zone-detail.component.scss rename angular/src/app/_views/{location/location-new/location-new.component.spec.ts => zone/zone-detail/zone-detail.component.spec.ts} (52%) create mode 100644 angular/src/app/_views/zone/zone-detail/zone-detail.component.ts rename angular/src/app/_views/{shipping-company/shipping-company-new/shipping-company-new.component.html => zone/zone-form/zone-form.component.html} (75%) create mode 100644 angular/src/app/_views/zone/zone-form/zone-form.component.scss rename angular/src/app/_views/zone/{zone-new/zone-new.component.spec.ts => zone-form/zone-form.component.spec.ts} (54%) create mode 100644 angular/src/app/_views/zone/zone-form/zone-form.component.ts delete mode 100644 angular/src/app/_views/zone/zone-new/zone-new.component.html delete mode 100644 angular/src/app/_views/zone/zone-new/zone-new.component.ts diff --git a/angular/openapi.json b/angular/openapi.json index cd674cb..618a6b5 100644 --- a/angular/openapi.json +++ b/angular/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"Imaq Platform","description":"","version":"1.0.0"},"servers":[{"url":"\/","description":""}],"paths":{"\/api\/locations":{"get":{"operationId":"api_locations_get_collection","tags":["Location"],"responses":{"200":{"description":"Location collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Location.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Location resources.","description":"Retrieves the collection of Location resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_locations_post","tags":["Location"],"responses":{"201":{"description":"Location resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Location resource.","description":"Creates a Location resource.","parameters":[],"requestBody":{"description":"The new Location resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"required":true},"deprecated":false}},"\/api\/locations\/{id}":{"get":{"operationId":"api_locations_id_get","tags":["Location"],"responses":{"200":{"description":"Location resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Location resource.","description":"Retrieves a Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_locations_id_patch","tags":["Location"],"responses":{"200":{"description":"Location resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Location resource.","description":"Updates the Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Location resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Location"}}},"required":true},"deprecated":false}},"\/api\/auth":{"post":{"operationId":"login_check_post","tags":["Login Check"],"responses":{"200":{"description":"User token created","content":{"application\/json":{"schema":{"type":"object","properties":{"token":{"readOnly":true,"type":"string","nullable":false}},"required":["token"]}}}}},"summary":"Creates a user token.","description":"Creates a user token.","requestBody":{"description":"The login data","content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","nullable":false},"password":{"type":"string","nullable":false}},"required":["email","password"]}}},"required":true}}},"\/api\/media_objects":{"get":{"operationId":"api_media_objects_get_collection","tags":["MediaObject"],"responses":{"200":{"description":"MediaObject collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/MediaObject.jsonld-media_object.read"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of MediaObject resources.","description":"Retrieves the collection of MediaObject resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_media_objects_post","tags":["MediaObject"],"responses":{"201":{"description":"MediaObject resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/MediaObject.jsonld-media_object.read"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a MediaObject resource.","description":"Creates a MediaObject resource.","parameters":[],"requestBody":{"description":"The new MediaObject resource","content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":false},"deprecated":false}},"\/api\/media_objects\/{id}":{"get":{"operationId":"api_media_objects_id_get","tags":["MediaObject"],"responses":{"200":{"description":"MediaObject resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/MediaObject.jsonld-media_object.read"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a MediaObject resource.","description":"Retrieves a MediaObject resource.","parameters":[{"name":"id","in":"path","description":"MediaObject identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_media_objects_id_delete","tags":["MediaObject"],"responses":{"204":{"description":"MediaObject resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the MediaObject resource.","description":"Removes the MediaObject resource.","parameters":[{"name":"id","in":"path","description":"MediaObject identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false}},"\/api\/shipping_companies":{"get":{"operationId":"api_shipping_companies_get_collection","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of ShippingCompany resources.","description":"Retrieves the collection of ShippingCompany resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_shipping_companies_post","tags":["ShippingCompany"],"responses":{"201":{"description":"ShippingCompany resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a ShippingCompany resource.","description":"Creates a ShippingCompany resource.","parameters":[],"requestBody":{"description":"The new ShippingCompany resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"required":true},"deprecated":false}},"\/api\/shipping_companies\/{id}":{"get":{"operationId":"api_shipping_companies_id_get","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a ShippingCompany resource.","description":"Retrieves a ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_shipping_companies_id_patch","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the ShippingCompany resource.","description":"Updates the ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated ShippingCompany resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany"}}},"required":true},"deprecated":false}},"\/api\/trips":{"get":{"operationId":"api_trips_get_collection","tags":["Trip"],"responses":{"200":{"description":"Trip collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Trip.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Trip resources.","description":"Retrieves the collection of Trip resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_trips_post","tags":["Trip"],"responses":{"201":{"description":"Trip resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Trip resource.","description":"Creates a Trip resource.","parameters":[],"requestBody":{"description":"The new Trip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"required":true},"deprecated":false}},"\/api\/trips\/{id}":{"get":{"operationId":"api_trips_id_get","tags":["Trip"],"responses":{"200":{"description":"Trip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Trip resource.","description":"Retrieves a Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_trips_id_patch","tags":["Trip"],"responses":{"200":{"description":"Trip resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Trip resource.","description":"Updates the Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Trip resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Trip"}}},"required":true},"deprecated":false}},"\/api\/trip_locations":{"get":{"operationId":"api_trip_locations_get_collection","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of TripLocation resources.","description":"Retrieves the collection of TripLocation resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_trip_locations_post","tags":["TripLocation"],"responses":{"201":{"description":"TripLocation resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a TripLocation resource.","description":"Creates a TripLocation resource.","parameters":[],"requestBody":{"description":"The new TripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"required":true},"deprecated":false}},"\/api\/trip_locations\/{id}":{"get":{"operationId":"api_trip_locations_id_get","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a TripLocation resource.","description":"Retrieves a TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_trip_locations_id_patch","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the TripLocation resource.","description":"Updates the TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated TripLocation resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation"}}},"required":true},"deprecated":false}},"\/api\/users":{"get":{"operationId":"api_users_get_collection","tags":["User"],"responses":{"200":{"description":"User collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/User.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of User resources.","description":"Retrieves the collection of User resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"firstName","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"lastName","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"userNameSearch","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_users_post","tags":["User"],"responses":{"201":{"description":"User resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a User resource.","description":"Creates a User resource.","parameters":[],"requestBody":{"description":"The new User resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"required":true},"deprecated":false}},"\/api\/users\/{id}":{"get":{"operationId":"api_users_id_get","tags":["User"],"responses":{"200":{"description":"User resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a User resource.","description":"Retrieves a User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_users_id_patch","tags":["User"],"responses":{"200":{"description":"User resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the User resource.","description":"Updates the User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated User resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/User"}}},"required":true},"deprecated":false}},"\/api\/user_trips":{"get":{"operationId":"api_user_trips_get_collection","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTrip resources.","description":"Retrieves the collection of UserTrip resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trips_post","tags":["UserTrip"],"responses":{"201":{"description":"UserTrip resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTrip resource.","description":"Creates a UserTrip resource.","parameters":[],"requestBody":{"description":"The new UserTrip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trips\/{id}":{"get":{"operationId":"api_user_trips_id_get","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTrip resource.","description":"Retrieves a UserTrip resource.","parameters":[{"name":"id","in":"path","description":"UserTrip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trips_id_patch","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTrip resource.","description":"Updates the UserTrip resource.","parameters":[{"name":"id","in":"path","description":"UserTrip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTrip resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip"}}},"required":true},"deprecated":false}},"\/api\/user_trip_locations":{"get":{"operationId":"api_user_trip_locations_get_collection","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTripLocation resources.","description":"Retrieves the collection of UserTripLocation resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trip_locations_post","tags":["UserTripLocation"],"responses":{"201":{"description":"UserTripLocation resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTripLocation resource.","description":"Creates a UserTripLocation resource.","parameters":[],"requestBody":{"description":"The new UserTripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trip_locations\/{id}":{"get":{"operationId":"api_user_trip_locations_id_get","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTripLocation resource.","description":"Retrieves a UserTripLocation resource.","parameters":[{"name":"id","in":"path","description":"UserTripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trip_locations_id_patch","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTripLocation resource.","description":"Updates the UserTripLocation resource.","parameters":[{"name":"id","in":"path","description":"UserTripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTripLocation resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation"}}},"required":true},"deprecated":false}},"\/api\/user_trip_work_logs":{"get":{"operationId":"api_user_trip_work_logs_get_collection","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTripWorkLog resources.","description":"Retrieves the collection of UserTripWorkLog resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trip_work_logs_post","tags":["UserTripWorkLog"],"responses":{"201":{"description":"UserTripWorkLog resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTripWorkLog resource.","description":"Creates a UserTripWorkLog resource.","parameters":[],"requestBody":{"description":"The new UserTripWorkLog resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trip_work_logs\/{id}":{"get":{"operationId":"api_user_trip_work_logs_id_get","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTripWorkLog resource.","description":"Retrieves a UserTripWorkLog resource.","parameters":[{"name":"id","in":"path","description":"UserTripWorkLog identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trip_work_logs_id_patch","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTripWorkLog resource.","description":"Updates the UserTripWorkLog resource.","parameters":[{"name":"id","in":"path","description":"UserTripWorkLog identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTripWorkLog resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog"}}},"required":true},"deprecated":false}},"\/api\/vessels":{"get":{"operationId":"api_vessels_get_collection","tags":["Vessel"],"responses":{"200":{"description":"Vessel collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Vessel resources.","description":"Retrieves the collection of Vessel resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_vessels_post","tags":["Vessel"],"responses":{"201":{"description":"Vessel resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Vessel resource.","description":"Creates a Vessel resource.","parameters":[],"requestBody":{"description":"The new Vessel resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"required":true},"deprecated":false}},"\/api\/vessels\/{id}":{"get":{"operationId":"api_vessels_id_get","tags":["Vessel"],"responses":{"200":{"description":"Vessel resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Vessel resource.","description":"Retrieves a Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_vessels_id_patch","tags":["Vessel"],"responses":{"200":{"description":"Vessel resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Vessel resource.","description":"Updates the Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Vessel resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel"}}},"required":true},"deprecated":false}},"\/api\/zones":{"get":{"operationId":"api_zones_get_collection","tags":["Zone"],"responses":{"200":{"description":"Zone collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Zone.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Zone resources.","description":"Retrieves the collection of Zone resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_zones_post","tags":["Zone"],"responses":{"201":{"description":"Zone resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Zone resource.","description":"Creates a Zone resource.","parameters":[],"requestBody":{"description":"The new Zone resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"required":true},"deprecated":false}},"\/api\/zones\/{id}":{"get":{"operationId":"api_zones_id_get","tags":["Zone"],"responses":{"200":{"description":"Zone resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Zone resource.","description":"Retrieves a Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_zones_id_patch","tags":["Zone"],"responses":{"200":{"description":"Zone resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Zone resource.","description":"Updates the Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Zone resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Zone"}}},"required":true},"deprecated":false}}},"components":{"schemas":{"Location":{"type":"object","description":"","deprecated":false,"properties":{"zone":{"$ref":"#\/components\/schemas\/Zone"},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Location.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"zone":{"$ref":"#\/components\/schemas\/Zone.jsonld"},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"MediaObject.jsonld-media_object.read":{"type":"object","description":"","deprecated":false,"externalDocs":{"url":"https:\/\/schema.org\/MediaObject"},"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"contentUrl":{"externalDocs":{"url":"https:\/\/schema.org\/contentUrl"},"type":["string","null"]}}},"ShippingCompany":{"type":"object","description":"","deprecated":false,"required":["name","code"],"properties":{"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"ShippingCompany.jsonld":{"type":"object","description":"","deprecated":false,"required":["name","code"],"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Trip":{"type":"object","description":"","deprecated":false,"properties":{"vessel":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"pilotReference":{"type":"string"},"captainName":{"type":["string","null"]},"startLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"endLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["pilotReference","startDate","endDate"]},"Trip.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"vessel":{"readOnly":true,"$ref":"#\/components\/schemas\/Vessel.jsonld"},"pilotReference":{"type":"string"},"captainName":{"type":["string","null"]},"startLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"endLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["pilotReference","startDate","endDate"]},"TripLocation":{"type":"object","description":"","deprecated":false,"properties":{"trip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"location":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"date":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["date"]},"TripLocation.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"trip":{"readOnly":true,"$ref":"#\/components\/schemas\/Trip.jsonld"},"location":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"date":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["date"]},"User":{"type":"object","description":"","deprecated":false,"required":["email","firstName","lastName"],"properties":{"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"image":{"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"fullName":{"readOnly":true,"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":["string","null"]},"active":{"type":"boolean"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"User.jsonld":{"type":"object","description":"","deprecated":false,"required":["email","firstName","lastName"],"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"image":{"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"fullName":{"readOnly":true,"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":["string","null"]},"active":{"type":"boolean"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"UserTrip":{"type":"object","description":"","deprecated":false,"properties":{"trip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"user":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"captainName":{"type":"string"},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["captainName","startDate","endDate"]},"UserTrip.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"trip":{"readOnly":true,"$ref":"#\/components\/schemas\/Trip.jsonld"},"user":{"readOnly":true,"$ref":"#\/components\/schemas\/User.jsonld"},"captainName":{"type":"string"},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["captainName","startDate","endDate"]},"UserTripLocation":{"type":"object","description":"","deprecated":false,"properties":{"userTrip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"location":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"plannedDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["plannedDate"]},"UserTripLocation.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"userTrip":{"readOnly":true,"$ref":"#\/components\/schemas\/UserTrip.jsonld"},"location":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"plannedDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["plannedDate"]},"UserTripWorkLog":{"type":"object","description":"","deprecated":false,"properties":{"userTrip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"endLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["startDate","endDate"]},"UserTripWorkLog.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"userTrip":{"readOnly":true,"$ref":"#\/components\/schemas\/UserTrip.jsonld"},"startLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"endLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["startDate","endDate"]},"Vessel":{"type":"object","description":"","deprecated":false,"required":["name","code"],"properties":{"name":{"type":"string"},"code":{"type":"string"},"company":{"$ref":"#\/components\/schemas\/ShippingCompany"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Vessel.jsonld":{"type":"object","description":"","deprecated":false,"required":["name","code"],"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"company":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Zone":{"type":"object","description":"","deprecated":false,"required":["name"],"properties":{"name":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Zone.jsonld":{"type":"object","description":"","deprecated":false,"required":["name"],"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"name":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}}},"responses":{},"parameters":{},"examples":{},"requestBodies":{},"headers":{},"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"JWT":[]}],"tags":[],"webhooks":{}} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"Imaq Platform","description":"","version":"1.0.0"},"servers":[{"url":"\/","description":""}],"paths":{"\/api\/locations":{"get":{"operationId":"api_locations_get_collection","tags":["Location"],"responses":{"200":{"description":"Location collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Location.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Location resources.","description":"Retrieves the collection of Location resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_locations_post","tags":["Location"],"responses":{"201":{"description":"Location resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Location resource.","description":"Creates a Location resource.","parameters":[],"requestBody":{"description":"The new Location resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"required":true},"deprecated":false}},"\/api\/locations\/{id}":{"get":{"operationId":"api_locations_id_get","tags":["Location"],"responses":{"200":{"description":"Location resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Location resource.","description":"Retrieves a Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_locations_id_delete","tags":["Location"],"responses":{"204":{"description":"Location resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Location resource.","description":"Removes the Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_locations_id_patch","tags":["Location"],"responses":{"200":{"description":"Location resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Location.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Location resource.","description":"Updates the Location resource.","parameters":[{"name":"id","in":"path","description":"Location identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Location resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Location"}}},"required":true},"deprecated":false}},"\/api\/auth":{"post":{"operationId":"login_check_post","tags":["Login Check"],"responses":{"200":{"description":"User token created","content":{"application\/json":{"schema":{"type":"object","properties":{"token":{"readOnly":true,"type":"string","nullable":false}},"required":["token"]}}}}},"summary":"Creates a user token.","description":"Creates a user token.","requestBody":{"description":"The login data","content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","nullable":false},"password":{"type":"string","nullable":false}},"required":["email","password"]}}},"required":true}}},"\/api\/media_objects":{"get":{"operationId":"api_media_objects_get_collection","tags":["MediaObject"],"responses":{"200":{"description":"MediaObject collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/MediaObject.jsonld-media_object.read"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of MediaObject resources.","description":"Retrieves the collection of MediaObject resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_media_objects_post","tags":["MediaObject"],"responses":{"201":{"description":"MediaObject resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/MediaObject.jsonld-media_object.read"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a MediaObject resource.","description":"Creates a MediaObject resource.","parameters":[],"requestBody":{"description":"The new MediaObject resource","content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":false},"deprecated":false}},"\/api\/media_objects\/{id}":{"get":{"operationId":"api_media_objects_id_get","tags":["MediaObject"],"responses":{"200":{"description":"MediaObject resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/MediaObject.jsonld-media_object.read"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a MediaObject resource.","description":"Retrieves a MediaObject resource.","parameters":[{"name":"id","in":"path","description":"MediaObject identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_media_objects_id_delete","tags":["MediaObject"],"responses":{"204":{"description":"MediaObject resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the MediaObject resource.","description":"Removes the MediaObject resource.","parameters":[{"name":"id","in":"path","description":"MediaObject identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false}},"\/api\/shipping_companies":{"get":{"operationId":"api_shipping_companies_get_collection","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of ShippingCompany resources.","description":"Retrieves the collection of ShippingCompany resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_shipping_companies_post","tags":["ShippingCompany"],"responses":{"201":{"description":"ShippingCompany resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a ShippingCompany resource.","description":"Creates a ShippingCompany resource.","parameters":[],"requestBody":{"description":"The new ShippingCompany resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"required":true},"deprecated":false}},"\/api\/shipping_companies\/{id}":{"get":{"operationId":"api_shipping_companies_id_get","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a ShippingCompany resource.","description":"Retrieves a ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_shipping_companies_id_delete","tags":["ShippingCompany"],"responses":{"204":{"description":"ShippingCompany resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the ShippingCompany resource.","description":"Removes the ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_shipping_companies_id_patch","tags":["ShippingCompany"],"responses":{"200":{"description":"ShippingCompany resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the ShippingCompany resource.","description":"Updates the ShippingCompany resource.","parameters":[{"name":"id","in":"path","description":"ShippingCompany identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated ShippingCompany resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/ShippingCompany"}}},"required":true},"deprecated":false}},"\/api\/trips":{"get":{"operationId":"api_trips_get_collection","tags":["Trip"],"responses":{"200":{"description":"Trip collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Trip.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Trip resources.","description":"Retrieves the collection of Trip resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_trips_post","tags":["Trip"],"responses":{"201":{"description":"Trip resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Trip resource.","description":"Creates a Trip resource.","parameters":[],"requestBody":{"description":"The new Trip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"required":true},"deprecated":false}},"\/api\/trips\/{id}":{"get":{"operationId":"api_trips_id_get","tags":["Trip"],"responses":{"200":{"description":"Trip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Trip resource.","description":"Retrieves a Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_trips_id_patch","tags":["Trip"],"responses":{"200":{"description":"Trip resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Trip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Trip resource.","description":"Updates the Trip resource.","parameters":[{"name":"id","in":"path","description":"Trip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Trip resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Trip"}}},"required":true},"deprecated":false}},"\/api\/trip_locations":{"get":{"operationId":"api_trip_locations_get_collection","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of TripLocation resources.","description":"Retrieves the collection of TripLocation resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_trip_locations_post","tags":["TripLocation"],"responses":{"201":{"description":"TripLocation resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a TripLocation resource.","description":"Creates a TripLocation resource.","parameters":[],"requestBody":{"description":"The new TripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"required":true},"deprecated":false}},"\/api\/trip_locations\/{id}":{"get":{"operationId":"api_trip_locations_id_get","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a TripLocation resource.","description":"Retrieves a TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_trip_locations_id_patch","tags":["TripLocation"],"responses":{"200":{"description":"TripLocation resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the TripLocation resource.","description":"Updates the TripLocation resource.","parameters":[{"name":"id","in":"path","description":"TripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated TripLocation resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/TripLocation"}}},"required":true},"deprecated":false}},"\/api\/users":{"get":{"operationId":"api_users_get_collection","tags":["User"],"responses":{"200":{"description":"User collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/User.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of User resources.","description":"Retrieves the collection of User resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"firstName","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"lastName","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"userNameSearch","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_users_post","tags":["User"],"responses":{"201":{"description":"User resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a User resource.","description":"Creates a User resource.","parameters":[],"requestBody":{"description":"The new User resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"required":true},"deprecated":false}},"\/api\/users\/{id}":{"get":{"operationId":"api_users_id_get","tags":["User"],"responses":{"200":{"description":"User resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a User resource.","description":"Retrieves a User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_users_id_delete","tags":["User"],"responses":{"204":{"description":"User resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the User resource.","description":"Removes the User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_users_id_patch","tags":["User"],"responses":{"200":{"description":"User resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/User.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the User resource.","description":"Updates the User resource.","parameters":[{"name":"id","in":"path","description":"User identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated User resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/User"}}},"required":true},"deprecated":false}},"\/api\/user_trips":{"get":{"operationId":"api_user_trips_get_collection","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTrip resources.","description":"Retrieves the collection of UserTrip resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trips_post","tags":["UserTrip"],"responses":{"201":{"description":"UserTrip resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTrip resource.","description":"Creates a UserTrip resource.","parameters":[],"requestBody":{"description":"The new UserTrip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trips\/{id}":{"get":{"operationId":"api_user_trips_id_get","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTrip resource.","description":"Retrieves a UserTrip resource.","parameters":[{"name":"id","in":"path","description":"UserTrip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trips_id_patch","tags":["UserTrip"],"responses":{"200":{"description":"UserTrip resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTrip resource.","description":"Updates the UserTrip resource.","parameters":[{"name":"id","in":"path","description":"UserTrip identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTrip resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTrip"}}},"required":true},"deprecated":false}},"\/api\/user_trip_locations":{"get":{"operationId":"api_user_trip_locations_get_collection","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTripLocation resources.","description":"Retrieves the collection of UserTripLocation resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trip_locations_post","tags":["UserTripLocation"],"responses":{"201":{"description":"UserTripLocation resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTripLocation resource.","description":"Creates a UserTripLocation resource.","parameters":[],"requestBody":{"description":"The new UserTripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trip_locations\/{id}":{"get":{"operationId":"api_user_trip_locations_id_get","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTripLocation resource.","description":"Retrieves a UserTripLocation resource.","parameters":[{"name":"id","in":"path","description":"UserTripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trip_locations_id_patch","tags":["UserTripLocation"],"responses":{"200":{"description":"UserTripLocation resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTripLocation resource.","description":"Updates the UserTripLocation resource.","parameters":[{"name":"id","in":"path","description":"UserTripLocation identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTripLocation resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripLocation"}}},"required":true},"deprecated":false}},"\/api\/user_trip_work_logs":{"get":{"operationId":"api_user_trip_work_logs_get_collection","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of UserTripWorkLog resources.","description":"Retrieves the collection of UserTripWorkLog resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_user_trip_work_logs_post","tags":["UserTripWorkLog"],"responses":{"201":{"description":"UserTripWorkLog resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a UserTripWorkLog resource.","description":"Creates a UserTripWorkLog resource.","parameters":[],"requestBody":{"description":"The new UserTripWorkLog resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"required":true},"deprecated":false}},"\/api\/user_trip_work_logs\/{id}":{"get":{"operationId":"api_user_trip_work_logs_id_get","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a UserTripWorkLog resource.","description":"Retrieves a UserTripWorkLog resource.","parameters":[{"name":"id","in":"path","description":"UserTripWorkLog identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_user_trip_work_logs_id_patch","tags":["UserTripWorkLog"],"responses":{"200":{"description":"UserTripWorkLog resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the UserTripWorkLog resource.","description":"Updates the UserTripWorkLog resource.","parameters":[{"name":"id","in":"path","description":"UserTripWorkLog identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated UserTripWorkLog resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/UserTripWorkLog"}}},"required":true},"deprecated":false}},"\/api\/vessels":{"get":{"operationId":"api_vessels_get_collection","tags":["Vessel"],"responses":{"200":{"description":"Vessel collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Vessel resources.","description":"Retrieves the collection of Vessel resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_vessels_post","tags":["Vessel"],"responses":{"201":{"description":"Vessel resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Vessel resource.","description":"Creates a Vessel resource.","parameters":[],"requestBody":{"description":"The new Vessel resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"required":true},"deprecated":false}},"\/api\/vessels\/{id}":{"get":{"operationId":"api_vessels_id_get","tags":["Vessel"],"responses":{"200":{"description":"Vessel resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Vessel resource.","description":"Retrieves a Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_vessels_id_delete","tags":["Vessel"],"responses":{"204":{"description":"Vessel resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Vessel resource.","description":"Removes the Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_vessels_id_patch","tags":["Vessel"],"responses":{"200":{"description":"Vessel resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Vessel resource.","description":"Updates the Vessel resource.","parameters":[{"name":"id","in":"path","description":"Vessel identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Vessel resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Vessel"}}},"required":true},"deprecated":false}},"\/api\/zones":{"get":{"operationId":"api_zones_get_collection","tags":["Zone"],"responses":{"200":{"description":"Zone collection","content":{"application\/ld+json":{"schema":{"type":"object","properties":{"member":{"type":"array","items":{"$ref":"#\/components\/schemas\/Zone.jsonld"}},"totalItems":{"type":"integer","minimum":0},"view":{"type":"object","properties":{"@id":{"type":"string","format":"iri-reference"},"@type":{"type":"string"},"first":{"type":"string","format":"iri-reference"},"last":{"type":"string","format":"iri-reference"},"previous":{"type":"string","format":"iri-reference"},"next":{"type":"string","format":"iri-reference"}},"example":{"@id":"string","type":"string","first":"string","last":"string","previous":"string","next":"string"}},"search":{"type":"object","properties":{"@type":{"type":"string"},"template":{"type":"string"},"variableRepresentation":{"type":"string"},"mapping":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string"},"variable":{"type":"string"},"property":{"type":["string","null"]},"required":{"type":"boolean"}}}}}}},"required":["member"]}}}}},"summary":"Retrieves the collection of Zone resources.","description":"Retrieves the collection of Zone resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"itemsPerPage","in":"query","description":"The number of items per page","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":50,"minimum":0,"maximum":100},"style":"form","explode":false,"allowReserved":false},{"name":"name","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_filter","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"custom_json_order","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"post":{"operationId":"api_zones_post","tags":["Zone"],"responses":{"201":{"description":"Zone resource created","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a Zone resource.","description":"Creates a Zone resource.","parameters":[],"requestBody":{"description":"The new Zone resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"required":true},"deprecated":false}},"\/api\/zones\/{id}":{"get":{"operationId":"api_zones_id_get","tags":["Zone"],"responses":{"200":{"description":"Zone resource","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}}},"404":{"description":"Resource not found"}},"summary":"Retrieves a Zone resource.","description":"Retrieves a Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"delete":{"operationId":"api_zones_id_delete","tags":["Zone"],"responses":{"204":{"description":"Zone resource deleted"},"404":{"description":"Resource not found"}},"summary":"Removes the Zone resource.","description":"Removes the Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"deprecated":false},"patch":{"operationId":"api_zones_id_patch","tags":["Zone"],"responses":{"200":{"description":"Zone resource updated","content":{"application\/ld+json":{"schema":{"$ref":"#\/components\/schemas\/Zone.jsonld"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"},"404":{"description":"Resource not found"}},"summary":"Updates the Zone resource.","description":"Updates the Zone resource.","parameters":[{"name":"id","in":"path","description":"Zone identifier","required":true,"deprecated":false,"allowEmptyValue":false,"schema":{"type":"string"},"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The updated Zone resource","content":{"application\/merge-patch+json":{"schema":{"$ref":"#\/components\/schemas\/Zone"}}},"required":true},"deprecated":false}}},"components":{"schemas":{"Location":{"type":"object","description":"","deprecated":false,"properties":{"zone":{"$ref":"#\/components\/schemas\/Zone"},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"Location.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"zone":{"$ref":"#\/components\/schemas\/Zone.jsonld"},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["name","code"]},"MediaObject.jsonld-media_object.read":{"type":"object","description":"","deprecated":false,"externalDocs":{"url":"https:\/\/schema.org\/MediaObject"},"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"contentUrl":{"externalDocs":{"url":"https:\/\/schema.org\/contentUrl"},"type":["string","null"]}}},"ShippingCompany":{"type":"object","description":"","deprecated":false,"required":["name","code"],"properties":{"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"ShippingCompany.jsonld":{"type":"object","description":"","deprecated":false,"required":["name","code"],"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Trip":{"type":"object","description":"","deprecated":false,"properties":{"vessel":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"pilotReference":{"type":"string"},"captainName":{"type":["string","null"]},"startLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"endLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["pilotReference","startDate","endDate"]},"Trip.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"vessel":{"readOnly":true,"$ref":"#\/components\/schemas\/Vessel.jsonld"},"pilotReference":{"type":"string"},"captainName":{"type":["string","null"]},"startLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"endLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["pilotReference","startDate","endDate"]},"TripLocation":{"type":"object","description":"","deprecated":false,"properties":{"trip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"location":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"date":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["date"]},"TripLocation.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"trip":{"readOnly":true,"$ref":"#\/components\/schemas\/Trip.jsonld"},"location":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"date":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["date"]},"User":{"type":"object","description":"","deprecated":false,"required":["email","firstName","lastName"],"properties":{"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"image":{"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"fullName":{"readOnly":true,"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":["string","null"]},"active":{"type":"boolean"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"User.jsonld":{"type":"object","description":"","deprecated":false,"required":["email","firstName","lastName"],"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"image":{"type":["string","null"],"format":"iri-reference","example":"https:\/\/example.com\/"},"imageUrl":{"readOnly":true,"type":["string","null"]},"fullName":{"readOnly":true,"type":["string","null"]},"password":{"writeOnly":true,"description":"The plaintext password when being set or changed.","type":["string","null"]},"active":{"type":"boolean"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"UserTrip":{"type":"object","description":"","deprecated":false,"properties":{"trip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"user":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"captainName":{"type":"string"},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["captainName","startDate","endDate"]},"UserTrip.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"trip":{"readOnly":true,"$ref":"#\/components\/schemas\/Trip.jsonld"},"user":{"readOnly":true,"$ref":"#\/components\/schemas\/User.jsonld"},"captainName":{"type":"string"},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["captainName","startDate","endDate"]},"UserTripLocation":{"type":"object","description":"","deprecated":false,"properties":{"userTrip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"location":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"plannedDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["plannedDate"]},"UserTripLocation.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"userTrip":{"readOnly":true,"$ref":"#\/components\/schemas\/UserTrip.jsonld"},"location":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"plannedDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["plannedDate"]},"UserTripWorkLog":{"type":"object","description":"","deprecated":false,"properties":{"userTrip":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"endLocation":{"readOnly":true,"type":"string","format":"iri-reference","example":"https:\/\/example.com\/"},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["startDate","endDate"]},"UserTripWorkLog.jsonld":{"type":"object","description":"","deprecated":false,"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"userTrip":{"readOnly":true,"$ref":"#\/components\/schemas\/UserTrip.jsonld"},"startLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"endLocation":{"readOnly":true,"$ref":"#\/components\/schemas\/Location.jsonld"},"startDate":{"type":["string","null"],"format":"date-time"},"endDate":{"type":["string","null"],"format":"date-time"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}},"required":["startDate","endDate"]},"Vessel":{"type":"object","description":"","deprecated":false,"required":["name","code"],"properties":{"name":{"type":"string"},"code":{"type":"string"},"company":{"$ref":"#\/components\/schemas\/ShippingCompany"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Vessel.jsonld":{"type":"object","description":"","deprecated":false,"required":["name","code"],"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"company":{"$ref":"#\/components\/schemas\/ShippingCompany.jsonld"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Zone":{"type":"object","description":"","deprecated":false,"required":["name"],"properties":{"name":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}},"Zone.jsonld":{"type":"object","description":"","deprecated":false,"required":["name"],"properties":{"@context":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"object","properties":{"@vocab":{"type":"string"},"hydra":{"type":"string","enum":["http:\/\/www.w3.org\/ns\/hydra\/core#"]}},"required":["@vocab","hydra"],"additionalProperties":true}]},"@id":{"readOnly":true,"type":"string"},"@type":{"readOnly":true,"type":"string"},"name":{"type":"string"},"createdAt":{"readOnly":true,"type":["string","null"],"format":"date-time"}}}},"responses":{},"parameters":{},"examples":{},"requestBodies":{},"headers":{},"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"JWT":[]}],"tags":[],"webhooks":{}} \ No newline at end of file diff --git a/angular/openapi.yaml b/angular/openapi.yaml index bf74283..f2c1a59 100644 --- a/angular/openapi.yaml +++ b/angular/openapi.yaml @@ -152,6 +152,31 @@ paths: explode: false allowReserved: false deprecated: false + delete: + operationId: api_locations_id_delete + tags: + - Location + responses: + '204': + description: 'Location resource deleted' + '404': + description: 'Resource not found' + summary: 'Removes the Location resource.' + description: 'Removes the Location resource.' + parameters: + - + name: id + in: path + description: 'Location identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false patch: operationId: api_locations_id_patch tags: @@ -509,6 +534,31 @@ paths: explode: false allowReserved: false deprecated: false + delete: + operationId: api_shipping_companies_id_delete + tags: + - ShippingCompany + responses: + '204': + description: 'ShippingCompany resource deleted' + '404': + description: 'Resource not found' + summary: 'Removes the ShippingCompany resource.' + description: 'Removes the ShippingCompany resource.' + parameters: + - + name: id + in: path + description: 'ShippingCompany identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false patch: operationId: api_shipping_companies_id_patch tags: @@ -1004,6 +1054,31 @@ paths: explode: false allowReserved: false deprecated: false + delete: + operationId: api_users_id_delete + tags: + - User + responses: + '204': + description: 'User resource deleted' + '404': + description: 'Resource not found' + summary: 'Removes the User resource.' + description: 'Removes the User resource.' + parameters: + - + name: id + in: path + description: 'User identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false patch: operationId: api_users_id_patch tags: @@ -1636,6 +1711,31 @@ paths: explode: false allowReserved: false deprecated: false + delete: + operationId: api_vessels_id_delete + tags: + - Vessel + responses: + '204': + description: 'Vessel resource deleted' + '404': + description: 'Resource not found' + summary: 'Removes the Vessel resource.' + description: 'Removes the Vessel resource.' + parameters: + - + name: id + in: path + description: 'Vessel identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false patch: operationId: api_vessels_id_patch tags: @@ -1821,6 +1921,31 @@ paths: explode: false allowReserved: false deprecated: false + delete: + operationId: api_zones_id_delete + tags: + - Zone + responses: + '204': + description: 'Zone resource deleted' + '404': + description: 'Resource not found' + summary: 'Removes the Zone resource.' + description: 'Removes the Zone resource.' + parameters: + - + name: id + in: path + description: 'Zone identifier' + required: true + deprecated: false + allowEmptyValue: false + schema: + type: string + style: simple + explode: false + allowReserved: false + deprecated: false patch: operationId: api_zones_id_patch tags: diff --git a/angular/src/app/_components/_abstract/abstract-data-form-component.ts b/angular/src/app/_components/_abstract/abstract-data-form-component.ts new file mode 100644 index 0000000..01b4574 --- /dev/null +++ b/angular/src/app/_components/_abstract/abstract-data-form-component.ts @@ -0,0 +1,64 @@ +import { Directive, EventEmitter, Input, Output, OnInit } from '@angular/core'; +import { FormGroup } from '@angular/forms'; +import { ModalStatus } from '@app/_helpers/modal.states'; +import { Observable } from 'rxjs'; + +export type SaveFunction = (item: T) => Observable; +export type UpdateFunction = (id: string | number, item: T) => Observable; + +export enum FormMode { + Create = 'create', + Edit = 'edit' +} + +@Directive() +export abstract class AbstractDataFormComponent implements OnInit { + @Input() data?: T; + @Input() mode: FormMode = FormMode.Create; + @Input() id?: string | number; + @Output() submit: EventEmitter = new EventEmitter(); + + protected form!: FormGroup; + + constructor( + protected formConfig: FormGroup, + protected createFn: SaveFunction, + protected updateFn: UpdateFunction + ) { + this.form = formConfig; + } + + ngOnInit(): void { + if (this.data) { + this.form.patchValue(this.data); + } else if (this.mode === FormMode.Create) { + this.data = this.getInitialData(); + this.form.patchValue(this.data); + } + } + + protected abstract getInitialData(): T; + + onSubmit(): void { + if (!this.form.valid) return; + + const formData = this.form.value as T; + const request$ = this.mode === FormMode.Create + ? this.createFn(formData) + : this.updateFn(this.id!, formData); + + request$.subscribe({ + next: () => { + // this.form.reset(); + this.submit.emit(ModalStatus.Submitted); + }, + error: (error) => { + console.error('Error saving data:', error); + } + }); + } + + isEditMode(): boolean { + return this.mode === FormMode.Edit; + } +} \ No newline at end of file diff --git a/angular/src/app/_components/list/list.component.html b/angular/src/app/_components/list/list.component.html index 2b958f2..ed327f4 100644 --- a/angular/src/app/_components/list/list.component.html +++ b/angular/src/app/_components/list/list.component.html @@ -5,7 +5,7 @@ [hidePageSize]="hidePageSize" [displayOptions]="displayOptions" [defaultDisplayOption]="defaultDisplayOption" - [showCreateDataButton]="createDataComponent !== undefined" + [showCreateDataButton]="dataFormComponent !== undefined" (createNewData)="onCreateData()" (displayOptionChange)="onDisplayOptionChange($event)" > @@ -114,9 +114,20 @@ - + + diff --git a/angular/src/app/_components/list/list.component.ts b/angular/src/app/_components/list/list.component.ts index 128d8eb..0b6b3b0 100644 --- a/angular/src/app/_components/list/list.component.ts +++ b/angular/src/app/_components/list/list.component.ts @@ -9,7 +9,7 @@ import {ListUpdateElementFunctionType} from "@app/_components/list/list-update-e import {FilterBarComponent} from "@app/_components/filter-bar/filter-bar.component"; import { Router } from '@angular/router'; import {interval, Subscription} from "rxjs"; -import {AbstractCreateDataComponent} from "@app/_interfaces/AbstractCreateDataComponent"; +import {AbstractDataFormComponent} from "@app/_components/_abstract/abstract-data-form-component"; @Component({ selector: 'app-list', @@ -22,12 +22,13 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { @Input() public getDataFunction!: ListGetDataFunctionType; @Input() public onSortFunction!: Function; @Input() public onNavigateToDetailsFunction!: Function; + @Input() public getCustomDetailLinkFunction!: Function; @Input() public onRemoveItemFunction!: Function; @Input() public onEditFunction!: Function; @Input() public onDownloadFunction!: Function; @Input() public onRowSelectedFunction!: Function; @Input() public onUpdateBooleanStateFunction!: ListUpdateElementFunctionType; - @Input() public createDataComponent!: Type>; + @Input() public dataFormComponent!: Type>; @Input() public searchable: boolean; @Input() public showDetailButton: boolean; @Input() public showPosition: boolean; @@ -98,8 +99,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { this.listColDefinitions.unshift(ListComponent.getDefaultColPosition()); } if (this.showDetailButton) { - // this.listColDefinitions.unshift(ListComponent.getDefaultColDetailBtn()); - this.listColDefinitions.unshift(ListComponent.getDefaultColDetailBtnLink(this.router.routerState.snapshot.url)); + const url = this.getCustomDetailLinkFunction !== undefined ? '' : this.router.routerState.snapshot.url; + this.listColDefinitions.unshift(ListComponent.getDefaultColDetailBtnLink(url)); } if (this.displayOptions !== undefined) { this.currentGroup = this.defaultDisplayOption || Object.keys(this.displayOptions)[0] || ''; @@ -387,7 +388,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { public onCreateData() { this.appHelperService.openModal( - this.createDataComponent, + this.dataFormComponent, null, this.getData ); diff --git a/angular/src/app/_components/simple-paging/paging-get-data-function.ts b/angular/src/app/_components/simple-paging/paging-get-data-function.ts new file mode 100644 index 0000000..a0ea72a --- /dev/null +++ b/angular/src/app/_components/simple-paging/paging-get-data-function.ts @@ -0,0 +1,3 @@ +import {Observable} from "rxjs"; + +export type FetchDataFunction = (page: number, search?: string) => Observable; diff --git a/angular/src/app/_components/simple-paging/simple-paging.component.html b/angular/src/app/_components/simple-paging/simple-paging.component.html new file mode 100644 index 0000000..94b9c92 --- /dev/null +++ b/angular/src/app/_components/simple-paging/simple-paging.component.html @@ -0,0 +1,39 @@ +
+ @if (showSearch) { +
+
+ + @if (searchTerm) { + + } +
+
+ } + + + +
+ @if (currentPage > 1) { + + + } + + Seite {{ currentPage }} + + + @if (hasNextPage()) { + + + } + + + {{ totalItems }} Einträge + +
+
diff --git a/angular/src/app/_views/location/location-new/location-new.component.scss b/angular/src/app/_components/simple-paging/simple-paging.component.scss similarity index 100% rename from angular/src/app/_views/location/location-new/location-new.component.scss rename to angular/src/app/_components/simple-paging/simple-paging.component.scss diff --git a/angular/src/app/_components/simple-paging/simple-paging.component.spec.ts b/angular/src/app/_components/simple-paging/simple-paging.component.spec.ts new file mode 100644 index 0000000..84179d4 --- /dev/null +++ b/angular/src/app/_components/simple-paging/simple-paging.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SimplePagingComponent } from './simple-paging.component'; + +describe('SimplePagingComponent', () => { + let component: SimplePagingComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [SimplePagingComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(SimplePagingComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/angular/src/app/_components/simple-paging/simple-paging.component.ts b/angular/src/app/_components/simple-paging/simple-paging.component.ts new file mode 100644 index 0000000..b1e37dc --- /dev/null +++ b/angular/src/app/_components/simple-paging/simple-paging.component.ts @@ -0,0 +1,82 @@ +import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import {FetchDataFunction} from "@app/_components/simple-paging/paging-get-data-function"; + +@Component({ + selector: 'app-simple-paging', + standalone: true, + imports: [CommonModule, FormsModule], + templateUrl: './simple-paging.component.html', + styleUrls: ['./simple-paging.component.scss'] +}) +export class SimplePagingComponent implements OnInit { + @Input({ required: true }) fetchDataFunction!: FetchDataFunction; + @Input() showSearch: boolean = true; + @Output() dataChange = new EventEmitter(); + + protected searchTerm = ''; + protected totalItems = 0; + protected currentPage = 1; + protected lastPage = 1; + + ngOnInit() { + this.loadData(); + } + + protected loadData() { + this.fetchDataFunction(this.currentPage, this.searchTerm || undefined).subscribe({ + next: (data) => { + this.totalItems = data.totalItems ?? 0; + if (data.view?.last) { + const pageMatch = data.view?.last.match(/page=(\d+)/); + if (pageMatch) { + this.lastPage = parseInt(pageMatch[1]); + } + } + this.dataChange.emit(data.member); + }, + error: (error) => { + console.error('Error loading data:', error); + } + }); + } + + protected onPageChange(step: number) { + this.currentPage += step; + this.loadData(); + } + + protected onSearch(term: string) { + this.searchTerm = term; + this.currentPage = 1; + this.loadData(); + } + + protected hasNextPage(): boolean { + return this.currentPage < this.lastPage; + } + + protected goToFirstPage() { + if (this.currentPage !== 1) { + this.currentPage = 1; + this.loadData(); + } + } + + protected goToLastPage() { + if (this.currentPage !== this.lastPage) { + this.currentPage = this.lastPage; + this.loadData(); + } + } + + + protected clearSearch() { + if (this.searchTerm) { + this.searchTerm = ''; + this.currentPage = 1; + this.loadData(); + } + } +} diff --git a/angular/src/app/_guards/game-account-owner.guard.spec.ts b/angular/src/app/_guards/game-account-owner.guard.spec.ts deleted file mode 100644 index 3c1c27e..0000000 --- a/angular/src/app/_guards/game-account-owner.guard.spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { TestBed } from '@angular/core/testing'; -import { CanActivateFn } from '@angular/router'; - -import { gameAccountOwnerGuard } from './game-account-owner.guard'; - -describe('gameAccountOwnerGuard', () => { - const executeGuard: CanActivateFn = (...guardParameters) => - TestBed.runInInjectionContext(() => gameAccountOwnerGuard(...guardParameters)); - - beforeEach(() => { - TestBed.configureTestingModule({}); - }); - - it('should be created', () => { - expect(executeGuard).toBeTruthy(); - }); -}); diff --git a/angular/src/app/_guards/game-account-owner.guard.ts b/angular/src/app/_guards/game-account-owner.guard.ts deleted file mode 100644 index b9a6b7d..0000000 --- a/angular/src/app/_guards/game-account-owner.guard.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { CanActivateFn, Router } from '@angular/router'; -import { inject } from "@angular/core"; -import { map } from 'rxjs/operators'; -import {GameAccountService} from "@app/core/api/v1"; - -export const gameAccountOwnerGuard: CanActivateFn = (route, state) => { - const gameAccountService = inject(GameAccountService); - const router = inject(Router); - const gameAccountId = route.paramMap.get('id'); - - if (!gameAccountId) { - router.navigate(['/error']); // Oder eine andere geeignete Route - return false; - } - - return gameAccountService.gameAccountsIdGet(gameAccountId).pipe( - map(gameAccount => { - return true; - // if (isOwner) { - // return true; - // } else { - // router.navigate(['/' + ROUTE_DASHBOARD]); // Oder eine andere geeignete Route - // return false; - // } - }) - ); -}; \ No newline at end of file diff --git a/angular/src/app/_helpers/price-calculator.service.ts b/angular/src/app/_helpers/price-calculator.service.ts deleted file mode 100644 index d9ddd69..0000000 --- a/angular/src/app/_helpers/price-calculator.service.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { Injectable } from '@angular/core'; -import {FormGroup} from "@angular/forms"; -import {TranslateService} from "@ngx-translate/core"; -import {PriceError} from "@app/_models/priceError"; - -@Injectable({ - providedIn: 'root' -}) -export class PriceCalculatorService { - - - constructor( - protected translateService: TranslateService, - ) { - } - - public getCorrectPrice(event: FocusEvent, form: FormGroup) { - const eventElement = event.target as HTMLInputElement; - if (form.get(eventElement.id)?.value !== null && form.get(eventElement.id)?.value !== '') { - let validPrice = this.calculateValidPrice(Number(eventElement.value)); - form.get(eventElement.id)?.setValue(validPrice); - } - } - - - public calculateValidPrice(price: number): number { - price = Math.floor(price); - - if (price < 150) return 150; - if (price < 1000) return price - (price % 50); - if (price < 10000) return price - (price % 100); - if (price < 50000) return price - (price % 250); - if (price < 100000) return price - (price % 500); - return price - (price % 1000); - } - - public checkPriceConstellation( - sellStartingBid: number | string, - sellPriceBin: number | string, - lastFoundMinRange: number | string | undefined, - lastFoundMaxRange: number | string | undefined, - ): PriceError { - - let res = { - message: '', - error: false - } as PriceError; - - if ((sellStartingBid !== null && sellStartingBid !== '') && (sellPriceBin === null || sellPriceBin === '')) { - res.error = true; - res.message = this.translateService.instant('errors.sellPriceBinSellStartingBid'); - return res; - } - - if ((sellPriceBin !== null && sellPriceBin !== '') && (sellStartingBid === null || sellStartingBid === '')) { - res.error = true; - res.message = this.translateService.instant('errors.sellStartingBidSellPriceBin'); - return res; - } - - if (sellPriceBin <= sellStartingBid && (sellStartingBid !== null && sellStartingBid !== '') && (sellPriceBin !== null && sellPriceBin !== '')) { - res.error = true; - res.message = this.translateService.instant('errors.sellPriceBinSmallerSellStartingBid'); - return res; - } - - if (sellStartingBid >= sellPriceBin && (sellStartingBid !== null && sellStartingBid !== '') && (sellPriceBin !== null && sellPriceBin !== '')) { - res.error = true; - res.message = this.translateService.instant('errors.sellStartingBidLargerSellPriceBin'); - return res; - } - - if (lastFoundMinRange) { - if (sellStartingBid < lastFoundMinRange && (sellStartingBid !== null && sellStartingBid !== '')) { - res.error = true; - res.message = this.translateService.instant('errors.sellStartingBidSmallerLastFoundMinRange'); - return res; - } - } - - if (lastFoundMaxRange) { - if (sellPriceBin > lastFoundMaxRange && (sellPriceBin !== null && sellPriceBin !== '')) { - res.error = true; - res.message = this.translateService.instant('errors.sellPriceBinLargerLastFoundMaxRange'); - return res; - } - } - - if (lastFoundMinRange && lastFoundMaxRange) { - if (lastFoundMaxRange <= lastFoundMinRange) { - res.error = true; - res.message = this.translateService.instant('errors.sellStartingBidSellPriceBin'); - return res; - } - - if (lastFoundMinRange >= lastFoundMaxRange) { - res.error = true; - res.message = this.translateService.instant('errors.lastFoundMinRangeLargerLastFoundMaxRange'); - return res; - } - if ((lastFoundMinRange !== '') && (lastFoundMaxRange === '')) { - res.error = true; - res.message = this.translateService.instant('errors.lastFoundMaxRangeLastFoundMinRange'); - return res; - } - - if ((lastFoundMaxRange !== null && lastFoundMaxRange !== '') && (lastFoundMinRange === '')) { - res.error = true; - res.message = this.translateService.instant('errors.lastFoundMinRangeLastFoundMaxRange'); - return res; - } - } - - return res; - } -} \ No newline at end of file diff --git a/angular/src/app/_interfaces/AbstractCreateDataComponent.ts b/angular/src/app/_interfaces/AbstractCreateDataComponent.ts deleted file mode 100644 index c53b6ca..0000000 --- a/angular/src/app/_interfaces/AbstractCreateDataComponent.ts +++ /dev/null @@ -1,20 +0,0 @@ -import {ModalStatus} from "@app/_helpers/modal.states"; -import {FormGroup} from "@angular/forms"; -import {Directive, EventEmitter} from "@angular/core"; -import {CreateDataComponentInterface} from "@app/_interfaces/CreateDataComponentInterface"; -import {FormGroupInitializer} from "@app/_helpers/formgroup.initializer"; - -@Directive() -export abstract class AbstractCreateDataComponent implements CreateDataComponentInterface { - data!: T; - submit = new EventEmitter(); - form!: FormGroup; - - ngOnInit(): void { - this.data = this.getInitialData(); - this.form = FormGroupInitializer.initFormGroup(this.form, this.data); - } - - abstract getInitialData(): T; - abstract onSubmit(): void; -} \ No newline at end of file diff --git a/angular/src/app/_interfaces/CreateDataComponentInterface.ts b/angular/src/app/_interfaces/data-form-component.ts similarity index 56% rename from angular/src/app/_interfaces/CreateDataComponentInterface.ts rename to angular/src/app/_interfaces/data-form-component.ts index cb90f46..153c11f 100644 --- a/angular/src/app/_interfaces/CreateDataComponentInterface.ts +++ b/angular/src/app/_interfaces/data-form-component.ts @@ -1,12 +1,16 @@ +import {FormMode} from "@app/_components/_abstract/abstract-data-form-component"; +import {EventEmitter} from "@angular/core"; import {ModalStatus} from "@app/_helpers/modal.states"; import {FormGroup} from "@angular/forms"; -import {EventEmitter} from "@angular/core"; -export interface CreateDataComponentInterface { - data: T; +export interface DataFormComponent { + data?: T; + mode: FormMode; + id?: string | number; submit: EventEmitter; form: FormGroup; onSubmit(): void; ngOnInit(): void; getInitialData(): T; + isEditMode(): boolean; } \ No newline at end of file diff --git a/angular/src/app/_services/data-import.service.ts b/angular/src/app/_services/data-import.service.ts deleted file mode 100644 index 76a8231..0000000 --- a/angular/src/app/_services/data-import.service.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Injectable } from '@angular/core'; -import {HttpClient, HttpHeaders} from "@angular/common/http"; -import {User} from "@app/_models"; -import {environment} from "@environments/environment"; - -@Injectable({ - providedIn: 'root' -}) -export class DataImportService { - - constructor( - private httpClient: HttpClient - ) { - - } - - futwizImport( - futwizCandidateUrl: string, - futbinCandidateUrl: string, - updateCandidate: boolean = false, - buyCandidate: boolean = false, - relevantCandidate: boolean = false, - futwizCandidateHtml: string | null, - bid: number | null, - bin: number | null, - optionalEaResourceId: number | null, - ) { - const formData = new FormData(); - formData.append('futwizCandidateUrl', futwizCandidateUrl); - formData.append('futbinCandidateUrl', futbinCandidateUrl); - formData.append('updateCandidate', updateCandidate ? '1' : '0'); - formData.append('buyCandidate', buyCandidate ? '1' : '0'); - formData.append('relevantCandidate', relevantCandidate ? '1' : '0'); - if (futwizCandidateHtml !== null && futwizCandidateHtml !== "") { - formData.append('futwizCandidateHtml', futwizCandidateHtml); - } - if (bid !== null) { - formData.append('bid', bid.toString()); - } - if (bin !== null) { - formData.append('bin', bin.toString()); - } - if (optionalEaResourceId !== null) { - formData.append('optionalEaResourceId', optionalEaResourceId.toString()); - } - - return this.httpClient.post( - `${environment.apiUrl}/data-import/import-futwiz-player`, - formData - ); - } - - eaDataImport() { - return this.httpClient.get( - `${environment.apiUrl}/data-import/import-ea-data` - ); - } - - futwizRaritiesImport() { - return this.httpClient.get( - `${environment.apiUrl}/data-import/import-futwiz-rarities` - ); - } - -} diff --git a/angular/src/app/_services/ea-data-connect.service.ts b/angular/src/app/_services/ea-data-connect.service.ts deleted file mode 100644 index e21d1ba..0000000 --- a/angular/src/app/_services/ea-data-connect.service.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Injectable } from '@angular/core'; -import {HttpClient, HttpHeaders} from "@angular/common/http"; -import {User} from "@app/_models"; -import {environment} from "@environments/environment"; - -@Injectable({ - providedIn: 'root' -}) -export class EaDataConnectService { - - constructor( - private httpClient: HttpClient - ) { - - } - - connectAccount(accountId: string) { - const formData = new FormData(); - formData.append('accountId', accountId.toString()); - return this.httpClient.post( - `${environment.apiUrl}/ea-data-connect/connect-account`, - formData - ); - } - - deleteCachefile(accountId: string) { - const formData = new FormData(); - formData.append('accountId', accountId.toString()); - return this.httpClient.post( - `${environment.apiUrl}/ea-data-connect/delete-cache-file`, - formData - ); - } - -} diff --git a/angular/src/app/_services/sniping.service.ts b/angular/src/app/_services/sniping.service.ts deleted file mode 100644 index 462d447..0000000 --- a/angular/src/app/_services/sniping.service.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Injectable } from '@angular/core'; -import {HttpClient, HttpHeaders} from "@angular/common/http"; -import {User} from "@app/_models"; -import {environment} from "@environments/environment"; - -@Injectable({ - providedIn: 'root' -}) -export class SnipingService { - - constructor( - private httpClient: HttpClient - ) { - - } - - snipingPrepare( - accountIdsJson: number[] - ) { - const formData = new FormData(); - formData.append('accountIdsJson', JSON.stringify(accountIdsJson)); - return this.httpClient.post( - `${environment.apiUrl}/sniping/prepare`, - formData - ); - } - - snipingExecute( - eaResourceId: number, - snipeTimeMin: number, - snipeTimeMax: number, - buyItemsMax: number, - buyBin: number, - sellBin: number, - accountIdsJson: number[], - round: number, - gapTimeMin: number, - gapTimeMax: number, - putOnTpOnly: boolean, - priceCheckBin: number | undefined, - doPriceCheck: boolean, - ) { - const formData = new FormData(); - formData.append('eaResourceId', eaResourceId.toString()); - formData.append('snipeTimeMin', snipeTimeMin.toString()); - formData.append('snipeTimeMax', snipeTimeMax.toString()); - formData.append('buyItemsMax', buyItemsMax.toString()); - formData.append('buyBin', buyBin.toString()); - formData.append('sellBin', sellBin.toString()); - formData.append('accountIdsJson', JSON.stringify(accountIdsJson)); - formData.append('round', round.toString()); - formData.append('gapTimeMin', gapTimeMin.toString()); - formData.append('gapTimeMax', gapTimeMax.toString()); - formData.append('putOnTpOnly', putOnTpOnly ? "1" : "0"); - if (priceCheckBin) { - formData.append('priceCheckBin', priceCheckBin.toString()); - } - formData.append('doPriceCheck', doPriceCheck ? "1" : "0"); - return this.httpClient.post( - `${environment.apiUrl}/sniping/execute`, - formData - ); - - } - - snipingStop( - accountIdsJson: number[] - ) { - const formData = new FormData(); - formData.append('accountIdsJson', JSON.stringify(accountIdsJson)); - return this.httpClient.post( - `${environment.apiUrl}/sniping/stop`, - formData - ); - } - - checkPrice( - accountId: number, - eaResourceId: number, - priceCheckBin: number, - ) { - const formData = new FormData(); - formData.append('accountId', accountId.toString()); - formData.append('eaResourceId', eaResourceId.toString()); - formData.append('priceCheckBin', priceCheckBin.toString()); - return this.httpClient.post( - `${environment.apiUrl}/sniping/check-bin-price`, - formData - ); - } - - updateAccountSnipingCounts() { - const formData = new FormData(); - return this.httpClient.post( - `${environment.apiUrl}/sniping/update-account-sniping-counts`, - formData - ); - } - -} diff --git a/angular/src/app/_views/location/location-detail/location-detail.component.html b/angular/src/app/_views/location/location-detail/location-detail.component.html new file mode 100644 index 0000000..6434539 --- /dev/null +++ b/angular/src/app/_views/location/location-detail/location-detail.component.html @@ -0,0 +1,16 @@ +@if (location) { +
+ + +
+ +
+
+} diff --git a/angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.scss b/angular/src/app/_views/location/location-detail/location-detail.component.scss similarity index 100% rename from angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.scss rename to angular/src/app/_views/location/location-detail/location-detail.component.scss diff --git a/angular/src/app/_views/location/location-detail/location-detail.component.spec.ts b/angular/src/app/_views/location/location-detail/location-detail.component.spec.ts new file mode 100644 index 0000000..cac281a --- /dev/null +++ b/angular/src/app/_views/location/location-detail/location-detail.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LocationDetailComponent } from './location-detail.component'; + +describe('LocationDetailComponent', () => { + let component: LocationDetailComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [LocationDetailComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(LocationDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/angular/src/app/_views/location/location-detail/location-detail.component.ts b/angular/src/app/_views/location/location-detail/location-detail.component.ts new file mode 100644 index 0000000..c57e8a2 --- /dev/null +++ b/angular/src/app/_views/location/location-detail/location-detail.component.ts @@ -0,0 +1,55 @@ +import {Component, OnInit} from '@angular/core'; +import {LocationJsonld, LocationService} from "@app/core/api/v1"; +import {AppHelperService} from "@app/_helpers/app-helper.service"; +import {ActivatedRoute, Router} from "@angular/router"; +import {ROUTE_LOCATIONS} from "@app/app-routing.module"; +import {TranslateService} from "@ngx-translate/core"; +import {FormMode} from "@app/_components/_abstract/abstract-data-form-component"; + +@Component({ + selector: 'app-location-detail', + templateUrl: './location-detail.component.html' +}) +export class LocationDetailComponent implements OnInit { + protected location!: LocationJsonld; + protected readonly FormMode = FormMode; + + constructor( + private locationService: LocationService, + protected appHelperService: AppHelperService, + protected translateService: TranslateService, + private route: ActivatedRoute, + protected router: Router + ) {} + + ngOnInit() { + this.route.params.subscribe(params => { + this.apiGetLocationData(params['id']); + }); + } + + apiGetLocationData(locationId: string) { + this.locationService.locationsIdGet(locationId).subscribe( + data => { + console.log(data); + this.location = data; + } + ); + } + + apiDeleteLocation() { + this.translateService.get('basic.delete_confirm').subscribe((confirmMessage: string) => { + if (confirm(confirmMessage)) { + this.locationService.locationsIdDelete( + this.appHelperService.extractId(this.location.id!) + ).subscribe(() => { + this.router.navigate(['/' + ROUTE_LOCATIONS]); + }); + } + }); + } + + onFormSubmit() { + this.apiGetLocationData(this.appHelperService.extractId(this.location.id!)); + } +} diff --git a/angular/src/app/_views/location/location-new/location-new.component.html b/angular/src/app/_views/location/location-form/location-form.component.html similarity index 57% rename from angular/src/app/_views/location/location-new/location-new.component.html rename to angular/src/app/_views/location/location-form/location-form.component.html index 6693037..fdc2b92 100644 --- a/angular/src/app/_views/location/location-new/location-new.component.html +++ b/angular/src/app/_views/location/location-form/location-form.component.html @@ -1,4 +1,4 @@ -

{{ 'basic.new' | translate }} {{ 'model.location' | translate }}

+

{{ (isEditMode() ? 'basic.edit' : 'basic.new') | translate }} {{ 'model.location' | translate }}

@@ -11,19 +11,20 @@
-
\ No newline at end of file diff --git a/angular/src/app/_views/vessel/vessel-new/vessel-new.component.scss b/angular/src/app/_views/location/location-form/location-form.component.scss similarity index 100% rename from angular/src/app/_views/vessel/vessel-new/vessel-new.component.scss rename to angular/src/app/_views/location/location-form/location-form.component.scss diff --git a/angular/src/app/_views/location/location-form/location-form.component.spec.ts b/angular/src/app/_views/location/location-form/location-form.component.spec.ts new file mode 100644 index 0000000..68136ae --- /dev/null +++ b/angular/src/app/_views/location/location-form/location-form.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LocationFormComponent } from './location-form.component'; + +describe('LocationFormComponent', () => { + let component: LocationFormComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [LocationFormComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(LocationFormComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/angular/src/app/_views/location/location-form/location-form.component.ts b/angular/src/app/_views/location/location-form/location-form.component.ts new file mode 100644 index 0000000..948394f --- /dev/null +++ b/angular/src/app/_views/location/location-form/location-form.component.ts @@ -0,0 +1,37 @@ +import { Component } from '@angular/core'; +import {AbstractDataFormComponent} from "@app/_components/_abstract/abstract-data-form-component"; +import {LocationJsonld, LocationService, ZoneService} from "@app/core/api/v1"; +import {SearchSelectComponent} from "@app/_components/search-select/search-select.component"; +import {ListColDefinition} from "@app/_components/list/list-col-definition"; +import {locationForm} from "@app/_forms/apiForms"; +import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-function-type"; + +@Component({ + selector: 'app-location-form', + templateUrl: './location-form.component.html' +}) +export class LocationFormComponent extends AbstractDataFormComponent { + protected readonly SearchSelectComponent = SearchSelectComponent; + protected zoneColDefinitions: ListColDefinition[]; + + constructor( + private locationService: LocationService, + private zoneService: ZoneService + ) { + super( + locationForm, + (data: LocationJsonld) => locationService.locationsPost(data), + (id: string | number, data: LocationJsonld) => locationService.locationsIdPatch(id.toString(), data) + ); + + this.zoneColDefinitions = SearchSelectComponent.getDefaultColDefZones(); + } + + protected override getInitialData(): LocationJsonld { + return {} as LocationJsonld; + } + + getZones: ListGetDataFunctionType = (index: number, pageSize: number, term?: string) => { + return this.zoneService.zonesGetCollection(index, pageSize, term); + } +} diff --git a/angular/src/app/_views/location/location-list/location-list.component.html b/angular/src/app/_views/location/location-list/location-list.component.html index d52e990..e233e62 100644 --- a/angular/src/app/_views/location/location-list/location-list.component.html +++ b/angular/src/app/_views/location/location-list/location-list.component.html @@ -2,9 +2,9 @@ \ No newline at end of file diff --git a/angular/src/app/_views/location/location-list/location-list.component.ts b/angular/src/app/_views/location/location-list/location-list.component.ts index 518eace..bc31779 100644 --- a/angular/src/app/_views/location/location-list/location-list.component.ts +++ b/angular/src/app/_views/location/location-list/location-list.component.ts @@ -1,16 +1,13 @@ import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core'; import {ListColDefinition} from "@app/_components/list/list-col-definition"; import {ListComponent} from "@app/_components/list/list.component"; -import {LocationJsonld, LocationService, UserService} from "@app/core/api/v1"; -import {Router} from "@angular/router"; +import {LocationJsonld, LocationService} from "@app/core/api/v1"; import {AppHelperService} from "@app/_helpers/app-helper.service"; -import {OrderFilter} from "@app/_models/orderFilter"; import {FilterBarComponent} from "@app/_components/filter-bar/filter-bar.component"; import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-function-type"; import {ROUTE_LOCATIONS} from "@app/app-routing.module"; import {Sort} from "@angular/material/sort"; -import {ZoneNewComponent} from "@app/_views/zone/zone-new/zone-new.component"; -import {LocationNewComponent} from "@app/_views/location/location-new/location-new.component"; +import {LocationFormComponent} from "@app/_views/location/location-form/location-form.component"; @Component({ selector: 'app-location-list', @@ -20,12 +17,12 @@ import {LocationNewComponent} from "@app/_views/location/location-new/location-n export class LocationListComponent implements OnInit, AfterViewInit { @ViewChild("listComponent", {static: false}) listComponent!: ListComponent; - protected readonly LocationNewComponent = LocationNewComponent; + + protected readonly LocationFormComponent = LocationFormComponent; protected listColDefinitions!: ListColDefinition[]; constructor( private locationService: LocationService, - private router: Router, protected appHelperService: AppHelperService, ) { @@ -91,10 +88,7 @@ export class LocationListComponent implements OnInit, AfterViewInit { onSortChange = (sortState: Sort) => { } - navigateToLocationDetail = (element: any) => { - const location: LocationJsonld = element as LocationJsonld; - this.router.navigate(['/' + ROUTE_LOCATIONS, this.appHelperService.extractId(location.id)]); + getCustomDetailLink(element: LocationJsonld) { + return ROUTE_LOCATIONS + '/' + this.appHelperService.extractId(element?.id); } - - } diff --git a/angular/src/app/_views/location/location-new/location-new.component.ts b/angular/src/app/_views/location/location-new/location-new.component.ts deleted file mode 100644 index 2f5f488..0000000 --- a/angular/src/app/_views/location/location-new/location-new.component.ts +++ /dev/null @@ -1,66 +0,0 @@ -import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; -import {AbstractCreateDataComponent} from "@app/_interfaces/AbstractCreateDataComponent"; -import {LocationJsonld, LocationService, ZoneService} from "@app/core/api/v1"; -import {ModalStatus} from "@app/_helpers/modal.states"; -import {FormGroup} from "@angular/forms"; -import {locationForm} from "@app/_forms/apiForms"; -import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-function-type"; -import {SearchSelectComponent} from "@app/_components/search-select/search-select.component"; -import {ListColDefinition} from "@app/_components/list/list-col-definition"; - -@Component({ - selector: 'app-location-new', - templateUrl: './location-new.component.html', - styleUrl: './location-new.component.scss' -}) -export class LocationNewComponent extends AbstractCreateDataComponent implements OnInit { - @Input() public override data!: LocationJsonld; - @Output() public override submit: EventEmitter = new EventEmitter(); - - protected readonly SearchSelectComponent = SearchSelectComponent; - override form: FormGroup = locationForm; - protected zoneColDefinitions: ListColDefinition[]; - - constructor( - private locationService: LocationService, - private zoneService: ZoneService, - ) { - super(); - this.zoneColDefinitions = SearchSelectComponent.getDefaultColDefZones(); - } - - override ngOnInit() { - if (this.data) { - this.form.patchValue(this.data); - } - } - - getInitialData(): LocationJsonld { - return {} as LocationJsonld; - } - - getZones: ListGetDataFunctionType = (index: number, pageSize: number, term?: string) => { - return this.zoneService.zonesGetCollection( - index, - pageSize, - term - ); - } - - onSubmit() { - if (this.form.valid) { - console.log(this.form); - console.log(this.form.value as LocationJsonld); - this.locationService.locationsPost( - this.form.value as LocationJsonld - ).subscribe( - data => { - this.form.reset(); - this.submit.emit(ModalStatus.Submitted); - } - ); - } - } - - -} \ No newline at end of file diff --git a/angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.html b/angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.html new file mode 100644 index 0000000..b80f452 --- /dev/null +++ b/angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.html @@ -0,0 +1 @@ +

shipping-company-detail works!

diff --git a/angular/src/app/_views/zone/zone-new/zone-new.component.scss b/angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.scss similarity index 100% rename from angular/src/app/_views/zone/zone-new/zone-new.component.scss rename to angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.scss diff --git a/angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.spec.ts b/angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.spec.ts new file mode 100644 index 0000000..6502941 --- /dev/null +++ b/angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ShippingCompanyDetailComponent } from './shipping-company-detail.component'; + +describe('ShippingCompanyDetailComponent', () => { + let component: ShippingCompanyDetailComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ShippingCompanyDetailComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ShippingCompanyDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.ts b/angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.ts new file mode 100644 index 0000000..f51bbe9 --- /dev/null +++ b/angular/src/app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-shipping-company-detail', + templateUrl: './shipping-company-detail.component.html', + styleUrl: './shipping-company-detail.component.scss' +}) +export class ShippingCompanyDetailComponent { + +} diff --git a/angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.html b/angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.html new file mode 100644 index 0000000..b422d6a --- /dev/null +++ b/angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.html @@ -0,0 +1,25 @@ +

{{ (isEditMode() ? 'basic.edit' : 'basic.new') | translate }} {{ 'model.shipping_company' | translate }}

+ +
+
+ + +
+ +
+ + +
+ + +
\ No newline at end of file diff --git a/angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.scss b/angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.spec.ts b/angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.spec.ts new file mode 100644 index 0000000..5f3de92 --- /dev/null +++ b/angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ShippingCompanyFormComponent } from './shipping-company-form.component'; + +describe('ShippingCompanyFormComponent', () => { + let component: ShippingCompanyFormComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ShippingCompanyFormComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ShippingCompanyFormComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.ts b/angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.ts new file mode 100644 index 0000000..44e1956 --- /dev/null +++ b/angular/src/app/_views/shipping-company/shipping-company-form/shipping-company-form.component.ts @@ -0,0 +1,24 @@ +import { Component } from '@angular/core'; +import { ShippingCompanyJsonld, ShippingCompanyService } from "@app/core/api/v1"; +import { shippingCompanyForm } from "@app/_forms/apiForms"; +import {AbstractDataFormComponent} from "@app/_components/_abstract/abstract-data-form-component"; + +@Component({ + selector: 'app-shipping-company-form', + templateUrl: './shipping-company-form.component.html' +}) +export class ShippingCompanyFormComponent extends AbstractDataFormComponent { + constructor( + private shippingCompanyService: ShippingCompanyService + ) { + super( + shippingCompanyForm, + (data: ShippingCompanyJsonld) => shippingCompanyService.shippingCompaniesPost(data), + (id: string | number, data: ShippingCompanyJsonld) => shippingCompanyService.shippingCompaniesIdPatch(id.toString(), data) + ); + } + + protected override getInitialData(): ShippingCompanyJsonld { + return {} as ShippingCompanyJsonld; + } +} \ No newline at end of file diff --git a/angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.html b/angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.html index f9a85d1..95e43b7 100644 --- a/angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.html +++ b/angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.html @@ -5,6 +5,6 @@ [onNavigateToDetailsFunction]="navigateToZoneDetail" [onSortFunction]="onSortChange" [listColDefinitions]="listColDefinitions" - [createDataComponent]="ShippingCompanyNewComponent" + [dataFormComponent]="ShippingCompanyFormComponent" > \ No newline at end of file diff --git a/angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.ts b/angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.ts index 9a57196..1a00f92 100644 --- a/angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.ts +++ b/angular/src/app/_views/shipping-company/shipping-company-list/shipping-company-list.component.ts @@ -12,9 +12,8 @@ import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-funct import {Sort} from "@angular/material/sort"; import {ROUTE_SHIPPING_COMPANIES} from "@app/app-routing.module"; import { - ShippingCompanyNewComponent -} from "@app/_views/shipping-company/shipping-company-new/shipping-company-new.component"; -import {ZoneNewComponent} from "@app/_views/zone/zone-new/zone-new.component"; + ShippingCompanyFormComponent +} from "@app/_views/shipping-company/shipping-company-form/shipping-company-form.component"; @Component({ selector: 'app-shipping-company-list', @@ -24,7 +23,7 @@ import {ZoneNewComponent} from "@app/_views/zone/zone-new/zone-new.component"; export class ShippingCompanyListComponent { @ViewChild("listComponent", {static: false}) listComponent!: ListComponent; - protected readonly ShippingCompanyNewComponent = ShippingCompanyNewComponent; + protected readonly ShippingCompanyFormComponent = ShippingCompanyFormComponent; protected listColDefinitions!: ListColDefinition[]; constructor( @@ -91,5 +90,4 @@ export class ShippingCompanyListComponent { const shippingCompany: ShippingCompanyJsonld = element as ShippingCompanyJsonld; this.router.navigate(['/' + ROUTE_SHIPPING_COMPANIES, this.appHelperService.extractId(shippingCompany.id)]); } - protected readonly ZoneNewComponent = ZoneNewComponent; } diff --git a/angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.spec.ts b/angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.spec.ts deleted file mode 100644 index 8a1bf21..0000000 --- a/angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ShippingCompanyNewComponent } from './shipping-company-new.component'; - -describe('ShippingCompanyNewComponent', () => { - let component: ShippingCompanyNewComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ShippingCompanyNewComponent] - }) - .compileComponents(); - - fixture = TestBed.createComponent(ShippingCompanyNewComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.ts b/angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.ts deleted file mode 100644 index 1e7bb5b..0000000 --- a/angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.ts +++ /dev/null @@ -1,41 +0,0 @@ -import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; -import {AbstractCreateDataComponent} from "@app/_interfaces/AbstractCreateDataComponent"; -import {LocationJsonld, ShippingCompanyJsonld, ShippingCompanyService} from "@app/core/api/v1"; -import {ModalStatus} from "@app/_helpers/modal.states"; -import {FormGroup} from "@angular/forms"; -import {shippingCompanyForm} from "@app/_forms/apiForms"; - -@Component({ - selector: 'app-shipping-company-new', - templateUrl: './shipping-company-new.component.html', - styleUrl: './shipping-company-new.component.scss' -}) -export class ShippingCompanyNewComponent extends AbstractCreateDataComponent implements OnInit { - @Input() public override data!: ShippingCompanyJsonld; - @Output() public override submit: EventEmitter = new EventEmitter(); - - override form: FormGroup = shippingCompanyForm; - - constructor( - private shippingCompanyService: ShippingCompanyService - ) { - super(); - } - - getInitialData(): ShippingCompanyJsonld { - return {} as ShippingCompanyJsonld; - } - - onSubmit() { - if (this.form.valid) { - this.shippingCompanyService.shippingCompaniesPost( - this.form.value as ShippingCompanyJsonld - ).subscribe( - data => { - this.form.reset(); - this.submit.emit(ModalStatus.Submitted); - } - ); - } - } -} diff --git a/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.html b/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.html new file mode 100644 index 0000000..88b50ca --- /dev/null +++ b/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.html @@ -0,0 +1 @@ +

vessel-detail works!

diff --git a/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.scss b/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.spec.ts b/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.spec.ts new file mode 100644 index 0000000..dd5ee73 --- /dev/null +++ b/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { VesselDetailComponent } from './vessel-detail.component'; + +describe('VesselDetailComponent', () => { + let component: VesselDetailComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [VesselDetailComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(VesselDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.ts b/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.ts new file mode 100644 index 0000000..b47f317 --- /dev/null +++ b/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-vessel-detail', + templateUrl: './vessel-detail.component.html', + styleUrl: './vessel-detail.component.scss' +}) +export class VesselDetailComponent { + +} diff --git a/angular/src/app/_views/vessel/vessel-form/vessel-form.component.html b/angular/src/app/_views/vessel/vessel-form/vessel-form.component.html new file mode 100644 index 0000000..f2a7112 --- /dev/null +++ b/angular/src/app/_views/vessel/vessel-form/vessel-form.component.html @@ -0,0 +1,37 @@ +

{{ (isEditMode() ? 'basic.edit' : 'basic.new') | translate }} {{ 'model.vessel' | translate }}

+ +
+
+ + +
+ +
+ + +
+ +
+ + + +
+ + +
\ No newline at end of file diff --git a/angular/src/app/_views/vessel/vessel-form/vessel-form.component.scss b/angular/src/app/_views/vessel/vessel-form/vessel-form.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/angular/src/app/_views/vessel/vessel-new/vessel-new.component.spec.ts b/angular/src/app/_views/vessel/vessel-form/vessel-form.component.spec.ts similarity index 52% rename from angular/src/app/_views/vessel/vessel-new/vessel-new.component.spec.ts rename to angular/src/app/_views/vessel/vessel-form/vessel-form.component.spec.ts index 9c23063..24d1a4c 100644 --- a/angular/src/app/_views/vessel/vessel-new/vessel-new.component.spec.ts +++ b/angular/src/app/_views/vessel/vessel-form/vessel-form.component.spec.ts @@ -1,18 +1,18 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { VesselNewComponent } from './vessel-new.component'; +import { VesselFormComponent } from './vessel-form.component'; -describe('VesselNewComponent', () => { - let component: VesselNewComponent; - let fixture: ComponentFixture; +describe('VesselFormComponent', () => { + let component: VesselFormComponent; + let fixture: ComponentFixture; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [VesselNewComponent] + declarations: [VesselFormComponent] }) .compileComponents(); - fixture = TestBed.createComponent(VesselNewComponent); + fixture = TestBed.createComponent(VesselFormComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/angular/src/app/_views/vessel/vessel-form/vessel-form.component.ts b/angular/src/app/_views/vessel/vessel-form/vessel-form.component.ts new file mode 100644 index 0000000..add9f15 --- /dev/null +++ b/angular/src/app/_views/vessel/vessel-form/vessel-form.component.ts @@ -0,0 +1,41 @@ +import { Component } from '@angular/core'; +import { VesselJsonld, VesselService, ShippingCompanyService } from "@app/core/api/v1"; +import { vesselForm } from "@app/_forms/apiForms"; +import { SearchSelectComponent } from "@app/_components/search-select/search-select.component"; +import { ListGetDataFunctionType } from "@app/_components/list/list-get-data-function-type"; +import { ListColDefinition } from "@app/_components/list/list-col-definition"; +import {AbstractDataFormComponent} from "@app/_components/_abstract/abstract-data-form-component"; + +@Component({ + selector: 'app-vessel-form', + templateUrl: './vessel-form.component.html' +}) +export class VesselFormComponent extends AbstractDataFormComponent { + protected readonly SearchSelectComponent = SearchSelectComponent; + protected shippingCompanyColDefinitions: ListColDefinition[]; + + constructor( + private vesselService: VesselService, + private shippingCompanyService: ShippingCompanyService + ) { + super( + vesselForm, + (data: VesselJsonld) => vesselService.vesselsPost(data), + (id: string | number, data: VesselJsonld) => vesselService.vesselsIdPatch(id.toString(), data) + ); + + this.shippingCompanyColDefinitions = SearchSelectComponent.getDefaultColDefShippingCompanies(); + } + + protected override getInitialData(): VesselJsonld { + return {} as VesselJsonld; + } + + getShippingCompanies: ListGetDataFunctionType = (index: number, pageSize: number, term?: string) => { + return this.shippingCompanyService.shippingCompaniesGetCollection( + index, + pageSize, + term + ); + } +} \ No newline at end of file diff --git a/angular/src/app/_views/vessel/vessel-list/vessel-list.component.html b/angular/src/app/_views/vessel/vessel-list/vessel-list.component.html index 63609ba..193ee6d 100644 --- a/angular/src/app/_views/vessel/vessel-list/vessel-list.component.html +++ b/angular/src/app/_views/vessel/vessel-list/vessel-list.component.html @@ -5,6 +5,6 @@ [onNavigateToDetailsFunction]="navigateToVesselDetail" [onSortFunction]="onSortChange" [listColDefinitions]="listColDefinitions" - [createDataComponent]="VesselNewComponent" + [dataFormComponent]="VesselFormComponent" > \ No newline at end of file diff --git a/angular/src/app/_views/vessel/vessel-list/vessel-list.component.ts b/angular/src/app/_views/vessel/vessel-list/vessel-list.component.ts index 8088de9..4fb0e19 100644 --- a/angular/src/app/_views/vessel/vessel-list/vessel-list.component.ts +++ b/angular/src/app/_views/vessel/vessel-list/vessel-list.component.ts @@ -8,7 +8,7 @@ import {FilterBarComponent} from "@app/_components/filter-bar/filter-bar.compone import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-function-type"; import {Sort} from "@angular/material/sort"; import {ROUTE_VESSELS} from "@app/app-routing.module"; -import {VesselNewComponent} from "@app/_views/vessel/vessel-new/vessel-new.component"; +import {VesselFormComponent} from "@app/_views/vessel/vessel-form/vessel-form.component"; @Component({ selector: 'app-vessel-list', @@ -18,7 +18,7 @@ import {VesselNewComponent} from "@app/_views/vessel/vessel-new/vessel-new.compo export class VesselListComponent { @ViewChild("listComponent", {static: false}) listComponent!: ListComponent; - protected readonly VesselNewComponent = VesselNewComponent; + protected readonly VesselFormComponent = VesselFormComponent; protected listColDefinitions!: ListColDefinition[]; constructor( @@ -93,4 +93,5 @@ export class VesselListComponent { const vessel: VesselJsonld = element as VesselJsonld; this.router.navigate(['/' + ROUTE_VESSELS, this.appHelperService.extractId(vessel.id)]); } + } diff --git a/angular/src/app/_views/vessel/vessel-new/vessel-new.component.html b/angular/src/app/_views/vessel/vessel-new/vessel-new.component.html deleted file mode 100644 index 79cd046..0000000 --- a/angular/src/app/_views/vessel/vessel-new/vessel-new.component.html +++ /dev/null @@ -1,29 +0,0 @@ -

{{ 'basic.new' | translate }} {{ 'model.vessel' | translate }}

-
-
-
- - -
-
- - -
-
- - - - -
- -
-
\ No newline at end of file diff --git a/angular/src/app/_views/vessel/vessel-new/vessel-new.component.ts b/angular/src/app/_views/vessel/vessel-new/vessel-new.component.ts deleted file mode 100644 index 50bf063..0000000 --- a/angular/src/app/_views/vessel/vessel-new/vessel-new.component.ts +++ /dev/null @@ -1,66 +0,0 @@ -import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; -import {AbstractCreateDataComponent} from "@app/_interfaces/AbstractCreateDataComponent"; -import { - ShippingCompanyService, - VesselJsonld, - VesselService, -} from "@app/core/api/v1"; -import {ModalStatus} from "@app/_helpers/modal.states"; -import {FormGroup} from "@angular/forms"; -import {vesselForm} from "@app/_forms/apiForms"; -import {ListColDefinition} from "@app/_components/list/list-col-definition"; -import {SearchSelectComponent} from "@app/_components/search-select/search-select.component"; -import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-function-type"; - -@Component({ - selector: 'app-vessel-new', - templateUrl: './vessel-new.component.html', - styleUrl: './vessel-new.component.scss' -}) -export class VesselNewComponent extends AbstractCreateDataComponent implements OnInit { - @Input() public override data!: VesselJsonld; - @Output() public override submit: EventEmitter = new EventEmitter(); - - protected readonly SearchSelectComponent = SearchSelectComponent; - override form: FormGroup = vesselForm; - protected shippingCompanyColDefinitions: ListColDefinition[]; - - constructor( - private vesselService: VesselService, - private shippingCompanyService: ShippingCompanyService, - ) { - super(); - this.shippingCompanyColDefinitions = SearchSelectComponent.getDefaultColDefShippingCompanies(); - } - - override ngOnInit() { - if (this.data) { - this.form.patchValue(this.data); - } - } - - getInitialData(): VesselJsonld { - return {} as VesselJsonld; - } - - getShippingCompanies: ListGetDataFunctionType = (index: number, pageSize: number, term?: string) => { - return this.shippingCompanyService.shippingCompaniesGetCollection( - index, - pageSize, - term - ); - } - - onSubmit() { - if (this.form.valid) { - this.vesselService.vesselsPost( - this.form.value as VesselJsonld - ).subscribe( - data => { - this.form.reset(); - this.submit.emit(ModalStatus.Submitted); - } - ); - } - } -} diff --git a/angular/src/app/_views/zone/zone-detail/zone-detail.component.html b/angular/src/app/_views/zone/zone-detail/zone-detail.component.html new file mode 100644 index 0000000..625098d --- /dev/null +++ b/angular/src/app/_views/zone/zone-detail/zone-detail.component.html @@ -0,0 +1 @@ +

zone-detail works!

diff --git a/angular/src/app/_views/zone/zone-detail/zone-detail.component.scss b/angular/src/app/_views/zone/zone-detail/zone-detail.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/angular/src/app/_views/location/location-new/location-new.component.spec.ts b/angular/src/app/_views/zone/zone-detail/zone-detail.component.spec.ts similarity index 52% rename from angular/src/app/_views/location/location-new/location-new.component.spec.ts rename to angular/src/app/_views/zone/zone-detail/zone-detail.component.spec.ts index 3289086..c59459e 100644 --- a/angular/src/app/_views/location/location-new/location-new.component.spec.ts +++ b/angular/src/app/_views/zone/zone-detail/zone-detail.component.spec.ts @@ -1,18 +1,18 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { LocationNewComponent } from './location-new.component'; +import { ZoneDetailComponent } from './zone-detail.component'; -describe('LocationNewComponent', () => { - let component: LocationNewComponent; - let fixture: ComponentFixture; +describe('ZoneDetailComponent', () => { + let component: ZoneDetailComponent; + let fixture: ComponentFixture; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [LocationNewComponent] + declarations: [ZoneDetailComponent] }) .compileComponents(); - fixture = TestBed.createComponent(LocationNewComponent); + fixture = TestBed.createComponent(ZoneDetailComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/angular/src/app/_views/zone/zone-detail/zone-detail.component.ts b/angular/src/app/_views/zone/zone-detail/zone-detail.component.ts new file mode 100644 index 0000000..3b3e87e --- /dev/null +++ b/angular/src/app/_views/zone/zone-detail/zone-detail.component.ts @@ -0,0 +1,59 @@ +import {Component, OnInit} from '@angular/core'; +import {ZoneJsonld, ZoneService} from "@app/core/api/v1"; +import {AppHelperService} from "@app/_helpers/app-helper.service"; +import {TranslateService} from "@ngx-translate/core"; +import {ActivatedRoute, Router} from "@angular/router"; +import {ROUTE_LOCATIONS} from "@app/app-routing.module"; + +@Component({ + selector: 'app-zone-detail', + templateUrl: './zone-detail.component.html', + styleUrl: './zone-detail.component.scss' +}) +export class ZoneDetailComponent implements OnInit { + + protected zone!: ZoneJsonld; + + constructor( + private zoneService: ZoneService, + protected appHelperService: AppHelperService, + protected translateService: TranslateService, + private route: ActivatedRoute, + protected router: Router + ) { + } + + ngOnInit() { + this.route.params.subscribe(params => { + this.apiGetZoneData(params['id']); + }); + } + + apiGetZoneData(locationId: string) + { + this.zoneService.zonesIdGet( + locationId + ).subscribe( + data => { + this.zone = data; + } + ) + } + + apiDeleteZone() + { + let confirmMessage = ""; + this.translateService.get('basic.delete_confirm').subscribe((translation: string) => { + confirmMessage = translation; + }); + + if (confirm(confirmMessage)) { + this.zoneService.zonesIdDelete(this.appHelperService.extractId(this.zone.id!)) + .subscribe( + data => { + this.router.navigate(['/' + ROUTE_LOCATIONS]); + } + ); + } + } +} diff --git a/angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.html b/angular/src/app/_views/zone/zone-form/zone-form.component.html similarity index 75% rename from angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.html rename to angular/src/app/_views/zone/zone-form/zone-form.component.html index 1acbc77..b7b4e0a 100644 --- a/angular/src/app/_views/shipping-company/shipping-company-new/shipping-company-new.component.html +++ b/angular/src/app/_views/zone/zone-form/zone-form.component.html @@ -1,4 +1,4 @@ -

{{ 'basic.new' | translate }} {{ 'model.shipping_company' | translate }}

+

{{ (isEditMode() ? 'basic.edit' : 'basic.new') | translate }} {{ 'model.location' | translate }}

@@ -9,7 +9,8 @@
-
\ No newline at end of file diff --git a/angular/src/app/_views/zone/zone-form/zone-form.component.scss b/angular/src/app/_views/zone/zone-form/zone-form.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/angular/src/app/_views/zone/zone-new/zone-new.component.spec.ts b/angular/src/app/_views/zone/zone-form/zone-form.component.spec.ts similarity index 54% rename from angular/src/app/_views/zone/zone-new/zone-new.component.spec.ts rename to angular/src/app/_views/zone/zone-form/zone-form.component.spec.ts index 7fbe5ec..7502571 100644 --- a/angular/src/app/_views/zone/zone-new/zone-new.component.spec.ts +++ b/angular/src/app/_views/zone/zone-form/zone-form.component.spec.ts @@ -1,18 +1,18 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ZoneNewComponent } from './zone-new.component'; +import { ZoneFormComponent } from './zone-form.component'; -describe('ZoneNewComponent', () => { - let component: ZoneNewComponent; - let fixture: ComponentFixture; +describe('ZoneFormComponent', () => { + let component: ZoneFormComponent; + let fixture: ComponentFixture; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ZoneNewComponent] + declarations: [ZoneFormComponent] }) .compileComponents(); - fixture = TestBed.createComponent(ZoneNewComponent); + fixture = TestBed.createComponent(ZoneFormComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/angular/src/app/_views/zone/zone-form/zone-form.component.ts b/angular/src/app/_views/zone/zone-form/zone-form.component.ts new file mode 100644 index 0000000..3b26ee9 --- /dev/null +++ b/angular/src/app/_views/zone/zone-form/zone-form.component.ts @@ -0,0 +1,29 @@ +import { Component } from '@angular/core'; +import {AbstractDataFormComponent} from "@app/_components/_abstract/abstract-data-form-component"; +import {ZoneJsonld, ZoneService} from "@app/core/api/v1"; +import {zoneForm} from "@app/_forms/apiForms"; +import {SearchSelectComponent} from "@app/_components/search-select/search-select.component"; + +@Component({ + selector: 'app-zone-form', + templateUrl: './zone-form.component.html', + styleUrl: './zone-form.component.scss' +}) +export class ZoneFormComponent extends AbstractDataFormComponent { + protected readonly SearchSelectComponent = SearchSelectComponent; + + constructor( + private zoneService: ZoneService + ) { + super( + zoneForm, + (data: ZoneJsonld) => zoneService.zonesPost(data), + (id: string | number, data: ZoneJsonld) => zoneService.zonesIdPatch(id.toString(), data) + ); + } + + protected override getInitialData(): ZoneJsonld { + return {} as ZoneJsonld; + } + +} diff --git a/angular/src/app/_views/zone/zone-list/zone-list.component.html b/angular/src/app/_views/zone/zone-list/zone-list.component.html index 221a66b..c928e00 100644 --- a/angular/src/app/_views/zone/zone-list/zone-list.component.html +++ b/angular/src/app/_views/zone/zone-list/zone-list.component.html @@ -5,6 +5,6 @@ [onNavigateToDetailsFunction]="navigateToZoneDetail" [onSortFunction]="onSortChange" [listColDefinitions]="listColDefinitions" - [createDataComponent]="ZoneNewComponent" + [dataFormComponent]="ZoneFormComponent" > \ No newline at end of file diff --git a/angular/src/app/_views/zone/zone-list/zone-list.component.ts b/angular/src/app/_views/zone/zone-list/zone-list.component.ts index be0cc37..6a943ad 100644 --- a/angular/src/app/_views/zone/zone-list/zone-list.component.ts +++ b/angular/src/app/_views/zone/zone-list/zone-list.component.ts @@ -4,12 +4,11 @@ import {ListColDefinition} from "@app/_components/list/list-col-definition"; import {ZoneJsonld, ZoneService} from "@app/core/api/v1"; import {Router} from "@angular/router"; import {AppHelperService} from "@app/_helpers/app-helper.service"; -import {FilterBarComponent} from "@app/_components/filter-bar/filter-bar.component"; import {ListGetDataFunctionType} from "@app/_components/list/list-get-data-function-type"; import {Sort} from "@angular/material/sort"; import {ROUTE_ZONES} from "@app/app-routing.module"; -import {ZoneNewComponent} from "@app/_views/zone/zone-new/zone-new.component"; import {SearchSelectComponent} from "@app/_components/search-select/search-select.component"; +import {ZoneFormComponent} from "@app/_views/zone/zone-form/zone-form.component"; @Component({ selector: 'app-zone-list', @@ -19,7 +18,6 @@ import {SearchSelectComponent} from "@app/_components/search-select/search-selec export class ZoneListComponent { @ViewChild("listComponent", {static: false}) listComponent!: ListComponent; - protected readonly ZoneNewComponent = ZoneNewComponent; protected listColDefinitions!: ListColDefinition[]; constructor( @@ -60,4 +58,5 @@ export class ZoneListComponent { this.router.navigate(['/' + ROUTE_ZONES, this.appHelperService.extractId(zone.id)]); } + protected readonly ZoneFormComponent = ZoneFormComponent; } diff --git a/angular/src/app/_views/zone/zone-new/zone-new.component.html b/angular/src/app/_views/zone/zone-new/zone-new.component.html deleted file mode 100644 index 18199eb..0000000 --- a/angular/src/app/_views/zone/zone-new/zone-new.component.html +++ /dev/null @@ -1,11 +0,0 @@ -

{{ 'basic.new' | translate }} {{ 'model.zone' | translate }}

-
-
-
- - -
- -
-
\ No newline at end of file diff --git a/angular/src/app/_views/zone/zone-new/zone-new.component.ts b/angular/src/app/_views/zone/zone-new/zone-new.component.ts deleted file mode 100644 index 7b14140..0000000 --- a/angular/src/app/_views/zone/zone-new/zone-new.component.ts +++ /dev/null @@ -1,41 +0,0 @@ -import {Component, EventEmitter, Input, Output} from '@angular/core'; -import {ZoneJsonld, ZoneService} from "@app/core/api/v1"; -import {ModalStatus} from "@app/_helpers/modal.states"; -import {FormGroup} from "@angular/forms"; -import {zoneForm} from "@app/_forms/apiForms"; -import {AbstractCreateDataComponent} from "@app/_interfaces/AbstractCreateDataComponent"; - -@Component({ - selector: 'app-zone-new', - templateUrl: './zone-new.component.html', - styleUrl: './zone-new.component.scss' -}) -export class ZoneNewComponent extends AbstractCreateDataComponent{ - @Input() public override data!: ZoneJsonld; - @Output() public override submit: EventEmitter = new EventEmitter(); - - override form: FormGroup = zoneForm; - - constructor( - private zoneService: ZoneService - ) { - super(); - } - - getInitialData(): ZoneJsonld { - return {} as ZoneJsonld; - } - - onSubmit() { - if (this.form.valid) { - this.zoneService.zonesPost( - this.form.value as ZoneJsonld - ).subscribe( - data => { - this.form.reset(); - this.submit.emit(ModalStatus.Submitted); - } - ); - } - } -} diff --git a/angular/src/app/app-routing.module.ts b/angular/src/app/app-routing.module.ts index 0a7329c..db4e5fb 100644 --- a/angular/src/app/app-routing.module.ts +++ b/angular/src/app/app-routing.module.ts @@ -8,6 +8,12 @@ import {UsersComponent} from "@app/_views/user/users.component"; import {TwoColumnComponent} from "@app/_components/layout/two-column/two-column.component"; import {DashboardComponent} from "@app/_views/dashboard/dashboard.component"; import {BaseDataComponent} from "@app/_views/base-data/base-data.component"; +import {LocationDetailComponent} from "@app/_views/location/location-detail/location-detail.component"; +import {ZoneDetailComponent} from "@app/_views/zone/zone-detail/zone-detail.component"; +import {VesselDetailComponent} from "@app/_views/vessel/vessel-detail/vessel-detail.component"; +import { + ShippingCompanyDetailComponent +} from "@app/_views/shipping-company/shipping-company-detail/shipping-company-detail.component"; const accountModule = () => import('@app/_views/account/account.module').then(x => x.AccountModule); @@ -43,6 +49,38 @@ const routes: Routes = [ {path: '', component: BaseDataComponent}, ] }, + { + path: ROUTE_LOCATIONS, + component: TwoColumnComponent, + canActivate: [userGuard], + children: [ + {path: ':id', component: LocationDetailComponent}, + ] + }, + { + path: ROUTE_ZONES, + component: TwoColumnComponent, + canActivate: [userGuard], + children: [ + {path: ':id', component: ZoneDetailComponent}, + ] + }, + { + path: ROUTE_VESSELS, + component: TwoColumnComponent, + canActivate: [userGuard], + children: [ + {path: ':id', component: VesselDetailComponent}, + ] + }, + { + path: ROUTE_SHIPPING_COMPANIES, + component: TwoColumnComponent, + canActivate: [userGuard], + children: [ + {path: ':id', component: ShippingCompanyDetailComponent}, + ] + }, { path: ROUTE_PROFILE, component: TwoColumnComponent, diff --git a/angular/src/app/app.module.ts b/angular/src/app/app.module.ts index 63e3fe9..5b50123 100644 --- a/angular/src/app/app.module.ts +++ b/angular/src/app/app.module.ts @@ -53,10 +53,14 @@ import { LocationListComponent } from './_views/location/location-list/location- import { ZoneListComponent } from './_views/zone/zone-list/zone-list.component'; import { VesselListComponent } from './_views/vessel/vessel-list/vessel-list.component'; import { ShippingCompanyListComponent } from './_views/shipping-company/shipping-company-list/shipping-company-list.component'; -import { ZoneNewComponent } from './_views/zone/zone-new/zone-new.component'; -import { LocationNewComponent } from './_views/location/location-new/location-new.component'; -import { ShippingCompanyNewComponent } from './_views/shipping-company/shipping-company-new/shipping-company-new.component'; -import { VesselNewComponent } from './_views/vessel/vessel-new/vessel-new.component'; +import { LocationDetailComponent } from './_views/location/location-detail/location-detail.component'; +import { ZoneDetailComponent } from './_views/zone/zone-detail/zone-detail.component'; +import { VesselDetailComponent } from './_views/vessel/vessel-detail/vessel-detail.component'; +import { ShippingCompanyDetailComponent } from './_views/shipping-company/shipping-company-detail/shipping-company-detail.component'; +import { LocationFormComponent } from './_views/location/location-form/location-form.component'; +import { ZoneFormComponent } from './_views/zone/zone-form/zone-form.component'; +import { VesselFormComponent } from './_views/vessel/vessel-form/vessel-form.component'; +import { ShippingCompanyFormComponent } from './_views/shipping-company/shipping-company-form/shipping-company-form.component'; registerLocaleData(localeDe, 'de-DE'); @@ -132,10 +136,14 @@ export function HttpLoaderFactory(http: HttpClient) { ZoneListComponent, VesselListComponent, ShippingCompanyListComponent, - ZoneNewComponent, - LocationNewComponent, - ShippingCompanyNewComponent, - VesselNewComponent, + LocationDetailComponent, + ZoneDetailComponent, + VesselDetailComponent, + ShippingCompanyDetailComponent, + LocationFormComponent, + ZoneFormComponent, + VesselFormComponent, + ShippingCompanyFormComponent, ], providers: [ {provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true}, diff --git a/angular/src/app/core/api/v1/api/location.service.ts b/angular/src/app/core/api/v1/api/location.service.ts index c2de5ca..191c168 100644 --- a/angular/src/app/core/api/v1/api/location.service.ts +++ b/angular/src/app/core/api/v1/api/location.service.ts @@ -191,6 +191,77 @@ export class LocationService { ); } + /** + * Removes the Location resource. + * Removes the Location resource. + * @param id Location identifier + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public locationsIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public locationsIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public locationsIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public locationsIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling locationsIdDelete.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (JWT) required + localVarCredential = this.configuration.lookupCredential('JWT'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/locations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + /** * Retrieves a Location resource. * Retrieves a Location resource. diff --git a/angular/src/app/core/api/v1/api/shippingCompany.service.ts b/angular/src/app/core/api/v1/api/shippingCompany.service.ts index 273045d..fb0aace 100644 --- a/angular/src/app/core/api/v1/api/shippingCompany.service.ts +++ b/angular/src/app/core/api/v1/api/shippingCompany.service.ts @@ -191,6 +191,77 @@ export class ShippingCompanyService { ); } + /** + * Removes the ShippingCompany resource. + * Removes the ShippingCompany resource. + * @param id ShippingCompany identifier + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public shippingCompaniesIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public shippingCompaniesIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public shippingCompaniesIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public shippingCompaniesIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling shippingCompaniesIdDelete.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (JWT) required + localVarCredential = this.configuration.lookupCredential('JWT'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/shipping_companies/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + /** * Retrieves a ShippingCompany resource. * Retrieves a ShippingCompany resource. diff --git a/angular/src/app/core/api/v1/api/user.service.ts b/angular/src/app/core/api/v1/api/user.service.ts index ef5bb53..dd73b3b 100644 --- a/angular/src/app/core/api/v1/api/user.service.ts +++ b/angular/src/app/core/api/v1/api/user.service.ts @@ -196,6 +196,77 @@ export class UserService { ); } + /** + * Removes the User resource. + * Removes the User resource. + * @param id User identifier + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public usersIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public usersIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public usersIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public usersIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling usersIdDelete.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (JWT) required + localVarCredential = this.configuration.lookupCredential('JWT'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/users/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + /** * Retrieves a User resource. * Retrieves a User resource. diff --git a/angular/src/app/core/api/v1/api/vessel.service.ts b/angular/src/app/core/api/v1/api/vessel.service.ts index fc740ee..48a591f 100644 --- a/angular/src/app/core/api/v1/api/vessel.service.ts +++ b/angular/src/app/core/api/v1/api/vessel.service.ts @@ -191,6 +191,77 @@ export class VesselService { ); } + /** + * Removes the Vessel resource. + * Removes the Vessel resource. + * @param id Vessel identifier + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public vesselsIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public vesselsIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public vesselsIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public vesselsIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling vesselsIdDelete.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (JWT) required + localVarCredential = this.configuration.lookupCredential('JWT'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/vessels/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + /** * Retrieves a Vessel resource. * Retrieves a Vessel resource. diff --git a/angular/src/app/core/api/v1/api/zone.service.ts b/angular/src/app/core/api/v1/api/zone.service.ts index aa53cfc..0c2c112 100644 --- a/angular/src/app/core/api/v1/api/zone.service.ts +++ b/angular/src/app/core/api/v1/api/zone.service.ts @@ -191,6 +191,77 @@ export class ZoneService { ); } + /** + * Removes the Zone resource. + * Removes the Zone resource. + * @param id Zone identifier + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public zonesIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public zonesIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public zonesIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public zonesIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling zonesIdDelete.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (JWT) required + localVarCredential = this.configuration.lookupCredential('JWT'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/zones/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + /** * Retrieves a Zone resource. * Retrieves a Zone resource. diff --git a/angular/src/assets/i18n/en.json b/angular/src/assets/i18n/en.json index 4254fa6..36866cc 100644 --- a/angular/src/assets/i18n/en.json +++ b/angular/src/assets/i18n/en.json @@ -70,7 +70,11 @@ "id": "Id", "note": "Note", "number": "#", - "send": "Send" + "send": "Send", + "edit": "Edit", + "save": "Save", + "delete": "Delete", + "delete_confirm": "Do you really want to delete this dataset? There might be related data, which makes deletion impossible unless the related data will be removed first!" }, "users": { diff --git a/httpdocs/src/ApiResource/LocationApi.php b/httpdocs/src/ApiResource/LocationApi.php index 1a01914..f0da727 100644 --- a/httpdocs/src/ApiResource/LocationApi.php +++ b/httpdocs/src/ApiResource/LocationApi.php @@ -6,6 +6,7 @@ use ApiPlatform\Doctrine\Orm\Filter\SearchFilter; use ApiPlatform\Metadata\ApiFilter; use ApiPlatform\Metadata\ApiProperty; use ApiPlatform\Metadata\ApiResource; +use ApiPlatform\Metadata\Delete; use ApiPlatform\Metadata\Get; use ApiPlatform\Metadata\GetCollection; use ApiPlatform\Metadata\Patch; @@ -34,6 +35,9 @@ use Symfony\Component\PropertyInfo\Type; new Patch( security: 'is_granted("ROLE_ADMIN")' ), + new Delete( + security: 'is_granted("ROLE_ADMIN")' + ) ], security: 'is_granted("ROLE_USER")', provider: EntityToDtoStateProvider::class, diff --git a/httpdocs/src/ApiResource/ShippingCompanyApi.php b/httpdocs/src/ApiResource/ShippingCompanyApi.php index e3cf512..0598140 100644 --- a/httpdocs/src/ApiResource/ShippingCompanyApi.php +++ b/httpdocs/src/ApiResource/ShippingCompanyApi.php @@ -6,6 +6,7 @@ use ApiPlatform\Doctrine\Orm\Filter\SearchFilter; use ApiPlatform\Metadata\ApiFilter; use ApiPlatform\Metadata\ApiProperty; use ApiPlatform\Metadata\ApiResource; +use ApiPlatform\Metadata\Delete; use ApiPlatform\Metadata\Get; use ApiPlatform\Metadata\GetCollection; use ApiPlatform\Metadata\Patch; @@ -33,6 +34,9 @@ use Symfony\Component\Validator\Constraints as Assert; new Patch( security: 'is_granted("ROLE_ADMIN")' ), + new Delete( + security: 'is_granted("ROLE_ADMIN")' + ) ], security: 'is_granted("ROLE_USER")', provider: EntityToDtoStateProvider::class, diff --git a/httpdocs/src/ApiResource/UserApi.php b/httpdocs/src/ApiResource/UserApi.php index ba2d066..d26f750 100644 --- a/httpdocs/src/ApiResource/UserApi.php +++ b/httpdocs/src/ApiResource/UserApi.php @@ -12,6 +12,7 @@ use ApiPlatform\Doctrine\Orm\State\Options; use ApiPlatform\Metadata\ApiFilter; use ApiPlatform\Metadata\ApiProperty; use ApiPlatform\Metadata\ApiResource; +use ApiPlatform\Metadata\Delete; use ApiPlatform\Metadata\Get; use ApiPlatform\Metadata\GetCollection; use ApiPlatform\Metadata\Patch; @@ -40,6 +41,9 @@ use Symfony\Component\Validator\Constraints as Assert; new Patch( security: 'is_granted("is_granted("EDIT", object)")' ), + new Delete( + security: 'is_granted("ROLE_ADMIN")' + ) ], security: 'is_granted("ROLE_USER")', provider: EntityToDtoStateProvider::class, diff --git a/httpdocs/src/ApiResource/VesselApi.php b/httpdocs/src/ApiResource/VesselApi.php index 426e68e..7ca49f7 100644 --- a/httpdocs/src/ApiResource/VesselApi.php +++ b/httpdocs/src/ApiResource/VesselApi.php @@ -6,6 +6,7 @@ use ApiPlatform\Doctrine\Orm\Filter\SearchFilter; use ApiPlatform\Metadata\ApiFilter; use ApiPlatform\Metadata\ApiProperty; use ApiPlatform\Metadata\ApiResource; +use ApiPlatform\Metadata\Delete; use ApiPlatform\Metadata\Get; use ApiPlatform\Metadata\GetCollection; use ApiPlatform\Metadata\Patch; @@ -34,6 +35,9 @@ use Symfony\Component\PropertyInfo\Type; new Patch( security: 'is_granted("ROLE_ADMIN")' ), + new Delete( + security: 'is_granted("ROLE_ADMIN")' + ) ], security: 'is_granted("ROLE_USER")', provider: EntityToDtoStateProvider::class, diff --git a/httpdocs/src/ApiResource/ZoneApi.php b/httpdocs/src/ApiResource/ZoneApi.php index 64545e4..1b7cfc6 100644 --- a/httpdocs/src/ApiResource/ZoneApi.php +++ b/httpdocs/src/ApiResource/ZoneApi.php @@ -6,6 +6,7 @@ use ApiPlatform\Doctrine\Orm\Filter\SearchFilter; use ApiPlatform\Metadata\ApiFilter; use ApiPlatform\Metadata\ApiProperty; use ApiPlatform\Metadata\ApiResource; +use ApiPlatform\Metadata\Delete; use ApiPlatform\Metadata\Get; use ApiPlatform\Metadata\GetCollection; use ApiPlatform\Metadata\Patch; @@ -33,6 +34,9 @@ use Symfony\Component\Validator\Constraints as Assert; new Patch( security: 'is_granted("ROLE_ADMIN")' ), + new Delete( + security: 'is_granted("ROLE_ADMIN")' + ) ], security: 'is_granted("ROLE_USER")', provider: EntityToDtoStateProvider::class, diff --git a/httpdocs/src/Mapper/LocationApiToEntityMapper.php b/httpdocs/src/Mapper/LocationApiToEntityMapper.php index 4c99d5e..3eb446f 100644 --- a/httpdocs/src/Mapper/LocationApiToEntityMapper.php +++ b/httpdocs/src/Mapper/LocationApiToEntityMapper.php @@ -32,7 +32,6 @@ class LocationApiToEntityMapper implements MapperInterface return $entity; } - // For new locations, we need the zone if (!$dto->zone) { throw new \Exception('Zone is required for new locations'); }