OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)

This commit is contained in:
wangruiguo
2026-09-03 18:49:20 +08:00
commit d647428529
3501 changed files with 1988906 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
@props([
'percentComplete' => 0,
'current' => '',
'completed' => [],
])
<div class="projectSteps">
<div class="progressWrapper">
<div class="progress">
<div
id="progressChecklistBar"
class="progress-bar progress-bar-success tx-transition"
role="progressbar"
aria-valuenow="0"
aria-valuemin="0"
aria-valuemax="100"
style="width: {{ $percentComplete }}%"
><span class="sr-only">{{ $percentComplete }}%</span></div>
</div>
<div class="step @if($current=='account') current @endif @if(in_array("account", $completed)) complete @endif" style="left: 12%;">
<a href="javascript:void(0)" data-toggle="dropdown" class="dropdown-toggle">
<span class="innerCircle">
@if(in_array("account", $completed))
<i class="fa-solid fa-check" style="color:var(--main-action-color); padding-left:3px;"></i>
@endif
</span>
<span class="title">
Account
</span>
</a>
</div>
<div class="step @if($current=='theme') current @endif @if(in_array("theme", $completed)) complete @endif" style="left: 37%;">
<a href="javascript:void(0)" data-toggle="dropdown" class="dropdown-toggle">
<span class="innerCircle">
@if(in_array("theme", $completed))
<i class="fa-solid fa-check" style="color:var(--main-action-color); padding-left:3px;"></i>
@endif
</span>
<span class="title">
Theme
</span>
</a>
</div>
<div class="step @if($current=='personalization') current @endif @if(in_array("personalization", $completed)) complete @endif" style="left: 62%;">
<a href="javascript:void(0)" data-toggle="dropdown" class="dropdown-toggle">
<span class="innerCircle">
@if(in_array("personalization", $completed))
<i class="fa-solid fa-check" style="color:var(--main-action-color); padding-left:3px;"></i>
@endif
</span>
<span class="title">
Personalization
</span>
</a>
</div>
<div class="step @if($current=='time') current @endif @if(in_array("time", $completed)) complete @endif" style="left: 88%;">
<a href="javascript:void(0)" data-toggle="dropdown" class="dropdown-toggle">
<span class="innerCircle">
@if(in_array("time", $completed))
<i class="fa-solid fa-check" style="color:var(--main-action-color); padding-left:3px;"></i>
@endif
</span>
<span class="title">
Routine
</span>
</a>
</div>
</div>
</div>
<br /><br /><br />

View File

@@ -0,0 +1,63 @@
@extends($layout)
@section('content')
@dispatchEvent('beforePageHeaderOpen')
<div class="pageheader">
@dispatchEvent('afterPageHeaderOpen')
<div class="pagetitle">
<h1>{!! __('headlines.login') !!}</h1>
</div>
@dispatchEvent('beforePageHeaderClose')
</div>
@dispatchEvent('afterPageHeaderClose')
<div class="regcontent">
@dispatchEvent('afterRegcontentOpen')
{!! $tpl->displayInlineNotification() !!}
@if ($noLoginForm === false)
<form id="login" action="{{ BASE_URL }}/auth/login" method="post">
@csrf
@dispatchEvent('afterFormOpen')
<input type="hidden" name="redirectUrl" value="{{ $redirectUrl }}" />
<div class="">
<label for="username">Email</label>
<x-global::forms.text-input name="username" id="username" placeholder="{{ __($inputPlaceholder) }}" value="" />
</div>
<div class="">
<label for="password">Password</label>
<x-global::forms.text-input type="password" name="password" id="password" autocomplete="off" placeholder="{{ __('input.placeholders.enter_password') }}" value="" />
<div class="forgotPwContainer">
<a href="{{ BASE_URL }}/auth/resetPw" class="forgotPw">{!! __('links.forgot_password') !!}</a>
</div>
</div>
@dispatchEvent('beforeSubmitButton')
<div class="">
<x-global::forms.button tag="input" inputType="submit" name="login" contentRole="primary" :labelText="__('buttons.login')" />
</div>
<div>
</div>
@dispatchEvent('beforeFormClose')
</form>
@else
{!! __('text.no_login_form') !!}<br /><br />
@endif
@if ($oidcEnabled)
@dispatchEvent('beforeOidcButton')
<div class="">
<div style="margin-top:20px; border-bottom:1px solid #ccc; with:100%; height:10px; overflow:show; text-align:center; margin-bottom:40px;">
<p style="text-align:center; display:inline-block; background:var(--secondary-background); padding:0px 5px;">{!! __('label.or_login_with') !!}</p>
</div>
<x-global::forms.button tag="a" :link="BASE_URL . '/oidc/login'" contentRole="primary" style="width:100%;">{!! __('buttons.oidclogin') !!}</x-global::forms.button>
</div>
@endif
@dispatchEvent('beforeRegcontentClose')
</div>
@endsection

