diff --git a/src/pages/Shelving/Card/ShelvingSearchbar.vue b/src/pages/Shelving/Card/ShelvingSearchbar.vue
index 89a4de01e..bfc8ad4f5 100644
--- a/src/pages/Shelving/Card/ShelvingSearchbar.vue
+++ b/src/pages/Shelving/Card/ShelvingSearchbar.vue
@@ -7,12 +7,12 @@ const { t } = useI18n();
-
es:
Search shelving: Buscar carros
diff --git a/src/pages/Shelving/Card/ShelvingSummary.vue b/src/pages/Shelving/Card/ShelvingSummary.vue
index f1f914385..409329c88 100644
--- a/src/pages/Shelving/Card/ShelvingSummary.vue
+++ b/src/pages/Shelving/Card/ShelvingSummary.vue
@@ -6,6 +6,7 @@ import { useStateStore } from 'stores/useStateStore';
import CardSummary from 'components/ui/CardSummary.vue';
import VnLv from 'components/ui/VnLv.vue';
import ShelvingFilter from 'pages/Shelving/Card/ShelvingFilter.vue';
+import VnUserLink from "components/ui/VnUserLink.vue";
const $props = defineProps({
id: {
@@ -24,7 +25,7 @@ const hideRightDrawer = () => {
if (!isDialog) {
stateStore.rightDrawer = false;
}
-}
+};
onMounted(hideRightDrawer);
onUnmounted(hideRightDrawer);
const filter = {
@@ -69,9 +70,13 @@ const filter = {
-
+
+
-
+
+
+
+
+
-import { useDialogPluginComponent } from 'quasar';
-import ShelvingSummary from "pages/Shelving/Card/ShelvingSummary.vue";
-
-const $props = defineProps({
- id: {
- type: Number,
- required: true,
- },
-});
-
-defineEmits([...useDialogPluginComponent.emits]);
-
-const { dialogRef, onDialogHide } = useDialogPluginComponent();
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/Shelving/ShelvingList.vue b/src/pages/Shelving/ShelvingList.vue
index c884dc5f4..a5a24e84d 100644
--- a/src/pages/Shelving/ShelvingList.vue
+++ b/src/pages/Shelving/ShelvingList.vue
@@ -5,16 +5,16 @@ import { useI18n } from 'vue-i18n';
import { onMounted, onUnmounted } from 'vue';
import CardList from 'components/ui/CardList.vue';
import VnLv from 'components/ui/VnLv.vue';
-import { useQuasar } from 'quasar';
import { useRouter } from 'vue-router';
import ShelvingFilter from 'pages/Shelving/Card/ShelvingFilter.vue';
-import ShelvingSummaryDialog from 'pages/Shelving/Card/ShelvingSummaryDialog.vue';
+import ShelvingSummary from 'pages/Shelving/Card/ShelvingSummary.vue';
import ShelvingSearchbar from 'pages/Shelving/Card/ShelvingSearchbar.vue';
+import { useSummaryDialog } from 'src/composables/useSummaryDialog';
const stateStore = useStateStore();
const router = useRouter();
-const quasar = useQuasar();
const { t } = useI18n();
+const { viewSummary } = useSummaryDialog();
const filter = {
include: [{ relation: 'parking' }],
};
@@ -26,15 +26,6 @@ function navigate(id) {
router.push({ path: `/shelving/${id}` });
}
-function viewSummary(id) {
- quasar.dialog({
- component: ShelvingSummaryDialog,
- componentProps: {
- id,
- },
- });
-}
-
function exprBuilder(param, value) {
switch (param) {
case 'search':
@@ -80,6 +71,7 @@ function exprBuilder(param, value) {
url="Shelvings"
:filter="filter"
:expr-builder="exprBuilder"
+ :limit="20"
auto-load
>
@@ -102,17 +94,10 @@ function exprBuilder(param, value) {
/>
-
diff --git a/src/pages/Supplier/Card/SupplierSummaryDialog.vue b/src/pages/Supplier/Card/SupplierSummaryDialog.vue
deleted file mode 100644
index 6353caa38..000000000
--- a/src/pages/Supplier/Card/SupplierSummaryDialog.vue
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue
index f4875fc99..e8668fa08 100644
--- a/src/pages/Supplier/SupplierList.vue
+++ b/src/pages/Supplier/SupplierList.vue
@@ -1,21 +1,19 @@
@@ -86,7 +75,7 @@ const viewSummary = (id) => {
diff --git a/src/pages/Ticket/Card/TicketSummaryDialog.vue b/src/pages/Ticket/Card/TicketSummaryDialog.vue
deleted file mode 100644
index 11e12c8a9..000000000
--- a/src/pages/Ticket/Card/TicketSummaryDialog.vue
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index 6f57ad0b9..72c2da57c 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -1,21 +1,21 @@
@@ -123,7 +114,7 @@ function viewSummary(id) {
diff --git a/src/pages/Travel/Card/TravelSummary.vue b/src/pages/Travel/Card/TravelSummary.vue
index cf9a9ada0..2ed6a0487 100644
--- a/src/pages/Travel/Card/TravelSummary.vue
+++ b/src/pages/Travel/Card/TravelSummary.vue
@@ -1,5 +1,5 @@
-
-
-
-
-
-
-
-
diff --git a/src/pages/Travel/Card/TravelThermographs.vue b/src/pages/Travel/Card/TravelThermographs.vue
index a0bdf9c41..435d9054f 100644
--- a/src/pages/Travel/Card/TravelThermographs.vue
+++ b/src/pages/Travel/Card/TravelThermographs.vue
@@ -94,7 +94,6 @@ const openRemoveDialog = async (id) => {
.onOk(async () => {
try {
await removeThermograph(id);
- notify(t('Thermograph removed'), 'positive');
} catch (err) {
console.error('Error removing thermograph');
}
@@ -118,6 +117,7 @@ const removeThermograph = async (id) => {
try {
await axios.delete(`Travels/deleteThermograph?id=${id}`);
await thermographPaginateRef.value.fetch();
+ notify(t('Thermograph removed'), 'positive');
} catch (err) {
console.error('Error removing termograph');
}
@@ -169,7 +169,7 @@ const removeThermograph = async (id) => {
color="primary"
size="sm"
class="cursor-pointer"
- @click="redirectToThermographForm('edit', row)"
+ @click="redirectToThermographForm('edit', row.id)"
>
{{ t('Edit file') }}
@@ -198,7 +198,7 @@ const removeThermograph = async (id) => {
color="primary"
@click="redirectToThermographForm('create')"
/>
-
+
{{ t('Add thermograph') }}
diff --git a/src/pages/Travel/Card/TravelThermographsForm.vue b/src/pages/Travel/Card/TravelThermographsForm.vue
index ea407ec69..6758cb6ff 100644
--- a/src/pages/Travel/Card/TravelThermographsForm.vue
+++ b/src/pages/Travel/Card/TravelThermographsForm.vue
@@ -5,8 +5,10 @@ import { useRoute, useRouter } from 'vue-router';
import FetchData from 'components/FetchData.vue';
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
+import VnSelectDialog from 'components/common/VnSelectDialog.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
+import CreateThermographForm from 'src/components/CreateThermographForm.vue';
import { useState } from 'src/composables/useState';
import { useStateStore } from 'stores/useStateStore';
@@ -34,12 +36,14 @@ const thermographFilter = {
},
order: 'thermographFk ASC',
};
+const fetchTravelThermographsRef = ref(null);
+const allowedContentTypes = ref('');
const user = state.getUser();
-const allowedFileTypes = ref(null);
const thermographsOptions = ref([]);
const dmsTypesOptions = ref([]);
const companiesOptions = ref([]);
const warehousesOptions = ref([]);
+const inputFileRef = ref(null);
const thermographForm = reactive({
thermographId: null,
@@ -53,8 +57,6 @@ const thermographForm = reactive({
});
onBeforeMount(async () => {
- await getAllowedFileTypes();
-
if (props.viewAction === 'create') {
setCreateDefaultParams();
} else {
@@ -69,16 +71,6 @@ onBeforeMount(async () => {
}
});
-const getAllowedFileTypes = async () => {
- try {
- const { data } = await axios.get('DmsContainers/allowedContentTypes');
- const contentTypes = data.join(', ');
- allowedFileTypes.value = contentTypes;
- } catch (err) {
- console.error('Error fetching allowed content types');
- }
-};
-
const fetchDmsTypes = async () => {
try {
const params = {
@@ -174,10 +166,21 @@ const updateThermograph = async () => {
console.error('Error creating thermograph');
}
};
+
+const onThermographCreated = async (data) => {
+ await fetchTravelThermographsRef.value.fetch();
+ thermographForm.thermographId = data.thermographId;
+};
(allowedContentTypes = data.join(', '))"
+ auto-load
+ />
+ (thermographsOptions = data)"
:filter="thermographFilter"
@@ -234,14 +237,21 @@ const updateThermograph = async () => {
-
+ :tooltip="t('New thermograph')"
+ >
+
+
+
+
{
-
+
{{ t('Select files') }}
+
+ {{
+ t('globals.allowedFilesText', {
+ allowedContentTypes: allowedContentTypes,
+ })
+ }}
+
@@ -322,4 +344,5 @@ const updateThermograph = async () => {
es:
Select files: Selecciona ficheros
Thermograph created: Termógrafo creado
+ New thermograph: Nuevo termógrafo
diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue
index 1232f8476..edcfbac52 100644
--- a/src/pages/Travel/TravelList.vue
+++ b/src/pages/Travel/TravelList.vue
@@ -2,22 +2,21 @@
import { onMounted, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
-import { useQuasar } from 'quasar';
-
import VnPaginate from 'src/components/ui/VnPaginate.vue';
import CardList from 'src/components/ui/CardList.vue';
import VnLv from 'src/components/ui/VnLv.vue';
-import TravelSummaryDialog from './Card/TravelSummaryDialog.vue';
+import TravelSummary from './Card/TravelSummary.vue';
import TravelFilter from './TravelFilter.vue';
import FetchData from 'components/FetchData.vue';
import { useStateStore } from 'stores/useStateStore';
import { toDate } from 'src/filters/index';
+import { useSummaryDialog } from 'src/composables/useSummaryDialog';
const router = useRouter();
-const quasar = useQuasar();
const { t } = useI18n();
const stateStore = useStateStore();
+const { viewSummary } = useSummaryDialog();
const warehouses = ref([]);
@@ -42,15 +41,6 @@ const getWarehouseName = (id) => {
return warehouses.value.find((warehouse) => warehouse.id === id).name;
};
-const viewSummary = (id) => {
- quasar.dialog({
- component: TravelSummaryDialog,
- componentProps: {
- id,
- },
- });
-};
-
const getDateQBadgeColor = (date) => {
let today = Date.vnNew();
today.setHours(0, 0, 0, 0);
@@ -161,7 +151,7 @@ onMounted(async () => {
/>
diff --git a/src/pages/Worker/Card/WorkerDescriptorProxy.vue b/src/pages/Worker/Card/WorkerDescriptorProxy.vue
index 98b06ad6e..a142570f9 100644
--- a/src/pages/Worker/Card/WorkerDescriptorProxy.vue
+++ b/src/pages/Worker/Card/WorkerDescriptorProxy.vue
@@ -1,6 +1,6 @@