<?xml version="1.0" encoding="UTF-8"?>
<object-views xmlns="http://axelor.com/xml/ns/object-views"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_5.2.xsd">
	
	
	<!-- Dashboard Manager -->
	<dashboard title="Dashboard" name="hr.manager.dashboard.sample"  >
		<dashlet action="timesheet.validate" height="450" canSearch="true" if="__config__.app.isApp('timesheet')"/>
		<dashlet action="extra.hours.validate" height="450" canSearch="true" if="__config__.app.isApp('exthrs')"/>
		<dashlet action="expense.validate" height="450" canSearch="true" if="__config__.app.isApp('expense')"/>
		<dashlet action="leave.validate" height="450" canSearch="true" if="__config__.app.isApp('leave')"/>
		<dashlet action="hr.dashboard.leave.per.employee" colSpan="12" height="450" canSearch="true" if="__config__.app.isApp('leave')"/>
		<dashlet action="hr.dashboard.show.employee.expenses" colSpan="12" height="450" canSearch="true"  if="__config__.app.isApp('expense')"/>
	</dashboard>

	<action-view name="hr.dashboard.leave.per.employee" title="Leave Per Employee"
		model="com.axelor.apps.hr.db.Charts">
		<view type="chart" name="chart.leave.per.employee"/>
	</action-view>

	<action-view name="hr.dashboard.show.employee.expenses"
				 title="Expense Per Employee"
				 model="com.axelor.apps.hr.db.Expense">
		<view type="chart" name="chart.expense.per.employee"/>
	</action-view>

	<!-- Dashboard User -->
	<dashboard title="Dashboard" name="hr.user.dashboard.sample"  >
		<dashlet action="hr.dashboard.my.timesheets" height="350" canSearch="true" if="__config__.app.isApp('timesheet')"/>
		<dashlet action="hr.dashboard.my.extrahours" height="350" canSearch="true" if="__config__.app.isApp('exthrs')"/>
		<dashlet action="hr.dashboard.my.expenses" height="350" canSearch="true" if="__config__.app.isApp('expense')"/>
		<dashlet action="hr.dashboard.my.leave.requests" height="350" canSearch="true" if="__config__.app.isApp('leave')"/>
	</dashboard>
	
	<action-view name="hr.dashboard.my.extrahours" title="My extra hours" model="com.axelor.apps.hr.db.ExtraHours">
		<view type="grid" name="extra-hours-validate-grid"/>
		<view type="form" name="extra-hours-form"/>
		  <domain>self.user.id = :userId</domain>
		 <context name="userId" expr="eval: __user__.id"/>
	</action-view>
	
	<action-view name="hr.dashboard.my.expenses" title="My expenses" model="com.axelor.apps.hr.db.Expense">
		<view type="grid" name="expense-validate-grid"/>
		<view type="form" name="expense-form"/>
		  <domain>self.user.id = :userId</domain>
		 <context name="userId" expr="eval: __user__.id"/>
	</action-view>
	
	<action-view name="hr.dashboard.my.leave.requests" title="My leave requests" model="com.axelor.apps.hr.db.LeaveRequest">
		<view type="grid" name="leave-request-validate-grid"/>
		<view type="form" name="leave-request-form"/>
		 <domain>self.user.id = :userId</domain>
		 <context name="userId" expr="eval: __user__.id"/>
	</action-view>

	<action-view name="hr.dashboard.my.timesheets" title="My timesheets" model="com.axelor.apps.hr.db.Timesheet">
		<view type="grid" name="timesheet-validate-grid"/>
		<view type="form" name="timesheet-form"/>
		<domain>self.user.id = :userId</domain>
		<context name="userId" expr="eval: __user__.id"/>
	</action-view>


</object-views>

