93 lines
3.7 KiB
PHP
93 lines
3.7 KiB
PHP
@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
|