Skip to content

Commit

Permalink
Merge pull request #3049 from glific/fix/org-flows
Browse files Browse the repository at this point in the history
Fixed the input payload for updating organization flows
  • Loading branch information
kurund authored Sep 2, 2024
2 parents d7460c6 + c5c81bb commit 44bb539
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,19 +430,22 @@ export const OrganizationFlows = () => {
regxOpt: payload.regxFlowOpt,
};
}
let startTimeValue = dayjs(payload.startTime);
let endTimeValue = dayjs(payload.endTime);
object = {
outOfOffice: {
defaultFlowId: payload.defaultFlowId ? payload.defaultFlowId.id : null,
enabled: payload.hours,
enabledDays: assignDays(payload.enabledDays),
endTime: dayjs(payload.endTime).format(EXTENDED_TIME_FORMAT),
endTime: endTimeValue.isValid() ? endTimeValue.format(EXTENDED_TIME_FORMAT) : null,
flowId: payload.flowId ? payload.flowId.id : null,
startTime: dayjs(payload.startTime).format(EXTENDED_TIME_FORMAT),
startTime: startTimeValue.isValid() ? startTimeValue.format(EXTENDED_TIME_FORMAT) : null,
},
regxFlow: regxFlow,
newcontactFlowId: newContactFlowId,
optinFlowId,
};

return object;
};

Expand Down

0 comments on commit 44bb539

Please sign in to comment.