wip settings tab
This commit is contained in:
parent
0744fbd0ba
commit
47fc24f500
|
|
@ -0,0 +1,183 @@
|
|||
<div class="flex flex-col divide-y gap-4">
|
||||
<div id="edit">
|
||||
<div class="flex justify-between my-2 py-2">
|
||||
<div class="text-xl font-bold ">
|
||||
{{ __('Reports') }}
|
||||
</div>
|
||||
<div class="text-gray-500 text-lg">
|
||||
{{__('Report generator for generating reports')}}
|
||||
</div>
|
||||
</div>
|
||||
<form>
|
||||
<!-- Token Name -->
|
||||
<div class="mb-2">
|
||||
<x-label for="name" value="{{ __('Name') }}"/>
|
||||
<x-input id="name" type="text" class="mt-1 block w-full" wire:model="formData.name" autofocus/>
|
||||
<x-input-error for="name" class="mt-2"/>
|
||||
</div>
|
||||
<div class="flex flex-col mb-2 gap-2">
|
||||
<p>{{__('Pivot GeoJSON file.')}}</p>
|
||||
<div id="pivot_file">
|
||||
<livewire:dropzone
|
||||
wire:model="pivotFiles"
|
||||
:rules="['extensions:json,geojson','mimes:json,geojson']"
|
||||
:key="'pivotFiles'"
|
||||
/>
|
||||
</div>
|
||||
@error('pivotFiles')
|
||||
<span class="bg-red-200 text-red-500 p-0.5 mt-1 rounded">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex flex-col mb-2 gap-2">
|
||||
<p>{{__('Span GeoJSON file.')}}</p>
|
||||
<div id="span_file">
|
||||
<livewire:dropzone
|
||||
wire:model="spanFiles"
|
||||
:rules="['extensions:json,geojson','mimes:json,geojson']"
|
||||
:key="'spanFiles'"
|
||||
/>
|
||||
</div>
|
||||
@error('spanFiles')
|
||||
<span class="bg-red-200 text-red-500 p-0.5 mt-1 rounded">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex flex-col mb-2 gap-2">
|
||||
<p>{{__('Harvested Data file.')}}</p>
|
||||
<div id="harvest_file">
|
||||
<livewire:dropzone
|
||||
wire:model="harvestDataFiles"
|
||||
:rules="['extensions:xls,xlsx,ods','mimes:xls,xlsx,ods','required']"
|
||||
:key="'harvest_file'"
|
||||
/>
|
||||
</div>
|
||||
@error('harvest_file')
|
||||
<span class="bg-red-100 text-red-400 p-1 rounded">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div name="actions">
|
||||
<x-action-message class="mr-3" on="saved">
|
||||
{{ __('Saved.') }}
|
||||
</x-action-message>
|
||||
<x-secondary-button class="mr-3"
|
||||
type="button"
|
||||
x-on:click="$wire.showProjectModal = false"
|
||||
>
|
||||
{{ __('Cancel') }}
|
||||
</x-secondary-button>
|
||||
<x-button>
|
||||
{{ __('Save') }}
|
||||
</x-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id-="mail" x-data="{showMail:false}" class="flex flex-col">
|
||||
<div class="flex justify-between my-4">
|
||||
<div class="">
|
||||
<label class="inline-flex items-center cursor-pointer gap-4">
|
||||
<input type="checkbox" class="sr-only peer" @click="showMail = $el.checked">
|
||||
<div class="relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-indigo-300 dark:peer-focus:ring-indigo-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-indigo-600"></div>
|
||||
<span class="text-xl font-bold dark:text-gray-300">{{__('Mail')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="text-gray-500 text-lg">
|
||||
{{ __('Schedule a mail for this Project') }}
|
||||
</div>
|
||||
</div>
|
||||
<form submit="saveMailSettings" x-show="showMail">
|
||||
<div class="col-span-6 sm:col-span-4">
|
||||
<x-label for="email_subject" value="{{ __('Subject') }}"/>
|
||||
<x-input id="email_subject" type="text" class="mt-1 block w-full" wire:model="formData.mail_subject"
|
||||
autofocus/>
|
||||
<x-input-error for="mail_subject" class="mt-2"/>
|
||||
</div>
|
||||
<div class="col-span-6 sm:col-span-4">
|
||||
<x-label for="email_template" value="{{ __('Template') }}"/>
|
||||
<textarea id="email_template" type="text"
|
||||
class="mt-1 block w-full h-[200px] border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm"
|
||||
wire:model="formData.mail_template"></textarea>
|
||||
<x-input-error for="mail_template" class="mt-2"/>
|
||||
</div>
|
||||
<div class="col-span-6 sm:col-span-4">
|
||||
<x-label for="email_frequency" value="{{ __('Frequency') }}"/>
|
||||
<select id="email_frequency" class="mt-1 block w-full rounded-md border-gray-300" wire:model="formData.mail_frequency">
|
||||
@foreach(App\Helper::getMailFrequencies() as $frequency)
|
||||
<option value="{{ $frequency }}">{{ $frequency }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<x-input-error for="mail_frequency" class="mt-2"/>
|
||||
</div>
|
||||
<div class="col-span-6 sm:col-span-4">
|
||||
<x-label for="mail_day" value="{{ __('Day') }}"/>
|
||||
<select id="mail_day" wire:model="formData.mail_day" class="mt-1 block w-full rounded-md border-gray-300">
|
||||
@foreach(App\Helper::getDays() as $day)
|
||||
<option value="{{ $day }}">{{ $day }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<x-input-error for="mail_day" class="mt-2"/>
|
||||
</div>
|
||||
<div class="col-span-6 sm:col-span-4 text-lg my-2 font-semibold">
|
||||
{{ __('Recipients') }}
|
||||
</div>
|
||||
<div class="divide-y divide-indigo-200 divide-dashed">
|
||||
@foreach($formData['mail_recipients'] as $key => $email_recipient)
|
||||
<div class="col-span-6 sm:colspan-4 grid-cols-6 gap-1 my-1 py-2 flex justify-between">
|
||||
<div class="">
|
||||
<x-label for="mail_recipient_{{ $key }}_name" value="{{ __('Name') }}"/>
|
||||
<x-input id="mail_recipient_{{ $key }}_name" type="text" class="mt-1 block w-full"
|
||||
wire:model="formData.mail_recipients.{{ $key }}.name" autofocus/>
|
||||
<x-input-error for="mail_recipients.{{ $key }}.name" class="mt-2"/>
|
||||
</div>
|
||||
|
||||
<div class="flex-1">
|
||||
<x-label for="bounding_box_{{ $key }}_top_left_latitude"
|
||||
value="{{ __('Email') }}"/>
|
||||
<x-input id="bounding_box_{{ $key }}_top_left_latitude" type="text"
|
||||
class="mt-1 block w-full"
|
||||
wire:model="formData.mail_recipients.{{ $key }}.email"
|
||||
autofocus/>
|
||||
<x-input-error for="mail_recipients.{{ $key }}.email" class="mt-2"/>
|
||||
</div>
|
||||
<div class="flex">
|
||||
@if( count($formData['mail_recipients']) > 1)
|
||||
<button
|
||||
class="cursor-pointer ml-6 text-sm text-red-500 py-3 self-end"
|
||||
type="button"
|
||||
wire:click="deleteEmailRecipient({{ $key }})"
|
||||
wire:confirm="{{ __('Are you sure you want to delete this Recipient?') }}"
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
|
||||
<div name="actions">
|
||||
<x-action-message class="mr-3" on="saved">
|
||||
{{ __('Saved.') }}
|
||||
</x-action-message>
|
||||
<x-secondary-button class="mr-3"
|
||||
type="button"
|
||||
wire:click="addEmailRecipient"
|
||||
>
|
||||
{{ __('Add recipient') }}
|
||||
</x-secondary-button>
|
||||
<x-secondary-button class="mr-3"
|
||||
type="button"
|
||||
x-on:click="$wire.showMailSettingsModal = false"
|
||||
>
|
||||
{{ __('Cancel') }}
|
||||
</x-secondary-button>
|
||||
<x-button>
|
||||
{{ __('Save') }}
|
||||
</x-button>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in a new issue