working on rooms handling

parent 983dc73b
...@@ -437,6 +437,7 @@ ...@@ -437,6 +437,7 @@
"student_pictograms": "Student's pictograms", "student_pictograms": "Student's pictograms",
"student_updated": "Student updated", "student_updated": "Student updated",
"students": "Students", "students": "Students",
"subscribed": "Connected to student's account",
"sup_already_added": "Supervisor already in the list", "sup_already_added": "Supervisor already in the list",
"sup_not_added": "Supervisor not added to the student", "sup_not_added": "Supervisor not added to the student",
"sup_not_deleted": "The supervisor couldn't be deleted by the student", "sup_not_deleted": "The supervisor couldn't be deleted by the student",
......
...@@ -435,6 +435,7 @@ ...@@ -435,6 +435,7 @@
"student_pictograms": "Pictogramas del estudiante", "student_pictograms": "Pictogramas del estudiante",
"student_updated": "Estudiante actualizado", "student_updated": "Estudiante actualizado",
"students": "Alumnos", "students": "Alumnos",
"subscribed": "Conectado a la cuenta del alumno",
"sup_already_added": "El supervisor ya está en la lista", "sup_already_added": "El supervisor ya está en la lista",
"sup_not_added": "El supervisor no se ha podido añadir al estudiante.", "sup_not_added": "El supervisor no se ha podido añadir al estudiante.",
"sup_not_deleted": "El supervisor no se ha podido desvincular del alumno.", "sup_not_deleted": "El supervisor no se ha podido desvincular del alumno.",
......
...@@ -56,6 +56,12 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl( ...@@ -56,6 +56,12 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
} }
}); });
io.socket.on('disconnect', function() {
$scope.studentData.pcb_count = 0;
$scope.studentData.pdb_count = 0;
ngToast.alert($translate.instant('no_subscribed'));
});
io.socket.on('reconnect', function () { io.socket.on('reconnect', function () {
// Subscribe to student's socket room // Subscribe to student's socket room
io.socket.post('/stu/subscribe', { io.socket.post('/stu/subscribe', {
...@@ -66,8 +72,13 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl( ...@@ -66,8 +72,13 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
}, },
token: $window.sessionStorage.token token: $window.sessionStorage.token
}, },
function () { function (data) {
// TODO ngToast res.msg (connected to student room) if (data.room.search('student') != -1) {
$scope.studentData.pcb_count = data.pcb_count;
$scope.studentData.pdb_count = data.pdb_count;
$scope.$apply();
ngToast.alert($translate.instant('subscribed'));
}
}); });
}); });
......
...@@ -30,8 +30,8 @@ module.exports.pictogram = { ...@@ -30,8 +30,8 @@ module.exports.pictogram = {
// //
tpv: { tpv: {
prices: { prices: {
foreverEuro: 175, // non limited license in euros foreverEuro: 0.01, // non limited license in euros
oneYearEuro: 70, // one year license in euros oneYearEuro: 0.01, // one year license in euros
}, },
merchantCode: '152038485', // Code for Yotta merchantCode: '152038485', // Code for Yotta
// key: 'sq7HjrUOBfKmC576ILgskD5srU870gJ7' // key for signing (test) // key: 'sq7HjrUOBfKmC576ILgskD5srU870gJ7' // key for signing (test)
......
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 sign in to comment