Daniel 10 miesięcy temu
rodzic
commit
990c15f721
5 zmienionych plików z 135 dodań i 137 usunięć
  1. +1
    -1
      angular/src/app/_components/list/list.component.html
  2. +13
    -0
      angular/src/app/_components/list/list.component.ts
  3. +2
    -2
      angular/src/app/_views/trip/trip-form/trip-form.component.html
  4. +4
    -2
      angular/src/app/_views/trip/trip-location-form/trip-location-form.component.ts
  5. +115
    -132
      angular/src/assets/i18n/en.json

+ 1
- 1
angular/src/app/_components/list/list.component.html Wyświetl plik

@@ -90,7 +90,7 @@
</ng-container>

<ng-container *ngSwitchCase="COLUMN_TYPE_BTN_REMOVE">
<span class="spt-icon-unassign" (click)="onRemoveItemFunction(element, column)"></span>
<span class="spt-icon-remove" (click)="onRemoveItemFunction(element, column)"></span>
</ng-container>

<ng-container *ngSwitchCase="COLUMN_TYPE_BTN_EDIT">


+ 13
- 0
angular/src/app/_components/list/list.component.ts Wyświetl plik

@@ -33,6 +33,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@Input() public searchable: boolean;
@Input() public showDetailButton: boolean;
@Input() public showEditButton: boolean;
@Input() public showRemoveButton: boolean;
@Input() public showPosition: boolean;
@Input() public showFilterBar: boolean;
@Input() public listColDefinitions!: ListColDefinition[];
@@ -87,6 +88,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
this.showPosition = true;
this.showDetailButton = true;
this.showEditButton = true;
this.showRemoveButton = true;
this.showFilterBar = true;
this.filterExists = false;
this.filterObj = {};
@@ -106,6 +108,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
if (this.showEditButton) {
this.listColDefinitions.unshift(ListComponent.getDefaultColEditBtn());
}
if (this.showRemoveButton) {
this.listColDefinitions.unshift(ListComponent.getDefaultRemoveBtn());
}
if (this.showDetailButton) {
const url = this.getCustomDetailLinkFunction !== undefined ? '' : this.router.routerState.snapshot.url;
this.listColDefinitions.unshift(ListComponent.getDefaultColDetailBtnLink(url));
@@ -351,6 +356,14 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
} as ListColDefinition;
}

public static getDefaultRemoveBtn(): ListColDefinition {
return {
name: 'remove',
text: '',
type: ListComponent.COLUMN_TYPE_BTN_REMOVE
} as ListColDefinition;
}

