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 {
|
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;
|
activityId: string;
|
||||||
fieldId: string;
|
fieldId: string;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
@ -412,7 +414,7 @@ export interface RdbmsLookupQuery {
|
|||||||
|
|
||||||
export function fetchRdbmsLookupRecords(templateUuid: string, q: RdbmsLookupQuery): Promise<RdbmsLookupResponse> {
|
export function fetchRdbmsLookupRecords(templateUuid: string, q: RdbmsLookupQuery): Promise<RdbmsLookupResponse> {
|
||||||
return request("POST", `/app/${APP_ID}/rdbms-templates/${encodeURIComponent(templateUuid)}/records`, {
|
return request("POST", `/app/${APP_ID}/rdbms-templates/${encodeURIComponent(templateUuid)}/records`, {
|
||||||
workflow_id: q.workflowId,
|
workflow_uuid: q.workflowUuid,
|
||||||
activity_id: q.activityId,
|
activity_id: q.activityId,
|
||||||
field_id: q.fieldId,
|
field_id: q.fieldId,
|
||||||
limit: q.limit ?? 1000,
|
limit: q.limit ?? 1000,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import { ChevronLeft, ChevronRight, Phone, X, Calendar as CalendarIcon, Home, Building2 } from "lucide-react";
|
import { ChevronLeft, ChevronRight, Phone, X, Calendar as CalendarIcon, Home, Building2 } from "lucide-react";
|
||||||
import { fetchRdbmsLookupRecords } from "../../api/viewService";
|
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 = "#e31837";
|
||||||
const ACCENT_SOFT = "#fde2e8";
|
const ACCENT_SOFT = "#fde2e8";
|
||||||
@ -113,7 +113,7 @@ export function CalendarView() {
|
|||||||
let offset = 0;
|
let offset = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
const resp = await fetchRdbmsLookupRecords(CALENDAR_LOOKUPS.TEST_DRIVES.rdbmsTemplateUuid, {
|
const resp = await fetchRdbmsLookupRecords(CALENDAR_LOOKUPS.TEST_DRIVES.rdbmsTemplateUuid, {
|
||||||
workflowId: WORKFLOW_NUMERIC_ID,
|
workflowUuid: WORKFLOW_ID,
|
||||||
activityId: ACTIVITY_IDS.INIT_ACTIVITY,
|
activityId: ACTIVITY_IDS.INIT_ACTIVITY,
|
||||||
fieldId: CALENDAR_LOOKUPS.TEST_DRIVES.fieldId,
|
fieldId: CALENDAR_LOOKUPS.TEST_DRIVES.fieldId,
|
||||||
limit: PAGE,
|
limit: PAGE,
|
||||||
@ -130,13 +130,13 @@ export function CalendarView() {
|
|||||||
Promise.all([
|
Promise.all([
|
||||||
fetchAllDrives(),
|
fetchAllDrives(),
|
||||||
fetchRdbmsLookupRecords(CALENDAR_LOOKUPS.CARS.rdbmsTemplateUuid, {
|
fetchRdbmsLookupRecords(CALENDAR_LOOKUPS.CARS.rdbmsTemplateUuid, {
|
||||||
workflowId: WORKFLOW_NUMERIC_ID,
|
workflowUuid: WORKFLOW_ID,
|
||||||
activityId: ACTIVITY_IDS.INIT_ACTIVITY,
|
activityId: ACTIVITY_IDS.INIT_ACTIVITY,
|
||||||
fieldId: CALENDAR_LOOKUPS.CARS.fieldId,
|
fieldId: CALENDAR_LOOKUPS.CARS.fieldId,
|
||||||
limit: 100,
|
limit: 100,
|
||||||
}),
|
}),
|
||||||
fetchRdbmsLookupRecords(CALENDAR_LOOKUPS.DEALERS.rdbmsTemplateUuid, {
|
fetchRdbmsLookupRecords(CALENDAR_LOOKUPS.DEALERS.rdbmsTemplateUuid, {
|
||||||
workflowId: WORKFLOW_NUMERIC_ID,
|
workflowUuid: WORKFLOW_ID,
|
||||||
activityId: ACTIVITY_IDS.INIT_ACTIVITY,
|
activityId: ACTIVITY_IDS.INIT_ACTIVITY,
|
||||||
fieldId: CALENDAR_LOOKUPS.DEALERS.fieldId,
|
fieldId: CALENDAR_LOOKUPS.DEALERS.fieldId,
|
||||||
limit: 100,
|
limit: 100,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user