:: job_sms_fired[include]
<<set _jobId = _messageData.jobId>>
<<set _jobData = $jobs.jobData(_jobId)>>
<<=$pc.name_nick>>, you didn't show up for work today and you don't have any vacation days left.
<br>
<b>You are fired.</b>


:: job_offer[event]
	<<set _jobId = $location_var[$here][0]>>
	<<set _jobData = $jobs.jobStaticData(_jobId)>>

	<<set _returnPassageAccept = $location_var[$here][1]>>
	<<set _returnPassageDecline = $location_var[$here][2]>>

	<<debugVar _jobData>>

	<div class="jobDetails">
		<h2>Job Details: _jobData.title</h2>
		Work days: <<=_jobData.workdays.map((day)=>setup.weekDayIntToString(day)).join(', ')>><br/>
		<<textWithTooltip 'Work time:'>>
			You need to arrive at work before the starting time. You can do so within one hour before work starts.<br/>
			For example, if your work starts at 14:00, you have to arrive there between 13:00 and 13:59.
		<</textWithTooltip>>
		<<time_print _jobData.worktimes[0] _jobData.worktimes[1]>>-<<time_print _jobData.worktimes[2] _jobData.worktimes[3]>><br/>

		<<textWithTooltip 'Payment:'>>
			Payment for a complete working period. Your first payment is lower if you start in the middle of a working period.
		<</textWithTooltip>>
		<<switch _jobData.payInterval>>
			<<case 'week'>>
				<<set _earningPerWeek = _jobData.pay * 7>>
				<<money _earningPerWeek>> every week on <<=setup.weekDayIntToString(_jobData.payDay)>>
		<</switch>>

		<br/>

		Vacation: <<=_jobData.vacationInterval[1]>> extra <<plural _jobData.vacationInterval[1] 'day' 'days'>> every <<=_jobData.vacationInterval[0]>> working <<plural _jobData.vacationInterval[0] 'day' 'days'>>

		<br/>

		National holidays: <<if _jobData.holidays>>free<<else>>work<</if>>

		<hr/>
		Next working time: <<datetime $jobs.workStartTime(_jobId,1)>>

	</div>
	<<act 'Accept job'>>
		<<run $jobs.start(_jobId)>>
		<<gt _returnPassageAccept>>
	<</act>>

	<<act 'Decline job'>>
		<<gt _returnPassageDecline>>
	<</act>>
