0
0
Fork 0
This commit is contained in:
Javier Segarra 2024-09-02 09:56:52 +02:00
parent fb15e90f0b
commit cfa5b84f4e
1 changed files with 9 additions and 9 deletions

View File

@ -23,16 +23,16 @@ import { useRoute } from 'vue-router';
const route = useRoute(); const route = useRoute();
const itemTypeWorkersOptions = ref([]); const itemTypeWorkersOptions = ref([]);
const sanitizeParam = (param) => { // const sanitizeParam = (param) => {
const params = JSON.parse(route?.query?.table); // const params = JSON.parse(route?.query?.table);
return params[param] ?? 'false'; // return params[param] ?? 'false';
}; // };
const $params = ref({}); const $params = ref({});
onMounted(() => { // onMounted(() => {
['mine', 'hasMinPrice', 'showBadDates'].forEach( // ['mine', 'hasMinPrice', 'showBadDates'].forEach(
(tag) => ($params.value[tag] = sanitizeParam(tag)) // (tag) => ($params.value[tag] = sanitizeParam(tag))
); // );
}); // });
const pushParam = (param) => ({ const pushParam = (param) => ({
param: { [param]: $params.value[param] }, param: { [param]: $params.value[param] },
}); });