Merge remote-tracking branch 'origin' into feat-pedidos
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { v } from 'convex/values';
|
||||
import { api } from './_generated/api';
|
||||
import type { Doc, Id } from './_generated/dataModel';
|
||||
import type { MutationCtx } from './_generated/server';
|
||||
import { mutation, query } from './_generated/server';
|
||||
import type { MutationCtx } from './_generated/server';
|
||||
import { api } from './_generated/api';
|
||||
import { getCurrentUserFunction } from './auth';
|
||||
import type { Doc, Id } from './_generated/dataModel';
|
||||
|
||||
const ticketStatusValidator = v.union(
|
||||
v.literal('aberto'),
|
||||
@@ -122,7 +122,7 @@ async function registrarNotificacoes(
|
||||
const { ticket, titulo, mensagem, usuarioEvento } = params;
|
||||
|
||||
// Obter URL do sistema
|
||||
let urlSistema = process.env.FRONTEND_URL || 'http://localhost:5173';
|
||||
let urlSistema = process.env.SITE_URL || 'http://localhost:5173';
|
||||
if (!urlSistema.match(/^https?:\/\//i)) {
|
||||
urlSistema = `http://${urlSistema}`;
|
||||
}
|
||||
@@ -393,7 +393,7 @@ export const listarChamadosTI = query({
|
||||
// Enriquecer tickets com nome do responsável
|
||||
const ticketsEnriquecidos = await Promise.all(
|
||||
filtrados.map(async (ticket) => {
|
||||
let responsavelNome: string | undefined;
|
||||
let responsavelNome: string | undefined = undefined;
|
||||
if (ticket.responsavelId) {
|
||||
const responsavel = await ctx.db.get(ticket.responsavelId);
|
||||
responsavelNome = responsavel?.nome;
|
||||
|
||||
Reference in New Issue
Block a user