aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/getURLOfUser.js
blob: a546ace288ae0a1b109d8a697edf9c35d4676360 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const leftPad = require('left-pad')
const getWeek = require('./getWeek')

function getURLOfUsers (weekOffset, type, id) {
  return `http://${window.location.host}/meetingpointProxy/Roosters-AL%2Fdoc%2Fdagroosters%2F` +
      `${getWeek() + weekOffset}%2F${type}%2F${type}${leftPad(id, 5, '0')}.htm`
}

module.exports = getURLOfUsers

module.exports.CLASS = 'c'
module.exports.TEACHERS = 't'
module.exports.ROOMS = 'r'
module.exports.STUDENTS = 's'