diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index 9a60e9da1..9e46c54e3 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -153,6 +153,7 @@ globals:
maxTemperature: Max
minTemperature: Min
changePass: Change password
+ setPass: Set password
deleteConfirmTitle: Delete selected elements
changeState: Change state
raid: 'Raid {daysInForward} days'
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 846c442ea..6e43e0882 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -157,6 +157,7 @@ globals:
maxTemperature: Máx
minTemperature: Mín
changePass: Cambiar contraseña
+ setPass: Establecer contraseña
deleteConfirmTitle: Eliminar los elementos seleccionados
changeState: Cambiar estado
raid: 'Redada {daysInForward} días'
diff --git a/src/pages/Account/Card/AccountDescriptorMenu.vue b/src/pages/Account/Card/AccountDescriptorMenu.vue
index 30584c61f..eafd62df6 100644
--- a/src/pages/Account/Card/AccountDescriptorMenu.vue
+++ b/src/pages/Account/Card/AccountDescriptorMenu.vue
@@ -25,12 +25,13 @@ const $props = defineProps({
const { t } = useI18n();
const { hasAccount } = toRefs($props);
const { openConfirmationModal } = useVnConfirm();
+const arrayData = useArrayData('Account');
const route = useRoute();
const router = useRouter();
const state = useState();
const user = state.getUser();
const { notify } = useQuasar();
-const account = computed(() => useArrayData('Account').store.data[0]);
+const account = computed(() => arrayData.store.data);
account.value.hasAccount = hasAccount.value;
const entityId = computed(() => +route.params.id);
const hasitManagementAccess = ref();
@@ -39,7 +40,7 @@ const isHimself = computed(() => user.value.id === account.value.id);
const url = computed(() =>
isHimself.value
? 'Accounts/change-password'
- : `Accounts/${entityId.value}/setPassword`
+ : `Accounts/${entityId.value}/setPassword`,
);
async function updateStatusAccount(active) {
@@ -153,6 +154,7 @@ onMounted(() => {
t('account.card.actions.disableAccount.title'),
t('account.card.actions.disableAccount.subtitle'),
() => deleteAccount(),
+ () => deleteAccount(),
)
"
>
@@ -172,6 +174,7 @@ onMounted(() => {
t('account.card.actions.enableAccount.title'),
t('account.card.actions.enableAccount.subtitle'),
() => updateStatusAccount(true),
+ () => updateStatusAccount(true),
)
"
>
@@ -186,6 +189,7 @@ onMounted(() => {
t('account.card.actions.disableAccount.title'),
t('account.card.actions.disableAccount.subtitle'),
() => updateStatusAccount(false),
+ () => updateStatusAccount(false),
)
"
>
@@ -201,6 +205,7 @@ onMounted(() => {
t('account.card.actions.activateUser.title'),
t('account.card.actions.activateUser.title'),
() => updateStatusUser(true),
+ () => updateStatusUser(true),
)
"
>
@@ -215,6 +220,7 @@ onMounted(() => {
t('account.card.actions.deactivateUser.title'),
t('account.card.actions.deactivateUser.title'),
() => updateStatusUser(false),
+ () => updateStatusUser(false),
)
"
>
diff --git a/src/pages/Claim/Card/ClaimAction.vue b/src/pages/Claim/Card/ClaimAction.vue
index 8ac7c224f..baa36710c 100644
--- a/src/pages/Claim/Card/ClaimAction.vue
+++ b/src/pages/Claim/Card/ClaimAction.vue
@@ -27,6 +27,7 @@ const claimActionsForm = ref();
const rows = ref([]);
const selectedRows = ref([]);
const destinationTypes = ref([]);
+const shelvings = ref([]);
const totalClaimed = ref(null);
const DEFAULT_MAX_RESPONSABILITY = 5;
const DEFAULT_MIN_RESPONSABILITY = 1;
@@ -56,6 +57,12 @@ const columns = computed(() => [
field: (row) => row.claimDestinationFk,
align: 'left',
},
+ {
+ name: 'shelving',
+ label: t('shelvings.shelving'),
+ field: (row) => row.shelvingFk,
+ align: 'left',
+ },
{
name: 'Landed',
label: t('Landed'),
@@ -125,6 +132,10 @@ async function updateDestination(claimDestinationFk, row, options = {}) {
options.reload && claimActionsForm.value.reload();
}
}
+async function updateShelving(shelvingFk, row) {
+ await axios.patch(`ClaimEnds/${row.id}`, { shelvingFk });
+ claimActionsForm.value.reload();
+}
async function regularizeClaim() {
await post(`Claims/${claimId}/regularizeClaim`);
@@ -200,6 +211,7 @@ async function post(query, params) {
auto-load
@on-fetch="(data) => (destinationTypes = data)"
/>
+
(shelvings = data)" />
@@ -312,6 +324,20 @@ async function post(query, params) {
/>
+
+
+ updateShelving(value, row)"
+ />
+
+
+
{{ toCurrency(value) }}
@@ -354,7 +380,7 @@ async function post(query, params) {
(value) =>
updateDestination(
value,
- props.row
+ props.row,
)
"
/>
@@ -371,6 +397,17 @@ async function post(query, params) {
+
-
diff --git a/src/pages/Claim/Card/ClaimBasicData.vue b/src/pages/Claim/Card/ClaimBasicData.vue
index 67034da1a..43941d1dc 100644
--- a/src/pages/Claim/Card/ClaimBasicData.vue
+++ b/src/pages/Claim/Card/ClaimBasicData.vue
@@ -40,7 +40,7 @@ const workersOptions = ref([]);
-
+
-
-
+
+
{{ claim.claimState.description }}
-
+
-
+
-
+
{{ claim.client?.name }}
@@ -274,6 +281,11 @@ function claimUrl(section) {
:label="t('claim.pickup')"
:value="`${dashIfEmpty(claim.pickup)}`"
/>
+
diff --git a/src/pages/Claim/Card/ClaimSummaryAction.vue b/src/pages/Claim/Card/ClaimSummaryAction.vue
index d875126cb..e5273902c 100644
--- a/src/pages/Claim/Card/ClaimSummaryAction.vue
+++ b/src/pages/Claim/Card/ClaimSummaryAction.vue
@@ -19,30 +19,36 @@ const columns = [
name: 'itemFk',
label: t('Id item'),
columnFilter: false,
- align: 'left',
+ align: 'right',
},
{
name: 'ticketFk',
label: t('Ticket'),
columnFilter: false,
- align: 'left',
+ align: 'right',
},
{
name: 'claimDestinationFk',
label: t('Destination'),
columnFilter: false,
- align: 'left',
+ align: 'right',
+ },
+ {
+ name: 'shelvingCode',
+ label: t('Shelving'),
+ columnFilter: false,
+ align: 'right',
},
{
name: 'landed',
label: t('Landed'),
format: (row) => toDate(row.landed),
- align: 'left',
+ align: 'center',
},
{
name: 'quantity',
label: t('Quantity'),
- align: 'left',
+ align: 'right',
},
{
name: 'concept',
@@ -52,18 +58,18 @@ const columns = [
{
name: 'price',
label: t('Price'),
- align: 'left',
+ align: 'right',
},
{
name: 'discount',
label: t('Discount'),
format: ({ discount }) => toPercentage(discount / 100),
- align: 'left',
+ align: 'right',
},
{
name: 'total',
label: t('Total'),
- align: 'left',
+ align: 'right',
},
];
diff --git a/src/pages/Claim/ClaimFilter.vue b/src/pages/Claim/ClaimFilter.vue
index 6c941f59e..0fe7fc588 100644
--- a/src/pages/Claim/ClaimFilter.vue
+++ b/src/pages/Claim/ClaimFilter.vue
@@ -106,7 +106,6 @@ const props = defineProps({
:label="t('claim.zone')"
v-model="params.zoneFk"
url="Zones"
- :use-like="false"
outlined
rounded
dense
diff --git a/src/pages/Claim/locale/en.yml b/src/pages/Claim/locale/en.yml
index 11b4a2ca4..cdfa3963b 100644
--- a/src/pages/Claim/locale/en.yml
+++ b/src/pages/Claim/locale/en.yml
@@ -13,7 +13,6 @@ claim:
province: Province
zone: Zone
customerId: client ID
- assignedTo: Assigned
created: Created
details: Details
item: Item
diff --git a/src/pages/Claim/locale/es.yml b/src/pages/Claim/locale/es.yml
index d35d2c8e7..00f880f0c 100644
--- a/src/pages/Claim/locale/es.yml
+++ b/src/pages/Claim/locale/es.yml
@@ -13,7 +13,6 @@ claim:
province: Provincia
zone: Zona
customerId: ID de cliente
- assignedTo: Asignado a
created: Creado
details: Detalles
item: Artículo
diff --git a/src/pages/Customer/CustomerFilter.vue b/src/pages/Customer/CustomerFilter.vue
index 21de8fa9b..1c5a08304 100644
--- a/src/pages/Customer/CustomerFilter.vue
+++ b/src/pages/Customer/CustomerFilter.vue
@@ -143,6 +143,7 @@ const exprBuilder = (param, value) => {
outlined
rounded
auto-load
+ sortBy="name ASC"
/>
diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue
index b8c1a743e..0bfca7910 100644
--- a/src/pages/Customer/CustomerList.vue
+++ b/src/pages/Customer/CustomerList.vue
@@ -78,10 +78,20 @@ const columns = computed(() => [
component: 'select',
attrs: {
url: 'Workers/activeWithInheritedRole',
- fields: ['id', 'name'],
+ fields: ['id', 'name', 'firstName'],
where: { role: 'salesPerson' },
optionFilter: 'firstName',
},
+ columnFilter: {
+ component: 'select',
+ attrs: {
+ url: 'Workers/activeWithInheritedRole',
+ fields: ['id', 'name', 'firstName'],
+ where: { role: 'salesPerson' },
+ optionLabel: 'firstName',
+ optionValue: 'id',
+ },
+ },
create: false,
columnField: {
component: null,
diff --git a/src/pages/Customer/components/CustomerNewPayment.vue b/src/pages/Customer/components/CustomerNewPayment.vue
index 8f61bac89..6ecccc544 100644
--- a/src/pages/Customer/components/CustomerNewPayment.vue
+++ b/src/pages/Customer/components/CustomerNewPayment.vue
@@ -77,7 +77,6 @@ onBeforeMount(() => {
function setPaymentType(accounting) {
if (!accounting) return;
accountingType.value = accounting.accountingType;
-
initialData.description = [];
initialData.payed = Date.vnNew();
isCash.value = accountingType.value.code == 'cash';
@@ -87,14 +86,14 @@ function setPaymentType(accounting) {
initialData.payed.getDate() + accountingType.value.daysInFuture,
);
maxAmount.value = accountingType.value && accountingType.value.maxAmount;
-
if (accountingType.value.code == 'compensation')
return (initialData.description = '');
- if (accountingType.value.receiptDescription)
- initialData.description.push(accountingType.value.receiptDescription);
- if (initialData.description) initialData.description.push(initialData.description);
- initialData.description = initialData.description.join(', ');
+ let descriptions = [];
+ if (accountingType.value.receiptDescription)
+ descriptions.push(accountingType.value.receiptDescription);
+ if (initialData.description) descriptions.push(initialData.description);
+ initialData.description = descriptions.join(', ');
}
const calculateFromAmount = (event) => {
diff --git a/src/pages/Customer/components/CustomerSamplesCreate.vue b/src/pages/Customer/components/CustomerSamplesCreate.vue
index 8d241441d..1294a5d25 100644
--- a/src/pages/Customer/components/CustomerSamplesCreate.vue
+++ b/src/pages/Customer/components/CustomerSamplesCreate.vue
@@ -18,6 +18,7 @@ import VnInput from 'src/components/common/VnInput.vue';
import VnInputDate from 'src/components/common/VnInputDate.vue';
import CustomerSamplesPreview from 'src/pages/Customer/components/CustomerSamplesPreview.vue';
import FormPopup from 'src/components/FormPopup.vue';
+import { useArrayData } from 'src/composables/useArrayData';
const { dialogRef, onDialogOK } = useDialogPluginComponent();
@@ -39,7 +40,7 @@ const optionsSamplesVisible = ref([]);
const sampleType = ref({ hasPreview: false });
const initialData = reactive({});
const entityId = computed(() => route.params.id);
-const customer = computed(() => state.get('Customer'));
+const customer = computed(() => useArrayData('Customer').store?.data);
const filterEmailUsers = { where: { userFk: user.value.id } };
const filterClientsAddresses = {
include: [
@@ -65,9 +66,9 @@ const filterSamplesVisible = {
defineEmits(['confirm', ...useDialogPluginComponent.emits]);
onBeforeMount(async () => {
- initialData.clientFk = customer.value.id;
- initialData.recipient = customer.value.email;
- initialData.recipientId = customer.value.id;
+ initialData.clientFk = customer.value?.id;
+ initialData.recipient = customer.value?.email;
+ initialData.recipientId = customer.value?.id;
});
const setEmailUser = (data) => {
diff --git a/src/pages/Entry/Card/EntryBuys.vue b/src/pages/Entry/Card/EntryBuys.vue
index 81578c609..67333b5bd 100644
--- a/src/pages/Entry/Card/EntryBuys.vue
+++ b/src/pages/Entry/Card/EntryBuys.vue
@@ -639,7 +639,7 @@ onMounted(() => {
'flex-wrap': 'wrap',
gap: '16px',
position: 'relative',
- height: '450px',
+ height: '500px',
},
columnGridStyle: {
'max-width': '50%',
@@ -650,7 +650,7 @@ onMounted(() => {
:is-editable="editableMode"
:without-header="!editableMode"
:with-filters="editableMode"
- :right-search="true"
+ :right-search="editableMode"
:right-search-icon="true"
:row-click="false"
:columns="columns"
diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue
index 3c96a2302..a9cf2a5e2 100644
--- a/src/pages/Entry/EntryList.vue
+++ b/src/pages/Entry/EntryList.vue
@@ -274,7 +274,7 @@ onBeforeMount(async () => {
:array-data-props="{
url: 'Entries/filter',
order: 'landed DESC',
- userFilter: EntryFilter,
+ userFilter: entryQueryFilter,
}"
>
diff --git a/src/pages/Item/Card/ItemDiary.vue b/src/pages/Item/Card/ItemDiary.vue
index 4b6775183..31b3c328e 100644
--- a/src/pages/Item/Card/ItemDiary.vue
+++ b/src/pages/Item/Card/ItemDiary.vue
@@ -27,7 +27,7 @@ const user = state.getUser();
const today = Date.vnNew();
today.setHours(0, 0, 0, 0);
const warehousesOptions = ref([]);
-const itemBalances = computed(() => arrayDataItemBalances.store.data);
+const itemBalances = computed(() => arrayDataItemBalances.store.data || []);
const where = computed(() => arrayDataItemBalances.store.filter.where || {});
const showWhatsBeforeInventory = ref(false);
const inventoriedDate = ref(null);
@@ -313,8 +313,8 @@ async function updateWarehouse(warehouseFk) {
row.lineFk == row.lastPreparedLineFk
? 'black'
: row.balance < 0
- ? 'negative'
- : ''
+ ? 'negative'
+ : ''
"
dense
style="font-size: 14px"
diff --git a/src/pages/Item/Card/ItemTags.vue b/src/pages/Item/Card/ItemTags.vue
index ed23ab5a6..ab26b9cae 100644
--- a/src/pages/Item/Card/ItemTags.vue
+++ b/src/pages/Item/Card/ItemTags.vue
@@ -87,7 +87,7 @@ const insertTag = (rows) => {
tagFk: undefined,
}"
:default-remove="false"
- :filter="{
+ :user-filter="{
fields: ['id', 'itemFk', 'tagFk', 'value', 'priority'],
where: { itemFk: route.params.id },
include: {
@@ -119,6 +119,7 @@ const insertTag = (rows) => {
"
:required="true"
:rules="validate('itemTag.tagFk')"
+ :data-cy="`tag${row?.tag?.name}`"
/>
{
:label="t('itemTags.value')"
:is-clearable="false"
@keyup.enter.stop="(data) => itemTagsRef.onSubmit(data)"
+ :data-cy="`tag${row?.tag?.name}Value`"
/>
{
name="delete"
size="sm"
dense
+ :data-cy="`deleteTag${row?.tag?.name}`"
>
{{ t('itemTags.removeTag') }}
@@ -177,6 +180,7 @@ const insertTag = (rows) => {
icon="add"
v-shortcut="'+'"
fab
+ data-cy="createNewTag"
>
{{ t('itemTags.addTag') }}
diff --git a/src/pages/Route/RouteExtendedList.vue b/src/pages/Route/RouteExtendedList.vue
index a8d847711..a7e192765 100644
--- a/src/pages/Route/RouteExtendedList.vue
+++ b/src/pages/Route/RouteExtendedList.vue
@@ -3,7 +3,7 @@ import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import { useQuasar } from 'quasar';
-import { dashIfEmpty, toDate, toHour } from 'src/filters';
+import { toDate, toHour } from 'src/filters';
import { useRouter } from 'vue-router';
import { usePrintService } from 'src/composables/usePrintService';
@@ -335,7 +335,6 @@ const openTicketsDialog = (id) => {
{
{
-
-
diff --git a/src/pages/Shelving/Parking/ParkingList.vue b/src/pages/Shelving/Parking/ParkingList.vue
index fe6c93ba5..7c5058a74 100644
--- a/src/pages/Shelving/Parking/ParkingList.vue
+++ b/src/pages/Shelving/Parking/ParkingList.vue
@@ -1,19 +1,15 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/src/pages/Ticket/Card/TicketEditMana.vue b/src/pages/Ticket/Card/TicketEditMana.vue
index 14eec9db9..ff40a6592 100644
--- a/src/pages/Ticket/Card/TicketEditMana.vue
+++ b/src/pages/Ticket/Card/TicketEditMana.vue
@@ -1,32 +1,26 @@
-
+
-
-
-
-
-
-
-
-
-
- {{ t('New price') }}
-
- {{ toCurrency($props.newPrice) }}
-
-
+
+
+
+
+
+
+
+
+ {{ t('New price') }}
+
+ {{ toCurrency($props.newPrice) }}
+
+
store.data?.ticketState?.state?.code);
const transfer = ref({
@@ -175,17 +174,21 @@ const getSaleTotal = (sale) => {
return price - discount;
};
+const getRowUpdateInputEvents = (sale) => ({
+ 'keyup.enter': () => {
+ changeQuantity(sale);
+ },
+ blur: () => {
+ changeQuantity(sale);
+ },
+});
+
const resetChanges = async () => {
arrayData.fetch({ append: false });
tableRef.value.reload();
};
-const rowToUpdate = ref(null);
const changeQuantity = async (sale) => {
- if (
- !sale.itemFk ||
- sale.quantity == null ||
- edit.value?.oldQuantity === sale.quantity
- )
+ if (!sale.itemFk || sale.quantity == null || sale?.originalQuantity === sale.quantity)
return;
if (!sale.id) return addSale(sale);
@@ -197,11 +200,8 @@ const changeQuantity = async (sale) => {
const updateQuantity = async (sale) => {
try {
let { quantity, id } = sale;
- if (!rowToUpdate.value) return;
- rowToUpdate.value = null;
sale.isNew = false;
- const params = { quantity: quantity };
- await axios.post(`Sales/${id}/updateQuantity`, params);
+ await axios.post(`Sales/${id}/updateQuantity`, { quantity });
notify('globals.dataSaved', 'positive');
tableRef.value.reload();
} catch (e) {
@@ -258,18 +258,6 @@ const DEFAULT_EDIT = {
oldQuantity: null,
};
const edit = ref({ ...DEFAULT_EDIT });
-const usesMana = ref(null);
-
-const getUsesMana = async () => {
- const { data } = await axios.get('Sales/usesMana');
- usesMana.value = data;
-};
-
-const getMana = async () => {
- const { data } = await axios.get(`Tickets/${route.params.id}/getSalesPersonMana`);
- mana.value = data;
- await getUsesMana();
-};
const selectedValidSales = computed(() => {
if (!sales.value) return;
@@ -277,7 +265,6 @@ const selectedValidSales = computed(() => {
});
const onOpenEditPricePopover = async (sale) => {
- await getMana();
edit.value = {
sale: JSON.parse(JSON.stringify(sale)),
price: sale.price,
@@ -285,7 +272,6 @@ const onOpenEditPricePopover = async (sale) => {
};
const onOpenEditDiscountPopover = async (sale) => {
- await getMana();
if (isLocked.value) return;
if (sale) {
edit.value = {
@@ -306,7 +292,6 @@ const changePrice = async (sale) => {
await confirmUpdate(() => updatePrice(sale, newPrice));
} else updatePrice(sale, newPrice);
}
- await getMana();
};
const updatePrice = async (sale, newPrice) => {
await axios.post(`Sales/${sale.id}/updatePrice`, { newPrice });
@@ -599,9 +584,7 @@ watch(
:is-ticket-editable="isTicketEditable"
:sales="selectedValidSales"
:disable="!hasSelectedRows"
- :mana="mana"
:ticket-config="ticketConfig"
- @get-mana="getMana()"
@update-discounts="updateDiscounts"
@refresh-table="resetChanges"
/>
@@ -772,9 +755,7 @@ watch(
v-if="row.isNew || isTicketEditable"
type="number"
v-model.number="row.quantity"
- @blur="changeQuantity(row)"
- @keyup.enter.stop="changeQuantity(row)"
- @update:model-value="() => (rowToUpdate = row)"
+ v-on="getRowUpdateInputEvents(row)"
@focus="edit.oldQuantity = row.quantity"
/>
{{ row.quantity }}
@@ -786,7 +767,6 @@ watch(
diff --git a/src/pages/Ticket/Card/TicketSaleMoreActions.vue b/src/pages/Ticket/Card/TicketSaleMoreActions.vue
index 4cc96e9e2..840b62507 100644
--- a/src/pages/Ticket/Card/TicketSaleMoreActions.vue
+++ b/src/pages/Ticket/Card/TicketSaleMoreActions.vue
@@ -34,10 +34,6 @@ const props = defineProps({
type: Array,
default: () => [],
},
- mana: {
- type: Number,
- default: null,
- },
ticketConfig: {
type: Array,
default: () => [],
@@ -50,6 +46,7 @@ const { dialog } = useQuasar();
const { notify } = useNotify();
const acl = useAcl();
const btnDropdownRef = ref(null);
+const editManaProxyRef = ref(null);
const { openConfirmationModal } = useVnConfirm();
const newDiscount = ref(null);
@@ -131,13 +128,13 @@ const createClaim = () => {
openConfirmationModal(
t('Claim out of time'),
t('Do you want to continue?'),
- onCreateClaimAccepted
+ onCreateClaimAccepted,
);
else
openConfirmationModal(
t('Do you want to create a claim?'),
false,
- onCreateClaimAccepted
+ onCreateClaimAccepted,
);
};
@@ -216,8 +213,14 @@ const createRefund = async (withWarehouse) => {
{{ t('Update discount') }}
-
+
editManaProxyRef.save(row)"
v-model.number="newDiscount"
:label="t('ticketSale.discount')"
type="number"
diff --git a/src/pages/Ticket/Card/TicketSaleTracking.vue b/src/pages/Ticket/Card/TicketSaleTracking.vue
index 7a33df795..723caacf5 100644
--- a/src/pages/Ticket/Card/TicketSaleTracking.vue
+++ b/src/pages/Ticket/Card/TicketSaleTracking.vue
@@ -31,7 +31,7 @@ const oldQuantity = ref(null);
watch(
() => route.params.id,
- async () => nextTick(async () => await saleTrackingFetchDataRef.value.fetch())
+ async () => nextTick(async () => await saleTrackingFetchDataRef.value.fetch()),
);
const columns = computed(() => [
@@ -212,7 +212,7 @@ const updateShelving = async (sale) => {
const { data: patchResponseData } = await axios.patch(
`ItemShelvings/${sale.itemShelvingFk}`,
- params
+ params,
);
const filter = {
fields: ['parkingFk'],
@@ -385,7 +385,7 @@ const qCheckBoxController = (sale, action) => {
- {{ dashIfEmpty(row.parkingFk) }}
+ {{ dashIfEmpty(row.parkingCode) }}
diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue
index 5df08b881..5838efa88 100644
--- a/src/pages/Ticket/Card/TicketSummary.vue
+++ b/src/pages/Ticket/Card/TicketSummary.vue
@@ -46,6 +46,15 @@ const descriptorData = useArrayData('Ticket');
onMounted(async () => {
ticketUrl.value = (await getUrl('ticket/')) + entityId.value + '/';
});
+const formattedAddress = computed(() => {
+ if (!ticket.value) return '';
+
+ const address = ticket.value.address;
+ const postcode = address.postalCode;
+ const province = address.province ? `(${address.province.name})` : '';
+
+ return `${address.street} - ${postcode} - ${address.city} ${province}`;
+});
function isEditable() {
try {
@@ -238,7 +247,7 @@ onMounted(async () => {
/>
diff --git a/src/pages/Ticket/TicketFilter.vue b/src/pages/Ticket/TicketFilter.vue
index 4b50892b0..c82c0067f 100644
--- a/src/pages/Ticket/TicketFilter.vue
+++ b/src/pages/Ticket/TicketFilter.vue
@@ -293,6 +293,7 @@ en:
clientFk: Customer
orderFk: Order
from: From
+ shipped: Shipped
to: To
salesPersonFk: Salesperson
stateFk: State
@@ -320,6 +321,7 @@ es:
clientFk: Cliente
orderFk: Pedido
from: Desde
+ shipped: F. envío
to: Hasta
salesPersonFk: Comercial
stateFk: Estado
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index 88878076d..78bebc297 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -108,13 +108,11 @@ const columns = computed(() => [
},
{
align: 'left',
- name: 'shippedDate',
+ name: 'shipped',
cardVisible: true,
label: t('ticketList.shipped'),
columnFilter: {
component: 'date',
- alias: 't',
- inWhere: true,
},
format: ({ shippedDate }) => toDate(shippedDate),
},
diff --git a/src/pages/Worker/Card/WorkerBasicData.vue b/src/pages/Worker/Card/WorkerBasicData.vue
index fcf0f0369..cf43412af 100644
--- a/src/pages/Worker/Card/WorkerBasicData.vue
+++ b/src/pages/Worker/Card/WorkerBasicData.vue
@@ -17,6 +17,12 @@ const maritalStatus = [
{ code: 'M', name: t('Married') },
{ code: 'S', name: t('Single') },
];
+async function setAdvancedSummary(data) {
+ const advanced = (await useAdvancedSummary('Workers', data.id)) ?? {};
+ Object.assign(form.value.formData, advanced);
+ await nextTick();
+ if (form.value) form.value.hasChanges = false;
+}
{
- Object.assign(data, (await useAdvancedSummary('Workers', data.id)) ?? {});
- await $nextTick();
- if (form) form.hasChanges = false;
- }
- "
+ @on-fetch="setAdvancedSummary"
>
diff --git a/src/pages/Worker/Card/WorkerBusiness.vue b/src/pages/Worker/Card/WorkerBusiness.vue
index 6025ae289..e3582a2d5 100644
--- a/src/pages/Worker/Card/WorkerBusiness.vue
+++ b/src/pages/Worker/Card/WorkerBusiness.vue
@@ -3,7 +3,7 @@ import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import VnTable from 'components/VnTable/VnTable.vue';
-import { toDate } from 'src/filters';
+import { dashIfEmpty, toDate } from 'src/filters';
import { useQuasar } from 'quasar';
import axios from 'axios';
@@ -15,7 +15,7 @@ const quasar = useQuasar();
async function reactivateWorker() {
const hasToReactive = tableRef.value.CrudModelRef.formData.find(
- (data) => !data.ended
+ (data) => !data.ended,
);
if (hasToReactive) {
quasar
@@ -38,25 +38,25 @@ const columns = computed(() => [
{
name: 'started',
label: t('worker.business.tableVisibleColumns.started'),
- align: 'left',
format: ({ started }) => toDate(started),
component: 'date',
cardVisible: true,
create: true,
+ width: '90px',
},
{
name: 'ended',
label: t('worker.business.tableVisibleColumns.ended'),
- align: 'left',
format: ({ ended }) => toDate(ended),
component: 'date',
cardVisible: true,
create: true,
+ width: '90px',
},
{
label: t('worker.business.tableVisibleColumns.company'),
- align: 'left',
+ toolTip: t('worker.business.tableVisibleColumns.company'),
name: 'companyCodeFk',
component: 'select',
attrs: {
@@ -65,23 +65,23 @@ const columns = computed(() => [
optionLabel: 'code',
optionValue: 'code',
},
- cardVisible: true,
create: true,
+ width: '60px',
},
{
- align: 'left',
name: 'reasonEndFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.reasonEnd'),
+ toolTip: t('worker.business.tableVisibleColumns.reasonEnd'),
attrs: {
url: 'BusinessReasonEnds',
fields: ['id', 'reason'],
optionLabel: 'reason',
},
cardVisible: true,
+ format: ({ reason }, dashIfEmpty) => dashIfEmpty(reason),
},
{
- align: 'left',
name: 'departmentFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.department'),
@@ -89,15 +89,19 @@ const columns = computed(() => [
url: 'Departments',
fields: ['id', 'name'],
optionLabel: 'name',
+ optionValue: 'id',
},
cardVisible: true,
create: true,
+ width: '80px',
+ format: ({ departmentName }, dashIfEmpty) => dashIfEmpty(departmentName),
},
{
align: 'left',
name: 'workerBusinessProfessionalCategoryFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.professionalCategory'),
+ toolTip: t('worker.business.tableVisibleColumns.professionalCategory'),
attrs: {
url: 'WorkerBusinessProfessionalCategories',
fields: ['id', 'description', 'code'],
@@ -105,6 +109,9 @@ const columns = computed(() => [
},
cardVisible: true,
create: true,
+ width: '100px',
+ format: ({ professionalDescription }, dashIfEmpty) =>
+ dashIfEmpty(professionalDescription),
},
{
align: 'left',
@@ -118,6 +125,8 @@ const columns = computed(() => [
},
cardVisible: true,
create: true,
+ format: ({ calendarTypeDescription }, dashIfEmpty) =>
+ dashIfEmpty(calendarTypeDescription),
},
{
align: 'left',
@@ -131,6 +140,8 @@ const columns = computed(() => [
},
cardVisible: true,
create: true,
+ width: '100px',
+ format: ({ workCenterName }, dashIfEmpty) => dashIfEmpty(workCenterName),
},
{
align: 'left',
@@ -144,6 +155,7 @@ const columns = computed(() => [
},
cardVisible: true,
create: true,
+ format: ({ payrollDescription }, dashIfEmpty) => dashIfEmpty(payrollDescription),
},
{
align: 'left',
@@ -157,6 +169,7 @@ const columns = computed(() => [
},
cardVisible: true,
create: true,
+ format: ({ occupationName }, dashIfEmpty) => dashIfEmpty(occupationName),
},
{
align: 'left',
@@ -165,6 +178,7 @@ const columns = computed(() => [
component: 'input',
cardVisible: true,
create: true,
+ width: '50px',
},
{
align: 'left',
@@ -177,6 +191,8 @@ const columns = computed(() => [
},
cardVisible: true,
create: true,
+ format: ({ workerBusinessTypeName }, dashIfEmpty) =>
+ dashIfEmpty(workerBusinessTypeName),
},
{
align: 'left',
@@ -185,6 +201,7 @@ const columns = computed(() => [
component: 'input',
cardVisible: true,
create: true,
+ width: '70px',
},
{
align: 'left',
@@ -193,6 +210,7 @@ const columns = computed(() => [
component: 'input',
cardVisible: true,
create: true,
+ width: '70px',
},
{
name: 'notes',
@@ -208,7 +226,7 @@ const columns = computed(() => [
reactivateWorker(data)"
/>
diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue
index de3f634e2..0e946f1dd 100644
--- a/src/pages/Worker/Card/WorkerDescriptor.vue
+++ b/src/pages/Worker/Card/WorkerDescriptor.vue
@@ -111,6 +111,7 @@ const handlePhotoUpdated = (evt = false) => {
{
.photo {
height: 256px;
}
+.ellipsis-text {
+ width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
diff --git a/src/pages/Worker/Card/WorkerDescriptorProxy.vue b/src/pages/Worker/Card/WorkerDescriptorProxy.vue
index a142570f9..5f71abbea 100644
--- a/src/pages/Worker/Card/WorkerDescriptorProxy.vue
+++ b/src/pages/Worker/Card/WorkerDescriptorProxy.vue
@@ -12,6 +12,11 @@ const $props = defineProps({
-
+
diff --git a/src/pages/Zone/ZoneList.vue b/src/pages/Zone/ZoneList.vue
index a82bbb285..4df84e4bd 100644
--- a/src/pages/Zone/ZoneList.vue
+++ b/src/pages/Zone/ZoneList.vue
@@ -65,6 +65,7 @@ const tableFilter = {
const columns = computed(() => [
{
+ align: 'left',
name: 'id',
label: t('list.id'),
chip: {
@@ -74,8 +75,6 @@ const columns = computed(() => [
columnFilter: {
inWhere: true,
},
- columnClass: 'shrink-column',
- component: 'number',
},
{
align: 'left',
@@ -107,6 +106,7 @@ const columns = computed(() => [
format: (row, dashIfEmpty) => dashIfEmpty(row?.agencyMode?.name),
},
{
+ align: 'left',
name: 'price',
label: t('list.price'),
cardVisible: true,
@@ -114,11 +114,9 @@ const columns = computed(() => [
columnFilter: {
inWhere: true,
},
- columnClass: 'shrink-column',
- component: 'number',
},
{
- align: 'center',
+ align: 'left',
name: 'hour',
label: t('list.close'),
cardVisible: true,
@@ -180,73 +178,67 @@ function formatRow(row) {
-
-
-
-
- {{ dashIfEmpty(formatRow(row)) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ {{ dashIfEmpty(formatRow(row)) }}
+
+
+
+
+
+
+
+
+
+
+
@@ -254,20 +246,3 @@ es:
Search zone: Buscar zona
You can search zones by id or name: Puedes buscar zonas por id o nombre
-
-
diff --git a/test/cypress/integration/account/accountDescriptorMenu.spec.js b/test/cypress/integration/account/accountDescriptorMenu.spec.js
new file mode 100644
index 000000000..67a7d8ef6
--- /dev/null
+++ b/test/cypress/integration/account/accountDescriptorMenu.spec.js
@@ -0,0 +1,24 @@
+describe('ClaimNotes', () => {
+ const descriptorOptions = '[data-cy="descriptor-more-opts-menu"] > .q-list';
+ const url = '/#/account/1/summary';
+
+ it('should see all the account options', () => {
+ cy.login('itManagement');
+ cy.visit(url);
+ cy.dataCy('descriptor-more-opts').click();
+ cy.get(descriptorOptions)
+ .find('.q-item')
+ .its('length')
+ .then((count) => {
+ cy.log('Número de opciones:', count);
+ expect(count).to.equal(5);
+ });
+ });
+
+ it('should not see any option', () => {
+ cy.login('salesPerson');
+ cy.visit(url);
+ cy.dataCy('descriptor-more-opts').click();
+ cy.get(descriptorOptions).should('not.be.visible');
+ });
+});
diff --git a/test/cypress/integration/claim/claimAction.spec.js b/test/cypress/integration/claim/claimAction.spec.js
index e98be85fc..b0a16a2ad 100644
--- a/test/cypress/integration/claim/claimAction.spec.js
+++ b/test/cypress/integration/claim/claimAction.spec.js
@@ -1,6 +1,6 @@
///
describe('ClaimAction', () => {
- const claimId = 2;
+ const claimId = 1;
const firstRow = 'tbody > :nth-child(1)';
const destinationRow = '.q-item__section > .q-field';
diff --git a/test/cypress/integration/item/itemTag.spec.js b/test/cypress/integration/item/itemTag.spec.js
index d7a9ea4b3..425eaffe6 100644
--- a/test/cypress/integration/item/itemTag.spec.js
+++ b/test/cypress/integration/item/itemTag.spec.js
@@ -1,4 +1,3 @@
-///
describe('Item tag', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
@@ -8,25 +7,27 @@ describe('Item tag', () => {
cy.waitForElement('[data-cy="itemTags"]');
});
+ const createNewTag = 'createNewTag';
+ const saveBtn = 'crudModelDefaultSaveBtn';
+ const newTag = 'tagundefined';
+
it('should throw an error adding an existent tag', () => {
- cy.get('.q-page-sticky > div').click();
- cy.selectOption(':nth-child(8) > .q-select', 'Tallos');
- cy.get(':nth-child(8) > [label="Value"]').type('1');
- cy.dataCy('crudModelDefaultSaveBtn').click();
+ cy.dataCy(createNewTag).click();
+ cy.dataCy(newTag).should('be.visible').click().type('Genero{enter}');
+ cy.dataCy('tagGeneroValue').eq(1).should('be.visible');
+ cy.dataCy(saveBtn).click();
cy.checkNotification("The tag or priority can't be repeated for an item");
});
it('should add a new tag', () => {
- cy.get('.q-page-sticky > div').click();
- cy.selectOption(':nth-child(8) > .q-select', 'Ancho de la base');
- cy.get(':nth-child(8) > [label="Value"]').type('50');
- cy.dataCy('crudModelDefaultSaveBtn').click();
+ cy.dataCy(createNewTag).click();
+ cy.dataCy(newTag).should('be.visible').click().type('Forma{enter}');
+ cy.dataCy('tagFormaValue').should('be.visible').type('50');
+ cy.dataCy(saveBtn).click();
+
cy.checkNotification('Data saved');
- cy.dataCy('itemTags')
- .children(':nth-child(8)')
- .find('.justify-center > .q-icon')
- .click();
- cy.dataCy('VnConfirm_confirm').click();
+ cy.dataCy('deleteTagForma').should('be.visible').click();
+ cy.dataCy('VnConfirm_confirm').should('be.visible').click();
cy.checkNotification('Data saved');
});
});
diff --git a/test/cypress/integration/parking/parkingBasicData.spec.js b/test/cypress/integration/parking/parkingBasicData.spec.js
deleted file mode 100644
index f64f23ec8..000000000
--- a/test/cypress/integration/parking/parkingBasicData.spec.js
+++ /dev/null
@@ -1,23 +0,0 @@
-///
-describe('ParkingBasicData', () => {
- const codeInput = 'form .q-card .q-input input';
- const sectorSelect = 'form .q-card .q-select input';
- const sectorOpt = '.q-menu .q-item';
- beforeEach(() => {
- cy.login('developer');
- cy.visit(`/#/shelving/parking/1/basic-data`);
- });
-
- it('should edit the code and sector', () => {
- cy.get(sectorSelect).type('Second');
- cy.get(sectorOpt).click();
-
- cy.get(codeInput).eq(0).clear();
- cy.get(codeInput).eq(0).type('900-001');
-
- cy.saveCard();
-
- cy.get(sectorSelect).should('have.value', 'Second sector');
- cy.get(codeInput).should('have.value', '900-001');
- });
-});
diff --git a/test/cypress/integration/parking/parkingList.spec.js b/test/cypress/integration/parking/parkingList.spec.js
deleted file mode 100644
index 8b7152ca4..000000000
--- a/test/cypress/integration/parking/parkingList.spec.js
+++ /dev/null
@@ -1,33 +0,0 @@
-///
-describe('ParkingList', () => {
- const searchbar = '#searchbar input';
- const firstCard = '.q-card:nth-child(1)';
- const firstChipId =
- ':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
- const firstDetailBtn =
- ':nth-child(1) > :nth-child(1) > .card-list-body > .actions > .q-btn';
- const summaryHeader = '.summaryBody .header';
-
- beforeEach(() => {
- cy.viewport(1920, 1080);
- cy.login('developer');
- cy.visit(`/#/shelving/parking/list`);
- });
-
- it('should redirect on clicking a parking', () => {
- cy.get(searchbar).type('{enter}');
- cy.get(firstChipId)
- .invoke('text')
- .then((content) => {
- const id = content.substring(4);
- cy.get(firstCard).click();
- cy.url().should('include', `/parking/${id}/summary`);
- });
- });
-
- it('should open the details', () => {
- cy.get(searchbar).type('{enter}');
- cy.get(firstDetailBtn).click();
- cy.get(summaryHeader).contains('Basic data');
- });
-});
diff --git a/test/cypress/integration/shelving/parking/parkingBasicData.spec.js b/test/cypress/integration/shelving/parking/parkingBasicData.spec.js
new file mode 100644
index 000000000..e28d7eeca
--- /dev/null
+++ b/test/cypress/integration/shelving/parking/parkingBasicData.spec.js
@@ -0,0 +1,32 @@
+///
+describe('ParkingBasicData', () => {
+ const codeInput = 'form .q-card .q-input input';
+ const sectorSelect = 'form .q-card .q-select input';
+ const sectorOpt = '.q-menu .q-item';
+ beforeEach(() => {
+ cy.login('developer');
+ cy.visit(`/#/shelving/parking/1/basic-data`);
+ });
+
+ it('should give an error if the code aldready exists', () => {
+ cy.get(codeInput).eq(0).should('have.value', '700-01').clear();
+ cy.get(codeInput).eq(0).type('700-02');
+ cy.saveCard();
+ cy.get('.q-notification__message').should('have.text', 'The code already exists');
+ });
+
+ it('should edit the code and sector', () => {
+ cy.get(sectorSelect).type('First');
+ cy.get(sectorOpt).click();
+
+ cy.get(codeInput).eq(0).clear();
+ cy.get(codeInput).eq(0).type('700-01');
+ cy.dataCy('Picking order_input').clear().type(80230);
+
+ cy.saveCard();
+ cy.get('.q-notification__message').should('have.text', 'Data saved');
+ cy.get(sectorSelect).should('have.value', 'First sector');
+ cy.get(codeInput).should('have.value', '700-01');
+ cy.dataCy('Picking order_input').should('have.value', 80230);
+ });
+});
diff --git a/test/cypress/integration/shelving/parking/parkingList.spec.js b/test/cypress/integration/shelving/parking/parkingList.spec.js
new file mode 100644
index 000000000..ecee8aab7
--- /dev/null
+++ b/test/cypress/integration/shelving/parking/parkingList.spec.js
@@ -0,0 +1,30 @@
+///
+describe('ParkingList', () => {
+ const searchbar = '#searchbar input';
+ const firstCard = ':nth-child(1) > .q-card > .no-margin > .q-py-none';
+ const summaryHeader = '.summaryBody .header';
+
+ beforeEach(() => {
+ cy.viewport(1920, 1080);
+ cy.login('developer');
+ cy.visit(`/#/shelving/parking/list`);
+ });
+
+ it('should redirect on clicking a parking', () => {
+ cy.get(searchbar).type('{enter}');
+ cy.get(firstCard).click();
+ cy.get(summaryHeader).contains('Basic data');
+ });
+
+ it('should filter and redirect if there is only one result', () => {
+ cy.dataCy('Code_input').type('1{enter}');
+ cy.dataCy('Sector_select').type('Normal{enter}');
+ cy.get(summaryHeader).contains('Basic data');
+ });
+
+ it('should filter and redirect to summary if only one result', () => {
+ cy.dataCy('Code_input').type('A{enter}');
+ cy.dataCy('Sector_select').type('First Sector{enter}');
+ cy.url().should('match', /\/shelving\/parking\/\d+\/summary/);
+ });
+});