Commit 1bfd0b1f authored by Farid Neshat's avatar Farid Neshat

Fix up the help

parent efcc91ab
......@@ -5,8 +5,8 @@
// HUBOT_BAMBOOHR_APIKEY, HUBOT_BAMBOOHR_DOMAIN
//
// Commands
// timeoff help
// request [type] timeoff|leave|vacation [from|on <date>] [for <period>] [[un]till|to <date>] because <reason>
// hubot timeoff help
// hubot request [<type>] timeoff|leave|vacation [from|on <date>] [for <period>] [[un]till|to <date>] [because <reason>]
//
// Notes:
//
......@@ -107,6 +107,25 @@ module.exports = function(robot) {
dialog.resetChoices();
});
});
robot.respond(/timeoff help/i, (res) => {
res.reply(`
Here's some examples for you, try them out. I will ask for your confirmation before doing anything.
request timeoff on tomorrow because I'm sick
request vacation for 3 days from next week
request conference leave from 12th Jan till 16th Jan because I'm going for the OlinCon!
request sick leave on tomorrow 12pm till 4pm because I have to go to dentist.
I understand human dates, and I know about your 9 to 6 working hours and the fact that you don't have to work.
I will try to guess the end date and the period, but in case if I was wrong, use all 3 keywords(from, for, till):
request sick leave from tomorrow till saturday for 20 hours because I got the flu.
The possible types are: ${timeOffTypes.map(type => type.shortName).join(', ')}
`)
});
};
const parseArgs = module.exports.parseArgs = args => {
......
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