mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 09:58:12 +00:00
Merge pull request #265 from Tria-plc/freight_feature/profile
Freight feature/profile
This commit is contained in:
@@ -35,6 +35,7 @@ import {
|
|||||||
} from "./payments.dto";
|
} from "./payments.dto";
|
||||||
import { BookingBatchService } from "../train-scheduling/booking-batch.service";
|
import { BookingBatchService } from "../train-scheduling/booking-batch.service";
|
||||||
import { DropdownSettingsService } from "../dropdown-settings/dropdown-settings.service";
|
import { DropdownSettingsService } from "../dropdown-settings/dropdown-settings.service";
|
||||||
|
import { FirstMileService } from "../first-mile/first-mile.service";
|
||||||
|
|
||||||
/** Setting code holding the global ordering window (months) for general contracts. */
|
/** Setting code holding the global ordering window (months) for general contracts. */
|
||||||
const CONTRACT_PERIOD_SETTING_CODE = "general_contract_period";
|
const CONTRACT_PERIOD_SETTING_CODE = "general_contract_period";
|
||||||
@@ -60,6 +61,7 @@ export class PaymentService {
|
|||||||
@Inject(forwardRef(() => BookingBatchService))
|
@Inject(forwardRef(() => BookingBatchService))
|
||||||
private readonly bookingBatchService: BookingBatchService,
|
private readonly bookingBatchService: BookingBatchService,
|
||||||
private readonly dropdownSettings: DropdownSettingsService,
|
private readonly dropdownSettings: DropdownSettingsService,
|
||||||
|
private readonly firstMileService: FirstMileService,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
/** Configured general-contract ordering window in months (defaults to 3). */
|
/** Configured general-contract ordering window in months (defaults to 3). */
|
||||||
@@ -342,6 +344,8 @@ export class PaymentService {
|
|||||||
? { paymentStatus: "PAID", status: "CONTRACT_ACTIVE", expiresAt: contractExpiresAt }
|
? { paymentStatus: "PAID", status: "CONTRACT_ACTIVE", expiresAt: contractExpiresAt }
|
||||||
: { paymentStatus: "PAID", status: "PAID" },
|
: { paymentStatus: "PAID", status: "PAID" },
|
||||||
);
|
);
|
||||||
|
await this.firstMileService.acceptBooking(input.bookingId);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isGeneralContract) {
|
if (isGeneralContract) {
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
// export const API_BASE_URL = 'https://edrfreightapi.triaplc.com';
|
export const API_BASE_URL = 'https://edrfreightapi.triaplc.com';
|
||||||
|
|
||||||
export const API_BASE_URL = 'http://localhost:3001';
|
// export const API_BASE_URL = 'http://localhost:3001';
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export function PhoneField({
|
|||||||
label,
|
label,
|
||||||
value,
|
value,
|
||||||
onChange,
|
onChange,
|
||||||
onBlur,
|
// onBlur,
|
||||||
error,
|
error,
|
||||||
required,
|
required,
|
||||||
disabled,
|
disabled,
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
// export const API_BASE_URL = 'https://edrfreightapi.triaplc.com';
|
export const API_BASE_URL = 'https://edrfreightapi.triaplc.com';
|
||||||
export const API_BASE_URL = 'http://localhost:3001';
|
// export const API_BASE_URL = 'http://localhost:3001';
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
AlertCircle,
|
AlertCircle,
|
||||||
ArrowLeft,
|
ArrowLeft,
|
||||||
ArrowRight,
|
ArrowRight,
|
||||||
UserCheck,
|
// UserCheck,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
|
|||||||
Reference in New Issue
Block a user