mirror of
https://github.com/frappe/books.git
synced 2026-08-24 02:24:17 -05:00
fix: trigger ERPNext sync action to initiate data synchronization
This commit is contained in:
@@ -3,5 +3,5 @@ const { parentPort } = require('worker_threads');
|
||||
|
||||
if (parentPort) {
|
||||
// eslint-disable-next-line
|
||||
parentPort.postMessage({ type: 'trigger-frontend-action' });
|
||||
parentPort.postMessage({ type: 'trigger-erpnext-sync' });
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export async function initScheduler(interval: string) {
|
||||
});
|
||||
|
||||
bree.on('worker created', () => {
|
||||
main.mainWindow?.webContents.send('trigger-frontend-action');
|
||||
main.mainWindow?.webContents.send('trigger-erpnext-sync');
|
||||
});
|
||||
|
||||
await bree.start();
|
||||
|
||||
+1
-1
@@ -215,7 +215,7 @@ const ipc = {
|
||||
},
|
||||
|
||||
registerTriggerFrontendActionListener(listener: IPCRendererListener) {
|
||||
ipcRenderer.on(IPC_CHANNELS.TRIGGER_FRONTEND_ACTION, listener);
|
||||
ipcRenderer.on(IPC_CHANNELS.TRIGGER_ERPNEXT_SYNC, listener);
|
||||
},
|
||||
|
||||
registerConsoleLogListener(listener: IPCRendererListener) {
|
||||
|
||||
@@ -58,6 +58,9 @@ export class AccountingSettings extends Doc {
|
||||
enableLead: () => {
|
||||
return !!this.enableLead;
|
||||
},
|
||||
enableERPNextSync: () => {
|
||||
return !!this.enableERPNextSync;
|
||||
},
|
||||
enableInvoiceReturns: () => {
|
||||
return !!this.enableInvoiceReturns;
|
||||
},
|
||||
|
||||
+1
-1
@@ -46,9 +46,9 @@ export enum IPC_ACTIONS {
|
||||
|
||||
// ipcMain.send(...)
|
||||
export enum IPC_CHANNELS {
|
||||
TRIGGER_ERPNEXT_SYNC = 'trigger-erpnext-sync',
|
||||
LOG_MAIN_PROCESS_ERROR = 'main-process-error',
|
||||
CONSOLE_LOG = 'console-log',
|
||||
TRIGGER_FRONTEND_ACTION = 'trigger-frontend-action',
|
||||
}
|
||||
|
||||
export enum DB_CONN_FAILURE {
|
||||
|
||||
Reference in New Issue
Block a user