{% extends 'staff/report/base.html' %} {% load i18n %} {% block opts_modify %} var userCols = [ {field:'emp_code', width:120, title: "{% trans 'report_column_empCode' %}", sort:true} ,{field:'first_name', title: "{% trans 'report_column_firstName' %}"} ,{field:'last_name', title: "{% trans 'report_column_lastName' %}"} ,{field:'nick_name', title: "{% trans 'report_column_nickName' %}"} ,{field:'gender', title: "{% trans 'report_column_gender' %}"} ,{field:'dept_code', title: "{% trans 'report_column_departmentCode' %}"} ,{field:'dept_name', width:140, title: "{% trans 'report_column_departmentName' %}"} ,{field:'position_code', title: "{% trans 'report_column_positionCode' %}"} ,{field:'position_name', title: "{% trans 'report_column_positionName' %}"} ,{field:'total_late', width:80, title: "{% trans 'report_column_lateDuration' %}"} ,{field:'total_early_leave', width:100, title: "{% trans 'report_column_earlyLeaveDuration' %}"} ,{field:'total_absent', width:80, title: "{% trans 'report_column_absentDuration' %}"} ,{field:'total_worked', title: "{% trans 'report_column_actualWorkDuration' %}"} ,{field:'total_not', title: "{% trans 'report_column_normalOvertime' %}"} ,{field:'total_wot', title: "{% trans 'report_column_weekendOvertime' %}"} ,{field:'total_hot', title: "{% trans 'report_column_holidayOvertime' %}"} ,{field:'total_leave', title: "{% trans 'report_column_leaveDuration' %}"} ]; var leaveCols = []; {% for c in category %} leaveCols.push({field: 'leave_'+"{{ c.id }}", title: "{{ c.category_name }}"}) {% endfor %} _cols = userCols.concat(leaveCols); $.extend(opts, { cols: [_cols] ,method: "get" ,url: "/att/api/empSummaryReport/" }); {% endblock %}