#6825 - VnTable V1 #396

Merged
alexm merged 73 commits from 6825-vnTable into dev 2024-06-20 13:08:55 +00:00
Member
No description provided.
alexm added 19 commits 2024-05-22 12:16:26 +00:00
alexm added 1 commit 2024-05-22 12:20:51 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
4ae580543b
feat(VnTable): refs #6825 execute function when create
alexm added 1 commit 2024-05-22 12:32:48 +00:00
alexm added 1 commit 2024-05-23 07:06:03 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
569df64d8d
feat(VnTable): refs #6825 move to folder. fix checkboxs
alexm added 1 commit 2024-05-23 07:25:34 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
c4441eed1f
fix(VnTable): refs #6825 checkbox align and color
alexm added 1 commit 2024-05-23 08:09:22 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
ac77fea3d7
feat(VnTable): refs #6825 remove field prop. Add actions in table
alexm added 2 commits 2024-05-23 08:39:25 +00:00
alexm added 1 commit 2024-05-23 08:44:48 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2ec4e3540f
fix(VnTable): refs #6825 fix click sticky column
alexm added 1 commit 2024-05-23 11:50:50 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
89e1b3581a
feat(VnTable): refs #6825 use checkbox if startsWith 'is' or 'has'
alexm added 2 commits 2024-05-27 07:28:12 +00:00
alexm added 1 commit 2024-05-27 12:36:56 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
a4baa88cb4
fix(VnTable): refs #6825 VnInputDate
alexm added 1 commit 2024-05-28 05:45:07 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
0f1c91d36c
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6825-vnTable
alexm added 1 commit 2024-05-28 06:48:12 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
a4db4bd2a5
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6825-vnTable
alexm added 1 commit 2024-05-29 05:47:54 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
92244ad96b
feat(VnTable): refs #6825 merge where's
pablone requested changes 2024-06-04 08:23:04 +00:00
Dismissed
@ -0,0 +447,4 @@
width: 12px;
}
*::-webkit-scrollbar-track {
Member

scrollbar en app.scss

/* ===== Scrollbar CSS ===== /
/
Firefox */

  • {
    scrollbar-width: auto;
    scrollbar-color: $primary;
    }

/* Chrome, Edge, and Safari */
*::-webkit-scrollbar {
width: 10px;
height: 10px;
}

*::-webkit-scrollbar-thumb {
background-color: $primary;
border-radius: 10px;
}

scrollbar en app.scss /* ===== Scrollbar CSS ===== */ /* Firefox */ * { scrollbar-width: auto; scrollbar-color: $primary; } /* Chrome, Edge, and Safari */ *::-webkit-scrollbar { width: 10px; height: 10px; } *::-webkit-scrollbar-thumb { background-color: $primary; border-radius: 10px; }
alexm marked this conversation as resolved
alexm added 1 commit 2024-06-05 08:38:48 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
cb4a5f8d1b
fix: refs #6825 css
alexm added 1 commit 2024-06-10 07:19:51 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
bbf847e1a0
feat(url): sepate filters
alexm added 1 commit 2024-06-10 09:53:53 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
128904970b
fix(url): filter
alexm added 1 commit 2024-06-10 11:14:37 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
ed07b4d620
fix(url): redirect
alexm added 1 commit 2024-06-11 09:41:05 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
f753eddc43
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6825-vnTable
alexm added 1 commit 2024-06-11 13:00:50 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
00da1c2808
feat: adapt tu VnTable → CrudModel
alexm added 1 commit 2024-06-11 13:01:03 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
3dfe3226ac
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6825-vnTable
alexm added 1 commit 2024-06-12 05:31:33 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
048685277f
Merge branch 'dev' into 6825-vnTable
alexm added 1 commit 2024-06-12 09:01:29 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
c4cbd7f156
feat(VnTable): is-editable and use-model. fix: checkbox
alexm added 1 commit 2024-06-14 07:19:58 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
42042ea3cd
fix: SkeletonTable
alexm added 1 commit 2024-06-14 08:53:14 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
bea756d7cb
feat(vnTable): reload data when change url
alexm added 1 commit 2024-06-14 09:35:40 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
cb87d2b419
fix(VnFilter): filter with params
alexm added 1 commit 2024-06-14 09:39:13 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
b282ce540e
remove unnecessay
alexm added 1 commit 2024-06-14 09:49:35 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
f86bc9791b
fix: fix warnings
alexm added 1 commit 2024-06-14 12:54:59 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
d9d54a351f
fix(VnTable): showLabel
alexm added 1 commit 2024-06-17 05:33:07 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
0ad6b260da
fix(VnTable): create scss
alexm added 1 commit 2024-06-17 06:19:32 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
6120c98580
fix(VnTable): warns
alexm added 1 commit 2024-06-17 07:53:42 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
1c6fab0158
fix(VnTable): duplicate fetch
alexm added 1 commit 2024-06-17 07:54:27 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
bc31985a4d
remove console.log
alexm added 1 commit 2024-06-17 08:14:52 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
a479637ee6
feat: customerList is customerExtendedList
alexm added 1 commit 2024-06-17 09:29:41 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
fb1bd5ca72
fix: bug replace
alexm added 1 commit 2024-06-17 10:59:11 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
3394eb10b0
fix(VnFilterPanel): remove key
alexm added 1 commit 2024-06-17 11:00:39 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
e8054467a2
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6825-vnTable
alexm added 1 commit 2024-06-18 07:56:09 +00:00
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
e369ea68d4
fix(VnTable): Qtable v-bind
alexm added 2 commits 2024-06-18 13:20:13 +00:00
alexm added 1 commit 2024-06-19 07:42:14 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
40842f4ba6
test(arrayData) add front test
alexm changed title from WIP: 6825-vnTable to 6825-vnTable 2024-06-19 07:44:42 +00:00
alexm requested review from jsegarra 2024-06-19 07:44:58 +00:00
jsegarra started working 2024-06-19 07:55:30 +00:00
alexm added 1 commit 2024-06-19 07:55:37 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
b5bf4bab54
feat(CustomerFIlter): use correct table
jsegarra requested changes 2024-06-19 09:06:59 +00:00
@ -0,0 +19,4 @@
<span
v-for="col of columns"
:key="col.name"
@click="stopEventPropagation($event)"
Member

Si quitas $event, se le pasa igualmente

Si quitas $event, se le pasa igualmente
alexm marked this conversation as resolved
@ -0,0 +38,4 @@
<QIcon v-else :name="col.chip.icon" color="primary-light" />
</QChip>
</span>
<slot name="afterChip" :row="row"></slot>
Member

Duda, si hay uno, podemos quitar el nombre?
Porque revisando una instancia me ha dado a entender que había mas de uno, y no es así.

Duda, si hay uno, podemos quitar el nombre? Porque revisando una instancia me ha dado a entender que había mas de uno, y no es así.
Author
Member

pongo un beforeChip asi estan las dos posibilidades

pongo un beforeChip asi estan las dos posibilidades
alexm marked this conversation as resolved
@ -0,0 +9,4 @@
import VnInputDate from 'components/common/VnInputDate.vue';
import VnComponent from 'components/common/VnComponent.vue';
const model = defineModel();
Member

Me sale un warning en consola

Me sale un warning en consola
Author
Member

He tenido que poner const model = defineModel(undefined, { required: true }); para que no sale el warning, yo creo que es mas cosa de el linter...
De hecho lo uso como esta en la documentación: https://vuejs.org/guide/components/v-model

He tenido que poner `const model = defineModel(undefined, { required: true });` para que no sale el warning, yo creo que es mas cosa de el linter... De hecho lo uso como esta en la documentación: https://vuejs.org/guide/components/v-model
alexm marked this conversation as resolved
@ -0,0 +27,4 @@
default: 'params',
},
});
const model = defineModel();
Member

