🚸 (results) Improve results action buttons
Now have an export all modal with settings and a better column order form
This commit is contained in:
@@ -99,9 +99,10 @@ const processAndSaveAnswer =
|
||||
block: InputBlock
|
||||
) =>
|
||||
async (reply: string): Promise<Variable[]> => {
|
||||
state.result &&
|
||||
!state.isPreview &&
|
||||
(await saveAnswer(state.result.id, block)(reply))
|
||||
if (!state.isPreview && state.result) {
|
||||
await saveAnswer(state.result.id, block)(reply)
|
||||
if (!state.result.hasStarted) await setResultAsStarted(state.result.id)
|
||||
}
|
||||
const newVariables = saveVariableValueIfAny(state, block)(reply)
|
||||
return newVariables
|
||||
}
|
||||
@@ -126,6 +127,13 @@ const saveVariableValueIfAny =
|
||||
]
|
||||
}
|
||||
|
||||
const setResultAsStarted = async (resultId: string) => {
|
||||
await prisma.result.update({
|
||||
where: { id: resultId },
|
||||
data: { hasStarted: true },
|
||||
})
|
||||
}
|
||||
|
||||
const parseRetryMessage = (
|
||||
block: InputBlock
|
||||
): Pick<ChatReply, 'messages' | 'input'> => {
|
||||
|
||||
Reference in New Issue
Block a user