public static getDefaultColPosition(): ListColDefinition {
return {
name: 'pos',


+ 2
- 2
angular/src/app/_views/trip/trip-form/trip-form.component.html Wyświetl plik

@@ -55,7 +55,7 @@
</div>
<div class="col-12 col-lg-6 mb-3">
<app-datetime-picker
[label]="'trip.start_date' | translate"
[label]="'basic.start' | translate"
[inputId]="'startDate'"
[initialValue]="tripForm.get('startDate')?.value ?? null"
(dateTimeChange)="onDateChange($event, 'startDate')"
@@ -64,7 +64,7 @@

<div class="col-12 col-lg-6 mb-3">
<app-datetime-picker
[label]="'trip.end_date' | translate"
[label]="'basic.end' | translate"
[inputId]="'endDate'"
[initialValue]="tripForm.get('endDate')?.value ?? null"
(dateTimeChange)="onDateChange($event, 'endDate')"


+ 4
- 2
angular/src/app/_views/trip/trip-location-form/trip-location-form.component.ts Wyświetl plik

@@ -57,8 +57,10 @@ export class TripLocationFormComponent extends AbstractDataFormComponent<TripLoc
override ngOnInit() {
super.ngOnInit();
this.form.get('tripIri')?.setValue(this.trip.id);
this.form.get('arrivalDateTime')?.setValue(this.arrivalDateTime);
this.form.get('departureDateTime')?.setValue(this.departureDateTime);
if (!this.isEditMode()) {
this.form.get('arrivalDateTime')?.setValue(this.arrivalDateTime);
this.form.get('departureDateTime')?.setValue(this.departureDateTime);
}
}

getLocations: ListGetDataFunctionType = (index: number, pageSize: number, term?: string) => {


+ 115
- 132
angular/src/assets/i18n/en.json Wyświetl plik

@@ -1,166 +1,149 @@
{
"dashboard":
{
"view": "Dashboard",
"overview": "Overview"
"base_data": {
"locations": "Locations",
"shipping_companies": "Shipping companies",
"vessels": "Vessels",
"view": "Base data",
"zones": "Zones"
},
"view":
{
"basic": {
"account": "Account",
"back": "Back",
"columns": "Columns",
"company_name": "Imaq Pilotage",
"create": "Create",
"dashboard": "Dashboard",
"base_data": "Base data"
"date": "date",
"delete": "Delete",
"delete_confirm": "Do you really want to delete this dataset?",
"delete_confirm_related": "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!",
"details": "Details",
"edit": "Edit",
"edit_after": "Edit",
"edit_before": "",
"end": "End",
"filter": "Filter",
"id": "Id",
"image": "Image",
"logout": "Logout",
"no": "No",
"note": "Note",
"number": "#",
"pleaseChoose": "Please choose",
"refresh": "Refresh",
"resetFilters": "Reset Filters",
"save": "Save",
"saveSettings": "Save settings",
"send": "Send",
"showAllColumns": "Show all columns",
"start": "Start",
"submit": "Submit",
"time": "time",
"users": "Users / Pilots",
"yes": "Yes"
},
"common":
{
"name": "Name",
"common": {
"code": "Code",
"created_at": "Created at",
"date": "Date",
"time": "Time",
"note": "Note"
"name": "Name",
"note": "Note",
"time": "Time"
},
"trip":
{
"view": "Trips",
"view_single": "Trip",
"pilot_reference": "Pilotage reference",
"customer_reference": "Customer reference",
"captain_name": "Captain name",
"dashboard": {
"overview": "Overview",
"view": "Dashboard"
},
"errors": {},
"form": {
"email_validation": "Please provide a valid email address",
"mandatory": " Mandatory",
"no_data": "No datasets found.",
"search_placeholder": "Search"
},
"location": {
"is_place": "Place",
"is_port": "Port",
"is_start_end": "Start/End",
"is_zone": "Zone"
},
"model": {
"event": "Event",
"location": "Location",
"shipping_company": "Shipping Company",
"trip": "Trip",
"trip_location": "Itinerary location",
"user": "User",
"user_trip": "Pilotage",
"vessel": "Vessel",
"start_location": "Start location",
"end_location": "End location",
"start_date": "Start date",
"zone": "Zone"
},
"profile": {
"view": "Profile"
},
"trip": {
"add_itinerary_location": "Add itinerary location",
"assigned_users": "Assigned Pilots",
"captain_name": "Captain name",
"completed": "Completed",
"customer_reference": "Customer reference",
"end_date": "End date",
"end_location": "End location",
"events": "Events",
"is_arrival": "Arrival",
"is_transit": "Transit",
"is_departure": "Departure",
"is_transit": "Transit",
"itinerary": "Itinerary",
"itinerary_locations": "Itinerary locations",
"add_itinerary_location": "Add itinerary location",
"pilot_reference": "Pilotage reference",
"remove_itinerary_location": "Remove itinerary location",
"save_itinerary": "Save itinerary",
"assigned_users": "Assigned Pilots",
"save_user_assignments": "Save user assignments",
"events": "Events",
"completed": "Completed"
"start_date": "Start date",
"start_location": "Start location",
"vessel": "Vessel",
"view": "Trips",
"view_single": "Trip"
},
"trip_location":
{
"trip_location": {
"arrival_date_time": "ETA",
"departure_date_time": "ETD"
},
"user_trip":
{
"view": "Pilotage",
"events": "Events",
"user_trip": {
"approved": "Approved",
"completed": "Completed",
"completed_at": "Completed at",
"signature": "Signature Image",
"event_date": "Event date",
"approved": "Approved"
},
"base_data":
{
"view": "Base data",
"locations": "Locations",
"zones": "Zones",
"vessels": "Vessels",
"shipping_companies": "Shipping companies"
"events": "Events",
"signature": "Signature Image",
"view": "Pilotage"
},
"model": {
"location": "Location",
"zone": "Zone",
"vessel": "Vessel",
"shipping_company": "Shipping Company",
"trip": "Trip",
"trip_location": "Itinerary location",
"users": {
"active": "Active",
"email": "Email",
"firstname": "Firstname",
"full_name": "Name",
"image": "Image",
"is_admin": "Admin",
"is_pilot": "Pilot",
"lastname": "Lastname",
"password": "Password",
"pilotIdNo": "#Pilot id",
"user": "User",
"user_trip": "Pilotage",
"event": "Event"
},
"location":
{
"is_zone": "Zone",
"is_place": "Place",
"is_port": "Port",
"is_start_end": "Start/End"
},
"zone":
{

"userTrips": "Pilotage",
"view": "Users / Pilots"
},
"vessel":
{
"length": "Length",
"vessel": {
"breadth": "Breadth",
"callSign": "Call sign",
"draft": "Draft",
"grossTonnage": "Gross Tonnage",
"imoNo": "Imo",
"callSign": "Call sign"
},
"profile":
{
"view": "Profile"
},
"basic":
{
"logout": "Logout",
"company_name": "Imaq Pilotage",
"users": "Users / Pilots",
"create": "Create",
"edit_before": "",
"edit_after": "Edit",
"details": "Details",
"back": "Back",
"yes": "Yes",
"no": "No",
"dashboard": "Dashboard",
"account": "Account",
"date": "Date",
"time": "Time",
"submit": "Submit",
"image": "Image",
"pleaseChoose": "Please choose",
"refresh": "Refresh",
"filter": "Filter",
"columns": "Columns",
"resetFilters": "Reset Filters",
"showAllColumns": "Show all columns",
"saveSettings": "Save settings",
"id": "Id",
"note": "Note",
"number": "#",
"send": "Send",
"edit": "Edit",
"save": "Save",
"delete": "Delete",
"delete_confirm": "Do you really want to delete this dataset?",
"delete_confirm_related": "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":
{
"view": "Users / Pilots",
"user": "User",
"email": "Email",
"full_name": "Name",
"firstname": "Firstname",
"lastname": "Lastname",
"userTrips": "Pilotage",
"pilotIdNo": "#Pilot id",
"password": "Password",
"active": "Active",
"image": "Image",
"is_admin": "Admin",
"is_pilot": "Pilot"
"length": "Length"
},
"form":
{
"mandatory": " Mandatory",
"email_validation": "Please provide a valid email address",
"search_placeholder": "Search",
"no_data": "No datasets found."
"view": {
"base_data": "Base data",
"dashboard": "Dashboard"
},
"errors":
{

}
"zone": {}
}

Ładowanie…
Anuluj
Zapisz