View File

@@ -0,0 +1,44 @@
@dispatchEvent('beforeUserinfoMenuOpen')
<div class="userinfo">
@dispatchEvent('afterUserinfoMenuOpen')
@if(session()->exists("companysettings.logoPath") && session("companysettings.logoPath") !== false && session("companysettings.logoPath") !== '')
<a href='{{ BASE_URL }}/users/editOwn/' preload="mouseover" class="dropdown-toggle profileHandler includeLogo" data-toggle="dropdown">
<img src="{{ BASE_URL }}/api/users?profileImage={{ $user['id'] ?? -1 }}&v={{ format($user['modified'] ?? -1)->timestamp() }}" class="profilePicture"/>
<img src="{{ session("companysettings.logoPath") }}" class="logo tw-pl-1" />
</a>
@else
<a href='{{ BASE_URL }}/users/editOwn/' preload="mouseover" class="dropdown-toggle profileHandler" data-toggle="dropdown">
<img src="{{ BASE_URL }}/api/users?profileImage={{ $user['id'] ?? -1 }}&v={{ format($user['modified'] ?? -1)->timestamp() }}" class="profilePicture"/>
</a>
@endif
<ul class="dropdown-menu">
@dispatchEvent('afterUserinfoDropdownMenuOpen')
<li>
<a href='{{ BASE_URL }}/users/editOwn/' preload="mouseover">
{!! __("menu.my_profile") !!}
</a>
</li>
@dispatchEvent('afterMyProfile')
<li>
<a href='{{ BASE_URL }}/users/editOwn#theme' preload="mouseover">
{!! __("menu.theme") !!}
</a>
</li>
@dispatchEvent('afterTheme')
<li>
<a href='{{ BASE_URL }}/users/editOwn#settings' preload="mouseover">
{!! __("menu.settings") !!}
</a>
</li>
@dispatchEvent('afterSettings')
<li class="border">
<a href='{{ BASE_URL }}/auth/logout'>
{!! __("menu.sign_out") !!}
</a>
</li>
@dispatchEvent('beforeUserinfoDropdownMenuClose')
</ul>
@dispatchEvent('beforeUserinfoMenuClose')
</div>
@dispatchEvent('afterUserinfoMenuClose')

View File

@@ -0,0 +1,38 @@
@fragment('tokens-table')
<div class="row">
<div class="col-md-12">
<div>
<h5 class="subtitle">{{ __('headlines.personal_access_tokens') }}</h5>
<p>{{ __('text.create_tokens_to_authenticate') }}</p>
<br />
<x-global::forms.button tag="a" contentRole="primary" link="#/auth/tokenNew">{{ __('buttons.create_token') }}</x-global::forms.button> <br />
<div class="clearfix"></div>
<table class="table table-bordered" id="tokens-table">
<thead>
<tr>
<th>{{ __('label.name') }}</th>
<th>{{ __('label.last_used') }}</th>
<th>{{ __('label.created_on') }}</th>
<th>{{ __('label.actions') }}</th>
</tr>
</thead>
<tbody>
@foreach($tokens as $token)
<tr>
<td>{{ $token['name'] }}</td>
<td>{{ $token['last_used_at'] ? format($token['last_used_at'])->date() . ' ' . format($token['last_used_at'])->time(): 'Never' }}</td>
<td>{{ format($token['created_at'])->date(). ' ' . format($token['created_at'])->time() }}</td>
<td>
<x-global::forms.button state="danger" class="btn-sm" hx-delete="{{ BASE_URL }}/hx/auth/personalTokens/delete/{{ $token['id'] }}" hx-confirm="{{ __('notifications.confirm_token_delete') }}" hx-target="#personalTokens"><i class="fa fa-trash"></i></x-global::forms.button>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endfragment

