@overmap-ai/core 1.0.62-store-clear-fixes.0 → 1.0.62-store-clear-fixes.1
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.
package/dist/overmap-core.js
CHANGED
|
@@ -2522,11 +2522,16 @@ const selectFormSubmission = (submissionId) => (state) => {
|
|
|
2522
2522
|
};
|
|
2523
2523
|
const selectFormSubmissionsOfForm = restructureCreateSelectorWithArgs(
|
|
2524
2524
|
createSelector(
|
|
2525
|
-
[
|
|
2525
|
+
[
|
|
2526
|
+
selectFormSubmissionsMapping,
|
|
2527
|
+
selectFormRevisionMapping,
|
|
2528
|
+
(_state, formId) => formId
|
|
2529
|
+
],
|
|
2526
2530
|
(submissions, revisionMapping, formId) => {
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2531
|
+
const revisionsOfForm = Object.values(revisionMapping).filter((revision) => revision.form === formId);
|
|
2532
|
+
const revisionIds = new Set(revisionsOfForm.map((revision) => revision.offline_id));
|
|
2533
|
+
return Object.values(submissions).filter((submission) => {
|
|
2534
|
+
return revisionIds.has(submission.form_revision);
|
|
2530
2535
|
});
|
|
2531
2536
|
}
|
|
2532
2537
|
)
|