diff --git a/src/components/TransferInvoiceForm.vue b/src/components/TransferInvoiceForm.vue
index 1af23583d..0a8c1272e 100644
--- a/src/components/TransferInvoiceForm.vue
+++ b/src/components/TransferInvoiceForm.vue
@@ -70,14 +70,11 @@ const makeInvoice = async () => {
});
});
if (!response) {
- console.log('entra cuando no checkbox');
return;
}
}
- console.log('params: ', params);
const { data } = await axios.post('InvoiceOuts/transferInvoice', params);
- console.log('data: ', data);
notify(t('Transferred invoice'), 'positive');
const id = data?.[0];
if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue
index 3c1a4c8a5..9eff3d322 100644
--- a/src/components/ui/VnFilterPanel.vue
+++ b/src/components/ui/VnFilterPanel.vue
@@ -7,8 +7,11 @@ import toDate from 'filters/toDate';
import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue';
const { t } = useI18n();
-const params = defineModel({ default: {}, required: true, type: Object });
const $props = defineProps({
+ modelValue: {
+ type: Object,
+ default: () => {}
+ },
dataKey: {
type: String,
required: true,
@@ -64,9 +67,10 @@ const arrayData = useArrayData($props.dataKey, {
});
const route = useRoute();
const store = arrayData.store;
-
+const userParams = ref({})
onMounted(() => {
- emit('init', { params: params.value });
+ userParams.value = $props.modelValue ?? {}
+ emit('init', { params: userParams.value });
});
function setUserParams(watchedParams) {
@@ -75,7 +79,7 @@ function setUserParams(watchedParams) {
if (typeof watchedParams == 'string') watchedParams = JSON.parse(watchedParams);
watchedParams = { ...watchedParams, ...watchedParams.filter?.where };
delete watchedParams.filter;
- params.value = { ...params.value, ...watchedParams };
+ userParams.value = { ...userParams.value, ...watchedParams };
}
watch(
@@ -94,12 +98,12 @@ async function search(evt) {
store.filter.where = {};
isLoading.value = true;
- const filter = { ...params.value };
+ const filter = { ...userParams.value };
store.userParamsChanged = true;
store.filter.skip = 0;
store.skip = 0;
- const { params: newParams } = await arrayData.addFilter({ params: params.value });
- params.value = newParams;
+ const { params: newParams } = await arrayData.addFilter({ params: userParams.value });
+ userParams.value = newParams;
if (!$props.showAll && !Object.values(filter).length) store.data = [];
@@ -109,7 +113,7 @@ async function search(evt) {
async function reload() {
isLoading.value = true;
- const params = Object.values(params.value).filter((param) => param);
+ const params = Object.values(userParams.value).filter((param) => param);
await arrayData.fetch({ append: false });
if (!$props.showAll && !params.length) store.data = [];
@@ -123,17 +127,17 @@ async function clearFilters() {
store.filter.skip = 0;
store.skip = 0;
// Filtrar los params no removibles
- const removableFilters = Object.keys(params.value).filter((param) =>
+ const removableFilters = Object.keys(userParams.value).filter((param) =>
$props.unremovableParams.includes(param)
);
const newParams = {};
// Conservar solo los params que no son removibles
for (const key of removableFilters) {
- newParams[key] = params.value[key];
+ newParams[key] = userParams.value[key];
}
- params.value = {};
- params.value = { ...newParams }; // Actualizar los params con los removibles
- await arrayData.applyFilter({ params: params.value });
+ userParams.value = {};
+ userParams.value = { ...newParams }; // Actualizar los params con los removibles
+ await arrayData.applyFilter({ params: userParams.value });
if (!$props.showAll) {
store.data = [];
@@ -145,8 +149,8 @@ async function clearFilters() {
const tagsList = computed(() => {
const tagList = [];
- for (const key of Object.keys(params.value)) {
- const value = params.value[key];
+ for (const key of Object.keys(userParams.value)) {
+ const value = userParams.value[key];
if (value == null || ($props.hiddenTags || []).includes(key)) continue;
tagList.push({ label: key, value });
}
@@ -161,7 +165,7 @@ const customTags = computed(() =>
);
async function remove(key) {
- params.value[key] = undefined;
+ userParams.value[key] = undefined;
search();
emit('remove', key);
}
@@ -236,7 +240,7 @@ function formatValue(value) {
-
+
diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js
index ff87842e8..f6f476f87 100644
--- a/src/composables/useArrayData.js
+++ b/src/composables/useArrayData.js
@@ -29,7 +29,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
const filter = params?.filter;
delete params.filter;
store.userParams = { ...params, ...store.userParams };
- store.userFilter = { ...JSON.parse(filter), ...store.userFilter };
+ store.userFilter = { ...JSON.parse(filter ?? '{}'), ...store.userFilter };
}
});
diff --git a/src/pages/Account/Role/Card/RoleDescriptor.vue b/src/pages/Account/Role/Card/RoleDescriptor.vue
index 89712b0b9..91d733714 100644
--- a/src/pages/Account/Role/Card/RoleDescriptor.vue
+++ b/src/pages/Account/Role/Card/RoleDescriptor.vue
@@ -15,6 +15,10 @@ const $props = defineProps({
required: false,
default: null,
},
+ summary: {
+ type: Object,
+ default: null,
+ },
});
const route = useRoute();
@@ -60,14 +64,14 @@ const removeRole = () => {
diff --git a/src/pages/Account/Role/Card/RoleDescriptorProxy.vue b/src/pages/Account/Role/Card/RoleDescriptorProxy.vue
new file mode 100644
index 000000000..9714a3ae6
--- /dev/null
+++ b/src/pages/Account/Role/Card/RoleDescriptorProxy.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
diff --git a/src/pages/Account/Role/Card/RoleSummary.vue b/src/pages/Account/Role/Card/RoleSummary.vue
index d404fa2f0..76c72e947 100644
--- a/src/pages/Account/Role/Card/RoleSummary.vue
+++ b/src/pages/Account/Role/Card/RoleSummary.vue
@@ -30,6 +30,7 @@ const filter = {
:url="`VnRoles`"
:filter="filter"
@on-fetch="(data) => (role = data)"
+ data-key="RoleSummary"
>
{{ role.id }} - {{ role.name }}
diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue
index fd5300122..1c6ccfa5a 100644
--- a/src/pages/Order/Card/OrderCatalogFilter.vue
+++ b/src/pages/Order/Card/OrderCatalogFilter.vue
@@ -156,22 +156,18 @@ const onOrderFieldChange = (value, params) => {
case 'Relevancy':
tagObj.field = value + ' DESC, name';
params.orderBy = JSON.stringify(tagObj);
- console.log('params: ', params);
break;
case 'ColorAndPrice':
tagObj.field = 'showOrder, price';
params.orderBy = JSON.stringify(tagObj);
- console.log('params: ', params);
break;
case 'Name':
tagObj.field = 'name';
params.orderBy = JSON.stringify(tagObj);
- console.log('params: ', params);
break;
case 'Price':
tagObj.field = 'price';
params.orderBy = JSON.stringify(tagObj);
- console.log('params: ', params);
break;
}
};
diff --git a/src/pages/Order/Card/OrderForm.vue b/src/pages/Order/Card/OrderForm.vue
index 20b29cd9c..98bcf4d3a 100644
--- a/src/pages/Order/Card/OrderForm.vue
+++ b/src/pages/Order/Card/OrderForm.vue
@@ -122,8 +122,6 @@ const orderFilter = {
const onClientChange = async (clientId) => {
try {
const { data } = await axios.get(`Clients/${clientId}`);
- console.log('info cliente: ', data);
-
await fetchAddressList(data.defaultAddressFk);
} catch (error) {
console.error('Error al cambiar el cliente:', error);
diff --git a/src/pages/Travel/ExtraCommunityFilter.vue b/src/pages/Travel/ExtraCommunityFilter.vue
index 7fe628180..78905ee5f 100644
--- a/src/pages/Travel/ExtraCommunityFilter.vue
+++ b/src/pages/Travel/ExtraCommunityFilter.vue
@@ -7,6 +7,7 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnInputDate from 'components/common/VnInputDate.vue';
+import axios from 'axios';
const { t } = useI18n();
const props = defineProps({
@@ -20,6 +21,7 @@ const warehousesOptions = ref([]);
const continentsOptions = ref([]);
const agenciesOptions = ref([]);
const suppliersOptions = ref([]);
+const warehousesByContinent = ref({});
const add = (paramsObj, key) => {
if (paramsObj[key] === undefined) {
@@ -34,6 +36,28 @@ const decrement = (paramsObj, key) => {
paramsObj[key]--;
};
+
+const warehouses = async () => {
+ const warehousesResponse = await axios.get('Warehouses');
+ const countriesResponse = await axios.get('Countries');
+ const continentsResponse = await axios.get('Continents');
+
+ const countryContinentMap = countriesResponse.data.reduce((acc, country) => {
+ acc[country.id] = country.continentFk;
+ return acc;
+ }, {});
+
+ continentsResponse.data.forEach((continent) => {
+ const countriesInContinent = Object.keys(countryContinentMap).filter(
+ (countryId) => countryContinentMap[countryId] === continent.id.toString()
+ );
+
+ warehousesByContinent.value[continent.code] = warehousesResponse.data.filter(
+ (warehouse) => countriesInContinent.includes(warehouse.countryFk.toString())
+ );
+ });
+};
+warehouses();
@@ -116,7 +140,6 @@ const decrement = (paramsObj, key) => {
{
/>
-
+
+
+
+
+
+
{
{
{
{
};
function setNotifications(data) {
- console.log('data: ', data);
active.value = new Map(data.active);
available.value = new Map(data.available);
}
diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue
index 319592fe9..d8bee4714 100644
--- a/src/pages/Worker/Card/WorkerSummary.vue
+++ b/src/pages/Worker/Card/WorkerSummary.vue
@@ -9,6 +9,7 @@ import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
import CardSummary from 'components/ui/CardSummary.vue';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
+import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue';
const route = useRoute();
const { t } = useI18n();
@@ -161,7 +162,14 @@ const filter = {
-
+
+
+
+ {{ worker.user.role.name }}
+
+
+
+
{{ t('worker.summary.sipExtension') }}