Skip to content

Commit

Permalink
split extension and name in different lines
Browse files Browse the repository at this point in the history
  • Loading branch information
vokimon committed Jul 21, 2022
1 parent ff8423c commit 5dc1063
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 8 additions & 4 deletions tomatic/ui/components/queuemonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,18 @@ var QueueMonitor = {
+ (line.ringing?"Ring!! ":"")
+ (line.incall?"En Trucada. ":"")
) || "Disponible.",
},
Tomatic.extension(line.key)
);
}, [
Tomatic.formatName(line.key),
m('br'),
Tomatic.formatExtension(line.key),
]);
}),
m('.queueitem.add', {
onclick: vnode.state.addtoqueue.bind(vnode.state),
},
"+"
"+",
m('br'),
"Afegeix"
)
);
}
Expand Down
5 changes: 2 additions & 3 deletions tomatic/ui/components/tomatic.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,8 @@ Tomatic.formatName = function(name) {
if (!name) { return "-";}
return (Tomatic.persons().names||{})[name] || titleCase(name);
};
Tomatic.extension = function(name) {
return Tomatic.formatName(name) + ": "
+ ((Tomatic.persons().extensions||{})[name] || "???");
Tomatic.formatExtension = function(name) {
return (Tomatic.persons().extensions||{})[name] || "???";
};
Tomatic.table = function(name) {
var tables = Tomatic.persons().tables;
Expand Down

0 comments on commit 5dc1063

Please sign in to comment.