@overmap-ai/core 1.0.51-bulk-form-submission.1 → 1.0.51-bulk-form-submission.3

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.
@@ -3485,13 +3485,13 @@ const formRevisionSortFn = (formRevisionA, formRevisionB) => {
3485
3485
  const revisionA = formRevisionA.revision;
3486
3486
  const revisionB = formRevisionB.revision;
3487
3487
  if (revisionA === "Pending" && revisionB === "Pending") {
3488
- return formRevisionA.submitted_at < formRevisionB.submitted_at ? 1 : -1;
3488
+ return formRevisionA.submitted_at < formRevisionB.submitted_at ? -1 : 1;
3489
3489
  } else if (revisionA === "Pending") {
3490
- return -1;
3491
- } else if (revisionB === "Pending") {
3492
3490
  return 1;
3491
+ } else if (revisionB === "Pending") {
3492
+ return -1;
3493
3493
  } else {
3494
- return revisionA < revisionB ? 1 : -1;
3494
+ return revisionA < revisionB ? -1 : 1;
3495
3495
  }
3496
3496
  };
3497
3497
  const initialState$5 = {
@@ -3645,7 +3645,7 @@ const selectLatestFormRevisionsOfComponentTypes = restructureCreateSelectorWithA
3645
3645
  const ret = {};
3646
3646
  for (const form of Object.values(userForms)) {
3647
3647
  if (form.component_type && componentTypeIdsSet.has(form.component_type)) {
3648
- formsOfComponentTypes[form.component_type] = form;
3648
+ formsOfComponentTypes[form.offline_id] = form;
3649
3649
  }
3650
3650
  }
3651
3651
  for (const revision of Object.values(revisions)) {