Commit bd66543f by Felipe Escala Torres

gitignore+

parent b29a1e65
#directories
bower_components
node_modules
dist
#files
*.tgz
*.log
@klavestad
\ No newline at end of file
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "install",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
\ No newline at end of file
......@@ -80,7 +80,12 @@ input.error {
}
.login-container .page-container .login-form {
width: 400px !important;
width: 300px !important;
height: auto;
}
.login-container .page-container .singing-form {
width: 800px !important;
height: auto;
}
......@@ -151,3 +156,13 @@ body {
bottom: 0;
right: 0;
}
.absolute-center-singing {
/* height: must be declared */
margin: auto;
/* position: absolute !important; */
top: 0;
left: 0;
bottom: 0;
right: 0;
}
\ No newline at end of file
<!-- Content area -->
<div class="content absolute-center">
<div class="content">
<!-- Advanced login -->
<input type="hidden" id="aux">
<form action="#" onsubmit="return false" autocomplete="off">
<div class="some-class text-center">b
<div class="some-class text-center">
<div class="dyclock-digital dyclock-container"></div>
</div>
<div class="login-form containerMe panel-zoom">
<div class="absolute-center-singing singing-form containerMe panel-zoom">
<div class="translucentMe"></div>
<div class="contentMe">
<div class="text-center">
......@@ -22,9 +22,10 @@
</div>
</div>
</form>
<br>
<!--MESSAGE ERROR-->
<div id="dataUserError" style="display: none" class="login-form containerMe panel-zoom">
<div id="dataUserError" style="display: none" class="absolute-center-singing singing-form containerMe panel-zoom">
<div class="msgTranslucent card-3" style="background-color: #821c25"></div>
<div class="contentMe text-center">
<div class="row titleFont">
......@@ -38,7 +39,7 @@
<!--MESSAGE ERROR-->
<!--MESSAGE SUCCESS-->
<div id="dataUserSuccess" style="display: none" class="login-form containerMe panel-zoom">
<div id="dataUserSuccess" style="display: none" class="absolute-center-singing singing-form containerMe panel-zoom">
<div class="msgTranslucent card-3" style="background-color: #4adb58"></div>
<div class="contentMe">
<div class="row text-center titleFont">
......
......@@ -6,14 +6,14 @@
</div>
<div class="form-group has-feedback has-feedback-left">
<input id="username" type="text" class="form-control" placeholder="Usuario">
<input id="username" name="username" type="text" class="form-control" placeholder="Usuario">
<div class="form-control-feedback">
<i class="icon-user text-muted"></i>
</div>
</div>
<div class="form-group has-feedback has-feedback-left">
<input id="password" type="text" class="form-control" placeholder="Contraseña">
<input id="password" type="password" class="form-control" placeholder="Contraseña">
<div class="form-control-feedback">
<i class="icon-lock2 text-muted"></i>
</div>
......
......@@ -22,15 +22,15 @@
</head>
<body class="login-container ">
<body class="login-container">
<!-- Page container -->
<div class="page-container absolute-center">
<div class="page-container">
<!-- Page content -->
<div class="page-content">
<!-- Main content -->
<div class="content-wrapper ">
<div class="content-wrapper">
<div id="login" style="display: none">
......
......@@ -9,12 +9,12 @@ function createWindow() {
height: 600,
frame: false,
kiosk: true,
icon:'./img/checkList.ico'
icon: './img/checkList.ico'
})
win.loadFile('index.html')
// open devtools
win.webContents.openDevTools()
win.setMenu(null)
// win.setMenu(null)
// win.setFullScreen(true)
// win.maximize()
......
......@@ -63,7 +63,7 @@
exp = 'abcdefghijklmnñopqrstuvwxyzáéíóú '
break
case 'numbers':
exp = '1234567890.'
exp = '1234567890'
break
case 'date':
exp = '1234567890/'
......
// const MacAddress = require('get-mac-address');
const macaddress = require('macaddress')
const nodeMachineId = require(`node-machine-id`)
const { shell } = require('electron')
const {
shell
} = require('electron')
let ids = {}
let _this = require('electron').remote.getCurrentWindow()
......@@ -53,7 +55,7 @@ const helpers = {
}, 1700)
},
alertSuccess(message, callback) {
let action = callback || function () { }
let action = callback || function () {}
swal(message || '¡Correcto!', {
icon: 'success',
button: 'Aceptar'
......@@ -63,7 +65,7 @@ const helpers = {
})
},
alertError(message, callback) {
let action = callback || function () { }
let action = callback || function () {}
swal(message || '¡Advertencia!', {
icon: 'danger',
button: 'Aceptar'
......@@ -110,7 +112,8 @@ const httpRequest = {
success: function (data, textStatus, jqXHR) {
loader.terminarLoader()
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
},
error: function (jqXHR, textStatus, errorThrown) {
loader.terminarLoader()
reject('Error en la petición')
}
......@@ -132,7 +135,8 @@ const httpRequest = {
success: function (data, textStatus, jqXHR) {
loader.terminarLoader()
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
},
error: function (jqXHR, textStatus, errorThrown) {
loader.terminarLoader()
reject('Error en la petición')
}
......@@ -192,7 +196,8 @@ const httpRequest = {
success: function (data, textStatus, jqXHR) {
loader.terminarLoader()
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
},
error: function (jqXHR, textStatus, errorThrown) {
loader.terminarLoader()
reject('Error en la petición')
}
......@@ -214,7 +219,8 @@ const httpRequest = {
success: function (data, textStatus, jqXHR) {
loader.terminarLoader()
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
},
error: function (jqXHR, textStatus, errorThrown) {
loader.terminarLoader()
reject('Error en la petición')
}
......@@ -297,23 +303,29 @@ const DOMEvents = {
})
.then(data => {
if (data.status) {
if (data.aditional) {
param = {
codigoUsuario: data.data.codigoUsuario,
codigoSede: data.data.codigoSede,
idMachine: ids.idMachine,
macMachine: ids.macMachine
}
alert('Su sede ya tiene registrada una máquina, si continua los cambios se sobrescribiran')
if (data.aditional) {
msnConfirm('Ya hay una máquina registrada para esta sede, si continua dicha máquina será eliminada.<br> ¿Desea continuar?', (option) => {
if (option) {
param.aditional = true
initRequest.registrarSede(param)
}
})
} else {
initRequest.registrarSede(param)
}
} else {
if (data.aditional) {
alert('Esta maquina ya esta registrada para una sede')
msnError(data.message, () => {
helpers.refreshBW(_this)
})
} else {
alert('Usuario no existe o no tiene permisos')
msnError(data.message)
}
}
})
......@@ -336,22 +348,22 @@ const initRequest = {
codigoUsuario: json.codigoUsuario,
codigoSede: json.codigoSede,
idMachine: json.idMachine,
macMachine: json.macMachine
macMachine: json.macMachine,
aditional: json.aditional
})
.then(data => {
alert('Registro exitoso')
msnSuccess('Registro exitoso', () => {
helpers.refreshBW(_this)
})
})
.catch(err => console.log(err))
},
pasteLogin() {
httpRequest.getLogin()
.then(data => {
$('#login').html(data)
$('body').addClass('login-container')
$('.page-container').toggleClass('absolute-center')
$("#login").fadeIn("slow");
// $('#login').modal('show')
// $('.modal-backdrop').removeClass("modal-backdrop")
DOMEvents.linkDirectorio()
DOMEvents.registrarSede()
})
......@@ -379,7 +391,10 @@ const initComponents = {
digitalClock.start();
},
initValidate() {
new Input({ el: '#dniUsuario', param: 'numbers' }).validate()
new Input({
el: '#dniUsuario',
param: 'numbers'
}).validate()
}
}
......@@ -393,20 +408,25 @@ $(window).ready(() => {
httpRequest.checkIds()
.then(data => {
if (data.status === true) {
if (data.aditional) {
msnError('¡Ocurrió un error!<br/>Contáctese con el area de sistemas')
} else {
initRequest.pasteContent()
}
} else {
if ((data.message).includes('--->')) {
msnError('Ha ocurrido un error inesperado.<br/>Contáctese con el area de sistemas.')
console.log(data.message);
} else {
if (data.aditional === true) {
helpers.alert('Contactese con el area de sistemas')
msnError('¡Ocurrió un error!<br/>Contáctese con el area de sistemas.')
} else {
alert('La sesion se ha perdido')
initRequest.pasteLogin()
}
}
}
})
}).catch(err => {
console.log(err)
})
})
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment