diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index e1ec62175..84a79404f 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -799,6 +799,7 @@ travel:
destination: Destination
thermograph: Thermograph
travelFileDescription: 'Travel id { travelId }'
+ carrier: Carrier
item:
descriptor:
buyer: Buyer
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 4b4f6f552..01396e9ce 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -795,6 +795,7 @@ travel:
destination: Destino
thermograph: Termógrafo
travelFileDescription: 'Id envío { travelId }'
+ carrier: Transportista
item:
descriptor:
buyer: Comprador
diff --git a/src/pages/Travel/Card/TravelSummary.vue b/src/pages/Travel/Card/TravelSummary.vue
index 9deb22808..9a0a66f57 100644
--- a/src/pages/Travel/Card/TravelSummary.vue
+++ b/src/pages/Travel/Card/TravelSummary.vue
@@ -122,6 +122,12 @@ const thermographsTableColumns = computed(() => {
name: 'temperatureFk',
align: 'left',
},
+ {
+ label: t('travel.thermographs.carrier'),
+ field: (row) => row.agencyMode?.name,
+ name: 'agencyModeFk',
+ align: 'left',
+ },
{
label: t('globals.maxTemperature'),
field: 'maxTemperature',
@@ -200,17 +206,25 @@ const getTravelEntries = async (id) => {
const getTravelThermographs = async (id) => {
const filter = {
- include: {
- relation: 'warehouse',
- scope: {
- fields: ['id', 'name'],
+ include: [
+ {
+ relation: 'agencyMode',
+ scope: {
+ fields: ['id', 'name'],
+ },
},
- },
+ {
+ relation: 'warehouse',
+ scope: {
+ fields: ['id', 'name'],
+ },
+ },
+ ],
where: { travelFk: id },
};
const { data } = await axios.get('TravelThermographs', {
- params: { filter: JSON.parse(JSON.stringify(filter)) },
+ params: { filter },
});
thermographs.value = data;
};
diff --git a/src/pages/Travel/Card/TravelThermographs.vue b/src/pages/Travel/Card/TravelThermographs.vue
index 2bf3293a6..b78c93334 100644
--- a/src/pages/Travel/Card/TravelThermographs.vue
+++ b/src/pages/Travel/Card/TravelThermographs.vue
@@ -1,5 +1,5 @@
diff --git a/src/pages/Travel/Card/TravelThermographsForm.vue b/src/pages/Travel/Card/TravelThermographsForm.vue
index 9788c9a99..5955ac9f9 100644
--- a/src/pages/Travel/Card/TravelThermographsForm.vue
+++ b/src/pages/Travel/Card/TravelThermographsForm.vue
@@ -39,6 +39,7 @@ const warehousesOptions = ref([]);
const temperaturesOptions = ref([]);
const thermographForm = ref({});
const inputFileRef = ref(null);
+const agencyModeOptions = ref([]);
onBeforeMount(async () => {
if (props.viewAction === 'create') {
@@ -49,8 +50,8 @@ onBeforeMount(async () => {
if (route.query.thermographData) {
const thermographData = JSON.parse(route.query.thermographData);
- for (let key in thermographForm) {
- thermographForm[key] = thermographData[key];
+ for (let key in thermographForm.value) {
+ thermographForm.value[key] = thermographData[key];
}
}
});
@@ -72,6 +73,7 @@ const setCreateDefaultParams = async () => {
thermographForm.value.reference = route.params.id;
thermographForm.value.dmsTypeId = dataResponse.id;
thermographForm.value.state = 'Ok';
+ thermographForm.value.agencyModeFk = +route.query.agencyModeFk;
thermographForm.value.description = t('travel.thermographs.travelFileDescription', {
travelId: route.params.id,
}).toUpperCase();
@@ -98,6 +100,7 @@ const setEditDefaultParams = async () => {
thermographForm.value.minTemperature = data.minTemperature;
thermographForm.value.temperatureFk = data.temperatureFk;
thermographForm.value.travelThermographFk = data.id;
+ thermographForm.value.agencyModeFk = data.agencyModeFk;
}
};
@@ -159,6 +162,12 @@ const onThermographCreated = async (data) => {
auto-load
url="Temperatures"
/>
+ (agencyModeOptions = data)"
+ auto-load
+ url="AgencyModeIncomings"
+ />
+
{
/>
+
+
+
+
{
option-value="id"
option-label="name"
/>
-
-
{
option-value="id"
option-label="code"
/>
+
+
{
option-value="id"
option-label="name"
/>
-
-
{
v-model="thermographForm.temperatureFk"
:required="true"
/>
+
+