test #1

Merged
administrator merged 8 commits from test into feature/odoo18 2025-03-11 14:31:55 +05:30
1 changed files with 15 additions and 1 deletions
Showing only changes of commit e8358b050b - Show all commits

View File

@ -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');