| | |
| | | if (event === 'sent-to-queue' && data.field) { |
| | | const fieldName = data.field.config.name; |
| | | const itemId = data.field.config.itemID; |
| | | if (itemId && fieldName && this.changes.has(itemId)) { |
| | | delete this.changes.get(itemId)[fieldName]; |
| | | } |
| | | // Also clear from IndexedDB store |
| | | this.changesStore.get(itemId).then(stored => { |
| | | if (stored && stored[fieldName] !== undefined) { |
| | | delete stored[fieldName]; |
| | | this.changesStore.save(stored); |
| | | if (itemId && fieldName) { |
| | | if (this.changes.has(itemId)) { |
| | | delete this.changes.get(itemId)[fieldName]; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | await this.handleBackup(); |
| | | } |
| | | const changes = await this.changesStore.getAll(); |
| | | console.log('Saving Changes: ', changes); |
| | | if (changes.length === 0) return; |
| | | |
| | | if (title === '') { |