diff --git a/angular/src/app/_components/_abstract/abstract-data-form-component.ts b/angular/src/app/_components/_abstract/abstract-data-form-component.ts index 32033ae..d2faa16 100644 --- a/angular/src/app/_components/_abstract/abstract-data-form-component.ts +++ b/angular/src/app/_components/_abstract/abstract-data-form-component.ts @@ -4,6 +4,7 @@ import { Observable } from 'rxjs'; import { Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import {ModalStatus} from "@app/_helpers/modal.states"; +import {AppHelperService} from "@app/_helpers/app-helper.service"; export type SaveFunction = (item: T) => Observable; export type UpdateFunction = (id: string | number, item: T) => Observable; @@ -23,29 +24,32 @@ export interface FormSubmitEvent { export abstract class AbstractDataFormComponent implements OnInit, AfterViewInit { @Input() data?: T; @Input() mode: FormMode = FormMode.Create; - @Input() id?: string | number; @Input() redirectAfterDelete?: string; @Output() submit = new EventEmitter>(); @Output() deleted: EventEmitter = new EventEmitter(); + protected id?: string; protected form!: FormGroup; - constructor( + protected constructor( protected formConfig: FormGroup, + protected appHelperService: AppHelperService, protected createFn?: SaveFunction, protected updateFn?: UpdateFunction, protected deleteFn?: DeleteFunction, protected translateService?: TranslateService, - protected router?: Router + protected router?: Router, ) { this.form = formConfig; } ngOnInit(): void { this.form.reset(); - if (this.data) { + this.id = this.appHelperService.extractId(this.data?.['id']) + this.mode = FormMode.Edit; this.form.patchValue(this.data); - } else if (this.mode === FormMode.Create) { + } else { + this.mode = FormMode.Create; this.data = this.getNewDataSet(); this.form.patchValue(this.data); } @@ -60,7 +64,6 @@ export abstract class AbstractDataFormComponent extends AbstractDataFormComponent { @@ -16,6 +17,7 @@ export abstract class AbstractImageFormComponent any) | undefined, updateFunction: (id: string | number, data: T) => any, deleteFunction: (id: string | number) => any, @@ -23,7 +25,7 @@ export abstract class AbstractImageFormComponent) => { if (event.status === ModalStatus.Submitted) { diff --git a/angular/src/app/_components/list/list.component.html b/angular/src/app/_components/list/list.component.html index e424417..1afbd40 100644 --- a/angular/src/app/_components/list/list.component.html +++ b/angular/src/app/_components/list/list.component.html @@ -94,12 +94,11 @@ - + - {{ getElementValue(element, column) | date:'dd.MM.YYYY - HH:mm':'GMT+0200' }} + {{ getElementValue(element, column) | date:'dd.MM.YYYY - HH:mm':'GMT+0000' }} diff --git a/angular/src/app/_components/list/list.component.ts b/angular/src/app/_components/list/list.component.ts index ef88784..aca20f3 100644 --- a/angular/src/app/_components/list/list.component.ts +++ b/angular/src/app/_components/list/list.component.ts @@ -32,6 +32,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { @Input() public dataFormComponentData?: any; @Input() public searchable: boolean; @Input() public showDetailButton: boolean; + @Input() public showEditButton: boolean; @Input() public showPosition: boolean; @Input() public showFilterBar: boolean; @Input() public listColDefinitions!: ListColDefinition[]; @@ -83,8 +84,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { private router: Router, ) { this.searchable = true; - this.showDetailButton = true; this.showPosition = true; + this.showDetailButton = true; + this.showEditButton = true; this.showFilterBar = true; this.filterExists = false; this.filterObj = {}; @@ -93,6 +95,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { this.dataSource = new MatTableDataSource(); this.filterConfig = null; this.detailLinkNewTab = false; + this.dataFormComponentData = {}; } ngOnInit(): void { @@ -100,6 +103,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { if (this.showPosition) { this.listColDefinitions.unshift(ListComponent.getDefaultColPosition()); } + if (this.showEditButton) { + this.listColDefinitions.unshift(ListComponent.getDefaultColEditBtn()); + } if (this.showDetailButton) { const url = this.getCustomDetailLinkFunction !== undefined ? '' : this.router.routerState.snapshot.url; this.listColDefinitions.unshift(ListComponent.getDefaultColDetailBtnLink(url)); @@ -299,7 +305,6 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { return "/assets/images/icons/dummy-person.png" } - getColCssClass(column: ListColDefinition): string { switch (column.type) { case ListComponent.COLUMN_TYPE_DETAIL: @@ -338,6 +343,14 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { } as ListColDefinition; } + public static getDefaultColEditBtn(): ListColDefinition { + return { + name: 'edit', + text: '', + type: ListComponent.COLUMN_TYPE_BTN_EDIT + } as ListColDefinition; + } + public static getDefaultColPosition(): ListColDefinition { return { name: 'pos', @@ -398,6 +411,15 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { ); } + public onEditData(element: any) { + this.dataFormComponentData.data = element; + this.appHelperService.openModal( + this.dataFormComponent, + this.dataFormComponentData, + this.getData + ); + } + public getFilterJsonString(): any { return JSON.stringify(this.filterObj); } diff --git a/angular/src/app/_helpers/app-helper.service.ts b/angular/src/app/_helpers/app-helper.service.ts index a7a9f4f..086b678 100644 --- a/angular/src/app/_helpers/app-helper.service.ts +++ b/angular/src/app/_helpers/app-helper.service.ts @@ -47,7 +47,6 @@ export class AppHelperService { public openModal(component: any, data: any, callback?: (callbackParam?: any) => void, callbackParam?: any): Promise { const modalRef = this.modalService.open(component); - console.log(data); for (const key in data) { modalRef.componentInstance[key] = data[key]; } @@ -114,4 +113,8 @@ export class AppHelperService { return result as T; } + public getDateTimeWithoutTimezone(date?: Date) { + const res: Date = date ?? new Date(); + return `${res.getFullYear()}-${String(res.getMonth() + 1).padStart(2, '0')}-${String(res.getDate()).padStart(2, '0')} ${String(res.getHours()).padStart(2, '0')}:${String(res.getMinutes()).padStart(2, '0')}:${String(res.getSeconds()).padStart(2, '0')}`; + } } \ No newline at end of file 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 index 70ab25e..58db968 100644 --- a/angular/src/app/_views/location/location-detail/location-detail.component.html +++ b/angular/src/app/_views/location/location-detail/location-detail.component.html @@ -2,8 +2,6 @@
diff --git a/angular/src/app/_views/location/location-form/location-form.component.html b/angular/src/app/_views/location/location-form/location-form.component.html index f4d1ddc..16268b0 100644 --- a/angular/src/app/_views/location/location-form/location-form.component.html +++ b/angular/src/app/_views/location/location-form/location-form.component.html @@ -1,7 +1,13 @@
-
-

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

-
+ @if (!isEditMode()) { +
+

{{ ('basic.create') | translate }} {{ 'model.location' | translate }}

+
+ } @else { +
+

{{ ('basic.edit') | translate }} {{ 'model.location' | translate }}: {{ data?.name }}

+
+ }
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 index ec997e8..0db3580 100644 --- a/angular/src/app/_views/location/location-form/location-form.component.ts +++ b/angular/src/app/_views/location/location-form/location-form.component.ts @@ -9,7 +9,6 @@ import { TranslateService } from "@ngx-translate/core"; import { Router } from "@angular/router"; import { ROUTE_BASE_DATA } from "@app/app-routing.module"; import {AppHelperService} from "@app/_helpers/app-helper.service"; -import {Validators} from "@angular/forms"; @Component({ selector: 'app-location-form', @@ -23,12 +22,13 @@ export class LocationFormComponent extends AbstractDataFormComponent this.locationService.locationsPost(data), (id: string | number, data: LocationJsonld) => this.locationService.locationsIdPatch( id.toString(), 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 index 84a3e42..d1be6c2 100644 --- 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 @@ -2,8 +2,6 @@
} \ No newline at end of file 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 index b4015f7..8081beb 100644 --- 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 @@ -1,7 +1,13 @@
-
-

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

-
+ @if (!isEditMode()) { +
+

{{ ('basic.create') | translate }} {{ 'model.shipping_company' | translate }}

+
+ } @else { +
+

{{ ('basic.edit') | translate }} {{ 'model.shipping_company' | translate }}: {{ data?.name }}

+
+ }
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 index 9cddd10..709b012 100644 --- 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 @@ -5,6 +5,7 @@ import { AbstractDataFormComponent } from "@app/_components/_abstract/abstract-d import { TranslateService } from "@ngx-translate/core"; import { Router } from "@angular/router"; import { ROUTE_BASE_DATA } from "@app/app-routing.module"; +import {AppHelperService} from "@app/_helpers/app-helper.service"; @Component({ selector: 'app-shipping-company-form', @@ -13,11 +14,13 @@ import { ROUTE_BASE_DATA } from "@app/app-routing.module"; export class ShippingCompanyFormComponent extends AbstractDataFormComponent { constructor( private shippingCompanyService: ShippingCompanyService, + appHelperService: AppHelperService, translateService: TranslateService, router: Router ) { super( shippingCompanyForm, + appHelperService, (data: ShippingCompanyJsonld) => this.shippingCompanyService.shippingCompaniesPost(data), (id: string | number, data: ShippingCompanyJsonld) => this.shippingCompanyService.shippingCompaniesIdPatch(id.toString(), data), (id: string | number) => this.shippingCompanyService.shippingCompaniesIdDelete(id.toString()), diff --git a/angular/src/app/_views/trip/trip-detail/trip-detail.component.html b/angular/src/app/_views/trip/trip-detail/trip-detail.component.html index abf717d..49a1c54 100644 --- a/angular/src/app/_views/trip/trip-detail/trip-detail.component.html +++ b/angular/src/app/_views/trip/trip-detail/trip-detail.component.html @@ -8,8 +8,6 @@ diff --git a/angular/src/app/_views/trip/trip-form/trip-form.component.html b/angular/src/app/_views/trip/trip-form/trip-form.component.html index d905705..7344686 100644 --- a/angular/src/app/_views/trip/trip-form/trip-form.component.html +++ b/angular/src/app/_views/trip/trip-form/trip-form.component.html @@ -1,7 +1,11 @@
@if (!isEditMode()) {
-

{{ ('basic.new') | translate }} {{ 'model.trip' | translate }}

+

{{ ('basic.create') | translate }} {{ 'model.trip' | translate }}

+
+ } @else { +
+

{{ ('basic.edit') | translate }} {{ 'model.trip' | translate }}: {{ data?.pilotageReference }}

}
diff --git a/angular/src/app/_views/trip/trip-form/trip-form.component.ts b/angular/src/app/_views/trip/trip-form/trip-form.component.ts index 11e2b2d..7472e38 100644 --- a/angular/src/app/_views/trip/trip-form/trip-form.component.ts +++ b/angular/src/app/_views/trip/trip-form/trip-form.component.ts @@ -33,12 +33,13 @@ export class TripFormComponent extends AbstractDataFormComponent { private tripService: TripService, private vesselService: VesselService, private locationService: LocationService, - private appHelperService: AppHelperService, + appHelperService: AppHelperService, translateService: TranslateService, router: Router ) { super( tripForm, + appHelperService, (data: TripJsonld) => { data.completed = false; return this.tripService.tripsPost(data); diff --git a/angular/src/app/_views/trip/trip-list/trip-list.component.html b/angular/src/app/_views/trip/trip-list/trip-list.component.html index c2ca05c..4b6c65f 100644 --- a/angular/src/app/_views/trip/trip-list/trip-list.component.html +++ b/angular/src/app/_views/trip/trip-list/trip-list.component.html @@ -1,6 +1,7 @@
@if (!isEditMode()) {
-

{{ ('basic.new') | translate }} {{ 'model.trip_location' | translate }}

+

{{ ('basic.create') | translate }} {{ 'model.trip_location' | translate }}

+
+ } @else { +
+

{{ ('basic.edit') | translate }} {{ 'model.trip_location' | translate }}: {{ data?.location?.name }}

}
diff --git a/angular/src/app/_views/trip/trip-location-form/trip-location-form.component.ts b/angular/src/app/_views/trip/trip-location-form/trip-location-form.component.ts index 1bd4573..6ab234a 100644 --- a/angular/src/app/_views/trip/trip-location-form/trip-location-form.component.ts +++ b/angular/src/app/_views/trip/trip-location-form/trip-location-form.component.ts @@ -21,21 +21,22 @@ import {SearchSelectComponent} from "@app/_components/search-select/search-selec }) export class TripLocationFormComponent extends AbstractDataFormComponent { - @Input() public trip!: TripJsonld; - @Input() public arrivalDateTime?: string; - @Input() public departureDateTime?: string; + protected trip!: TripJsonld; + protected arrivalDateTime?: string; + protected departureDateTime?: string; protected readonly SearchSelectComponent = SearchSelectComponent; protected locationColDefinitions: ListColDefinition[]; constructor( private tripLocationService: TripLocationService, private locationService: LocationService, - private appHelperService: AppHelperService, + appHelperService: AppHelperService, translateService: TranslateService, router: Router ) { super( tripLocationForm, + appHelperService, (data: TripLocationJsonld) => { return this.tripLocationService.tripLocationsPost(data); }, @@ -68,5 +69,9 @@ export class TripLocationFormComponent extends AbstractDataFormComponent { // Set default arrival and departure time before return - let arrivalDateTime = new Date().toISOString(); - let departureDateTime = new Date(new Date().setHours(new Date().getHours() + 1)).toISOString(); + let arrivalDateTime = this.appHelperService.getDateTimeWithoutTimezone(); + console.log(arrivalDateTime); + let departureDateTime = this.appHelperService.getDateTimeWithoutTimezone(new Date(new Date().setHours(new Date().getHours() + 1))); if (response.member && response.member.length > 0) { const lastEntry = response.member[response.member.length - 1]; if (lastEntry.departureDateTime) { const departureDate = new Date(lastEntry.departureDateTime); departureDate.setDate(departureDate.getDate() + 1); - arrivalDateTime = departureDate.toISOString(); + arrivalDateTime = this.appHelperService.getDateTimeWithoutTimezone(departureDate); const arrivalDate = new Date(arrivalDateTime); arrivalDate.setHours(arrivalDate.getHours() + 1); - departureDateTime = arrivalDate.toISOString(); + departureDateTime = this.appHelperService.getDateTimeWithoutTimezone(arrivalDate); } } this.dataFormComponentData = { trip: this.trip, arrivalDateTime: arrivalDateTime, departureDateTime: departureDateTime - }; return response; diff --git a/angular/src/app/_views/user-trip/user-trip-detail/user-trip-detail.component.html b/angular/src/app/_views/user-trip/user-trip-detail/user-trip-detail.component.html index 15d9c08..f0c1a58 100644 --- a/angular/src/app/_views/user-trip/user-trip-detail/user-trip-detail.component.html +++ b/angular/src/app/_views/user-trip/user-trip-detail/user-trip-detail.component.html @@ -9,8 +9,6 @@ diff --git a/angular/src/app/_views/user-trip/user-trip-form/user-trip-form.component.ts b/angular/src/app/_views/user-trip/user-trip-form/user-trip-form.component.ts index 45546dc..f0d3ac0 100644 --- a/angular/src/app/_views/user-trip/user-trip-form/user-trip-form.component.ts +++ b/angular/src/app/_views/user-trip/user-trip-form/user-trip-form.component.ts @@ -20,13 +20,14 @@ export class UserTripFormComponent extends AbstractImageFormComponent this.userTripService.userTripsIdPatch( diff --git a/angular/src/app/_views/user/user-detail/user-detail.component.html b/angular/src/app/_views/user/user-detail/user-detail.component.html index 5967a06..d9b3851 100644 --- a/angular/src/app/_views/user/user-detail/user-detail.component.html +++ b/angular/src/app/_views/user/user-detail/user-detail.component.html @@ -6,8 +6,6 @@ diff --git a/angular/src/app/_views/user/user-form/user-form.component.html b/angular/src/app/_views/user/user-form/user-form.component.html index 6dd1bbe..59917a3 100644 --- a/angular/src/app/_views/user/user-form/user-form.component.html +++ b/angular/src/app/_views/user/user-form/user-form.component.html @@ -1,7 +1,11 @@
@if (!isEditMode()) {
-

{{ ('basic.new') | translate }} {{ 'model.user' | translate }}

+

{{ ('basic.create') | translate }} {{ 'model.user' | translate }}

+
+ } @else { +
+

{{ ('basic.edit') | translate }} {{ 'model.user' | translate }}: {{ data?.fullName }}

}
diff --git a/angular/src/app/_views/user/user-form/user-form.component.ts b/angular/src/app/_views/user/user-form/user-form.component.ts index 5518322..6c0bf2c 100644 --- a/angular/src/app/_views/user/user-form/user-form.component.ts +++ b/angular/src/app/_views/user/user-form/user-form.component.ts @@ -42,13 +42,14 @@ export class UserFormComponent extends AbstractImageFormComponent { constructor( private userService: UserService, imageUploadService: ImageUploadService, - private appHelperService: AppHelperService, + appHelperService: AppHelperService, translateService: TranslateService, router: Router ) { super( imageUploadService, userForm, + appHelperService, (data: UserJsonld) => userService.usersPost(data), (id: string | number, data: UserJsonld) => userService.usersIdPatch( 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 index c4f93d7..45e3563 100644 --- a/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.html +++ b/angular/src/app/_views/vessel/vessel-detail/vessel-detail.component.html @@ -2,8 +2,6 @@
} \ No newline at end of file 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 index f7a6d73..88b132c 100644 --- a/angular/src/app/_views/vessel/vessel-form/vessel-form.component.html +++ b/angular/src/app/_views/vessel/vessel-form/vessel-form.component.html @@ -1,7 +1,13 @@
-
-

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

-
+ @if (!isEditMode()) { +
+

{{ ('basic.create') | translate }} {{ 'model.vessel' | translate }}

+
+ } @else { +
+

{{ ('basic.edit') | translate }} {{ 'model.vessel' | translate }}: {{ data?.name }}

+
+ }
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 index 4522c5e..3de6fab 100644 --- a/angular/src/app/_views/vessel/vessel-form/vessel-form.component.ts +++ b/angular/src/app/_views/vessel/vessel-form/vessel-form.component.ts @@ -21,12 +21,13 @@ export class VesselFormComponent extends AbstractDataFormComponent constructor( private vesselService: VesselService, private shippingCompanyService: ShippingCompanyService, - private appHelperService: AppHelperService, + appHelperService: AppHelperService, translateService: TranslateService, router: Router ) { super( vesselForm, + appHelperService, (data: VesselJsonld) => this.vesselService.vesselsPost(data), (id: string | number, data: VesselJsonld) => this.vesselService.vesselsIdPatch( 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 index e1c5777..b30b7f8 100644 --- a/angular/src/app/_views/zone/zone-detail/zone-detail.component.html +++ b/angular/src/app/_views/zone/zone-detail/zone-detail.component.html @@ -2,8 +2,6 @@
} \ No newline at end of file diff --git a/angular/src/app/_views/zone/zone-form/zone-form.component.html b/angular/src/app/_views/zone/zone-form/zone-form.component.html index ead9e88..c1750d1 100644 --- a/angular/src/app/_views/zone/zone-form/zone-form.component.html +++ b/angular/src/app/_views/zone/zone-form/zone-form.component.html @@ -1,7 +1,13 @@
-
-

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

-
+ @if (!isEditMode()) { +
+

{{ ('basic.create') | translate }} {{ 'model.zone' | translate }}

+
+ } @else { +
+

{{ ('basic.edit') | translate }} {{ 'model.zone' | translate }}: {{ data?.name }}

+
+ }
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 index 3558ec0..94afc37 100644 --- a/angular/src/app/_views/zone/zone-form/zone-form.component.ts +++ b/angular/src/app/_views/zone/zone-form/zone-form.component.ts @@ -5,6 +5,7 @@ import { zoneForm } from "@app/_forms/apiForms"; import { TranslateService } from "@ngx-translate/core"; import { Router } from "@angular/router"; import {ROUTE_BASE_DATA} from "@app/app-routing.module"; +import {AppHelperService} from "@app/_helpers/app-helper.service"; @Component({ selector: 'app-zone-form', @@ -13,11 +14,13 @@ import {ROUTE_BASE_DATA} from "@app/app-routing.module"; export class ZoneFormComponent extends AbstractDataFormComponent { constructor( private zoneService: ZoneService, + appHelperService: AppHelperService, translateService: TranslateService, router: Router ) { super( zoneForm, + appHelperService, (data: ZoneJsonld) => this.zoneService.zonesPost(data), (id: string | number, data: ZoneJsonld) => this.zoneService.zonesIdPatch(id.toString(), data), (id: string | number) => zoneService.zonesIdDelete(id.toString()), diff --git a/angular/src/assets/i18n/en.json b/angular/src/assets/i18n/en.json index fcf3c92..32c3473 100644 --- a/angular/src/assets/i18n/en.json +++ b/angular/src/assets/i18n/en.json @@ -106,7 +106,7 @@ "logout": "Logout", "company_name": "Imaq Pilotage", "users": "Users / Pilots", - "new": "New", + "create": "Create", "edit_before": "", "edit_after": "Edit", "details": "Details", diff --git a/angular/src/assets/images/icons/icon-edit.svg b/angular/src/assets/images/icons/icon-edit.svg new file mode 100644 index 0000000..bd992e1 --- /dev/null +++ b/angular/src/assets/images/icons/icon-edit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/angular/src/assets/scss/_button.scss b/angular/src/assets/scss/_button.scss index d537cdd..ea98090 100644 --- a/angular/src/assets/scss/_button.scss +++ b/angular/src/assets/scss/_button.scss @@ -102,6 +102,19 @@ body { } } +.spt-icon-edit { + display: block; + width: 32px; + height: 32px; + background: #2e3a43 url("/assets/images/icons/icon-edit.svg") no-repeat center center; + background-size: 20px auto; + border-color: #2e3a43; + &:hover { + background-color: #6d757c !important; + border-color: #6d757c !important; + } +} + .spt-icon-unassign { display: inline-block; width: 20px; diff --git a/httpdocs/src/Mapper/ShippingCompanyApiToEntityMapper.php b/httpdocs/src/Mapper/ShippingCompanyApiToEntityMapper.php index a3648d3..ba44eb5 100644 --- a/httpdocs/src/Mapper/ShippingCompanyApiToEntityMapper.php +++ b/httpdocs/src/Mapper/ShippingCompanyApiToEntityMapper.php @@ -6,7 +6,6 @@ use App\Entity\ShippingCompany; use App\Repository\ShippingCompanyRepository; use Symfonycasts\MicroMapper\AsMapper; use Symfonycasts\MicroMapper\MapperInterface; -use Symfonycasts\MicroMapper\MicroMapperInterface; #[AsMapper(from: ShippingCompanyApi::class, to: ShippingCompany::class)] class ShippingCompanyApiToEntityMapper implements MapperInterface