feat: fullscreen mode for all tabs + fix Dropbox/Supabase sync priority

This commit is contained in:
Christian Vidal Wolf
2026-04-23 14:53:43 +02:00
parent e7a3a4619d
commit b14cfe00f0
9 changed files with 145 additions and 25 deletions
+9 -8
View File
@@ -163,19 +163,20 @@ export default function App() {
const articleNo = String(row[articleNoIdx]);
const synced = syncedData[articleNo];
const finalRow = [...row];
if (synced) {
// Smart Merge: Only overlay fields we logically "own" via this app's editors
// Start with Dropbox values (default)
let finalRow = [...row];
// Only preserve Supabase values if there's a PENDING edit for this article
if (synced && synced.status === 'pending') {
// Keep the manually edited values from Supabase
editableColumns.forEach(idx => {
if (synced.data[idx] !== undefined && synced.data[idx] !== null) {
finalRow[idx] = synced.data[idx];
finalRow[idx] = synced.data[idx];
}
});
if (synced.status === 'pending') {
setRowStatuses(prev => ({ ...prev, [articleNo]: 'pending' }));
}
setRowStatuses(prev => ({ ...prev, [articleNo]: 'pending' }));
}
// Otherwise use Dropbox values (don't merge, just process formatting)
return finalRow.map((val: any, idx: number) => {
if (val === undefined || val === null || val === '') return val;