Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
node_crisp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
web
node_crisp
Commits
a951358c
Commit
a951358c
authored
Sep 03, 2021
by
Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Agrega parseo de fecha
parent
5c15fa05
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
ips_turnos_bajo_demanda.js
handlers/ips_turnos_bajo_demanda.js
+1
-1
is_turnos_programados.js
handlers/is_turnos_programados.js
+3
-2
No files found.
handlers/ips_turnos_bajo_demanda.js
View file @
a951358c
...
...
@@ -122,7 +122,7 @@ module.exports =
resp_correo
:
async
function
(
message
,
userData
,
website_id
,
session_id
){
await
crisp
.
showWritingIcon
(
website_id
,
session_id
);
userData
[
CORREO
]
=
message
.
content
;
let
existeUsuario
=
await
is
.
existeUsuario
(
userData
[
TIPO_DOCUMENTO
],
userData
[
NUMERO_DOCUMENTO
],
userData
[
FECHA_NACIMIENTO
]
,
userData
[
SEXO
]);
let
existeUsuario
=
await
is
.
existeUsuario
(
userData
[
TIPO_DOCUMENTO
],
userData
[
NUMERO_DOCUMENTO
],
fechaArgToFechaUsa
(
userData
[
FECHA_NACIMIENTO
])
,
userData
[
SEXO
]);
if
(
existeUsuario
.
existe
){
if
(
existeUsuario
.
id_persona_federada
!==
null
){
await
this
.
crearTurnoBajoDemanda
(
ID_AGENDA_IPS
,
existeUsuario
.
id_persona_federada
,
message
,
userData
,
website_id
,
session_id
);
...
...
handlers/is_turnos_programados.js
View file @
a951358c
...
...
@@ -420,7 +420,7 @@ module.exports =
resp_correo
:
async
function
(
message
,
userData
,
website_id
,
session_id
){
userData
[
CORREO
]
=
message
.
content
;
await
crisp
.
updateCrispData
(
website_id
,
session_id
,
userData
[
CORREO
],
userData
[
TIPO_DOCUMENTO
],
userData
[
NUMERO_DOCUMENTO
],
userData
[
FECHA_NACIMIENTO
],
userData
[
SEXO
]);
let
existeUsuario
=
await
is
.
existeUsuario
(
userData
[
TIPO_DOCUMENTO
],
userData
[
NUMERO_DOCUMENTO
],
userData
[
FECHA_NACIMIENTO
]
,
userData
[
SEXO
]);
let
existeUsuario
=
await
is
.
existeUsuario
(
userData
[
TIPO_DOCUMENTO
],
userData
[
NUMERO_DOCUMENTO
],
fechaArgToFechaUsa
(
userData
[
FECHA_NACIMIENTO
])
,
userData
[
SEXO
]);
if
(
!
existeUsuario
.
existe
){
await
crisp
.
sendTextMessage
(
website_id
,
session_id
,
'No se pudieron validar sus datos. Solicite por favor su acceso por email ingresando al siguiente link'
...
...
@@ -445,7 +445,8 @@ module.exports =
}
else
{
await
crisp
.
sendTextMessage
(
website_id
,
session_id
,
'Ha ocurrido un error al reservar el turno, intente nuevamente'
);
await
crisp
.
updateUserData
(
website_id
,
session_id
,
{});
userData
=
{};
await
crisp
.
updateUserData
(
website_id
,
session_id
,
userData
);
await
this
.
ask_reservar_turno
(
message
,
userData
,
website_id
,
session_id
);
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment