Skip to content

Function: filterOutExistingSessionFragments()

function filterOutExistingSessionFragments(existingSessions, newSessions): {
alreadyExistingSessions: {
active_seconds: number;
created_at: string;
currency: | "USD"
| "EUR"
| "GBP"
| "CAD"
| "AUD"
| "JPY"
| "CHF"
| "CNY"
| "INR"
| "BRL"
| "VEF";
end_time: string;
hourly_payment: boolean;
id: string;
memo: string | null;
paid: boolean;
payout_id: string | null;
salary: number;
start_time: string;
time_fragments_interval: number | null;
user_id: string;
work_project_id: string;
}[];
newSessionsToAdd: {
active_seconds: number;
created_at?: string;
currency?: | "USD"
| "EUR"
| "GBP"
| "CAD"
| "AUD"
| "JPY"
| "CHF"
| "CNY"
| "INR"
| "BRL"
| "VEF";
end_time: string;
hourly_payment?: boolean;
id?: string;
memo?: string | null;
paid?: boolean;
payout_id?: string | null;
salary: number;
start_time: string;
time_fragments_interval?: number | null;
user_id?: string;
work_project_id?: string;
}[];
};

Defined in: shared/src/helper/workHelper/workHelperFunctions.ts:165

ParameterType
existingSessions{ active_seconds: number; created_at: string; currency: | "USD" | "EUR" | "GBP" | "CAD" | "AUD" | "JPY" | "CHF" | "CNY" | "INR" | "BRL" | "VEF"; end_time: string; hourly_payment: boolean; id: string; memo: string | null; paid: boolean; payout_id: string | null; salary: number; start_time: string; time_fragments_interval: number | null; user_id: string; work_project_id: string; }[]
newSessions{ active_seconds: number; created_at?: string; currency?: | "USD" | "EUR" | "GBP" | "CAD" | "AUD" | "JPY" | "CHF" | "CNY" | "INR" | "BRL" | "VEF"; end_time: string; hourly_payment?: boolean; id?: string; memo?: string | null; paid?: boolean; payout_id?: string | null; salary: number; start_time: string; time_fragments_interval?: number | null; user_id?: string; work_project_id?: string; }[]
{
alreadyExistingSessions: {
active_seconds: number;
created_at: string;
currency: | "USD"
| "EUR"
| "GBP"
| "CAD"
| "AUD"
| "JPY"
| "CHF"
| "CNY"
| "INR"
| "BRL"
| "VEF";
end_time: string;
hourly_payment: boolean;
id: string;
memo: string | null;
paid: boolean;
payout_id: string | null;
salary: number;
start_time: string;
time_fragments_interval: number | null;
user_id: string;
work_project_id: string;
}[];
newSessionsToAdd: {
active_seconds: number;
created_at?: string;
currency?: | "USD"
| "EUR"
| "GBP"
| "CAD"
| "AUD"
| "JPY"
| "CHF"
| "CNY"
| "INR"
| "BRL"
| "VEF";
end_time: string;
hourly_payment?: boolean;
id?: string;
memo?: string | null;
paid?: boolean;
payout_id?: string | null;
salary: number;
start_time: string;
time_fragments_interval?: number | null;
user_id?: string;
work_project_id?: string;
}[];
}
NameTypeDefined in
alreadyExistingSessions{ active_seconds: number; created_at: string; currency: | "USD" | "EUR" | "GBP" | "CAD" | "AUD" | "JPY" | "CHF" | "CNY" | "INR" | "BRL" | "VEF"; end_time: string; hourly_payment: boolean; id: string; memo: string | null; paid: boolean; payout_id: string | null; salary: number; start_time: string; time_fragments_interval: number | null; user_id: string; work_project_id: string; }[]shared/src/helper/workHelper/workHelperFunctions.ts:170
newSessionsToAdd{ active_seconds: number; created_at?: string; currency?: | "USD" | "EUR" | "GBP" | "CAD" | "AUD" | "JPY" | "CHF" | "CNY" | "INR" | "BRL" | "VEF"; end_time: string; hourly_payment?: boolean; id?: string; memo?: string | null; paid?: boolean; payout_id?: string | null; salary: number; start_time: string; time_fragments_interval?: number | null; user_id?: string; work_project_id?: string; }[]shared/src/helper/workHelper/workHelperFunctions.ts:169