diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js
index c7808f9a8..4535cde0f 100644
--- a/src/composables/useArrayData.js
+++ b/src/composables/useArrayData.js
@@ -38,11 +38,11 @@ export function useArrayData(key, userOptions) {
'limit',
'skip',
'userParams',
- 'userFilter'
+ 'userFilter',
];
if (typeof userOptions === 'object') {
for (const option in userOptions) {
- const isEmpty = userOptions[option] == null || userOptions[option] == ''
+ const isEmpty = userOptions[option] == null || userOptions[option] == '';
if (isEmpty || !allowedOptions.includes(option)) continue;
if (Object.prototype.hasOwnProperty.call(store, option)) {
@@ -73,7 +73,7 @@ export function useArrayData(key, userOptions) {
Object.assign(params, store.userParams);
- store.isLoading = true
+ store.isLoading = true;
const response = await axios.get(store.url, {
signal: canceller.signal,
params,
@@ -94,7 +94,7 @@ export function useArrayData(key, userOptions) {
updateStateParams();
}
- store.isLoading = false
+ store.isLoading = false;
canceller = null;
}
@@ -153,8 +153,8 @@ export function useArrayData(key, userOptions) {
});
}
- const totalRows = computed(() => store.data && store.data.length || 0);
- const isLoading = computed(() => store.isLoading || false)
+ const totalRows = computed(() => (store.data && store.data.length) || 0);
+ const isLoading = computed(() => store.isLoading || false);
return {
fetch,
@@ -167,6 +167,6 @@ export function useArrayData(key, userOptions) {
hasMoreData,
totalRows,
updateStateParams,
- isLoading
+ isLoading,
};
}
diff --git a/src/composables/useValidator.js b/src/composables/useValidator.js
index 3f9f00367..577cfa0bf 100644
--- a/src/composables/useValidator.js
+++ b/src/composables/useValidator.js
@@ -68,6 +68,9 @@ export function useValidator() {
return {
validate,
+<<<<<<< HEAD
models,
+=======
+>>>>>>> 11305fc4c8efea147bc6ee9ff25e59e805b62e41
};
}
diff --git a/src/css/app.scss b/src/css/app.scss
index b9ad4742c..0f04c9ad8 100644
--- a/src/css/app.scss
+++ b/src/css/app.scss
@@ -32,12 +32,16 @@ body.body--light {
--vn-text: #000000;
--vn-gray: #f5f5f5;
--vn-label: #5f5f5f;
- --vn-header: #e9e9e9;
+ --vn-dark: white;
}
body.body--dark {
--vn-text: #ffffff;
--vn-gray: #313131;
--vn-label: #a8a8a8;
- --vn-header: #212121;
+ --vn-dark: #292929;
+}
+
+.bg-vn-dark {
+ background-color: var(--vn-dark);
}
diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js
index bbc28cc6d..eae06dbf0 100644
--- a/src/i18n/en/index.js
+++ b/src/i18n/en/index.js
@@ -275,6 +275,7 @@ export default {
lines: 'Lines',
rma: 'RMA',
photos: 'Photos',
+ development: 'Development',
log: 'Audit logs',
notes: 'Notes',
},
diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js
index abf406e20..dc1ace47e 100644
--- a/src/i18n/es/index.js
+++ b/src/i18n/es/index.js
@@ -273,6 +273,7 @@ export default {
basicData: 'Datos básicos',
lines: 'Líneas',
rma: 'RMA',
+ development: 'Trazabilidad',
photos: 'Fotos',
log: 'Registros de auditoría',
notes: 'Notas',
diff --git a/src/pages/Claim/Card/ClaimCard.vue b/src/pages/Claim/Card/ClaimCard.vue
index 9f1ecc416..03b9889f0 100644
--- a/src/pages/Claim/Card/ClaimCard.vue
+++ b/src/pages/Claim/Card/ClaimCard.vue
@@ -44,17 +44,6 @@ onMounted(async () => {
-
-
-
-
- {{ t('Development') }}
-
{
-
-
+
+
+
+
+
+
+
@@ -80,6 +74,5 @@ es:
You can search by claim id or customer name: Puedes buscar por id de la reclamación o nombre del cliente
Details: Detalles
Notes: Notas
- Development: Trazabilidad
Action: Acción
diff --git a/src/pages/Claim/Card/ClaimDescriptor.vue b/src/pages/Claim/Card/ClaimDescriptor.vue
index f03a1d8a2..6933458b9 100644
--- a/src/pages/Claim/Card/ClaimDescriptor.vue
+++ b/src/pages/Claim/Card/ClaimDescriptor.vue
@@ -3,6 +3,8 @@ import { ref, computed } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { toDate } from 'src/filters';
+import { useState } from 'src/composables/useState';
+
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
@@ -19,6 +21,7 @@ const $props = defineProps({
});
const route = useRoute();
+const state = useState();
const { t } = useI18n();
const entityId = computed(() => {
@@ -67,6 +70,7 @@ function stateColor(code) {
const data = ref(useCardDescription());
const setData = (entity) => {
data.value = useCardDescription(entity.client.name, entity.id);
+ state.set('ClaimDescriptor', entity);
};
diff --git a/src/pages/Claim/Card/ClaimDevelopment.vue b/src/pages/Claim/Card/ClaimDevelopment.vue
new file mode 100644
index 000000000..ea4b178b5
--- /dev/null
+++ b/src/pages/Claim/Card/ClaimDevelopment.vue
@@ -0,0 +1,203 @@
+
+
+ (claimReasons = data)"
+ auto-load
+ />
+ (claimResults = data)"
+ auto-load
+ />
+ (claimResponsibles = data)"
+ auto-load
+ />
+ (claimRedeliveries = data)"
+ auto-load
+ />
+ (workers = data)"
+ auto-load
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ Reason: Motivo
+ Result: Consecuencia
+ Responsible: Responsable
+ Worker: Trabajador
+ Redelivery: Devolución
+
diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue
index 9d2a12804..8680ff922 100644
--- a/src/pages/Claim/Card/ClaimLines.vue
+++ b/src/pages/Claim/Card/ClaimLines.vue
@@ -6,9 +6,8 @@ import { useQuasar } from 'quasar';
import { useRoute } from 'vue-router';
import { useArrayData } from 'composables/useArrayData';
import { useStateStore } from 'stores/useStateStore';
-import VnPaginate from 'components/ui/VnPaginate.vue';
+import CrudModel from 'components/CrudModel.vue';
import FetchData from 'components/FetchData.vue';
-import VnConfirm from 'components/ui/VnConfirm.vue';
import { toDate, toCurrency, toPercentage } from 'filters/index';
import VnDiscount from 'components/common/vnDiscount.vue';
@@ -17,6 +16,7 @@ import ClaimLinesImport from './ClaimLinesImport.vue';
const quasar = useQuasar();
const route = useRoute();
const { t } = useI18n();
+
const stateStore = useStateStore();
const arrayData = useArrayData('ClaimLines');
const store = arrayData.store;
@@ -36,6 +36,7 @@ const linesFilter = {
},
};
+const claimLinesForm = ref();
const claim = ref(null);
async function onFetchClaim(data) {
claim.value = data;
@@ -46,6 +47,7 @@ async function onFetchClaim(data) {
const amount = ref(0);
const amountClaimed = ref(0);
async function onFetch(rows) {
+ if (!rows || rows.length) return;
amount.value = rows.reduce(
(acumulator, { sale }) => acumulator + sale.price * sale.quantity,
0
@@ -141,47 +143,6 @@ function onUpdateDiscount(response) {
});
}
-async function confirmRemove() {
- const rows = selected.value;
- const count = rows.length;
-
- if (count === 0) {
- return quasar.notify({
- message: 'You must select at least one row',
- type: 'warning',
- });
- }
-
- quasar
- .dialog({
- component: VnConfirm,
- componentProps: {
- title: t('Delete claimed sales'),
- message: t('You are about to remove {count} rows', count, { count }),
- data: { rows },
- promise: remove,
- },
- })
- .onOk(() => {
- for (const row of rows) {
- const orgData = store.data;
- const index = orgData.findIndex((item) => item.id === row.id);
- store.data.splice(index, 1);
- selected.value = [];
- }
- });
-}
-
-async function remove({ rows }) {
- if (!rows.length) return;
- const body = { deletes: rows.map((row) => row.id) };
- await axios.post(`ClaimBeginnings/crud`, body);
- quasar.notify({
- type: 'positive',
- message: t('globals.rowRemoved'),
- });
-}
-
function showImportDialog() {
quasar
.dialog({
@@ -191,10 +152,8 @@ function showImportDialog() {
}
-
+
- {{ t('Claimed lines') }}
-
{{ t('Amount') }}
@@ -211,7 +170,7 @@ function showImportDialog() {
-
+
-
@@ -361,46 +325,12 @@ function showImportDialog() {
-
+
-
-
-
- {{ t('globals.remove') }}
-
-
- {{ t('globals.add') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -421,7 +351,6 @@ en:
You are about to remove {count} row |
You are about to remove {count} rows'
es:
- Claimed lines: Líneas reclamadas
Delivered: Entregado
Quantity: Cantidad
Claimed: Reclamada
diff --git a/src/pages/Claim/Card/ClaimNotes.vue b/src/pages/Claim/Card/ClaimNotes.vue
index 94b53c8a2..84d350e38 100644
--- a/src/pages/Claim/Card/ClaimNotes.vue
+++ b/src/pages/Claim/Card/ClaimNotes.vue
@@ -25,7 +25,7 @@ const body = {
};
-
+
-
-
-
-
-
-
-
-
-
-
-
-
- {{ t('globals.add') }}
-
-
-
+
+
diff --git a/src/pages/Claim/Card/ClaimRma.vue b/src/pages/Claim/Card/ClaimRma.vue
index c59c11845..bba901d7b 100644
--- a/src/pages/Claim/Card/ClaimRma.vue
+++ b/src/pages/Claim/Card/ClaimRma.vue
@@ -1,48 +1,34 @@
-
-
+
-
+
@@ -107,7 +88,7 @@ async function remove({ id }) {
{{ t('claim.rma.user') }}
- {{ row.worker.user.name }}
+ {{ row?.worker?.user?.name }}
@@ -133,7 +114,7 @@ async function remove({ id }) {
round
color="orange"
icon="vn:bin"
- @click="confirmRemove(row.id)"
+ @click="claimRmaRef.remove([row])"
>
{{ t('globals.remove') }}
@@ -143,33 +124,11 @@ async function remove({ id }) {
-
+
-
-
-
-
- {{ t('globals.add') }}
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -178,16 +137,6 @@ async function remove({ id }) {
width: 100%;
max-width: 60em;
}
-.q-toolbar {
- background-color: $grey-9;
-}
-.sticky-page {
- padding-top: 66px;
-}
-
-.q-page-sticky {
- z-index: 2998;
-}
diff --git a/src/pages/Customer/Card/CustomerCard.vue b/src/pages/Customer/Card/CustomerCard.vue
index 3a1c28d18..c833d0cf9 100644
--- a/src/pages/Customer/Card/CustomerCard.vue
+++ b/src/pages/Customer/Card/CustomerCard.vue
@@ -1,11 +1,13 @@
@@ -25,8 +27,13 @@ const { t } = useI18n();
-
-
+
+
+
+
+
+
+
diff --git a/src/pages/InvoiceOut/Card/InvoiceOutCard.vue b/src/pages/InvoiceOut/Card/InvoiceOutCard.vue
index 5cbe72396..d24eb3ef2 100644
--- a/src/pages/InvoiceOut/Card/InvoiceOutCard.vue
+++ b/src/pages/InvoiceOut/Card/InvoiceOutCard.vue
@@ -25,8 +25,13 @@ const { t } = useI18n();
-
-
+
+
+
+
+
+
+
diff --git a/src/pages/Ticket/Card/TicketCard.vue b/src/pages/Ticket/Card/TicketCard.vue
index e0ad5054d..91921f827 100644
--- a/src/pages/Ticket/Card/TicketCard.vue
+++ b/src/pages/Ticket/Card/TicketCard.vue
@@ -25,8 +25,13 @@ const { t } = useI18n();
-
-
+
+
+
+
+
+
+
diff --git a/src/pages/Wagon/WagonCreate.vue b/src/pages/Wagon/WagonCreate.vue
index 3f7824975..123e01d36 100644
--- a/src/pages/Wagon/WagonCreate.vue
+++ b/src/pages/Wagon/WagonCreate.vue
@@ -20,7 +20,7 @@ const $props = defineProps({
});
const entityId = computed(() => $props.id || route.params.id);
-let wagonTypes;
+let wagonTypes = [];
let originalData = {};
const wagon = ref({});
const filteredWagonTypes = ref(wagonTypes);
diff --git a/src/pages/Worker/Card/WorkerCard.vue b/src/pages/Worker/Card/WorkerCard.vue
index 3d6b46e11..972eb52ec 100644
--- a/src/pages/Worker/Card/WorkerCard.vue
+++ b/src/pages/Worker/Card/WorkerCard.vue
@@ -25,8 +25,13 @@ const { t } = useI18n();
-
-
+
+
+
+
+
+
+
diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue
index 05ccdc373..7c8accc5d 100644
--- a/src/pages/Worker/Card/WorkerSummary.vue
+++ b/src/pages/Worker/Card/WorkerSummary.vue
@@ -1,6 +1,5 @@