77 lines
4.1 KiB
PHP
77 lines
4.1 KiB
PHP
<div class="space-y-6">
|
|
<div class="flex items-center justify-between gap-4">
|
|
<div>
|
|
<flux:heading size="xl">{{ __('Create ticket') }}</flux:heading>
|
|
<flux:text>{{ __('Create a new Helpdesk request.') }}</flux:text>
|
|
</div>
|
|
<flux:button :href="route('helpdesk.tickets.index')" wire:navigate>{{ __('Back to tickets') }}</flux:button>
|
|
</div>
|
|
|
|
<form wire:submit="save" class="space-y-6">
|
|
<div class="grid gap-6 rounded-2xl border border-zinc-200 bg-white p-6 dark:border-zinc-700 dark:bg-zinc-900 lg:grid-cols-2">
|
|
<div class="lg:col-span-2">
|
|
<flux:input wire:model="subject" :label="__('Subject')" required />
|
|
@error('subject') <p class="mt-1 text-sm text-red-600">{{ $message }}</p> @enderror
|
|
</div>
|
|
|
|
<div class="lg:col-span-2">
|
|
<flux:textarea wire:model="body" rows="10" :label="__('Description')" required />
|
|
@error('body') <p class="mt-1 text-sm text-red-600">{{ $message }}</p> @enderror
|
|
</div>
|
|
|
|
<flux:select wire:model="board_id" :label="__('Board')">
|
|
<option value="">{{ __('No board') }}</option>
|
|
@foreach ($boards as $item)<option value="{{ $item->id }}">{{ $item->name }}</option>@endforeach
|
|
</flux:select>
|
|
|
|
<flux:select wire:model="priority_id" :label="__('Priority')" required>
|
|
<option value="">{{ __('Select priority') }}</option>
|
|
@foreach ($priorities as $item)<option value="{{ $item->id }}">{{ $item->name }}</option>@endforeach
|
|
</flux:select>
|
|
|
|
<flux:select wire:model="category_id" :label="__('Category')">
|
|
<option value="">{{ __('No category') }}</option>
|
|
@foreach ($categories as $item)<option value="{{ $item->id }}">{{ $item->name }}</option>@endforeach
|
|
</flux:select>
|
|
|
|
<flux:select wire:model="team_id" :label="__('Team')">
|
|
<option value="">{{ __('No team') }}</option>
|
|
@foreach ($teams as $item)<option value="{{ $item->id }}">{{ $item->name }}</option>@endforeach
|
|
</flux:select>
|
|
|
|
<flux:select wire:model="project_id" :label="__('Project')">
|
|
<option value="">{{ __('No project') }}</option>
|
|
@foreach ($projects as $item)<option value="{{ $item->id }}">{{ $item->title }}</option>@endforeach
|
|
</flux:select>
|
|
|
|
<flux:select wire:model="product_id" :label="__('Product')">
|
|
<option value="">{{ __('No product') }}</option>
|
|
@foreach ($products as $item)<option value="{{ $item->id }}">{{ $item->name }}</option>@endforeach
|
|
</flux:select>
|
|
|
|
<flux:input wire:model="due_at" type="date" :label="__('Due date')" />
|
|
|
|
<div>
|
|
<label class="mb-2 block text-sm font-medium text-zinc-700 dark:text-zinc-300">{{ __('Tags') }}</label>
|
|
<select wire:model="tag_ids" multiple class="w-full rounded-lg border-zinc-300 bg-white dark:border-zinc-700 dark:bg-zinc-800">
|
|
@foreach ($tags as $item)<option value="{{ $item->id }}">{{ $item->name }}</option>@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
<div class="lg:col-span-2">
|
|
<label class="mb-2 block text-sm font-medium text-zinc-700 dark:text-zinc-300">{{ __('Attachments') }}</label>
|
|
<input wire:model="attachments" type="file" multiple class="block w-full text-sm text-zinc-600 dark:text-zinc-300">
|
|
@error('attachments.*') <p class="mt-1 text-sm text-red-600">{{ $message }}</p> @enderror
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex justify-end gap-3">
|
|
<flux:button type="button" wire:click="clearForm">{{ __('Clear') }}</flux:button>
|
|
<flux:button type="submit" variant="primary" wire:loading.attr="disabled" wire:target="save">
|
|
<span wire:loading.remove wire:target="save">{{ __('Create ticket') }}</span>
|
|
<span wire:loading wire:target="save">{{ __('Saving…') }}</span>
|
|
</flux:button>
|
|
</div>
|
|
</form>
|
|
</div>
|