mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 18:05:24 +02:00
feat: fullscreen mode for all tabs + fix Dropbox/Supabase sync priority
This commit is contained in:
+9
-8
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user