tods-competition-factory 1.7.19 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9674,7 +9674,6 @@ const membershipMap = {
9674
9674
  function getParticipantMap({
9675
9675
  withIndividualParticipants,
9676
9676
  convertExtensions,
9677
- policyDefinitions,
9678
9677
  tournamentRecord,
9679
9678
  withSignInStatus,
9680
9679
  withScaleValues,
@@ -9682,32 +9681,23 @@ function getParticipantMap({
9682
9681
  withISO2,
9683
9682
  withIOC
9684
9683
  }) {
9685
- const participantAttributes = policyDefinitions?.[POLICY_TYPE_PARTICIPANT];
9686
- const filterAttributes = participantAttributes?.participant;
9687
9684
  const participantMap = {};
9688
- for (const participant of tournamentRecord.participants || []) {
9685
+ for (const participant of tournamentRecord.participants ?? []) {
9689
9686
  const participantId = participant?.participantId;
9690
9687
  participantId && initializeParticipantId({ participantMap, participantId });
9691
9688
  }
9692
- for (const participant of tournamentRecord.participants || []) {
9689
+ for (const participant of tournamentRecord.participants ?? []) {
9693
9690
  const participantCopy = makeDeepCopy(
9694
9691
  participant,
9695
9692
  convertExtensions,
9696
9693
  internalUse
9697
9694
  );
9698
- const filteredParticipant = filterAttributes ? attributeFilter({
9699
- template: participantAttributes.participant,
9700
- source: participantCopy
9701
- }) : participantCopy;
9702
- const { participantId, individualParticipantIds, participantType } = filteredParticipant;
9703
- Object.assign(
9704
- participantMap[participantId].participant,
9705
- filteredParticipant
9706
- );
9695
+ const { participantId, individualParticipantIds, participantType } = participantCopy;
9696
+ Object.assign(participantMap[participantId].participant, participantCopy);
9707
9697
  if (individualParticipantIds) {
9708
9698
  processIndividualParticipantIds({
9709
9699
  individualParticipantIds,
9710
- filteredParticipant,
9700
+ participantCopy,
9711
9701
  participantMap,
9712
9702
  participantType,
9713
9703
  participantId
@@ -9758,7 +9748,7 @@ function addIndividualParticipants({ participantMap }) {
9758
9748
  }
9759
9749
  function processIndividualParticipantIds({
9760
9750
  individualParticipantIds,
9761
- filteredParticipant,
9751
+ participantCopy,
9762
9752
  participantMap,
9763
9753
  participantType,
9764
9754
  participantId
@@ -9773,7 +9763,7 @@ function processIndividualParticipantIds({
9773
9763
  participantName,
9774
9764
  participantId: participantId2,
9775
9765
  teamId
9776
- } = filteredParticipant;
9766
+ } = participantCopy;
9777
9767
  const membership = membershipMap[participantType];
9778
9768
  individualParticipant[membership].push({
9779
9769
  participantRoleResponsibilities,
@@ -9836,7 +9826,6 @@ function initializeParticipantId({ participantMap, participantId }) {
9836
9826
  function hydrateParticipants({
9837
9827
  participantsProfile,
9838
9828
  useParticipantMap,
9839
- policyDefinitions,
9840
9829
  tournamentRecord,
9841
9830
  contextProfile,
9842
9831
  inContext
@@ -9845,7 +9834,6 @@ function hydrateParticipants({
9845
9834
  const participantMap = getParticipantMap({
9846
9835
  ...participantsProfile,
9847
9836
  ...contextProfile,
9848
- policyDefinitions,
9849
9837
  tournamentRecord
9850
9838
  })?.participantMap;
9851
9839
  return { participantMap };