123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395 |
- # masseuse_schedule
- if $ARGS[0] = 'schedule_reset':
- i = 1
- if masseuse['shifts_required'] = 5:
- :loop_masseuse_sched_part
- if masseuse['<<i>>_shift_1'] ! 1:
- masseuse['<<i>>_shift_1'] = 0
- masseuse['<<i>>_shift_1_taken'] = rand(0,2)
- end
- if masseuse['<<i>>_shift_2'] ! 1:
- masseuse['<<i>>_shift_2'] = 0
- masseuse['<<i>>_shift_2_taken'] = rand(0,2)
- end
- if masseuse['<<i>>_shift_3'] ! 1:
- masseuse['<<i>>_shift_3'] = 0
- masseuse['<<i>>_shift_3_taken'] = rand(-1,2)
- end
- i += 1
- if i < 8: jump 'loop_masseuse_sched_part'
- elseif masseuse['shifts_required'] = 10:
- :loop_masseuse_sched_full
- if masseuse['<<i>>_shift_1'] ! 1:
- masseuse['<<i>>_shift_1'] = 0
- masseuse['<<i>>_shift_1_taken'] = rand(-3,2)
- end
- if masseuse['<<i>>_shift_2'] ! 1:
- masseuse['<<i>>_shift_2'] = 0
- masseuse['<<i>>_shift_2_taken'] = rand(-3,2)
- end
- if masseuse['<<i>>_shift_3'] ! 1:
- masseuse['<<i>>_shift_3'] = 0
- masseuse['<<i>>_shift_3_taken'] = rand(-3,2)
- end
- i += 1
- if i < 8: jump 'loop_masseuse_sched_full'
- end
- end
- if $ARGS[0] = 'start':
- act'Finish scheduling':gt'salon','start'
- if masseuse['schedule_update'] = 0: masseuse['schedule_update'] = daystart & gs 'masseuse_schedule','schedule_reset'
- gs 'stat'
- '<Table border=1><TR><TH>Sunday</TH> <TH>Monday</TH> <TH>Tuesday</TH> <TH>Wednesday</TH> <TH>Thursday</TH> <TH>Friday</TH> <TH>Saturday</TH></TR>'
- !! ---------------------------------------------- 09:00 Shifts ---------------------------------------------------------------------------------
- !! First Sunday Shift
- *P '<tr><td>'
- if masseuse['7_shift_1'] = 0 and masseuse['7_shift_1_taken'] < 2:
- '<a href="exec:masseuse[''7_shift_1''] = 1 & gt''masseuse_schedule'',''start''"> 09:00-13:00 shift</a>'
- elseif masseuse['7_shift_1_taken'] = 2:
- '09:00-13:00 shift'
- '<i>not available</i>'
- elseif masseuse['7_shift_1'] = 2:
- '09:00-13:00 shift'
- '<i>already worked</i>'
- else
- '09:00-13:00 shift'
- '<a href="exec:masseuse[''7_shift_1''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! First Monday Shift
- if masseuse['1_shift_1'] = 0 and masseuse['1_shift_1_taken'] < 2:
- '<a href="exec:masseuse[''1_shift_1''] = 1 & gt''masseuse_schedule'',''start''"> 09:00-13:00 shift</a>'
- elseif masseuse['1_shift_1_taken'] = 2:
- '09:00-13:00 shift'
- '<i>not available</i>'
- elseif masseuse['1_shift_1'] = 2:
- '09:00-13:00 shift'
- '<i>already worked</i>'
- else
- '09:00-13:00 shift'
- '<a href="exec:masseuse[''1_shift_1''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! First Tuesday Shift
- if masseuse['2_shift_1'] = 0 and masseuse['2_shift_1_taken'] < 2:
- '<a href="exec:masseuse[''2_shift_1''] = 1 & gt''masseuse_schedule'',''start''"> 09:00-13:00 shift</a>'
- elseif masseuse['2_shift_1_taken'] = 2:
- '09:00-13:00 shift'
- '<i>not available</i>'
- elseif masseuse['2_shift_1'] = 2:
- '09:00-13:00 shift'
- '<i>already worked</i>'
- else
- '09:00-13:00 shift'
- '<a href="exec:masseuse[''2_shift_1''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! First Wednesday Shift
- if masseuse['3_shift_1'] = 0 and masseuse['3_shift_1_taken'] < 2:
- '<a href="exec:masseuse[''3_shift_1''] = 1 & gt''masseuse_schedule'',''start''"> 09:00-13:00 shift</a>'
- elseif masseuse['3_shift_1_taken'] = 2:
- '09:00-13:00 shift'
- '<i>not available</i>'
- elseif masseuse['3_shift_1'] = 2:
- '09:00-13:00 shift'
- '<i>already worked</i>'
- else
- '09:00-13:00 shift'
- '<a href="exec:masseuse[''3_shift_1''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! First Thursday Shift
- if masseuse['4_shift_1'] = 0 and masseuse['4_shift_1_taken'] < 2:
- '<a href="exec:masseuse[''4_shift_1''] = 1 & gt''masseuse_schedule'',''start''"> 09:00-13:00 shift</a>'
- elseif masseuse['4_shift_1_taken'] = 2:
- '09:00-13:00 shift'
- '<i>not available</i>'
- elseif masseuse['4_shift_1'] = 2:
- '09:00-13:00 shift'
- '<i>already worked</i>'
- else
- '09:00-13:00 shift'
- '<a href="exec:masseuse[''4_shift_1''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! First Friday Shift
-
- if masseuse['5_shift_1'] = 0 and masseuse['5_shift_1_taken'] < 2:
- '<a href="exec:masseuse[''5_shift_1''] = 1 & gt''masseuse_schedule'',''start''"> 09:00-13:00 shift</a>'
- elseif masseuse['5_shift_1_taken'] = 2:
- '09:00-13:00 shift'
- '<i>not available</i>'
- elseif masseuse['5_shift_1'] = 2:
- '09:00-13:00 shift'
- '<i>already worked</i>'
- else
- '09:00-13:00 shift'
- '<a href="exec:masseuse[''5_shift_1''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! First Saturday Shift
- if masseuse['6_shift_1'] = 0 and masseuse['6_shift_1_taken'] < 2:
- '<a href="exec:masseuse[''6_shift_1''] = 1 & gt''masseuse_schedule'',''start''"> 09:00-13:00 shift</a>'
- elseif masseuse['6_shift_1_taken'] = 2:
- '09:00-13:00 shift'
- '<i>not available</i>'
- elseif masseuse['6_shift_1'] = 2:
- '09:00-13:00 shift'
- '<i>already worked</i>'
- else
- '09:00-13:00 shift'
- '<a href="exec:masseuse[''6_shift_1''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td></tr>'
-
-
- !! ---------------------------------------------- 13:00 Shifts ---------------------------------------------------------------------------------
- !! Second Sunday Shift
- *P '<tr><td>'
- if masseuse['7_shift_2'] = 0 and masseuse['7_shift_2_taken'] < 2:
- '<a href="exec:masseuse[''7_shift_2''] = 1 & gt''masseuse_schedule'',''start''"> 13:00-17:00 shift</a>'
- elseif masseuse['7_shift_2_taken'] = 2:
- '13:00-17:00 shift'
- '<i>not available</i>'
- elseif masseuse['7_shift_2'] = 2:
- '13:00-17:00 shift'
- '<i>already worked</i>'
- else
- '13:00-17:00 shift'
- '<a href="exec:masseuse[''7_shift_2''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! Second Monday Shift
- if masseuse['1_shift_2'] = 0 and masseuse['1_shift_2_taken'] < 2:
- '<a href="exec:masseuse[''1_shift_2''] = 1 & gt''masseuse_schedule'',''start''"> 13:00-17:00 shift</a>'
- elseif masseuse['1_shift_2_taken'] = 2:
- '13:00-17:00 shift'
- '<i>not available</i>'
- elseif masseuse['1_shift_2'] = 2:
- '13:00-17:00 shift'
- '<i>already worked</i>'
- else
- '13:00-17:00 shift'
- '<a href="exec:masseuse[''1_shift_2''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! Second Tuesday Shift
- if masseuse['2_shift_2'] = 0 and masseuse['2_shift_2_taken'] < 2:
- '<a href="exec:masseuse[''2_shift_2''] = 1 & gt''masseuse_schedule'',''start''"> 13:00-17:00 shift</a>'
- elseif masseuse['2_shift_2_taken'] = 2:
- '13:00-17:00 shift'
- '<i>not available</i>'
- elseif masseuse['2_shift_2'] = 2:
- '13:00-17:00 shift'
- '<i>already worked</i>'
- else
- '13:00-17:00 shift'
- '<a href="exec:masseuse[''2_shift_2''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! Second Wednesday Shift
- if masseuse['3_shift_2'] = 0 and masseuse['3_shift_2_taken'] < 2:
- '<a href="exec:masseuse[''3_shift_2''] = 1 & gt''masseuse_schedule'',''start''"> 13:00-17:00 shift</a>'
- elseif masseuse['3_shift_2_taken'] = 2:
- '13:00-17:00 shift'
- '<i>not available</i>'
- elseif masseuse['3_shift_2'] = 2:
- '13:00-17:00 shift'
- '<i>already worked</i>'
- else
- '13:00-17:00 shift'
- '<a href="exec:masseuse[''3_shift_2''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! Second Thursday Shift
- if masseuse['4_shift_2'] = 0 and masseuse['4_shift_2_taken'] < 2:
- '<a href="exec:masseuse[''4_shift_2''] = 1 & gt''masseuse_schedule'',''start''"> 13:00-17:00 shift</a>'
- elseif masseuse['4_shift_2_taken'] = 2:
- '13:00-17:00 shift'
- '<i>not available</i>'
- elseif masseuse['4_shift_2'] = 2:
- '13:00-17:00 shift'
- '<i>already worked</i>'
- else
- '13:00-17:00 shift'
- '<a href="exec:masseuse[''4_shift_2''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! Second Friday Shift
-
- if masseuse['5_shift_2'] = 0 and masseuse['5_shift_2_taken'] < 2:
- '<a href="exec:masseuse[''5_shift_2''] = 1 & gt''masseuse_schedule'',''start''"> 13:00-17:00 shift</a>'
- elseif masseuse['5_shift_2_taken'] = 2:
- '13:00-17:00 shift'
- '<i>not available</i>'
- elseif masseuse['5_shift_2'] = 2:
- '13:00-17:00 shift'
- '<i>already worked</i>'
- else
- '13:00-17:00 shift'
- '<a href="exec:masseuse[''5_shift_2''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! Second Saturday Shift
- if masseuse['6_shift_2'] = 0 and masseuse['6_shift_2_taken'] < 2:
- '<a href="exec:masseuse[''6_shift_2''] = 1 & gt''masseuse_schedule'',''start''"> 13:00-17:00 shift</a>'
- elseif masseuse['6_shift_2_taken'] = 2:
- '13:00-17:00 shift'
- '<i>not available</i>'
- elseif masseuse['6_shift_2'] = 2:
- '13:00-17:00 shift'
- '<i>already worked</i>'
- else
- '13:00-17:00 shift'
- '<a href="exec:masseuse[''6_shift_2''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td></tr>'
-
-
- !! ---------------------------------------------- 17:00 Shifts ---------------------------------------------------------------------------------
- !! Third Sunday Shift
- *P '<tr><td>'
- if masseuse['7_shift_3'] = 0 and masseuse['7_shift_3_taken'] < 2:
- '<a href="exec:masseuse[''7_shift_3''] = 1 & gt''masseuse_schedule'',''start''"> 17:00-21:00 shift</a>'
- elseif masseuse['7_shift_3_taken'] = 2:
- '17:00-21:00 shift'
- '<i>not available</i>'
- elseif masseuse['7_shift_3'] = 2:
- '17:00-21:00 shift'
- '<i>already worked</i>'
- else
- '17:00-21:00 shift'
- '<a href="exec:masseuse[''7_shift_3''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! Third Monday Shift
- if masseuse['1_shift_3'] = 0 and masseuse['1_shift_3_taken'] < 2:
- '<a href="exec:masseuse[''1_shift_3''] = 1 & gt''masseuse_schedule'',''start''"> 17:00-21:00 shift</a>'
- elseif masseuse['1_shift_3_taken'] = 2:
- '17:00-21:00 shift'
- '<i>not available</i>'
- elseif masseuse['1_shift_3'] = 2:
- '17:00-21:00 shift'
- '<i>already worked</i>'
- else
- '17:00-21:00 shift'
- '<a href="exec:masseuse[''1_shift_3''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! Third Tuesday Shift
- if masseuse['2_shift_3'] = 0 and masseuse['2_shift_3_taken'] < 2:
- '<a href="exec:masseuse[''2_shift_3''] = 1 & gt''masseuse_schedule'',''start''"> 17:00-21:00 shift</a>'
- elseif masseuse['2_shift_3_taken'] = 2:
- '17:00-21:00 shift'
- '<i>not available</i>'
- elseif masseuse['2_shift_3'] = 2:
- '17:00-21:00 shift'
- '<i>already worked</i>'
- else
- '17:00-21:00 shift'
- '<a href="exec:masseuse[''2_shift_3''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! Third Wednesday Shift
- if masseuse['3_shift_3'] = 0 and masseuse['3_shift_3_taken'] < 2:
- '<a href="exec:masseuse[''3_shift_3''] = 1 & gt''masseuse_schedule'',''start''"> 17:00-21:00 shift</a>'
- elseif masseuse['3_shift_3_taken'] = 2:
- '17:00-21:00 shift'
- '<i>not available</i>'
- elseif masseuse['3_shift_3'] = 2:
- '17:00-21:00 shift'
- '<i>already worked</i>'
- else
- '17:00-21:00 shift'
- '<a href="exec:masseuse[''3_shift_3''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! Third Thursday Shift
- if masseuse['4_shift_3'] = 0 and masseuse['4_shift_3_taken'] < 2:
- '<a href="exec:masseuse[''4_shift_3''] = 1 & gt''masseuse_schedule'',''start''"> 17:00-21:00 shift</a>'
- elseif masseuse['4_shift_3_taken'] = 2:
- '17:00-21:00 shift'
- '<i>not available</i>'
- elseif masseuse['4_shift_3'] = 2:
- '17:00-21:00 shift'
- '<i>already worked</i>'
- else
- '17:00-21:00 shift'
- '<a href="exec:masseuse[''4_shift_3''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! Third Friday Shift
-
- if masseuse['5_shift_3'] = 0 and masseuse['5_shift_3_taken'] < 2:
- '<a href="exec:masseuse[''5_shift_3''] = 1 & gt''masseuse_schedule'',''start''"> 17:00-21:00 shift</a>'
- elseif masseuse['5_shift_3_taken'] = 2:
- '17:00-21:00 shift'
- '<i>not available</i>'
- elseif masseuse['5_shift_3'] = 2:
- '17:00-21:00 shift'
- '<i>already worked</i>'
- else
- '17:00-21:00 shift'
- '<a href="exec:masseuse[''5_shift_3''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td><td>'
- !! Third Saturday Shift
- if masseuse['6_shift_3'] = 0 and masseuse['6_shift_3_taken'] < 2:
- '<a href="exec:masseuse[''6_shift_3''] = 1 & gt''masseuse_schedule'',''start''"> 17:00-21:00 shift</a>'
- elseif masseuse['6_shift_3_taken'] = 2:
- '17:00-21:00 shift'
- '<i>not available</i>'
- elseif masseuse['6_shift_3'] = 2:
- '17:00-21:00 shift'
- '<i>already worked</i>'
- else
- '17:00-21:00 shift'
- '<a href="exec:masseuse[''6_shift_3''] = 0 & gt''masseuse_schedule'',''start''"> Cancel Shift</a>'
- end
- '</td></tr>'
-
- end
- --- masseuse_work ---------------------------------
|