feat(fusion_clock): open shifts + self-assign + bulk apply [B4-B5]
Model: fclk_create_open_shifts/claim_open_shift/release_shift (days-before cutoff + role eligibility)/bulk_apply. Planner: Open Shift… panel, open-shifts strip with delete, Apply-to-dept; load includes open shifts. Portal: claim open shifts + release own upcoming shifts with feedback banners. Tests for claim/role-gate/release/bulk. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,41 @@
|
||||
<h1 class="fclk-greeting">Hello, <t t-esc="employee.name.split(' ')[0]"/></h1>
|
||||
</div>
|
||||
|
||||
<!-- Claim / release feedback -->
|
||||
<div class="fpl-flash fpl-flash-err" t-if="error">
|
||||
<t t-esc="error"/>
|
||||
</div>
|
||||
<div class="fpl-flash fpl-flash-ok" t-if="success">
|
||||
<t t-if="success == 'claimed'">Shift claimed — it's now on your schedule.</t>
|
||||
<t t-elif="success == 'released'">Shift released back to the open pool.</t>
|
||||
<t t-else="">Done.</t>
|
||||
</div>
|
||||
|
||||
<!-- Open shifts available to claim -->
|
||||
<t t-if="open_shifts">
|
||||
<div class="fpl-group">
|
||||
<div class="fpl-group-title">Open Shifts — Available to Claim</div>
|
||||
<div class="fpl-list">
|
||||
<t t-foreach="open_shifts" t-as="op">
|
||||
<div class="fclk-recent-item fpl-open-item">
|
||||
<div class="fclk-recent-info">
|
||||
<div class="fclk-recent-location">
|
||||
<t t-esc="op['date_full']"/>
|
||||
<t t-if="op['role_name']"> · <t t-esc="op['role_name']"/></t>
|
||||
</div>
|
||||
<div class="fclk-recent-times"><t t-esc="op['time_range']"/></div>
|
||||
</div>
|
||||
<form method="post" action="/my/clock/schedule/claim" class="fpl-claim-form">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<input type="hidden" name="schedule_id" t-att-value="op['id']"/>
|
||||
<button type="submit" class="btn btn-sm btn-success">Claim</button>
|
||||
</form>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<!-- Next Shift Card (if any upcoming) -->
|
||||
<t t-if="next_slot">
|
||||
<div class="fclk-status-card fpl-next-shift">
|
||||
@@ -108,6 +143,12 @@
|
||||
</div>
|
||||
<div class="fclk-recent-hours">
|
||||
<t t-esc="'%.1f' % item['duration_hours']"/>h
|
||||
<form t-if="item.get('releasable')" method="post"
|
||||
action="/my/clock/schedule/release" class="fpl-release-form">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<input type="hidden" name="schedule_id" t-att-value="item['schedule_id']"/>
|
||||
<button type="submit" class="fpl-release-btn" title="Release this shift">Release</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user