-
- Name
+
-
-
- Description
+
+
-
+
+
+ {
+ if (value === EvaluationResultableType.Number) {
+ setConfiguration({
+ type: value,
+ detail: { range: { from: 0, to: 1 } },
+ })
+ } else {
+ setConfiguration({ type: value })
+ }
+ }}
+ selected={configuration.type}
+ />
+
+ {configuration.type === EvaluationResultableType.Number && (
+
+
+ {
+ setConfiguration((prev) => {
+ const next = { ...prev }
+
+ if (e.target.value === '') {
+ next.detail = {
+ range: { from: 0, to: next.detail?.range.to || 0 },
+ }
+
+ return next
+ }
+
+ if (next.detail?.range.from) {
+ next.detail.range.from = parseInt(e.target.value)
+ if (next.detail.range.from > next.detail.range.to) {
+ next.detail.range.to = next.detail.range.from + 1
+ }
+ } else {
+ next.detail = {
+ range: {
+ from: parseInt(e.target.value),
+ to: parseInt(e.target.value) + 1,
+ },
+ }
+ }
+
+ return next
+ })
+ }}
+ />
+
+ setConfiguration((prev) => {
+ const next = { ...prev }
+
+ if (e.target.value === '') {
+ next.detail = {
+ range: { from: 0, to: 0 },
+ }
+
+ return next
+ }
+
+ if (next.detail?.range.to) {
+ next.detail.range.to = parseInt(e.target.value)
+ if (next.detail.range.to < next.detail.range.from) {
+ next.detail.range.from = next.detail.range.to - 1
+ }
+ } else {
+ next.detail = {
+ range: {
+ from: parseInt(e.target.value) - 1,
+ to: parseInt(e.target.value),
+ },
+ }
+ }
+
+ return next
+ })
+ }
+ />
+
+
+ )}
)
diff --git a/apps/web/src/app/(private)/projects/[projectId]/versions/[commitUuid]/documents/[documentUuid]/logs/_components/DocumentLogs/DocumentLogInfo/Metadata.tsx b/apps/web/src/app/(private)/projects/[projectId]/versions/[commitUuid]/documents/[documentUuid]/logs/_components/DocumentLogs/DocumentLogInfo/Metadata.tsx
index 7bdf0edd3..827d9bce1 100644
--- a/apps/web/src/app/(private)/projects/[projectId]/versions/[commitUuid]/documents/[documentUuid]/logs/_components/DocumentLogs/DocumentLogInfo/Metadata.tsx
+++ b/apps/web/src/app/(private)/projects/[projectId]/versions/[commitUuid]/documents/[documentUuid]/logs/_components/DocumentLogs/DocumentLogInfo/Metadata.tsx
@@ -75,7 +75,7 @@ export function DocumentLogMetadata({
providerLogs?.reduce(
(acc, log) => {
const key = String(log.providerId)
- acc[key] = (acc[key] ?? 0) + log.cost_in_millicents
+ acc[key] = (acc[key] ?? 0) + log.costInMillicents
return acc
},
{} as Record