changes
This commit is contained in:
@@ -1,27 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Add Clock In/Out tile to the Fusion portal home grid -->
|
||||
<!-- Add Clock link to portal home -->
|
||||
<template id="portal_my_home_clock" name="Portal My Home: Clock"
|
||||
inherit_id="fusion_authorizer_portal.portal_my_home_authorizer" priority="60">
|
||||
<xpath expr="//div[hasclass('row')][hasclass('g-3')][hasclass('mb-4')]" position="inside">
|
||||
<t t-set="pfab_emp_home" t-value="request.env['hr.employee'].sudo().search([('user_id','=',request.env.uid)], limit=1)"/>
|
||||
<t t-if="pfab_emp_home and pfab_emp_home.x_fclk_enable_clock">
|
||||
<div class="col-md-6">
|
||||
<a href="/my/clock" class="card h-100 border-0 shadow-sm text-decoration-none" style="border-radius: 12px; min-height: 100px;">
|
||||
<div class="card-body d-flex align-items-center p-4">
|
||||
<div class="me-3">
|
||||
<div class="rounded-circle d-flex align-items-center justify-content-center" style="width: 50px; height: 50px; background: linear-gradient(135deg, #0d9488 0%, #2563eb 100%);">
|
||||
<i class="fa fa-clock-o fa-lg text-white"/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="mb-1 text-dark">Clock In / Out</h5>
|
||||
<small class="text-muted">Punch in, view timesheets, and reports</small>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
inherit_id="portal.portal_my_home" priority="60">
|
||||
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
|
||||
<t t-call="portal.portal_docs_entry">
|
||||
<t t-set="icon" t-value="'/fusion_clock/static/description/icon.png'"/>
|
||||
<t t-set="title">Clock In / Out</t>
|
||||
<t t-set="url" t-value="'/my/clock'"/>
|
||||
<t t-set="text">Punch in, view timesheets, and download attendance reports</t>
|
||||
<t t-set="placeholder_count" t-value="'clock_count'"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
@@ -33,8 +22,8 @@
|
||||
<template id="portal_layout_clock_fab" name="Portal Clock FAB"
|
||||
inherit_id="portal.portal_layout">
|
||||
<xpath expr="//div[@id='wrap']" position="after">
|
||||
<t t-set="pfab_emp" t-value="fclk_employee if fclk_employee is defined else False"/>
|
||||
<t t-if="pfab_emp and pfab_emp.x_fclk_enable_clock">
|
||||
<t t-set="__fclk_emp" t-value="fclk_employee if fclk_employee is defined else False"/>
|
||||
<t t-if="__fclk_emp and __fclk_emp.x_fclk_enable_clock">
|
||||
<div id="fclk-portal-fab"
|
||||
t-att-data-checked-in="'true' if fclk_checked_in else 'false'"
|
||||
t-att-data-check-in-time="fclk_check_in_time or ''"
|
||||
@@ -164,7 +153,7 @@
|
||||
<t t-if="is_checked_in">Time Elapsed</t>
|
||||
<t t-else="">Ready to Clock In</t>
|
||||
</div>
|
||||
<div class="fclk-timer" id="fclk-timer">00:00:00</div>
|
||||
<div class="fclk-timer" id="fclk-timer">00 : 00 : 00</div>
|
||||
</div>
|
||||
|
||||
<!-- Clock Button -->
|
||||
@@ -173,13 +162,13 @@
|
||||
t-attf-class="fclk-clock-btn {{ 'fclk-clock-btn-out' if is_checked_in else '' }}">
|
||||
<div class="fclk-btn-ripple"></div>
|
||||
<svg id="fclk-btn-icon-play" class="fclk-btn-icon"
|
||||
t-attf-style="display: {{ 'none' if is_checked_in else 'block' }}; margin-left: 4px;"
|
||||
width="40" height="40" viewBox="0 0 24 24" fill="white">
|
||||
<polygon points="6 3 20 12 6 21 6 3"/>
|
||||
t-attf-style="display: {{ 'none' if is_checked_in else 'block' }}"
|
||||
width="48" height="48" viewBox="0 0 24 24" fill="white">
|
||||
<polygon points="5 3 19 12 5 21 5 3"/>
|
||||
</svg>
|
||||
<svg id="fclk-btn-icon-stop" class="fclk-btn-icon"
|
||||
t-attf-style="display: {{ 'block' if is_checked_in else 'none' }}"
|
||||
width="36" height="36" viewBox="0 0 24 24" fill="white">
|
||||
width="40" height="40" viewBox="0 0 24 24" fill="white">
|
||||
<rect x="4" y="4" width="16" height="16" rx="2"/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user