Weiter
This commit is contained in:
1 parent
c2063fe1ed
commit
07ef8ef025
10 files changed
+1624
-93
No files matched your search
+16
-2
@@ -26,6 +26,8 @@ type CreateSessionPayload = {
|
||||
startedAt: string;
|
||||
endedAt: string;
|
||||
durationSeconds: number;
|
||||
zammadLookup?: boolean;
|
||||
projectTeamspaceEntryId?: string | null;
|
||||
};
|
||||
|
||||
type DeleteSessionResult = {
|
||||
@@ -35,6 +37,8 @@ type DeleteSessionResult = {
|
||||
started_at: string;
|
||||
userTicketEmpty: boolean;
|
||||
ticketDeleted: boolean;
|
||||
projectDeleteAvailable: boolean;
|
||||
project_id: string | null;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -338,8 +342,10 @@ export function createProject(payload: {
|
||||
ticketNumber: string;
|
||||
title?: string | null;
|
||||
organizationId?: string | null;
|
||||
zammadLookup?: boolean;
|
||||
teamspaceProject?: string | null;
|
||||
teamspaceEntries?: Array<{
|
||||
id?: string | null;
|
||||
teamspaceProject?: string | null;
|
||||
isDefault: boolean;
|
||||
hourBudgetMinutes?: number | null;
|
||||
@@ -366,6 +372,7 @@ export function updateProject(
|
||||
organizationId: string;
|
||||
teamspaceProject?: string | null;
|
||||
teamspaceEntries?: Array<{
|
||||
id?: string | null;
|
||||
teamspaceProject?: string | null;
|
||||
isDefault: boolean;
|
||||
hourBudgetMinutes?: number | null;
|
||||
@@ -461,8 +468,14 @@ export function createSession(payload: CreateSessionPayload) {
|
||||
});
|
||||
}
|
||||
|
||||
export function lookupTicket(ticketNumber: string) {
|
||||
return request<{ ticket: TicketMeta | null }>(`/api/tickets/lookup?ticketNumber=${encodeURIComponent(ticketNumber)}`);
|
||||
export function lookupTicket(ticketNumber: string, source: "local" | "zammad" = "local") {
|
||||
const params = new URLSearchParams({ ticketNumber });
|
||||
|
||||
if (source === "zammad") {
|
||||
params.set("source", source);
|
||||
}
|
||||
|
||||
return request<{ ticket: TicketMeta | null }>(`/api/tickets/lookup?${params}`);
|
||||
}
|
||||
|
||||
export function searchTickets(query: string) {
|
||||
@@ -492,6 +505,7 @@ export function updateSessionDetails(
|
||||
activity: string;
|
||||
workType: WorkType;
|
||||
removeProjectData?: boolean;
|
||||
projectTeamspaceEntryId?: string | null;
|
||||
startedAt: string;
|
||||
endedAt: string;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user