This commit is contained in:
@@ -1175,6 +1175,7 @@ function connectToServer() {
|
||||
const db = getLocalDb();
|
||||
if (!db) {
|
||||
addLog('❌ Falha ao acessar banco de dados local para CRUD.');
|
||||
if (data.eventId) socket.emit('remote-crud-ack', { eventId: data.eventId, pcName: config.clientName, success: false, error: 'Falha banco local' });
|
||||
return;
|
||||
}
|
||||
if (data.action === 'create') {
|
||||
@@ -1197,8 +1198,14 @@ function connectToServer() {
|
||||
stmt.run(pName);
|
||||
addLog('✅ Paciente excluído com sucesso localmente!');
|
||||
}
|
||||
if (data.eventId) {
|
||||
socket.emit('remote-crud-ack', { eventId: data.eventId, pcName: config.clientName, success: true });
|
||||
}
|
||||
} catch (e) {
|
||||
addLog(`❌ Erro no CRUD remoto: ${e.message}`);
|
||||
if (data.eventId) {
|
||||
socket.emit('remote-crud-ack', { eventId: data.eventId, pcName: config.clientName, success: false, error: e.message });
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "rx.scoreodonto.com-client",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "rx.scoreodonto.com-client",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.3",
|
||||
"dependencies": {
|
||||
"chokidar": "^3.5.3",
|
||||
"electron-updater": "^6.3.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rx.scoreodonto.com-client",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.3",
|
||||
"author": "ScoreOdonto",
|
||||
"description": "Cliente Windows para envio de imagens dentais da ScoreOdonto",
|
||||
"main": "index.js",
|
||||
|
||||
Reference in New Issue
Block a user