MCPcopy Index your code
hub / github.com/simstudioai/sim / mapPlan

Function mapPlan

apps/sim/app/api/tools/workday/get-compensation/route.ts:62–72  ·  view source on GitHub ↗
(p: WorkdayCompensationPlanSoap)

Source from the content-addressed store, hash-verified

60 const compensationData = worker?.Worker_Data?.Compensation_Data
61
62 const mapPlan = (p: WorkdayCompensationPlanSoap) => ({
63 id: extractRefId(p.Compensation_Plan_Reference) ?? null,
64 planName: p.Compensation_Plan_Reference?.attributes?.Descriptor ?? null,
65 amount:
66 parseSoapNumber(p.Amount) ??
67 parseSoapNumber(p.Per_Unit_Amount) ??
68 parseSoapNumber(p.Individual_Target_Amount) ??
69 null,
70 currency: extractRefId(p.Currency_Reference) ?? null,
71 frequency: extractRefId(p.Frequency_Reference) ?? null,
72 })
73
74 const planTypeKeys: (keyof WorkdayCompensationDataSoap)[] = [
75 'Employee_Base_Pay_Plan_Assignment_Data',

Callers 1

route.tsFile · 0.85

Calls 2

extractRefIdFunction · 0.90
parseSoapNumberFunction · 0.90

Tested by

no test coverage detected