Last active
October 5, 2023 03:12
-
-
Save creasty/952a7fb0e532ea0d0d9297d15f443775 to your computer and use it in GitHub Desktop.
Jobcan で埋まっていないところを勝手に埋めてくれるくん
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll('tr[id^=tr_line_of_]').forEach(el => { | |
const start = el.querySelector('input[name^=start]'); | |
const end = el.querySelector('input[name^=end]'); | |
const button = el.querySelector('.btn'); | |
const holiday = el.querySelector('#uneditable_holiday'); | |
if (!!start.value && !!end.value) { | |
return; | |
} | |
if (holiday.innerText.match(/休/)) { | |
return; | |
} | |
if (!!start.value && start.value >= '17:00') { | |
end.value = start.value; | |
start.value = ''; | |
} | |
start.value = start.value || '10:30'; | |
end.value = end.value || '19:00'; | |
cellBlur(start); | |
cellBlur(end); | |
button.click(); | |
}); |
Author
creasty
commented
Oct 31, 2019
•
- https://ssl.jobcan.jp/employee/attendance/edit で実行して使います。
- 退勤だけつけて、退勤時間が出勤時間に入っているケースに対応しています。
- 法休、公休にも対応しています。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment