Attendance status should be open in place of Draft when I am applying for attendance and savings then its coming Draft
I want it should come as open by default when I will apply for attendance then reporting person should change status present, absent, on leave
@Prashanth_Kolhetkar
As soon as Attendance is not submitted. The Status will show draft. As its a core document you cannot change the Status Select field to your liking.
You could create a workflow and and uncheck “Don’t override Status” then you can define the status and roles you would like to display.
Jeel
July 16, 2024, 9:33am
3
get_indicator: function (doc) {
if ([“Present”, “Work From Home”].includes(doc.status)) {
return [(doc.status), “green”, “status,=,” + doc.status];
} else if ([“Draft”].includes(doc.status)) {
return [ (“Open”), “green”, “status,=,” + “Open”];
}else if ([“Absent”, “On Leave”].includes(doc.status)) {
return [(doc.status), “red”, “status,=,” + doc.status];
} else if (doc.status == “Half Day”) {
return [ (doc.status), “orange”, “status,=,” + doc.status];
}
}, just create one file for that attendence_list.js and override doctype list js in hooks.py
1 Like
@Jeel I never written code via hook could you explain me in detail how to write in hook and how to access hook file
Please give step by step how to do, i am also facing the same issue
hooks thing and all
Jeel
July 16, 2024, 3:01pm
7
You can create client script also for that.you can refer this List
1 Like