dashboard fix
This commit is contained in:
parent
4ab920555c
commit
e8358b050b
|
|
@ -44,6 +44,20 @@ export class NetflixProfileContainer extends Component {
|
|||
this.fetchEmployeeData();
|
||||
});
|
||||
}
|
||||
hr_timesheets() {
|
||||
this.action.doAction({
|
||||
name: "Timesheets",
|
||||
type: 'ir.actions.act_window',
|
||||
res_model: 'account.analytic.line',
|
||||
view_mode: 'list,form',
|
||||
views: [[false, 'list'], [false, 'form']],
|
||||
context: {
|
||||
'search_default_month': true,
|
||||
},
|
||||
domain: [['employee_id.user_id','=', this.props.action.context.user_id]],
|
||||
target: 'current'
|
||||
})
|
||||
}
|
||||
attendance_sign_in_out() {
|
||||
if (this.state.login_employee.attendance_state == 'checked_out') {
|
||||
this.state.login_employee.attendance_state = 'checked_in'
|
||||
|
|
@ -145,7 +159,7 @@ export class NetflixProfileContainer extends Component {
|
|||
const employee = employeeData[0];
|
||||
attendanceLines.forEach(line => {
|
||||
let createDate = new Date(line.create_date);
|
||||
line.create_date = createDate.toISOString().split('T')[0]; // Format as 'YYYY-MM-DD'
|
||||
line.create_date = createDate.toLocaleDateString('en-IN', { timeZone: 'Asia/Kolkata' }); // Format as 'YYYY-MM-DD'
|
||||
let checkIn = new Date(line.check_in + 'Z');
|
||||
line.check_in = checkIn.toLocaleTimeString([], {hour: '2-digit', minute: '2-digit', timeZone:'Asia/Kolkata'}); // Format as 'HH:MM'
|
||||
let checkOut = new Date(line.check_out + 'Z');
|
||||
|
|
|
|||
Loading…
Reference in New Issue