OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
47
app/Domain/Connector/Templates/integrationConfirm.blade.php
Normal file
47
app/Domain/Connector/Templates/integrationConfirm.blade.php
Normal file
@@ -0,0 +1,47 @@
|
||||
@extends($layout)
|
||||
|
||||
@section('content')
|
||||
|
||||
@php
|
||||
$providerFields = $providerFields ?? [];
|
||||
$provider = $provider ?? null;
|
||||
$leantimeFields = $leantimeFields ?? [];
|
||||
$numberOfFields = $maxFields ?? 0;
|
||||
$urlAppend = '';
|
||||
if (isset($integrationId) && is_numeric($integrationId)) {
|
||||
$urlAppend = '&integrationId=' . $integrationId;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="pageheader">
|
||||
<div class="pageicon"><i class="fa-solid fa-circle-nodes"></i></div>
|
||||
<div class="pagetitle">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1>{!! __('headlines.connector') !!} // {{ $provider->name }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
|
||||
<div class="maincontent">
|
||||
<div class="maincontentinner">
|
||||
@include('connector::submodules.importProgress')
|
||||
</div>
|
||||
<div class="maincontentinner">
|
||||
<div class='center'>
|
||||
<div style='width:30%' class='svgContainer'>
|
||||
{!! file_get_contents(ROOT . '/dist/images/svg/undraw_party_re_nmwj.svg') !!}
|
||||
</div>
|
||||
<br />
|
||||
<h3>Integration Success</h3>
|
||||
<p>Your data was synced successfully.</p>
|
||||
<br />
|
||||
<a class='btn btn-default' href='{{ BASE_URL }}/connector/show'>Go back to integrations</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
82
app/Domain/Connector/Templates/integrationEntity.blade.php
Normal file
82
app/Domain/Connector/Templates/integrationEntity.blade.php
Normal file
@@ -0,0 +1,82 @@
|
||||
@extends($layout)
|
||||
|
||||
@section('content')
|
||||
|
||||
@php
|
||||
$providerEntities = $providerEntities ?? [];
|
||||
$provider = $provider ?? null;
|
||||
$leantimeEntities = $leantimeEntities ?? [];
|
||||
$integrationId = $integrationId ?? null;
|
||||
|
||||
$urlAppend = '';
|
||||
if (isset($integrationId) && is_numeric($integrationId)) {
|
||||
$urlAppend = '&integrationId=' . $integrationId;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="pageheader">
|
||||
<div class="pageicon"><i class="fa-solid fa-circle-nodes"></i></div>
|
||||
<div class="pagetitle">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1>{!! __('headlines.connector') !!} // {{ $provider->name }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="maincontent">
|
||||
<div class="maincontentinner">
|
||||
@include('connector::submodules.importProgress')
|
||||
</div>
|
||||
<div class="maincontentinner center">
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
|
||||
<h5 class="subtitle">What are you importing?</h5>
|
||||
<br />
|
||||
On this screen you can choose what you would like to synchronize. Choose an entity on the left and map it to someting in Leantime on the right.
|
||||
The arrow indicates that we will synchronize from one location to the other.<br /><br />
|
||||
|
||||
<form method="post" action="{{ BASE_URL }}/connector/integration/?provider={{ $provider->id }}&step=fields{{ $urlAppend }}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-2 right">
|
||||
<h1>From (your integration)</h1>
|
||||
<label for="providerEntities">{{ $provider->name }}</label>
|
||||
<select name="providerEntities" id="providerEntities" style="width:100%;">
|
||||
@foreach ($providerEntities as $key => $entity)
|
||||
<option value="{{ $key }}">{{ $entity['name'] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2" style="padding-top:50px;">
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<h1>To (Leantime)</h1>
|
||||
|
||||
<label for="leantimeEntities">Leantime</label>
|
||||
<select name="leantimeEntities" id="leantimeEntities" style="width:100%;">
|
||||
@foreach ($leantimeEntities as $key => $entity)
|
||||
<option value="{{ $key }}">{{ $entity['name'] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
<div class="left">
|
||||
<x-global::forms.button tag="a" link="{{ BASE_URL }}/connector/integration/?provider={{ $provider->id }}" contentRole="tertiary" class="pull-left">Back</x-global::forms.button>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<x-global::forms.button tag="input" inputType="submit" labelText="Next" />
|
||||
</div>
|
||||
<div class="clearall"></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
92
app/Domain/Connector/Templates/integrationFields.blade.php
Normal file
92
app/Domain/Connector/Templates/integrationFields.blade.php
Normal file
@@ -0,0 +1,92 @@
|
||||
@extends($layout)
|
||||
|
||||
@section('content')
|
||||
|
||||
@php
|
||||
$providerFields = $providerFields ?? [];
|
||||
$provider = $provider ?? null;
|
||||
$leantimeFields = $leantimeFields ?? [];
|
||||
$numberOfFields = $maxFields ?? 0;
|
||||
$flags = $flags ?? [];
|
||||
$urlAppend = '';
|
||||
|
||||
if (isset($integrationId) && is_numeric($integrationId)) {
|
||||
$urlAppend = '&integrationId=' . $integrationId;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="pageheader">
|
||||
<div class="pageicon"><i class="fa-solid fa-circle-nodes"></i></div>
|
||||
<div class="pagetitle">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1>{!! __('headlines.connector') !!} // {{ $provider->name }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="maincontent">
|
||||
<div class="maincontentinner">
|
||||
@include('connector::submodules.importProgress')
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="maincontentinner center">
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
<h5 class="subtitle">Match Fields</h5>
|
||||
<p class="mb-2">Match the fields from your source to the corresponding fields in Leantime</p><br />
|
||||
|
||||
<form method="post" action="{{ BASE_URL }}/connector/integration/?provider={{ $provider->id }}&step=parse{{ $urlAppend }}">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="center">Source Field</th>
|
||||
<th class="center">Leantime Field</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($providerFields as $key => $entity)
|
||||
<tr>
|
||||
<td class="center">{{ $entity }}</td>
|
||||
<td class="center">
|
||||
<select class="form-control" name="field_{{ md5($entity) }}">
|
||||
@foreach ($leantimeFields as $key2 => $fields)
|
||||
<option value="{{ $entity }}|{{ $key2 }}" {{ ($entity == $fields['name'] && !in_array($key2, ['id', 'itemId'])) ? "selected='selected'" : '' }}>
|
||||
{{ $fields['name'] }}
|
||||
</option>
|
||||
@endforeach
|
||||
<option value="">Don't map</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="left">
|
||||
<x-global::forms.button tag="a" link="{{ BASE_URL }}/connector/integration/?provider={{ $provider->id }}" contentRole="tertiary" class="pull-left">Back</x-global::forms.button>
|
||||
</div>
|
||||
<div class="right">
|
||||
<x-global::forms.button inputType="submit" contentRole="primary">Next</x-global::forms.button>
|
||||
</div>
|
||||
<div class="clearall"></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="maincontentinner">
|
||||
<h5 class="subtitle">Requirements for a successful import</h5>
|
||||
<p>Please review these requirements and make sure your import and mapping covers everything.</p>
|
||||
@foreach ($flags as $flag)
|
||||
<hr />
|
||||
<p style="padding-left:10px"><strong>{{ $flag }}</strong></p>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
84
app/Domain/Connector/Templates/integrationImport.blade.php
Normal file
84
app/Domain/Connector/Templates/integrationImport.blade.php
Normal file
@@ -0,0 +1,84 @@
|
||||
@extends($layout)
|
||||
|
||||
@section('content')
|
||||
|
||||
@php
|
||||
$providerFields = $providerFields ?? [];
|
||||
$provider = $provider ?? null;
|
||||
$leantimeFields = $leantimeFields ?? [];
|
||||
$numberOfFields = $maxFields ?? 0;
|
||||
$values = $values ?? [];
|
||||
$flags = $flags ?? [];
|
||||
$fields = $fields ?? [];
|
||||
$urlAppend = '';
|
||||
if (isset($integrationId) && is_numeric($integrationId)) {
|
||||
$urlAppend = '&integrationId=' . $integrationId;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="pageheader">
|
||||
<div class="pageicon"><i class="fa-solid fa-circle-nodes"></i></div>
|
||||
<div class="pagetitle">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1>{!! __('headlines.integrations') !!} // {{ $provider->name }} </h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="maincontent">
|
||||
<div class="maincontentinner">
|
||||
@include('connector::submodules.importProgress')
|
||||
</div>
|
||||
<div class="maincontentinner center">
|
||||
{!! $tpl->displayNotification() !!}
|
||||
|
||||
<h5 class="subtitle">Review</h5>
|
||||
|
||||
@if (!empty($flags))
|
||||
<p style="font-style: oblique">Please resolve the following errors and reconnect your integration:</p>
|
||||
<ul style="padding-left: 20px; margin-bottom: 20px;">
|
||||
@php $messages = []; @endphp
|
||||
@foreach ($flags as $flag)
|
||||
@if (!in_array($flag, $messages))
|
||||
<li style="margin-right: 10px; color: red; font-style: oblique;">{{ $flag }}</li>
|
||||
@php $messages[] = $flag; @endphp
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
<x-global::forms.button tag="a" class="pull-left" link="{{ BASE_URL }}/connector/integration?provider={{ $provider->id }}&step=fields{{ $urlAppend }}" contentRole="tertiary">Go Back</x-global::forms.button>
|
||||
@else
|
||||
<x-global::forms.button tag="a" class="right" link="{{ BASE_URL }}/connector/integration?provider={{ $provider->id }}&step=import" contentRole="primary">Confirm</x-global::forms.button>
|
||||
@endif
|
||||
<div class="clearall"></div>
|
||||
|
||||
<p>All set, we are importing the data you see below.</p>
|
||||
<br />
|
||||
|
||||
<table width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
@foreach ($fields as $sourceField => $leantimeField)
|
||||
<th>{{ $leantimeField['leantimeField'] }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($values as $record)
|
||||
<tr>
|
||||
@foreach ($record as $value)
|
||||
<td>{{ $value }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<div class="clearall"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
33
app/Domain/Connector/Templates/integrations.blade.php
Normal file
33
app/Domain/Connector/Templates/integrations.blade.php
Normal file
@@ -0,0 +1,33 @@
|
||||
@extends($layout)
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="pageheader">
|
||||
<div class="pageicon"><span class="fa fa-plug"></span></div>
|
||||
<div class="pagetitle">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1>{!! __('headlines.integrations') !!}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="maincontent">
|
||||
<div class="maincontentinner">
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@once
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endonce
|
||||
|
||||
@endsection
|
||||
49
app/Domain/Connector/Templates/newIntegration.blade.php
Normal file
49
app/Domain/Connector/Templates/newIntegration.blade.php
Normal file
@@ -0,0 +1,49 @@
|
||||
@extends($layout)
|
||||
|
||||
@section('content')
|
||||
|
||||
@php
|
||||
$provider = $provider ?? null;
|
||||
@endphp
|
||||
|
||||
<div class="pageheader">
|
||||
<div class="pageicon"><i class="fa-solid fa-circle-nodes"></i></div>
|
||||
<div class="pagetitle">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1>{!! __('headlines.integrations') !!} // {{ $provider->name }} </h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="maincontent">
|
||||
<div class="maincontentinner">
|
||||
@include('connector::submodules.importProgress')
|
||||
</div>
|
||||
|
||||
<div class="maincontentinner center">
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
|
||||
<img width="200" src="{{ BASE_URL }}/{{ $provider->image }}" />
|
||||
<h5 class="subtitle">New Integration</h5>
|
||||
|
||||
{{ $provider->name }}<br />
|
||||
{!! $provider->description !!}<br /><br />
|
||||
|
||||
<x-global::forms.button tag="a" link="{{ BASE_URL }}/connector/integration?provider={{ $provider->id }}&step=connect" contentRole="primary">Click Here to Connect</x-global::forms.button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@once
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endonce
|
||||
|
||||
@endsection
|
||||
33
app/Domain/Connector/Templates/providers.blade.php
Normal file
33
app/Domain/Connector/Templates/providers.blade.php
Normal file
@@ -0,0 +1,33 @@
|
||||
@extends($layout)
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="pageheader">
|
||||
<div class="pageicon"><span class="fa fa-plug"></span></div>
|
||||
<div class="pagetitle">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<h1>{!! __('headlines.providers') !!}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="maincontent">
|
||||
<div class="maincontentinner">
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@once
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endonce
|
||||
|
||||
@endsection
|
||||
61
app/Domain/Connector/Templates/show.blade.php
Normal file
61
app/Domain/Connector/Templates/show.blade.php
Normal file
@@ -0,0 +1,61 @@
|
||||
@extends($layout)
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="pageheader">
|
||||
<div class="pageicon"><i class="fa-solid fa-circle-nodes"></i></div>
|
||||
<div class="pagetitle">
|
||||
<h1>Integrations</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="maincontent">
|
||||
<div class="maincontentinner">
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
<h5 class="subtitle">Sync Leantime with your external applications</h5>
|
||||
<p>Available Integrations</p>
|
||||
|
||||
<div class="row">
|
||||
@foreach ($providers as $provider)
|
||||
<div class="col-md-3">
|
||||
<div class="profileBox">
|
||||
<div class="commentImage gradient">
|
||||
<img src="{{ BASE_URL }}/{{ $provider->image }}"/>
|
||||
</div>
|
||||
<span class="userName">
|
||||
<strong>{{ $provider->name }}</strong>
|
||||
<br /><small>Available methods: {{ implode(', ', $provider->methods) }}</small>
|
||||
<br /><br />
|
||||
{!! $provider->description !!}
|
||||
</span>
|
||||
<br />
|
||||
|
||||
@if (isset($provider->button))
|
||||
<x-global::forms.button tag="a" link="{{ $provider->button['url'] }}" contentRole="primary">{{ $provider->button['text'] }}</x-global::forms.button>
|
||||
@else
|
||||
<x-global::forms.button tag="a" link="{{ BASE_URL }}/connector/integration?provider={{ $provider->id }}" contentRole="primary">Create New Integration</x-global::forms.button>
|
||||
@endif
|
||||
|
||||
<div class="clearall"></div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- Existing Integrations section placeholder --}}
|
||||
|
||||
</div>
|
||||
|
||||
@once
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endonce
|
||||
|
||||
@endsection
|
||||
0
app/Domain/Connector/Templates/styles.css
Normal file
0
app/Domain/Connector/Templates/styles.css
Normal file
@@ -0,0 +1,51 @@
|
||||
@php
|
||||
$currentStep = $_GET['step'] ?? 'connect';
|
||||
|
||||
$totalSteps = count($provider->steps);
|
||||
$completed = $provider->stepDetails[$currentStep]['position'];
|
||||
$halfStep = (1 / $totalSteps * 100) / 2;
|
||||
$percentDone = ($completed / $totalSteps) * 100 - $halfStep;
|
||||
|
||||
$i = 0;
|
||||
@endphp
|
||||
<br />
|
||||
<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: {{ $percentDone }}%"
|
||||
><span class="sr-only"></span></div>
|
||||
</div>
|
||||
|
||||
@foreach ($provider->steps as $step)
|
||||
@php
|
||||
$i++;
|
||||
$stepClass = '';
|
||||
if ($currentStep == $step) {
|
||||
$stepClass = 'current';
|
||||
}
|
||||
if ($provider->stepDetails[$currentStep]['position'] > $provider->stepDetails[$step]['position']) {
|
||||
$stepClass = 'complete';
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="step {{ $stepClass }}" style="left: {{ ($i / $totalSteps * 100) - $halfStep }}%;">
|
||||
<a href="javascript:void(0)" data-toggle="dropdown" class="dropdown-toggle">
|
||||
<span class="innerCircle"></span>
|
||||
<span class="title">
|
||||
@if ($provider->stepDetails[$currentStep]['position'] > $provider->stepDetails[$step]['position'])
|
||||
<i class="fa fa-check"></i>
|
||||
@endif
|
||||
{{ $provider->stepDetails[$step]['title'] }}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user