warning

warning
Member

Yo te iba a sugerir esta linea // eslint-disable-next-line vue/require-prop-types

Yo te iba a sugerir esta linea `// eslint-disable-next-line vue/require-prop-types`
alexm marked this conversation as resolved
@ -0,0 +36,4 @@
'keyup.enter': () => addFilter(model.value),
remove: () => addFilter(null),
};
const components = {
Member

Hay muchas lineas/props repetidas

Mi propuesta es definir un componente base donde se añadan atributos que sean genericos

const baseComponent = (component, event) => ({
    component: markRaw(component),
    event,
    forceAttrs: {
        label: $props.showTitle ? '' : $props.column.label,
    },
    attrs: {
        class: 'q-px-sm q-pb-xs q-pt-none',
        dense: true,
        filled: !$props.showTitle,
    },
});

Para input quedaría algo así:

  input: {
        ...baseComponent(VnInput),
        attrs: {
            clearable: true,
        },
    },
Hay muchas lineas/props repetidas Mi propuesta es definir un componente base donde se añadan atributos que sean genericos ``` const baseComponent = (component, event) => ({ component: markRaw(component), event, forceAttrs: { label: $props.showTitle ? '' : $props.column.label, }, attrs: { class: 'q-px-sm q-pb-xs q-pt-none', dense: true, filled: !$props.showTitle, }, }); ``` Para input quedaría algo así: ``` input: { ...baseComponent(VnInput), attrs: { clearable: true, }, }, ```
Author
Member

Lo he probado y no funciona pq al fusionar objetos se fusionan de manera superficial. es decir los objetos anidados no se fusionan se machacan.
Quedando input como:

  attrs: {
            clearable: true,
        },

Habría que hacerlo a nivel de attrs, forceAttrs, etc

Lo he probado y no funciona pq al fusionar objetos se fusionan de manera superficial. es decir los objetos anidados no se fusionan se machacan. Quedando input como: ``` attrs: { clearable: true, }, ``` Habría que hacerlo a nivel de attrs, forceAttrs, etc
alexm marked this conversation as resolved
@ -0,0 +116,4 @@
}
function alignRow() {
if ($props.column.align == 'left') return 'justify-start items-start';
Member

No creo que se definan mas posiciones o posiciones "custom", sino considerar cambiar por un switch o un objeto.

No creo que se definan mas posiciones o posiciones "custom", sino considerar cambiar por un switch o un objeto.
Author
Member

No soy demasiado fan de swtich la vd, pero cambiado

    if ($props.column.align == 'left') return 'justify-start items-start';
    if ($props.column.align == 'right') return 'justify-end items-end';
    return 'flex-center';

a

    switch ($props.column.align) {
        case 'left':
            return 'justify-start items-start';
        case 'right':
            return 'justify-end items-end';
        default:
            return 'flex-center';
    }
No soy demasiado fan de swtich la vd, pero cambiado ``` if ($props.column.align == 'left') return 'justify-start items-start'; if ($props.column.align == 'right') return 'justify-end items-end'; return 'flex-center'; ``` a ``` switch ($props.column.align) { case 'left': return 'justify-start items-start'; case 'right': return 'justify-end items-end'; default: return 'flex-center'; } ```
alexm marked this conversation as resolved
@ -0,0 +136,4 @@
>
<VnTableColumn
:column="$props.column"
:row="{}"
Member

Se puede añadir default: () => {} a la definición de la columna?

Se puede añadir default: () => {} a la definición de la columna?
alexm marked this conversation as resolved
@ -0,0 +143,4 @@
component-prop="columnFilter"
/>
</div>
<div v-else-if="showTitle" style="height: 45px"><!-- fixme! --></div>
Member

fixme??

fixme??
alexm marked this conversation as resolved
@ -0,0 +21,4 @@
},
defaultMode: {
type: String,
default: 'card', // 'table', 'card'
Member

'card' se repite 5 veces
'table' se repite 7 veces

Propuesta, definir constantes

'card' se repite 5 veces 'table' se repite 7 veces Propuesta, definir constantes
Author
Member

Si me cuentas las propiedades de los objetos si jajaj
Pasado a constantes

Si me cuentas las propiedades de los objetos si jajaj Pasado a constantes
alexm marked this conversation as resolved
@ -0,0 +156,4 @@
router.push({ path: `/${$props.redirect}/${id}` });
}
function stopEventPropagation(event) {
Member

Revisar las llamadas porque no es necesario pasarle $event

Revisar las llamadas porque no es necesario pasarle $event
alexm marked this conversation as resolved
@ -0,0 +187,4 @@
>
<QScrollArea class="fit">
<VnFilterPanel
:data-key="$attrs['data-key']"
Member

Se repite 4 veces

Se repite 4 veces
Author
Member

Inevitable

Inevitable
alexm marked this conversation as resolved
@ -0,0 +211,4 @@
</VnFilterPanel>
</QScrollArea>
</QDrawer>
<!-- class in div to fix warn-->
Member

👀

👀
Author
Member

Es un comentario

Es un comentario
alexm marked this conversation as resolved
@ -0,0 +246,4 @@
<slot name="top-left"></slot>
</template>
<template #top-right>
<!-- <QBtn
Member

👀

👀
alexm marked this conversation as resolved
@ -0,0 +287,4 @@
<QTh auto-width class="sticky" />
</template>
<template #body-cell-tableStatus="{ col, row }">
<QTd auto-width :class="`text-${col.align ?? 'left'}`">
Member

Este template de class se repite 3 veces

Este template de class se repite 3 veces
alexm marked this conversation as resolved
jsegarra stopped working 2024-06-19 10:16:37 +00:00
2 hours 21 minutes
jsegarra changed title from 6825-vnTable to #6825 - VnTable 2024-06-19 10:16:56 +00:00
alexm added 3 commits 2024-06-19 13:02:56 +00:00
alexm added 1 commit 2024-06-19 13:18:45 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
702b031650
feat(VnFilter): merge objects
alexm added 1 commit 2024-06-20 08:47:51 +00:00
alexm added 1 commit 2024-06-20 08:55:35 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
03be4bc0e6
refactors
alexm added 1 commit 2024-06-20 10:26:07 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
28b241bb77
Merge branch 'dev' into 6825-vnTable
alexm changed title from #6825 - VnTable to #6825 - VnTable V1 2024-06-20 10:26:22 +00:00
alexm added 2 commits 2024-06-20 10:33:12 +00:00
alexm added 1 commit 2024-06-20 12:26:17 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
09545cb2c0
fix: WorkerNotificationsManager test
alexm requested review from pablone 2024-06-20 12:35:22 +00:00
alexm requested review from jsegarra 2024-06-20 12:35:23 +00:00
alexm added 1 commit 2024-06-20 12:35:37 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
1b3828ceba
Merge branch 'dev' into 6825-vnTable
jgallego removed review request for pablone 2024-06-20 12:42:52 +00:00
jgallego dismissed pablone’s review 2024-06-20 12:42:59 +00:00
Reason:

gracies

pablone approved these changes 2024-06-20 12:50:11 +00:00
jsegarra approved these changes 2024-06-20 13:08:10 +00:00
@ -166,3 +170,1 @@
if (isNaN(value) && !isNaN(Date.parse(value))) {
return toDate(value);
}
if (typeof value === 'boolean') return value ? t('Yes') : t('No');
Member

Si la operacion ternaria es para el valor de la traducción, porque no ponerla dentro de la funcion t?

Otra cosa es, hacen falta las traducciones? Porque en globals tenemos yes y no

Si la operacion ternaria es para el valor de la traducción, porque no ponerla dentro de la funcion t? Otra cosa es, hacen falta las traducciones? Porque en globals tenemos yes y no
alexm merged commit bcda488aae into dev 2024-06-20 13:08:55 +00:00
alexm deleted branch 6825-vnTable 2024-06-20 13:08:55 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
4 Participants
Notifications
Total Time Spent: 2 hours 21 minutes
jsegarra
2 hours 21 minutes
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix-front#396
No description provided.