View File

@@ -0,0 +1,32 @@
@extends($layout)
@section('content')
@dispatchEvent('beforePageHeaderOpen')
<div class="pageheader">
<div class="pagetitle">
<h1>{!! __('headlines.reset_password') !!}</h1>
</div>
</div>
@dispatchEvent('afterPageHeaderClose')
<div class="regcontent">
@dispatchEvent('afterRegcontentOpen')
<form id="resetPassword" action="" method="post">
@dispatchEvent('afterFormOpen')
{!! $tpl->displayInlineNotification() !!}
<p>{!! __('text.enter_email_address_to_reset') !!}<br /><br /></p>
<div class="">
<x-global::forms.text-input name="username" id="username" placeholder="{{ __('input.placeholders.enter_email') }}" />
</div>
<div class="">
<div class="forgotPwContainer">
<a href="{{ BASE_URL }}/" class="forgotPw">{!! __('links.back_to_login') !!}</a>
</div>
@dispatchEvent('beforeSubmitButton')
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.reset_password')" name="resetPassword" />
</div>
@dispatchEvent('beforeFormClose')
</form>
@dispatchEvent('beforeRegcontentClose')
</div>
@endsection

View File

@@ -0,0 +1,51 @@
@extends($layout)
@section('content')
@dispatchEvent('beforePageHeaderOpen')
<div class="pageheader">
@dispatchEvent('afterPageHeaderOpen')
<div class="pagetitle">
<h1>{!! __('headlines.reset_password') !!}</h1>
</div>
@dispatchEvent('beforePageHeaderClose')
</div>
@dispatchEvent('afterPageHeaderClose')
<div class="regcontent">
@dispatchEvent('afterRegcontentOpen')
<form id="resetPassword" action="" method="post">
@dispatchEvent('afterFormOpen')
{!! $tpl->displayInlineNotification() !!}
<p>{!! __('text.enter_new_password') !!}<br /><br /></p>
<div class="">
<x-global::forms.text-input type="password" autocomplete="off" name="password" id="password" placeholder="{{ __('input.placeholders.enter_new_password') }}" />
<span id="pwStrength" style="width:100%;"></span>
</div>
<div class=" ">
<x-global::forms.text-input type="password" autocomplete="off" name="password2" id="password2" placeholder="{{ __('input.placeholders.confirm_password') }}" />
</div>
<small>{!! __('label.passwordRequirements') !!}</small><br /><br />
<div class="">
@dispatchEvent('beforeSubmitButton')
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.reset_password')" name="resetPassword" />
<div class="forgotPwContainer">
<a href="{{ BASE_URL }}/" class="forgotPw">{!! __('links.back_to_login') !!}</a>
</div>
</div>
@dispatchEvent('beforeFormClose')
</form>
@dispatchEvent('beforeRegcontentClose')
</div>
@once
@push('scripts')
<script>
leantime.usersController.checkPWStrength('password');
</script>
@endpush
@endonce
@endsection

View File

@@ -0,0 +1,10 @@
<h4 class="widgettitle title-light">{{ __('headlines.token_created') }}</h4>
<p>{{ __('text.copy_token_now') }}</p>
<div class="form-group">
<x-global::forms.text-input value="{{ $newToken }}" onclick="this.select();" />
</div>
<div class="align-right">
<x-global::forms.button inputType="button" contentRole="default" onclick="leantime.modals.closeModal();">{{ __('buttons.close') }}</x-global::forms.button>
<x-global::forms.button inputType="button" contentRole="primary" onclick="leantime.snippets.copyToClipboard('{{ $newToken }}')">{{ __('labels.copy_to_clipboard') }}</x-global::forms.button>
</div>

