- aggiornamenti guida RIS, FAQ

- Editor HTML aggiunto CSS e Script
- Statistiche
- CRISBalanceBar
- Inizio Sync... (ma disattivato)
This commit is contained in:
Surya Paolo
2025-12-02 22:16:24 +01:00
parent 8b6a636a96
commit a51bc5a8a2
53 changed files with 8041 additions and 1177 deletions

View File

@@ -6,6 +6,9 @@ $border-radius: 10px;
$transition-speed: 0.3s;
$mobile-breakpoint: 768px;
@use 'sass:color';
$shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
$shadow-md: 0 2px 6px rgba(0, 0, 0, 0.08);
$shadow-hover: 0 4px 12px rgba(25, 118, 210, 0.15);
@@ -219,9 +222,16 @@ $shadow-hover: 0 4px 12px rgba(25, 118, 210, 0.15);
}
.grid-card-item {
width: 100%;
background: rgba(255, 255, 255, 0.7);
backdrop-filter: blur(8px);
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.9);
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
padding: 8px; // Spazio tra carousel e card
@media (max-width: $mobile-breakpoint) {
width: 100%;
padding: 4px; // Ridotto su mobile
}
}

View File

@@ -1451,84 +1451,95 @@ export default defineComponent({
}
function onRequest(myprops: any) {
const { page, rowsPerPage, rowsNumber, sortBy, descending } = myprops.pagination;
const myfilternow = myfilter.value;
const myfilterandnow = myfilterand.value;
try {
const { page, rowsPerPage, rowsNumber, sortBy, descending } = myprops.pagination;
const myfilternow = myfilter.value;
const myfilterandnow = myfilterand.value;
savefilter();
savefilter();
if (!mytable.value) {
startsearch.value = false;
return;
}
// console.log('myfilterandnow', myfilterandnow, 'myfilterandnow', myfilterandnow)
// console.log('onRequest', 'myfilter = ', myfilter.value)
loading.value = true;
spinner_visible.value = true;
// update rowsCount with appropriate value
// function all rows if "All" (0) is rowsel
const fetchCount = rowsPerPage === 0 ? rowsNumber : rowsPerPage;
// calculate starting row of data
const startRow = (page - 1) * rowsPerPage;
const endRow = startRow + fetchCount;
console.log('onRequest: startRow', startRow, 'endRow', endRow);
serverData.value = [];
// fetch data from "server"
return fetchFromServer(
startRow,
endRow,
myfilternow,
myfilterandnow,
sortBy,
descending
).then((ris: any) => {
pagination.value.rowsNumber = getRowsNumberCount();
// clear out existing data and add new
if (!returnedData.value || returnedData.value.length === 0) {
serverData.value = [];
} else {
// if (serverData.length > 0)
// serverData.splice(0, serverData.length, ...returnedData)
// else
try {
serverData.value = [...returnedData.value];
} catch (e) {
serverData.value = [];
}
if (!mytable.value) {
startsearch.value = false;
return;
}
// console.log('serverData', serverData)
// console.log('myfilterandnow', myfilterandnow, 'myfilterandnow', myfilterandnow)
// don't forfunction to update local pagination object
pagination.value.page = page;
pagination.value.rowsPerPage = rowsPerPage;
//pagination.value.sortBy = getObjSort(sortBy, descending)
pagination.value.sortBy = sortBy;
// ordinam.value = sortBy
ordinam_desc.value = descending;
pagination.value.descending = descending;
// console.log('onRequest', 'myfilter = ', myfilter.value)
// console.log('pagination', pagination)
loading.value = true;
// ...and turn of loading indicator
loading.value = false;
spinner_visible.value = false;
changetable.value = false;
startsearch.value = false;
spinner_visible.value = true;
checkScrollPosition();
});
// update rowsCount with appropriate value
// function all rows if "All" (0) is rowsel
const fetchCount = rowsPerPage === 0 ? rowsNumber : rowsPerPage;
// calculate starting row of data
const startRow = (page - 1) * rowsPerPage;
const endRow = startRow + fetchCount;
console.log('onRequest: startRow', startRow, 'endRow', endRow);
if (page > 1) {
// Aggiungi senza duplicati
const existingIds = new Set(serverData.value.map((rec) => rec._id));
const toadd = returnedData.value.filter((elem) => !existingIds.has(elem._id));
serverData.value = [...serverData.value, ...toadd];
} else {
serverData.value = [...returnedData.value];
}
// fetch data from "server"
return fetchFromServer(
startRow,
endRow,
myfilternow,
myfilterandnow,
sortBy,
descending
).then((ris: any) => {
pagination.value.rowsNumber = getRowsNumberCount();
// clear out existing data and add new
if (!returnedData.value || returnedData.value.length === 0) {
serverData.value = [];
} else {
// if (serverData.length > 0)
// serverData.splice(0, serverData.length, ...returnedData)
// else
try {
serverData.value = [...returnedData.value];
} catch (e) {
serverData.value = [];
}
}
// console.log('serverData', serverData)
// don't forfunction to update local pagination object
pagination.value.page = page;
pagination.value.rowsPerPage = rowsPerPage;
//pagination.value.sortBy = getObjSort(sortBy, descending)
pagination.value.sortBy = sortBy;
// ordinam.value = sortBy
ordinam_desc.value = descending;
pagination.value.descending = descending;
// console.log('pagination', pagination)
// ...and turn of loading indicator
loading.value = false;
spinner_visible.value = false;
changetable.value = false;
startsearch.value = false;
checkScrollPosition();
});
} catch (e) {
console.error('Error onrequest', e);
}
}
function onUpdateData(index: number, myprops: any, done: any) {
@@ -1768,6 +1779,20 @@ export default defineComponent({
}
);
watch(
() => searchList.value,
(to, from) => {
if (
searchList.value &&
!changetable.value &&
!startsearch.value &&
!loading.value
) {
refresh();
}
}
);
/*watch(() => myfilterand.value, (newval, oldval) => {
refresh()
})*/

View File

@@ -513,7 +513,6 @@
</q-carousel>
<q-infinite-scroll
ref="myinfscroll"
v-if="!loading"
:initial-index="0"
@load="loadMore"
:offset="350"
@@ -526,14 +525,12 @@
ref="myinfscroll"
v-else-if="
shared_consts.VERTIC_SHOW_GRID.includes(myvertical) &&
!loading &&
alreadymounting
"
:initial-index="0"
@load="onLoadScroll"
:offset="350"
debounce="300"
scroll-target=".carousel-scroll-container"
>
<div v-if="showHeaderCol">
<div
@@ -559,7 +556,7 @@
>
<div
v-for="(row, indexrow) in serverData"
:key="indexrow"
:key="row._id || indexrow"
:class="{
row: opt.rowclass,
'items-stretch': opt.rowclass,
@@ -703,7 +700,6 @@
<q-table
v-else-if="
!shared_consts.VERTIC_SHOW_GRID.includes(myvertical) &&
!loading &&
serverData &&
mycolumns
"