add new event and attendance table with automatic now timestamp
All checks were successful
Build Quasar SPA and Go Backend for memberApp / build-spa (push) Successful in 2m34s
Build Quasar SPA and Go Backend for memberApp / build-backend (amd64, .exe, windows) (push) Successful in 5m39s
Build Quasar SPA and Go Backend for memberApp / build-backend (amd64, , linux) (push) Successful in 5m46s
Build Quasar SPA and Go Backend for memberApp / build-backend (arm, 6, , linux) (push) Successful in 5m32s
Build Quasar SPA and Go Backend for memberApp / build-backend (arm64, , linux) (push) Successful in 5m35s
All checks were successful
Build Quasar SPA and Go Backend for memberApp / build-spa (push) Successful in 2m34s
Build Quasar SPA and Go Backend for memberApp / build-backend (amd64, .exe, windows) (push) Successful in 5m39s
Build Quasar SPA and Go Backend for memberApp / build-backend (amd64, , linux) (push) Successful in 5m46s
Build Quasar SPA and Go Backend for memberApp / build-backend (arm, 6, , linux) (push) Successful in 5m32s
Build Quasar SPA and Go Backend for memberApp / build-backend (arm64, , linux) (push) Successful in 5m35s
This commit is contained in:
@@ -16,101 +16,122 @@ export function useMemberTable() {
|
||||
rowsPerPage: 20,
|
||||
});
|
||||
|
||||
const columns = computed(() => [
|
||||
{ name: 'cake', align: 'center' as const, label: '', field: 'cake', icon: 'cake' },
|
||||
{
|
||||
name: 'firstName',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('prename'),
|
||||
field: 'firstName',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'lastName',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('lastName'),
|
||||
field: 'lastName',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'birthday',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('birthday'),
|
||||
field: 'birthday',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'age',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('age'),
|
||||
field: 'age',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'address',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('address'),
|
||||
field: 'address',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'town',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('town'),
|
||||
field: 'town',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'zip',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('zipCode'),
|
||||
field: 'zip',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'phone',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('phone'),
|
||||
field: 'phone',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'email',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('email'),
|
||||
field: 'email',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'group',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('group'),
|
||||
field: 'group',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'responsiblePerson',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('responsible'),
|
||||
field: 'responsiblePerson',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'firstVisit',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('firstVisit'),
|
||||
field: 'firstVisit',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'lastVisit',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('lastVisit'),
|
||||
field: 'lastVisit',
|
||||
sortable: true,
|
||||
},
|
||||
{ name: 'option', align: 'center' as const, label: '', field: 'option', icon: 'option' },
|
||||
]);
|
||||
//add enabling of each columns
|
||||
const enabledColumns = ref<Record<string, boolean>>({
|
||||
cake: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
birthday: true,
|
||||
age: true,
|
||||
address: false,
|
||||
town: true,
|
||||
zip: true,
|
||||
phone: true,
|
||||
email: true,
|
||||
group: true,
|
||||
responsiblePerson: true,
|
||||
firstVisit: true,
|
||||
lastVisit: true,
|
||||
option: true,
|
||||
});
|
||||
|
||||
const columns = computed(() =>
|
||||
[
|
||||
{ name: 'cake', align: 'center' as const, label: '', field: 'cake', icon: 'cake' },
|
||||
{
|
||||
name: 'firstName',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('prename'),
|
||||
field: 'firstName',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'lastName',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('lastName'),
|
||||
field: 'lastName',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'birthday',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('birthday'),
|
||||
field: 'birthday',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'age',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('age'),
|
||||
field: 'age',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'address',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('address'),
|
||||
field: 'address',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'town',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('town'),
|
||||
field: 'town',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'zip',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('zipCode'),
|
||||
field: 'zip',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'phone',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('phone'),
|
||||
field: 'phone',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'email',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('email'),
|
||||
field: 'email',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'group',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('group'),
|
||||
field: 'group',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'responsiblePerson',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('responsible'),
|
||||
field: 'responsiblePerson',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'firstVisit',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('firstVisit'),
|
||||
field: 'firstVisit',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'lastVisit',
|
||||
align: 'left' as const,
|
||||
label: i18n.global.t('lastVisit'),
|
||||
field: 'lastVisit',
|
||||
sortable: true,
|
||||
},
|
||||
{ name: 'option', align: 'center' as const, label: '', field: 'option', icon: 'option' },
|
||||
].filter((c) => enabledColumns.value[c.name]),
|
||||
);
|
||||
|
||||
const { NotifyResponse } = useNotify();
|
||||
|
||||
@@ -197,6 +218,13 @@ export function useMemberTable() {
|
||||
});
|
||||
}
|
||||
|
||||
function disableColumns(...columns: string[]) {
|
||||
columns.forEach((col) => {
|
||||
if (col in enabledColumns.value) {
|
||||
enabledColumns.value[col] = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
return {
|
||||
members,
|
||||
pagination,
|
||||
@@ -205,5 +233,6 @@ export function useMemberTable() {
|
||||
getRowClass,
|
||||
updateMembers,
|
||||
isXDaysBeforeAnnualDate,
|
||||
disableColumns,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user