From 37244cdbc7a78f9b98fb9875747678b4a52fe790 Mon Sep 17 00:00:00 2001
From: alexm <alexm@verdnatura.es>
Date: Fri, 9 Aug 2024 14:55:49 +0200
Subject: [PATCH] feat(orderBasicData): add notes

---
 src/i18n/locale/en.yml                           |  1 +
 src/i18n/locale/es.yml                           |  1 +
 .../Card/{OrderForm.vue => OrderBasicData.vue}   | 16 +++++++++++-----
 src/router/modules/order.js                      |  2 +-
 4 files changed, 14 insertions(+), 6 deletions(-)
 rename src/pages/Order/Card/{OrderForm.vue => OrderBasicData.vue} (95%)

diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index 12680d0cb8f..e639b9fda34 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -93,6 +93,7 @@ globals:
     since: Since
     from: From
     to: To
+    notes: Notes
     pageTitles:
         logIn: Login
         summary: Summary
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 747a10d519a..2d7358d5e6c 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -93,6 +93,7 @@ globals:
     since: Desde
     from: Desde
     to: Hasta
+    notes: Notas
     pageTitles:
         logIn: Inicio de sesiĆ³n
         summary: Resumen
diff --git a/src/pages/Order/Card/OrderForm.vue b/src/pages/Order/Card/OrderBasicData.vue
similarity index 95%
rename from src/pages/Order/Card/OrderForm.vue
rename to src/pages/Order/Card/OrderBasicData.vue
index 74d0a8b7597..dfdb5ae48db 100644
--- a/src/pages/Order/Card/OrderForm.vue
+++ b/src/pages/Order/Card/OrderBasicData.vue
@@ -7,6 +7,7 @@ import { useState } from 'composables/useState';
 import FormModel from 'components/FormModel.vue';
 import VnRow from 'components/ui/VnRow.vue';
 import VnSelect from 'components/common/VnSelect.vue';
+import VnInput from 'components/common/VnInput.vue';
 import VnInputDate from 'components/common/VnInputDate.vue';
 import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
 
@@ -117,7 +118,6 @@ const onClientChange = async (clientId) => {
             :url="`Orders/${route.params.id}`"
             :url-update="`Orders/${route.params.id}/updateBasicData`"
             :model="ORDER_MODEL"
-            :mapper="orderMapper"
             :filter="orderFilter"
             @on-fetch="fetchOrderDetails"
             auto-load
@@ -178,8 +178,6 @@ const onClientChange = async (clientId) => {
                             () => fetchAgencyList(data.landed, data.addressFk)
                         "
                     />
-                </VnRow>
-                <VnRow>
                     <VnSelect
                         :label="t('order.form.agencyModeFk')"
                         v-model="data.agencyModeFk"
@@ -200,8 +198,16 @@ const onClientChange = async (clientId) => {
                                 ? data.agencyModeFk
                                 : null
                         "
-                    >
-                    </VnSelect>
+                    />
+                </VnRow>
+                <VnRow>
+                    <VnInput
+                        :label="t('globals.notes')"
+                        type="textarea"
+                        v-model="data.note"
+                        fill-input
+                        autogrow
+                    />
                 </VnRow>
             </template>
         </FormModel>
diff --git a/src/router/modules/order.js b/src/router/modules/order.js
index 9cac802c243..9ccdb820b88 100644
--- a/src/router/modules/order.js
+++ b/src/router/modules/order.js
@@ -63,7 +63,7 @@ export default {
                         title: 'basicData',
                         icon: 'vn:settings',
                     },
-                    component: () => import('src/pages/Order/Card/OrderForm.vue'),
+                    component: () => import('src/pages/Order/Card/OrderBasicData.vue'),
                 },
                 {
                     name: 'OrderCatalog',