changes
This commit is contained in:
@@ -1,17 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Add Clock link to portal home -->
|
||||
<!-- Clock link removed from portal home - now handled by fusion_authorizer_portal -->
|
||||
<template id="portal_my_home_clock" name="Portal My Home: Clock"
|
||||
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>
|
||||
|
||||
@@ -22,8 +15,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="__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">
|
||||
<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 ''"
|
||||
@@ -208,6 +201,20 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Request Leave -->
|
||||
<button id="fclk-leave-btn" class="fclk-leave-btn">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"/>
|
||||
<line x1="16" y1="2" x2="16" y2="6"/>
|
||||
<line x1="8" y1="2" x2="8" y2="6"/>
|
||||
<line x1="3" y1="10" x2="21" y2="10"/>
|
||||
</svg>
|
||||
Request Leave
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="fclk-leave-btn-arrow">
|
||||
<polyline points="9 18 15 12 9 6"/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<!-- Recent Activity -->
|
||||
<div class="fclk-recent-section">
|
||||
<div class="fclk-recent-header">
|
||||
@@ -278,6 +285,127 @@
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Reason Modal (missed clock-out) -->
|
||||
<div class="fclk-wizard-overlay" id="fclk-reason-modal" style="display:none;">
|
||||
<div class="fclk-wizard-backdrop" data-dismiss="fclk-reason-modal"></div>
|
||||
<div class="fclk-wizard-dialog">
|
||||
<div class="fclk-wizard-header fclk-wizard-header--warning">
|
||||
<div class="fclk-wizard-header-icon">
|
||||
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/>
|
||||
<line x1="12" y1="9" x2="12" y2="13"/>
|
||||
<line x1="12" y1="17" x2="12.01" y2="17"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="fclk-wizard-title">Missed Clock-Out</h3>
|
||||
<p class="fclk-wizard-subtitle">You didn't clock out on your last shift. Please provide details before continuing.</p>
|
||||
</div>
|
||||
<div class="fclk-wizard-body">
|
||||
<div class="fclk-wizard-field">
|
||||
<label class="fclk-wizard-label" for="fclk-reason-text">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
|
||||
Reason <span class="fclk-wizard-required">*</span>
|
||||
</label>
|
||||
<textarea id="fclk-reason-text" class="fclk-wizard-input fclk-wizard-textarea" rows="3"
|
||||
placeholder="Please explain why you didn't clock out..."></textarea>
|
||||
</div>
|
||||
<div class="fclk-wizard-field">
|
||||
<label class="fclk-wizard-label" for="fclk-reason-time">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
|
||||
Departure Time
|
||||
</label>
|
||||
<input type="datetime-local" id="fclk-reason-time" class="fclk-wizard-input"/>
|
||||
<span class="fclk-wizard-hint">When did you actually leave? (optional)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fclk-wizard-footer">
|
||||
<button class="fclk-wizard-btn fclk-wizard-btn--secondary" data-dismiss="fclk-reason-modal">Cancel</button>
|
||||
<button id="fclk-reason-submit" class="fclk-wizard-btn fclk-wizard-btn--primary">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"/></svg>
|
||||
Submit Reason
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Clock-Out Confirmation Modal -->
|
||||
<div class="fclk-wizard-overlay" id="fclk-clockout-confirm-modal" style="display:none;">
|
||||
<div class="fclk-wizard-backdrop" data-dismiss="fclk-clockout-confirm-modal"></div>
|
||||
<div class="fclk-wizard-dialog fclk-wizard-dialog--compact">
|
||||
<div class="fclk-wizard-header fclk-wizard-header--danger">
|
||||
<div class="fclk-wizard-header-icon">
|
||||
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<rect x="4" y="4" width="16" height="16" rx="2"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="fclk-wizard-title">Clock Out?</h3>
|
||||
<p class="fclk-wizard-subtitle">Are you sure you want to end your current shift?</p>
|
||||
</div>
|
||||
<div class="fclk-wizard-body">
|
||||
<div class="fclk-clockout-summary">
|
||||
<div class="fclk-clockout-summary-row">
|
||||
<span class="fclk-clockout-summary-label">Clocked in at</span>
|
||||
<span class="fclk-clockout-summary-value" id="fclk-confirm-checkin-time">--</span>
|
||||
</div>
|
||||
<div class="fclk-clockout-summary-row">
|
||||
<span class="fclk-clockout-summary-label">Duration</span>
|
||||
<span class="fclk-clockout-summary-value" id="fclk-confirm-duration">--</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fclk-wizard-footer">
|
||||
<button class="fclk-wizard-btn fclk-wizard-btn--secondary" data-dismiss="fclk-clockout-confirm-modal">Cancel</button>
|
||||
<button id="fclk-clockout-confirm-btn" class="fclk-wizard-btn fclk-wizard-btn--danger">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="4" y="4" width="16" height="16" rx="2"/></svg>
|
||||
Confirm Clock Out
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Leave Request Modal -->
|
||||
<div class="fclk-wizard-overlay" id="fclk-leave-modal" style="display:none;">
|
||||
<div class="fclk-wizard-backdrop" data-dismiss="fclk-leave-modal"></div>
|
||||
<div class="fclk-wizard-dialog">
|
||||
<div class="fclk-wizard-header fclk-wizard-header--info">
|
||||
<div class="fclk-wizard-header-icon">
|
||||
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"/>
|
||||
<line x1="16" y1="2" x2="16" y2="6"/>
|
||||
<line x1="8" y1="2" x2="8" y2="6"/>
|
||||
<line x1="3" y1="10" x2="21" y2="10"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="fclk-wizard-title">Request Leave</h3>
|
||||
<p class="fclk-wizard-subtitle">Submit a leave request for your manager to review.</p>
|
||||
</div>
|
||||
<div class="fclk-wizard-body">
|
||||
<div class="fclk-wizard-field">
|
||||
<label class="fclk-wizard-label" for="fclk-leave-date">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
Leave Date <span class="fclk-wizard-required">*</span>
|
||||
</label>
|
||||
<input type="date" id="fclk-leave-date" class="fclk-wizard-input"/>
|
||||
</div>
|
||||
<div class="fclk-wizard-field">
|
||||
<label class="fclk-wizard-label" for="fclk-leave-reason">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
|
||||
Reason <span class="fclk-wizard-required">*</span>
|
||||
</label>
|
||||
<textarea id="fclk-leave-reason" class="fclk-wizard-input fclk-wizard-textarea" rows="3"
|
||||
placeholder="Please provide a reason for your leave request..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fclk-wizard-footer">
|
||||
<button class="fclk-wizard-btn fclk-wizard-btn--secondary" data-dismiss="fclk-leave-modal">Cancel</button>
|
||||
<button id="fclk-leave-submit" class="fclk-wizard-btn fclk-wizard-btn--primary">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"/></svg>
|
||||
Submit Leave Request
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Location Picker Modal -->
|
||||
<div class="fclk-modal" id="fclk-location-modal" style="display:none;">
|
||||
<div class="fclk-modal-backdrop" onclick="document.getElementById('fclk-location-modal').style.display='none'"></div>
|
||||
|
||||
Reference in New Issue
Block a user