Router: change /Discover to /Discover/map/type/filterId
This commit is contained in:
1 parent
07b35fcce0
commit
af1f8f3016
20 files changed
+121
-57
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import Swal from 'sweetalert2'
|
||||
import Swal from 'sweetalert2';
|
||||
import AllMapDataStore from '@/stores/allMapData.js';
|
||||
|
||||
const customClass = {
|
||||
htmlContainer: '!w-[564px]',
|
||||
@@ -51,7 +52,8 @@ export async function savedSuccessfully(value) {
|
||||
})
|
||||
};
|
||||
|
||||
export async function leaveFilter(next, addFilterId) {
|
||||
export async function leaveFilter(next, addFilterId, toPath) {
|
||||
const allMapDataStore = AllMapDataStore();
|
||||
const result = await Swal.fire({
|
||||
title: 'ARE YOU SURE TO LEAVE MAP?',
|
||||
html: 'Filter settings have not been saved.</br>Click “Save as” to save filtered results, “OK” to leave map.',
|
||||
@@ -67,10 +69,11 @@ export async function leaveFilter(next, addFilterId) {
|
||||
})
|
||||
if(result.isConfirmed) {
|
||||
await saveFilter(addFilterId)
|
||||
next();
|
||||
next(toPath);
|
||||
}
|
||||
else if(result.dismiss === 'cancel') {
|
||||
next();
|
||||
allMapDataStore.tempFilterId = null;
|
||||
next(toPath);
|
||||
}
|
||||
else if(result.dismiss === 'backdrop') {
|
||||
next(false);
|
||||
|
||||
Reference in new issue
Block a user