View File

@@ -0,0 +1,20 @@
<div id="tokenModal">
<h4 class="widgettitle title-light">{{ __('headlines.create_access_token') }}</h4>
<form hx-post="{{ BASE_URL }}/hx/auth/personalTokens/create"
hx-target="#tokenModal" id="newToken">
<div class="form-group">
<label for="tokenName">{{ __('label.token_name') }}</label>
<x-global::forms.text-input id="tokenName" name="name" required />
<small class="form-text text-muted">
<br/>{{ __('text.token_name_description') }}
</small>
</div>
<br />
<div class="align-right">
<x-global::forms.button inputType="button" contentRole="default" onclick="jQuery('#modal').modal('hide');">{{ __('buttons.close') }}</x-global::forms.button>
<x-global::forms.button inputType="submit" contentRole="primary">{{ __('buttons.create_token') }}</x-global::forms.button>
</div>
</form>
</div>

View File

@@ -0,0 +1,52 @@
@extends($layout)
@section('content')
<x-auth::onboardingProgress :percentComplete="12" current="account" :completed="[]" />
<h2>{{ __('titles.account_details') }}</h2>
<?php $tpl->dispatchTplEvent('afterPageHeaderClose'); ?>
<div class="regcontent">
<?php $tpl->dispatchTplEvent('afterRegcontentOpen'); ?>
<form id="resetPassword" action="" method="post">
<?php $tpl->dispatchTplEvent('afterFormOpen'); ?>
<?php echo $tpl->displayInlineNotification(); ?>
<input type="hidden" name="step" value="1"/>
<div class="">
<label for="name"><?php echo $tpl->language->__("label.name"); ?></label>
<input type="text" name="name" style="margin-bottom:15px" id="name" placeholder="<?php echo $tpl->language->__("input.placeholders.name"); ?>" value="<?=$tpl->escape($user['firstname']); ?>" />
</div>
<div class="">
<label for="jobTitle"><?php echo $tpl->language->__("label.role_or_title"); ?></label>
<input type="text" name="jobTitle" id="jobTitle" style="margin-bottom:15px" placeholder="<?php echo $tpl->language->__("input.placeholders.jobtitle"); ?>" value="<?=$tpl->escape($user['jobTitle']); ?>" />
</div>
<div class="">
<label for="password"><?php echo $tpl->language->__("label.password"); ?></label>
<input type="password" name="password" autocomplete="off" id="password" style="margin-bottom:15px" placeholder="<?php echo $tpl->language->__("input.placeholders.enter_new_password"); ?>" />
<span id="pwStrength" style="width:100%;"></span>
</div>
<small><?=$tpl->__('label.passwordRequirements') ?></small><br /><br />
<div class="">
<input type="hidden" name="saveAccount" value="1" />
<?php $tpl->dispatchTplEvent('beforeSubmitButton'); ?>
<div class="tw-text-right">
<input type="submit" name="createAccount" class="tw-w-auto" style="width:auto" value="<?php echo $tpl->language->__("buttons.next"); ?>" />
</div>
</div>
<?php $tpl->dispatchTplEvent('beforeFormClose'); ?>
</form>
<?php $tpl->dispatchTplEvent('beforeRegcontentClose'); ?>
</div>
<script>
leantime.usersController.checkPWStrength('password');
</script>
@endsection

View File

