60 lines
4.4 KiB
PHP
60 lines
4.4 KiB
PHP
<div class="space-y-6">
|
|
<div class="flex items-center justify-between gap-4">
|
|
<div>
|
|
<flux:heading size="xl">{{ __('Edit :reference', ['reference' => $ticket->reference]) }}</flux:heading>
|
|
<flux:text>{{ __('Update ticket details and assignment.') }}</flux:text>
|
|
</div>
|
|
<flux:button :href="route('helpdesk.tickets.show', $ticket)" wire:navigate>{{ __('Cancel') }}</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 /></div>
|
|
<div class="lg:col-span-2"><flux:textarea wire:model="body" rows="10" :label="__('Description')" required /></div>
|
|
|
|
<flux:select wire:model="status_id" :label="__('Status')">@foreach ($statuses as $item)<option value="{{ $item->id }}">{{ $item->name }}</option>@endforeach</flux:select>
|
|
<flux:select wire:model="priority_id" :label="__('Priority')">@foreach ($priorities as $item)<option value="{{ $item->id }}">{{ $item->name }}</option>@endforeach</flux:select>
|
|
|
|
<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="agent_id" :label="__('Agent')"><option value="">{{ __('Unassigned') }}</option>@foreach ($agents 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">{{ __('New attachments') }}</label>
|
|
<input wire:model="attachments" type="file" multiple class="block w-full text-sm">
|
|
</div>
|
|
|
|
@if ($ticket->attachments->isNotEmpty())
|
|
<div class="lg:col-span-2 space-y-2">
|
|
<flux:heading size="sm">{{ __('Existing attachments') }}</flux:heading>
|
|
@foreach ($ticket->attachments as $attachment)
|
|
<div class="flex items-center justify-between rounded-lg border border-zinc-200 px-3 py-2 dark:border-zinc-700">
|
|
<span class="text-sm">{{ $attachment->original_name ?? $attachment->filename ?? __('Attachment') }}</span>
|
|
<flux:button size="sm" variant="danger" type="button" wire:click="removeAttachment({{ $attachment->id }})">{{ __('Remove') }}</flux:button>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="flex justify-end gap-3">
|
|
<flux:button type="button" wire:click="clearForm">{{ __('Clear') }}</flux:button>
|
|
<flux:button type="submit" variant="primary">{{ __('Save changes') }}</flux:button>
|
|
</div>
|
|
</form>
|
|
</div>
|