diff --git a/src/assets/main.css b/src/assets/main.css
index 2ed5f38..1d9bec4 100644
--- a/src/assets/main.css
+++ b/src/assets/main.css
@@ -67,6 +67,12 @@ body {
transition: background-color 300ms ease;
}
+.error-msg {
+ color: red;
+ font-size: 12px;
+ font-weight: 300;
+}
+
.btn-primary-sm {
background-color: #FBBA33;
padding: 8px 16px;
diff --git a/src/components/CardBudget.vue b/src/components/CardBudget.vue
index ca680e6..ae796ba 100644
--- a/src/components/CardBudget.vue
+++ b/src/components/CardBudget.vue
@@ -1,5 +1,6 @@
+
+
+
+
+
Nombre de la locación de carga: {{location.branch_name}}
+
Dirección: {{location.address}}, {{location.city}}, {{location.state}}
+
Teléfono: {{location.phone}}
+
Tipos de camiones que se necesitan: {{location.truck_type?.map((e) => e).join(', ')}}
+
Segmento: {{location.categories.map((e) => e.name).join(', ')}}
+
Información adicional de la locación de carga:
+
+ {{ location.description }}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/CreateLocationModal.vue b/src/components/CreateLocationModal.vue
new file mode 100644
index 0000000..18a3bc5
--- /dev/null
+++ b/src/components/CreateLocationModal.vue
@@ -0,0 +1,249 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/FormLoadModal.vue b/src/components/FormLoadModal.vue
index 1289d8e..5112474 100644
--- a/src/components/FormLoadModal.vue
+++ b/src/components/FormLoadModal.vue
@@ -13,10 +13,12 @@
import { useAuthStore } from '../stores/auth';
import Swal from 'sweetalert2';
import { useNotificationsStore } from '../stores/notifications';
+ import { useCompanyStore } from '../stores/company';
const loadStore = useLoadsStore();
const notyStore = useNotificationsStore();
const auth = useAuthStore();
+ const companyStore = useCompanyStore()
const windowWidth = ref(window.innerWidth);
const zoom = ref(6);
const heightMap = ref(768);
@@ -25,9 +27,16 @@
const startLocation = ref(null);
const endLocation = ref(null);
const isLoading = ref(false);
+ const loadingLocations = ref(false);
const submited = ref(false);
const { geocodeAddress } = useDirectionsRender();
const formRef = ref(null);
+ const filterQueryVehicles = ref([]);
+ const checkLocationLoad = ref(false);
+ const checkLocationDownload = ref(false);
+ const locationLoadSelected = ref(null)
+ const locationDownloadSelected = ref(null)
+
const errors = ref({
segment: null,
product: null,
@@ -62,6 +71,9 @@
zoom.value = 4;
heightMap.value = 420;
}
+ if(companyStore.locations.length <= 0) {
+ getLocations();
+ }
formLoad.owner = auth.user?.first_name + ' ' + auth.user?.last_name;
//origin_formatted_address
if(loadStore.currentLoad){
@@ -117,6 +129,13 @@
})
})
+ const getLocations = async() => {
+ loadingLocations.value = true;
+ filterQueryVehicles.value.company = "company="+ localStorage.getItem('id');
+ await companyStore.getLocationsCompany(filterQueryVehicles.value, false)
+ loadingLocations.value = false;
+ }
+
const getCoordsMap = async() => {
if(loadStore.currentLoad.origin_formatted_address) {
originCoords.value = await geocodeAddress(loadStore.currentLoad.origin_formatted_address);
@@ -397,6 +416,25 @@