Refresh ops center in realtime
This commit is contained in:
@@ -9739,7 +9739,7 @@ export async function performOta() {
|
||||
}
|
||||
|
||||
export async function approveRepairTicket(ticketId: string) {
|
||||
return mutateState((state) => {
|
||||
const ticket = await mutateState((state) => {
|
||||
const ticket = state.opsRepairTickets.find((item) => item.ticketId === ticketId);
|
||||
if (!ticket) throw new Error("TICKET_NOT_FOUND");
|
||||
ticket.approvalStatus = "approved";
|
||||
@@ -9748,10 +9748,15 @@ export async function approveRepairTicket(ticketId: string) {
|
||||
ticket.updatedAt = nowIso();
|
||||
return ticket;
|
||||
});
|
||||
publishBossEvent("project.context_risk.updated", {
|
||||
status: "approved",
|
||||
note: ticketId,
|
||||
});
|
||||
return ticket;
|
||||
}
|
||||
|
||||
export async function verifyRepairTicket(ticketId: string) {
|
||||
return mutateState((state) => {
|
||||
const ticket = await mutateState((state) => {
|
||||
const ticket = state.opsRepairTickets.find((item) => item.ticketId === ticketId);
|
||||
if (!ticket) throw new Error("TICKET_NOT_FOUND");
|
||||
ticket.executionStatus = "verified";
|
||||
@@ -9772,4 +9777,9 @@ export async function verifyRepairTicket(ticketId: string) {
|
||||
|
||||
return ticket;
|
||||
});
|
||||
publishBossEvent("project.context_risk.updated", {
|
||||
status: "verified",
|
||||
note: ticketId,
|
||||
});
|
||||
return ticket;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user