diff --git a/src/pages/Account/AccountList.vue b/src/pages/Account/AccountList.vue
index 72c445fa9..9e7f1b10a 100644
--- a/src/pages/Account/AccountList.vue
+++ b/src/pages/Account/AccountList.vue
@@ -74,7 +74,7 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
- title: t('View Summary'),
+ title: t('components.smartCard.viewSummary'),
icon: 'preview',
action: (row) => viewSummary(row.id, AccountSummary),
isPrimary: true,
diff --git a/src/pages/Account/Role/AccountRoles.vue b/src/pages/Account/Role/AccountRoles.vue
index ea175d913..5398485e3 100644
--- a/src/pages/Account/Role/AccountRoles.vue
+++ b/src/pages/Account/Role/AccountRoles.vue
@@ -54,7 +54,7 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
- title: t('View Summary'),
+ title: t('components.smartCard.viewSummary'),
icon: 'preview',
action: (row) => viewSummary(row.id, RoleSummary),
isPrimary: true,
diff --git a/src/pages/Customer/components/CustomerSummaryTable.vue b/src/pages/Customer/components/CustomerSummaryTable.vue
index f6013dea9..e9bb36be7 100644
--- a/src/pages/Customer/components/CustomerSummaryTable.vue
+++ b/src/pages/Customer/components/CustomerSummaryTable.vue
@@ -101,7 +101,7 @@ const columns = computed(() => [
align: 'left',
name: 'itemPackingTypeFk',
label: t('ticketSale.packaging'),
- format: (row) => getItemPackagingType(row),
+ format: (row) => getItemPackagingType(row.ticketSales),
},
{
align: 'right',
@@ -151,13 +151,21 @@ const setShippedColor = (date) => {
if (difference < 0) return 'success';
};
-const getItemPackagingType = (row) => {
- const packagingType = row?.ticketSales
- .map((sale) => sale.item?.itemPackingTypeFk || '-')
- .filter((value) => value !== '-')
- .join(', ');
+const getItemPackagingType = (ticketSales) => {
+ if (!ticketSales?.length) return '-';
- return dashIfEmpty(packagingType);
+ const packagingTypes = ticketSales.reduce((types, sale) => {
+ const { itemPackingTypeFk } = sale.item;
+ if (
+ !types.includes(itemPackingTypeFk) &&
+ (itemPackingTypeFk === 'H' || itemPackingTypeFk === 'V')
+ ) {
+ types.push(itemPackingTypeFk);
+ }
+ return types;
+ }, []);
+
+ return dashIfEmpty(packagingTypes.join(', ') || '-');
};
diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue
index 61c430b23..119808176 100644
--- a/src/pages/Entry/EntryLatestBuys.vue
+++ b/src/pages/Entry/EntryLatestBuys.vue
@@ -23,7 +23,6 @@ const columns = [
return {
id: row.id,
size: '50x50',
- width: '50px',
};
},
},
@@ -34,21 +33,37 @@ const columns = [
label: t('entry.latestBuys.tableVisibleColumns.itemFk'),
name: 'itemFk',
isTitle: true,
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.packing'),
name: 'packing',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.grouping'),
name: 'grouping',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.quantity'),
name: 'quantity',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
@@ -59,6 +74,10 @@ const columns = [
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.size'),
name: 'size',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
@@ -84,6 +103,10 @@ const columns = [
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.weightByPiece'),
name: 'weightByPiece',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
@@ -99,26 +122,46 @@ const columns = [
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.entryFk'),
name: 'entryFk',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.buyingValue'),
name: 'buyingValue',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.freightValue'),
name: 'freightValue',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.comissionValue'),
name: 'comissionValue',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.packageValue'),
name: 'packageValue',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
@@ -129,16 +172,28 @@ const columns = [
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.price2'),
name: 'price2',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.price3'),
name: 'price3',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.minPrice'),
name: 'minPrice',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
@@ -149,11 +204,19 @@ const columns = [
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.weight'),
name: 'weight',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
label: t('entry.latestBuys.tableVisibleColumns.packagingFk'),
name: 'packagingFk',
+ columnFilter: {
+ component: 'number',
+ inWhere: true,
+ },
},
{
align: 'left',
diff --git a/src/pages/Item/Card/ItemBasicData.vue b/src/pages/Item/Card/ItemBasicData.vue
index ae9e45983..1b0342668 100644
--- a/src/pages/Item/Card/ItemBasicData.vue
+++ b/src/pages/Item/Card/ItemBasicData.vue
@@ -63,7 +63,7 @@ const onIntrastatCreated = (response, formData) => {
{
-
-
-
-
-
+
+
+
+
+
{
{
{
-
-
+
+
- {{ t('itemBasicData.isFragileTooltip') }}
+ {{ t('item.basicData.isFragileTooltip') }}
- {{ t('itemBasicData.isPhotoRequestedTooltip') }}
+ {{ t('item.basicData.isPhotoRequestedTooltip') }}
{
return route.params.id;
});
-onMounted(async () => {
- itemBotanicalsForm.itemFk = entityId.value;
- itemBotanicals.value = await itemBotanicalsRef.value.fetch();
- if (itemBotanicals.value.length > 0)
- Object.assign(itemBotanicalsForm, itemBotanicals.value[0]);
-});
{
@on-fetch="(data) => (itemBotanicals = data)"
/>
(itemBotanicalsForm = data)"
>
diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue
index ef844824f..243d4c7cb 100644
--- a/src/pages/Item/Card/ItemDescriptor.vue
+++ b/src/pages/Item/Card/ItemDescriptor.vue
@@ -1,18 +1,18 @@
@@ -151,7 +118,7 @@ const openCloneDialog = async () => {
-
+
{{ t('globals.clone') }}
@@ -160,8 +127,8 @@ const openCloneDialog = async () => {
@@ -194,6 +161,18 @@ const openCloneDialog = async () => {
:value="entity.value7"
/>
+
+
+
+ {{ t('Inactive article') }}
+
+
+
{
es:
Regularize stock: Regularizar stock
- All its properties will be copied: Todas sus propiedades serán copiadas
- Do you want to clone this item?: ¿Desea clonar este artículo?
+ Inactive article: Artículo inactivo
es:
New item: Nuevo artículo
- All it's properties will be copied: Todas sus propiedades serán copiadas
- Do you want to clone this item?: ¿Desea clonar este artículo?
Preview: Vista previa
+ Regularize stock: Regularizar stock
diff --git a/src/pages/Item/ItemRequest.vue b/src/pages/Item/ItemRequest.vue
index 25082697d..450031a0e 100644
--- a/src/pages/Item/ItemRequest.vue
+++ b/src/pages/Item/ItemRequest.vue
@@ -1,23 +1,17 @@
-
-
-
-
+
+
+
+ {{ row.ticketFk }}
+
+
+
+
+
+
+ {{ toDate(row.shipped) }}
+
+
+
+
+
+ {{ row.attenderName }}
+
+
-
-
-
-
-
- {{ row.ticketFk }}
-
-
-
-
-
-
- {{ toDateFormat(row.shipped) }}
-
- {{ toDateFormat(row.shipped) }}
-
-
-
-
- {{ row.requesterName }}
-
-
-
-
-
-
-
-
-
- {{ scope.opt?.name }}
- {{ scope.opt?.nickname }},
- {{ scope.opt?.code }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ row.itemDescription }}
-
-
-
-
-
- {{ getState(row.isOk) }}
-
-
-
-
-
-
- {{ row.response }}
-
-
-
-
- {{ t('Discard') }}
-
-
-
-
-
-
-
+
+ {{ row.requesterName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.itemDescription }}
+
+
+
+ handleScopeDays(evt.target.value)"
+ @remove="handleScopeDays()"
+ class="q-px-xs q-pr-lg"
+ filled
+ dense
/>
-
-
+
+
+
+
+
+ {{ row.response }}
+
+
+
+
+ {{ t('Discard') }}
+
+
+
+
+
+
+
+
diff --git a/src/pages/Item/ItemRequestDenyForm.vue b/src/pages/Item/ItemRequestDenyForm.vue
index be70fb799..c9a4cbe9c 100644
--- a/src/pages/Item/ItemRequestDenyForm.vue
+++ b/src/pages/Item/ItemRequestDenyForm.vue
@@ -10,6 +10,7 @@ defineProps({
requestId: {
type: Number,
default: null,
+ required: true,
},
});
@@ -43,6 +44,7 @@ onMounted(async () => {
type="textarea"
v-model="data.observation"
fill-input
+ :required="true"
autogrow
/>
diff --git a/src/pages/Item/ItemTypeList.vue b/src/pages/Item/ItemTypeList.vue
index d874a5dcb..13dd56a42 100644
--- a/src/pages/Item/ItemTypeList.vue
+++ b/src/pages/Item/ItemTypeList.vue
@@ -1,113 +1,121 @@
+ (ItemCategoriesOptions = data)"
+ auto-load
+ />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ t('New item type') }}
-
-
+
+
+
+ es:
+ id: Id
+ code: Código
+ name: Nombre
+ worker: Trabajador
+ ItemCategory: Reino
+ Temperature: Temperatura
+ Create ItemTypes: Crear familia
+ en:
+ code: Code
+ name: Name
+ worker: Worker
+ ItemCategory: ItemCategory
+ Temperature: Temperature
+
diff --git a/src/pages/Item/composables/cloneItem.js b/src/pages/Item/composables/cloneItem.js
new file mode 100644
index 000000000..2421c0808
--- /dev/null
+++ b/src/pages/Item/composables/cloneItem.js
@@ -0,0 +1,36 @@
+import axios from 'axios';
+import { useRouter } from 'vue-router';
+import { useI18n } from 'vue-i18n';
+import { useQuasar } from 'quasar';
+import VnConfirm from 'components/ui/VnConfirm.vue';
+
+export function cloneItem() {
+ const { t } = useI18n();
+
+ const quasar = useQuasar();
+ const router = useRouter();
+ const cloneItem = async (entityId) => {
+ const { id } = entityId;
+ try {
+ const { data } = await axios.post(`Items/${id ?? entityId}/clone`);
+ router.push({ name: 'ItemTags', params: { id: data.id } });
+ } catch (err) {
+ console.error('Error cloning item');
+ }
+ };
+
+ const openCloneDialog = async (entityId) => {
+ quasar
+ .dialog({
+ component: VnConfirm,
+ componentProps: {
+ title: t('item.descriptor.clone.title'),
+ message: t('item.descriptor.clone.subTitle'),
+ },
+ })
+ .onOk(async () => {
+ await cloneItem(entityId);
+ });
+ };
+ return { openCloneDialog };
+}
diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml
index c32ee493c..e99853760 100644
--- a/src/pages/Item/locale/en.yml
+++ b/src/pages/Item/locale/en.yml
@@ -88,3 +88,127 @@ itemType:
worker: Worker
category: Category
temperature: Temperature
+item:
+ params:
+ daysOnward: Days onward
+ search: General search
+ ticketFk: Ticket id
+ attenderFk: Atender
+ clientFk: Client id
+ warehouseFk: Warehouse
+ requesterFk: Salesperson
+ from: From
+ to: To
+ mine: For me
+ state: State
+ myTeam: My team
+ searchbar:
+ label: Search item
+ descriptor:
+ item: Item
+ buyer: Buyer
+ color: Color
+ category: Category
+ stems: Stems
+ visible: Visible
+ available: Available
+ warehouseText: 'Calculated on the warehouse of { warehouseName }'
+ itemDiary: Item diary
+ producer: Producer
+ clone:
+ title: All its properties will be copied
+ subTitle: Do you want to clone this item?
+ list:
+ id: Identifier
+ grouping: Grouping
+ packing: Packing
+ description: Description
+ stems: Stems
+ category: Category
+ typeName: Type
+ intrastat: Intrastat
+ isActive: Active
+ size: Size
+ origin: Origin
+ userName: Buyer
+ weightByPiece: Weight/Piece
+ stemMultiplier: Multiplier
+ producer: Producer
+ landed: Landed
+ basicData:
+ type: Type
+ reference: Reference
+ relevancy: Relevancy
+ stems: Stems
+ multiplier: Multiplier
+ generic: Generic
+ intrastat: Intrastat
+ expense: Expense
+ weightByPiece: Weight/Piece
+ boxUnits: Units/Box
+ recycledPlastic: Recycled Plastic
+ nonRecycledPlastic: Non recycled plastic
+ isActive: Active
+ hasKgPrice: Price in kg
+ isFragile: Fragile
+ isFragileTooltip: Is shown at website, app that this item cannot travel (wreath, palms, ...)
+ isPhotoRequested: Do photo
+ isPhotoRequestedTooltip: This item does need a photo
+ description: Description
+ fixedPrice:
+ itemFk: Item ID
+ groupingPrice: Grouping price
+ packingPrice: Packing price
+ hasMinPrice: Has min price
+ minPrice: Min price
+ started: Started
+ ended: Ended
+ warehouse: Warehouse
+ create:
+ name: Name
+ tag: Tag
+ priority: Priority
+ type: Type
+ intrastat: Intrastat
+ origin: Origin
+ buyRequest:
+ ticketId: 'Ticket ID'
+ shipped: 'Shipped'
+ requester: 'Requester'
+ requested: 'Requested'
+ price: 'Price'
+ attender: 'Attender'
+ item: 'Item'
+ achieved: 'Achieved'
+ concept: 'Concept'
+ state: 'State'
+ summary:
+ basicData: 'Basic data'
+ otherData: 'Other data'
+ description: 'Description'
+ tax: 'Tax'
+ tags: 'Tags'
+ botanical: 'Botanical'
+ barcode: 'Barcode'
+ name: 'Nombre'
+ completeName: 'Nombre completo'
+ family: 'Familia'
+ size: 'Medida'
+ origin: 'Origen'
+ stems: 'Tallos'
+ multiplier: 'Multiplicador'
+ buyer: 'Comprador'
+ doPhoto: 'Do photo'
+ intrastatCode: 'Código intrastat'
+ intrastat: 'Intrastat'
+ ref: 'Referencia'
+ relevance: 'Relevancia'
+ weight: 'Peso (gramos)/tallo'
+ units: 'Unidades/caja'
+ expense: 'Gasto'
+ generic: 'Genérico'
+ recycledPlastic: 'Plástico reciclado'
+ nonRecycledPlastic: 'Plástico no reciclado'
+ minSalesQuantity: 'Cantidad mínima de venta'
+ genus: 'Genus'
+ specie: 'Specie'
diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml
index d32cb7885..56c6ec317 100644
--- a/src/pages/Item/locale/es.yml
+++ b/src/pages/Item/locale/es.yml
@@ -88,3 +88,129 @@ itemType:
worker: Trabajador
category: Reino
temperature: Temperatura
+params:
+ state: asfsdf
+item:
+ params:
+ daysOnward: Días adelante
+ search: Búsqueda general
+ ticketFk: Id ticket
+ attenderFk: Comprador
+ clientFk: Id cliente
+ warehouseFk: Almacén
+ requesterFk: Comercial
+ from: Desde
+ to: Hasta
+ mine: Para mi
+ state: Estado
+ myTeam: Mi equipo
+ searchbar:
+ label: Buscar artículo
+ descriptor:
+ item: Artículo
+ buyer: Comprador
+ color: Color
+ category: Categoría
+ stems: Tallos
+ visible: Visible
+ available: Disponible
+ warehouseText: 'Calculado sobre el almacén de { warehouseName }'
+ itemDiary: Registro de compra-venta
+ producer: Productor
+ clone:
+ title: Todas sus propiedades serán copiadas
+ subTitle: ¿Desea clonar este artículo?
+ list:
+ id: Identificador
+ grouping: Grouping
+ packing: Packing
+ description: Descripción
+ stems: Tallos
+ category: Reino
+ typeName: Tipo
+ intrastat: Intrastat
+ isActive: Activo
+ size: Medida
+ origin: Origen
+ weightByPiece: Peso (gramos)/tallo
+ userName: Comprador
+ stemMultiplier: Multiplicador
+ producer: Productor
+ landed: F. entrega
+ basicData:
+ type: Tipo
+ reference: Referencia
+ relevancy: Relevancia
+ stems: Tallos
+ multiplier: Multiplicador
+ generic: Genérico
+ intrastat: Intrastat
+ expense: Gasto
+ weightByPiece: Peso (gramos)/tallo
+ boxUnits: Unidades/caja
+ recycledPlastic: Plastico reciclado
+ nonRecycledPlastic: Plático no reciclado
+ isActive: Activo
+ hasKgPrice: Precio en kg
+ isFragile: Frágil
+ isFragileTooltip: Se muestra en la web, app que este artículo no puede viajar (coronas, palmas, ...)
+ isPhotoRequested: Hacer foto
+ isPhotoRequestedTooltip: Este artículo necesita una foto
+ description: Descripción
+ fixedPrice:
+ itemFk: ID Artículo
+ groupingPrice: Precio grouping
+ packingPrice: Precio packing
+ hasMinPrice: Tiene precio mínimo
+ minPrice: Precio min
+ started: Inicio
+ ended: Fin
+ warehouse: Almacén
+ create:
+ name: Nombre
+ tag: Etiqueta
+ priority: Prioridad
+ type: Tipo
+ intrastat: Intrastat
+ origin: Origen
+ summary:
+ basicData: 'Datos básicos'
+ otherData: 'Otros datos'
+ description: 'Descripción'
+ tax: 'IVA'
+ tags: 'Etiquetas'
+ botanical: 'Botánico'
+ barcode: 'Código de barras'
+ name: 'Nombre'
+ completeName: 'Nombre completo'
+ family: 'Familia'
+ size: 'Medida'
+ origin: 'Origen'
+ stems: 'Tallos'
+ multiplier: 'Multiplicador'
+ buyer: 'Comprador'
+ doPhoto: 'Hacer foto'
+ intrastatCode: 'Código intrastat'
+ intrastat: 'Intrastat'
+ ref: 'Referencia'
+ relevance: 'Relevancia'
+ weight: 'Peso (gramos)/tallo'
+ units: 'Unidades/caja'
+ expense: 'Gasto'
+ generic: 'Genérico'
+ recycledPlastic: 'Plástico reciclado'
+ nonRecycledPlastic: 'Plástico no reciclado'
+ minSalesQuantity: 'Cantidad mínima de venta'
+ genus: 'Genus'
+ specie: 'Specie'
+ buyRequest:
+ ticketId: 'ID Ticket'
+ shipped: 'F. envío'
+ requester: 'Solicitante'
+ requested: 'Solicitado'
+ price: 'Precio'
+ attender: 'Comprador'
+ item: 'Artículo'
+ achieved: 'Conseguido'
+ concept: 'Concepto'
+ state: 'Estado'
diff --git a/src/pages/ItemType/Card/ItemTypeBasicData.vue b/src/pages/ItemType/Card/ItemTypeBasicData.vue
index 1d4a5cf94..1a4a7c9f3 100644
--- a/src/pages/ItemType/Card/ItemTypeBasicData.vue
+++ b/src/pages/ItemType/Card/ItemTypeBasicData.vue
@@ -8,12 +8,14 @@ import FormModel from 'components/FormModel.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
+import VnAvatar from 'src/components/ui/VnAvatar.vue';
const route = useRoute();
const { t } = useI18n();
const categoriesOptions = ref([]);
const temperaturesOptions = ref([]);
+const itemPackingTypesOptions = ref([]);
+ (itemPackingTypesOptions = data)"
+ :filter="{
+ where: { isActive: true },
+ order: 'description ASC',
+ fields: ['code', 'description'],
+ }"
+ auto-load
+ />
+ >
+
+
+
+
{{ scope.opt?.name }}
@@ -80,6 +99,21 @@ const temperaturesOptions = ref([]);
option-label="name"
hide-selected
/>
+
+
+
+
+
+
+
+
diff --git a/src/pages/ItemType/Card/ItemTypeLog.vue b/src/pages/ItemType/Card/ItemTypeLog.vue
new file mode 100644
index 000000000..b3f7a6597
--- /dev/null
+++ b/src/pages/ItemType/Card/ItemTypeLog.vue
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/src/pages/ItemType/locale/en.yml b/src/pages/ItemType/locale/en.yml
index 7889418ea..575d5e402 100644
--- a/src/pages/ItemType/locale/en.yml
+++ b/src/pages/ItemType/locale/en.yml
@@ -4,6 +4,10 @@ shared:
worker: Worker
category: Category
temperature: Temperature
+ life: Life
+ itemPackingType: Item packing type
+ maxRefs: Maximum references
+ fragile: Fragile
summary:
id: id
life: Life
diff --git a/src/pages/ItemType/locale/es.yml b/src/pages/ItemType/locale/es.yml
index 9a94dceb6..09ee5a1f7 100644
--- a/src/pages/ItemType/locale/es.yml
+++ b/src/pages/ItemType/locale/es.yml
@@ -4,6 +4,10 @@ shared:
worker: Trabajador
category: Reino
temperature: Temperatura
+ life: Vida
+ itemPackingType: Tipo de embalaje
+ maxRefs: Referencias máximas
+ fragile: Frágil
summary:
id: id
code: Código
diff --git a/src/pages/Route/RouteAutonomous.vue b/src/pages/Route/RouteAutonomous.vue
index 5ad349942..4a691dbef 100644
--- a/src/pages/Route/RouteAutonomous.vue
+++ b/src/pages/Route/RouteAutonomous.vue
@@ -126,7 +126,7 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
- title: t('Preview'),
+ title: t('components.smartCard.viewSummary'),
icon: 'preview',
isPrimary: true,
action: (row) => viewSummary(row?.routeFk, RouteSummary),
diff --git a/src/pages/Route/RouteExtendedList.vue b/src/pages/Route/RouteExtendedList.vue
index 51da4ec12..dbf646935 100644
--- a/src/pages/Route/RouteExtendedList.vue
+++ b/src/pages/Route/RouteExtendedList.vue
@@ -204,7 +204,7 @@ const columns = computed(() => [
isPrimary: true,
},
{
- title: t('route.components.smartCard.viewSummary'),
+ title: t('components.smartCard.viewSummary'),
icon: 'preview',
action: (row) => viewSummary(row?.id, RouteSummary),
isPrimary: true,
diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue
index 3426db880..7529d4908 100644
--- a/src/pages/Ticket/Card/TicketSale.vue
+++ b/src/pages/Ticket/Card/TicketSale.vue
@@ -605,6 +605,7 @@ watch(
:ticket-config="ticketConfig"
@get-mana="getMana()"
@update-discounts="updateDiscount"
+ @refresh-table="resetChanges"
/>
{
await axios.post(`Sales/recalculatePrice`, props.sales);
notify(t('globals.dataSaved'), 'positive');
+ emit('refreshTable', props.sales);
};
const changeMultipleDiscount = () => {
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index c8687ed5f..dd1f2d69a 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -204,7 +204,7 @@ const columns = computed(() => [
action: (row) => redirectToLines(row.id),
},
{
- title: t('ticketList.summary'),
+ title: t('components.smartCard.viewSummary'),
icon: 'preview',
isPrimary: true,
action: (row) => viewSummary(row.id, TicketSummary),
diff --git a/src/pages/Worker/Card/WorkerCard.vue b/src/pages/Worker/Card/WorkerCard.vue
index 5f9fa0f8e..428731a5c 100644
--- a/src/pages/Worker/Card/WorkerCard.vue
+++ b/src/pages/Worker/Card/WorkerCard.vue
@@ -6,7 +6,7 @@ import WorkerFilter from '../WorkerFilter.vue';
{
ref="summary"
:url="`Workers/summary`"
:filter="{ where: { id: entityId } }"
- data-key="WorkerSummary"
+ data-key="Worker"
>
{{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }}
diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue
index 7a3f760bc..022cecdc6 100644
--- a/src/pages/Worker/WorkerList.vue
+++ b/src/pages/Worker/WorkerList.vue
@@ -169,7 +169,7 @@ async function autofillBic(worker) {
@@ -191,13 +191,13 @@ async function autofillBic(worker) {
/>
-
+
.q-btn > .q-btn__content > .q-icon').click();
- cy.hasNotify('WorkCenter removed successfully');
+ cy.checkNotification('WorkCenter removed successfully');
});
});
diff --git a/test/cypress/integration/worker/workerNotificationsManager.spec.js b/test/cypress/integration/worker/workerNotificationsManager.spec.js
index 367287a5a..f121b3894 100644
--- a/test/cypress/integration/worker/workerNotificationsManager.spec.js
+++ b/test/cypress/integration/worker/workerNotificationsManager.spec.js
@@ -17,7 +17,9 @@ describe('WorkerNotificationsManager', () => {
cy.login('developer');
cy.visit(`/#/worker/${salesPersonId}/notifications`);
cy.get(firstAvailableNotification).click();
- cy.hasNotify('The notification subscription of this worker cant be modified');
+ cy.checkNotification(
+ 'The notification subscription of this worker cant be modified'
+ );
});
it('should active a notification that is yours', () => {
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index e1bf6c950..c9b1a748e 100755
--- a/test/cypress/support/commands.js
+++ b/test/cypress/support/commands.js
@@ -253,6 +253,13 @@ Cypress.Commands.add('validateContent', (selector, expectedValue) => {
cy.get(selector).should('have.text', expectedValue);
});
+Cypress.Commands.add('openActionDescriptor', (opt) => {
+ cy.openActionsDescriptor();
+ const listItem = '[role="menu"] .q-list .q-item';
+ cy.contains(listItem, opt).click();
+ 1;
+});
+
Cypress.Commands.add('openActionsDescriptor', () => {
cy.get('.header > :nth-child(3) > .q-btn__content > .q-icon').click();
});
@@ -263,8 +270,11 @@ Cypress.Commands.add('openUserPanel', () => {
).click();
});
-Cypress.Commands.add('hasNotify', (text) => {
- //last
+Cypress.Commands.add('openActions', (row) => {
+ cy.get('tbody > tr').eq(row).find('.actions > .q-btn').click();
+});
+
+Cypress.Commands.add('checkNotification', (text) => {
cy.get('.q-notification')
.should('be.visible')
.last()
@@ -273,3 +283,7 @@ Cypress.Commands.add('hasNotify', (text) => {
throw new Error(`Notification not found: "${text}"`);
});
});
+
+Cypress.Commands.add('searchByLabel', (label, value) => {
+ cy.get(`[label="${label}"] > .q-field > .q-field__inner`).type(`${value}{enter}`);
+});