@extends('layouts.app') @section('header')

Keka integration — {{ $company->name }}

This company's own Keka account. Leave synced from it shortens the expected day on the Timesheet.
@if ($configured) Configured @else Not configured @endif
@endsection @section('content') @foreach (['success' => true, 'warning' => false] as $key => $good) @if (session($key))
{{ session($key) }}
@endif @endforeach
@csrf @method('PUT')

API credentials

The part before .keka.com. @error('keka_subdomain')
{{ $message }}
@enderror
@error('keka_client_id')
{{ $message }}
@enderror
All four are required. Both secrets are encrypted at rest, and a blank field keeps whatever is already stored.

Test the connection

Exchanges the credentials for a token and throws it away. Reads nothing about anybody, and does not go through the cache — a cached token proves Keka worked an hour ago, not that it works now.

@csrf

Leave sync

daily at {{ $syncAt }} {{ \App\Support\DisplayTimezone::short($syncZone) }}
Leave days stored
{{ number_format($stats['total']) }}
Approved
{{ number_format($stats['approved']) }}
Today or later
{{ number_format($stats['upcoming']) }}
Last synced
{{ $stats['last'] ? \Illuminate\Support\Carbon::parse($stats['last'])->diffForHumans() : 'never' }}
@if ($stats['unmapped'] > 0)
{{ $stats['unmapped'] }} leave day(s) belong to a Keka employee number that no Worklance account carries. Leave only counts for people whose Employee ID matches their Keka employee number.
@endif
@csrf
Covers last month through next month. The schedule does this daily; this is for the minute after the credentials are first saved.

What leave changes

On the Timesheet, approved leave shortens the day that was expected of somebody:

  • Full day — expected working hours become 0
  • Half day{{ $halfDay }} hours come off their rostered shift, so a shift of 8h net expects 5h

Idle/Free Time is expected minus active, so somebody who works through their leave is active for longer than was expected of them and their free time goes negative — which is how the report says they worked when they did not have to.

@endsection