MCPcopy Index your code
hub / github.com/angular/examples / addTicket

Method addTicket

logistics-manager-app/src/fleet-db.ts:281–286  ·  view source on GitHub ↗
(ticket: Omit<ServiceTicket, 'id'>)

Source from the content-addressed store, hash-verified

279 }
280
281 addTicket(ticket: Omit<ServiceTicket, 'id'>): ServiceTicket {
282 const newId = `TKT-${Math.floor(1000 + Math.random() * 9000)}`;
283 const newTicket = { ...ticket, id: newId } as ServiceTicket;
284 this.serviceQueue.push(newTicket);
285 return newTicket;
286 }
287
288 updateTicket(id: string, update: Partial<ServiceTicket>): ServiceTicket | undefined {
289 const index = this.serviceQueue.findIndex((t) => t.id === id);

Callers 1

addServiceTicketFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected