![]()
diff --git a/angular/src/app/_components/list/list.component.html b/angular/src/app/_components/list/list.component.html
index e166b63..9674637 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]="dataFormComponent !== undefined"
+ [showCreateDataButton]="showCreateButton && dataFormComponent !== undefined"
(createNewData)="onCreateData()"
(displayOptionChange)="onDisplayOptionChange($event)"
>
diff --git a/angular/src/app/_components/list/list.component.ts b/angular/src/app/_components/list/list.component.ts
index 4028c61..8111f94 100644
--- a/angular/src/app/_components/list/list.component.ts
+++ b/angular/src/app/_components/list/list.component.ts
@@ -35,6 +35,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@Input() public showDetailButton: boolean;
@Input() public showEditButton: boolean;
@Input() public showRemoveButton: boolean;
+ @Input() public showCreateButton: boolean;
@Input() public showPosition: boolean;
@Input() public showFilterBar: boolean;
@Input() public listColDefinitions!: ListColDefinition[];
@@ -91,6 +92,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
this.showDetailButton = true;
this.showEditButton = true;
this.showRemoveButton = true;
+ this.showCreateButton = true;
this.showFilterBar = true;
this.filterExists = false;
this.filterObj = {};
diff --git a/angular/src/app/_components/search-select/search-select.component.ts b/angular/src/app/_components/search-select/search-select.component.ts
index 8155d23..f63b9a0 100644
--- a/angular/src/app/_components/search-select/search-select.component.ts
+++ b/angular/src/app/_components/search-select/search-select.component.ts
@@ -365,6 +365,78 @@ export class SearchSelectComponent implements OnInit, AfterViewInit {
];
}
+ public static getDefaultColDefTrips(subResource?: string): ListColDefinition[] {
+ return [
+ {
+ name: 'pilotageReference',
+ text: 'trip.pilot_reference',
+ type: ListComponent.COLUMN_TYPE_TEXT_BOLD,
+ field: 'pilotageReference',
+ sortable: true,
+ filterType: FilterBarComponent.FILTER_TYPE_TEXT,
+ } as ListColDefinition,
+ {
+ name: 'vessel',
+ text: 'trip.vessel',
+ type: ListComponent.COLUMN_TYPE_TEXT,
+ subResource: 'vessel',
+ field: 'name',
+ sortable: true,
+ filterType: FilterBarComponent.FILTER_TYPE_TEXT,
+ } as ListColDefinition,
+ {
+ name: 'startLocation',
+ text: 'trip.start_location',
+ type: ListComponent.COLUMN_TYPE_TEXT,
+ subResource: 'startLocation',
+ field: 'name',
+ sortable: true,
+ filterType: FilterBarComponent.FILTER_TYPE_TEXT,
+ } as ListColDefinition,
+ {
+ name: 'endLocation',
+ text: 'trip.end_location',
+ type: ListComponent.COLUMN_TYPE_TEXT,
+ subResource: 'endLocation',
+ field: 'name',
+ sortable: true,
+ filterType: FilterBarComponent.FILTER_TYPE_TEXT,
+ } as ListColDefinition,
+ {
+ name: 'startDate',
+ text: 'trip.start_date',
+ type: ListComponent.COLUMN_TYPE_DATE,
+ field: 'startDate',
+ sortable: true,
+ filterType: FilterBarComponent.FILTER_TYPE_DATE,
+ } as ListColDefinition,
+ {
+ name: 'endDate',
+ text: 'trip.end_date',
+ type: ListComponent.COLUMN_TYPE_DATE,
+ field: 'endDate',
+ sortable: true,
+ filterType: FilterBarComponent.FILTER_TYPE_DATE,
+ } as ListColDefinition,
+ {
+ name: 'completed',
+ text: 'trip.completed',
+ type: ListComponent.COLUMN_TYPE_BOOLEAN,
+ field: 'completed',
+ sortable: true,
+ filterType: FilterBarComponent.FILTER_TYPE_BOOLEAN,
+ } as ListColDefinition,
+ {
+ name: 'createdAt',
+ text: 'common.created_at',
+ type: ListComponent.COLUMN_TYPE_DATE,
+ field: 'createdAt',
+ sortable: true,
+ filterType: FilterBarComponent.FILTER_TYPE_DATE,
+ } as ListColDefinition,
+ ];
+ }
+
public static getDefaultColDefEvents(subResource?: string): ListColDefinition[] {
return [
{
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 49a1c54..3bf0ed6 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
@@ -6,55 +6,27 @@