calendar: send workflow_uuid (not workflow_id) to rdbms records endpoint
Core-service removed numeric workflow_id from the lookup-records API and now requires the clone-portable workflow_uuid (resolved server-side). Calendar was still sending workflow_id -> 'Missing required params: workflow_uuid'. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
6095d3f9d9
commit
04ccc49db4
@ -402,7 +402,9 @@ export interface RdbmsLookupResponse {
|
||||
}
|
||||
|
||||
export interface RdbmsLookupQuery {
|
||||
workflowId: number;
|
||||
// Core-service expects the clone-portable workflow UUID under `workflow_uuid`;
|
||||
// it resolves the numeric workflow_id server-side.
|
||||
workflowUuid: string;
|
||||
activityId: string;
|
||||
fieldId: string;
|
||||
limit?: number;
|
||||
@ -412,7 +414,7 @@ export interface RdbmsLookupQuery {
|
||||
|
||||
export function fetchRdbmsLookupRecords(templateUuid: string, q: RdbmsLookupQuery): Promise<RdbmsLookupResponse> {
|
||||
return request("POST", `/app/${APP_ID}/rdbms-templates/${encodeURIComponent(templateUuid)}/records`, {
|
||||
workflow_id: q.workflowId,
|
||||
workflow_uuid: q.workflowUuid,
|
||||
activity_id: q.activityId,
|
||||
field_id: q.fieldId,
|
||||
limit: q.limit ?? 1000,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { ChevronLeft, ChevronRight, Phone, X, Calendar as CalendarIcon, Home, Building2 } from "lucide-react";
|
||||
import { fetchRdbmsLookupRecords } from "../../api/viewService";
|
||||
import { CALENDAR_LOOKUPS, WORKFLOW_NUMERIC_ID, ACTIVITY_IDS, DEFAULT_DEALER_ID } from "../../config";
|
||||
import { CALENDAR_LOOKUPS, WORKFLOW_ID, ACTIVITY_IDS, DEFAULT_DEALER_ID } from "../../config";
|
||||
|
||||
const ACCENT = "#e31837";
|
||||
const ACCENT_SOFT = "#fde2e8";
|
||||
@ -113,7 +113,7 @@ export function CalendarView() {
|
||||
let offset = 0;
|
||||
for (;;) {
|
||||
const resp = await fetchRdbmsLookupRecords(CALENDAR_LOOKUPS.TEST_DRIVES.rdbmsTemplateUuid, {
|
||||
workflowId: WORKFLOW_NUMERIC_ID,
|
||||
workflowUuid: WORKFLOW_ID,
|
||||
activityId: ACTIVITY_IDS.INIT_ACTIVITY,
|
||||
fieldId: CALENDAR_LOOKUPS.TEST_DRIVES.fieldId,
|
||||
limit: PAGE,
|
||||
@ -130,13 +130,13 @@ export function CalendarView() {
|
||||
Promise.all([
|
||||
fetchAllDrives(),
|
||||
fetchRdbmsLookupRecords(CALENDAR_LOOKUPS.CARS.rdbmsTemplateUuid, {
|
||||
workflowId: WORKFLOW_NUMERIC_ID,
|
||||
workflowUuid: WORKFLOW_ID,
|
||||
activityId: ACTIVITY_IDS.INIT_ACTIVITY,
|
||||
fieldId: CALENDAR_LOOKUPS.CARS.fieldId,
|
||||
limit: 100,
|
||||
}),
|
||||
fetchRdbmsLookupRecords(CALENDAR_LOOKUPS.DEALERS.rdbmsTemplateUuid, {
|
||||
workflowId: WORKFLOW_NUMERIC_ID,
|
||||
workflowUuid: WORKFLOW_ID,
|
||||
activityId: ACTIVITY_IDS.INIT_ACTIVITY,
|
||||
fieldId: CALENDAR_LOOKUPS.DEALERS.fieldId,
|
||||
limit: 100,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user