@@ -0,0 +1,63 @@
@extends($layout)
@section('content')
<x-auth::onboardingProgress :percentComplete="37" current="theme" :completed="['account']" />
<h2>{{ __('titles.determine_visual_experience') }}</h2>
<p>{{ __('text.choose_a_theme_and_font_easy_to_read') }}</p>
<div class="regcontent">
<form id="resetPassword" action="" method="post">
<input type="hidden" name="step" value="2" />
{{ $tpl->displayInlineNotification() }}
<div class="row-fluid">
<div class="form-group">
<label for="themeSelect">Optimal Stimulation</label>
<span class='field tw-flex'>
<?php
$themeAll = $themeCore->getAll();
foreach ($themeAll as $key => $theme) { ?>
<x-global::selectable selected="{{ ($userTheme == $key ? 'true' : 'false') }}" :id="''" :name="'theme'" :value="$key" :label="''" class="tw-w-1/2" onclick="leantime.snippets.toggleBg('{{ $key }}')">
<img src="{{ BASE_URL }}/dist/images/background-{{$key}}.png" style="margin:0; border-radius:10px;" />
<br /><?= $tpl->__($theme['name']) ?>
</x-global::selectable>
<?php } ?>
</span>
</div>
<br />
<div class="form-group">
<label>Readability</label>
<div class="tw-flex">
@foreach($availableFonts as $key => $font)
<x-global::selectable data-tippy-content="{{ $fontTooltips[$key] }}" :selected="($themeFont == $font) ? 'true' : ''" :id="$key" :name="'themeFont'" :value="$font" :label="$font" onclick="leantime.snippets.toggleFont('{{ $font }}')">
<label for="selectable-{{ $key }}" class="font tw-w-[150px]"
style="font-family:'{{ $font }}'; font-size:16px;">
The quick brown fox jumps over the lazy dog
</label>
</x-global::selectable>
@endforeach
</div>
</div>
</div>
<br />
<div class="tw-text-right">
<x-global::forms.button tag="a" link="{{BASE_URL}}/auth/userInvite/{{$inviteId}}" contentRole="tertiary" style="width:auto; margin-right:10px">Back</x-global::forms.button>
<input type="submit" name="createAccount" class="tw-w-auto" style="width:auto" value="<?php echo $tpl->language->__("buttons.next"); ?>" />
</div>
</form>
</div>
@endsection

View File

@@ -0,0 +1,61 @@
@extends($layout)
@section('content')
<x-auth::onboardingProgress :percentComplete="64" current="personalization" :completed="['account', 'theme']" />
<h2>🎨 Creating A Comfortable View</h2>
<p>Your favorite color mode and scheme.<br /></p>
<div class="regcontent">
<form id="resetPassword" action="" method="post">
<input type="hidden" name="step" value="3" />
{{ $tpl->displayInlineNotification() }}
<div class="row">
<div class="col-md-12">
<label for="colormode" >{{ __('label.colormode') }}</label>
<x-global::selectable :selected="($userColorMode == 'light') ? 'true' : ''" :id="'light'" :name="'colormode'" :value="'light'" :label="'Light'" onclick="leantime.snippets.toggleTheme('light')">
<label for="colormode-light" class="tw-w-[200px]">
<i class="fa-solid fa-sun tw-font-xxl"></i>
</label>
</x-global::selectable>
<x-global::selectable :selected="($userColorMode == 'dark') ? 'true' : ''" :id="'dark'" :name="'colormode'" :value="'dark'" :label="'Dark'" onclick="leantime.snippets.toggleTheme('dark')">
<label for="colormode-light" class="tw-w-[200px]">
<i class="fa-solid fa-moon tw-font-xxl"></i>
</label>
</x-global::selectable>
</div>
</div>
<br />
<div class="row">
<div class="col-md-12">
<label>Color Scheme</label>
@foreach($availableColorSchemes as $key => $scheme )
<x-global::selectable class="circle" :selected="($userColorScheme == $key) ? 'true' : ''" :id="$key" :name="'colorscheme'" :value="$key" :label="__($scheme['name'])" onclick="leantime.snippets.toggleColors('{{ $scheme['primaryColor'] }}','{{ $scheme['secondaryColor'] }}');">
<label for="color-{{ $key }}" class="colorCircle"
style="background:linear-gradient(135deg, {{ $scheme["primaryColor"] }} 20%, {{ $scheme["secondaryColor"] }} 100%);">
</label>
</x-global::selectable>
@endforeach
</div>
</div>
<br /> <br />
<div class="tw-text-right">
<x-global::forms.button tag="a" link="{{BASE_URL}}/auth/userInvite/{{$inviteId}}?step=2" contentRole="tertiary" style="width:auto; margin-right:10px">Back</x-global::forms.button>
<input type="submit" name="createAccount" class="tw-w-auto" style="width:auto" value="<?php echo $tpl->language->__("buttons.next"); ?>" />
</div>
</form>
</div>
@endsection

