#7648 - CustomerView labeler #505
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
|
@ -58,6 +58,7 @@ function addChildren(module, route, parent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const items = ref([]);
|
const items = ref([]);
|
||||||
|
|
||||||
function getRoutes() {
|
function getRoutes() {
|
||||||
if (props.source === 'main') {
|
if (props.source === 'main') {
|
||||||
const modules = Object.assign([], navigation.getModules().value);
|
const modules = Object.assign([], navigation.getModules().value);
|
||||||
|
@ -66,9 +67,8 @@ function getRoutes() {
|
||||||
const moduleDef = routes.find(
|
const moduleDef = routes.find(
|
||||||
(route) => toLowerCamel(route.name) === item.module
|
(route) => toLowerCamel(route.name) === item.module
|
||||||
);
|
);
|
||||||
item.children = [];
|
|
||||||
|
|
||||||
if (!moduleDef) continue;
|
if (!moduleDef) continue;
|
||||||
|
item.children = [];
|
||||||
|
|
||||||
addChildren(item.module, moduleDef, item.children);
|
addChildren(item.module, moduleDef, item.children);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,19 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useSession } from 'src/composables/useSession';
|
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
import PinnedModules from './PinnedModules.vue';
|
import PinnedModules from './PinnedModules.vue';
|
||||||
import UserPanel from 'components/UserPanel.vue';
|
import UserPanel from 'components/UserPanel.vue';
|
||||||
import VnBreadcrumbs from './common/VnBreadcrumbs.vue';
|
import VnBreadcrumbs from './common/VnBreadcrumbs.vue';
|
||||||
|
import VnImg from 'src/components/ui/VnImg.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
const { getTokenMultimedia } = useSession();
|
|
||||||
const token = getTokenMultimedia();
|
|
||||||
const appName = 'Lilium';
|
const appName = 'Lilium';
|
||||||
|
|
||||||
onMounted(() => stateStore.setMounted());
|
onMounted(() => stateStore.setMounted());
|
||||||
|
@ -83,11 +81,12 @@ const pinnedModulesRef = ref();
|
||||||
id="user"
|
id="user"
|
||||||
>
|
>
|
||||||
<QAvatar size="lg">
|
<QAvatar size="lg">
|
||||||
<QImg
|
<VnImg
|
||||||
:src="`/api/Images/user/160x160/${user.id}/download?access_token=${token}`"
|
:id="user.id"
|
||||||
spinner-color="primary"
|
collection="user"
|
||||||
>
|
size="160x160"
|
||||||
</QImg>
|
:zoom-size="null"
|
||||||
|
/>
|
||||||
</QAvatar>
|
</QAvatar>
|
||||||
<QTooltip bottom>
|
<QTooltip bottom>
|
||||||
{{ t('globals.userPanel') }}
|
{{ t('globals.userPanel') }}
|
||||||
|
|
|
@ -12,12 +12,14 @@ import VnRow from 'components/ui/VnRow.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import { useClipboard } from 'src/composables/useClipboard';
|
import { useClipboard } from 'src/composables/useClipboard';
|
||||||
import VnImg from 'src/components/ui/VnImg.vue';
|
import VnImg from 'src/components/ui/VnImg.vue';
|
||||||
|
import { useRole } from 'src/composables/useRole';
|
||||||
|
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const session = useSession();
|
const session = useSession();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t, locale } = useI18n();
|
const { t, locale } = useI18n();
|
||||||
const { copyText } = useClipboard();
|
const { copyText } = useClipboard();
|
||||||
|
|
||||||
const userLocale = computed({
|
const userLocale = computed({
|
||||||
get() {
|
get() {
|
||||||
return locale.value;
|
return locale.value;
|
||||||
|
@ -99,6 +101,7 @@ function saveUserData(param, value) {
|
||||||
axios.post('UserConfigs/setUserConfig', { [param]: value });
|
axios.post('UserConfigs/setUserConfig', { [param]: value });
|
||||||
localUserData();
|
localUserData();
|
||||||
}
|
}
|
||||||
|
const isEmployee = computed(() => useRole().isEmployee());
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -109,12 +112,14 @@ function saveUserData(param, value) {
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
v-if="isEmployee"
|
||||||
|
|||||||
url="Companies"
|
url="Companies"
|
||||||
order="name"
|
order="name"
|
||||||
@on-fetch="(data) => (companiesData = data)"
|
@on-fetch="(data) => (companiesData = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
v-if="isEmployee"
|
||||||
url="Accountings"
|
url="Accountings"
|
||||||
order="name"
|
order="name"
|
||||||
@on-fetch="(data) => (accountBankData = data)"
|
@on-fetch="(data) => (accountBankData = data)"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useSession } from 'src/composables/useSession';
|
import { useSession } from 'src/composables/useSession';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
|
@ -28,21 +28,29 @@ const $props = defineProps({
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
const token = useSession().getTokenMultimedia();
|
const token = useSession().getTokenMultimedia();
|
||||||
const timeStamp = ref(`timestamp=${Date.now()}`);
|
const timeStamp = ref(`timestamp=${Date.now()}`);
|
||||||
const url = computed(
|
import noImage from '/public/no-user.png';
|
||||||
() =>
|
import { useRole } from 'src/composables/useRole';
|
||||||
`/api/${$props.storage}/${$props.collection}/${$props.size}/${$props.id}/download?access_token=${token}&${timeStamp.value}`
|
const url = computed(() => {
|
||||||
);
|
const isEmployee = useRole().isEmployee();
|
||||||
|
return isEmployee
|
||||||
|
? `/api/${$props.storage}/${$props.collection}/${$props.size}/${$props.id}/download?access_token=${token}&${timeStamp.value}`
|
||||||
|
: noImage;
|
||||||
|
});
|
||||||
const reload = () => {
|
const reload = () => {
|
||||||
timeStamp.value = `timestamp=${Date.now()}`;
|
timeStamp.value = `timestamp=${Date.now()}`;
|
||||||
};
|
};
|
||||||
defineExpose({
|
defineExpose({
|
||||||
reload,
|
reload,
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {});
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QImg :src="url" v-bind="$attrs" @click="show = !show" spinner-color="primary" />
|
<QImg
|
||||||
|
:class="{ zoomIn: $props.zoomSize }"
|
||||||
|
:src="url"
|
||||||
|
v-bind="$attrs"
|
||||||
|
@click="show = !show"
|
||||||
|
spinner-color="primary"
|
||||||
|
/>
|
||||||
<QDialog v-model="show" v-if="$props.zoomSize">
|
<QDialog v-model="show" v-if="$props.zoomSize">
|
||||||
<QImg
|
<QImg
|
||||||
:src="url"
|
:src="url"
|
||||||
|
@ -56,7 +64,9 @@ onMounted(() => {});
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.q-img {
|
.q-img {
|
||||||
|
&.zoomIn {
|
||||||
cursor: zoom-in;
|
cursor: zoom-in;
|
||||||
|
}
|
||||||
min-width: 50px;
|
min-width: 50px;
|
||||||
}
|
}
|
||||||
.rounded {
|
.rounded {
|
||||||
|
|
|
@ -27,8 +27,12 @@ export function useRole() {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
function isEmployee() {
|
||||||
|
return hasAny(['employee']);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
isEmployee,
|
||||||
fetch,
|
fetch,
|
||||||
hasAny,
|
hasAny,
|
||||||
state,
|
state,
|
||||||
|
|
|
@ -195,6 +195,7 @@ globals:
|
||||||
autonomous: Autonomous
|
autonomous: Autonomous
|
||||||
suppliers: Suppliers
|
suppliers: Suppliers
|
||||||
supplier: Supplier
|
supplier: Supplier
|
||||||
|
labeler: Labeler
|
||||||
supplierCreate: New supplier
|
supplierCreate: New supplier
|
||||||
accounts: Accounts
|
accounts: Accounts
|
||||||
addresses: Addresses
|
addresses: Addresses
|
||||||
|
|
|
@ -166,6 +166,7 @@ globals:
|
||||||
invoiceIns: Fact. recibidas
|
invoiceIns: Fact. recibidas
|
||||||
invoiceInCreate: Crear fact. recibida
|
invoiceInCreate: Crear fact. recibida
|
||||||
vat: IVA
|
vat: IVA
|
||||||
|
labeler: Etiquetas
|
||||||
dueDay: Vencimiento
|
dueDay: Vencimiento
|
||||||
intrastat: Intrastat
|
intrastat: Intrastat
|
||||||
corrective: Rectificativa
|
corrective: Rectificativa
|
||||||
|
|
|
@ -0,0 +1,120 @@
|
||||||
|
<script setup>
|
||||||
|
import { computed } from 'vue';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { QBtn } from 'quasar';
|
||||||
|
|
||||||
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
|
import { usePrintService } from 'composables/usePrintService';
|
||||||
|
const { openReport } = usePrintService();
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const $props = defineProps({
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
|
|
||||||
|
const entriesTableColumns = computed(() => [
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'itemFk',
|
||||||
|
field: 'itemFk',
|
||||||
|
label: t('globals.id'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'item',
|
||||||
|
label: t('entry.summary.item'),
|
||||||
|
field: (row) => row.item.name,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'packagingFk',
|
||||||
|
label: t('entry.summary.package'),
|
||||||
|
field: 'packagingFk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'stickers',
|
||||||
|
label: t('entry.summary.stickers'),
|
||||||
|
field: 'stickers',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'packing',
|
||||||
|
label: t('entry.summary.packing'),
|
||||||
|
field: 'packing',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'grouping',
|
||||||
|
label: t('entry.summary.grouping'),
|
||||||
|
field: 'grouping',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<QDialog ref="dialogRef">
|
||||||
|
<QCard style="min-width: 800px">
|
||||||
|
<QCardSection class="row items-center q-pb-none">
|
||||||
|
<QAvatar
|
||||||
|
:icon="icon"
|
||||||
|
color="primary"
|
||||||
|
text-color="white"
|
||||||
|
size="xl"
|
||||||
|
v-if="icon"
|
||||||
|
/>
|
||||||
|
<span class="text-h6 text-grey">{{ title }}</span>
|
||||||
|
<QSpace />
|
||||||
|
<QBtn icon="close" :disable="isLoading" flat round dense v-close-popup />
|
||||||
|
</QCardSection>
|
||||||
|
<QCardActions align="right">
|
||||||
|
<QBtn
|
||||||
|
:label="t('Print buys')"
|
||||||
|
color="primary"
|
||||||
|
icon="print"
|
||||||
|
:loading="isLoading"
|
||||||
|
@click="openReport(`Entries/${entityId}/buy-label`)"
|
||||||
|
unelevated
|
||||||
|
autofocus
|
||||||
|
/>
|
||||||
|
</QCardActions>
|
||||||
|
<QCardSection class="row items-center">
|
||||||
|
<VnPaginate
|
||||||
|
ref="entryBuysPaginateRef"
|
||||||
|
:limit="0"
|
||||||
|
data-key="EntryBuys"
|
||||||
|
:url="`Entries/${entityId}/getBuys`"
|
||||||
|
auto-load
|
||||||
|
>
|
||||||
|
<template #body="{ rows }">
|
||||||
|
<QTable
|
||||||
|
:rows="rows"
|
||||||
|
:columns="entriesTableColumns"
|
||||||
|
row-key="id"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
class="q-ml-lg"
|
||||||
|
:grid="$q.screen.lt.md"
|
||||||
|
:no-data-label="t('globals.noResults')"
|
||||||
|
>
|
||||||
|
<template #body="props">
|
||||||
|
<QTr>
|
||||||
|
<QTd v-for="col in props.cols" :key="col.name">
|
||||||
jsegarra marked this conversation as resolved
Outdated
jgallego
commented
? ?
jsegarra
commented
Como tenia que mergear dev y resolver conflictos, lo he formateado Como tenia que mergear dev y resolver conflictos, lo he formateado
d15dc7336b1a49720e6efd04b11139cbb1c81ca4
|
|||||||
|
{{ col.value }}
|
||||||
|
</QTd>
|
||||||
|
</QTr>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
|
</template>
|
||||||
|
</VnPaginate>
|
||||||
|
</QCardSection>
|
||||||
|
</QCard>
|
||||||
|
</QDialog>
|
||||||
jsegarra marked this conversation as resolved
Outdated
jgallego
commented
? ?
jsegarra
commented
Como tenia que mergear dev y resolver conflictos, lo he formateado Como tenia que mergear dev y resolver conflictos, lo he formateado
d15dc7336b1a49720e6efd04b11139cbb1c81ca4
|
|||||||
|
</template>
|
|
@ -0,0 +1,106 @@
|
||||||
|
<script setup>
|
||||||
|
import { computed, onMounted } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||||
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
import { toDate } from 'src/filters/index';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
import EntryBuysTableDialog from './EntryBuysTableDialog.vue';
|
||||||
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
|
|
||||||
|
const stateStore = useStateStore();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const quasar = useQuasar();
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
stateStore.rightDrawer = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
const columns = computed(() => [
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'id',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.id'),
|
||||||
|
chip: {
|
||||||
|
condition: () => true,
|
||||||
|
},
|
||||||
|
isId: true,
|
||||||
|
isTitle: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
label: t('shipped'),
|
||||||
|
name: 'shipped',
|
||||||
|
isTitle: false,
|
||||||
|
create: true,
|
||||||
|
cardVisible: true,
|
||||||
|
format: ({ shipped }) => toDate(shipped),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
label: t('landed'),
|
||||||
|
name: 'landed',
|
||||||
|
isTitle: false,
|
||||||
|
create: true,
|
||||||
|
cardVisible: false,
|
||||||
|
format: ({ landed }) => toDate(landed),
|
||||||
jsegarra marked this conversation as resolved
jgallego
commented
false false
|
|||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
label: t('globals.wareHouseIn'),
|
||||||
|
name: 'warehouseInName',
|
||||||
|
isTitle: false,
|
||||||
|
cardVisible: true,
|
||||||
|
create: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'right',
|
||||||
|
name: 'tableActions',
|
||||||
|
computed,
|
||||||
jsegarra marked this conversation as resolved
jgallego
commented
revisar si se puede no pasar nada revisar si se puede no pasar nada
jsegarra
commented
No pasa nada No pasa nada
|
|||||||
|
actions: [
|
||||||
|
{
|
||||||
|
title: t('printBuys'),
|
||||||
|
icon: 'print',
|
||||||
|
action: (row) => printBuys(row.id),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const printBuys = (rowId) => {
|
||||||
|
quasar.dialog({
|
||||||
|
component: EntryBuysTableDialog,
|
||||||
|
componentProps: {
|
||||||
|
id: rowId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<VnSearchbar
|
||||||
jsegarra marked this conversation as resolved
Outdated
jgallego
commented
subir subir
|
|||||||
|
data-key="EntryList"
|
||||||
|
url="Entries/filter"
|
||||||
|
:label="t('Search entries')"
|
||||||
|
:info="t('You can search by entry reference')"
|
||||||
|
/>
|
||||||
|
<QPage class="column items-center q-pa-md">
|
||||||
|
<div class="vn-card-list">
|
||||||
|
<VnTable
|
||||||
|
ref="myEntriesRef"
|
||||||
|
data-key="myEntriesList"
|
||||||
|
url="Entries/filter"
|
||||||
|
:order="['landed DESC', 'id DESC']"
|
||||||
|
:columns="columns"
|
||||||
|
default-mode="card"
|
||||||
|
auto-load
|
||||||
|
>
|
||||||
|
</VnTable>
|
||||||
|
</div>
|
||||||
|
</QPage>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Search entries: Buscar entradas
|
||||||
|
You can search by entry reference: Puedes buscar por referencia de la entrada
|
||||||
jsegarra marked this conversation as resolved
Outdated
jgallego
commented
quitar quitar
|
|||||||
|
</i18n>
|
|
@ -8,3 +8,4 @@ entryFilter:
|
||||||
reference: Reference
|
reference: Reference
|
||||||
landed: Landed
|
landed: Landed
|
||||||
shipped: Shipped
|
shipped: Shipped
|
||||||
|
printBuys: Print buys
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
Search entries: Buscar entradas
|
Search entries: Buscar entradas
|
||||||
You can search by entry reference: Puedes buscar por referencia de la entrada
|
You can search by entry reference: Puedes buscar por referencia de la entrada
|
||||||
|
|
||||||
entryList:
|
entryList:
|
||||||
list:
|
list:
|
||||||
jsegarra marked this conversation as resolved
Outdated
jgallego
commented
quitar ya exite la traduccion labels quitar ya exite la traduccion labels
|
|||||||
inventoryEntry: Es inventario
|
inventoryEntry: Es inventario
|
||||||
|
@ -11,3 +12,4 @@ entryFilter:
|
||||||
|
|
||||||
landed: F. llegada
|
landed: F. llegada
|
||||||
shipped: F. salida
|
shipped: F. salida
|
||||||
|
Print buys: Imprimir etiquetas
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default {
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'EntryMain' },
|
redirect: { name: 'EntryMain' },
|
||||||
menus: {
|
menus: {
|
||||||
main: ['EntryList', 'EntryLatestBuys'],
|
main: ['EntryList', 'MyEntries', 'EntryLatestBuys'],
|
||||||
card: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'],
|
card: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'],
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
@ -30,6 +30,15 @@ export default {
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Entry/EntryList.vue'),
|
component: () => import('src/pages/Entry/EntryList.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'my',
|
||||||
|
name: 'MyEntries',
|
||||||
|
meta: {
|
||||||
|
title: 'labeler',
|
||||||
|
icon: 'sell',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Entry/MyEntries.vue'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'create',
|
path: 'create',
|
||||||
name: 'EntryCreate',
|
name: 'EntryCreate',
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
describe('WagonTypeCreate', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1920, 1080);
|
||||||
|
cy.login('customer');
|
||||||
|
cy.visit(`/#/entry/my`, {
|
||||||
|
onBeforeLoad(win) {
|
||||||
|
cy.stub(win, 'open');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
cy.waitForElement('.q-page', 6000);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create edit and remove new dms', () => {
|
||||||
|
cy.get(
|
||||||
|
'[to="/null/2"] > .q-card > .column > .q-btn > .q-btn__content > .q-icon'
|
||||||
|
).click();
|
||||||
|
cy.get('.q-card__actions > .q-btn').click();
|
||||||
|
cy.window().its('open').should('be.called');
|
||||||
|
});
|
||||||
|
});
|
|
@ -50,8 +50,8 @@ Cypress.Commands.add('login', (user) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('waitForElement', (element) => {
|
Cypress.Commands.add('waitForElement', (element, timeout = 5000) => {
|
||||||
cy.get(element, { timeout: 5000 }).should('be.visible');
|
cy.get(element, { timeout }).should('be.visible');
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('getValue', (selector) => {
|
Cypress.Commands.add('getValue', (selector) => {
|
||||||
|
@ -241,4 +241,3 @@ Cypress.Commands.add('validateContent', (selector, expectedValue) => {
|
||||||
Cypress.Commands.add('openActionsDescriptor', () => {
|
Cypress.Commands.add('openActionsDescriptor', () => {
|
||||||
cy.get('.descriptor > .header > .q-btn').click();
|
cy.get('.descriptor > .header > .q-btn').click();
|
||||||
});
|
});
|
||||||
// registerCommands();
|
|
||||||
|
|
Loading…
Reference in New Issue
preguntar a @juan una alternativa elegante