working on rooms handling

parent 983dc73b
......@@ -437,6 +437,7 @@
"student_pictograms": "Student's pictograms",
"student_updated": "Student updated",
"students": "Students",
"subscribed": "Connected to student's account",
"sup_already_added": "Supervisor already in the list",
"sup_not_added": "Supervisor not added to the student",
"sup_not_deleted": "The supervisor couldn't be deleted by the student",
......
......@@ -435,6 +435,7 @@
"student_pictograms": "Pictogramas del estudiante",
"student_updated": "Estudiante actualizado",
"students": "Alumnos",
"subscribed": "Conectado a la cuenta del alumno",
"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_deleted": "El supervisor no se ha podido desvincular del alumno.",
......
......@@ -54,7 +54,13 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
$scope.studentData.pdb_count = data.pdb_count;
$scope.$apply();
}
});
});
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 () {
// Subscribe to student's socket room
......@@ -66,8 +72,13 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
},
token: $window.sessionStorage.token
},
function () {
// TODO ngToast res.msg (connected to student room)
function (data) {
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 = {
//
tpv: {
prices: {
foreverEuro: 175, // non limited license in euros
oneYearEuro: 70, // one year license in euros
foreverEuro: 0.01, // non limited license in euros
oneYearEuro: 0.01, // one year license in euros
},
merchantCode: '152038485', // Code for Yotta
// 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