View File

@@ -0,0 +1,200 @@
@extends($layout)
@section('content')
<x-auth::onboardingProgress :percentComplete="88" current="time" :completed="['account', 'theme', 'personalization']" />
<h2>🗓️ Shaping A Daily Flow</h2>
<p>We'll use these times to help prioritize your tasks</p>
<div class="regcontent">
<form id="resetPassword" action="" method="post">
<input type="hidden" name="step" value="4"/>
{{ $tpl->displayInlineNotification() }}
<label>What time do you usually start working?</label>
<div class="">
<x-global::selectable selected="{{ $daySchedule['workStart'] == '8' ? 'true' : 'false' }}" :id="'daySchedule-workStart-1'" :name="'daySchedule-workStart-button'" :value="'8'" :label="''" onclick="jQuery('#daySchedule-workStart').val('8').hide(); jQuery('#daySchedule-workStart-3').show();" class="compact">
<label for="" class="">
{{ format($dayHourOptions[8]['start'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time() }} - {{ format($dayHourOptions[8]['end'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time()}}
</label>
</x-global::selectable>
<x-global::selectable selected="{{ $daySchedule['workStart'] == '10' ? 'true' : 'false' }}" :id="'daySchedule-workStart-2'" :name="'daySchedule-workStart-button'" :value="'10'" :label="''" onclick="jQuery('#daySchedule-workStart').val('10').hide(); jQuery('#daySchedule-workStart-3').show(); " class="compact">
<label for="" class="">
{{ format($dayHourOptions[10]['start'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time() }} - {{ format($dayHourOptions[10]['end'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time()}}
</label>
</x-global::selectable>
<x-global::selectable selected="" :id="'daySchedule-workStart-3'" :name="'daySchedule-workStart-button'" :value="''" :label="''" class="compact" onclick="jQuery(this).hide(); jQuery('#daySchedule-workStart').show()">
<label for="" class="">
<i class="fa fa-clock"></i> Select my own
</label>
</x-global::selectable>
<select name="daySchedule-workStart" id="daySchedule-workStart" style="display:none; vertical-align: top;">
@foreach($dayHourOptions as $key => $value)
<option value="{{ $key }}">
{{ format($value['start'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time() }} - {{ format($value['end'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time()}}
</option>
@endforeach
</select>
</div>
<br />
<label>When do you normally take a lunch break from work?</label>
<div class="">
<x-global::selectable selected="{{ $daySchedule['lunch'] == '12' ? 'true' : 'false' }}" :id="'daySchedule-lunch-1'" :name="'daySchedule-lunch-button'" :value="'12'" :label="''" onclick="jQuery('#daySchedule-lunch').val('12').hide(); jQuery('#daySchedule-lunch-3').show();" class="compact">
<label for="" class="">
{{ format($dayHourOptions[12]['start'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time() }} - {{ format($dayHourOptions[12]['end'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time()}}
</label>
</x-global::selectable>
<x-global::selectable selected="{{ $daySchedule['lunch'] == '14' ? 'true' : 'false' }}" :id="'daySchedule-lunch-2'" :name="'daySchedule-lunch-button'" :value="'14'" :label="''" onclick="jQuery('#daySchedule-lunch').val('14').hide(); jQuery('#daySchedule-lunch-3').show();" class="compact">
<label for="" class="">
{{ format($dayHourOptions[14]['start'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time() }} - {{ format($dayHourOptions[14]['end'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time()}}
</label>
</x-global::selectable>
<x-global::selectable selected="" :id="'daySchedule-lunch-3'" :name="'daySchedule-lunch-button'" :value="''" :label="''" class="compact" onclick="jQuery(this).hide(); jQuery('#daySchedule-lunch').show()">
<label for="" class="">
<i class="fa fa-clock"></i> Select my own
</label>
</x-global::selectable>
<select name="daySchedule-lunch" id="daySchedule-lunch" style="display:none; vertical-align: top;">
@foreach($dayHourOptions as $key => $value)
<option value="{{ $key }}">
{{ format($value['start'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time() }} - {{ format($value['end'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time()}}
</option>
@endforeach
</select>
</div>
<br />
<label>When do you normally end your work day? 🥳</label>
<div class="">
<x-global::selectable selected="{{ $daySchedule['workEnd'] == '16' ? 'true' : 'false' }}" :id="'daySchedule-workEnd-1'" :name="'daySchedule-workEnd-button'" :value="'16'" :label="''" onclick="jQuery('#daySchedule-workEnd').val('16').hide(); jQuery('#daySchedule-workEnd-3').show();" class="compact">
<label for="" class="">
{{ format($dayHourOptions[16]['start'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time() }} - {{ format($dayHourOptions[16]['end'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time()}}
</label>
</x-global::selectable>
<x-global::selectable selected="{{ $daySchedule['workEnd'] == '18' ? 'true' : 'false' }}" :id="'daySchedule-workEnd-2'" :name="'daySchedule-workEnd-button'" :value="'18'" :label="''" onclick="jQuery('#daySchedule-workEnd').val('18').hide(); jQuery('#daySchedule-workEnd-3').show();" class="compact">
<label for="" class="">
{{ format($dayHourOptions[18]['start'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time() }} - {{ format($dayHourOptions[18]['end'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time()}}
</label>
</x-global::selectable>
<x-global::selectable selected="" :id="'daySchedule-workEnd-3'" :name="'daySchedule-workEnd-button'" :value="''" :label="''" class="compact" onclick="jQuery(this).hide(); jQuery('#daySchedule-workEnd').show()">
<label for="" class="">
<i class="fa fa-clock"></i> Select my own
</label>
</x-global::selectable>
<select name="daySchedule-workEnd" id="daySchedule-workEnd" style="display:none; vertical-align: top;">
@foreach($dayHourOptions as $key => $value)
<option value="{{ $key }}">
{{ format($value['start'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time() }} - {{ format($value['end'], null, \Leantime\Core\Support\FromFormat::User24hTime)->time()}}
</option>
@endforeach
</select>
</div>
{{-- <div class="tw-flex">--}}
{{-- @foreach([1,2,3,4,5,6,7] as $dayOfWeekIso)--}}
{{-- <x-global::selectable type="checkbox" class="circle" selected="{{ isset($workdays[$dayOfWeekIso]) ? 'true' : '' }}" :id="'dayOfWeek-'.$dayOfWeekIso" :name="'dayOfWeek-'.$dayOfWeekIso" :value="$dayOfWeekIso" :label="''" onclick="showTimeForm({{$dayOfWeekIso}})">--}}
{{-- <label for="dayOfWeek-{{ $dayOfWeekIso }}" class="">--}}
{{-- {{ substr(__('dates.day_of_week_iso-'.$dayOfWeekIso), 0, 2) }}--}}
{{-- </label>--}}
{{-- </x-global::selectable>--}}
{{-- @endforeach--}}
{{-- </div>--}}
{{-- <div>--}}
{{-- @foreach([1,2,3,4,5,6,7] as $dayOfWeekIso)--}}
{{-- <div class="dayOfWeekInputs dayOfWeekInput-{{$dayOfWeekIso}} {{ isset($workdays[$dayOfWeekIso]) ? 'tw-flex' : 'tw-hidden' }}">--}}
{{-- <div class="tw-w-1/4 tw-leading-[32px]">--}}
{{-- {{ __('dates.day_of_week_iso-'.$dayOfWeekIso) }}--}}
{{-- </div>--}}
{{-- <div class="tw-w-1/4">--}}
{{-- <input type="time" class="dayStart" name="dayOfWeek-{{$dayOfWeekIso}}-start" value='{{ isset($workdays[$dayOfWeekIso]) ? $workdays[$dayOfWeekIso]['start'] : '09:00'}}' step="1800"/>--}}
{{-- </div>--}}
{{-- <div class="tw-px-2 tw-leading-[32px]">to</div>--}}
{{-- <div class="tw-w-1/4">--}}
{{-- <input type="time" class="dayEnd" name="dayOfWeek-{{$dayOfWeekIso}}-end" value='{{ isset($workdays[$dayOfWeekIso]) ? $workdays[$dayOfWeekIso]['end'] : '17:00'}}' step="1800"/>--}}
{{-- </div>--}}
{{-- <div class="tw-w tw-leading-[32px] tw-pl-2 applyBox">--}}
{{-- @if($loop->index == 0)--}}
{{-- <a href="javascript:void(0)">Apply to all</a>--}}
{{-- @endif--}}
{{-- </div>--}}
{{-- </div>--}}
{{-- @endforeach--}}
{{-- </div>--}}
<br /> <br />
<div class="tw-text-right">
<x-global::forms.button tag="a" link="{{BASE_URL}}/auth/userInvite/{{$inviteId}}?step=3" contentRole="tertiary" style="width:auto; margin-right:10px">Back</x-global::forms.button>
<input type="submit" name="createAccount" class="tw-w-auto" style="width:auto" value="<?php echo $tpl->language->__("buttons.next"); ?>" />
</div>
</form>
</div>
<script>
function applyToAllClick() {
jQuery('.dayOfWeekInputs').each(function() {
let linkParentContainer = jQuery(this);
jQuery(this).find('.applyBox a').click(function() {
let startInput = jQuery(linkParentContainer).find("input.dayStart").val();
let endInput = jQuery(linkParentContainer).find("input.dayEnd").val();
jQuery('.dayOfWeekInputs input.dayStart').val(startInput);
jQuery('.dayOfWeekInputs input.dayEnd').val(endInput);
});
})
}
jQuery(document).ready(function() {
applyToAllClick();
var timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
jQuery("#timezone").val(timezone);
var now=new Date(2010,11,31);
var str=now.toLocaleDateString();
str=str.replace("31","dd");
str=str.replace("12","mm");
str=str.replace("2010","yyyy");
})
function showTimeForm($id) {
let isVisible = jQuery('.dayOfWeekInput-'+$id).hasClass("tw-flex");
if(isVisible) {
jQuery('.dayOfWeekInput-'+$id).removeClass("tw-flex");
jQuery('.dayOfWeekInput-'+$id).addClass("tw-hidden");
}else{
jQuery('.dayOfWeekInput-'+$id).addClass("tw-flex");
jQuery('.dayOfWeekInput-'+$id).removeClass("tw-hidden");
}
jQuery('.dayOfWeekInputs').find('.applyBox').html("");
jQuery('.dayOfWeekInputs.tw-flex').each(function(index){
if(index == 0) {
jQuery(this).find('.applyBox').html("<a href='javascript:void(0);'>Apply to all")
}else{
jQuery(this).find('.applyBox').html();
}
});
applyToAllClick();
}
</script>
@endsection

View File

@@ -0,0 +1,42 @@
@extends($layout)
@section('content')
<x-auth::onboardingProgress :percentComplete="100" current="" :completed="['account', 'theme', 'personalization', 'time']" />
<h2>🎉 Your Leantime journey is about to begin</h2>
<div class="regcontent">
<form id="resetPassword" action="" method="post">
<input type="hidden" name="step" value="5"/>
<input type="hidden" name="complete" value="1"/>
{{ $tpl->displayInlineNotification() }}
<div class="row">
<div class="col-md-6">
<div class="ticketBox tw-p-[20px]">
<span class="fancyLink">Did you know?</span><br />
<span style="font-size:16px;">Setting Intentions has been shown to <strong>more than double the success rate</strong> of completing a task.</span>
</div>
</div>
<div class="col-md-6">
<x-global::undrawSvg image="undraw_adventure_map_hnin.svg" maxWidth="60%" maxHeight="300px"></x-global::undrawSvg>
</div>
</div>
<p><br />From here, we'll help you turn your task list into a project and goals.
Then we'll work<br /> together to identify your most important tasks so you can create some
intentions<br />to get the work done.</p> <br />
<br />
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" labelText="Complete Sign up" name="createAccount" />
</form>
</div>
@endsection