fix: insert current date into Birthday column if missing
continuous-integration/webhook Client .exe publicado em produção (VPS4)

This commit is contained in:
VPS 4 Builder
2026-06-03 05:02:18 +02:00
parent e9a4193c5c
commit 9a94bcd835
3 changed files with 7 additions and 5 deletions
+4 -2
View File
@@ -1181,8 +1181,10 @@ function connectToServer() {
if (data.action === 'create') {
const p = data.patient;
addLog(`👤 Criando paciente remoto: ${p.fullName}`);
const stmt = db.prepare('INSERT INTO Patients (FirstName, LastName, Doctor, Remark) VALUES (?, ?, ?, ?)');
stmt.run(p.firstName || '', p.lastName || '', p.doctor || '', p.remark || '');
const d = new Date();
const currentDate = `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
const stmt = db.prepare('INSERT INTO Patients (FirstName, LastName, Doctor, Remark, Birthday) VALUES (?, ?, ?, ?, ?)');
stmt.run(p.firstName || '', p.lastName || '', p.doctor || '', p.remark || '', p.birthday || currentDate);
addLog('✅ Paciente criado com sucesso localmente!');
} else if (data.action === 'update') {
const oldName = data.oldName;
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "rx.scoreodonto.com-client",
"version": "1.3.4",
"version": "1.3.5",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "rx.scoreodonto.com-client",
"version": "1.3.4",
"version": "1.3.5",
"dependencies": {
"chokidar": "^3.5.3",
"electron-updater": "^6.3.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "rx.scoreodonto.com-client",
"version": "1.3.5",
"version": "1.3.6",
"author": "ScoreOdonto",
"description": "Cliente Windows para envio de imagens dentais da ScoreOdonto",
"main": "index.js",