feat: add updatedAt field to tour from DL Api
This commit is contained in:
@@ -364,6 +364,7 @@ type Tour {
|
||||
totalKm: Float!
|
||||
transportType: String
|
||||
type: String!
|
||||
updatedAt: DateTime
|
||||
}
|
||||
|
||||
type TourCostBreakdown {
|
||||
|
||||
@@ -337,6 +337,7 @@ export type Tour = {
|
||||
consumptionCosts: Generated<number>;
|
||||
revenueDeviation: Generated<number>;
|
||||
createdAt: Timestamp | null;
|
||||
updatedAt: Timestamp | null;
|
||||
deletedAt: Timestamp | null;
|
||||
ticketId: string | null;
|
||||
};
|
||||
@@ -347,6 +348,7 @@ export type TourSource = {
|
||||
id: string | null;
|
||||
check: string | null;
|
||||
createTime: string | null;
|
||||
lastUpdate: string | null;
|
||||
empfangenVonId: string | null;
|
||||
endgen: string | null;
|
||||
serienId: string | null;
|
||||
@@ -459,6 +461,7 @@ export type TourStaging = {
|
||||
revenueDeviation: Generated<number>;
|
||||
consumptionCosts: Generated<number>;
|
||||
createdAt: Timestamp | null;
|
||||
updatedAt: Timestamp | null;
|
||||
};
|
||||
export type Trace = {
|
||||
id: Generated<string>;
|
||||
|
||||
@@ -98,6 +98,8 @@ export class TourObjectType implements Tour {
|
||||
@Field({ nullable: true })
|
||||
createdAt: Date | null;
|
||||
@Field({ nullable: true })
|
||||
updatedAt: Date | null;
|
||||
@Field({ nullable: true })
|
||||
deletedAt: Date | null;
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
|
||||
+2
@@ -100,6 +100,7 @@ export class DispoLiveExtractorsService {
|
||||
_id,
|
||||
check,
|
||||
createTime,
|
||||
lastUpdate,
|
||||
empfangenVonId,
|
||||
endgen,
|
||||
serienId,
|
||||
@@ -166,6 +167,7 @@ export class DispoLiveExtractorsService {
|
||||
id: _id ? `${_id}` : undefined,
|
||||
check: check ? `${check}` : undefined,
|
||||
createTime: createTime ? `${createTime}` : undefined,
|
||||
lastUpdate: lastUpdate ? `${lastUpdate}` : undefined,
|
||||
empfangenVonId: empfangenVonId
|
||||
? `${empfangenVonId}`
|
||||
: undefined,
|
||||
|
||||
+9
@@ -2,6 +2,7 @@ export interface TourRaw {
|
||||
_id?: string;
|
||||
check?: string;
|
||||
createTime?: string; // yyyy-MM-dd HH:mm:ss 'Europe/Berlin' OR yyyy-MM-dd 'Europe/Berlin'
|
||||
lastUpdate?: string; // yyyy-MM-dd HH:mm:ss 'Europe/Berlin'
|
||||
empfangenVonId?: string;
|
||||
endgen?: string; // yyyy-MM-dd
|
||||
serienId?: string;
|
||||
@@ -140,3 +141,11 @@ export interface EmployeeDyflexisRaw {
|
||||
contract_hours_week?: string; // Float string
|
||||
contract_salary_hour?: string; // Float string
|
||||
}
|
||||
|
||||
export interface TourSummaryDto {
|
||||
_id: string;
|
||||
date: string; // yyyy-MM-dd
|
||||
einsatznummer: string;
|
||||
check: string;
|
||||
lastUpdate?: string;
|
||||
}
|
||||
+2
@@ -94,6 +94,7 @@ export class TourLoader {
|
||||
billDate,
|
||||
billNumber,
|
||||
createdAt,
|
||||
updatedAt
|
||||
} = tour;
|
||||
|
||||
return {
|
||||
@@ -145,6 +146,7 @@ export class TourLoader {
|
||||
billDate,
|
||||
billNumber,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
...(ticketId ? { ticketId } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
+1
@@ -57,6 +57,7 @@ export interface TourPreStaging {
|
||||
consumptionCosts?: number;
|
||||
|
||||
createdAt?: Date;
|
||||
updatedAt?: Date;
|
||||
}
|
||||
|
||||
export interface PatientPreStaging {
|
||||
|
||||
+7
@@ -57,6 +57,11 @@ export class TourTransformer {
|
||||
: transformProperties(parseCETDateTime('yyyy-MM-dd'))(
|
||||
pick(['createTime'])(tourSource),
|
||||
)),
|
||||
...(tourSource.lastUpdate
|
||||
? transformProperties(parseCETDateTime('yyyy-MM-dd HH:mm:ss'))(
|
||||
pick(['lastUpdate'])(tourSource),
|
||||
)
|
||||
: undefined),
|
||||
...transformProperties(parseBoolean)(
|
||||
pick(['infektion', 'gefahren'])(tourSource),
|
||||
),
|
||||
@@ -107,6 +112,7 @@ export class TourTransformer {
|
||||
abrDate,
|
||||
abrNum,
|
||||
createTime,
|
||||
lastUpdate,
|
||||
} = tourParsed;
|
||||
|
||||
return {
|
||||
@@ -155,6 +161,7 @@ export class TourTransformer {
|
||||
billDate: abrDate,
|
||||
billNumber: abrNum,
|
||||
createdAt: createTime,
|
||||
updatedAt: lastUpdate,
|
||||
revenue: 0,
|
||||
consumptionCosts: 0,
|
||||
} as unknown as TourPreStaging;
|
||||
|
||||
Reference in New Issue
Block a user