Skip to content

Commit 161cd7a

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
style(oracle-hcm): apply remaining GitHub source diagnostics
1 parent 76b468b commit 161cd7a

8 files changed

Lines changed: 528 additions & 139 deletions

File tree

apps/sim/blocks/blocks/oracle_fusion_hcm.ts

Lines changed: 105 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,39 @@ export const OracleFusionHcmBlock: BlockConfig = {
642642
id: 'personNumber',
643643
title: 'Person Number',
644644
type: 'short-input',
645-
condition: { field: 'operation', value: ['list_payroll_relationships', 'list_element_entries', 'list_person_process_results', 'list_time_records', 'list_time_cards', 'create_time_entry', 'update_time_entry', 'delete_time_entry', 'get_payroll_relationship', 'list_payroll_assignments', 'get_payroll_assignment', 'list_assigned_payrolls', 'get_assigned_payroll', 'create_assigned_payroll', 'update_assigned_payroll', 'get_element_entry', 'list_element_entry_values', 'update_element_entry_value'] },
646-
required: { field: 'operation', value: ['list_time_records', 'list_time_cards', 'create_time_entry', 'update_time_entry', 'delete_time_entry'] },
645+
condition: {
646+
field: 'operation',
647+
value: [
648+
'list_payroll_relationships',
649+
'list_element_entries',
650+
'list_person_process_results',
651+
'list_time_records',
652+
'list_time_cards',
653+
'create_time_entry',
654+
'update_time_entry',
655+
'delete_time_entry',
656+
'get_payroll_relationship',
657+
'list_payroll_assignments',
658+
'get_payroll_assignment',
659+
'list_assigned_payrolls',
660+
'get_assigned_payroll',
661+
'create_assigned_payroll',
662+
'update_assigned_payroll',
663+
'get_element_entry',
664+
'list_element_entry_values',
665+
'update_element_entry_value',
666+
],
667+
},
668+
required: {
669+
field: 'operation',
670+
value: [
671+
'list_time_records',
672+
'list_time_cards',
673+
'create_time_entry',
674+
'update_time_entry',
675+
'delete_time_entry',
676+
],
677+
},
647678
description:
648679
'Worker person number, including any leading zeros; does not require current public-directory membership',
649680
},
@@ -732,8 +763,26 @@ export const OracleFusionHcmBlock: BlockConfig = {
732763
any: ['oauthCredential', 'effectiveDate'],
733764
},
734765
mode: 'basic',
735-
condition: { field: 'operation', value: ['get_payroll_assignment', 'list_assigned_payrolls', 'get_assigned_payroll', 'create_assigned_payroll', 'update_assigned_payroll'] },
736-
required: { field: 'operation', value: ['get_payroll_assignment', 'list_assigned_payrolls', 'get_assigned_payroll', 'create_assigned_payroll', 'update_assigned_payroll'] },
766+
condition: {
767+
field: 'operation',
768+
value: [
769+
'get_payroll_assignment',
770+
'list_assigned_payrolls',
771+
'get_assigned_payroll',
772+
'create_assigned_payroll',
773+
'update_assigned_payroll',
774+
],
775+
},
776+
required: {
777+
field: 'operation',
778+
value: [
779+
'get_payroll_assignment',
780+
'list_assigned_payrolls',
781+
'get_assigned_payroll',
782+
'create_assigned_payroll',
783+
'update_assigned_payroll',
784+
],
785+
},
737786
placeholder: 'Select payroll assignment id',
738787
description:
739788
'Payroll assignment RelationshipGroupId, not the HR AssignmentId; positive decimal string',
@@ -744,8 +793,26 @@ export const OracleFusionHcmBlock: BlockConfig = {
744793
type: 'short-input',
745794
canonicalParamId: 'payrollAssignmentId',
746795
mode: 'advanced',
747-
condition: { field: 'operation', value: ['get_payroll_assignment', 'list_assigned_payrolls', 'get_assigned_payroll', 'create_assigned_payroll', 'update_assigned_payroll'] },
748-
required: { field: 'operation', value: ['get_payroll_assignment', 'list_assigned_payrolls', 'get_assigned_payroll', 'create_assigned_payroll', 'update_assigned_payroll'] },
796+
condition: {
797+
field: 'operation',
798+
value: [
799+
'get_payroll_assignment',
800+
'list_assigned_payrolls',
801+
'get_assigned_payroll',
802+
'create_assigned_payroll',
803+
'update_assigned_payroll',
804+
],
805+
},
806+
required: {
807+
field: 'operation',
808+
value: [
809+
'get_payroll_assignment',
810+
'list_assigned_payrolls',
811+
'get_assigned_payroll',
812+
'create_assigned_payroll',
813+
'update_assigned_payroll',
814+
],
815+
},
749816
placeholder: 'Enter payroll assignment id',
750817
},
751818
{
@@ -768,8 +835,18 @@ export const OracleFusionHcmBlock: BlockConfig = {
768835
any: ['oauthCredential', 'legislativeDataGroupId', 'effectiveDate'],
769836
},
770837
mode: 'basic',
771-
condition: { field: 'operation', value: ['create_assigned_payroll', 'list_payroll_time_periods', 'list_person_process_results'] },
772-
required: { field: 'operation', value: ['create_assigned_payroll', 'list_payroll_time_periods'] },
838+
condition: {
839+
field: 'operation',
840+
value: [
841+
'create_assigned_payroll',
842+
'list_payroll_time_periods',
843+
'list_person_process_results',
844+
],
845+
},
846+
required: {
847+
field: 'operation',
848+
value: ['create_assigned_payroll', 'list_payroll_time_periods'],
849+
},
773850
placeholder: 'Select payroll id',
774851
description: 'Payroll ID, as a positive decimal string',
775852
},
@@ -779,8 +856,18 @@ export const OracleFusionHcmBlock: BlockConfig = {
779856
type: 'short-input',
780857
canonicalParamId: 'payrollId',
781858
mode: 'advanced',
782-
condition: { field: 'operation', value: ['create_assigned_payroll', 'list_payroll_time_periods', 'list_person_process_results'] },
783-
required: { field: 'operation', value: ['create_assigned_payroll', 'list_payroll_time_periods'] },
859+
condition: {
860+
field: 'operation',
861+
value: [
862+
'create_assigned_payroll',
863+
'list_payroll_time_periods',
864+
'list_person_process_results',
865+
],
866+
},
867+
required: {
868+
field: 'operation',
869+
value: ['create_assigned_payroll', 'list_payroll_time_periods'],
870+
},
784871
placeholder: 'Enter payroll id',
785872
},
786873
{
@@ -800,7 +887,10 @@ export const OracleFusionHcmBlock: BlockConfig = {
800887
id: 'effectiveEndDate',
801888
title: 'Effective End Date',
802889
type: 'short-input',
803-
condition: { field: 'operation', value: ['create_assigned_payroll', 'update_assigned_payroll', 'create_element_entry'] },
890+
condition: {
891+
field: 'operation',
892+
value: ['create_assigned_payroll', 'update_assigned_payroll', 'create_element_entry'],
893+
},
804894
required: { field: 'operation', value: ['create_assigned_payroll', 'create_element_entry'] },
805895
description: 'Effective end date in YYYY-MM-DD format',
806896
wandConfig: {
@@ -813,7 +903,10 @@ export const OracleFusionHcmBlock: BlockConfig = {
813903
id: 'lsed',
814904
title: 'Lsed',
815905
type: 'short-input',
816-
condition: { field: 'operation', value: ['create_assigned_payroll', 'update_assigned_payroll'] },
906+
condition: {
907+
field: 'operation',
908+
value: ['create_assigned_payroll', 'update_assigned_payroll'],
909+
},
817910
required: { field: 'operation', value: [] },
818911
description: 'Lsed in YYYY-MM-DD format',
819912
wandConfig: {

apps/sim/lib/internal/oracle-fusion-hcm/operations.ts

Lines changed: 78 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,15 @@ export async function executeOracleFusionHcmGetPayrollAssignment(
11171117
signal?: AbortSignal
11181118
) {
11191119
const path = await payrollAssignmentPath(input, signal)
1120-
const result = await readResource(input, path, PAYROLL_ASSIGNMENT_FIELDS, 'RelationshipGroupId', input.payrollAssignmentId, projectPayrollAssignment, signal)
1120+
const result = await readResource(
1121+
input,
1122+
path,
1123+
PAYROLL_ASSIGNMENT_FIELDS,
1124+
'RelationshipGroupId',
1125+
input.payrollAssignmentId,
1126+
projectPayrollAssignment,
1127+
signal
1128+
)
11211129
return { success: true as const, output: { payrollAssignment: result } }
11221130
}
11231131

@@ -1127,13 +1135,22 @@ export async function executeOracleFusionHcmListAssignedPayrolls(
11271135
signal?: AbortSignal
11281136
) {
11291137
const path = `${await payrollAssignmentPath(input, signal)}/child/assignedPayrolls`
1130-
const result = await list(input, path, ASSIGNED_PAYROLL_FIELDS, projectAssignedPayroll, (query) => {
1131-
const clauses: string[] = []
1132-
addEffectiveDate(query, input.effectiveDate)
1133-
if (clauses.length > 0) query.q = clauses.join(' AND ')
1134-
},
1135-
signal)
1136-
return { success: true as const, output: { assignedPayrolls: result.items, ...withoutItems(result) } }
1138+
const result = await list(
1139+
input,
1140+
path,
1141+
ASSIGNED_PAYROLL_FIELDS,
1142+
projectAssignedPayroll,
1143+
(query) => {
1144+
const clauses: string[] = []
1145+
addEffectiveDate(query, input.effectiveDate)
1146+
if (clauses.length > 0) query.q = clauses.join(' AND ')
1147+
},
1148+
signal
1149+
)
1150+
return {
1151+
success: true as const,
1152+
output: { assignedPayrolls: result.items, ...withoutItems(result) },
1153+
}
11371154
}
11381155

11391156
/** Oracle contract: https://docs.oracle.com/en/cloud/saas/human-resources/farws/op-payrollrelationships-payrollrelationshipsuniqid-child-payrollassignments-payrollassignmentsuniqid-child-assignedpayrolls-get.html */
@@ -1142,7 +1159,15 @@ export async function executeOracleFusionHcmGetAssignedPayroll(
11421159
signal?: AbortSignal
11431160
) {
11441161
const path = await assignedPayrollPath(input, signal)
1145-
const result = await readResource(input, path, ASSIGNED_PAYROLL_FIELDS, 'AssignedPayrollId', input.assignedPayrollId, projectAssignedPayroll, signal)
1162+
const result = await readResource(
1163+
input,
1164+
path,
1165+
ASSIGNED_PAYROLL_FIELDS,
1166+
'AssignedPayrollId',
1167+
input.assignedPayrollId,
1168+
projectAssignedPayroll,
1169+
signal
1170+
)
11461171
return { success: true as const, output: { assignedPayroll: result } }
11471172
}
11481173

@@ -1152,16 +1177,26 @@ export async function executeOracleFusionHcmListPayrollDefinitions(
11521177
signal?: AbortSignal
11531178
) {
11541179
const path = 'payrollDefinitionsLOV'
1155-
const result = await list(input, path, PAYROLL_DEFINITION_FIELDS, projectPayrollDefinition, (query) => {
1156-
const clauses: string[] = []
1157-
addSearch(query, input.search, ['PayrollName'])
1158-
if (query.q) clauses.push(`(${query.q})`)
1159-
if (input.legislativeDataGroupId) clauses.push(`LegislativeDataGroupId=${input.legislativeDataGroupId}`)
1160-
addEffectiveDate(query, input.effectiveDate)
1161-
if (clauses.length > 0) query.q = clauses.join(' AND ')
1162-
},
1163-
signal)
1164-
return { success: true as const, output: { payrollDefinitions: result.items, ...withoutItems(result) } }
1180+
const result = await list(
1181+
input,
1182+
path,
1183+
PAYROLL_DEFINITION_FIELDS,
1184+
projectPayrollDefinition,
1185+
(query) => {
1186+
const clauses: string[] = []
1187+
addSearch(query, input.search, ['PayrollName'])
1188+
if (query.q) clauses.push(`(${query.q})`)
1189+
if (input.legislativeDataGroupId)
1190+
clauses.push(`LegislativeDataGroupId=${input.legislativeDataGroupId}`)
1191+
addEffectiveDate(query, input.effectiveDate)
1192+
if (clauses.length > 0) query.q = clauses.join(' AND ')
1193+
},
1194+
signal
1195+
)
1196+
return {
1197+
success: true as const,
1198+
output: { payrollDefinitions: result.items, ...withoutItems(result) },
1199+
}
11651200
}
11661201

11671202
/** Oracle contract: https://docs.oracle.com/en/cloud/saas/human-resources/farws/op-payrolltimeperiodslov-get.html */
@@ -1170,18 +1205,30 @@ export async function executeOracleFusionHcmListPayrollTimePeriods(
11701205
signal?: AbortSignal
11711206
) {
11721207
const path = 'payrollTimePeriodsLOV'
1173-
const result = await list(input, path, PAYROLL_TIME_PERIOD_FIELDS, projectPayrollTimePeriod, (query) => {
1174-
const clauses: string[] = []
1175-
addSearch(query, input.search, ['PeriodName'])
1176-
if (query.q) clauses.push(`(${query.q})`)
1177-
if (input.payrollId) clauses.push(`PayrollId=${input.payrollId}`)
1178-
if (input.effectiveDate) {
1179-
clauses.push(`EffectiveStartDate <= '${input.effectiveDate}'`, `EffectiveEndDate >= '${input.effectiveDate}'`)
1180-
}
1181-
if (clauses.length > 0) query.q = clauses.join(' AND ')
1182-
},
1183-
signal)
1184-
return { success: true as const, output: { payrollTimePeriods: result.items, ...withoutItems(result) } }
1208+
const result = await list(
1209+
input,
1210+
path,
1211+
PAYROLL_TIME_PERIOD_FIELDS,
1212+
projectPayrollTimePeriod,
1213+
(query) => {
1214+
const clauses: string[] = []
1215+
addSearch(query, input.search, ['PeriodName'])
1216+
if (query.q) clauses.push(`(${query.q})`)
1217+
if (input.payrollId) clauses.push(`PayrollId=${input.payrollId}`)
1218+
if (input.effectiveDate) {
1219+
clauses.push(
1220+
`EffectiveStartDate <= '${input.effectiveDate}'`,
1221+
`EffectiveEndDate >= '${input.effectiveDate}'`
1222+
)
1223+
}
1224+
if (clauses.length > 0) query.q = clauses.join(' AND ')
1225+
},
1226+
signal
1227+
)
1228+
return {
1229+
success: true as const,
1230+
output: { payrollTimePeriods: result.items, ...withoutItems(result) },
1231+
}
11851232
}
11861233

11871234
/** Oracle contract: https://docs.oracle.com/en/cloud/saas/human-resources/farws/op-payrollelementdefinitionslov-get.html */

0 commit comments

Comments
 (0)