Skip to content

Commit

Permalink
OM-3325: fix sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
olewandowski1 committed Oct 30, 2024
1 parent b8cac47 commit dd7f3c3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,11 +706,12 @@ export function createOrUpdateVoucherDraftForm(
typeOfForm = DRAFT_FORM_TYPE.ASSIGNMENT,
) {
const { employer, workers, dateRanges } = voucherAssignment;
const workerIds = workers ? workers.map((worker) => decodeId(worker.id)).join(', ') : EMPTY_STRING;

const mutationInput = `
${`typeOfForm: "${typeOfForm}"`}
${`economicUnitCode: "${employer.code}"`}
${workers ? `workers: [${workers.map((worker) => `${decodeId(worker.id)}`).join(', ')}]` : 'workers: []'}
typeOfForm: "${typeOfForm}"
economicUnitCode: "${employer.code}"
workers: [${workerIds}]
${dateRanges ? `dateRanges: ${formatGraphQLDateRanges(dateRanges)}` : 'dateRanges: []'}
`;

Expand Down

0 comments on commit dd7f3c3

Please sign in to comment.