Merge dev to main #1
@@ -103,6 +103,14 @@ export class TicketService {
|
|||||||
throw new NotFoundException('Ticket not found');
|
throw new NotFoundException('Ticket not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// When saving location, also propagate to the client record
|
||||||
|
if (dto.latitude !== undefined && dto.longitude !== undefined && existing.clientId) {
|
||||||
|
await this.prisma.client.update({
|
||||||
|
where: { id: existing.clientId },
|
||||||
|
data: { latitude: dto.latitude, longitude: dto.longitude },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return this.prisma.ticket.update({
|
return this.prisma.ticket.update({
|
||||||
where: { id },
|
where: { id },
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
Reference in New Issue
Block a user